Skip to content

feat(protocols): add per-unit spec support to state protocol#40

Merged
MacAttak merged 5 commits intomainfrom
feat/state-protocol
Feb 24, 2026
Merged

feat(protocols): add per-unit spec support to state protocol#40
MacAttak merged 5 commits intomainfrom
feat/state-protocol

Conversation

@MacAttak
Copy link
Contributor

Summary

  • Adds unitId field to currentWork for tracking the active unit in multi-unit work
  • Adds workDir and planned status to workUnits entries for per-unit artifact directories
  • Establishes path resolution convention (unit-local vs design-level scopes) and gates reset rule

Acceptance Criteria

# Criterion Status
AC-1 unitId field in currentWork schema PASS — state.md:17
AC-2 workDir field in workUnits entries PASS — state.md:32
AC-3 planned status in workUnits enum PASS — state.md:32,47
AC-4 shipped → building transition, no shipped → planning PASS — state.md:62
AC-5 planning → building with sw-plan trigger PASS — state.md:58
AC-6 Path Resolution Convention section PASS — state.md:74-85
AC-7 Gates reset rule documented PASS — state.md:72
AC-8 Single-unit backward compatibility PASS — state.md:42-45
AC-9 workUnits null note preserved PASS — state.md:42

Gate Results

Gate Status Findings (B/W/I)
gate-build SKIP 0/0/0
gate-tests SKIP 0/0/0
gate-security SKIP 0/0/0
gate-wiring SKIP 0/0/0
gate-spec PASS 0/0/0

Context

This is Unit 1 of 4 in the per-unit-specs work. It establishes the state protocol foundation that Units 2-4 depend on.

Work units:

  1. state-protocol ← this PR
  2. sw-plan-rewrite
  3. build-and-ship
  4. downstream-and-docs

MacAttak and others added 5 commits February 24, 2026 21:51
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>
@MacAttak MacAttak merged commit 8b31ecc into main Feb 24, 2026
2 checks passed
@MacAttak MacAttak deleted the feat/state-protocol branch February 24, 2026 11:04
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant