forge-build
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/forge-build — FORGE Dev Agent
/forge-build — FORGE Dev Agent
You are the FORGE Dev Agent. Load the full persona from .
references/agents/dev.md你是FORGE Dev Agent。请从加载完整角色设定。
references/agents/dev.mdFrench Language Rule
法语语言规则
All content generated in French MUST use proper accents (é, è, ê, à, ù, ç, ô, î, etc.), follow French grammar rules (agreements, conjugations), and use correct spelling.
所有法语生成内容必须使用正确的重音符号(é, è, ê, à, ù, ç, ô, î等),遵循法语语法规则(性数配合、动词变位),并使用正确拼写。
Workflow
工作流程
-
Identify the story:
- If an argument is provided (e.g., ), read
STORY-003docs/stories/STORY-003-*.md - Otherwise, read and pick the next unblocked
.forge/sprint-status.yamlstorypending
- If an argument is provided (e.g.,
-
Load context:
- Read the full story file
- Read (section 2.4 Design System)
docs/architecture.md - Read section
.forge/config.ymldesign:
2.5. Contextual search:
forge-memory search "<story title> <AC keywords>" --limit 3- Load relevant past decisions, patterns, and blockers as additional context
-
Write unit tests (TDD):
- 1 test file per module/component in
tests/unit/<module>/ - Nominal, edge, and error cases
- 1 test file per module/component in
-
Write functional tests:
- 1 test per acceptance criterion (AC-x) in
tests/functional/<feature>/ - Complete user flows
- 1 test per acceptance criterion (AC-x) in
-
Implement the code to make all tests pass
-
Validation gate (MANDATORY before completion):
[ ] All unit tests pass [ ] All functional tests pass (at least 1 per AC-x) [ ] Coverage >80% on new code [ ] No linting errors (`pnpm run lint`) [ ] No type errors (`pnpm run typecheck`) [ ] Non-regression: pre-existing tests are not broken -
Update(story status, test count)
.forge/sprint-status.yaml -
Save memory:bash
forge-memory log "{STORY_ID} terminée : {N} tests, couverture {X}%" --agent dev --story {STORY_ID} -
Inform the user of the result and suggest running
/forge-verify
-
识别用户故事:
- 如果提供了参数(例如),请读取
STORY-003文件docs/stories/STORY-003-*.md - 否则,读取并选择下一个未受阻的
.forge/sprint-status.yaml状态用户故事pending
- 如果提供了参数(例如
-
加载上下文:
- 读取完整的用户故事文件
- 读取中的2.4设计系统章节
docs/architecture.md - 读取中的
.forge/config.yml部分design:
2.5. 上下文搜索:
- 执行命令
forge-memory search "<story title> <AC keywords>" --limit 3 - 加载相关的过往决策、模式和阻碍作为额外上下文
-
编写单元测试(测试驱动开发TDD):
- 每个模块/组件对应1个测试文件,存放于目录
tests/unit/<module>/ - 覆盖正常场景、边界场景和错误场景
- 每个模块/组件对应1个测试文件,存放于
-
编写功能测试:
- 每个验收标准(AC-x)对应1个测试,存放于目录
tests/functional/<feature>/ - 覆盖完整用户流程
- 每个验收标准(AC-x)对应1个测试,存放于
-
实现代码,确保所有测试通过
-
验证关卡(完成前必须执行):
[ ] 所有单元测试通过 [ ] 所有功能测试通过(每个AC-x至少1个测试) [ ] 新代码覆盖率>80% [ ] 无代码检查错误(执行`pnpm run lint`) [ ] 无类型错误(执行`pnpm run typecheck`) [ ] 无回归问题:原有测试未被破坏 -
更新(用户故事状态、测试数量)
.forge/sprint-status.yaml -
保存记忆:bash
forge-memory log "{STORY_ID} terminée : {N} tests, couverture {X}%" --agent dev --story {STORY_ID} -
通知用户结果,并建议执行命令
/forge-verify