intent-build-now
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIntent Build Now
Intent 立即构建
Start building from Intent. Validates completeness, then chooses execution path.
从Intent开始构建。验证完整性,然后选择执行路径。
Workflow
工作流
/intent-build-now [path]
↓
Locate Intent + plan.md
↓
Validate completeness ──→ Incomplete? ──→ Show gaps, suggest /intent-plan
↓
Check for TaskSwarm
│
├── Has TaskSwarm + TASK.yaml ──→ Delegate to /swarm run
│
└── No TaskSwarm ──→ Execute TDD phases directly/intent-build-now [path]
↓
Locate Intent + plan.md
↓
Validate completeness ──→ Incomplete? ──→ Show gaps, suggest /intent-plan
↓
Check for TaskSwarm
│
├── Has TaskSwarm + TASK.yaml ──→ Delegate to /swarm run
│
└── No TaskSwarm ──→ Execute TDD phases directlyStep 1: Locate Files
步骤1:定位文件
Search for Intent files in order:
- User-specified path
- directories
intent/{name}/ - Current directory
Required files:
- - The intent document
INTENT.md - - Execution plan with test matrix
plan.md
Optional:
- - TaskSwarm status file
TASK.yaml
If missing:
plan.mdplan.md not found.
Run /intent-plan first to generate the execution plan.按以下顺序搜索Intent文件:
- 用户指定的路径
- 目录
intent/{name}/ - 当前目录
必需文件:
- - Intent文档
INTENT.md - - 包含测试矩阵的执行计划
plan.md
可选文件:
- - TaskSwarm状态文件
TASK.yaml
如果缺少:
plan.mdplan.md not found.
Run /intent-plan first to generate the execution plan.Step 2: Validate Intent Completeness
步骤2:验证Intent完整性
Required Sections in INTENT.md
INTENT.md中的必需章节
| Section | Purpose | How to Fix |
|---|---|---|
| Responsibilities | What it does / doesn't do | Use |
| Structure | ASCII diagram of components | Add |
| API | Function signatures | Define key interfaces in |
| 章节 | 用途 | 修复方法 |
|---|---|---|
| Responsibilities | 定义该内容能做/不能做的事项 | 使用 |
| Structure | 组件的ASCII示意图 | 添加 |
| API | 函数签名 | 在 |
Required in plan.md
plan.md中的必需项
| Check | Criteria |
|---|---|
| Phases | Has |
| Tests | Each phase has 6 test categories |
| E2E Gate | Each phase has |
| Checkboxes | Uses |
| 检查项 | 标准 |
|---|---|
| Phases | 包含 |
| Tests | 每个阶段包含6个测试类别 |
| E2E Gate | 每个阶段包含 |
| Checkboxes | 使用 |
If Not Ready
若未就绪
markdown
undefinedmarkdown
undefinedIntent Validation: NEEDS WORK
Intent Validation: NEEDS WORK
Missing elements:
-
plan.md missing E2E Gate for Phase 1
- Add with verification script
### E2E Gate
- Add
-
plan.md Phase 0 missing Data Leak tests
- Add section with test cases
#### Data Leak
- Add
Run /intent-plan to regenerate, or fix manually.
undefinedMissing elements:
-
plan.md missing E2E Gate for Phase 1
- Add with verification script
### E2E Gate
- Add
-
plan.md Phase 0 missing Data Leak tests
- Add section with test cases
#### Data Leak
- Add
Run /intent-plan to regenerate, or fix manually.
undefinedStep 3: Choose Execution Path
步骤3:选择执行路径
Path A: TaskSwarm Available
路径A:存在TaskSwarm
Detect TaskSwarm by checking:
- exists in intent directory
TASK.yaml - TaskSwarm plugin is installed (check for skill)
/swarm
If both conditions met:
markdown
undefined通过以下方式检测TaskSwarm:
- 意图目录中存在文件
TASK.yaml - 已安装TaskSwarm插件(检查是否有技能)
/swarm
若满足两个条件:
markdown
undefinedIntent Validation: PASSED ✓
Intent Validation: PASSED ✓
TaskSwarm detected. Delegating execution...
Your Intent is ready. Run:
/swarm run {task_name}Or for continuous execution:
/swarm run-allTaskSwarm will:
- Claim the task atomically
- Execute phases with TDD discipline
- Update checkboxes in plan.md
- Commit after each phase
- Push to remote
**Do NOT execute phases yourself when TaskSwarm is available.**TaskSwarm detected. Delegating execution...
Your Intent is ready. Run:
/swarm run {task_name}Or for continuous execution:
/swarm run-allTaskSwarm will:
- Claim the task atomically
- Execute phases with TDD discipline
- Update checkboxes in plan.md
- Commit after each phase
- Push to remote
**当TaskSwarm可用时,请勿自行执行阶段。**Path B: No TaskSwarm (Direct Execution)
路径B:无TaskSwarm(直接执行)
If TaskSwarm not available:
markdown
undefined若TaskSwarm不可用:
markdown
undefinedIntent Validation: PASSED ✓
Intent Validation: PASSED ✓
No TaskSwarm detected. Executing directly...
Starting Phase 0: {phase_name}
Then execute TDD loop for each phase:
For each Phase:
- Read ### Tests section
- For each unchecked test : a. Write test code (if not exists) b. Run test → expect failure (red) c. Write implementation d. Run test → expect pass (green) e. Update plan.md:
- [ ]→- [ ]- [x] - Run E2E Gate script
- Git commit: "feat({scope}): Phase {n} - {phase_name}"
- Continue to next Phase
undefinedNo TaskSwarm detected. Executing directly...
Starting Phase 0: {phase_name}
然后为每个阶段执行TDD循环:
For each Phase:
- Read ### Tests section
- For each unchecked test : a. Write test code (if not exists) b. Run test → expect failure (red) c. Write implementation d. Run test → expect pass (green) e. Update plan.md:
- [ ]→- [ ]- [x] - Run E2E Gate script
- Git commit: "feat({scope}): Phase {n} - {phase_name}"
- Continue to next Phase
undefinedStep 4: Completion
步骤4:完成
After all phases complete:
markdown
undefined所有阶段完成后:
markdown
undefinedBuild Complete ✓
Build Complete ✓
All phases executed:
- Phase 0: {name} ✓
- Phase 1: {name} ✓
Next steps:
- Run /intent-sync to update Intent with confirmed details
- Run /intent-check to verify consistency
undefinedAll phases executed:
- Phase 0: {name} ✓
- Phase 1: {name} ✓
Next steps:
- Run /intent-sync to update Intent with confirmed details
- Run /intent-check to verify consistency
undefinedIntegration
集成
/intent-interview # Create Intent from scratch
↓
/intent-review # Section-by-section approval
↓
/intent-plan # Generate plan.md + TASK.yaml
↓
/intent-build-now # THIS SKILL
↓
┌───────────────────────────────────────┐
│ Has TaskSwarm? │
│ Yes → /swarm run (delegate) │
│ No → Execute TDD directly │
└───────────────────────────────────────┘
↓
/intent-sync # Sync confirmed details back/intent-interview # Create Intent from scratch
↓
/intent-review # Section-by-section approval
↓
/intent-plan # Generate plan.md + TASK.yaml
↓
/intent-build-now # THIS SKILL
↓
┌───────────────────────────────────────┐
│ Has TaskSwarm? │
│ Yes → /swarm run (delegate) │
│ No → Execute TDD directly │
└───────────────────────────────────────┘
↓
/intent-sync # Sync confirmed details backTDD Execution Standards (Direct Mode)
TDD执行标准(直接模式)
When executing without TaskSwarm, follow strict TDD:
当无TaskSwarm时执行,需遵循严格的TDD规范:
Test Categories (All 6 Required)
测试类别(全部6项必需)
- Happy Path - Normal expected usage
- Bad Path - Invalid inputs, error conditions
- Edge Cases - Boundary conditions
- Security - Vulnerability prevention
- Data Leak - Information exposure prevention
- Data Damage - Data integrity protection
- Happy Path - 正常预期使用场景
- Bad Path - 无效输入、错误情况
- Edge Cases - 边界条件
- Security - 漏洞预防
- Data Leak - 信息泄露预防
- Data Damage - 数据完整性保护
TDD Discipline
TDD规范
- Tests First: Write ALL tests before implementation
- Red-Green-Refactor: Verify test fails, implement, verify pass
- No Skip: Every checkbox must be completed
- Commit Per Phase: One commit after each phase passes
- Tests First:在实现前编写所有测试
- Red-Green-Refactor:先验证测试失败,再进行实现,最后验证测试通过
- No Skip:必须完成所有复选框项
- Commit Per Phase:每个阶段通过后提交一次
E2E Gate Enforcement
E2E Gate强制要求
Each phase's E2E Gate script MUST pass before proceeding:
bash
undefined每个阶段的E2E Gate脚本必须通过才能继续:
bash
undefinedRun the E2E Gate script from plan.md
Run the E2E Gate script from plan.md
Example: pnpm test -- --grep "Phase 0"
Example: pnpm test -- --grep "Phase 0"
If fails: Stop and fix
If fails: Stop and fix
If passes: Continue to next phase
If passes: Continue to next phase
undefinedundefinedTips
提示
- Prefer TaskSwarm - It handles concurrency, heartbeat, and recovery
- Don't force incomplete Intents - Missing plan.md means not ready
- Respect checkboxes - They're the source of truth for progress
- Commit frequently - One commit per phase, not one mega-commit
- 优先使用TaskSwarm - 它可处理并发、心跳和恢复
- 不要强制使用不完整的Intent - 缺少plan.md意味着未准备就绪
- 尊重复选框 - 它们是进度的真实依据
- 频繁提交 - 每个阶段提交一次,不要一次性大提交