@yunhozz/arc 0.4.7 → 0.5.0

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 (41) hide show
  1. package/MANIFEST.sha256 +37 -29
  2. package/README.md +1 -1
  3. package/claude/skill/models.toml +7 -7
  4. package/claude/skill/references/coordination.md +4 -0
  5. package/claude/skill/references/handoff-prep.md +1 -1
  6. package/claude/skill/references/verification.md +9 -4
  7. package/codex/skill/models.toml +5 -5
  8. package/codex/skill/references/coordination.md +4 -0
  9. package/codex/skill/references/handoff-prep.md +1 -1
  10. package/codex/skill/references/verification.md +9 -4
  11. package/gemini/agents/arc-implementer.md +1 -1
  12. package/gemini/agents/arc-planner.md +1 -1
  13. package/gemini/agents/arc-qa.md +1 -1
  14. package/gemini/agents/arc-reviewer.md +1 -1
  15. package/gemini/agents/arc-scouter.md +1 -1
  16. package/gemini/skill/models.toml +6 -6
  17. package/gemini/skill/references/coordination.md +4 -0
  18. package/gemini/skill/references/handoff-prep.md +1 -1
  19. package/gemini/skill/references/verification.md +9 -4
  20. package/grok/skill/references/coordination.md +4 -0
  21. package/grok/skill/references/handoff-prep.md +1 -1
  22. package/grok/skill/references/verification.md +9 -4
  23. package/lib/cli/postinstall.mjs +1 -1
  24. package/lib/installer/runtime-assets.mjs +5 -1
  25. package/lib/models/catalog-gemini.mjs +4 -1
  26. package/lib/models/gemini-models.json +4 -0
  27. package/lib/runtime/final-verify.mjs +2158 -0
  28. package/lib/runtime/node-test-reporter.mjs +81 -0
  29. package/lib/runtime/platform-registry.mjs +1 -1
  30. package/lib/runtime/test-results.mjs +736 -0
  31. package/lib/runtime/verify-cli.mjs +60 -0
  32. package/lib/tui/app.mjs +4 -2
  33. package/lib/tui/render.mjs +1 -1
  34. package/lib/watch/index.mjs +1 -1
  35. package/lib/watch/menu.mjs +26 -15
  36. package/package.json +1 -1
  37. package/shared/skill/runtime/final-verify.mjs +2158 -0
  38. package/shared/skill/runtime/node-test-reporter.mjs +81 -0
  39. package/shared/skill/runtime/platform-registry.mjs +1 -1
  40. package/shared/skill/runtime/test-results.mjs +736 -0
  41. package/shared/skill/runtime/verify-cli.mjs +60 -0
@@ -145,12 +145,14 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
145
145
  **Claude**
146
146
 
147
147
  - Approval: No per-call ARC approval gate.
148
+ - Detached survival of the verify runner is unverified on a Claude host; use `detach: false` until it is verified.
148
149
  - Target home probe: None.
149
150
  - Desktop: Held as described below.
150
151
 
151
152
  **Codex**
152
153
 
153
154
  - On a Codex host ask the user for escalation approval each time any runtime command (`routing-status`, `prepare-dispatch`, `run-dispatch`, `observe`, `resume`, `cancel`) runs, because each may write `CODEX_HOME`. The runtime does not check this approval; asking for it is an Orchestrator obligation. Without approval or on failure the result is `host_sandbox_blocked`.
155
+ - On a Codex host ask for the same escalation approval each time a `verify-*` command (`verify-start`, `verify-status`, `verify-compare`, `verify-rerun`, `verify-cleanup`) runs, because it writes `<git-common-dir>/arc/verify` and the system temporary directory; record an approved call as `sandboxMode: "escalated"`. Detached survival of the verify runner is unverified; use `detach: false` until it is verified.
154
156
  - In a Codex host sandbox writes to `CODEX_HOME` are denied (G2), so a Codex-host bridge is not held in advance but runs only with the per-call escalation approval; a refused approval or a denied write is `host_sandbox_blocked`. Detached supervisor survival itself was observed under variant conditions, and native routes there remain supported.
155
157
  - Target home probe: None.
156
158
  - Desktop: Held as described below.
@@ -158,6 +160,7 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
158
160
  **Gemini**
159
161
 
160
162
  - Approval: Hold the host pending live host measurement (GG2). The registry lists `gemini` and `gemini-cli`, but `compositeHost` is off.
163
+ - Detached survival of the verify runner is unverified on a Gemini host; use `detach: false`.
161
164
  - Target home probe: See the shared probe rule below. The capability hold applies before the probe.
162
165
  - Desktop: No Desktop value.
163
166
 
@@ -166,6 +169,7 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
166
169
  GK2 is `approval`.
167
170
 
168
171
  - On a Grok host start the session with `grok --permission-mode default` (ask), keep the platform-default sandbox off, and ask the user for approval each time any runtime command (`routing-status`, `prepare-dispatch`, `run-dispatch`, `observe`, `resume`, `cancel`) runs; NEVER use auto-review, `/auto`, `bypassPermissions`, `--always-approve` or `--yolo`, and DO NOT choose `Always allow`, which saves `permission_mode = "always-approve"` to the Grok config. Spawn with `spawn_subagent` only roles whose route is `native`; Grok can also list Claude `arc-routing-*` profiles, which remain bridge roles. The runtime does not check this approval; asking for it is an Orchestrator obligation. A denied write (for example by a host sandbox) is `host_sandbox_blocked`; ARC does not detect whether the host sandbox is on.
172
+ - On a Grok host ask the user for approval the same way each time a `verify-*` command runs. Detached survival of the verify runner is unverified; use `detach: false`.
169
173
  - Target home probe: See the shared probe rule below.
170
174
  - Desktop: No Desktop value.
171
175
 
@@ -92,7 +92,7 @@ After initial document batching, follow [planning](planning.md#plan-updates-duri
92
92
  <a id="verification-brief-inputs"></a>
93
93
  ### Verification brief inputs
94
94
 
95
- Implementer and QA briefs that assign checks MUST include the baseline record reference (revision, commands, environment and failures by test name, with baseline-incomplete files marked), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison).
95
+ Implementer and QA briefs that assign checks MUST include the baseline record reference (revision, commands, environment and failures by test name, with baseline-incomplete files marked), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). While a background baseline run is still active, the brief MAY cite its `runId` and recording conditions instead of the completed record; the executor's comparison waits for its completion.
96
96
 
97
97
  <a id="recovery-prerequisite"></a>
98
98
  ### Recovery prerequisite
@@ -19,13 +19,18 @@ Policy, generated-file and manifest checks prove structure, not role behavior, i
19
19
 
20
20
  **Task checks and rechecks** run only tests related to the change: test files that directly exercise a changed module, contract tests that the change requires updating, and the matching check scripts. The brief lists the minimum set; executors MAY add only items in these three categories, each with a reason. Other additions need Orchestrator authorization. Report every selected item and why. This rule takes precedence over the upstream TDD per-task project-suite instruction; upstream text is unchanged. Report every failure observed in any run by name.
21
21
 
22
- **Final verification** runs once after all tasks are accepted: the union of all tasks' related tests, plus all contract tests and all check scripts. Orchestrator runs it directly, not through QA, as a background process where the host supports one, and continues independent work such as assigning the final Reviewer meanwhile. Orchestrator then performs the result comparison below and records the verdict. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
22
+ **Final verification** runs once after all tasks are accepted: the union of all tasks' related tests, plus all contract tests and all check scripts. Orchestrator runs it directly, not through QA, as a background process where the host supports one, and continues independent work such as assigning the final Reviewer meanwhile. Run it in a clean detached worktree of the verified HEAD commit, prepared with the same prerequisites as the baseline, for example through the runtime [final verification commands](#final-verification-runtime-commands); uncommitted changes MAY be captured as a snapshot commit without changing refs, the index or working files, reporting included and excluded paths. Orchestrator then performs the result comparison below and records the verdict. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
23
23
 
24
- **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan; Orchestrator decides from the actual final diff and history. If no trigger applies, omit it and report the reason; if applicability cannot be determined, run it. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings.
24
+ **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan; Orchestrator decides from the actual final diff and history. If no trigger applies, omit it and report the reason; if applicability cannot be determined, run it. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression uses the same clean worktree and prerequisites as the baseline.
25
25
 
26
- **Baseline:** Before dependent work, Orchestrator records a baseline at the approved base revision after the prerequisites the checks require (for example build outputs and environment settings): commands, environment, revision and failures by test name, covering every command final verification may run, including the full suite when the provisional trigger judgment is run or undetermined. A file-level load or collection failure without test names marks that file baseline-incomplete; re-record with prerequisites or treat current failures in that file as new candidates. NEVER absorb them as baseline failures.
26
+ **Baseline:** Before dependent work, Orchestrator records a baseline at the approved base revision after the prerequisites the checks require (for example build outputs and environment settings): commands, environment, revision and failures by test name, covering every command final verification may run, including the full suite when the provisional trigger judgment is run or undetermined. A file-level load or collection failure without test names marks that file baseline-incomplete; re-record with prerequisites or treat current failures in that file as new candidates. NEVER absorb them as baseline failures. Orchestrator MAY record the baseline in the background in a separate clean worktree immediately after base approval while continuing independent work, but MUST complete it before the result comparison. Record its load (quiet, contended or unknown), and by default DO NOT run baseline and HEAD verification concurrently. Reuse a cached baseline only when every cache key input matches and the cached run was quiet and complete; a missing, unreadable or differing input requires a fresh record, and a contended or unknown baseline serves only the current comparison.
27
27
 
28
- **Result comparison:** Compare failures with the baseline by test name; only new failures are findings. Report baseline failures separately. If a failure looks intermittent, rerun only that test in isolation, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding.
28
+ **Result comparison:** Compare failures with the baseline by test name; only new failures are findings. Report baseline failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding.
29
+
30
+ <a id="final-verification-runtime-commands"></a>
31
+ ## Final verification runtime commands
32
+
33
+ Orchestrator MAY run `node <skill>/runtime/verify-cli.mjs <command> --cwd <workspace> --workflow <id> --input -` with `verify-start`, `verify-status`, `verify-compare`, `verify-rerun` or `verify-cleanup`. The commands reject bridge children, never retry, restart or delete automatically, create worktrees only under the system temporary directory and store records under `<git-common-dir>/arc/verify`. Commands receive only a fixed environment allowlist plus declared `envNames` and command `env`, all of which enter the cache key; declare any other variable a check needs. Use `detach: true` only on a host whose detached-process survival is verified in [coordination](coordination.md); otherwise run with `detach: false`, through the host's own background facility where available. `verify-rerun` runs one isolated attempt per call within the rerun limit, and `verify-cleanup` removes only worktrees the tool created and recorded, on explicit request.
29
34
 
30
35
  <a id="risk-scaled-execution"></a>
31
36
  ## Risk-scaled execution
@@ -1,4 +1,4 @@
1
1
  export async function runPostinstall({output=process.stdout}={}){
2
- output.write('Run arc to install or manage the ARC harness.\n');
2
+ output.write('🎉 ARC installed successfully! Run arc to set up the harness.\n');
3
3
  return 0;
4
4
  }
@@ -13,6 +13,7 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
13
13
  'lib/runtime/cooperative.mjs',
14
14
  'lib/runtime/evaluate.mjs',
15
15
  'lib/runtime/external.mjs',
16
+ 'lib/runtime/final-verify.mjs',
16
17
  'lib/runtime/gate.mjs',
17
18
  'lib/runtime/gemini-stream.mjs',
18
19
  'lib/runtime/git-evidence.mjs',
@@ -21,6 +22,7 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
21
22
  'lib/runtime/grok-stream.mjs',
22
23
  'lib/runtime/identity.mjs',
23
24
  'lib/runtime/local-cli.mjs',
25
+ 'lib/runtime/node-test-reporter.mjs',
24
26
  'lib/runtime/operations.mjs',
25
27
  'lib/runtime/platform-registry.mjs',
26
28
  'lib/runtime/role-bridge-args.mjs',
@@ -35,5 +37,7 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
35
37
  'lib/runtime/scope.mjs',
36
38
  'lib/runtime/store.mjs',
37
39
  'lib/runtime/target-preparation.mjs',
38
- 'lib/runtime/verification.mjs'
40
+ 'lib/runtime/test-results.mjs',
41
+ 'lib/runtime/verification.mjs',
42
+ 'lib/runtime/verify-cli.mjs'
39
43
  ]);
@@ -2,7 +2,10 @@ export const GEMINI_MODELS_API = 'https://generativelanguage.googleapis.com/v1be
2
2
  const unavailable = (code, message) => ({status: 'unavailable', code, message});
3
3
 
4
4
  export function selectGeminiCatalogModels(ids) {
5
- return [...new Set(ids.filter(id => typeof id === 'string' && id === id.trim() && /^gemini-(\d+(?:\.\d+)?)-(pro|flash|flash-lite)$/.test(id)))];
5
+ return [...new Set(ids.filter(id => typeof id === 'string' && id === id.trim() && (
6
+ /^gemini-(\d+(?:\.\d+)?)-(pro|flash|flash-lite)$/.test(id)
7
+ || /^gemini-(\d+)-(neon|hydrogen|carbon|argon)$/.test(id)
8
+ )))];
6
9
  }
7
10
 
8
11
  export async function discoverGeminiCatalog({apiKey, fetchImpl = globalThis.fetch, signal} = {}) {
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "platform": "gemini",
3
3
  "pairs": [
4
+ {"model": "gemini-4-neon", "effort": "default"},
5
+ {"model": "gemini-4-hydrogen", "effort": "default"},
6
+ {"model": "gemini-4-carbon", "effort": "default"},
7
+ {"model": "gemini-4-argon", "effort": "default"},
4
8
  {"model": "gemini-3.8-flash", "effort": "default"},
5
9
  {"model": "gemini-3.7-flash", "effort": "default"},
6
10
  {"model": "gemini-3.6-flash", "effort": "default"},