implement
npx skills add https://github.com/jschulte/claude-plugins --skill implement
Agent 安装分布
Skill 文档
Implement from Spec (with GitHub Spec Kit)
Step 6 of 6 in the Reverse Engineering to Spec-Driven Development process.
Estimated Time: Hours to days (depends on gaps)
Prerequisites: Step 5 completed (all specs finalized, no [NEEDS CLARIFICATION] markers)
Output: Fully implemented application with all specs marked â
COMPLETE
When to Use This Skill
Use this skill when:
- You’ve completed Step 5 (Complete Specification)
- All specifications in
specs/are finalized - Implementation plans exist in
specs/ - Ready to use
/speckit.implementto build features
Trigger Phrases:
- “Implement missing features”
- “Use speckit to implement”
- “Build from specifications”
- “Run speckit implement”
What This Skill Does
Uses GitHub Spec Kit’s implementation workflow to systematically build features:
- Use /speckit.tasks – Generate actionable task lists from implementation plans
- Use /speckit.implement – Execute tasks step-by-step for each feature
- Validate with /speckit.analyze – Verify implementation matches specs
- Update Specs Automatically – Spec Kit marks features â COMPLETE as you implement
- Track Progress – Monitor completion via
.specify/memory/status markers - Achieve 100% Completion – All specs implemented and validated
Key Benefit: Spec Kit’s /speckit.implement command guides you through implementation plans, updates specs automatically, and validates work against acceptance criteria.
â ï¸ Two Contexts: Handoff vs Standard Implementation
This skill works differently based on context:
Context A: Handoff (After Reverse Engineering)
When: Just completed Gears 1-5, on main branch, gaps identified What happens: Handoff procedure (celebrate, explain transition, offer feature branch setup) See: operations/handoff.md
Context B: Standard Implementation (Ongoing)
When: On feature branch (002-, 003-), working on specific feature What happens: Standard GitHub Spec Kit implementation workflow See: Process Overview below
The handoff only happens ONCE (after initial reverse engineering). After that, you always use standard /speckit.* workflow on feature branches.
GitHub Spec Kit Implementation Workflow
The standard Spec Kit workflow is:
/speckit.specify â /speckit.plan â /speckit.tasks â /speckit.implement â /speckit.analyze
For reverse engineering, we’ve already done the first two steps:
- â
/speckit.specify– Done in Step 3 (created specifications) - â
/speckit.plan– Done in Step 3 (created implementation plans)
Now we use the remaining commands:
/speckit.tasks– Generate task lists/speckit.implement– Build features/speckit.analyze– Validate
Process Overview
Step 1: Review Implementation Roadmap
From docs/gap-analysis-report.md, review the phased plan:
Phase 1: P0 Critical (~12 hours)
- Essential features
- Security fixes
- Blocking issues
Phase 2: P1 High Value (~20 hours)
- Important features
- High user impact
- Key improvements
Phase 3: P2/P3 (~TBD)
- Nice-to-have
- Future enhancements
Confirm with user:
- Start with Phase 1 (P0 items)?
- Any blockers to address first?
- Time constraints?
Step 2: For Each Feature – Generate Tasks
Use /speckit.tasks to generate actionable tasks from implementation plan:
# Example: Implement user authentication frontend
> /speckit.tasks user-authentication-frontend
What this does:
- Reads
specs/user-authentication-frontend.md - Breaks down plan into specific, actionable tasks
- Creates task checklist
Output example:
# Tasks: User Authentication Frontend
Based on implementation plan in `specs/user-authentication-frontend.md`
## Tasks
- [ ] Create LoginPage component (app/login/page.tsx)
- [ ] Create RegistrationPage component (app/register/page.tsx)
- [ ] Create PasswordResetPage component (app/reset-password/page.tsx)
- [ ] Add Zod validation schemas (lib/validation/auth.ts)
- [ ] Create useAuth hook (hooks/useAuth.ts)
- [ ] Implement API integration (lib/api/auth.ts)
- [ ] Add loading states to all forms
- [ ] Add error handling and display
- [ ] Write component tests (LoginPage.test.tsx, etc.)
- [ ] Update routing configuration (app/layout.tsx)
## Dependencies
- Backend API endpoints must be functional
- UI component library installed
## Acceptance Criteria (from specification)
- [ ] User can register with email and password
- [ ] User can log in with credentials
- [ ] User can reset forgotten password
- [ ] JWT tokens stored securely
- [ ] Forms validate input before submission
- [ ] Loading states shown during API calls
- [ ] Error messages displayed clearly
See operations/generate-tasks.md
Step 3: Implement Feature with /speckit.implement
Use /speckit.implement to execute the implementation plan:
# Implement the feature step-by-step
> /speckit.implement user-authentication-frontend
What this does:
- Loads tasks from
/speckit.tasksoutput - Walks through each task systematically
- Generates code for each task
- Tests implementation against acceptance criteria
- Updates specification status markers
- Commits changes with descriptive messages
Interactive flow:
> /speckit.implement user-authentication-frontend
Starting implementation of: User Authentication Frontend
Plan: specs/user-authentication-frontend.md
Task 1/10: Create LoginPage component
I'll create app/login/page.tsx with:
- Email/password form
- Form validation
- Submit handler
- Link to registration and password reset
[Code generated]
â
Task 1 complete
Task 2/10: Create RegistrationPage component
[...]
All tasks complete! Running validation...
â
All acceptance criteria met
â
Tests passing (8/8)
â
No TypeScript errors
Updating specification status...
user-authentication.md: â ï¸ PARTIAL â â
COMPLETE
Implementation complete!
See operations/use-speckit-implement.md
Step 4: Validate Implementation
After implementing, use /speckit.analyze to verify:
> /speckit.analyze
What it checks:
- Implementation matches specification
- All acceptance criteria met
- No inconsistencies with related specs
- Status markers accurate
If issues found:
â ï¸ Issues detected:
1. user-authentication.md marked COMPLETE
- Missing: Token refresh mechanism
- Action: Add token refresh or update spec
2. Inconsistency with user-profile.md
- user-profile depends on authentication
- user-profile marked PARTIAL
- Recommendation: Complete user-profile next
Fix any issues and re-run /speckit.analyze until clean.
Step 5: Update Progress and Continue
After each feature:
-
Check progress:
> /speckit.analyze # Shows: X/Y features complete -
Update gap report:
- Mark feature as â COMPLETE
- Update overall completion percentage
- Move to next priority feature
-
Commit changes:
git commit -m "feat: implement user authentication frontend (user-authentication.md)" -
Select next feature:
- Follow prioritized roadmap
- Choose next P0 item, or move to P1 if P0 complete
Step 6: Iterate Until 100% Complete
Repeat Steps 2-5 for each feature in the roadmap:
# Phase 1: P0 Critical
> /speckit.tasks fish-management-ui
> /speckit.implement fish-management-ui
> /speckit.analyze
> /speckit.tasks photo-upload-api
> /speckit.implement photo-upload-api
> /speckit.analyze
# Phase 2: P1 High Value
> /speckit.tasks analytics-dashboard
> /speckit.implement analytics-dashboard
> /speckit.analyze
# Continue until all features complete...
Track progress:
- Phase 1: 3/3 complete (100%) â
- Phase 2: 2/4 complete (50%) ð
- Phase 3: 0/5 complete (0%) â³
Example: Complete Implementation Flow
# 1. Review roadmap
User: "Let's implement the missing features"
Claude: Reviews docs/gap-analysis-report.md
Claude: "I see 3 P0 items. Let's start with fish-management-ui?"
User: "Yes, let's do it"
# 2. Generate tasks
> /speckit.tasks fish-management-ui
Output: 12 tasks identified
# 3. Implement
> /speckit.implement fish-management-ui
Starting implementation...
Task 1/12: Create FishEditPage component
[Code generated for app/fish/[id]/edit/page.tsx]
â
Task 1 complete
Task 2/12: Add photo upload UI
[Code generated for components/PhotoUpload.tsx]
â
Task 2 complete
[... continues through all 12 tasks ...]
Implementation complete!
â
All acceptance criteria met
â
Tests passing (15/15)
# 4. Validate
> /speckit.analyze
â
No issues found
fish-management.md: â ï¸ PARTIAL â â
COMPLETE
# 5. Commit
git commit -m "feat: complete fish management UI (fish-management.md)"
# 6. Next feature
Claude: "Phase 1 progress: 1/3 complete. Next: photo-upload-api?"
User: "Yes"
# Repeat...
Integration with Reverse Engineering Process
Your reverse-engineered codebase is now:
- â Fully documented (Step 2)
- â Formal specs created (Step 3)
- â Gaps identified (Step 4)
- â Clarifications resolved (Step 5)
- ð Being implemented systematically (Step 6)
Spec Kit ensures:
- Implementation matches specs exactly
- Specs stay up-to-date with code
- No drift between docs and reality
- Continuous validation
After completion:
- Use
/speckit.specifyfor new features - Use
/speckit.planâ/speckit.tasksâ/speckit.implementfor development - Use
/speckit.analyzeto maintain consistency - Your codebase is now fully spec-driven!
Success Criteria
After running this skill (implementing all features), you should have:
- â All P0 features implemented (Phase 1 complete)
- â All P1 features implemented (Phase 2 complete)
- â P2/P3 features implemented or intentionally deferred
- â All specifications marked â COMPLETE
- â
/speckit.analyzeshows no issues - â All tests passing
- â Application at 100% completion
- â Ready for production deployment
Ongoing spec-driven development established:
- New features start with
/speckit.specify - Implementation uses
/speckit.planâ/speckit.tasksâ/speckit.implement - Continuous validation with
/speckit.analyze
Best Practices
During Implementation
- One feature at a time – Don’t start multiple features in parallel
- Follow the roadmap – Respect P0 â P1 â P2 priority order
- Use
/speckit.implement– Don’t implement manually, let Spec Kit guide you - Validate frequently – Run
/speckit.analyzeafter each feature - Commit often – Commit after each feature completion
- Update specs – If you discover new requirements, update specs first
Quality Standards
For each implementation:
- â Meets all acceptance criteria
- â Tests added and passing
- â TypeScript types correct (if applicable)
- â Error handling implemented
- â Loading states for async operations
- â Responsive design (if UI)
- â Accessibility standards met
When Issues Arise
If /speckit.analyze finds problems:
- Fix the implementation to match spec, OR
- Update the spec if requirements changed
- Never leave specs and code out of sync
Continuous Spec-Driven Development
After completing the reverse engineering process:
For New Features
# 1. Create specification
> /speckit.specify
# 2. Create implementation plan
> /speckit.plan
# 3. Generate tasks
> /speckit.tasks
# 4. Implement
> /speckit.implement
# 5. Validate
> /speckit.analyze
For Refactoring
# 1. Update affected specifications
> /speckit.specify
# 2. Update implementation plan
> /speckit.plan
# 3. Implement changes
> /speckit.implement
# 4. Validate no regression
> /speckit.analyze
For Bug Fixes
# 1. Update spec if bug reveals requirement gap
> /speckit.specify
# 2. Fix implementation
[manual fix or /speckit.implement]
# 3. Validate
> /speckit.analyze
Technical Notes
- Spec Kit’s
/speckit.implementgenerates code – review before committing - Implementation plans should be detailed for best results
/speckit.tasksoutput can be refined if tasks are too broad- Use
/speckit.clarifyif you discover ambiguities during implementation - Keep
.specify/memory/in version control specs/is the source of truth
Final Outcome
You’ve transformed:
- Partially-complete codebase with no specs
- â Fully spec-driven development workflow
- â 100% implementation aligned with specifications
- â Continuous validation with
/speckit.analyze - â Sustainable spec-first development process
Your application is now:
- â Fully documented
- â Completely specified
- â 100% implemented
- â Continuously validated
- â Ready for ongoing spec-driven development
Gear 6.5: Validate & Review
Before finalizing, let’s ensure everything meets quality standards through systematic validation.
Step 1: Run Validation
# Validate implementation against specs
/stackshift.validate --fix
This will:
- â Run full test suite
- â Validate TypeScript compilation
- â Check spec compliance
- â Categorize any issues
- â Auto-fix issues (with –fix flag)
- â Rollback if fixes fail
Expected result:
â
VALIDATION PASSED
All tests passing: â
TypeScript compiling: â
Spec compliance: â
Code quality: â
ð Implementation is production-ready!
If validation finds issues, they’ll be fixed automatically. If critical issues are found that can’t be auto-fixed, I’ll report them for manual resolution.
Step 2: Code Review
# Perform comprehensive code review
/stackshift.review
This reviews across 5 dimensions:
- ð Correctness – Works as intended, meets requirements
- ð Standards – Follows conventions, well documented
- ð Security – No vulnerabilities, proper validation
- â¡ Performance – Efficient, scalable implementation
- 𧪠Testing – Adequate coverage, edge cases handled
Expected result:
ââââââââââââââââââââââââââââââââââââââââ
ð Review Report
ââââââââââââââââââââââââââââââââââââââââ
### â
APPROVED
All quality checks passed
Ready for deployment
ââââââââââââââââââââââââââââââââââââââââ
If issues are found, I’ll provide specific feedback with line numbers and recommendations.
Step 3: Generate Spec Coverage Map
After validation passes, let’s create the coverage map…
Final Step: Generate Spec Coverage Map
Now let’s create a visual coverage map showing the relationship between your specifications and code:
# Generate coverage map
I’ll analyze all specs in .specify/memory/specifications/ or specs/ and create:
- ASCII box diagrams – Visual map of each spec’s files
- Reverse index – Which spec(s) cover each file
- Coverage statistics – Percentages by category
- Heat map – Visual coverage representation
- Gap analysis – Files not covered by specs
- Shared files – High-risk files used by multiple specs
Output: docs/spec-coverage-map.md
This provides crucial visibility into spec-code alignment and helps identify any gaps!
Spec Coverage Health Report
After generating the coverage map, I’ll show you a summary:
ð Spec Coverage Health Report
Overall Coverage: 91% (99/109 files)
By Category:
Backend: 93% [ââââââââââââââââââ]
Frontend: 92% [ââââââââââââââââââ]
Infrastructure: 83% [ââââââââââââââââââ]
Database: 100% [ââââââââââââââââââââ]
Scripts: 67% [ââââââââââââââââââ]
Status:
â
12 specs covering 99 files
â ï¸ 10 gap files identified (need review)
ð´ 2 high-risk shared files (used by 4+ specs)
Full report: docs/spec-coverage-map.md
Congratulations! You’ve completed the 6-step Reverse Engineering to Spec-Driven Development process. Your codebase is now enterprise-grade, fully specified, and ready for sustainable development using GitHub Spec Kit or continue using StackShift to help develop new functionality. ð
Remember: Maintain the spec-driven workflow going forward:
- Requirements change â Update specs first (
/speckit.specify) - Plan implementation (
/speckit.plan) - Generate tasks (
/speckit.tasks) - Implement (
/speckit.implement) - Validate (
/speckit.analyze)
This ensures specs and code never drift apart.