# 2.x ADRs

- [2.x ADRs](/adr/2.x/README.md) - Index and era history for the 2.x decisions — event-sourced status, doctrine and glossary governance, tracker connectors, and the canonical runtime next command loop.
- [Dual-Repository Pattern for Private spec-kitty-events Dependency](/adr/2.x/2026-01-27-11-dual-repository-pattern.md) - Keeps the shared events library in its own private repository, consumed as a commit-pinned git dependency, so CI stays autonomous and the CLI repo stays public.
- [Two-Branch Strategy for SaaS Transformation](/adr/2.x/2026-01-27-12-two-branch-strategy-for-saas-transformation.md) - Ships stable local-only 1.x while 2.x develops event sourcing and sync on greenfield, deferring the state migration until the distributed design proves itself.
- [Target Branch Routing for Status Commits](/adr/2.x/2026-01-29-13-target-branch-routing-for-status-commits.md) - Replaced status commits hard-wired to main with an explicit target_branch recorded in meta.json, ending the silent divergence between the two release tracks.
- [Explicit Metadata Fields Over Implicit Defaults](/adr/2.x/2026-01-29-14-explicit-metadata-fields-over-implicit-defaults.md) - Requires meta.json to spell out target branch and version control system rather than lean on hidden defaults, so configuration is readable without running code.
- [Merge-First Suggestion for Completed Multi-Parent Dependencies](/adr/2.x/2026-01-29-15-merge-first-suggestion-for-completed-dependencies.md) - Detected that every declared parent was already finished and advised consolidating them first, instead of walking into predictable add/add conflicts.
- [Rich JSON Outputs for Agent Commands](/adr/2.x/2026-01-29-16-rich-json-outputs-for-agent-commands.md) - Expands agent-facing JSON with commit hashes and touched-file lists so an agent can confirm what actually happened instead of inferring it from a dirty tree.
- [Auto-Create Target Branch on First Implement](/adr/2.x/2026-01-29-17-auto-create-target-branch-on-first-implement.md) - Broke the bootstrap paradox by creating a missing target branch on the first implement call, which removed the hand-written branch-creation task from WP01.
- [Auto-Detect Merged Single-Parent Dependencies](/adr/2.x/2026-01-30-18-auto-detect-merged-single-parent-dependencies.md) - Recognised that an integrated dependency already sits in the target branch and branched from there, rather than failing because its worktree had been cleaned up.
- [Auto-Discover Migrations from Filesystem](/adr/2.x/2026-01-30-19-auto-discover-migrations-from-filesystem.md) - Discovers upgrade migrations by scanning the package at import time, eliminating the forgotten registration line that repeatedly blocked releases at the CI gate.
- [Vendor spec-kitty-events Library Instead of External PyPI Dependency](/adr/2.x/2026-01-31-1-vendor-spec-kitty-events.md) - Vendors the events library into the CLI because PyPI refuses direct git dependencies, trading repository purity for a package that can actually be published.
- [Canonical WP Status Model Using Append-Only JSONL Event Log](/adr/2.x/2026-02-09-1-canonical-wp-status-model.md) - Replaces five mutable status artifacts with one append-only JSONL event log and a derived snapshot, giving work package state a single, replayable authority.
- [WP Lifecycle State Machine](/adr/2.x/2026-02-09-2-wp-lifecycle-state-machine.md) - Introduced a guarded lane transition matrix with claimed, blocked, and canceled states so concurrent agents could not jump straight from planned to done.
- [Event-Log Merge Semantics for Concurrent Agents](/adr/2.x/2026-02-09-3-event-log-merge-semantics.md) - Reconciles divergent status logs by concatenating, deduplicating, and replaying events with rollback-aware precedence, so a reviewer's rejection is never overwritten.
- [Cross-Repo Evidence-Based Completion](/adr/2.x/2026-02-09-4-cross-repo-evidence-completion.md) - Required structured commit evidence before completion, closing the split-brain gap where the planning repository and the implementation repository disagreed.
- [Docker-Sandboxed Agent Execution](/adr/2.x/2026-02-11-1-docker-sandboxed-agent-execution.md) - Proposes running agents inside containers with memory, CPU, and process limits so a runaway agent cannot take the orchestrator or the host machine down with it.
- [Fresh Context Execution Mode for Long-Running Work Packages](/adr/2.x/2026-02-11-2-fresh-context-execution-mode.md) - An opt-in mode that resets an agent's context at every subtask boundary, trading spawn overhead for less hallucination drift on long-running work packages.
- [Entire.io Checkpoint Import for Session History Interoperability](/adr/2.x/2026-02-11-3-entire-checkpoint-import-interoperability.md) - Argues for a read-only importer for Entire.io session checkpoints, so their capture tooling can coexist with Spec Kitty's own event log rather than displace it.
- [Agent Attribution Tracking for Transparency and Compliance](/adr/2.x/2026-02-11-4-agent-attribution-tracking.md) - Line-level attribution joining git blame to agent execution logs, so regulated teams can say which model or which human authored any particular line of code.
- [Task-Tracker-Agnostic Connector Architecture](/adr/2.x/2026-02-11-5-task-tracker-agnostic-connector-architecture.md) - Treats Jira as one connector behind a shared interface rather than an architectural assumption, keeping Linear, Asana, and GitHub Issues equally first-class.
- [PyPI Exact Pinning for `spec-kitty-events` Across Consumer Repos](/adr/2.x/2026-02-11-6-pypi-exact-pinning-for-spec-kitty-events.md) - Forces the CLI and the hosted backend onto the same exact published version of the events contract, banning git refs and committed path overrides that caused drift.
- [Canonical `spec-kitty next` Command for Agent Execution Loop](/adr/2.x/2026-02-17-1-canonical-next-command-runtime-loop.md) - Collapses per-step agent entrypoints into a single repeatedly-called next command that returns the prompt and context for whatever the Mission needs done next.
- [Runtime-owned Mission Discovery and Loading](/adr/2.x/2026-02-17-2-runtime-owned-mission-discovery-loading.md) - Gives the runtime sole ownership of Mission discovery and YAML loading, so the CLI stops keeping a second precedence order that resolved custom packs differently.
- [Events Contract Parity and Vendored Module Deprecation](/adr/2.x/2026-02-17-3-events-contract-parity-and-vendor-deprecation.md) - Names the published events package the only contract authority, schedules the vendored copy for removal, and requires CI parity checks across consuming repos.
- [Consistent Code Style Enforcement via Git Hooks](/adr/2.x/2026-02-21-1-consistent-code-style-enforcement-via-git-hooks.md) - Runs ruff format, ruff check, and mypy over staged files at commit time, accepting an opinionated formatter in exchange for feedback that beats the CI round trip.
- [Doctrine Artifact Governance Model](/adr/2.x/2026-02-23-1-doctrine-artifact-governance-model.md) - Stores directives, tactics, styleguides, and mission assets as typed schema-validated repository artifacts, and compiles charter bundles from them, not from prose.
- [Living Glossary Context and Curation Model](/adr/2.x/2026-02-23-2-living-glossary-context-and-curation-model.md) - Puts term ownership in domain contexts, curation rules in doctrine, and enforcement in a runtime hook, so terminology drift is caught while the work happens.
- [Versioned 1.x/2.x Documentation Site Without Hosted-Platform Scope](/adr/2.x/2026-02-23-3-versioned-1x-2x-docs-site-without-hosted-platform-scope.md) - Splits the documentation site into explicit 1.x and 2.x tracks behind a versioned landing page, while deliberately holding hosted-platform guidance out of scope.
- [Repurpose `verify` and Move Setup Checks Under `doctor`](/adr/2.x/2026-02-25-1-repurpose-verify-and-doctor-command-taxonomy.md) - Reassigns verify to checking delivered implementation against artifacts and relocates setup diagnostics under doctor setup, matching what users expect each verb to mean.
- [Post-Merge Mission Audit Artifact and Event Emission](/adr/2.x/2026-02-25-2-post-merge-audit-artifact-and-event-emission.md) - Emits a canonical audit artifact and lifecycle events once a Mission is integrated, giving a durable, projectable answer to whether delivery matched the spec.
- [Mission Audit Primitive Hardening and 2.x-Only Policy](/adr/2.x/2026-02-25-3-mission-audit-primitive-hardening-and-2x-policy.md) - Implements auditing as a declarable Mission primitive behind compatibility gates, keeping built-in and custom Missions portable across local and hosted projections.
- [CLI Tracker Surface Gated by SaaS Sync Flag](/adr/2.x/2026-02-27-1-cli-tracker-surface-gated-by-saas-sync-flag.md) - Registers tracker commands only when the hosted sync flag is enabled, so a local-only install never discovers a half-working surface it has no way to complete.
- [Host-Owned Tracker Persistence Boundary](/adr/2.x/2026-02-27-2-host-owned-tracker-persistence-boundary.md) - Keeps SQLite caches and checkpoints in the host CLI and leaves the tracker core protocol-only, matching how the sync queue and status store are already owned.
- [SaaS Tracker Integration via Existing Connectors Journey](/adr/2.x/2026-02-27-3-saas-tracker-integration-via-existing-connectors-journey.md) - Folds tracker binding, snapshot ingestion, and drift reporting into the established connectors and dashboard journey instead of building a parallel hosted surface.
- [Vertical-Slice Test Organisation](/adr/2.x/2026-03-15-1-vertical-slice-test-organisation.md) - Reorganises the suite by system capability instead of by unit-versus-integration, demoting test type to pytest markers and filename suffixes where it belongs.
- [Remove the Clarify Slash Command](/adr/2.x/2026-03-20-1-remove-clarify-slash-command.md) - Deletes the clarify slash command outright and ships a destructive upgrade migration, folding its value back into stronger specification work up front.
- [ADR: Glossary Primitive Type Ownership and the Kernel Package](/adr/2.x/2026-03-25-1-glossary-type-ownership.md) - Relocates stdlib-only glossary value types into the kernel package so doctrine stops importing from specify_cli and the container dependency direction holds.
- [ADR: Architectural Dependency Testing & Graph Infrastructure](/adr/2.x/2026-03-27-1-pytestarch-architectural-dependency-testing.md) - Adopts PyTestArch so the kernel, doctrine, charter, and specify_cli dependency direction is executable, and a violating import fails a test instead of lingering.
