sneakoscope 0.6.24 → 0.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -81
- package/package.json +1 -2
- package/src/cli/main.mjs +227 -10
- package/src/core/db-safety.mjs +2 -2
- package/src/core/fsx.mjs +1 -1
- package/src/core/harness-guard.mjs +2 -2
- package/src/core/hooks-runtime.mjs +73 -16
- package/src/core/init.mjs +56 -6
- package/src/core/pipeline.mjs +7 -0
- package/src/core/routes.mjs +20 -4
- package/src/core/version-manager.mjs +250 -0
- package/docs/PERFORMANCE.md +0 -83
- package/docs/assets/sneakoscope-codex-logo.svg +0 -51
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ Sneakoscope Codex is for developers who want Codex CLI to keep working until a g
|
|
|
30
30
|
- **Database-safe autonomous coding**: destructive SQL, unsafe Supabase MCP writes, production DB mutation, and risky migration flows are blocked or surfaced early.
|
|
31
31
|
- **Harness self-protection**: after setup, installed SKS control files are locked against LLM tool edits, with a source-repo-only exception for Sneakoscope engine development.
|
|
32
32
|
- **Other-harness conflict gate**: OMX/DCodex-style Codex harness traces block npm install and setup until a human-approved cleanup is performed.
|
|
33
|
+
- **Automatic project versioning**: commits can carry a unique patch bump with lockfile sync.
|
|
33
34
|
- **Honest completion gates**: H-Proof and Honest Mode require evidence before the agent claims the work is complete.
|
|
34
35
|
- **TriWiki context-tracking SSOT**: structured wiki packs, visual coordinate anchors, and bounded memory help long-running work survive context pressure without relying on lossy summaries.
|
|
35
36
|
|
|
@@ -42,7 +43,7 @@ npm i -g sneakoscope
|
|
|
42
43
|
sks
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
`npm i -g sneakoscope` prints
|
|
46
|
+
`npm i -g sneakoscope` prints setup guidance without making npm output look like a crash. If OMX, DCodex, or their global/repo-level traces are detected, npm can finish but SKS reports that `sks setup` and `sks doctor --fix` are blocked until human-approved cleanup. Otherwise postinstall best-effort creates an `sks` shim, configures Context7 when Codex CLI is available, and initializes the current project when `INIT_CWD` looks like one. Project setup writes hooks, skills, agents, `$team`, and the `$agent-team` fallback picker alias. Run `sks` for the setup UI.
|
|
46
47
|
|
|
47
48
|
Default non-interactive setup:
|
|
48
49
|
|
|
@@ -103,6 +104,7 @@ sks quickstart
|
|
|
103
104
|
sks codex-app
|
|
104
105
|
sks dollar-commands
|
|
105
106
|
sks context7 tools
|
|
107
|
+
sks versioning status
|
|
106
108
|
sks df
|
|
107
109
|
sks aliases
|
|
108
110
|
```
|
|
@@ -157,12 +159,30 @@ AGENTS.md repository rules loaded by Codex agents
|
|
|
157
159
|
.sneakoscope/ mission state, gates, logs, policy, GX cartridges, and reports
|
|
158
160
|
```
|
|
159
161
|
|
|
160
|
-
Codex App discovers repo-local skills from `.agents/skills
|
|
162
|
+
Codex App discovers repo-local skills from `.agents/skills/`. The picker should find `$team`, `$ralph`, `$sks`, `$db`, `$gx`, and other lowercase aliases; SKS still accepts `$Team`, `$Ralph`, and uppercase forms. SKS also installs `$agent-team` as a Team fallback alias when the app hides the plain `team` skill name.
|
|
161
163
|
|
|
162
164
|
SKS uses the official Codex hook behavior: `UserPromptSubmit` can inject additional developer context or block a prompt, `Stop` with `decision: "block"` continues the turn by creating a new continuation prompt, and hook `statusMessage` text makes active SKS routing, guard, permission, and done-gate checks visible in Codex App.
|
|
163
165
|
|
|
164
166
|
After setup, SKS writes `.sneakoscope/harness-guard.json`. Hooks block LLM tool calls that try to edit installed harness control files such as `.codex/hooks.json`, `.codex/config.toml`, `.codex/SNEAKOSCOPE.md`, `.agents/skills/`, `.codex/agents/`, `.sneakoscope/manifest.json`, `.sneakoscope/policy.json`, `.sneakoscope/db-safety.json`, `AGENTS.md`, or `node_modules/sneakoscope`. The only automatic exception is the Sneakoscope engine source repository itself, detected from `package.json` name `sneakoscope` plus `bin/sks.mjs` and `src/core/*`.
|
|
165
167
|
|
|
168
|
+
## Project Versioning
|
|
169
|
+
|
|
170
|
+
SKS setup installs a managed Git `pre-commit` hook for projects with `package.json`. It bumps the patch version, syncs lockfiles, and stages those files into the same commit.
|
|
171
|
+
|
|
172
|
+
Workers and worktrees share a Git common-dir lock so versions are not reused.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
sks versioning status
|
|
176
|
+
sks versioning bump
|
|
177
|
+
sks versioning hook
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The bypass is intentionally explicit and conversation-local:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
SKS_DISABLE_VERSIONING=1 git commit ...
|
|
184
|
+
```
|
|
185
|
+
|
|
166
186
|
Inside Codex App, you can ask the agent to use the local SKS control surface, for example:
|
|
167
187
|
|
|
168
188
|
```text
|
|
@@ -221,7 +241,7 @@ If your shell cannot find the global command yet, run through npm without relyin
|
|
|
221
241
|
npx -y -p sneakoscope sks setup
|
|
222
242
|
```
|
|
223
243
|
|
|
224
|
-
The global postinstall also tries to create a local `sks` shim automatically. If the
|
|
244
|
+
The global postinstall also tries to create a local `sks` shim automatically. If the install runs from a project directory, it performs the same Codex App setup as `sks setup` unless `SKS_SKIP_POSTINSTALL_SETUP=1` or CI is active.
|
|
225
245
|
|
|
226
246
|
Create a Ralph mission:
|
|
227
247
|
|
|
@@ -264,6 +284,7 @@ sks research run latest --max-cycles 3
|
|
|
264
284
|
- **Forced subagent execution policy**: code-changing work first surfaces SKS status context, then defaults to parallel worker subagents when independent write scopes exist; the parent orchestrator owns integration and verification.
|
|
265
285
|
- **AutoResearch loop**: open-ended improvement tasks use a small experiment cycle: program, hypothesis, experiment, metric, keep/discard, falsification, and honest conclusion.
|
|
266
286
|
- **Update-aware hooks**: before work, SKS checks for a newer published package and asks whether to update now or skip for the current conversation only.
|
|
287
|
+
- **Automatic project versioning**: setup installs a pre-commit patch bump and lockfile sync guard.
|
|
267
288
|
- **Honest Mode finish**: final answers must include an evidence-aware verification pass before claiming the goal is complete.
|
|
268
289
|
- **Fast DF mode**: `$DF` handles small design/content edits like color, copy, labels, spacing, and translation without unnecessary Ralph, Research, or evaluation loops.
|
|
269
290
|
- **Database guard**: destructive DB operations, production writes, unsafe Supabase MCP configuration, and direct live SQL mutations are blocked or warned on.
|
|
@@ -305,42 +326,9 @@ Team mode uses Codex subagents/custom agents as an orchestration protocol rather
|
|
|
305
326
|
|
|
306
327
|
For code-changing work, generated SKS rules tell Codex to surface visible route, guard, write-scope, and verification status before editing. When the work has independent, non-overlapping write scopes, Codex should spawn worker subagents in parallel by default; the parent keeps urgent blockers local, assigns ownership, integrates results, and runs final verification.
|
|
307
328
|
|
|
308
|
-
Team missions default to `executor:3 reviewer:1 user:1 planner:1`. Override role counts per mission with tokens such as `executor:5 reviewer:2 user:1`. `executor:N`
|
|
329
|
+
Team missions default to `executor:3 reviewer:1 user:1 planner:1`. Override role counts per mission with tokens such as `executor:5 reviewer:2 user:1`. `executor:N` creates N read-only analysis scouts, N debate participants, and then a separate N-person executor development team. The parent orchestrator is not counted.
|
|
309
330
|
|
|
310
|
-
|
|
311
|
-
parallel analysis scouts
|
|
312
|
-
-> spawn exactly N read-only analysis_scout_N agents
|
|
313
|
-
-> split repo, docs, tests, API, DB-risk, UX-friction, and implementation-surface investigation
|
|
314
|
-
-> write source-backed findings and TriWiki-ready claims to team-analysis.md
|
|
315
|
-
|
|
316
|
-
TriWiki refresh
|
|
317
|
-
-> parent orchestrator runs sks wiki pack
|
|
318
|
-
-> parent validates .sneakoscope/wiki/context-pack.json with sks wiki validate
|
|
319
|
-
-> later debate and implementation handoffs use refreshed anchor-first context
|
|
320
|
-
|
|
321
|
-
debate team
|
|
322
|
-
-> spawn exactly N role personas for stubborn users, capable executor voices, strict reviewers, and planners
|
|
323
|
-
-> map user inconvenience, code paths, risks, DB safety, tests, and options
|
|
324
|
-
-> synthesize one agreed objective with constraints and acceptance criteria
|
|
325
|
-
-> close debate agents
|
|
326
|
-
|
|
327
|
-
fresh development team
|
|
328
|
-
-> create a separate N-person executor_N developer team
|
|
329
|
-
-> assign disjoint write scopes to executor_N developers
|
|
330
|
-
-> run executor_N work in parallel only when ownership does not overlap
|
|
331
|
-
-> strict reviewer_N and user_N personas check correctness, evidence, and practical friction
|
|
332
|
-
-> parent orchestrator integrates, verifies, and reports evidence
|
|
333
|
-
|
|
334
|
-
live transcript
|
|
335
|
-
-> mirror every useful agent status, debate result, handoff, and review finding
|
|
336
|
-
-> keep team-live.md readable inside Codex App
|
|
337
|
-
-> keep team-transcript.jsonl machine-readable for tails, dashboards, and future tooling
|
|
338
|
-
|
|
339
|
-
context tracking
|
|
340
|
-
-> use TriWiki as the SSOT for long-running mission context and team handoffs
|
|
341
|
-
-> refresh .sneakoscope/wiki/context-pack.json with sks wiki pack when context changes
|
|
342
|
-
-> validate the pack with sks wiki validate .sneakoscope/wiki/context-pack.json
|
|
343
|
-
```
|
|
331
|
+
The pipeline is scout-first: parallel analysis, TriWiki refresh, planning debate, consensus, fresh parallel implementation, review, integration, and Honest Mode evidence.
|
|
344
332
|
|
|
345
333
|
Create a Team mission:
|
|
346
334
|
|
|
@@ -356,7 +344,7 @@ Inside Codex App, use:
|
|
|
356
344
|
$Team executor:5 run parallel analysis scouts, refresh TriWiki, agree on the best plan, close the debate team, then implement with a fresh development team
|
|
357
345
|
```
|
|
358
346
|
|
|
359
|
-
|
|
347
|
+
Key Team artifacts:
|
|
360
348
|
|
|
361
349
|
```text
|
|
362
350
|
.sneakoscope/missions/<MISSION_ID>/team-plan.json
|
|
@@ -369,8 +357,6 @@ The generated Team artifacts are:
|
|
|
369
357
|
.codex/agents/analysis-scout.toml
|
|
370
358
|
.codex/agents/team-consensus.toml
|
|
371
359
|
.codex/agents/implementation-worker.toml
|
|
372
|
-
.codex/agents/db-safety-reviewer.toml
|
|
373
|
-
.codex/agents/qa-reviewer.toml
|
|
374
360
|
```
|
|
375
361
|
|
|
376
362
|
Live team visibility commands:
|
|
@@ -425,70 +411,45 @@ All terminal examples below use `sks`, but the same commands can be run with the
|
|
|
425
411
|
|
|
426
412
|
```bash
|
|
427
413
|
sks help [topic]
|
|
428
|
-
sks update-check [--json]
|
|
429
414
|
sks wizard
|
|
430
415
|
sks commands [--json]
|
|
431
|
-
sks usage [
|
|
416
|
+
sks usage [topic]
|
|
432
417
|
sks quickstart
|
|
433
418
|
sks codex-app
|
|
434
419
|
sks dollar-commands [--json]
|
|
435
420
|
sks df
|
|
436
|
-
sks context7 check|setup|tools|resolve|docs|evidence ...
|
|
437
|
-
sks pipeline status|resume [--json]
|
|
438
|
-
sks guard check [--json]
|
|
439
|
-
sks conflicts check|prompt [--json]
|
|
440
|
-
sks reasoning ["prompt"] [--json]
|
|
441
|
-
sks aliases
|
|
442
421
|
|
|
443
422
|
sks --help
|
|
444
423
|
sneakoscope --help
|
|
445
424
|
|
|
446
425
|
sks setup [--install-scope global|project] [--local-only] [--force] [--json]
|
|
447
|
-
sks fix-path [--install-scope global|project] [--json]
|
|
448
426
|
sks doctor [--fix] [--local-only] [--json] [--install-scope global|project]
|
|
449
|
-
sks init [--force] [--local-only] [--install-scope global|project]
|
|
450
427
|
sks selftest [--mock]
|
|
428
|
+
sks versioning status|bump|hook
|
|
451
429
|
|
|
452
430
|
sks ralph prepare "task"
|
|
453
431
|
sks ralph answer <mission-id|latest> <answers.json>
|
|
454
432
|
sks ralph run <mission-id|latest> [--mock] [--max-cycles N]
|
|
455
|
-
sks ralph status <mission-id|latest>
|
|
456
433
|
|
|
457
434
|
sks research prepare "topic" [--depth frontier]
|
|
458
435
|
sks research run <mission-id|latest> [--mock] [--max-cycles N]
|
|
459
|
-
sks research status <mission-id|latest>
|
|
460
436
|
|
|
461
|
-
sks db policy
|
|
462
437
|
sks db scan [--migrations] [--json]
|
|
463
|
-
sks db mcp-config --project-ref <ref> [--features database,docs]
|
|
464
|
-
sks db classify --sql "DROP TABLE users"
|
|
465
|
-
sks db classify --command "supabase db reset"
|
|
466
438
|
sks db check --sql "SELECT * FROM users LIMIT 10"
|
|
467
439
|
sks db check --command "supabase db reset"
|
|
468
|
-
sks db check --file ./migration.sql
|
|
469
|
-
|
|
470
|
-
sks eval run [--json] [--out report.json] [--iterations N]
|
|
471
|
-
sks eval compare --baseline old.json --candidate new.json [--json]
|
|
472
|
-
sks eval thresholds
|
|
473
440
|
|
|
474
|
-
sks
|
|
441
|
+
sks team "task" [executor:5 reviewer:2 user:1] [--json]
|
|
442
|
+
sks team log|tail|watch|status [mission-id|latest]
|
|
475
443
|
sks wiki pack [--json] [--role worker|verifier] [--max-anchors N]
|
|
476
444
|
sks wiki validate [context-pack.json]
|
|
477
|
-
|
|
445
|
+
sks context7 check|setup|tools|docs ...
|
|
446
|
+
sks pipeline status|resume [--json]
|
|
447
|
+
sks guard check [--json]
|
|
448
|
+
sks conflicts check|prompt [--json]
|
|
449
|
+
sks eval run|compare|thresholds ...
|
|
478
450
|
sks hproof check [mission-id|latest]
|
|
479
|
-
sks
|
|
480
|
-
sks team log|tail|watch|status [mission-id|latest]
|
|
481
|
-
sks team event [mission-id|latest] --agent <name> --phase <phase> --message "..."
|
|
482
|
-
sks gx init [name]
|
|
483
|
-
sks gx render [name] [--format svg|html|all]
|
|
484
|
-
sks gx validate [name]
|
|
485
|
-
sks gx drift [name]
|
|
486
|
-
sks gx snapshot [name]
|
|
487
|
-
sks profile show
|
|
488
|
-
sks profile set <model>
|
|
451
|
+
sks gx init|render|validate|drift|snapshot [name]
|
|
489
452
|
sks gc [--dry-run] [--json]
|
|
490
|
-
sks memory [--dry-run] [--json]
|
|
491
|
-
sks stats [--json]
|
|
492
453
|
```
|
|
493
454
|
|
|
494
455
|
`sks memory` is currently an alias for garbage collection/retention handling.
|
|
@@ -543,7 +504,7 @@ Context tracking uses TriWiki as the SSOT. When a route spans turns, subagent ha
|
|
|
543
504
|
|
|
544
505
|
Installed projects treat the SKS harness as immutable to LLM tool edits. The `PreToolUse` and `PermissionRequest` hooks block direct writes to generated control files, generated skills/agents, policy files, `AGENTS.md`, and the installed `node_modules/sneakoscope` package. They also block LLM-issued maintenance commands such as `sks setup`, `sks init`, `sks doctor --fix`, `sks context7 setup`, and package-manager removal of `sneakoscope`.
|
|
545
506
|
|
|
546
|
-
`sks doctor --fix` repairs broken SKS-generated
|
|
507
|
+
`sks doctor --fix` repairs broken SKS-generated hooks, config, app skills, local agents, manifest, policy, DB guard, and harness guard. It also restores picker fallback aliases such as `$agent-team` when `$team` can be hidden by the app. Runtime mission/wiki state and application source are preserved.
|
|
547
508
|
|
|
548
509
|
The guard writes fingerprints to `.sneakoscope/harness-guard.json`, and `sks doctor` includes the guard in readiness. Check it directly with:
|
|
549
510
|
|
|
@@ -751,7 +712,7 @@ Storage is intentionally bounded:
|
|
|
751
712
|
- `sks gc` compacts oversized JSONL logs and prunes old artifacts
|
|
752
713
|
- `sks stats` reports package and `.sneakoscope` storage size
|
|
753
714
|
|
|
754
|
-
See [
|
|
715
|
+
See the [resource policy](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/PERFORMANCE.md) for the detailed storage and leak policy.
|
|
755
716
|
|
|
756
717
|
## Visual Cartridges
|
|
757
718
|
|
|
@@ -837,11 +798,10 @@ src/core/init.mjs project bootstrap and hook/skill installation
|
|
|
837
798
|
src/core/research.mjs research-mode plan, novelty ledger, and gate helpers
|
|
838
799
|
src/core/retention.mjs storage report and garbage collection policy
|
|
839
800
|
src/core/triwiki-attention.mjs
|
|
840
|
-
docs/PERFORMANCE.md resource and leak policy
|
|
841
801
|
crates/sks-core/ optional Rust helper source, not shipped in npm package
|
|
842
802
|
```
|
|
843
803
|
|
|
844
|
-
The published npm package is allowlisted to `bin`, `src`, `
|
|
804
|
+
The published npm package is allowlisted to `bin`, `src`, `README.md`, and `LICENSE`; `.sneakoscope`, `.codex`, `.agents`, `docs`, Rust sources, archives, and local state are excluded.
|
|
845
805
|
|
|
846
806
|
## Development
|
|
847
807
|
|
|
@@ -856,7 +816,7 @@ npm run doctor
|
|
|
856
816
|
|
|
857
817
|
`npm run repo-audit` checks tracked files for risky local paths and high-confidence secret material such as private keys, npm/GitHub/OpenAI-style tokens, local MCP configs, DB dumps, and credential files. It is included in `release:check` and `prepublishOnly`. The package intentionally does not define `prepack`; GitHub installs should not trigger npm's heavier git-dependency preparation path for normal users.
|
|
858
818
|
|
|
859
|
-
`npm run sizecheck` blocks accidental package bloat during `release:check`, `publish:dry`, and `npm publish`. Defaults: packed tarball `<=
|
|
819
|
+
`npm run sizecheck` blocks accidental package bloat during `release:check`, `publish:dry`, and `npm publish`. Defaults: packed tarball `<=136 KiB`, unpacked package `<=500 KiB`, package files `<=40`, and each tracked file `<=256 KiB`. Override only for an intentional release with `SKS_MAX_PACK_BYTES`, `SKS_MAX_UNPACKED_BYTES`, `SKS_MAX_PACK_FILES`, or `SKS_MAX_TRACKED_FILE_BYTES`.
|
|
860
820
|
|
|
861
821
|
`npm run selftest` uses the mock path and does not call a model. Live Ralph runs require a working Codex CLI installation and authentication.
|
|
862
822
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "Sneakoscope Codex",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.26",
|
|
5
5
|
"description": "Sneakoscope Codex: update-aware, database-safe Codex CLI harness with multi-agent Team orchestration, Ralph no-question execution, autoresearch-style loops, and H-Proof gates.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"bin",
|
|
25
25
|
"src",
|
|
26
|
-
"docs",
|
|
27
26
|
"README.md",
|
|
28
27
|
"LICENSE"
|
|
29
28
|
],
|