singularity-forge/.plans
Jeremy McSpadden a1592c984b feat(gsd): single-writer engine v3 — state machine guards, actor identity, reversibility
Three work streams bundled into one phase to close the behavioral control
gaps identified in the v2 handler audit:

Stream 1 — State machine guards on all 8 tool handlers:
- Entity existence checks before mutations (milestone, slice, task)
- Valid status transition enforcement (can't double-complete, can't re-plan
  closed work, can't complete inside a closed parent)
- depends_on validation for plan-milestone (deps must exist + be complete)
- blockerTaskId verification in replan-slice (must exist + be complete)
- Deep task check in complete-milestone (all tasks, not just slice status)

Stream 2 — Actor identity + persistent audit log:
- WorkflowEvent extended with actor_name, trigger_reason, session_id
- Engine-generated UUID session_id stable per process lifetime
- All 8 handlers accept optional actorName/triggerReason and pass through
- workflow-logger now flushes to .gsd/audit-log.jsonl (survives context resets)
- New setLogBasePath() and readAuditLog() API

Stream 3 — Reversibility + unit ownership:
- New gsd_task_reopen handler (reset task to pending with full guards)
- New gsd_slice_reopen handler (reset slice + all tasks with transaction)
- Opt-in unit ownership via .gsd/unit-claims.json (claim/release/check)
- Ownership enforced in complete-task and complete-slice when claims exist
- insertReplanHistory converted to upsert via schema v11 unique index

Bug fixes (pre-existing):
- renderPlanContent checkbox: checked "done" but tasks are "complete"
- renderRoadmapContent: same "done" vs "complete" mismatch
- renderPlanContent format: **T01:** title didn't match parsePlan regex
- Tests updated to seed DB entities and match projection output format
2026-03-25 08:53:36 -06:00
..
api-key-manager.md feat: add comprehensive API key manager (/gsd keys) (#1089) 2026-03-17 22:32:26 -06:00
autocomplete-qol-improvements.md feat(autocomplete): add /thinking completions, GSD subcommand descriptions, and test coverage (#1019) 2026-03-17 18:27:17 -06:00
directory-safeguards.md feat(gsd): add directory safeguards for system/home paths (#1053) 2026-03-17 21:57:53 -06:00
dynamic-model-discovery.md feat: dynamic model discovery & provider management UX (#581) 2026-03-16 06:23:18 -06:00
fix-high-cpu-process-lifecycle.md fix: reduce CPU usage on long auto-mode sessions (#921) 2026-03-17 13:58:14 -06:00
issue-125-provider-fallback.md feat: add cross-provider fallback when rate/quota limits are hit (#125) 2026-03-14 15:45:44 -05:00
issue-524-git2-migration.md feat: move git operations to Rust via git2 crate (#572) 2026-03-15 20:02:10 -06:00
issue-575-dynamic-model-routing.md feat: dynamic model routing for token consumption optimization (#579) 2026-03-16 07:53:53 -06:00
issue-672-parallel-milestone-orchestration.md feat: parallel milestone orchestration foundation (#672) 2026-03-16 20:32:10 -06:00
native-perf-optimizations.md feat: native perf optimizations — deriveState, JSONL, paths, parsing (#576) 2026-03-15 20:16:42 -06:00
onboarding-detection-wizard.md feat: add project onboarding detection and init wizard 2026-03-17 17:31:52 -05:00
preferences-wizard-completeness.md feat: dynamic model discovery & provider management UX (#581) 2026-03-16 06:23:18 -06:00
single-writer-engine-v3-control-plane.md feat(gsd): single-writer engine v3 — state machine guards, actor identity, reversibility 2026-03-25 08:53:36 -06:00
startup-performance.md Perf/gsd startup speed (#497) 2026-03-15 13:33:43 -06:00
token-optimization-suite.md feat: add token optimization suite for prompt caching, compression, and smart context selection 2026-03-17 22:02:27 -05:00
tui-dashboard-cleanup.md refactor: TUI dashboard cleanup, dedup, and feature improvements (#931) 2026-03-17 14:02:26 -06:00
workflow-templates.md feat: workflow templates — right-sized workflows for every task type (#1185) 2026-03-18 12:25:28 -06:00