mindforge-cc 4.3.0 → 5.1.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 (150) hide show
  1. package/.agent/CLAUDE.md +14 -12
  2. package/.agent/hooks/mindforge-session-init_extended.js +42 -0
  3. package/.agent/settings.json +4 -0
  4. package/.agent/skills/mindforge-brainstorming/SKILL.md +164 -0
  5. package/.agent/skills/mindforge-brainstorming/scripts/frame-template.html +214 -0
  6. package/.agent/skills/mindforge-brainstorming/scripts/helper.js +88 -0
  7. package/.agent/skills/mindforge-brainstorming/scripts/server.cjs +354 -0
  8. package/.agent/skills/mindforge-brainstorming/scripts/start-server.sh +148 -0
  9. package/.agent/skills/mindforge-brainstorming/scripts/stop-server.sh +56 -0
  10. package/.agent/skills/mindforge-brainstorming/spec-document-reviewer-prompt.md +49 -0
  11. package/.agent/skills/mindforge-brainstorming/visual-companion.md +287 -0
  12. package/.agent/skills/mindforge-debug_extended/CREATION-LOG.md +119 -0
  13. package/.agent/skills/mindforge-debug_extended/SKILL.md +296 -0
  14. package/.agent/skills/mindforge-debug_extended/condition-based-waiting-example.ts +158 -0
  15. package/.agent/skills/mindforge-debug_extended/condition-based-waiting.md +115 -0
  16. package/.agent/skills/mindforge-debug_extended/defense-in-depth.md +122 -0
  17. package/.agent/skills/mindforge-debug_extended/find-polluter.sh +63 -0
  18. package/.agent/skills/mindforge-debug_extended/root-cause-tracing.md +169 -0
  19. package/.agent/skills/mindforge-debug_extended/test-academic.md +14 -0
  20. package/.agent/skills/mindforge-debug_extended/test-pressure-1.md +58 -0
  21. package/.agent/skills/mindforge-debug_extended/test-pressure-2.md +68 -0
  22. package/.agent/skills/mindforge-debug_extended/test-pressure-3.md +69 -0
  23. package/.agent/skills/mindforge-execute-phase_extended/SKILL.md +70 -0
  24. package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +115 -0
  25. package/.agent/skills/mindforge-neural-orchestrator/references/codex-tools.md +100 -0
  26. package/.agent/skills/mindforge-neural-orchestrator/references/gemini-tools.md +33 -0
  27. package/.agent/skills/mindforge-parallel-mesh_extended/SKILL.md +182 -0
  28. package/.agent/skills/mindforge-plan-phase_extended/SKILL.md +152 -0
  29. package/.agent/skills/mindforge-plan-phase_extended/plan-document-reviewer-prompt.md +49 -0
  30. package/.agent/skills/mindforge-review-inbound/SKILL.md +213 -0
  31. package/.agent/skills/mindforge-review-request/SKILL.md +105 -0
  32. package/.agent/skills/mindforge-review-request/code-reviewer.md +146 -0
  33. package/.agent/skills/mindforge-ship_extended/SKILL.md +200 -0
  34. package/.agent/skills/mindforge-skill-creation/SKILL.md +655 -0
  35. package/.agent/skills/mindforge-skill-creation/anthropic-best-practices.md +1150 -0
  36. package/.agent/skills/mindforge-skill-creation/examples/CLAUDE_MD_TESTING.md +189 -0
  37. package/.agent/skills/mindforge-skill-creation/graphviz-conventions.dot +172 -0
  38. package/.agent/skills/mindforge-skill-creation/persuasion-principles.md +187 -0
  39. package/.agent/skills/mindforge-skill-creation/render-graphs.js +168 -0
  40. package/.agent/skills/mindforge-skill-creation/testing-skills-with-subagents.md +384 -0
  41. package/.agent/skills/mindforge-swarm-execution/SKILL.md +277 -0
  42. package/.agent/skills/mindforge-swarm-execution/code-quality-reviewer-prompt.md +26 -0
  43. package/.agent/skills/mindforge-swarm-execution/implementer-prompt.md +113 -0
  44. package/.agent/skills/mindforge-swarm-execution/spec-reviewer-prompt.md +61 -0
  45. package/.agent/skills/mindforge-tdd_extended/SKILL.md +371 -0
  46. package/.agent/skills/mindforge-tdd_extended/testing-anti-patterns.md +299 -0
  47. package/.agent/skills/mindforge-verify-work_extended/SKILL.md +139 -0
  48. package/.agent/skills/mindforge-workspace-isolated/SKILL.md +218 -0
  49. package/.agent/workflows/mindforge-verify-work.md +5 -0
  50. package/.agent/workflows/mindforge:brainstorming.md +16 -0
  51. package/.agent/workflows/mindforge:debug.md +4 -2
  52. package/.agent/workflows/mindforge:execute-phase.md +12 -0
  53. package/.agent/workflows/mindforge:plan-phase.md +11 -0
  54. package/.agent/workflows/mindforge:ship.md +6 -1
  55. package/.agent/workflows/mindforge:tdd.md +7 -2
  56. package/.mindforge/engine/nexus-tracer.js +115 -0
  57. package/CHANGELOG.md +298 -122
  58. package/MINDFORGE.md +17 -9
  59. package/README.md +52 -100
  60. package/RELEASENOTES.md +23 -2
  61. package/bin/autonomous/auto-runner.js +154 -4
  62. package/bin/autonomous/context-refactorer.js +64 -0
  63. package/bin/autonomous/steer.js +19 -1
  64. package/bin/autonomous/stuck-monitor.js +43 -0
  65. package/bin/engine/handover-manager.js +69 -0
  66. package/bin/engine/nexus-tracer.js +67 -2
  67. package/bin/engine/sre-manager.js +63 -0
  68. package/bin/governance/policies/default-policies.jsonl +33 -0
  69. package/bin/governance/policy-engine.js +106 -0
  70. package/bin/governance/rbac-manager.js +109 -0
  71. package/bin/memory/eis-client.js +95 -0
  72. package/bin/memory/federated-sync.js +127 -0
  73. package/bin/memory/knowledge-graph.js +37 -0
  74. package/bin/models/cloud-broker.js +83 -0
  75. package/bin/models/model-broker.js +68 -49
  76. package/bin/skill-validator.js +41 -0
  77. package/docs/INTELLIGENCE-MESH.md +25 -22
  78. package/docs/PERSONAS.md +150 -2
  79. package/docs/architecture/PAR-ZTS-SURVEY.md +43 -0
  80. package/docs/architecture/README.md +31 -64
  81. package/docs/architecture/V5-ENTERPRISE.md +114 -0
  82. package/docs/commands-reference.md +20 -1
  83. package/docs/governance-guide.md +49 -28
  84. package/docs/security/SECURITY.md +9 -7
  85. package/docs/troubleshooting.md +24 -4
  86. package/docs/user-guide.md +61 -17
  87. package/docs/usp-features.md +3 -0
  88. package/package.json +1 -1
  89. /package/docs/{context → Context}/Master-Context.md +0 -0
  90. /package/docs/{references → References}/audit-events.md +0 -0
  91. /package/docs/{references → References}/checkpoints.md +0 -0
  92. /package/docs/{references → References}/commands.md +0 -0
  93. /package/docs/{references → References}/config-reference.md +0 -0
  94. /package/docs/{references → References}/continuation-format.md +0 -0
  95. /package/docs/{references → References}/decimal-phase-calculation.md +0 -0
  96. /package/docs/{references → References}/git-integration.md +0 -0
  97. /package/docs/{references → References}/git-planning-commit.md +0 -0
  98. /package/docs/{references → References}/model-profile-resolution.md +0 -0
  99. /package/docs/{references → References}/model-profiles.md +0 -0
  100. /package/docs/{references → References}/phase-argument-parsing.md +0 -0
  101. /package/docs/{references → References}/planning-config.md +0 -0
  102. /package/docs/{references → References}/questioning.md +0 -0
  103. /package/docs/{references → References}/sdk-api.md +0 -0
  104. /package/docs/{references → References}/skills-api.md +0 -0
  105. /package/docs/{references → References}/tdd.md +0 -0
  106. /package/docs/{references → References}/ui-brand.md +0 -0
  107. /package/docs/{references → References}/user-profiling.md +0 -0
  108. /package/docs/{references → References}/verification-patterns.md +0 -0
  109. /package/docs/{references → References}/workstream-flag.md +0 -0
  110. /package/docs/{templates → Templates}/Agents/CLAUDE-MD.md +0 -0
  111. /package/docs/{templates → Templates}/Agents/COPILOT-INSTRUCTIONS.md +0 -0
  112. /package/docs/{templates → Templates}/Agents/DEBUGGER-PROMPT.md +0 -0
  113. /package/docs/{templates → Templates}/Agents/PLANNER-PROMPT.md +0 -0
  114. /package/docs/{templates/codebase → Templates/Codebase}/architecture.md +0 -0
  115. /package/docs/{templates/codebase → Templates/Codebase}/concerns.md +0 -0
  116. /package/docs/{templates/codebase → Templates/Codebase}/conventions.md +0 -0
  117. /package/docs/{templates/codebase → Templates/Codebase}/integrations.md +0 -0
  118. /package/docs/{templates/codebase → Templates/Codebase}/stack.md +0 -0
  119. /package/docs/{templates/codebase → Templates/Codebase}/structure.md +0 -0
  120. /package/docs/{templates/codebase → Templates/Codebase}/testing.md +0 -0
  121. /package/docs/{templates → Templates}/Execution/CONTINUE-HERE.md +0 -0
  122. /package/docs/{templates → Templates}/Execution/DISCUSSION-LOG.md +0 -0
  123. /package/docs/{templates → Templates}/Execution/PHASE-PROMPT.md +0 -0
  124. /package/docs/{templates → Templates}/Execution/STATE.md +0 -0
  125. /package/docs/{templates → Templates}/Execution/SUMMARY-COMPLEX.md +0 -0
  126. /package/docs/{templates → Templates}/Execution/SUMMARY-MINIMAL.md +0 -0
  127. /package/docs/{templates → Templates}/Execution/SUMMARY-STANDARD.md +0 -0
  128. /package/docs/{templates → Templates}/Execution/SUMMARY.md +0 -0
  129. /package/docs/{templates → Templates}/Profile/DEV-PREFERENCES.md +0 -0
  130. /package/docs/{templates → Templates}/Profile/USER-PROFILE.md +0 -0
  131. /package/docs/{templates → Templates}/Profile/USER-SETUP.md +0 -0
  132. /package/docs/{templates → Templates}/Project/DISCOVERY.md +0 -0
  133. /package/docs/{templates → Templates}/Project/MILESTONE-ARCHIVE.md +0 -0
  134. /package/docs/{templates → Templates}/Project/MILESTONE.md +0 -0
  135. /package/docs/{templates → Templates}/Project/PROJECT.md +0 -0
  136. /package/docs/{templates → Templates}/Project/REQUIREMENTS.md +0 -0
  137. /package/docs/{templates → Templates}/Project/RETROSPECTIVE.md +0 -0
  138. /package/docs/{templates → Templates}/Project/ROADMAP.md +0 -0
  139. /package/docs/{templates → Templates}/Quality/DEBUG.md +0 -0
  140. /package/docs/{templates → Templates}/Quality/UAT.md +0 -0
  141. /package/docs/{templates → Templates}/Quality/UI-SPEC.md +0 -0
  142. /package/docs/{templates → Templates}/Quality/VALIDATION.md +0 -0
  143. /package/docs/{templates → Templates}/Quality/VERIFICATION-REPORT.md +0 -0
  144. /package/docs/{templates/research → Templates/Research}/ARCHITECTURE.md +0 -0
  145. /package/docs/{templates/research → Templates/Research}/FEATURES.md +0 -0
  146. /package/docs/{templates/research → Templates/Research}/PITFALLS.md +0 -0
  147. /package/docs/{templates/research → Templates/Research}/STACK.md +0 -0
  148. /package/docs/{templates/research → Templates/Research}/SUMMARY.md +0 -0
  149. /package/docs/{templates → Templates}/System/CONFIG.json +0 -0
  150. /package/docs/{templates → Templates}/System/CONTEXT.md +0 -0
@@ -0,0 +1,287 @@
1
+ # Visual Companion Guide
2
+
3
+ Browser-based visual brainstorming companion for showing mockups, diagrams, and options.
4
+
5
+ ## When to Use
6
+
7
+ Decide per-question, not per-session. The test: **would the user understand this better by seeing it than reading it?**
8
+
9
+ **Use the browser** when the content itself is visual:
10
+
11
+ - **UI mockups** — wireframes, layouts, navigation structures, component designs
12
+ - **Architecture diagrams** — system components, data flow, relationship maps
13
+ - **Side-by-side visual comparisons** — comparing two layouts, two color schemes, two design directions
14
+ - **Design polish** — when the question is about look and feel, spacing, visual hierarchy
15
+ - **Spatial relationships** — state machines, flowcharts, entity relationships rendered as diagrams
16
+
17
+ **Use the terminal** when the content is text or tabular:
18
+
19
+ - **Requirements and scope questions** — "what does X mean?", "which features are in scope?"
20
+ - **Conceptual A/B/C choices** — picking between approaches described in words
21
+ - **Tradeoff lists** — pros/cons, comparison tables
22
+ - **Technical decisions** — API design, data modeling, architectural approach selection
23
+ - **Clarifying questions** — anything where the answer is words, not a visual preference
24
+
25
+ A question *about* a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser.
26
+
27
+ ## How It Works
28
+
29
+ The server watches a directory for HTML files and serves the newest one to the browser. You write HTML content to `screen_dir`, the user sees it in their browser and can click to select options. Selections are recorded to `state_dir/events` that you read on your next turn.
30
+
31
+ **Content fragments vs full documents:** If your HTML file starts with `<!DOCTYPE` or `<html`, the server serves it as-is (just injects the helper script). Otherwise, the server automatically wraps your content in the frame template — adding the header, CSS theme, selection indicator, and all interactive infrastructure. **Write content fragments by default.** Only write full documents when you need complete control over the page.
32
+
33
+ ## Starting a Session
34
+
35
+ ```bash
36
+ # Start server with persistence (mockups saved to project)
37
+ scripts/start-server.sh --project-dir /path/to/project
38
+
39
+ # Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
40
+ # "screen_dir":"/path/to/project/.mindforge/brainstorm/12345-1706000000/content",
41
+ # "state_dir":"/path/to/project/.mindforge/brainstorm/12345-1706000000/state"}
42
+ ```
43
+
44
+ Save `screen_dir` and `state_dir` from the response. Tell user to open the URL.
45
+
46
+ **Finding connection info:** The server writes its startup JSON to `$STATE_DIR/server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.mindforge/brainstorm/` for the session directory.
47
+
48
+ **Note:** Pass the project root as `--project-dir` so mockups persist in `.mindforge/brainstorm/` and survive server restarts. Without it, files go to `/tmp` and get cleaned up. Remind the user to add `.mindforge/` to `.gitignore` if it's not already there.
49
+
50
+ **Launching the server by platform:**
51
+
52
+ **Claude Code (macOS / Linux):**
53
+ ```bash
54
+ # Default mode works — the script backgrounds the server itself
55
+ scripts/start-server.sh --project-dir /path/to/project
56
+ ```
57
+
58
+ **Claude Code (Windows):**
59
+ ```bash
60
+ # Windows auto-detects and uses foreground mode, which blocks the tool call.
61
+ # Use run_in_background: true on the Bash tool call so the server survives
62
+ # across conversation turns.
63
+ scripts/start-server.sh --project-dir /path/to/project
64
+ ```
65
+ When calling this via the Bash tool, set `run_in_background: true`. Then read `$STATE_DIR/server-info` on the next turn to get the URL and port.
66
+
67
+ **Codex:**
68
+ ```bash
69
+ # Codex reaps background processes. The script auto-detects CODEX_CI and
70
+ # switches to foreground mode. Run it normally — no extra flags needed.
71
+ scripts/start-server.sh --project-dir /path/to/project
72
+ ```
73
+
74
+ **Gemini CLI:**
75
+ ```bash
76
+ # Use --foreground and set is_background: true on your shell tool call
77
+ # so the process survives across turns
78
+ scripts/start-server.sh --project-dir /path/to/project --foreground
79
+ ```
80
+
81
+ **Other environments:** The server must keep running in the background across conversation turns. If your environment reaps detached processes, use `--foreground` and launch the command with your platform's background execution mechanism.
82
+
83
+ If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:
84
+
85
+ ```bash
86
+ scripts/start-server.sh \
87
+ --project-dir /path/to/project \
88
+ --host 0.0.0.0 \
89
+ --url-host localhost
90
+ ```
91
+
92
+ Use `--url-host` to control what hostname is printed in the returned URL JSON.
93
+
94
+ ## The Loop
95
+
96
+ 1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
97
+ - Before each write, check that `$STATE_DIR/server-info` exists. If it doesn't (or `$STATE_DIR/server-stopped` exists), the server has shut down — restart it with `start-server.sh` before continuing. The server auto-exits after 30 minutes of inactivity.
98
+ - Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
99
+ - **Never reuse filenames** — each screen gets a fresh file
100
+ - Use Write tool — **never use cat/heredoc** (dumps noise into terminal)
101
+ - Server automatically serves the newest file
102
+
103
+ 2. **Tell user what to expect and end your turn:**
104
+ - Remind them of the URL (every step, not just first)
105
+ - Give a brief text summary of what's on screen (e.g., "Showing 3 layout options for the homepage")
106
+ - Ask them to respond in the terminal: "Take a look and let me know what you think. Click to select an option if you'd like."
107
+
108
+ 3. **On your next turn** — after the user responds in the terminal:
109
+ - Read `$STATE_DIR/events` if it exists — this contains the user's browser interactions (clicks, selections) as JSON lines
110
+ - Merge with the user's terminal text to get the full picture
111
+ - The terminal message is the primary feedback; `state_dir/events` provides structured interaction data
112
+
113
+ 4. **Iterate or advance** — if feedback changes current screen, write a new file (e.g., `layout-v2.html`). Only move to the next question when the current step is validated.
114
+
115
+ 5. **Unload when returning to terminal** — when the next step doesn't need the browser (e.g., a clarifying question, a tradeoff discussion), push a waiting screen to clear the stale content:
116
+
117
+ ```html
118
+ <!-- filename: waiting.html (or waiting-2.html, etc.) -->
119
+ <div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
120
+ <p class="subtitle">Continuing in terminal...</p>
121
+ </div>
122
+ ```
123
+
124
+ This prevents the user from staring at a resolved choice while the conversation has moved on. When the next visual question comes up, push a new content file as usual.
125
+
126
+ 6. Repeat until done.
127
+
128
+ ## Writing Content Fragments
129
+
130
+ Write just the content that goes inside the page. The server wraps it in the frame template automatically (header, theme CSS, selection indicator, and all interactive infrastructure).
131
+
132
+ **Minimal example:**
133
+
134
+ ```html
135
+ <h2>Which layout works better?</h2>
136
+ <p class="subtitle">Consider readability and visual hierarchy</p>
137
+
138
+ <div class="options">
139
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
140
+ <div class="letter">A</div>
141
+ <div class="content">
142
+ <h3>Single Column</h3>
143
+ <p>Clean, focused reading experience</p>
144
+ </div>
145
+ </div>
146
+ <div class="option" data-choice="b" onclick="toggleSelect(this)">
147
+ <div class="letter">B</div>
148
+ <div class="content">
149
+ <h3>Two Column</h3>
150
+ <p>Sidebar navigation with main content</p>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ ```
155
+
156
+ That's it. No `<html>`, no CSS, no `<script>` tags needed. The server provides all of that.
157
+
158
+ ## CSS Classes Available
159
+
160
+ The frame template provides these CSS classes for your content:
161
+
162
+ ### Options (A/B/C choices)
163
+
164
+ ```html
165
+ <div class="options">
166
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
167
+ <div class="letter">A</div>
168
+ <div class="content">
169
+ <h3>Title</h3>
170
+ <p>Description</p>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ ```
175
+
176
+ **Multi-select:** Add `data-multiselect` to the container to let users select multiple options. Each click toggles the item. The indicator bar shows the count.
177
+
178
+ ```html
179
+ <div class="options" data-multiselect>
180
+ <!-- same option markup — users can select/deselect multiple -->
181
+ </div>
182
+ ```
183
+
184
+ ### Cards (visual designs)
185
+
186
+ ```html
187
+ <div class="cards">
188
+ <div class="card" data-choice="design1" onclick="toggleSelect(this)">
189
+ <div class="card-image"><!-- mockup content --></div>
190
+ <div class="card-body">
191
+ <h3>Name</h3>
192
+ <p>Description</p>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ ```
197
+
198
+ ### Mockup container
199
+
200
+ ```html
201
+ <div class="mockup">
202
+ <div class="mockup-header">Preview: Dashboard Layout</div>
203
+ <div class="mockup-body"><!-- your mockup HTML --></div>
204
+ </div>
205
+ ```
206
+
207
+ ### Split view (side-by-side)
208
+
209
+ ```html
210
+ <div class="split">
211
+ <div class="mockup"><!-- left --></div>
212
+ <div class="mockup"><!-- right --></div>
213
+ </div>
214
+ ```
215
+
216
+ ### Pros/Cons
217
+
218
+ ```html
219
+ <div class="pros-cons">
220
+ <div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
221
+ <div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
222
+ </div>
223
+ ```
224
+
225
+ ### Mock elements (wireframe building blocks)
226
+
227
+ ```html
228
+ <div class="mock-nav">Logo | Home | About | Contact</div>
229
+ <div style="display: flex;">
230
+ <div class="mock-sidebar">Navigation</div>
231
+ <div class="mock-content">Main content area</div>
232
+ </div>
233
+ <button class="mock-button">Action Button</button>
234
+ <input class="mock-input" placeholder="Input field">
235
+ <div class="placeholder">Placeholder area</div>
236
+ ```
237
+
238
+ ### Typography and sections
239
+
240
+ - `h2` — page title
241
+ - `h3` — section heading
242
+ - `.subtitle` — secondary text below title
243
+ - `.section` — content block with bottom margin
244
+ - `.label` — small uppercase label text
245
+
246
+ ## Browser Events Format
247
+
248
+ When the user clicks options in the browser, their interactions are recorded to `$STATE_DIR/events` (one JSON object per line). The file is cleared automatically when you push a new screen.
249
+
250
+ ```jsonl
251
+ {"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
252
+ {"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}
253
+ {"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115}
254
+ ```
255
+
256
+ The full event stream shows the user's exploration path — they may click multiple options before settling. The last `choice` event is typically the final selection, but the pattern of clicks can reveal hesitation or preferences worth asking about.
257
+
258
+ If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser — use only their terminal text.
259
+
260
+ ## Design Tips
261
+
262
+ - **Scale fidelity to the question** — wireframes for layout, polish for polish questions
263
+ - **Explain the question on each page** — "Which layout feels more professional?" not just "Pick one"
264
+ - **Iterate before advancing** — if feedback changes current screen, write a new version
265
+ - **2-4 options max** per screen
266
+ - **Use real content when it matters** — for a photography portfolio, use actual images (Unsplash). Placeholder content obscures design issues.
267
+ - **Keep mockups simple** — focus on layout and structure, not pixel-perfect design
268
+
269
+ ## File Naming
270
+
271
+ - Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
272
+ - Never reuse filenames — each screen must be a new file
273
+ - For iterations: append version suffix like `layout-v2.html`, `layout-v3.html`
274
+ - Server serves newest file by modification time
275
+
276
+ ## Cleaning Up
277
+
278
+ ```bash
279
+ scripts/stop-server.sh $SESSION_DIR
280
+ ```
281
+
282
+ If the session used `--project-dir`, mockup files persist in `.mindforge/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.
283
+
284
+ ## Reference
285
+
286
+ - Frame template (CSS reference): `scripts/frame-template.html`
287
+ - Helper script (client-side): `scripts/helper.js`
@@ -0,0 +1,119 @@
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/mindforge-tdd_extended
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/debugging/mindforge-debug_extended
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*