sdlc
Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing, releasing, publishing, and deploying. Use this skill when implementing, fixing, refactoring, testing, adding features, building new code, or releasing/publishing/deploying.
BaseInfinity · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add BaseInfinity/claude-sdlc-harness --skill sdlc技能说明
name: sdlc description: Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing, releasing, publishing, and deploying. Use this skill when implementing, fixing, refactoring, testing, adding features, building new code, or releasing/publishing/deploying. argument-hint: "[task description]"
SDLC Skill - Full Development Workflow
Skill source & precedence
Loaded from repo-local .claude/skills/sdlc/SKILL.md, which wins over global ~/.claude/skills/ — the project's authoritative contract. Global is for cross-repo tooling only. Unsure which is active? head -5 both.
Task
$ARGUMENTS
Operational checklist — complete on its own. Full protocol (optional depth, Claude Code installs only): CLAUDE_CODE_SDLC_WIZARD.md; if absent, do not hunt for it.
If the user requests /sdlc, ALWAYS run the full workflow — even for mechanical tasks. Never silently skip; if overkill, say so and ask.
Full SDLC Checklist
Your FIRST action must be a task list covering every phase below — TodoWrite, or TaskCreate where that is what your harness exposes. Compact form (omit activeForm to use the subject as the spinner label):
TodoWrite([
// PLANNING
{ content: "Find and read relevant documentation", status: "in_progress" },
{ content: "Assess doc health - flag issues (ask before cleaning)", status: "pending" },
{ content: "DRY scan: What patterns exist to reuse? New pattern = get approval", status: "pending" },
{ content: "Prove It Gate: adding new component? Research alternatives, prove quality with tests", status: "pending" },
{ content: "Blast radius: What depends on code I'm changing?", status: "pending" },
{ content: "Design system check (if UI change)", status: "pending" },
{ content: "Scope card BEFORE work: one issue, acceptance criteria, allowed paths, exclusions, risk tier, estimated diff", status: "pending" },
{ content: "Scrutinize test design - right things tested? Follow TESTING.md?", status: "pending" },
{ content: "Present approach + STATE CONFIDENCE LEVEL", status: "pending" },
{ content: "Signal ready - user exits plan mode", status: "pending" },
// TRANSITION
{ content: "Doc sync: update or create feature doc — MUST be current before commit", status: "pending" },
// IMPLEMENTATION
{ content: "TDD RED: failing test FIRST where a RED mutation is writable — watch EACH assertion fail; otherwise three-way call (see TDD proves)", status: "pending" },
{ content: "TDD GREEN: Implement, verify test passes", status: "pending" },
{ content: "Adding a guard? Name the requested behavior or field it binds to — if none, DO NOT ADD IT, file it (#617)", status: "pending" },
{ content: "Run lint/typecheck", status: "pending" },
{ content: "Run ALL tests", status: "pending" },
{ content: "Production build check", status: "pending" },
// REVIEW
{ content: "DRY check: Is logic duplicated elsewhere?", status: "pending" },
{ content: "Visual consistency check (if UI change)", status: "pending" },
{ content: "Security review (if warranted)", status: "pending" },
{ content: "Cross-model review (high-stakes)", status: "pending" },
{ content: "Scope guard: only changes related to task? No legacy/fallback code left?", status: "pending" },
// CI SHEPHERD
{ content: "Commit and push to remote", status: "pending" },
{ content: "Watch CI - fix failures, iterate until green (max 2x)", status: "pending" },
{ content: "Read CI review - implement valid suggestions, iterate until clean", status: "pending" },
{ content: "Meta-repo only: run local shepherd if PR needs E2E score (optional)", status: "pending" },
{ content: "Post-deploy verification (if deploy task)", status: "pending" },
// FINAL
{ content: "Present summary: changes, tests, CI status", status: "pending" },
{ content: "Capture learnings (TESTING.md, CLAUDE.md, or feature docs)", status: "pending" },
{ content: "Close out plan files: mark complete or delete", status: "pending" }
])
SDLC Quality Checklist (Scoring Rubric)
| Criterion | Points | Critical? | What Counts |
|---|---|---|---|
| task_tracking | 1 | Use TodoWrite or TaskCreate | |
| confidence | 1 | State HIGH/MEDIUM/LOW | |
| tdd_red | 2 | YES | Write/edit test files BEFORE implementation files, where a RED mutation is writable (see TDD proves) |
| plan_mode_outline | 1 | Outline steps before coding | |
| plan_mode_tool | 1 | Use TodoWrite/TaskCreate/EnterPlanMode | |
| tdd_green_ran | 1 | Run tests, show runner output | |
| tdd_green_pass | 1 | All tests pass in final run | |
| self_review | 1 | Read back files/diffs you modified | |
| clean_code | 1 | One coherent approach, no dead code |
Total: 10 points (11 for UI tasks, +1 for design_system check). Critical miss on tdd_red = process failure regardless of total score — when a RED mutation was writable. Out-of-scope under the three-way call is not a miss.
Test Failure Recovery
ALL TESTS MUST PASS. NO EXCEPTIONS. Test code is app code. Failures are bugs — investigate them like a 15-year SDET, not by brushing aside.
Not acceptable: "those were already failing", "not related to my changes", "it's flaky" (flaky = bug we haven't found yet).
When tests fail:
- Identify which test(s) failed
- Diagnose WHY: your code broke it (regression — fix code), test is for deleted code (delete test), test has wrong assertions (fix test), "flaky" (investigate — race, shared state, env)
- Fix appropriately, run specific test individually first, then run ALL tests
- Still failing after 2 attempts? Escalate (see Confidence Check) — not straight to the user
Confidence Check (REQUIRED)
State your confidence before presenting an approach:
| Level | Meaning | Action | Effort |
|---|---|---|---|
| HIGH (90%+) | Know exactly what to do | Present, proceed after approval | Model default |
| MEDIUM (60-89%) | Solid approach, some uncertainty | Present, |