feat(protocols): add per-unit spec support to state protocol#40
Merged
feat(protocols): add per-unit spec support to state protocol#40
Conversation
Adds unitId (string | null) to currentWork for tracking the active unit within multi-unit work. Documents workDir behavior change in multi-unit mode (points to unit directory instead of work root). Co-Authored-By: Claude <noreply@anthropic.com>
Adds workDir field to workUnits entries as source-of-truth artifact directory path. Adds planned status for units with approved specs awaiting activation. Replaces planning status in workUnits entries. Co-Authored-By: Claude <noreply@anthropic.com>
Changes planning→building trigger to include sw-plan completion. Replaces shipped→planning with shipped→building since specs are pre-approved during plan phase — units skip planning on advancement. Co-Authored-By: Claude <noreply@anthropic.com>
Documents the two-scope model: unit-local artifacts resolved via
currentWork.workDir, design-level artifacts via work/{id}/. Establishes
the rule that skills MUST use workDir, not id-based path construction.
Co-Authored-By: Claude <noreply@anthropic.com>
Documents that the gates section resets when a new unit is activated. Historical evidence persists in each unit's evidence/ directory. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unitIdfield tocurrentWorkfor tracking the active unit in multi-unit workworkDirandplannedstatus toworkUnitsentries for per-unit artifact directoriesAcceptance Criteria
unitIdfield in currentWork schemastate.md:17workDirfield in workUnits entriesstate.md:32plannedstatus in workUnits enumstate.md:32,47shipped → buildingtransition, noshipped → planningstate.md:62planning → buildingwith sw-plan triggerstate.md:58state.md:74-85state.md:72state.md:42-45state.md:42Gate Results
Context
This is Unit 1 of 4 in the
per-unit-specswork. It establishes the state protocol foundation that Units 2-4 depend on.Work units: