Skip to content

Commit 3a239d4

Browse files
committed
Update debug skill
1 parent becaea1 commit 3a239d4

File tree

6 files changed

+136
-20
lines changed

6 files changed

+136
-20
lines changed

.claude/skills/dev-lifecycle/SKILL.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: dev-lifecycle
3-
description: Full software development lifecycle workflow covering requirements, design, planning, implementation, testing, and code review. Use this skill when a user wants to build a new feature end-to-end, clarify or document requirements, review requirements or design docs, execute a feature plan, check implementation against design, perform code review, or write tests. Triggers on requests like "new feature", "add requirement", "review requirements", "review design", "execute plan", "check implementation", "code review", "write tests", or any structured SDLC workflow.
3+
description: Full software development lifecycle workflow covering requirements, design, planning, implementation, planning updates, testing, and code review. Use this skill when a user wants to build a new feature end-to-end, clarify or document requirements, review requirements or design docs, execute a feature plan, update planning after task completion, check implementation against design, perform code review, or write tests. Triggers on requests like "new feature", "add requirement", "review requirements", "review design", "execute plan", "update planning", "check implementation", "code review", "write tests", or any structured SDLC workflow.
44
---
55

66
# Dev Lifecycle
@@ -15,21 +15,23 @@ Structured development lifecycle from requirements through testing. Each phase p
1515
| 2 | **Review Requirements** | [references/review-requirements.md](references/review-requirements.md) | Requirements doc exists and needs validation |
1616
| 3 | **Review Design** | [references/review-design.md](references/review-design.md) | Design doc exists and needs validation |
1717
| 4 | **Execute Plan** | [references/execute-plan.md](references/execute-plan.md) | Planning doc exists and user is ready to implement |
18-
| 5 | **Check Implementation** | [references/check-implementation.md](references/check-implementation.md) | Code changes exist and need validation against design |
19-
| 6 | **Code Review** | [references/code-review.md](references/code-review.md) | Changes are ready for pre-push review |
20-
| 7 | **Write Tests** | [references/writing-test.md](references/writing-test.md) | Feature needs unit/integration/E2E tests |
18+
| 5 | **Update Planning** | [references/update-planning.md](references/update-planning.md) | A task was just completed; reconcile planning doc with progress |
19+
| 6 | **Check Implementation** | [references/check-implementation.md](references/check-implementation.md) | Code changes exist and need validation against design |
20+
| 7 | **Code Review** | [references/code-review.md](references/code-review.md) | Changes are ready for pre-push review |
21+
| 8 | **Write Tests** | [references/writing-test.md](references/writing-test.md) | Feature needs unit/integration/E2E tests |
2122

2223
## Phase Selection
2324

2425
1. If the user has no docs yet and wants to build something new → start at **Phase 1**.
2526
2. If requirements doc exists but hasn't been reviewed → **Phase 2**.
2627
3. If design doc exists but hasn't been reviewed → **Phase 3**.
2728
4. If planning doc exists and user says "implement" or "execute" → **Phase 4**.
28-
5. If code is written and user wants to verify against design → **Phase 5**.
29-
6. If code is ready to push → **Phase 6**.
30-
7. If user asks for tests at any point → **Phase 7**.
29+
5. After finishing any task in Phase 4, automatically run **Phase 5** to reconcile planning docs.
30+
6. If code is written and user wants to verify against design → **Phase 6**.
31+
7. If code is ready to push → **Phase 7**.
32+
8. If user asks for tests at any point → **Phase 8**.
3133

32-
When starting a new feature end-to-end, walk through phases 1→2→3→4→5→7→6 sequentially. Load only the reference file for the current phase.
34+
When starting a new feature end-to-end, walk through phases 1→2→3→4→(5 after each task)→6→8→7 sequentially. Load only the reference file for the current phase.
3335

3436
## Documentation Structure
3537

@@ -60,7 +62,6 @@ Each feature doc is created by copying the corresponding `README.md` template in
6062
These can be invoked at any point during the lifecycle:
6163

6264
- **Debug**: Structured debugging with root cause analysis before code changes.
63-
- **Update Planning**: Reconcile planning docs with current implementation progress.
6465
- **Simplify Implementation**: Analyze and reduce complexity in existing code.
6566
- **Capture Knowledge**: Document understanding of a code entry point.
6667
- **Remember**: Store reusable guidance in the knowledge memory service.

.claude/skills/dev-lifecycle/references/execute-plan.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ After each section, ask if new tasks were discovered. Capture in "New Work" list
6161

6262
## Step 8: Next Actions
6363

64-
Remind the user to:
65-
- Update `docs/ai/planning/feature-{name}.md` with new statuses
64+
After completing any task, immediately run **Update Planning** (Phase 5) to reconcile the planning doc.
65+
66+
Then remind the user to:
6667
- Sync related docs if decisions changed
67-
- Run **Check Implementation** (Phase 5) to validate against design
68-
- Run **Write Tests** (Phase 7) for coverage
69-
- Run **Code Review** (Phase 6) when ready for final review
68+
- Run **Check Implementation** (Phase 6) to validate against design
69+
- Run **Write Tests** (Phase 8) for coverage
70+
- Run **Code Review** (Phase 7) when ready for final review
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Phase 5: Update Planning
2+
3+
Reconcile current implementation progress with planning documentation after completing any task.
4+
5+
## Step 1: Gather Context
6+
7+
Ask for:
8+
- Feature/branch name and brief status
9+
- Tasks completed since last update
10+
- Any new tasks discovered
11+
- Current blockers or risks
12+
- Planning doc path (default `docs/ai/planning/feature-{name}.md`)
13+
14+
## Step 2: Review Planning Doc
15+
16+
- Summarize existing milestones and task breakdowns
17+
- Note expected sequencing and dependencies
18+
- Identify outstanding tasks in the plan
19+
20+
## Step 3: Reconcile Progress
21+
22+
For each planned task:
23+
- Mark status (done / in progress / blocked / not started)
24+
- Note actual work completed vs. planned scope
25+
- Record blockers or changes in approach
26+
- Identify tasks that were skipped or added
27+
28+
## Step 4: Update Task List
29+
30+
Produce an updated checklist:
31+
32+
```
33+
### Current Status: [Feature Name]
34+
35+
#### Done
36+
- [x] Task A - short note or link to commit/PR
37+
- [x] Task B
38+
39+
#### In Progress
40+
- [ ] Task C - waiting on [dependency]
41+
42+
#### Blocked
43+
- [ ] Task D - blocked by [issue/owner]
44+
45+
#### Newly Discovered Work
46+
- [ ] Task E - reason discovered
47+
- [ ] Task F - due by [date]
48+
```
49+
50+
## Step 5: Next Steps & Priorities
51+
52+
- Suggest the next 2-3 actionable tasks
53+
- Highlight risky areas needing attention
54+
- Recommend coordination (design changes, stakeholder sync, etc.)
55+
- List documentation updates needed
56+
57+
## Step 6: Summary for Planning Doc
58+
59+
Prepare a summary paragraph to copy into the planning doc, covering:
60+
- Current state and progress
61+
- Major risks/blockers
62+
- Upcoming focus items
63+
- Any changes to scope or timeline

.claude/skills/dev-lifecycle/scripts/phase-checklist.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ cat <<'OUT'
88
Dev Lifecycle Phase Checklist
99
=============================
1010
11-
1. [ ] New Requirement — Feature captured, docs structure created
11+
1. [ ] New Requirement — Feature captured, docs structure created
1212
2. [ ] Review Requirements — Requirements validated for completeness
13-
3. [ ] Review Design — Design reviewed, mermaid diagrams verified
14-
4. [ ] Execute Plan — Tasks executed from planning doc
15-
5. [ ] Check Implementation — Code validated against design
16-
6. [ ] Write Tests — Unit/integration/E2E tests added (100% target)
17-
7. [ ] Code Review — Pre-push review completed
13+
3. [ ] Review Design — Design reviewed, mermaid diagrams verified
14+
4. [ ] Execute Plan — Tasks executed from planning doc
15+
5. [ ] Update Planning — Planning doc reconciled after each task
16+
6. [ ] Check Implementation — Code validated against design
17+
7. [ ] Code Review — Pre-push review completed
18+
8. [ ] Write Tests — Unit/integration/E2E tests added (100% target)
1819
1920
Feature name:
2021
Planning doc:

skills/debug/SKILL.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: debug
3+
description: Guide structured debugging before code changes by clarifying expected behavior, reproducing issues, identifying likely root causes, and agreeing on a fix plan with validation steps. Use when users ask to debug bugs, investigate regressions, triage incidents, diagnose failing behavior, handle failing tests, analyze production incidents, investigate error spikes, or run root cause analysis (RCA).
4+
---
5+
6+
# Local Debugging Assistant
7+
8+
Debug with an evidence-first workflow before changing code.
9+
10+
## Hard Rule
11+
- Do not modify code until the user approves a selected fix plan.
12+
13+
## Workflow
14+
15+
1. Clarify
16+
- Restate observed vs expected behavior in one concise diff.
17+
- Confirm scope and measurable success criteria.
18+
19+
2. Reproduce
20+
- Capture minimal reproduction steps.
21+
- Capture environment fingerprint: runtime, versions, config flags, data sample, and platform.
22+
23+
3. Hypothesize and Test
24+
For each hypothesis, include:
25+
- Predicted evidence if true.
26+
- Disconfirming evidence if false.
27+
- Exact test command or check.
28+
- Prefer one-variable-at-a-time tests.
29+
30+
4. Plan
31+
- Present fix options with risks and verification steps.
32+
- Recommend one option and request approval.
33+
34+
## Validation
35+
- Confirm a pre-fix failing signal exists.
36+
- Confirm post-fix success and run nearby regression checks.
37+
- Summarize remaining risks and follow-ups.
38+
39+
## Output Template
40+
Use this response structure:
41+
- Observed vs Expected
42+
- Repro and Environment
43+
- Hypotheses and Tests
44+
- Options and Recommendation
45+
- Validation Plan and Results
46+
- Open Questions

skills/debug/agents/openai.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Debug Assistant"
3+
short_description: "Guide structured debugging before code changes"
4+
default_prompt: "Use $debug to investigate this issue step by step, produce fix options with risks and validation steps, and wait for confirmation before changing code."

0 commit comments

Comments
 (0)