Skip to content

Latest commit

Β 

History

History
91 lines (66 loc) Β· 3.9 KB

File metadata and controls

91 lines (66 loc) Β· 3.9 KB

CLAUDE.md

@AGENTS.md

Development Workflow (MANDATORY)

CRITICAL: All feature development, bug fixes, and dependency updates MUST strictly follow the autonomous-dev skill.

Mandatory Rules (Hook Enforced)

  1. All code changes must be developed in a Git Worktree β€” commits outside worktrees are automatically blocked by block-commit-outside-worktree.sh
  2. All changes must go through Pull Requests β€” direct pushes to main are automatically blocked by block-push-to-main.sh
  3. Code review before commit β€” code-simplifier must run before committing
  4. PR review before push β€” pr-review agent must run before pushing

Rule 1: ALWAYS Invoke the Skill First

Before ANY code changes β€” features, fixes, refactors, dependency bumps β€” you MUST:

  1. Invoke skill: Use /autonomous-dev or read .claude/skills/autonomous-dev/SKILL.md
  2. Follow ALL steps in order β€” NO shortcuts, NO skipping steps
  3. Do NOT merge PRs β€” Report status and wait for explicit user instruction to merge. A stop hook passing, CI passing, or review completing does NOT imply merge approval. Only merge when the user says "merge", "merge it", or equivalent.

Common violation: Skipping skill invocation and jumping straight to coding. This causes missed steps (reviewer bot iteration, PR templates, E2E test selection). The skill is not optional guidance β€” it is the required process.

Rule 2: ALWAYS Use Git Worktrees for Code Changes (Hook Enforced)

Every branch that changes code MUST use a worktree for isolation. This is enforced by block-commit-outside-worktree.sh β€” commits outside worktrees are automatically blocked. Direct pushes to main are also blocked by block-push-to-main.sh.

git fetch origin main
git worktree add .worktrees/<name> -b <type>/<name> origin/main
cd .worktrees/<name>
npm install   # worktrees don't share node_modules
# ... do all work here ...

After merge, clean up:

git worktree remove .worktrees/<name>
git branch -d <type>/<name>

Common violation: Using git checkout -b on the main working tree. This pollutes the workspace and risks uncommitted changes interfering with the feature branch.

Only exception: Trivial docs-only changes (README typos) with zero code impact.

Rule 3: Complete ALL Workflow Steps

The 10-step workflow is not a suggestion β€” every step must be completed:

  • Step 1: Create worktree + branch (not git checkout -b)
  • Step 2: Implement + write/update tests
  • Step 3: Build + test locally
  • Step 4: Commit + create PR with checklist template
  • Steps 5-7: CI checks + address ALL reviewer bot findings + iterate until clean
  • Steps 8-9: Deploy to staging + run E2E tests (use test/select-e2e-tests.sh)
  • Step 10: Report ready status (DO NOT MERGE unless user explicitly says to)

AI Agent Skills Setup

Skills provide structured workflows for AI coding agents. Install once per clone:

npx skills add zxkane/autonomous-dev-team -s '*' -a claude-code -a kiro-cli -a codex -y

Or restore from the lock file:

npx skills experimental_install

After installing skills, create the hooks symlink for SKILL.md frontmatter hook resolution:

ln -sf .claude/skills/autonomous-common/hooks hooks
Skill Purpose
autonomous-dev Full dev lifecycle: worktree, TDD, PR, CI, review bots, E2E
autonomous-review PR code review, acceptance verification, merge decisions
autonomous-common Shared hooks and scripts (loaded automatically)
autonomous-dispatcher Issue scanning and pipeline orchestration
create-issue Structured GitHub issue creation

Quick Reference

  • Development workflow: Use /autonomous-dev for PR creation, review comments, reviewer bots
  • Code review: Use /autonomous-review for PR review, acceptance verification, merge decisions
  • Issue creation: Use /create-issue for creating structured GitHub issues