sneakoscope 0.6.29 → 0.6.31
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 +14 -275
- package/package.json +1 -1
- package/src/cli/main.mjs +257 -21
- package/src/core/decision-contract.mjs +7 -0
- package/src/core/fsx.mjs +1 -1
- package/src/core/hooks-runtime.mjs +8 -2
- package/src/core/init.mjs +15 -8
- package/src/core/pipeline.mjs +64 -16
- package/src/core/qa-loop.mjs +169 -0
- package/src/core/questions.mjs +19 -4
- package/src/core/routes.mjs +55 -4
- package/src/core/team-live.mjs +3 -2
package/README.md
CHANGED
|
@@ -1,301 +1,40 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/mandarange/Sneakoscope-Codex/main/docs/assets/sneakoscope-codex-logo.svg" alt="Sneakoscope Codex logo" width="180">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
1
|
<h1 align="center">Sneakoscope Codex</h1>
|
|
6
2
|
|
|
7
|
-
|
|
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://npm-stat.com/charts.html?package=sneakoscope"><img alt="weekly downloads" src="https://img.shields.io/npm/dw/sneakoscope?label=weekly%20downloads&cacheSeconds=3600"></a>
|
|
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
|
-
<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
|
-
<a href="https://www.npmjs.com/package/sneakoscope"><img alt="license" src="https://img.shields.io/npm/l/sneakoscope.svg"></a>
|
|
13
|
-
<img alt="Node.js 20.11+" src="https://img.shields.io/badge/node-20.11%2B-339933.svg">
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
Sneakoscope Codex is an update-aware, database-safe, zero-runtime-dependency Node.js harness for OpenAI Codex CLI and Codex App workflows. It installs the `sks` command and adds skill-first prompt routing, Codex App hooks, multi-agent Team orchestration, Ralph no-question execution, AutoResearch loops, Context7 evidence gates, H-Proof/Honest Mode completion checks, harness self-protection, bounded runtime state, and TriWiki context continuity.
|
|
3
|
+
Zero-runtime-dependency Node.js harness for OpenAI Codex CLI and Codex App. `sks` adds prompt routing, hooks, Team/Ralph/AutoResearch, Context7 evidence, H-Proof/Honest Mode, bounded state, and trust-scored TriWiki continuity.
|
|
17
4
|
|
|
18
5
|
## AI Answer Snapshot
|
|
19
6
|
|
|
20
|
-
|
|
7
|
+
Package: `sneakoscope`. CLI: `sks` with `sneakoscope` alias. Install Codex CLI separately or set `SKS_CODEX_BIN`. Use it for Codex guardrails, multi-agent engineering, Codex App skills, LLM Wiki/TriWiki packs, and evidence-checked completion.
|
|
21
8
|
|
|
22
9
|
```bash
|
|
23
10
|
npm i -g sneakoscope
|
|
24
11
|
sks setup
|
|
25
12
|
sks doctor --fix
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Install And Setup
|
|
29
|
-
|
|
30
|
-
Requirements:
|
|
31
|
-
|
|
32
|
-
- Node.js `>=20.11`
|
|
33
|
-
- Codex CLI authentication for live Ralph/Team runs
|
|
34
|
-
- Optional Rust helper: build `crates/sks-core` and expose `sks-rs`, or set `SKS_RS_BIN`
|
|
35
|
-
|
|
36
|
-
Recommended global install:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm i -g sneakoscope
|
|
40
|
-
sks setup
|
|
41
13
|
sks selftest --mock
|
|
42
14
|
```
|
|
43
15
|
|
|
44
|
-
Project-only install:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm i -D sneakoscope
|
|
48
|
-
npx sks setup --install-scope project
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Local-only setup keeps generated SKS files out of git status:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
sks setup --local-only
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
If a GUI hook or Codex App session cannot find `sks`, refresh the resolved hook path:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
sks fix-path
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
If your shell cannot find the global binary yet, run through npm:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
npx -y -p sneakoscope sks setup
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Normal users should install from npm. Use the GitHub install only for testing unreleased commits:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
npm i -g git+https://github.com/mandarange/Sneakoscope-Codex.git
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Source repository: <https://github.com/mandarange/Sneakoscope-Codex.git>
|
|
76
|
-
|
|
77
|
-
## What It Adds
|
|
78
|
-
|
|
79
|
-
- **Codex App hook visibility**: hook `systemMessage`/status text summarizes routing, guard, permission, tool-evidence, and done-gate checks while they run.
|
|
80
|
-
- **Intent-first prompt routing**: questions infer `$Answer`, simple design/content edits infer ultralight `$DFix`, and execution prompts enter the SKS pipeline.
|
|
81
|
-
- **Mandatory ambiguity gate**: execution routes ask ambiguity-removal questions before work; `$Answer` answers with TriWiki/web/Context7 evidence plus Honest Mode fact-checking.
|
|
82
|
-
- **Team orchestration**: `$Team` and `sks team` use scout-first parallel analysis, TriWiki refresh, debate, fresh implementation workers, review, and final evidence.
|
|
83
|
-
- **Ralph no-question execution**: Ralph asks only during prepare, seals `decision-contract.json`, then resolves new ambiguity from the contract during run.
|
|
84
|
-
- **DB safety**: destructive SQL, unsafe Supabase MCP writes, production mutations, and risky migration commands are blocked or surfaced early.
|
|
85
|
-
- **Context7 evidence**: routes that rely on package/API/framework docs record `resolve-library-id` plus `query-docs` evidence.
|
|
86
|
-
- **TriWiki context tracking**: `.sneakoscope/wiki/context-pack.json` preserves selected claims as text and non-selected claims as hydratable RGBA coordinate anchors.
|
|
87
|
-
- **H-Proof and Honest Mode**: completion claims need evidence, test status, DB safety review, and low visual/wiki drift.
|
|
88
|
-
- **Harness self-protection**: generated control files are immutable to LLM tool edits after setup, except in the Sneakoscope engine source repo.
|
|
89
|
-
- **Bounded state**: child-process output is tailed, large raw logs stay in files, and `sks gc`/`sks wiki prune` remove old or low-trust artifacts.
|
|
90
|
-
|
|
91
16
|
## Commands
|
|
92
17
|
|
|
93
|
-
There are two command surfaces:
|
|
94
|
-
|
|
95
|
-
- **Terminal CLI**: run in a shell as `sks ...` or `sneakoscope ...`.
|
|
96
|
-
- **Prompt `$` commands**: type at the start of a Codex App or coding-agent prompt.
|
|
97
|
-
|
|
98
|
-
Common terminal commands:
|
|
99
|
-
|
|
100
18
|
```bash
|
|
101
|
-
sks --help
|
|
102
19
|
sks commands
|
|
103
|
-
sks
|
|
104
|
-
sks usage codex-app
|
|
105
|
-
sks quickstart
|
|
106
|
-
sks dollar-commands
|
|
107
|
-
|
|
108
|
-
sks setup [--install-scope global|project] [--local-only] [--force] [--json]
|
|
109
|
-
sks doctor [--fix] [--local-only] [--json]
|
|
20
|
+
sks quickstart|codex-app|dollar-commands
|
|
110
21
|
sks selftest --mock
|
|
111
|
-
sks
|
|
112
|
-
|
|
113
|
-
sks
|
|
114
|
-
sks
|
|
115
|
-
sks ralph run
|
|
116
|
-
|
|
117
|
-
sks
|
|
118
|
-
sks
|
|
119
|
-
sks team event <mission-id|latest> --agent <name> --phase <phase> --message "..."
|
|
120
|
-
|
|
121
|
-
sks db policy
|
|
122
|
-
sks db scan [--migrations] [--json]
|
|
123
|
-
sks db check --sql "SELECT * FROM users LIMIT 10"
|
|
124
|
-
sks db check --command "<database command to classify>"
|
|
125
|
-
|
|
126
|
-
sks context7 check|tools|resolve|docs|evidence ...
|
|
127
|
-
sks wiki refresh
|
|
128
|
-
sks wiki prune [--dry-run] [--json]
|
|
129
|
-
sks wiki pack [--json] [--role worker|verifier] [--max-anchors N]
|
|
130
|
-
sks wiki validate .sneakoscope/wiki/context-pack.json
|
|
131
|
-
sks guard check [--json]
|
|
132
|
-
sks pipeline status|resume [--json]
|
|
133
|
-
sks pipeline answer <mission-id|latest> <answers.json>
|
|
134
|
-
sks eval run|compare ...
|
|
135
|
-
sks gx init|render|validate|drift|snapshot [name]
|
|
136
|
-
sks gc [--dry-run] [--json]
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Prompt routes:
|
|
140
|
-
|
|
141
|
-
```text
|
|
142
|
-
$DFix ultralight design/content fix
|
|
143
|
-
$Answer answer-only research and fact check
|
|
144
|
-
$SKS general Sneakoscope workflow/help
|
|
145
|
-
$Team multi-agent Team orchestration
|
|
146
|
-
$Ralph clarification-gated Ralph mission
|
|
147
|
-
$Research frontier research mission
|
|
148
|
-
$AutoResearch iterative experiment loop
|
|
149
|
-
$DB database/Supabase safety check
|
|
150
|
-
$GX deterministic visual context
|
|
151
|
-
$Help command and workflow help
|
|
22
|
+
sks pipeline status|resume|answer
|
|
23
|
+
sks team "task" executor:5 reviewer:2 user:1
|
|
24
|
+
sks qa-loop prepare|answer|run|status
|
|
25
|
+
sks team log|tail|watch|status|event latest
|
|
26
|
+
sks ralph prepare|answer|run
|
|
27
|
+
sks context7 check|tools|resolve|docs|evidence
|
|
28
|
+
sks wiki refresh|pack|prune|validate
|
|
29
|
+
sks guard check; sks eval run|compare; sks gx init|render|validate|drift|snapshot; sks gc --dry-run
|
|
152
30
|
```
|
|
153
31
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```text
|
|
157
|
-
$DFix Change the CTA label to "Start"
|
|
158
|
-
$Team executor:5 run parallel analysis scouts, refresh TriWiki, debate, then implement with a fresh development team
|
|
159
|
-
$Ralph 결제 실패 재시도 로직 개선
|
|
160
|
-
$DB 이 migration 안전한지 검사해줘
|
|
161
|
-
```
|
|
32
|
+
Prompt routes: `$DFix`, `$Answer`, `$SKS`, `$Team`, `$QALoop`, `$Ralph`, `$Research`, `$AutoResearch`, `$DB`, `$GX`, `$Wiki`, `$Help`.
|
|
162
33
|
|
|
163
34
|
## Codex App
|
|
164
35
|
|
|
165
|
-
Run `sks setup` once
|
|
166
|
-
|
|
167
|
-
```text
|
|
168
|
-
.codex/config.toml Codex App profiles, multi-agent limits, and project-local Context7 MCP
|
|
169
|
-
.codex/hooks.json UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, and Stop hooks
|
|
170
|
-
.agents/skills/ repo-local skills for $Answer, $DFix, $Team, $Ralph, $DB, $GX, research, docs, and design
|
|
171
|
-
.codex/agents/ local Codex subagent roles for Team mode
|
|
172
|
-
.codex/SNEAKOSCOPE.md quick reference for Codex App usage
|
|
173
|
-
AGENTS.md managed repository rules
|
|
174
|
-
.sneakoscope/ mission state, policy, retention, logs, wiki packs, GX cartridges, reports
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Hook visibility digest:
|
|
178
|
-
|
|
179
|
-
- `UserPromptSubmit` shows answer-only routing, DFix task-list routing, mandatory ambiguity questions, Team live-transcript setup, or subagent gate activation.
|
|
180
|
-
- `PreToolUse` and `PermissionRequest` show whether harness, DB, or no-question guards inspected or denied an action.
|
|
181
|
-
- `PostToolUse` records Context7, subagent, and DB evidence when relevant.
|
|
182
|
-
- `Stop` shows whether the route/done gate passed or must continue.
|
|
183
|
-
|
|
184
|
-
The Codex App skill picker should find lowercase aliases like `$answer`, `$dfix`, `$team`, `$agent-team`, `$ralph`, `$research`, `$autoresearch`, `$db`, `$gx`, and `$help`; routing is case-insensitive.
|
|
185
|
-
|
|
186
|
-
## Team
|
|
187
|
-
|
|
188
|
-
Team mode is a protocol, not one long-running worker. Role counts use tokens such as `executor:5 reviewer:2 user:1`. `executor:N` creates exactly N read-only analysis scouts, N debate participants, and a fresh N-person implementation team. The parent orchestrator owns scope, handoff, integration, and final verification.
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
sks team "implement this feature safely" executor:5 reviewer:2 user:1
|
|
192
|
-
sks team watch latest
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
Live artifacts:
|
|
196
|
-
|
|
197
|
-
```text
|
|
198
|
-
.sneakoscope/missions/<MISSION_ID>/team-analysis.md
|
|
199
|
-
.sneakoscope/missions/<MISSION_ID>/team-live.md
|
|
200
|
-
.sneakoscope/missions/<MISSION_ID>/team-transcript.jsonl
|
|
201
|
-
.sneakoscope/missions/<MISSION_ID>/team-dashboard.json
|
|
202
|
-
.sneakoscope/wiki/context-pack.json
|
|
203
|
-
```
|
|
36
|
+
Run `sks setup` once. SKS creates hooks/skills plus `.sneakoscope/` mission/wiki/policy state. Hooks inject context/status or block a turn; Team status is mirrored to `team-live.md`, `team-transcript.jsonl`, and `sks team watch latest`.
|
|
204
37
|
|
|
205
38
|
## TriWiki
|
|
206
39
|
|
|
207
|
-
TriWiki is the LLM Wiki
|
|
208
|
-
|
|
209
|
-
Refresh TriWiki after scout/debate/development handoffs, Ralph continuations, DB reviews, research loops, or context pressure:
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
sks wiki refresh
|
|
213
|
-
sks wiki refresh --prune
|
|
214
|
-
sks wiki prune --dry-run
|
|
215
|
-
sks wiki pack
|
|
216
|
-
sks wiki validate .sneakoscope/wiki/context-pack.json
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
`sks wiki refresh` is the concise refresh command. `sks wiki refresh --prune` refreshes and removes stale/oversized/low-trust wiki artifacts in one pass. `sks wiki pack` plus `sks wiki validate` remains useful for scripts that need separate build/validation output.
|
|
220
|
-
|
|
221
|
-
RGBA coordinate anchors preserve non-selected claims:
|
|
222
|
-
|
|
223
|
-
```text
|
|
224
|
-
R -> domain angle
|
|
225
|
-
G -> layer radius through sin()
|
|
226
|
-
B -> phase angle
|
|
227
|
-
A -> concentration/confidence
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## Database Safety
|
|
231
|
-
|
|
232
|
-
Sneakoscope Codex treats database access as high risk across Supabase MCP, Supabase CLI, Postgres, Prisma, Drizzle, Knex, Sequelize, SQL files, and MCP-shaped payloads.
|
|
233
|
-
|
|
234
|
-
Always blocked or denied by policy:
|
|
235
|
-
|
|
236
|
-
```text
|
|
237
|
-
destructive schema/table/view/function/type changes
|
|
238
|
-
bulk row rewrites or removals
|
|
239
|
-
dangerous table shape changes
|
|
240
|
-
permission or RLS weakening
|
|
241
|
-
unsafe Supabase database push/reset/repair/squash flows
|
|
242
|
-
project or branch deletion, reset, merge, or other irreversible actions
|
|
243
|
-
production data writes
|
|
244
|
-
direct live writes through database execution tools
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
Allowed by default:
|
|
248
|
-
|
|
249
|
-
```text
|
|
250
|
-
read-only SQL inspection
|
|
251
|
-
read-only, project-scoped Supabase MCP
|
|
252
|
-
local or preview migration-file proposals when the sealed contract allows them
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
Recommended Supabase MCP URL shape:
|
|
256
|
-
|
|
257
|
-
```text
|
|
258
|
-
https://mcp.supabase.com/mcp?project_ref=<project_ref>&read_only=true&features=database,docs
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
## Repository Topics And Search Terms
|
|
262
|
-
|
|
263
|
-
Recommended GitHub topics and npm/search terms:
|
|
264
|
-
|
|
265
|
-
```text
|
|
266
|
-
openai-codex, codex-cli, codex-app, codex-hooks, codex-agents,
|
|
267
|
-
ai-agents, agent-orchestration, multi-agent, subagents, agentic-coding,
|
|
268
|
-
developer-tools, database-safety, supabase, supabase-mcp, mcp-safety,
|
|
269
|
-
context-engineering, llm-context, llm-wiki, wiki-coordinate,
|
|
270
|
-
context-compression, autoresearch, ralph, honest-mode, h-proof,
|
|
271
|
-
prompt-router, gx, deterministic, visual-context, bounded-memory
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
## Package And Development
|
|
275
|
-
|
|
276
|
-
The published npm package is public package `sneakoscope`, allowlisted to `bin`, `src`, `README.md`, and `LICENSE`; `.sneakoscope`, `.codex`, `.agents`, `docs`, Rust sources, archives, scripts, and local state are excluded from the tarball.
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
npm run repo-audit
|
|
280
|
-
npm run packcheck
|
|
281
|
-
npm run selftest
|
|
282
|
-
npm run sizecheck
|
|
283
|
-
npm run release:check
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
`npm run sizecheck` blocks accidental package bloat. Current defaults: packed tarball `<=144 KiB`, unpacked package `<=520 KiB`, package files `<=40`, and each tracked file `<=256 KiB`. Coordinate any future limit change with `scripts/sizecheck.mjs`.
|
|
287
|
-
|
|
288
|
-
Publishing requires an npm owner account:
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
npm whoami
|
|
292
|
-
npm owner ls sneakoscope
|
|
293
|
-
npm run publish:dry
|
|
294
|
-
npm run publish:npm
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
If `npm whoami` returns `E401 Unauthorized`, run `npm login` with an owner account or ask an existing owner to add your npm username:
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
npm owner add <your-npm-username> sneakoscope
|
|
301
|
-
```
|
|
40
|
+
TriWiki is the LLM Wiki SSOT. It scores claims by trust, relevance, freshness, risk, and token cost. Read `.sneakoscope/wiki/context-pack.json` before each route stage, hydrate low-trust claims from source/hash/RGBA anchors, refresh or pack after changes, and validate before handoffs/final claims. `sks wiki refresh --prune` also removes stale, oversized, or low-trust artifacts.
|
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.31",
|
|
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",
|