clikit-plugin 0.2.45 → 0.2.47
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 +154 -64
- package/src/agents/plan.md +275 -110
- package/src/agents/research.md +72 -54
- package/src/agents/review.md +183 -62
- 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
|
@@ -1,130 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-research
|
|
3
|
-
description: Use when exploring unfamiliar code or implementing complex features. Structured LSP exploration with
|
|
3
|
+
description: Use when exploring unfamiliar code or implementing complex features. Structured LSP exploration with confidence-scored findings saved to memory.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Deep Research
|
|
6
|
+
# Deep Research
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Exploring unfamiliar code
|
|
13
|
-
- Implementing complex features
|
|
14
|
-
- Understanding architecture before changes
|
|
15
|
-
- Debugging across multiple files
|
|
16
|
-
|
|
17
|
-
## Memory-First Protocol
|
|
18
|
-
|
|
19
|
-
Always save findings to `.opencode/memory/research/`:
|
|
8
|
+
## Workflow
|
|
20
9
|
|
|
21
10
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Use all 9 LSP operations systematically:
|
|
31
|
-
|
|
32
|
-
### 1. Go to Definition
|
|
33
|
-
- Trace symbol origins
|
|
34
|
-
- Understand type definitions
|
|
35
|
-
- Find implementation details
|
|
36
|
-
|
|
37
|
-
### 2. Find References
|
|
38
|
-
- Locate all usages
|
|
39
|
-
- Understand impact of changes
|
|
40
|
-
- Identify consumers
|
|
41
|
-
|
|
42
|
-
### 3. Go to Type Definition
|
|
43
|
-
- Understand data structures
|
|
44
|
-
- Trace interface contracts
|
|
45
|
-
- Find source types
|
|
46
|
-
|
|
47
|
-
### 4. Find Implementations
|
|
48
|
-
- Locate concrete implementations
|
|
49
|
-
- Understand polymorphism
|
|
50
|
-
- Find all variants
|
|
51
|
-
|
|
52
|
-
### 5. Document Symbol
|
|
53
|
-
- Get file overview
|
|
54
|
-
- Understand exports
|
|
55
|
-
- Quick navigation
|
|
56
|
-
|
|
57
|
-
### 6. Workspace Symbol
|
|
58
|
-
- Find symbols across project
|
|
59
|
-
- Locate related code
|
|
60
|
-
- Cross-file navigation
|
|
61
|
-
|
|
62
|
-
### 7. Call Hierarchy (Incoming)
|
|
63
|
-
- Find callers
|
|
64
|
-
- Understand entry points
|
|
65
|
-
- Trace data flow up
|
|
66
|
-
|
|
67
|
-
### 8. Call Hierarchy (Outgoing)
|
|
68
|
-
- Find callees
|
|
69
|
-
- Understand dependencies
|
|
70
|
-
- Trace data flow down
|
|
71
|
-
|
|
72
|
-
### 9. Rename
|
|
73
|
-
- Preview changes
|
|
74
|
-
- Understand scope
|
|
75
|
-
- Safe refactoring
|
|
76
|
-
|
|
77
|
-
## Research Workflow
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
1. Define research question
|
|
81
|
-
2. Start with workspace symbol search
|
|
82
|
-
3. Navigate via go to definition
|
|
83
|
-
4. Trace references for coverage
|
|
84
|
-
5. Map call hierarchy for flow
|
|
85
|
-
6. Document findings with confidence score
|
|
86
|
-
7. Save to memory
|
|
11
|
+
1. Define question
|
|
12
|
+
2. lsp_workspace_symbols → find entry points
|
|
13
|
+
3. lsp_goto_definition → trace origins
|
|
14
|
+
4. lsp_find_references → map all usages
|
|
15
|
+
5. lsp_document_symbols → understand exports
|
|
16
|
+
6. Incoming/outgoing call hierarchy → trace data flow
|
|
17
|
+
7. Score each finding 1–10
|
|
18
|
+
8. Save to memory/research/[topic]-findings.md
|
|
87
19
|
```
|
|
88
20
|
|
|
89
21
|
## Confidence Scoring
|
|
90
22
|
|
|
91
|
-
Score each finding 1-10:
|
|
92
|
-
|
|
93
23
|
| Score | Meaning |
|
|
94
24
|
|-------|---------|
|
|
95
|
-
| 1
|
|
96
|
-
| 4
|
|
97
|
-
| 7
|
|
98
|
-
| 10 | Certain
|
|
25
|
+
| 1–3 | Speculation — needs verification |
|
|
26
|
+
| 4–6 | Probable — partial evidence |
|
|
27
|
+
| 7–9 | Confident — strong evidence |
|
|
28
|
+
| 10 | Certain — verified in code |
|
|
29
|
+
|
|
30
|
+
Never assert anything below 4 without flagging uncertainty.
|
|
99
31
|
|
|
100
32
|
## Output Format
|
|
101
33
|
|
|
34
|
+
Save to `.opencode/memory/research/[topic]-findings.md`:
|
|
35
|
+
|
|
102
36
|
```markdown
|
|
103
|
-
# [Topic] Research
|
|
37
|
+
# [Topic] Research
|
|
104
38
|
|
|
105
39
|
## Summary
|
|
106
|
-
[
|
|
40
|
+
[1–2 sentences]
|
|
107
41
|
|
|
108
42
|
## Key Findings
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- **Notes**: [Additional context]
|
|
114
|
-
|
|
115
|
-
## Architecture
|
|
116
|
-
[Diagram or description]
|
|
43
|
+
### [Finding]
|
|
44
|
+
- Confidence: N/10
|
|
45
|
+
- Evidence: file:line
|
|
46
|
+
- Notes: …
|
|
117
47
|
|
|
118
48
|
## Open Questions
|
|
119
|
-
[What needs more investigation]
|
|
120
|
-
|
|
121
49
|
## Recommendations
|
|
122
|
-
[Based on findings]
|
|
123
50
|
```
|
|
124
51
|
|
|
125
|
-
##
|
|
52
|
+
## Red Flags
|
|
53
|
+
|
|
54
|
+
- Skipping LSP — guessing structure instead of tracing it
|
|
55
|
+
- Not saving findings to memory (lost between sessions)
|
|
56
|
+
- Asserting with confidence < 4 without flagging it
|
|
57
|
+
|
|
58
|
+
## References
|
|
126
59
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
- Low confidence assertions
|
|
130
|
-
- Missing evidence for claims
|
|
60
|
+
- [LSP tool reference](references/lsp-ops.md) — all LSP tools, when to use each, research sequence
|
|
61
|
+
- MCP: `context7` (library docs) + `grep` (GitHub patterns) — see [mcp.json](mcp.json)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"context7": {
|
|
4
|
+
"type": "remote",
|
|
5
|
+
"url": "https://mcp.context7.com/mcp",
|
|
6
|
+
"description": "Library documentation lookup — resolve library ID then query docs",
|
|
7
|
+
"tools": [
|
|
8
|
+
"resolve-library-id",
|
|
9
|
+
"get-library-docs"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"grep": {
|
|
13
|
+
"type": "remote",
|
|
14
|
+
"url": "https://mcp.grep.app",
|
|
15
|
+
"description": "GitHub code search — real-world usage patterns",
|
|
16
|
+
"tools": [
|
|
17
|
+
"search"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# LSP Operations Reference
|
|
2
|
+
|
|
3
|
+
Tools available via LSP in OpenCode. Use these in order during exploration.
|
|
4
|
+
|
|
5
|
+
## Navigation Tools
|
|
6
|
+
|
|
7
|
+
| Tool | Use | When |
|
|
8
|
+
|------|-----|------|
|
|
9
|
+
| `lsp_workspace_symbols(query)` | Find symbols across project | Start here — discover entry points |
|
|
10
|
+
| `lsp_goto_definition(file, line, col)` | Jump to symbol definition | Trace where something is implemented |
|
|
11
|
+
| `lsp_find_references(file, line, col)` | Find all usages | Map blast radius before changing |
|
|
12
|
+
| `lsp_document_symbols(file)` | List exports/structure of a file | Understand a file's API |
|
|
13
|
+
| `lsp_hover(file, line, col)` | Show type/doc at position | Understand a symbol's contract |
|
|
14
|
+
|
|
15
|
+
## Refactoring Tools
|
|
16
|
+
|
|
17
|
+
| Tool | Use | When |
|
|
18
|
+
|------|-----|------|
|
|
19
|
+
| `lsp_rename(file, line, col, new_name)` | Rename across project | Always prepare_rename first |
|
|
20
|
+
| `lsp_prepare_rename(file, line, col)` | Check if rename is safe | Before every rename |
|
|
21
|
+
| `lsp_code_actions(file, range)` | Suggest fixes/refactors | After diagnostics find issues |
|
|
22
|
+
|
|
23
|
+
## Quality Tools
|
|
24
|
+
|
|
25
|
+
| Tool | Use | When |
|
|
26
|
+
|------|-----|------|
|
|
27
|
+
| `lsp_diagnostics(file)` | Show type errors, warnings | Before editing + after every change |
|
|
28
|
+
| `lsp_code_action_resolve(action)` | Apply a code action | After selecting from lsp_code_actions |
|
|
29
|
+
|
|
30
|
+
## Research Sequence
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
1. lsp_workspace_symbols("keyword") → find candidates
|
|
34
|
+
2. lsp_document_symbols("file.ts") → understand structure
|
|
35
|
+
3. lsp_goto_definition(...) → trace to source
|
|
36
|
+
4. lsp_find_references(...) → see all usages
|
|
37
|
+
5. lsp_hover(...) → confirm types/contracts
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Call Hierarchy
|
|
41
|
+
|
|
42
|
+
OpenCode doesn't expose call hierarchy directly — approximate with:
|
|
43
|
+
- **Incoming callers**: `lsp_find_references` on the function
|
|
44
|
+
- **Outgoing callees**: `lsp_document_symbols` + manual trace via `lsp_goto_definition`
|
|
@@ -1,89 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: defense-in-depth
|
|
3
|
-
description: Validate at every layer. Makes bugs structurally impossible through
|
|
3
|
+
description: Validate at every layer. Makes bugs structurally impossible through entry point, domain, and environment guards.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Defense in Depth
|
|
6
|
+
# Defense in Depth
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Validation Layers
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
| Layer | Where | What to validate |
|
|
11
|
+
|-------|-------|-----------------|
|
|
12
|
+
| 1 — Entry point | API handler, CLI input, form | Input shape, required fields, types |
|
|
13
|
+
| 2 — Business logic | Domain functions | Domain rules, invariants, state |
|
|
14
|
+
| 3 — Environment | App startup | Required env vars, config in prod |
|
|
15
|
+
| 4 — Debug | Dev only | State snapshots, stack traces |
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
## Minimal Patterns
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
```js
|
|
20
|
+
// Layer 1 — entry
|
|
21
|
+
if (!input?.id || typeof input.id !== 'string') throw new Error('id required');
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// API endpoint, CLI input, user form
|
|
19
|
-
function handler(input) {
|
|
20
|
-
if (!input || typeof input !== 'object') {
|
|
21
|
-
throw new Error('Invalid input: expected object');
|
|
22
|
-
}
|
|
23
|
-
if (!input.id || typeof input.id !== 'string') {
|
|
24
|
-
throw new Error('Invalid input: id required');
|
|
25
|
-
}
|
|
26
|
-
// ... continue
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Layer 2: Business Logic Validation
|
|
31
|
-
```javascript
|
|
32
|
-
// Domain rules, invariants
|
|
33
|
-
function processOrder(order) {
|
|
34
|
-
if (order.items.length === 0) {
|
|
35
|
-
throw new Error('Order must have items');
|
|
36
|
-
}
|
|
37
|
-
if (order.total < 0) {
|
|
38
|
-
throw new Error('Order total cannot be negative');
|
|
39
|
-
}
|
|
40
|
-
// ... continue
|
|
41
|
-
}
|
|
42
|
-
```
|
|
23
|
+
// Layer 2 — domain
|
|
24
|
+
if (order.items.length === 0) throw new Error('Order must have items');
|
|
43
25
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// Runtime environment checks
|
|
47
|
-
if (process.env.NODE_ENV === 'production' && !process.env.DATABASE_URL) {
|
|
26
|
+
// Layer 3 — environment
|
|
27
|
+
if (process.env.NODE_ENV === 'production' && !process.env.DATABASE_URL)
|
|
48
28
|
throw new Error('DATABASE_URL required in production');
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
29
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
56
|
-
console.error('[DEBUG] State:', JSON.stringify(state));
|
|
57
|
-
console.error('[DEBUG] Stack:', new Error().stack);
|
|
58
|
-
}
|
|
30
|
+
// Layer 4 — debug (dev only)
|
|
31
|
+
if (process.env.NODE_ENV !== 'production')
|
|
32
|
+
console.error('[DBG]', JSON.stringify(state));
|
|
59
33
|
```
|
|
60
34
|
|
|
61
|
-
## Validation Checklist
|
|
62
|
-
|
|
63
|
-
| Layer | Validated | Confidence |
|
|
64
|
-
|-------|-----------|------------|
|
|
65
|
-
| Entry point | Input shape, types | High |
|
|
66
|
-
| Business logic | Domain rules | Higher |
|
|
67
|
-
| Environment | Config, secrets | Highest |
|
|
68
|
-
| Debug | State snapshots | Debug only |
|
|
69
|
-
|
|
70
35
|
## When to Add Each Layer
|
|
71
36
|
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
| New API endpoint |
|
|
75
|
-
| New function with external callers |
|
|
76
|
-
| Production
|
|
77
|
-
| Debugging
|
|
78
|
-
| Test polluter suspected | Debug instrumentation |
|
|
37
|
+
| Situation | Add |
|
|
38
|
+
|-----------|-----|
|
|
39
|
+
| New API endpoint | L1 + L2 |
|
|
40
|
+
| New function with external callers | L1 |
|
|
41
|
+
| Production deploy | L3 |
|
|
42
|
+
| Debugging / test pollution | L4 |
|
|
79
43
|
|
|
80
44
|
## Red Flags
|
|
81
45
|
|
|
82
|
-
- Assuming
|
|
46
|
+
- Assuming callers always provide valid input
|
|
83
47
|
- Skipping validation "for performance"
|
|
84
|
-
- Only
|
|
85
|
-
- Removing validation to
|
|
86
|
-
|
|
87
|
-
## Rule
|
|
88
|
-
|
|
89
|
-
**Validate at every layer. Make bugs structurally impossible.**
|
|
48
|
+
- Only one layer total
|
|
49
|
+
- Removing validation to make tests pass
|
|
@@ -1,54 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: executing-plans
|
|
3
|
-
description: Use when a plan exists and you need to execute tasks with checkpoints and review.
|
|
3
|
+
description: Use when a plan exists and you need to execute tasks with checkpoints and review after each batch.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Executing Plans
|
|
6
|
+
# Executing Plans
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Batch Execution
|
|
11
|
-
|
|
12
|
-
Default: **3 tasks per batch**
|
|
13
|
-
|
|
14
|
-
After each batch:
|
|
15
|
-
1. Run verification commands
|
|
16
|
-
2. Summarize changes made
|
|
17
|
-
3. Ask for confirmation to continue
|
|
18
|
-
|
|
19
|
-
## Execution Flow
|
|
8
|
+
## Flow
|
|
20
9
|
|
|
21
10
|
```
|
|
22
|
-
Read plan →
|
|
11
|
+
Read plan → batch 3 tasks → execute each → verify → checkpoint → continue/adjust
|
|
23
12
|
```
|
|
24
13
|
|
|
25
|
-
##
|
|
14
|
+
## Per-Task Steps
|
|
15
|
+
|
|
16
|
+
1. Read the task fully
|
|
17
|
+
2. Verify file exists (or create it)
|
|
18
|
+
3. Apply exactly what is specified
|
|
19
|
+
4. Run the verification command
|
|
20
|
+
5. Confirm expected result before moving on
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
- "Continuing with next 3 tasks. Proceed? (yes/skip/stop/adjust)"
|
|
29
|
-
- If "skip": Skip current batch, move to next
|
|
30
|
-
- If "stop": Halt execution, summarize progress
|
|
31
|
-
- If "adjust": Modify batch size or plan
|
|
22
|
+
## Checkpoints (every 3 tasks)
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
Ask: `"Continuing with next batch. Proceed? (yes / skip / stop / adjust)"`
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
| Response | Action |
|
|
27
|
+
|----------|--------|
|
|
28
|
+
| `yes` | Continue |
|
|
29
|
+
| `skip` | Skip batch, move to next |
|
|
30
|
+
| `stop` | Halt, summarize progress |
|
|
31
|
+
| `adjust` | Modify batch size or plan |
|
|
40
32
|
|
|
41
33
|
## Error Handling
|
|
42
34
|
|
|
43
|
-
| Error
|
|
44
|
-
|
|
45
|
-
| File not found | Create it or ask
|
|
46
|
-
| Test fails | Debug
|
|
47
|
-
| Unexpected state | Stop, report, ask
|
|
35
|
+
| Error | Action |
|
|
36
|
+
|-------|--------|
|
|
37
|
+
| File not found | Create it or ask |
|
|
38
|
+
| Test fails | Debug and fix before continuing |
|
|
39
|
+
| Unexpected state | Stop, report, ask |
|
|
48
40
|
|
|
49
41
|
## Red Flags
|
|
50
42
|
|
|
51
43
|
- Skipping verification
|
|
52
|
-
-
|
|
44
|
+
- Changes not in the plan
|
|
53
45
|
- Continuing after failure without fixing
|
|
54
|
-
- Modifying batch size without asking
|
|
@@ -1,97 +1,53 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: finishing-a-development-branch
|
|
3
|
-
description: Use when completing development work on a branch.
|
|
3
|
+
description: Use when completing development work on a branch. Verify tests, present 4 options, execute choice with cleanup.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Finishing a Development Branch
|
|
6
|
+
# Finishing a Development Branch
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Step 1 — Verify
|
|
9
9
|
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
- Development work complete
|
|
13
|
-
- In a worktree (recommended)
|
|
14
|
-
- Branch has commits
|
|
15
|
-
|
|
16
|
-
## Workflow
|
|
17
|
-
|
|
18
|
-
### 1. Verify Tests
|
|
19
10
|
```bash
|
|
20
|
-
#
|
|
21
|
-
npm test
|
|
22
|
-
|
|
23
|
-
# If tests fail:
|
|
24
|
-
# - STOP
|
|
25
|
-
# - Report failures
|
|
26
|
-
# - Do NOT proceed to options
|
|
11
|
+
npm test # or project test command
|
|
27
12
|
```
|
|
28
13
|
|
|
29
|
-
**Never
|
|
14
|
+
**If tests fail: STOP. Fix first. Never proceed with failing tests.**
|
|
30
15
|
|
|
31
|
-
|
|
16
|
+
## Step 2 — Present Options
|
|
32
17
|
|
|
33
18
|
```
|
|
34
19
|
Branch [branch-name] ready. Choose:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
4. DISCARD - Delete branch and all changes
|
|
40
|
-
|
|
41
|
-
What would you like to do?
|
|
20
|
+
1. MERGE — merge to main, clean up
|
|
21
|
+
2. PR — create pull request, keep branch
|
|
22
|
+
3. KEEP — push branch, continue later
|
|
23
|
+
4. DISCARD — delete branch and all changes
|
|
42
24
|
```
|
|
43
25
|
|
|
44
|
-
|
|
26
|
+
## Step 3 — Execute
|
|
45
27
|
|
|
46
|
-
|
|
28
|
+
**MERGE**
|
|
47
29
|
```bash
|
|
48
|
-
|
|
49
|
-
git
|
|
50
|
-
git
|
|
51
|
-
|
|
52
|
-
# Merge branch
|
|
53
|
-
git merge <branch-name>
|
|
54
|
-
|
|
55
|
-
# Push to remote
|
|
56
|
-
git push origin main
|
|
57
|
-
|
|
58
|
-
# Clean up
|
|
59
|
-
git branch -d <branch-name>
|
|
60
|
-
git worktree remove <worktree-path> # if applicable
|
|
30
|
+
git checkout main && git pull origin main
|
|
31
|
+
git merge <branch> && git push origin main
|
|
32
|
+
git branch -d <branch> && git worktree remove <path>
|
|
61
33
|
```
|
|
62
34
|
|
|
63
|
-
|
|
35
|
+
**PR**
|
|
64
36
|
```bash
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# Create PR
|
|
69
|
-
gh pr create --title "[title]" --body "[body]"
|
|
70
|
-
|
|
71
|
-
# Keep worktree for iteration
|
|
37
|
+
git push origin <branch>
|
|
38
|
+
gh pr create --title "<title>" --body "<body>"
|
|
72
39
|
```
|
|
73
40
|
|
|
74
|
-
|
|
41
|
+
**KEEP**
|
|
75
42
|
```bash
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# Leave worktree intact
|
|
80
|
-
# User can return later
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### Option 4: DISCARD
|
|
84
|
-
```
|
|
85
|
-
⚠️ WARNING: This will DELETE all changes on this branch.
|
|
86
|
-
|
|
87
|
-
Type "discard" to confirm:
|
|
43
|
+
git push origin <branch>
|
|
44
|
+
# leave worktree intact
|
|
88
45
|
```
|
|
89
46
|
|
|
47
|
+
**DISCARD** — require typed confirmation: `"discard"`
|
|
90
48
|
```bash
|
|
91
|
-
# After typing "discard"
|
|
92
49
|
git checkout main
|
|
93
|
-
git branch -D <branch
|
|
94
|
-
git worktree remove <worktree-path>
|
|
50
|
+
git branch -D <branch> && git worktree remove <path>
|
|
95
51
|
```
|
|
96
52
|
|
|
97
53
|
## Safety Rules
|
|
@@ -99,29 +55,12 @@ git worktree remove <worktree-path>
|
|
|
99
55
|
| Rule | Enforcement |
|
|
100
56
|
|------|-------------|
|
|
101
57
|
| Tests must pass | Block on failure |
|
|
102
|
-
| DISCARD
|
|
103
|
-
|
|
|
104
|
-
| Always clean up
|
|
105
|
-
|
|
106
|
-
## Decision Matrix
|
|
107
|
-
|
|
108
|
-
| Situation | Recommended |
|
|
109
|
-
|-----------|-------------|
|
|
110
|
-
| Feature complete, tested | MERGE |
|
|
111
|
-
| Needs review | PR |
|
|
112
|
-
| Work in progress | KEEP |
|
|
113
|
-
| Wrong direction | DISCARD |
|
|
114
|
-
|
|
115
|
-
## Post-Completion
|
|
116
|
-
|
|
117
|
-
After any option:
|
|
118
|
-
1. Report result
|
|
119
|
-
2. Show current branch status
|
|
120
|
-
3. Suggest next steps if applicable
|
|
58
|
+
| DISCARD | Require typed `"discard"` to confirm |
|
|
59
|
+
| Force push to main | Never |
|
|
60
|
+
| Stale worktrees | Always clean up after merge/discard |
|
|
121
61
|
|
|
122
|
-
##
|
|
62
|
+
## Red Flags
|
|
123
63
|
|
|
124
64
|
- Merging without test verification
|
|
125
65
|
- Discarding without confirmation
|
|
126
|
-
- Leaving stale worktrees
|
|
127
|
-
- Force pushing to main
|
|
66
|
+
- Leaving stale worktrees after merge
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: playwright
|
|
3
|
-
description: Use for browser automation, E2E testing, form filling, screenshots, and responsive design validation.
|
|
3
|
+
description: Use for browser automation, E2E testing, form filling, screenshots, and responsive design validation via Playwright MCP.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Playwright
|
|
7
|
-
|
|
8
|
-
You are running the **playwright** skill. Browser automation via Playwright MCP.
|
|
6
|
+
# Playwright
|
|
9
7
|
|
|
10
8
|
## Capabilities
|
|
11
9
|
|
|
12
|
-
|
|
|
13
|
-
|
|
14
|
-
| Navigate
|
|
10
|
+
| Task | Action |
|
|
11
|
+
|------|--------|
|
|
12
|
+
| Navigate | Load URLs, handle redirects, wait for content |
|
|
15
13
|
| Fill forms | Input text, select options, upload files |
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
14
|
+
| Screenshots | Full page, element-specific, mobile viewport |
|
|
15
|
+
| Responsive testing | Switch viewports, validate breakpoints |
|
|
16
|
+
| Auth flows | Login sequences, session persistence |
|
|
17
|
+
| Assertions | Text content, visibility, element state |
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
2. Define actions (navigate, click, fill, assert)
|
|
25
|
-
3. Set viewport if testing responsive design
|
|
26
|
-
4. Capture screenshots for verification
|
|
19
|
+
## Workflow
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
1. Specify URL or local dev server
|
|
22
|
+
2. Define action sequence (navigate → interact → assert)
|
|
23
|
+
3. Set viewport for responsive tests
|
|
24
|
+
4. Capture before/after screenshots as evidence
|
|
31
25
|
|
|
32
26
|
## Best Practices
|
|
33
27
|
|
|
34
|
-
-
|
|
28
|
+
- `waitForLoadState('networkidle')` before interacting with dynamic content
|
|
35
29
|
- Take before/after screenshots for visual diffs
|
|
36
|
-
- Test both happy and error
|
|
30
|
+
- Test both happy path and error path
|
|
37
31
|
- Clean up sessions to prevent resource leaks
|
|
32
|
+
|
|
33
|
+
## Red Flags
|
|
34
|
+
|
|
35
|
+
- Assertions before content has loaded
|
|
36
|
+
- Only testing happy path
|
|
37
|
+
- No cleanup after session
|
|
38
|
+
|
|
39
|
+
## References
|
|
40
|
+
|
|
41
|
+
- [Tool reference](references/tool-reference.md) — full tool signatures and common patterns
|
|
42
|
+
- MCP: `playwright` — see [mcp.json](mcp.json)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"playwright": {
|
|
4
|
+
"type": "local",
|
|
5
|
+
"command": ["npx", "-y", "@playwright/mcp@latest"],
|
|
6
|
+
"description": "Browser automation — navigate, click, fill, screenshot, assert",
|
|
7
|
+
"tools": [
|
|
8
|
+
"playwright_navigate",
|
|
9
|
+
"playwright_click",
|
|
10
|
+
"playwright_fill",
|
|
11
|
+
"playwright_select",
|
|
12
|
+
"playwright_screenshot",
|
|
13
|
+
"playwright_evaluate",
|
|
14
|
+
"playwright_wait_for_selector",
|
|
15
|
+
"playwright_get_text",
|
|
16
|
+
"playwright_close"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|