@gobing-ai/spur 0.3.40 → 0.3.42

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 (185) hide show
  1. package/.claude-plugin/marketplace.json +15 -0
  2. package/README.md +15 -1
  3. package/config/templates/AGENTS.md +5 -3
  4. package/config/workflows/task-pipeline.yaml +103 -12
  5. package/package.json +15 -12
  6. package/plugins/README.md +655 -0
  7. package/plugins/sp/README.md +621 -0
  8. package/plugins/sp/agents/expert-spur.md +109 -0
  9. package/plugins/sp/agents/super-coder.md +126 -0
  10. package/plugins/sp/agents/super-planner.md +283 -0
  11. package/plugins/sp/agents/super-reviewer.md +154 -0
  12. package/plugins/sp/commands/dev-arch.md +30 -0
  13. package/plugins/sp/commands/dev-brainstorm.md +40 -0
  14. package/plugins/sp/commands/dev-changelog.md +28 -0
  15. package/plugins/sp/commands/dev-daily.md +29 -0
  16. package/plugins/sp/commands/dev-debug.md +29 -0
  17. package/plugins/sp/commands/dev-dogfood.md +33 -0
  18. package/plugins/sp/commands/dev-featurechange.md +130 -0
  19. package/plugins/sp/commands/dev-find-conflict.md +51 -0
  20. package/plugins/sp/commands/dev-find-issue.md +76 -0
  21. package/plugins/sp/commands/dev-find-next.md +60 -0
  22. package/plugins/sp/commands/dev-fixall.md +33 -0
  23. package/plugins/sp/commands/dev-gitmsg.md +28 -0
  24. package/plugins/sp/commands/dev-gtd.md +97 -0
  25. package/plugins/sp/commands/dev-handover.md +26 -0
  26. package/plugins/sp/commands/dev-idea.md +50 -0
  27. package/plugins/sp/commands/dev-next.md +31 -0
  28. package/plugins/sp/commands/dev-parallel.md +30 -0
  29. package/plugins/sp/commands/dev-plan.md +46 -0
  30. package/plugins/sp/commands/dev-refine.md +48 -0
  31. package/plugins/sp/commands/dev-refineall.md +65 -0
  32. package/plugins/sp/commands/dev-refresh.md +32 -0
  33. package/plugins/sp/commands/dev-reverse.md +32 -0
  34. package/plugins/sp/commands/dev-review.md +31 -0
  35. package/plugins/sp/commands/dev-run.md +63 -0
  36. package/plugins/sp/commands/dev-runall.md +80 -0
  37. package/plugins/sp/commands/dev-simplify.md +39 -0
  38. package/plugins/sp/commands/dev-unit.md +29 -0
  39. package/plugins/sp/commands/dev-verify.md +48 -0
  40. package/plugins/sp/commands/dev-verifyall.md +72 -0
  41. package/plugins/sp/commands/dev-wrap.md +30 -0
  42. package/plugins/sp/commands/dev-wrapall.md +33 -0
  43. package/plugins/sp/commands/rule-add.md +18 -0
  44. package/plugins/sp/commands/rule-refine.md +18 -0
  45. package/plugins/sp/commands/rule-scan.md +18 -0
  46. package/plugins/sp/commands/spur-init.md +22 -0
  47. package/plugins/sp/commands/workflow-add.md +18 -0
  48. package/plugins/sp/commands/workflow-refine.md +18 -0
  49. package/plugins/sp/hooks/agent-hint.ts +60 -0
  50. package/plugins/sp/hooks/careful-guard.ts +147 -0
  51. package/plugins/sp/hooks/context-post-tool.ts +325 -0
  52. package/plugins/sp/hooks/context-session-start.ts +182 -0
  53. package/plugins/sp/hooks/context-session-stop.ts +95 -0
  54. package/plugins/sp/hooks/hooks.json +51 -0
  55. package/plugins/sp/hooks/pi/guard-extension.ts +341 -0
  56. package/plugins/sp/hooks/task-write-guard.ts +84 -0
  57. package/plugins/sp/plugin.json +8 -0
  58. package/plugins/sp/scripts/batch-preflight.ts +204 -0
  59. package/plugins/sp/scripts/daily-summary/daily-summary.ts +606 -0
  60. package/plugins/sp/scripts/daily-summary/logger.ts +28 -0
  61. package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +363 -0
  62. package/plugins/sp/scripts/dogfood-testing/validate-report.ts +168 -0
  63. package/plugins/sp/scripts/feature-sync-bounded.ts +451 -0
  64. package/plugins/sp/scripts/stage-registry-adapter.ts +1341 -0
  65. package/plugins/sp/scripts/task-size-precheck.ts +202 -0
  66. package/plugins/sp/scripts/validate-commands.ts +651 -0
  67. package/plugins/sp/scripts/validate-flag-contracts.ts +875 -0
  68. package/plugins/sp/skills/brainstorm/SKILL.md +361 -0
  69. package/plugins/sp/skills/brainstorm/agents/openai.yaml +14 -0
  70. package/plugins/sp/skills/brainstorm/examples/ideation-example.md +209 -0
  71. package/plugins/sp/skills/brainstorm/metadata.openclaw +7 -0
  72. package/plugins/sp/skills/brainstorm/references/grilling-interview.md +68 -0
  73. package/plugins/sp/skills/brainstorm/references/workflows.md +255 -0
  74. package/plugins/sp/skills/branch-workflow/SKILL.md +109 -0
  75. package/plugins/sp/skills/branch-workflow/references/branch-lifecycle.md +69 -0
  76. package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +100 -0
  77. package/plugins/sp/skills/code-implementation/SKILL.md +176 -0
  78. package/plugins/sp/skills/code-implementation/references/debugging.md +64 -0
  79. package/plugins/sp/skills/code-implementation/references/implementation-patterns.md +113 -0
  80. package/plugins/sp/skills/code-improvement/SKILL.md +231 -0
  81. package/plugins/sp/skills/code-improvement/references/deepening-signals.md +205 -0
  82. package/plugins/sp/skills/code-review/SKILL.md +112 -0
  83. package/plugins/sp/skills/code-review/references/receiving-code-review.md +70 -0
  84. package/plugins/sp/skills/code-review/references/review-lenses.md +117 -0
  85. package/plugins/sp/skills/code-review/references/self-review-checklist.md +53 -0
  86. package/plugins/sp/skills/code-review/references/verification-before-completion.md +68 -0
  87. package/plugins/sp/skills/code-simplification/SKILL.md +225 -0
  88. package/plugins/sp/skills/code-testing/SKILL.md +108 -0
  89. package/plugins/sp/skills/code-testing/references/stacks/bun-ts.md +165 -0
  90. package/plugins/sp/skills/code-testing/references/stacks/go.md +88 -0
  91. package/plugins/sp/skills/code-testing/references/stacks/python.md +117 -0
  92. package/plugins/sp/skills/code-testing/references/test-loop-breaker.md +37 -0
  93. package/plugins/sp/skills/code-testing/references/test-output-discipline.md +52 -0
  94. package/plugins/sp/skills/code-testing/references/unit-testing.md +212 -0
  95. package/plugins/sp/skills/code-verification/SKILL.md +535 -0
  96. package/plugins/sp/skills/code-verification/references/code-improvement.md +39 -0
  97. package/plugins/sp/skills/code-verification/references/secu-review.md +94 -0
  98. package/plugins/sp/skills/code-verification/references/verdict-schema.md +141 -0
  99. package/plugins/sp/skills/conflict-finding/SKILL.md +254 -0
  100. package/plugins/sp/skills/conflict-finding/references/authority-resolution.md +258 -0
  101. package/plugins/sp/skills/conflict-finding/references/comparison-protocol.md +277 -0
  102. package/plugins/sp/skills/conflict-finding/references/finding-contract.md +346 -0
  103. package/plugins/sp/skills/conflict-finding/references/remediation-routing.md +276 -0
  104. package/plugins/sp/skills/daily-summary/SKILL.md +171 -0
  105. package/plugins/sp/skills/daily-summary/agents/openai.yaml +13 -0
  106. package/plugins/sp/skills/doc-evolve/SKILL.md +175 -0
  107. package/plugins/sp/skills/doc-evolve/references/operations.md +93 -0
  108. package/plugins/sp/skills/dogfood-testing/SKILL.md +608 -0
  109. package/plugins/sp/skills/dogfood-testing/references/monitor-ledger.md +211 -0
  110. package/plugins/sp/skills/dogfood-testing/references/report-template.md +351 -0
  111. package/plugins/sp/skills/doubt-driven-development/SKILL.md +136 -0
  112. package/plugins/sp/skills/functional-review/SKILL.md +364 -0
  113. package/plugins/sp/skills/functional-review/references/verdict-schema.md +133 -0
  114. package/plugins/sp/skills/indexed-context/SKILL.md +164 -0
  115. package/plugins/sp/skills/issue-finding/SKILL.md +424 -0
  116. package/plugins/sp/skills/issue-finding/agents/openai.yaml +15 -0
  117. package/plugins/sp/skills/issue-finding/examples/expected-findings.json +27 -0
  118. package/plugins/sp/skills/issue-finding/examples/session-test-loop.jsonl +23 -0
  119. package/plugins/sp/skills/issue-finding/references/session-formats.md +121 -0
  120. package/plugins/sp/skills/next-feature/SKILL.md +125 -0
  121. package/plugins/sp/skills/next-feature/references/handoff-routing.md +92 -0
  122. package/plugins/sp/skills/next-feature/references/proposal-contract.md +49 -0
  123. package/plugins/sp/skills/next-feature/references/ranking-rubric.md +52 -0
  124. package/plugins/sp/skills/next-feature/references/signal-derivation.md +67 -0
  125. package/plugins/sp/skills/next-router/SKILL.md +181 -0
  126. package/plugins/sp/skills/next-router/references/messages.md +90 -0
  127. package/plugins/sp/skills/next-router/references/routing-table.md +216 -0
  128. package/plugins/sp/skills/parallel-execution/SKILL.md +148 -0
  129. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +100 -0
  130. package/plugins/sp/skills/parallel-execution/references/fan-out-patterns.md +101 -0
  131. package/plugins/sp/skills/parallel-execution/references/result-synthesis.md +94 -0
  132. package/plugins/sp/skills/reverse-engineering/SKILL.md +375 -0
  133. package/plugins/sp/skills/reverse-engineering/agents/openai.yaml +18 -0
  134. package/plugins/sp/skills/source-driven-development/SKILL.md +124 -0
  135. package/plugins/sp/skills/spec-decomposition/SKILL.md +117 -0
  136. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +539 -0
  137. package/plugins/sp/skills/spur-cli/SKILL.md +133 -0
  138. package/plugins/sp/skills/spur-cli/references/agent.md +179 -0
  139. package/plugins/sp/skills/spur-cli/references/features/acceptance-criteria.md +82 -0
  140. package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +177 -0
  141. package/plugins/sp/skills/spur-cli/references/features/roadmap-priority.md +84 -0
  142. package/plugins/sp/skills/spur-cli/references/features/verbs.md +122 -0
  143. package/plugins/sp/skills/spur-cli/references/features.md +234 -0
  144. package/plugins/sp/skills/spur-cli/references/init.md +119 -0
  145. package/plugins/sp/skills/spur-cli/references/message.md +98 -0
  146. package/plugins/sp/skills/spur-cli/references/rules/authoring-rules.md +212 -0
  147. package/plugins/sp/skills/spur-cli/references/rules/fine-tuning.md +148 -0
  148. package/plugins/sp/skills/spur-cli/references/rules/operations.md +228 -0
  149. package/plugins/sp/skills/spur-cli/references/rules/validation-and-extension.md +129 -0
  150. package/plugins/sp/skills/spur-cli/references/rules.md +209 -0
  151. package/plugins/sp/skills/spur-cli/references/serve.md +58 -0
  152. package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +98 -0
  153. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +95 -0
  154. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +361 -0
  155. package/plugins/sp/skills/spur-cli/references/tasks.md +278 -0
  156. package/plugins/sp/skills/spur-cli/references/team.md +133 -0
  157. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +226 -0
  158. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +211 -0
  159. package/plugins/sp/skills/spur-cli/references/workflows/validation-and-extension.md +129 -0
  160. package/plugins/sp/skills/spur-cli/references/workflows.md +355 -0
  161. package/plugins/sp/skills/spur-dev/SKILL.md +224 -0
  162. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +196 -0
  163. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +664 -0
  164. package/plugins/sp/skills/spur-dev/references/decision-brief.md +80 -0
  165. package/plugins/sp/skills/spur-dev/references/dev-operations.md +546 -0
  166. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +164 -0
  167. package/plugins/sp/skills/spur-dev/references/execution-batch.md +727 -0
  168. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +350 -0
  169. package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +191 -0
  170. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +417 -0
  171. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +171 -0
  172. package/plugins/sp/skills/spur-dev/references/glossary.md +95 -0
  173. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +80 -0
  174. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +88 -0
  175. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +302 -0
  176. package/plugins/sp/skills/spur-dev/references/product-planning.md +206 -0
  177. package/plugins/sp/skills/spur-dev/references/section-batching.md +24 -0
  178. package/plugins/sp/skills/sys-architecture/SKILL.md +155 -0
  179. package/plugins/sp/skills/sys-architecture/references/decision-method.md +137 -0
  180. package/plugins/sp/skills/sys-architecture/references/upkeep-survey.md +75 -0
  181. package/plugins/sp/skills/sys-debugging/SKILL.md +228 -0
  182. package/plugins/sp/skills/sys-debugging/references/debugging-protocol.md +62 -0
  183. package/plugins/sp/skills/test-driven-development/SKILL.md +248 -0
  184. package/plugins/sp/skills/wayfinder/SKILL.md +292 -0
  185. package/spur.js +6093 -5180
@@ -0,0 +1,18 @@
1
+ name: reverse-engineering
2
+ description: "Codebase reverse-engineering, High-Level Design (HLD) generation,
3
+ design reconstruction, and critical issue audit. Use when analyzing
4
+ unfamiliar codebases, generating architecture or design documentation,
5
+ auditing code quality, onboarding new developers, or assessing technical
6
+ debt. Supports depth modes briefing, structure, architecture, design, and
7
+ full with separate focus and format controls."
8
+ version: 1.1.0
9
+ icon: 🔍
10
+ category: debugging
11
+ tags:
12
+ - analysis-core
13
+ - reverse-engineering
14
+ - hld
15
+ - audit
16
+ - codebase-analysis
17
+ - architecture
18
+ - design
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: source-driven-development
3
+ description: "Verify framework / API / library facts against primary sources before generating code, and separate \"the API exists\" from \"I used it correctly under its contract.\" The single sp owner of source-first verification. Triggers: \"check the docs first\", \"verify this API\", \"source-first\", \"is this the real signature\"."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: spur
7
+ version: "1.0"
8
+ platforms: "claude-code,codex,openclaw,opencode,antigravity"
9
+ category: execution
10
+ interactions:
11
+ - technique
12
+ operations:
13
+ - verify-source
14
+ openclaw:
15
+ emoji: "📚"
16
+ see_also:
17
+ - sp:code-implementation
18
+ - sp:doubt-driven-development
19
+ - sp:code-verification
20
+ ---
21
+
22
+ # source-driven-development — the source-first verification competency
23
+
24
+ Do not generate code from memory of an API. Before you call a framework function, pass an option, or
25
+ rely on a library behavior, **verify it against the primary source** — the official docs for the
26
+ pinned version, the type signature, the actual source. Memory is a cache that goes stale silently;
27
+ the primary source is the contract.
28
+
29
+ This skill is the **single sp owner** of source-first verification. Where sp workflows previously
30
+ delegated fact-checking to an external `cc:anti-hallucination` skill, that procedure now lives here,
31
+ in sp's own vocabulary — one authority, no duplicated procedure. Other sp skills (e.g. `brainstorm`)
32
+ delegate verification to `sp:source-driven-development`; they do not restate the protocol.
33
+
34
+ ## The two questions (do not conflate them)
35
+
36
+ Every use of an external API answers **two** independent questions. Confusing them is the core error:
37
+
38
+ 1. **Does the API exist?** — Is `foo.bar(x)` a real function with that signature in this version?
39
+ A hallucinated method compiles in your head and fails at runtime.
40
+ 2. **Am I using it correctly under its contract?** — Even a real API has preconditions, ordering
41
+ rules, error modes, and edge cases. "It exists" does not mean "I called it right."
42
+
43
+ Source-first verification must satisfy **both**. A confirmed-existing API used against its contract
44
+ is still a bug.
45
+
46
+ ## When to use
47
+
48
+ - Before generating code against a framework / library / API you are not certain of **for the pinned
49
+ version** — signatures, option names, return shapes, error behavior.
50
+ - When behavior is **version-specific** and you are recalling it from memory (state the version).
51
+ - When a build/runtime error suggests the API does not behave as you assumed.
52
+ - Reconciling a claim about an external system before it becomes load-bearing in a design.
53
+
54
+ Do **not** use this skill for:
55
+
56
+ - **Your own code's correctness** — that is `sp:code-verification` (requirements/AC) and `sp:code-review`.
57
+ - **Stress-testing a design decision** — that is `sp:doubt-driven-development` (artifact vs contract).
58
+ - **Well-known, version-stable stdlib** you can state with HIGH confidence — verification has a cost;
59
+ spend it where being wrong is likely and expensive.
60
+
61
+ ## The process
62
+
63
+ ### Step 1 — Classify your confidence before you write
64
+
65
+ | Level | Meaning | Action |
66
+ |---|---|---|
67
+ | **HIGH** | Verified against the pinned version's docs/source **this session** | Generate; cite the source inline |
68
+ | **MEDIUM** | Recalled from a prior session; plausibly stale | Verify before relying on it |
69
+ | **LOW** | Memory only, no source in hand | Stop — verify first; never present as fact |
70
+
71
+ If you cannot honestly claim HIGH for a version-specific behavior, you are at MEDIUM or LOW — verify.
72
+
73
+ ### Step 2 — Go to the primary source, in priority order
74
+
75
+ 1. The **type signature / source** in the installed, pinned dependency (the ground truth for *this* build).
76
+ 2. The **official docs for the pinned version** (not the latest — the version in the lockfile).
77
+ 3. Authoritative references when docs are thin.
78
+ 4. Memory — **LOW only**, and never as the final authority.
79
+
80
+ State the **version** inline whenever behavior is version-specific.
81
+
82
+ ### Step 3 — Verify both questions
83
+
84
+ - **Existence:** the signature matches — name, arity, parameter names, return type.
85
+ - **Contract:** preconditions, call ordering, error/exception modes, null/empty edge cases, and any
86
+ documented caveats are accounted for in how you call it.
87
+
88
+ ### Step 4 — Cite, then generate
89
+
90
+ Generate the code and **cite the source** (doc URL + date, or `pkg@version` + the file/symbol) at the
91
+ point of use or in the task's notes. A claim about external behavior without a citation is
92
+ unverified — flag it as such rather than presenting it as fact.
93
+
94
+ ## Common Rationalizations
95
+
96
+ | Rationalization | Reality |
97
+ |---|---|
98
+ | "I've used this API a hundred times — I know the signature." | APIs change across versions and your memory is a silent cache. Verify against the *pinned* version; recall is MEDIUM at best. |
99
+ | "It compiled, so I used it right." | Compiling proves existence and types, not contract. Ordering, preconditions, and error modes are not checked by the compiler. |
100
+ | "The latest docs say so." | You ship against the *pinned* version, not latest. Read the docs for the version in the lockfile. |
101
+ | "Close enough — I'll fix it if it breaks." | Guessing at an external contract moves the cost to runtime/production. Verify before generating; it is cheaper here. |
102
+ | "Verifying every call is too slow." | Verify what you are *not sure of*, at the confidence level you honestly hold. HIGH needs no re-check; LOW always does. |
103
+
104
+ ## Red Flags
105
+
106
+ - Generating version-specific code you would rate MEDIUM or LOW confidence, without opening a source.
107
+ - Presenting an API claim as fact with no citation (doc + date, or `pkg@version` + symbol).
108
+ - Treating "it exists" as proof it is used correctly (the two questions collapsed into one).
109
+ - Reading the *latest* docs for a dependency pinned to an older version.
110
+ - Recalling behavior "from memory" for a security-, money-, or data-integrity-sensitive call.
111
+ - Duplicating this protocol inside another skill instead of delegating to `sp:source-driven-development`.
112
+
113
+ ## Verification
114
+
115
+ - [ ] Every version-specific external behavior relied on was checked against the pinned version's source/docs **this session**.
116
+ - [ ] Both questions answered — the API exists **and** is called within its contract.
117
+ - [ ] Claims about external behavior carry a citation (source + date, or `pkg@version` + symbol); unverifiable ones are flagged, not asserted.
118
+ - [ ] Confidence is stated honestly (HIGH/MEDIUM/LOW); nothing at LOW was presented as fact.
119
+
120
+ ## See also
121
+
122
+ - **`sp:code-implementation`** — consumes this discipline before generating code against an external API.
123
+ - **`sp:doubt-driven-development`** — stress-tests *your* artifact vs its contract; this skill verifies *external* facts vs their source.
124
+ - **`sp:code-verification`** — verifies your finished code against requirements/AC (a different authority than source-first).
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: spec-decomposition
3
+ description: "The decomposition competency — turn a validated feature into a well-formed task batch passing task-batch.schema.json: scenario-to-task mapping, template variants, sizing. Triggers: \"decompose this\", \"break into tasks\", \"task batch\", \"create tasks from this feature\", \"split this work\"."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: spur
7
+ version: "1.0"
8
+ platforms: "claude-code,codex,openclaw,opencode,antigravity"
9
+ interactions:
10
+ - technique
11
+ competency: decomposition
12
+ openclaw:
13
+ emoji: "🧩"
14
+ ---
15
+
16
+ # spec-decomposition — the decomposition competency
17
+
18
+ Turn a validated feature (Goal, Scope, acceptance criteria) into a **well-formed task batch** that
19
+ the CLI accepts. This is the deep competency the spine (`sp:spur-dev`) dispatches
20
+ **before** execution — it owns *how to decompose well* (scenario→task mapping, sizing, variant
21
+ selection), distinct from the spine which decides *when* to decompose and runs the gate.
22
+
23
+ Decomposition is a precondition of execution: a task must be decomposed before
24
+ `sp:code-implementation` can build it. This skill produces the batch JSON; the CLI's
25
+ `task-batch.schema.json` gate validates it; `spur task batch-create` lands it atomically (all-or-nothing).
26
+
27
+ ## When to use
28
+
29
+ - **Feature → tasks** — a feature with acceptance criteria exists; produce its task batch.
30
+ - **Break down work** — split a large requirement into dependency-ordered, right-sized subtasks.
31
+ - **Size a task** — decide whether a task is one deliverable or should split (the granularity standard).
32
+ - **The planning half's decompose step** — the spine dispatches here after `feature check` passes.
33
+
34
+ Do **not** use this skill for:
35
+
36
+ - **Authoring the feature / acceptance criteria** — that is the spine's planning half + the AC style
37
+ guide (`sp:spur-dev`'s `ac-style-guide.md`), which this skill *consumes*.
38
+ - **Implementing / testing / reviewing a task** — those are `sp:code-implementation`,
39
+ `sp:code-testing`, `sp:code-verification`.
40
+ - **Driving the lifecycle / running the gate** — that is the spine, `sp:spur-dev`.
41
+
42
+ ## Behavior
43
+
44
+ This skill behaves as a **technique**: given a feature's AC, it maps each `@core` scenario to a task
45
+ (one R-number = one task spine), sizes each by the granularity standard, selects the template variant,
46
+ orders by dependency, and emits the batch JSON — then hands it to the CLI gate. It writes **nothing**
47
+ directly: `task-batch.schema.json` validates and `spur task batch-create --file <json>` writes
48
+ atomically (a single schema violation rejects the whole batch).
49
+
50
+ Full procedure: **[references/decomposition.md](references/decomposition.md)** — the
51
+ `task-batch.schema.json` contract, template-variant selection, scenario-to-task mapping, the
52
+ granularity knobs (min/target/force-split hours), and parent/umbrella-task conventions.
53
+
54
+ ## The gate
55
+
56
+ ```bash
57
+ spur task batch-create --file decomposition.json # bare JSON array; atomic, all-or-nothing
58
+ ```
59
+
60
+ Validate locally against `apps/cli/schemas/task-batch.schema.json` (runtime SSOT: the Zod
61
+ `taskBatchSchema`) before invoking the CLI — a single violation rejects the entire batch. The gate is
62
+ the only proof the decomposition is well-formed; never hand-write task files to bypass it.
63
+
64
+ ## Common Rationalizations
65
+
66
+ | Rationalization | Reality |
67
+ |---|---|
68
+ | "One big task is simpler than splitting it." | An undifferentiated task can't be independently verified or reviewed. Split into vertical slices, each demoable on its own. |
69
+ | "Layer tasks (all-schema, all-UI) are cleaner." | Horizontal layer-tasks are a named anti-pattern: none is shippable alone. Slice vertically through the layers, per behavior. |
70
+ | "The parent task will implement the shared part." | A parent implements nothing itself — it's the abstraction over its children. Shared work is a child task, not parent body. |
71
+ | "Skip per-task AC; the feature AC covers it." | A task with no AC has no verify gate. Every task carries the scenario(s) it satisfies, or it can't be closed honestly. |
72
+ | "This is one concern — don't over-decompose." | Under-decomposition hides multiple review lenses in one diff. If it needs more than one AC or more than ~a day, it's more than one task. |
73
+
74
+ ## Red Flags
75
+
76
+ - A task that can't be stated as an independently verifiable vertical slice.
77
+ - Tasks named by layer (`schema`, `API`, `UI`) rather than by behavior.
78
+ - A parent task with body work instead of a roster of children.
79
+ - A task with zero acceptance criteria.
80
+ - A batch where every task depends on every other (no real slicing).
81
+
82
+ ## Gotchas
83
+
84
+ 1. **Decomposition precedes execution.** A task must be decomposed and batch-created before
85
+ `sp:code-implementation` runs. This skill's output is the input to the execution half.
86
+ 2. **Batch-create is atomic.** One schema violation rejects everything — validate locally first.
87
+ 3. **AC titles are the traceability key.** Map tasks to AC by scenario title (R-prefix stripped on
88
+ match); a renamed scenario after batch-create breaks coverage.
89
+ 4. **Size by the standard, not by feel.** Sizing has two dimensions, applied in order: **cohesion
90
+ first** — work that edits the same files or shares a review context is one task even when the
91
+ hours would permit a split (ceremony cost is per-task); **then the granularity knobs** in
92
+ `decomposition.md` (`min_hours` / `target_*` / `force_decompose_above_hours`) bound how large a
93
+ single cohesive task may get before a size-driven split overrides cohesion. Both dimensions,
94
+ with the H8 worked example, are in `decomposition.md` → "Granularity — two dimensions".
95
+ 5. **Cut vertical, not horizontal.** Every task is a thin slice through all the layers a scenario
96
+ touches, independently demoable on its own — never an all-schema/all-API/all-UI layer-task.
97
+ Prefactoring (making the change easy) is its own task, ordered first. Full doctrine, worked
98
+ wrong-vs-right example, and the pre-batch-create HITL quiz gate: `decomposition.md`.
99
+
100
+ ## See also
101
+
102
+ - **`sp:spur-dev`** — the spine that dispatches this competency at the decompose step and runs the
103
+ `batch-create` gate; owns the AC style guide this skill consumes.
104
+ - **`sp:code-implementation`** — builds the tasks this skill produces (decomposition is its precondition).
105
+
106
+ ## Platform Notes
107
+
108
+ ### Claude Code
109
+
110
+ Invoked by the spine's planning half (the decompose step), or directly via
111
+ `Skill(skill="sp:spec-decomposition", args="<feature-id>")`. Validate the batch JSON and run
112
+ `spur task batch-create` via the Bash tool.
113
+
114
+ ### Codex / OpenClaw / OpenCode / Antigravity
115
+
116
+ Invoke this skill directly for decomposition technique; run `spur task batch-create` via the Bash
117
+ tool. The skill is the SSOT for the method; the CLI gate is the validator.