clikit-plugin 0.2.45 → 0.2.46
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/AGENTS.md +69 -3
- package/README.md +128 -92
- package/command/commit.md +1 -1
- package/command/create.md +65 -8
- package/command/debug.md +1 -1
- package/command/design.md +183 -43
- package/command/handoff.md +1 -1
- package/command/import-plan.md +2 -2
- package/command/init.md +1 -1
- package/command/issue.md +3 -4
- package/command/pr.md +1 -1
- package/command/research.md +5 -7
- package/command/resume.md +1 -1
- package/command/ship.md +29 -32
- package/command/start.md +38 -27
- package/command/{status-beads.md → status.md} +2 -3
- package/command/verify.md +132 -48
- package/dist/.tsbuildinfo +1 -1
- package/dist/agents/index.d.ts +0 -0
- package/dist/agents/index.d.ts.map +0 -0
- package/dist/beads-context.test.d.ts +2 -0
- package/dist/beads-context.test.d.ts.map +1 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.d.ts.map +0 -0
- package/dist/cli.js +5 -0
- package/dist/cli.test.d.ts +0 -0
- package/dist/cli.test.d.ts.map +0 -0
- package/dist/clikit.schema.json +32 -11
- package/dist/clilog.test.d.ts +0 -0
- package/dist/clilog.test.d.ts.map +0 -0
- package/dist/commands/index.d.ts +0 -0
- package/dist/commands/index.d.ts.map +0 -0
- package/dist/config.d.ts +15 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.test.d.ts +0 -0
- package/dist/config.test.d.ts.map +0 -0
- package/dist/hooks/beads-context.d.ts +2 -0
- package/dist/hooks/beads-context.d.ts.map +1 -1
- package/dist/hooks/empty-message-sanitizer.d.ts +0 -0
- package/dist/hooks/empty-message-sanitizer.d.ts.map +0 -0
- package/dist/hooks/error-logger.d.ts +0 -0
- package/dist/hooks/error-logger.d.ts.map +0 -0
- package/dist/hooks/git-guard.d.ts +0 -0
- package/dist/hooks/git-guard.d.ts.map +0 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/memory-digest.d.ts +1 -0
- package/dist/hooks/memory-digest.d.ts.map +1 -1
- package/dist/hooks/security-check.d.ts +0 -0
- package/dist/hooks/security-check.d.ts.map +0 -0
- package/dist/hooks/subagent-question-blocker.d.ts +0 -0
- package/dist/hooks/subagent-question-blocker.d.ts.map +0 -0
- package/dist/hooks/todo-beads-sync.d.ts +1 -0
- package/dist/hooks/todo-beads-sync.d.ts.map +1 -1
- package/dist/hooks/todo-enforcer.d.ts +1 -1
- package/dist/hooks/todo-enforcer.d.ts.map +1 -1
- package/dist/hooks/truncator.d.ts +0 -0
- package/dist/hooks/truncator.d.ts.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +250 -576
- package/dist/skills/index.d.ts +0 -0
- package/dist/skills/index.d.ts.map +0 -0
- package/dist/tools/cass-memory.d.ts +0 -0
- package/dist/tools/cass-memory.d.ts.map +0 -0
- package/dist/tools/context-summary.d.ts +0 -0
- package/dist/tools/context-summary.d.ts.map +0 -0
- package/dist/tools/index.d.ts +0 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/memory-db.d.ts +0 -0
- package/dist/tools/memory-db.d.ts.map +0 -0
- package/dist/tools/memory.d.ts +0 -0
- package/dist/tools/memory.d.ts.map +0 -0
- package/dist/tools/observation.d.ts +0 -0
- package/dist/tools/observation.d.ts.map +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.d.ts.map +0 -0
- package/memory/_digest.md +1 -1
- package/memory/_templates/handoff.md +0 -0
- package/memory/_templates/plan.md +35 -0
- package/memory/_templates/prd.md +0 -0
- package/memory/_templates/research.md +0 -0
- package/memory/_templates/review.md +0 -0
- package/memory/_templates/spec.md +12 -0
- package/memory/beads/.gitkeep +0 -0
- package/memory/handoffs/.gitkeep +0 -0
- package/memory/memory.db +0 -0
- package/memory/plans/.gitkeep +0 -0
- package/memory/prds/.gitkeep +0 -0
- package/memory/research/.gitkeep +0 -0
- package/memory/reviews/.gitkeep +0 -0
- package/memory/specs/.gitkeep +0 -0
- package/package.json +4 -4
- package/skill/beads/SKILL.md +42 -43
- package/skill/beads/mcp.json +26 -0
- package/skill/beads/references/api-reference.md +64 -0
- package/skill/chrome-devtools/SKILL.md +22 -23
- package/skill/chrome-devtools/mcp.json +17 -0
- package/skill/chrome-devtools/references/tool-reference.md +63 -0
- package/skill/condition-based-waiting/SKILL.md +28 -66
- package/skill/deep-research/SKILL.md +34 -103
- package/skill/deep-research/mcp.json +21 -0
- package/skill/deep-research/references/lsp-ops.md +44 -0
- package/skill/defense-in-depth/SKILL.md +29 -69
- package/skill/executing-plans/SKILL.md +25 -34
- package/skill/finishing-a-development-branch/SKILL.md +28 -89
- package/skill/playwright/SKILL.md +27 -22
- package/skill/playwright/mcp.json +20 -0
- package/skill/playwright/references/tool-reference.md +64 -0
- package/skill/receiving-code-review/SKILL.md +16 -27
- package/skill/requesting-code-review/SKILL.md +22 -26
- package/skill/ritual-workflow/SKILL.md +22 -82
- package/skill/root-cause-tracing/SKILL.md +30 -54
- package/skill/session-management/SKILL.md +21 -40
- package/skill/source-code-research/SKILL.md +33 -102
- package/skill/source-code-research/mcp.json +13 -0
- package/skill/source-code-research/references/quick-ref.md +65 -0
- package/skill/systematic-debugging/SKILL.md +28 -41
- package/skill/systematic-debugging/references/patterns.md +71 -0
- package/skill/test-driven-development/SKILL.md +16 -40
- package/skill/testing-anti-patterns/SKILL.md +36 -64
- package/skill/testing-anti-patterns/references/decision-matrix.md +55 -0
- package/skill/using-git-worktrees/SKILL.md +27 -103
- package/skill/vercel-react-best-practices/SKILL.md +50 -139
- package/skill/vercel-react-best-practices/references/patterns.md +70 -0
- package/skill/verification-before-completion/SKILL.md +19 -37
- package/skill/writing-plans/SKILL.md +20 -32
- package/skill/writing-skills/SKILL.md +52 -41
- package/skill/writing-skills/references/skill-anatomy.md +210 -0
- package/src/agents/AGENTS.md +48 -18
- package/src/agents/build.md +342 -93
- package/src/agents/explore.md +77 -60
- package/src/agents/index.ts +0 -0
- package/src/agents/oracle.md +153 -63
- package/src/agents/plan.md +275 -110
- package/src/agents/research.md +71 -53
- package/src/agents/review.md +182 -61
- package/src/agents/vision.md +7 -5
- package/command/plan.md +0 -152
- package/command/review-codebase.md +0 -228
- package/command/review.md +0 -135
- package/command/vision.md +0 -210
- package/dist/hooks/swarm-enforcer.d.ts +0 -31
- package/dist/hooks/swarm-enforcer.d.ts.map +0 -1
- package/dist/tools/beads-memory-sync.d.ts +0 -17
- package/dist/tools/beads-memory-sync.d.ts.map +0 -1
- package/dist/tools/quick-research.d.ts +0 -16
- package/dist/tools/quick-research.d.ts.map +0 -1
- package/dist/tools/swarm.d.ts +0 -57
- package/dist/tools/swarm.d.ts.map +0 -1
- package/skill/accessibility-audit/SKILL.md +0 -115
- package/skill/beads-bridge/SKILL.md +0 -45
- package/skill/brainstorming/SKILL.md +0 -41
- package/skill/cass-village/SKILL.md +0 -217
- package/skill/cloudflare/SKILL.md +0 -96
- package/skill/design-system-audit/SKILL.md +0 -136
- package/skill/development-lifecycle/SKILL.md +0 -58
- package/skill/dispatching-parallel-agents/SKILL.md +0 -94
- package/skill/figma/SKILL.md +0 -34
- package/skill/frontend-aesthetics/SKILL.md +0 -63
- package/skill/gemini-large-context/SKILL.md +0 -80
- package/skill/mockup-to-code/SKILL.md +0 -98
- package/skill/mqdh/SKILL.md +0 -54
- package/skill/notebooklm/SKILL.md +0 -71
- package/skill/playwriter/SKILL.md +0 -56
- package/skill/polar/SKILL.md +0 -39
- package/skill/resend/SKILL.md +0 -85
- package/skill/sharing-skills/SKILL.md +0 -50
- package/skill/subagent-driven-development/SKILL.md +0 -69
- package/skill/supabase/SKILL.md +0 -80
- package/skill/supabase-postgres-best-practices/SKILL.md +0 -168
- package/skill/swarm-coordination/SKILL.md +0 -54
- package/skill/testing-skills-with-subagents/SKILL.md +0 -102
- package/skill/ui-ux-research/SKILL.md +0 -93
- package/skill/v0/SKILL.md +0 -67
- package/skill/v1-run/SKILL.md +0 -85
- package/skill/visual-analysis/SKILL.md +0 -113
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Playwright MCP — Tool Reference
|
|
2
|
+
|
|
3
|
+
## Core Tools
|
|
4
|
+
|
|
5
|
+
### Navigation
|
|
6
|
+
```
|
|
7
|
+
playwright_navigate(url, waitUntil?)
|
|
8
|
+
waitUntil: "load" | "domcontentloaded" | "networkidle" (default: "load")
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Interaction
|
|
12
|
+
```
|
|
13
|
+
playwright_click(selector)
|
|
14
|
+
playwright_fill(selector, value)
|
|
15
|
+
playwright_select(selector, value) # <select> elements
|
|
16
|
+
playwright_evaluate(script) # run JS in page context
|
|
17
|
+
playwright_wait_for_selector(selector, timeout?)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Capture
|
|
21
|
+
```
|
|
22
|
+
playwright_screenshot(fullPage?, selector?)
|
|
23
|
+
playwright_get_text(selector?) # get visible text
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Session
|
|
27
|
+
```
|
|
28
|
+
playwright_close() # always call when done
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Common Patterns
|
|
32
|
+
|
|
33
|
+
### Auth flow
|
|
34
|
+
```
|
|
35
|
+
playwright_navigate("http://localhost:3000/login")
|
|
36
|
+
playwright_fill("#email", "test@example.com")
|
|
37
|
+
playwright_fill("#password", "secret")
|
|
38
|
+
playwright_click("[type=submit]")
|
|
39
|
+
playwright_wait_for_selector(".dashboard")
|
|
40
|
+
playwright_screenshot()
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Responsive test
|
|
44
|
+
```
|
|
45
|
+
playwright_navigate("http://localhost:3000")
|
|
46
|
+
playwright_evaluate("window.innerWidth") # check viewport
|
|
47
|
+
playwright_screenshot(true) # full page
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Assert text
|
|
51
|
+
```
|
|
52
|
+
playwright_get_text(".status")
|
|
53
|
+
# compare returned text to expected value
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Viewport Sizes
|
|
57
|
+
|
|
58
|
+
| Breakpoint | Width |
|
|
59
|
+
|------------|-------|
|
|
60
|
+
| Mobile | 375px |
|
|
61
|
+
| Tablet | 768px |
|
|
62
|
+
| Desktop | 1280px |
|
|
63
|
+
|
|
64
|
+
Set via `playwright_evaluate("Object.assign(window, {innerWidth: 375})")` or configure in setup.
|
|
@@ -1,47 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: receiving-code-review
|
|
3
|
-
description: Use when receiving code review feedback.
|
|
3
|
+
description: Use when receiving code review feedback. Verify before accepting, push back with data when appropriate.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Receiving Code Review
|
|
6
|
+
# Receiving Code Review
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Protocol
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Verify before implementing changes
|
|
15
|
-
- Push back with technical reasoning when appropriate
|
|
16
|
-
|
|
17
|
-
## Response Protocol
|
|
18
|
-
|
|
19
|
-
1. **Read carefully** — Understand the actual concern
|
|
20
|
-
2. **Verify locally** — Reproduce or confirm the issue
|
|
21
|
-
3. **Categorize** — Is this a bug, style, optimization, or preference?
|
|
22
|
-
4. **Respond** — Acknowledge, question, or push back with data
|
|
10
|
+
1. **Read** — understand the actual concern, not the surface suggestion
|
|
11
|
+
2. **Verify locally** — reproduce or confirm the issue
|
|
12
|
+
3. **Categorize** — bug / style / optimization / preference
|
|
13
|
+
4. **Respond** — acknowledge, question, or push back with evidence
|
|
23
14
|
|
|
24
15
|
## When to Push Back
|
|
25
16
|
|
|
26
17
|
| Scenario | Response |
|
|
27
18
|
|----------|----------|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
| Style preference
|
|
31
|
-
|
|
|
19
|
+
| Adds complexity for hypothetical need | "YAGNI — adds N lines for a case we don't have" |
|
|
20
|
+
| Breaks existing behavior | "This breaks X. Current approach handles Y correctly." |
|
|
21
|
+
| Style preference, not a bug | "Current pattern matches codebase conventions." |
|
|
22
|
+
| Out-of-scope polish | "Works correctly. This enhancement is not in scope." |
|
|
32
23
|
|
|
33
|
-
## YAGNI Check
|
|
24
|
+
## YAGNI Check (before accepting "improvements")
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
- Does this solve a real problem or hypothetical one?
|
|
26
|
+
- Does this solve a real problem or a hypothetical one?
|
|
37
27
|
- Is the complexity justified by actual usage?
|
|
38
28
|
- Would a simpler solution suffice?
|
|
39
29
|
|
|
40
|
-
If
|
|
30
|
+
If "hypothetical" → push back.
|
|
41
31
|
|
|
42
32
|
## Red Flags
|
|
43
33
|
|
|
44
|
-
- Agreeing immediately without
|
|
45
|
-
- Implementing suggestions that increase complexity
|
|
34
|
+
- Agreeing immediately without verifying
|
|
35
|
+
- Implementing suggestions that increase complexity without value
|
|
46
36
|
- Treating style preferences as bugs
|
|
47
|
-
- Adding "professional" features that nobody asked for
|
|
@@ -1,47 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requesting-code-review
|
|
3
|
-
description: Use after completing a task. Dispatch @review subagent for quality gate.
|
|
3
|
+
description: Use after completing a task. Dispatch @review subagent for quality gate before merging.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Requesting Code Review
|
|
6
|
+
# Requesting Code Review
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Trigger
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Request review after: major features, significant refactors, before merge, when unsure of approach.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- Before merging
|
|
14
|
-
- After significant refactors
|
|
15
|
-
- When unsure about approach
|
|
16
|
-
|
|
17
|
-
## Information to Provide
|
|
12
|
+
## What to Provide to @review
|
|
18
13
|
|
|
19
14
|
| Item | Example |
|
|
20
15
|
|------|---------|
|
|
21
|
-
|
|
|
22
|
-
| What
|
|
23
|
-
|
|
|
24
|
-
| Known
|
|
16
|
+
| Diff range | `a1b2c3d..e4f5g6h` |
|
|
17
|
+
| What changed | "Added JWT auth with refresh tokens" |
|
|
18
|
+
| Spec/plan ref | `.opencode/memory/specs/auth.md` |
|
|
19
|
+
| Known gaps | "Edge case X not handled yet" |
|
|
25
20
|
|
|
26
|
-
##
|
|
21
|
+
## Dispatch
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
```
|
|
24
|
+
@review: review changes from <sha>..<sha>
|
|
25
|
+
Context: <what was built>
|
|
26
|
+
Spec: <path>
|
|
27
|
+
Known issues: <list or none>
|
|
28
|
+
```
|
|
33
29
|
|
|
34
|
-
##
|
|
30
|
+
## Severity Response
|
|
35
31
|
|
|
36
32
|
| Severity | Action |
|
|
37
33
|
|----------|--------|
|
|
38
|
-
| Critical | Fix
|
|
34
|
+
| Critical | Fix now, re-review |
|
|
39
35
|
| High | Fix before merge |
|
|
40
|
-
| Medium | Create ticket
|
|
41
|
-
| Low | Document,
|
|
36
|
+
| Medium | Create beads ticket |
|
|
37
|
+
| Low | Document, defer |
|
|
42
38
|
|
|
43
39
|
## Red Flags
|
|
44
40
|
|
|
45
41
|
- Skipping review "because it's small"
|
|
46
|
-
- Merging
|
|
47
|
-
-
|
|
42
|
+
- Merging with unresolved Critical issues
|
|
43
|
+
- No context given to reviewer
|
|
@@ -1,101 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ritual-workflow
|
|
3
|
-
description: Use when starting any task. Enforces DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE
|
|
3
|
+
description: Use when starting any task. Enforces DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE with hard gates at each phase.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Ritual Workflow
|
|
6
|
+
# Ritual Workflow
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Phases (in order)
|
|
8
|
+
## Phases
|
|
11
9
|
|
|
12
10
|
```
|
|
13
11
|
DISCOVER → PLAN → IMPLEMENT → VERIFY → COMPLETE
|
|
14
12
|
```
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Phase 2: PLAN
|
|
24
|
-
- Design the solution
|
|
25
|
-
- Break into tasks
|
|
26
|
-
- Identify dependencies
|
|
27
|
-
- Estimate effort
|
|
28
|
-
- **Gate**: Plan approved (user confirms)
|
|
29
|
-
|
|
30
|
-
### Phase 3: IMPLEMENT
|
|
31
|
-
- Write code
|
|
32
|
-
- Follow plan
|
|
33
|
-
- Create tests
|
|
34
|
-
- **Gate**: All planned tasks done
|
|
35
|
-
|
|
36
|
-
### Phase 4: VERIFY
|
|
37
|
-
- Run tests
|
|
38
|
-
- Type check
|
|
39
|
-
- Lint
|
|
40
|
-
- Build
|
|
41
|
-
- **Gate**: All checks pass
|
|
42
|
-
|
|
43
|
-
### Phase 5: COMPLETE
|
|
44
|
-
- Document changes
|
|
45
|
-
- Create PR
|
|
46
|
-
- Clean up
|
|
47
|
-
- **Gate**: Merged or deployed
|
|
48
|
-
|
|
49
|
-
## Hard Gates
|
|
50
|
-
|
|
51
|
-
| Current Phase | Must Complete Before Advancing |
|
|
52
|
-
|---------------|-------------------------------|
|
|
53
|
-
| DISCOVER | Problem statement written |
|
|
54
|
-
| PLAN | User approves plan |
|
|
55
|
-
| IMPLEMENT | All tasks checked off |
|
|
56
|
-
| VERIFY | Tests pass, build succeeds |
|
|
57
|
-
| COMPLETE | PR merged |
|
|
14
|
+
| Phase | Gate (must pass before advancing) |
|
|
15
|
+
|-------|-----------------------------------|
|
|
16
|
+
| DISCOVER | Problem statement written, success criteria defined |
|
|
17
|
+
| PLAN | User approves spec + plan |
|
|
18
|
+
| IMPLEMENT | All planned tasks checked off |
|
|
19
|
+
| VERIFY | typecheck + tests + lint + build all pass |
|
|
20
|
+
| COMPLETE | PR merged / deployed |
|
|
58
21
|
|
|
59
|
-
##
|
|
22
|
+
## Command Map
|
|
60
23
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"taskId": "bead-123",
|
|
66
|
-
"phases": [
|
|
67
|
-
{ "name": "discover", "status": "done" },
|
|
68
|
-
{ "name": "plan", "status": "in_progress" },
|
|
69
|
-
...
|
|
70
|
-
],
|
|
71
|
-
"currentPhase": 1
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Commands
|
|
76
|
-
|
|
77
|
-
| Command | Phase | Action |
|
|
78
|
-
|---------|-------|--------|
|
|
79
|
-
| `/create` | DISCOVER | Initialize ritual, gather requirements |
|
|
80
|
-
| `/plan` | PLAN | Create implementation plan |
|
|
81
|
-
| `/start` | IMPLEMENT | Begin implementation |
|
|
82
|
-
| `/verify` | VERIFY | Run checks |
|
|
83
|
-
| `/ship` | COMPLETE | Finalize and deploy |
|
|
24
|
+
| Mode | Commands |
|
|
25
|
+
|------|----------|
|
|
26
|
+
| Quick | `/create` → `/start` → `/verify` → `/ship` |
|
|
27
|
+
| Deep (research/UI) | `/create` → `/research` → `/design` → `/start` → `/verify` → `/ship` |
|
|
84
28
|
|
|
85
29
|
## Enforcement
|
|
86
30
|
|
|
87
31
|
- Cannot skip phases
|
|
88
|
-
- Cannot
|
|
89
|
-
- Cannot
|
|
90
|
-
- Each phase requires explicit completion
|
|
91
|
-
|
|
92
|
-
## Status Check
|
|
93
|
-
|
|
94
|
-
Run `checkRitualProgress()` to see current phase and blockers.
|
|
32
|
+
- Cannot IMPLEMENT without an approved plan — run `/create` first
|
|
33
|
+
- Cannot COMPLETE without `/verify` returning SHIP_READY
|
|
34
|
+
- Each phase requires explicit completion signal
|
|
95
35
|
|
|
96
36
|
## Red Flags
|
|
97
37
|
|
|
98
|
-
-
|
|
99
|
-
- Marking COMPLETE with failing
|
|
100
|
-
- Moving forward without user approval
|
|
101
|
-
-
|
|
38
|
+
- Implementing without a plan
|
|
39
|
+
- Marking COMPLETE with failing `/verify` gates
|
|
40
|
+
- Moving forward without user approval on spec/plan
|
|
41
|
+
- Running `/ship` before SHIP_READY
|
|
@@ -1,73 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: root-cause-tracing
|
|
3
|
-
description: Trace bugs backward through call chain to original trigger. Never fix where error appears.
|
|
3
|
+
description: Trace bugs backward through call chain to original trigger. Never fix where error appears — fix where bad data originated.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Root Cause Tracing
|
|
6
|
+
# Root Cause Tracing
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Principle
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Error appears at **A**. Cause is at **B**. Trace backward to **B** and fix there.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Process
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Step 2: Trace the Call Chain
|
|
22
|
-
- Who called this function?
|
|
23
|
-
- Who called that function?
|
|
24
|
-
- Keep going until you find the trigger
|
|
14
|
+
```
|
|
15
|
+
1. LOCATE — find where error manifests (do NOT fix here)
|
|
16
|
+
2. TRACE — walk the call chain backward (who called this? who called that?)
|
|
17
|
+
3. FIND — first place wrong data/state originated
|
|
18
|
+
4. FIX — apply fix at origin
|
|
19
|
+
5. VERIFY — confirm symptom disappears
|
|
20
|
+
```
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
- The first place where incorrect data/state originated
|
|
28
|
-
- The decision point that led to wrong path
|
|
29
|
-
- The missing validation that allowed bad input
|
|
22
|
+
## Example
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
```
|
|
25
|
+
Error: Cannot read property 'length' of undefined
|
|
26
|
+
at processItems (line 42) ← symptom — DO NOT FIX HERE
|
|
27
|
+
at handleRequest (line 28)
|
|
28
|
+
at parseInput (line 15) ← origin — FIX HERE (return [] not null)
|
|
29
|
+
```
|
|
35
30
|
|
|
36
31
|
## Instrumentation
|
|
37
32
|
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
console.error('[
|
|
41
|
-
console.error('[TRACE] Args:', JSON.stringify(args, null, 2));
|
|
42
|
-
console.error('[TRACE] Stack:', new Error().stack);
|
|
33
|
+
```js
|
|
34
|
+
console.error('[TRACE]', functionName, JSON.stringify(args, null, 2));
|
|
35
|
+
console.error('[STACK]', new Error().stack);
|
|
43
36
|
```
|
|
44
37
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
When tests fail in batch but pass individually:
|
|
38
|
+
## Test Polluter Bisection
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
5. That test is polluting shared state
|
|
40
|
+
Tests fail in batch but pass alone → shared state pollution:
|
|
41
|
+
1. Run first half → passes? bug in second half
|
|
42
|
+
2. Run first half → fails? bug in first half
|
|
43
|
+
3. Repeat until single test isolated
|
|
54
44
|
|
|
55
45
|
## Red Flags
|
|
56
46
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- Assuming you know the cause without evidence
|
|
61
|
-
|
|
62
|
-
## Example
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
Error: Cannot read property 'length' of undefined
|
|
66
|
-
at processItems (line 42) ← DO NOT FIX HERE
|
|
67
|
-
at handleRequest (line 28)
|
|
68
|
-
at parseInput (line 15) ← FIX HERE: null should be []
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Rule
|
|
72
|
-
|
|
73
|
-
**Never fix at the symptom. Always trace to the root.**
|
|
47
|
+
- Adding a null check at the symptom location (defensive, not corrective)
|
|
48
|
+
- Assuming cause without tracing the full chain
|
|
49
|
+
- No evidence before applying fix
|
|
@@ -3,51 +3,32 @@ name: session-management
|
|
|
3
3
|
description: Use for managing context growth, task switching, and session continuity in long-running work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Session Management
|
|
7
|
-
|
|
8
|
-
You are running the **session-management** skill. Context and continuity management.
|
|
6
|
+
# Session Management
|
|
9
7
|
|
|
10
8
|
## Context Thresholds
|
|
11
9
|
|
|
12
10
|
| State | Context % | Action |
|
|
13
11
|
|-------|-----------|--------|
|
|
14
|
-
| Green | < 50% | Normal
|
|
15
|
-
| Yellow | 50
|
|
16
|
-
| Orange | 75
|
|
17
|
-
| Red | > 90% |
|
|
18
|
-
|
|
19
|
-
## Session
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Workflow Patterns
|
|
29
|
-
|
|
30
|
-
### Starting a Session
|
|
31
|
-
1. Check Beads for in-progress tasks
|
|
32
|
-
2. Read handoff if continuing previous session
|
|
33
|
-
3. Claim ready tasks
|
|
34
|
-
4. Begin work
|
|
35
|
-
|
|
36
|
-
### During Session
|
|
37
|
-
1. Monitor context usage
|
|
38
|
-
2. Write specs/plans to memory as created
|
|
39
|
-
3. Commit incremental progress
|
|
40
|
-
4. Sync Beads regularly
|
|
41
|
-
|
|
42
|
-
### Ending a Session
|
|
12
|
+
| Green | < 50% | Normal |
|
|
13
|
+
| Yellow | 50–75% | Offload findings to `memory/` |
|
|
14
|
+
| Orange | 75–90% | Prep handoff doc |
|
|
15
|
+
| Red | > 90% | Run `/handoff`, end session |
|
|
16
|
+
|
|
17
|
+
## Session Start
|
|
18
|
+
|
|
19
|
+
1. `beads-village_init` → join workspace
|
|
20
|
+
2. `beads-village_inbox(unread=true)` → check blockers
|
|
21
|
+
3. Read `memory/_digest.md` + latest handoff if continuing
|
|
22
|
+
|
|
23
|
+
## Session End
|
|
24
|
+
|
|
43
25
|
1. Complete or checkpoint current task
|
|
44
|
-
2.
|
|
45
|
-
3.
|
|
46
|
-
4. Release file reservations
|
|
26
|
+
2. Run `/handoff` → write handoff doc
|
|
27
|
+
3. `beads-village_sync` → push state
|
|
28
|
+
4. Release all file reservations via `beads-village_done`
|
|
47
29
|
|
|
48
|
-
##
|
|
30
|
+
## Red Flags
|
|
49
31
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- Keep session state in version control
|
|
32
|
+
- Crossing 90% without writing a handoff
|
|
33
|
+
- Not reading the handoff when resuming
|
|
34
|
+
- Losing task state between sessions
|
|
@@ -1,98 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: source-code-research
|
|
3
|
-
description: Use when API
|
|
3
|
+
description: Use when API docs are insufficient. Go directly to package source to understand edge cases, error behavior, and internal patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Source Code Research
|
|
7
|
-
|
|
8
|
-
You are running the **source-code-research** skill. Go beyond API docs to understand internals.
|
|
6
|
+
# Source Code Research
|
|
9
7
|
|
|
10
8
|
## When to Use
|
|
11
9
|
|
|
12
|
-
- API docs don't explain behavior
|
|
13
|
-
- Need to understand edge cases
|
|
10
|
+
- API docs don't explain the behavior you're seeing
|
|
11
|
+
- Need to understand edge cases or error handling
|
|
14
12
|
- Debugging library interactions
|
|
15
|
-
-
|
|
16
|
-
- Verifying documented behavior
|
|
13
|
+
- Verifying that documented behavior is actually implemented
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## Protocol
|
|
19
16
|
|
|
20
|
-
### 1. Identify Package
|
|
21
17
|
```bash
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
# 1. Locate source
|
|
19
|
+
cat node_modules/<pkg>/package.json | grep -E '"main"|"types"|"source"'
|
|
20
|
+
ls node_modules/<pkg>/src/
|
|
25
21
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
```
|
|
22
|
+
# 2. Read entry point
|
|
23
|
+
cat node_modules/<pkg>/src/index.ts # or index.js
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Check for:
|
|
33
|
-
- src/ directory
|
|
34
|
-
- lib/ directory
|
|
35
|
-
- dist/ with sourcemaps
|
|
36
|
-
- TypeScript .ts files
|
|
37
|
-
- Index entry point
|
|
25
|
+
# 3. Read tests (best doc of real behavior)
|
|
26
|
+
ls node_modules/<pkg>/test/ || ls node_modules/<pkg>/__tests__/
|
|
38
27
|
```
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
Focus on:
|
|
42
|
-
- Entry point (index.js/ts)
|
|
43
|
-
- Main export file
|
|
44
|
-
- Types/interfaces
|
|
45
|
-
- Core implementation
|
|
46
|
-
- Tests (for behavior)
|
|
47
|
-
|
|
48
|
-
### 4. Trace Execution
|
|
49
|
-
- Follow function calls
|
|
50
|
-
- Map data flow
|
|
51
|
-
- Identify decision points
|
|
52
|
-
- Note error handling
|
|
53
|
-
|
|
54
|
-
## Key Questions to Answer
|
|
55
|
-
|
|
56
|
-
| Question | Why |
|
|
57
|
-
|----------|-----|
|
|
58
|
-
| How is this implemented? | Understand behavior |
|
|
59
|
-
| What edge cases exist? | Avoid surprises |
|
|
60
|
-
| How are errors handled? | Proper error handling |
|
|
61
|
-
| What are the types? | TypeScript integration |
|
|
62
|
-
| What are the defaults? | Implicit behavior |
|
|
63
|
-
|
|
64
|
-
## Finding Patterns
|
|
65
|
-
|
|
66
|
-
### Constructor Pattern
|
|
67
|
-
```javascript
|
|
68
|
-
// Look for initialization logic
|
|
69
|
-
class Example {
|
|
70
|
-
constructor(options) {
|
|
71
|
-
this.options = { ...defaults, ...options };
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
```
|
|
29
|
+
## What to Look For
|
|
75
30
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Async Pattern
|
|
87
|
-
```javascript
|
|
88
|
-
// Understand async behavior
|
|
89
|
-
async function process() {
|
|
90
|
-
// Is this parallel or sequential?
|
|
91
|
-
await Promise.all([...]);
|
|
92
|
-
}
|
|
93
|
-
```
|
|
31
|
+
| Question | Where |
|
|
32
|
+
|----------|-------|
|
|
33
|
+
| What are the defaults? | Constructor / options merge |
|
|
34
|
+
| What throws vs returns error? | Error handling paths |
|
|
35
|
+
| What's async vs sync? | Promise.all vs sequential awaits |
|
|
36
|
+
| What are the types? | Type definitions, interfaces |
|
|
37
|
+
| What edge cases exist? | Conditional branches, null checks |
|
|
94
38
|
|
|
95
|
-
## Output
|
|
39
|
+
## Output
|
|
96
40
|
|
|
97
41
|
Save to `.opencode/memory/research/[package]-internals.md`:
|
|
98
42
|
|
|
@@ -104,35 +48,22 @@ Save to `.opencode/memory/research/[package]-internals.md`:
|
|
|
104
48
|
- Types: [file]
|
|
105
49
|
|
|
106
50
|
## Key Findings
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- **Edge Cases**: [list]
|
|
112
|
-
|
|
113
|
-
## Implementation Notes
|
|
114
|
-
[Key patterns discovered]
|
|
51
|
+
### [Feature]
|
|
52
|
+
- Location: file:line
|
|
53
|
+
- Behavior: …
|
|
54
|
+
- Edge Cases: …
|
|
115
55
|
|
|
116
56
|
## Gotchas
|
|
117
|
-
[Surprising behaviors]
|
|
118
57
|
```
|
|
119
58
|
|
|
120
|
-
##
|
|
59
|
+
## Red Flags
|
|
121
60
|
|
|
122
|
-
- Relying only on TypeScript definitions
|
|
123
|
-
- Not reading tests
|
|
124
|
-
- Assuming behavior from name
|
|
61
|
+
- Relying only on TypeScript type definitions (not the same as behavior)
|
|
62
|
+
- Not reading the tests
|
|
63
|
+
- Assuming behavior from the function name
|
|
125
64
|
- Ignoring error paths
|
|
126
65
|
|
|
127
|
-
##
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Find main entry
|
|
131
|
-
cat node_modules/pkg/package.json | grep main
|
|
132
|
-
|
|
133
|
-
# Find types
|
|
134
|
-
cat node_modules/pkg/package.json | grep types
|
|
66
|
+
## References
|
|
135
67
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
```
|
|
68
|
+
- [Quick reference](references/quick-ref.md) — locate source commands, grep patterns, Context7 MCP alternative
|
|
69
|
+
- MCP: `context7` — see [mcp.json](mcp.json)
|