@bendyline/gilde 0.1.4 → 0.1.5

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 (141) hide show
  1. package/README.md +1 -0
  2. package/data/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +4 -3
  3. package/data/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +4 -3
  4. package/data/chat-models/ge/gemma4-12b-q4/manifest.json +20 -11
  5. package/data/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +2 -8
  6. package/data/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
  7. package/data/chat-models/ge/gemma4-12b-q8/manifest.json +23 -14
  8. package/data/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +2 -8
  9. package/data/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
  10. package/data/chat-models/ge/gemma4-26b-q4/manifest.json +55 -46
  11. package/data/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +2 -8
  12. package/data/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +81 -0
  13. package/data/chat-models/ge/gemma4-31b-q4/manifest.json +36 -28
  14. package/data/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +2 -8
  15. package/data/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +87 -0
  16. package/data/chat-models/ge/gemma4-e2b-q8/manifest.json +76 -69
  17. package/data/chat-models/ge/gemma4-e2b-q8/versions/1.1.0/manifest.json +2 -8
  18. package/data/chat-models/ge/gemma4-e2b-q8/versions/1.1.2/manifest.json +71 -0
  19. package/data/chat-models/ge/gemma4-e4b-q8/manifest.json +71 -78
  20. package/data/chat-models/ge/gemma4-e4b-q8/versions/1.1.0/manifest.json +3 -9
  21. package/data/chat-models/ge/gemma4-e4b-q8/versions/1.1.2/manifest.json +71 -0
  22. package/data/chat-models/index.json +1 -1
  23. package/data/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +17 -17
  24. package/data/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
  25. package/data/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +7 -7
  26. package/data/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
  27. package/data/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +4 -17
  28. package/data/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +2 -12
  29. package/data/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +5 -0
  30. package/data/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +27 -19
  31. package/data/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
  32. package/data/chat-models/qw/qwen3.5-2b-q4/manifest.json +79 -77
  33. package/data/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +2 -8
  34. package/data/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
  35. package/data/chat-models/qw/qwen3.5-4b-q4/manifest.json +79 -77
  36. package/data/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +2 -8
  37. package/data/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
  38. package/data/chat-models/qw/qwen3.5-9b-q4/manifest.json +87 -85
  39. package/data/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +2 -8
  40. package/data/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
  41. package/data/chat-models/qw/qwen3.6-27b-q4/manifest.json +99 -97
  42. package/data/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +2 -8
  43. package/data/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
  44. package/data/chat-models/qw/qwen3.6-27b-q8/manifest.json +16 -12
  45. package/data/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +2 -8
  46. package/data/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
  47. package/data/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +18 -14
  48. package/data/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +2 -8
  49. package/data/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
  50. package/data/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +16 -12
  51. package/data/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +2 -8
  52. package/data/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
  53. package/data/craftbook-templates/bu/bug-fix-tdd/versions/1.0.1/test.json +0 -5
  54. package/data/craftbook-templates/bu/build-loop/versions/1.1.0/craftbook.json +65 -0
  55. package/data/craftbook-templates/bu/build-loop/versions/1.1.0/test.json +121 -0
  56. package/data/craftbook-templates/ch/character-sheet/versions/1.0.0/test.json +1 -2
  57. package/data/craftbook-templates/ch/character-turnaround/versions/1.0.0/test.json +1 -2
  58. package/data/craftbook-templates/cl/cli-tool/versions/1.1.0/craftbook.json +139 -0
  59. package/data/craftbook-templates/cl/cli-tool/versions/1.1.0/test.json +128 -0
  60. package/data/craftbook-templates/cr/crossword-forge/manifest.json +1 -2
  61. package/data/craftbook-templates/de/deep-security-review/versions/1.1.0/craftbook.json +201 -0
  62. package/data/craftbook-templates/de/deep-security-review/versions/1.1.0/test.json +157 -0
  63. package/data/craftbook-templates/do/dockerize-app/versions/1.0.0/test.json +0 -5
  64. package/data/craftbook-templates/fr/freeze-scope/manifest.json +1 -2
  65. package/data/craftbook-templates/fr/freeze-scope/versions/{1.0.1 → 1.1.0}/craftbook.json +5 -17
  66. package/data/craftbook-templates/gr/graphql-api/versions/1.0.1/test.json +0 -5
  67. package/data/craftbook-templates/gr/grpc-service/versions/1.0.0/test.json +0 -5
  68. package/data/craftbook-templates/ho/hotfix-flow/versions/1.0.0/test.json +0 -5
  69. package/data/craftbook-templates/in/investigate/versions/1.1.0/craftbook.json +81 -0
  70. package/data/craftbook-templates/in/investigate/versions/1.1.0/test.json +122 -0
  71. package/data/craftbook-templates/in/invoice-run/manifest.json +1 -2
  72. package/data/craftbook-templates/in/invoice-run/versions/{1.0.1 → 1.1.0}/craftbook.json +4 -4
  73. package/data/craftbook-templates/index.json +1 -1
  74. package/data/craftbook-templates/li/library-package/versions/1.0.0/test.json +0 -5
  75. package/data/craftbook-templates/me/memory-prompt-session/manifest.json +1 -2
  76. package/data/craftbook-templates/me/message-queue-consumer/versions/1.0.0/test.json +0 -5
  77. package/data/craftbook-templates/of/office-hours/versions/1.1.0/craftbook.json +48 -0
  78. package/data/craftbook-templates/of/office-hours/versions/1.1.0/test.json +118 -0
  79. package/data/craftbook-templates/pa/page-spread/manifest.json +1 -2
  80. package/data/craftbook-templates/pa/parser-grammar/versions/1.0.0/test.json +0 -5
  81. package/data/craftbook-templates/pe/perf-optimization/versions/1.0.0/test.json +0 -5
  82. package/data/craftbook-templates/pl/plan/manifest.json +1 -2
  83. package/data/craftbook-templates/po/powerpoint-deck/versions/1.1.0/craftbook.json +128 -0
  84. package/data/craftbook-templates/{ro/root-cause-investigation/versions/1.0.1 → po/powerpoint-deck/versions/1.1.0}/test.json +6 -6
  85. package/data/craftbook-templates/pu/pull-request-review/versions/1.1.0/craftbook.json +118 -0
  86. package/data/craftbook-templates/pu/pull-request-review/versions/1.1.0/test.json +160 -0
  87. package/data/craftbook-templates/re/refactor-module/versions/1.0.1/test.json +0 -5
  88. package/data/craftbook-templates/re/regex-builder/versions/1.0.0/test.json +0 -5
  89. package/data/craftbook-templates/re/research-to-document/versions/1.1.0/craftbook.json +158 -0
  90. package/data/craftbook-templates/re/research-to-document/versions/1.1.0/test.json +97 -0
  91. package/data/craftbook-templates/ro/root-cause-investigation/manifest.json +1 -2
  92. package/data/craftbook-templates/sd/sdk-wrapper/versions/1.0.1/test.json +0 -5
  93. package/data/craftbook-templates/se/security-architecture-review/versions/1.1.0/craftbook.json +28 -0
  94. package/data/craftbook-templates/{te/technical-documentation/versions/1.0.1 → se/security-architecture-review/versions/1.1.0}/test.json +7 -7
  95. package/data/craftbook-templates/sh/ship/versions/1.1.0/craftbook.json +137 -0
  96. package/data/craftbook-templates/sh/ship/versions/1.1.0/test.json +225 -0
  97. package/data/craftbook-templates/st/state-machine/versions/1.0.0/test.json +0 -5
  98. package/data/craftbook-templates/te/technical-documentation/manifest.json +1 -2
  99. package/data/craftbook-templates/te/test-suite-backfill/versions/1.0.0/test.json +0 -5
  100. package/data/craftbook-templates/ti/tileset-batch/versions/1.0.0/test.json +1 -2
  101. package/data/craftbook-templates/ty/type-safety-pass/versions/1.0.0/test.json +0 -5
  102. package/data/craftbook-templates/ve/version-bump/versions/1.0.0/test.json +0 -5
  103. package/data/gezel-templates/ch/chess-player/manifest.json +20 -0
  104. package/data/gezel-templates/ch/chess-player/versions/1.0.0/about.md +21 -0
  105. package/data/gezel-templates/ch/chess-player/versions/1.0.0/manifest.json +10 -0
  106. package/data/gezel-templates/go/go-player/manifest.json +22 -0
  107. package/data/gezel-templates/go/go-player/versions/1.0.0/about.md +22 -0
  108. package/data/gezel-templates/go/go-player/versions/1.0.0/manifest.json +10 -0
  109. package/data/gezel-templates/index.json +1 -1
  110. package/data/project-types/ch/chess/manifest.json +20 -0
  111. package/data/project-types/ch/chess/versions/1.0.0/about.md +9 -0
  112. package/data/project-types/ch/chess/versions/1.0.0/game.json +127 -0
  113. package/data/project-types/ch/chess/versions/1.0.0/manifest.json +180 -0
  114. package/data/project-types/ch/chess/versions/1.0.0/mission.md +8 -0
  115. package/data/project-types/ch/chess/versions/1.0.0/pages/board/index.html +574 -0
  116. package/data/project-types/go/go/manifest.json +22 -0
  117. package/data/project-types/go/go/versions/1.0.0/about.md +9 -0
  118. package/data/project-types/go/go/versions/1.0.0/game.json +103 -0
  119. package/data/project-types/go/go/versions/1.0.0/manifest.json +166 -0
  120. package/data/project-types/go/go/versions/1.0.0/mission.md +8 -0
  121. package/data/project-types/go/go/versions/1.0.0/pages/board/index.html +637 -0
  122. package/data/project-types/index.json +1 -1
  123. package/package.json +2 -1
  124. package/schemas/chat-model-version.schema.json +22 -0
  125. package/schemas/craftbook-doc.schema.json +12 -0
  126. package/schemas/craftbook-template-version.schema.json +12 -0
  127. package/schemas/craftbook-test.schema.json +12 -0
  128. package/data/chat-models/gl/glm-5.2-754b-q2/manifest.json +0 -66
  129. package/data/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +0 -18
  130. package/data/craftbook-templates/cr/crossword-forge/versions/1.0.1/craftbook.json +0 -147
  131. package/data/craftbook-templates/cr/crossword-forge/versions/1.0.1/test.json +0 -135
  132. package/data/craftbook-templates/me/memory-prompt-session/versions/1.0.1/craftbook.json +0 -116
  133. package/data/craftbook-templates/me/memory-prompt-session/versions/1.0.1/test.json +0 -112
  134. package/data/craftbook-templates/pa/page-spread/versions/1.0.1/craftbook.json +0 -94
  135. package/data/craftbook-templates/pa/page-spread/versions/1.0.1/test.json +0 -133
  136. package/data/craftbook-templates/pl/plan/versions/1.0.1/craftbook.json +0 -104
  137. package/data/craftbook-templates/pl/plan/versions/1.0.1/test.json +0 -91
  138. package/data/craftbook-templates/ro/root-cause-investigation/versions/1.0.1/craftbook.json +0 -126
  139. package/data/craftbook-templates/te/technical-documentation/versions/1.0.1/craftbook.json +0 -152
  140. /package/data/craftbook-templates/fr/freeze-scope/versions/{1.0.1 → 1.1.0}/test.json +0 -0
  141. /package/data/craftbook-templates/in/invoice-run/versions/{1.0.1 → 1.1.0}/test.json +0 -0
@@ -1,91 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "title": "Reviewable draft task plan",
4
- "objective": "Measure whether the plan craftbook creates a real draft task with a substantial about, concrete outcomes, gated build steps, and a terminal verification step.",
5
- "tags": [
6
- "planning"
7
- ],
8
- "prompt": "In the `Plan Eval` project, author a reviewable draft plan for building a self-contained `index.html` bug triage board for a small support team. The eventual board should let users add bugs, assign severity, filter open/closed items, and show a summary. Use the plan flow/start_plan rather than building the board now: the output should be a draft task with strong outcomes, ordered gated build steps, and a final verification step for the user to review and activate. Important: every non-terminal build step on the draft, including the initial placeholder step if you keep or rename it, must get `set_step_deliverable({ task: \"<draftRef>\", stepId, path: \"index.html\", kind: \"html-page\" })` before you finish.",
9
- "setup": {
10
- "projectName": "Plan Eval",
11
- "about": "Self-contained eval project for the plan craftbook. The deliverable is a reviewable draft task, not workspace files.",
12
- "missionObjectives": "Author a high-quality draft task plan for a bug triage board, including outcomes, gated build steps, and verification before activation. A build step is not gated until set_step_deliverable is called on that exact step.",
13
- "files": [],
14
- "worker": {
15
- "name": "Pieter",
16
- "role": "Planner"
17
- }
18
- },
19
- "mocks": [],
20
- "success": {
21
- "summary": "A task sourced from the plan craftbook points to a draft task with outcomes, gated build steps, and terminal verification.",
22
- "taskGraph": {
23
- "checks": [
24
- {
25
- "kind": "contains",
26
- "file": "task-graph.md",
27
- "pattern": "index.html",
28
- "flags": "i"
29
- },
30
- {
31
- "kind": "contains",
32
- "file": "task-graph.md",
33
- "pattern": "bug|triage",
34
- "flags": "i"
35
- },
36
- {
37
- "kind": "contains",
38
- "file": "task-graph.md",
39
- "pattern": "severity",
40
- "flags": "i"
41
- },
42
- {
43
- "kind": "contains",
44
- "file": "task-graph.md",
45
- "pattern": "verify|outcome|evidence",
46
- "flags": "i"
47
- }
48
- ],
49
- "requireCraftbookTask": true,
50
- "requireDraftRef": true,
51
- "draft": {
52
- "status": "draft",
53
- "minDescriptionBytes": 120,
54
- "minOutcomes": 3,
55
- "minSteps": 3,
56
- "requireTerminalVerification": true,
57
- "requireGatedBuildSteps": true
58
- }
59
- }
60
- },
61
- "rubric": {
62
- "artifact": {
63
- "path": "task-graph.md",
64
- "kind": "markdown"
65
- },
66
- "axes": [
67
- {
68
- "name": "playability",
69
- "description": "The game is actually playable: input works, state advances, and a session can be completed."
70
- },
71
- {
72
- "name": "completeness",
73
- "description": "Core loop, scoring/win-lose, and restart are all present rather than stubbed."
74
- },
75
- {
76
- "name": "polish",
77
- "description": "Visual design and feedback (motion, states, messages) feel deliberate, not default."
78
- },
79
- {
80
- "name": "robustness",
81
- "description": "No console errors, dead controls, or states the player can get stuck in."
82
- }
83
- ]
84
- },
85
- "qualityFocus": [
86
- "task-native deliverable",
87
- "outcomes",
88
- "gated build steps",
89
- "verification step"
90
- ]
91
- }
@@ -1,126 +0,0 @@
1
- {
2
- "id": "root-cause-investigation",
3
- "name": "Root-Cause Investigation",
4
- "description": "Debug systematically: reproduce the failure and find the true root cause before changing any code, then fix and verify. Enforces a no-fix-without-diagnosis discipline.",
5
- "basedOn": {
6
- "name": "gstack",
7
- "url": "https://github.com/garrytan/gstack"
8
- },
9
- "plan": "## Iron Law\n\n**NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**\n\nFixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.\n\n---\n\n## Important Rules\n\n- **3+ failed fix attempts → STOP and question the architecture.** Wrong architecture, not failed hypothesis.\n- **Never apply a fix you cannot verify.** If you can't reproduce and confirm, don't ship it.\n- **Never say \"this should fix it.\"** Verify and prove it. Run the tests.\n- **If fix touches >5 files → AskUserQuestion** about blast radius before proceeding.\n- **Completion status:**\n - DONE — root cause found, fix applied, regression test written, all tests pass\n - DONE_WITH_CONCERNS — fixed but cannot fully verify (e.g., intermittent bug, requires staging)\n - BLOCKED — root cause unclear after investigation, escalated",
10
- "entryStepId": "phase-1",
11
- "triggers": [
12
- "debug this",
13
- "fix this bug",
14
- "why is this broken",
15
- "root cause analysis",
16
- "investigate this error"
17
- ],
18
- "command": "root-cause-investigation",
19
- "steps": [
20
- {
21
- "id": "phase-1",
22
- "name": "Phase 1: Root Cause Investigation",
23
- "prompt": "> **Iron Law:**\n> **NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**\n> \n> Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.\n> \n> ---\n\nGather context before forming any hypothesis.\n\n1. **Collect symptoms:** Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time via ask_user_question.\n\n2. **Read the code:** Trace the code path from the symptom back to potential causes. Use search_code to find all references, readFile to understand the logic.\n\n3. **Check recent changes:**\n ```bash\n git log --oneline -20 -- <affected-files>\n ```\n Was this working before? What changed? A regression means the root cause is in the diff.\n\n4. **Reproduce:** Can you trigger the bug deterministically? If not, gather more evidence before proceeding.\n\n5. **Check investigation history:** Search prior learnings for investigations on the same files. Recurring bugs in the same area are an architectural smell. If prior investigations exist, note patterns and check if the root cause was structural.\n\n### Scope Lock\n\nAfter forming your root cause hypothesis, lock edits to the affected module to prevent scope creep.\n\n**If FREEZE_AVAILABLE:** Identify the narrowest directory containing the affected files. Write it to the freeze state file:\n\nSubstitute `<detected-directory>` with the actual directory path (e.g., `src/auth/`). Tell the user: \"Edits restricted to `<dir>/` for this debug session. This prevents changes to unrelated code. Run `/unfreeze` to remove the restriction.\"\n\nIf the bug spans the entire repo or the scope is genuinely unclear, skip the lock and note why.\n\n**If FREEZE_UNAVAILABLE:** Skip scope lock. Edits are unrestricted.\n\n---\n\nKeep a running record in notes/investigation.md: symptoms, the traced code path, and candidate causes.",
24
- "next": "phase-2",
25
- "suggestedRole": "developer",
26
- "gate": {
27
- "maxAttempts": 3,
28
- "checks": [
29
- {
30
- "kind": "minBytes",
31
- "file": "notes/investigation.md",
32
- "bytes": 300
33
- }
34
- ]
35
- }
36
- },
37
- {
38
- "id": "phase-2",
39
- "name": "Phase 2: Pattern Analysis",
40
- "prompt": "Check if this bug matches a known pattern:\n\n| Pattern | Signature | Where to look |\n|---------|-----------|---------------|\n| Race condition | Intermittent, timing-dependent | Concurrent access to shared state |\n| Nil/null propagation | NoMethodError, TypeError | Missing guards on optional values |\n| State corruption | Inconsistent data, partial updates | Transactions, callbacks, hooks |\n| Integration failure | Timeout, unexpected response | External API calls, service boundaries |\n| Configuration drift | Works locally, fails in staging/prod | Env vars, feature flags, DB state |\n| Stale cache | Shows old data, fixes on cache clear | Redis, CDN, browser cache, Turbo |\n\nAlso check:\n- `TODOS.md` for related known issues\n- `git log` for prior fixes in the same area — **recurring bugs in the same files are an architectural smell**, not a coincidence\n\n**External pattern search:** If the bug doesn't match a known pattern above, WebSearch for:\n- \"{framework} {generic error type}\" — **sanitize first:** strip hostnames, IPs, file paths, SQL, customer data. Search the error category, not the raw message.\n- \"{library} {component} known issues\"\n\nIf WebSearch is unavailable, skip this search and proceed with hypothesis testing. If a documented solution or known dependency bug surfaces, present it as a candidate hypothesis in Phase 3.\n\n---\n\nAppend a '## Pattern' section to notes/investigation.md naming the matched pattern (or 'novel — no known pattern').",
41
- "next": "phase-3",
42
- "suggestedRole": "developer",
43
- "gate": {
44
- "maxAttempts": 3,
45
- "checks": [
46
- {
47
- "kind": "contains",
48
- "file": "notes/investigation.md",
49
- "pattern": "##\\s*Pattern",
50
- "flags": "i"
51
- }
52
- ]
53
- }
54
- },
55
- {
56
- "id": "phase-3",
57
- "name": "Phase 3: Hypothesis Testing",
58
- "prompt": "Before writing ANY fix, verify your hypothesis.\n\n1. **Confirm the hypothesis:** Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match?\n\n2. **If the hypothesis is wrong:** Before forming the next hypothesis, consider searching for the error. **Sanitize first** — strip hostnames, IPs, file paths, SQL fragments, customer identifiers, and any internal/proprietary data from the error message. Search only the generic error type and framework context: \"{component} {sanitized error type} {framework version}\". If the error message is too specific to sanitize safely, skip the search. If WebSearch is unavailable, skip and proceed. Then return to Phase 1. Gather more evidence. Do not guess.\n\n3. **3-strike rule:** If 3 hypotheses fail, **STOP**. Use ask_user_question:\n ```\n 3 hypotheses tested, none match. This may be an architectural issue\n rather than a simple bug.\n\n A) Continue investigating — I have a new hypothesis: [describe]\n B) Escalate for human review — this needs someone who knows the system\n C) Add logging and wait — instrument the area and catch it next time\n ```\n\n**Red flags** — if you see any of these, slow down:\n- \"Quick fix for now\" — there is no \"for now.\" Fix it right or escalate.\n- Proposing a fix before tracing data flow — you're guessing.\n- Each fix reveals a new problem elsewhere — wrong layer, not wrong code.\n\n---\n\nAppend a '## Hypothesis' section to notes/investigation.md: the confirmed root cause plus the one line of evidence that confirmed it.",
59
- "next": "phase-4",
60
- "suggestedRole": "developer",
61
- "gate": {
62
- "maxAttempts": 4,
63
- "checks": [
64
- {
65
- "kind": "contains",
66
- "file": "notes/investigation.md",
67
- "pattern": "##\\s*Hypothesis",
68
- "flags": "i"
69
- }
70
- ]
71
- }
72
- },
73
- {
74
- "id": "phase-4",
75
- "name": "Phase 4: Implementation",
76
- "prompt": "Once root cause is confirmed:\n\n1. **Fix the root cause, not the symptom.** The smallest change that eliminates the actual problem.\n\n2. **Minimal diff:** Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code.\n\n3. **Write a regression test** that:\n - **Fails** without the fix (proves the test is meaningful)\n - **Passes** with the fix (proves the fix works)\n\n4. **Run the full test suite.** Paste the output. No regressions allowed.\n\n5. **If the fix touches >5 files:** Use ask_user_question to flag the blast radius:\n ```\n This fix touches N files. That's a large blast radius for a bug fix.\n A) Proceed — the root cause genuinely spans these files\n B) Split — fix the critical path now, defer the rest\n C) Rethink — maybe there's a more targeted approach\n ```\n\n---",
77
- "next": "phase-5",
78
- "suggestedRole": "developer"
79
- },
80
- {
81
- "id": "phase-5",
82
- "name": "Phase 5: Verification & Report",
83
- "prompt": "**Fresh verification:** Reproduce the original bug scenario and confirm it's fixed. This is not optional.\n\nRun the test suite and paste the output.\n\nOutput a structured debug report:\n```\nDEBUG REPORT\n════════════════════════════════════════\nSymptom: [what the user observed]\nRoot cause: [what was actually wrong]\nFix: [what was changed, with file:line references]\nEvidence: [test output, reproduction attempt showing fix works]\nRegression test: [file:line of the new test]\nRelated: [TODOS.md items, prior bugs in same area, architectural notes]\nStatus: DONE | DONE_WITH_CONCERNS | BLOCKED\n════════════════════════════════════════\n```\n\nLog the investigation as a learning for future sessions. Use `type: \"investigation\"` and include the affected files so future investigations on the same area can find this:\n\n### Important Rules\n\n- **3+ failed fix attempts → STOP and question the architecture.** Wrong architecture, not failed hypothesis.\n- **Never apply a fix you cannot verify.** If you can't reproduce and confirm, don't ship it.\n- **Never say \"this should fix it.\"** Verify and prove it. Run the tests.\n- **If fix touches >5 files → ask_user_question** about blast radius before proceeding.\n- **Completion status:**\n - DONE — root cause found, fix applied, regression test written, all tests pass\n - DONE_WITH_CONCERNS — fixed but cannot fully verify (e.g., intermittent bug, requires staging)\n - BLOCKED — root cause unclear after investigation, escalated\n\nWrite the structured debug report to debug-report.md using the block above.",
84
- "suggestedRole": "reviewer",
85
- "gate": {
86
- "maxAttempts": 4,
87
- "checks": [
88
- {
89
- "kind": "minBytes",
90
- "file": "debug-report.md",
91
- "bytes": 400
92
- },
93
- {
94
- "kind": "contains",
95
- "file": "debug-report.md",
96
- "pattern": "Root cause",
97
- "flags": "i"
98
- },
99
- {
100
- "kind": "contains",
101
- "file": "debug-report.md",
102
- "pattern": "Regression test",
103
- "flags": "i"
104
- }
105
- ]
106
- },
107
- "next": "evaluate"
108
- },
109
- {
110
- "id": "evaluate",
111
- "name": "Evaluate",
112
- "suggestedRole": "reviewer",
113
- "next": "phase-4",
114
- "prompt": "Re-read debug-report.md against the fresh verification: does the evidence actually show the original symptom is gone, and does the regression test fail without the fix? If a gap remains, loop back to Phase 4 and close it. If everything holds, advance to Finish. Routing: ALL criteria pass → advance to finish; ANY criterion fails → loop back to phase-4 with a note naming the exact gap."
115
- },
116
- {
117
- "id": "finish",
118
- "name": "Finish",
119
- "suggestedRole": "developer",
120
- "prompt": "Summarize the root cause, the fix, and where the debug report lives. Hand the thread back to the user. Write a one-paragraph DONE summary to task notes via `write_task_note`, then report DONE.",
121
- "terminal": true
122
- }
123
- ],
124
- "version": "1.0.1",
125
- "releasedAt": "2026-07-25T22:45:00.000Z"
126
- }
@@ -1,152 +0,0 @@
1
- {
2
- "id": "technical-documentation",
3
- "name": "Technical Documentation",
4
- "description": "Generate a coherent documentation set from a codebase, organized by the Diataxis model (tutorials, how-to guides, reference, explanation), with cross-links and a coverage pass.",
5
- "basedOn": {
6
- "name": "gstack",
7
- "url": "https://github.com/garrytan/gstack"
8
- },
9
- "plan": "## Important Rules\n\n- **Research before writing.** Step 1 is not optional. Read the code, read the tests, read the\n existing docs. Insufficient research produces surface-level documentation.\n- **Accuracy is non-negotiable.** Every code example must work. Every API description must match\n the actual code. If you're unsure about a detail, read the source again — do not guess.\n- **Diataxis quadrants serve different readers.** Do not mix tutorial content into reference docs\n or reference content into how-tos. Each quadrant has a specific reader in a specific mode.\n- **Time to first result in tutorials.** If a reader can't see something working by step 3,\n restructure the tutorial.\n- **Cross-link everything.** Isolated docs are undiscoverable docs.\n- **Voice: friendly, concrete, user-forward.** Write like you're explaining to a smart person\n who hasn't seen the code. Never corporate, never academic.\n- **Completeness over minimalism.** AI makes comprehensive documentation cheap. Don't write\n \"minimal viable docs\" — write complete docs. Boil the ocean.",
10
- "entryStepId": "step-0",
11
- "triggers": [
12
- "write docs for this",
13
- "generate documentation",
14
- "document this feature",
15
- "create a tutorial",
16
- "write a how-to",
17
- "explain this module",
18
- "docs for this project"
19
- ],
20
- "command": "technical-documentation",
21
- "steps": [
22
- {
23
- "id": "step-0",
24
- "name": "Step 0: Scope & Intent",
25
- "prompt": "1. Determine what to document:\n - **If invoked with a specific target** (feature, module, file, skill): scope is that target\n - **If invoked for an entire project**: scope is the full project\n - **If called from /document-release with gaps**: scope is the specific entities from the coverage map\n\n2. Use AskUserQuestion to confirm scope and ask about documentation target:\n\n - A) Write documentation inline in existing files (README, ARCHITECTURE, etc.)\n - B) Create standalone documentation files (e.g., `docs/` directory)\n - C) Both — inline summaries in existing files + deep docs in standalone files\n\n RECOMMENDATION: Choose C because it maximizes both discoverability and depth.\n\n3. Determine the output format:\n - If the project already has a `docs/` directory, follow its conventions\n - If the project uses a doc framework (Nextra, Docusaurus, MkDocs, VitePress), follow its format\n - Otherwise, use plain Markdown files in `docs/`\n\n---\n\nRecord the scope decision in docs/plan.md: what is being documented, for whom, and which Diataxis quadrants each target gets.",
26
- "next": "step-1",
27
- "suggestedRole": "planner",
28
- "gate": {
29
- "maxAttempts": 3,
30
- "checks": [
31
- {
32
- "kind": "minBytes",
33
- "file": "docs/plan.md",
34
- "bytes": 150
35
- }
36
- ]
37
- }
38
- },
39
- {
40
- "id": "step-1",
41
- "name": "Step 1: Codebase Archaeology (Research Phase)",
42
- "prompt": "**This is the most important step.** Do not skip or rush it. The quality of your documentation\nis directly proportional to how well you understand the code.\n\n1. **Map the project structure:**\n\n2. **Read the entry points.** Identify and read:\n - README.md, ARCHITECTURE.md, CONTRIBUTING.md, CLAUDE.md / AGENTS.md\n - package.json / Cargo.toml / pyproject.toml / go.mod (understand the project type)\n - Main entry files (index.ts, main.rs, app.py, cmd/main.go)\n - Configuration files and examples\n\n3. **Read the source code for each target entity.** For each feature/module you're documenting:\n - Read the implementation files end-to-end (not just signatures)\n - Read the tests — they reveal intended behavior, edge cases, and usage patterns\n - Read related modules that the target depends on or is depended upon by\n - Read any existing inline comments, especially `// NOTE:`, `// DESIGN:`, `// WHY:`\n\n4. **Build a concept map.** Before writing, produce an internal outline:\n\n```\nTarget: [feature/module name]\nPurpose: [one sentence — what problem does it solve?]\nKey concepts: [list the 3-5 concepts a reader must understand]\nPublic surface: [commands, functions, config options, API endpoints]\nDependencies: [what it needs from other modules]\nDependents: [what relies on it]\nEdge cases: [from reading tests and code]\nDesign decisions: [any non-obvious \"why\" choices]\n```\n\n5. Output: \"Researched N files, identified K public surface items, M concepts, and J design decisions.\"\n\n---\n\nCapture the map under an '## Architecture notes' section in docs/plan.md — entry points, core modules, and the flows the docs must explain.",
43
- "next": "step-2",
44
- "suggestedRole": "developer",
45
- "gate": {
46
- "maxAttempts": 3,
47
- "checks": [
48
- {
49
- "kind": "contains",
50
- "file": "docs/plan.md",
51
- "pattern": "##\\s*Architecture",
52
- "flags": "i"
53
- }
54
- ]
55
- }
56
- },
57
- {
58
- "id": "step-2",
59
- "name": "Step 2: Diataxis Partitioning",
60
- "prompt": "For each target entity, decide which Diataxis quadrants to produce. Not every entity needs all four.\n\n**Decision matrix:**\n\n| Entity type | Tutorial? | How-to? | Reference? | Explanation? |\n|---|---|---|---|---|\n| New feature a user interacts with | ✅ | ✅ | ✅ | Maybe |\n| CLI command or flag | Maybe | ✅ | ✅ | No |\n| Internal module/architecture | No | No | ✅ | ✅ |\n| Config option | No | ✅ | ✅ | No |\n| Design pattern / philosophy | No | No | No | ✅ |\n| API endpoint | Maybe | ✅ | ✅ | No |\n| Workflow (multi-step process) | ✅ | ✅ | No | Maybe |\n\nOutput the partition plan:\n\n```\nDocumentation plan:\n [entity] [tutorial] [how-to] [reference] [explanation]\n Widget system ✅ new ✅ new ✅ new ✅ new\n --verbose flag ❌ ✅ new ✅ inline ❌\n Bayesian scheduler ❌ ❌ ✅ new ✅ new\n```\n\nIf the plan has more than 5 documents to create, use AskUserQuestion to confirm before proceeding.\nFor smaller scopes, proceed directly.\n\n---\n\nAdd the decision matrix as a '## Diataxis plan' table in docs/plan.md.",
61
- "next": "step-3",
62
- "suggestedRole": "planner",
63
- "gate": {
64
- "maxAttempts": 3,
65
- "checks": [
66
- {
67
- "kind": "contains",
68
- "file": "docs/plan.md",
69
- "pattern": "##\\s*Diataxis",
70
- "flags": "i"
71
- }
72
- ]
73
- }
74
- },
75
- {
76
- "id": "step-3",
77
- "name": "Step 3: Write Reference Documentation First",
78
- "prompt": "Reference docs are the foundation. They are factual, complete, and derived directly from code.\nWrite these before tutorials or how-tos because they establish the vocabulary.\n\n**Reference doc template:**\n\n```markdown\n# [Entity Name]\n\n[One paragraph: what it is, what it does, when you'd use it.]\n\n## API / Interface\n\n[Complete listing of public surface: functions, commands, config options, parameters.\nInclude types, defaults, and constraints. Pull directly from code — do not paraphrase\nloosely.]\n\n## Options / Configuration\n\n[If applicable: every option with its type, default, and effect.]\n\n## Examples\n\n[2-3 concrete examples showing actual usage. Prefer real command output or code that\nwould actually compile/run.]\n\n## Related\n\n[Links to other reference docs, how-tos, or explanations that provide context.]\n```\n\n**Rules for reference docs:**\n- Accuracy over elegance. Every claim must be traceable to code.\n- Include types, defaults, and constraints. \"Accepts a string\" is insufficient — \"Accepts a\n string (max 256 chars, must match `^[a-z-]+$`)\" is reference-grade.\n- Show real examples that would actually work if copy-pasted.\n- Do not explain *why* — that belongs in explanation docs.\n\n---\n\nWrite each reference document under docs/reference/.",
79
- "next": "step-4",
80
- "suggestedRole": "copywriter",
81
- "gate": {
82
- "maxAttempts": 4,
83
- "checks": [
84
- {
85
- "kind": "fileCount",
86
- "ext": [
87
- "md"
88
- ],
89
- "min": 1,
90
- "dir": "docs/reference"
91
- }
92
- ]
93
- }
94
- },
95
- {
96
- "id": "step-4",
97
- "name": "Step 4: Write Explanation Documentation",
98
- "prompt": "Explanation docs answer \"why does this work this way?\" They are the design rationale.\n\n**Explanation doc template:**\n\n```markdown\n# [Concept / Design Decision]\n\n[Opening paragraph: the problem this design solves, stated in terms a smart reader\nwho hasn't seen the code would understand.]\n\n## The problem\n\n[Concrete description of what goes wrong without this design. Real failure modes,\nnot abstract risks.]\n\n## The approach\n\n[How the design solves the problem. Include diagrams (ASCII or Mermaid) for\narchitectural concepts.]\n\n## Trade-offs\n\n[What was given up. Every design decision trades something — name it explicitly.]\n\n## Alternatives considered\n\n[If discoverable from code comments, ADRs, or git history: what was tried or\nrejected and why.]\n```\n\n**Rules for explanation docs:**\n- Lead with the problem, not the solution.\n- Use ASCII diagrams for architecture. They're grep-able, diff-friendly, and render everywhere.\n- Name trade-offs explicitly. \"We chose X over Y because Z\" is the gold standard.\n- Do not repeat reference material — link to it.\n\n---\n\nWrite each explanation document under docs/explanation/.",
99
- "next": "step-5",
100
- "suggestedRole": "copywriter",
101
- "gate": {
102
- "maxAttempts": 4,
103
- "checks": [
104
- {
105
- "kind": "fileCount",
106
- "ext": [
107
- "md"
108
- ],
109
- "min": 1,
110
- "dir": "docs/explanation"
111
- }
112
- ]
113
- }
114
- },
115
- {
116
- "id": "step-5",
117
- "name": "Step 5: Write How-To Guides",
118
- "prompt": "How-tos are task-oriented. They assume the reader knows the basics and wants to accomplish\nsomething specific.\n\n**How-to doc template:**\n\n```markdown\n# How to [accomplish specific task]\n\n[One sentence: what you'll accomplish and the end result.]\n\n## Prerequisites\n\n[What the reader needs before starting. Be specific — versions, installed tools,\nconfig state.]\n\n## Steps\n\n1. [Action verb] [specific instruction]\n\n ```bash\n [exact command]\n ```\n\n [Expected output or result, if non-obvious.]\n\n2. [Next step...]\n\n### Verification\n\n[How to confirm it worked. A command, a URL to visit, a test to run.]\n\n### Troubleshooting\n\n[Common failure modes and their fixes. Pull from tests and error handling code.]\n```\n\n**Rules for how-to docs:**\n- Title starts with \"How to\" — no exceptions. This is the reader's entry point.\n- Every step must be actionable. No \"consider whether...\" — instead \"Run X\" or \"Add Y to Z\".\n- Include verification. The reader should never wonder \"did it work?\"\n- Troubleshooting section is mandatory if the task can fail.\n\n---\n\n## Step 6: Write Tutorials\n\nTutorials are learning-oriented. They take a newcomer from zero to a working example.\nThese are the hardest to write well and the most valuable.\n\n**Tutorial doc template:**\n\n```markdown\n# [Tutorial title — describes what you'll build/learn]\n\n[Opening paragraph: what you'll build, why it's useful, and what you'll understand\nby the end. Keep it concrete — \"You'll build a working X that does Y\" not\n\"This tutorial covers X\".]\n\n## What you'll need\n\n[Prerequisites: tools, versions, prior knowledge. Link to installation guides.]\n\n## Step 1: [Set up the foundation]\n\n[Start from a clean state. Show every command. Explain what each does on first\nencounter — but briefly, not a lecture.]\n\n```bash\n[exact command]\n```\n\n[Brief explanation of what just happened.]\n\nWrite each how-to guide under docs/how-to/.",
119
- "next": "evaluate",
120
- "suggestedRole": "copywriter",
121
- "gate": {
122
- "maxAttempts": 4,
123
- "checks": [
124
- {
125
- "kind": "fileCount",
126
- "ext": [
127
- "md"
128
- ],
129
- "min": 1,
130
- "dir": "docs/how-to"
131
- }
132
- ]
133
- }
134
- },
135
- {
136
- "id": "evaluate",
137
- "name": "Evaluate",
138
- "suggestedRole": "reviewer",
139
- "next": "step-3",
140
- "prompt": "Read docs/plan.md and spot-check each produced document against the code it describes: are the reference pages factual, do the how-tos actually work, is anything in the Diataxis plan still missing? If a quadrant is missing or wrong, loop back to Step 3 and fill it. Otherwise advance to Finish. Routing: ALL criteria pass → advance to finish; ANY criterion fails → loop back to step-3 with a note naming the exact gap."
141
- },
142
- {
143
- "id": "finish",
144
- "name": "Finish",
145
- "suggestedRole": "developer",
146
- "prompt": "Summarize what was documented and where it lives (the docs/ tree), and hand back to the user. Write a one-paragraph DONE summary to task notes via `write_task_note`, then report DONE.",
147
- "terminal": true
148
- }
149
- ],
150
- "version": "1.0.1",
151
- "releasedAt": "2026-07-25T22:45:00.000Z"
152
- }