Imported from pashpa/ai-delivery-workflow-kit (
AGENTS.md). Install upstream withnpx skills add pashpa/ai-delivery-workflow-kit. Copyright stays with the author.
AGENTS.md
This repository is workflow-first.
Canonical workflow truth lives in:
workflow/core/WORKFLOW_CONSTITUTION.mdworkflow/BASELINE.mdworkflow/core/OPERATING_MODEL.mdworkflow/core/AGENT_CONTEXT_RULES.mdworkflow/core/PROJECT_WORKFLOW.mdworkflow/core/TRACEABILITY_RULES.mdworkflow/core/DOCUMENTATION_OWNERSHIP.mdworkflow/core/GIT_OPERATIONS.mdworkflow/core/GIT_COOKBOOK.mdworkflow/policies/DEFINITION_OF_READY_AND_DONE.mdworkflow/policies/SUBAGENT_DELEGATION_POLICY.mdworkflow/policies/RUNTIME_DEVICE_VALIDATION_POLICY.mdworkflow/policies/DOCUMENT_HYGIENE_POLICY.mdworkflow/guides/FRONTEND_QA_WITH_CODEX_BROWSER.mdworkflow/guides/COMPUTER_USE_QA_WORKFLOW.mdworkflow/guides/STOP_AND_REPLAN_RUNBOOK.mdworkflow/roles/CTO_WORKFLOW.mdworkflow/roles/PM_WORKFLOW.mdworkflow/roles/TECH_LEAD_WORKFLOW.mdworkflow/roles/DEVELOPER_WORKFLOW.mdworkflow/roles/QA_WORKFLOW.mdworkflow/roles/SECURITY_AUDITOR_WORKFLOW.md
If chat guidance conflicts with these docs, follow the repo docs unless the user explicitly overrides them.
Root worktree rule
Treat the repository root as a control plane by default.
Use the root worktree for:
- reading workflow docs;
- checking repo state;
- checking
git status, branches, worktrees, and PR state; - creating or removing dedicated worktrees;
- final clean review or merge operations.
Do not use the root worktree as the default execution surface for non-trivial delivery work.
For non-trivial work:
- create a dedicated branch;
- create a dedicated worktree for that branch if your repo setup supports worktrees;
- keep active WIP inside that dedicated execution surface.
If your environment or team does not use worktrees, the same rule still applies conceptually:
- keep one bounded task per clean execution surface;
- do not pile multiple unrelated tracks into one dirty branch.
Core operating rules
- Do not use local
mainas the normal execution surface for active work. - Run the freshness gate from
workflow/core/GIT_OPERATIONS.mdbefore non-trivial work, resume, handoff, and merge. - Do not leave the repo in an unfinished git state:
- unresolved merge
- half-finished rebase
- half-finished cherry-pick
- staged merge resolution left behind
- If you start
git merge,git rebase, orgit cherry-pick, finish or abort it in the same work cycle. - Do not leave unrelated local changes in a feature branch.
- Do not mix multiple tracks in one package unless that package is explicitly meant to normalize or consolidate already-related work.
Parallel work discipline
Assume parallel delivery exists or will exist.
Because of that:
- assume another branch may merge while you are working;
- before resuming a Task after relevant merges, run the repo's freshness or rebase gate;
- keep branch truth isolated:
- one bounded task per branch/package
- one execution surface per active task
- if a branch accumulates unrelated changes, stop and classify them:
- already merged
- still needed and package-worthy
- obsolete
Required git hygiene
Before handoff, review, or branch switching:
- understand
git status; - ensure tracked WIP is either:
- committed for the current task
- intentionally staged for the current task
- explicitly discarded
- resolve or abort merge state before doing anything else;
- do not leave misleading untracked artifacts around if they can confuse branch/package truth.
Packaging truth
Do not confuse:
local-acceptedreview-package-readymergedtrack-closed
Rules:
- a local checkpoint is not
merged; - a merged PR is not automatically
track-closed; - track closure requires an explicit closure decision, not just a merged diff;
- if the packaging strategy is unclear, stop and define it before work spreads across branches.
Work hierarchy
Canonical work hierarchy for new work:
- Initiative
- Track
- Lane
- Task
Checkpoint and Review are not hierarchy levels by default. Track them inside the owning Task or Lane doc unless a linked standalone artifact is needed.
Agent Context Rule
Use separate agent contexts for separate responsibilities.
Do not collapse CTO / Program Architect, PM, Tech Lead, Developer, QA, review, and release work into one long-running agent context.
Default execution baseline is the strongest practical coding/reasoning model available in the environment with medium/default reasoning. If the baseline changes, update the repo-level workflow docs explicitly.
Before launching delegated implementation, use:
workflow/policies/SUBAGENT_DELEGATION_POLICY.mdworkflow/templates/TL_SUBAGENT_LAUNCH_CHECKLIST.mdworkflow/templates/TL_TO_DEVELOPER_SUBAGENT_PACKET_TEMPLATE.md
For non-trivial implementation, Tech Lead supervises and Developer executes unless the task is a documented exception.
Browser QA
Browser QA is evidence work, not casual eyeballing.
- Use
workflow/guides/FRONTEND_QA_WITH_CODEX_BROWSER.mdfor browser-level UI QA. - Prefer Codex in-app browser / Browser Use for local/public unauthenticated visual QA when available.
- Use Playwright or Chrome DevTools MCP for deterministic checks or fallback automation.
- Use
workflow/guides/COMPUTER_USE_QA_WORKFLOW.mdonly for scoped signed-in or real GUI flows where browser-level QA is insufficient. - Use
workflow/policies/RUNTIME_DEVICE_VALIDATION_POLICY.mdwhen acceptance depends on installed app, WebView, device, provider, payment, or runtime-specific behavior. - Do not use a user's ordinary browser profile as the default automation surface.
- Do not claim branch, preview, or local screenshots as deployed or runtime proof.
Test and process discipline
- Do not launch the same local test command repeatedly while a previous identical run is still alive.
- Prefer the narrowest validation target that can prove the change.
- Long-lived processes require ownership:
- watch mode
- dev servers
- browser sessions
- MCP transports
- If a task-scoped process is no longer needed, stop it in the same work cycle.
- Before retrying a hung validation run, check whether an earlier identical run is still consuming resources.
When in doubt
If the repo is dirty and you are unsure whether a change belongs to your task:
- stop;
- inspect
git statusandgit diff; - classify the change;
- continue only after branch truth is understood.
Do not leave cleanup for "later".