AgentSkillsCN

implement-milestone

在完整加载上下文、完成实现、通过测试并更新计划的基础上,执行构建计划中的特定里程碑。

SKILL.md
--- frontmatter
name: implement-milestone
description: Execute a specific milestone from the build plan with full context loading, implementation, testing, and plan updates
invocation: user
user_invocation: /implement-milestone

Implement Milestone Skill

You are executing a milestone from the YuBot build plan. Follow this workflow strictly.

Phase 1: Context Loading

  1. Read the build plan: docs/BUILD-PLAN.md
  2. Identify the target milestone from the user's request (e.g., "M1.1" or "Pi SDK Spike")
  3. Check prerequisites: Verify all predecessor milestones are marked ✅ done
  4. Read the architecture reference: docs/ARCHITECTURE.md — find sections relevant to this milestone
  5. Read CLAUDE.md for current project conventions
  6. Scan existing code in the relevant packages to understand current state

If prerequisites are not met, inform the developer and suggest which milestone to tackle instead.

Phase 2: Planning

Before writing any code, create a brief implementation plan:

code
## Implementation Plan: M{X}.{Y} — {Title}

### Deliverables
- [ ] {deliverable 1}
- [ ] {deliverable 2}
…

### File Plan
|File                  |Action|Purpose|
|----------------------|------|-------|
|`packages/.../file.ts`|Create|…      |
|`packages/.../file.ts`|Modify|…      |

### Dependencies Needed
- {package}: {reason}

### Open Questions
- {anything unclear that needs developer input}

### Estimated Agent Tasks
- {number} files to create
- {number} files to modify
- {number} test files

Present this plan and wait for approval before proceeding.

Phase 3: Implementation

Execute the plan. For each deliverable:

  1. Create/modify files following project conventions from CLAUDE.md
  2. Write tests alongside implementation (not after)
  3. Run tests after each logical unit: bun --filter {package} test
  4. Run typecheck periodically: bun --filter {package} typecheck
  5. Commit message format: feat(M{X}.{Y}): {description}

Delegation Rules

  • Backend work → delegate to @backend agent
  • Agent runtime work → delegate to @agent-runtime agent
  • Mobile work → delegate to @mobile agent
  • Shared types/schemas → handle directly (affects all packages)
  • Cross-cutting concerns → handle directly, coordinate between agents

Quality Checks

After implementation:

  • All tests pass: bun test
  • Type checks clean: bun typecheck
  • Lint clean: bun lint
  • No hardcoded secrets or API keys
  • Error handling on all external calls (DB, API, file I/O)
  • Structured logging on key operations

Phase 4: Milestone Review

After implementation is complete, invoke the /milestone-review skill to update the build plan.

Error Recovery

If you encounter a blocker:

  1. Document it in the implementation plan
  2. Check if a workaround exists
  3. If the blocker is external (API access, infra setup), mark the milestone as 🚧 and note what's needed
  4. Move on to the next milestone that doesn't depend on this one