sneakoscope 2.0.17 โ†’ 3.0.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 (56) hide show
  1. package/README.md +135 -90
  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/dist/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/commands/doctor.js +39 -1
  8. package/dist/commands/mad-sks.js +2 -0
  9. package/dist/commands/zellij.js +58 -1
  10. package/dist/core/agents/agent-effort-policy.js +7 -1
  11. package/dist/core/agents/agent-scheduler.js +32 -24
  12. package/dist/core/agents/native-cli-session-swarm.js +22 -2
  13. package/dist/core/codex-app/codex-app-handoff.js +98 -0
  14. package/dist/core/codex-app/codex-app-launcher.js +103 -0
  15. package/dist/core/codex-control/codex-0138-capability.js +102 -0
  16. package/dist/core/codex-control/codex-model-capabilities.js +62 -0
  17. package/dist/core/codex-control/codex-model-metadata.js +91 -0
  18. package/dist/core/codex-control/codex-sdk-config-policy.js +1 -1
  19. package/dist/core/codex-control/codex-task-runner.js +1 -1
  20. package/dist/core/codex-plugins/codex-plugin-cache.js +38 -0
  21. package/dist/core/codex-plugins/codex-plugin-diff.js +73 -0
  22. package/dist/core/codex-plugins/codex-plugin-json.js +176 -0
  23. package/dist/core/commands/mad-sks-command.js +8 -0
  24. package/dist/core/commands/naruto-command.js +30 -1
  25. package/dist/core/commands/qa-loop-command.js +147 -5
  26. package/dist/core/doctor/codex-0138-doctor.js +104 -0
  27. package/dist/core/doctor/doctor-readiness-matrix.js +11 -0
  28. package/dist/core/effort-orchestrator.js +9 -0
  29. package/dist/core/fsx.js +1 -1
  30. package/dist/core/hooks-runtime.js +6 -9
  31. package/dist/core/image/image-artifact-path-contract.js +101 -0
  32. package/dist/core/image/image-artifact-registry.js +33 -0
  33. package/dist/core/image-ux-review/imagegen-adapter.js +49 -17
  34. package/dist/core/mad-db/mad-db-result-lifecycle.js +71 -0
  35. package/dist/core/mcp/mcp-plugin-inventory.js +29 -0
  36. package/dist/core/mcp/mcp-server-policy.js +24 -0
  37. package/dist/core/qa-loop/qa-loop-app-handoff-confirmation.js +51 -0
  38. package/dist/core/qa-loop/qa-loop-budget-policy.js +37 -0
  39. package/dist/core/qa-loop.js +70 -3
  40. package/dist/core/release/release-gate-cache-v2.js +47 -5
  41. package/dist/core/usage/codex-account-usage.js +139 -0
  42. package/dist/core/version.js +1 -1
  43. package/dist/core/zellij/zellij-slot-column-anchor.js +16 -7
  44. package/dist/core/zellij/zellij-slot-pane-renderer.js +23 -2
  45. package/dist/core/zellij/zellij-slot-telemetry.js +65 -12
  46. package/dist/core/zellij/zellij-ui-mode.js +8 -1
  47. package/dist/core/zellij/zellij-update.js +307 -0
  48. package/dist/core/zellij/zellij-worker-pane-manager.js +211 -145
  49. package/dist/scripts/release-gate-existence-audit.js +5 -1
  50. package/package.json +46 -3
  51. package/schemas/codex-app/codex-app-handoff.schema.json +20 -0
  52. package/schemas/codex-plugins/codex-plugin-inventory.schema.json +32 -0
  53. package/schemas/image/image-artifact-path-contract.schema.json +32 -0
  54. package/schemas/usage/codex-account-usage.schema.json +27 -0
  55. package/dist/core/naruto/naruto-work-stealing.js +0 -11
  56. package/dist/core/zellij/zellij-right-column-layout-proof.js +0 -42
package/README.md CHANGED
@@ -1,10 +1,31 @@
1
- # Sneakoscope Codex
1
+ <div align="center">
2
2
 
3
- Fast legacy-free proof-first Codex trust layer with image-based Voxel TriWiki.
3
+ # ๐Ÿ”ญ Sneakoscope Codex
4
4
 
5
- Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex work auditable.
5
+ **Proof-first Codex orchestration โ€” massive parallel agent swarms you can actually watch, audit, and trust.**
6
6
 
7
- SKS does not try to clone every other harness. It focuses on one thing: making Codex work auditable, visual-evidence-bound, safety-gated, and reproducible through Completion Proof.
7
+ [![npm version](https://img.shields.io/npm/v/sneakoscope?color=cb3837&logo=npm)](https://www.npmjs.com/package/sneakoscope)
8
+ [![node](https://img.shields.io/badge/node-%3E%3D20.11-339933?logo=node.js&logoColor=white)](#requirements)
9
+ [![license](https://img.shields.io/badge/license-MIT-blue)](#license)
10
+ [![zellij](https://img.shields.io/badge/UI-Zellij%20stacked%20panes-1e90ff)](#mad-zellij-launch)
11
+
12
+ `npm i -g sneakoscope` โ†’ `sks --mad` โ†’ watch up to **100 shadow-clone workers** code in parallel,<br/>each in a live Zellij pane, every claim backed by Completion Proof.
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ Sneakoscope Codex (`sks`) is a Codex CLI/App harness that makes repeatable Codex work **auditable**. It does not try to clone every other harness. It focuses on one thing relentlessly: Codex work becomes visual-evidence-bound, safety-gated, and reproducible through Completion Proof.
19
+
20
+ | | What you get |
21
+ | --- | --- |
22
+ | ๐Ÿฅ **`$Naruto` swarm** | Up to 100 parallel clone workers behind a hardware-safe concurrency governor, lease-based parallel writes, and a scheduler that backfills idle slots while runnable work remains |
23
+ | ๐Ÿ–ฅ๏ธ **Live Zellij cockpit** | Workers stack vertically as native Zellij stacked panes; each pane streams heartbeat, current file, tool events, and stdout tails every second |
24
+ | ๐Ÿงพ **Completion Proof** | Every serious route ends with schema-backed proof artifacts โ€” no "trust me, it's done" |
25
+ | ๐Ÿ›ก๏ธ **Safety gates** | DB/migration/destructive operations stay gated, 190+ release gate scripts, Honest Mode |
26
+ | ๐Ÿ–ผ๏ธ **Visual evidence** | Image Voxel TriWiki plus `$imagegen`/`gpt-image-2`-bound visual review flows |
27
+
28
+ ![Sneakoscope Codex Trust Layer](docs/assets/sneakoscope-architecture-pipeline.jpg)
8
29
 
9
30
  ## LLM Init Prompt for Hermes / OpenClaw Agent Builders
10
31
 
@@ -12,47 +33,34 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
12
33
  Set up this agent project with Sneakoscope Codex. Use [[mandarange/Sneakoscope-Codex](https://github.com/mandarange/Sneakoscope-Codex)] as the repo reference and [npm i -g sneakoscope] as the recommended global install command, then run the appropriate `sks` setup, doctor, Codex App, and proof checks for this repo. Keep generated SKS state out of source control unless documented, and record every version-facing change in CHANGELOG.md.
13
34
  ```
14
35
 
15
- ![Sneakoscope Codex Trust Layer](docs/assets/sneakoscope-architecture-pipeline.jpg)
16
-
17
- ## Current Release
36
+ ## ๐Ÿš€ Current Release
18
37
 
19
- SKS **2.0.17** is the micro-hardening release for strict production PID proof, true scheduler active-time utilization, live Zellij slot telemetry freshness, Mad-DB result lifecycle audit, and unified runtime/release proof summaries.
38
+ SKS **3.0.0** is the parallel-runtime stabilization release. The whole live-swarm experience โ€” what you actually *see* while 5, 20, or 100 workers run โ€” was rebuilt and proven end-to-end.
20
39
 
21
40
  What changed:
22
41
 
23
- - Zellij slot panes distinguish `slot_status_renderer` panes from Codex worker panes, and the first visible worker now stacks downward below the `SLOTS` anchor with real geometry proof available under `real-check`.
24
- - Naruto allocation owners now flow into work graph items, scheduler slices, queue ownership, and worker runtime proof; inactive owners are rebalanced and active write conflicts stay out of concurrent execution.
25
- - Naruto active-pool checks now exercise actual child-worker spawn/result collection paths while production source-of-truth stays with the agent orchestrator scheduler.
26
- - Worktree candidate output requires GPT Final approval before apply; GPT `modified` output replaces candidate patches and GPT `rejected` blocks apply.
27
- - Visible Zellij reservations are capped before pane launch so concurrent worker starts cannot over-open the right column.
28
- - Git worktree integration now proves the primary repo receives validated worktree diffs, with rollback hash evidence recorded around the apply step.
29
- - Agent role config repair detects stale generated role files and rewrites structured GPT-5.5-compatible configs atomically.
30
- - Release gates now include slot-only UI, compact slot renderer, headless overflow, role-config repair, worktree primary-runtime, real active-pool, extreme real parallelism, and real right-column geometry checks.
31
- - Release audit, dynamic selection, and stamp hashing use `release-gates.v2.json` as the manifest source of truth.
32
- - Git capability checks detect repo roots, Git dirs, worktree support, and safe cache roots while blocking in-repo worktree roots unless `SKS_ALLOW_IN_REPO_WORKTREES=1` is explicit.
33
- - Worker worktree allocation creates isolated branches/paths under `$SKS_WORKTREE_ROOT`, `$XDG_CACHE_HOME/sks/worktrees`, or `~/.cache/sks/worktrees`; main checkouts stay untouched until integration.
34
- - Product Design plugin readiness now checks both local and remote Codex App catalogs, auto-installs the remote plugin when needed, and records the installed/enabled skill surface.
35
- - UI/design/PPT runtime routes prefer Product Design for research, ideation, audit, design QA, prototype, URL-to-code, image-to-code, share, and user-context steps.
36
- - Naruto read-only runs force write mode off, propagate no-patch reasons through worker proof, and skip changed-file lease checks when no write-capable patch envelope exists.
37
- - `codex-sdk` is the default native agent backend for Team, QA, Research, Naruto, MAD-SKS, and direct agent runs, with every runtime task entering through `runCodexTask`.
38
- - Codex App UI snapshot, preservation, clobber guard, and doctor repair checks protect host-owned Fast UI/profile settings around `sks --mad`.
39
- - Provider context resolves `openai`, `codex-lb`, and `codex-app` with badge/fallback surfaces while avoiding private Codex App UI mutation.
40
- - UltraRouter writes `ultra-router-proof.json` decisions with tier, scores, hard filters, cache state, and cheapest-good-enough profile selection.
41
- - Reliability Shield writes `codex-reliability-shield.json` for empty-result retry, stream-idle blocking, tool-result repair, and no-CoT keepalive heartbeats.
42
- - Raw `codex exec` execution is removed from runtime fallback paths; explicit legacy requests are blocked with `legacy_codex_exec_runtime_removed`.
43
- - SDK runs write `codex-control-proof.json`, `codex-thread-registry.json`, `codex-sdk-events.jsonl`, and schema-validated worker results.
44
- - Zellij proof now links `pane_id`, `slot_id`, `generation_index`, `session_id`, `sdk_thread_id`, provider, and `service_tier`.
45
- - Production runtime scripts are TypeScript source under `src/scripts` and build to `dist/scripts`; Python remains optional diagnostics under `pytools`.
46
- - Release gates include `codex-control:*`, `ultra-router:*`, `codex-sdk:*`, Codex App Fast UI preservation, provider badges, Zellij spawn-on-demand, slot/pane binding, release truth, and real smoke checks.
47
- - Research synthesis is now evidence-bound in non-mock runs; deterministic report generation is mock/fallback only.
48
- - Research quality checks reject repeated paragraphs, template-like prose, low source density, low claim density, and thin implementation sections.
49
- - Research handoffs now include context, key claims, evidence summary, blueprint sections, parallel work items, acceptance tests, rollback, and source appendix for `$Team` or `$Naruto`.
42
+ - **Slot panes are finally alive.** The watch renderer froze for entire missions because the telemetry snapshot cache never invalidated; snapshot reads are now mtime-aware, multi-process flushes merge instead of clobbering each other, and the disk `updated_at` stays authoritative for stale detection.
43
+ - **One SLOTS column, vertical stack.** Concurrent workers used to race anchor creation and split the screen into N side-by-side columns. Anchor + worker pane creation is serialized per session, and workers join a native Zellij stacked-pane group (`new-pane --stacked`, opt out with `SKS_ZELLIJ_WORKER_STACKED=0`).
44
+ - **Live renderer is the default worker pane.** `full-debug` showed nothing until worker exit (workers run with `--json`); the default `compact-slots` renderer streams heartbeat, current file, tool events, and stdout tails every second.
45
+ - **Zellij stays current like Codex does.** `sks --mad` / `sks naruto run` offer a `[Y/n]` upgrade to the latest stable Zellij (GitHub releases lookup, 6h cache), plus an explicit `sks zellij update [--yes]` subcommand and `SKS_SKIP_ZELLIJ_UPDATE` escape.
46
+ - **Faster, honest dispatch.** Scheduler batch telemetry writes run concurrently per batch instead of serializing two file writes per worker; naruto backpressure throttling (50%/25% under host pressure) is reported in the run header instead of staying silent.
47
+ - **Wired, not decorative.** The naruto finalizer gate and the agent message bus now run in production paths; dead swarm code (`naruto-work-stealing`, `zellij-right-column-layout-proof`) was removed.
50
48
 
51
49
  Quick checks:
52
50
 
53
51
  ```bash
54
52
  npm run typecheck
55
53
  npm run build
54
+ npm run codex:0138-capability
55
+ npm run codex-sdk:version-compat
56
+ npm run codex-app:handoff
57
+ npm run codex-plugin:inventory
58
+ npm run qa-loop:app-handoff
59
+ npm run image:artifact-path-contract
60
+ npm run codex:effort-order
61
+ npm run codex:account-usage
62
+ npm run codex:0138-doctor
63
+ npm run doctor:codex-0138-fix
56
64
  npm run codex-control:capability
57
65
  npm run codex-control:structured-output
58
66
  npm run codex-control:event-stream-ledger
@@ -71,7 +79,7 @@ npm run codex-control:all-pipelines
71
79
 
72
80
  Broader release checks still live behind `npm run release:check`. Detailed release history is in [CHANGELOG.md](CHANGELOG.md), and release readiness is tracked in [docs/release-readiness.md](docs/release-readiness.md).
73
81
 
74
- ## Parallelism, UX, And Integrations
82
+ ## ๐Ÿฅ Parallelism, UX, And Integrations
75
83
 
76
84
  - **Extreme parallel fan-out (`$Naruto` / native agents).** Each clone is a separate CLI worker that spends almost all of its wall-clock awaiting the Codex API, so live concurrency scales by **memory and the provider rate limit, not CPU cores** โ€” a capable host can run up to 100 workers in parallel. The 429/rate-limit backoff is handled by the centralized responses retry policy. Tune it with `SKS_NARUTO_MAX_CONCURRENCY` (hard cap, 1โ€“100), `SKS_NARUTO_GB_PER_WORKER` (memory budget per worker), and `SKS_NARUTO_MIN_CONCURRENCY` (low-free-memory floor).
77
85
 
@@ -97,7 +105,7 @@ Broader release checks still live behind `npm run release:check`. Detailed relea
97
105
 
98
106
  - **CLI-only SKS update notices.** Codex App hooks no longer stop normal work to ask for an SKS update. CLI launch surfaces such as `sks --mad` print a non-blocking latest-version notice, `sks update-check` / `sks update check` show the explicit status, and `sks doctor --fix` runs the guarded global SKS update path before repair.
99
107
 
100
- ## Retention And Cleanup
108
+ ## ๐Ÿงน Retention And Cleanup
101
109
 
102
110
  SKS keeps durable learning context separate from disposable route work files. Durable context includes `.sneakoscope/memory/**`, shared TriWiki records, `.sneakoscope/wiki/context-pack.json`, wrongness memory, image voxels, avoidance rules, route Completion Proof, trust reports, evidence indexes, reflections, and agent proof summaries. These files are treated as the long-term learning and audit chain.
103
111
 
@@ -112,68 +120,105 @@ npm run retention:cleanup-safety
112
120
 
113
121
  The cleanup contract is policy-backed in `.sneakoscope/policy.json`, but the default posture is now immediate cleanup for short-lived temp files while preserving long-term SKS learning and proof artifacts.
114
122
 
115
- ## Documentation
123
+ ## ๐Ÿ“š Documentation
124
+
125
+ <details>
126
+ <summary><b>Core concepts & architecture</b> โ€” proof, trust, pipeline design</summary>
116
127
 
117
128
  - Completion Proof: [docs/completion-proof.md](docs/completion-proof.md)
118
- - TypeScript architecture: [docs/typescript-architecture.md](docs/typescript-architecture.md)
119
129
  - Trust Kernel: [docs/trust-kernel.md](docs/trust-kernel.md)
130
+ - Pipeline architecture: [docs/pipeline-architecture.md](docs/pipeline-architecture.md)
131
+ - TypeScript architecture: [docs/typescript-architecture.md](docs/typescript-architecture.md)
132
+ - Runtime truth matrix: [docs/runtime-truth-matrix.md](docs/runtime-truth-matrix.md)
133
+ - Fake vs real proof policy: [docs/fake-vs-real-proof-policy.md](docs/fake-vs-real-proof-policy.md)
134
+ - Core dominance: [docs/core-dominance.md](docs/core-dominance.md)
135
+ - Permission kernel: [docs/permission-kernel.md](docs/permission-kernel.md)
136
+ - Immutable harness guard: [docs/immutable-harness-guard.md](docs/immutable-harness-guard.md)
137
+ - Package boundary: [docs/package-boundary.md](docs/package-boundary.md)
138
+ - Managed paths: [docs/managed-paths.md](docs/managed-paths.md)
139
+ - Performance budgets: [docs/performance-budgets.md](docs/performance-budgets.md)
140
+ - Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
141
+ - Rust accelerator: [docs/rust-accelerator.md](docs/rust-accelerator.md)
142
+
143
+ </details>
144
+
145
+ <details>
146
+ <summary><b>Agents & parallelism</b> โ€” Naruto swarm, worker panes, parallel writes</summary>
147
+
148
+ - Naruto massive parallel swarm: [docs/naruto.md](docs/naruto.md)
149
+ - Native Agent Kernel: [docs/native-agent-kernel.md](docs/native-agent-kernel.md)
150
+ - Native agent engines: [docs/native-agent-engines.md](docs/native-agent-engines.md)
151
+ - Native CLI Session Swarm: [docs/native-cli-session-swarm.md](docs/native-cli-session-swarm.md)
152
+ - No-subagent scaling: [docs/no-subagent-scaling.md](docs/no-subagent-scaling.md)
153
+ - Parallel write agents: [docs/parallel-write-agents.md](docs/parallel-write-agents.md)
154
+ - Agent patch queue: [docs/agent-patch-queue.md](docs/agent-patch-queue.md)
155
+ - Strategy-first parallel write: [docs/strategy-first-parallel-write.md](docs/strategy-first-parallel-write.md)
156
+ - Intelligent work graph: [docs/intelligent-work-graph.md](docs/intelligent-work-graph.md)
157
+ - Agent terminal lanes: [docs/agent-terminal-lanes.md](docs/agent-terminal-lanes.md)
158
+ - Agent cleanup executor: [docs/agent-cleanup-executor.md](docs/agent-cleanup-executor.md)
159
+ - MCP readOnly scheduler: [docs/mcp-readonly-scheduler.md](docs/mcp-readonly-scheduler.md)
160
+ - MAD-SKS: [docs/mad-sks.md](docs/mad-sks.md)
161
+ - MAD-SKS rollback: [docs/mad-sks-rollback.md](docs/mad-sks-rollback.md)
162
+ - ADHD orchestration gate: [docs/adhd-orchestrating-gate.md](docs/adhd-orchestrating-gate.md)
163
+ - Zellij migration: [docs/migration/tmux-to-zellij.md](docs/migration/tmux-to-zellij.md)
164
+
165
+ </details>
166
+
167
+ <details>
168
+ <summary><b>Memory & learning</b> โ€” TriWiki, wrongness memory, fixtures</summary>
169
+
120
170
  - TriWiki Wrongness Memory: [docs/triwiki-wrongness-memory.md](docs/triwiki-wrongness-memory.md)
121
- - Git collaboration: [docs/git-collaboration.md](docs/git-collaboration.md)
122
- - Git hygiene: [docs/git-hygiene.md](docs/git-hygiene.md)
123
171
  - Shared TriWiki: [docs/shared-triwiki.md](docs/shared-triwiki.md)
124
172
  - Shared Wrongness Memory: [docs/shared-wrongness-memory.md](docs/shared-wrongness-memory.md)
125
- - Git policy: [docs/git-policy.md](docs/git-policy.md)
126
173
  - Wrongness Learning Loop: [docs/wrongness-learning-loop.md](docs/wrongness-learning-loop.md)
127
- - Package boundary: [docs/package-boundary.md](docs/package-boundary.md)
128
- - Black-box package tests: [docs/black-box-package-tests.md](docs/black-box-package-tests.md)
129
- - Codex CLI compatibility: [docs/codex-cli-compat.md](docs/codex-cli-compat.md)
130
- - MAD-SKS rollback: [docs/mad-sks-rollback.md](docs/mad-sks-rollback.md)
131
- - MAD-SKS: [docs/mad-sks.md](docs/mad-sks.md)
132
- - Permission kernel: [docs/permission-kernel.md](docs/permission-kernel.md)
133
- - Immutable harness guard: [docs/immutable-harness-guard.md](docs/immutable-harness-guard.md)
174
+ - Image Voxel TriWiki: [docs/image-voxel-ledger.md](docs/image-voxel-ledger.md)
175
+ - Image Wrongness: [docs/image-wrongness.md](docs/image-wrongness.md)
176
+ - Feature fixtures: [docs/feature-fixtures.md](docs/feature-fixtures.md)
177
+
178
+ </details>
179
+
180
+ <details>
181
+ <summary><b>Codex integration</b> โ€” App, CLI compat, codex-lb, hooks</summary>
182
+
134
183
  - Codex App: [docs/codex-app.md](docs/codex-app.md)
135
- - Core dominance: [docs/core-dominance.md](docs/core-dominance.md)
136
- - Performance budgets: [docs/performance-budgets.md](docs/performance-budgets.md)
137
- - Native Agent Kernel: [docs/native-agent-kernel.md](docs/native-agent-kernel.md)
184
+ - Codex CLI compatibility: [docs/codex-cli-compat.md](docs/codex-cli-compat.md)
185
+ - Codex official Goal mode: [docs/codex-official-goal-mode.md](docs/codex-official-goal-mode.md)
186
+ - Codex App Hooks/PAT: [docs/hooks-pat.md](docs/hooks-pat.md)
187
+ - codex-lb: [docs/codex-lb.md](docs/codex-lb.md)
138
188
  - Source Intelligence Layer: [docs/source-intelligence-layer.md](docs/source-intelligence-layer.md)
139
189
  - X AI / Context7 / Codex Web policy: [docs/xai-context7-codex-web-policy.md](docs/xai-context7-codex-web-policy.md)
140
190
  - Main no-Scout / worker Scout policy: [docs/main-no-scout-worker-scout-policy.md](docs/main-no-scout-worker-scout-policy.md)
141
- - Agent terminal lanes: [docs/agent-terminal-lanes.md](docs/agent-terminal-lanes.md)
142
- - Zellij migration: [docs/migration/tmux-to-zellij.md](docs/migration/tmux-to-zellij.md)
143
191
  - Real Codex dynamic smoke: [docs/real-codex-dynamic-smoke.md](docs/real-codex-dynamic-smoke.md)
144
- - Agent cleanup executor: [docs/agent-cleanup-executor.md](docs/agent-cleanup-executor.md)
145
- - Intelligent work graph: [docs/intelligent-work-graph.md](docs/intelligent-work-graph.md)
146
- - Fake vs real proof policy: [docs/fake-vs-real-proof-policy.md](docs/fake-vs-real-proof-policy.md)
147
- - Runtime truth matrix: [docs/runtime-truth-matrix.md](docs/runtime-truth-matrix.md)
148
- - ADHD orchestration gate: [docs/adhd-orchestrating-gate.md](docs/adhd-orchestrating-gate.md)
149
- - Strategy-first parallel write: [docs/strategy-first-parallel-write.md](docs/strategy-first-parallel-write.md)
150
192
  - Appshots pipeline: [docs/appshots-pipeline.md](docs/appshots-pipeline.md)
151
193
  - Appshots thread attachments: [docs/appshots-thread-attachments.md](docs/appshots-thread-attachments.md)
152
- - MCP readOnly scheduler: [docs/mcp-readonly-scheduler.md](docs/mcp-readonly-scheduler.md)
153
- - Parallel write agents: [docs/parallel-write-agents.md](docs/parallel-write-agents.md)
154
- - Agent patch queue: [docs/agent-patch-queue.md](docs/agent-patch-queue.md)
155
- - Native CLI Session Swarm: [docs/native-cli-session-swarm.md](docs/native-cli-session-swarm.md)
156
- - No-subagent scaling: [docs/no-subagent-scaling.md](docs/no-subagent-scaling.md)
157
194
  - Fast mode default and `$Fast-On`/`$Fast-Off` toggles: [docs/fast-mode-default.md](docs/fast-mode-default.md)
158
- - Migration 1.18.7 to 1.18.8: [docs/migration-1.18.7-to-1.18.8.md](docs/migration-1.18.7-to-1.18.8.md)
159
- - Codex official Goal mode: [docs/codex-official-goal-mode.md](docs/codex-official-goal-mode.md)
195
+
196
+ </details>
197
+
198
+ <details>
199
+ <summary><b>Git & collaboration</b></summary>
200
+
201
+ - Git collaboration: [docs/git-collaboration.md](docs/git-collaboration.md)
202
+ - Git hygiene: [docs/git-hygiene.md](docs/git-hygiene.md)
203
+ - Git policy: [docs/git-policy.md](docs/git-policy.md)
204
+
205
+ </details>
206
+
207
+ <details>
208
+ <summary><b>Quality & release</b> โ€” gates, E2E, migrations, gaps</summary>
209
+
210
+ - Release readiness: [docs/release-readiness.md](docs/release-readiness.md)
160
211
  - Release parallel full coverage: [docs/release-parallel-full-coverage.md](docs/release-parallel-full-coverage.md)
161
212
  - Priority closure P0-P4: [docs/priority-closure-p0-p4.md](docs/priority-closure-p0-p4.md)
162
- - Image Voxel TriWiki: [docs/image-voxel-ledger.md](docs/image-voxel-ledger.md)
163
- - Image Wrongness: [docs/image-wrongness.md](docs/image-wrongness.md)
164
- - Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
165
- - Feature fixtures: [docs/feature-fixtures.md](docs/feature-fixtures.md)
166
- - Managed paths: [docs/managed-paths.md](docs/managed-paths.md)
213
+ - Black-box package tests: [docs/black-box-package-tests.md](docs/black-box-package-tests.md)
214
+ - Hermetic E2E: [docs/testing-hermetic-e2e.md](docs/testing-hermetic-e2e.md)
167
215
  - Rollback: [docs/rollback.md](docs/rollback.md)
168
216
  - Known gaps: [docs/known-gaps.md](docs/known-gaps.md)
169
- - Native agent engines: [docs/native-agent-engines.md](docs/native-agent-engines.md)
170
- - Hermetic E2E: [docs/testing-hermetic-e2e.md](docs/testing-hermetic-e2e.md)
171
- - Pipeline architecture: [docs/pipeline-architecture.md](docs/pipeline-architecture.md)
172
- - Rust accelerator: [docs/rust-accelerator.md](docs/rust-accelerator.md)
173
- - Codex App Hooks/PAT: [docs/hooks-pat.md](docs/hooks-pat.md)
174
- - codex-lb: [docs/codex-lb.md](docs/codex-lb.md)
217
+ - Migration 1.18.7 to 1.18.8: [docs/migration-1.18.7-to-1.18.8.md](docs/migration-1.18.7-to-1.18.8.md)
218
+
219
+ </details>
175
220
 
176
- ## 60-second start
221
+ ## โšก 60-Second Start
177
222
 
178
223
  Recommended install: use the global npm package so `sks` and the Codex App `$` skills are refreshed together.
179
224
 
@@ -192,13 +237,13 @@ sks selftest --mock
192
237
  sks rust smoke --json
193
238
  ```
194
239
 
195
- ## Three core promises
240
+ ## ๐Ÿค Three Core Promises
196
241
 
197
242
  1. Completion Proof for every serious route
198
243
  2. Image Voxel TriWiki anchors and relations for every visual route
199
244
  3. Route contracts, evidence indexes, wrongness memory, trust reports, Codex App, codex-lb, hooks, Rust fallback parity, DB, route modularity, and generated fixtures verified by release gates
200
245
 
201
- ## Install
246
+ ## ๐Ÿ“ฆ Install
202
247
 
203
248
  Recommended path:
204
249
 
@@ -243,7 +288,7 @@ sks commit --json
243
288
  sks selftest --mock
244
289
  ```
245
290
 
246
- ## What Sneakoscope Adds
291
+ ## ๐ŸŽ What Sneakoscope Adds
247
292
 
248
293
  `sks` adds a Zellij-backed Codex CLI runtime, Codex App `$` commands, Team/QA/PPT/Research/DB/GX/Wiki routes, OpenClaw and Hermes skill generation, Context7-gated current docs, TriWiki context packs, DB safety, design SSOT policy, skill dreaming, release checks, and Honest Mode.
249
294
 
@@ -279,7 +324,7 @@ Project setup writes shared `.gitignore` entries for generated SKS files: `.snea
279
324
 
280
325
  During npm postinstall, SKS installs generated Codex App skills and tries `skills add MohtashamMurshid/getdesign` when the `skills` CLI is available. Design work still flows through one authority: `design.md`.
281
326
 
282
- ## Terminal CLI Usage
327
+ ## ๐Ÿ’ป Terminal CLI Usage
283
328
 
284
329
  Use terminal commands when you want to inspect, set up, verify, or start a CLI-first workspace.
285
330
 
@@ -487,7 +532,7 @@ $PPT create a customer proposal deck as HTML/PDF
487
532
 
488
533
  `$PPT` seals presentation context before artifact work and grounds design in `design.md`, getdesign inputs, and source material. The route loads `imagegen`; when the sealed deck needs generated raster assets or generated slide visual critique, use Codex App `$imagegen`/`gpt-image-2` and record the real output path in the PPT image/review ledgers.
489
534
 
490
- ## Codex App Usage
535
+ ## ๐Ÿงฉ Codex App Usage
491
536
 
492
537
  Sneakoscope has two surfaces:
493
538
 
@@ -571,7 +616,7 @@ SKS does not install Git pre-commit hooks. Release metadata is changed only by e
571
616
 
572
617
  TriWiki is intentionally sparse: `sks wiki sweep` records demote, soft-forget, archive, delete, promote-to-skill, and promote-to-rule candidates instead of injecting every old claim into future prompts. `sks harness fixture` validates the broader Harness Growth Factory contract: deliberate forgetting fixtures, skill card metadata, experiment schema, tool-error taxonomy, permission profiles, MultiAgentV2 defaults, and tmux cockpit view coverage. `sks code-structure scan` flags handwritten files above 1000/2000/3000-line thresholds so new logic can be extracted before command files become harder to maintain.
573
618
 
574
- ## OpenClaw And Hermes Agent Usage
619
+ ## ๐Ÿค– OpenClaw And Hermes Agent Usage
575
620
 
576
621
  Sneakoscope can generate an OpenClaw skill package for agents that need to operate SKS-enabled repositories.
577
622
 
@@ -609,7 +654,7 @@ SKS_HERMES=1 sks dollar-commands --json
609
654
  SKS_HERMES=1 sks status --json
610
655
  ```
611
656
 
612
- ## Prompt `$` Commands
657
+ ## ๐Ÿ’ฌ Prompt `$` Commands
613
658
 
614
659
  Use these inside Codex App or another agent prompt. They are prompt commands, not terminal commands.
615
660
 
@@ -617,7 +662,7 @@ Common prompts: `$Team`, `$From-Chat-IMG`, `$with-local-llm-on`, `$with-local-ll
617
662
 
618
663
  `$MAD-DB` is the prompt-visible Mad-DB alias for one-cycle DB break-glass work. It maps to the same guarded MAD-SKS permission route, while the terminal lifecycle remains `sks mad-db status|enable|revoke`; it is not a permanent DB unlock and catastrophic DB safeguards remain active.
619
664
 
620
- ## Common Workflows
665
+ ## ๐Ÿ” Common Workflows
621
666
 
622
667
  First install:
623
668
 
@@ -646,7 +691,7 @@ sks wiki refresh
646
691
  sks wiki validate .sneakoscope/wiki/context-pack.json
647
692
  ```
648
693
 
649
- ## Safety Model
694
+ ## ๐Ÿ›ก๏ธ Safety Model
650
695
 
651
696
  Sneakoscope intentionally treats these as high-risk:
652
697
 
@@ -658,7 +703,7 @@ Sneakoscope intentionally treats these as high-risk:
658
703
 
659
704
  By default, SKS favors inspection, local files, branch-safe changes, explicit confirmation for destructive DB operations, and completion claims backed by tests or artifacts.
660
705
 
661
- ## Troubleshooting
706
+ ## ๐Ÿ”ง Troubleshooting
662
707
 
663
708
  ### `sks` points to an old version
664
709
 
@@ -744,7 +789,7 @@ sks wiki validate .sneakoscope/wiki/context-pack.json
744
789
 
745
790
  Finalization requires evidence, valid Team cleanup artifacts, reflection when required, and Honest Mode.
746
791
 
747
- ## Development And Release
792
+ ## ๐Ÿ—๏ธ Development And Release
748
793
 
749
794
  Run local checks:
750
795
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "2.0.17"
79
+ version = "3.0.0"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "2.0.17"
3
+ version = "3.0.0"
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 2.0.17"),
7
+ Some("--version") => println!("sks-rs 3.0.0"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "sks.dist-build-stamp.v1",
3
3
  "package_name": "sneakoscope",
4
- "package_version": "2.0.17",
5
- "source_digest": "1c6ef84350a97acdfd592ae544ec9054e2ee0a997076e725bc99b771c4693cf2",
6
- "source_file_count": 2201,
7
- "built_at_source_time": 1780974441836
4
+ "package_version": "3.0.0",
5
+ "source_digest": "4404689ab837df49f305f9fa2995c5301fefb9305f47cde1abec4613dcbbfeaa",
6
+ "source_file_count": 2262,
7
+ "built_at_source_time": 1781078944628
8
8
  }
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '2.0.17';
2
+ const FAST_PACKAGE_VERSION = '3.0.0';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--agent' && args[1] === 'worker') {
@@ -19,6 +19,10 @@ import { repairCodexAppFastUi } from '../core/codex-app/codex-app-fast-ui-repair
19
19
  import { resolveProviderContext } from '../core/provider/provider-context.js';
20
20
  import { readLocalModelConfig } from '../core/agents/ollama-worker-config.js';
21
21
  import { repairAgentRoleConfigs } from '../core/agents/agent-role-config.js';
22
+ import { writeCodex0138CapabilityArtifacts } from '../core/codex-control/codex-0138-capability.js';
23
+ import { runCodex0138Doctor } from '../core/doctor/codex-0138-doctor.js';
24
+ import { writeCodexPluginInventoryArtifacts, pluginAppTemplatePolicy } from '../core/codex-plugins/codex-plugin-json.js';
25
+ import { writeMcpPluginInventoryArtifacts } from '../core/mcp/mcp-plugin-inventory.js';
22
26
  export async function run(_command, args = []) {
23
27
  const doctorFix = flag(args, '--fix');
24
28
  let setupRepair = null;
@@ -167,6 +171,13 @@ export async function run(_command, args = []) {
167
171
  : null;
168
172
  const { detectImagegenCapability } = await import('../core/imagegen/imagegen-capability.js');
169
173
  const imagegen = await detectImagegenCapability({ codexBin: codexBin || undefined }).catch((err) => ({ ok: false, error: err.message, auth_readiness: null }));
174
+ const codex0138Capability = await writeCodex0138CapabilityArtifacts(root, { codexBin: codexBin || null }).catch((err) => ({ error: err?.message || String(err), report: null }));
175
+ const codex0138Doctor = await runCodex0138Doctor(root, { fix: doctorFix }).catch((err) => ({ schema: 'sks.codex-0138-doctor.v1', ok: false, error: err?.message || String(err), blockers: ['codex_0138_doctor_exception'], warnings: [] }));
176
+ const pluginInventory = await writeCodexPluginInventoryArtifacts(root).catch((err) => ({ error: err?.message || String(err), report: null, artifact: null }));
177
+ const pluginPolicy = pluginInventory?.report ? pluginAppTemplatePolicy(pluginInventory.report) : null;
178
+ const mcpPluginInventory = pluginInventory?.report
179
+ ? await writeMcpPluginInventoryArtifacts(root, { inventory: pluginInventory.report }).catch((err) => ({ error: err?.message || String(err), candidates: null }))
180
+ : null;
170
181
  const pkgBytes = await dirSize(root).catch(() => 0);
171
182
  const ready = await writeDoctorReadinessMatrix(root, {
172
183
  codex,
@@ -180,10 +191,14 @@ export async function run(_command, args = []) {
180
191
  agent_role_config: agentRoleConfigRepair,
181
192
  repair: configRepair,
182
193
  codex_app_ui: codexAppUi,
194
+ codex_0138_doctor: codex0138Doctor,
195
+ codex_plugin_inventory: pluginInventory?.report || null,
196
+ codex_plugin_app_template_policy: pluginPolicy,
183
197
  require_codex_cli_config_load: flag(args, '--fix') || flag(args, '--require-actual-codex'),
184
198
  operator_actions: [
185
199
  ...(codexConfig.operator_actions || []),
186
- ...(configRepair?.operator_actions || [])
200
+ ...(configRepair?.operator_actions || []),
201
+ ...(pluginPolicy?.doctor_warnings || [])
187
202
  ]
188
203
  });
189
204
  const zellijReadiness = buildZellijReadiness(root, zellij, ready);
@@ -211,6 +226,13 @@ export async function run(_command, args = []) {
211
226
  auth_readiness: imagegen.auth_readiness || null,
212
227
  codex_app_builtin_available: imagegen.codex_app?.available === true
213
228
  },
229
+ codex_0138: {
230
+ capability: codex0138Capability.report || null,
231
+ doctor: codex0138Doctor,
232
+ plugins: pluginInventory?.report || null,
233
+ plugin_app_template_policy: pluginPolicy,
234
+ mcp_plugin_inventory: mcpPluginInventory?.candidates || null
235
+ },
214
236
  ready,
215
237
  sneakoscope: { ok: await exists(`${root}/.sneakoscope`) },
216
238
  package: { bytes: pkgBytes, human: formatBytes(pkgBytes) },
@@ -262,6 +284,22 @@ export async function run(_command, args = []) {
262
284
  console.log(` - ${action}`);
263
285
  }
264
286
  }
287
+ const codex0138 = codex0138Capability.report || {};
288
+ console.log('Codex 0.138 features:');
289
+ console.log(` /app handoff: ${codex0138.supports_app_handoff ? 'ok' : 'unavailable'}`);
290
+ console.log(` plugin JSON: ${codex0138.supports_plugin_json ? 'ok' : 'unavailable'}`);
291
+ console.log(` image path exposure: ${codex0138.supports_image_path_exposure ? 'ok' : 'unavailable'}`);
292
+ console.log(` OAuth MCP pre-refresh: ${codex0138.supports_oauth_mcp_prerefresh ? 'ok' : 'unavailable'}`);
293
+ const plugins = pluginInventory?.report?.plugins || [];
294
+ const remoteMcpCount = plugins.flatMap((plugin) => plugin.remote_mcp_servers || []).length;
295
+ const unavailableTemplates = pluginPolicy?.unavailable_app_templates?.length || 0;
296
+ console.log(`Codex plugins: ${pluginInventory?.report ? 'ok' : 'warning'}`);
297
+ console.log(` Remote MCP servers: ${remoteMcpCount} candidates`);
298
+ console.log(` Unavailable app templates: ${unavailableTemplates}`);
299
+ for (const warning of pluginPolicy?.doctor_warnings || [])
300
+ console.log(` warning: ${warning}`);
301
+ if (codex0138Doctor?.fixed?.length)
302
+ console.log(` doctor --fix repaired: ${codex0138Doctor.fixed.join(', ')}`);
265
303
  console.log(`codex-lb: ${codexLb.ok ? 'ok' : `warning ${codexLb.circuit?.state || 'unknown'}`}`);
266
304
  if (localModel) {
267
305
  console.log('Local LLM:');
@@ -1,10 +1,12 @@
1
1
  import { madHighCommand } from '../core/commands/mad-sks-command.js';
2
2
  import { ensureMadLaunchDependencies, formatMadLaunchDependencyAction, maybePromptCodexUpdateForLaunch, maybePromptCodexLbSetupForLaunch, maybePromptSksUpdateForLaunch } from '../cli/install-helpers.js';
3
+ import { maybePromptZellijUpdateForLaunch } from '../core/zellij/zellij-update.js';
3
4
  import { PACKAGE_VERSION } from '../core/fsx.js';
4
5
  export async function run(_command, args = []) {
5
6
  return madHighCommand(['--mad-sks', ...args], {
6
7
  maybePromptSksUpdateForLaunch,
7
8
  maybePromptCodexUpdateForLaunch,
9
+ maybePromptZellijUpdateForLaunch,
8
10
  ensureMadLaunchDependencies,
9
11
  printDepsInstallAction: (action) => console.error(formatMadLaunchDependencyAction(action)),
10
12
  maybePromptCodexLbSetupForLaunch,
@@ -4,6 +4,7 @@ import { projectRoot, readJson } from '../core/fsx.js';
4
4
  import { flag } from '../cli/args.js';
5
5
  import { printJson } from '../cli/output.js';
6
6
  import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
7
+ import { checkZellijUpdateNotice, upgradeZellijToLatest } from '../core/zellij/zellij-update.js';
7
8
  import { runZellij } from '../core/zellij/zellij-command.js';
8
9
  import { appendZellijLaneCommand, normalizeZellijSlot } from '../core/zellij/zellij-lane-runtime.js';
9
10
  import { buildZellijDashboardSnapshot, renderZellijDashboardText } from '../core/zellij/zellij-dashboard-renderer.js';
@@ -22,6 +23,8 @@ export async function run(_command = 'zellij', args = []) {
22
23
  const root = await projectRoot();
23
24
  if (sub === 'help')
24
25
  return printHelp(json);
26
+ if (sub === 'update' || sub === 'upgrade')
27
+ return zellijUpdate(args, json);
25
28
  if (sub === 'repair')
26
29
  return zellijRepair(root, args, json);
27
30
  if (sub === 'dispatch' || sub === 'send')
@@ -73,6 +76,58 @@ async function zellijStatus(root, args, json) {
73
76
  if (!result.ok)
74
77
  process.exitCode = 1;
75
78
  }
79
+ async function zellijUpdate(args, json) {
80
+ const apply = flag(args, '--yes') || flag(args, '-y') || flag(args, '--apply');
81
+ const notice = await checkZellijUpdateNotice({});
82
+ if (!apply || !notice.update_available) {
83
+ const result = {
84
+ schema: 'sks.zellij-update-command.v1',
85
+ subcommand: 'update',
86
+ ok: !notice.error,
87
+ mode: apply ? 'apply' : 'check',
88
+ current_version: notice.current_version,
89
+ latest_version: notice.latest_version,
90
+ update_available: notice.update_available,
91
+ zellij_missing: notice.zellij_missing,
92
+ source: notice.source,
93
+ upgrade_command: notice.upgrade_command,
94
+ message: notice.message,
95
+ next_actions: notice.update_available ? ['Apply with: sks zellij update --yes'] : [],
96
+ error: notice.error || null
97
+ };
98
+ if (json)
99
+ printJson(result);
100
+ else {
101
+ console.log(notice.message);
102
+ if (notice.update_available)
103
+ console.log('Apply with: sks zellij update --yes');
104
+ }
105
+ if (notice.error && !notice.latest_version)
106
+ process.exitCode = 1;
107
+ return;
108
+ }
109
+ const upgraded = await upgradeZellijToLatest({});
110
+ const result = {
111
+ schema: 'sks.zellij-update-command.v1',
112
+ subcommand: 'update',
113
+ ok: upgraded.status === 'upgraded' || upgraded.status === 'installed' || upgraded.status === 'noop',
114
+ mode: 'apply',
115
+ status: upgraded.status,
116
+ before_version: upgraded.before_version,
117
+ after_version: upgraded.after_version,
118
+ latest_version: upgraded.latest_version,
119
+ command: upgraded.command,
120
+ error: upgraded.error || null
121
+ };
122
+ if (json)
123
+ printJson(result);
124
+ else if (result.ok)
125
+ console.log(`Zellij ${upgraded.before_version || 'unknown'} -> ${upgraded.after_version || upgraded.latest_version || 'latest'} (${upgraded.command})`);
126
+ else
127
+ console.log(`Zellij update ${upgraded.status}: ${upgraded.error || upgraded.command}`);
128
+ if (!result.ok)
129
+ process.exitCode = 1;
130
+ }
76
131
  async function zellijFocusWorker(root, args, json) {
77
132
  const missionId = resolveMissionId(root, readOption(args, '--mission', readOption(args, '--mission-id', 'latest') || 'latest') || 'latest');
78
133
  const slotId = normalizeZellijSlot(readOption(args, '--slot', positionalAfter(args, 'focus-worker') || 'slot-001'));
@@ -265,9 +320,10 @@ function printHelp(json) {
265
320
  schema: ZELLIJ_COMMAND_SCHEMA,
266
321
  subcommand: 'help',
267
322
  ok: true,
268
- usage: 'sks zellij status|repair|dispatch|send|focus-worker|worker-logs|dashboard|close-drained [--json]',
323
+ usage: 'sks zellij status|update|repair|dispatch|send|focus-worker|worker-logs|dashboard|close-drained [--json]',
269
324
  subcommands: {
270
325
  status: 'Report Zellij runtime capability and interactive-route readiness.',
326
+ update: 'Check the latest stable Zellij release; apply the upgrade with --yes (Homebrew).',
271
327
  repair: 'Explain how to install/repair Zellij (no automatic install).',
272
328
  dispatch: 'Append a nonblocking JSONL command for a lane; optionally write to a reconciled pane id with --write-pane.',
273
329
  send: 'Alias for dispatch.',
@@ -283,6 +339,7 @@ function printHelp(json) {
283
339
  else {
284
340
  console.log('sks zellij โ€” inspect and repair the Zellij interactive runtime');
285
341
  console.log(' sks zellij status [--require-real] [--json]');
342
+ console.log(' sks zellij update [--yes] [--json]');
286
343
  console.log(' sks zellij repair [--explain] [--json]');
287
344
  console.log(' sks zellij dispatch --mission M --slot slot-001 --text "..." [--write-pane] [--json]');
288
345
  console.log(' sks zellij focus-worker slot-001 [--mission M] [--json]');