Tasks: 065 Tasks And Lane Stabilization

Mission: 065-tasks-and-lane-stabilization Spec: spec.md | Plan: plan.md Target Branch: main Date: 2026-04-06

Subtask Index

IDSummaryWPParallel
T001Extract shared dependency parser into reusable moduleWP01No
T002Add bullet-list dependency format recognitionWP01No
T003Wire both finalize-tasks entry points to shared parserWP01No
T004Implement disagree-loud on non-empty dependency conflictWP01No
T005Fix set_scalar type mismatch — use FrontmatterManager for list fieldsWP01No
T006Gate all mutations on validate_only flagWP01No
T007Implement validate-only mutation reportWP01No
T008Implement accurate per-WP mutation reportingWP01No
T009Write regression tests for WP01WP01No
T010Assert all executable WPs appear in lane assignmentWP02No
T011Fail diagnostically on executable WPs missing ownership manifestsWP02No
T012Add planning-artifact exclusion diagnostic to outputWP02No
T013Add glob-match validation warning for zero-match owned_filesWP02No
T014Add warning for src/** fallback in ownership inferenceWP02No
T015Write regression tests for WP02WP02No
T016Add CollapseReport data model to lanes/models.pyWP03No
T017Record collapse events during union-find rulesWP03No
T018Refine Rule 3 — gate surface heuristic on non-disjoint ownershipWP03No
T019Count independent-WP collapses in reportWP03No
T020Wire collapse report into finalize-tasks and compute_lanes outputWP03No
T021Write regression tests for WP03WP03No
T022Add pipe-table row detection to mark-statusWP04[P]
T023Implement pipe-table status update logicWP04[P]
T024Standardize tasks template to checkbox formatWP04[P]
T025Write regression tests for WP04WP04[P]
T026Fix --feature to --mission in middleware.py error messageWP05[P]
T027Fix --feature to --mission in store.py error messageWP05[P]
T028Add --mission hint to shim templateWP05[P]
T029Fix tasks.md template context resolve exampleWP05[P]
T030Audit all template command examples for missing --missionWP05[P]
T031Improve require_explicit_feature error messageWP05[P]
T032Write regression tests for WP05WP05[P]
T033Fix --feature command_hint in 5 require_explicit_feature callersWP05[P]

Work Package Execution Order

Phase 1 (parallel): WP01, WP02, WP05 — no inter-dependencies, disjoint file ownership Phase 2 (parallel): WP03, WP04 — WP03 depends on WP02 (lane computation); WP04 depends on WP01 + WP05 (shared tasks.py and tasks template ownership)


WP01 — Dependency and Frontmatter Truth

Priority: P0 Issues: #406, #417 Prompt: tasks/WP01-dependency-frontmatter-truth.md Estimated size: ~550 lines

Summary

Fix the finalize-tasks pipeline so it (a) parses both inline and bullet-list dependency formats, (b) fails loudly on non-empty disagreement between tasks.md and frontmatter, (c) preserves existing deps when parser finds nothing, (d) uses the correct FrontmatterManager API for list-typed fields, (e) gates all file mutations behind the --validate-only flag, and (f) reports mutations accurately.

Included Subtasks

  • ✅ T001 Extract shared dependency parser into reusable module
  • ✅ T002 Add bullet-list dependency format recognition
  • ✅ T003 Wire both finalize-tasks entry points to shared parser
  • ✅ T004 Implement disagree-loud on non-empty dependency conflict
  • ✅ T005 Fix set_scalar type mismatch — use FrontmatterManager for list fields
  • ✅ T006 Gate all mutations on validate_only flag
  • ✅ T007 Implement validate-only mutation report
  • ✅ T008 Implement accurate per-WP mutation reporting
  • ✅ T009 Write regression tests for WP01

Dependencies

None — can start immediately.

Risks

  • Changing the dependency parser could break existing features that use inline format. Mitigate with regression tests against both formats.
  • The two entry points (mission.py and tasks.py) must remain synchronized per C-004.

WP02 — Lane Materialization Correctness

Priority: P0 Issues: #422 (completeness half) Prompt: tasks/WP02-lane-materialization-correctness.md Estimated size: ~400 lines

Summary

Ensure lane computation produces a lane assignment for every executable WP, fails diagnostically when assignment is impossible, and warns on ownership problems (zero-match globs, broad fallbacks).

Included Subtasks

  • ✅ T010 Assert all executable WPs appear in lane assignment
  • ✅ T011 Fail diagnostically on executable WPs missing ownership manifests
  • ✅ T012 Add planning-artifact exclusion diagnostic to output
  • ✅ T013 Add glob-match validation warning for zero-match owned_files
  • ✅ T014 Add warning for src/** fallback in ownership inference
  • ✅ T015 Write regression tests for WP02

Dependencies

None — can start immediately.

Risks

  • Failing on missing manifests could break features where ownership inference previously filled gaps silently. Mitigate by ensuring the inference path still works — only fail when inference cannot produce a manifest at all.

WP03 — Realistic Parallelism Preservation

Priority: P1 Issues: #423 Prompt: tasks/WP03-realistic-parallelism-preservation.md Estimated size: ~450 lines

Summary

Refine the lane computation algorithm so that surface-heuristic merging (Rule 3) does not collapse WPs with provably disjoint ownership. Add a CollapseReport data model that records every union event with rule and evidence. Wire the report into finalize-tasks output.

Included Subtasks

  • ✅ T016 Add CollapseReport data model to lanes/models.py
  • ✅ T017 Record collapse events during union-find rules
  • ✅ T018 Refine Rule 3 — gate surface heuristic on non-disjoint ownership
  • ✅ T019 Count independent-WP collapses in report
  • ✅ T020 Wire collapse report into finalize-tasks and compute_lanes output
  • ✅ T021 Write regression tests for WP03

Dependencies

Depends on WP02 — WP02 adds assertions and diagnostics to compute_lanes; WP03 builds on those changes to refine rules and add collapse reporting.

Risks

  • Changing Rule 3 could alter lane assignments for existing mid-implementation features. Mitigate by running compute_lanes against all kitty-specs/ features and comparing output before/after (C-005).

WP04 — Mutable Task-State Compatibility

Priority: P0 Issues: #438 Prompt: tasks/WP04-mutable-task-state-compatibility.md Estimated size: ~300 lines

Summary

Add pipe-table row parsing and mutation to mark-status so it can update task state in both checkbox and pipe-table formatted tasks.md files. Standardize future generation to checkbox format only.

Included Subtasks

  • ✅ T022 Add pipe-table row detection to mark-status
  • ✅ T023 Implement pipe-table status update logic
  • ✅ T024 Standardize tasks template to checkbox format
  • ✅ T025 Write regression tests for WP04

Dependencies

Depends on WP01, WP05. WP01 owns tasks.py (shared file); WP05 owns the tasks template (shared file). WP04 modifies mark_status in tasks.py and task-format instructions in the template; WP01 and WP05 must complete their changes to these files first.

Risks

  • Pipe-table status marker regex must not corrupt the Parallel column ([P]) — it must target a dedicated status column or use column-position-aware matching. Mitigate by testing against the real 063 tasks.md artifact.
  • The existing pipe-table format has no dedicated status column. The [P] in column 4 is the Parallel marker, not a status marker. The implementation must either add a status column convention or use a different status representation that doesn't collide with [P].

WP05 — Command Ergonomics for External Agents

Priority: P1 Issues: #434 Prompt: tasks/WP05-command-ergonomics-agents.md Estimated size: ~350 lines

Summary

Fix all generated command guidance so that --mission <slug> is present wherever required. Fix inconsistent flag naming (--feature vs --mission) in error messages. Improve error message quality with complete copy-pasteable examples.

Included Subtasks

  • ✅ T026 Fix --feature to --mission in middleware.py error message
  • ✅ T027 Fix --feature to --mission in store.py error message
  • ✅ T028 Add --mission hint to shim template
  • ✅ T029 Fix tasks.md template context resolve example
  • ✅ T030 Audit all template command examples for missing --mission
  • ✅ T031 Improve require_explicit_feature error message
  • ✅ T032 Write regression tests for WP05
  • ✅ T033 Fix --feature command_hint in 5 require_explicit_feature callers

Dependencies

None — can start immediately.

Risks

  • Shim template changes require a migration to propagate to existing projects. This is handled by the standard spec-kitty upgrade path — no additional risk.