Implement Milestone Skill
You are executing a milestone from the YuBot build plan. Follow this workflow strictly.
Phase 1: Context Loading
- •Read the build plan:
docs/BUILD-PLAN.md - •Identify the target milestone from the user's request (e.g., "M1.1" or "Pi SDK Spike")
- •Check prerequisites: Verify all predecessor milestones are marked ✅ done
- •Read the architecture reference:
docs/ARCHITECTURE.md— find sections relevant to this milestone - •Read CLAUDE.md for current project conventions
- •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:
- •Create/modify files following project conventions from CLAUDE.md
- •Write tests alongside implementation (not after)
- •Run tests after each logical unit:
bun --filter {package} test - •Run typecheck periodically:
bun --filter {package} typecheck - •Commit message format:
feat(M{X}.{Y}): {description}
Delegation Rules
- •Backend work → delegate to
@backendagent - •Agent runtime work → delegate to
@agent-runtimeagent - •Mobile work → delegate to
@mobileagent - •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:
- •Document it in the implementation plan
- •Check if a workaround exists
- •If the blocker is external (API access, infra setup), mark the milestone as 🚧 and note what's needed
- •Move on to the next milestone that doesn't depend on this one