spec-kitty-spdd-reasons
Drive REASONS Canvas authoring and review for missions that opted in to
Structured-Prompt-Driven Development (SPDD) via charter selection. The
canvas is a thin, agent-curated reasoning layer that sits next to the spec,
plan, and tasks; it is not a duplicate system mirror.
This skill is documentation for the agent. It assumes the SPDD/REASONS
doctrine pack (paradigm, tactics, styleguide, directive, template) has
already been shipped under src/doctrine/ and that activation can be
detected via the helper described below.
What this skill does
- Detects whether the SPDD/REASONS pack is active for the current project.
- Loads mission context:
spec.md, plan.md, tasks.md, per-WP prompts,
charter context, glossary, research notes, contracts, and relevant code.
- Generates or updates
kitty-specs/<mission>/reasons-canvas.md from the
seven-section template fragment.
- Compiles per-WP REASONS summaries when an implementer or reviewer asks
for one (a focused slice of the canvas scoped to a single work package).
- Runs comparison-mode review: traces a diff against the canvas and
classifies divergences using the drift taxonomy.
What this skill does NOT do
- It does NOT mirror the code as prose. The canvas references source
artifacts; it does not duplicate them. Code remains the source of truth
for current behavior.
- It does NOT overwrite user-authored mission artifacts. When a canvas
section already contains user content, the skill merges by appending
or refining, never by silent rewrite.
- It does NOT silently enforce SPDD on projects that did not opt in via
charter. If the user demands enforcement and the charter is not
configured, escalate to the charter workflow.
Activation rules
Three branches:
- Active — charter selected the SPDD/REASONS pack (paradigm
structured-prompt-driven-development, tactic reasons-canvas-fill,
tactic reasons-canvas-review, or directive DIRECTIVE_038). Proceed
with canvas authoring or review using the seven-section template at
src/doctrine/templates/fragments/reasons-canvas-template.md.
- Inactive + ad-hoc request — user asked to "use REASONS" once,
without charter opt-in. Proceed, but stamp the canvas header with a
"not formally opted in via charter" note so reviewers know the canvas
is advisory only.
- Inactive + enforcement demand — user wants REASONS enforced as a
gate but the charter has not selected the pack. Do NOT enforce. Escalate
to the charter workflow: suggest running the charter interview to add
the paradigm or directive, then return to this skill.
How to detect activation
Programmatic (preferred):
from doctrine.spdd_reasons.activation import is_spdd_reasons_active
active = is_spdd_reasons_active(repo_root)
The helper inspects .kittify/charter/governance.yaml and
.kittify/charter/directives.yaml and returns True iff any of the four
selectors is present:
- paradigm
structured-prompt-driven-development
- tactic
reasons-canvas-fill
- tactic
reasons-canvas-review
- directive
DIRECTIVE_038
Manual fallback: read .kittify/charter/governance.yaml directly and look
for the same selectors under doctrine.selected_paradigms,
doctrine.selected_tactics, or doctrine.selected_directives.
How to author the canvas
- Read mission artifacts:
kitty-specs/<mission>/spec.md, plan.md,
tasks.md, per-WP prompts, research/*, contracts/*, the project
glossary, and any source files the spec or plan calls out.
- Map content to the seven sections using the template at
src/doctrine/templates/fragments/reasons-canvas-template.md:
- Requirements — problem statement, acceptance criteria, DoD.
- Entities — domain concepts, relationships, canonical glossary
terms.
- Approach — selected strategy and tradeoffs considered.
- Structure — code surfaces affected, components, dependencies,
ownership boundaries.
- Operations — ordered implementation steps, test strategy.
- Norms — coding/style conventions, observability and team rules.
- Safeguards — hard constraints, security rules, performance limits,
things not to break.
- Link, don't duplicate: prefer
[see spec.md §X](../spec.md#x) over
inlining spec content. The canvas is a reasoning layer, not a copy.
- Preserve user content: if the canvas already exists, read it before
writing. Merge new content into existing sections; never blow away
user-authored prose.
- Append-only Deviations: the
## Deviations section is append-only.
New entries go at the bottom in the form
- <date> — <wp> — <description> — <rationale>. Never rewrite or
re-order existing entries.
Output path: kitty-specs/<mission>/reasons-canvas.md.
How to review with the canvas
Comparison-mode review pairs an implementation diff against the canvas:
- Trace every changed file in the diff to a Requirement and an
Operation step in the canvas. Unmapped changes are signal.
- Detect uninvented entities — files, functions, modules, or domain
terms that appear in the diff but not in the canvas, the spec, the
plan, or the glossary.
- Verify the diff respects the canvas Norms and Safeguards
(style/observability/security/performance/invariants).
- Classify every divergence using the drift taxonomy from
data-model.md §Drift classification:
approved — diff matches canvas exactly.
approved_with_deviation — small, documented divergence; record in
the canvas Deviations section.
canvas_update_needed — implementation is correct, canvas is stale.
glossary_update_needed — new canonical term surfaced; escalate to
glossary skill.
charter_follow_up — divergence touches charter policy; escalate.
follow_up_mission — divergence is real but out of scope for this
mission; file a follow-up.
scope_drift_block — diff exceeds mission scope; block.
safeguard_violation_block — diff violates a Safeguard; block hard.
Surface the classification in the review output. Two of the eight
classifications (scope_drift_block, safeguard_violation_block) block
landing; the rest are advisory or escalate.
Charter precedence
The charter is the governance source of truth. If a directive, tactic, or
norm declared in the charter conflicts with content in the canvas, the
charter wins. The canvas must update; the charter does not. Treat any
canvas claim that contradicts the charter as canvas_update_needed.
Glossary discipline
When canvas authoring or review surfaces a term that is missing,
ambiguous, or in conflict with the project glossary, do NOT redefine the
term inline. Escalate to the glossary skill (spec-kitty-glossary-context)
so the canonical entry is updated once and propagated everywhere.
Reference paths
- Template fragment:
src/doctrine/templates/fragments/reasons-canvas-template.md
- Activation helper:
src/doctrine/spdd_reasons/activation.py (is_spdd_reasons_active)
- Charter governance config:
.kittify/charter/governance.yaml
- Drift taxonomy:
kitty-specs/<mission>/data-model.md §Drift classification
1---
2name: spec-kitty-spdd-reasons
3description: >-
4 Drive REASONS Canvas authoring and review for Spec Kitty missions that
5 opted in to Structured-Prompt-Driven Development (SPDD) via charter
6 selection.
7 Triggers: "use SPDD", "use REASONS", "generate a REASONS canvas",
8 "apply structured prompt driven development", "make this mission SPDD".
9 Does NOT handle: enforcing SPDD on projects whose charter has not
10 selected the doctrine pack (escalate to charter workflow instead). Does
11 NOT mirror code as prose; code remains the source of truth for current
12 behavior.
13metadata:
14 source: https://skillmd.com/skills/aibot88/spec-kitty-spdd-reasons
15---
16
17# spec-kitty-spdd-reasons
18
19Drive REASONS Canvas authoring and review for missions that opted in to
20Structured-Prompt-Driven Development (SPDD) via charter selection. The
21canvas is a thin, agent-curated reasoning layer that sits next to the spec,
22plan, and tasks; it is **not** a duplicate system mirror.
23
24This skill is documentation for the agent. It assumes the SPDD/REASONS
25doctrine pack (paradigm, tactics, styleguide, directive, template) has
26already been shipped under `src/doctrine/` and that activation can be
27detected via the helper described below.
28
29---
30
31## What this skill does
32
33- Detects whether the SPDD/REASONS pack is active for the current project.
34- Loads mission context: `spec.md`, `plan.md`, `tasks.md`, per-WP prompts,
35 charter context, glossary, research notes, contracts, and relevant code.
36- Generates or updates `kitty-specs/<mission>/reasons-canvas.md` from the
37 seven-section template fragment.
38- Compiles per-WP REASONS summaries when an implementer or reviewer asks
39 for one (a focused slice of the canvas scoped to a single work package).
40- Runs comparison-mode review: traces a diff against the canvas and
41 classifies divergences using the drift taxonomy.
42
43## What this skill does NOT do
44
45- It does NOT mirror the code as prose. The canvas references source
46 artifacts; it does not duplicate them. Code remains the source of truth
47 for current behavior.
48- It does NOT overwrite user-authored mission artifacts. When a canvas
49 section already contains user content, the skill **merges** by appending
50 or refining, never by silent rewrite.
51- It does NOT silently enforce SPDD on projects that did not opt in via
52 charter. If the user demands enforcement and the charter is not
53 configured, escalate to the charter workflow.
54
55## Activation rules
56
57Three branches:
58
591. **Active** — charter selected the SPDD/REASONS pack (paradigm
60 `structured-prompt-driven-development`, tactic `reasons-canvas-fill`,
61 tactic `reasons-canvas-review`, or directive `DIRECTIVE_038`). Proceed
62 with canvas authoring or review using the seven-section template at
63 `src/doctrine/templates/fragments/reasons-canvas-template.md`.
642. **Inactive + ad-hoc request** — user asked to "use REASONS" once,
65 without charter opt-in. Proceed, but stamp the canvas header with a
66 "not formally opted in via charter" note so reviewers know the canvas
67 is advisory only.
683. **Inactive + enforcement demand** — user wants REASONS enforced as a
69 gate but the charter has not selected the pack. Do NOT enforce. Escalate
70 to the charter workflow: suggest running the charter interview to add
71 the paradigm or directive, then return to this skill.
72
73## How to detect activation
74
75Programmatic (preferred):
76
77```python
78from doctrine.spdd_reasons.activation import is_spdd_reasons_active
79
80active = is_spdd_reasons_active(repo_root)
81```
82
83The helper inspects `.kittify/charter/governance.yaml` and
84`.kittify/charter/directives.yaml` and returns `True` iff any of the four
85selectors is present:
86
87- paradigm `structured-prompt-driven-development`
88- tactic `reasons-canvas-fill`
89- tactic `reasons-canvas-review`
90- directive `DIRECTIVE_038`
91
92Manual fallback: read `.kittify/charter/governance.yaml` directly and look
93for the same selectors under `doctrine.selected_paradigms`,
94`doctrine.selected_tactics`, or `doctrine.selected_directives`.
95
96## How to author the canvas
97
981. **Read mission artifacts**: `kitty-specs/<mission>/spec.md`, `plan.md`,
99 `tasks.md`, per-WP prompts, `research/*`, `contracts/*`, the project
100 glossary, and any source files the spec or plan calls out.
1012. **Map content to the seven sections** using the template at
102 `src/doctrine/templates/fragments/reasons-canvas-template.md`:
103 - **Requirements** — problem statement, acceptance criteria, DoD.
104 - **Entities** — domain concepts, relationships, canonical glossary
105 terms.
106 - **Approach** — selected strategy and tradeoffs considered.
107 - **Structure** — code surfaces affected, components, dependencies,
108 ownership boundaries.
109 - **Operations** — ordered implementation steps, test strategy.
110 - **Norms** — coding/style conventions, observability and team rules.
111 - **Safeguards** — hard constraints, security rules, performance limits,
112 things not to break.
1133. **Link, don't duplicate**: prefer `[see spec.md §X](../spec.md#x)` over
114 inlining spec content. The canvas is a reasoning layer, not a copy.
1154. **Preserve user content**: if the canvas already exists, read it before
116 writing. Merge new content into existing sections; never blow away
117 user-authored prose.
1185. **Append-only Deviations**: the `## Deviations` section is append-only.
119 New entries go at the bottom in the form
120 `- <date> — <wp> — <description> — <rationale>`. Never rewrite or
121 re-order existing entries.
122
123Output path: `kitty-specs/<mission>/reasons-canvas.md`.
124
125## How to review with the canvas
126
127Comparison-mode review pairs an implementation diff against the canvas:
128
1291. **Trace** every changed file in the diff to a Requirement and an
130 Operation step in the canvas. Unmapped changes are signal.
1312. **Detect** uninvented entities — files, functions, modules, or domain
132 terms that appear in the diff but not in the canvas, the spec, the
133 plan, or the glossary.
1343. **Verify** the diff respects the canvas Norms and Safeguards
135 (style/observability/security/performance/invariants).
1364. **Classify** every divergence using the drift taxonomy from
137 `data-model.md §Drift classification`:
138 - `approved` — diff matches canvas exactly.
139 - `approved_with_deviation` — small, documented divergence; record in
140 the canvas Deviations section.
141 - `canvas_update_needed` — implementation is correct, canvas is stale.
142 - `glossary_update_needed` — new canonical term surfaced; escalate to
143 glossary skill.
144 - `charter_follow_up` — divergence touches charter policy; escalate.
145 - `follow_up_mission` — divergence is real but out of scope for this
146 mission; file a follow-up.
147 - `scope_drift_block` — diff exceeds mission scope; block.
148 - `safeguard_violation_block` — diff violates a Safeguard; block hard.
149
150Surface the classification in the review output. Two of the eight
151classifications (`scope_drift_block`, `safeguard_violation_block`) block
152landing; the rest are advisory or escalate.
153
154## Charter precedence
155
156The charter is the governance source of truth. If a directive, tactic, or
157norm declared in the charter conflicts with content in the canvas, the
158charter wins. The canvas must update; the charter does not. Treat any
159canvas claim that contradicts the charter as `canvas_update_needed`.
160
161## Glossary discipline
162
163When canvas authoring or review surfaces a term that is missing,
164ambiguous, or in conflict with the project glossary, do NOT redefine the
165term inline. Escalate to the glossary skill (`spec-kitty-glossary-context`)
166so the canonical entry is updated once and propagated everywhere.
167
168---
169
170## Reference paths
171
172- Template fragment:
173 `src/doctrine/templates/fragments/reasons-canvas-template.md`
174- Activation helper:
175 `src/doctrine/spdd_reasons/activation.py` (`is_spdd_reasons_active`)
176- Charter governance config:
177 `.kittify/charter/governance.yaml`
178- Drift taxonomy:
179 `kitty-specs/<mission>/data-model.md §Drift classification`