intent-build-now

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Intent 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 directly

Step 1: Locate Files

步骤1:定位文件

Search for Intent files in order:
  1. User-specified path
  2. intent/{name}/
    directories
  3. Current directory
Required files:
  • INTENT.md
    - The intent document
  • plan.md
    - Execution plan with test matrix
Optional:
  • TASK.yaml
    - TaskSwarm status file
If
plan.md
missing:
plan.md not found.

Run /intent-plan first to generate the execution plan.
按以下顺序搜索Intent文件:
  1. 用户指定的路径
  2. intent/{name}/
    目录
  3. 当前目录
必需文件:
  • INTENT.md
    - Intent文档
  • plan.md
    - 包含测试矩阵的执行计划
可选文件:
  • TASK.yaml
    - TaskSwarm状态文件
如果缺少
plan.md
plan.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中的必需章节

SectionPurposeHow to Fix
ResponsibilitiesWhat it does / doesn't doUse
/intent-interview
to clarify scope
StructureASCII diagram of componentsAdd
## Structure
with ASCII diagram
APIFunction signaturesDefine key interfaces in
## API
章节用途修复方法
Responsibilities定义该内容能做/不能做的事项使用
/intent-interview
明确范围
Structure组件的ASCII示意图添加
## Structure
章节并附上ASCII示意图
API函数签名
## API
章节中定义关键接口

Required in plan.md

plan.md中的必需项

CheckCriteria
PhasesHas
## Phase 0:
or more phases
TestsEach phase has 6 test categories
E2E GateEach phase has
### E2E Gate
CheckboxesUses
- [ ]
format
检查项标准
Phases包含
## Phase 0:
或更多阶段
Tests每个阶段包含6个测试类别
E2E Gate每个阶段包含
### E2E Gate
Checkboxes使用
- [ ]
格式

If Not Ready

若未就绪

markdown
undefined
markdown
undefined

Intent Validation: NEEDS WORK

Intent Validation: NEEDS WORK

Missing elements:
  1. plan.md missing E2E Gate for Phase 1
    • Add
      ### E2E Gate
      with verification script
  2. plan.md Phase 0 missing Data Leak tests
    • Add
      #### Data Leak
      section with test cases
Run /intent-plan to regenerate, or fix manually.
undefined
Missing elements:
  1. plan.md missing E2E Gate for Phase 1
    • Add
      ### E2E Gate
      with verification script
  2. plan.md Phase 0 missing Data Leak tests
    • Add
      #### Data Leak
      section with test cases
Run /intent-plan to regenerate, or fix manually.
undefined

Step 3: Choose Execution Path

步骤3:选择执行路径

Path A: TaskSwarm Available

路径A:存在TaskSwarm

Detect TaskSwarm by checking:
  1. TASK.yaml
    exists in intent directory
  2. TaskSwarm plugin is installed (check for
    /swarm
    skill)
If both conditions met:
markdown
undefined
通过以下方式检测TaskSwarm:
  1. 意图目录中存在
    TASK.yaml
    文件
  2. 已安装TaskSwarm插件(检查是否有
    /swarm
    技能)
若满足两个条件:
markdown
undefined

Intent Validation: PASSED ✓

Intent Validation: PASSED ✓

TaskSwarm detected. Delegating execution...
Your Intent is ready. Run:
/swarm run {task_name}
Or for continuous execution:
/swarm run-all
TaskSwarm 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-all
TaskSwarm 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
undefined

Intent 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:
  1. Read ### Tests section
  2. 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]
  3. Run E2E Gate script
  4. Git commit: "feat({scope}): Phase {n} - {phase_name}"
  5. Continue to next Phase
undefined
No TaskSwarm detected. Executing directly...
Starting Phase 0: {phase_name}

然后为每个阶段执行TDD循环:
For each Phase:
  1. Read ### Tests section
  2. 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]
  3. Run E2E Gate script
  4. Git commit: "feat({scope}): Phase {n} - {phase_name}"
  5. Continue to next Phase
undefined

Step 4: Completion

步骤4:完成

After all phases complete:
markdown
undefined
所有阶段完成后:
markdown
undefined

Build 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
undefined
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
undefined

Integration

集成

/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 back

TDD Execution Standards (Direct Mode)

TDD执行标准(直接模式)

When executing without TaskSwarm, follow strict TDD:
当无TaskSwarm时执行,需遵循严格的TDD规范:

Test Categories (All 6 Required)

测试类别(全部6项必需)

  1. Happy Path - Normal expected usage
  2. Bad Path - Invalid inputs, error conditions
  3. Edge Cases - Boundary conditions
  4. Security - Vulnerability prevention
  5. Data Leak - Information exposure prevention
  6. Data Damage - Data integrity protection
  1. Happy Path - 正常预期使用场景
  2. Bad Path - 无效输入、错误情况
  3. Edge Cases - 边界条件
  4. Security - 漏洞预防
  5. Data Leak - 信息泄露预防
  6. 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
undefined

Run 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

undefined
undefined

Tips

提示

  1. Prefer TaskSwarm - It handles concurrency, heartbeat, and recovery
  2. Don't force incomplete Intents - Missing plan.md means not ready
  3. Respect checkboxes - They're the source of truth for progress
  4. Commit frequently - One commit per phase, not one mega-commit
  1. 优先使用TaskSwarm - 它可处理并发、心跳和恢复
  2. 不要强制使用不完整的Intent - 缺少plan.md意味着未准备就绪
  3. 尊重复选框 - 它们是进度的真实依据
  4. 频繁提交 - 每个阶段提交一次,不要一次性大提交