@1aboveio/skills 1.0.14 → 1.0.16

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.
Files changed (105) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/.codex-plugin/resources.json +164 -160
  3. package/package.json +4 -4
  4. package/skills/app-dev/airflow/SKILL.md +1 -1
  5. package/skills/app-dev/android-development/SKILL.md +30 -2
  6. package/skills/app-dev/android-development/references/diagnosis.md +55 -0
  7. package/skills/app-dev/android-development/references/feature-work.md +15 -0
  8. package/skills/app-dev/android-development/references/init.md +57 -6
  9. package/skills/app-dev/android-development/references/setup.md +8 -2
  10. package/skills/app-dev/android-development/references/ui-journeys.md +58 -0
  11. package/skills/app-dev/android-development/scripts/device-run.sh +93 -2
  12. package/skills/app-dev/android-development/scripts/failure_capture.py +331 -0
  13. package/skills/app-dev/android-development/scripts/init.mjs +234 -17
  14. package/skills/app-dev/android-development/scripts/maestro_failure.py +401 -0
  15. package/skills/app-dev/android-development/scripts/test_failure_capture.py +378 -0
  16. package/skills/app-dev/android-development/scripts/test_maestro_failure.py +462 -0
  17. package/skills/app-dev/app-debug/SKILL.md +1 -1
  18. package/skills/app-dev/better-auth/SKILL.md +1 -1
  19. package/skills/app-dev/data-catalog/SKILL.md +53 -16
  20. package/skills/app-dev/data-catalog/scripts/persist-conventions-core.mjs +231 -21
  21. package/skills/app-dev/data-catalog/scripts/persist-conventions.mjs +12 -1
  22. package/skills/app-dev/data-quality/SKILL.md +1 -1
  23. package/skills/app-dev/ios-foundation/SKILL.md +1 -1
  24. package/skills/app-dev/monorepo/SKILL.md +1 -1
  25. package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
  26. package/skills/app-dev/prisma-setup/SKILL.md +1 -1
  27. package/skills/app-dev/pyspark/SKILL.md +1 -1
  28. package/skills/app-dev/python-backend/SKILL.md +1 -1
  29. package/skills/app-dev/shadcn/SKILL.md +1 -1
  30. package/skills/app-dev/zod-v4/SKILL.md +1 -1
  31. package/skills/cicd/cloud-build/SKILL.md +1 -1
  32. package/skills/cicd/cloud-debug/SKILL.md +1 -1
  33. package/skills/cicd/cloud-deploy/SKILL.md +1 -1
  34. package/skills/cicd/docker/SKILL.md +1 -1
  35. package/skills/cicd/github-actions/SKILL.md +1 -1
  36. package/skills/cicd/github-flow/SKILL.md +10 -1
  37. package/skills/cicd/github-flow/scripts/persist-conventions-core.mjs +231 -21
  38. package/skills/cicd/github-flow/scripts/persist-conventions.mjs +18 -1
  39. package/skills/cicd/google-cloud/SKILL.md +1 -1
  40. package/skills/cicd/mergify/SKILL.md +1 -1
  41. package/skills/cicd/podman/SKILL.md +1 -1
  42. package/skills/content/article-review/SKILL.md +1 -1
  43. package/skills/content/article-to-image/SKILL.md +1 -1
  44. package/skills/content/flowchart-svg/SKILL.md +1 -1
  45. package/skills/content/image-gen/SKILL.md +1 -1
  46. package/skills/content/mermaid/SKILL.md +1 -1
  47. package/skills/content/wechat-article-writer/SKILL.md +1 -1
  48. package/skills/content/wechat-publisher/SKILL.md +1 -1
  49. package/skills/content/wechat-search/SKILL.md +1 -1
  50. package/skills/content/xai-search/SKILL.md +1 -1
  51. package/skills/core/distill-writing/SKILL.md +7 -1
  52. package/skills/core/doc-to-md/SKILL.md +1 -1
  53. package/skills/core/editorial-review/SKILL.md +1 -1
  54. package/skills/core/house-style/SKILL.md +1 -1
  55. package/skills/core/house-style/references/persistence.md +8 -3
  56. package/skills/core/house-style/scripts/init-guidance.mjs +1 -1
  57. package/skills/core/plain-language/SKILL.md +1 -1
  58. package/skills/core/polish-cn/SKILL.md +1 -1
  59. package/skills/core/reg-parser/SKILL.md +1 -1
  60. package/skills/core/terminology/SKILL.md +1 -1
  61. package/skills/core/terminology/references/init.md +11 -0
  62. package/skills/core/write-doc/SKILL.md +1 -1
  63. package/skills/core/write-report/SKILL.md +1 -1
  64. package/skills/engineering/better-review/SKILL.md +1 -1
  65. package/skills/engineering/e2e-test/SKILL.md +1 -1
  66. package/skills/engineering/engineering/SKILL.md +19 -4
  67. package/skills/engineering/engineering/references/init-scope.md +5 -2
  68. package/skills/engineering/engineering/references/scope-management.md +4 -2
  69. package/skills/engineering/engineering/scripts/init.mjs +34 -9
  70. package/skills/engineering/engineering/scripts/persist-conventions-core.mjs +231 -21
  71. package/skills/engineering/engineering/scripts/persist-conventions.mjs +48 -21
  72. package/skills/engineering/engineering-runtime/SKILL.md +1 -1
  73. package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
  74. package/skills/engineering/ensure-coverage/SKILL.md +1 -1
  75. package/skills/engineering/golden-path/SKILL.md +1 -1
  76. package/skills/engineering/harness-runtime/SKILL.md +4 -3
  77. package/skills/engineering/harness-runtime/agent-catalog.mjs +928 -0
  78. package/skills/engineering/harness-runtime/contracts.md +2 -0
  79. package/skills/engineering/harness-runtime/references/model-catalog.md +7 -1
  80. package/skills/engineering/resolve-issues/SKILL.md +9 -6
  81. package/skills/engineering/resolve-issues/references/delivery-progress.md +2 -0
  82. package/skills/engineering/resolve-issues/references/expire.md +6 -3
  83. package/skills/engineering/resolve-issues/references/implementation.md +6 -1
  84. package/skills/engineering/resolve-issues/references/preflight.md +26 -17
  85. package/skills/engineering/resolve-issues/references/review.md +39 -4
  86. package/skills/engineering/resolve-issues/references/shared-modules.md +88 -20
  87. package/skills/engineering/resolve-issues/references/task-plan.md +35 -1
  88. package/skills/engineering/resolve-issues/scripts/preflight-models.mjs +382 -592
  89. package/skills/engineering/resolve-release/SKILL.md +1 -1
  90. package/skills/engineering/rush-issues/SKILL.md +4 -4
  91. package/skills/engineering/rush-release/SKILL.md +1 -1
  92. package/skills/engineering/test-quality/SKILL.md +3 -1
  93. package/skills/engineering/test-quality/scripts/persist-conventions-core.mjs +231 -21
  94. package/skills/engineering/test-quality/scripts/persist-conventions.mjs +13 -1
  95. package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
  96. package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
  97. package/skills/risk-compliance/contract-review/SKILL.md +1 -1
  98. package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
  99. package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
  100. package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
  101. package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
  102. package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
  103. package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
  104. package/skills/engineering/resolve-issues/scripts/discover-models.mjs +0 -9
  105. package/skills/engineering/resolve-issues/scripts/model-catalog.mjs +0 -9
@@ -13,3 +13,5 @@ Shell code cannot invoke a native question tool inside the agent's current turn.
13
13
  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.
14
14
 
15
15
  Model discovery and catalog persistence remain separate from question planning. Current-turn tool availability is never inferred from model or harness configuration. Source-tree imports outside `skills/engineering` are unsupported until an installation-aware adapter entrypoint exists; consumers must not copy the runtime to work around that boundary.
16
+
17
+ `agent-catalog.mjs` is the consumer bridge to the harness-owned agent catalog: one versioned JSON request on stdin (`version`, `harness`, `cwd`, `available`, `foregroundModel`, `fallbackToForeground`, `launchCapabilities`, `hostPreferences`, `overrides`, `tiers`, …) and one JSON response on stdout with four worker slots. It resolves the resolver command from `PI_AGENT_CATALOG_COMMAND` (a JSON argv array, or one bare executable token) or defaults to `pi-agent-catalog` on PATH, runs it with no shell, bounds its output and runtime, and validates the response. Those host fields are validated and forwarded unchanged — nothing is inferred or completed here, so an unstated launch control or tier stays unstated. A missing, broken, or declining resolver is a reported block; the bridge never falls back to a skill-owned model ladder and never installs anything. `discover-models.mjs` and `model-catalog.mjs` remain for consumers that still import them and are no longer part of model-slot selection.
@@ -1,6 +1,12 @@
1
1
  # Model catalog (skill-owned baseline, per-harness overrides)
2
2
 
3
- resolve-issues preflight must classify every discovered model (family · tier) before it can recommend a pick for each slot. The installed `harness-runtime` package provides the shared catalog baseline at `references/model-catalog-seed.json`; the per-harness JSON files below hold only **explicit, human-confirmed overrides**. A skill install or update replaces the shipped baseline, so its newer classifications apply on the next pre-flight wherever no local override exists. It never copies that baseline into a user file or silently changes an override. Training-data knowledge is not a discovery source, and neither is this file's *absence* of a model: only discovered or explicitly human-named models are eligible ([resolve-issues shared modules](../../resolve-issues/references/shared-modules.md)).
3
+ > **Legacy compatibility surface.** Model-slot selection now belongs to the harness agent catalog,
4
+ > reached through [`agent-catalog.mjs`](../agent-catalog.mjs); `resolve-issues` names roles and reads
5
+ > that bridge instead of classifying models. This document and `model-catalog.mjs` stay for other
6
+ > consumers that still import them, and for the shipped baseline data. Do not use this doctrine to
7
+ > re-derive a model ladder for a workflow.
8
+
9
+ The legacy resolve-issues preflight classified every discovered model (family · tier) before it could propose a pick for each slot. The installed `harness-runtime` package provides the shared catalog baseline at `references/model-catalog-seed.json`; the per-harness JSON files below hold only **explicit, human-confirmed overrides**. A skill install or update replaces the shipped baseline, so its newer classifications apply on the next pre-flight wherever no local override exists. It never copies that baseline into a user file or silently changes an override. Training-data knowledge is not a discovery source, and neither is this file's *absence* of a model: only discovered or explicitly human-named models are eligible ([resolve-issues shared modules](../../resolve-issues/references/shared-modules.md)).
4
10
 
5
11
  **Read and write through [`model-catalog.mjs`](../model-catalog.mjs)** rather than hand-editing the JSON — it single-sources the prune predicate and the write paths. Run `model-catalog.mjs help`; the script is the source of truth for the precedence composition, the write-guards, and the shapes. At pre-flight step 2 **prefer `tiers --seen <ids>`**: it composes all three evidence arms (banked → cross-harness → team seed) with the precedence applied *inside* the command. A precedence or filtering rule stated only in prose is applied by an agent mid-gate from memory, and the failure is silent — exactly how rules 5 and 7 went wrong before 2026-07-20.
6
12
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: resolve-issues
3
- description: "Slash/explicit-only (/resolve-issues). Drive an issue, epic, or feature spec to reviewed, green PRs, one per issue, merged or handed back merge-ready: preflight, task map, exploration and a per-issue slice check, isolated implementers within live host capacity, then per issue its PR, independent better-review, CI, and queue/merge (or merge-ready hand-back) as soon as it is done. Asks once, at the end of preflight (implementer, target branch, merge mode, scheduler mode, plan), then never blocks on the human; small non-blocking problems collect in a dropbox, posted at the end as grouped ready-for-agent issues. /rush-issues is its no-questions shortcut. Do not auto-select. Use for whole-spec delivery, including high-risk work; risk changes model and validation depth, never the workflow. NOT for release work (resolve-release)."
3
+ description: "Slash/explicit-only (/resolve-issues). Drive an issue, epic, or feature spec to reviewed, green PRs, one per issue, merged or handed back merge-ready: preflight, task map, exploration and a per-issue slice check, isolated implementers within live host capacity, then per issue its PR, independent better-review, CI, and queue/merge (or merge-ready hand-back) as soon as it is done. Asks once, at the end of preflight (target branch, merge mode, scheduler mode, plan) and resolves the worker roles' models as run metadata instead of asking, then never blocks on the human; small non-blocking problems collect in a dropbox, posted at the end as grouped ready-for-agent issues. /rush-issues is its no-questions shortcut. Do not auto-select. Use for whole-spec delivery, including high-risk work; risk changes model and validation depth, never the workflow. NOT for release work (resolve-release)."
4
4
  disable-model-invocation: true
5
5
  metadata:
6
6
  workflow-role: coordinator
@@ -8,7 +8,7 @@ dependencies:
8
8
  - better-review
9
9
  - golden-path
10
10
  - harness-runtime
11
- release-version: 0.46.0
11
+ release-version: 0.48.0
12
12
  ---
13
13
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
14
14
  # Resolve issues
@@ -55,7 +55,7 @@ after 2 fix rounds without a new low of open P0/P1 path rows; no fixed round cap
55
55
  ```text
56
56
  preflight: ready label -> model fills -> plan draft
57
57
  -> exploration -> size check (only scope or an open question holds a unit, with a split)
58
- -> one approval (implementer, target branch, merge mode, scheduler mode, plan)
58
+ -> one approval (target branch, merge mode, scheduler mode, plan)
59
59
  -> schedule runnable units within live host capacity:
60
60
  prepare a unit's workspace when its first worker is admitted (never all units up front)
61
61
  -> implement -> first coherent commit: draft PR (CI starts) once parents' PRs are open
@@ -102,7 +102,9 @@ Read each procedure right before its stage; never substitute your own.
102
102
  started (`pending`), never `blocked`; what stays blocked ends deferred on its owning issue, never done.
103
103
  - **Your role.** Coordinate first ([principle 7](references/principles.md)); between notices you may do bounded work
104
104
  yourself: reproduce a failing browser or emulator journey, investigate an infrastructure failure, run a short
105
- check. Leave code changes to workers so your attention stays on scheduling, and record each worker as the
105
+ check. When a journey or case you run fails, copy its `NATIVE_FAILURE` line (or the failing step, error and
106
+ evidence path) into the unit's plan row; an exit code alone is not a failure record.
107
+ Leave code changes to workers so your attention stays on scheduling, and record each worker as the
106
108
  unit's `workerKind` (`implement`, `fix`, `review`). Exploration continues the run's one explorer. After a context compaction, read this file in
107
109
  full again before your next step: the summary keeps the run's state, not these rules. Fill
108
110
  free slots before starting your own work, stay within [expire.md](references/expire.md)'s limit, and send
@@ -143,7 +145,8 @@ Follow [preflight.md](references/preflight.md):
143
145
  0. **Ready label:** resume the spec's run if one exists; run `ready-check.mjs`;
144
146
  stop on an `unreadable` outcome; ask at step 6 on `unlabeled` or a `missing` compaction
145
147
  hook (`install-hooks.mjs --check`; shortcut: warn).
146
- 1. **Model slots:** record the fast-path fills without asking.
148
+ 1. **Model slots:** record the fast-path fills without asking; the models and
149
+ efforts are run metadata, never a question.
147
150
  2. **Provisional target:** the default branch.
148
151
  3. **Plan draft:** one unit per issue, links, delivery mode; show the board.
149
152
  4. **Exploration:** have one explorer record each unit's `slice` and,
@@ -152,7 +155,7 @@ Follow [preflight.md](references/preflight.md):
152
155
  ([exploration.md](references/exploration.md#reuse-first)).
153
156
  5. **Size check:** run `size-check.mjs` (exit 0; read `verdict`). On `hold` or `stop`, hold the listed
154
157
  units (their dependents wait, not started) and draft their splits (yours when none is drafted); on `exploration-unfinished`, continue the explorer.
155
- 6. **Approval:** ask once for implementer, target, merge mode, scheduler mode, and plan;
158
+ 6. **Approval:** ask once for target, merge mode, scheduler mode, and plan;
156
159
  record the answers; plan each unit's branch, workspace, base, and lifecycle
157
160
  intent, and prepare a workspace only when its first worker is admitted
158
161
  ([workspaces.md](references/workspaces.md#prepare-at-admission-once)).
@@ -49,6 +49,8 @@ issue or automatic scheduler gate. They do not waive required validation.
49
49
  - the [immediate acceptance checkpoint](#delivery-progress), existing baseline (or none),
50
50
  and, for a continuation, the last result, remaining uncertainty and next distinguishing
51
51
  test; retain the same checkpoint/history when changing workers
52
+ - for a fix after a failed check or case, the last `failure` block (case, step, error,
53
+ evidence path) verbatim, so the worker starts from the cause
52
54
  - a concise worker-specific contract: business outcome and context, full acceptance,
53
55
  security and quality requirements, and principles relevant to the assigned work; a
54
56
  reviewer gets review.md's two rules instead. Do not forward coordinator scheduling
@@ -220,9 +220,12 @@ secret the repository lacks is item 5: hand it back.
220
220
  Spawn no separate diagnosis worker for a known failure kind, and write no
221
221
  diagnosis document; an unknown infrastructure failure gets one fix worker
222
222
  ([Infrastructure failures](#infrastructure-failures)). The failure kind
223
- is already known from the reason code, the failing check, or
224
- `review-verdict.mjs`; take its response, keep the branch, workspace, and
225
- logs, and record one line, with the reason code, in the unit's plan row.
223
+ is already known from the reason code, the failing check, the result's
224
+ `failure` block, or `review-verdict.mjs`; take its response, keep the branch,
225
+ workspace, and logs, and record one line, with the reason code, in the unit's
226
+ plan row. A failed case whose `failure` names the step and error goes straight
227
+ to a fix worker with that block. Assign investigation only when the record is
228
+ missing, or names a step without a reason.
226
229
 
227
230
  | Failure | Response |
228
231
  |---|---|
@@ -101,7 +101,12 @@ implementer in its kept workspace with the brief and its findings entry.
101
101
  line, kind, one-line summary, whether it needs a human decision), and
102
102
  `decisionNeeded`: `null`, or the choice that stops the unit (question,
103
103
  options, recommendation; options are ways to proceed, and staying
104
- blocked is never one). Fix workers write the same file. Return
104
+ blocked is never one). When a check or case fails, add
105
+ `failure`: `{case, step, error, evidenceDir}`, copied from the harness's
106
+ `NATIVE_FAILURE` line or failure record when it prints one; otherwise the failing
107
+ step, error message and evidence path the worker observed. An exit code alone is
108
+ not a failure; keep the first failure separate from cleanup errors. Fix workers
109
+ write the same file. Return
105
110
  nothing else: no artifact hashes, version inventories, screenshots,
106
111
  copied logs, or earlier attempts. For a continuation, include the current checkpoint,
107
112
  outcome and relevant prior-result links in the existing integration notes; do not
@@ -78,16 +78,27 @@ posts them; they join this run's end-of-run review
78
78
 
79
79
  ## 1. Model slots
80
80
 
81
- Run the fast path and record its fills by exact id and effort, using the
82
- ladders in [shared-modules.md](shared-modules.md#model-catalog). Never give
83
- the reviewer the implementer's id, at any effort. Let risk raise the tier and
84
- add the repository's deterministic domain checks, never change the workflow.
81
+ Write this turn's host evidence to a temporary JSON file and run the fast path
82
+ ([shared-modules.md](shared-modules.md#model-slots)); record its fills by exact id
83
+ and effort. The skill names the roles — implementer, explorer, diagnoser,
84
+ reviewer — and the harness agent catalog chooses the models, so rank nothing and
85
+ copy nothing from a ladder. The fills are run metadata: show each role's model
86
+ and effort on the board and never ask which model should implement. A model the
87
+ human names is an explicit override, resolved by rerunning this step with
88
+ `--implementer`, never by offering a list. Never give the reviewer the
89
+ implementer's id, at any effort: the catalog enforces that, and the run blocks
90
+ when it cannot. Let risk
91
+ add the repository's deterministic domain checks and review depth, never change
92
+ the workflow or re-choose the model.
85
93
 
86
94
  Pass a pinned implementer (`implementer=<id[@effort]>` in the invocation) as
87
- `--implementer`; when the result is `ok: false` with code `pinned-implementer-unavailable`, end the run as "pinned implementer unavailable"
88
- and never substitute another model.
89
- Example: `/rush-issues 1aboveio/ai#1545 implementer=gpt-6-luna@high` with no
90
- `gpt-6-luna` discovered stops at preflight and starts nothing.
95
+ `--implementer`. Any `ok: false` result ends the run at preflight with its `code`
96
+ and `reason`, starting nothing: `pinned-implementer-unavailable` means the pinned
97
+ model is unavailable and no other implementer is substituted, and
98
+ `catalog-unavailable` or `capabilities-missing` means this host cannot resolve
99
+ roles yet. Never revive the old picker or reuse an earlier run's pick.
100
+ Example: `/rush-issues 1aboveio/ai#1545 implementer=gpt-6-luna@high` on a host
101
+ whose catalog does not offer `gpt-6-luna` stops at preflight and starts nothing.
91
102
 
92
103
  ## 2. Provisional target
93
104
 
@@ -295,7 +306,8 @@ Example: `/resolve-issues` answered "run the rest" files nothing;
295
306
  Show the board: units, delivery mode, verdict and reasons by consideration,
296
307
  each unit's behaviors, missing prerequisites, proof and suite, environment
297
308
  checks, held units with splits, the pending device record, the
298
- issues missing `ready-for-agent`, and handback steps. Ask
309
+ issues missing `ready-for-agent`, and handback steps. Show each role's resolved
310
+ model and effort as run metadata; no question asks for one. Ask
299
311
  in one interaction, with the native single-choice tool when there is one:
300
312
 
301
313
  0. **Ready label** (only after step 0 `unlabeled`): list the `missing` issues,
@@ -304,20 +316,18 @@ in one interaction, with the native single-choice tool when there is one:
304
316
  proceed, record it in `decisions`; on stop, end the run with the list.
305
317
  **Compaction hook** (only when `install-hooks.mjs --check` printed `missing:`):
306
318
  install it (recommended), or run without it.
307
- 1. **Implementer:** the payload's `options`, recommended first, each with its
308
- reviewer. A pinned implementer is already decided: show it, don't ask.
309
- 2. **Target branch:** up to four fetched heads, provisional first.
310
- 3. **Merge mode:** `autonomous` (recommended): merge each
319
+ 1. **Target branch:** up to four fetched heads, provisional first.
320
+ 2. **Merge mode:** `autonomous` (recommended): merge each
311
321
  reviewed, green PR, fixing blockers outside the plan
312
322
  ([expire.md](expire.md#infrastructure-failures)); or
313
323
  `supervised`: hand each back merge-ready.
314
- 4. **Scheduler mode:** how much `next-actions.mjs` prescribes, recorded as
324
+ 3. **Scheduler mode:** how much `next-actions.mjs` prescribes, recorded as
315
325
  the plan's `schedulerMode`. `full` (recommended): do every step it
316
326
  prints. `narrow`: it prints whether the run is done, the units with work,
317
327
  and the guards; you choose each unit's step. `off`: it prints only whether
318
328
  the run is done; you plan every step. In every mode the run ends only when
319
329
  it reports done.
320
- 5. **Plan:**
330
+ 4. **Plan:**
321
331
  - `ok`/`warn`: proceed or trim.
322
332
  - `hold`: file the splits and run them with the rest (recommended when a
323
333
  held unit has a split), run the rest, proceed anyway, or trim; offer to
@@ -336,7 +346,7 @@ in one interaction, with the native single-choice tool when there is one:
336
346
  grew to 7,544 lines and was closed. Re-cut as two issues, it merged as
337
347
  437 and 341 lines.
338
348
 
339
- Record each answer in `decisions`, sync the catalog, then:
349
+ Record each answer in `decisions`, then:
340
350
 
341
351
  - New target: fetch it, continue the explorer to recheck the findings, rerun
342
352
  the size check; ask again only if it worsens to `hold` or `stop`.
@@ -389,7 +399,6 @@ asking nothing at any point:
389
399
  |---|---|
390
400
  | Ready label | Proceed: show the `missing` issues as a warning on the board and in the handback |
391
401
  | Compaction hook | Run without it: warn on the board with the install command |
392
- | Implementer | The first `options` entry (the pinned one, when pinned) |
393
402
  | Target branch | The default branch |
394
403
  | Merge mode | `autonomous` |
395
404
  | Scheduler mode | `full`, unless the invocation names `scheduler=narrow` or `scheduler=off` |
@@ -9,7 +9,20 @@ restate its rules in the brief beyond the two below.
9
9
  ## Brief
10
10
 
11
11
  - Reviewer model: a different id from the implementer's
12
- ([preflight.md](preflight.md#1-model-slots)).
12
+ ([preflight.md](preflight.md#1-model-slots)). Launch the reviewer with the
13
+ plan's recorded reviewer fill — its `launch`, `instructions`, `selection` and
14
+ `catalogDigest` ([task-plan.md](task-plan.md#worker-selection-on-resume)) — as
15
+ structured launch arguments, never as brief text and never a model id
16
+ hardcoded here. On Pi that `launch` is what the live role resolver receives,
17
+ `{ role }` unless an explicit task override or this host's own preference
18
+ asked for a model or effort; never rebuild a pin from a recorded model id. On
19
+ another host it is the recorded payload, carrying only the controls that host
20
+ advertised. Check independence from what actually launched, not from the
21
+ recorded ids: the catalog preflight checks planned independence only, since
22
+ runtime prepares each launch without knowing the implementer's model. Verify
23
+ actual launch provenance yourself, on Pi and on other hosts, and block the
24
+ round if the actual reviewer matches the implementer or its actual identity
25
+ cannot be established, rather than yielding a review.
13
26
  - Context: spec, repository standards, target branch, unit branch and HEAD,
14
27
  parent PR when stacked or chained, exploration path, and the contracts the unit
15
28
  provides and builds on.
@@ -92,6 +105,27 @@ pass (incomplete, an open P0/P1, a GitHub re-review awaited): pick the tier
92
105
  instead. Example: round 2 passed on
93
106
  `5f63348`; CI failed and the fix pushed `2035c74`: carry, no reviewer.
94
107
 
108
+ ### Resume an incomplete review
109
+
110
+ An incomplete review is unfinished work, not evidence of a bad patch: start no
111
+ fix round. Before another launch, read the retained record for unfinished passes,
112
+ completed commands and findings, and why the review stopped. Resolve an open
113
+ `executionIncident` first; ask the reviewer to record missing continuation details.
114
+
115
+ For the same valid HEAD and scope, resume the same reviewer in the same round
116
+ using its result file, review clone, recorded launch and retained context. Give it
117
+ the unfinished work rather than repeating the whole assignment; preserve completed
118
+ valid passes. A wrong HEAD or invalid scope must be corrected, not carried as
119
+ completed proof.
120
+
121
+ If that reviewer cannot continue, state why replacement is necessary, which
122
+ retained evidence the replacement reads, and what it redoes before launching it.
123
+ The replacement reviews every pass with `tier: "full"`. Keep the round number,
124
+ `fixRound`, unit `attempt` and earlier round files; incompleteness neither resets
125
+ history nor counts as progress. Launch the replacement from the same recorded
126
+ reviewer fill, in the same structured launch arguments as [the brief](#brief)
127
+ requires; never invent or re-pick a model id for it.
128
+
95
129
  ## GitHub reviews
96
130
 
97
131
  Count reviews posted on the PR by any account with write access other than
@@ -135,8 +169,9 @@ the PR author; `github-reviews.mjs` reads them and decides what blocks.
135
169
  completed review left a P0/P1 open, so skips, and any review that follows
136
170
  a passing one, never consume a fix cycle; another attempt after a
137
171
  completed blocker does, even with an unchanged patch, so fix first.
138
- Resume an incomplete review in the same round with the same reviewer when
139
- it can continue; a new reviewer that replaces it reviews in full and keeps
172
+ Resume an incomplete review in the same round
173
+ ([Resume an incomplete review](#resume-an-incomplete-review)); a new
174
+ reviewer that replaces it reviews in full and keeps
140
175
  the prior counter. Legacy records without
141
176
  `fixRound` use their attempt number; never reset history. The verdict checks the counter against the immediate prior, given
142
177
  with `--prior` when the review's filename is not `<unit>-r<N>.json`. The
@@ -178,7 +213,7 @@ the PR author; `github-reviews.mjs` reads them and decides what blocks.
178
213
  | `handback` | `not-converging`: stop fixing; mark the unit `blocked` (`blockedReason: review-handback`) and defer the PR and its open findings on its issue |
179
214
  | `decide` | `spec-question`: the printed `decide` file holds the question. Answer it ([expire.md](expire.md#decide-before-you-defer)) as a `decisions` entry whose `answers` names that file, then rerun this step with `--decision <its id>`: it writes a `test-first` fix brief that carries the decision |
180
215
  | `wait` | No P0/P1 is open, but `awaiting` names a reviewer whose changes request a fix already answered: request their re-review (`gh pr edit <N> --add-reviewer <login>`) and keep the other units shipping; rerun step 3 on each completion notice, or every 5 minutes when nothing else runs; after 30 minutes, mark the unit `blocked` (`blockedReason: review-handback`) and defer it on its issue |
181
- | `review-again` | Review incomplete (`complete` not true, passes, unresolved incident, no checks, P2 with neither a URL nor a dropbox id, wrong HEAD, or a skip the rerun no longer confirms): resolve any incident, then resume or spawn the reviewer for the same round; start no fix round |
216
+ | `review-again` | Review incomplete (`complete` not true, passes, unresolved incident, no checks, P2 with neither a URL nor a dropbox id, wrong HEAD, or a skip the rerun no longer confirms): resolve any incident, then [resume the same reviewer, or replace it and say what changes](#resume-an-incomplete-review), for the same round; start no fix round |
182
217
  | (exit 2, no verdict) | The script could not run: fix the command or path |
183
218
 
184
219
  ## What blocks
@@ -31,33 +31,101 @@ bundle invocations do not install global hooks. Scripted recovery alone is not
31
31
  proof that a Codex surface triggers it; native host compaction/resume certification
32
32
  must pass before that surface is advertised as supported.
33
33
 
34
- ## Model catalog
34
+ ## Model slots
35
35
 
36
- Owner: [`harness-runtime`](../../harness-runtime/) (catalog doctrine and seed
37
- under `references/`, `model-catalog.mjs`, `discover-models.mjs`). Before
38
- reading the doctrine, run the fast path:
36
+ Owner: the harness agent catalog. The workflow names four **roles** — implementer,
37
+ explorer, diagnoser (escalation), reviewer — and the harness decides which model
38
+ fills each one and how that role is launched on this host. The shared bridge is
39
+ [`harness-runtime/agent-catalog.mjs`](../../harness-runtime/agent-catalog.mjs);
40
+ this skill owns no ladder, no tier ranking, and no model list. Write this turn's
41
+ host evidence to a temporary JSON file first (any writable path; the run directory
42
+ does not exist yet at step 1):
43
+
44
+ ```json
45
+ { "available": [{ "model": "provider/model", "nativeModel": "host-id", "supportedEfforts": ["medium", "high"] }],
46
+ "foregroundModel": "provider/model",
47
+ "launchCapabilities": { "model": true, "effort": true, "instructions": true },
48
+ "hostPreferences": { "developer": { "model": "provider/model" } },
49
+ "fallbackToForeground": false }
50
+ ```
51
+
52
+ Every field is evidence the host reports, never something to fill in from memory;
53
+ a field you cannot observe is left out, and the bridge never completes one.
54
+
55
+ | Field | Meaning |
56
+ |---|---|
57
+ | `available[]` | This turn's models. `nativeModel` is required for a harness whose slots are launched by a bare host id (Codex); pass the ids the spawn primitive advertises, unchanged. `supportedEfforts` is the host's verified list per model. |
58
+ | `launchCapabilities` | The launch controls this host exposes: `model`, `effort`, `instructions`, each a boolean. All three must be stated; omission is not "probably true". A native id and an effort say what the catalog chose, never that the adapter can set it. |
59
+ | `hostPreferences` | This host's own role preferences, keyed by **role** (`developer`, `explorer`, `reviewer`), each `{ model?, effort? }`. Below a task override and above the role default: it is how a host says "this machine runs the developer role on this model". |
60
+ | `fallbackToForeground` | Set `true` only when this host may use the foreground model as a fallback. Pi always may; another harness must opt in. Absent, no foreground fallback happens for it. |
61
+ | `tiers` | `{ tiers: { name: { members: [], candidates: [] } } }` — tier membership plus the ordered candidates that may replace an unavailable preferred model. `members` and `candidates` are `provider/model` ids; a candidate may be `{ model, crossProvider: true }` to allow another provider. An empty `candidates` list means no substitution. |
62
+ | `overrides` | The task's own pins, keyed by **slot** (`implementer`, `explorer`, `diagnoser`, `reviewer`). Highest precedence. |
63
+
64
+ `hostPreferences` is how a machine states its own choice instead of leaving it to the
65
+ saved role default. Example: this host's personal developer role points at a small
66
+ local model, but this machine runs the developer role on a stronger
67
+ `provider/model`. Declaring `"hostPreferences": { "developer": { "model":
68
+ "provider/model", "effort": "high" } }` outranks the role default; the catalog
69
+ reports it as an explicit request and the Pi launch keeps it instead of stripping
70
+ it back to `{ role }`. Omit the effort and only the model is pinned.
71
+
72
+ Then run:
39
73
 
40
74
  ```bash
41
75
  node <skill-base-dir>/scripts/preflight-models.mjs \
42
- --harness <pi|codex|claude-code> --risk <routine|high> \
43
- --available <comma-separated-current-turn-model-ids> --ask-only
76
+ --harness <pi|codex|claude-code> --capabilities /tmp/resolve-issues-capabilities.json
44
77
  ```
45
78
 
46
- Record its fills without asking. Use its `options` (up to four, recommended
47
- first) for the implementer question at the approval; accept an `alternate`
48
- or any discovered model the human names. Never run scripts under
49
- `archive/resolve-issues/`.
79
+ Record its fills by exact id and effort as run metadata, and show them on the
80
+ board. No role is a question: this workflow never asks which model should
81
+ implement, and the script emits no option list. The resolver is
82
+ `pi-agent-catalog` on PATH, or the JSON argv in `PI_AGENT_CATALOG_COMMAND` when
83
+ a host wraps it. Never run scripts under `archive/resolve-issues/`.
50
84
 
51
- | Slot | Selection |
52
- |---|---|
53
- | Implementer, routine | `gpt-6.1-sol@high`, `gpt-6-luna@high`, `grok-4.6@high`, `mimo-v2.6-pro@high` |
54
- | Implementer, high risk | `gpt-6.1-sol@high`, `gpt-6-astra@high`, `gpt-5.6-sol@high`, `grok-4.7@high` |
55
- | Explorer | `gpt-6.1-sol@medium`, then the routine ladder without `gpt-6.1-sol@high` |
56
- | Escalation (test-first workers, and fix workers after a cycle without progress; `preflight-models.mjs` key `diagnoser`) | The high-risk ladder, at any risk |
57
- | Reviewer | `gpt-6-astra@medium`; `gpt-5.6-sol@medium` when Astra implements; otherwise the payload's distinct-model ranking |
58
-
59
- Use only discovered or named models. Sync the catalog only after the
60
- approval. Require each spawn's read-back to match its slot.
85
+ | Role | Payload | Spawn with |
86
+ |---|---|---|
87
+ | Implementer | `implementer` | its own `launch` + `instructions` |
88
+ | Explorer | `explorer` | its own `launch` + `instructions` |
89
+ | Escalation (test-first workers, and fix workers after a cycle without progress) | `diagnoser` (developer role) | its own `launch` + `instructions` |
90
+ | Reviewer | `reviewer` | its own `launch` + `instructions` |
91
+
92
+ Each fill carries `{ id, key, effort, role, launch, instructions, selection }`,
93
+ and the payload carries the `catalogDigest` they were resolved under.
94
+
95
+ **Launch the fill, not the model.** On Pi a `launch` is `{ role }` plus a `model`
96
+ and `thinking` only when something explicitly asked for them: the human's task
97
+ override, or the host's own preference, which the catalog reports as an explicit
98
+ selection. A resolved role default is never copied in — the live Pi catalog keeps
99
+ supplying that. On Codex the `launch` is `{ model, effort, instructions }` with the
100
+ adapter's native id, and the run is blocked unless the host advertised every
101
+ control that launch needs: a slot whose harness cannot express the selection is a
102
+ blocked run (`launch-unsupported`), never a launch that claims a model it did not
103
+ set; never describe a model choice in the brief and call it selection.
104
+
105
+ Use the implementer fill for the run and show it as resolved. A model the human
106
+ names is an explicit override: rerun the fast path with `--implementer
107
+ <id[@effort]>` and use that result. A pinned implementer that the catalog
108
+ declines is `ok: false` with `code: pinned-implementer-unavailable`; end the run
109
+ and substitute nothing.
110
+
111
+ **A blocked result ends the run.** `ok: false` — no resolver, no capabilities,
112
+ a declined request, an unadvertised launch control, a missing native selection —
113
+ means report its `code` and `reason` and start nothing. Never reuse an earlier
114
+ pick, never fall back to the skill-owned catalog, and never let the reviewer share
115
+ the implementer's model id: the catalog enforces independence, and re-picking a
116
+ replacement here would silently break it.
117
+
118
+ **No fallback is invented.** The catalog substitutes only an available model from
119
+ the same tier's configured `candidates`, and never for an explicit request: an
120
+ unavailable pin or host preference blocks rather than sliding to a neighbour, and
121
+ a non-Pi host does not inherit the foreground model unless it set
122
+ `fallbackToForeground: true`. Nothing here upgrades, downgrades, or keeps a
123
+ previous run's pick to avoid a block.
124
+
125
+ The `harness-runtime` package's legacy `model-catalog.mjs` and `discover-models.mjs`
126
+ modules remain for other consumers that still import them; this workflow imports
127
+ only `detectHarness` from `discover-models.mjs` and never uses either to select a
128
+ model slot. The skill's own compatibility wrappers for those commands are gone.
61
129
 
62
130
  ## Leaf skills
63
131
 
@@ -117,7 +117,7 @@ Run fields: optional `installation` holds the explicit native installation descr
117
117
  pinned external root mappings). Capture from the selected bundle and preserve it
118
118
  through workers and recovery; never replace it with a newer cache or shared copy.
119
119
  Other run fields: `skill` (`resolve-issues` or `rush-issues`; the scheduler and
120
- rehydrate read it, and `next-actions.mjs` exits 2 without it), `planRevision`, models and efforts, `targetBranch`,
120
+ rehydrate read it, and `next-actions.mjs` exits 2 without it), `planRevision`, `selections`, `targetBranch`,
121
121
  `workspaceLifecycle: 1` and `repoRoot` ([workspaces.md](workspaces.md)),
122
122
  `deliveryMode` and its check, `mergeMode`, run directory, `specLocator`
123
123
  (`owner/name#N` or an issue URL; any other name turns off the issue-tree sync),
@@ -126,6 +126,14 @@ tree that are deliberately not units, each `{issue, reason}`: release or
126
126
  approval gates, and rollups the explorer found empty). A run resumed from an
127
127
  older wave run keeps `merged` (unit ids merged by earlier runs).
128
128
 
129
+ `selections` records each slot's fill as `preflight-models.mjs` returned it —
130
+ `id`, `key`, `effort`, `role`, `launch`, `instructions`, `selection`, and the
131
+ `catalogDigest` it was resolved under — beside the explicit task or host override
132
+ that produced it, when one did
133
+ ([shared-modules.md](shared-modules.md#model-slots)). Its `id` and `effort` are
134
+ recorded evidence of what the catalog resolved, not a pin to replay. The fill is
135
+ what a later launch of the slot repeats; a pair of model ids is not.
136
+
129
137
  `reviewFindings` entry: id, `severity` P0-P2 (P3 is skipped, never recorded), summary, locator, `status`
130
138
  (`open`, `resolved`, `deferred`), `resolvedHead`, `dropboxId` or `followUpUrl`. Copy them
131
139
  from `review-verdict.mjs`: on `fix` its `fix` list as `open`; on `pass` its
@@ -139,6 +147,32 @@ question it settles (`results/<unit>-<label>.json`, or
139
147
  agent's recommendation adds `source: agent-recommendation` and the
140
148
  recommendation's reason; its human's words are the invocation.
141
149
 
150
+ ### Worker selection on resume
151
+
152
+ **A launch repeats the saved fill, never a reconstruction of it.** On Pi the
153
+ launch authority stays the live role resolver ([shared-modules.md](shared-modules.md#model-slots)):
154
+ its `launch` is `{ role }` unless an explicit task override or this host's own
155
+ preference asked for a model or effort, and a resolved role default is never
156
+ written out as an explicit pin. On a non-Pi host the recorded `launch` is the
157
+ payload, and it names only the controls that host advertised. What a worker
158
+ actually launched with, its model and effort included, and its result are that
159
+ worker's run evidence: record them, keep them immutable, and never re-apply them
160
+ to another launch or rewrite them.
161
+
162
+ A plan saved before `selections` holds model ids and efforts and nothing saying
163
+ who chose them. Read such a value as evidence of what ran, never as a pin: do
164
+ not pass it as an explicit Pi model or effort. Before launching new workers,
165
+ rerun `preflight-models.mjs` for this host ([preflight.md](preflight.md#1-model-slots))
166
+ with only the overrides the run can evidence — a `standingOrders` line, a
167
+ human-authored decision, or an explicit override in the invocation, never an
168
+ agent recommendation or stored metadata alone — and record the fills it returns
169
+ as `selections`. When an override's provenance, or a launch control the current
170
+ host must advertise, cannot be established, block the new launch and name what
171
+ is missing: report the code and reason and start nothing, rather than guessing a
172
+ pin. Workers already running or finished keep their configuration and history.
173
+ A resume asks no model question; a human who changes one does so as a separate
174
+ task input, recorded as a decision and resolved the same way.
175
+
142
176
  ### Standing orders
143
177
 
144
178
  **`standingOrders` are the run's only constraints.** A numbered list, one