sneakoscope 0.9.16 → 0.9.18

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/README.md +25 -4
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/package.json +10 -2
  6. package/src/cli/command-registry.mjs +3 -0
  7. package/src/cli/install-helpers.mjs +1 -1
  8. package/src/commands/autoresearch.mjs +2 -2
  9. package/src/commands/code-structure.mjs +1 -1
  10. package/src/commands/computer-use.mjs +2 -28
  11. package/src/commands/db.mjs +1 -1
  12. package/src/commands/doctor.mjs +1 -1
  13. package/src/commands/eval.mjs +1 -1
  14. package/src/commands/gc.mjs +1 -1
  15. package/src/commands/goal.mjs +1 -1
  16. package/src/commands/gx.mjs +1 -1
  17. package/src/commands/harness.mjs +1 -1
  18. package/src/commands/hproof.mjs +1 -1
  19. package/src/commands/image-ux-review.mjs +2 -35
  20. package/src/commands/mad-sks.mjs +1 -1
  21. package/src/commands/memory.mjs +1 -1
  22. package/src/commands/perf.mjs +1 -1
  23. package/src/commands/pipeline.mjs +2 -22
  24. package/src/commands/ppt.mjs +3 -42
  25. package/src/commands/profile.mjs +1 -1
  26. package/src/commands/proof-field.mjs +1 -1
  27. package/src/commands/qa-loop.mjs +1 -1
  28. package/src/commands/recallpulse.mjs +3 -2
  29. package/src/commands/research.mjs +1 -1
  30. package/src/commands/rust.mjs +5 -0
  31. package/src/commands/scouts.mjs +5 -0
  32. package/src/commands/skill-dream.mjs +1 -1
  33. package/src/commands/stats.mjs +1 -1
  34. package/src/commands/team.mjs +1 -1
  35. package/src/commands/validate-artifacts.mjs +1 -1
  36. package/src/commands/wiki.mjs +3 -92
  37. package/src/core/commands/autoresearch-command.mjs +5 -0
  38. package/src/core/commands/code-structure-command.mjs +18 -0
  39. package/src/core/commands/command-utils.mjs +77 -0
  40. package/src/core/commands/computer-use-command.mjs +78 -0
  41. package/src/core/commands/db-command.mjs +91 -0
  42. package/src/core/commands/eval-command.mjs +68 -0
  43. package/src/core/commands/gc-command.mjs +28 -0
  44. package/src/core/commands/goal-command.mjs +60 -0
  45. package/src/core/commands/gx-command.mjs +99 -0
  46. package/src/core/commands/harness-command.mjs +17 -0
  47. package/src/core/commands/hproof-command.mjs +11 -0
  48. package/src/core/commands/image-ux-review-command.mjs +83 -0
  49. package/src/core/commands/mad-sks-command.mjs +129 -0
  50. package/src/core/commands/perf-command.mjs +33 -0
  51. package/src/core/commands/pipeline-command.mjs +58 -0
  52. package/src/core/commands/ppt-command.mjs +93 -0
  53. package/src/core/commands/profile-command.mjs +15 -0
  54. package/src/core/commands/proof-field-command.mjs +28 -0
  55. package/src/core/commands/qa-loop-command.mjs +188 -0
  56. package/src/core/commands/recallpulse-command.mjs +5 -0
  57. package/src/core/commands/research-command.mjs +298 -0
  58. package/src/core/commands/rust-command.mjs +76 -0
  59. package/src/core/commands/scouts-command.mjs +269 -0
  60. package/src/core/commands/skill-dream-command.mjs +40 -0
  61. package/src/core/commands/team-command.mjs +336 -0
  62. package/src/core/commands/validate-artifacts-command.mjs +45 -0
  63. package/src/core/commands/wiki-command.mjs +467 -0
  64. package/src/core/feature-fixture-runner.mjs +165 -29
  65. package/src/core/feature-fixtures.mjs +80 -16
  66. package/src/core/feature-registry.mjs +94 -19
  67. package/src/core/fsx.mjs +1 -1
  68. package/src/core/pipeline/active-context.mjs +3 -0
  69. package/src/core/pipeline/pipeline-plan-writer.mjs +8 -0
  70. package/src/core/pipeline/plan-schema.mjs +4 -0
  71. package/src/core/pipeline/prompt-context.mjs +6 -0
  72. package/src/core/pipeline/route-prep.mjs +3 -0
  73. package/src/core/pipeline/scout-stage-policy.mjs +4 -0
  74. package/src/core/pipeline/stage-policy.mjs +4 -0
  75. package/src/core/pipeline/stop-gate.mjs +10 -0
  76. package/src/core/pipeline/validation.mjs +3 -0
  77. package/src/core/pipeline-runtime.mjs +1693 -0
  78. package/src/core/pipeline.mjs +34 -1664
  79. package/src/core/proof/auto-finalize.mjs +81 -0
  80. package/src/core/proof/proof-schema.mjs +1 -0
  81. package/src/core/proof/proof-writer.mjs +1 -0
  82. package/src/core/proof/route-finalizer.mjs +6 -2
  83. package/src/core/proof/route-proof-gate.mjs +11 -1
  84. package/src/core/proof/route-proof-policy.mjs +1 -0
  85. package/src/core/routes.mjs +4 -1
  86. package/src/core/rust-accelerator.mjs +68 -7
  87. package/src/core/scouts/engines/codex-app-subagent-engine.mjs +9 -0
  88. package/src/core/scouts/engines/codex-exec-parallel-engine.mjs +52 -0
  89. package/src/core/scouts/engines/local-static-engine.mjs +10 -0
  90. package/src/core/scouts/engines/scout-engine-base.mjs +118 -0
  91. package/src/core/scouts/engines/scout-engine-detect.mjs +63 -0
  92. package/src/core/scouts/engines/scout-engine-policy.mjs +76 -0
  93. package/src/core/scouts/engines/sequential-fallback-engine.mjs +10 -0
  94. package/src/core/scouts/engines/tmux-lane-engine.mjs +9 -0
  95. package/src/core/scouts/scout-artifacts.mjs +95 -0
  96. package/src/core/scouts/scout-consensus.mjs +103 -0
  97. package/src/core/scouts/scout-gate.mjs +75 -0
  98. package/src/core/scouts/scout-plan.mjs +149 -0
  99. package/src/core/scouts/scout-proof-evidence.mjs +49 -0
  100. package/src/core/scouts/scout-readonly-guard.mjs +80 -0
  101. package/src/core/scouts/scout-runner.mjs +457 -0
  102. package/src/core/scouts/scout-schema.mjs +81 -0
  103. package/src/core/scouts/scout-triwiki.mjs +19 -0
  104. package/src/core/version.mjs +1 -1
  105. package/src/core/commands/route-cli.mjs +0 -2443
package/README.md CHANGED
@@ -2,11 +2,24 @@
2
2
 
3
3
  Fast legacy-free proof-first Codex trust layer with image-based Voxel TriWiki.
4
4
 
5
- Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex work auditable. `0.9.16` runs through split command modules, automatically seals serious routes with Completion Proof, binds visual/UI claims to Image Voxel TriWiki anchors and relations, and release-gates hooks, codex-lb, executable fixtures, Rust parity, and DB safety evidence.
5
+ Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex work auditable. `0.9.18` makes route execution hermetic and evidence-strict: Five-Scout intake can use real Codex/tmux engines when available, route E2E runs in temp project roots, feature fixtures no longer receive implicit static-pass fallback, and pipeline planning is exposed through split policy modules with a facade compatibility layer.
6
6
 
7
- ## 0.9.16 Current Release
7
+ ![Sneakoscope Codex architecture and pipeline](https://raw.githubusercontent.com/mandarange/Sneakoscope-Codex/dev/docs/assets/sneakoscope-architecture-pipeline.jpg)
8
8
 
9
- `0.9.16` preserves the 0.9.14 legacy-free trust layer, keeps the 0.9.15 postinstall bootstrap fix, and installs the Codex App `$Commit` / `$Commit-And-Push` skills during setup and doctor repair.
9
+ ## 0.9.18 Current Release
10
+
11
+ 0.9.18 makes SKS route execution hermetic and evidence-strict. Five-Scout intake can run through real Codex/tmux engines when available, falls back honestly when not, and never claims speedup from mock/static evidence. E2E route tests run in isolated temp project roots. Feature fixtures no longer receive implicit static-pass fallback; every feature declares an explicit fixture. Pipeline architecture is split into stage policy, scout policy, prompt context, active context, and stop-gate modules.
12
+
13
+ Highlights:
14
+
15
+ - Serious route mock/fixture commands call `maybeFinalizeRoute`, so Team, QA-LOOP, Research, PPT, Image UX Review, Computer Use, DB, Wiki, and GX fixtures produce route-local `completion-proof.json` without a separate repair/finalize step.
16
+ - `sks scouts engines --json` reports Codex exec, tmux, Codex App subagent, local static, and sequential fallback availability with blockers.
17
+ - Scout read-only guards snapshot source state and allow only mission-local `scout-*` artifacts plus scout reports.
18
+ - E2E route tests run actual route commands inside isolated temp roots instead of sharing the source checkout `.sneakoscope`.
19
+ - Feature fixtures execute deterministic allowlisted commands in hermetic temp roots and validate artifacts generated by those commands, including mission-local proof, visual ledgers, DB reports, and GX/Wiki evidence.
20
+ - `npm run release:check` includes `pipeline-budget:check`, `scout-engines:check`, strict scout validation, and hermetic fixture execution.
21
+ - `sks rust status|smoke --json` reports optional Rust availability, detects stale native binaries, and proves JS fallback parity when native Rust is missing or version-mismatched.
22
+ - `npm run release:check` includes `route-modularity:check`, `command-budget:check`, and `feature-fixtures:strict`.
10
23
 
11
24
  `0.9.14` turned SKS into a legacy-free proof-first trust layer for Codex work:
12
25
 
@@ -21,7 +34,14 @@ Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex
21
34
 
22
35
  Learn more:
23
36
  - Completion Proof: [docs/completion-proof.md](docs/completion-proof.md)
37
+ - Five-Scout Pipeline: [docs/five-scout-pipeline.md](docs/five-scout-pipeline.md)
24
38
  - Image Voxel TriWiki: [docs/image-voxel-ledger.md](docs/image-voxel-ledger.md)
39
+ - Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
40
+ - Feature fixtures: [docs/feature-fixtures.md](docs/feature-fixtures.md)
41
+ - Scout engines: [docs/scout-engines.md](docs/scout-engines.md)
42
+ - Hermetic E2E: [docs/testing-hermetic-e2e.md](docs/testing-hermetic-e2e.md)
43
+ - Pipeline architecture: [docs/pipeline-architecture.md](docs/pipeline-architecture.md)
44
+ - Rust accelerator: [docs/rust-accelerator.md](docs/rust-accelerator.md)
25
45
  - Codex App Hooks/PAT: [docs/hooks-pat.md](docs/hooks-pat.md)
26
46
  - codex-lb: [docs/codex-lb.md](docs/codex-lb.md)
27
47
 
@@ -33,13 +53,14 @@ sks root
33
53
  sks doctor
34
54
  sks codex-app check
35
55
  sks selftest --mock
56
+ sks rust smoke --json
36
57
  ```
37
58
 
38
59
  ## Three core promises
39
60
 
40
61
  1. Completion Proof for every serious route
41
62
  2. Image Voxel TriWiki anchors and relations for every visual route
42
- 3. Codex App, codex-lb, hooks, Rust, DB, and fixtures verified by release gates
63
+ 3. Codex App, codex-lb, hooks, Rust fallback parity, DB, route modularity, and generated fixtures verified by release gates
43
64
 
44
65
  ## Install Options
45
66
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "0.9.16"
79
+ version = "0.9.18"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "0.9.16"
3
+ version = "0.9.18"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
4
4
  fn main() {
5
5
  let mut args = std::env::args().skip(1);
6
6
  match args.next().as_deref() {
7
- Some("--version") => println!("sks-rs 0.9.16"),
7
+ Some("--version") => println!("sks-rs 0.9.18"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "0.9.16",
4
+ "version": "0.9.18",
5
5
  "description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
@@ -41,21 +41,29 @@
41
41
  "changelog:check": "node ./scripts/changelog-check.mjs",
42
42
  "cli-entrypoint:check": "node ./scripts/check-cli-entrypoint.mjs",
43
43
  "legacy-free:check": "node ./scripts/check-legacy-free.mjs",
44
+ "route-modularity:check": "node ./scripts/check-route-modularity.mjs",
45
+ "command-budget:check": "node ./scripts/check-command-module-budget.mjs",
46
+ "pipeline-budget:check": "node ./scripts/check-pipeline-budget.mjs",
44
47
  "sizecheck": "node ./scripts/sizecheck.mjs",
45
48
  "registry:check": "node ./scripts/release-registry-check.mjs",
46
49
  "feature:check": "node ./bin/sks.mjs features check --json",
47
50
  "all-features:selftest": "node ./bin/sks.mjs all-features selftest --mock --json",
48
51
  "all-features:execute-fixtures": "node ./bin/sks.mjs all-features selftest --mock --execute-fixtures --strict-artifacts --json",
52
+ "feature-fixtures:strict": "node ./bin/sks.mjs all-features selftest --mock --execute-fixtures --strict-artifacts --hermetic --json",
53
+ "scout-engines:check": "node ./bin/sks.mjs scouts engines --json",
54
+ "scouts:selftest": "node ./bin/sks.mjs scouts run latest --engine local-static --mock --json",
55
+ "scouts:check": "node ./bin/sks.mjs scouts validate latest --strict --json",
49
56
  "perf:cold-start": "node ./bin/sks.mjs perf cold-start --json",
50
57
  "perf:gate": "node ./scripts/perf-gate.mjs",
51
58
  "test": "node --test \"test/**/*.test.mjs\"",
52
59
  "test:unit": "node --test \"test/unit/**/*.test.mjs\"",
53
60
  "test:integration:mock": "node --test \"test/integration/**/*.test.mjs\"",
54
61
  "test:e2e:mock": "node --test \"test/e2e/**/*.test.mjs\"",
62
+ "test:real-scouts": "node --test \"test/real/**/*.test.mjs\"",
55
63
  "rust:check": "cargo check --manifest-path crates/sks-core/Cargo.toml",
56
64
  "rust:smoke": "node ./scripts/rust-smoke.mjs",
57
65
  "coverage": "node --experimental-test-coverage --test \"test/**/*.test.mjs\"",
58
- "release:check": "npm run repo-audit && npm run changelog:check && npm run cli-entrypoint:check && npm run legacy-free:check && npm run packcheck && npm run feature:check && npm run all-features:selftest && npm run all-features:execute-fixtures && npm run selftest && npm run test:unit && npm run test:integration:mock && npm run test:e2e:mock && npm run rust:check && npm run rust:smoke && npm run perf:gate && npm run sizecheck && npm run registry:check",
66
+ "release:check": "npm run repo-audit && npm run changelog:check && npm run cli-entrypoint:check && npm run legacy-free:check && npm run route-modularity:check && npm run command-budget:check && npm run pipeline-budget:check && npm run packcheck && npm run feature:check && npm run all-features:selftest && npm run scout-engines:check && npm run scouts:selftest && npm run scouts:check && npm run feature-fixtures:strict && npm run selftest && npm run test:unit && npm run test:integration:mock && npm run test:e2e:mock && npm run rust:check && npm run rust:smoke && npm run perf:gate && npm run sizecheck && npm run registry:check",
59
67
  "publish:dry": "npm run release:check && npm --cache /tmp/sks-npm-cache publish --dry-run --registry https://registry.npmjs.org/ --access public",
60
68
  "publish:npm": "npm --cache /tmp/sks-npm-cache publish --registry https://registry.npmjs.org/ --access public",
61
69
  "prepublishOnly": "npm run release:check && node ./scripts/release-registry-check.mjs --require-unpublished"
@@ -44,6 +44,8 @@ export const COMMANDS = {
44
44
  context7: { maturity: 'beta', summary: 'Context7 checks and docs', lazy: () => import('../commands/context7.mjs') },
45
45
  recallpulse: { maturity: 'labs', summary: 'RecallPulse evidence route', lazy: () => import('../commands/recallpulse.mjs') },
46
46
  pipeline: { maturity: 'beta', summary: 'Inspect pipeline missions', lazy: () => import('../commands/pipeline.mjs') },
47
+ scouts: { maturity: 'beta', summary: 'Run the default read-only 5-scout intake phase', lazy: () => import('../commands/scouts.mjs') },
48
+ scout: { maturity: 'beta', summary: 'Alias for scouts', lazy: () => import('../commands/scouts.mjs') },
47
49
  guard: { maturity: 'beta', summary: 'Check harness guard', lazy: () => import('../commands/guard.mjs') },
48
50
  conflicts: { maturity: 'beta', summary: 'Check harness conflicts', lazy: () => import('../commands/conflicts.mjs') },
49
51
  versioning: { maturity: 'stable', summary: 'Manage release version metadata', lazy: () => import('../commands/versioning.mjs') },
@@ -59,6 +61,7 @@ export const COMMANDS = {
59
61
  'proof-field': { maturity: 'beta', summary: 'Scan proof field', lazy: () => import('../commands/proof-field.mjs') },
60
62
  'skill-dream': { maturity: 'labs', summary: 'Track skill dream counters', lazy: () => import('../commands/skill-dream.mjs') },
61
63
  'code-structure': { maturity: 'labs', summary: 'Scan source structure', lazy: () => import('../commands/code-structure.mjs') },
64
+ rust: { maturity: 'beta', summary: 'Inspect optional Rust accelerator status and smoke parity', lazy: () => import('../commands/rust.mjs') },
62
65
  memory: { maturity: 'labs', summary: 'Run retention checks', lazy: () => import('../commands/memory.mjs') },
63
66
  gx: { maturity: 'labs', summary: 'Render/validate GX cartridges', lazy: () => import('../commands/gx.mjs') },
64
67
  db: { maturity: 'beta', summary: 'Inspect DB safety policy', lazy: () => import('../commands/db.mjs') },
@@ -2349,7 +2349,7 @@ export async function selftestCodexLb(tmp) {
2349
2349
  if (!codexLbLaunch.includes('sks-codex-lb.env')) throw new Error('selftest: tmux launch command does not source codex-lb env file');
2350
2350
  if (!codexLbLaunch.includes("'--model' 'gpt-5.5'")) throw new Error('selftest: tmux launch command without args did not force GPT-5.5');
2351
2351
  if (!codexLbLaunch.includes('SKS_TMUX_LOGO_ANIMATION') || !codexLbLaunch.includes('SNEAKOSCOPE CODEX')) throw new Error('selftest: tmux launch command does not include the animated SKS logo intro');
2352
- const madLaunchSource = await safeReadText(path.join(packageRoot(), 'src', 'core', 'commands', 'route-cli.mjs'));
2352
+ const madLaunchSource = await safeReadText(path.join(packageRoot(), 'src', 'core', 'commands', 'mad-sks-command.mjs'));
2353
2353
  if (!madLaunchSource.includes('const lb = await deps.maybePromptCodexLbSetupForLaunch(args)') || !madLaunchSource.includes("const launchLb = lb.status === 'present'") || !madLaunchSource.includes('codexLbImmediateLaunchOpts(cleanArgs, launchLb') || !madLaunchSource.includes('bypass_codex_lb') || !madLaunchSource.includes('model_provider="openai"') || !madLaunchSource.includes('codexLbFreshSession: true')) throw new Error('selftest: MAD launch does not sync codex-lb auth and fresh-session launch options');
2354
2354
 
2355
2355
  }
@@ -1,5 +1,5 @@
1
- import { researchCommand } from '../core/commands/route-cli.mjs';
1
+ import { autoresearchCommand } from '../core/commands/autoresearch-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'status', ...rest] = args;
4
- return researchCommand(sub, rest);
4
+ return autoresearchCommand(sub, rest);
5
5
  }
@@ -1,4 +1,4 @@
1
- import { codeStructureCommand } from '../core/commands/route-cli.mjs';
1
+ import { codeStructureCommand } from '../core/commands/code-structure-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'scan', ...rest] = args;
4
4
  return codeStructureCommand(sub, rest);
@@ -1,31 +1,5 @@
1
- import { projectRoot } from '../core/fsx.mjs';
2
- import { findLatestMission } from '../core/mission.mjs';
3
- import { flag } from '../cli/args.mjs';
4
- import { printJson } from '../cli/output.mjs';
5
- import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
1
+ import { computerUseCommand } from '../core/commands/computer-use-command.mjs';
6
2
 
7
3
  export async function run(command, args = []) {
8
- const root = await projectRoot();
9
- const missionArg = args.find((arg) => !String(arg).startsWith('--')) || 'latest';
10
- const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
11
- if (!missionId) {
12
- const result = { schema: 'sks.computer-use-evidence.v1', ok: false, status: 'missing_mission' };
13
- if (flag(args, '--json')) return printJson(result);
14
- console.error('No mission found.');
15
- process.exitCode = 1;
16
- return;
17
- }
18
- const route = command === 'cu' ? '$CU' : '$Computer-Use';
19
- const proof = await finalizeRouteWithProof(root, {
20
- missionId,
21
- route,
22
- mock: flag(args, '--mock'),
23
- requireRelation: flag(args, '--fix-claim') || flag(args, '--require-relation'),
24
- artifacts: ['computer-use-evidence-ledger.json', 'screen-capture-ledger.json', 'image-voxel-ledger.json', 'visual-anchors.json'],
25
- claims: [{ id: 'computer-use-evidence', status: flag(args, '--mock') ? 'verified_partial' : 'supported' }]
26
- });
27
- const result = { schema: 'sks.computer-use-evidence.v1', ok: proof.ok, mission_id: missionId, route, proof: proof.validation };
28
- if (flag(args, '--json')) return printJson(result);
29
- console.log(`Computer Use evidence: ${proof.ok ? 'ok' : 'blocked'} ${missionId}`);
30
- if (!proof.ok) process.exitCode = 1;
4
+ return computerUseCommand(command, args);
31
5
  }
@@ -1,4 +1,4 @@
1
- import { dbCommand } from '../core/commands/route-cli.mjs';
1
+ import { dbCommand } from '../core/commands/db-command.mjs';
2
2
 
3
3
  export async function run(_command, args = []) {
4
4
  const [sub = 'policy', ...rest] = args;
@@ -51,7 +51,7 @@ export async function run(_command, args = []) {
51
51
  console.log(`Root: ${root}`);
52
52
  console.log(`Node: ${result.node.ok ? 'ok' : 'fail'} ${result.node.version}`);
53
53
  console.log(`Codex: ${codex.bin ? 'ok' : 'missing'} ${codex.version || ''}`);
54
- console.log(`Rust acc.: ${rust.available ? rust.version : 'optional-missing'}`);
54
+ console.log(`Rust acc.: ${rust.mode || (rust.available ? 'rust_accelerated' : 'js_fallback')} ${rust.version || rust.status || ''}`);
55
55
  console.log(`Codex App: ${codexApp.ok ? 'ok' : 'needs setup'}`);
56
56
  console.log(`codex-lb: ${codexLb.ok ? 'ok' : `blocked ${codexLb.circuit?.state || 'unknown'}`}`);
57
57
  console.log(`Ready: ${result.ok ? 'yes' : 'no'}`);
@@ -1,4 +1,4 @@
1
- import { evalCommand } from '../core/commands/route-cli.mjs';
1
+ import { evalCommand } from '../core/commands/eval-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'run', ...rest] = args;
4
4
  return evalCommand(sub, rest);
@@ -1,2 +1,2 @@
1
- import { gcCommand } from '../core/commands/route-cli.mjs';
1
+ import { gcCommand } from '../core/commands/gc-command.mjs';
2
2
  export async function run(_command, args = []) { return gcCommand(args); }
@@ -1,4 +1,4 @@
1
- import { goalCommand } from '../core/commands/route-cli.mjs';
1
+ import { goalCommand } from '../core/commands/goal-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub, ...rest] = args;
4
4
  return goalCommand(sub, rest);
@@ -1,4 +1,4 @@
1
- import { gxCommand } from '../core/commands/route-cli.mjs';
1
+ import { gxCommand } from '../core/commands/gx-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'validate', ...rest] = args;
4
4
  return gxCommand(sub, rest);
@@ -1,4 +1,4 @@
1
- import { harnessCommand } from '../core/commands/route-cli.mjs';
1
+ import { harnessCommand } from '../core/commands/harness-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'fixture', ...rest] = args;
4
4
  return harnessCommand(sub, rest);
@@ -1,4 +1,4 @@
1
- import { hproofCommand } from '../core/commands/route-cli.mjs';
1
+ import { hproofCommand } from '../core/commands/hproof-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'check', ...rest] = args;
4
4
  return hproofCommand(sub, rest);
@@ -1,38 +1,5 @@
1
- import path from 'node:path';
2
- import { projectRoot, readJson } from '../core/fsx.mjs';
3
- import { findLatestMission, loadMission } from '../core/mission.mjs';
4
- import { flag } from '../cli/args.mjs';
5
- import { printJson } from '../cli/output.mjs';
6
- import { writeImageUxReviewRouteArtifacts } from '../core/image-ux-review.mjs';
7
- import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
1
+ import { imageUxReviewCommand } from '../core/commands/image-ux-review-command.mjs';
8
2
 
9
3
  export async function run(command, args = []) {
10
- const root = await projectRoot();
11
- const action = args[0] || 'status';
12
- const missionArg = args[1] && !String(args[1]).startsWith('--') ? args[1] : 'latest';
13
- const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
14
- if (!missionId) {
15
- const result = { schema: 'sks.image-ux-review-status.v1', ok: false, status: 'missing_mission' };
16
- if (flag(args, '--json')) return printJson(result);
17
- console.error('No mission found.');
18
- process.exitCode = 1;
19
- return;
20
- }
21
- const { dir, mission } = await loadMission(root, missionId);
22
- const contract = await readJson(path.join(dir, 'decision-contract.json'), { prompt: mission.prompt, answers: {}, sealed_hash: null });
23
- if (action === 'build' || action === 'run' || (action === 'status' && flag(args, '--mock'))) {
24
- const artifacts = await writeImageUxReviewRouteArtifacts(dir, contract);
25
- const route = command === 'ux-review' ? '$UX-Review' : command === 'visual-review' ? '$Visual-Review' : command === 'ui-ux-review' ? '$UI-UX-Review' : '$Image-UX-Review';
26
- const proof = await finalizeRouteWithProof(root, { missionId, route, mock: flag(args, '--mock'), artifacts: Object.keys(artifacts), claims: [{ id: 'image-ux-review-fixture', status: 'verified_partial' }] });
27
- const result = { schema: 'sks.image-ux-review-build.v1', ok: proof.ok, mission_id: missionId, artifacts, proof: proof.validation };
28
- if (flag(args, '--json')) return printJson(result);
29
- console.log(`Image UX review: ${proof.ok ? 'ok' : 'blocked'} ${missionId}`);
30
- if (!proof.ok) process.exitCode = 1;
31
- return;
32
- }
33
- const gate = await readJson(path.join(dir, 'image-ux-review-gate.json'), null);
34
- const result = { schema: 'sks.image-ux-review-status.v1', ok: true, mission_id: missionId, gate };
35
- if (flag(args, '--json')) return printJson(result);
36
- console.log(`Image UX Review mission: ${missionId}`);
37
- console.log(`Gate: ${gate?.passed ? 'passed' : gate ? 'present' : 'missing'}`);
4
+ return imageUxReviewCommand(command, args);
38
5
  }
@@ -1,4 +1,4 @@
1
- import { madHighCommand } from '../core/commands/route-cli.mjs';
1
+ import { madHighCommand } from '../core/commands/mad-sks-command.mjs';
2
2
  import { maybePromptCodexUpdateForLaunch, maybePromptCodexLbSetupForLaunch } from '../cli/install-helpers.mjs';
3
3
  import { PACKAGE_VERSION } from '../core/fsx.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { memoryCommand } from '../core/commands/route-cli.mjs';
1
+ import { memoryCommand } from '../core/commands/gc-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub, ...rest] = args;
4
4
  return memoryCommand(sub, rest);
@@ -25,7 +25,7 @@ export async function run(_command, args = []) {
25
25
  if (!result.ok) process.exitCode = 1;
26
26
  return;
27
27
  }
28
- const { perfCommand } = await import('../core/commands/route-cli.mjs');
28
+ const { perfCommand } = await import('../core/commands/perf-command.mjs');
29
29
  return perfCommand(action, args.slice(1));
30
30
  }
31
31
 
@@ -1,25 +1,5 @@
1
- import { projectRoot, readJson } from '../core/fsx.mjs';
2
- import { stateFile } from '../core/mission.mjs';
3
- import { flag } from '../cli/args.mjs';
4
- import { printJson } from '../cli/output.mjs';
5
- import { projectGateStatus } from '../core/pipeline.mjs';
1
+ import { pipelineCommand } from '../core/commands/pipeline-command.mjs';
6
2
 
7
3
  export async function run(_command, args = []) {
8
- const root = await projectRoot();
9
- const action = args[0] || 'status';
10
- const state = await readJson(stateFile(root), {});
11
- if (action === 'status') {
12
- const result = { schema: 'sks.pipeline-status.v1', ok: true, state };
13
- if (flag(args, '--json')) return printJson(result);
14
- console.log(`Pipeline: ${state.mission_id || 'none'} ${state.route_command || state.mode || ''}`.trim());
15
- return;
16
- }
17
- if (action === 'plan') {
18
- const result = await projectGateStatus(root, state);
19
- if (flag(args, '--json')) return printJson(result);
20
- console.log(`Pipeline gate: ${result.ok ? 'pass' : 'blocked'}`);
21
- return;
22
- }
23
- console.error('Usage: sks pipeline status|plan [--json]');
24
- process.exitCode = 1;
4
+ return pipelineCommand(args);
25
5
  }
@@ -1,44 +1,5 @@
1
- import path from 'node:path';
2
- import { projectRoot, readJson, writeJsonAtomic } from '../core/fsx.mjs';
3
- import { findLatestMission, loadMission } from '../core/mission.mjs';
4
- import { flag } from '../cli/args.mjs';
5
- import { printJson } from '../cli/output.mjs';
6
- import { writePptBuildArtifacts, writePptRouteArtifacts } from '../core/ppt.mjs';
7
- import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
1
+ import { pptCommand } from '../core/commands/ppt-command.mjs';
8
2
 
9
- export async function run(_command, args = []) {
10
- const root = await projectRoot();
11
- const action = args[0] || 'status';
12
- const missionArg = args[1] && !String(args[1]).startsWith('--') ? args[1] : 'latest';
13
- const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
14
- if (!missionId) {
15
- const result = { schema: 'sks.ppt-status.v1', ok: false, status: 'missing_mission' };
16
- if (flag(args, '--json')) return printJson(result);
17
- console.error('No mission found.');
18
- process.exitCode = 1;
19
- return;
20
- }
21
- const { dir, mission } = await loadMission(root, missionId);
22
- const contract = await readJson(path.join(dir, 'decision-contract.json'), { prompt: mission.prompt, answers: {}, sealed_hash: null });
23
- if (action === 'build') {
24
- await writePptRouteArtifacts(dir, contract);
25
- const build = await writePptBuildArtifacts(dir, contract);
26
- const proof = await finalizeRouteWithProof(root, { missionId, route: '$PPT', mock: flag(args, '--mock'), artifacts: build.files || [], claims: [{ id: 'ppt-build-fixture', status: 'verified_partial' }] });
27
- const result = { schema: 'sks.ppt-build.v1', ok: proof.ok, mission_id: missionId, build, proof: proof.validation };
28
- if (flag(args, '--json')) return printJson(result);
29
- console.log(`PPT build: ${proof.ok ? 'ok' : 'blocked'} ${missionId}`);
30
- if (!proof.ok) process.exitCode = 1;
31
- return;
32
- }
33
- if (action === 'status') {
34
- const gate = await readJson(path.join(dir, 'ppt-gate.json'), null);
35
- const result = { schema: 'sks.ppt-status.v1', ok: true, mission_id: missionId, gate };
36
- if (flag(args, '--json')) return printJson(result);
37
- console.log(`PPT mission: ${missionId}`);
38
- console.log(`Gate: ${gate?.passed ? 'passed' : gate ? 'present' : 'missing'}`);
39
- return;
40
- }
41
- await writeJsonAtomic(path.join(dir, 'ppt-command-error.json'), { action, args });
42
- console.error('Usage: sks ppt build|status <mission-id|latest> [--json] [--mock]');
43
- process.exitCode = 1;
3
+ export async function run(command, args = []) {
4
+ return pptCommand(command, args);
44
5
  }
@@ -1,4 +1,4 @@
1
- import { profileCommand } from '../core/commands/route-cli.mjs';
1
+ import { profileCommand } from '../core/commands/profile-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'show', ...rest] = args;
4
4
  return profileCommand(sub, rest);
@@ -1,4 +1,4 @@
1
- import { proofFieldCommand } from '../core/commands/route-cli.mjs';
1
+ import { proofFieldCommand } from '../core/commands/proof-field-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'scan', ...rest] = args;
4
4
  return proofFieldCommand(sub, rest);
@@ -1,4 +1,4 @@
1
- import { qaLoopCommand } from '../core/commands/route-cli.mjs';
1
+ import { qaLoopCommand } from '../core/commands/qa-loop-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub, ...rest] = args;
4
4
  return qaLoopCommand(sub, rest);
@@ -1,5 +1,6 @@
1
- import { recallPulseCommand } from '../cli/recallpulse-command.mjs';
1
+ import { recallpulseCommand } from '../core/commands/recallpulse-command.mjs';
2
+
2
3
  export async function run(_command, args = []) {
3
4
  const [sub = 'status', ...rest] = args;
4
- return recallPulseCommand(sub, rest);
5
+ return recallpulseCommand(sub, rest);
5
6
  }
@@ -1,4 +1,4 @@
1
- import { researchCommand } from '../core/commands/route-cli.mjs';
1
+ import { researchCommand } from '../core/commands/research-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub, ...rest] = args;
4
4
  return researchCommand(sub, rest);
@@ -0,0 +1,5 @@
1
+ import { rustCommand } from '../core/commands/rust-command.mjs';
2
+
3
+ export async function run(_command, args = []) {
4
+ return rustCommand(args);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { scoutsCommand } from '../core/commands/scouts-command.mjs';
2
+
3
+ export async function run(_command, args = []) {
4
+ return scoutsCommand(args);
5
+ }
@@ -1,4 +1,4 @@
1
- import { skillDreamCommand } from '../core/commands/route-cli.mjs';
1
+ import { skillDreamCommand } from '../core/commands/skill-dream-command.mjs';
2
2
  export async function run(_command, args = []) {
3
3
  const [sub = 'status', ...rest] = args;
4
4
  return skillDreamCommand(sub, rest);
@@ -1,2 +1,2 @@
1
- import { statsCommand } from '../core/commands/route-cli.mjs';
1
+ import { statsCommand } from '../core/commands/gc-command.mjs';
2
2
  export async function run(_command, args = []) { return statsCommand(args); }
@@ -1,2 +1,2 @@
1
- import { team } from '../core/commands/route-cli.mjs';
1
+ import { team } from '../core/commands/team-command.mjs';
2
2
  export async function run(_command, args = []) { return team(args); }
@@ -1,2 +1,2 @@
1
- import { validateArtifactsCommand } from '../core/commands/route-cli.mjs';
1
+ import { validateArtifactsCommand } from '../core/commands/validate-artifacts-command.mjs';
2
2
  export async function run(_command, args = []) { return validateArtifactsCommand(args); }
@@ -1,95 +1,6 @@
1
- import path from 'node:path';
2
- import { projectRoot } from '../core/fsx.mjs';
3
- import { flag, readOption } from '../cli/args.mjs';
4
- import { printJson } from '../cli/output.mjs';
5
- import { addImageRelation, addVisualAnchor, ingestImage, imageVoxelSummary, readImageVoxelLedger } from '../core/wiki-image/image-voxel-ledger.mjs';
6
- import { imageVoxelProofEvidence } from '../core/wiki-image/proof-linker.mjs';
7
- import { validateImageVoxelLedger } from '../core/wiki-image/validation.mjs';
1
+ import { wikiCommand } from '../core/commands/wiki-command.mjs';
8
2
 
9
3
  export async function run(_command, args = []) {
10
- const root = await projectRoot();
11
- const action = args[0] || 'help';
12
- if (action === 'image-ingest') {
13
- const imagePath = args.find((arg, i) => i > 0 && !String(arg).startsWith('--'));
14
- const result = await ingestImage(root, imagePath, {
15
- source: readOption(args, '--source', 'manual'),
16
- missionId: readOption(args, '--mission-id', null)
17
- });
18
- if (flag(args, '--json')) return printJson(result);
19
- console.log(`Image ingested: ${result.image.id}`);
20
- console.log(`Ledger: ${path.relative(root, path.join(root, '.sneakoscope', 'wiki', 'image-voxel-ledger.json'))}`);
21
- if (!result.ok) process.exitCode = 1;
22
- return;
23
- }
24
- if (action === 'image-validate') {
25
- const ledgerPath = args.find((arg, i) => i > 0 && !String(arg).startsWith('--'));
26
- const ledger = await readImageVoxelLedger(root, ledgerPath ? path.resolve(root, ledgerPath) : undefined);
27
- const result = { schema: 'sks.image-voxel-validation.v1', ...validateImageVoxelLedger(ledger, {
28
- requireAnchors: flag(args, '--require-anchors'),
29
- requireRelations: flag(args, '--require-relations'),
30
- route: readOption(args, '--route', '$Wiki')
31
- }) };
32
- if (flag(args, '--json')) return printJson(result);
33
- console.log(`Image voxel ledger: ${result.ok ? 'pass' : 'blocked'}`);
34
- for (const issue of result.issues) console.log(`- ${issue}`);
35
- if (!result.ok) process.exitCode = 1;
36
- return;
37
- }
38
- if (action === 'image-summary') {
39
- const result = await imageVoxelSummary(root);
40
- if (flag(args, '--json')) return printJson(result);
41
- console.log(`Images: ${result.images}`);
42
- console.log(`Anchors: ${result.anchors}`);
43
- console.log(`Relations: ${result.relations}`);
44
- if (!result.ok) process.exitCode = 1;
45
- return;
46
- }
47
- if (action === 'anchor-add') {
48
- const result = await addVisualAnchor(root, {
49
- imageId: readOption(args, '--image-id', null),
50
- bbox: parseBbox(readOption(args, '--bbox', '')),
51
- label: readOption(args, '--label', 'Visual anchor'),
52
- source: readOption(args, '--source', 'manual'),
53
- evidencePath: readOption(args, '--evidence', null),
54
- route: readOption(args, '--route', '$Wiki'),
55
- claimId: readOption(args, '--claim-id', null),
56
- missionId: readOption(args, '--mission-id', null)
57
- });
58
- if (flag(args, '--json')) return printJson(result);
59
- console.log(`Visual anchor: ${result.ok ? 'added' : 'blocked'} ${result.anchor.id}`);
60
- for (const issue of result.validation.issues) console.log(`- ${issue}`);
61
- if (!result.ok) process.exitCode = 1;
62
- return;
63
- }
64
- if (action === 'relation-add') {
65
- const result = await addImageRelation(root, {
66
- type: readOption(args, '--type', 'before_after'),
67
- beforeImageId: readOption(args, '--before', null),
68
- afterImageId: readOption(args, '--after', null),
69
- anchors: String(readOption(args, '--anchors', '') || '').split(',').map((x) => x.trim()).filter(Boolean),
70
- verification: readOption(args, '--verification', 'changed-screen-recheck'),
71
- status: readOption(args, '--status', 'verified_partial'),
72
- route: readOption(args, '--route', '$Wiki'),
73
- missionId: readOption(args, '--mission-id', null)
74
- });
75
- if (flag(args, '--json')) return printJson(result);
76
- console.log(`Image relation: ${result.ok ? 'added' : 'blocked'} ${result.relation.type}`);
77
- for (const issue of result.validation.issues) console.log(`- ${issue}`);
78
- if (!result.ok) process.exitCode = 1;
79
- return;
80
- }
81
- if (action === 'image-link-proof') {
82
- const result = await imageVoxelProofEvidence(root);
83
- if (flag(args, '--json')) return printJson(result);
84
- console.log(`Image voxel proof link: ${result.ok ? 'ok' : 'blocked'}`);
85
- if (!result.ok) process.exitCode = 1;
86
- return;
87
- }
88
- const { wikiCommand } = await import('../core/commands/route-cli.mjs');
89
- return wikiCommand(action, args.slice(1));
90
- }
91
-
92
- function parseBbox(raw) {
93
- const parts = String(raw || '').split(',').map((part) => Number(part.trim()));
94
- return parts.length === 4 && parts.every(Number.isFinite) ? parts : null;
4
+ const [sub = 'help', ...rest] = args;
5
+ return wikiCommand(sub, rest);
95
6
  }
@@ -0,0 +1,5 @@
1
+ import { researchCommand } from './research-command.mjs';
2
+
3
+ export async function autoresearchCommand(sub, args = []) {
4
+ return researchCommand(sub || 'status', args);
5
+ }