liteagents 2.24.1 → 3.5.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.
Files changed (160) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/README.md +120 -160
  3. package/installer/cli.js +40 -5
  4. package/installer/installation-engine.js +8 -0
  5. package/package.json +4 -3
  6. package/packages/ampcode/AGENT.md +11 -20
  7. package/packages/ampcode/agents/code-developer.md +11 -17
  8. package/packages/ampcode/agents/orchestrator.md +3 -3
  9. package/packages/ampcode/agents/quality-assurance.md +3 -1
  10. package/packages/ampcode/{commands/brainstorming.md → skills/brainstorming/SKILL.md} +2 -3
  11. package/packages/ampcode/{commands/branch-review.md → skills/branch-review/SKILL.md} +13 -13
  12. package/packages/{claude/commands/docs-builder.md → ampcode/skills/docs-builder/SKILL.md} +1 -1
  13. package/packages/ampcode/{commands/live-canvas.md → skills/live-canvas/SKILL.md} +8 -4
  14. package/packages/ampcode/{commands/refactor.md → skills/refactor/SKILL.md} +57 -9
  15. package/packages/ampcode/{commands/release.md → skills/release/SKILL.md} +4 -4
  16. package/packages/{claude/commands → ampcode/skills}/remember/AGENT_RULES.md +44 -84
  17. package/packages/ampcode/{commands/remember.md → skills/remember/SKILL.md} +86 -13
  18. package/packages/ampcode/{commands → skills}/remember/friction.cjs +0 -0
  19. package/packages/ampcode/skills/remember/stub-check.cjs +206 -0
  20. package/packages/ampcode/skills/remember/sync-rules.cjs +178 -0
  21. package/packages/ampcode/skills/remember/version-check.cjs +214 -0
  22. package/packages/ampcode/skills/root-cause/SKILL.md +220 -0
  23. package/packages/ampcode/{commands/trace-back → skills/root-cause}/find-polluter.sh +0 -0
  24. package/packages/{claude/commands/security.md → ampcode/skills/security/SKILL.md} +1 -1
  25. package/packages/{claude/commands/ship.md → ampcode/skills/ship/SKILL.md} +1 -1
  26. package/packages/ampcode/skills/skill-creator/LICENSE.txt +202 -0
  27. package/packages/ampcode/{commands/skill-creator.md → skills/skill-creator/SKILL.md} +1 -2
  28. package/packages/ampcode/{commands → skills}/skill-creator/scripts/init_skill.py +0 -0
  29. package/packages/ampcode/{commands → skills}/skill-creator/scripts/package_skill.py +0 -0
  30. package/packages/ampcode/{commands → skills}/skill-creator/scripts/quick_validate.py +0 -0
  31. package/packages/ampcode/{commands/stash.md → skills/stash/SKILL.md} +2 -1
  32. package/packages/{claude/commands/test-generate.md → ampcode/skills/test-generate/SKILL.md} +2 -2
  33. package/packages/ampcode/variants.json +2 -2
  34. package/packages/claude/CLAUDE.md +11 -19
  35. package/packages/claude/agents/code-developer.md +11 -17
  36. package/packages/claude/agents/orchestrator.md +4 -5
  37. package/packages/claude/agents/quality-assurance.md +3 -1
  38. package/packages/claude/skills/brainstorming/SKILL.md +1 -2
  39. package/packages/claude/{commands/branch-review.md → skills/branch-review/SKILL.md} +1 -1
  40. package/packages/{ampcode/commands/docs-builder.md → claude/skills/docs-builder/SKILL.md} +7 -7
  41. package/packages/claude/skills/live-canvas/SKILL.md +5 -1
  42. package/packages/claude/{commands/refactor.md → skills/refactor/SKILL.md} +53 -5
  43. package/packages/claude/{commands/release.md → skills/release/SKILL.md} +1 -1
  44. package/packages/{ampcode/commands → claude/skills}/remember/AGENT_RULES.md +38 -78
  45. package/packages/claude/{commands/remember.md → skills/remember/SKILL.md} +86 -13
  46. package/packages/claude/{commands → skills}/remember/friction.cjs +0 -0
  47. package/packages/claude/skills/remember/stub-check.cjs +206 -0
  48. package/packages/claude/skills/remember/sync-rules.cjs +178 -0
  49. package/packages/claude/skills/remember/version-check.cjs +214 -0
  50. package/packages/claude/skills/root-cause/SKILL.md +220 -0
  51. package/packages/{ampcode/commands/security.md → claude/skills/security/SKILL.md} +2 -2
  52. package/packages/{ampcode/commands/ship.md → claude/skills/ship/SKILL.md} +2 -2
  53. package/packages/claude/skills/skill-creator/SKILL.md +1 -2
  54. package/packages/claude/{commands/stash.md → skills/stash/SKILL.md} +2 -1
  55. package/packages/{ampcode/commands/test-generate.md → claude/skills/test-generate/SKILL.md} +3 -3
  56. package/packages/claude/variants.json +1 -2
  57. package/packages/droid/AGENTS.md +10 -16
  58. package/packages/droid/commands/brainstorming.md +1 -4
  59. package/packages/droid/commands/branch-review.md +11 -14
  60. package/packages/droid/commands/docs-builder.md +0 -3
  61. package/packages/droid/commands/live-canvas.md +7 -5
  62. package/packages/droid/commands/refactor.md +55 -10
  63. package/packages/droid/commands/release.md +2 -5
  64. package/packages/droid/commands/remember/AGENT_RULES.md +38 -78
  65. package/packages/droid/commands/remember/stub-check.cjs +206 -0
  66. package/packages/droid/commands/remember/sync-rules.cjs +178 -0
  67. package/packages/droid/commands/remember/version-check.cjs +214 -0
  68. package/packages/droid/commands/remember.md +84 -14
  69. package/packages/droid/commands/root-cause.md +218 -0
  70. package/packages/droid/commands/security.md +0 -3
  71. package/packages/droid/commands/ship.md +0 -3
  72. package/packages/droid/commands/skill-creator/LICENSE.txt +202 -0
  73. package/packages/droid/commands/skill-creator.md +0 -4
  74. package/packages/droid/commands/stash.md +0 -2
  75. package/packages/droid/commands/test-generate.md +1 -4
  76. package/packages/droid/droids/1-create-prd.md +6 -2
  77. package/packages/droid/droids/2-generate-tasks.md +1 -2
  78. package/packages/droid/droids/3-process-task-list.md +1 -2
  79. package/packages/droid/droids/code-developer.md +12 -19
  80. package/packages/droid/droids/feature-planner.md +1 -2
  81. package/packages/droid/droids/market-researcher.md +1 -2
  82. package/packages/droid/droids/orchestrator.md +3 -4
  83. package/packages/droid/droids/quality-assurance.md +4 -3
  84. package/packages/droid/droids/system-architect.md +1 -2
  85. package/packages/droid/droids/ui-designer.md +1 -2
  86. package/packages/opencode/AGENTS.md +10 -16
  87. package/packages/opencode/agent/code-developer.md +11 -17
  88. package/packages/opencode/agent/orchestrator.md +2 -2
  89. package/packages/opencode/agent/quality-assurance.md +3 -1
  90. package/packages/opencode/command/brainstorming.md +1 -4
  91. package/packages/opencode/command/branch-review.md +11 -15
  92. package/packages/opencode/command/docs-builder.md +0 -4
  93. package/packages/opencode/command/live-canvas.md +7 -5
  94. package/packages/opencode/command/refactor.md +55 -11
  95. package/packages/opencode/command/release.md +2 -5
  96. package/packages/opencode/command/remember/AGENT_RULES.md +38 -78
  97. package/packages/opencode/command/remember/stub-check.cjs +206 -0
  98. package/packages/opencode/command/remember/sync-rules.cjs +178 -0
  99. package/packages/opencode/command/remember/version-check.cjs +214 -0
  100. package/packages/opencode/command/remember.md +84 -14
  101. package/packages/opencode/command/root-cause.md +218 -0
  102. package/packages/opencode/command/security.md +0 -4
  103. package/packages/opencode/command/ship.md +0 -3
  104. package/packages/opencode/command/skill-creator/LICENSE.txt +202 -0
  105. package/packages/opencode/command/skill-creator.md +0 -4
  106. package/packages/opencode/command/stash.md +0 -3
  107. package/packages/opencode/command/test-generate.md +1 -5
  108. package/packages/opencode/opencode.jsonc +4 -34
  109. package/packages/subagentic-manual.md +147 -314
  110. package/packages/ampcode/agents/context-builder.md +0 -144
  111. package/packages/ampcode/commands/debug-method.md +0 -297
  112. package/packages/ampcode/commands/live-canvas/README.md +0 -264
  113. package/packages/ampcode/commands/optimize.md +0 -61
  114. package/packages/ampcode/commands/tdd-flow.md +0 -390
  115. package/packages/ampcode/commands/test-traps/example.ts +0 -158
  116. package/packages/ampcode/commands/test-traps.md +0 -378
  117. package/packages/ampcode/commands/trace-back.md +0 -176
  118. package/packages/ampcode/commands/verify-done.md +0 -152
  119. package/packages/claude/agents/context-builder.md +0 -145
  120. package/packages/claude/commands/optimize.md +0 -61
  121. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md +0 -89
  122. package/packages/claude/skills/debug-method/CREATION-LOG.md +0 -119
  123. package/packages/claude/skills/debug-method/SKILL.md +0 -296
  124. package/packages/claude/skills/debug-method/test-academic.md +0 -14
  125. package/packages/claude/skills/debug-method/test-pressure-1.md +0 -58
  126. package/packages/claude/skills/debug-method/test-pressure-2.md +0 -68
  127. package/packages/claude/skills/debug-method/test-pressure-3.md +0 -69
  128. package/packages/claude/skills/live-canvas/README.md +0 -269
  129. package/packages/claude/skills/tdd-flow/SKILL.md +0 -392
  130. package/packages/claude/skills/test-traps/SKILL.md +0 -378
  131. package/packages/claude/skills/test-traps/example.ts +0 -158
  132. package/packages/claude/skills/trace-back/SKILL.md +0 -176
  133. package/packages/claude/skills/verify-done/SKILL.md +0 -152
  134. package/packages/droid/commands/debug-method.md +0 -297
  135. package/packages/droid/commands/live-canvas/README.md +0 -264
  136. package/packages/droid/commands/optimize.md +0 -61
  137. package/packages/droid/commands/tdd-flow.md +0 -390
  138. package/packages/droid/commands/test-traps/example.ts +0 -158
  139. package/packages/droid/commands/test-traps.md +0 -378
  140. package/packages/droid/commands/trace-back.md +0 -176
  141. package/packages/droid/commands/verify-done.md +0 -152
  142. package/packages/droid/droids/context-builder.md +0 -144
  143. package/packages/opencode/agent/context-builder.md +0 -148
  144. package/packages/opencode/command/debug-method.md +0 -297
  145. package/packages/opencode/command/live-canvas/README.md +0 -264
  146. package/packages/opencode/command/optimize.md +0 -61
  147. package/packages/opencode/command/tdd-flow.md +0 -390
  148. package/packages/opencode/command/test-traps/example.ts +0 -158
  149. package/packages/opencode/command/test-traps.md +0 -378
  150. package/packages/opencode/command/trace-back.md +0 -176
  151. package/packages/opencode/command/verify-done.md +0 -152
  152. /package/packages/ampcode/{commands → skills}/docs-builder/docs-builder.cjs +0 -0
  153. /package/packages/ampcode/{commands → skills}/live-canvas/DESIGN_PRINCIPLES.md +0 -0
  154. /package/packages/ampcode/{commands → skills}/live-canvas/dev/post-variants.html +0 -0
  155. /package/packages/ampcode/{commands → skills}/live-canvas/templates/lab-banner.html +0 -0
  156. /package/packages/ampcode/{commands → skills}/live-canvas/templates/overlay-vanilla.js +0 -0
  157. /package/packages/claude/{commands → skills}/docs-builder/docs-builder.cjs +0 -0
  158. /package/packages/claude/skills/{trace-back → root-cause}/find-polluter.sh +0 -0
  159. /package/packages/droid/commands/{trace-back → root-cause}/find-polluter.sh +0 -0
  160. /package/packages/opencode/command/{trace-back → root-cause}/find-polluter.sh +0 -0
@@ -1,145 +0,0 @@
1
- ---
2
- name: context-builder
3
- description: Initialize or update project context documentation
4
- when_to_use: Use to initialize Claude Code context for new/existing projects, discover and organize documentation, create CLAUDE.md and KNOWLEDGE_BASE.md for optimal token-efficient memory
5
- model: inherit
6
- color: purple
7
- ---
8
-
9
- You are a Context Initialization Specialist. Create a 3-tier progressive disclosure documentation system that minimizes token waste.
10
-
11
- ## Invocation Modes
12
-
13
- | Mode | Trigger | Description |
14
- |------|---------|-------------|
15
- | **Init** | `*init` | Full setup: scan → create all tiers |
16
- | **Update** | `*update` | Update existing tiers, preserve structure |
17
- | **Validate** | `*validate` | Check limits and anti-patterns only |
18
-
19
- ## Commands
20
-
21
- | Command | Description |
22
- |---------|-------------|
23
- | `*help` | Show available commands |
24
- | `*exit` | Exit persona |
25
-
26
- ## Workflow Visualization
27
-
28
- ```dot
29
- digraph ContextBuilder {
30
- rankdir=TB;
31
- node [shape=box, style=filled, fillcolor=lightblue];
32
-
33
- start [label="START", fillcolor=lightgreen];
34
- determine_mode [label="Mode?", shape=diamond];
35
-
36
- // Scan phase
37
- scan [label="Scan existing docs\n& project type"];
38
- exists [label="CLAUDE.md\nexists?", shape=diamond];
39
-
40
- // Update path
41
- read_existing [label="Read existing\nCLAUDE.md"];
42
- merge_update [label="Merge updates\npreserve structure"];
43
- update_tiers [label="Update Tier 2/3\nif needed"];
44
-
45
- // Create path
46
- create_t3 [label="Create Tier 3\ndocs/*.md"];
47
- create_t2 [label="Create Tier 2\nKNOWLEDGE_BASE.md"];
48
- create_t1 [label="Create Tier 1\nCLAUDE.md"];
49
-
50
- // Validation
51
- validate [label="Validate limits\n& anti-patterns"];
52
- pass [label="Pass?", shape=diamond];
53
- emergency [label="Compress content", fillcolor=yellow];
54
- attempts [label="3+ attempts?", shape=diamond];
55
- halt [label="HALT\nManual fix needed", fillcolor=red];
56
- done [label="DONE", fillcolor=lightgreen];
57
-
58
- start -> determine_mode;
59
- determine_mode -> scan [label="init"];
60
- determine_mode -> scan [label="update"];
61
- determine_mode -> validate [label="validate"];
62
-
63
- scan -> exists;
64
- exists -> read_existing [label="YES"];
65
- exists -> create_t3 [label="NO"];
66
-
67
- read_existing -> merge_update;
68
- merge_update -> update_tiers;
69
- update_tiers -> validate;
70
-
71
- create_t3 -> create_t2;
72
- create_t2 -> create_t1;
73
- create_t1 -> validate;
74
-
75
- validate -> pass;
76
- pass -> done [label="YES"];
77
- pass -> emergency [label="NO"];
78
- emergency -> attempts;
79
- attempts -> validate [label="NO"];
80
- attempts -> halt [label="YES"];
81
- }
82
- ```
83
-
84
- # 3-Tier Architecture
85
-
86
- | Tier | File | Lines | Tokens | Purpose |
87
- |------|------|-------|--------|---------|
88
- | 1 | CLAUDE.md | < 95 | < 2,000 | Daily essentials, always loaded |
89
- | 2 | docs/KNOWLEDGE_BASE.md | < 100 | < 1,500 | TOC with 1-2 line summaries |
90
- | 3 | docs/*.md | Unlimited | Unlimited | Comprehensive details |
91
-
92
- **Flow:** CLAUDE.md → KNOWLEDGE_BASE.md → docs/*.md (progressive disclosure)
93
-
94
- **Rule:** Plain text paths only (no @ triggers) in Tier 1 and 2, with ONE exception:
95
-
96
- **Permanent reference:** the explicit-path `@` reference to `.claude/remember/MEMORY.md` — this is the only file allowed to use @ for direct loading. It contains project memory (facts, episodes, preferences) auto-generated by `/remember`. Always check for it during discovery. If it exists, include it as a source and ensure CLAUDE.md references it.
97
-
98
- # Anti-Patterns
99
-
100
- | Don't | Why |
101
- |-------|-----|
102
- | @ triggers in markdown (except @MEMORY.md) | Bloats context window |
103
- | Comprehensive content in KNOWLEDGE_BASE.md | It's a TOC, not a database |
104
- | Embedded agent/skill definitions | Don't duplicate ~/.claude/ |
105
- | ASCII trees (├─ └─) | Use arrows (→) or tables |
106
- | "How to" boilerplate | Remove instructional text |
107
-
108
- # Workflow
109
-
110
- ## 1. Discovery
111
- Scan: README, /docs, *.md, `.claude/remember/MEMORY.md` → Identify project type (app, lib, monorepo) → Ask what's needed every session
112
- If `.claude/remember/MEMORY.md` exists, read it first — it contains accumulated project knowledge from previous sessions.
113
-
114
- ## 2. Tier 3: docs/*.md (Comprehensive)
115
- Create detailed docs: `architecture.md`, `development.md`, `api-reference.md`, `troubleshooting.md`
116
-
117
- ## 3. Tier 2: KNOWLEDGE_BASE.md (TOC)
118
- Format: `## Topic` + 1-2 sentence summary + `→ docs/file.md`
119
-
120
- ## 4. Tier 1: CLAUDE.md (Essentials)
121
- Include: Project summary (2-3 sentences), Tech stack (list), Commands (essential only), Key patterns (top 3), Pointer to `docs/KNOWLEDGE_BASE.md`, memory reference (if `.claude/remember/MEMORY.md` exists)
122
-
123
- ## 5. Update Existing (when CLAUDE.md exists)
124
- Read existing → Preserve structure → Merge new info → Update Tier 2/3 if needed → Validate limits
125
-
126
- ## 6. Validation
127
- Check limits (see 3-Tier table), no @ triggers, no ASCII trees.
128
-
129
- # Content Placement
130
-
131
- | Content | CLAUDE.md | KNOWLEDGE_BASE.md | docs/*.md |
132
- |---------|-----------|-------------------|-----------|
133
- | Project summary | 2-3 sentences | ❌ | ❌ |
134
- | Tech stack | List only | 1-line summary | Full details |
135
- | Commands | Essential only | ❌ | All commands |
136
- | Architecture | ❌ | 1-2 line summary | Full design |
137
- | API/Troubleshooting | ❌ | 1-2 line summary | Full content |
138
-
139
- **Rule:** If used every session → CLAUDE.md. If need to know it exists → KNOWLEDGE_BASE.md. If need details → docs/*.md
140
-
141
- # Emergency Compression
142
-
143
- If over limits: Remove non-essentials, compress to 1 sentence, use tables, combine topics. For docs/*.md >500 lines: split by topic.
144
-
145
- You create lightweight indexes (Tier 1-2) that point to comprehensive docs (Tier 3). Never bloat CLAUDE.md or KNOWLEDGE_BASE.md.
@@ -1,61 +0,0 @@
1
- ---
2
- name: optimize
3
- description: Optimize performance [target]
4
- usage: /optimize <target-area>
5
- argument-hint: [file-or-function]
6
- allowed-tools: Read, Edit, Grep, Glob, Bash(git diff:*), Bash(git log:*), Bash(git grep:*), Bash(rg:*)
7
- ---
8
- Analyze $ARGUMENTS for performance.
9
-
10
- ## Examine
11
- - Time complexity (Big O)
12
- - Space complexity
13
- - I/O operations
14
- - Database queries (N+1?)
15
- - Unnecessary allocations
16
-
17
- ## Output
18
- Per bottleneck:
19
- - **Location** (`file:line`)
20
- - **Cost** — what's slow and by how much. Concrete ("N+1 over ~1k rows on
21
- every page load"), not vague ("could be faster").
22
- - **Optimization** — specific change.
23
- - **Expected improvement** — order-of-magnitude estimate.
24
- - **Trade-offs** — readability / memory / consistency cost.
25
-
26
- ## After the analysis — verify, then fix
27
-
28
- Performance claims are easy to invent. Validate before acting.
29
-
30
- **Verify each bottleneck.** Re-read the cited `file:line` in context.
31
- Confirm the path is **actually hot** — look for at least one of:
32
- - a profile / benchmark / log line showing call frequency or duration,
33
- - the path sits on an obvious hot loop / per-request handler with real
34
- volume,
35
- - the user provided evidence in the request.
36
-
37
- Without one of those, the claim is **uncertain — don't optimize on
38
- speculation.** Mark each finding **confirmed**, **false positive** (with
39
- reason), or **uncertain (needs profiling data)**.
40
-
41
- **Fix what's confirmed and unambiguous** — minimal change, one obvious
42
- shape, **no behavior change**, no API change. Apply directly. After
43
- each edit, re-read the changed region and confirm it still computes the
44
- same answer (perf optimizations that quietly change semantics are the
45
- worst kind).
46
-
47
- **Stop and ask** when (HITL gates — not all the time, only here):
48
- - the bottleneck is **uncertain** after grounding (no profile / log and
49
- not obviously hot),
50
- - the fix has **multiple reasonable shapes** (cache vs precompute vs
51
- batch vs paginate vs index) — present options with tradeoffs, not a
52
- chosen path,
53
- - it changes **public API / response shape / DB schema / caller contract**,
54
- - it trades **correctness for speed** (lossy approximation, weaker
55
- consistency, eventual-vs-strict) — even when "obviously" faster, or
56
- - it touches **concurrency primitives** (locks, atomics, ordering) —
57
- easy to introduce races.
58
-
59
- Final report: **confirmed-and-fixed** · **confirmed-but-asking** (why +
60
- options) · **false-positive** (why) · **uncertain** (what profiling /
61
- data is needed to decide).
@@ -1,89 +0,0 @@
1
- # live-canvas-channel
2
-
3
- Claude Code channel plugin that bridges the Live Canvas browser overlay to a running Claude session. Each Save in the overlay becomes a `notifications/claude/channel` event — Claude reacts immediately without the user leaving the browser.
4
-
5
- ## How it fits
6
-
7
- ```
8
- ┌──────────────────┐ POST /feedback ┌───────────────────┐ MCP stdio ┌──────────────┐
9
- │ Overlay in page │ ──────────────────▶ │ live-canvas- │ ──────────▶ │ Claude Code │
10
- │ (any framework) │ ◀── 200/ok ────────│ channel (node) │ │ session │
11
- └──────────────────┘ └───────────────────┘ └──────────────┘
12
- ```
13
-
14
- - HTTP listener: `127.0.0.1:8788` (override with `LIVE_CANVAS_PORT`)
15
- - `GET /health` — overlay probes this to confirm Live mode is reachable
16
- - `POST /feedback` — wire-compatible with the overlay's v1.0 schema
17
- - stdio: MCP protocol using `@modelcontextprotocol/sdk`
18
-
19
- ## Install (local dev)
20
-
21
- ```bash
22
- # Point Claude at this marketplace (one-time)
23
- claude /plugin marketplace add /absolute/path/to/live-canvas-marketplace
24
-
25
- # Install the plugin from it
26
- claude /plugin install live-canvas-channel@live-canvas-marketplace
27
- ```
28
-
29
- The marketplace directory is the parent that contains `.claude-plugin/marketplace.json`.
30
-
31
- ## Activate the channel on a session
32
-
33
- **Channels are in research preview and custom channels aren't on the approved allowlist.** `/plugin install` spawns the MCP server but does NOT auto-subscribe the session. To receive channel events, start a fresh Claude session with the development flag:
34
-
35
- ```bash
36
- claude --dangerously-load-development-channels plugin:live-canvas-channel@live-canvas-marketplace
37
- ```
38
-
39
- You'll see a confirmation prompt the first time. After confirming, channel events arrive in the assistant's context wrapped as `<channel source="live-canvas" ...>...</channel>` tags.
40
-
41
- Requirements: Claude Code v2.1.80+, claude.ai login (not API key or Console auth). On Team/Enterprise, channels must be explicitly enabled by the admin.
42
-
43
- ## First run
44
-
45
- ```bash
46
- cd /path/to/live-canvas-marketplace/plugins/live-canvas-channel
47
- npm install
48
- ```
49
-
50
- This installs `@modelcontextprotocol/sdk`. After that, `/plugin install` can launch `server.js` on demand.
51
-
52
- ## Debugging standalone
53
-
54
- The process expects stdio to be held open (Claude Code does this; the shell doesn't unless you trick it):
55
-
56
- ```bash
57
- LIVE_CANVAS_PORT=8788 tail -f /dev/null | node server.js
58
- ```
59
-
60
- Then in another terminal:
61
-
62
- ```bash
63
- curl http://localhost:8788/health
64
- curl -X POST http://localhost:8788/feedback \
65
- -H 'content-type: application/json' \
66
- -d '{"version":"1.0","target":"PostCard","comment":{"id":"test","variant":"A","element":{"selector":"button","tagName":"button","textContent":"Like"},"text":"too small"}}'
67
- ```
68
-
69
- ## Protocol emitted
70
-
71
- | Method | When | Params |
72
- |---|---|---|
73
- | `notifications/claude/channel` | Valid feedback POST | `{ content: string, meta: Record<string,string> }` |
74
-
75
- **content** — human-readable text delivered to the active Claude turn:
76
-
77
- ```
78
- [LIVE-CANVAS A · PostCard] too small
79
- selector: `button`, button with "Like"
80
- comment_id: test
81
- ```
82
-
83
- **meta** — machine-structured fields the assistant can parse: `source`, `target`, `variant`, `selector`, `tagName`, `commentId`.
84
-
85
- ## Failure modes
86
-
87
- - **Port in use** — another Claude session owns 8788. Logs to stderr and exits; overlay health probe fails; overlay falls back to JSON mode silently. The skill itself never silently degrades — it stops and asks the user.
88
- - **Invalid payload** — HTTP 400 with reason; no notification emitted.
89
- - **MCP transport not connected** — HTTP call still returns 200 (so the overlay shows "pushed"), but stderr logs the drop. Avoids false-negative toasts.
@@ -1,119 +0,0 @@
1
- # Creation Log: Systematic Debugging Skill
2
-
3
- Reference example of extracting, structuring, and bulletproofing a critical skill.
4
-
5
- ## Source Material
6
-
7
- Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
8
- - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
- - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
- - Rules designed to resist time pressure and rationalization
11
-
12
- ## Extraction Decisions
13
-
14
- **What to include:**
15
- - Complete 4-phase framework with all rules
16
- - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
- - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
- - Concrete steps for each phase
19
-
20
- **What to leave out:**
21
- - Project-specific context
22
- - Repetitive variations of same rule
23
- - Narrative explanations (condensed to principles)
24
-
25
- ## Structure Following skill-creation/SKILL.md
26
-
27
- 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
- 2. **Type: technique** - Concrete process with steps
29
- 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
- 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
- 5. **Phase-by-phase breakdown** - Scannable checklist format
32
- 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
-
34
- ## Bulletproofing Elements
35
-
36
- Framework designed to resist rationalization under pressure:
37
-
38
- ### Language Choices
39
- - "ALWAYS" / "NEVER" (not "should" / "try to")
40
- - "even if faster" / "even if I seem in a hurry"
41
- - "STOP and re-analyze" (explicit pause)
42
- - "Don't skip past" (catches the actual behavior)
43
-
44
- ### Structural Defenses
45
- - **Phase 1 required** - Can't skip to implementation
46
- - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
- - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
- - **Anti-patterns section** - Shows exactly what shortcuts look like
49
-
50
- ### Redundancy
51
- - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
- - "NEVER fix symptom" appears 4 times in different contexts
53
- - Each phase has explicit "don't skip" guidance
54
-
55
- ## Testing Approach
56
-
57
- Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
-
59
- ### Test 1: Academic Context (No Pressure)
60
- - Simple bug, no time pressure
61
- - **Result:** Perfect compliance, complete investigation
62
-
63
- ### Test 2: Time Pressure + Obvious Quick Fix
64
- - User "in a hurry", symptom fix looks easy
65
- - **Result:** Resisted shortcut, followed full process, found real root cause
66
-
67
- ### Test 3: Complex System + Uncertainty
68
- - Multi-layer failure, unclear if can find root cause
69
- - **Result:** Systematic investigation, traced through all layers, found source
70
-
71
- ### Test 4: Failed First Fix
72
- - Hypothesis doesn't work, temptation to add more fixes
73
- - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
-
75
- **All tests passed.** No rationalizations found.
76
-
77
- ## Iterations
78
-
79
- ### Initial Version
80
- - Complete 4-phase framework
81
- - Anti-patterns section
82
- - Flowchart for "fix failed" decision
83
-
84
- ### Enhancement 1: TDD Reference
85
- - Added link to skills/testing/test-driven-development
86
- - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
- - Prevents confusion between methodologies
88
-
89
- ## Final Outcome
90
-
91
- Bulletproof skill that:
92
- - ✅ Clearly mandates root cause investigation
93
- - ✅ Resists time pressure rationalization
94
- - ✅ Provides concrete steps for each phase
95
- - ✅ Shows anti-patterns explicitly
96
- - ✅ Tested under multiple pressure scenarios
97
- - ✅ Clarifies relationship to TDD
98
- - ✅ Ready for use
99
-
100
- ## Key Insight
101
-
102
- **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
-
104
- ## Usage Example
105
-
106
- When encountering a bug:
107
- 1. Load skill: skills/debug-method
108
- 2. Read overview (10 sec) - reminded of mandate
109
- 3. Follow Phase 1 checklist - forced investigation
110
- 4. If tempted to skip - see anti-pattern, stop
111
- 5. Complete all phases - root cause found
112
-
113
- **Time investment:** 5-10 minutes
114
- **Time saved:** Hours of symptom-whack-a-mole
115
-
116
- ---
117
-
118
- *Created: 2025-10-03*
119
- *Purpose: Reference example for skill extraction and bulletproofing*