archon-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

archon-dev

archon-dev

Development workflow — research, plan, build, review, ship.
开发工作流——研究、规划、开发、评审、发布。

Current State

当前状态

  • Branch: !
    git branch --show-current 2>/dev/null || echo "not in git repo"
  • Artifacts: !
    ls .claude/archon/ 2>/dev/null || echo "none yet"
  • Active plans: !
    ls .claude/archon/plans/*.plan.md 2>/dev/null | head -5 || echo "none"

  • 分支:!
    git branch --show-current 2>/dev/null || echo "not in git repo"
  • 工件:!
    ls .claude/archon/ 2>/dev/null || echo "none yet"
  • 活跃方案:!
    ls .claude/archon/plans/*.plan.md 2>/dev/null | head -5 || echo "none"

Routing

路由规则

Read
$ARGUMENTS
and determine which cookbook to load.
If the user explicitly names a cookbook (e.g., "plan", "implement"), use that. Otherwise, match intent from keywords:
IntentKeywordsCookbook
Codebase questions, document what exists"research", "how does", "what is", "where is", "trace", "find"cookbooks/research.md
Strategic research, library eval, feasibility"investigate", "should we", "can we", "compare", "evaluate", "feasibility", "best way to", "best approach"cookbooks/investigate.md
Write product requirements"prd", "requirements", "spec", "product requirement"cookbooks/prd.md
Create implementation plan"plan", "design", "architect", "write a plan"cookbooks/plan.md
Execute an existing plan"implement", "execute", "build", "code this", path to
.plan.md
cookbooks/implement.md
Review code or PR"review", "review PR", "code review", "review changes"cookbooks/review.md
Debug or root cause analysis"debug", "rca", "root cause", "why is", "broken", "failing"cookbooks/debug.md
Commit changes"commit", "save changes", "stage"cookbooks/commit.md
Create pull request"pr", "pull request", "create pr", "open pr"cookbooks/pr.md
Report to GitHub"issue", "report to gh", "log in github", "file a bug", "feature request", "create issue", "gh issue"cookbooks/issue.md
If ambiguous: Ask the user which cookbook to use.
After routing: Read the matched cookbook file and follow its instructions exactly.

读取
$ARGUMENTS
并确定要加载的操作指南(cookbook)。
如果用户明确指定了操作指南(例如“plan”、“implement”),则使用该指南。 否则,通过关键词匹配用户意图:
意图关键词操作指南
代码库相关问题、记录现有内容"research", "how does", "what is", "where is", "trace", "find"cookbooks/research.md
策略调研、库评估、可行性分析"investigate", "should we", "can we", "compare", "evaluate", "feasibility", "best way to", "best approach"cookbooks/investigate.md
撰写产品需求"prd", "requirements", "spec", "product requirement"cookbooks/prd.md
创建实现方案"plan", "design", "architect", "write a plan"cookbooks/plan.md
执行现有方案"implement", "execute", "build", "code this",
.plan.md
文件路径
cookbooks/implement.md
评审代码或PR"review", "review PR", "code review", "review changes"cookbooks/review.md
调试或根本原因分析"debug", "rca", "root cause", "why is", "broken", "failing"cookbooks/debug.md
提交修改"commit", "save changes", "stage"cookbooks/commit.md
创建拉取请求"pr", "pull request", "create pr", "open pr"cookbooks/pr.md
向GitHub反馈问题"issue", "report to gh", "log in github", "file a bug", "feature request", "create issue", "gh issue"cookbooks/issue.md
若意图模糊:询问用户应使用哪个操作指南。
路由完成后:读取匹配的操作指南文件并严格遵循其说明。

Workflow Chains

工作流链

Cookbooks feed into each other. After completing one, suggest the next:
research ──► investigate ──► prd ──► plan ──► implement ──► commit ──► pr
                              ▲                    │
             debug ───────────┘      review ◄──────┘
               issue ──► plan (if feature) or debug (if bug)

操作指南之间相互衔接。完成一个步骤后,建议下一步:
research ──► investigate ──► prd ──► plan ──► implement ──► commit ──► pr
                              ▲                    │
             debug ───────────┘      review ◄──────┘
               issue ──► plan (if feature) or debug (if bug)

Artifact Directory

工件目录

All artifacts go to
.claude/archon/
. Create subdirectories as needed on first use.
.claude/archon/
├── prds/              # Product requirement documents
├── plans/             # Implementation plans
│   └── completed/     # Archived after implementation
├── reports/           # Implementation reports
├── issues/            # GitHub issue investigations
│   └── completed/
├── reviews/           # PR review reports
├── debug/             # Root cause analysis
└── research/          # Research findings

所有工件均存放至
.claude/archon/
。首次使用时根据需要创建子目录。
.claude/archon/
├── prds/              # 产品需求文档
├── plans/             # 实现方案
│   └── completed/     # 实现完成后归档
├── reports/           # 实现报告
├── issues/            # GitHub问题调研
│   └── completed/
├── reviews/           # PR评审报告
├── debug/             # 根本原因分析
└── research/          # 研究结果

Project Detection

项目检测

Do NOT hardcode project-specific commands. Detect dynamically:
  • Package manager: Check for
    bun.lockb
    → bun,
    pnpm-lock.yaml
    → pnpm,
    yarn.lock
    → yarn, else npm
  • Validation command: Check
    package.json
    scripts for
    validate
    ,
    check
    , or
    verify
  • Test command: Check for
    test
    script in
    package.json
  • Conventions: Read CLAUDE.md for project-specific rules

请勿硬编码项目特定命令,需动态检测:
  • 包管理器:检查是否存在
    bun.lockb
    → bun,
    pnpm-lock.yaml
    → pnpm,
    yarn.lock
    → yarn,否则使用npm
  • 验证命令:检查
    package.json
    的scripts中是否有
    validate
    check
    verify
  • 测试命令:检查
    package.json
    中是否有
    test
    脚本
  • 约定规则:阅读CLAUDE.md获取项目特定规则

Rules

规则

  1. Evidence-based: Every claim about the codebase must reference
    file:line
  2. No speculation: If uncertain, investigate first
  3. Fail fast: Surface errors immediately, never swallow them
  4. Respect CLAUDE.md: Project conventions override cookbook defaults
  5. No AI attribution: Never add "Generated with Claude" or "Co-Authored-By: Claude" to commits or PRs
  1. 基于证据:所有关于代码库的声明必须引用
    file:line
  2. 禁止猜测:若不确定,先进行调研
  3. 快速失败:立即暴露错误,绝不掩盖
  4. 遵循CLAUDE.md:项目约定优先于操作指南默认规则
  5. 禁止AI署名:切勿在提交或PR中添加“Generated with Claude”或“Co-Authored-By: Claude”