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/charter/offering/ 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/charter/offering/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 charter.offering.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 charter.offering.selected_paradigms,
charter.offering.selected_tactics, or charter.offering.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/charter/offering/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/charter/offering/templates/fragments/reasons-canvas-template.md
- Activation helper:
src/charter/offering/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-reasons3description: Drive REASONS Canvas authoring and review for Spec Kitty missions that opted in to Structured-Prompt-Driven Development (SPDD) via charter selection. Triggers: "use SPDD", "use REASONS", "generate a REASONS canvas", "apply structured prompt driven development", "make this mission SPDD". Does NOT handle: enforcing SPDD on projects whose charter has not selected the doctrine pack (escalate to charter workflow instead). Does NOT mirror code as prose; code remains the source of truth for current behavior.4---56# spec-kitty-spdd-reasons78Drive REASONS Canvas authoring and review for missions that opted in to9Structured-Prompt-Driven Development (SPDD) via charter selection. The10canvas is a thin, agent-curated reasoning layer that sits next to the spec,11plan, and tasks; it is **not** a duplicate system mirror.1213This skill is documentation for the agent. It assumes the SPDD/REASONS14doctrine pack (paradigm, tactics, styleguide, directive, template) has15already been shipped under `src/charter/offering/` and that activation can be16detected via the helper described below.1718---1920## What this skill does2122- Detects whether the SPDD/REASONS pack is active for the current project.23- Loads mission context: `spec.md`, `plan.md`, `tasks.md`, per-WP prompts,24 charter context, glossary, research notes, contracts, and relevant code.25- Generates or updates `kitty-specs/<mission>/reasons-canvas.md` from the26 seven-section template fragment.27- Compiles per-WP REASONS summaries when an implementer or reviewer asks28 for one (a focused slice of the canvas scoped to a single work package).29- Runs comparison-mode review: traces a diff against the canvas and30 classifies divergences using the drift taxonomy.3132## What this skill does NOT do3334- It does NOT mirror the code as prose. The canvas references source35 artifacts; it does not duplicate them. Code remains the source of truth36 for current behavior.37- It does NOT overwrite user-authored mission artifacts. When a canvas38 section already contains user content, the skill **merges** by appending39 or refining, never by silent rewrite.40- It does NOT silently enforce SPDD on projects that did not opt in via41 charter. If the user demands enforcement and the charter is not42 configured, escalate to the charter workflow.4344## Activation rules4546Three branches:47481. **Active** — charter selected the SPDD/REASONS pack (paradigm49 `structured-prompt-driven-development`, tactic `reasons-canvas-fill`,50 tactic `reasons-canvas-review`, or directive `DIRECTIVE_038`). Proceed51 with canvas authoring or review using the seven-section template at52 `src/charter/offering/templates/fragments/reasons-canvas-template.md`.532. **Inactive + ad-hoc request** — user asked to "use REASONS" once,54 without charter opt-in. Proceed, but stamp the canvas header with a55 "not formally opted in via charter" note so reviewers know the canvas56 is advisory only.573. **Inactive + enforcement demand** — user wants REASONS enforced as a58 gate but the charter has not selected the pack. Do NOT enforce. Escalate59 to the charter workflow: suggest running the charter interview to add60 the paradigm or directive, then return to this skill.6162## How to detect activation6364Programmatic (preferred):6566```python67from charter.offering.spdd_reasons.activation import is_spdd_reasons_active6869active = is_spdd_reasons_active(repo_root)70```7172The helper inspects `.kittify/charter/governance.yaml` and73`.kittify/charter/directives.yaml` and returns `True` iff any of the four74selectors is present:7576- paradigm `structured-prompt-driven-development`77- tactic `reasons-canvas-fill`78- tactic `reasons-canvas-review`79- directive `DIRECTIVE_038`8081Manual fallback: read `.kittify/charter/governance.yaml` directly and look82for the same selectors under `charter.offering.selected_paradigms`,83`charter.offering.selected_tactics`, or `charter.offering.selected_directives`.8485## How to author the canvas86871. **Read mission artifacts**: `kitty-specs/<mission>/spec.md`, `plan.md`,88 `tasks.md`, per-WP prompts, `research/*`, `contracts/*`, the project89 glossary, and any source files the spec or plan calls out.902. **Map content to the seven sections** using the template at91 `src/charter/offering/templates/fragments/reasons-canvas-template.md`:92 - **Requirements** — problem statement, acceptance criteria, DoD.93 - **Entities** — domain concepts, relationships, canonical glossary94 terms.95 - **Approach** — selected strategy and tradeoffs considered.96 - **Structure** — code surfaces affected, components, dependencies,97 ownership boundaries.98 - **Operations** — ordered implementation steps, test strategy.99 - **Norms** — coding/style conventions, observability and team rules.100 - **Safeguards** — hard constraints, security rules, performance limits,101 things not to break.1023. **Link, don't duplicate**: prefer `[see spec.md §X](../spec.md#x)` over103 inlining spec content. The canvas is a reasoning layer, not a copy.1044. **Preserve user content**: if the canvas already exists, read it before105 writing. Merge new content into existing sections; never blow away106 user-authored prose.1075. **Append-only Deviations**: the `## Deviations` section is append-only.108 New entries go at the bottom in the form109 `- <date> — <wp> — <description> — <rationale>`. Never rewrite or110 re-order existing entries.111112Output path: `kitty-specs/<mission>/reasons-canvas.md`.113114## How to review with the canvas115116Comparison-mode review pairs an implementation diff against the canvas:1171181. **Trace** every changed file in the diff to a Requirement and an119 Operation step in the canvas. Unmapped changes are signal.1202. **Detect** uninvented entities — files, functions, modules, or domain121 terms that appear in the diff but not in the canvas, the spec, the122 plan, or the glossary.1233. **Verify** the diff respects the canvas Norms and Safeguards124 (style/observability/security/performance/invariants).1254. **Classify** every divergence using the drift taxonomy from126 `data-model.md §Drift classification`:127 - `approved` — diff matches canvas exactly.128 - `approved_with_deviation` — small, documented divergence; record in129 the canvas Deviations section.130 - `canvas_update_needed` — implementation is correct, canvas is stale.131 - `glossary_update_needed` — new canonical term surfaced; escalate to132 glossary skill.133 - `charter_follow_up` — divergence touches charter policy; escalate.134 - `follow_up_mission` — divergence is real but out of scope for this135 mission; file a follow-up.136 - `scope_drift_block` — diff exceeds mission scope; block.137 - `safeguard_violation_block` — diff violates a Safeguard; block hard.138139Surface the classification in the review output. Two of the eight140classifications (`scope_drift_block`, `safeguard_violation_block`) block141landing; the rest are advisory or escalate.142143## Charter precedence144145The charter is the governance source of truth. If a directive, tactic, or146norm declared in the charter conflicts with content in the canvas, the147charter wins. The canvas must update; the charter does not. Treat any148canvas claim that contradicts the charter as `canvas_update_needed`.149150## Glossary discipline151152When canvas authoring or review surfaces a term that is missing,153ambiguous, or in conflict with the project glossary, do NOT redefine the154term inline. Escalate to the glossary skill (`spec-kitty-glossary-context`)155so the canonical entry is updated once and propagated everywhere.156157---158159## Reference paths160161- Template fragment:162 `src/charter/offering/templates/fragments/reasons-canvas-template.md`163- Activation helper:164 `src/charter/offering/spdd_reasons/activation.py` (`is_spdd_reasons_active`)165- Charter governance config:166 `.kittify/charter/governance.yaml`167- Drift taxonomy:168 `kitty-specs/<mission>/data-model.md §Drift classification`