6ec5179408
- Document that dev is the default working branch - main is reserved for stable/production merges only
4.2 KiB
4.2 KiB
AGENTS.md
Core rule
OpenSpec is the source of truth. Superpowers is the default workflow. Keep changes small, scoped, and verified.
Priority order
- Current user instruction
- OpenSpec proposal, tasks, and spec deltas
- This
AGENTS.md - Existing project conventions
- Agent assumptions
When instructions conflict, follow the higher-priority source. Do not silently expand scope.
Default workflow
For any non-trivial change:
- Read the relevant OpenSpec change, tasks, and spec deltas.
- Use
brainstormingif scope, design, or requirements are unclear. - Use
writing-plansbefore implementation. - Implement only the selected task or clearly requested change.
- Use tests, typecheck, lint, or targeted checks to verify.
- Use
verification-before-completionbefore claiming completion.
If namespacing is required, use:
superpowers:brainstormingsuperpowers:writing-planssuperpowers:test-driven-developmentsuperpowers:systematic-debuggingsuperpowers:verification-before-completion
When OpenSpec is required
Create or update an OpenSpec change before implementing:
- New features
- Behavior changes
- API changes
- Database/schema changes
- Auth, security, billing, permissions, or data handling changes
- Architecture changes
- Large refactors
- Anything with unclear acceptance criteria
Small local fixes may skip OpenSpec if they do not change behavior or public contracts.
Superpowers usage
Use:
brainstormingfor ambiguity, design choices, or scope questions.writing-plansfor multi-step or multi-file work.test-driven-developmentfor behavior changes and bug fixes where practical.systematic-debuggingfor failing tests or unclear bugs.verification-before-completionbefore final completion claims.using-git-worktreesonly for isolated risky or parallel work.dispatching-parallel-agentsonly for independent subtasks with clear boundaries.
If a skill is unavailable, follow its intent manually and say so.
Scope discipline
Do not:
- Implement outside the selected OpenSpec task.
- Mix unrelated cleanup with feature work.
- Introduce new dependencies without clear justification.
- Treat existing code as more authoritative than OpenSpec for intended behavior.
- Decide product behavior silently when the spec is unclear.
If scope must change, propose an OpenSpec update first.
Verification
Before completion, report:
- What changed
- Which OpenSpec task/change it addresses
- Tests/checks run
- Any failures, skipped checks, assumptions, or risks
Do not claim completion without verification evidence.
Git branch policy
- Default working branch:
dev— all commits and pushes targetdevunless the user explicitly requests otherwise. mainis the stable/production branch; merge tomainonly when explicitly instructed.- After committing, push to
origin/dev. - If
devdoes not exist locally, create it frommainor fetch it from origin.
Git workflow
Auto-commit on spec completion
When an OpenSpec change is fully implemented and all tasks are complete:
- Stage all changes with
git add -A - Create a commit with a proper conventional commit message
- The commit message should:
- Use conventional commit format (
feat:,fix:,refactor:, etc.) - Reference the OpenSpec change name and relevant user stories
- Include a brief summary of what changed
- Mention quality gate results (tests passed, etc.)
- Example:
feat: implement user profile management - Add authenticated profile endpoints (GET/PUT /users/me) - Add avatar upload with file validation - Create frontend profile page Quality gates: pytest (50 passed), ruff, mypy
- Use conventional commit format (
Commit scope
- One commit per completed OpenSpec change (or related group of changes)
- Do not commit untested or broken code
- Do not commit secrets, .env files, or credentials
Definition of done
A task is done when:
- It matches OpenSpec.
- The diff is focused.
- Relevant tests/checks passed or limitations are stated.
- No unrelated scope was added.
- Remaining risks or follow-ups are documented.
- Changes are committed with a proper conventional commit message.