/workstream:workstream-ledgerfrom Workstream
Preserve and update evolving project goals, tasks, decisions, dependencies, PR state, evidence, and closure in a durable Linear-backed workstream. Use directly for new plan intake, after workstream-resume has returned bounded authority in the current turn, or on a later warm turn when exact same-provider-session retained-full bindings satisfy workstream-resume warm classification. For any cold handle-led turn, including mutation, audit, or closure, do not load this skill first.
Ships in Workstream. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Keep business logic in a durable issue graph so continuation never depends on remembering the old chat. Linear is the pilot execution authority; a private planning document remains the detailed design authority when one exists.
Resolve the directory containing this SKILL.md as WORKSTREAM_SKILL_ROOT
before invoking a bundled helper. Never assume a user-level skills directory or
a particular plugin cache path.
Every root carries an explicit namespace plus its immutable Linear root issue
ID and explicit workspace, team, and project IDs. Titles and local checkout
paths are never routing identity. Record
repositories by the source provider's immutable repository ID when available.
Keep the canonical remote coordinate (host/owner/repository) as routing and
display data, without assuming one host or owner; local machine/worktree paths
belong only in execution and resume metadata. Preserve renamed/transferred
coordinates as aliases plus verified identity-update events. A redirect never
creates a second repository identity. Coordinate-only fallback requires
explicit redirect-resolution evidence and fails closed when equivalence is
unproven.
For a GitHub rename or transfer already represented by one projected scope,
use the no-model workstreamctl repository-identity --request REQUEST.json --apply path. It authenticates both the exact old coordinate and GitHub's
returned canonical coordinate, requires the same immutable repository ID, and
accepts only one redirect hop. The request fences the material revision,
projection revision, active scope event ID, and scope value digest. It appends
one scope replacement containing the immutable identity-update event; exact
replay is a zero-write no-op. A stale frontier, recycled alias, multi-hop
redirect, or coordinate owned by another repository refuses before mutation.
The identity writer and material/checkpoint writers serialize through one
durable Linear boundary reservation. Material work cannot pass a pending
identity intent; a competing material write that wins the boundary first
causes the identity update to refuse with zero identity writes.
Reservations carry the full immutable projection intent and both authenticated
frontiers. Only an exact deterministic remote slot can block; malformed,
oversized, arbitrary-ID, or stale-plan markers are quarantined into the next
frontier. The exact projection event or a durable authenticated successor
releases the reservation without a time-based lease.
Chained coordinate history such as A to B to C is intentionally not supported;
it requires reviewed manual consolidation before this single-hop writer runs.
Older projections that contain a legitimate first identity backfill are not
silently trusted. Resume returns bounded partial_reconcile_required metadata
with no scope, worktree, next action, or execution authority. Use
workstreamctl repository-identity-seal --request REQUEST.json for a zero-write
preview, review its exact frontier, then add --apply. The writer reauthenticates
the canonical planning source plus the current GitHub identity of every stored
coordinate, serializes at the shared material boundary, and appends one
deterministic v2 seal over the exact legacy projection receipts. Repeating the
same repair is a zero-write readback; altered history, ambiguous candidates,
provider mismatch, stale frontiers, or a second seal refuse.
The exact bounded request and preview/apply procedure are documented in
references/identity-history-seal.md.
Neither a provider ID nor a Linear destination is trusted merely because it is nonempty. Repository identity includes a timestamped authenticated-provider readback binding the immutable ID to the resolved current coordinate; every alias update binds the exact old requested coordinate to that same ID/key and the resolved current coordinate. Linear routing includes a timestamped authenticated readback binding workspace, team, project, and immutable root issue ID. Mismatches and missing verification fail closed.
Use one root across several repositories only when they deliver one goal. Name
one primary repository, every participating repository, repository-qualified
exact heads/evidence, and the repository owner of every child. Otherwise use
separate roots connected by typed blocks, blocked_by, or related links to
immutable Linear workspace + issue IDs (with the <TEAM>-* token retained only as
a route/display value). scripts/workstream_scope.py validates this logical
contract and rejects missing destinations, unowned children, self-links,
duplicates, unknown relation types, dangling immutable targets, contradictory
directed edges, and missing blocks/blocked_by inverse views. related
remains informational. Closure consumes authenticated peer-edge readback and
refuses while the current root has an active blocked_by relation.
Dependencies between already-owned children use the separately bounded
scripts/workstream_child_dependencies.py transport. It authenticates the
declared route, immutable root, selected plan generation, and both direct-child
identities, fences the
root material/projection frontier plus the child dependency graph, reserves a
deterministic append-only child_dependency_authorization projection slot,
then projects that immutable authority into a native blocks cache relation
with one deterministic client-supplied UUIDv4. The authorization is ordered
after the exact pre-grant material/projection/graph state. Its material
frontier digest binds every ordered event ID, remote comment ID, and exact
comment body, while the graph frontier includes a canonical SHA-256 so a
same-count edit or edge replacement cannot pass as unchanged. Root comments
observed beyond the reviewed material frontier must have a strictly later
server creation time than the grant. Projection CAS
orders later projection events after it. Events ordered after the grant do not
retroactively invalidate it: contradictions or scope changes require an
append-only superseding event and reconciliation of the derived native cache.
Runtime schema introspection must confirm that IssueRelationCreateInput.id,
the blocks enum, archived-inclusive relation connections, and global relation
slot enumeration remain available. Complete pagination must recover the exact
active blocks view on the blocker, inverse blocked_by view on the blocked
child, and any occupied or archived deterministic slot before mutation. A lost
response converges and an exact batch replay performs no comment or relation
write. Ambiguous, duplicate, conflicting, self, cross-root, stale-frontier,
archived-slot, partial-inverse, and mismatched readbacks fail closed. A truly
never-seen UUID cannot be reserved or dry-run through Linear, so availability
cannot be proven beyond complete occupied-slot preflight; deterministic create
and authoritative readback bound that API limitation safely. The transport
never creates or updates an issue, project, or workstream root.
The supported invocation is
python3 scripts/workstream_child_dependencies.py --request REQUEST.json --apply.
The JSON object must contain exactly schema_version, authority (including
the explicit workspace/team/project/root UUID and root identifier),
plan_revision, the complete active-generation owned_children identity set,
relations, and the reviewed expected_frontier. After a generation transition,
retired-generation children remain as immutable root history but are excluded by
their plan revision; every active child must still have projected ownership. The
command does not infer a route or child set and emits the complete JSON receipt
on stdout.
The live Linear graph transport verifies the declared workspace/team/project relationship, fences reads to that project, and assigns the project on creates. The append-only projection transport persists scope and typed cross-workstream relations as immutable Linear comments and derives their current view from a complete paginated readback. Replacing a keyed projection must name the exact event it supersedes; ambiguous concurrent replacements fail closed. The source digest must equal the root plan revision, and the projected workspace/team/project/root-issue route must equal the authenticated token readback. Projection events are reduced within the current root plan revision: older generations remain immutable history and are counted as stale, but cannot supersede or conflict with the current generation. Conflicting writes within the current generation still fail closed. Full-authority resume also fetches the exact plan bytes and requires their digest and immutable identity to match the projected source. Evidence contracts are keyed by stable slice ID, so one child may own several independently verifiable slices. The deterministic validator rejects missing or mismatched receipts; the transport remains responsible for their authenticity.
When a user says execute this and supplies a Markdown path, URL, or pasted
plan, snapshot the exact bytes before interpreting mutable status. The
model-free helper emits a root identity, exact revision, and deterministic
child candidates for review:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_plan.py" ./PLAN.md
For a private plan already present in an authenticated checkout, provide its canonical durable URL so the same plan resolves to the same root on every machine:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_plan.py" \
./PLAN.md --identity https://github.com/org/private-plans/blob/<40-hex-commit>/PLAN.md
Pasted Markdown works too. First commit the exact text to its durable planning
repository, then run the committed checkout path with its canonical URL as the
identity. If persistence must follow intake, exact bytes may be piped on stdin
with -; supply --identity as soon as a durable reference exists. An omitted
identity makes stdin content-addressed and is only a provisional snapshot.
The output's source.sha256/root.plan_revision is the plan revision to record
on the single Linear root. workstreamctl plan is intentionally side-effect free and
sets graph_review_required=true: Markdown structure can produce deterministic
candidates, but cannot prove which sections are independently actionable. The
active agent must review completeness before creating the root and accepted
children. Apply that explicit review with:
workstreamctl intake ./PLAN.md --identity <canonical-url> \
--plan-revision <source-sha256-from-preview> \
--root-stable-key <root-stable-key-from-preview> \
--accept-key <stable-key-from-preview>
Use --accept-none only after explicitly reviewing a root-only graph. When the
repository root contains .workstream.json, load its
validated Linear workspace/team/project route automatically; an explicit
--config or WORKSTREAM_CONFIG may select a deliberate external declaration.
Explicit route arguments must match the declaration, and authenticated route
validation must pass before any issue read or write. Initial root and child IDs
are deterministic UUIDv4-shaped values scoped by immutable
workspace/team/project plus stable plan keys, matching Linear's live validator.
Concurrent duplicate creates reload and validate every owned field,
converging only on an exact match; they never lock by time, update, or delete.
An exact repeat is a zero-write no-op, and the same plan revision may add a
newly reviewed missing child. Changed-plan and other existing-graph mutations
still fail remote_cas_unavailable until a remote CAS authority exists. Never
infer a repository, worktree, or Linear project from the Markdown's cwd.
For an existing legacy root that has no deterministic intake marker, never run initial intake again. After authenticated resume and graph review, add exactly one missing child through the separately fenced extension command:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_extend_child.py" ./PLAN.md \
--identity <canonical-immutable-plan-url> \
--plan-revision <authenticated-source-sha256> \
--workstream-id GEN-123 --root-issue-id <root-uuid> \
--candidate-key <reviewed-stable-key> \
--material-revision <live-material-revision> \
--projection-revision <live-projection-revision> \
--state-id <linear-state-uuid> \
--assignee-id <linear-user-uuid> \
--workspace-id <uuid> --team-id <uuid> --project-id <uuid> --apply
The command requires exact plan bytes, route, root identity, reviewed candidate,
both live frontiers, a canonical native state UUID, and exactly one of
--assignee-id or --unassigned. Before the grant, authenticated Linear
readback proves the state belongs to the exact team and an active assignee
belongs to the workspace/team; the grant binds that validation digest. The
append-only grant also binds the reviewed content-parser schema, exact title,
and exact durable-description SHA-256 together with the current generation
selection proof and native setup before one atomic deterministic child create.
Omitting --apply still reads and validates the plan source, so an HTTP source
may use HTTP or the bounded GitHub SSH fallback, but it performs no Linear
authentication, Linear read, or Linear write. Configured GitHub source
credentials may still authenticate that source read. The preview reports that source
transport and normalizes the same static UUID inputs used by apply. A sealed
retirement prefix preserves an exact granted create/replay while refusing new
retired-generation grants. Readback must match state and assignee. A replay
converges; it never updates an issue, root, or project. Project the child's
repository ownership before treating it as executable.
If a validated provider identity disappears after the grant, automatic
correction is unsafe without a provider conditional or positive writer-death
fence. Restore the exact identity and replay; otherwise stop for explicit
review. Never supersede merely because the deterministic child is absent.
An existing root changes plan generations only through the supported
workstreamctl generation command; never update its issue description to make
a new digest authoritative. Before the first generation-control event, a
legacy root with exactly one description Plan revision remains compatible and
that line selects its plan. Once a schema-v2 genesis or activation exists, the
append-only control chain is authority and description prose is diagnostic
only.
For a legacy root that has no description plan revision, authenticate the exact route and plan source and bootstrap one deterministic genesis:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_generation.py" \
bootstrap GEN-123 --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--created-at <reviewed-utc-time> --apply
Do not bootstrap a description-backed root. For a reviewed plan replacement, derive the complete zero-write operator contract from authenticated live state and the exact target plan:
workstreamctl generation prepare GEN-123 --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--remote-head <authenticated-exact-head> \
--created-at <reviewed-utc-time> \
--started-state-id <authenticated-linear-started-state-uuid> \
--manifest-output ./target-projection.json \
> generation-review.json
prepare has no apply mode. --manifest-output atomically writes the exact
nested projection_preview.manifest consumed by the next projection command;
do not copy or edit that payload by hand. It accounts for every active projection
key and
emits an authenticated predecessor-quiescence proof, the exact reviewed native
reopen state, and the first target manifest. The proof binds the current route,
selected generation, material/checkpoint frontiers, and predecessor projection;
generation reservation revalidates those frontiers before it can retire the
predecessor. For terminal
children it uses predecessor-authorized evidence seeding and explicitly stages
closure repair and later keys; it never copies a closure as authority. After
each manifest is applied, rerun the same prepare command. It recognizes only
the authenticated canonical prefix it emitted and advances through staged
same-digest source-locator transition, evidence seed, closure repair, remaining
projection, and activation_ready. The captured GEN-14 split prefix completes
its strict evidence/disposition/scope normalization before the source-only
stage. Any other nonempty inactive candidate refuses rather than being merged
or guessed.
Projection has an explicit safe preview/apply path. Reuse the preview's exact timestamp and digest:
Use projection_preview.invocation.remote_head and
projection_preview.invocation.created_at from the latest generation prepare
result. The command's --plan-identity and authenticated --plan-source bytes
must resolve to the exact identity and digest in
projection_preview.invocation.source; the phase may intentionally retain the
active locator while the top-level generation contract names the later target
locator. The head and timestamp normally equal the requested prepare inputs.
During the one content-addressed GEN-14 split-prefix repair they instead finish a durable
disposition-only crash prefix at its recorded head and timestamp before any
later ordinary head transition.
workstreamctl projection GEN-123 target-projection.json \
--remote-head <authenticated-exact-head> --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--created-at <reviewed-utc-time> --preview > projection-preview.json
workstreamctl projection GEN-123 target-projection.json \
--remote-head <same-head> --plan-source ./PLAN.md \
--plan-identity <same-url> --created-at <same-time> \
--apply --expected-preview-sha256 <preview-sha256>
There is no implicit apply mode. A flagless invocation refuses before live
access, and --apply refuses unless both the reviewed timestamp and preview
digest are supplied.
After the target projection is complete, rerun generation prepare and use its
exact activation_ready operator contract for the reviewed root-transition
locator migration and reopen described below. Once that exact root is in the
contract's authenticated started state, preview activation. Activation
recomputes the contract from a stable live graph/comment pair and again after
reservation immediately before the authority-changing seal. Exact historical
replay/finalization uses the original contract-bound stored artifacts rather
than requiring the obsolete pre-activation view. A caller-authored retirement
file or an edited phase/self-digest cannot authorize it:
workstreamctl generation activate GEN-123 --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--operator-contract ./generation-review.json \
--created-at <reviewed-utc-time>
Review the preview's native_root_activation_proof, then apply with the
unchanged proof digest:
workstreamctl generation activate GEN-123 --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--operator-contract ./generation-review.json \
--created-at <reviewed-utc-time> \
--expected-native-root-sha256 <preview-sha256> --apply
Apply refuses before its first append if that exact root is terminal or the reviewed readback changed. It fences the same proof immediately before and after the authority-changing append. A crash reservation is reported by ordinary resume with exact replay and reviewed-abort guidance; it is never silently treated as executable old authority.
When the reviewed replacement needs a root checkpoint to keep the ordinary resume surface within its default budget, provide that pending checkpoint and the authenticated repository head used for disposition:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_generation.py" \
activate GEN-123 --plan-source ./PLAN.md \
--plan-identity <canonical-immutable-plan-url> \
--operator-contract ./generation-review.json \
--activation-checkpoint ./pending-checkpoint.json \
--remote-head <authenticated-exact-head> \
--created-at <reviewed-utc-time> --apply
The checkpoint must cover the exact current root material revision, name the target plan revision, remain pending, and pass the standard 24 KiB resume budget; custom resume budgets are refused for this form. The target disposition may be prepared first, but the checkpoint remains inert through the authenticated transition preparation. A separate deterministic finalization selects that transition and becomes its remote acknowledgement. A crash before finalization leaves the predecessor authoritative; exact replay converges without a second checkpoint, reservation, or transition. Only checkpoints carried by the uniquely selected authenticated generation chain are reduced. A forged, forked, off-chain, conflicting, or duplicate physical copy fails closed. Keep the pending checkpoint file until the command returns its successful authority-bound post-read receipt. If execution stops after preparing the target disposition, resume with that exact file; a plain or regenerated checkpoint retry refuses rather than activating an unrecoverable disposition.
The command uses the normal strict full-resume validator against authenticated
source bytes and route readback, with the resume defaults of 24 KiB and 100
items unless matching --max-bytes / --max-items values are supplied. The
strict check validates complete history but emits the normal compact-validated
resume surface; it does not require a full-history output artifact. It
binds the actual material, checkpoint, issue-graph, and projection frontiers.
Mutation order is fixed: reserve the shared material/checkpoint boundary,
append the target candidate seal, reread and strictly validate, append an inert
predecessor-side transition preparation, then refetch the candidate, reviewed
native root, and canonical source before a separate deterministic finalization
changes authority. That finalization carries generation-local In Progress
status; ordinary resume prefers it over mutable native issue status while
retaining the native observation for reconciliation and closure. A crash or
mismatch after preparation leaves the predecessor authoritative and the exact
reservation replayable. Competing candidates use the same route/root boundary
slot. Material and checkpoint
writers cannot pass a pending reservation. Old runtimes which try to route
around that occupied slot through deterministic collision successors are
quarantined from both reduced frontiers; upgraded active writers use the
completed-generation frontier token. A sealed candidate cannot change before
activation, and a retired epoch's production writers refuse before mutation.
Quarantined legacy ledger writes remain non-authoritative, but resume and
generation receipts surface their stable count and digest for diagnosis;
upgraded active-generation writes are not counted. After activation, the active
target may evolve normally; its sealed prefix remains the activation proof. The
CLI performs another authenticated strict read of the actual active generation
after authority changes before reporting success. It also refetches the
canonical source after finalization, so a mutable-ref change during the write
is never reported as success and ordinary resume remains non-executable on the
resulting digest drift. A same-generation bound/live graph or candidate digest
mismatch refuses with authority_changed_with_post_read_drift; the command
does not claim cross-resource atomicity with Git or mutable Linear issue
fields. An exact historical replay returns the original receipt without
writing even after later successors, then validates and reports the current
active successor rather than forcing the historical target.
The retirement proof is not a boolean. It names the predecessor plan, writer
epoch, complete provenance and checkpoint event-ID sets, retirement time, and
its canonical declaration digest. A partial operation remains durably
recoverable from its exact reservation, which stores source identity/digest,
retirement declaration, activation checkpoint, remote head, and reviewed
native-root digest. Once transition preparation exists the reservation is
replay-only because aborting it would strand prepared authority. Before
preparation, if review decides it must not continue,
use the activate command's exact --abort-reservation-id,
--abort-reservation-sha256, and --abort-reason form; abort releases only
that reservation and never changes generation authority. Abort is a validated,
non-authoritative projection event, so it advances the predecessor CAS frontier
without advancing the generation authority chain. Abort and final
activation compete for the same deterministic predecessor authority slot, so
an abort that wins the final race cannot be followed by that activation. If an
unrelated predecessor writer wins the original slot first, abort binds the
complete intervening event-ID frontier, digest, and original occupant, then
rebases to the current next predecessor slot with bounded reload/retry. A
reviewed replacement can reserve and activate from the revision advanced by
that abort. The generation
transport uses commentCreate only and never calls issueUpdate.
If an older schema-v6 retry sealed its candidate and then refuses solely
because Linear advanced the root updatedAt for those protocol comments, run
workstream_generation.py clock-custody HANDLE --reservation-id ID --reservation-sha256 SHA --historical-root-updated-at TIMESTAMP first as a
zero-write preview, then repeat with --apply. The command appends one
deterministic receipt only when substituting that single historical clock
through the strict production loader reproduces the reserved graph and native
root digests. A subsequent ordinary generation continue consumes exactly
one such receipt automatically. Semantic, child, source, frontier, ambiguous,
or competing-generation drift still refuses.
When a reviewed generation transition needs either of the two mutable native
root changes that generation deliberately does not own, use the separate
workstreamctl root-transition surface. plan-url changes exactly one labeled
same-document pinned GitHub blob URL to its reviewed blob/main locator while
preserving every other description byte. reopen changes the same exact
terminal root to the authenticated Linear started state embedded in the exact
prepared activation_ready generation contract. Both commands require that
contract and its authenticated plan source, and are zero-write previews unless
--apply is supplied. Apply requires the previewed root-snapshot, complete
comment-frontier, and intent digests. See
references/root-transition.md.
If the structured active generation remains correct but the description
locator regressed, use the distinct root-transition reconcile-plan-url mode
with that active source's immutable 40-hex GitHub blob URL. It authenticates
the unique active generation and source directly, refuses pending or ambiguous
generation state, and preserves all other root and ledger state. Do not use it
when the locator intentionally points to a new plan; prepare a new generation.
These mutations do not change append-only generation authority. Linear has no
conditional issueUpdate, so the supported transport does not call the native
write atomic: it first wins one deterministic append-only reservation for the
reviewed snapshot, then performs immediate prewrite and postwrite readback.
Apply also requires the previewed intent digest, which binds the operation and
target. Exact replay after the native update is a no-op; drift or a competing
reservation refuses. A crash after reservation creation but before the native
update leaves an explicit pending intent: another process cannot claim its
ownership and must obtain a newly reviewed preview/frontier. This is the
strongest supported fence, not protection against an unrelated writer changing
the native issue in the interval between final prewrite readback and update.
After full resume returns the canonical root token and authenticated project name, invoke
scripts/workstream_tab.py GEN-123 --project-name "<exact authenticated Linear project name>".
In cmux or Herdr it preserves an existing custom title and appends exactly one
token; the same token is a no-op and a different token refuses with
workstream_tab_conflict without mutation. For a manager-generated title, also
pass its exact previously observed manager value as --automatic-title; never
infer it from cwd, shell, or title shape. Missing/invalid required project data
or changed automatic-title provenance is an optional no-op. Herdr resolution is
allowed only
inside HERDR_ENV=1 with the inherited exact tab, workspace, and socket
namespace; never query a focused/default session or treat a bare w1:t1 as
globally unique. Outside a supported manager, or when the exact target cannot
be resolved, it reports an optional no-op without changing the preceding
full-authority recovery result.
User turns are not the only source of durable work. When an agent discovers a
blocker, requirement, decision, or follow-up, append a structured delta to the
local journal before attempting the remote Linear mutation. The model-free
journal is available as scripts/workstream_delta.py and exposes a
DeltaJournal plus MutationAdapter boundary. Each delta has a deterministic
event_id, source, and expected root revision. Reusing an event ID for
different immutable material is an error. append_boundary batches all
material changes from one substantive boundary into one row and performs no
write when the change list is empty.
The journal marks a row applied only after the adapter returns a receipt. A
crash after the remote mutation but before that local acknowledgement leaves
the row pending; replay is therefore expected and safe. Never discard a
pending row or advance its revision by last-writer-wins. Both apply and
apply_with_rebase refuse adapters that declare neither true atomic CAS nor a
lossless append-only event log. apply_with_rebase reloads the live revision
and retries a stable event ID after RevisionConflict.
A narrow Linear transport failure must not stop an already-authorized warm
provider session from doing independently authorized work. Apply the
workstream-resume warm-session predicate: the same provider session and
workstream must retain its prior live full result plus exact route, source, generation,
frontiers, owner/session, worktree, repository head, and Shipyard run. This is
agent workflow policy, not a daemon-enforced or transferable grant.
That session may continue provider/local implementation and independently fenced exact-head Shipyard delivery handoff or landing. A Shipyard delivery handoff means exact-head custody submission to Shipyard under its own fences and is allowed. An agent/session handoff means transferring workstream execution authority to another agent/session and requires live recovery and certification. Buffer every material discovery through this journal; do not attempt a Linear write while transport is unavailable. Before any Linear mutation, scope/ownership/root/generation transition, attach/successor selection, agent/session handoff, semantic closure, or resume or agent/session handoff certification, obtain a fresh authenticated full resume and reconcile stable event IDs idempotently. Fresh/cold sessions and auth, semantic, generation, budget, or ambiguous post-write refusals fail closed.
scripts/workstream_linear_events.py is the dependency-free authenticated
Linear MutationAdapter. It stores one immutable material delta per issue
comment using Linear's documented commentCreate API, paginates the complete
comment set, and derives the ledger revision from the valid event set. It does
not use or claim conditional issueUpdate. Material events and checkpoints
share one deterministic client-supplied boundary slot derived from the stable
workspace/root identity, current material revision, and checkpoint frontier.
Team or project moves therefore cannot create a second slot. A checkpoint
winner moves a concurrent event to the next frontier; an event winner forces a
pending checkpoint to reload and rebuild. Replay returns the existing receipt;
bounded rebase replay also accepts the same stable event ID when workstream,
kind, source, payload, and creation time are identical and the remote expected
revision moved only forward. Reverse revisions or any other material mismatch
remain conflicts. This closes the crash window where remote acceptance occurs
after rebase but before the local outbox acknowledgement. Duplicate or
conflicting event IDs,
malformed markers, causal revision gaps, incomplete pagination, missing auth,
and unobserved writes fail closed. Configure it with LINEAR_API_KEY and the
exact root issue identifier. from_env also consumes the validated
repository-root .workstream.json route when present and refuses an issue
outside that workspace/team/project. Do not use a locally cached comment subset
as the reducer input.
This is logical transport proof, not physical remote proof: deterministic fake tests cover concurrency and no-loss behavior, but they do not prove a live Linear workspace, a second machine, process death, API consistency, permission scope, or resistance to an authorized person editing/deleting comments. No live Linear mutation is part of the test suite. A local journal still proves process-restart replay on that machine only, not recovery after the machine disappears.
Version 0.4.81 bounds Linear request amplification during projection previews
and dependency-graph readback, and reports provider throttling as the precise
retryable linear_rate_limited transport condition without automatic retries
or response-body disclosure. Live projection writes retain their per-append
concurrency fences.
Version 0.4.80 surfaces one bounded machine-readable refusal reason when
literal resume this session cannot recover full authority, and authenticates
exceptional non-primary terminal evidence against a stable exact GitHub
provider snapshot before append-only replay and closure repair.
Version 0.4.79 makes literal resume this session deterministic: only an exact
namespaced terminal binding or strict final · TEAM-# suffix can select the
handle. Shared cmux/HerdR provenance detection, pre-mutation title fences, and
an atomic readback-validated local binding prevent concurrent renames from
creating successor authority, while optional adapter loss after full recovery
does not erase authenticated Linear authority.
Version 0.4.78 accepts an authenticated direct-child handle for resume and audit, but derives all execution authority from its actual root. The child survives as a validated focus selector, including bounded hydration routes; nonexistent, unowned, nested, stale, or identity-drifted children refuse without mutation.
Version 0.4.77 authenticates generation-transition tokens as part of the shared ledger serialization frontier. If response-loss retries left several canonical copies of the exact same intent along one deterministic collision chain, the reducer treats them as one pending reservation and reuses the first slot. Different intent, material frontier, or collision lineage remains quarantined.
Version 0.4.70 accepts the bounded fixed-frontier resume envelope as a fully-bound ordinary-resume oracle, including its compact checkpoint receipt, while retaining legacy validation and the 24 KiB output fence. It also refuses same-frontier successor checkpoints during preview rather than discovering the non-monotonic revision only after a write.
Version 0.4.69 writes schema-v7 activation reservations with both the full
observed graph digest and a schema-v2 material digest that excludes only the
provider-owned root updatedAt field. Reservation, seal, finalization, and
handle-only recovery therefore tolerate their own comment clock updates while
still refusing every other graph, source, projection, checkpoint, authority,
or custody change. Existing schema-v6 reservations retain their strict
full-observation continuation semantics.
Version 0.4.57 keeps root-transition reservations from invalidating their own
prewrite fence when Linear advances the root updatedAt, while still comparing
every material root field and the non-reservation comment frontier. It also
finishes GEN-14's content-addressed split-prefix migration by requiring the
exact opaque stored/recomputed frontier pair at both producer and projection
consumer boundaries; arbitrary frontier drift remains refused.
Version 0.4.56 contains one content-addressed recovery for GEN-14's captured 0.4.51 split-head inactive seed prefix. It binds both malformed predecessor heads and every frontier, writes the authenticated new disposition before the scope, and admits only the exact deterministic crash prefix on replay. If main advances after the disposition append, fresh prepare derives the recorded repair head from that exact Linear event, completes the paired scope, and leaves any later head movement to the ordinary matched transition.
Version 0.4.55 treats one standard Markdown link on the canonical-plan line as one logical locator and atomically rewrites both its label and destination, while still refusing duplicate labeled lines or unrelated URL repetition.
Version 0.4.54 delays target-disposition derivation until the candidate projection is otherwise activation-ready, so an intentionally ambiguous predecessor provenance set cannot block a valid terminal-evidence seed preview.
Version 0.4.53 binds terminal-seed head transitions to both the exact old scope and disposition before advancing them together, and adds fail-closed in-place reconciliation for a regressed canonical locator that must equal the unique structured active generation's authenticated immutable source.
Version 0.4.52 persists authenticated closure-receipt bodies while keeping ordinary resume bounded, and treats cmux/Herdr title binding as an optional adapter that uses only authenticated project-name and exact automatic-title provenance.
Version 0.4.51 aligns generation and projection terminal-seed frontiers and authenticates legacy dependency grants whose immutable schema predates the material-frontier digest, without weakening current writers.
Version 0.4.50 keeps root checkpoint recovery safe when Linear advances the root timestamp for the operator's own comment: fresh previews bind that exact timestamp, while postwrite proof normalizes it only after a confirmed own append and still fences the complete structural graph and comment frontier.
Version 0.4.49 adds the authenticated root material-boundary checkpoint operator, exact crash replay, true-root and deterministic-slot proof, and postwrite ordinary-resume and native-graph verification.
Version 0.4.48 adds phase-aware generation preparation, explicit reviewed projection and native-root transitions, exact crash replay, and warm-session continuation that keeps authorized delivery moving while tracking is temporarily unavailable.
Version 0.4.47 accepts description-less legacy terminal children only when strict closure, evidence, ownership, exact-head, and native-readback proof agree; contradictory or incomplete legacy state remains non-authoritative.
Version 0.4.46 authenticates the active dependency graph during resume and makes canonical plan replacement a recoverable two-phase transition. Stale plan generations remain bounded and non-executable until exact activation.
Version 0.4.45 keeps authenticated resume within the default 24 KiB contract by deferring only digest-bound verbose detail after full-history validation. Exact authority fields and executable next actions remain available, while an explicit audit command recovers the complete authenticated context.
Version 0.4.44 makes child-dependency apply select and validate the same active generation as full resume. Historical children remain preserved, while stale, ambiguous, incomplete, or incorrectly owned dependency graphs refuse before the first relation or metadata write.
Version 0.4.43 makes projection repair fence the same uniquely selected, authenticated generation-transition checkpoint used by full resume. Altered, ambiguous, stale, or cross-generation checkpoint authority refuses before the first projection write.
Version 0.4.42 preserves carried predecessor evidence after activation only when the sole history suffix is the exact terminal generation transition already validated by active-generation selection. The reviewed predecessor prefix remains digest-exact; altered, arbitrary, or additional suffixes refuse.
Version 0.4.41 keeps checkpoint-bound generation activation within the standard resume budget by digesting only the predecessor child-ledger prefix already acknowledged by a stale checkpoint. Current child state and every post-fence obligation remain exact; an ahead-of-log stale checkpoint refuses.
Version 0.4.40 makes activation preview and apply validate the same exact retirement frontier, pending reservations, target checkpoint, prospective disposition, and historical replay before the first possible write. Refused or aborted activation attempts remain zero-write.
Version 0.4.39 recovers an interrupted terminal-closure projection batch from the exact reviewed manifest. Canonical closure prefixes are validated before inactive target-source synchronization, while source synchronization and the normal second repair validation remain mandatory.
Version 0.4.38 binds reviewed child titles and durable-description digests to their extension authorization, fences plan prose from durable control fields, and makes zero-write preview disclose its exact source-access and credential surface. Legacy contentless grants may replay an existing child but cannot authorize a new create.
Version 0.4.37 recovers an interrupted inactive-generation terminal evidence seed from the exact reviewed manifest. A canonical committed prefix is validated before generic target-source synchronization; divergence still refuses, and exact replay remains zero-write.
Version 0.4.36 keeps inactive target projection, ordinary resume, and their prewrite/final fences on the same child-proposal authority. Each live child join uses its paired root snapshot; inactive targets explicitly retain the selected predecessor while active and genesis resumes use the current plan.
Version 0.4.35 keeps reviewed child proposals and plan-generation changes on one root serialization boundary. It preserves predecessor authority while an inactive target is validated, binds every child/proposal/authorization identity before writes, refuses unresolved predecessor proposals, and makes proposal publication versus generation activation a deterministic one-winner operation.
Version 0.4.34 adds a reviewed, append-only origin seal for an existing scope-owned legacy child whose identity predates deterministic intake. The seal freezes its exact direct material/checkpoint prefix, route, parent, source, generation, scope, ownership, and immutable root identity; later state enters only through root-authorized proposals. Direct post-seal markers, ambiguous origins, stale review artifacts, native identity drift, and concurrent prefix or projection changes fail closed without recreating or reopening the issue.
Version 0.4.33 keeps the default 24 KiB resume surface actionable as material
repair history grows. Compact output retains the raw-history count and digest
and the top-level semantic-repair summary without duplicating audit-only latest
metadata; --include-history continues to return every validated raw and
repaired event.
Version 0.4.32 keeps material-repair source authority to the immutable identity and SHA-256 pair. The repair CLI authenticates the complete plan bytes but normalizes the diagnostic byte count out of reviewed seeds and every live prewrite/postwrite validation boundary. Pinned manifests and historical replay continue to bind only that pair. Identity or digest drift still refuses before mutation.
Version 0.4.31 closes an incident in which two callers encoded flat progress
payloads while labeling them material_boundary. New journal and remote writes
now require a nonempty boundary ID and one or more exact {kind, payload}
changes. Historical envelopes remain inspectable, but resume will not interpret
a malformed boundary unless a later reviewed material_semantic_repair control
binds every malformed event and the exact material, checkpoint, projection,
generation, route, and plan-source frontiers. The repair is append-only: it
overlays normalized boundaries at their original positions and never edits or
deletes the original comments. Preview the reviewed manifest first, then apply:
workstreamctl material-repair GEN-123 --manifest repair.json \
--review-artifact reviewed-targets.json \
--plan-source ./PLAN.md --plan-identity <canonical-url>
workstreamctl material-repair GEN-123 --manifest repair.json \
--review-artifact reviewed-targets.json \
--plan-source ./PLAN.md --plan-identity <canonical-url> --apply
The reviewed target file requires a canonical lowercase GitHub repository key,
40-lowercase-hex commit URL, and normalized artifact path. It is authenticated
locally by immutable commit/path and SHA-256 and fetched through the
authenticated source-byte loader; fetched and local bytes must match before Linear access.
Exact replay also hashes the complete pinned remote comment body, so surrounding
prose, whitespace, extra markers, or another comment at that slot refuse.
Normalization is mechanically lossless: exactly two incident targets,
repair:<event-id>, and one progress change containing the complete original
payload. The material comment uses one deterministic slot; the complete
cross-surface readback is a preflight/postcheck fence, not transactional CAS.
The repair-only adapter performs another combined read immediately before the
create, requires the exact pinned serialization frontier, and writes only the
reviewed slot—never a recomputed successor slot.
Later authorized generation, source, or child evolution does not invalidate the
immutable historical repair proof.
The control kind is reserved from generic journal/encoder/adapter paths.
Material choices made where the specification was silent are typed immutable
events, not mutable prose. scripts/workstream_choices.py constructs and
reduces recorded, audited, and superseded events. Every event carries the
stable choice and workstream IDs, owning child, namespace, canonical repository
coordinate, exact plan revision, exact Git head, and timestamp. A recorded
choice separates technical confidence from confidence that the owner would
make the same choice; it also records alternatives, reach, reversibility,
affected domains, and evidence.
Never rewrite or delete an earlier choice event. Append an audit or
supersession and derive the current view. Security, authority, persistence,
concurrency, release, fleet, and irreversible choices require a fresh-context
read-only audit and cannot remain provisional. Every active material choice
requires an explicit audit verdict before closure. Any active must_fix choice
blocks landing; reversible low-risk choices may receive a provisional verdict
with a review trigger.
Choice events use the same fully paginated append-only projection boundary as scope, relations, evidence contracts, source, provenance, and continuation disposition. Their immutable event identity remains intact inside the projection event. This is authenticated transport proof, not evidence that an authorized person cannot edit or delete a Linear comment.
For every substantial independently verifiable child, maintain the layered
contract checked by scripts/workstream_evidence.py. Name the owned seam, trust
boundary, allowed side effects, plan revision, immutable repository key, and
exact full Git object ID. Every required receipt repeats that repository key and
head plus its proof kind and successful outcome. For every layer,
either attach receipts or explain why it is not applicable:
Do not call a system test with mocked providers live end-to-end proof. A head change invalidates head-bound receipts until reconciled.
The labeled canonical URL must be the exact authenticated source identity,
including its Git ref, and its digest must match the structured projection.
Changing a URL or revision is a synchronized source transition, never an
implicit identity alias.
When legacy completed ownership already blocks full authority, a reviewed
terminal_child_source_transition may perform only the same-document
blob/main or immutable 40-character commit to a different immutable
40-character commit at the same digest.
It freezes every non-source head and disposition, fences the exact pending
children, and binds the reviewed predecessor event, write revision, and
timestamp so response-loss replay accepts only the exact full source-event
envelope. Generation prepare exposes this phase only after the inactive target
passes the canonical phase-specific prefix validators; the content-addressed
GEN-14 split lineage completes its strict normalization tail first. It returns
partial authority until evidence seeding and closure.
When that exact GEN-14 D6/S7 repair already ends at the requested head, fresh
prepare retains the content-addressed evidence values: it performs no evidence,
disposition, or scope replacement before the source-only phase. Its closure
manifest carries the exact stored-to-recomputed input-frontier bridge. The
stored frontier continues to bind predecessor history while the recomputed
frontier fences the live closure input; this bridge is valid only for the exact
D6/S7, reviewed source-only, and canonical closure-repair descendant. It binds
the exact source event/value, phase timestamp, and sorted one-or-two child set;
replay permits only the corresponding zero-, one-, or two-closure prefix with
canonical envelopes and never a scope event, duplicate, or reversed closure.
The irreversible reconciler revalidates that lineage and the carried stored
frontier before substituting the recomputed live-input fence, and rederives
every already-present closure from the fenced child snapshot and evidence
rather than trusting equality between an active closure and the manifest.
An exact native-root reopen response-loss replay is authorized only by its
unique deterministic root-transition reservation. The writer verifies the
stored intent, route, terminal before-state, exact started after-state,
unrelated root and comment frontier, then reconstructs only state,
state_id, status, and status_type to revalidate the saved operator
contract. Generation activation binds the resulting deterministic receipt,
the full initially reviewed native-root observation, and a material native-root
digest excluding only updatedAt; protocol-owned comment clock changes cannot
invalidate finalization, while every state, route, or unrelated-root change
still refuses.
After a material child transition to Linear's completed state, run the
model-free projection reconciliation before treating resume as authoritative.
Prepare the routine reviewed manifest from authenticated live state with:
workstreamctl child-completion-prepare GEN-123 --child GEN-124 \
--evidence-contract evidence.json --plan-source ./PLAN.md \
--plan-identity <canonical-url> > child-completion.json
This command is read-only. scope_head_projection_required,
evidence_projection_required, and closure_projection_required return an
applicable projection_manifest for the normal projection preview/apply
pair. If the
contract's exact head differs from the active scope, immutable repository
identity and child ownership are validated first. Prepare then refuses while
any active evidence contract for an unclosed child on that repository binds a
different head. Otherwise it returns scope_head_projection_required with a
complete scope-only replacement manifest: every other active projection value
and every unrelated scope field is preserved, and only the matching
repository's exact_head changes. An older contract whose child already has an
active closure does not block the next head, which permits closing one child
before advancing the shared repository for another. Apply the reviewed scope
manifest and rerun prepare; it then emits the evidence-only phase when the
contract is not active, native_transition_required while the child is open,
and a fenced terminal_child_repairs phase only after authenticated native
readback says the child is completed. native_transition_required and
complete are control states, not manifests to apply. Rerun it after each
phase; never copy a closure forward or infer completion from the evidence file.
Native completion uses workstreamctl child-completion with the same root,
child, evidence, and source arguments plus the authenticated completed-state ID
and a reviewed timestamp. Preview first, then apply with its exact preview
digest. The command reserves the shared root ledger boundary, changes only the
child state, appends the exact prospective closure as the reservation finalizer,
and requires ordinary full resume before success. Before enabling this path,
deploy version 0.4.82 or newer to every known M1/M3/M5 writer and project one
active writer_fleet_gate for the active plan. That gate records the exact
writer and machine IDs, installed source commit/tree digest/version receipts,
observation times, and a zero legacy-writer census. It is operational eligibility
proof; an old client does not magically understand the new reservation kind.
Pending reservations written before 0.4.82 lack the full root fence and are
not guessed through: rollout must first prove there are zero such legacy
reservations, or route the exact item through a separately reviewed migration.
A reviewed terminal_child_repairs batch must fence every exact child issue
from one authenticated root snapshot, including each
parent/workspace/team/project route, exact assignee state (including explicitly
unassigned), state ID/name/type, and canonical
readback digest. The repository owner and head are derived only from named,
active, valid evidence-contract heads and must already exist unchanged in the
current scope. Closures are appended in canonical child order before any
required scope replacement. A crash may resume only from that exact prefix.
The writer never creates, reopens, or updates an issue.
New closures use schema v2 so explicit unassignment is representable; readers
continue to accept schema-v1 closures only with their original nonempty
assignee identity.
For a legacy completed, already-owned child whose receipts are still present
but were never projected as evidence contracts, use a separately reviewed
terminal_child_evidence_seeds phase first. It may only append the named,
valid contracts whose repository and exact head already match scope. It remains
non-authoritative until the subsequent closure-repair batch succeeds; the two
phases cannot be combined, and either phase is revision-checked and idempotent.
When a new plan generation begins at an exactly empty projection frontier, a
reviewed terminal_child_evidence_seed_predecessor may instead carry only
contracts that an exact predecessor-generation closure authorizes. The binding
fences the complete stale projection history, predecessor projection and tip,
material log, predecessor checkpoint chain, and graph/material/checkpoint input
frontier. A mixed predecessor is accepted only through the normal authenticated
reducer when one v2 cas_activation binds the exact ordered legacy-v1 IDs and
digest, every later event is v2 on the authenticated route, and no event is
quarantined; the binding digest and frontier cover the complete accepted mixed
history. The carried contract may change only its plan revision; its historical
head, receipts, owner, and repository remain immutable. The carry proof is
persisted on the new evidence event, so the later closure repair and ordinary
resume can revalidate it against the predecessor history. Missing, ambiguous,
mutated, unclosed, late, or frontier-drifted evidence refuses before mutation.
For the exceptional legacy case where a non-primary repository advanced before
its terminal evidence was projected, a reviewed
terminal_child_evidence_seed_nonprimary_backfill may bind the old scope and
disposition events to one exact new evidence head. The caller must first
authenticate the repository ID, PR number and exact head, merged disposition
and merge SHA, and required-check result through the repository provider. The
projection command enforces this exceptional path through its bounded
--github-token-command or explicit token-environment adapter; it accepts only
api.github.com, the exact repository identity and coordinate, merged PR/head
and merge SHA, and a nonempty all-successful exact-head check-run set. Store
checks_sha256 and provider_receipt_sha256 from that canonical typed receipt.
The seed write requires the authenticated receipt and current input frontier. Later
repair and resume trust only the exact admitted append-only evidence event and
revalidate its scope/disposition digests, repository identity, owner, and old
and new heads. A copied but unadmitted receipt, changed history event, ambiguous
event ID, or mismatched anchor refuses.
When the reviewed seed also advances the primary repository head, a seed owned
by that primary repository follows the primary transition contract. A seed
owned by another participating repository is allowed only through the reviewed
predecessor binding and its recomputed per-contract closure authority, and only
when its ownership, complete repository record and exact head remain
byte-for-byte unchanged and its evidence remains bound to that exact owner and
head. An unbound non-primary seed refuses. The manifest records
the exact predecessor/new primary heads, computed disposition, checkpoint
identity, and issue/material/checkpoint frontier. The writer fences that
frontier before every append and commits in evidence, disposition, scope order,
with scope last. Existing closed-child evidence may retain an older primary
head only when immutable projection order proves the complete evidence set and
scope were valid when its closure was appended; non-primary evidence remains
bound to its unchanged repository head, and open or unclosed evidence always
remains bound to the current head.
An exact replay is a no-op. An incomplete multi-child batch, missing/failed receipts, multiple owners or heads, non-completed state, missing assignee, route/readback drift, unrelated scope or source changes, and stale evidence refuse without mutation. Resume validates the closure against current Linear state, current repository identity/ownership, its creation-time scope and evidence set, and receipts before returning full authority. Once a completed child is present in the structured ownership map, full resume requires its active closure even if its evidence is later retired. Every closure creation or replacement requires the matching reviewed repair and live readback fence.
scripts/workstream_state.py supplies the deterministic adapter boundary for
the remaining P0 checks. apply_delta is a revision-fenced compare-and-swap;
reconcile_external records live-head contradictions and projects a merge to
Landed — acceptance review required, never directly to semantic Done;
closure_errors names missing children, plan drift, stale receipts, unowned
blockers, and open work hidden under a completed parent. A Linear adapter must
persist the returned state with the same revision fence and must not normalize
these errors away. Deterministic closure evidence without an explicitly passed
semantic review remains Landed — acceptance review required; invocation alone
cannot emit Done.
workstreamctl reconcile is the bounded live landing/closure path. It reads
every participating authenticated GitHub repository identity,
repository-qualified PR head, and merge SHA; invokes one
explicit fixed-argv Shipyard receipt adapter without a shell; and persists the
aggregate result as the singleton lifecycle projection. Repeatable
--repository-binding JSON groups are the multi-repository interface; the
original single-repository flags remain compatibility sugar for one group.
Drift invalidates evidence only for that repository but blocks aggregate
closure. Projection revisions use
route-scoped deterministic client-supplied Linear comment IDs as exclusive
remote slots. Runtime schema introspection must confirm that Linear still
supports CommentCreateInput.id; an identical collision is replay, while a
different winner requires reload and review before another write. Reviewed v1
history is fenced by one v2 activation event; later v1 writes are quarantined
and surfaced by count/digest (or exact events in history mode) rather than
silently admitted. Lifecycle reconciliation refuses while any quarantine is
unresolved; retiring one requires a reviewed projection disposition naming the
exact event IDs and event digest. A merged exact head set can emit only Landed — acceptance review required. Done additionally requires a durably projected
fresh-session review receipt bound to the exact snapshot, closure input,
repository-qualified head set, and aggregate landing truth. The receipt names and digests the durable review
artifact and declares procedural independence under a shared Linear credential;
it does not claim cryptographic agent identity.
Reconcile appends the immutable closure receipt body before the Done
lifecycle and binds that lifecycle to the receipt's exact projection event ID
and SHA-256. A response lost after either append replays without a duplicate;
a conflicting, ambiguous, or altered receipt refuses. Ordinary resume exposes
only the bounded event ID, digest, and snapshot digest, while full-history
audit returns the validated receipt body. Resume derives lifecycle status and
that receipt binding from the durable projection rather than mutable issue
prose.
Follow the authoritative workstream-resume skill for fresh-session recovery.
After workstream-resume has returned a bounded authoritative snapshot, retain it;
do not repeat recovery on a later warm turn when exact same-provider-session
retained-full bindings satisfy workstream-resume warm classification.
python3 "<absolute directory of the SKILL.md loaded for this turn>/scripts/workstream_resume.py" ABC-123
The command, exact-one-token rule, same-process waiting across nonterminal tool
yields, fail-closed historical-state rule, and immediate tab-adapter result all
live in workstream-resume; do not duplicate or weaken them here.
The current paginated Linear transport obtains the issue graph and reads the
root comment connection once to reduce append-only material events, remote
checkpoints, and the complete projection history. The same bounded graph read
collects the first comment page for every nonterminal child and paginates only
continuations; each child is route/identity validated and independently reduces
its own material events and checkpoints. Child state never inherits root events
or another child's events, and malformed, conflicting, or incomplete child logs
refuse the whole resume. Root-authorized children hidden from native
root.children by reparent/project drift are recovered by immutable ID before
both ordinary resume and strict generation-candidate validation. A newer material-event
next_action supersedes stale root description prose. The projection restores
scope, relations, choices, evidence contracts, source, provenance, and the
recorded attach/successor disposition. An acknowledged checkpoint restores its
bounded machine, worktree, exact head, evidence, blocker, and next action and is
the authority used to choose attach versus successor after live remote-head
verification. The recorded disposition is always the explicit attach or
create_successor result and must reconcile with that checkpoint and live head;
an ambiguous placeholder is not executable. An empty surface is reported as
empty rather than fabricated. Ordinary full-authority resume also emits
dependency_graph separately from the root's projected relations. Every
dependency edge is reduced from both native relations and
inverseRelations readback over the exact active-plan children, then bound to
the ordered active-generation child_dependency_authorization grants. The
authenticated graph read must match the same native root digest and exact
material/projection frontier as the resume snapshot. Grant receipts bind the
remote comment order: material events beyond a grant's reviewed frontier must
have a strictly later server creation time. A relation may have only one active
grant; replacement requires an explicit validated supersession/reconciliation
protocol. Contradictory, duplicate, ambiguous, unauthorized, stale-frontier,
cross-generation, or misordered evidence refuses resume. Full authority always
requires this authenticated surface, including an explicit empty graph; a
missing or null graph is never full authority.
When no local config is available, authenticated token-only bootstrap resolves
the root's exact workspace/team/project route before the fenced read.
After scope owns the exact child, workstreamctl child-event and
workstreamctl child-checkpoint append child-local state. Both require the root
token/UUID, child token/UUID, route, selected plan generation, and live
revision/predecessor fences. Each first writes a deterministic inert proposal
containing the full child record, then root projection CAS activates only its
exact ID/digest after fresh generation, scope-owner, child-parent, and route
authentication. That native child check is a drift preflight, not the ownership
proof or an atomicity claim. Mutation authority is bound to immutable root-side child origin:
the exact child_extension_authorization event/digest and deterministic
root/route/candidate child UUID, or deterministic initial-intake root/child
markers and IDs. Native parent/team/project fields are only a cache; drift never
transfers ownership and is reported as a separate reconciliation blocker.
Resume excludes unactivated proposal business payload from status, blocker, and
next action, but emits bounded pending handles containing child token/UUID,
proposal ID/remote ID, kind, and record digest. Root metadata contains no child
business payload. Crash before activation leaves a recoverable inert proposal;
workstreamctl child-proposal-activate reads that exact proposal by its pending
handle and root-CAS activates it without the original payload or checkpoint
file. Crash after activation makes that exact proposal authoritative.
Proposal decoding validates the supported kind and complete canonical event or
checkpoint record before exposing even a pending handle. Every activated grant
revalidates its immutable child origin before its business record is reduced.
Exact replay is zero-write, including after sealed generation retirement or a
later scope removal; an unowned new or mismatched child refuses.
Legacy 0.4.29 child_extension_authorization replay validates the exact
deterministic existing child and writes nothing without consulting current
workflow-state or assignee providers. Deleted provider identities therefore do
not invalidate an old completed creation; a missing legacy child still refuses
before any create. A later historical grant that binds native initialization
but predates the content binding follows the same existing-child-only rule and
also revalidates its recorded native readback. Neither contentless grant can
authorize a fresh create or be silently upgraded into a content-bound grant.
An older scope-owned child whose root and child IDs predate both deterministic
intake and extension grants requires one reviewed origin seal; never invent a
stable key or recreate the issue. Preview the authenticated route, native
parent, active generation/source/scope, and exact root/child material and
checkpoint frontiers, review the emitted JSON, then replay it with --apply:
workstreamctl child-origin-repair GEN-123 \
--root-issue-id <root-uuid> --child-workstream-id GEN-124 \
--child-issue-id <child-uuid> --plan-revision <sha256> \
--workspace-id <uuid> --team-id <uuid> --project-id <uuid> \
--created-at <reviewed-utc-time> --custodian <writer-identity> \
--writers-retired-at <utc-time> > child-origin-review.json
# Review this exact file, then publish it at an immutable authenticated URL.
workstreamctl child-origin-repair GEN-123 \
--root-issue-id <root-uuid> --child-workstream-id GEN-124 \
--child-issue-id <child-uuid> --plan-revision <sha256> \
--workspace-id <uuid> --team-id <uuid> --project-id <uuid> \
--created-at <same-reviewed-utc-time> --custodian <same-writer-identity> \
--writers-retired-at <same-utc-time> \
--review child-origin-review.json --review-identity <immutable-url> --apply
The writer appends exactly one immutable existing_child_origin_seal. Exact
replay is a zero-write readback. Parent/route, source, generation, scope,
ownership, projection, review artifact, or either issue's reviewed history
drifting refuses before mutation. Every later child reduction revalidates the
sealed direct prefix and admits new state only through root-authorized
proposals. It never creates, reparents, reopens, or updates an issue. The final
rereads are fail-closed preflights; they do not claim a cross-issue transaction.
The direct resume helper is full-authority by default and fetches the projected
source identity. --plan-source overrides the fetch location for an
authenticated checkout; --plan-identity preserves its durable identity. It
refuses success unless those exact bytes match the root and projection.
The default bounded context validates the complete Linear history, preserves
current child identity, status, next action, blockers, worktree/checkpoint
identity, and actionable uncheckpointed requirements, decisions, and follow-ups.
Its context_schema is agent-workstream.resume-context version 2 with
representation: compact_validated; verbose descriptions, receipt bodies,
checkpoint evidence, provenance, and terminal readbacks are represented by
counts, digests, exact repository heads, and active projection-head bindings
instead of being duplicated into every agent prompt.
If validated current state would still exceed 24 KiB, ordinary resume emits
actionable head/tail excerpts or a fixed-column frontier after every semantic
and contradiction check has passed. deferred_audit_detail binds deferred
fields by JSON Pointer, byte count, and SHA-256. Its high-cap compact
audit_route is the digest-verifiable hydration surface; full_history_route
is the separate lossless audit. Resolve their
current_workstream_resume_skill_script launcher as current Python plus the
workstream-resume SKILL's absolute scripts/workstream_resume.py, then append
args; it never depends on PATH. Whenever deferred_audit_detail.state is not
none, hydrate before execution. In the fixed envelope, combine the compact
route with hydration_selectors or the source-indexed obligation selector
rule, verify the owning top-level digest, then act. resume_authority: full
describes authenticated validation;
authority_scope explicitly prevents treating hashed excerpts as exact
instructions. The Shipyard loader performs a second authenticated, digest-
verified compact hydration automatically rather than interpreting envelope
rows as checkpoints; a mismatch refuses before profile construction.
A checkpoint can acknowledge material-event history, but cannot structurally
bound open-child state, decisions, dependencies, pending proposals, or other
active projection surfaces, so it is not a complete no-stranding repair.
Compact provenance uses the same candidate predicate as full history: every
provenance item with a truthy worktree is a candidate. Exactly one is preserved,
including a dirty or stale predecessor; multiple candidates refuse, and
projection order is not implicit supersession.
After initial bounded recovery, an explicitly requested audit or closure pass
may use a second --include-history invocation and raise the explicit byte/item
caps when that complete history is known to exceed the normal resume budget.
That response uses the same schema version with representation: full_validated and preserves the complete validated values.
For an immutable github.com/.../blob/<40-hex-commit>/<path> source, HTTPS is
tried first; a 404 may fall back to existing noninteractive GitHub SSH access
in a temporary isolated repository. A synchronized living plan may use the
canonical blob/main identity: the fallback snapshots one FETCH_HEAD, and
resume still refuses unless those bytes match the root's recorded SHA-256.
Other mutable refs, malformed paths, prompts, timeouts, and Git failures refuse
resume rather than weakening source proof.
Any positional JSON snapshot requires --inspection-only, labels its output
inspection_only, and is not authority to continue work; JSON fields that
claim authentication do not change that boundary. Full authority comes only
from the command's live authenticated Linear read. workstreamctl projection
requires a reviewed manifest containing the exact current projection revision,
the exact active key/event/value-digest set, and explicit retirements naming
their reviewed event and value digest. It never retires an omitted key. A late
key or changed head requires reload and review before any append. The command
computes the concrete attach/successor disposition against the reviewed
--remote-head and rereads the complete comment stream before reporting
success. The ordinary --remote-head argument is still caller-authenticated;
the exceptional non-primary terminal-evidence backfill is the narrow exception
and requires the command's typed GitHub receipt adapter. Do not describe any
other CLI head argument alone as live remote verification.
Projection synchronization treats a labeled Canonical plan: <URL> line on
the existing root issue as the source identity. Exactly one distinct URL is
required before any write; zero or multiple candidates refuse with a concrete
remediation and never create another issue or project. A legacy active plan
still requires the supplied authenticated identity to equal that exact URL.
An inactive, unselected, non-retired generation candidate may instead use an
immutable revision URL for the same host/owner/repository/path only when its
reviewed target projection contract is exact and its explicit source item
matches the authenticated identity and SHA-256. Once activated, normal resume
and projection trust that structured active source rather than description
prose. The original canonical URL and full description digest are diagnostic
fences: both are reread before the first append and after final validation, and
the command never calls issueUpdate. A different document, ambiguous label,
source mismatch, stale review frontier, or description drift refuses. The
command otherwise adds a missing structured source or refreshes its identity
and SHA-256 while preserving the issue and append-only history. Repeated
synchronization with a current review contract writes nothing. Intake does not
add a labeled canonical URL by itself; any issue mutation that adds or changes
that line must finish through this projection transaction. A projection
operation is not reported successful until the same strict bounded validation
as resume returns resume_authority: full.
If a historical relation points to a peer created before the relation-readback
contract, only this reconcile command may load that incomplete head, and only
when the reviewed manifest exactly retires or replaces every incomplete
relation. Those relation migrations are appended before unrelated changes;
normal resume and final readback remain strict.
This remains a validated bounded snapshot, not complete physical cross-machine
recovery proof. Resume does not itself fetch owner, live source-control truth,
landing-controller truth, or deletion resistance. Reconcile plan revision,
repository scope, and exact heads before implementation. An unfetched surface
still emits transport_unimplemented, and closure treats that marker as a
blocker.
scripts/workstream_graph.py converts an intake payload plus a reviewed set of
candidate keys into deterministic root/child operations and refuses child
creation before explicit review. Stable keys make sequential comparison and
same-revision no-op detection deterministic. The authenticated intake transport
maps those keys to client-supplied, route-scoped UUIDs and resolves a duplicate
create only by complete reload and exact-field validation. Focused fake-client
tests cover concurrent first creation and collision refusal; they are not live
Linear or cross-machine proof. Existing-graph mutations that require remote CAS
remain refused.
scripts/workstream_checkpoint.py defines deterministic checkpoint identity,
required execution/worktree fields, remote-ack validation, plan-drift checks,
and complete predecessor-chain recovery. scripts/workstream_linear_checkpoints.py
persists that schema as a distinct immutable marker over the same authenticated,
fully paginated Linear comment boundary as material-delta events. It derives an
acknowledgement only after readback, replays an already observed event without a
second write, and fences the exact live material revision and checkpoint
predecessor through the shared ledger-boundary slot before appending. A
checkpoint is linearized when it wins that slot. An event admitted after the
checkpoint's final combined read is later, uncheckpointed work and resume
surfaces it as such. It fails closed on ambiguous or malformed remote state.
Legacy comments may have arbitrary remote IDs and remain readable; new writes
use deterministic slots. A legacy checkpoint whose root revision is ahead of
the material-event history is not guessed or silently repaired: new event and
checkpoint mutation fails with checkpoint_material_history_incomplete until
a reviewed quarantine/remediation operation accounts for the missing history.
Exact replay of the existing checkpoint remains a no-write acknowledgement.
For a root boundary, use workstreamctl checkpoint without --apply first,
then apply the unchanged preview with its exact material revision and preview
digest. The operator derives material-<revision>, the active generation and
checkpoint predecessor, full material/checkpoint/serialization frontiers, the
deterministic shared slot, true unarchived-root proof, graph digest, and exact
disposition candidate. Only predecessor state or that exact candidate replay
is accepted. It invokes ordinary default-budget resume and requires full,
executable authority plus the exact remote receipt before reporting success.
Linear cannot atomically append the checkpoint and its disposition projection;
therefore a failure after either append is replay_required, unknown, or
postcondition drift—not evidence that no write occurred.
This is logical transport proof. Its from_env constructor consumes the same validated
repository-root route and refuses a root outside it. Do not call the
deterministic fake-client tests a live Linear, second-machine, process-death, or
deletion-resistance canary.
Size the work.
Resolve one workstream and durable context URL. For a plan-backed project, link the exact private plan section. For small durable work, the Linear issue itself may be the goal. Record the namespace, explicit Linear workspace/team/project destination, canonical repository coordinates, child repository ownership, and typed cross-workstream relations before mutation.
Load validated .workstream.json from the exact repository root when it
exists. Treat it as declared routing authority, not as a cwd-based guess; do
not substitute similarly named workspaces, projects, teams, or repositories.
On recovery, read the full nonterminal issue graph, dependencies, decisions, comments, plan link/revision, and next action. Then query live source-control and landing-controller state when those capabilities exist; neither old comments nor local state are PR truth.
Report stale contradictions before implementation:
Only when a stable external ingress integration and its private transport are already configured, recover turns that arrived after the last structured checkpoint:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_ingress.py" flush
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_ingress.py" \
recover --workstream ABC-123
Classify each material event into one reviewed bounded promotion request,
then use workstream_ingress.py promote --request <json> --apply. The
command durably stages the intent before its deterministic Linear mutation
and posts the processed successor only after Linear readback. If the source
disappears after staging, resume with promote --repo <private-repo> --remote-issue <number> --event <wsi-id> --apply; no source outbox or request
file is required. A repeated event ID is one logical event. An unprocessed event is evidence that the
next agent must triage it, not evidence that the request was accepted.
A normal plugin installation skips this step and resumes from the last
durable checkpoint. Do not invoke ingress merely to probe whether it is
configured: that can create local state or fail for missing configuration.
Perform a tiny delta update without a second model:
| Conversation change | Durable action |
|---|---|
| New material requirement | Create/update an issue or child with why and acceptance |
| Changed requirement | Update the active item and preserve the old decision in history |
| Spec-silent material choice | Append a typed recorded event to its owning child; never overwrite it |
| Independent choice verdict | Append an audited event; block landing on active must-fix/high-risk unaudited choices |
| Rejected work | Cancel/supersede with date and reason; never erase it |
| New dependency/blocker | Add the relation, exact blocker, owner, and next action |
| PR created/head changed | Attach PR and exact head; invalidate prior-head evidence |
| A landing controller accepts the PR | Attach its exact-head controller receipt |
| PR merged | Close only acceptance that actually passed; retain follow-ups |
| No material delta | Do not write to Linear |
After creating the first durable issue for a session that began unbound, bind already-captured turns only when an explicitly configured ingress integration provides an exact event, session, or trusted surface identity:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_ingress.py" \
bind --workstream ABC-123 --context-url https://linear.app/example/issue/ABC-123/example \
--surface "$WORKSTREAM_SURFACE_ID"
Without trusted surface metadata, use the exact provider session ID from
recover; never bind by repository cwd. Multiple sessions
may share one checkout. A bind is persisted, so the session's LATER turns bind
themselves — you do not need to re-bind as the session continues. If a binding
was wrong, correct it without processing the event (this also forgets the
persisted identity, so the next turn does not re-apply it):
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_ingress.py" \
unbind --workstream ABC-123 --session <exact-provider-session-id>
After triage, use promote for a material event. Never mark a material event
processed before the promotion path verifies the corresponding immutable
Linear event and exact receipt. GitHub comments for superseded or
no-material-delta are mutable hints only and never suppress an open capture;
process therefore refuses to publish them as durable classifications.
Issue titles must be understandable outside the project view and use a plan/workstream-derived prefix. Every issue independently includes the stable workstream ID, plan section when present, namespace, canonical repository coordinate, why, completion gate, PR, repository-qualified head, optional landing-controller receipt, evidence, current blockers, and next action.
Before continuing in another agent session:
updatedAt.When a configured Shipyard delivery handoff needs a native launch profile, create it only after step 4 with the bundled product helper resolved from this skill:
python3 "$WORKSTREAM_SKILL_ROOT/scripts/workstream_shipyard_profile.py" ABC-123 \
--repo-path /absolute/worktree \
--model <canonical-model> --reasoning-effort <effort> \
--output /owner-only/private-directory/ABC-123.json
The command itself reruns authenticated full-authority resume, derives the provider/session from the current remote checkpoint, and refuses any stale, uncheckpointed, dirty, mismatched, or unlineaged authority. It emits no prompt or secret. Owner-only profile publication currently requires macOS. See the exact bridge and digest contract.
For tracked work, a bare shipyard ship --pr is validation only and is not a
workstream handoff. Submit through shipyard pr --workstream-id <handle> --context-url <exact recovered context URL> whenever that path is available.
If the exact PR/head already exists, repair only that same object with
shipyard runner steward-handoff --repo <owner/repo> --pr <number> --head <exact head> --workstream-id <handle> --context-url <exact recovered context URL>; review its dry run, then apply. Never create a replacement PR, queue
item, Linear issue, or project merely to add correlation metadata.
If shipyard pr preflight cannot resolve this repository's real gate scripts
and versioning config, stop without substituting dummy or no-op gates. Push and
create exactly one PR through the repository's authenticated GitHub path,
dry-run then apply shipyard runner steward-handoff to that exact PR/head, and
only then submit one bare shipyard ship --pr <number> validation job. The
separate steward receipt owns workstream correlation; reuse the same PR and
cancel only a superseded old-head validation through Shipyard.
Native transcript resume is useful but not cross-machine task authority. The plugin installs no capture hook, so turns after the last remote acknowledgement are not recoverable unless the user has separately configured a stable external capture integration. With that optional integration, a local unacknowledged row still cannot be recovered after its source machine disappears. State that physical limit honestly.
The ingress is an at-least-once transport, not a second task tracker. Remote
consumers deduplicate capture by event_id and promotion by its deterministic
promotion/material-event IDs; Linear holds the promoted business logic.
Local remote-acknowledged rows rotate after 30 days, remote issues rotate by
machine/month, prompts are capped at 16 KiB, and documented credential patterns
are sanitized. See durable ingress for the
exact privacy and mutation boundary.
Never store credentials, account identities, private filesystem paths, or raw transcripts in public PR metadata.
Session managers may provide stable surface identity and continuation UX; landing controllers may provide exact-head ownership and receipts. cmux and Shipyard are examples only. Check that the capability is installed and configured before using it, and never treat an adapter as the workstream authority.
Future backup work may add a read-only private flat-file snapshot, but it must not become an import/sync path or second authority.
agents/openai.yaml (opens in a new tab)references/durable-ingress.md (opens in a new tab)references/identity-history-seal.md (opens in a new tab)references/material-semantic-repair.md (opens in a new tab)references/root-transition.md (opens in a new tab)references/shipyard-launch-profile.md (opens in a new tab)scripts/test_workstream_acceptance.py (opens in a new tab)scripts/test_workstream_checkpoint.py (opens in a new tab)scripts/test_workstream_child_completion.py (opens in a new tab)scripts/test_workstream_child_completion_prepare.py (opens in a new tab)scripts/test_workstream_child_dependencies.py (opens in a new tab)scripts/test_workstream_child_origin_repair.py (opens in a new tab)scripts/test_workstream_child_proposal.py (opens in a new tab)scripts/test_workstream_child_state.py (opens in a new tab)scripts/test_workstream_choices.py (opens in a new tab)scripts/test_workstream_closure.py (opens in a new tab)scripts/test_workstream_config.py (opens in a new tab)scripts/test_workstream_delta.py (opens in a new tab)scripts/test_workstream_e2e.py (opens in a new tab)scripts/test_workstream_evidence.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/codex-spark-routingRoute small, well-specified coding slices to GPT-5.3-Codex-Spark while a stronger owner retains architecture, integration, and final verification. Use when the user asks to accelerate work with Spark or when a bounded implementation/test slice would benefit from very fast iteration./decision-auditIndependently audit implementation choices that a specification left open. Use as a fresh-context, read-only closeout pass for substantial or high-risk work; do not use it as an editing or general code-review workflow./workstream-resumeUse first for exactly one existing workstream handle, Linear issue URL/tab title, literal "resume this session" under an exact terminal binding, or bare continue in the same provider session with one retained authorized workstream. Recover before memory, lineage, repo, Git, or Shipyard exploration.Other plugins' skills for the same job
npx claudepluginhub generous-corp/agent-workstream --plugin workstream