forge-auto
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/forge-auto — FORGE Autopilot Mode
/forge-auto — FORGE Autopilot 模式
FORGE takes full control of the development pipeline. It analyzes, decides,
executes, verifies, and iterates automatically until the objective is complete.
FORGE 全面掌控开发流水线。它会自动进行分析、决策、执行、验证和迭代,直至目标完成。
French Language Rule
法语语言规则
All content generated in French MUST use proper accents (é, è, ê, à, ù, ç, ô, î, etc.), follow French grammar rules (agreements, conjugations), and use correct spelling.
所有法语生成内容必须使用正确的重音符号(é, è, ê, à, ù, ç, ô, î等),遵循法语语法规则(配合、变位),并使用正确拼写。
Principle
核心原理
The user provides an objective → FORGE handles EVERYTHING else.
Planning → Architecture → Stories → Code → Tests → Verification → Deployment用户提供目标 → FORGE 处理其余所有事项。
规划 → 架构设计 → 用户故事 → 代码开发 → 测试 → 验证 → 部署Workflow
工作流程
-
Load memory:
- Read for project context
.forge/memory/MEMORY.md - Read the latest session from for continuity
.forge/memory/sessions/ - Read for the current state
.forge/sprint-status.yaml - Read for configuration
.forge/config.yml - → Load relevant past decisions and context
~/.claude/scripts/forge-memory/forge-memory search "<current objective>" --limit 3
- Read
-
Analyze state and determine the phase:The decision system follows this logic:
IF no artifacts exist: → Start with /forge-plan (generates the PRD) IF PRD exists BUT no architecture: → Launch /forge-architect IF architecture exists BUT no UX design: → Launch /forge-ux IF UX exists BUT no stories: → Launch /forge-stories IF stories exist with "pending" status: → Count unblocked pending stories → IF 2+ unblocked stories AND Agent Teams available (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1): → Delegate to /forge-team build [STORY-IDs] (parallel execution) → Wait for team completion, then continue with QA verdicts → ELSE: → Pick the next unblocked story → Launch /forge-build STORY-XXX (sequential) IF an "in_progress" story exists: → Resume /forge-build STORY-XXX IF story is implemented (Dev tests pass): → Launch /forge-verify STORY-XXX IF QA verdict = FAIL: → Increment failure counter for this story → IF failure counter < 3: → Fix and relaunch /forge-verify → IF failure counter >= 3: → Escalate to /forge-loop "Fix STORY-XXX: [QA failure summary]" --mode hitl → forge-loop iterates autonomously with sandbox guardrails until tests pass → On success: reset failure counter, continue with /forge-verify IF QA verdict = PASS: → Move to the next story IF all stories are "completed": → Propose /forge-deploy or new stories -
Execute with the appropriate agents:
- Each phase invokes the corresponding agent (PM, Architect, UX, SM, Dev, QA)
- The agent loads its persona from
references/agents/ - The agent produces its artifacts in or
docs/src/ - Agent Teams acceleration: when entering the build phase with 2+ unblocked stories,
and is set, autopilot delegates to
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1for parallel story implementation (up to 4 Dev + 1 QA). If Agent Teams is not available, stories are built sequentially as before./forge-team build
-
Automatic quality gates:
- After each story: lint + typecheck + tests > 80% coverage
- After each /forge-verify: mandatory QA verdict
- Loop escalation: if 3 consecutive failures on the same story, autopilot
delegates to in HITL mode with the QA failure summary as task. forge-loop iterates with sandbox guardrails (cost cap, circuit breaker, rollback) until tests pass, then returns control to autopilot for re-verification.
/forge-loop - Ultimate circuit breaker: if forge-loop also fails (hits its own circuit breaker) → pause + report to user
-
Save memory:
- Update with the current state
.forge/memory/MEMORY.md - Create/update the session log
.forge/memory/sessions/YYYY-MM-DD.md - Update
.forge/sprint-status.yaml
- Update
-
Human checkpoints (configurable):
- Default: checkpoint after each major phase (plan, architecture, stories)
- mode: no checkpoints (full autopilot)
--no-pause - mode: pause after story decomposition
--pause-stories - mode: pause after each story
--pause-each
-
加载记忆:
- 读取 获取项目上下文
.forge/memory/MEMORY.md - 读取 中的最新会话以保持连续性
.forge/memory/sessions/ - 读取 获取当前状态
.forge/sprint-status.yaml - 读取 获取配置信息
.forge/config.yml - 执行 → 加载相关的过往决策和上下文
~/.claude/scripts/forge-memory/forge-memory search "<current objective>" --limit 3
- 读取
-
分析状态并确定阶段:决策系统遵循以下逻辑:
IF 不存在任何工件: → 启动 /forge-plan(生成PRD) IF PRD已存在但无架构设计: → 启动 /forge-architect IF 架构设计已存在但无UX设计: → 启动 /forge-ux IF UX设计已存在但无用户故事: → 启动 /forge-stories IF 存在状态为"pending"的用户故事: → 统计未阻塞的待处理用户故事数量 → IF 有2个及以上未阻塞故事且Agent Teams可用(CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1): → 委托给 /forge-team build [STORY-IDs](并行执行) → 等待团队完成,然后根据QA结果继续 → ELSE: → 选择下一个未阻塞的用户故事 → 启动 /forge-build STORY-XXX(串行执行) IF 存在状态为"in_progress"的用户故事: → 恢复 /forge-build STORY-XXX IF 用户故事已实现(开发测试通过): → 启动 /forge-verify STORY-XXX IF QA verdict = FAIL: → 增加该用户故事的失败计数器 → IF 失败计数器 < 3: → 修复并重新启动 /forge-verify → IF 失败计数器 >= 3: → 升级至 /forge-loop "修复 STORY-XXX: [QA失败摘要]" --mode hitl → forge-loop 在沙箱防护下自主迭代直至测试通过 → 成功后:重置失败计数器,继续执行 /forge-verify IF QA verdict = PASS: → 进入下一个用户故事 IF 所有用户故事状态为"completed": → 提议执行 /forge-deploy 或创建新用户故事 -
调用对应Agent执行:
- 每个阶段会调用对应的Agent(PM、架构师、UX、SM、开发、QA)
- Agent从 加载其角色设定
references/agents/ - Agent在 或
docs/中生成工件src/ - Agent Teams加速: 当进入构建阶段且有2个及以上未阻塞用户故事,
且已设置 时,自动驾驶模式会委托给
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1进行并行用户故事实现(最多4个Dev + 1个QA)。 若Agent Teams不可用,则按之前的方式串行构建用户故事。/forge-team build
-
自动质量门禁:
- 每个用户故事完成后:执行代码检查+类型检查+测试覆盖率>80%
- 每次执行 /forge-verify 后:必须获取QA结果
- 循环升级: 若同一个用户故事连续失败3次,自动驾驶模式会
委托给 并以HITL模式运行,任务为QA失败摘要。 forge-loop 在沙箱防护(成本上限、断路器、回滚)下迭代 直至测试通过,然后将控制权交还给自动驾驶模式进行重新验证。
/forge-loop - 终极断路器: 若forge-loop也失败(触发自身断路器) → 暂停并向用户报告
-
保存记忆:
- 更新 记录当前状态
.forge/memory/MEMORY.md - 创建/更新会话日志
.forge/memory/sessions/YYYY-MM-DD.md - 更新
.forge/sprint-status.yaml
- 更新
-
人工检查点(可配置):
- 默认:每个主要阶段(规划、架构、用户故事)后设置检查点
- 模式:无检查点(完全自动驾驶)
--no-pause - 模式:用户故事分解后暂停
--pause-stories - 模式:每个用户故事完成后暂停
--pause-each
Options
选项
bash
undefinedbash
undefinedFull autopilot — FORGE decides everything
完全自动驾驶 — FORGE 决定所有事项
/forge-auto
/forge-auto
Autopilot with a specific objective
带具体目标的自动驾驶
/forge-auto "Implement the authentication system"
/forge-auto "Implement the authentication system"
Autopilot without pauses (warning: fully autonomous)
无暂停的自动驾驶(警告:完全自主)
/forge-auto --no-pause
/forge-auto --no-pause
Autopilot with pause after stories
用户故事分解后暂停的自动驾驶
/forge-auto --pause-stories
/forge-auto --pause-stories
Autopilot with pause after each story
每个用户故事完成后暂停的自动驾驶
/forge-auto --pause-each
/forge-auto --pause-each
Resume autopilot after a pause
暂停后恢复自动驾驶
/forge-auto --resume
undefined/forge-auto --resume
undefinedProgress Report
进度报告
At each step, FORGE displays:
FORGE AUTOPILOT — Progress
──────────────────────────────
Phase : Development (Story 3/8)
Last : STORY-002 ✓ (QA: PASS)
Current : STORY-003 — Implementation
Next : STORY-004 (pending)
Metrics:
Stories : 2 completed / 1 in_progress / 5 pending
Tests : 47 pass / 0 fail
Coverage : 87%
Memory : .forge/memory/MEMORY.md (up to date)
Session : .forge/memory/sessions/2025-01-15.md在每个步骤中,FORGE会显示:
FORGE AUTOPILOT — Progress
──────────────────────────────
Phase : Development (Story 3/8)
Last : STORY-002 ✓ (QA: PASS)
Current : STORY-003 — Implementation
Next : STORY-004 (pending)
Metrics:
Stories : 2 completed / 1 in_progress / 5 pending
Tests : 47 pass / 0 fail
Coverage : 87%
Memory : .forge/memory/MEMORY.md (up to date)
Session : .forge/memory/sessions/2025-01-15.mdHow /forge-auto Uses Other FORGE Tools
/forge-auto 如何使用其他FORGE工具
| Situation | Autopilot delegates to | Condition |
|---|---|---|
| 2+ unblocked stories ready | | Agent Teams enabled |
| 1 story ready | | Always |
| 3 consecutive failures on a story | | Always |
| forge-loop also fails | Pause + report to user | Ultimate circuit breaker |
| 场景 | 自动驾驶委托给 | 条件 |
|---|---|---|
| 有2个及以上未阻塞用户故事 | | Agent Teams已启用 |
| 有1个待处理用户故事 | | 始终生效 |
| 同一个用户故事连续失败3次 | | 始终生效 |
| forge-loop也失败 | 暂停并向用户报告 | 终极断路器 |
Difference with /forge-loop
与 /forge-loop 的区别
| Aspect | /forge-loop | /forge-auto |
|---|---|---|
| Scope | A specific task | The entire project |
| Decision | The user chooses the task | FORGE decides the next action |
| Agents | A single one (usually Dev) | All agents depending on the phase |
| Memory | Local fix_plan.md | Persistent project memory |
| Progression | Linear (iterations) | Full pipeline (plan → deploy) |
| Use case | "Implement this feature" | "Build this project from A to Z" |
| Relation | Standalone or called by auto | Calls /forge-loop on difficult stories |
| 维度 | /forge-loop | /forge-auto |
|---|---|---|
| 范围 | 单个具体任务 | 整个项目 |
| 决策 | 用户选择任务 | FORGE决定下一步操作 |
| Agent | 单个Agent(通常是Dev) | 根据阶段调用所有相关Agent |
| 记忆 | 本地fix_plan.md | 持久化项目记忆 |
| 推进方式 | 线性(迭代) | 完整流水线(规划→部署) |
| 使用场景 | "实现这个功能" | "从头到尾构建这个项目" |
| 关系 | 独立工具或被auto调用 | 在处理复杂用户故事时调用/forge-loop |
Coexistence with Manual Mode
与手动模式共存
Autopilot and manual commands are 100% compatible:
- You can start with , pause, then continue manually
/forge-auto - You can work manually then launch to continue
/forge-auto --resume - Memory is shared: both modes read/write the same files
- works in both modes
/forge-status
自动驾驶模式和手动命令100%兼容:
- 你可以先启动 ,暂停后手动继续
/forge-auto - 你可以先手动工作,然后启动 继续
/forge-auto --resume - 记忆是共享的:两种模式读写相同的文件
- 在两种模式下都能正常工作
/forge-status
Notes
注意事项
- Autopilot ALWAYS respects quality gates (no shortcuts)
- The circuit breaker protects against infinite loops
- Persistent memory ensures continuity between sessions
- Compatible with projects initialized via
/forge-init - Also works for resuming existing projects (analyzes the state)
- 自动驾驶模式始终遵守质量门禁(无捷径)
- 断路器可防止无限循环
- 持久化记忆确保会话间的连续性
- 与通过 初始化的项目兼容
/forge-init - 也可用于恢复现有项目(会分析当前状态)