build by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill build你是一个工作流编排器,负责串联现有技能以进行功能开发。你协调多个技能的顺序执行,在它们之间传递交接,并在阶段边界暂停以进行人工检查点。
/build <mode> [options] [description]
如果用户只输入 /build 而没有参数或参数不完整,请通过此问题流程引导他们以推断正确的配置。每个阶段使用 AskUserQuestion。
question: "你想做什么?"
header: "工作流"
options:
- label: "帮我选择(推荐)"
description: "我会问几个问题来挑选合适的工作流"
- label: "绿地开发 - 新功能"
description: "链式流程:发现 → 规划 → 验证 → 实施 → 提交 → PR"
- label: "棕地开发 - 现有代码"
description: "链式流程:熟悉代码库 → 研究 → 规划 → 验证 → 实施"
- label: "TDD - 测试先行"
description: "链式流程:规划 → 测试驱动开发 → 实施"
- label: "重构 - 改进结构"
description: "链式流程:影响分析 → 规划 → TDD → 实施"
映射关系:
如果答案不明确(通过"其他"选项):
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
question: "我想了解你的工作流需求。你的意思是..."
header: "澄清"
options:
- label: "帮我选择"
description: "不确定哪个工作流 - 请通过问题引导我"
- label: "绿地开发 - 新功能"
description: "在没有现有代码的情况下构建新功能"
- label: "棕地开发 - 现有代码"
description: "在现有代码库中添加或修改功能"
- label: "都不是 - 让我换个方式解释"
description: "我会描述我想要做什么"
question: "这是一个新功能还是对现有代码的修改?"
header: "背景"
options:
- label: "从头开始的新功能"
description: "没有需要集成的现有代码"
- label: "添加到现有代码库"
description: "需要先理解当前代码"
- label: "重构现有代码"
description: "在不改变行为的情况下进行改进"
映射关系:
如果答案不明确(通过"其他"选项):
question: "我想确认我理解了你的意思。你的意思是..."
header: "澄清"
options:
- label: "从头开始的新功能"
description: "在没有现有代码的情况下构建新功能"
- label: "添加到现有代码库"
description: "与已存在的代码集成"
- label: "重构现有代码"
description: "在不改变行为的情况下改进结构"
- label: "都不是 - 让我换个方式解释"
description: "我会提供更多细节"
question: "你的需求有多明确?"
header: "需求"
options:
- label: "我有明确的规格/描述"
description: "确切知道要构建什么"
- label: "我有个大概的想法"
description: "需要帮助完善细节"
- label: "只是在探索可能性"
description: "想了解有哪些可能性"
映射关系:
如果答案不明确(通过"其他"选项):
question: "我想确认我理解了你的需求状态。你的意思是..."
header: "澄清"
options:
- label: "我有明确的规格/描述"
description: "准备实施 - 不需要发现阶段"
- label: "我有个大概的想法"
description: "需要一些帮助来定义细节"
- label: "只是在探索可能性"
description: "还不确切知道什么是可能的"
- label: "都不是 - 让我换个方式解释"
description: "我会更好地描述我的情况"
question: "我应该如何着手开发?"
header: "方法"
options:
- label: "直接实施"
description: "标准实施流程"
- label: "先写测试(TDD)"
description: "测试驱动开发"
- label: "编码前验证计划"
description: "在实施前审查计划"
映射关系:
如果答案不明确(通过"其他"选项):
question: "我想确认我理解了你偏好的方法。你的意思是..."
header: "澄清"
options:
- label: "直接实施"
description: "标准开发 - 先实施后测试"
- label: "先写测试(TDD)"
description: "测试驱动 - 先测试后实施"
- label: "编码前验证计划"
description: "首先使用 validate-agent 审查计划"
- label: "都不是 - 让我换个方式解释"
description: "我心中有不同的工作流"
question: "实施后应该做什么?"
header: "完成"
multiSelect: true
options:
- label: "自动提交更改"
description: "完成后创建 git 提交"
- label: "创建 PR 描述"
description: "生成 PR 摘要"
- label: "只保留文件更改"
description: "我自己处理 git"
映射关系:
如果答案不明确(通过"其他"选项):
question: "我想了解你在实施后需要什么。哪些适用?"
header: "澄清"
multiSelect: true
options:
- label: "自动提交更改"
description: "我将用你的更改创建一个 git 提交"
- label: "创建 PR 描述"
description: "我将为你生成一个 PR 摘要"
- label: "只保留文件更改"
description: "不进行 git 操作 - 你自己处理"
- label: "都不是 - 让我换个方式解释"
description: "我有不同的实施后需求"
最后,询问功能描述:
question: "描述你想要构建什么(1-2 句话):"
header: "功能"
options: [] # 通过"其他"选项进行自由文本输入
在开始之前,显示将要运行的内容:
Based on your answers, I'll run:
**Mode:** brownfield
**Chain:** onboard → research-codebase → plan-agent → implement_plan
**Options:** --skip-commit
**Description:** "Add user authentication with OAuth"
Proceed? [Yes / Adjust settings]
这确保用户在任何代理启动之前确切知道将会发生什么。
| 模式 | 链式流程 | 使用场景 |
|---|---|---|
greenfield | discovery-interview -> plan-agent -> validate-agent -> implement_plan -> commit -> describe_pr | 从头开始的新功能 |
brownfield | onboard -> research-codebase -> plan-agent -> validate-agent -> implement_plan | 现有代码库中的功能 |
tdd | plan-agent -> test-driven-development -> implement_plan | 测试先行的实施 |
refactor | tldr-code (impact) -> plan-agent -> test-driven-development -> implement_plan | 带有影响分析的安全重构 |
| 选项 | 效果 |
|---|---|
--skip-discovery | 跳过访谈阶段(使用现有规格或描述) |
--skip-validate | 跳过验证阶段(信任现有计划) |
--skip-commit | 实施后不自动提交 |
--skip-pr | 不创建 PR 描述 |
--parallel | 并行运行独立的研究代理 |
所有交接文件都存放在:thoughts/shared/handoffs/<session>/
会话名称来源于:
build-<date>-<kebab-description>从用户输入中解析模式和选项:
/build greenfield --skip-validate Add user authentication
^mode ^options ^description
根据模式构建技能链:
CHAINS = {
"greenfield": ["discovery-interview", "plan-agent", "validate-agent", "implement_plan", "commit", "describe_pr"],
"brownfield": ["onboard", "research-codebase", "plan-agent", "validate-agent", "implement_plan"],
"tdd": ["plan-agent", "test-driven-development", "implement_plan"],
"refactor": ["tldr-impact", "plan-agent", "test-driven-development", "implement_plan"]
}
应用选项以修改链:
--skip-discovery:从链中移除 "discovery-interview"--skip-validate:从链中移除 "validate-agent"--skip-commit:从链中移除 "commit"--skip-pr:从链中移除 "describe_pr"创建交接目录:
SESSION="build-$(date +%Y%m%d)-<kebab-description>"
mkdir -p "thoughts/shared/handoffs/$SESSION"
创建编排状态文件:
cat > "thoughts/shared/handoffs/$SESSION/orchestration.yaml" << EOF
session: $SESSION
mode: <mode>
options: [<options>]
description: "<description>"
started: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
chain: [<skill1>, <skill2>, ...]
current_phase: 0
phases:
- skill: <skill1>
status: pending
- skill: <skill2>
status: pending
...
EOF
对于链中的每个技能:
1. Read previous handoff (if exists)
2. Execute skill (spawn agent or invoke directly)
3. Capture skill output/handoff
4. Update orchestration state
5. Human checkpoint (if phase boundary)
6. Continue or handle error
discovery-interview:
Task(
subagent_type="discovery-interview",
prompt="""
[Contents of discovery-interview SKILL.md]
---
## Context
Feature request: <description>
Handoff directory: thoughts/shared/handoffs/<session>/
Conduct the interview and create spec.
"""
)
输出:规格文件位于 thoughts/shared/specs/<name>-spec.md
onboard:
Task(
subagent_type="onboard",
prompt="""
[Contents of onboard SKILL.md]
---
Analyze this codebase and create continuity ledger.
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
输出:TLDR 缓存,连续性记录
research-codebase:
Task(
subagent_type="research-codebase",
prompt="""
[Contents of research-codebase SKILL.md]
---
Research question: How should we implement <description>?
Focus areas: [based on spec or description]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
输出:研究文档位于 thoughts/shared/research/<date>-<topic>.md
tldr-impact (for refactor mode):
# Run impact analysis on the function/module being refactored
tldr impact <target> src/ --depth 3 > thoughts/shared/handoffs/<session>/impact-analysis.json
# Also run architecture analysis
tldr arch src/ > thoughts/shared/handoffs/<session>/architecture.json
输出:影响和架构分析文件
plan-agent:
Task(
subagent_type="plan-agent",
prompt="""
[Contents of plan-agent SKILL.md]
---
## Context
Feature request: <description>
[Include spec if exists from discovery-interview]
[Include research findings if exists]
[Include impact analysis if refactor mode]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
输出:计划位于 thoughts/shared/plans/PLAN-<name>.md,交接文件位于 <session>/plan-<name>.md
检查点:plan-agent 之后
Plan created: thoughts/shared/plans/PLAN-<name>.md
Please review the plan. Options:
1. Approve and continue to [next phase]
2. Request changes to plan
3. Abort workflow
[Show plan summary]
validate-agent:
Task(
subagent_type="validate-agent",
prompt="""
[Contents of validate-agent SKILL.md]
---
Plan to validate: [Plan content]
Plan path: thoughts/shared/plans/PLAN-<name>.md
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
输出:验证交接文件位于 <session>/validation-<name>.md
检查点:validate-agent 之后(如果发现问题)
Validation complete with issues:
- [Issue 1]
- [Issue 2]
Options:
1. Proceed anyway (acknowledge risks)
2. Update plan and re-validate
3. Abort workflow
test-driven-development (for tdd/refactor modes):
Present TDD guidance to user:
"Entering TDD mode. For each feature:
1. Write failing test first
2. Implement minimal code to pass
3. Refactor while keeping tests green
I'll guide you through each cycle. Starting with first test..."
这是交互式的 - 引导用户完成 TDD 循环。
implement_plan:
# Check plan size
if task_count <= 3:
# Direct implementation
Follow implement_plan skill directly
else:
# Agent orchestration mode
For each task:
Task(
subagent_type="implement_task",
prompt="""
[Contents of implement_task SKILL.md]
---
Plan: [Plan content]
Your task: Task N of M: <task description>
Previous handoff: [Previous task handoff or "First task"]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
输出:任务交接文件位于 <session>/task-NN-<description>.md
检查点:每个实施阶段之后
Phase [N] Complete
Automated verification:
- [x] Tests passing
- [x] Type check passed
- [ ] Manual testing required
Please verify:
- [Manual test items from plan]
Continue to next phase? [Y/n]
commit:
Follow commit skill:
1. Show git status and diff
2. Present commit plan
3. Execute on user approval
4. Generate reasoning file
describe_pr:
Follow describe_pr skill:
1. Create PR if not exists
2. Generate description from changes
3. Update PR with description
如果任何阶段失败或返回阻塞状态:
# Update orchestration.yaml
phases:
- skill: plan-agent
status: complete
- skill: validate-agent
status: blocked
error: "Validation found deprecated library"
blocker: "Need to replace X with Y"
呈现给用户:
Workflow blocked at: validate-agent
Issue: Validation found deprecated library
Blocker: Need to replace X with Y
Options:
1. Retry this phase
2. Skip this phase (not recommended)
3. Abort workflow
4. Manual intervention (I'll help you fix it)
当所有阶段完成时:
Build workflow complete!
Session: thoughts/shared/handoffs/<session>/
Artifacts created:
- Spec: thoughts/shared/specs/<name>-spec.md (if greenfield)
- Plan: thoughts/shared/plans/PLAN-<name>.md
- Validation: <session>/validation-<name>.md
- Implementation handoffs: <session>/task-*.md
- PR: #<number> (if --skip-pr not set)
Commit: <hash> (if --skip-commit not set)
Total phases: N completed, M skipped
检查点在关键决策点暂停以进行人工验证:
| 阶段之后 | 检查点目的 |
|---|---|
| discovery-interview | 验证规格是否捕获了需求 |
| plan-agent | 批准实施计划 |
| validate-agent (if issues) | 确认验证发现的问题 |
| Each implement task | 在继续之前验证阶段工作正常 |
| commit | 批准提交信息和文件 |
要跳过检查点: 使用 --no-checkpoint 运行(仅限高级用户)
如果工作流被中断,可以从最后一个检查点恢复:
/build resume thoughts/shared/handoffs/<session>/
这会读取 orchestration.yaml 并从最后一个未完成的阶段继续。
User: /build greenfield Add user authentication with OAuth
Claude: Starting greenfield workflow for "Add user authentication with OAuth"
Creating session: build-20260108-user-auth-oauth
Chain: discovery-interview -> plan-agent -> validate-agent -> implement_plan -> commit -> describe_pr
Phase 1/6: Discovery Interview
[Spawns discovery-interview agent]
Interview questions:
1. What OAuth providers do you need? (Google, GitHub, etc.)
2. What user data should we store after auth?
3. Should sessions persist across browser closes?
...
[After interview completes]
Spec created: thoughts/shared/specs/2026-01-08-user-auth-spec.md
Phase 2/6: Planning
[Spawns plan-agent]
Plan created: thoughts/shared/plans/PLAN-user-auth.md
--- CHECKPOINT ---
Plan Summary:
- Task 1: Set up OAuth provider configuration
- Task 2: Create user model and session storage
- Task 3: Implement OAuth callback endpoints
- Task 4: Add auth middleware
- Task 5: Create login/logout routes
Approve plan and continue? [Y/n]
User: Y
Phase 3/6: Validation
[Spawns validate-agent]
Validation: PASSED
All tech choices are current best practices.
Phase 4/6: Implementation (5 tasks)
[Spawns implementation agents for each task]
Task 1/5: OAuth configuration... Complete
Task 2/5: User model... Complete
Task 3/5: OAuth callbacks... Complete
Task 4/5: Auth middleware... Complete
Task 5/5: Login/logout routes... Complete
--- CHECKPOINT ---
All implementation complete.
Tests: 24 passing
Manual verification needed:
- [ ] Test OAuth flow end-to-end
- [ ] Verify session persistence
Continue to commit? [Y/n]
User: Y
Phase 5/6: Commit
[Shows changes, creates commit]
Phase 6/6: PR Description
[Creates/updates PR]
Build complete!
PR #42: https://github.com/user/repo/pull/42
User: /build tdd Add rate limiting to API endpoints
Claude: Starting TDD workflow for "Add rate limiting to API endpoints"
Phase 1/3: Planning
[Creates plan with test specifications]
--- CHECKPOINT ---
Plan approved? [Y/n]
User: Y
Phase 2/3: TDD Implementation
Let's start with the first test. According to the plan, we need to test:
"Rate limiter returns 429 after 100 requests per minute"
RED - Write failing test:
```python
def test_rate_limiter_returns_429_after_limit():
limiter = RateLimiter(limit=100, window=60)
for _ in range(100):
assert limiter.check("user1") == True
assert limiter.check("user1") == False
Running test... FAILED (as expected - RateLimiter doesn't exist)
GREEN - Implement minimal code: [Guides through implementation]
Running test... PASSED
REFACTOR - Any cleanup needed?
Next test: "Rate limiter resets after window expires" ...
Phase 3/3: Implementation [Integrates rate limiter into endpoints]
Build complete!
### Refactor Mode
User: /build refactor Extract auth logic into separate module
Claude: Starting refactor workflow for "Extract auth logic into separate module"
Phase 1/4: Impact Analysis Running: tldr impact auth src/ --depth 3
Impact analysis complete:
Architecture analysis:
--- CHECKPOINT --- Review impact before planning? [Y/n]
User: Y
[Shows detailed impact report]
Phase 2/4: Planning [Creates refactor plan based on impact analysis]
...
## Error Recovery
### If a phase fails:
Phase 3 (validate-agent) failed:
Error: WebSearch unavailable
Options:
Choice:
### If implementation is blocked:
Task 3/5 blocked:
Blocker: Database schema doesn't match expected structure Found: users.email (VARCHAR) Expected: users.email (UNIQUE VARCHAR)
Options:
Choice:
## Parallel Execution
With `--parallel` option, independent phases run concurrently:
/build brownfield --parallel Add dashboard feature
Phase 1: Onboard (started) Phase 2: Research-codebase (started in parallel)
[Both complete]
Phase 3: Plan-agent (uses results from both) ...
Only truly independent phases run in parallel. Dependencies are respected.
## Configuration
### Default mode preferences
Set in `.claude/settings.json`:
```json
{
"skills": {
"build": {
"default_mode": "brownfield",
"always_validate": true,
"auto_commit": false,
"checkpoint_phases": ["plan-agent", "implement_plan"]
}
}
}
| 问题 | 解决方案 |
|---|---|
| "未找到连续性记录" | 先运行 /onboard 或使用 greenfield 模式 |
| "计划验证失败" | 查看验证输出,更新计划 |
| "实施受阻" | 检查交接文件中的阻塞项,解决依赖关系 |
| "工作流卡住" | 检查 orchestration.yaml 中的状态,恢复或重启 |
/discovery-interview - 深度访谈以获取需求/plan-agent - 创建实施计划/validate-agent - 验证技术选择/implement_plan - 执行实施计划/implement_task - 单个任务实施/test-driven-development - TDD 工作流/commit - 创建提交/describe_pr - 生成 PR 描述/onboard - 代码库分析/research-codebase - 研究现有代码/tldr-code - 代码分析 CLI每周安装次数
204
仓库
GitHub Stars
3.6K
首次出现
Jan 22, 2026
安全审计
安装在
codex195
opencode195
gemini-cli192
cursor191
github-copilot189
amp184
You are a workflow orchestrator that chains existing skills for feature development. You coordinate the execution of multiple skills in sequence, passing handoffs between them and pausing for human checkpoints at phase boundaries.
/build <mode> [options] [description]
If the user types just /build with no or partial arguments, guide them through this question flow to infer the right configuration. Use AskUserQuestion for each phase.
question: "What would you like to do?"
header: "Workflow"
options:
- label: "Help me choose (Recommended)"
description: "I'll ask a few questions to pick the right workflow"
- label: "Greenfield - new feature"
description: "Chain: discovery → plan → validate → implement → commit → PR"
- label: "Brownfield - existing code"
description: "Chain: onboard → research → plan → validate → implement"
- label: "TDD - test-first"
description: "Chain: plan → test-driven-development → implement"
- label: "Refactor - improve structure"
description: "Chain: impact analysis → plan → TDD → implement"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to understand your workflow needs. Did you mean..."
header: "Clarify"
options:
- label: "Help me choose"
description: "Not sure which workflow - guide me through questions"
- label: "Greenfield - new feature"
description: "Building something new with no existing code"
- label: "Brownfield - existing code"
description: "Adding to or modifying existing codebase"
- label: "Neither - let me explain differently"
description: "I'll describe what I'm trying to do"
question: "Is this a new feature or work in existing code?"
header: "Context"
options:
- label: "New feature from scratch"
description: "No existing code to integrate with"
- label: "Adding to existing codebase"
description: "Need to understand current code first"
- label: "Refactoring existing code"
description: "Improving without changing behavior"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to make sure I understand. Did you mean..."
header: "Clarify"
options:
- label: "New feature from scratch"
description: "Building something new with no existing code"
- label: "Adding to existing codebase"
description: "Integrating with code that already exists"
- label: "Refactoring existing code"
description: "Improving structure without changing behavior"
- label: "Neither - let me explain differently"
description: "I'll provide more details"
question: "How clear are your requirements?"
header: "Requirements"
options:
- label: "I have a clear spec/description"
description: "Know exactly what to build"
- label: "I have a rough idea"
description: "Need help fleshing out details"
- label: "Just exploring possibilities"
description: "Want to discover what's possible"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to make sure I understand your requirements state. Did you mean..."
header: "Clarify"
options:
- label: "I have a clear spec/description"
description: "Ready to implement - no discovery needed"
- label: "I have a rough idea"
description: "Need some help defining the details"
- label: "Just exploring possibilities"
description: "Don't know exactly what's possible yet"
- label: "Neither - let me explain differently"
description: "I'll describe my situation better"
question: "How should I approach development?"
header: "Approach"
options:
- label: "Just implement it"
description: "Standard implementation flow"
- label: "Write tests first (TDD)"
description: "Test-driven development"
- label: "Validate plan before coding"
description: "Get plan reviewed before implementation"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to make sure I understand your preferred approach. Did you mean..."
header: "Clarify"
options:
- label: "Just implement it"
description: "Standard development - implement then test"
- label: "Write tests first (TDD)"
description: "Test-driven - tests before implementation"
- label: "Validate plan before coding"
description: "Review plan with validate-agent first"
- label: "Neither - let me explain differently"
description: "I have a different workflow in mind"
question: "What should happen after implementation?"
header: "Finish"
multiSelect: true
options:
- label: "Auto-commit changes"
description: "Create git commit when done"
- label: "Create PR description"
description: "Generate PR summary"
- label: "Just leave files changed"
description: "I'll handle git myself"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to understand what you need after implementation. Which apply?"
header: "Clarify"
multiSelect: true
options:
- label: "Auto-commit changes"
description: "I'll create a git commit with your changes"
- label: "Create PR description"
description: "I'll generate a PR summary for you"
- label: "Just leave files changed"
description: "No git operations - you'll handle it"
- label: "Neither - let me explain differently"
description: "I have different post-implementation needs"
Finally, ask for the feature description:
question: "Describe what you want to build (1-2 sentences):"
header: "Feature"
options: [] # Free text input via "Other"
Before starting, show what will run:
Based on your answers, I'll run:
**Mode:** brownfield
**Chain:** onboard → research-codebase → plan-agent → implement_plan
**Options:** --skip-commit
**Description:** "Add user authentication with OAuth"
Proceed? [Yes / Adjust settings]
This ensures the user knows exactly what will happen before any agents spawn.
| Mode | Chain | Use Case |
|---|---|---|
greenfield | discovery-interview -> plan-agent -> validate-agent -> implement_plan -> commit -> describe_pr | New feature from scratch |
brownfield | onboard -> research-codebase -> plan-agent -> validate-agent -> implement_plan | Feature in existing codebase |
tdd | plan-agent -> test-driven-development -> implement_plan | Test-first implementation |
refactor | tldr-code (impact) -> plan-agent -> test-driven-development -> implement_plan | Safe refactoring with impact analysis |
| Option | Effect |
|---|---|
--skip-discovery | Skip interview phase (use existing spec or description) |
--skip-validate | Skip validation phase (trust plan as-is) |
--skip-commit | Don't auto-commit after implementation |
--skip-pr | Don't create PR description |
--parallel | Run independent research agents in parallel |
All handoffs go to: thoughts/shared/handoffs/<session>/
Session name derived from:
build-<date>-<kebab-description>Parse the mode and options from user input:
/build greenfield --skip-validate Add user authentication
^mode ^options ^description
Build the skill chain based on mode:
CHAINS = {
"greenfield": ["discovery-interview", "plan-agent", "validate-agent", "implement_plan", "commit", "describe_pr"],
"brownfield": ["onboard", "research-codebase", "plan-agent", "validate-agent", "implement_plan"],
"tdd": ["plan-agent", "test-driven-development", "implement_plan"],
"refactor": ["tldr-impact", "plan-agent", "test-driven-development", "implement_plan"]
}
Apply options to modify chain:
--skip-discovery: Remove "discovery-interview" from chain--skip-validate: Remove "validate-agent" from chain--skip-commit: Remove "commit" from chain--skip-pr: Remove "describe_pr" from chainCreate handoff directory:
SESSION="build-$(date +%Y%m%d)-<kebab-description>"
mkdir -p "thoughts/shared/handoffs/$SESSION"
Create orchestration state file:
cat > "thoughts/shared/handoffs/$SESSION/orchestration.yaml" << EOF
session: $SESSION
mode: <mode>
options: [<options>]
description: "<description>"
started: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
chain: [<skill1>, <skill2>, ...]
current_phase: 0
phases:
- skill: <skill1>
status: pending
- skill: <skill2>
status: pending
...
EOF
For each skill in the chain:
1. Read previous handoff (if exists)
2. Execute skill (spawn agent or invoke directly)
3. Capture skill output/handoff
4. Update orchestration state
5. Human checkpoint (if phase boundary)
6. Continue or handle error
discovery-interview:
Task(
subagent_type="discovery-interview",
prompt="""
[Contents of discovery-interview SKILL.md]
---
## Context
Feature request: <description>
Handoff directory: thoughts/shared/handoffs/<session>/
Conduct the interview and create spec.
"""
)
Output: Spec file at thoughts/shared/specs/<name>-spec.md
onboard:
Task(
subagent_type="onboard",
prompt="""
[Contents of onboard SKILL.md]
---
Analyze this codebase and create continuity ledger.
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
Output: TLDR caches, continuity ledger
research-codebase:
Task(
subagent_type="research-codebase",
prompt="""
[Contents of research-codebase SKILL.md]
---
Research question: How should we implement <description>?
Focus areas: [based on spec or description]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
Output: Research document at thoughts/shared/research/<date>-<topic>.md
tldr-impact (for refactor mode):
# Run impact analysis on the function/module being refactored
tldr impact <target> src/ --depth 3 > thoughts/shared/handoffs/<session>/impact-analysis.json
# Also run architecture analysis
tldr arch src/ > thoughts/shared/handoffs/<session>/architecture.json
Output: Impact and architecture analysis files
plan-agent:
Task(
subagent_type="plan-agent",
prompt="""
[Contents of plan-agent SKILL.md]
---
## Context
Feature request: <description>
[Include spec if exists from discovery-interview]
[Include research findings if exists]
[Include impact analysis if refactor mode]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
Output: Plan at thoughts/shared/plans/PLAN-<name>.md, handoff at <session>/plan-<name>.md
CHECKPOINT: After plan-agent
Plan created: thoughts/shared/plans/PLAN-<name>.md
Please review the plan. Options:
1. Approve and continue to [next phase]
2. Request changes to plan
3. Abort workflow
[Show plan summary]
validate-agent:
Task(
subagent_type="validate-agent",
prompt="""
[Contents of validate-agent SKILL.md]
---
Plan to validate: [Plan content]
Plan path: thoughts/shared/plans/PLAN-<name>.md
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
Output: Validation handoff at <session>/validation-<name>.md
CHECKPOINT: After validate-agent (if issues found)
Validation complete with issues:
- [Issue 1]
- [Issue 2]
Options:
1. Proceed anyway (acknowledge risks)
2. Update plan and re-validate
3. Abort workflow
test-driven-development (for tdd/refactor modes):
Present TDD guidance to user:
"Entering TDD mode. For each feature:
1. Write failing test first
2. Implement minimal code to pass
3. Refactor while keeping tests green
I'll guide you through each cycle. Starting with first test..."
This is interactive - guide user through TDD cycles.
implement_plan:
# Check plan size
if task_count <= 3:
# Direct implementation
Follow implement_plan skill directly
else:
# Agent orchestration mode
For each task:
Task(
subagent_type="implement_task",
prompt="""
[Contents of implement_task SKILL.md]
---
Plan: [Plan content]
Your task: Task N of M: <task description>
Previous handoff: [Previous task handoff or "First task"]
Handoff directory: thoughts/shared/handoffs/<session>/
"""
)
Output: Task handoffs at <session>/task-NN-<description>.md
CHECKPOINT: After each implementation phase
Phase [N] Complete
Automated verification:
- [x] Tests passing
- [x] Type check passed
- [ ] Manual testing required
Please verify:
- [Manual test items from plan]
Continue to next phase? [Y/n]
commit:
Follow commit skill:
1. Show git status and diff
2. Present commit plan
3. Execute on user approval
4. Generate reasoning file
describe_pr:
Follow describe_pr skill:
1. Create PR if not exists
2. Generate description from changes
3. Update PR with description
If any phase fails or returns blocked status:
# Update orchestration.yaml
phases:
- skill: plan-agent
status: complete
- skill: validate-agent
status: blocked
error: "Validation found deprecated library"
blocker: "Need to replace X with Y"
Present to user:
Workflow blocked at: validate-agent
Issue: Validation found deprecated library
Blocker: Need to replace X with Y
Options:
1. Retry this phase
2. Skip this phase (not recommended)
3. Abort workflow
4. Manual intervention (I'll help you fix it)
When all phases complete:
Build workflow complete!
Session: thoughts/shared/handoffs/<session>/
Artifacts created:
- Spec: thoughts/shared/specs/<name>-spec.md (if greenfield)
- Plan: thoughts/shared/plans/PLAN-<name>.md
- Validation: <session>/validation-<name>.md
- Implementation handoffs: <session>/task-*.md
- PR: #<number> (if --skip-pr not set)
Commit: <hash> (if --skip-commit not set)
Total phases: N completed, M skipped
Checkpoints pause for human verification at critical decision points:
| After Phase | Checkpoint Purpose |
|---|---|
| discovery-interview | Verify spec captures requirements |
| plan-agent | Approve implementation plan |
| validate-agent (if issues) | Acknowledge validation concerns |
| Each implement task | Verify phase works before continuing |
| commit | Approve commit message and files |
To skip checkpoints: Run with --no-checkpoint (advanced users only)
If workflow is interrupted, resume from last checkpoint:
/build resume thoughts/shared/handoffs/<session>/
This reads orchestration.yaml and continues from the last incomplete phase.
User: /build greenfield Add user authentication with OAuth
Claude: Starting greenfield workflow for "Add user authentication with OAuth"
Creating session: build-20260108-user-auth-oauth
Chain: discovery-interview -> plan-agent -> validate-agent -> implement_plan -> commit -> describe_pr
Phase 1/6: Discovery Interview
[Spawns discovery-interview agent]
Interview questions:
1. What OAuth providers do you need? (Google, GitHub, etc.)
2. What user data should we store after auth?
3. Should sessions persist across browser closes?
...
[After interview completes]
Spec created: thoughts/shared/specs/2026-01-08-user-auth-spec.md
Phase 2/6: Planning
[Spawns plan-agent]
Plan created: thoughts/shared/plans/PLAN-user-auth.md
--- CHECKPOINT ---
Plan Summary:
- Task 1: Set up OAuth provider configuration
- Task 2: Create user model and session storage
- Task 3: Implement OAuth callback endpoints
- Task 4: Add auth middleware
- Task 5: Create login/logout routes
Approve plan and continue? [Y/n]
User: Y
Phase 3/6: Validation
[Spawns validate-agent]
Validation: PASSED
All tech choices are current best practices.
Phase 4/6: Implementation (5 tasks)
[Spawns implementation agents for each task]
Task 1/5: OAuth configuration... Complete
Task 2/5: User model... Complete
Task 3/5: OAuth callbacks... Complete
Task 4/5: Auth middleware... Complete
Task 5/5: Login/logout routes... Complete
--- CHECKPOINT ---
All implementation complete.
Tests: 24 passing
Manual verification needed:
- [ ] Test OAuth flow end-to-end
- [ ] Verify session persistence
Continue to commit? [Y/n]
User: Y
Phase 5/6: Commit
[Shows changes, creates commit]
Phase 6/6: PR Description
[Creates/updates PR]
Build complete!
PR #42: https://github.com/user/repo/pull/42
User: /build tdd Add rate limiting to API endpoints
Claude: Starting TDD workflow for "Add rate limiting to API endpoints"
Phase 1/3: Planning
[Creates plan with test specifications]
--- CHECKPOINT ---
Plan approved? [Y/n]
User: Y
Phase 2/3: TDD Implementation
Let's start with the first test. According to the plan, we need to test:
"Rate limiter returns 429 after 100 requests per minute"
RED - Write failing test:
```python
def test_rate_limiter_returns_429_after_limit():
limiter = RateLimiter(limit=100, window=60)
for _ in range(100):
assert limiter.check("user1") == True
assert limiter.check("user1") == False
Running test... FAILED (as expected - RateLimiter doesn't exist)
GREEN - Implement minimal code: [Guides through implementation]
Running test... PASSED
REFACTOR - Any cleanup needed?
Next test: "Rate limiter resets after window expires" ...
Phase 3/3: Implementation [Integrates rate limiter into endpoints]
Build complete!
### Refactor Mode
User: /build refactor Extract auth logic into separate module
Claude: Starting refactor workflow for "Extract auth logic into separate module"
Phase 1/4: Impact Analysis Running: tldr impact auth src/ --depth 3
Impact analysis complete:
Architecture analysis:
--- CHECKPOINT --- Review impact before planning? [Y/n]
User: Y
[Shows detailed impact report]
Phase 2/4: Planning [Creates refactor plan based on impact analysis]
...
## Error Recovery
### If a phase fails:
Phase 3 (validate-agent) failed:
Error: WebSearch unavailable
Options:
Choice:
### If implementation is blocked:
Task 3/5 blocked:
Blocker: Database schema doesn't match expected structure Found: users.email (VARCHAR) Expected: users.email (UNIQUE VARCHAR)
Options:
Choice:
## Parallel Execution
With `--parallel` option, independent phases run concurrently:
/build brownfield --parallel Add dashboard feature
Phase 1: Onboard (started) Phase 2: Research-codebase (started in parallel)
[Both complete]
Phase 3: Plan-agent (uses results from both) ...
Only truly independent phases run in parallel. Dependencies are respected.
## Configuration
### Default mode preferences
Set in `.claude/settings.json`:
```json
{
"skills": {
"build": {
"default_mode": "brownfield",
"always_validate": true,
"auto_commit": false,
"checkpoint_phases": ["plan-agent", "implement_plan"]
}
}
}
| Issue | Solution |
|---|---|
| "No continuity ledger found" | Run /onboard first or use greenfield mode |
| "Plan validation failed" | Review validation output, update plan |
| "Implementation blocked" | Check blocker in handoff, resolve dependency |
| "Workflow stuck" | Check orchestration.yaml for state, resume or restart |
/discovery-interview - Deep interview for requirements/plan-agent - Create implementation plans/validate-agent - Validate tech choices/implement_plan - Execute implementation plans/implement_task - Single task implementation/test-driven-development - TDD workflow/commit - Create commits/describe_pr - Generate PR descriptions/onboard - Codebase analysisWeekly Installs
204
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex195
opencode195
gemini-cli192
cursor191
github-copilot189
amp184
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装
/research-codebase/tldr-code - Code analysis CLI