@kennethsolomon/shipkit 3.19.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -4
- package/package.json +1 -1
- package/skills/sk:brainstorming/SKILL.md +19 -128
- package/skills/sk:debug/SKILL.md +44 -111
- package/skills/sk:e2e/SKILL.md +45 -97
- package/skills/sk:features/SKILL.md +44 -99
- package/skills/sk:frontend-design/SKILL.md +16 -32
- package/skills/sk:laravel-init/SKILL.md +8 -7
- package/skills/sk:laravel-new/SKILL.md +1 -0
- package/skills/sk:lint/SKILL.md +42 -62
- package/skills/sk:mvp/SKILL.md +81 -134
- package/skills/sk:perf/SKILL.md +24 -43
- package/skills/sk:review/SKILL.md +57 -93
- package/skills/sk:security-check/SKILL.md +37 -43
- package/skills/sk:seo-audit/SKILL.md +75 -96
- package/skills/sk:setup-claude/SKILL.md +154 -0
- package/skills/sk:setup-claude/references/skill-profiles.md +223 -0
- package/skills/sk:setup-claude/scripts/__pycache__/apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +110 -10
- package/skills/sk:setup-claude/templates/.claude/rules/laravel.md.template +14 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +102 -247
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/security-check.md.template +1 -1
- package/skills/sk:setup-claude/templates/commands/write-plan.md.template +1 -1
- package/skills/sk:setup-claude/tests/__pycache__/test_apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +267 -0
- package/skills/sk:setup-optimizer/SKILL.md +101 -17
- package/skills/sk:skill-creator/SKILL.md +115 -226
- package/skills/sk:website/SKILL.md +81 -149
- package/skills/sk:write-tests/SKILL.md +44 -110
package/README.md
CHANGED
|
@@ -315,7 +315,7 @@ Agents are specialized sub-agents deployed to `.claude/agents/` by `/sk:setup-cl
|
|
|
315
315
|
| **1** (parallel) | lint + `security-reviewer` + `performance-optimizer` | Independent — run simultaneously |
|
|
316
316
|
| **2** | tests (100% coverage on new code) | Needs lint fixes first |
|
|
317
317
|
| **3** | `code-reviewer` (7-dimension) | Needs test confirmation |
|
|
318
|
-
| **4** | E2E (Playwright or agent-browser) | Uses scenarios from `qa-engineer` |
|
|
318
|
+
| **4** | E2E Tests (Playwright or agent-browser) | Uses scenarios from `qa-engineer` |
|
|
319
319
|
|
|
320
320
|
Each gate auto-fixes and re-runs until clean. One squash commit per gate pass. If a gate fails 3 times it stops and asks for help. Pre-existing issues are logged to `tasks/tech-debt.md` — never fixed inline.
|
|
321
321
|
|
|
@@ -365,14 +365,24 @@ Rule files in `.claude/rules/` auto-activate in Claude Code when you edit matchi
|
|
|
365
365
|
|
|
366
366
|
## MCP Servers
|
|
367
367
|
|
|
368
|
-
|
|
368
|
+
### Global (opt-in, installed to `~/.mcp.json`)
|
|
369
|
+
|
|
370
|
+
Installed by `/sk:setup-claude` and `/sk:setup-optimizer` when you opt in.
|
|
369
371
|
|
|
370
372
|
| Server | What it does | Best for |
|
|
371
373
|
|---|---|---|
|
|
372
374
|
| **Sequential Thinking** | Structured reasoning scratchpad — Claude thinks through hard problems step-by-step without cluttering the conversation | `/sk:brainstorm`, `/sk:debug`, `/sk:review` |
|
|
373
|
-
| **
|
|
375
|
+
| **context7** | Fetches current, version-accurate docs for libraries you're using — no stale API suggestions | React 19, Next.js 15, Tailwind v4, shadcn/ui |
|
|
374
376
|
| **ccstatusline** | Persistent statusline: context window %, model, git branch, current task | Every session |
|
|
375
377
|
|
|
378
|
+
### Project-level (stack-conditional, installed to `.mcp.json`)
|
|
379
|
+
|
|
380
|
+
Added/removed automatically based on detected stack. No opt-in required.
|
|
381
|
+
|
|
382
|
+
| Server | Stack | What it does |
|
|
383
|
+
|---|---|---|
|
|
384
|
+
| **laravel-boost** | Laravel | Database schema, read-only queries, docs search (version-matched), application logs, browser errors, last exception, Eloquent model list |
|
|
385
|
+
|
|
376
386
|
---
|
|
377
387
|
|
|
378
388
|
## On-Demand Tools
|
|
@@ -431,12 +441,34 @@ Use these anytime outside of the main workflow.
|
|
|
431
441
|
|
|
432
442
|
| Area | Supported |
|
|
433
443
|
|---|---|
|
|
434
|
-
| **Frameworks** | Laravel, Next.js, Nuxt, React, Vue, Node.js |
|
|
444
|
+
| **Frameworks** | Laravel, Next.js, Nuxt, React, Vue, Node.js, Go, Rust, Python, Rails |
|
|
435
445
|
| **Linters** | Pint, ESLint, PHPStan, Rector, Prettier, Biome |
|
|
436
446
|
| **Test runners** | Pest, PHPUnit, Jest, Vitest, Playwright |
|
|
437
447
|
| **Schema / ORM** | Prisma, Drizzle, Eloquent, SQLAlchemy, ActiveRecord |
|
|
438
448
|
| **Release** | npm, Composer, iOS (App Store), Android (Play Store) |
|
|
439
449
|
|
|
450
|
+
### Stack-Aware Skill Filtering
|
|
451
|
+
|
|
452
|
+
When you run `/sk:setup-claude`, ShipKit auto-detects your project's stack and installs only the skills, agents, and rules relevant to that stack at the project level (`.claude/skills/`, `.claude/agents/`, `.claude/rules/`).
|
|
453
|
+
|
|
454
|
+
For example, a **Next.js** project gets web skills (frontend-design, accessibility, seo-audit) but not Laravel skills. A **mobile** project skips Playwright E2E and SEO audits.
|
|
455
|
+
|
|
456
|
+
Detection is automatic — no config needed. To override:
|
|
457
|
+
|
|
458
|
+
```json
|
|
459
|
+
// .shipkit/config.json
|
|
460
|
+
{
|
|
461
|
+
"skills": {
|
|
462
|
+
"extra": ["sk:schema-migrate"], // force-add skills
|
|
463
|
+
"disabled": ["sk:website"] // force-remove skills
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Run `/sk:setup-optimizer` to re-detect and sync when your stack changes (e.g., adding a database ORM later). ShipKit also suggests activating relevant skills when it detects code changes in disabled skill domains.
|
|
469
|
+
|
|
470
|
+
See [skill-profiles.md](skills/sk:setup-claude/references/skill-profiles.md) for the full mapping of skills/agents/rules per stack.
|
|
471
|
+
|
|
440
472
|
---
|
|
441
473
|
|
|
442
474
|
## All Commands
|
package/package.json
CHANGED
|
@@ -6,132 +6,35 @@ allowed-tools: Read, Write, Glob, Grep, Bash, Agent
|
|
|
6
6
|
|
|
7
7
|
# Brainstorming Ideas Into Designs
|
|
8
8
|
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
12
|
-
|
|
13
|
-
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
14
|
-
|
|
15
9
|
<HARD-GATE>
|
|
16
|
-
Do NOT invoke any implementation skill, write any code, scaffold
|
|
10
|
+
Do NOT invoke any implementation skill, write any code, or scaffold until the user approves the design. Every project — no matter how simple — goes through this process. The design can be short, but it MUST be presented and approved.
|
|
17
11
|
</HARD-GATE>
|
|
18
12
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
22
|
-
|
|
23
|
-
## Checklist
|
|
24
|
-
|
|
25
|
-
You MUST create a task for each of these items and complete them in order:
|
|
26
|
-
|
|
27
|
-
1. **Explore project context** — read `tasks/findings.md` and `tasks/lessons.md` if they exist, then check files, docs, recent commits
|
|
28
|
-
2. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
29
|
-
3. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
30
|
-
4. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
31
|
-
5. **Write findings** — Save the agreed-upon direction to `tasks/findings.md`:
|
|
32
|
-
- Problem statement
|
|
33
|
-
- Key decisions made
|
|
34
|
-
- Chosen approach + rationale
|
|
35
|
-
- Open questions (if any remain)
|
|
36
|
-
Additionally, **append** an ADR entry to `docs/decisions.md` (see "Decisions Log" section below).
|
|
37
|
-
(Optionally also write a full design doc to docs/plans/YYYY-MM-DD-<topic>-design.md)
|
|
38
|
-
6. **Transition to implementation** — invoke `/sk:write-plan` skill to create implementation plan
|
|
39
|
-
|
|
40
|
-
## Process Flow
|
|
41
|
-
|
|
42
|
-
```dot
|
|
43
|
-
digraph brainstorming {
|
|
44
|
-
"Explore project context" [shape=box];
|
|
45
|
-
"Ask clarifying questions" [shape=box];
|
|
46
|
-
"Propose 2-3 approaches" [shape=box];
|
|
47
|
-
"Present design sections" [shape=box];
|
|
48
|
-
"User approves design?" [shape=diamond];
|
|
49
|
-
"Write design doc" [shape=box];
|
|
50
|
-
"Invoke `/sk:write-plan` skill" [shape=doublecircle];
|
|
51
|
-
|
|
52
|
-
"Explore project context" -> "Ask clarifying questions";
|
|
53
|
-
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
54
|
-
"Propose 2-3 approaches" -> "Present design sections";
|
|
55
|
-
"Present design sections" -> "User approves design?";
|
|
56
|
-
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
57
|
-
"User approves design?" -> "Write design doc" [label="yes"];
|
|
58
|
-
"Write design doc" -> "Invoke `/sk:write-plan` skill";
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**The terminal state is invoking `/sk:write-plan`.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is `/sk:write-plan`.
|
|
63
|
-
|
|
64
|
-
## The Process
|
|
65
|
-
|
|
66
|
-
**Understanding the idea:**
|
|
67
|
-
- If `tasks/findings.md` exists and has content, read it in full. Summarize the prior
|
|
68
|
-
decisions to the user and ask: extend, revise, or start fresh? Do not re-explore
|
|
69
|
-
what is already decided unless the user asks.
|
|
70
|
-
- If `tasks/lessons.md` exists, read it in full. Apply every active lesson as a design
|
|
71
|
-
constraint throughout the brainstorm — particularly prevention rules when proposing approaches.
|
|
72
|
-
- Check out the current project state first (files, docs, recent commits)
|
|
73
|
-
- Ask questions one at a time to refine the idea
|
|
74
|
-
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
75
|
-
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
76
|
-
- Focus on understanding: purpose, constraints, success criteria
|
|
77
|
-
|
|
78
|
-
**Architecture Assessment (before proposing approaches — complex tasks only):**
|
|
79
|
-
|
|
80
|
-
After exploring the project context, check if this task is architecturally complex:
|
|
81
|
-
- Does it span multiple systems, services, or bounded contexts?
|
|
82
|
-
- Does it require decisions about data modeling, API contracts, or system boundaries?
|
|
83
|
-
- Does it involve 3+ major components being added or changed?
|
|
84
|
-
- Does it touch auth, billing, or other sensitive infrastructure?
|
|
85
|
-
|
|
86
|
-
If YES to any of the above, invoke the **`architect` agent** before proposing approaches:
|
|
87
|
-
> Task: "Read tasks/findings.md, tasks/lessons.md, tasks/tech-debt.md, and explore the relevant code areas. Propose 2-3 architecturally sound approaches for [task description] with explicit trade-offs. Read-only — no code."
|
|
13
|
+
## Steps
|
|
88
14
|
|
|
89
|
-
|
|
15
|
+
1. **Explore context** — read `tasks/findings.md` and `tasks/lessons.md` if they exist. Summarize prior decisions; ask extend/revise/fresh? Do not re-explore what is already decided. Apply every active lesson as a design constraint. Check files, docs, recent commits.
|
|
16
|
+
2. **Ask clarifying questions** — one per message, prefer multiple choice. Focus on purpose, constraints, success criteria.
|
|
17
|
+
3. **Architecture assessment** (complex tasks only) — if task spans multiple systems, requires data modeling/API contracts, 3+ components, or touches auth/billing: invoke the `architect` agent with: "Read tasks/findings.md, tasks/lessons.md, tasks/tech-debt.md, explore relevant code. Propose 2-3 architecturally sound approaches for [task] with trade-offs. Read-only." Incorporate into step 5.
|
|
18
|
+
4. **Search-First Research** — before proposing approaches:
|
|
90
19
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
20
|
+
| Check | Action | Decision |
|
|
21
|
+
|-------|--------|----------|
|
|
22
|
+
| Grep codebase | Similar functionality exists? | **Adopt** (90%+) · **Extend** (60-90%) · **Build** (<60%) |
|
|
23
|
+
| Package registries | Well-maintained package? | Include as approach option |
|
|
24
|
+
| Existing skills/MCPs | ShipKit skill handles this? | Include as approach option |
|
|
96
25
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
If a suitable package or existing solution is found, include it as one of the approaches.
|
|
103
|
-
|
|
104
|
-
**Exploring approaches:**
|
|
105
|
-
- Propose 2-3 different approaches with trade-offs
|
|
106
|
-
- Present options conversationally with your recommendation and reasoning
|
|
107
|
-
- Lead with your recommended option and explain why
|
|
108
|
-
|
|
109
|
-
**Presenting the design:**
|
|
110
|
-
- Once you believe you understand what you're building, present the design
|
|
111
|
-
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
112
|
-
- Ask after each section whether it looks right so far
|
|
113
|
-
- Cover: architecture, components, data flow, error handling, testing
|
|
114
|
-
- Be ready to go back and clarify if something doesn't make sense
|
|
115
|
-
|
|
116
|
-
## After the Design
|
|
117
|
-
|
|
118
|
-
**Documentation:**
|
|
119
|
-
- Write the findings to `tasks/findings.md` (required — captures problem, decisions, approach, rationale)
|
|
120
|
-
- Append an ADR entry to `docs/decisions.md` (required — see "Decisions Log" section below)
|
|
121
|
-
- Optionally: Create a full design doc at `docs/plans/YYYY-MM-DD-<topic>-design.md` for complex projects
|
|
122
|
-
- Commit the findings, decisions log entry, and any design document to git
|
|
123
|
-
|
|
124
|
-
**Implementation:**
|
|
125
|
-
- Invoke the `/sk:write-plan` skill to create a detailed implementation plan
|
|
126
|
-
- Do NOT invoke any other skill. `/sk:write-plan` is the next step.
|
|
26
|
+
5. **Propose 2-3 approaches** — with trade-offs; lead with recommendation and reasoning.
|
|
27
|
+
6. **Present design** — scale each section to complexity. Ask after each section. Cover: architecture, components, data flow, error handling, testing.
|
|
28
|
+
7. **Write findings** — save to `tasks/findings.md` (problem statement, decisions, approach + rationale, open questions). Append ADR to `docs/decisions.md` (see below). Optionally: `docs/plans/YYYY-MM-DD-<topic>-design.md`. Commit all.
|
|
29
|
+
8. **Transition** — invoke `/sk:write-plan`. Do NOT invoke any other skill.
|
|
127
30
|
|
|
128
31
|
## Decisions Log
|
|
129
32
|
|
|
130
|
-
After writing findings
|
|
33
|
+
After writing findings, **append** an ADR entry to `docs/decisions.md`. This file is **cumulative and append-only** — never overwrite or remove existing entries.
|
|
131
34
|
|
|
132
35
|
### If `docs/decisions.md` does not exist
|
|
133
36
|
|
|
134
|
-
Create it with this header
|
|
37
|
+
Create it with this header first:
|
|
135
38
|
|
|
136
39
|
```markdown
|
|
137
40
|
# Architecture Decision Records
|
|
@@ -141,8 +44,6 @@ A cumulative log of key design decisions made across features. Append-only — n
|
|
|
141
44
|
|
|
142
45
|
### ADR Entry Format
|
|
143
46
|
|
|
144
|
-
Append this template for each brainstorm decision:
|
|
145
|
-
|
|
146
47
|
```markdown
|
|
147
48
|
## [YYYY-MM-DD] [Feature/Task Name]
|
|
148
49
|
|
|
@@ -155,19 +56,9 @@ Append this template for each brainstorm decision:
|
|
|
155
56
|
|
|
156
57
|
### Rules
|
|
157
58
|
|
|
158
|
-
- **Append-only** — never edit or delete existing entries
|
|
59
|
+
- **Append-only** — never edit or delete existing entries
|
|
159
60
|
- **One entry per brainstorm** — each completed brainstorm adds exactly one ADR entry
|
|
160
|
-
- **
|
|
161
|
-
- Entries accumulate across features — this is a project-level historical record
|
|
162
|
-
|
|
163
|
-
## Key Principles
|
|
164
|
-
|
|
165
|
-
- **One question at a time** - Don't overwhelm with multiple questions
|
|
166
|
-
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
167
|
-
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
168
|
-
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
169
|
-
- **Incremental validation** - Present design, get approval before moving on
|
|
170
|
-
- **Be flexible** - Go back and clarify when something doesn't make sense
|
|
61
|
+
- **Absolute dates only** — always `YYYY-MM-DD`
|
|
171
62
|
|
|
172
63
|
---
|
|
173
64
|
|
package/skills/sk:debug/SKILL.md
CHANGED
|
@@ -5,22 +5,18 @@ description: "Structured bug investigation: reproduce, isolate, hypothesize, ver
|
|
|
5
5
|
|
|
6
6
|
# Structured Debugging Workflow
|
|
7
7
|
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Systematic bug investigation that follows a disciplined process: reproduce, isolate, hypothesize, verify, fix. Every finding is logged to prevent repeated work and build project knowledge.
|
|
11
|
-
|
|
12
8
|
<HARD-GATE>
|
|
13
9
|
Do NOT jump to fixing code before you understand the bug. No code changes until a hypothesis is CONFIRMED through systematic investigation. Random fixes waste time and mask root causes.
|
|
14
10
|
</HARD-GATE>
|
|
15
11
|
|
|
16
|
-
## Anti-Patterns
|
|
12
|
+
## Anti-Patterns
|
|
17
13
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
14
|
+
- Changing code before understanding — read and analyze first
|
|
15
|
+
- Trying random fixes — "maybe if I change this..." is not debugging
|
|
16
|
+
- Ignoring stack traces — they tell you exactly where to look
|
|
17
|
+
- Fixing symptoms, not causes — a try/catch around a crash is not a fix
|
|
18
|
+
- Skipping reproduction — if you can't reproduce it, you can't verify the fix
|
|
19
|
+
- Debugging in production — reproduce locally first
|
|
24
20
|
|
|
25
21
|
## Allowed Tools
|
|
26
22
|
|
|
@@ -49,36 +45,32 @@ If `debugger` agent hits a 3-strike failure, fall back to manual steps below.
|
|
|
49
45
|
|
|
50
46
|
## Steps
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
Complete these steps in order:
|
|
53
49
|
|
|
54
50
|
### 1. Gather Information
|
|
55
51
|
|
|
56
52
|
Parse what the user tells you:
|
|
57
53
|
|
|
58
|
-
- **Error message
|
|
59
|
-
- **Stack trace
|
|
60
|
-
- **Expected vs actual
|
|
61
|
-
- **Trigger conditions
|
|
62
|
-
- **Recent changes
|
|
54
|
+
- **Error message** — exact error text
|
|
55
|
+
- **Stack trace** — file, line, and call chain
|
|
56
|
+
- **Expected vs actual** — what should happen vs what does happen
|
|
57
|
+
- **Trigger conditions** — always, sometimes, under specific conditions?
|
|
58
|
+
- **Recent changes** — did it work before? what changed?
|
|
63
59
|
|
|
64
|
-
If
|
|
60
|
+
If insufficient information, ask specific questions — don't guess.
|
|
65
61
|
|
|
66
62
|
### 2. Read Project Context
|
|
67
63
|
|
|
68
|
-
Check for existing knowledge:
|
|
69
|
-
|
|
70
64
|
```
|
|
71
|
-
CLAUDE.md
|
|
72
|
-
tasks/findings.md
|
|
73
|
-
tasks/lessons.md
|
|
74
|
-
tasks/progress.md
|
|
65
|
+
CLAUDE.md — project conventions, known issues
|
|
66
|
+
tasks/findings.md — previous debugging sessions, known bugs
|
|
67
|
+
tasks/lessons.md — patterns that caused issues before
|
|
68
|
+
tasks/progress.md — recent work log and error log
|
|
75
69
|
```
|
|
76
70
|
|
|
77
|
-
**If `tasks/lessons.md` exists, read it in full.** For each active lesson, apply its prevention rule
|
|
71
|
+
**If `tasks/lessons.md` exists, read it in full.** For each active lesson, apply its prevention rule — treat lessons as standing constraints, not just history.
|
|
78
72
|
|
|
79
|
-
**If `tasks/progress.md` exists**, scan the Error Log for failures near the bug's reported time — they often share a root cause
|
|
80
|
-
|
|
81
|
-
Check if this bug (or something similar) has been investigated before.
|
|
73
|
+
**If `tasks/progress.md` exists**, scan the Error Log for failures near the bug's reported time — they often share a root cause.
|
|
82
74
|
|
|
83
75
|
### 3. Check Recent Changes
|
|
84
76
|
|
|
@@ -91,55 +83,19 @@ Correlate the bug timeline with recent changes. Did the bug start after a specif
|
|
|
91
83
|
|
|
92
84
|
### 4. Reproduce the Bug
|
|
93
85
|
|
|
94
|
-
**
|
|
95
|
-
|
|
96
|
-
#### A. Server / CLI / Non-Browser Bug
|
|
97
|
-
|
|
98
|
-
Run the specific command, test, or action that triggers the bug. Capture the full output.
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Run the failing test/command
|
|
102
|
-
[specific command that triggers the bug]
|
|
103
|
-
```
|
|
86
|
+
**A. Server / CLI / Non-Browser Bug** — run the specific command, test, or action that triggers the bug. Capture the full output.
|
|
104
87
|
|
|
105
|
-
|
|
88
|
+
**B. Browser / UI Bug** — use the Playwright MCP plugin:
|
|
106
89
|
|
|
107
|
-
|
|
90
|
+
1. Navigate: `mcp__plugin_playwright_playwright__browser_navigate({ url: "http://localhost:[PORT]/[path]" })`
|
|
91
|
+
2. JS errors: `mcp__plugin_playwright_playwright__browser_console_messages({ level: "error" })`
|
|
92
|
+
3. Network failures: `mcp__plugin_playwright_playwright__browser_network_requests({ includeStatic: false })`
|
|
93
|
+
4. Screenshot: `mcp__plugin_playwright_playwright__browser_take_screenshot({ type: "png" })`
|
|
94
|
+
5. DOM snapshot: `mcp__plugin_playwright_playwright__browser_snapshot()`
|
|
108
95
|
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
mcp__plugin_playwright_playwright__browser_navigate({ url: "http://localhost:[PORT]/[path]" })
|
|
112
|
-
```
|
|
96
|
+
Use console errors and network failures as primary evidence in Step 6.
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
mcp__plugin_playwright_playwright__browser_console_messages({ level: "error" })
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
3. **Inspect failed network requests** (useful for API/fetch failures):
|
|
120
|
-
```
|
|
121
|
-
mcp__plugin_playwright_playwright__browser_network_requests({ includeStatic: false })
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
4. **Screenshot the visual state** to document what the bug looks like:
|
|
125
|
-
```
|
|
126
|
-
mcp__plugin_playwright_playwright__browser_take_screenshot({ type: "png" })
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
5. **Capture accessibility snapshot** for structural/DOM-level inspection:
|
|
130
|
-
```
|
|
131
|
-
mcp__plugin_playwright_playwright__browser_snapshot()
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Use the console errors and network failures as primary evidence in Step 6 (Hypotheses).
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
If you cannot reproduce (either path):
|
|
139
|
-
- Check environment differences
|
|
140
|
-
- Check for race conditions or timing issues
|
|
141
|
-
- Ask the user for exact reproduction steps
|
|
142
|
-
- Do NOT proceed to fixing without reproduction
|
|
98
|
+
If you cannot reproduce (either path): check environment differences, check for race conditions, ask for exact reproduction steps. Do NOT proceed to fixing without reproduction.
|
|
143
99
|
|
|
144
100
|
### 5. Isolate the Problem
|
|
145
101
|
|
|
@@ -147,20 +103,12 @@ Read the relevant code, tracing the execution path:
|
|
|
147
103
|
|
|
148
104
|
1. Start at the error location (from stack trace)
|
|
149
105
|
2. Trace backward through the call chain
|
|
150
|
-
3. Identify
|
|
106
|
+
3. Identify inputs and state at each step
|
|
151
107
|
4. Find where actual behavior diverges from expected
|
|
152
108
|
|
|
153
|
-
Use targeted searches:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
# Find related code
|
|
157
|
-
grep -r "functionName" src/
|
|
158
|
-
grep -r "ERROR_CODE" .
|
|
159
|
-
```
|
|
160
|
-
|
|
161
109
|
### 6. Form Hypotheses
|
|
162
110
|
|
|
163
|
-
Generate 2-3 ranked hypotheses
|
|
111
|
+
Generate 2-3 ranked hypotheses and log to `tasks/findings.md`:
|
|
164
112
|
|
|
165
113
|
```markdown
|
|
166
114
|
## Hypotheses
|
|
@@ -178,28 +126,21 @@ Generate 2-3 ranked hypotheses based on your investigation:
|
|
|
178
126
|
- Test: how to confirm or reject
|
|
179
127
|
```
|
|
180
128
|
|
|
181
|
-
Log these to `tasks/findings.md` under a dated heading.
|
|
182
|
-
|
|
183
129
|
### 7. Test Hypotheses Systematically
|
|
184
130
|
|
|
185
|
-
For each hypothesis
|
|
131
|
+
For each hypothesis (most likely first):
|
|
186
132
|
|
|
187
133
|
1. Design a specific diagnostic step (not a fix)
|
|
188
134
|
2. Execute it and observe the result
|
|
189
|
-
3. Update
|
|
135
|
+
3. Update status: **CONFIRMED** / **REJECTED** / **PARTIAL**
|
|
190
136
|
|
|
191
|
-
Diagnostic steps
|
|
192
|
-
- Adding a temporary log statement to check a value
|
|
193
|
-
- Running with different inputs
|
|
194
|
-
- Checking database state
|
|
195
|
-
- Inspecting environment variables
|
|
196
|
-
- Running a minimal reproduction
|
|
137
|
+
Diagnostic steps: add a temporary log statement, run with different inputs, check database state, inspect environment variables, run a minimal reproduction.
|
|
197
138
|
|
|
198
139
|
**Do NOT change production code during this phase.** Diagnostic changes only.
|
|
199
140
|
|
|
200
141
|
### 8. Update Findings
|
|
201
142
|
|
|
202
|
-
Update `tasks/findings.md
|
|
143
|
+
Update `tasks/findings.md`:
|
|
203
144
|
|
|
204
145
|
```markdown
|
|
205
146
|
### [Date] Bug: [brief description]
|
|
@@ -212,24 +153,12 @@ Update `tasks/findings.md` with results:
|
|
|
212
153
|
|
|
213
154
|
### 9. Propose Minimal Fix
|
|
214
155
|
|
|
215
|
-
Once a hypothesis is confirmed, propose the smallest possible fix
|
|
156
|
+
Once a hypothesis is confirmed, propose the smallest possible fix — change as few lines as possible, don't refactor surrounding code, don't add "while I'm here" improvements. Explain why the fix addresses the root cause.
|
|
216
157
|
|
|
217
|
-
|
|
218
|
-
- Don't refactor surrounding code
|
|
219
|
-
- Don't add "while I'm here" improvements
|
|
220
|
-
- Explain why this fix addresses the root cause
|
|
221
|
-
|
|
222
|
-
Present the fix and **wait for user approval** before applying.
|
|
158
|
+
**Wait for user approval before applying.**
|
|
223
159
|
|
|
224
160
|
### 10. Verify Fix + Regression Check
|
|
225
161
|
|
|
226
|
-
After the fix is applied:
|
|
227
|
-
|
|
228
|
-
1. Re-run the original reproduction steps — bug should be gone
|
|
229
|
-
2. Run the full test suite — no new failures
|
|
230
|
-
3. If there was a related test, confirm it passes
|
|
231
|
-
4. If there was no test, suggest writing one (reference `/sk:write-tests`)
|
|
232
|
-
|
|
233
162
|
```bash
|
|
234
163
|
# Verify the specific fix
|
|
235
164
|
[reproduction command]
|
|
@@ -238,12 +167,16 @@ After the fix is applied:
|
|
|
238
167
|
[test suite command]
|
|
239
168
|
```
|
|
240
169
|
|
|
170
|
+
1. Re-run the original reproduction steps — bug should be gone
|
|
171
|
+
2. Run the full test suite — no new failures
|
|
172
|
+
3. If there was a related test, confirm it passes
|
|
173
|
+
4. If there was no test, suggest writing one (reference `/sk:write-tests`)
|
|
174
|
+
|
|
241
175
|
### 11. Document
|
|
242
176
|
|
|
243
|
-
|
|
244
|
-
Update the entry from step 8 with the final resolution.
|
|
177
|
+
**`tasks/findings.md`** — update the entry from step 8 with the final resolution.
|
|
245
178
|
|
|
246
|
-
|
|
179
|
+
**`tasks/lessons.md`** (only if the pattern could recur):
|
|
247
180
|
|
|
248
181
|
```markdown
|
|
249
182
|
### [Date] Lesson: [brief title]
|