setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Compound Engineering Setup

Compound Engineering 配置流程

Interactive setup for
compound-engineering.local.md
— configures which agents run during
/workflows:review
and
/workflows:work
.
compound-engineering.local.md
的交互式设置——配置在
/workflows:review
/workflows:work
流程中运行的Agent。

Step 1: Check Existing Config

步骤1:检查现有配置

Read
compound-engineering.local.md
in the project root. If it exists, display current settings summary and use AskUserQuestion:
question: "Settings file already exists. What would you like to do?"
header: "Config"
options:
  - label: "Reconfigure"
    description: "Run the interactive setup again from scratch"
  - label: "View current"
    description: "Show the file contents, then stop"
  - label: "Cancel"
    description: "Keep current settings"
If "View current": read and display the file, then stop. If "Cancel": stop.
读取项目根目录下的
compound-engineering.local.md
文件。如果文件存在,显示当前配置摘要并调用AskUserQuestion:
question: "Settings file already exists. What would you like to do?"
header: "Config"
options:
  - label: "Reconfigure"
    description: "Run the interactive setup again from scratch"
  - label: "View current"
    description: "Show the file contents, then stop"
  - label: "Cancel"
    description: "Keep current settings"
若选择“View current”:读取并显示文件内容,然后终止流程。 若选择“Cancel”:直接终止流程。

Step 2: Detect and Ask

步骤2:技术栈检测与询问

Auto-detect the project stack:
bash
test -f Gemfile && test -f config/routes.rb && echo "rails" || \
test -f Gemfile && echo "ruby" || \
test -f tsconfig.json && echo "typescript" || \
test -f package.json && echo "javascript" || \
test -f pyproject.toml && echo "python" || \
test -f requirements.txt && echo "python" || \
echo "general"
Use AskUserQuestion:
question: "Detected {type} project. How would you like to configure?"
header: "Setup"
options:
  - label: "Auto-configure (Recommended)"
    description: "Use smart defaults for {type}. Done in one click."
  - label: "Customize"
    description: "Choose stack, focus areas, and review depth."
自动检测项目技术栈:
bash
test -f Gemfile && test -f config/routes.rb && echo "rails" || \
test -f Gemfile && echo "ruby" || \
test -f tsconfig.json && echo "typescript" || \
test -f package.json && echo "javascript" || \
test -f pyproject.toml && echo "python" || \
test -f requirements.txt && echo "python" || \
echo "general"
调用AskUserQuestion:
question: "Detected {type} project. How would you like to configure?"
header: "Setup"
options:
  - label: "Auto-configure (Recommended)"
    description: "Use smart defaults for {type}. Done in one click."
  - label: "Customize"
    description: "Choose stack, focus areas, and review depth."

If Auto-configure → Skip to Step 4 with defaults:

若选择自动配置 → 跳过步骤3,使用默认配置:

  • Rails:
    [kieran-rails-reviewer, dhh-rails-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • Python:
    [kieran-python-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • TypeScript:
    [kieran-typescript-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • General:
    [code-simplicity-reviewer, security-sentinel, performance-oracle, architecture-strategist]
  • Rails:
    [kieran-rails-reviewer, dhh-rails-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • Python:
    [kieran-python-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • TypeScript:
    [kieran-typescript-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
  • General:
    [code-simplicity-reviewer, security-sentinel, performance-oracle, architecture-strategist]

If Customize → Step 3

若选择自定义配置 → 进入步骤3

Step 3: Customize (3 questions)

步骤3:自定义配置(3个问题)

a. Stack — confirm or override:
question: "Which stack should we optimize for?"
header: "Stack"
options:
  - label: "{detected_type} (Recommended)"
    description: "Auto-detected from project files"
  - label: "Rails"
    description: "Ruby on Rails — adds DHH-style and Rails-specific reviewers"
  - label: "Python"
    description: "Python — adds Pythonic pattern reviewer"
  - label: "TypeScript"
    description: "TypeScript — adds type safety reviewer"
Only show options that differ from the detected type.
b. Focus areas — multiSelect:
question: "Which review areas matter most?"
header: "Focus"
multiSelect: true
options:
  - label: "Security"
    description: "Vulnerability scanning, auth, input validation (security-sentinel)"
  - label: "Performance"
    description: "N+1 queries, memory leaks, complexity (performance-oracle)"
  - label: "Architecture"
    description: "Design patterns, SOLID, separation of concerns (architecture-strategist)"
  - label: "Code simplicity"
    description: "Over-engineering, YAGNI violations (code-simplicity-reviewer)"
c. Depth:
question: "How thorough should reviews be?"
header: "Depth"
options:
  - label: "Thorough (Recommended)"
    description: "Stack reviewers + all selected focus agents."
  - label: "Fast"
    description: "Stack reviewers + code simplicity only. Less context, quicker."
  - label: "Comprehensive"
    description: "All above + git history, data integrity, agent-native checks."
a. 技术栈 — 确认或覆盖检测结果:
question: "Which stack should we optimize for?"
header: "Stack"
options:
  - label: "{detected_type} (Recommended)"
    description: "Auto-detected from project files"
  - label: "Rails"
    description: "Ruby on Rails — adds DHH-style and Rails-specific reviewers"
  - label: "Python"
    description: "Python — adds Pythonic pattern reviewer"
  - label: "TypeScript"
    description: "TypeScript — adds type safety reviewer"
仅显示与检测结果不同的选项。
b. 审查重点领域 — 多选:
question: "Which review areas matter most?"
header: "Focus"
multiSelect: true
options:
  - label: "Security"
    description: "Vulnerability scanning, auth, input validation (security-sentinel)"
  - label: "Performance"
    description: "N+1 queries, memory leaks, complexity (performance-oracle)"
  - label: "Architecture"
    description: "Design patterns, SOLID, separation of concerns (architecture-strategist)"
  - label: "Code simplicity"
    description: "Over-engineering, YAGNI violations (code-simplicity-reviewer)"
c. 审查深度:
question: "How thorough should reviews be?"
header: "Depth"
options:
  - label: "Thorough (Recommended)"
    description: "Stack reviewers + all selected focus agents."
  - label: "Fast"
    description: "Stack reviewers + code simplicity only. Less context, quicker."
  - label: "Comprehensive"
    description: "All above + git history, data integrity, agent-native checks."

Step 4: Build Agent List and Write File

步骤4:生成Agent列表并写入文件

Stack-specific agents:
  • Rails →
    kieran-rails-reviewer, dhh-rails-reviewer
  • Python →
    kieran-python-reviewer
  • TypeScript →
    kieran-typescript-reviewer
  • General → (none)
Focus area agents:
  • Security →
    security-sentinel
  • Performance →
    performance-oracle
  • Architecture →
    architecture-strategist
  • Code simplicity →
    code-simplicity-reviewer
Depth:
  • Thorough: stack + selected focus areas
  • Fast: stack +
    code-simplicity-reviewer
    only
  • Comprehensive: all above +
    git-history-analyzer, data-integrity-guardian, agent-native-reviewer
Plan review agents: stack-specific reviewer +
code-simplicity-reviewer
.
Write
compound-engineering.local.md
:
markdown
---
review_agents: [{computed agent list}]
plan_review_agents: [{computed plan agent list}]
---
技术栈专属Agent:
  • Rails →
    kieran-rails-reviewer, dhh-rails-reviewer
  • Python →
    kieran-python-reviewer
  • TypeScript →
    kieran-typescript-reviewer
  • General → 无
重点领域对应Agent:
  • Security →
    security-sentinel
  • Performance →
    performance-oracle
  • Architecture →
    architecture-strategist
  • Code simplicity →
    code-simplicity-reviewer
审查深度对应配置:
  • Thorough: 技术栈专属Agent + 选中的重点领域Agent
  • Fast: 技术栈专属Agent + 仅
    code-simplicity-reviewer
  • Comprehensive: 以上所有 +
    git-history-analyzer, data-integrity-guardian, agent-native-reviewer
计划审查Agent: 技术栈专属审查Agent +
code-simplicity-reviewer
写入
compound-engineering.local.md
文件:
markdown
---
review_agents: [{computed agent list}]
plan_review_agents: [{computed plan agent list}]
---

Review Context

Review Context

Add project-specific review instructions here. These notes are passed to all review agents during /workflows:review and /workflows:work.
Examples:
  • "We use Turbo Frames heavily — check for frame-busting issues"
  • "Our API is public — extra scrutiny on input validation"
  • "Performance-critical: we serve 10k req/s on this endpoint"
undefined
Add project-specific review instructions here. These notes are passed to all review agents during /workflows:review and /workflows:work.
Examples:
  • "We use Turbo Frames heavily — check for frame-busting issues"
  • "Our API is public — extra scrutiny on input validation"
  • "Performance-critical: we serve 10k req/s on this endpoint"
undefined

Step 5: Confirm

步骤5:确认完成

Saved to compound-engineering.local.md

Stack:        {type}
Review depth: {depth}
Agents:       {count} configured
              {agent list, one per line}

Tip: Edit the "Review Context" section to add project-specific instructions.
     Re-run this setup anytime to reconfigure.
Saved to compound-engineering.local.md

Stack:        {type}
Review depth: {depth}
Agents:       {count} configured
              {agent list, one per line}

Tip: Edit the "Review Context" section to add project-specific instructions.
     Re-run this setup anytime to reconfigure.