Work Packages: Charter governance resolution

Inputs: Design documents from kitty-specs/charter-governance-resolution-01M57Z77/ Prerequisites: plan.md, spec.md, research.md, data-model.md, quickstart.md

Tests: required by the spec (red-first, ADR 2026-07-17-1; non-vacuity per tactic acceptance-criteria-non-vacuity).

Organization: subtasks (Txxx) roll up into work packages (WPxx). Record completion with spec-kitty agent tasks mark-status <Txxx> --status done.

Subtask Index

IDDescriptionWPParallel
T001Capture NFR-004 default in-force golden snapshotWP01
T002Red tests for the identity indexWP01
T003Implement IdentityIndex and export itWP01
T004Declared-id fallback for every kind in resolve_artifact_urnWP01
T005Scan-count probe (NFR-003)WP01
T006Fixture org pack + red tests for governance identityWP02
T007Directive base and selection validation through the indexWP02
T008Paradigm validation and remediation textsWP02
T009Service getters for every kindWP02
T011Verify WP02WP02
T012Red tests for identity surfacesWP03
T013Action bundle and activation filterWP03
T016Verify WP03WP03
T017Red tests for the synthesized tactic edgeWP04[P]
T018Emission: directive suggests tacticWP04
T019edge_owner and reconcile call sitesWP04
T020Legacy applies stripWP04
T021Relation prose in lockstep and legacy-shape fixturesWP04
T022Red tests for synthesized tactic deliveryWP05
T023reach_only_tactic_idsWP05
T024Subtract reach-only tactics from seedsWP05
T025Activation append in synthesizeWP05
T026Red tests for --onlyWP06[P]
T027Engine narrow_base and frozen-list warningsWP06
T028org_required_stemsWP06
T029Manager only=WP06
T030CLI --onlyWP06
T031Red tests for interview narrow modeWP07
T032--narrow-activationWP07
T033Contract textWP07
T034Pack gatesWP07
T035Red tests for stack detectionWP08[P]
T036Scan restructuringWP08
T037Root-first _detect_languageWP08
T038Neutrality slug componentsWP08
T039Red tests for diagnostics surfacesWP09
T040Compact, JSON builder, contract, CLI pass-throughWP09
T041Doctor and prompt builderWP09
T042Verify WP09WP09
T043Red tests for render and list surfacesWP10
T044--include and selection blockWP10
T045Preset application and charter listWP10
T046Verify WP10WP10

Work Package WP01: Identity index and default in-force snapshot (Priority: P1)

Goal: one per-invocation, layer-aware stem ↔ declared-id authority for every activatable kind; golden snapshot of today's default in-force sets. Independent Test: tests/charter/activation/test_identity_index.py passes; snapshot committed on unmodified code. Prompt: tasks/WP01-identity-index.md Requirement Refs: FR-006, NFR-003, NFR-004, C-002, C-007

Included Subtasks

T001 Capture NFR-004 default in-force golden snapshot (WP01) T002 Red tests for the identity index (WP01) T003 Implement IdentityIndex and export it (WP01) T004 Declared-id fallback for every kind in resolve_artifact_urn (WP01) T005 Scan-count probe (WP01)

Dependencies

  • None.

Risks & Mitigations

  • Import cycles → index never imports resolver/profile_resolution.

Work Package WP02: Governance resolution identity (Priority: P1)

Goal: declared ids in the governance base (#6406), layer-aware selections with unknown ids dropped and diagnosed (#6407; supersedes the #3908 fail-loud test), every service getter delivers stem ≠ id artifacts. Independent Test: fixture org pack (qa-003-no-fake-green → QA_003) shows QA_003; [QA_003, NOPE_999] keeps governance and reports NOPE_999. Prompt: tasks/WP02-governance-resolution-identity.md Requirement Refs: FR-007, FR-008, FR-009, FR-010, FR-011, NFR-004

Included Subtasks

T006 Fixture org pack + red tests (WP02) T007 Directive base and selection validation through the index (WP02) T008 Paradigm validation and remediation texts (WP02) T009 Service getters for every kind (WP02) T011 Verify (WP02)

Dependencies

  • Depends on WP01.

Work Package WP09: Governance diagnostics surfaces (Priority: P1)

Goal: unknown-selection diagnostics visible in compact text, JSON (diagnostics, schema 1.4.0), the CLI pass-through, doctor and the prompt builder. Independent Test: [QA_003, NOPE_999] → CLI JSON exit 0 with diagnostics naming NOPE_999. Prompt: tasks/WP09-governance-diagnostics-surfaces.md Requirement Refs: FR-010, FR-011, NFR-003

Included Subtasks

T039 Red tests (WP09) T040 Compact, JSON builder, contract, CLI pass-through (WP09) T041 Doctor and prompt builder (WP09) T042 Verify (WP09)

Dependencies

  • Depends on WP02.

Work Package WP03: Action bundle identity (Priority: P1)

Goal: action bundle and DRG activation filter resolve tokens through the index. Independent Test: org tactic with stem ≠ id delivered under stem and declared-id tokens. Prompt: tasks/WP03-action-bundle-identity.md Requirement Refs: FR-007, FR-008, NFR-003

Included Subtasks

T012 Red tests (WP03) T013 Action bundle and activation filter (WP03) T016 Verify (WP03)

Dependencies

  • Depends on WP02, WP09.

Work Package WP10: Render and list identity (Priority: P1)

Goal: --include, selection block, presets and charter list use the index. Independent Test: both spellings resolve in --include; charter list shows the activated org tactic as activated. Prompt: tasks/WP10-render-and-list-identity.md Requirement Refs: FR-007, FR-017

Included Subtasks

T043 Red tests (WP10) T044 --include and selection block (WP10) T045 Preset application and charter list (WP10) T046 Verify (WP10)

Dependencies

  • Depends on WP02, WP09.

Work Package WP04: Synthesized tactic edge and reconcile ownership (Priority: P1)

Goal: directive --suggests--> tactic emission, owner-based reconcile, prune of touching edges, legacy applies strip, relation prose (#6404). Independent Test: second synthesize leaves exactly one suggests edge; legacy applies stripped. Prompt: tasks/WP04-synthesized-tactic-edge.md Requirement Refs: FR-001, FR-004, FR-005, C-004

Included Subtasks

T017 Red tests (WP04) T018 Emission (WP04) T019 edge_owner and reconcile call sites (WP04) T020 Legacy applies strip (WP04) T021 Relation prose and fixtures (WP04)

Dependencies

  • None (parallel with WP01-WP03).

Work Package WP05: Synthesized tactic delivery and activation append (Priority: P1)

Goal: edge-carrying synthesized tactics are not roots; synthesize appends its tactic ids to an explicit activated_tactics. Independent Test: directive active → tactic delivered; edge removed or directive deactivated → not delivered. Prompt: tasks/WP05-synthesized-tactic-delivery.md Requirement Refs: FR-002, FR-003, C-001

Included Subtasks

T022 Red tests (WP05) T023 reach_only_tactic_ids (WP05) T024 Subtract reach-only tactics from seeds (WP05) T025 Activation append in synthesize (WP05)

Dependencies

  • Depends on WP03, WP04.

Work Package WP06: Opt-in narrow activation (Priority: P2)

Goal: charter activate <kind> <id> --only; frozen-list warnings (#6408). Independent Test: fresh --only writes one entry and lists what stopped being in force. Prompt: tasks/WP06-narrow-activation-only.md Requirement Refs: FR-012, FR-014, C-001

Included Subtasks

T026 Red tests (WP06) T027 Engine narrow_base and warnings (WP06) T028 org_required_stems (WP06) T029 Manager only= (WP06) T030 CLI --only (WP06)

Dependencies

  • Depends on WP01.

Work Package WP07: Interview narrow activation and contract text (Priority: P2)

Goal: charter interview --narrow-activation; /spec-kitty.charter contract text. Independent Test: narrow interview writes selection + org-required only; JSON narrowed. Prompt: tasks/WP07-interview-narrow-and-contract.md (also regenerates CLI reference docs) Requirement Refs: FR-013, FR-014, C-003

Included Subtasks

T031 Red tests (WP07) T032 --narrow-activation (WP07) T033 Contract text (WP07) T034 Pack gates (WP07)

Dependencies

  • Depends on WP06.

Work Package WP08: Root-first stack detection (Priority: P2)

Goal: root-first indicators, JVM indicators, count tie-break; neutrality slug components (#6405). Independent Test: Gradle + site/ fixture → java; docs-only control → typescript. Prompt: tasks/WP08-root-first-stack-detection.md Requirement Refs: FR-015, FR-016, C-006

Included Subtasks

T035 Red tests (WP08) T036 Scan restructuring (WP08) T037 Root-first _detect_language (WP08) T038 Neutrality slug components (WP08)

Dependencies

  • None (parallel).

Parallel Opportunities

WP01, WP04 and WP08 can start immediately; chains: WP01 → WP02 → WP09 → {WP03, WP10}; {WP03, WP04} → WP05; WP01 → WP06 → WP07.

Success Criteria Coverage

SCWP
SC-001WP05
SC-002WP02, WP09, WP10
SC-003WP02, WP09
SC-004WP06
SC-005WP08

NFR-001, NFR-002 and C-005 are cross-cutting: every WP's quality gates and diff coverage apply.

MVP

WP01 + WP02 (the identity root behind #6406, #6407 and the sibling defect).