Work Packages: Git paths are data, not text

Inputs: kitty-specs/git-paths-are-data-01M3SSXR/ — spec.md, plan.md, research.md, data-model.md, contracts/kernel-git-api.md, quickstart.md Tests: required (red-first P0 repros, unit tests for the kernel owner, an empty-allowlist gate).

Subtasks are reference rows; record completion with spec-kitty agent tasks mark-status <Txxx> --status done.

Subtask Index

IDDescriptionWPParallel
T001kernel/git/runner.py: run_git, GitResult, GitCommandError, decode_pathWP01
T002kernel/git/paths.py: GitPath value typeWP01[P]
T003kernel/git/listing.py: status_entries + StatusEntry (NUL-safe, renames)WP01
T004kernel/git/listing.py: tree/changed/commit/log/tracked/index queriesWP01
T005Unit tests from real git output (quoted, non-ASCII, -> , renames, failures, literal pathspecs)WP01
T006kernel README + no-destructive-literal testWP01[P]
T007Red-first @pytest.mark.regression repros for #5392 and #5400 through advance_branch_refWP02
T008Carry PR #5437 commit (cherry-pick -x)WP02
T009Campsite: route _target_tree_paths / _dirty_entries listing through kernel queriesWP02
T010Obstruction rule on GitPath.overlaps; typed obstruction verdict; message renderingWP02
T011Entry-point coverage: reset-obstruction probe + guarded worktree removal; half-by-half proof; convert reprosWP02
T012Re-base core/vcs/git.py helpers + GitVCS listing methods on kernel queries; FR-013 classificationWP03
T013Migrate consolidation/git_probes.py, bookkeeping_projection.pyWP03
T014Migrate coordination/commit_router.py, surface_resolver.py, transaction.pyWP03
T015Tests for migrated merge-seam sites (quoted path fixtures)WP03
T016Migrate git/commit_helpers.py, git/report_transaction.py, git/sparse_checkout_remediation.pyWP04
T017Migrate lanes/auto_rebase.py, lanes/consolidation.py, lanes/for_review_gate.pyWP04
T018Migrate lanes/worktree_allocator.py + lanes/checkout_occupancy.py parserWP04
T019Migrate live_work/watcher.py, gitignore_manager.pyWP04
T020Tests for WP04 sitesWP04
T021Migrate agent/tasks_move_task.py (incl. .strip('"') half-decoder)WP05
T022Migrate agent/tasks_parsing_validation.py, agent/tasks_mark_status.pyWP05
T023Migrate agent/mission_finalize.py, mission_setup_plan.py, mission_record_analysis.py, mission_repair.pyWP05
T024Migrate agent/workflow.py, agent/workflow_executor.pyWP05
T025Tests for WP05 sitesWP05
T026Migrate safe_commit_cmd.py, implement_cores.pyWP06
T027Migrate accept.py, acceptance/__init__.py, mission_type.py, charter_bundle.pyWP06
T028Migrate _coordination_doctor.py, review/_dead_code.py, agent_tasks_ports.py, task_utils/support.pyWP06
T029Tests for WP06 sitesWP06
T030Migrate policy/commit_guard_hook.py, bulk_edit/gate.py (fail-open classification checks)WP07
T031Migrate post_merge/stale_assertions.py, post_merge/retrospective_terminus.py, charter_runtime/preflight/runner.pyWP07
T032Migrate core/mission_creation.py, missions/_substantive.py, migration/runner.py, upgrade/autocommit.pyWP07
T033Migrate the three upgrade migrations (behaviour-identical)WP07
T034Tests for WP07 sitesWP07
T035tests/architectural/test_git_path_listing_owner.py: rule, floor, planted hit, worktree negative control, empty allowlistWP08
T036Fold T019's porcelain scan into the new gate; shrink T019's registryWP08
T037Run named gates + record base census N and close count 0WP08
T038ADR docs/adr/4.x/2026-09-30-1-allowlist-ratchets-are-priced-debt.mdWP09[P]
T039Charter: standing order 5 + Burn-down Policy amendmentWP09
T040Packs: built-in ratchet tactic caveat, internal CI-cost rationale, regenerate graphWP09
T041Docs index/freshness + terminology guard; file the plain-runner follow-up issueWP09

Work Package WP01: Kernel git owner (Priority: P0)

Goal: one runner, NUL-safe listing, GitPath, typed entries and queries in src/kernel/git/. Independent Test: pytest tests/kernel/test_git_*.py green against real git repos with spaced, non-ASCII and -> names. Prompt: tasks/WP01-kernel-git-owner.md Requirement Refs: FR-003, FR-004, FR-005, FR-006, FR-014, NFR-002, NFR-003, NFR-004, C-001, C-007, C-008

Included Subtasks

T001 runner (WP01) T002 GitPath (WP01) T003 status_entries (WP01) T004 other listing queries (WP01) T005 unit tests (WP01) T006 README + no-destructive-literal test (WP01)

Dependencies

  • None. Estimated prompt ~350 lines.

Work Package WP02: Branch advance on the owner — P0 fix for #5392/#5400 (Priority: P0)

Goal: consolidate refuses on quoted-path and ancestor collisions; separately landable. Independent Test: regression tests red on base, green after; tests/git/ + T018/T019/NFR-004/AC-B3 gates green. Prompt: tasks/WP02-ref-advance-p0.md Requirement Refs: FR-001, FR-002, FR-007, C-002, C-003, C-009

Included Subtasks

T007 red-first repros (WP02) T008 carry PR #5437 (WP02) T009 campsite listing through kernel (WP02) T010 GitPath obstruction rule (WP02) T011 entry-point coverage + half-by-half (WP02)

Dependencies

  • Depends on WP01. Estimated prompt ~330 lines.

Work Package WP03: Merge-seam call sites (Priority: P1)

Goal: core/vcs/git.py, consolidation/, coordination/ listing sites on kernel queries. Prompt: tasks/WP03-merge-seam-sites.md Requirement Refs: FR-008, FR-013, NFR-001, NFR-005

T012 core/vcs helpers (WP03) T013 consolidation (WP03) T014 coordination (WP03) T015 tests (WP03)

Dependencies

  • Depends on WP01. Parallel with WP04–WP07.

Work Package WP04: git/, lanes/ and watcher call sites (Priority: P1)

Prompt: tasks/WP04-git-lanes-sites.md Requirement Refs: FR-008, FR-013, NFR-001

T016 git/ modules (WP04) T017 lanes merge helpers (WP04) T018 worktree allocator + occupancy (WP04) T019 watcher + gitignore manager (WP04) T020 tests (WP04)

Dependencies

  • Depends on WP01.

Work Package WP05: agent command call sites (Priority: P1)

Prompt: tasks/WP05-agent-command-sites.md Requirement Refs: FR-008, NFR-001

T021 tasks_move_task (WP05) T022 tasks parsing/mark-status (WP05) T023 mission_* commands (WP05) T024 workflow commands (WP05) T025 tests (WP05)

Dependencies

  • Depends on WP01.

Work Package WP06: other CLI command call sites (Priority: P1)

Prompt: tasks/WP06-cli-command-sites.md Requirement Refs: FR-008, NFR-001

T026 safe_commit + implement (WP06) T027 accept/acceptance/mission_type/charter_bundle (WP06) T028 doctors, dead-code, ports, support (WP06) T029 tests (WP06)

Dependencies

  • Depends on WP01.

Work Package WP07: policy, post-merge, migration and upgrade call sites (Priority: P1)

Prompt: tasks/WP07-policy-upgrade-sites.md Requirement Refs: FR-008, FR-013, NFR-001

T030 commit guard + bulk edit gate (WP07) T031 post_merge + charter preflight (WP07) T032 mission creation, substantive, migration runner, autocommit (WP07) T033 upgrade migrations (WP07) T034 tests (WP07)

Dependencies

  • Depends on WP01.

Work Package WP08: Empty-allowlist class gate (Priority: P1)

Prompt: tasks/WP08-class-gate.md Requirement Refs: FR-009, SC-002, SC-003

T035 gate (WP08) T036 fold T019 porcelain scan (WP08) T037 run named gates, record counts (WP08)

Dependencies

  • Depends on WP02, WP03, WP04, WP05, WP06, WP07.

Work Package WP09: Ratchets are priced debt (Priority: P2)

Prompt: tasks/WP09-ratchet-governance.md Requirement Refs: FR-010, FR-011, FR-012, SC-004, C-005

T038 ADR (WP09) T039 charter amendment (WP09) T040 packs + regenerate graph (WP09) T041 docs checks + follow-up issue (WP09)

Dependencies

  • None. Parallel with everything.