- Add branching strategy section with prefix conventions (feat/, fix/, refactor/, docs/, chore/) - Add completion and merge workflow steps (branch from dev, merge back, push) - Emphasize no direct commits to main or dev branches
4.8 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 workflow
Branching strategy
For every spec change or new functionality:
- Create a new branch from
devwith a proper prefix:feat/for new features (e.g.,feat/tool-workshop)fix/for bug fixes (e.g.,fix/terminal-tty)refactor/for refactors (e.g.,refactor/api-cleanup)docs/for documentation (e.g.,docs/api-guide)chore/for maintenance (e.g.,chore/update-deps)
- Branch name should reference the OpenSpec change name when applicable.
- Do not commit directly to
mainordev.
Completion and merge
When implementation is complete and verified:
- Ensure all tests pass and quality gates are met.
- Stage all changes with
git add -A. - Create a commit with a proper conventional commit message (see below).
- Switch to
dev:git checkout dev. - Merge the feature branch:
git merge --no-ff <branch-name>. - Push to remote:
git push origin dev. - Delete the local feature branch if desired:
git branch -d <branch-name>.
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.