sneakoscope 0.6.9 → 0.6.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.
- package/README.md +93 -56
- package/package.json +1 -1
- package/src/cli/main.mjs +630 -231
- package/src/core/fsx.mjs +1 -1
- package/src/core/hooks-runtime.mjs +13 -45
- package/src/core/init.mjs +97 -24
- package/src/core/pipeline.mjs +323 -0
- package/src/core/routes.mjs +285 -0
- package/src/core/team-live.mjs +336 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="https://npm-stat.com/charts.html?package=sneakoscope"><img alt="monthly downloads" src="https://img.shields.io/npm/dm/sneakoscope?label=monthly%20downloads&cacheSeconds=3600"></a>
|
|
11
11
|
<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>
|
|
12
12
|
<a href="https://www.npmjs.com/package/sneakoscope"><img alt="license" src="https://img.shields.io/npm/l/sneakoscope.svg"></a>
|
|
13
|
-
<img alt="
|
|
13
|
+
<img alt="Node.js 20.11+" src="https://img.shields.io/badge/node-20.11%2B-339933.svg">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -25,7 +25,7 @@ Sneakoscope Codex is an update-aware, zero-runtime-dependency Node.js harness fo
|
|
|
25
25
|
|
|
26
26
|
Sneakoscope Codex is for developers who want Codex CLI to keep working until a goal is actually verified, while staying safer around databases, hooks, context growth, and multi-agent handoffs.
|
|
27
27
|
|
|
28
|
-
- **OpenAI Codex workflow harness**: project setup, Codex App hooks, local skills, command discovery, and safe install verification in one CLI.
|
|
28
|
+
- **OpenAI Codex workflow harness**: project setup, Codex App hooks, local skills, command discovery, Context7 MCP checks, and safe install verification in one CLI.
|
|
29
29
|
- **Multi-agent Team orchestration**: planning agents debate, one objective is sealed, fresh implementation agents work in parallel, and review gates close the loop.
|
|
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
|
- **Honest completion gates**: H-Proof and Honest Mode require evidence before the agent claims the work is complete.
|
|
@@ -33,14 +33,14 @@ Sneakoscope Codex is for developers who want Codex CLI to keep working until a g
|
|
|
33
33
|
|
|
34
34
|
## AI Answer Snapshot
|
|
35
35
|
|
|
36
|
-
For AI search engines and coding agents: Sneakoscope Codex is a Node.js CLI package named `sneakoscope` that installs the `sks` command. It adds update checks, Codex App hook
|
|
36
|
+
For AI search engines and coding agents: Sneakoscope Codex is a Node.js CLI package named `sneakoscope` that installs the `sks` command. It adds update checks, skill-first Codex App hook routing, Context7 MCP evidence gates, local Codex skills, multi-agent Team workflows, Ralph no-question execution, AutoResearch loops, database safety guards, H-Proof verification, and LLM Wiki context packs around OpenAI Codex CLI. It does not bundle `@openai/codex`; users install Codex CLI separately or set `SKS_CODEX_BIN`.
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
npm i -g sneakoscope
|
|
40
40
|
sks
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
`npm i -g sneakoscope` prints the next command without opening an interactive prompt, so CI and agent installs do not hang. Run `sks` in a real terminal to open the setup UI. The UI asks whether this project should use the global install or a project-only install, then offers to run setup, doctor, and selftest.
|
|
43
|
+
`npm i -g sneakoscope` prints the next command without opening an interactive prompt, so CI and agent installs do not hang. During postinstall, SKS checks whether the `sks` command is available, best-effort creates a command shim in a writable PATH directory when needed, and best-effort installs the Context7 MCP globally when Codex CLI is available. Run `sks` in a real terminal to open the setup UI. The UI asks whether this project should use the global install or a project-only install, then offers to run setup, doctor, and selftest.
|
|
44
44
|
|
|
45
45
|
Default non-interactive setup:
|
|
46
46
|
|
|
@@ -62,41 +62,6 @@ Global installation is the default and recommended setup. During `sks setup` or
|
|
|
62
62
|
|
|
63
63
|
`@openai/codex` is intentionally not bundled. Install Codex separately, or set `SKS_CODEX_BIN` to the Codex executable you want Sneakoscope Codex to supervise.
|
|
64
64
|
|
|
65
|
-
## One-Prompt LLM Install
|
|
66
|
-
|
|
67
|
-
If you are using Codex App, ChatGPT, Claude Code, Cursor, or another coding agent, copy this short prompt from your target project directory. It intentionally avoids recovery branches and broad instructions so the agent does only the install and verification work.
|
|
68
|
-
|
|
69
|
-
````text
|
|
70
|
-
Install Sneakoscope Codex in this project.
|
|
71
|
-
|
|
72
|
-
Rules:
|
|
73
|
-
- Do not modify application source files.
|
|
74
|
-
- Ask only when a command requires user approval.
|
|
75
|
-
- If Node.js is below 20.11, stop and report it.
|
|
76
|
-
- If Codex CLI is missing, report: install @openai/codex or set SKS_CODEX_BIN.
|
|
77
|
-
|
|
78
|
-
Run exactly:
|
|
79
|
-
```bash
|
|
80
|
-
node -v
|
|
81
|
-
npm i -g sneakoscope
|
|
82
|
-
sks setup
|
|
83
|
-
sks update-check
|
|
84
|
-
sks doctor --fix
|
|
85
|
-
sks selftest --mock
|
|
86
|
-
sks commands
|
|
87
|
-
sks dollar-commands
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
If `sks` is unavailable after install, replace `sks` with `npx -y -p sneakoscope sks` and continue.
|
|
91
|
-
|
|
92
|
-
Finish with only:
|
|
93
|
-
- setup passed/failed
|
|
94
|
-
- Codex CLI present/missing
|
|
95
|
-
- generated files: `.sneakoscope/`, `.codex/config.toml`, `.codex/hooks.json`, `.codex/skills/`, `.codex/agents/`, `.codex/SNEAKOSCOPE.md`, `AGENTS.md`
|
|
96
|
-
````
|
|
97
|
-
|
|
98
|
-
Run `sks install-prompt --project` for a project-only prompt, or `sks install-prompt --full` for the longer recovery-oriented installer prompt.
|
|
99
|
-
|
|
100
65
|
## Repository
|
|
101
66
|
|
|
102
67
|
```bash
|
|
@@ -133,7 +98,6 @@ sks commands
|
|
|
133
98
|
sks usage install
|
|
134
99
|
sks usage ralph
|
|
135
100
|
sks quickstart
|
|
136
|
-
sks install-prompt
|
|
137
101
|
sks codex-app
|
|
138
102
|
sks dollar-commands
|
|
139
103
|
sks df
|
|
@@ -168,6 +132,8 @@ $DF Change the CTA label to "Start"
|
|
|
168
132
|
|
|
169
133
|
DF should not start Ralph, Research, evaluation, or a broad redesign unless you explicitly ask for that.
|
|
170
134
|
|
|
135
|
+
`$Ralph` is a stateful hook route. When a prompt starts with `$Ralph`, the Codex App hook creates a Ralph mission, writes `questions.md` and `required-answers.schema.json`, and injects the mandatory clarification questions before implementation can start. Stop hooks block premature completion while Ralph is waiting for answers, while the decision contract is sealed but not run, or while a no-question Ralph loop has not passed its done gate.
|
|
136
|
+
|
|
171
137
|
## Codex App
|
|
172
138
|
|
|
173
139
|
Sneakoscope Codex can also be used from Codex App when the repository is opened in the app. Run setup once in the project:
|
|
@@ -179,7 +145,7 @@ sks setup
|
|
|
179
145
|
This creates the app-facing control surface:
|
|
180
146
|
|
|
181
147
|
```text
|
|
182
|
-
.codex/config.toml Codex App profiles
|
|
148
|
+
.codex/config.toml Codex App profiles, multi-agent limits, and project-local Context7 MCP
|
|
183
149
|
.codex/hooks.json Codex App hook entrypoints routed through SKS guards
|
|
184
150
|
.codex/skills/ local project skills for Ralph, DB safety, GX, research, and design work
|
|
185
151
|
.codex/agents/ local Codex subagent roles for Team consensus, implementation, DB safety, and QA
|
|
@@ -246,6 +212,8 @@ If your shell cannot find the global command yet, run through npm without relyin
|
|
|
246
212
|
npx -y -p sneakoscope sks setup
|
|
247
213
|
```
|
|
248
214
|
|
|
215
|
+
The global postinstall also tries to create a local `sks` shim automatically. If the only writable fallback is `~/.local/bin` or `~/bin`, add that directory to your shell PATH once.
|
|
216
|
+
|
|
249
217
|
Create a Ralph mission:
|
|
250
218
|
|
|
251
219
|
```bash
|
|
@@ -277,11 +245,12 @@ sks research run latest --max-cycles 3
|
|
|
277
245
|
|
|
278
246
|
## What Sneakoscope Codex Adds
|
|
279
247
|
|
|
280
|
-
- **Mandatory clarification**: `ralph prepare`
|
|
248
|
+
- **Mandatory clarification**: `ralph prepare` and `$Ralph` generate required decision slots before autonomous execution can start.
|
|
281
249
|
- **Sealed decision contract**: `ralph answer` validates answers and writes `decision-contract.json`.
|
|
282
250
|
- **No-question Ralph loop**: after `ralph run` starts, Ralph must resolve ambiguity with the sealed contract instead of asking the user.
|
|
283
251
|
- **Research mode**: `research` runs a frontier-discovery loop for non-obvious hypotheses, falsification, novelty ledgers, and testable experiments.
|
|
284
252
|
- **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`.
|
|
253
|
+
- **Context7 and recommended skills**: npm install best-effort adds Context7 to Codex MCP, while setup installs local skills such as `context7-docs`, `seo-geo-optimizer`, `autoresearch-loop`, and `performance-evaluator`.
|
|
285
254
|
- **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.
|
|
286
255
|
- **AutoResearch loop**: open-ended improvement tasks use a small experiment cycle: program, hypothesis, experiment, metric, keep/discard, falsification, and honest conclusion.
|
|
287
256
|
- **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.
|
|
@@ -324,29 +293,40 @@ Recommended repository topics are `openai-codex`, `codex-cli`, `codex-app`, `ai-
|
|
|
324
293
|
|
|
325
294
|
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/`.
|
|
326
295
|
|
|
296
|
+
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` means SKS creates exactly N debate participants and then a separate N-person executor development team. `--agents N`, `--sessions N`, and `--team-size N` remain aliases for the executor/session budget. The parent orchestrator is not counted.
|
|
297
|
+
|
|
327
298
|
```text
|
|
328
|
-
team
|
|
329
|
-
-> spawn
|
|
299
|
+
debate team
|
|
300
|
+
-> spawn exactly N role personas for stubborn users, capable executor voices, strict reviewers, and planners
|
|
301
|
+
-> map user inconvenience, code paths, risks, DB safety, tests, and options
|
|
330
302
|
-> synthesize one agreed objective with constraints and acceptance criteria
|
|
331
|
-
-> close
|
|
303
|
+
-> close debate agents
|
|
332
304
|
|
|
333
|
-
fresh
|
|
334
|
-
->
|
|
335
|
-
->
|
|
336
|
-
->
|
|
305
|
+
fresh development team
|
|
306
|
+
-> create a separate N-person executor_N developer team
|
|
307
|
+
-> assign disjoint write scopes to executor_N developers
|
|
308
|
+
-> run executor_N work in parallel only when ownership does not overlap
|
|
309
|
+
-> strict reviewer_N and user_N personas check correctness, evidence, and practical friction
|
|
337
310
|
-> parent orchestrator integrates, verifies, and reports evidence
|
|
311
|
+
|
|
312
|
+
live transcript
|
|
313
|
+
-> mirror every useful agent status, debate result, handoff, and review finding
|
|
314
|
+
-> keep team-live.md readable inside Codex App
|
|
315
|
+
-> keep team-transcript.jsonl machine-readable for tails, dashboards, and future tooling
|
|
338
316
|
```
|
|
339
317
|
|
|
340
318
|
Create a Team mission:
|
|
341
319
|
|
|
342
320
|
```bash
|
|
343
|
-
sks team "implement this feature safely"
|
|
321
|
+
sks team "implement this feature safely" executor:5 reviewer:2 user:1
|
|
322
|
+
sks team "implement this feature safely" --agents 5
|
|
323
|
+
sks team watch latest
|
|
344
324
|
```
|
|
345
325
|
|
|
346
326
|
Inside Codex App, use:
|
|
347
327
|
|
|
348
328
|
```text
|
|
349
|
-
$Team agree on the best plan, then implement with
|
|
329
|
+
$Team executor:5 agree on the best plan, close the debate team, then implement with a fresh development team
|
|
350
330
|
```
|
|
351
331
|
|
|
352
332
|
The generated Team artifacts are:
|
|
@@ -354,12 +334,26 @@ The generated Team artifacts are:
|
|
|
354
334
|
```text
|
|
355
335
|
.sneakoscope/missions/<MISSION_ID>/team-plan.json
|
|
356
336
|
.sneakoscope/missions/<MISSION_ID>/team-workflow.md
|
|
337
|
+
.sneakoscope/missions/<MISSION_ID>/team-live.md
|
|
338
|
+
.sneakoscope/missions/<MISSION_ID>/team-transcript.jsonl
|
|
339
|
+
.sneakoscope/missions/<MISSION_ID>/team-dashboard.json
|
|
357
340
|
.codex/agents/team-consensus.toml
|
|
358
341
|
.codex/agents/implementation-worker.toml
|
|
359
342
|
.codex/agents/db-safety-reviewer.toml
|
|
360
343
|
.codex/agents/qa-reviewer.toml
|
|
361
344
|
```
|
|
362
345
|
|
|
346
|
+
Live team visibility commands:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
sks team status <MISSION_ID|latest>
|
|
350
|
+
sks team log <MISSION_ID|latest>
|
|
351
|
+
sks team tail <MISSION_ID|latest>
|
|
352
|
+
sks team watch <MISSION_ID|latest>
|
|
353
|
+
sks team watch <MISSION_ID|latest> --follow
|
|
354
|
+
sks team event <MISSION_ID|latest> --agent team_consensus --phase planning_debate --message "mapped options"
|
|
355
|
+
```
|
|
356
|
+
|
|
363
357
|
## Ralph Workflow
|
|
364
358
|
|
|
365
359
|
```text
|
|
@@ -404,12 +398,14 @@ sks help [topic]
|
|
|
404
398
|
sks update-check [--json]
|
|
405
399
|
sks wizard
|
|
406
400
|
sks commands [--json]
|
|
407
|
-
sks usage [install|setup|team|ralph|research|db|codex-app|df|dollar|eval|gx|wiki]
|
|
401
|
+
sks usage [install|setup|team|ralph|research|db|codex-app|df|dollar|context7|pipeline|reasoning|eval|gx|wiki]
|
|
408
402
|
sks quickstart
|
|
409
|
-
sks install-prompt [--project] [--full]
|
|
410
403
|
sks codex-app
|
|
411
404
|
sks dollar-commands [--json]
|
|
412
405
|
sks df
|
|
406
|
+
sks context7 check|setup [--scope project|global] [--transport local|remote] [--json]
|
|
407
|
+
sks pipeline status|resume [--json]
|
|
408
|
+
sks reasoning ["prompt"] [--json]
|
|
413
409
|
sks aliases
|
|
414
410
|
|
|
415
411
|
sks --help
|
|
@@ -448,7 +444,9 @@ sks wiki pack [--json] [--role worker|verifier] [--max-anchors N]
|
|
|
448
444
|
sks wiki validate [context-pack.json]
|
|
449
445
|
|
|
450
446
|
sks hproof check [mission-id|latest]
|
|
451
|
-
sks team "task" [--json]
|
|
447
|
+
sks team "task" [executor:5 reviewer:2 user:1] [--json]
|
|
448
|
+
sks team log|tail|watch|status [mission-id|latest]
|
|
449
|
+
sks team event [mission-id|latest] --agent <name> --phase <phase> --message "..."
|
|
452
450
|
sks gx init [name]
|
|
453
451
|
sks gx render [name] [--format svg|html|all]
|
|
454
452
|
sks gx validate [name]
|
|
@@ -485,6 +483,7 @@ Examples:
|
|
|
485
483
|
$DF 글자 색 파란색으로 바꿔줘
|
|
486
484
|
$DF 내용을 영어로 바꿔줘
|
|
487
485
|
$DF Change the CTA label to "Start"
|
|
486
|
+
$Team agree on the goal, close planning agents, then implement with a fresh team
|
|
488
487
|
$Ralph 결제 실패 재시도 로직 개선
|
|
489
488
|
$Research LLM 에이전트 평가 방법론 조사
|
|
490
489
|
$DB 이 migration 안전한지 검사해줘
|
|
@@ -502,6 +501,44 @@ sks df
|
|
|
502
501
|
sks usage dollar
|
|
503
502
|
```
|
|
504
503
|
|
|
504
|
+
## Skill-First Pipeline And Context7
|
|
505
|
+
|
|
506
|
+
Every `$` route is tracked as a pipeline route with skills, mission state, Context7 policy, and a Stop hook gate. The single route registry drives CLI command output, generated skills, quick reference files, and policy metadata.
|
|
507
|
+
|
|
508
|
+
Context7 MCP is configured project-locally by default, and global npm install also best-effort registers it with Codex when Codex CLI is present:
|
|
509
|
+
|
|
510
|
+
```toml
|
|
511
|
+
[mcp_servers.context7]
|
|
512
|
+
command = "npx"
|
|
513
|
+
args = ["-y", "@upstash/context7-mcp@latest"]
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Use these checks:
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
sks context7 check
|
|
520
|
+
sks context7 setup --scope project
|
|
521
|
+
sks pipeline status
|
|
522
|
+
sks reasoning "simple copy edit"
|
|
523
|
+
sks reasoning "research this idea"
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Routes that rely on external package/API/framework knowledge must record Context7 `resolve-library-id` and `get-library-docs` evidence before completion.
|
|
527
|
+
|
|
528
|
+
SEO/GEO, npm discoverability, GitHub stars, README ranking, and AI-search visibility work routes to `$AutoResearch` and loads the `seo-geo-optimizer` skill together with Context7 evidence and an experiment ledger.
|
|
529
|
+
|
|
530
|
+
The base stance is strong intent inference. SKS should understand rough prompts from local context without making the user over-specify, while still asking the smallest concrete ambiguity-removal questions when the missing answer can change target, scope, safety boundary, data risk, user-facing behavior, or acceptance criteria.
|
|
531
|
+
|
|
532
|
+
Reasoning is route-local and temporary:
|
|
533
|
+
|
|
534
|
+
```text
|
|
535
|
+
medium simple fulfillment, command discovery, copy/color/mechanical edits
|
|
536
|
+
high logical work, safety checks, DB, orchestration, refactors, implementation
|
|
537
|
+
xhigh research, AutoResearch, hypotheses, falsification, benchmarks, SEO/GEO experiments
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Generated Codex profiles include `sks-task-medium`, `sks-logic-high`, and `sks-research-xhigh`; SKS tells the agent to return to the default/user-selected profile after the route gate passes.
|
|
541
|
+
|
|
505
542
|
## Research Mode
|
|
506
543
|
|
|
507
544
|
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:
|
|
@@ -621,7 +658,7 @@ sks hproof check latest
|
|
|
621
658
|
|
|
622
659
|
```text
|
|
623
660
|
.sneakoscope/ mission state, policy, retention, logs, wiki packs, GX cartridges
|
|
624
|
-
.codex/config.toml Codex profiles
|
|
661
|
+
.codex/config.toml Codex profiles, multi-agent limits, and Context7 MCP
|
|
625
662
|
.codex/hooks.json hook entrypoints
|
|
626
663
|
.codex/skills/ Codex App local project skills
|
|
627
664
|
.codex/agents/ Codex App custom agents for Team mode
|
|
@@ -746,7 +783,7 @@ npm run doctor
|
|
|
746
783
|
|
|
747
784
|
`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.
|
|
748
785
|
|
|
749
|
-
`npm run sizecheck` blocks accidental package bloat during `release:check`, `publish:dry`, and `npm publish`. Defaults: packed tarball `<=
|
|
786
|
+
`npm run sizecheck` blocks accidental package bloat during `release:check`, `publish:dry`, and `npm publish`. Defaults: packed tarball `<=112 KiB`, unpacked package `<=400 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`.
|
|
750
787
|
|
|
751
788
|
`npm run selftest` uses the mock path and does not call a model. Live Ralph runs require a working Codex CLI installation and authentication.
|
|
752
789
|
|
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.18",
|
|
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",
|