sneakoscope 6.1.2 → 6.2.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.
- package/README.md +11 -4
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/cli/install-helpers.js +8 -3
- package/dist/config/skills-manifest.json +58 -58
- package/dist/core/agents/agent-effort-policy.js +28 -17
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/codex/codex-config-guard.js +178 -7
- package/dist/core/codex/codex-config-readability.js +21 -8
- package/dist/core/codex/codex-config-toml.js +14 -11
- package/dist/core/codex-app/mcp-manager.js +679 -0
- package/dist/core/codex-app/sks-menubar.js +405 -6
- package/dist/core/codex-control/codex-lb-launch-recovery.js +15 -0
- package/dist/core/codex-native/core-skill-manifest.js +1 -1
- package/dist/core/commands/mad-sks-command.js +44 -3
- package/dist/core/commands/menubar-command.js +94 -0
- package/dist/core/commands/naruto-command.js +3 -1
- package/dist/core/commands/wiki-command.js +11 -5
- package/dist/core/fsx.js +1 -0
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +14 -8
- package/dist/core/hooks-runtime/naruto-decision-gate.js +184 -0
- package/dist/core/hooks-runtime/stop-repeat-guard.js +89 -0
- package/dist/core/hooks-runtime.js +36 -105
- package/dist/core/init/skills.js +4 -4
- package/dist/core/init.js +1 -1
- package/dist/core/managed-assets/managed-assets-manifest.js +178 -29
- package/dist/core/preflight/parallel-preflight-engine.js +16 -3
- package/dist/core/proof/route-adapter.js +1 -1
- package/dist/core/proof/selftest-proof-fixtures.js +3 -5
- package/dist/core/provider/model-router.js +15 -6
- package/dist/core/release/package-size-budget.js +4 -6
- package/dist/core/research/research-plan-markdown.js +123 -0
- package/dist/core/research/research-super-search.js +8 -4
- package/dist/core/research.js +4 -119
- package/dist/core/retention.js +70 -2
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +75 -22
- package/dist/core/subagents/agent-catalog.js +87 -15
- package/dist/core/subagents/model-policy.js +189 -48
- package/dist/core/subagents/naruto-help-contract.js +11 -4
- package/dist/core/subagents/official-subagent-preparation.js +55 -9
- package/dist/core/subagents/official-subagent-prompt.js +45 -23
- package/dist/core/subagents/thread-budget.js +1 -1
- package/dist/core/subagents/triwiki-attention.js +117 -14
- package/dist/core/triwiki/code-pack-head-freshness.js +291 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-launcher.js +12 -2
- package/dist/core/zellij/zellij-pane-proof.js +9 -1
- package/dist/core/zellij/zellij-update.js +14 -1
- package/dist/scripts/canonical-test-runner.js +7 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +11 -1
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +9 -2
- package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +13 -2
- package/dist/scripts/codex-native-agent-role-content-check.js +13 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +2 -0
- package/dist/scripts/lib/codex-sdk-gate-lib.js +4 -0
- package/dist/scripts/official-subagent-workflow-check.js +1 -1
- package/dist/scripts/packlist-performance-check.js +1 -18
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +8 -0
- package/dist/scripts/sks-menubar-install-check.js +6 -1
- package/dist/scripts/super-search-provider-interface-check.js +31 -18
- package/package.json +3 -1
- package/dist/scripts/codex-0139-feature-probes-check.js +0 -30
- package/dist/scripts/codex-0139-marketplace-source-check.js +0 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sha256 } from '../fsx.js';
|
|
2
|
+
import { subagentModelProfile } from '../subagents/model-policy.js';
|
|
2
3
|
export const MANAGED_ASSET_SCHEMA_VERSION = 1;
|
|
3
|
-
export const MANAGED_ASSET_VERSION = '6.
|
|
4
|
+
export const MANAGED_ASSET_VERSION = '6.2.0';
|
|
4
5
|
export const MANAGED_ASSET_MARKER = 'SKS-MANAGED-ASSET';
|
|
5
6
|
export const MANAGED_OFFICIAL_SUBAGENT_MARKER = 'SKS-MANAGED-OFFICIAL-SUBAGENT';
|
|
6
7
|
export const MANAGED_AGENT_ROLES = Object.freeze([
|
|
@@ -25,15 +26,15 @@ export const MANAGED_OFFICIAL_SUBAGENT_ROLES = Object.freeze([
|
|
|
25
26
|
filename: 'worker.toml',
|
|
26
27
|
aliases: ['worker'],
|
|
27
28
|
codexName: 'worker',
|
|
28
|
-
description: '
|
|
29
|
-
|
|
30
|
-
keywords: ['
|
|
29
|
+
description: 'Luna Max execution subagent only for tiny, short-context, mechanical work with an explicit done condition.',
|
|
30
|
+
policy: 'luna_max_mechanical',
|
|
31
|
+
keywords: ['tiny', 'short context', 'single file', 'mechanical', 'repeatable', 'exact rename', 'format only', 'typo'],
|
|
31
32
|
nicknames: ['Kite', 'Moss', 'Pico', 'Reed', 'Vale', 'Wren'],
|
|
32
33
|
instructions: `You are a bounded execution subagent.
|
|
33
34
|
|
|
34
35
|
Work only on the exact slice assigned by the parent agent.
|
|
35
36
|
Do not redesign the task, expand scope, or spawn another subagent.
|
|
36
|
-
|
|
37
|
+
Use this role only when the context is short and the work is tiny, mechanical, repeatable, and free of judgment, exploration, debugging, or design.
|
|
37
38
|
Respect the parent session's sandbox and approval mode.
|
|
38
39
|
When writing, touch only the assigned files or paths.
|
|
39
40
|
Run only the verification directly relevant to your slice.
|
|
@@ -49,14 +50,14 @@ Do not claim success without direct evidence.`
|
|
|
49
50
|
filename: 'implementation-specialist.toml',
|
|
50
51
|
aliases: ['implementation-specialist', 'core-implementer'],
|
|
51
52
|
codexName: 'implementation_specialist',
|
|
52
|
-
description: 'Sol implementation specialist for
|
|
53
|
-
|
|
54
|
-
keywords: ['implementation', 'backend', 'core', 'api', 'lifecycle
|
|
53
|
+
description: 'Sol High implementation specialist for ordinary backend, core, API, lifecycle, and cross-file coding with disjoint ownership.',
|
|
54
|
+
policy: 'sol_high_implementation',
|
|
55
|
+
keywords: ['implementation', 'backend', 'core', 'api', 'lifecycle implementation', 'cross-file coding', 'feature change', '구현', '백엔드', '핵심 로직'],
|
|
55
56
|
nicknames: ['Builder', 'Forge', 'Mason', 'Rivet'],
|
|
56
57
|
instructions: `You are the bounded complex implementation specialist.
|
|
57
58
|
|
|
58
59
|
Own only the disjoint files and acceptance criteria assigned by the parent.
|
|
59
|
-
Use this role for non-mechanical backend, core, API, lifecycle, and cross-file implementation.
|
|
60
|
+
Use this role for ordinary non-mechanical backend, core, API, lifecycle, and cross-file implementation. Escalate review, debugging, planning, architecture, security, release, and ambiguous work to a Sol Max specialist.
|
|
60
61
|
Do not redesign unrelated architecture or integrate sibling work.
|
|
61
62
|
Make the smallest defensible change, run focused verification, and return files, evidence, and residual risks.`
|
|
62
63
|
}),
|
|
@@ -66,7 +67,7 @@ Make the smallest defensible change, run focused verification, and return files,
|
|
|
66
67
|
aliases: ['expert'],
|
|
67
68
|
codexName: 'expert',
|
|
68
69
|
description: 'Read-only reasoning fallback for ambiguous analysis when no narrower specialist matches.',
|
|
69
|
-
|
|
70
|
+
policy: 'sol_max_judgment',
|
|
70
71
|
sandbox: 'read-only',
|
|
71
72
|
keywords: ['ambiguous', 'strategy', 'planning', 'trade-off', 'risk', 'judgment'],
|
|
72
73
|
nicknames: ['Atlas', 'Delta', 'Helix', 'Orion', 'Sage', 'Vector'],
|
|
@@ -88,18 +89,34 @@ Return a concise result, evidence, risks, and next action.`
|
|
|
88
89
|
filename: 'explorer.toml',
|
|
89
90
|
aliases: ['explorer', 'code-explorer'],
|
|
90
91
|
codexName: 'explorer',
|
|
91
|
-
description: '
|
|
92
|
-
|
|
92
|
+
description: 'Terra Medium read-only codebase explorer for read-heavy scans, entry points, ownership, dependencies, and distilled evidence.',
|
|
93
|
+
policy: 'terra_medium_context_tools',
|
|
93
94
|
sandbox: 'read-only',
|
|
94
95
|
keywords: ['explore', 'map', 'trace', 'inventory', 'locate', 'search', 'read-only'],
|
|
95
96
|
nicknames: ['Beacon', 'Compass', 'Maple', 'Scout'],
|
|
96
97
|
instructions: `You are the read-only code explorer.
|
|
97
98
|
|
|
98
99
|
Map only the code paths relevant to the assigned question.
|
|
99
|
-
Prefer targeted search and exact symbol references
|
|
100
|
+
Prefer targeted search and exact symbol references, but use this role for repository-wide or long-context scans that would be unsafe for Luna.
|
|
100
101
|
Identify entry points, state transitions, owners, and evidence gaps.
|
|
101
102
|
Do not propose a broad redesign and do not edit files.
|
|
102
103
|
Return concise findings with exact paths and symbols.`
|
|
104
|
+
}),
|
|
105
|
+
officialSubagentRole({
|
|
106
|
+
id: 'sks-official-long-context-analyst',
|
|
107
|
+
filename: 'long-context-analyst.toml',
|
|
108
|
+
aliases: ['long-context-analyst', 'large-context-analyst', 'document-analyst'],
|
|
109
|
+
codexName: 'long_context_analyst',
|
|
110
|
+
description: 'Terra Medium read-only analyst for large files, long logs, multi-document context, and distilled evidence handoffs.',
|
|
111
|
+
policy: 'terra_medium_context_tools',
|
|
112
|
+
sandbox: 'read-only',
|
|
113
|
+
keywords: ['long context', 'large file', 'large codebase', 'multi-document', 'supporting documents', 'extensive logs', 'context compression'],
|
|
114
|
+
nicknames: ['Archive', 'Atlas', 'Mosaic', 'Scroll'],
|
|
115
|
+
instructions: `You are the long-context evidence analyst.
|
|
116
|
+
|
|
117
|
+
Read large files, long logs, or multiple supporting documents without turning raw context into unsupported conclusions.
|
|
118
|
+
Return a compact, source-addressable summary to the parent and identify which claims still require Sol Max judgment.
|
|
119
|
+
Use bounded TriWiki anchors first, hydrate only relevant sources, and do not edit files or spawn another subagent.`
|
|
103
120
|
}),
|
|
104
121
|
officialSubagentRole({
|
|
105
122
|
id: 'sks-official-debugger',
|
|
@@ -107,7 +124,7 @@ Return concise findings with exact paths and symbols.`
|
|
|
107
124
|
aliases: ['debugger', 'root-cause'],
|
|
108
125
|
codexName: 'debugger',
|
|
109
126
|
description: 'Read-only root-cause specialist for failures, flaky behavior, regressions, and cross-layer diagnostics.',
|
|
110
|
-
|
|
127
|
+
policy: 'sol_max_judgment',
|
|
111
128
|
sandbox: 'read-only',
|
|
112
129
|
keywords: ['debug', 'diagnose', 'root cause', 'failure', 'flaky', 'regression', 'why'],
|
|
113
130
|
nicknames: ['Ada', 'Kepler', 'Trace', 'Vega'],
|
|
@@ -124,7 +141,7 @@ Return the minimal causal chain, exact evidence, and the smallest defensible fix
|
|
|
124
141
|
aliases: ['test-engineer', 'qa-engineer'],
|
|
125
142
|
codexName: 'test_engineer',
|
|
126
143
|
description: 'Test engineer for focused regression coverage, deterministic fixtures, and failure-oriented verification.',
|
|
127
|
-
|
|
144
|
+
policy: 'sol_max_judgment',
|
|
128
145
|
keywords: ['test', 'qa', 'fixture', 'regression', 'coverage', 'verification'],
|
|
129
146
|
nicknames: ['Check', 'Proof', 'Quill', 'Tess'],
|
|
130
147
|
instructions: `You are the focused test engineer.
|
|
@@ -139,8 +156,8 @@ Run only the focused checks needed for the slice and report exact commands and o
|
|
|
139
156
|
filename: 'ui-implementer.toml',
|
|
140
157
|
aliases: ['ui-implementer', 'frontend-specialist'],
|
|
141
158
|
codexName: 'ui_implementer',
|
|
142
|
-
description: 'UI and terminal-interface implementation specialist for visual behavior, interaction, accessibility, and rendered state.',
|
|
143
|
-
|
|
159
|
+
description: 'Sol High UI and terminal-interface implementation specialist for visual behavior, interaction, accessibility, and rendered state.',
|
|
160
|
+
policy: 'sol_high_implementation',
|
|
144
161
|
keywords: ['ui', 'ux', 'frontend', 'visual', 'terminal', 'zellij', 'pane', 'accessibility'],
|
|
145
162
|
nicknames: ['Canvas', 'Iris', 'Pixel', 'Turing'],
|
|
146
163
|
instructions: `You are the UI implementation specialist.
|
|
@@ -149,6 +166,136 @@ Trace the rendered user-visible behavior before editing.
|
|
|
149
166
|
Make the smallest change that fixes interaction, layout, accessibility, or terminal presentation.
|
|
150
167
|
Preserve the existing design system and unrelated behavior.
|
|
151
168
|
Verify the rendered result with the appropriate live or deterministic surface and report evidence.`
|
|
169
|
+
}),
|
|
170
|
+
officialSubagentRole({
|
|
171
|
+
id: 'sks-official-native-app-specialist',
|
|
172
|
+
filename: 'native-app-specialist.toml',
|
|
173
|
+
aliases: ['native-app-specialist', 'macos-specialist', 'desktop-specialist'],
|
|
174
|
+
codexName: 'native_app_specialist',
|
|
175
|
+
description: 'Sol High native desktop coding specialist for macOS AppKit and Swift menu-bar UI, app lifecycle, accessibility, and OS integration.',
|
|
176
|
+
policy: 'sol_high_implementation',
|
|
177
|
+
keywords: ['native app', 'macos', 'appkit', 'swift', 'menu bar', 'nsstatusitem', 'nsworkspace', 'tcc', 'desktop app'],
|
|
178
|
+
nicknames: ['Cocoa', 'Darwin', 'Quartz', 'Swift'],
|
|
179
|
+
instructions: `You are the native desktop implementation specialist.
|
|
180
|
+
|
|
181
|
+
Own only the assigned native macOS, AppKit, Swift, or menu-bar files.
|
|
182
|
+
Preserve the project design system, accessibility semantics, app lifecycle, and OS permission boundaries.
|
|
183
|
+
Do not substitute web UI or placeholder assets for required native behavior.
|
|
184
|
+
Verify with the narrowest compile, deterministic template, or live native check available and report exact evidence.`
|
|
185
|
+
}),
|
|
186
|
+
officialSubagentRole({
|
|
187
|
+
id: 'sks-official-computer-use-operator',
|
|
188
|
+
filename: 'computer-use-operator.toml',
|
|
189
|
+
aliases: ['computer-use-operator', 'desktop-operator'],
|
|
190
|
+
codexName: 'computer_use_operator',
|
|
191
|
+
description: 'Terra Medium Computer Use operator for scoped native macOS, desktop-app, and OS-settings interaction or evidence capture.',
|
|
192
|
+
policy: 'terra_medium_context_tools',
|
|
193
|
+
sandbox: 'read-only',
|
|
194
|
+
keywords: ['computer use', 'desktop interaction', 'macos inspection', 'system settings', 'native app inspection', 'visual evidence'],
|
|
195
|
+
nicknames: ['Cursor', 'Finder', 'Orbit', 'Quartz'],
|
|
196
|
+
instructions: `You are the scoped Computer Use operator.
|
|
197
|
+
|
|
198
|
+
Use Codex Computer Use only for the explicit native macOS, desktop-app, OS-settings, or non-web visual slice assigned by the parent.
|
|
199
|
+
Do not replace judgment, debugging, planning, or security review; return captured evidence to the appropriate Sol Max specialist.
|
|
200
|
+
Honor the parent permission scope, avoid destructive or irreversible UI actions, do not edit source files, and report exactly what was observed or changed.`
|
|
201
|
+
}),
|
|
202
|
+
officialSubagentRole({
|
|
203
|
+
id: 'sks-official-browser-use-operator',
|
|
204
|
+
filename: 'browser-use-operator.toml',
|
|
205
|
+
aliases: ['browser-use-operator', 'chrome-operator', 'web-operator'],
|
|
206
|
+
codexName: 'browser_use_operator',
|
|
207
|
+
description: 'Terra Medium Browser/Chrome operator for scoped website, localhost, webapp, and browser-based evidence collection or verification.',
|
|
208
|
+
policy: 'terra_medium_context_tools',
|
|
209
|
+
sandbox: 'read-only',
|
|
210
|
+
keywords: ['browser use', 'browser', 'chrome', 'website', 'webapp', 'localhost', 'playwright', 'browser evidence'],
|
|
211
|
+
nicknames: ['Chrome', 'Lens', 'Navigator', 'Tab'],
|
|
212
|
+
instructions: `You are the scoped Browser/Chrome operator.
|
|
213
|
+
|
|
214
|
+
Use the Codex Chrome Extension path first for websites, localhost, webapps, and browser-based verification, and halt rapidly when the required extension is unavailable.
|
|
215
|
+
Do not perform security, UX, debugging, or product judgment; collect precise browser evidence and hand it to the relevant Sol Max specialist.
|
|
216
|
+
Honor the parent permission scope, avoid destructive external actions, do not edit source files, and report URLs or sensitive values only in redacted form.`
|
|
217
|
+
}),
|
|
218
|
+
officialSubagentRole({
|
|
219
|
+
id: 'sks-official-image-generation-operator',
|
|
220
|
+
filename: 'image-generation-operator.toml',
|
|
221
|
+
aliases: ['image-generation-operator', 'imagegen-operator', 'image-tool-operator'],
|
|
222
|
+
codexName: 'image_generation_operator',
|
|
223
|
+
description: 'Terra Medium image-generation operator for scoped imagegen and GPT Image execution after the parent seals the visual requirements.',
|
|
224
|
+
policy: 'terra_medium_context_tools',
|
|
225
|
+
keywords: ['image generation', 'imagegen', 'gpt image', 'gpt-image-2', 'generate image', 'edit image', 'visual asset'],
|
|
226
|
+
nicknames: ['Aperture', 'Frame', 'Palette', 'Render'],
|
|
227
|
+
instructions: `You are the scoped image-generation operator.
|
|
228
|
+
|
|
229
|
+
Execute only the sealed image-generation or image-editing instructions supplied by the parent, using the official Codex image generation surface when available.
|
|
230
|
+
Do not perform UX review, art-direction judgment, or product strategy; return generated artifact paths and tool evidence to a Sol Max reviewer when judgment is required.
|
|
231
|
+
Write only assigned generated-asset paths, preserve source images, and never fabricate successful image output.`
|
|
232
|
+
}),
|
|
233
|
+
officialSubagentRole({
|
|
234
|
+
id: 'sks-official-toolchain-specialist',
|
|
235
|
+
filename: 'toolchain-specialist.toml',
|
|
236
|
+
aliases: ['toolchain-specialist', 'build-specialist', 'dependency-specialist'],
|
|
237
|
+
codexName: 'toolchain_specialist',
|
|
238
|
+
description: 'Build and toolchain implementation specialist for dependency and runtime upgrades, package scripts, install/doctor/update flows, and CI automation.',
|
|
239
|
+
policy: 'sol_max_judgment',
|
|
240
|
+
keywords: ['toolchain', 'dependency upgrade', 'runtime upgrade', 'package manager', 'npm', 'pnpm', 'cargo', 'build script', 'install flow', 'doctor flow', 'update flow', 'ci automation'],
|
|
241
|
+
nicknames: ['Anvil', 'Bolt', 'Crank', 'Gear'],
|
|
242
|
+
instructions: `You are the build and toolchain implementation specialist.
|
|
243
|
+
|
|
244
|
+
Own only the assigned dependency, runtime, package, install, doctor, update, or CI files.
|
|
245
|
+
For external package or runtime changes, use current documentation evidence supplied through Context7 or official vendor sources; do not guess syntax or versions.
|
|
246
|
+
Preserve reproducibility, idempotency, lockfile truth, and user-owned configuration.
|
|
247
|
+
Run focused build or packaging checks and report exact commands, outputs, and remaining compatibility risk.`
|
|
248
|
+
}),
|
|
249
|
+
officialSubagentRole({
|
|
250
|
+
id: 'sks-official-protocol-reviewer',
|
|
251
|
+
filename: 'protocol-reviewer.toml',
|
|
252
|
+
aliases: ['protocol-reviewer', 'contract-reviewer', 'api-contract-reviewer'],
|
|
253
|
+
codexName: 'protocol_reviewer',
|
|
254
|
+
description: 'Read-only protocol and contract reviewer for MCP, CLI, SDK, API, schemas, serialization, and backward compatibility.',
|
|
255
|
+
policy: 'sol_max_judgment',
|
|
256
|
+
sandbox: 'read-only',
|
|
257
|
+
keywords: ['protocol', 'contract', 'mcp', 'cli contract', 'sdk', 'api contract', 'schema', 'serialization', 'wire format', 'backward compatibility'],
|
|
258
|
+
nicknames: ['Handshake', 'IETF', 'Packet', 'Schema'],
|
|
259
|
+
instructions: `You are the protocol and contract reviewer.
|
|
260
|
+
|
|
261
|
+
Trace only the assigned MCP, CLI, SDK, API, schema, serialization, or wire-format boundary.
|
|
262
|
+
Compare producers, consumers, validation, versioning, and error behavior from current source and current official documentation when external contracts apply.
|
|
263
|
+
Stay read-only and do not infer compatibility from types alone.
|
|
264
|
+
Return concrete contract mismatches, affected callers, compatibility severity, and the smallest verification needed.`
|
|
265
|
+
}),
|
|
266
|
+
officialSubagentRole({
|
|
267
|
+
id: 'sks-official-runtime-reliability-reviewer',
|
|
268
|
+
filename: 'runtime-reliability-reviewer.toml',
|
|
269
|
+
aliases: ['runtime-reliability-reviewer', 'reliability-reviewer', 'lifecycle-reviewer'],
|
|
270
|
+
codexName: 'runtime_reliability_reviewer',
|
|
271
|
+
description: 'Read-only runtime reliability reviewer for hooks, sessions, locks, daemons, process cleanup, idempotency, recovery, and race conditions.',
|
|
272
|
+
policy: 'sol_max_judgment',
|
|
273
|
+
sandbox: 'read-only',
|
|
274
|
+
keywords: ['runtime reliability', 'hook lifecycle', 'session', 'lock', 'daemon', 'process cleanup', 'idempotency', 'recovery', 'race condition', 'deadlock'],
|
|
275
|
+
nicknames: ['Latch', 'Relay', 'Semaphore', 'Uptime'],
|
|
276
|
+
instructions: `You are the runtime reliability reviewer.
|
|
277
|
+
|
|
278
|
+
Trace the assigned lifecycle across hooks, sessions, locks, daemons, subprocesses, cleanup, retries, and recovery.
|
|
279
|
+
Stay read-only; distinguish deterministic evidence from timing hypotheses.
|
|
280
|
+
Check idempotency, ownership, stale-state handling, timeout behavior, and race or deadlock risk.
|
|
281
|
+
Return the causal state sequence, severity, exact evidence, and focused concurrency or recovery checks.`
|
|
282
|
+
}),
|
|
283
|
+
officialSubagentRole({
|
|
284
|
+
id: 'sks-official-triwiki-evidence-reviewer',
|
|
285
|
+
filename: 'triwiki-evidence-reviewer.toml',
|
|
286
|
+
aliases: ['triwiki-evidence-reviewer', 'evidence-reviewer', 'provenance-reviewer'],
|
|
287
|
+
codexName: 'triwiki_evidence_reviewer',
|
|
288
|
+
description: 'Read-only TriWiki and evidence reviewer for bounded recall, provenance, trust anchors, wrongness memory, proof artifacts, and unsupported claims.',
|
|
289
|
+
policy: 'sol_max_judgment',
|
|
290
|
+
sandbox: 'read-only',
|
|
291
|
+
keywords: ['triwiki', 'context pack', 'provenance', 'trust anchor', 'proof artifact', 'wrongness memory', 'unsupported claim', 'source hydration'],
|
|
292
|
+
nicknames: ['Anchor', 'Ledger', 'Proof', 'Source'],
|
|
293
|
+
instructions: `You are the TriWiki and evidence reviewer.
|
|
294
|
+
|
|
295
|
+
Consume compact attention.use_first anchors first and hydrate only sources relevant to the assigned claim or risky decision.
|
|
296
|
+
Never inject or reread the full context pack by default.
|
|
297
|
+
Stay read-only and check provenance, source freshness, trust anchors, wrongness memory, proof artifacts, and unsupported completion claims.
|
|
298
|
+
Return claim-to-source findings, stale or missing evidence, confidence, and the minimum hydration or validation still required.`
|
|
152
299
|
}),
|
|
153
300
|
officialSubagentRole({
|
|
154
301
|
id: 'sks-official-architecture-reviewer',
|
|
@@ -156,7 +303,7 @@ Verify the rendered result with the appropriate live or deterministic surface an
|
|
|
156
303
|
aliases: ['architecture-reviewer', 'architect'],
|
|
157
304
|
codexName: 'architecture_reviewer',
|
|
158
305
|
description: 'Read-only architecture reviewer for boundaries, lifecycle, state ownership, coupling, and refactor risk.',
|
|
159
|
-
|
|
306
|
+
policy: 'sol_max_judgment',
|
|
160
307
|
sandbox: 'read-only',
|
|
161
308
|
keywords: ['architecture', 'design', 'lifecycle', 'state ownership', 'refactor', 'coupling'],
|
|
162
309
|
nicknames: ['Archimedes', 'Euler', 'Frame', 'Mencius'],
|
|
@@ -173,7 +320,7 @@ Do not edit files; return prioritized findings and a bounded recommendation.`
|
|
|
173
320
|
aliases: ['security-reviewer', 'security'],
|
|
174
321
|
codexName: 'security_reviewer',
|
|
175
322
|
description: 'Read-only security reviewer for trust boundaries, permissions, secrets, authentication, and abuse cases.',
|
|
176
|
-
|
|
323
|
+
policy: 'sol_max_judgment',
|
|
177
324
|
sandbox: 'read-only',
|
|
178
325
|
keywords: ['security', 'permission', 'secret', 'auth', 'trust boundary', 'abuse'],
|
|
179
326
|
nicknames: ['Aegis', 'Cipher', 'Sentinel', 'Shield'],
|
|
@@ -190,7 +337,7 @@ Return findings with severity, evidence, exploit preconditions, and the smallest
|
|
|
190
337
|
aliases: ['database-reviewer', 'db-reviewer'],
|
|
191
338
|
codexName: 'database_reviewer',
|
|
192
339
|
description: 'Read-only database reviewer for SQL, migrations, schemas, RLS, rollback safety, and data integrity.',
|
|
193
|
-
|
|
340
|
+
policy: 'sol_max_judgment',
|
|
194
341
|
sandbox: 'read-only',
|
|
195
342
|
keywords: ['database', 'db', 'sql', 'migration', 'schema', 'rls', 'rollback'],
|
|
196
343
|
nicknames: ['Ledger', 'Oracle', 'Rowan', 'Schema'],
|
|
@@ -207,7 +354,7 @@ Return exact risks, evidence, and safe verification or migration recommendations
|
|
|
207
354
|
aliases: ['research-synthesizer', 'researcher'],
|
|
208
355
|
codexName: 'research_synthesizer',
|
|
209
356
|
description: 'Evidence-bound research specialist for source synthesis, falsification, novelty, and adversarial manuscript improvement.',
|
|
210
|
-
|
|
357
|
+
policy: 'sol_max_judgment',
|
|
211
358
|
keywords: ['research', 'paper', 'hypothesis', 'synthesis', 'falsification', 'novelty', 'super search'],
|
|
212
359
|
nicknames: ['Curie', 'Einstein', 'Feynman', 'Noether'],
|
|
213
360
|
instructions: `You are the evidence-bound research synthesizer.
|
|
@@ -224,7 +371,7 @@ Return a structured synthesis, strongest challenge, required revisions, and resi
|
|
|
224
371
|
aliases: ['research-reviewer', 'paper-reviewer'],
|
|
225
372
|
codexName: 'research_reviewer',
|
|
226
373
|
description: 'Read-only adversarial research reviewer for evidence quality, falsification, methodology, novelty, and reproducibility.',
|
|
227
|
-
|
|
374
|
+
policy: 'sol_max_judgment',
|
|
228
375
|
sandbox: 'read-only',
|
|
229
376
|
keywords: ['research review', 'paper review', 'adversarial review', 'methodology', 'reproducibility', 'falsification'],
|
|
230
377
|
nicknames: ['Gauss', 'Skeptic', 'Turing', 'von Neumann'],
|
|
@@ -241,7 +388,7 @@ Approve only when no critical, major, minor, or required revision remains.`
|
|
|
241
388
|
aliases: ['release-reviewer', 'release'],
|
|
242
389
|
codexName: 'release_reviewer',
|
|
243
390
|
description: 'Read-only release reviewer for versioning, package contents, CI, migration safety, and publish authorization.',
|
|
244
|
-
|
|
391
|
+
policy: 'sol_max_judgment',
|
|
245
392
|
sandbox: 'read-only',
|
|
246
393
|
keywords: ['release', 'publish', 'package', 'version', 'changelog', 'ci', 'distribution'],
|
|
247
394
|
nicknames: ['Galileo', 'Harbor', 'Launch', 'Mercury'],
|
|
@@ -257,8 +404,8 @@ Return release blockers, exact evidence, and the minimal verification still requ
|
|
|
257
404
|
filename: 'docs-maintainer.toml',
|
|
258
405
|
aliases: ['docs-maintainer', 'documentation'],
|
|
259
406
|
codexName: 'docs_maintainer',
|
|
260
|
-
description: '
|
|
261
|
-
|
|
407
|
+
description: 'Terra Medium documentation maintainer for multi-source README, changelog, migration, and reference consistency after behavior is known.',
|
|
408
|
+
policy: 'terra_medium_context_tools',
|
|
262
409
|
keywords: ['docs', 'documentation', 'readme', 'changelog', 'migration guide', 'reference'],
|
|
263
410
|
nicknames: ['Ink', 'Page', 'Scribe', 'Slate'],
|
|
264
411
|
instructions: `You are the bounded documentation maintainer.
|
|
@@ -274,7 +421,7 @@ Return changed files and the source of truth used for each behavioral statement.
|
|
|
274
421
|
aliases: ['integration-reviewer', 'integration'],
|
|
275
422
|
codexName: 'integration_reviewer',
|
|
276
423
|
description: 'Read-only cross-module integration reviewer for merge risk, contracts, compatibility, and end-to-end state flow.',
|
|
277
|
-
|
|
424
|
+
policy: 'sol_max_judgment',
|
|
278
425
|
sandbox: 'read-only',
|
|
279
426
|
keywords: ['integration', 'merge', 'rebase', 'compatibility', 'cross-module', 'end-to-end'],
|
|
280
427
|
nicknames: ['Bridge', 'Concord', 'Link', 'Weave'],
|
|
@@ -291,7 +438,7 @@ Return concrete integration risks and focused checks.`
|
|
|
291
438
|
aliases: ['performance-analyst', 'performance'],
|
|
292
439
|
codexName: 'performance_analyst',
|
|
293
440
|
description: 'Read-only performance analyst for latency, concurrency, token cost, resource usage, and benchmark validity.',
|
|
294
|
-
|
|
441
|
+
policy: 'sol_max_judgment',
|
|
295
442
|
sandbox: 'read-only',
|
|
296
443
|
keywords: ['performance', 'latency', 'benchmark', 'concurrency', 'token', 'memory', 'throughput'],
|
|
297
444
|
nicknames: ['Ampere', 'Hopper', 'Pulse', 'Watt'],
|
|
@@ -461,14 +608,16 @@ function role(id, filename, codexName, description, sandbox, aliases) {
|
|
|
461
608
|
};
|
|
462
609
|
}
|
|
463
610
|
function officialSubagentRole(input) {
|
|
611
|
+
const profile = subagentModelProfile(input.policy);
|
|
464
612
|
return {
|
|
465
613
|
id: input.id,
|
|
466
614
|
filename: input.filename,
|
|
467
615
|
aliases: input.aliases,
|
|
468
616
|
codex_name: input.codexName,
|
|
469
617
|
description: input.description,
|
|
470
|
-
|
|
471
|
-
|
|
618
|
+
model_policy: profile.policy,
|
|
619
|
+
model: profile.model,
|
|
620
|
+
model_reasoning_effort: profile.modelReasoningEffort,
|
|
472
621
|
...(input.sandbox ? { sandbox: input.sandbox } : {}),
|
|
473
622
|
nickname_candidates: input.nicknames,
|
|
474
623
|
selection_keywords: input.keywords,
|
|
@@ -43,12 +43,18 @@ export async function runCodexLaunchPreflight(rootInput = process.cwd(), opts =
|
|
|
43
43
|
{ id: 'codex_project_config_policy', run: () => splitCodexProjectConfigPolicy(root, { ...opts, writeReport: false }) },
|
|
44
44
|
{ id: 'codex_lb_tool_output_recovery', run: () => inspectCodexLbToolOutputRecoveryForLaunch(opts) }
|
|
45
45
|
]);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
// A failed read-only preflight must not invoke the full repair inspector unless
|
|
47
|
+
// the operator explicitly requested repair. The repair path re-runs readability
|
|
48
|
+
// before and after its work; on macOS ACL/TCC failures those repeated 5s probes
|
|
49
|
+
// used to compound into minute-scale `sks --mad` startup delays even though no
|
|
50
|
+
// mutation was authorized. Keep the blocker from the first pass and fail fast.
|
|
51
|
+
const repair = opts.fix === true
|
|
52
|
+
? await repairCodexConfigEperm(root, { ...opts, codexProbe: probeCodex, actualCodex: probeCodex, fix: true, writeReport: false })
|
|
48
53
|
: null;
|
|
54
|
+
const providedZellijCapability = reusableZellijCapability(opts.zellijCapability, opts.requireZellij === true);
|
|
49
55
|
const zellijCapability = opts.zellijCapability === false
|
|
50
56
|
? null
|
|
51
|
-
: await checkZellijCapability({ root, require: opts.requireZellij === true, writeReport: false });
|
|
57
|
+
: providedZellijCapability || await checkZellijCapability({ root, require: opts.requireZellij === true, writeReport: false });
|
|
52
58
|
const codexArgs = buildCodexExecArgs({
|
|
53
59
|
json: true,
|
|
54
60
|
outputLastMessage: path.join(root, '.sneakoscope', 'reports', 'codex-preflight-output.json'),
|
|
@@ -87,6 +93,13 @@ export async function runCodexLaunchPreflight(rootInput = process.cwd(), opts =
|
|
|
87
93
|
await writeJsonAtomic(reportPath, { ...report, report_path: reportPath });
|
|
88
94
|
return report;
|
|
89
95
|
}
|
|
96
|
+
function reusableZellijCapability(value, requireZellij) {
|
|
97
|
+
if (!value || value.schema !== 'sks.zellij-capability.v1' || typeof value.status !== 'string')
|
|
98
|
+
return null;
|
|
99
|
+
if (requireZellij && value.status !== 'ok')
|
|
100
|
+
return null;
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
90
103
|
export async function inspectCodexLbToolOutputRecoveryForLaunch(opts = {}) {
|
|
91
104
|
if (opts.skipCodexLbToolOutputRecovery === true) {
|
|
92
105
|
return {
|
|
@@ -28,11 +28,9 @@ export async function writeSelftestRouteProof(root, { missionId, route = '$Team'
|
|
|
28
28
|
route,
|
|
29
29
|
// This fixture writes into a scratch temp directory (see selftestCommand's
|
|
30
30
|
// `tmpdir('sks-selftest-')`) that is discarded after the call returns, so trust
|
|
31
|
-
// artifacts and post-route retention are pointless here.
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
// before the caller could read it back, making `sks selftest --mock` fail with
|
|
35
|
-
// "completion proof fixture missing" even though the proof was written correctly.
|
|
31
|
+
// artifacts and post-route retention are pointless here. The production
|
|
32
|
+
// post-route path now skips global temp sweeping, but this mock fixture still
|
|
33
|
+
// avoids unnecessary trust/retention work before its caller removes the root.
|
|
36
34
|
lightweightEvidence: true,
|
|
37
35
|
status: 'mock_only',
|
|
38
36
|
executionClass: 'mock_fixture',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_SUBAGENT_EFFORT, LUNA_SUBAGENT_EFFORT, SOL_MAX_SUBAGENT_EFFORT, TERRA_SUBAGENT_EFFORT, decideSubagentModel } from '../subagents/model-policy.js';
|
|
2
2
|
const CATEGORY_POLICY = {
|
|
3
3
|
quick: { reasoning: 'low', serviceTier: 'fast' },
|
|
4
4
|
standard: { reasoning: 'medium', serviceTier: 'fast' },
|
|
@@ -10,8 +10,7 @@ const CATEGORY_POLICY = {
|
|
|
10
10
|
refactor: { reasoning: 'max', serviceTier: 'fast' },
|
|
11
11
|
strategy: { reasoning: 'max', serviceTier: 'fast' }
|
|
12
12
|
};
|
|
13
|
-
export const NARUTO_MODELS = ['gpt-5.6-luna', 'gpt-5.6-sol'];
|
|
14
|
-
const NARUTO_EXPLICIT_COMPATIBILITY_MODELS = [...NARUTO_MODELS, 'gpt-5.6-terra'];
|
|
13
|
+
export const NARUTO_MODELS = ['gpt-5.6-luna', 'gpt-5.6-terra', 'gpt-5.6-sol'];
|
|
15
14
|
const E2E_WORK_RE = /(e2e|end[-\s]?to[-\s]?end|test_execution|browser|chrome|computer[-\s]?use|computer\s+use|cross[-\s]?app|playwright|selenium|puppeteer|브라우저|컴퓨터\s*유즈)/i;
|
|
16
15
|
export async function routeModel(category, opts = {}) {
|
|
17
16
|
if (opts.narutoOnly) {
|
|
@@ -39,6 +38,7 @@ export function routeNarutoGpt56Model(input = {}) {
|
|
|
39
38
|
title: input.taskText,
|
|
40
39
|
description: input.riskText,
|
|
41
40
|
role: category,
|
|
41
|
+
toolHeavy: category === 'e2e',
|
|
42
42
|
requiresJudgment: category === 'review'
|
|
43
43
|
|| category === 'refactor'
|
|
44
44
|
|| category === 'strategy'
|
|
@@ -46,12 +46,14 @@ export function routeNarutoGpt56Model(input = {}) {
|
|
|
46
46
|
});
|
|
47
47
|
const preferred = explicit || automatic.model;
|
|
48
48
|
const available = input.availableModels == null
|
|
49
|
-
? [...
|
|
49
|
+
? [...NARUTO_MODELS]
|
|
50
50
|
: input.availableModels.map(normalizeNarutoGpt56Model).filter((model) => Boolean(model));
|
|
51
51
|
const degraded = new Set((input.degradedModels || []).map((model) => String(model).toLowerCase()));
|
|
52
52
|
const usable = available.filter((model) => !degraded.has(model));
|
|
53
53
|
const availableEfforts = effortsForModel(input.availableModelEfforts, preferred);
|
|
54
|
-
const intendedReasoning =
|
|
54
|
+
const intendedReasoning = explicit
|
|
55
|
+
? reasoningForExplicitModel(explicit, automatic.policy === 'sol_max_judgment')
|
|
56
|
+
: automatic.modelReasoningEffort;
|
|
55
57
|
const model = !invalidExplicit && usable.includes(preferred) && (availableEfforts == null || availableEfforts.includes(intendedReasoning)) ? preferred : '';
|
|
56
58
|
return { model, reasoning: intendedReasoning, serviceTier: 'fast' };
|
|
57
59
|
}
|
|
@@ -60,7 +62,7 @@ export function isNarutoGpt56Model(value) {
|
|
|
60
62
|
}
|
|
61
63
|
export function normalizeNarutoGpt56Model(value) {
|
|
62
64
|
const model = String(value || '').trim().toLowerCase();
|
|
63
|
-
return
|
|
65
|
+
return NARUTO_MODELS.includes(model) ? model : null;
|
|
64
66
|
}
|
|
65
67
|
export function categoryForWorkerRole(role, taskText = '') {
|
|
66
68
|
const text = `${String(role || '')} ${String(taskText || '')}`.toLowerCase();
|
|
@@ -98,4 +100,11 @@ function effortsForModel(catalog, model) {
|
|
|
98
100
|
const match = Object.entries(catalog).find(([key]) => key.trim().toLowerCase() === model);
|
|
99
101
|
return (match?.[1] || []).map((effort) => String(effort).toLowerCase());
|
|
100
102
|
}
|
|
103
|
+
function reasoningForExplicitModel(model, judgment) {
|
|
104
|
+
if (model === 'gpt-5.6-luna')
|
|
105
|
+
return LUNA_SUBAGENT_EFFORT;
|
|
106
|
+
if (model === 'gpt-5.6-terra')
|
|
107
|
+
return TERRA_SUBAGENT_EFFORT;
|
|
108
|
+
return judgment ? SOL_MAX_SUBAGENT_EFFORT : DEFAULT_SUBAGENT_EFFORT;
|
|
109
|
+
}
|
|
101
110
|
//# sourceMappingURL=model-router.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// package-size gate; packed bytes remain under the existing 2414 KiB limit.
|
|
6
|
-
export const DEFAULT_MAX_UNPACKED_BYTES = 11_042_816;
|
|
1
|
+
// 6.2.0 measured ceiling: next narrow packed boundary.
|
|
2
|
+
export const DEFAULT_MAX_PACK_BYTES = 2428 * 1024;
|
|
3
|
+
// 6.2.0 measured ceiling: next narrow unpacked boundary.
|
|
4
|
+
export const DEFAULT_MAX_UNPACKED_BYTES = 11_141_120;
|
|
7
5
|
//# sourceMappingURL=package-size-budget.js.map
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export function renderResearchPlanMarkdown(plan, helpers) {
|
|
2
|
+
const lines = [];
|
|
3
|
+
lines.push('# SKS Research Plan');
|
|
4
|
+
lines.push('');
|
|
5
|
+
lines.push(`Prompt: ${plan.prompt}`);
|
|
6
|
+
lines.push(`Depth: ${plan.depth}`);
|
|
7
|
+
lines.push(`Methodology: ${plan.methodology}`);
|
|
8
|
+
lines.push(`Research paper: ${helpers.researchPaperArtifactForPlan(plan)}`);
|
|
9
|
+
if (plan.codex_app_execution_profile) {
|
|
10
|
+
lines.push(`Execution profile: ${plan.codex_app_execution_profile.mode}; agent role strategy ${plan.codex_app_execution_profile.agent_role_strategy}`);
|
|
11
|
+
}
|
|
12
|
+
if (plan.execution_policy) {
|
|
13
|
+
lines.push(`Execution: ${plan.execution_policy.normal_run}; default cycle timeout ${plan.execution_policy.default_cycle_timeout_minutes} minutes`);
|
|
14
|
+
if (plan.execution_policy.default_max_cycles)
|
|
15
|
+
lines.push(`Adversarial review loop: run three independent official research_reviewer threads, revise on any objection, then run a fresh three-thread cycle; default safety cap ${plan.execution_policy.default_max_cycles} cycles`);
|
|
16
|
+
lines.push(`Mock policy: ${plan.execution_policy.mock_policy}`);
|
|
17
|
+
}
|
|
18
|
+
if (plan.mutation_policy)
|
|
19
|
+
lines.push(`Mutation policy: ${plan.mutation_policy.rule}`);
|
|
20
|
+
lines.push('');
|
|
21
|
+
if (plan.quality_contract) {
|
|
22
|
+
const contract = plan.quality_contract;
|
|
23
|
+
lines.push('## Quality Contract');
|
|
24
|
+
lines.push(`- minimum sources: ${contract.min_sources_total}`);
|
|
25
|
+
lines.push(`- minimum source layers covered: ${contract.min_source_layers_covered}`);
|
|
26
|
+
lines.push(`- minimum counterevidence sources: ${contract.min_counterevidence_sources}`);
|
|
27
|
+
lines.push(`- minimum key claims: ${contract.min_key_claims}`);
|
|
28
|
+
lines.push(`- minimum triangulated claims: ${contract.min_trianguled_claims}`);
|
|
29
|
+
lines.push(`- minimum blueprint sections: ${contract.min_implementation_blueprint_sections}`);
|
|
30
|
+
lines.push(`- minimum falsification cases: ${contract.min_falsification_cases}`);
|
|
31
|
+
lines.push(`- minimum experiment steps: ${contract.min_experiment_steps}`);
|
|
32
|
+
lines.push(`- minimum report words: ${contract.min_report_words}`);
|
|
33
|
+
lines.push('');
|
|
34
|
+
}
|
|
35
|
+
if (plan.native_agent_plan) {
|
|
36
|
+
lines.push('## Official Subagent Review Plan');
|
|
37
|
+
lines.push(`Backend: ${plan.native_agent_plan.backend}`);
|
|
38
|
+
lines.push(`Sessions: ${plan.native_agent_plan.session_count}`);
|
|
39
|
+
lines.push(`AutoResearch batches: ${plan.native_agent_plan.autoresearch_cycle_policy?.uses_agent_batches ? 'enabled' : 'disabled'}`);
|
|
40
|
+
for (const persona of plan.native_agent_plan.personas || []) {
|
|
41
|
+
lines.push(`- ${persona.id}: ${persona.role}; outputs ${(persona.outputs || []).join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
for (const batch of plan.native_agent_plan.batches || []) {
|
|
44
|
+
lines.push(`- batch ${batch.id}: ${(batch.agents || []).join(', ')} -> ${(batch.outputs || []).join(', ')}`);
|
|
45
|
+
}
|
|
46
|
+
lines.push('');
|
|
47
|
+
}
|
|
48
|
+
lines.push('## Rules');
|
|
49
|
+
for (const rule of plan.rules)
|
|
50
|
+
lines.push(`- ${rule}`);
|
|
51
|
+
lines.push('');
|
|
52
|
+
if (plan.research_council?.agents?.length) {
|
|
53
|
+
lines.push('## Genius Agent Council');
|
|
54
|
+
lines.push(`Policy: ${plan.research_council.policy}`);
|
|
55
|
+
for (const agent of plan.research_council.agents)
|
|
56
|
+
lines.push(`- ${helpers.researchAgentAgentName(agent)}: ${agent.persona || agent.role} - ${agent.mandate} (${agent.persona_boundary || 'persona-inspired lens only'})`);
|
|
57
|
+
lines.push('');
|
|
58
|
+
}
|
|
59
|
+
if (plan.web_research_policy) {
|
|
60
|
+
lines.push('## Web Research Policy');
|
|
61
|
+
lines.push(`Mode: ${plan.web_research_policy.mode}`);
|
|
62
|
+
lines.push(`Requirement: ${plan.web_research_policy.requirement}`);
|
|
63
|
+
if (plan.web_research_policy.source_tool_routing)
|
|
64
|
+
lines.push(`Source tool routing: ${plan.web_research_policy.source_tool_routing.mode}`);
|
|
65
|
+
for (const querySet of plan.web_research_policy.query_sets || [])
|
|
66
|
+
lines.push(`- query set: ${querySet}`);
|
|
67
|
+
if (plan.web_research_policy.skill_creator?.artifact)
|
|
68
|
+
lines.push(`- source skill artifact: ${plan.web_research_policy.skill_creator.artifact}`);
|
|
69
|
+
for (const layer of plan.web_research_policy.source_layers || []) {
|
|
70
|
+
lines.push(`- layer ${layer.id}: ${layer.purpose}`);
|
|
71
|
+
}
|
|
72
|
+
lines.push('');
|
|
73
|
+
}
|
|
74
|
+
lines.push('## Outcome Rubric');
|
|
75
|
+
for (const item of plan.outcome_rubric || [])
|
|
76
|
+
lines.push(`- ${item.id}: ${item.description}`);
|
|
77
|
+
lines.push('');
|
|
78
|
+
lines.push('## Phases');
|
|
79
|
+
for (const phase of plan.phases)
|
|
80
|
+
lines.push(`- ${phase.id}: ${phase.goal}`);
|
|
81
|
+
lines.push('');
|
|
82
|
+
lines.push('## Required Artifacts');
|
|
83
|
+
for (const artifact of plan.required_artifacts)
|
|
84
|
+
lines.push(`- ${artifact}`);
|
|
85
|
+
lines.push('');
|
|
86
|
+
return `${lines.join('\n')}\n`;
|
|
87
|
+
}
|
|
88
|
+
export function renderResearchSourceSkillMarkdown(plan, defaultLayers) {
|
|
89
|
+
const layers = plan?.web_research_policy?.source_layers?.length ? plan.web_research_policy.source_layers : defaultLayers;
|
|
90
|
+
const lines = [];
|
|
91
|
+
lines.push('# Research Source Layer Skill');
|
|
92
|
+
lines.push('');
|
|
93
|
+
lines.push('Status: route-local candidate skill. Use it inside this research mission before agent synthesis. Do not install or edit generated .agents/skills from this artifact.');
|
|
94
|
+
lines.push('Real-run policy: collect live sources for as long as needed within the mission timeout; mock or fixture evidence is valid only for explicit --mock selftests.');
|
|
95
|
+
lines.push('');
|
|
96
|
+
lines.push('## Trigger');
|
|
97
|
+
lines.push('- Any `$Research` run that must collect broad public evidence before synthesis, adversarial review, falsification, or paper writing.');
|
|
98
|
+
lines.push('');
|
|
99
|
+
lines.push('## Source Layers');
|
|
100
|
+
for (const layer of layers) {
|
|
101
|
+
lines.push(`- ${layer.id}: ${layer.purpose}`);
|
|
102
|
+
lines.push(` Examples: ${(layer.examples || []).join(', ')}`);
|
|
103
|
+
lines.push(` Query templates: ${(layer.query_templates || []).join(' | ')}`);
|
|
104
|
+
}
|
|
105
|
+
lines.push('');
|
|
106
|
+
lines.push('## Output Contract');
|
|
107
|
+
lines.push('- Fill source-ledger.json with `source_layers`, `sources[].layer`, `counterevidence_sources[].layer`, `citation_coverage`, `triangulation.cross_layer_checks`, and `blockers`.');
|
|
108
|
+
lines.push('- Each source entry should record title, locator/URL, publisher or author when known, published_at when known, accessed_at, layer, reliability, credibility, stance, supports or undermines, and notes.');
|
|
109
|
+
lines.push('- Public discourse sources such as X/Twitter or Reddit are signals and edge cases, not truth. They must be triangulated with formal, official, practitioner, or counterevidence layers.');
|
|
110
|
+
lines.push('- If a layer cannot be searched with the available runtime or credentials, record the blocker and keep research-gate.json unpassed.');
|
|
111
|
+
lines.push('- Do not modify repository source code or generated harness files during Research; write only route-local mission artifacts.');
|
|
112
|
+
lines.push('');
|
|
113
|
+
lines.push('## Official Reviewer Use');
|
|
114
|
+
lines.push('- Only source-ledger ids with correlated verified-content Super Search proof may support a real-run reviewer finding or Eureka idea.');
|
|
115
|
+
lines.push('- Run exactly three independent official `research_reviewer` threads on GPT-5.6 Sol Max: Einstein, von Neumann, and Skeptic composite lenses.');
|
|
116
|
+
lines.push('- The skeptic lens must challenge the strongest claim using counterevidence or source-quality downgrades.');
|
|
117
|
+
lines.push('- Any objection triggers a mission-local `research_synthesizer` revision followed by a fresh three-thread review cycle; do not launch a custom scheduler or debate pool.');
|
|
118
|
+
lines.push('- `agent-ledger.json` and `debate-ledger.json` are compatibility projections from official reviewer outcomes. Canonical convergence requires three trustworthy parent outcomes and zero unresolved objections.');
|
|
119
|
+
lines.push('- Synthesis keeps only claims that survive cross-layer triangulation and falsification.');
|
|
120
|
+
lines.push('');
|
|
121
|
+
return `${lines.join('\n')}\n`;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=research-plan-markdown.js.map
|