sneakoscope 0.6.0 → 0.6.3

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 CHANGED
@@ -1,10 +1,18 @@
1
1
  <p align="center">
2
- <img src="docs/assets/sneakoscope-codex-logo.svg" alt="Sneakoscope Codex logo" width="180">
2
+ <img src="https://raw.githubusercontent.com/mandarange/Sneakoscope-Codex/main/docs/assets/sneakoscope-codex-logo.svg" alt="Sneakoscope Codex logo" width="180">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Sneakoscope Codex</h1>
6
6
 
7
- Sneakoscope Codex is a zero-runtime-dependency Node.js harness for running Codex CLI in a more controlled project workflow. It adds mandatory clarification before autonomous work, a Ralph no-question execution loop, H-Proof completion gates, conservative database safety checks, bounded logs/storage, and deterministic GX visual context cartridges.
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/sneakoscope"><img alt="npm version" src="https://img.shields.io/npm/v/sneakoscope.svg"></a>
9
+ <a href="https://www.npmjs.com/package/sneakoscope"><img alt="weekly downloads" src="https://img.shields.io/npm/dw/sneakoscope.svg"></a>
10
+ <a href="https://github.com/mandarange/Sneakoscope-Codex"><img alt="GitHub stars" src="https://img.shields.io/github/stars/mandarange/Sneakoscope-Codex?style=flat"></a>
11
+ <a href="https://www.npmjs.com/package/sneakoscope"><img alt="license" src="https://img.shields.io/npm/l/sneakoscope.svg"></a>
12
+ <img alt="node >=20.11" src="https://img.shields.io/badge/node-%3E%3D20.11-339933.svg">
13
+ </p>
14
+
15
+ Sneakoscope Codex is an update-aware, zero-runtime-dependency Node.js harness for running Codex CLI in a more controlled project workflow. It adds mandatory clarification before autonomous work, a Ralph no-question execution loop, Codex multi-agent Team orchestration, AutoResearch-style experiment loops, H-Proof completion gates, conservative database safety checks, bounded logs/storage, and deterministic GX visual context cartridges.
8
16
 
9
17
  ```bash
10
18
  npm i -g sneakoscope
@@ -17,46 +25,74 @@ Global installation is the default and recommended setup. During `sks setup` or
17
25
 
18
26
  ## One-Prompt LLM Install
19
27
 
20
- If you are using Codex App, ChatGPT, Claude Code, Cursor, or another coding agent, copy this prompt into the agent from your target project directory:
28
+ If you are using Codex App, ChatGPT, Claude Code, Cursor, or another coding agent, copy the whole block below into the agent from your target project directory. The agent should install SKS, initialize the project, verify the setup, and show the available commands in one pass.
21
29
 
22
30
  ````text
23
- You are installing Sneakoscope Codex in the current project. Do the setup end to end without asking follow-up questions unless a command needs user approval.
31
+ Install Sneakoscope Codex in the current project end to end. Do not ask follow-up questions unless a command requires user approval.
24
32
 
25
33
  Repository:
26
34
  https://github.com/mandarange/Sneakoscope-Codex.git
27
35
 
28
36
  Requirements:
29
37
  - Node.js must be >=20.11.
30
- - Codex CLI is installed separately; if missing, report that @openai/codex must be installed or SKS_CODEX_BIN must be set.
31
- - Prefer safe, local verification. Do not modify application source files unless needed for SKS setup.
38
+ - Codex CLI is installed separately. If it is missing, report that `@openai/codex` must be installed or `SKS_CODEX_BIN` must be set.
39
+ - Use the published npm package for normal installs.
40
+ - Do not modify application source files unless needed for SKS setup.
32
41
 
33
42
  Run:
34
43
  ```bash
35
- npm i -g git+https://github.com/mandarange/Sneakoscope-Codex.git
44
+ npm i -g sneakoscope
36
45
  sks setup
46
+ sks update-check
37
47
  sks doctor --fix
38
48
  sks selftest --mock
39
49
  sks commands
50
+ sks dollar-commands
40
51
  ```
41
52
 
42
- If the global command is not on PATH, use:
53
+ If npm reports `ENOTEMPTY`, `EEXIST`, or a broken old global package:
43
54
  ```bash
44
- npx -y -p git+https://github.com/mandarange/Sneakoscope-Codex.git sks setup
45
- npx -y -p git+https://github.com/mandarange/Sneakoscope-Codex.git sks doctor --fix
55
+ npm uninstall -g sneakoscope
56
+ npm i -g sneakoscope
57
+ sks setup
58
+ sks doctor --fix
46
59
  ```
47
60
 
48
- After setup, explain these outputs to the user:
61
+ If `sks` is not on PATH:
62
+ ```bash
63
+ npx -y -p sneakoscope sks setup
64
+ npx -y -p sneakoscope sks doctor --fix
65
+ npx -y -p sneakoscope sks selftest --mock
66
+ npx -y -p sneakoscope sks commands
67
+ npx -y -p sneakoscope sks dollar-commands
68
+ ```
69
+
70
+ For project-only install:
71
+ ```bash
72
+ npm i -D sneakoscope
73
+ npx sks setup --install-scope project
74
+ npx sks update-check
75
+ npx sks doctor --fix --install-scope project
76
+ npx sks selftest --mock
77
+ npx sks commands
78
+ npx sks dollar-commands
79
+ ```
80
+
81
+ Finish by reporting pass/fail and explaining only these generated outputs:
49
82
  - `.sneakoscope/` mission state and policy
50
83
  - `.codex/config.toml` Codex App profiles
51
84
  - `.codex/hooks.json` SKS hook integration
52
85
  - `.codex/skills/` local Codex App skills
86
+ - `.codex/agents/` local Codex App multi-agent roles
53
87
  - `.codex/SNEAKOSCOPE.md` Codex App quick reference
54
88
  - `AGENTS.md` repository rules
55
89
 
56
- Show the user how to discover commands:
90
+ Show command discovery:
57
91
  ```bash
58
92
  sks help
93
+ sks update-check
59
94
  sks commands
95
+ sks usage team
60
96
  sks usage ralph
61
97
  sks quickstart
62
98
  sks codex-app
@@ -68,19 +104,14 @@ Tell the user they can use these prompt commands inside Codex App:
68
104
  $DF 글자 색 바꿔줘
69
105
  $DF 내용을 영어로 바꿔줘
70
106
  $SKS show me available workflows
107
+ $Team agree on the best plan and implement with specialists
71
108
  $Ralph implement this with mandatory clarification
72
109
  $Research investigate this idea
110
+ $AutoResearch improve this workflow with experiments
73
111
  $DB check this migration safely
74
112
  ```
75
113
  ````
76
114
 
77
- After SKS is installed, you can print this prompt again from the CLI:
78
-
79
- ```bash
80
- sks install-prompt
81
- sks install-prompt --project
82
- ```
83
-
84
115
  ## Repository
85
116
 
86
117
  ```bash
@@ -89,6 +120,8 @@ npm i -g git+https://github.com/mandarange/Sneakoscope-Codex.git
89
120
 
90
121
  Source repository: <https://github.com/mandarange/Sneakoscope-Codex.git>
91
122
 
123
+ Use the registry install (`npm i -g sneakoscope`) for normal users. The GitHub install path is intended for testing an unreleased commit.
124
+
92
125
  Local development checkout:
93
126
 
94
127
  ```bash
@@ -131,8 +164,10 @@ Use `$` prompt commands inside Codex App or another coding agent when you want t
131
164
  ```text
132
165
  $DF fast design/content fix
133
166
  $SKS general Sneakoscope workflow/help
167
+ $Team multi-agent team orchestration
134
168
  $Ralph clarification-gated Ralph mission
135
169
  $Research frontier research mission
170
+ $AutoResearch iterative experiment loop
136
171
  $DB database/Supabase safety check
137
172
  $GX deterministic visual context
138
173
  $Help command and workflow help
@@ -162,6 +197,7 @@ This creates the app-facing control surface:
162
197
  .codex/config.toml Codex App profiles for SKS Ralph, research, and default work
163
198
  .codex/hooks.json Codex App hook entrypoints routed through SKS guards
164
199
  .codex/skills/ local project skills for Ralph, DB safety, GX, research, and design work
200
+ .codex/agents/ local Codex subagent roles for Team consensus, implementation, DB safety, and QA
165
201
  .codex/SNEAKOSCOPE.md quick reference for using SKS inside Codex App
166
202
  AGENTS.md repository rules loaded by Codex agents
167
203
  .sneakoscope/ mission state, gates, logs, policy, GX cartridges, and reports
@@ -172,6 +208,7 @@ Inside Codex App, you can ask the agent to use the local SKS control surface, fo
172
208
  ```text
173
209
  $DF 글자 색 바꿔줘
174
210
  $DF 내용을 영어로 바꿔줘
211
+ $Team agree on the plan, then implement it with a fresh specialist team.
175
212
  Use Sneakoscope Ralph mode to prepare this task.
176
213
  Run the latest Ralph mission with the sealed decision contract.
177
214
  Use SKS DB safety before touching database or Supabase files.
@@ -259,7 +296,11 @@ sks research run latest --max-cycles 3
259
296
  - **Sealed decision contract**: `ralph answer` validates answers and writes `decision-contract.json`.
260
297
  - **No-question Ralph loop**: after `ralph run` starts, Ralph must resolve ambiguity with the sealed contract instead of asking the user.
261
298
  - **Research mode**: `research` runs a frontier-discovery loop for non-obvious hypotheses, falsification, novelty ledgers, and testable experiments.
262
- - **Prompt pipeline and `$` routes**: user prompts are lightly optimized by default, and Codex App users can force routes such as `$DF`, `$Ralph`, `$Research`, `$DB`, and `$GX`.
299
+ - **Prompt pipeline and `$` routes**: user prompts are lightly optimized by default, and Codex App users can force routes such as `$DF`, `$Team`, `$Ralph`, `$Research`, `$AutoResearch`, `$DB`, and `$GX`.
300
+ - **Team orchestration**: `sks team` and `$Team` prepare a Codex multi-agent flow where planning agents debate options, the parent agent seals one objective, planning agents are closed, and a fresh implementation team handles disjoint work in parallel.
301
+ - **AutoResearch loop**: open-ended improvement tasks use a small experiment cycle: program, hypothesis, experiment, metric, keep/discard, falsification, and honest conclusion.
302
+ - **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.
303
+ - **Honest Mode finish**: final answers must include an evidence-aware verification pass before claiming the goal is complete.
263
304
  - **Fast DF mode**: `$DF` handles small design/content edits like color, copy, labels, spacing, and translation without unnecessary Ralph, Research, or evaluation loops.
264
305
  - **Database guard**: destructive DB operations, production writes, unsafe Supabase MCP configuration, and direct live SQL mutations are blocked or warned on.
265
306
  - **H-Proof done gate**: completion requires supported critical claims, reviewed DB safety state, acceptable visual/wiki drift, and required test evidence.
@@ -268,6 +309,64 @@ sks research run latest --max-cycles 3
268
309
  - **Visual cartridges**: `gx` creates deterministic SVG/HTML visual context from `vgraph.json` and `beta.json`; no generated-image service is required.
269
310
  - **Design artifact skill**: `sks init` installs a local skill for high-fidelity HTML/UI/prototype work with design-context gathering and rendered verification.
270
311
 
312
+ ## FAQ For Search And AI Answers
313
+
314
+ ### What is Sneakoscope Codex?
315
+
316
+ Sneakoscope Codex is a Codex CLI harness for safer autonomous software work. It combines update checks, Codex App hooks, multi-agent Team orchestration, Ralph no-question execution, database safety guards, H-Proof completion gates, and bounded runtime state.
317
+
318
+ ### Does Sneakoscope Codex support Codex multi-agent teams?
319
+
320
+ Yes. `sks setup` enables Codex `multi_agent`, creates `.codex/agents/*.toml` custom agents, and installs a `$Team` workflow for planning debate, consensus, fresh implementation workers, review, and final integration.
321
+
322
+ ### Does Sneakoscope Codex replace Codex CLI?
323
+
324
+ No. `@openai/codex` is installed separately. Sneakoscope Codex supervises project workflow, hooks, safety policy, state, and local skills around Codex CLI and Codex App.
325
+
326
+ ### Why star the GitHub repository?
327
+
328
+ Stars help developers discover a lightweight Codex workflow harness focused on database safety, multi-agent orchestration, update hygiene, honest completion checks, and practical autonomous coding loops.
329
+
330
+ ## Team Workflow
331
+
332
+ Team mode uses Codex subagents/custom agents as an orchestration protocol rather than a single long-running worker. `sks setup` enables `multi_agent`, sets agent concurrency limits, and installs local agent role files under `.codex/agents/`.
333
+
334
+ ```text
335
+ team planning
336
+ -> spawn read-only/explorer specialists for code paths, risks, DB safety, tests, and options
337
+ -> synthesize one agreed objective with constraints and acceptance criteria
338
+ -> close planning agents
339
+
340
+ fresh implementation team
341
+ -> assign disjoint write scopes to implementation workers
342
+ -> run work in parallel only when ownership does not overlap
343
+ -> review with QA and DB safety specialists
344
+ -> parent orchestrator integrates, verifies, and reports evidence
345
+ ```
346
+
347
+ Create a Team mission:
348
+
349
+ ```bash
350
+ sks team "implement this feature safely"
351
+ ```
352
+
353
+ Inside Codex App, use:
354
+
355
+ ```text
356
+ $Team agree on the best plan, then implement with specialists
357
+ ```
358
+
359
+ The generated Team artifacts are:
360
+
361
+ ```text
362
+ .sneakoscope/missions/<MISSION_ID>/team-plan.json
363
+ .sneakoscope/missions/<MISSION_ID>/team-workflow.md
364
+ .codex/agents/team-consensus.toml
365
+ .codex/agents/implementation-worker.toml
366
+ .codex/agents/db-safety-reviewer.toml
367
+ .codex/agents/qa-reviewer.toml
368
+ ```
369
+
271
370
  ## Ralph Workflow
272
371
 
273
372
  ```text
@@ -298,12 +397,20 @@ Core invariants:
298
397
 
299
398
  ## Commands
300
399
 
301
- All examples below use `sks`, but the same commands can be run with the `sneakoscope` alias.
400
+ There are two command surfaces:
401
+
402
+ - **Terminal CLI commands**: run in a shell as `sks ...` or `sneakoscope ...`.
403
+ - **Prompt `$` commands**: type inside Codex App or another coding agent prompt, not in a shell.
404
+
405
+ All terminal examples below use `sks`, but the same commands can be run with the `sneakoscope` alias.
406
+
407
+ ### Terminal CLI
302
408
 
303
409
  ```bash
304
410
  sks help [topic]
411
+ sks update-check [--json]
305
412
  sks commands [--json]
306
- sks usage [install|setup|ralph|research|db|codex-app|df|dollar|eval|gx]
413
+ sks usage [install|setup|team|ralph|research|db|codex-app|df|dollar|eval|gx]
307
414
  sks quickstart
308
415
  sks install-prompt [--project]
309
416
  sks codex-app
@@ -343,7 +450,7 @@ sks eval compare --baseline old.json --candidate new.json [--json]
343
450
  sks eval thresholds
344
451
 
345
452
  sks hproof check [mission-id|latest]
346
- sks team "task"
453
+ sks team "task" [--json]
347
454
  sks gx init [name]
348
455
  sks gx render [name] [--format svg|html|all]
349
456
  sks gx validate [name]
@@ -358,6 +465,45 @@ sks stats [--json]
358
465
 
359
466
  `sks memory` is currently an alias for garbage collection/retention handling.
360
467
 
468
+ ### Prompt $ Commands
469
+
470
+ Use these by typing them at the start of a prompt in Codex App or another coding agent:
471
+
472
+ ```text
473
+ $DF <small design/content request>
474
+ $SKS <general Sneakoscope request>
475
+ $Team <multi-agent team request>
476
+ $Ralph <clarification-gated mission request>
477
+ $Research <research/discovery request>
478
+ $AutoResearch <iterative experiment request>
479
+ $DB <database or Supabase safety request>
480
+ $GX <visual context request>
481
+ $Help <command/help request>
482
+ ```
483
+
484
+ Examples:
485
+
486
+ ```text
487
+ $DF 글자 색 파란색으로 바꿔줘
488
+ $DF 내용을 영어로 바꿔줘
489
+ $DF Change the CTA label to "Start"
490
+ $Ralph 결제 실패 재시도 로직 개선
491
+ $Research LLM 에이전트 평가 방법론 조사
492
+ $DB 이 migration 안전한지 검사해줘
493
+ $GX 현재 아키텍처를 시각 컨텍스트로 만들어줘
494
+ $Help 사용 가능한 명령어 알려줘
495
+ ```
496
+
497
+ `$DF` is the fast path for simple design/content edits. It is intentionally scoped to the requested change and should not run Ralph, Research, eval, or broad redesign loops unless you explicitly ask.
498
+
499
+ To inspect these routes from the terminal:
500
+
501
+ ```bash
502
+ sks dollar-commands
503
+ sks df
504
+ sks usage dollar
505
+ ```
506
+
361
507
  ## Research Mode
362
508
 
363
509
  Research mode is for exploratory work where the desired output is a possible new insight, mechanism, prediction, or experiment, not a summary. It uses a frontier-discovery loop:
@@ -480,6 +626,7 @@ sks hproof check latest
480
626
  .codex/config.toml Codex profiles used by Sneakoscope Codex
481
627
  .codex/hooks.json hook entrypoints
482
628
  .codex/skills/ Codex App local project skills
629
+ .codex/agents/ Codex App custom agents for Team mode
483
630
  .codex/SNEAKOSCOPE.md Codex App quick reference
484
631
  .agents/skills/ Sneakoscope Codex helper skills
485
632
  AGENTS.md managed repository rules block
@@ -575,12 +722,13 @@ npm run repo-audit
575
722
  npm run packcheck
576
723
  npm run selftest
577
724
  npm run sizecheck
725
+ npm run release:check
578
726
  npm run doctor
579
727
  ```
580
728
 
581
- `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 `prepack` and `prepublishOnly`.
729
+ `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.
582
730
 
583
- `npm run sizecheck` blocks accidental package bloat before `npm pack` or `npm publish`. Defaults: packed tarball `<=96 KiB`, unpacked package `<=320 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`.
731
+ `npm run sizecheck` blocks accidental package bloat during `release:check`, `publish:dry`, and `npm publish`. Defaults: packed tarball `<=96 KiB`, unpacked package `<=320 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`.
584
732
 
585
733
  `npm run selftest` uses the mock path and does not call a model. Live Ralph runs require a working Codex CLI installation and authentication.
586
734
 
@@ -36,7 +36,7 @@ The accuracy metric is not a live model task score. It is a deterministic proxy
36
36
  - `@openai/codex` is no longer bundled. Users install Codex separately or set `SKS_CODEX_BIN`.
37
37
  - Optional Rust source is in `crates/` for the Git repo, but is excluded from the npm package by the `files` allowlist.
38
38
  - GX rendering uses only built-in Node.js APIs and ships as source in the npm package.
39
- - `npm run sizecheck` enforces package limits before pack/publish: `<=96 KiB` packed, `<=320 KiB` unpacked, `<=40` package files, and `<=256 KiB` per tracked file by default.
39
+ - `npm run sizecheck` enforces package limits during `release:check`, `publish:dry`, and publish: `<=96 KiB` packed, `<=320 KiB` unpacked, `<=40` package files, and `<=256 KiB` per tracked file by default.
40
40
 
41
41
  ## Memory leaks
42
42
 
package/package.json CHANGED
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "Sneakoscope Codex",
4
- "version": "0.6.0",
5
- "description": "Sneakoscope Codex: database-safe, performance-bounded Codex CLI harness with Ralph no-question loop, H-Proof gates, deterministic GX visual context, and TriWiki compression.",
4
+ "version": "0.6.3",
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
+ "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/mandarange/Sneakoscope-Codex.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/mandarange/Sneakoscope-Codex/issues"
14
+ },
7
15
  "bin": {
8
16
  "sks": "bin/sks.mjs",
9
17
  "sneakoscope": "bin/sks.mjs"
@@ -28,10 +36,10 @@
28
36
  "doctor": "node ./bin/sks.mjs doctor",
29
37
  "packcheck": "find bin src scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check",
30
38
  "sizecheck": "node ./scripts/sizecheck.mjs",
31
- "publish:dry": "npm --cache /tmp/sks-npm-cache pack --dry-run",
39
+ "release:check": "npm run repo-audit && npm run packcheck && npm run selftest && npm run sizecheck",
40
+ "publish:dry": "npm run release:check && npm --cache /tmp/sks-npm-cache pack --dry-run",
32
41
  "publish:npm": "npm --cache /tmp/sks-npm-cache publish --access public",
33
- "prepack": "npm run repo-audit && npm run packcheck && npm run selftest && npm run sizecheck",
34
- "prepublishOnly": "npm run repo-audit && npm run packcheck && npm run selftest && npm run sizecheck"
42
+ "prepublishOnly": "npm run release:check"
35
43
  },
36
44
  "keywords": [
37
45
  "sneakoscope",
@@ -39,9 +47,19 @@
39
47
  "sks",
40
48
  "cli",
41
49
  "ai-agent",
50
+ "ai-agents",
42
51
  "harness",
52
+ "codex-cli",
53
+ "codex-app",
54
+ "multi-agent",
55
+ "subagents",
56
+ "agent-orchestration",
57
+ "agent-team",
43
58
  "ralph",
44
59
  "research",
60
+ "autoresearch",
61
+ "honest-mode",
62
+ "update-check",
45
63
  "hypothesis",
46
64
  "discovery",
47
65
  "llm-wiki",