@1aboveio/engineering-skills 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1aboveio/engineering-skills",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Issue-to-PR and release orchestrators, review, coverage, golden paths and test quality.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  "id": "engineering",
28
28
  "core": "@1aboveio/core-skills",
29
29
  "coreSkills": [],
30
- "digest": "fe195e501794ca4eb2a43ef4fb34ef697a786dbc98254b8ead2852ff7c7eb6c1"
30
+ "digest": "49e44cd08e6a8f8b3568b49be3c123b3215893810b1c1c6f92880dad86a43126"
31
31
  },
32
32
  "publishConfig": {
33
33
  "registry": "https://registry.npmjs.org/",
@@ -4,7 +4,7 @@ description: "Slash/explicit-only (/better-review). Single-agent adversarial rev
4
4
  disable-model-invocation: true
5
5
  dependencies:
6
6
  - engineering-runtime
7
- release-version: 0.50.1
7
+ release-version: 0.50.3
8
8
  ---
9
9
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
10
10
  # Better Review
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: e2e-test
3
3
  description: "Playwright end-to-end guidance for affected browser journeys, render health and presentation checks, with route manifests and sweeps for broader audits. Use when browser routes or user flows ship or change, or a Playwright test flakes. NOT for non-browser tests, defining what to test (ensure-coverage), the curated ALIVE/DEAD golden-path gate (golden-path), or CI workflow YAML (github-actions)."
4
- release-version: 0.50.1
4
+ release-version: 0.50.3
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # E2E Testing Standard
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: engineering
3
3
  description: "Engineering conventions: feature-delivery priorities, focused verification and review, operational boundaries, and tracker routing. Standalone /engineering offers Global, Project, or Session setup and targeted resets for configured scopes; /engineering init keeps explicit project setup. Use when setting up AGENTS.md or CONTRIBUTING.md, saving or resetting engineering defaults, or before creating an engineering issue, spec, epic, ticket, or sub-issue on GitHub or Linear. Reads existing policy without writing during ordinary work. NOT the issue-to-PR workflow (resolve-issues), release execution (resolve-release), Git delivery (github-flow), or CI setup (github-actions)."
4
- release-version: 0.50.1
4
+ release-version: 0.50.3
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Engineering
@@ -3,7 +3,7 @@ name: engineering-runtime
3
3
  description: Internal support package for shared Engineering Workflow executable behavior. Never select or invoke this package as a user capability.
4
4
  disable-model-invocation: true
5
5
  user-invocable: false
6
- release-version: 0.50.1
6
+ release-version: 0.50.3
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Engineering Runtime
@@ -369,7 +369,7 @@
369
369
  "repository": "1aboveio/ai",
370
370
  "revision": "main"
371
371
  },
372
- "contentDigest": "528de8e948bcd1cfdbe92bcb4c14129cbb78d5d9037d8d378d5ac540017cd248",
372
+ "contentDigest": "03f57167023ddfc5de32ed8c1cfc7df0201c383306fbe716e154983e9bccab06",
373
373
  "digestExcludes": []
374
374
  },
375
375
  {
@@ -382,7 +382,7 @@
382
382
  "repository": "1aboveio/ai",
383
383
  "revision": "main"
384
384
  },
385
- "contentDigest": "1b1074c002a7d3ca2dfebe625b65128aee10a662f7f9d4060a018fbaecf3225f",
385
+ "contentDigest": "28bd5ad6f122e209cccc1e7000a871b75496124d319fa27c901748bb121e54d8",
386
386
  "digestExcludes": []
387
387
  },
388
388
  {
@@ -395,7 +395,7 @@
395
395
  "repository": "1aboveio/ai",
396
396
  "revision": "main"
397
397
  },
398
- "contentDigest": "61d744eeddd5b3a5d2fa7a94ea01ec3a570c72a7c19ad526761f21aac993abff",
398
+ "contentDigest": "0fba001cb3cfbd084908850d5251ed6586269b1c7869e56f6e39f288bf4835e9",
399
399
  "digestExcludes": []
400
400
  },
401
401
  {
@@ -408,7 +408,7 @@
408
408
  "repository": "1aboveio/ai",
409
409
  "revision": "main"
410
410
  },
411
- "contentDigest": "3140da610485146538ee76048446ea7bac8927890a1469eb8108e63e4056d655",
411
+ "contentDigest": "41b1c757564b9560322249b76361e096ce401b00b81cd6f9abd2b67e94eb25b3",
412
412
  "digestExcludes": []
413
413
  },
414
414
  {
@@ -421,7 +421,7 @@
421
421
  "repository": "1aboveio/ai",
422
422
  "revision": "main"
423
423
  },
424
- "contentDigest": "12f5230e47afdeab750cb6b1454b3172edb29b922155b2994e96a93f386b6dbd",
424
+ "contentDigest": "82506048c5323a4fbd5e56dda3ad4efb40136341857bd81ff7fbb75f6a9c6f18",
425
425
  "digestExcludes": []
426
426
  },
427
427
  {
@@ -434,7 +434,7 @@
434
434
  "repository": "1aboveio/ai",
435
435
  "revision": "main"
436
436
  },
437
- "contentDigest": "b8d908580483f3954545e392c11d439ed100688eadc3b41ce508569f6dddc3bc",
437
+ "contentDigest": "b7698f933d70c1ecd0c0d5c9baea402db034326e395b7e908174a86cb79ba722",
438
438
  "digestExcludes": []
439
439
  },
440
440
  {
@@ -447,7 +447,7 @@
447
447
  "repository": "1aboveio/ai",
448
448
  "revision": "main"
449
449
  },
450
- "contentDigest": "256eac4a31f95d536ef487359df4c84fe7e85436c3b7550f6200f1b15cca4d0b",
450
+ "contentDigest": "f897133ae6a7321535a92ad5996bf7c31f99fc5152286ee1b33e920083c36c8e",
451
451
  "digestExcludes": []
452
452
  },
453
453
  {
@@ -460,7 +460,7 @@
460
460
  "repository": "1aboveio/ai",
461
461
  "revision": "main"
462
462
  },
463
- "contentDigest": "25ad674c96748cb5313d13c80dd1ac4be5bdb287e75e7f978d8e5b97f5892833",
463
+ "contentDigest": "349a7a984fa78afb84283021201db2f5a9f7df2754e97bf569f4dbd099d41960",
464
464
  "digestExcludes": []
465
465
  },
466
466
  {
@@ -473,7 +473,7 @@
473
473
  "repository": "1aboveio/ai",
474
474
  "revision": "main"
475
475
  },
476
- "contentDigest": "1d10c734eaef6bb20bf99bf9fa6dcfde6460ea2eecb84c33d7c0474e470684a9",
476
+ "contentDigest": "9b89aeca4b1a548446b2d30d57d6f8278f33fc5d1d55ce6abcf355f51a8afa3a",
477
477
  "digestExcludes": []
478
478
  },
479
479
  {
@@ -486,7 +486,7 @@
486
486
  "repository": "1aboveio/ai",
487
487
  "revision": "main"
488
488
  },
489
- "contentDigest": "229a6d752c9b17c298172a022c36f8e28e409d665df4ed89f1655c17f37db3f3",
489
+ "contentDigest": "22a4896f498d85915f755a6047df8e7575d92c58c094c8779d6631c796c8f3f4",
490
490
  "digestExcludes": []
491
491
  },
492
492
  {
@@ -499,7 +499,7 @@
499
499
  "repository": "1aboveio/ai",
500
500
  "revision": "main"
501
501
  },
502
- "contentDigest": "c44aa11db1f62995c8b77929143892e421d7068193c959930c8af4fbe8a2d7f5",
502
+ "contentDigest": "a49428ca276e8d67f9b78ac7ff9b0c281dd172080517a489ec7cdae4473e437c",
503
503
  "digestExcludes": []
504
504
  },
505
505
  {
@@ -512,13 +512,13 @@
512
512
  "repository": "1aboveio/ai",
513
513
  "revision": "main"
514
514
  },
515
- "contentDigest": "14439c4b1390b3dde50dcf8d56ff5c578bbbe08b17627f7bd504db099ba5e92a",
515
+ "contentDigest": "67a888aa1cd6e67637bfb3b4008584bb7ed5bc53fa22916822c4eeffc7a30165",
516
516
  "digestExcludes": [
517
517
  "coherence/workflow.json"
518
518
  ]
519
519
  }
520
520
  ],
521
- "releaseIdentity": "d7ab71565826655a05f576e53932870e4d0176329a1b4110a460457e5cb2d0b8",
521
+ "releaseIdentity": "8e3941adae7a8ce9b38a225a018362d05bf217659456bf42e27fd85d3bd6bc75",
522
522
  "lifecycleAuthority": "native-skills-cli",
523
523
  "repairRecipe": {
524
524
  "id": "engineering-workflow-dependency-first",
@@ -2,7 +2,7 @@
2
2
  name: ensure-coverage
3
3
  description: "Define or audit behavior-first test criteria — ACs, required test levels, mock/integration/E2E policy — across three axes: breadth (Coverage Ledger), depth (over-mocking), presentation (perceivability of browser surfaces). NOT judging whether a single test is any good (test-quality), authoring browser tests (e2e-test), reviewing a PR (better-review), or delivering issues (resolve-issues)."
4
4
  disable-model-invocation: true
5
- release-version: 0.50.1
5
+ release-version: 0.50.3
6
6
  ---
7
7
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
8
8
  # Ensure Coverage
@@ -3,7 +3,7 @@ name: golden-path
3
3
  description: "Golden-path E2E: the short list of user journeys whose failure blocks a release, kept in a repo as one contract (golden-paths.json) with a generated GOLDEN_PATHS.md and a generated GitHub Actions workflow, and run against a local build or a deployed URL for an ALIVE/DEAD verdict. Use to set golden paths up in a repo ('init golden paths', 'add golden-path CI'), to migrate an older smoke.manifest.json or a hand-built smoke setup ('audit', 'migrate smoke'), to add, change, or remove a golden path, to ask 'is the build alive?' or run them before a PR or release, or when a change touches a flow listed in GOLDEN_PATHS.md. NOT for writing the Playwright specs themselves (e2e-test), deciding what a change must prove (ensure-coverage), or general workflow YAML (github-actions)."
4
4
  dependencies:
5
5
  - e2e-test
6
- release-version: 0.50.1
6
+ release-version: 0.50.3
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Golden path
@@ -3,7 +3,7 @@ name: harness-runtime
3
3
  description: Internal import-only library shared by first-party engineering packages. Not a workflow skill; never select or invoke it as a user capability.
4
4
  disable-model-invocation: true
5
5
  user-invocable: false
6
- release-version: 0.50.1
6
+ release-version: 0.50.3
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Harness Runtime
@@ -14,6 +14,7 @@ This support-only runtime package exposes shared programmatic contracts plus can
14
14
 
15
15
  - `contracts.md` defines the neutral values, planner boundary, discovery handoff, and topology rules.
16
16
  - `native-question-contracts.md` pins the Pi, Codex, and Claude Code adapter schemas and response behavior.
17
+ - Read [references/subagent-sessions.md](references/subagent-sessions.md) when continuing a Pi worker: it distinguishes attempt ids from native session ids, checks the active spawn schema, and defines local/global discovery.
17
18
  - `index.mjs` exports neutral constructors plus pure question planning and response normalization.
18
19
  - `agent-catalog.mjs` is the consumer bridge to the harness-owned agent catalog: it resolves the four worker roles for a harness, with no skill-owned ladder and an explicit blocked result when no resolver is available.
19
20
  - `discover-models.mjs` enumerates model evidence; `model-catalog.mjs` manages per-harness classifications. Both remain import-compatible for existing consumers and are no longer used to select model slots.
@@ -8,6 +8,8 @@ Question and answer values are harness-neutral immutable data. `planStructuredQu
8
8
 
9
9
  Model discovery unions explicit current-turn spawn ids and human-named runnable ids with configured or credentialed evidence. Its `{ discovered: [{ id, source }] }` output is evidence, not a neutral model-availability value: callers map each item to `{ id, sources: [source] }`, preserve `harness` and `completeness`, then pass that shape to `defineModelAvailability`; discovery `notes` remain operator diagnostics. Pi labels configuration discovery `full` even when it finds no runnable ids because its credential-aware configuration is the complete evidence class. Codex and Claude Code static configuration remains partial unless current-turn or runtime-enumeration evidence completes it. Catalog writes remain isolated to each harness's user directory, and the installation-relative team seed is read-only.
10
10
 
11
+ For saved Pi worker conversations, read [subagent session contracts](references/subagent-sessions.md) before choosing a continuation call. The active spawn schema determines capability; the native session id selects the conversation, while the returned attempt id tracks one execution. This reference adds no inferred tools to the neutral capability value.
12
+
11
13
  Shell code cannot invoke a native question tool inside the agent's current turn. It may validate and plan data; the agent performs each planned native tool call and passes the responses back for normalization.
12
14
 
13
15
  When no supported native question tool is advertised, concise free-text input is permitted only for one optionless question. Textual multiple-choice emulation is forbidden. Unsupported multi-select and all secret input fail explicitly rather than degrading silently.
@@ -0,0 +1,75 @@
1
+ # Saved subagent conversations on Pi
2
+
3
+ Use this contract when an engineering workflow continues a Pi worker after its
4
+ attempt has finished. Other harnesses use their advertised continuation API.
5
+
6
+ ## Check the active interface
7
+
8
+ Read the tool schema advertised in the current turn. Continuation requires
9
+ `subagent_spawn` with `session_id`; a tool name or an installed package version
10
+ alone does not establish that the running extension has loaded that parameter.
11
+ A stale running extension may need the human's `/reload` after an update. Report
12
+ that mismatch and use the workflow's documented fallback; updating packages or
13
+ changing tool permissions is a separate authorized action.
14
+
15
+ ## Record the conversation separately from the attempt
16
+
17
+ Keep these values from the actual launch receipt:
18
+
19
+ - `runId`: the attempt used for results, failures, logs, and the active worker slot.
20
+ - `sessionId`: the native Pi conversation used for later follow-up.
21
+ - `cwd`: the worker's recorded workspace.
22
+
23
+ Every continuation creates a new `runId` while keeping `sessionId`. Read the
24
+ native session id from the structured receipt, batch launch entry, or explicit
25
+ `session_id` in list output. An attempt id is not a substitute, even when the two
26
+ happen to match on the first launch.
27
+
28
+ For an older plan missing `sessionId`, locate the exact recorded `runId` in
29
+ `subagent_list` and record its native `session_id` before continuing. Use
30
+ `all: true` when it is outside the caller's folder. If that identity cannot be
31
+ verified, report unavailable continuity and follow the workflow's explicit
32
+ replacement path with its saved evidence.
33
+
34
+ ## Continue through spawn
35
+
36
+ ```javascript
37
+ subagent_spawn({ session_id: owner.sessionId, prompt: "Fix the remaining findings." })
38
+ ```
39
+
40
+ The prompt is the next turn, not a repetition of the original assignment or role.
41
+ Keep the saved worker configuration; pass model or effort only for an explicit,
42
+ authorized escalation supported by the current schema. Record the returned new
43
+ attempt id and verify that its session id is still the selected conversation.
44
+ Per-job `session_id` in `subagent_spawn_batch` has the same meaning; the shared
45
+ batch options do not select one conversation for every job.
46
+
47
+ The caller may be a different foreground session. Completion reports to that
48
+ caller. Continue from a completed attempt; a running or orphaned writer must
49
+ settle before another continuation starts. A failed, killed, lost, or otherwise
50
+ refused attempt follows the workflow's recovery or replacement rules rather than
51
+ selecting an older completion. Current mandatory permissions still apply.
52
+ Missing history or workspace is a refusal, not permission to create a replacement
53
+ conversation under the same identity.
54
+
55
+ ## Discover locally or globally
56
+
57
+ `subagent_list()` searches the current folder and descendants across foreground
58
+ sessions. `subagent_list({ all: true })` searches globally. Each row identifies
59
+ both the attempt and the saved conversation. `session_name` is a convenience for
60
+ one exact, unambiguous name in the local folder scope; a workflow with recorded
61
+ ownership uses its exact `sessionId` rather than choosing a worker by name.
62
+ Duplicate names require an explicit session id.
63
+
64
+ ## Keep the lifecycle small
65
+
66
+ Native session history and completed launch recipes persist by default.
67
+ `subagent_resume`, `subagent_release`, and `retain_session` are not part of this
68
+ contract. A completed attempt frees its capacity slot automatically. Ordinary
69
+ workspace/resource cleanup remains owned by the workflow; no session-release
70
+ acknowledgement is required. Preserving history does not keep a deleted workspace
71
+ available for later continuation.
72
+
73
+ Keep the implementation conversation through repairs. An unfinished review may
74
+ continue only within the workflow's existing HEAD and scope rules. A completed
75
+ independent review round gets a fresh reviewer for the next required round.
@@ -8,7 +8,7 @@ dependencies:
8
8
  - better-review
9
9
  - golden-path
10
10
  - harness-runtime
11
- release-version: 0.50.1
11
+ release-version: 0.50.3
12
12
  ---
13
13
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
14
14
  # Resolve issues
@@ -187,7 +187,7 @@ efforts are run metadata, never a question.
187
187
  ### 2. Implement and open the PR
188
188
 
189
189
  Give each unit a branch, its prepared workspace, and an implementer with its findings entry
190
- and parents' contracts; retain its [implementation owner](references/implementation.md#implementation-owner)
190
+ and parents' contracts; keep its [implementation owner](references/implementation.md#implementation-owner)
191
191
  through review/CI fixes, separately from its active worker slot. State outcome and validation, not method. Refill
192
192
  slots at once. At a unit's first coherent commit its PR opens as a draft, so CI
193
193
  starts and the work is safe; later work goes to the same PR (in a Mergify stack
@@ -117,10 +117,8 @@ provider shows that PR merged.
117
117
 
118
118
  Clean that unit's workspace and resources, then finish it, in every scheduler
119
119
  mode: `next-actions.mjs` prints `cleanup-workspace` until its cleanup settles.
120
- First [release any session retention still held](implementation.md#settle-session-retention)
121
- for it, even while other units remain active; a conversation launched without protection has
122
- nothing to release. Then record the intent through the [checkpoint mechanism](task-plan.md#checkpoints) (`lifecycle.cleanup`
123
- `{state: applying, headSha: <the unit's headSha>}`), then run:
120
+ Record the intent through the [checkpoint mechanism](task-plan.md#checkpoints) (`lifecycle.cleanup`
121
+ `{state: applying, headSha: <the unit's headSha>}`), while other units remain active, then run:
124
122
 
125
123
  ```bash
126
124
  node <skill-base-dir>/scripts/cleanup-runs.mjs cleanup --run <run> --unit <unit> \
@@ -45,7 +45,7 @@ issue or automatic scheduler gate. They do not waive required validation.
45
45
 
46
46
  ## Every brief contains
47
47
 
48
- Use the full checklist for a fresh or replacement worker. For a retained conversation,
48
+ Use the full checklist for a fresh or replacement worker. For a continued conversation,
49
49
  send the new feedback, current checkpoint, latest failure/fix brief and local evidence,
50
50
  current standing orders and changed decisions, affected skill/proof pointers, and new
51
51
  result path. Re-read the saved source/criteria after context loss; do not resend the original
@@ -15,12 +15,9 @@ nothing is left to settle.
15
15
 
16
16
  ## Clean before handoff
17
17
 
18
- [Release any session retention still held](implementation.md#settle-session-retention) for each
19
- unit before normal workspace cleanup; this also applies at each merge while other units
20
- continue. A launch that asked for none has nothing to release, and an acknowledgement is
21
- recorded only where protection was actually held. Record any
22
- resource intentionally kept under the existing lifecycle; never claim it was cleaned
23
- because its worker exited.
18
+ Clean each delivered unit's workspace and resources at its settlement; this also applies at
19
+ each merge while other units continue. Record any resource intentionally kept under the
20
+ existing lifecycle; never claim it was cleaned because its worker exited.
24
21
 
25
22
  Clean every delivered unit's workspace and resources before the report, in every
26
23
  scheduler mode ([workspaces.md](workspaces.md#cleanup-after-delivery-before-finish)).
@@ -242,10 +242,10 @@ missing, or names a step without a reason.
242
242
  | A capability the unit needs is missing and no unit builds it (a shared driver, fixture, or hook) | Build it inside the first unit that needs it; units that need it later get `dependsOn` on that unit. Only when that puts the unit past the size check's line limit, file it as its own issue beside them, with `blocked_by` on the units that use it, never on their parent issue. Example: three proof units each need a device-state reader: the first builds it, the other two depend on the first. |
243
243
  | [Human-only](#human-only) blocker | Take its automatic answer ([preflight.md](preflight.md#never-block-on-the-human)); when that defers it, mark `blocked` (`blockedReason: human-decision`, its `humanItem` and `humanNeed`), keep the work, and record what is needed on its owning issue; never ship part of the unit. |
244
244
 
245
- Continue the retained owner in the kept workspace with the current checkpoint, findings
245
+ Continue the saved owner in the kept workspace with the current checkpoint, findings
246
246
  and failure evidence. If its process state or required selection prevents continuation,
247
247
  use an explicit replacement under the [owner contract](implementation.md#implementation-owner),
248
- keeping its old session reference for settlement; replacement briefs use those local facts
248
+ keeping the replaced reference as evidence; replacement briefs use those local facts
249
249
  rather than an old transcript. Keep the response limits and history above. Record a queue stall with the
250
250
  provider pending as a wait and watch again. End the run only when
251
251
  `next-actions.mjs`, invoked with [live capacity](implementation.md#live-capacity), prints `finish`, and never claim the spec complete.
@@ -56,51 +56,62 @@ accepts unrestricted writes.
56
56
 
57
57
  ## Implementation owner
58
58
 
59
+ On Pi, read the shared [saved conversation contract](../../harness-runtime/references/subagent-sessions.md)
60
+ for the active schema check, discovery scope, and conversation lifecycle. The rules below
61
+ bind that contract to unit ownership and review repairs.
62
+
59
63
  Keep one implementation conversation per unit through local proof, independent review,
60
64
  review fixes and CI repairs. Its saved conversation outlives the active worker slot: launch
61
65
  each worker normally, single or batch as the assignment needs, and record the receipt as
62
- `implementationOwner` ([task-plan.md](task-plan.md#shape)). `retain_session` is optional
63
- protection from later cleanup, not a precondition for continuing: a completed conversation is
64
- resumed by its `runId` whether or not retention was requested, and the harness never asks for
65
- it on resume. Request it only when this caller needs the conversation protected through a long
66
- wait before cleanup, using the exact argument the launched tool advertises and never inventing
67
- one for a call that lacks it. A parked owner has no live process and reserves no slot. The
68
- coordinator still owns scheduling, plan writes, external CI, readiness and delivery;
69
- reviewers use separate conversations.
70
-
71
- `next-actions.mjs` supplies `continuation`, `workerKind`, and, for
72
- `owner-resume`, `owner`. Resume that completed attempt with
73
- `subagent_resume({id: owner.runId, prompt: <current brief>})`; record the new attempt ID
74
- without changing the conversation ID. Selection follows [continuation versus new launch](task-plan.md#worker-selection-on-resume): omit model/effort for ordinary continuation. Use only
75
- authorized, supported explicit overrides; when a required role-only fill cannot be expressed
76
- by the resume API, replace from that fill with the retained evidence instead of creating a
77
- pin from its resolved model ID. Clear `worker` when an attempt
78
- ends, but keep `implementationOwner` while review or CI is pending. Keep all counters and
79
- earlier results across attempts. `one-by-one` fixes findings sequentially in this owner.
66
+ `implementationOwner` ([task-plan.md](task-plan.md#shape)): the native `sessionId` and that
67
+ attempt's `runId`, kept as separate fields. A parked owner has no live process and reserves
68
+ no slot. The coordinator still owns scheduling, plan writes, external CI, readiness and
69
+ delivery; reviewers use separate conversations.
70
+
71
+ Continuation is a spawn into the saved session, not a resume call:
72
+ `subagent_spawn({session_id: owner.sessionId, prompt: <current brief>})` continues that exact
73
+ native session and returns a new attempt `runId` with the same `sessionId`. Record the new
74
+ `runId` as `implementationOwner.runId` and keep the `sessionId`. Never pass an attempt `runId`
75
+ as `session_id`, and never invent a session id a receipt does not hold: a first launch can show
76
+ similar-looking ids, which is not evidence they are interchangeable. Continue from a completed
77
+ attempt: a running or orphaned writer settles first. A conversation started
78
+ from another foreground session still continues: the launch origin does not restrict
79
+ continuation. `subagent_list()` covers the caller's folder and descendants across foreground
80
+ sessions; `all: true` searches globally.
81
+ In a batch, the job's own selector continues that job's session.
82
+
83
+ `next-actions.mjs` supplies `continuation`, `workerKind`, and, for `owner-resume` or
84
+ `owner-recovery`, `owner`.
85
+ Selection follows [continuation versus new launch](task-plan.md#worker-selection-on-resume):
86
+ omit model/effort for ordinary continuation. Use only authorized, supported explicit
87
+ overrides; when a required role-only fill cannot be expressed by the continuation call,
88
+ replace from that fill with the retained evidence instead of creating a pin from its resolved
89
+ model ID. `session_name` selects an existing conversation by an exact, unambiguous name
90
+ within the caller's folder and descendants; it does not name a new conversation. Fresh
91
+ launches omit both session selectors and may use an advertised fresh-launch naming control.
92
+ A workflow that records ids continues
93
+ `implementationOwner.sessionId` rather than looking a session up by name. Clear `worker` when
94
+ an attempt ends, but keep `implementationOwner` while review or CI is pending. Keep all
95
+ counters and earlier results across attempts. `one-by-one` fixes findings sequentially in this
96
+ owner.
80
97
 
81
98
  A missing history/workspace, an unusable saved owner, or an owner that cannot continue
82
99
  requires an explicit replacement reason and the retained checkpoint, failures and reproducer
83
- references in the replacement brief. Try the saved conversation first: a `retentionReleased`
84
- marker says only that optional protection lapsed, so it is not a replacement reason by itself
85
- and the conversation it names usually still resumes. Report lost continuity; never label a
86
- new conversation a resume. Existing recovery/stop rules still apply, and old plans without
87
- an owner use the fresh-worker path. Do not install or update the harness during a run merely
88
- to obtain continuation.
89
-
90
- ### Settle session retention
91
-
92
- When this unit settles (merged, cancelled, deferred or handed back merge-ready), release any
93
- retention still held for its `implementationOwner`, `reviewSession` and `retiredSessions` with
94
- `subagent_release({id: <runId>})` before its normal workspace/resource cleanup. Only a
95
- conversation launched with `retain_session` has anything to release, so a normal launch skips
96
- this and a second release is not owed. Record the acknowledgement on that reference when it
97
- was actually held; an unavailable or refused release stays explicit rather than being
98
- recorded as done.
99
-
100
- Reopening is the ordinary case: resume the saved conversation even when its protection was
101
- released, because release stops protection and leaves the history in place. Start a fresh
102
- replacement only when continuation is genuinely unavailable, and carry the original
103
- checkpoint/findings/counters into it. The same rule covers a released unfinished review,
100
+ references in the replacement brief. Report lost continuity; never label a new conversation a
101
+ resume. Existing recovery/stop rules still apply, and old plans without an owner use the
102
+ fresh-worker path. Do not install or update the harness during a run merely to obtain
103
+ continuation.
104
+
105
+ A plan written before this contract may hold `implementationOwner {runId}` and no `sessionId`.
106
+ `next-actions.mjs` prints `continuation: "owner-recovery"` for it: first match that exact
107
+ `runId` in `subagent_list({all: true})` or in the verified spawn receipt. A match that names
108
+ its session continues that session and records both ids; with no match, launch an explicit
109
+ replacement with the retained evidence and say why. A `retentionReleased` field left on an old
110
+ plan is inert history: no step reads it, reverses it, or owes a release for it.
111
+
112
+ Reopening is the ordinary case: continue the saved session; there is no release step in the way.
113
+ Start a fresh replacement only when continuation is genuinely unavailable, and carry the
114
+ original checkpoint/findings/counters into it. The same rule covers an unfinished review,
104
115
  keeping its round and existing full-review fallback.
105
116
 
106
117
  ## Brief
@@ -171,10 +182,10 @@ On `resume` (in flight, no worker, code not done), continue the unit's
171
182
  not prohibit long local tests or builds needed for the assigned validation.
172
183
 
173
184
  After 2 fix cycles without progress, or a stuck or late worker, follow
174
- [expire.md](expire.md). Apply the next response through the retained owner where its
185
+ [expire.md](expire.md). Apply the next response through the saved owner where its
175
186
  completed conversation and required launch controls permit continuation. A replacement
176
187
  uses the same workspace and the findings entry, failing command/output and `git diff <base>`;
177
- record why it replaces the owner and retain its session reference as above. Give replacement
188
+ record why it replaces the owner and keep the replaced reference as evidence. Give replacement
178
189
  workers those local facts rather than copying the old transcript. Keep all progress counters.
179
190
 
180
191
  ## Proof
@@ -11,10 +11,10 @@ restate its rules in the brief beyond the two below.
11
11
  - Start a fresh reviewer conversation after each completed review round; the existing
12
12
  scope script still chooses delta/full/skip, so freshness adds no review round or test
13
13
  campaign. Give it retained records and code evidence as claims to verify, not an
14
- implementer transcript. Launch it normally and keep its attempt reference as
15
- `reviewSession`, separate from `implementationOwner`, so an unfinished same-HEAD round
16
- can continue in that saved conversation; `retain_session` is optional protection, not
17
- what makes it continuable. A round after a completed review is a fresh conversation.
14
+ implementer transcript. Launch it normally and keep its `sessionId` and latest attempt
15
+ `runId` as `reviewSession`, separate from `implementationOwner`, so an unfinished
16
+ same-HEAD round can continue in that saved session; a round after a completed review is a
17
+ fresh conversation.
18
18
  - Reviewer model: a different id from the implementer's
19
19
  ([preflight.md](preflight.md#1-model-slots)). Launch the reviewer with the
20
20
  plan's recorded reviewer fill — its `launch`, `instructions`, `selection` and
@@ -126,23 +126,22 @@ the unfinished work rather than repeating the whole assignment; preserve complet
126
126
  valid passes. A wrong HEAD or invalid scope must be corrected, not carried as
127
127
  completed proof.
128
128
 
129
- On Pi, use `subagent_resume({id: reviewSession.runId, prompt: <unfinished work>})`
130
- when that attempt completed as a process and its saved conversation is available;
131
- update only its attempt reference, keeping this review's round, HEAD and counter.
132
- A killed/lost attempt or an unavailable continuation follows replacement below. Once the
133
- review record is complete, the next required review is a fresh conversation. Clear an
134
- unpinned `reviewSession` directly. If it holds retention, release that protection before
135
- clearing; on failure, save its exact reference and error in `retiredSessions` before clearing
136
- so settlement can retry while the fresh review proceeds. Never use a reviewer as the
137
- implementation owner.
129
+ On Pi, use `subagent_spawn({session_id: reviewSession.sessionId, prompt: <unfinished work>})`
130
+ when that attempt completed as a process and its saved session is available; it returns a new
131
+ attempt `runId` on the same session, so record that `runId` and keep the `sessionId`, preserving
132
+ this review's round, HEAD and counter. A saved record holding only `runId` needs recovery first:
133
+ match that exact attempt in `subagent_list({all: true})` or the verified spawn receipt, continue
134
+ the session it names, and replace it with retained evidence if nothing matches; never pass the
135
+ attempt id as `session_id`. A killed/lost attempt or an unavailable continuation follows
136
+ replacement below. Once the review record is complete, the next required review is a fresh
137
+ conversation. Clear `reviewSession` when the round completes; keep a replaced reviewer's
138
+ reference in `retiredSessions` as evidence, with no release operation owed. Never use a
139
+ reviewer as the implementation owner.
138
140
 
139
141
  If that reviewer cannot continue, state why replacement is necessary, which
140
- retained evidence the replacement reads, and what it redoes before launching it.
141
- A `retentionReleased` marker on the old reference is not a reason by itself: released
142
- protection leaves the saved conversation in place, so try it again before replacing it.
143
- While an old reference is still worth resuming or still needs release, keep it as an entry
144
- in `retiredSessions` ([task-plan.md](task-plan.md#shape)) rather than dropping it; a later
145
- release of the new session does not release the old conversation. The replacement reviews every pass with `tier: "full"`. Keep the round number,
142
+ retained evidence the replacement reads, and what it redoes before launching it. A
143
+ `retentionReleased` field on an old reference is inert history, not a replacement reason.
144
+ The replacement reviews every pass with `tier: "full"`. Keep the round number,
146
145
  `fixRound`, unit `attempt` and earlier round files; incompleteness neither resets
147
146
  history nor counts as progress. Launch the replacement from the same recorded
148
147
  reviewer fill, in the same structured launch arguments as [the brief](#brief)
@@ -157,7 +157,13 @@ and substitute nothing.
157
157
 
158
158
  **A blocked result ends the run.** `ok: false` — no resolver, no capabilities,
159
159
  a declined request, an unadvertised launch control, a missing native selection —
160
- means report its `code` and `reason` and start nothing. Never reuse an earlier
160
+ means report its `code` and `reason` and start nothing. An unsupported control
161
+ required by the fresh-launch fill is the same block. A missing continuation selector
162
+ alone makes the saved conversation unavailable: report the active schema and use the
163
+ [explicit evidenced replacement](implementation.md#implementation-owner) from the
164
+ authorized fresh-launch fill. It does not block other runnable units. Refreshing a stale
165
+ runtime (`/reload`) is the user's action; never fabricate a call or install/update the
166
+ harness mid-run. Never reuse an earlier
161
167
  pick, never fall back to the skill-owned catalog, and never let the reviewer share
162
168
  the implementer's model id: the catalog enforces independence, and re-picking a
163
169
  replacement here would silently break it.
@@ -92,9 +92,9 @@ Fleet `status`: `pending`, `in-flight`, `succeeded`, `failed`,
92
92
  | `attempt`, `retries`, `escalations` | Attempt number; cycle counts; escalation-model attempts |
93
93
  | `worker`, `workerSince`, `clock` | Slot identifier of any worker running for the unit (implementer, reviewer, fix), `null` when none; when that worker started (ISO time, for [stuck-worker checks](expire.md#waits)); attempt and cumulative wall time |
94
94
  | `workerKind` | `implement`, `fix`, or `review`, set with `worker`; the [live-capacity scheduler](implementation.md#live-capacity) (`next-actions.mjs`) prints `worker-kind` for any other kind or none. An infrastructure diagnosis or a test-first worker is a `fix` worker. The explorer is the `explore` fleet row's worker, never a unit's; a merge-queue watcher is not a worker |
95
- | `implementationOwner` | Optional saved implementation conversation: `{runId, sessionId?, cwd?, kind?, retentionReleased?}`. `runId` is its latest attempt; `kind` is `implement` (default) or `fix`, never `review`; `cwd`, when recorded, matches `workspace`. Save spawn/resume receipts here, independently of `worker`; a parked owner occupies no slot. The scheduler emits `owner-resume` for a usable owner or an explicit `ownerUnavailable` reason for replacement; `retentionReleased: true` only records that optional cleanup protection lapsed, so it never makes the owner unusable and the saved conversation stays the resume target while the harness holds it. Old plans remain readable. See [ownership](implementation.md#implementation-owner). |
96
- | `reviewSession` | Optional `{runId, sessionId?, head, round, retentionReleased?}` for the current unfinished review. Keep it only for same-HEAD/same-scope continuation, and clear it when that round completes so the next completed-review round starts fresh. A `retentionReleased` marker is history, not a reason to replace: try the same round's saved conversation while it exists. It is never an implementation owner or a slot reservation. |
97
- | `retiredSessions` | Optional references kept beside a replaced implementation owner or unfinished reviewer: `{runId, sessionId?, kind, retentionReleased?, reason?}`. Only for a conversation still worth resuming or still holding protection that must be released later; an ordinary resume or replacement needs no entry here, and a later release of the new session does not release an older conversation. |
95
+ | `implementationOwner` | Saved implementation conversation: `{sessionId, runId?, cwd?, kind?}`. `sessionId` is the native session to continue and is what `subagent_spawn({session_id})` takes; `runId` is that session's latest attempt, never a `session_id`. `kind` is `implement` (default) or `fix`, never `review`; `cwd`, when recorded, matches `workspace`. Save the spawn receipt here, independently of `worker`; a parked owner occupies no slot. The scheduler emits `owner-resume` for a usable owner, `owner-recovery` for a legacy record that holds only an attempt id, or an explicit `ownerUnavailable` reason for replacement. `retentionReleased` on an old plan is inert history: nothing reads or releases it. Old plans remain readable. See [ownership](implementation.md#implementation-owner). |
96
+ | `reviewSession` | Optional `{sessionId, runId?, head, round}` for the current unfinished review: the same session/attempt split, continued only for the same HEAD and scope. Clear it when that round completes, so the next completed-review round starts fresh. It is never an implementation owner or a slot reservation. |
97
+ | `retiredSessions` | Optional references kept beside a replaced implementation owner or unfinished reviewer: `{sessionId?, runId?, kind, reason?}`. Only as evidence for the replacement brief and for the record; no release operation is owed. |
98
98
  | `estimatedLines` | Preflight assessment estimate |
99
99
  | `sizeCheck` | Measures, `verdict` (the size check's per-unit verdict; `stop` means held), scope and proof verdicts, split or verification path; `runWhole: true` once a recommendation to run a held unit whole is accepted |
100
100
  | `note` | SHA, expiry reason code, failure and response, or blocker; for active debugging, the immediate acceptance checkpoint, baseline/result link and next distinguishing test ([delivery progress](../SKILL.md#delivery-progress)) |
@@ -160,13 +160,21 @@ recommendation's reason; its human's words are the invocation.
160
160
  ### Worker selection on resume
161
161
 
162
162
  Distinguish resuming the workflow from continuing one saved conversation. For an ordinary
163
- same-conversation `subagent_resume`, pass its attempt ID and new feedback, omitting role,
164
- model and effort so the harness preserves its recorded recipe. The resume tool's schema
165
- may differ from spawn: do not replay a role selector it cannot accept. A required changed
166
- selection can continue only through controls both explicitly authorized and advertised by
167
- that API; otherwise record why replacement is needed and launch fresh from the required
168
- fill with its retained evidence. A resolved role default alone never authorizes a model pin.
169
- Keep the original model/effort as run evidence and preserve all review/progress counters.
163
+ same-conversation continuation call `subagent_spawn({session_id: <saved sessionId>, prompt:
164
+ <new feedback>})`: it continues that exact native session and returns a new attempt id, so omit
165
+ role, model and effort and let the harness preserve its recorded recipe. An attempt `runId` is
166
+ never a `session_id`, and no session id is invented for a record that lacks one. A batch carries
167
+ its selector per job: each job in `subagent_spawn_batch({shared, jobs})` names its own session;
168
+ the shared part does not. There is no public resume, release or retain-session call in this
169
+ contract, so never invoke one. If only the continuation selector is missing, report the
170
+ actual schema and lost continuity, then use the explicit evidenced replacement from the
171
+ authorized fresh-launch fill. If that fresh fill requires an unsupported control, the
172
+ catalog's blocked-result rule applies. `/reload` is the user's action; never install or
173
+ update the harness mid-run to gain a capability. A required changed selection can continue only through controls both explicitly
174
+ authorized and advertised by that call; otherwise record why replacement is needed and launch
175
+ fresh from the required fill with its retained evidence. A resolved role default alone never
176
+ authorizes a model pin. Keep the original model/effort as run evidence and preserve all
177
+ review/progress counters.
170
178
 
171
179
  **A fresh or replacement launch repeats the saved fill, never a reconstruction of it.** On Pi the
172
180
  launch authority stays the live role resolver ([shared-modules.md](shared-modules.md#model-slots)):
@@ -75,27 +75,29 @@
75
75
  // fetch failed, it prints `sync` instead. A run never finishes on a tree it
76
76
  // could not read
77
77
  //
78
- // A unit's optional `implementationOwner` is the retained implement-or-fix conversation that outlives
79
- // the worker slot, recorded from the harness as { runId, sessionId?, cwd?, kind }: `runId` is the
80
- // attempt to resume, `kind` ("implement" or "fix", default "implement") says which worker owned it,
81
- // and `sessionId` and `cwd` (the unit's workspace) identify that conversation and its tree. It is
82
- // independent of `worker`, which records whichever worker is active now, so the owner survives the
83
- // review phase and a later fix continues the same conversation instead of starting over.
78
+ // A unit's optional `implementationOwner` is the implement-or-fix conversation that outlives the
79
+ // worker slot, recorded from the harness as { sessionId, runId?, cwd?, kind }: `sessionId` is the
80
+ // native conversation to continue, `runId` is its latest attempt, `kind` ("implement" or "fix",
81
+ // default "implement") says which worker owned it, and `cwd` (the unit's workspace) is its tree. It
82
+ // is independent of `worker`, which records whichever worker is active now, so the owner survives
83
+ // the review phase and a later fix continues the same session instead of starting over.
84
84
  //
85
85
  // Every action that spawns a worker therefore carries the structured continuation the coordinator
86
- // launches, beside its name: `continuation: "fresh"` for a first start or a new worker, launched
87
- // normally, with no retention argument (a saved conversation stays continuable by its id;
88
- // `retain_session: true` is optional protection a caller adds only for a long wait before cleanup).
89
- // Implement and fix sessions become the unit's owner; `continuation: "owner-resume"` with
90
- // `owner: { runId, kind, sessionId?, cwd? }` for a fix, a restack, or an unfinished implementation
91
- // whose owner is still usable (subagent_resume({ id: owner.runId, ... }) returns a new attempt on
92
- // the same conversation). `workerKind` names the slot the action launches. A review round is
93
- // always a fresh reviewer: a finished review
94
- // is never resumed, and a review recorded as an owner is not usable. An owner without a `runId`,
95
- // with a `kind` outside implement and fix, or whose `cwd` is not the unit's workspace is not usable,
96
- // so a fresh action reports ownerUnavailable rather than claiming continuity. A `retentionReleased`
97
- // marker records that optional protection lapsed, so it never makes an owner unusable. A completed
98
- // worker holds no slot: the owner is a reference, never an occupancy.
86
+ // launches, beside its name. `continuation: "fresh"` is a first start or a new worker, launched
87
+ // normally with no session argument. Implement and fix sessions become the unit's owner;
88
+ // `continuation: "owner-resume"` with `owner: { sessionId, runId?, kind, cwd? }` for a fix, a
89
+ // restack, or an unfinished implementation continues that exact session with
90
+ // subagent_spawn({ session_id: owner.sessionId, prompt }), which returns a new attempt id and keeps
91
+ // the session. An attempt `runId` is never passed as `session_id`. A plan written before that
92
+ // contract may hold only `runId`; it prints `continuation: "owner-recovery"` so the coordinator
93
+ // matches that exact attempt in subagent_list({ all: true }) or a verified receipt, and otherwise
94
+ // replaces it with the retained evidence. `workerKind` names the slot the action launches. A review
95
+ // round is always a fresh reviewer: a finished review is never resumed, and a review recorded as
96
+ // an owner is not usable. An owner with neither a `sessionId` nor a `runId`, with a `kind` outside
97
+ // implement and fix, or whose `cwd` is not the unit's workspace is not usable, so a fresh action
98
+ // reports ownerUnavailable rather than claiming continuity. A `retentionReleased` field on an old
99
+ // plan is inert history: no action reads or reverses it. A completed worker holds no slot: the
100
+ // owner is a reference, never an occupancy.
99
101
  //
100
102
  // Text output ends with one short line pointing to the skill path. With --resume or --rules it
101
103
  // ends with RULES instead, the rules a compaction summary most often drops (in narrow and off
@@ -205,23 +207,27 @@ export function normalizeCapacity(input) {
205
207
  const hasWorker = (u) => u.worker !== undefined && u.worker !== null && u.worker !== ''
206
208
  const codeDone = (u) => u.stage === 'done'
207
209
 
208
- // A unit's usable implementation owner, normalized to { runId, kind, sessionId?, cwd? }, or null.
209
- // Usable means it names the attempt to resume (`runId`), its `kind` is an implement or fix worker
210
- // (never a reviewer: a finished review is never resumed for the next round), and, when both are
211
- // recorded, its `cwd` is the unit's workspace (a conversation cannot be resumed in another tree).
212
- // A plan that records nothing here keeps today's behavior: a fresh worker.
210
+ // A unit's saved implementation owner, normalized to { runId?, kind, sessionId?, cwd? }, or null.
211
+ // `sessionId` is the native conversation to continue and `runId` its latest attempt; an owner with
212
+ // a session (and optionally its attempt) is usable, while a legacy owner with only an attempt is
213
+ // recoverable, not usable: the coordinator matches that exact attempt to its session first. Its
214
+ // `kind` must be an implement or fix worker (never a reviewer: a finished review is never resumed
215
+ // for the next round), and, when both are recorded, its `cwd` is the unit's workspace (a
216
+ // conversation cannot be continued in another tree). A plan that records nothing here keeps
217
+ // today's behavior: a fresh worker.
213
218
  export function implementationOwnerOf(unit) {
214
219
  const saved = unit?.implementationOwner
215
220
  if (!saved || typeof saved !== 'object' || Array.isArray(saved)) return null
216
221
  if (saved.cwd !== undefined && saved.cwd !== null && typeof saved.cwd !== 'string') return null
217
222
  const runId = typeof saved.runId === 'string' ? saved.runId.trim() : ''
218
223
  const kind = saved.kind === undefined ? 'implement' : saved.kind
219
- if (!runId || !IMPLEMENTATION_OWNER_KINDS.includes(kind)) return null
224
+ if (!IMPLEMENTATION_OWNER_KINDS.includes(kind)) return null
225
+ const sessionId = typeof saved.sessionId === 'string' ? saved.sessionId.trim() : ''
226
+ if (!runId && !sessionId) return null
220
227
  const cwd = typeof saved.cwd === 'string' ? saved.cwd.trim() : ''
221
228
  const workspace = typeof unit.workspace === 'string' ? unit.workspace.trim() : ''
222
229
  if (cwd && workspace && cwd !== workspace) return null
223
- const sessionId = typeof saved.sessionId === 'string' ? saved.sessionId.trim() : ''
224
- return { runId, kind, ...(sessionId ? { sessionId } : {}), ...(cwd ? { cwd } : {}) }
230
+ return { ...(runId ? { runId } : {}), kind, ...(sessionId ? { sessionId } : {}), ...(cwd ? { cwd } : {}) }
225
231
  }
226
232
 
227
233
  export function workspaceCleanupSettled(unit) {
@@ -390,14 +396,17 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
390
396
  // A new review round starts fresh even when the preceding session remains available.
391
397
  const continuationFor = (u, workerKind) => {
392
398
  const owner = workerKind === 'review' ? null : implementationOwnerOf(u)
393
- if (owner) return { continuation: 'owner-resume', workerKind, owner }
399
+ if (owner?.sessionId) return { continuation: 'owner-resume', workerKind, owner }
400
+ if (owner) return { continuation: 'owner-recovery', workerKind, owner }
394
401
  const ownerUnavailable = workerKind !== 'review' && u.implementationOwner != null
395
402
  ? 'Saved implementationOwner is malformed, names another role, or does not match the unit workspace; record replacement and retain its evidence.' : undefined
396
403
  return { continuation: 'fresh', workerKind, ...(ownerUnavailable ? { ownerUnavailable } : {}) }
397
404
  }
398
405
  // Appended to an owner-resumed action: the work is the same, so the action keeps its name; only
399
- // the launch changes, and it is a resume rather than a second worker for the unit.
400
- const ownerNote = (id, owner) => `; launch it as a resume of unit ${id}'s implementation owner: subagent_resume({ id: ${JSON.stringify(owner.runId)}, prompt: <that brief or task> }) returns a new attempt on the same conversation${owner.sessionId ? ` (session ${owner.sessionId})` : ''}${owner.cwd ? ` in ${owner.cwd}` : ''}; record the returned id as implementationOwner.runId and keep the owner through review`
406
+ // the launch changes, and it continues one saved session rather than starting a second one.
407
+ const ownerNote = (id, owner) => `; launch it as a continuation of unit ${id}'s implementation owner: subagent_spawn({ session_id: ${JSON.stringify(owner.sessionId)}, prompt: <that brief or task> }) continues that exact session and returns a new attempt id${owner.cwd ? ` in ${owner.cwd}` : ''}; record the returned id as implementationOwner.runId, confirm the receipt's session id is still that conversation, and keep sessionId ${JSON.stringify(owner.sessionId)} (an attempt id is never a session_id), keeping the owner through review`
408
+ // Appended when a legacy owner saved only its attempt: recover its session before replacing it.
409
+ const recoveryNote = (id, owner) => `; before replacing unit ${id}'s implementation owner, match its recorded attempt id ${JSON.stringify(owner.runId)} exactly in subagent_list({ all: true }) (the default list covers only this folder) or in the verified spawn receipt; a match that names its session continues with subagent_spawn({ session_id: <that session id>, prompt: <that brief or task> }) and records the returned run id and that sessionId; with no match, launch a fresh replacement from the saved fill with the retained evidence and say why continuity was lost. Never pass ${JSON.stringify(owner.runId)} as session_id`
401
410
  const managed = (u) => plan.workspaceLifecycle === 1 || u.lifecycle?.version === 1
402
411
  for (const u of units) {
403
412
  if (TERMINAL.has(u.status) && hasWorker(u) && (u.status !== 'blocked' || reasonOk(u))) {
@@ -406,7 +415,7 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
406
415
  }
407
416
  if (!managed(u) || u.status !== 'succeeded' || !u.workspace) continue
408
417
  if (!hasWorker(u) && !workspaceCleanupSettled(u)) {
409
- add('cleanup-workspace', u, `unit ${u.id} landed: release any retain_session protection it still holds and record that acknowledgement (implementation.md#settle-session-retention), then record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
418
+ add('cleanup-workspace', u, `unit ${u.id} landed: record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
410
419
  }
411
420
  }
412
421
  const chainReady = []
@@ -704,7 +713,8 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
704
713
  if (!workerKind) continue
705
714
  const continuation = continuationFor(byId.get(a.unit), workerKind)
706
715
  Object.assign(a, continuation)
707
- if (continuation.owner) a.detail += ownerNote(a.unit, continuation.owner)
716
+ if (continuation.continuation === 'owner-resume') a.detail += ownerNote(a.unit, continuation.owner)
717
+ if (continuation.continuation === 'owner-recovery') a.detail += recoveryNote(a.unit, continuation.owner)
708
718
  if (continuation.ownerUnavailable) a.detail += `; ${continuation.ownerUnavailable}`
709
719
  }
710
720
  const busy = units.filter(hasWorker).length
@@ -4,7 +4,7 @@ description: "Slash/explicit-only (/resolve-release). Full GitHub Flow release f
4
4
  disable-model-invocation: true
5
5
  metadata:
6
6
  workflow-role: coordinator
7
- release-version: 0.50.1
7
+ release-version: 0.50.3
8
8
  ---
9
9
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
10
10
  # Resolve release
@@ -208,10 +208,18 @@ Success is stdout equal to `<nextVersion>`. An `E404` means "not published
208
208
  yet" and the watcher continues. Any other npm error is inconclusive — stop
209
209
  rather than treating it as unpublished or published.
210
210
 
211
- When a GitHub Actions workflow is the npm publisher, `gh run list` /
212
- `gh run watch` for the tag SHA is the wait; `npm view` remains the proof the
213
- artifact exists. A release flow's `registry` is passed as `--registry` to every
214
- npm command, and its `after-publish` steps run once the artifact is proven.
211
+ When a GitHub Actions workflow is the npm publisher, the run is not the wait and a green run is
212
+ not a publish: `npm view` remains the only proof the artifact exists. If you need the run for
213
+ diagnosis, find it once by commit (`gh run list --commit <mergedSha> --limit 5 --json
214
+ databaseId,headSha,status,conclusion`, and refuse a run whose `headSha` is not `<mergedSha>`),
215
+ then read it with bounded `gh run view <id> --json status,conclusion,jobs` polls and treat a
216
+ **job or step transition** as the signal. `gh run watch` repaints a status line and an elapsed
217
+ clock every 30 seconds, so a step that stopped moving looks exactly like one that is working and
218
+ the step names scroll out of view; a log that grows on every tick is not evidence a publish is
219
+ progressing. Report the slow or stuck step by name, with its URL. (The `github-actions` skill's
220
+ `scripts/watch-run.mjs` does this polling when that skill is installed.) A release flow's
221
+ `registry` is passed as `--registry` to every npm command, and its `after-publish` steps run once
222
+ the artifact is proven.
215
223
 
216
224
  ## Release flow steps
217
225
 
@@ -84,10 +84,12 @@ Before each dispatch, check that the workflow's `main` ref still resolves to
84
84
  the verified merged SHA and that the version is not already published with a
85
85
  different provenance. Dispatch the discovered workflow with its documented
86
86
  package input. Record the returned run ID; verify that run's head SHA and input
87
- identify the approved merge and package. Watch the run in the background, then
88
- independently verify the exact version in the public registry, its attestation
89
- resolves to the merged SHA, and its package-scoped tag peels to that SHA. The
90
- workflow, not the agent, creates package tags/releases. A successful workflow
87
+ identify the approved merge and package. Watch the run's job/step transitions in
88
+ the background (bounded `gh run view --json status,conclusion,jobs` reads: a step
89
+ transition is the signal, a repainted status line is not), then independently
90
+ verify the exact version in the public registry, its attestation resolves to the
91
+ merged SHA, and its package-scoped tag peels to that SHA. The workflow, not the
92
+ agent, creates package tags/releases. A successful workflow
91
93
  without registry/provenance/tag proof is not a completed publish. Only then
92
94
  dispatch a dependent bundle. If a dispatch fails or an already-published
93
95
  version has different provenance, stop; do not overwrite a version or tag.
@@ -6,7 +6,7 @@ metadata:
6
6
  workflow-role: coordinator
7
7
  dependencies:
8
8
  - resolve-issues
9
- release-version: 0.50.1
9
+ release-version: 0.50.3
10
10
  ---
11
11
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
12
12
  # Rush issues (shortcut of resolve-issues)
@@ -6,7 +6,7 @@ metadata:
6
6
  workflow-role: coordinator
7
7
  dependencies:
8
8
  - resolve-release
9
- release-version: 0.50.1
9
+ release-version: 0.50.3
10
10
  ---
11
11
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
12
12
  # Rush release (shortcut of resolve-release)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: test-quality
3
3
  description: "Seven principles for tests that catch real bugs, and an audit that reports weak, redundant, and not-coverage tests without fixing them. Use when writing, changing, or reviewing tests, or when asked whether tests are useful, redundant, over-mocked, flaky, only assert static text, or test config files, or asked to make a slow test suite faster without losing coverage, or when the user asks to write the testing conventions into a repo's CONTRIBUTING.md. NOT defining what a spec must prove (ensure-coverage) or authoring browser tests (e2e-test)."
4
- release-version: 0.50.1
4
+ release-version: 0.50.3
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Test Quality