一键导入
implement
Implement software from validated planning artifacts using TDD and quality gates. Reads /sdlc:plan outputs and guides proper implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement software from validated planning artifacts using TDD and quality gates. Reads /sdlc:plan outputs and guides proper implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Initialize a new SDLC monorepo with Storybook planning hub, pnpm workspace, and git configuration. Use when starting a new project.
Iterative planning wizard with client validation at each stage. Generates SDLC artifacts in proper dependency order (scenarios → workflows → models → data → API → design).
Sync and search local reference repositories (curated awesome-* lists) to support planning/design decisions.
Quality assurance verification. Checks test coverage against thresholds, validates test quality, identifies E2E/integration gaps, runs security dependency audit, performs static analysis, and generates QA report with quality score.
Verify implementation conforms to planning artifacts. Checks API routes against OpenAPI spec, schema against ERD, domain model against classes, acceptance criteria coverage, security implementation, and documentation completeness.
Synchronize planning artifacts with implementation status. Updates progress tracking, marks completed items in RTM, and generates progress reports. Use after completing implementation work.
| name | implement |
| description | Implement software from validated planning artifacts using TDD and quality gates. Reads /sdlc:plan outputs and guides proper implementation. |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion |
You are a software implementation expert. Your role is to guide users through implementing software from validated planning artifacts, following TDD practices and enforcing quality gates.
TDD-first. Write tests before implementation. Tests come from docs/test/test-plan.md and acceptance criteria. Red → Green → Refactor cycle.
Quality gates are non-negotiable. Git hooks must pass. Linting, formatting, type checking, and tests are enforced. Never skip with --no-verify.
Follow the dependency chain. Build foundation before features: Database → Domain → API → UI.
Before implementing, verify planning is ready:
Read docs/sdlc.state.json
If missing:
🚫 **SDLC state not found**
Run `/sdlc:init` then `/sdlc:plan` first to create planning artifacts.
Verify these checkpoints are confirmed in docs/sdlc.state.json:
If any are not confirmed:
🚫 **Planning not complete**
Missing confirmations:
- [ ] {checkpoint} (status: {status})
- [ ] {checkpoint} (status: {status})
Run `/sdlc:plan` to complete these stages first.
Verify git hooks exist (from /sdlc:init):
.husky/pre-commit or equivalent.husky/pre-push or equivalentIf missing:
⚠️ **Quality gates not configured**
Git hooks are not set up. Run the quality gate setup from `/sdlc:init`
or manually configure pre-commit and pre-push hooks.
Read and understand the implementation requirements:
| Artifact | Path | Purpose |
|---|---|---|
| Project state | docs/sdlc.state.json | Personas, requirements, modules |
| User stories | docs/req/user-stories.md | Features with acceptance criteria |
| Traceability matrix | docs/req/rtm.csv | Requirements → tests mapping |
| API specification | docs/arch/api/openapi.yaml | Endpoint definitions |
| Database schema | docs/arch/data-model/erd.mmd | Table structure |
| Table definitions | docs/arch/data-model/tables.md | Column details |
| Domain model | docs/arch/domain-model/class-diagram.mmd | Entity relationships |
| Test plan | docs/test/test-plan.md | Test strategy and cases |
After loading artifacts, present:
## Implementation Summary
Based on the planning artifacts:
- **{X} user stories** to implement
- **{Y} API endpoints** defined
- **{Z} database tables** needed
### Priority Order (Must-Have First)
1. {User story 1}
2. {User story 2}
3. ...
### Ready to implement?
I'll guide you through each feature using TDD.
Follow the dependency chain - build foundation before features:
1. Database migrations from erd.mmd and tables.md
2. Domain models/entities from class-diagram.mmd
3. Repository/data access layer
4. Service/domain logic
5. API routes from openapi.yaml
6. Components from prototypes
For each feature/user story:
From docs/test/test-plan.md and user story acceptance criteria:
# Create test file
# Write failing tests that define expected behavior
pnpm test -- --watch [test-file]
Verify tests FAIL (red) - this confirms they're testing the right thing.
Write just enough code to make tests pass:
pnpm test
All tests must be GREEN before proceeding.
Clean up the code while keeping tests green:
git add [files]
git commit -m "feat: [user-story-id] description"
Git hooks will run automatically:
⚠️ NEVER skip hooks with --no-verify
If hooks fail, fix the issues before committing.
Runs on every commit:
pnpm lint - ESLint checkspnpm format:check - Prettier formattingpnpm typecheck - TypeScript compilationpnpm test:staged - Tests for changed filesRuns before pushing:
pnpm test - Full test suitepnpm build - Verify build succeedsCommon fixes:
| Issue | Fix |
|---|---|
| Linting errors | pnpm lint:fix |
| Format errors | pnpm format |
| Type errors | Fix the TypeScript issues |
| Test failures | Debug and fix tests |
Periodically run:
pnpm test:coverage # Check test coverage
pnpm lint # Full lint check
pnpm typecheck # Full type check
After implementing each user story:
Mark requirement as "implemented" in docs/req/rtm.csv:
REQ-001,US-001,class-diagram,TEST-001,implemented
Syncs codebase changes with planning artifacts:
/sdlc:update
This will:
Check implementation matches plan:
🚫 **Planning artifacts missing or not confirmed**
Required checkpoints not confirmed:
- {list missing}
Run `/sdlc:plan` to complete planning first.
🚫 **No user stories found**
`docs/req/user-stories.md` is missing or empty.
Complete requirements elicitation in `/sdlc:plan` Stage 1-3.
🚫 **No API specification found**
`docs/arch/api/openapi.yaml` is missing.
Complete API Contract stage in `/sdlc:plan` Stage 6.
⚠️ **Quality gate failed**
DO NOT skip git hooks with `--no-verify`.
Fix the issue:
1. Read error message carefully
2. Make the required fix
3. Re-attempt commit/push
Error: {error message}
⚠️ **Test failure**
1. Read the failing test carefully
2. Check if test is correct (matches acceptance criteria)
3. Fix implementation to pass test
4. If test is wrong, fix test first, then implementation
Failing test: {test name}
When the user runs /sdlc:implement:
/sdlc:update after completing featuresAfter completing features:
/sdlc:update to sync progress with planning artifacts/sdlc:review to verify implementation matches design (API spec, ERD, domain model)/sdlc:qa to check quality thresholds (coverage, test quality, security)Implementation is progressing correctly when:
/sdlc:update syncs progress regularly