This file is the execution contract for this repository.
AGENTS.md for execution and open a
follow-up issue to reconcile docs..agents/skills/ and canonical policy depth in docs/master-plan.md and docs/sop.md.Before starting implementation, resolve task pickup in this order:
In Progress.docs/tasks/CWS-<id>.md and docs/agent-context.md.No implementation starts until pickup drift is documented.
Agent-context memory rule:
docs/agent-context.md at task start.docs/agent-context.md whenever there is meaningful new context: drift discoveries,
execution decisions, risk changes, ordering changes, validation findings, or handoff notes.Identity and orchestration are defined in the canonical docs. This file enforces operational
boundaries using explicit MUST NOT rules.
Role boundaries:
team-lead (orchestrator): plans, delegates, synthesizes.developer and execution roles: implement scoped changes.researcher and fact-checker: read-only lanes.publisher-release: packaging and release flow.Global boundary rules:
make qa-local) before packaging.Use a Two-Phase model:
Orchestrators MUST NOT collapse planning and execution into one uncontrolled pass for multi-step work.
Before execution, perform structured clarification checks:
Ask one clarification at a time. Do not ask routine questions already answered by this file, repo skills, or task context.
Agents MUST NOT continue blind retries after the stop threshold.
DoR gate before pickup:
docs/tasks/CWS-<id>.md for task branches.DoD gate before closeout:
PR_REQUIRED work.Reference canonical definitions in docs/master-plan.md and docs/sop.md.
cws/<id>-<slug>.docs/tasks/CWS-<id>.md is required before PR creation.Use repository entry points instead of ad hoc command sequences:
make qa-local is the required local release gate.make create-pr TYPE=... standardizes PR metadata packaging.make finalize-merge PR=... standardizes rebase-only integration closeout.Graphite and GitHub CLI policy:
gt for stack lifecycle (create, modify, restack, sync, submit).gh for GitHub object operations (checks, labels, comments, PR metadata updates).make finalize-merge PR=... merges a single PR via gh pr merge --rebase --delete-branch. It
validates rollout plan gates, CI checks, and self-review. For PRs stacked on non-trunk bases, it
warns that only the current PR is merged and directs to gt merge or Graphite web for full-stack
merges. It does not manage Graphite metadata or retarget child PRs.gt merge or Graphite web “Merge stack” to merge the full stack in
one operation. This keeps Graphite metadata consistent and retargets children correctly.make finalize-merge on one PR in a stack, do NOT run gt sync --force to reconcile
the remaining children. gt sync --force deletes branches it considers stale and closes their
PRs. Instead, manually rebase child branches onto the new main or retarget their PRs via gh.gh pr merge outside make finalize-merge. The script provides
validation gates that raw gh bypasses.Code quality principles — these are hard requirements, not suggestions:
[DECISION], [ERROR], [PIVOT], [INSIGHT],
[MEMORY-HIT], [MEMORY-MISS], [USER-CORRECTION], [BLOCKED].- [TAG] brief description.
Add indented detail lines only when the rationale is not obvious.
Optional timestamp prefix: - HH:MM [TAG] description.## Summary section before ending substantive sessions./session-retro for deep retrospective on meaningful sessions.Agent boundary control is instruction-based, not hard sandbox partitioning per role.
MUST NOT boundaries reduce risk but are not a platform-enforced ACL.For PR reviews, prioritize high-impact findings:
If there are no significant issues, state: No high-impact findings.
AGENTS.md small; place repeatable procedures in skills and references.This contract applies to all agent execution platforms used with this repository, including OpenAI Codex and Anthropic Claude Code. Platform-specific mechanics are documented in:
.codex/ directory, docs/sop.mdCLAUDE.mdThe rules in this file override any platform-specific defaults.
Approved labels (15). Do not create new labels without human approval.
| Label | Purpose |
|---|---|
Spec |
Has written specification |
Ready |
Pickup-ready, no blockers |
agent-task |
Work to be executed by an AI agent |
human-task |
Human executes |
Infra |
Infrastructure/tooling domain |
Workflow |
Process/workflow domain |
epic:dx-setup |
DX setup epic |
epic:editorial-qa |
Editorial quality epic |
epic:ci-pipeline |
CI pipeline epic |
epic:safety |
Safety and security epic |
epic:skills |
Skill authoring epic |
epic:reasoning |
Reasoning skills epic |
epic:slack |
Slack integration epic |
epic:dispatch |
Dispatch workflow epic |
epic:agents-config |
Agent config epic |
Label consolidation reference (CWS-93): epic:security was absorbed into epic:safety.
Status:* labels, duplicate Bug/Feature labels, and Codex-specific labels were removed.
If old label names appear in Linear history, map them to the closest approved label above.
Shell scripts must:
set -euo pipefailevalcurl | bash patterns