# Cosmosmith Structured Agent Workflow

- If the repo uses Cosmosmith governance artifacts (AGENTS.md, task.md,
  proposal.md, design.md), treat them as the source of truth for scope,
  roles, and conventions; do not improvise around them.
- If a task ledger (task.md) exists, work from its discrete, claimable
  entries: pick one item, complete it, and record required evidence (tests
  run, files touched, verification notes) before marking it done. Never mark
  a task complete without evidence.
- If the governance docs define phase boundaries, respect them: discovery
  and proposal before design, design before implementation, QA before
  release. Do not write production code for a feature whose spec/design step
  has not been produced.
- If the governance docs define roles (product, architecture, frontend,
  backend, QA, DevOps, governance review), stay within the role you are
  acting in; flag work that belongs to another role instead of silently
  absorbing it.
- If multiple editor integrations exist, edit the shared rule source rather
  than a single editor's generated copy, so all adapters stay consistent.
- If scaffolding was generated by Cosmosmith, prefer regenerating it via the
  tool (npx cosmosmith@latest init, with flags like --claude, --cursor,
  --dry-run, --force) over hand-editing generated boilerplate; use --dry-run
  to preview destructive changes.
