sneakoscope 4.2.0 → 4.3.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 +35 -8
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/bin/sks.js +1 -1
- package/dist/cli/command-registry.js +3 -1
- package/dist/cli/ultra-search-command.js +163 -0
- package/dist/cli/xai-command.js +28 -168
- package/dist/core/agents/agent-codex-cockpit.js +3 -3
- package/dist/core/agents/agent-runner-ollama.js +2 -0
- package/dist/core/agents/agent-wrongness.js +1 -1
- package/dist/core/agents/native-worker-backend-router.js +3 -0
- package/dist/core/bench.js +115 -0
- package/dist/core/code-structure.js +399 -11
- package/dist/core/codex-control/codex-app-server-v2-client.js +86 -2
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +67 -9
- package/dist/core/codex-control/codex-reliability-shield.js +26 -5
- package/dist/core/codex-control/codex-task-runner.js +7 -1
- package/dist/core/codex-control/gpt-final-arbiter.js +4 -1
- package/dist/core/codex-control/gpt-final-review-schema.js +58 -0
- package/dist/core/codex-control/model-call-concurrency.js +1 -1
- package/dist/core/codex-native/core-skill-manifest.js +23 -0
- package/dist/core/commands/bench-command.js +11 -2
- package/dist/core/commands/code-structure-command.js +34 -2
- package/dist/core/commands/qa-loop-command.js +23 -7
- package/dist/core/commands/run-command.js +92 -2
- package/dist/core/commands/seo-command.js +130 -0
- package/dist/core/feature-fixtures.js +6 -0
- package/dist/core/feature-registry.js +3 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime.js +9 -1
- package/dist/core/init.js +8 -6
- package/dist/core/lean-engineering-policy.js +159 -0
- package/dist/core/pipeline-internals/runtime-core.js +15 -5
- package/dist/core/proof/auto-finalize.js +3 -2
- package/dist/core/proof/proof-schema.js +2 -1
- package/dist/core/proof/proof-writer.js +1 -0
- package/dist/core/proof/route-adapter.js +4 -2
- package/dist/core/proof/route-finalizer.js +35 -3
- package/dist/core/qa-loop/qa-app-server-driver.js +134 -0
- package/dist/core/qa-loop/qa-contract-v2.js +231 -0
- package/dist/core/qa-loop/qa-gate-v2.js +132 -0
- package/dist/core/qa-loop/qa-runtime-artifacts.js +53 -0
- package/dist/core/qa-loop/qa-surface-router.js +114 -0
- package/dist/core/qa-loop/qa-types.js +18 -0
- package/dist/core/qa-loop.js +83 -26
- package/dist/core/release/gate-manifest.js +1 -0
- package/dist/core/release/sla-scheduler.js +1 -1
- package/dist/core/release-parallel-full-coverage.js +1 -1
- package/dist/core/routes.js +96 -14
- package/dist/core/search-visibility/adapter-registry.js +26 -0
- package/dist/core/search-visibility/adapters/next-app.js +6 -0
- package/dist/core/search-visibility/adapters/next-pages.js +6 -0
- package/dist/core/search-visibility/adapters/static-site.js +6 -0
- package/dist/core/search-visibility/analyzers.js +377 -0
- package/dist/core/search-visibility/artifacts.js +183 -0
- package/dist/core/search-visibility/discovery.js +347 -0
- package/dist/core/search-visibility/index.js +199 -0
- package/dist/core/search-visibility/mission.js +67 -0
- package/dist/core/search-visibility/mutation.js +314 -0
- package/dist/core/search-visibility/types.js +2 -0
- package/dist/core/search-visibility/verifier.js +60 -0
- package/dist/core/source-intelligence/source-intelligence-policy.js +45 -26
- package/dist/core/source-intelligence/source-intelligence-proof.js +10 -16
- package/dist/core/source-intelligence/source-intelligence-runner.js +56 -42
- package/dist/core/triwiki/triwiki-affected-graph.js +3 -2
- package/dist/core/trust-kernel/trust-report.js +3 -5
- package/dist/core/ultra-search/index.js +3 -0
- package/dist/core/ultra-search/runtime.js +502 -0
- package/dist/core/ultra-search/types.js +3 -0
- package/dist/core/version.js +1 -1
- package/dist/scripts/agent-visual-consistency-check.js +1 -1
- package/dist/scripts/check-architecture.js +40 -7
- package/dist/scripts/check-command-module-budget.js +43 -5
- package/dist/scripts/check-pipeline-budget.js +17 -30
- package/dist/scripts/check-publish-tag.js +33 -6
- package/dist/scripts/check-route-modularity.js +25 -33
- package/dist/scripts/check-runtime-schemas.js +22 -0
- package/dist/scripts/codex-control-all-pipelines-check.js +1 -0
- package/dist/scripts/codex-control-model-capacity-fallback-check.js +53 -0
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +7 -1
- package/dist/scripts/core-skill-immutable-sync-check.js +3 -2
- package/dist/scripts/core-skill-integrity-blackbox.js +3 -2
- package/dist/scripts/core-skill-manifest-check.js +7 -2
- package/dist/scripts/geo-claim-evidence-check.js +18 -0
- package/dist/scripts/geo-cli-blackbox-check.js +18 -0
- package/dist/scripts/geo-crawler-policy-check.js +16 -0
- package/dist/scripts/geo-llms-txt-optional-check.js +19 -0
- package/dist/scripts/gpt-final-arbiter-check.js +4 -1
- package/dist/scripts/loop-directive-check-lib.js +78 -1
- package/dist/scripts/qa-loop-app-server-driver-check.js +74 -0
- package/dist/scripts/qa-loop-surface-router-check.js +49 -0
- package/dist/scripts/release-check-dynamic-execute.js +1 -1
- package/dist/scripts/release-metadata-1-19-check.js +2 -2
- package/dist/scripts/release-parallel-check.js +17 -2
- package/dist/scripts/release-parallel-full-coverage-check.js +1 -1
- package/dist/scripts/release-readiness-report.js +6 -6
- package/dist/scripts/release-registry-check.js +33 -14
- package/dist/scripts/runtime-ts-rust-boundary-check.js +1 -1
- package/dist/scripts/search-visibility-gate-lib.js +124 -0
- package/dist/scripts/seo-audit-fixture-check.js +16 -0
- package/dist/scripts/seo-canonical-locale-check.js +19 -0
- package/dist/scripts/seo-cli-blackbox-check.js +18 -0
- package/dist/scripts/seo-geo-feature-fixture-quality-check.js +18 -0
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +12 -0
- package/dist/scripts/seo-geo-no-unsupported-ranking-claims-check.js +18 -0
- package/dist/scripts/seo-geo-route-identity-check.js +12 -0
- package/dist/scripts/seo-geo-skill-rich-content-check.js +22 -0
- package/dist/scripts/seo-mutation-rollback-check.js +23 -0
- package/dist/scripts/seo-no-mutation-by-default-check.js +17 -0
- package/dist/scripts/seo-structured-data-visible-content-check.js +19 -0
- package/dist/scripts/sks-1-18-gate-lib.js +2 -2
- package/dist/scripts/sks-3-1-5-directive-check-lib.js +10 -1
- package/dist/scripts/source-intelligence-all-modes-check.js +9 -19
- package/dist/scripts/source-intelligence-policy-check.js +6 -6
- package/dist/scripts/triwiki-affected-graph-check.js +2 -2
- package/dist/scripts/ultra-search-provider-interface-check.js +27 -0
- package/package.json +26 -5
- package/schemas/search-visibility/finding-ledger.schema.json +36 -0
- package/schemas/search-visibility/gate.schema.json +22 -0
- package/schemas/search-visibility/mutation-plan.schema.json +27 -0
- package/schemas/search-visibility/site-inventory.schema.json +21 -0
- package/schemas/search-visibility/verification-report.schema.json +23 -0
- package/dist/core/mcp/xai-mcp-detector.js +0 -157
- package/dist/core/mcp/xai-search-adapter.js +0 -100
- package/dist/scripts/xai-mcp-capability-check.js +0 -14
|
@@ -17,6 +17,8 @@ import { runCodexAppHandoff, qaLoopShouldRequestAppHandoff } from '../codex-app/
|
|
|
17
17
|
import { writeCodex0138CapabilityArtifacts } from '../codex-control/codex-0138-capability.js';
|
|
18
18
|
import { writeCodexAccountUsageArtifacts } from '../usage/codex-account-usage.js';
|
|
19
19
|
import { buildQaLoopBudgetPolicy, selectQaLoopEscalatedEffort } from '../qa-loop/qa-loop-budget-policy.js';
|
|
20
|
+
import { initializeQaRuntimeArtifacts } from '../qa-loop/qa-runtime-artifacts.js';
|
|
21
|
+
import { DEFAULT_QA_MAX_CYCLES, QA_SURFACE_SELECTION_ARTIFACT } from '../qa-loop/qa-types.js';
|
|
20
22
|
import { writeCodexModelEffortCapabilityArtifact } from '../codex-control/codex-model-capabilities.js';
|
|
21
23
|
import { discoverImageArtifactsInDir, writeImageArtifactPathContract } from '../image/image-artifact-path-contract.js';
|
|
22
24
|
import { pluginAppTemplatePolicy } from '../codex-plugins/codex-plugin-json.js';
|
|
@@ -41,7 +43,7 @@ export async function qaLoopCommand(sub, args = []) {
|
|
|
41
43
|
Usage:
|
|
42
44
|
sks qa-loop prepare "target"
|
|
43
45
|
sks qa-loop answer <mission-id|latest> <answers.json>
|
|
44
|
-
sks qa-loop run <mission-id|latest> [--mock] [--max-cycles N] [--app-handoff] [--app-handoff-required] [--app-handoff-launch] [--app-handoff-artifact-only]
|
|
46
|
+
sks qa-loop run <mission-id|latest> [--mock] [--max-cycles N] [--surface auto|codex_in_app_browser|codex_chrome_extension|codex_computer_use] [--report-only] [--app-handoff] [--app-handoff-required] [--app-handoff-launch] [--app-handoff-artifact-only]
|
|
45
47
|
sks qa-loop app-confirm <mission-id|latest> --verdict pass|fail --notes "..."
|
|
46
48
|
sks qa-loop status <mission-id|latest> [--desktop]
|
|
47
49
|
`);
|
|
@@ -126,6 +128,17 @@ async function qaLoopRun(args) {
|
|
|
126
128
|
await writeQaLoopArtifacts(dir, mission, contract);
|
|
127
129
|
else
|
|
128
130
|
await ensureQaLoopVisualEvidenceContract(dir, mission, contract);
|
|
131
|
+
const requestedSurface = readFlagValue(args, '--surface', 'auto');
|
|
132
|
+
const reportOnly = flag(args, '--report-only');
|
|
133
|
+
await initializeQaRuntimeArtifacts(dir, {
|
|
134
|
+
...contract,
|
|
135
|
+
prompt: mission.prompt || contract.prompt,
|
|
136
|
+
mission_id: id
|
|
137
|
+
}, {
|
|
138
|
+
missionId: id,
|
|
139
|
+
requestedSurface,
|
|
140
|
+
reportOnly
|
|
141
|
+
}).catch(() => null);
|
|
129
142
|
const safetyScan = await scanDbSafety(root);
|
|
130
143
|
if (!safetyScan.ok) {
|
|
131
144
|
console.error('QA-LOOP cannot run: SKS safety scan found unsafe project data-tool configuration.');
|
|
@@ -133,7 +146,7 @@ async function qaLoopRun(args) {
|
|
|
133
146
|
process.exitCode = 2;
|
|
134
147
|
return;
|
|
135
148
|
}
|
|
136
|
-
const fallbackCycles = Number.parseInt(contract.answers?.MAX_QA_CYCLES, 10) ||
|
|
149
|
+
const fallbackCycles = Number.parseInt(contract.answers?.MAX_QA_CYCLES, 10) || DEFAULT_QA_MAX_CYCLES;
|
|
137
150
|
const maxCycles = readMaxCycles(args, fallbackCycles);
|
|
138
151
|
const requestedAgents = readBoundedIntegerFlag(args, '--agents', 3, 1, 20);
|
|
139
152
|
const targetActiveSlots = readBoundedIntegerFlag(args, '--target-active-slots', requestedAgents, 1, 20);
|
|
@@ -141,15 +154,18 @@ async function qaLoopRun(args) {
|
|
|
141
154
|
const minimumWorkItems = readBoundedIntegerFlag(args, '--minimum-work-items', targetActiveSlots, 1, 200);
|
|
142
155
|
const maxQueueExpansion = readBoundedIntegerFlag(args, '--max-queue-expansion', 10, 0, 200);
|
|
143
156
|
const profile = readFlagValue(args, '--profile', 'sks-logic-high') || 'sks-logic-high';
|
|
144
|
-
const
|
|
145
|
-
const
|
|
157
|
+
const mock = flag(args, '--mock');
|
|
158
|
+
const sourceFixesEnabled = !reportOnly;
|
|
159
|
+
const writeMode = readFlagValue(args, '--write-mode', sourceFixesEnabled && !mock ? (flag(args, '--parallel-write') ? 'parallel' : 'proof-safe') : 'off');
|
|
160
|
+
const applyPatches = sourceFixesEnabled && !mock && !flag(args, '--no-fix');
|
|
146
161
|
const dryRunPatches = flag(args, '--dry-run-patches') || flag(args, '--dryrun-patches');
|
|
147
162
|
const maxWriteAgents = readBoundedIntegerFlag(args, '--max-write-agents', Math.min(requestedAgents, 5), 1, 20);
|
|
148
|
-
const mock = flag(args, '--mock');
|
|
149
163
|
const qaGate = await readJson(path.join(dir, 'qa-gate.json'), {});
|
|
150
164
|
const reportFile = qaGate.qa_report_file;
|
|
151
165
|
const executionProfile = await readJson(path.join(dir, 'qa-loop', 'execution-profile.json'), null);
|
|
152
166
|
const uiRequired = qaUiRequired(contract.answers || {});
|
|
167
|
+
const surfaceSelection = await readJson(path.join(dir, QA_SURFACE_SELECTION_ARTIFACT), null);
|
|
168
|
+
const selectedSurface = surfaceSelection?.selected_surface || null;
|
|
153
169
|
const gptImage2ReviewRequired = qaGptImage2AnnotatedReviewRequired(contract, mission.prompt);
|
|
154
170
|
const capabilityArtifact = await writeCodex0138CapabilityArtifacts(root, { missionId: id }).catch((err) => ({ error: err?.message || String(err), report: null }));
|
|
155
171
|
const usageArtifact = await writeCodexAccountUsageArtifacts(root, { missionId: id }).catch((err) => ({ error: err?.message || String(err), snapshot: null }));
|
|
@@ -246,7 +262,7 @@ async function qaLoopRun(args) {
|
|
|
246
262
|
return;
|
|
247
263
|
}
|
|
248
264
|
}
|
|
249
|
-
if (uiRequired && !mock) {
|
|
265
|
+
if (uiRequired && !mock && selectedSurface === 'codex_chrome_extension') {
|
|
250
266
|
const chrome = await codexChromeExtensionStatus();
|
|
251
267
|
if (!chrome.ok) {
|
|
252
268
|
const blockedGate = {
|
|
@@ -277,7 +293,7 @@ async function qaLoopRun(args) {
|
|
|
277
293
|
await setCurrent(root, { mission_id: id, mode: 'QALOOP', phase: 'QALOOP_BLOCKED_CHROME_EXTENSION_SETUP_REQUIRED', questions_allowed: true });
|
|
278
294
|
if (flag(args, '--json'))
|
|
279
295
|
return console.log(JSON.stringify({ schema: 'sks.qa-loop-run.v1', ok: false, status: 'blocked', blocker: 'codex_chrome_extension_setup_required', mission_id: id, chrome_extension: chrome, gate: blockedGate }, null, 2));
|
|
280
|
-
console.error('QA-LOOP blocked:
|
|
296
|
+
console.error('QA-LOOP blocked: this journey was routed to @Chrome, but the Codex Chrome Extension is not connected. Install/enable it, then resume.');
|
|
281
297
|
console.error(chrome.docs_url);
|
|
282
298
|
process.exitCode = 2;
|
|
283
299
|
return;
|
|
@@ -4,6 +4,7 @@ import { createMission, missionDir, setCurrent } from '../mission.js';
|
|
|
4
4
|
import { maybeFinalizeRoute } from '../proof/auto-finalize.js';
|
|
5
5
|
import { routePrompt } from '../routes.js';
|
|
6
6
|
import { latestTrustReport } from '../trust-kernel/trust-report.js';
|
|
7
|
+
import { normalizeTrustStatus, TRUST_REPORT_SCHEMA, trustKernelMetadata } from '../trust-kernel/trust-kernel-schema.js';
|
|
7
8
|
import { flag, positionalArgs } from './command-utils.js';
|
|
8
9
|
export async function runCommand(args = []) {
|
|
9
10
|
const root = await projectRoot();
|
|
@@ -135,8 +136,11 @@ async function executeRunRoute(root, context) {
|
|
|
135
136
|
blockers: execution.ok ? [] : execution.blockers,
|
|
136
137
|
unverified: execution.unverified,
|
|
137
138
|
command: { cmd: execution.command || `sks run "${prompt}" --execute`, status: execution.exit_code ?? (execution.ok ? 0 : 2) },
|
|
139
|
+
lightweightEvidence: execution.execution_kind === 'safe_deterministic',
|
|
138
140
|
});
|
|
139
|
-
const trust =
|
|
141
|
+
const trust = execution.execution_kind === 'safe_deterministic'
|
|
142
|
+
? await writeLightweightTrustReport(root, id, route.command, statusHint, proof.ok)
|
|
143
|
+
: await loadTrustReport(root, id);
|
|
140
144
|
const autoVerification = auto ? await runAutoVerification(root, id) : null;
|
|
141
145
|
const autoOk = autoVerification?.ok ?? true;
|
|
142
146
|
await setCurrent(root, {
|
|
@@ -231,7 +235,7 @@ async function executeRouteCommand(root, route, prompt, { auto = false } = {}) {
|
|
|
231
235
|
return routeExecutionResult(route, ['sks', ...commandArgs].join(' '), result, {
|
|
232
236
|
okStatus: 'completed',
|
|
233
237
|
trustStatus: 'verified_partial',
|
|
234
|
-
executionKind: route.command === '$DB' || route.command === '$Wiki' || route.command === '$Fast-Mode' || route.command === '$with-local-llm-on' || route.command === '$Commit' || route.command === '$Commit-And-Push' ? 'safe_deterministic' : 'mock_safe',
|
|
238
|
+
executionKind: route.command === '$DB' || route.command === '$Wiki' || route.command === '$Fast-Mode' || route.command === '$with-local-llm-on' || route.command === '$Commit' || route.command === '$Commit-And-Push' || route.command === '$Ultra-Search' || route.command === '$SEO-GEO-OPTIMIZER' ? 'safe_deterministic' : 'mock_safe',
|
|
235
239
|
});
|
|
236
240
|
}
|
|
237
241
|
async function runAutoVerification(root, missionId) {
|
|
@@ -342,6 +346,10 @@ function runNextAction(route, id, args) {
|
|
|
342
346
|
function safeRouteExecutionArgs(route, prompt, { auto = false } = {}) {
|
|
343
347
|
if (route.command === '$DB')
|
|
344
348
|
return ['db', 'check', '--sql', 'SELECT 1', '--json'];
|
|
349
|
+
if (route.command === '$Ultra-Search')
|
|
350
|
+
return ultraSearchExecutionArgs(prompt);
|
|
351
|
+
if (route.command === '$SEO-GEO-OPTIMIZER')
|
|
352
|
+
return ['seo-geo-optimizer', searchVisibilityActionFromPrompt(prompt), '--mode', searchVisibilityModeFromPrompt(prompt), '--target', searchVisibilityTargetFromPrompt(prompt), '--offline', '--json'];
|
|
345
353
|
if (route.command === '$Wiki')
|
|
346
354
|
return ['wiki', 'refresh', '--json'];
|
|
347
355
|
if (route.command === '$Fast-Mode')
|
|
@@ -354,6 +362,58 @@ function safeRouteExecutionArgs(route, prompt, { auto = false } = {}) {
|
|
|
354
362
|
return ['commit-and-push', '--json'];
|
|
355
363
|
return ['team', prompt, '--mock', '--json', ...(auto ? ['--no-open-zellij'] : [])];
|
|
356
364
|
}
|
|
365
|
+
function ultraSearchExecutionArgs(prompt = '') {
|
|
366
|
+
const stripped = stripUltraSearchPrompt(prompt);
|
|
367
|
+
const lower = stripped.toLowerCase();
|
|
368
|
+
if (!stripped || /^(?:doctor|check|status)\b/.test(lower))
|
|
369
|
+
return ['ultra-search', 'doctor', '--json'];
|
|
370
|
+
if (/^(?:x|x-search|x_search)\b/.test(lower)) {
|
|
371
|
+
const query = stripped.replace(/^(?:x|x-search|x_search)\b[:\s-]*/i, '').trim() || 'source intelligence fixture';
|
|
372
|
+
return ['ultra-search', 'x', query, '--json'];
|
|
373
|
+
}
|
|
374
|
+
const url = stripped.match(/\bhttps?:\/\/\S+/)?.[0];
|
|
375
|
+
if (/^(?:fetch|url)\b/.test(lower) || url)
|
|
376
|
+
return ['ultra-search', 'fetch', url || stripped.replace(/^(?:fetch|url)\b[:\s-]*/i, '').trim() || 'https://example.com', '--json'];
|
|
377
|
+
const query = stripped.replace(/^run\b[:\s-]*/i, '').trim() || 'source intelligence fixture';
|
|
378
|
+
return ['ultra-search', 'run', query, '--mode', 'balanced', '--json'];
|
|
379
|
+
}
|
|
380
|
+
function stripUltraSearchPrompt(prompt = '') {
|
|
381
|
+
return String(prompt || '')
|
|
382
|
+
.trim()
|
|
383
|
+
.replace(/^\[\$Ultra-Search\]\([^)]+\)(?:\s|:)?\s*/i, '')
|
|
384
|
+
.replace(/^\[\$UltraSearch\]\([^)]+\)(?:\s|:)?\s*/i, '')
|
|
385
|
+
.replace(/^\$Ultra-Search(?:\s|:)?\s*/i, '')
|
|
386
|
+
.replace(/^\$UltraSearch(?:\s|:)?\s*/i, '')
|
|
387
|
+
.trim();
|
|
388
|
+
}
|
|
389
|
+
function searchVisibilityActionFromPrompt(prompt = '') {
|
|
390
|
+
const text = String(prompt || '').toLowerCase();
|
|
391
|
+
if (/\bdoctor\b|진단/.test(text))
|
|
392
|
+
return 'doctor';
|
|
393
|
+
if (/\bverify\b|검증/.test(text))
|
|
394
|
+
return 'fixture';
|
|
395
|
+
if (/\bplan\b|계획/.test(text))
|
|
396
|
+
return 'audit';
|
|
397
|
+
if (/\bapply\b|--apply\b|적용/.test(text))
|
|
398
|
+
return 'audit';
|
|
399
|
+
return 'audit';
|
|
400
|
+
}
|
|
401
|
+
function searchVisibilityTargetFromPrompt(prompt = '') {
|
|
402
|
+
const text = String(prompt || '').toLowerCase();
|
|
403
|
+
if (/\bpackage\b|npm|readme|github/.test(text))
|
|
404
|
+
return 'package';
|
|
405
|
+
if (/\bdocs?\b|documentation/.test(text))
|
|
406
|
+
return 'docs';
|
|
407
|
+
if (/\bwebsite\b|site\b|페이지|사이트/.test(text))
|
|
408
|
+
return 'website';
|
|
409
|
+
return 'auto';
|
|
410
|
+
}
|
|
411
|
+
function searchVisibilityModeFromPrompt(prompt = '') {
|
|
412
|
+
const text = String(prompt || '');
|
|
413
|
+
if (/generative\s+engine\s+optimization|AI\s+(?:answer|search)\s+(?:visibility|discoverability)|LLM\s+(?:citation|answer|visibility|discoverability)|answerability|entity\s+(?:facts?|clarity)|claim\s+evidence|crawler\s+policy|OAI-SearchBot|GPTBot|ChatGPT-User|Claude-SearchBot|ClaudeBot|Claude-User|llms\.txt|AI\s*검색\s*가시성|AI\s*답변\s*가시성|생성형\s*엔진\s*최적화/i.test(text))
|
|
414
|
+
return 'geo';
|
|
415
|
+
return 'seo';
|
|
416
|
+
}
|
|
357
417
|
function fastModeActionFromPrompt(prompt = '') {
|
|
358
418
|
const text = String(prompt || '');
|
|
359
419
|
const lower = text.toLowerCase();
|
|
@@ -468,4 +528,34 @@ async function loadTrustReport(root, missionId) {
|
|
|
468
528
|
return report;
|
|
469
529
|
return { status: 'not_verified', ok: false, issues: ['trust_report_invalid'] };
|
|
470
530
|
}
|
|
531
|
+
async function writeLightweightTrustReport(root, missionId, route, statusHint, proofOk) {
|
|
532
|
+
const status = normalizeTrustStatus(statusHint);
|
|
533
|
+
const issues = proofOk ? [] : ['completion_proof_not_ok'];
|
|
534
|
+
const report = {
|
|
535
|
+
schema: TRUST_REPORT_SCHEMA,
|
|
536
|
+
...trustKernelMetadata(),
|
|
537
|
+
ok: proofOk && !['blocked', 'failed', 'not_verified'].includes(status),
|
|
538
|
+
mission_id: missionId,
|
|
539
|
+
route,
|
|
540
|
+
status,
|
|
541
|
+
proof_status: status,
|
|
542
|
+
evidence_status: 'verified_partial',
|
|
543
|
+
route_contract_status: 'verified_partial',
|
|
544
|
+
issues,
|
|
545
|
+
route_state_machine: {
|
|
546
|
+
state: 'trust_report',
|
|
547
|
+
lightweight: true,
|
|
548
|
+
reason: 'safe_deterministic_run_wrapper'
|
|
549
|
+
},
|
|
550
|
+
evidence: {
|
|
551
|
+
completion_proof: `.sneakoscope/missions/${missionId}/completion-proof.json`,
|
|
552
|
+
route_contract: null,
|
|
553
|
+
evidence_index: null,
|
|
554
|
+
evidence_records: 0,
|
|
555
|
+
lightweight: true
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
await writeJsonAtomic(path.join(missionDir(root, missionId), 'trust-report.json'), report);
|
|
559
|
+
return report;
|
|
560
|
+
}
|
|
471
561
|
//# sourceMappingURL=run-command.js.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { printJson } from '../../cli/output.js';
|
|
3
|
+
import { projectRoot } from '../fsx.js';
|
|
4
|
+
import { flag, readOption } from './command-utils.js';
|
|
5
|
+
import { runSearchVisibilityApply, runSearchVisibilityAudit, runSearchVisibilityDoctor, runSearchVisibilityFixture, runSearchVisibilityPlan, runSearchVisibilityRollback, runSearchVisibilityStatus, runSearchVisibilityVerify, } from '../search-visibility/index.js';
|
|
6
|
+
export async function seoCommand(args = []) {
|
|
7
|
+
return runSearchVisibilityCommand('seo', args, 'seo');
|
|
8
|
+
}
|
|
9
|
+
export async function seoGeoOptimizerCommand(args = []) {
|
|
10
|
+
const normalized = normalizeOptimizerArgs(args);
|
|
11
|
+
return runSearchVisibilityCommand(normalized.mode, normalized.args, 'seo-geo-optimizer');
|
|
12
|
+
}
|
|
13
|
+
export async function runSearchVisibilityCommand(mode, args = [], displayCommand = mode) {
|
|
14
|
+
const action = args[0] || 'doctor';
|
|
15
|
+
const rest = args.slice(1);
|
|
16
|
+
const options = await parseOptions(rest);
|
|
17
|
+
let result;
|
|
18
|
+
if (action === 'doctor')
|
|
19
|
+
result = await runSearchVisibilityDoctor(mode, options);
|
|
20
|
+
else if (action === 'audit')
|
|
21
|
+
result = await runSearchVisibilityAudit(mode, options);
|
|
22
|
+
else if (action === 'plan')
|
|
23
|
+
result = await runSearchVisibilityPlan(mode, firstPositional(rest) || 'latest', options);
|
|
24
|
+
else if (action === 'apply')
|
|
25
|
+
result = await runSearchVisibilityApply(mode, firstPositional(rest) || 'latest', options);
|
|
26
|
+
else if (action === 'verify')
|
|
27
|
+
result = await runSearchVisibilityVerify(mode, firstPositional(rest) || 'latest', options);
|
|
28
|
+
else if (action === 'status')
|
|
29
|
+
result = await runSearchVisibilityStatus(mode, firstPositional(rest) || 'latest', options);
|
|
30
|
+
else if (action === 'rollback')
|
|
31
|
+
result = await runSearchVisibilityRollback(mode, firstPositional(rest) || 'latest', options);
|
|
32
|
+
else if (action === 'fixture')
|
|
33
|
+
result = await runSearchVisibilityFixture(mode, options);
|
|
34
|
+
else
|
|
35
|
+
return usage(mode, 2, displayCommand);
|
|
36
|
+
if (isBlocked(result))
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
if (options.json) {
|
|
39
|
+
printJson(result);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
printHuman(mode, action, result);
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
function normalizeOptimizerArgs(args) {
|
|
46
|
+
const out = [...args];
|
|
47
|
+
const first = String(out[0] || '').toLowerCase();
|
|
48
|
+
if (first === 'seo' || first === 'geo')
|
|
49
|
+
return { mode: first, args: out.slice(1) };
|
|
50
|
+
const modeIndex = out.findIndex((item) => item === '--mode');
|
|
51
|
+
if (modeIndex >= 0) {
|
|
52
|
+
const value = String(out[modeIndex + 1] || '').toLowerCase();
|
|
53
|
+
out.splice(modeIndex, value ? 2 : 1);
|
|
54
|
+
return { mode: value === 'geo' ? 'geo' : 'seo', args: out };
|
|
55
|
+
}
|
|
56
|
+
if (out.includes('--include-llms-txt') || out.includes('--observe-queries') || out.includes('--query-file'))
|
|
57
|
+
return { mode: 'geo', args: out };
|
|
58
|
+
return { mode: 'seo', args: out };
|
|
59
|
+
}
|
|
60
|
+
async function parseOptions(args) {
|
|
61
|
+
const root = path.resolve(readOption(args, '--root', await projectRoot()));
|
|
62
|
+
return {
|
|
63
|
+
root,
|
|
64
|
+
url: readOption(args, '--url', null),
|
|
65
|
+
target: targetOption(readOption(args, '--target', 'auto')),
|
|
66
|
+
framework: frameworkOption(readOption(args, '--framework', 'auto')),
|
|
67
|
+
offline: flag(args, '--offline'),
|
|
68
|
+
strict: flag(args, '--strict'),
|
|
69
|
+
json: flag(args, '--json'),
|
|
70
|
+
apply: flag(args, '--apply'),
|
|
71
|
+
yes: flag(args, '--yes'),
|
|
72
|
+
allowDirtyTouched: flag(args, '--allow-dirty-touched'),
|
|
73
|
+
browser: flag(args, '--browser'),
|
|
74
|
+
includeLlmsTxt: flag(args, '--include-llms-txt'),
|
|
75
|
+
observeQueries: flag(args, '--observe-queries'),
|
|
76
|
+
queryFile: readOption(args, '--query-file', null),
|
|
77
|
+
scope: String(readOption(args, '--scope', '') || '').split(',').map((item) => item.trim()).filter(Boolean),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function targetOption(value) {
|
|
81
|
+
return ['auto', 'website', 'docs', 'package'].includes(value) ? value : 'auto';
|
|
82
|
+
}
|
|
83
|
+
function frameworkOption(value) {
|
|
84
|
+
return ['auto', 'next-app', 'next-pages', 'static', 'package', 'unsupported'].includes(value) ? value : 'auto';
|
|
85
|
+
}
|
|
86
|
+
function firstPositional(args) {
|
|
87
|
+
const valueFlags = new Set(['--root', '--url', '--target', '--framework', '--scope', '--query-file']);
|
|
88
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
89
|
+
const value = args[i] || '';
|
|
90
|
+
if (valueFlags.has(value)) {
|
|
91
|
+
i += 1;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (!value.startsWith('--'))
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
function usage(mode, exitCode, displayCommand = mode) {
|
|
100
|
+
if (displayCommand === 'seo-geo-optimizer') {
|
|
101
|
+
console.error('Usage: sks seo-geo-optimizer [seo|geo] doctor|audit|plan|apply|verify|status|rollback|fixture [mission|latest] [--mode seo|geo] [--root <path>] [--url <origin>] [--target auto|website|docs|package] [--framework auto|next-app|next-pages|static] [--offline] [--strict] [--json]');
|
|
102
|
+
console.error(' sks seo-geo-optimizer apply <mission|latest> --mode seo|geo --apply [--include-llms-txt] [--scope <rule-or-path,...>] [--yes] [--json]');
|
|
103
|
+
console.error(' sks seo-geo-optimizer rollback <mission|latest> --mode seo|geo --apply [--yes] [--json]');
|
|
104
|
+
process.exitCode = exitCode;
|
|
105
|
+
return { schema: 'sks.search-visibility.usage.v1', ok: false, status: 'blocked', mode, command: displayCommand, reason: 'invalid_subcommand' };
|
|
106
|
+
}
|
|
107
|
+
const applyFlag = mode === 'geo' ? ' [--include-llms-txt]' : '';
|
|
108
|
+
console.error(`Usage: sks ${mode} doctor|audit|plan|apply|verify|status|rollback|fixture [mission|latest] [--root <path>] [--url <origin>] [--target auto|website|docs|package] [--framework auto|next-app|next-pages|static] [--offline] [--strict] [--json]`);
|
|
109
|
+
console.error(` sks ${mode} apply <mission|latest> --apply${applyFlag} [--scope <rule-or-path,...>] [--yes] [--json]`);
|
|
110
|
+
console.error(` sks ${mode} rollback <mission|latest> --apply [--yes] [--json]`);
|
|
111
|
+
process.exitCode = exitCode;
|
|
112
|
+
return { schema: 'sks.search-visibility.usage.v1', ok: false, status: 'blocked', mode, reason: 'invalid_subcommand' };
|
|
113
|
+
}
|
|
114
|
+
function isBlocked(value) {
|
|
115
|
+
if (!value || typeof value !== 'object')
|
|
116
|
+
return false;
|
|
117
|
+
const rec = value;
|
|
118
|
+
return rec.ok === false || rec.status === 'blocked';
|
|
119
|
+
}
|
|
120
|
+
function printHuman(mode, action, value) {
|
|
121
|
+
const rec = value && typeof value === 'object' ? value : {};
|
|
122
|
+
console.log(`SKS ${mode.toUpperCase()} ${action}: ${rec.status || (rec.ok === false ? 'blocked' : 'ok')}`);
|
|
123
|
+
if (rec.mission_id)
|
|
124
|
+
console.log(`Mission: ${rec.mission_id}`);
|
|
125
|
+
if (rec.artifacts_dir)
|
|
126
|
+
console.log(`Artifacts: ${rec.artifacts_dir}`);
|
|
127
|
+
if (Array.isArray(rec.blockers) && rec.blockers.length)
|
|
128
|
+
console.log(`Blockers: ${rec.blockers.join(', ')}`);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=seo-command.js.map
|
|
@@ -36,6 +36,7 @@ const FIXTURES = Object.freeze({
|
|
|
36
36
|
'cli-selftest': fixture('execute', 'sks selftest --mock', [], 'pass'),
|
|
37
37
|
'cli-git': fixture('execute', 'sks git policy --json', [], 'pass'),
|
|
38
38
|
'cli-goal': fixture('mock', 'sks goal status latest --json', ['goal-workflow.json'], 'pass'),
|
|
39
|
+
'cli-seo-geo-optimizer': fixture('execute_and_validate_artifacts', 'sks seo-geo-optimizer fixture --mode seo --json', ['search-visibility/site-inventory.json', 'search-visibility/seo-findings.json', 'search-visibility/verification-report.json', 'seo-gate.json', 'completion-proof.json'], 'pass'),
|
|
39
40
|
'cli-research': fixture('mock', 'sks research status latest --json', ['research-gate.json', 'completion-proof.json'], 'pass'),
|
|
40
41
|
'cli-qa-loop': fixture('mock', 'sks qa-loop status latest --json', ['qa-loop-proof.json', 'completion-proof.json'], 'pass'),
|
|
41
42
|
'cli-ppt': fixture('mock', 'sks ppt fixture --mock --json', ['ppt-imagegen-review-gate.json', 'completion-proof.json'], 'pass'),
|
|
@@ -75,6 +76,7 @@ const FIXTURES = Object.freeze({
|
|
|
75
76
|
'cli-commit': fixture('mock', 'sks commit --dry-run', [], 'pass'),
|
|
76
77
|
'cli-commit-and-push': fixture('mock', 'sks commit-and-push --dry-run', [], 'pass'),
|
|
77
78
|
'cli-context7': fixture('real_optional', 'sks context7 check --json', [], 'pass'),
|
|
79
|
+
'cli-ultra-search': fixture('execute', 'sks ultra-search doctor --json', [], 'pass'),
|
|
78
80
|
'cli-xai': fixture('real_optional', 'sks xai check --json', [], 'pass'),
|
|
79
81
|
'cli-all-features': fixture('mock', 'sks all-features complete --json', [`.sneakoscope/reports/all-feature-completion-${PACKAGE_VERSION}.json`], 'pass'),
|
|
80
82
|
'cli-init': fixture('mock', 'sks init --local-only --dry-run', [], 'pass'),
|
|
@@ -88,6 +90,7 @@ const FIXTURES = Object.freeze({
|
|
|
88
90
|
'skill-imagegen': fixture('mock', 'sks image-ux-review fixture --mock --json', ['image-ux-generated-review-ledger.json', 'image-voxel-ledger.json'], 'pass'),
|
|
89
91
|
'skill-gx-visual-validate': fixture('mock', 'sks gx validate fixture --mock --json', ['gx-validation.json'], 'pass'),
|
|
90
92
|
'skill-context7-docs': fixture('real_optional', 'sks context7 check --json', [], 'pass'),
|
|
93
|
+
'skill-seo-geo-optimizer': fixture('mock', 'sks seo-geo-optimizer fixture --mode geo --json', ['search-visibility/site-inventory.json', 'search-visibility/geo-findings.json', 'geo-gate.json', 'completion-proof.json'], 'pass'),
|
|
91
94
|
'cli-proof': fixture('execute_and_validate_artifacts', 'sks proof smoke --json', ['.sneakoscope/proof/latest.json'], 'pass'),
|
|
92
95
|
'cli-trust': fixture('execute_and_validate_artifacts', 'sks trust report latest --json', ['trust-report.json'], 'pass'),
|
|
93
96
|
'cli-wrongness': fixture('execute_and_validate_artifacts', 'sks wrongness add --kind missing_evidence --claim "fixture wrongness" --json', ['.sneakoscope/wiki/wrongness-ledger.json'], 'pass'),
|
|
@@ -104,6 +107,9 @@ const FIXTURES = Object.freeze({
|
|
|
104
107
|
'route-dfix': fixture('execute_and_validate_artifacts', 'sks dfix fixture --json', ['completion-proof.json', 'dfix-gate.json', 'dfix-verification.json'], 'pass'),
|
|
105
108
|
'route-answer': fixture('mock', '$Answer answer-only route policy', [], 'pass'),
|
|
106
109
|
'route-goal': fixture('mock', '$Goal bridge route', ['goal-workflow.json', 'completion-proof.json'], 'pass'),
|
|
110
|
+
'route-ultra-search': fixture('execute', 'sks run "$Ultra-Search source intelligence fixture" --execute --json', [], 'pass'),
|
|
111
|
+
'route-ultrasearch': fixture('execute', 'sks run "$UltraSearch source intelligence fixture" --execute --json', [], 'pass'),
|
|
112
|
+
'route-seo-geo-optimizer': fixture('execute_and_validate_artifacts', 'sks seo-geo-optimizer fixture --mode geo --json', ['search-visibility/site-inventory.json', 'search-visibility/geo-findings.json', 'search-visibility/verification-report.json', 'geo-gate.json', 'completion-proof.json'], 'pass'),
|
|
107
113
|
'route-autoresearch': fixture('mock', '$AutoResearch fixture route', ['research-gate.json', 'completion-proof.json'], 'pass'),
|
|
108
114
|
'route-mad-sks': fixture('mock', '$MAD-SKS permission gate route', ['mad-sks-gate.json', 'completion-proof.json'], 'pass'),
|
|
109
115
|
'route-from-chat-img': fixture('mock', '$From-Chat-IMG visual work order route', ['from-chat-img-work-order.md', 'image-voxel-ledger.json', 'completion-proof.json'], 'pass'),
|
|
@@ -461,6 +461,7 @@ const SAFE_EXECUTABLE_FIXTURE_ARGS = Object.freeze({
|
|
|
461
461
|
'cli-fix-path': ['fix-path', '--json'],
|
|
462
462
|
'cli-selftest': ['selftest', '--mock'],
|
|
463
463
|
'cli-git': ['git', 'policy', '--json'],
|
|
464
|
+
'cli-seo-geo-optimizer': ['seo-geo-optimizer', 'fixture', '--mode', 'seo', '--json'],
|
|
464
465
|
'cli-paths': ['paths', 'managed', '--json'],
|
|
465
466
|
'cli-rollback': ['rollback', 'list', '--json'],
|
|
466
467
|
'cli-proof-field': ['proof-field', 'scan', '--json', '--intent', 'fixture'],
|
|
@@ -493,6 +494,7 @@ const SAFE_EXECUTABLE_FIXTURE_ARGS = Object.freeze({
|
|
|
493
494
|
'route-image-ux-review': ['image-ux-review', 'fixture', '--mock', '--json'],
|
|
494
495
|
'route-computer-use': ['computer-use', 'import-fixture', '--mock', '--json'],
|
|
495
496
|
'route-dfix': ['dfix', 'fixture', '--json'],
|
|
497
|
+
'route-seo-geo-optimizer': ['seo-geo-optimizer', 'fixture', '--mode', 'geo', '--json'],
|
|
496
498
|
'route-fast-mode': ['fast-mode', 'status', '--json'],
|
|
497
499
|
'route-db': ['db', 'check', '--sql', 'SELECT 1', '--json'],
|
|
498
500
|
'route-wiki': ['wiki', 'image-ingest', 'test/fixtures/images/one-by-one.png', '--json'],
|
|
@@ -826,7 +828,7 @@ function commandCategory(name) {
|
|
|
826
828
|
function commandMaturity(name) {
|
|
827
829
|
if (['help', 'version', 'commands', 'usage', 'root', 'quickstart', 'setup', 'doctor', 'selftest', 'update-check', 'fast-mode'].includes(name))
|
|
828
830
|
return 'stable';
|
|
829
|
-
if (['codex', 'codex-app', 'codex-native', 'codex-lb', 'hooks', 'features', 'all-features', 'wiki', 'wrongness', 'team', 'pipeline', 'goal', 'db', 'guard', 'computer-use', 'mad-sks'].includes(name))
|
|
831
|
+
if (['codex', 'codex-app', 'codex-native', 'codex-lb', 'hooks', 'features', 'all-features', 'wiki', 'wrongness', 'team', 'pipeline', 'goal', 'db', 'guard', 'computer-use', 'mad-sks', 'seo-geo-optimizer'].includes(name))
|
|
830
832
|
return 'beta';
|
|
831
833
|
return 'labs';
|
|
832
834
|
}
|
package/dist/core/fsx.js
CHANGED
|
@@ -5,7 +5,7 @@ import os from 'node:os';
|
|
|
5
5
|
import crypto from 'node:crypto';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
-
export const PACKAGE_VERSION = '4.
|
|
8
|
+
export const PACKAGE_VERSION = '4.3.0';
|
|
9
9
|
export const DEFAULT_PROCESS_TAIL_BYTES = 256 * 1024;
|
|
10
10
|
export const DEFAULT_PROCESS_TIMEOUT_MS = 30 * 60 * 1000;
|
|
11
11
|
export function nowIso() {
|
|
@@ -12,6 +12,7 @@ import { localizedFinalizationReason } from './language-preference.js';
|
|
|
12
12
|
import { classifyToolError } from './evaluation.js';
|
|
13
13
|
import { REQUIRED_CODEX_MODEL, isForbiddenCodexModel } from './codex-model-guard.js';
|
|
14
14
|
import { dollarCommand, routeRequiresSubagents, stripVisibleDecisionAnswerBlocks } from './routes.js';
|
|
15
|
+
import { leanEngineeringCompactText } from './lean-engineering-policy.js';
|
|
15
16
|
import { appendMissionStatus } from './recallpulse.js';
|
|
16
17
|
import { scanAgentTextForRecursion } from './agents/agent-recursion-guard.js';
|
|
17
18
|
import { evaluateLoopContinuation } from './loops/loop-continuation-enforcer.js';
|
|
@@ -194,8 +195,15 @@ export async function evaluateHookPayload(name, payload = {}, opts = {}) {
|
|
|
194
195
|
return hookPermission(root, state, payload, noQuestion);
|
|
195
196
|
if (name === 'stop')
|
|
196
197
|
return hookStop(root, state, payload, noQuestion);
|
|
198
|
+
if (name === 'subagent-start')
|
|
199
|
+
return hookSubagentStart(root, state);
|
|
197
200
|
return { continue: true };
|
|
198
201
|
}
|
|
202
|
+
async function hookSubagentStart(root, state) {
|
|
203
|
+
const active = await activeRouteContext(root, state).catch(() => '');
|
|
204
|
+
const additionalContext = [leanEngineeringCompactText(), active].filter(Boolean).join('\n\n');
|
|
205
|
+
return { continue: true, additionalContext };
|
|
206
|
+
}
|
|
199
207
|
function blockForbiddenClientModel(payload = {}) {
|
|
200
208
|
const model = forbiddenClientModelFromPayload(payload);
|
|
201
209
|
if (!model || !isForbiddenCodexModel(model))
|
|
@@ -590,7 +598,7 @@ function clarificationAnswerToolAllowed(payload = {}) {
|
|
|
590
598
|
return true;
|
|
591
599
|
if (/\bpipeline\s+answer\b/i.test(command))
|
|
592
600
|
return true;
|
|
593
|
-
return !/\b(npm|git|selftest|packcheck|release:check|publish:dry|publish:npm|doctor|team|qa-loop|wiki|db|test)\b/i.test(command);
|
|
601
|
+
return !/\b(npm|git|selftest|packcheck|release:check|publish:dry|publish:ignore-scripts|publish:npm|doctor|team|qa-loop|wiki|db|test)\b/i.test(command);
|
|
594
602
|
}
|
|
595
603
|
function payloadMentionsAnswersJson(payload = {}) {
|
|
596
604
|
try {
|
package/dist/core/init.js
CHANGED
|
@@ -7,7 +7,7 @@ import { isHarnessSourceProject, writeHarnessGuardPolicy } from './harness-guard
|
|
|
7
7
|
import { repairSksGeneratedArtifacts } from './harness-conflicts.js';
|
|
8
8
|
import { disableVersionGitHook } from './version-manager.js';
|
|
9
9
|
import { MIN_TEAM_REVIEWER_LANES, MIN_TEAM_REVIEW_POLICY_TEXT } from './team-review-policy.js';
|
|
10
|
-
import { AWESOME_DESIGN_MD_REFERENCE, CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_IMAGEGEN_REQUIRED_POLICY, CODEX_WEB_VERIFICATION_POLICY, DEFAULT_CODEX_APP_PLUGINS, DESIGN_SYSTEM_SSOT, DOLLAR_COMMANDS, DOLLAR_COMMAND_ALIASES, DOLLAR_SKILL_NAMES, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS, GETDESIGN_REFERENCE, IMAGEGEN_SOCIAL_SOURCE_POLICY, OPENAI_CHATGPT_IMAGES_2_DOC_URL, OPENAI_GPT_IMAGE_2_MODEL_DOC_URL, OPENAI_IMAGE_GENERATION_DOC_URL, PPT_CONDITIONAL_SKILL_ALLOWLIST, PPT_PIPELINE_MCP_ALLOWLIST, PPT_PIPELINE_SKILL_ALLOWLIST, RECOMMENDED_DESIGN_REFERENCES, RECOMMENDED_MCP_SERVERS, RECOMMENDED_SKILLS, RESERVED_CODEX_PLUGIN_SKILL_NAMES, SOLUTION_SCOUT_SKILL_NAME, chatCaptureIntakeText, context7ConfigToml, getdesignReferencePolicyText, imageUxReviewPipelinePolicyText, outcomeRubricPolicyText, pptPipelineAllowlistPolicyText, productDesignPluginPolicyText, solutionScoutPolicyText, speedLanePolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.js';
|
|
10
|
+
import { AWESOME_DESIGN_MD_REFERENCE, CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_IMAGEGEN_REQUIRED_POLICY, CODEX_WEB_VERIFICATION_POLICY, DEFAULT_CODEX_APP_PLUGINS, DESIGN_SYSTEM_SSOT, DOLLAR_COMMANDS, DOLLAR_COMMAND_ALIASES, DOLLAR_SKILL_NAMES, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS, GETDESIGN_REFERENCE, IMAGEGEN_SOCIAL_SOURCE_POLICY, OPENAI_CHATGPT_IMAGES_2_DOC_URL, OPENAI_GPT_IMAGE_2_MODEL_DOC_URL, OPENAI_IMAGE_GENERATION_DOC_URL, PPT_CONDITIONAL_SKILL_ALLOWLIST, PPT_PIPELINE_MCP_ALLOWLIST, PPT_PIPELINE_SKILL_ALLOWLIST, RECOMMENDED_DESIGN_REFERENCES, RECOMMENDED_MCP_SERVERS, RECOMMENDED_SKILLS, RESERVED_CODEX_PLUGIN_SKILL_NAMES, SOLUTION_SCOUT_SKILL_NAME, chatCaptureIntakeText, context7ConfigToml, getdesignReferencePolicyText, imageUxReviewPipelinePolicyText, leanEngineeringCompactText, outcomeRubricPolicyText, pptPipelineAllowlistPolicyText, productDesignPluginPolicyText, solutionScoutPolicyText, speedLanePolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.js';
|
|
11
11
|
import { SKILL_DREAM_POLICY, skillDreamPolicyText } from './skill-forge.js';
|
|
12
12
|
import { CODEX_HOOK_EVENT_STATE_KEYS } from './codex-compat/codex-hook-events.js';
|
|
13
13
|
import { codexCommandHookCurrentHash } from './codex-hooks/codex-hook-hash.js';
|
|
@@ -1043,7 +1043,7 @@ export async function installSkills(root) {
|
|
|
1043
1043
|
'with-local-llm-on': `---\nname: with-local-llm-on\ndescription: Dollar-command route for $with-local-llm-on local Ollama worker enablement.\n---\n\nUse when the user invokes $with-local-llm-on or asks to enable the optional local Ollama worker backend. Prefer \`sks with-local-llm on --json\`. The command writes the machine-local config at \`~/.sneakoscope/local-model.json\`. Default off means SKS stays GPT-only until this command enables local workers. Enabled mode only lets policy-eligible simple code patch-envelope or read-only collection worker slices use Ollama; GPT/Codex still owns strategy, planning, design, review, verification, safety, and integration. \`--no-ollama\` and \`SKS_OLLAMA_WORKERS=0\` still force local workers off for a run. Finish with a short status and Honest Mode; do not start Team for a toggle-only request.\n`,
|
|
1044
1044
|
'with-local-llm-off': `---\nname: with-local-llm-off\ndescription: Dollar-command route for $with-local-llm-off local Ollama worker disablement.\n---\n\nUse when the user invokes $with-local-llm-off or asks to disable the optional local Ollama worker backend. Prefer \`sks with-local-llm off --json\`. The command writes the machine-local config at \`~/.sneakoscope/local-model.json\`. Disabled mode keeps SKS GPT-only by default. Strategy, planning, design, review, verification, safety, and integration remain GPT/Codex-owned regardless of this toggle. Finish with a short status and Honest Mode; do not start Team for a toggle-only request.\n`,
|
|
1045
1045
|
'wiki': `---\nname: wiki\ndescription: Dollar-command route for $Wiki TriWiki refresh, pack, validate, and prune commands.\n---\n\nUse for $Wiki or Korean wiki-refresh requests. Refresh/update/갱신: run sks wiki refresh, then validate .sneakoscope/wiki/context-pack.json. Pack: run sks wiki pack, then validate. Prune/clean/정리: use sks wiki refresh --prune, or sks wiki prune --dry-run for inspection. Report claims, anchors, trust, attention.use_first/hydrate_first, validation, and blockers. Do not start ambiguity-gated implementation, subagents, or unrelated work.\n`,
|
|
1046
|
-
'team': `---\nname: team\ndescription: SKS Team orchestration for $Team/code work; $From-Chat-IMG is the explicit chat-image alias.\n---\n\nUse for $Team/code work. Auto-seal the route contract from prompt, TriWiki/current-code defaults, and conservative policy; do not surface a prequestion sheet. Read pipeline-plan.json or run sks pipeline plan to see the runtime lane, kept/skipped stages, and verification before implementation. Write team-roster.json; team-gate.json needs team_roster_confirmed=true. executor:N means N native analysis agents, N debate voices, then fresh N executors. ${MIN_TEAM_REVIEW_POLICY_TEXT} After consensus, compile team-graph.json, team-runtime-tasks.json, team-decomposition-report.json, and team-inbox/ so worker handoff uses concrete runtime task ids with role/path/domain/lane hints. Refresh/validate TriWiki before debate, implementation, review, and final; consume attention.use_first and hydrate attention.hydrate_first before risky decisions. ${outcomeRubricPolicyText()} ${speedLanePolicyText()} ${solutionScoutPolicyText('fix this broken behavior')} ${skillDreamPolicyText()} Log events and use sks team message for bounded inter-agent communication in transcript/lane panes. Color-coded Zellij lanes distinguish overview/native-analysis/planning/execution/review/safety sessions in one Zellij window using split panes when Zellij is available. $Team/$team plus sks --mad uses the MAD-SKS permission gate module: user-authorized target-project scopes such as files, shell, packages, services, network, browser/Computer Use, generated assets, file permissions, migrations, normal DB writes, Supabase MCP writes, direct SQL, and schema cleanup are open only for the active invocation; catastrophic wipe/all-row/project-management, credential exfiltration, persistent security weakening, and unrequested fallback guards remain. End with cleanup-zellij or a cleanup event so follow panes show cleanup and stop; pass team-session-cleanup.json, then reflection and Honest Mode. Parent integrates/verifies.\n\n${chatCaptureIntakeText()}\n`,
|
|
1046
|
+
'team': `---\nname: team\ndescription: SKS Team orchestration for $Team/code work; $From-Chat-IMG is the explicit chat-image alias.\n---\n\nUse for $Team/code work. Auto-seal the route contract from prompt, TriWiki/current-code defaults, and conservative policy; do not surface a prequestion sheet. Read pipeline-plan.json or run sks pipeline plan to see the runtime lane, kept/skipped stages, and verification before implementation. Write team-roster.json; team-gate.json needs team_roster_confirmed=true. executor:N means N native analysis agents, N debate voices, then fresh N executors. ${MIN_TEAM_REVIEW_POLICY_TEXT} After consensus, compile team-graph.json, team-runtime-tasks.json, team-decomposition-report.json, and team-inbox/ so worker handoff uses concrete runtime task ids with role/path/domain/lane hints. Refresh/validate TriWiki before debate, implementation, review, and final; consume attention.use_first and hydrate attention.hydrate_first before risky decisions. ${leanEngineeringCompactText()} ${outcomeRubricPolicyText()} ${speedLanePolicyText()} ${solutionScoutPolicyText('fix this broken behavior')} ${skillDreamPolicyText()} Log events and use sks team message for bounded inter-agent communication in transcript/lane panes. Color-coded Zellij lanes distinguish overview/native-analysis/planning/execution/review/safety sessions in one Zellij window using split panes when Zellij is available. $Team/$team plus sks --mad uses the MAD-SKS permission gate module: user-authorized target-project scopes such as files, shell, packages, services, network, browser/Computer Use, generated assets, file permissions, migrations, normal DB writes, Supabase MCP writes, direct SQL, and schema cleanup are open only for the active invocation; catastrophic wipe/all-row/project-management, credential exfiltration, persistent security weakening, and unrequested fallback guards remain. End with cleanup-zellij or a cleanup event so follow panes show cleanup and stop; pass team-session-cleanup.json, then reflection and Honest Mode. Parent integrates/verifies.\n\n${chatCaptureIntakeText()}\n`,
|
|
1047
1047
|
'from-chat-img': `---\nname: from-chat-img\ndescription: Explicit $From-Chat-IMG Team alias for chat screenshot plus attachment analysis.\n---\n\nUse only for From-Chat-IMG/$From-Chat-IMG. It enters the normal Team pipeline. Treat uploads as chat screenshot plus originals. For web/browser/webapp targets use Codex Chrome Extension first; for native Mac/non-web app surfaces use Codex Computer Use visual inspection when available. List requirements first, match regions to attachments with confidence, write ${FROM_CHAT_IMG_COVERAGE_ARTIFACT}, ${FROM_CHAT_IMG_CHECKLIST_ARTIFACT}, ${FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT}, and ${FROM_CHAT_IMG_QA_LOOP_ARTIFACT}, then continue Team gates, review, reflection, and Honest Mode. ${CODEX_WEB_VERIFICATION_POLICY} ${CODEX_COMPUTER_USE_ONLY_POLICY} The ledger must account for every visible customer request, screenshot image region, and separate attachment; ${FROM_CHAT_IMG_CHECKLIST_ARTIFACT} must have a checked item for each request, image-region/attachment match, work item, scoped QA-LOOP, and verification step; ${FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT} stores temporary TriWiki-backed session context with expires_after_sessions=${FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS}. ${FROM_CHAT_IMG_QA_LOOP_ARTIFACT} must prove QA-LOOP ran over the exact customer-request work-order range after implementation, with every work item covered, post-fix verification complete, and zero unresolved findings. team-gate.json cannot pass From-Chat-IMG completion until unresolved_items is empty, every checklist box is checked, and scoped_qa_loop_completed=true.\n`,
|
|
1048
1048
|
'naruto': `---\nname: naruto\ndescription: $Naruto Shadow Clone Swarm (影分身 / Kage Bunshin no Jutsu) fans out up to 100 parallel clone sessions on the native agent kernel for high-throughput work.\n---\n\nUse when the user invokes $Naruto, $ShadowClone, or $Kagebunshin, or asks to fan out many parallel agent clones for high-throughput sweeps. Naruto runs on the native agent kernel and layers on the Team route: it loads the team, pipeline-runner, prompt-pipeline, and honest-mode skills. Prefer \`sks naruto run "<task>" [--clones N] [--backend codex-exec|fake] [--work-items N] [--real] [--readonly] [--json]\` and \`sks naruto status [--mission <id>] [--json]\`. Clones default to the native kernel and are throttled to host capacity (cores/free memory); the requested clone count is the ceiling, not a guarantee, and the scheduler backfills slots as clones complete. Shadow clones always run in fast service tier; \`--no-fast\`/standard requests are not honored for clones. Writes are lease-based and non-overlapping: each clone takes a path lease before writing so parallel clones never edit the same file, and every clone emits its own proof. Keep agent-central-ledger.json, agent-task-board.json, agent-effort-policy.json, agent-scheduler-state.json, agent-proof-evidence.json, and agent-session-cleanup.json; the parent session owns integration, verification, and final claims. Use \`--backend fake\` only for fixtures/selftests; remove it when real clone evidence is intended. Lifecycle: clone roster build, work partition, parallel clone scheduling, lease-based write swarm, per-clone proof, session cleanup, then reflection and Honest Mode. Refresh/validate TriWiki before risky decisions and consume attention.use_first/hydrate_first. Catastrophic safeguards remain active for every clone. Finish with a concise completion summary and Honest Mode covering verified clones, unverified work, and any blockers.\n`,
|
|
1049
1049
|
'shadow-clone': `---\nname: shadow-clone\ndescription: $ShadowClone alias for the $Naruto Shadow Clone Swarm high-scale parallel agent route.\n---\n\nUse the same rules as the naruto skill: this is the English alias for $Naruto / Kage Bunshin no Jutsu. Fan out up to 100 lease-safe parallel clone sessions on the native agent kernel via \`sks naruto run "<task>" [--clones N] [--backend codex-exec|fake] [--work-items N] [--json]\`. Clones run in fast service tier, are throttled to host capacity, take path leases for non-overlapping writes, and each emit per-clone proof; the parent integrates and verifies. Keep the same agent ledgers and finish with reflection and Honest Mode.\n`,
|
|
@@ -1057,18 +1057,20 @@ export async function installSkills(root) {
|
|
|
1057
1057
|
'commit': `---\nname: commit\ndescription: Simple git-only route for $Commit requests that stage current changes and create one commit without the full SKS pipeline.\n---\n\nUse only when the user invokes $Commit or explicitly asks to commit the current repository changes without pushing. Keep this route lightweight: inspect git status and the relevant diff summary, avoid Team/pipeline/TriWiki route work unless separately requested, stage the intended current changes, and create one git commit. The commit message must summarize the actual work and include exactly one trailer: Co-authored-by: Codex <noreply@openai.com>. Do not push. If there are no changes, report that no commit was created. Finish with a concise result and a one-line Honest Mode covering the commit hash and any unverified items.\n`,
|
|
1058
1058
|
'commit-and-push': `---\nname: commit-and-push\ndescription: Simple git-only route for $Commit-And-Push requests that stage current changes, create one commit, and push without the full SKS pipeline.\n---\n\nUse only when the user invokes $Commit-And-Push or explicitly asks to commit and push the current repository changes. Keep this route lightweight: inspect git status and the relevant diff summary, avoid Team/pipeline/TriWiki route work unless separately requested, stage the intended current changes, create one git commit, then push the current branch. The commit message must summarize the actual work and include exactly one trailer: Co-authored-by: Codex <noreply@openai.com>. If there are no changes, do not create an empty commit unless the user explicitly asks for one. Finish with a concise result and a one-line Honest Mode covering the commit hash, pushed branch, and any unverified items.\n`,
|
|
1059
1059
|
'research': `---\nname: research\ndescription: Dollar-command route for $Research or $research frontier discovery workflows.\n---\n\nUse when the user invokes $Research/$research or asks for research, hypotheses, new mechanisms, falsification, or testable predictions. Prefer sks research prepare and sks research run. Research is not an implementation route: do not edit repository source, docs, package metadata, generated skills, or harness files; write only route-local mission artifacts under .sneakoscope/missions/<mission-id>/. Run the genius-lens agent council with named persona-inspired cognitive roles: Einstein Agent, Feynman Agent, Turing Agent, von Neumann Agent, and Skeptic Agent. These are lenses only; do not impersonate the historical people. Every Research agent ledger row must include display_name, persona, persona_boundary, effort=xhigh, reasoning_effort=xhigh, service_tier when available, one literal "Eureka!" idea, falsifiers, cheap_probes, and challenge_or_response before synthesis. This is not a fixed three-cycle route: repeat source gathering, Eureka ideas, evidence-bound debate, falsification, and synthesis pressure until every agent records final agreement, or until the explicit max-cycle safety cap pauses with an unpassed gate. Create research-source-skill.md as a route-local Skill Creator artifact, then maximize layered public web/source search across latest papers, official/government or leading-institution data, standards/primary docs, current news, public discourse, developer/practitioner sources, traditional background sources, and counterevidence before synthesis. Record research-source-skill.md, source-ledger.json, agent-ledger.json, debate-ledger.json, novelty-ledger.json, falsification-ledger.json, research-report.md, research-paper.md, genius-opinion-summary.md, and research-gate.json. debate-ledger.json must include consensus_iterations, unanimous_consensus, and per-agent agreements; research-gate.json cannot pass until unanimous_consensus=true with every agent agreement recorded. Context7 is optional and only needed when the research topic depends on external package/API/framework docs; do not use it as the default research evidence layer. Normal Research may take one or two hours when needed; favor real source collection, cross-layer comparison, falsification, and a concise paper manuscript over speed. Do not use --mock except for selftests or dry harness checks; if live source execution is unavailable, record a blocker and keep the gate unpassed. Do not use for ordinary code edits.\n`,
|
|
1060
|
-
'autoresearch': `---\nname: autoresearch\ndescription: Dollar-command route for $AutoResearch or $autoresearch iterative experiment loops.\n---\n\nUse for $AutoResearch, iterative improvement,
|
|
1060
|
+
'autoresearch': `---\nname: autoresearch\ndescription: Dollar-command route for $AutoResearch or $autoresearch iterative experiment loops.\n---\n\nUse for $AutoResearch, iterative improvement, ranking, workflow, benchmark, or experiments. Define program, hypothesis, experiment, metric, keep/discard, falsification, next step, and Honest Mode. Do not become the parent identity for SEO/GEO; $SEO-GEO-OPTIMIZER may call research as a child stage for query, market, or competitor discovery while keeping the parent mission, gate, and Completion Proof on $SEO-GEO-OPTIMIZER.\n`,
|
|
1061
1061
|
'db': `---\nname: db\ndescription: Dollar-command route for $DB or $db database and Supabase safety checks.\n---\n\nUse when the user invokes $DB/$db or the task touches SQL, Supabase, Postgres, migrations, Prisma, Drizzle, Knex, MCP database tools, or production data. Run or follow sks db policy, sks db scan, sks db classify, and sks db check. Destructive database operations remain forbidden.\n`,
|
|
1062
1062
|
'mad-db': `${madDbSkillText()}\n`,
|
|
1063
1063
|
'mad-sks': `---\nname: mad-sks\ndescription: Explicit high-risk authorization modifier for $MAD-SKS scoped permission widening across approved target-project surfaces.\n---\n\nUse only when the user explicitly invokes $MAD-SKS or top-level sks --mad. It can be combined with another route, such as $MAD-SKS $Team or $DB ... $MAD-SKS; in that case the other command remains the primary workflow and MAD-SKS is only the temporary permission grant. The widened permission applies only while the active mission gate is open, must be deactivated when the task ends, and can open approved scopes such as target-project file writes, shell commands, package installs, local service control, network operations, browser/Computer Use workflows, generated assets, file permissions, migrations, Supabase MCP database writes, column/schema cleanup, direct execute SQL, and normal targeted DB writes. Keep catastrophic safeguards active: whole database/schema/table removal, truncate, all-row delete/update, reset, dangerous project/branch management, credential exfiltration, persistent security weakening, destructive delete without explicit confirmation, and unrequested fallback implementation remain blocked. Do not carry MAD-SKS permission into later prompts or routes. The permission profile source is centralized in src/core/permission-gates.ts and emitted as dist/core/permission-gates.js so skill/hook/MCP-style gates share one decision function.\n`,
|
|
1064
1064
|
'gx': `---\nname: gx\ndescription: Dollar-command route for $GX or $gx deterministic GX visual context cartridges.\n---\n\nUse when the user invokes $GX/$gx or asks for architecture/context visualization through SKS. Prefer sks gx init, render, validate, drift, and snapshot. vgraph.json remains the source of truth.\n`,
|
|
1065
1065
|
'help': `---\nname: help\ndescription: Dollar-command route for $Help or $help explaining installed SKS commands and workflows.\n---\n\nUse when the user invokes $Help/$help or asks what commands exist. Prefer concise output from sks commands, sks usage <topic>, sks quickstart, sks aliases, and sks codex-app.\n`,
|
|
1066
|
-
'prompt-pipeline': `---\nname: prompt-pipeline\ndescription: Default SKS prompt optimization pipeline for execution prompts; Answer and DFix bypass it.\n---\n\nClassify intent: Answer only for real questions; question-shaped implicit instructions, complaints, and mandatory-policy statements route to Team. DFix handles Direct Fix work: tiny copy/config/docs/labels/spacing/translation/simple mechanical edits; code and broad implementation default to Team unless safety/research/GX route fits. Infer goal, target, constraints, acceptance, risk, and smallest safe route from prompt, TriWiki/current-code defaults, and conservative SKS policy. Do not surface a prequestion sheet. Materialize pipeline-plan.json for the runtime lane, kept/skipped stages, no-fallback invariant, and verification; inspect with sks pipeline plan, adding --proof-field when changed files are known. Code work surfaces route/guard/scopes, materializes team-roster.json from default or explicit counts before implementation, compiles concrete Team runtime graph/inbox artifacts after consensus, and parent owns integration/tests/Context7/Honest Mode. ${outcomeRubricPolicyText()} ${speedLanePolicyText()} ${solutionScoutPolicyText('fix this broken behavior')} ${skillDreamPolicyText()}\n\n${chatCaptureIntakeText()}\n\nDesign: non-PPT UI/UX uses Product Design plugin first; legacy design.md/design-system-builder/design-ui-editor/design-artifact-expert/getdesign-reference are fallback only when the plugin is unavailable or an existing project design.md must be respected. Use imagegen for image/logo/raster, and imagegen must prefer Codex App built-in image generation (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) before API generation. ${productDesignPluginPolicyText()} ${CODEX_IMAGEGEN_REQUIRED_POLICY} For UI/UX review/audit requests that mention image generation, gpt-image-2, callouts, or annotated review images, route to $Image-UX-Review/$UX-Review and require generated annotated review image evidence before issue extraction; do not satisfy that route with text-only critique. For $PPT, ${pptPipelineAllowlistPolicyText()} ${getdesignReferencePolicyText()} TriWiki context-tracking SSOT: .sneakoscope/wiki/context-pack.json; read only the latest coordinate+voxel overlay pack before every route stage, run sks wiki refresh/pack after changes, validate before handoffs/final.\n`,
|
|
1066
|
+
'prompt-pipeline': `---\nname: prompt-pipeline\ndescription: Default SKS prompt optimization pipeline for execution prompts; Answer and DFix bypass it.\n---\n\nClassify intent: Answer only for real questions; question-shaped implicit instructions, complaints, and mandatory-policy statements route to Team. DFix handles Direct Fix work: tiny copy/config/docs/labels/spacing/translation/simple mechanical edits; code and broad implementation default to Team unless safety/research/GX route fits. Infer goal, target, constraints, acceptance, risk, and smallest safe route from prompt, TriWiki/current-code defaults, and conservative SKS policy. Do not surface a prequestion sheet. Materialize pipeline-plan.json for the runtime lane, kept/skipped stages, no-fallback invariant, lean_decision, and verification; inspect with sks pipeline plan, adding --proof-field when changed files are known. Code work surfaces route/guard/scopes, materializes team-roster.json from default or explicit counts before implementation, compiles concrete Team runtime graph/inbox artifacts after consensus, and parent owns integration/tests/Context7/Honest Mode. ${leanEngineeringCompactText()} ${outcomeRubricPolicyText()} ${speedLanePolicyText()} ${solutionScoutPolicyText('fix this broken behavior')} ${skillDreamPolicyText()}\n\n${chatCaptureIntakeText()}\n\nDesign: non-PPT UI/UX uses Product Design plugin first; legacy design.md/design-system-builder/design-ui-editor/design-artifact-expert/getdesign-reference are fallback only when the plugin is unavailable or an existing project design.md must be respected. Use imagegen for image/logo/raster, and imagegen must prefer Codex App built-in image generation (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) before API generation. ${productDesignPluginPolicyText()} ${CODEX_IMAGEGEN_REQUIRED_POLICY} For UI/UX review/audit requests that mention image generation, gpt-image-2, callouts, or annotated review images, route to $Image-UX-Review/$UX-Review and require generated annotated review image evidence before issue extraction; do not satisfy that route with text-only critique. For $PPT, ${pptPipelineAllowlistPolicyText()} ${getdesignReferencePolicyText()} TriWiki context-tracking SSOT: .sneakoscope/wiki/context-pack.json; read only the latest coordinate+voxel overlay pack before every route stage, run sks wiki refresh/pack after changes, validate before handoffs/final.\n`,
|
|
1067
1067
|
[SOLUTION_SCOUT_SKILL_NAME]: `---\nname: ${SOLUTION_SCOUT_SKILL_NAME}\ndescription: Web-similarity scout hook for SKS problem-solving and repair requests.\n---\n\n${solutionScoutPolicyText('fix this broken behavior')}\n\nUse this as a pipeline hook, not as a standalone route: when a user asks to solve, fix, repair, troubleshoot, or investigate broken behavior, search first for similar resolution cases, summarize the useful patterns with sources, then combine them with current repo evidence before editing. If browsing is unavailable, mark the external scout unverified and continue with local evidence only.\n`,
|
|
1068
1068
|
'reasoning-router': `---\nname: reasoning-router\ndescription: Temporary SKS reasoning-effort routing for every command and pipeline route.\n---\n\nmedium: simple copy/color/discovery/setup/mechanical edits. high: logic, safety, architecture, DB, orchestration, refactor, multi-file work. xhigh: research, AutoResearch, falsification, benchmarks, SEO/GEO, open-ended discovery, and From-Chat-IMG image work-order analysis. Routing is temporary; return to default after the gate. Inspect with sks reasoning and sks pipeline status.\n`,
|
|
1069
|
-
'pipeline-runner': `---\nname: pipeline-runner\ndescription: Execute SKS dollar-command routes as stateful pipelines with mission artifacts, route gates, Context7 evidence, temporary reasoning routing, reflection, and Honest Mode.\n---\n\nEvery $ command is a route. Use current.json, mission artifacts, and pipeline-plan.json as the execution plan: it records the lane, skipped stages, kept stages, verification, and no-unrequested-fallback invariant. Use temporary reasoning, TriWiki before stages, source hydration, Context7 when required, Team cleanup before reflection, reflection for full routes, and completion summary plus Honest Mode before final. Surface guard/scopes, record evidence, refresh/pack/validate TriWiki, and check sks pipeline status/resume/plan. ${speedLanePolicyText()} ${skillDreamPolicyText()}\n`,
|
|
1069
|
+
'pipeline-runner': `---\nname: pipeline-runner\ndescription: Execute SKS dollar-command routes as stateful pipelines with mission artifacts, route gates, Context7 evidence, temporary reasoning routing, reflection, and Honest Mode.\n---\n\nEvery $ command is a route. Use current.json, mission artifacts, and pipeline-plan.json as the execution plan: it records the lane, skipped stages, kept stages, verification, lean_decision, and no-unrequested-fallback invariant. Use temporary reasoning, TriWiki before stages, source hydration, Context7 when required, Team cleanup before reflection, reflection for full routes, and completion summary plus Honest Mode before final. Surface guard/scopes, record evidence, refresh/pack/validate TriWiki, and check sks pipeline status/resume/plan. ${leanEngineeringCompactText()} ${speedLanePolicyText()} ${skillDreamPolicyText()}\n`,
|
|
1070
1070
|
'context7-docs': `---\nname: context7-docs\ndescription: Enforce Context7 MCP documentation evidence for SKS routes that depend on external libraries, frameworks, APIs, MCPs, package managers, DB SDKs, or generated docs.\n---\n\nWhen required, resolve-library-id, then query-docs for the resolved id. Legacy get-library-docs evidence is accepted. Prefer sks context7 tools/resolve/docs/evidence and finish only after both evidence stages exist. Check setup with sks context7 check.\n`,
|
|
1071
|
-
'
|
|
1071
|
+
'ultra-search': `---\nname: ultra-search\ndescription: Dollar-command route for $Ultra-Search/$UltraSearch provider-independent source intelligence.\n---\n\nUse when the user invokes $Ultra-Search, $UltraSearch, or asks for UltraSearch source intelligence, source acquisition, X-search-style collection, URL acquisition, source normalization, claim ledgers, or citation proof. Prefer \`sks ultra-search doctor --json\` for readiness and \`sks ultra-search run "<query>" --mode balanced --json\` for provider-independent source proof; use \`sks ultra-search x "<query>" --json\` for X-search intent and \`sks ultra-search fetch "<url>" --json\` for URL acquisition. Context7 is required only when the query depends on current package/API/framework/MCP/generated documentation behavior. xAI/Grok credentials are optional and must not be required for route readiness. Evidence/artifacts live under \`.sneakoscope/missions/<ultra-* or route mission>/ultra-search/\`: intent.json, axes.json, query-variants.json, provider-plan.json, source-ledger.json, lead-ledger.json, claim-ledger.json, synthesis.md, ultra-search-proof.json, ultra-search-gate.json, and ultra-search-result.json. Do not turn weak discovery into supported claims; finish with an Honest Mode summary of verified sources, blockers, and unverified external coverage.\n`,
|
|
1072
|
+
'search-visibility-core': `---\nname: search-visibility-core\ndescription: Shared kernel for seo-geo-optimizer audit, plan, explicit apply, rollback, verification, gates, and Completion Proof.\n---\n\nPurpose: keep Search Engine Optimization and Generative Engine Optimization on one typed search-visibility kernel instead of duplicate implementations. Use when $SEO-GEO-OPTIMIZER or \`sks seo-geo-optimizer\` is selected. Workflow: doctor detects package/static/Next evidence; audit writes source-backed inventory and findings; plan compiles safe mutation operations; apply requires explicit \`--apply\`; verify separates source, build, HTTP, browser, production, and measured outcome; rollback only reverses mission-owned operations. Safety: default read-only, never overwrite unmanaged robots.txt, sitemap, llms.txt, metadata, or structured data; do not hard-code customer routes; do not invent prices, reviews, availability, rankings, traffic, or AI citation outcomes. Evidence/artifacts: search-visibility/intake.json, adapter-detection.json, site-inventory.json, route-graph.json, robots-policy.json, structured-data-ledger.json, mutation-plan.json, mutation-journal.jsonl, rollback-manifest.json, verification-report.json, route gate, and completion-proof.json. Failure/recovery: unsupported frameworks stay audit/plan-only; missing production/browser/Search Console evidence remains unverified, not fabricated. CLI entrypoint: \`sks seo-geo-optimizer ... --mode seo|geo\`.\n`,
|
|
1073
|
+
'seo-geo-optimizer': `---\nname: seo-geo-optimizer\ndescription: Unified $SEO-GEO-OPTIMIZER route for Search Engine Optimization and Generative Engine Optimization.\n---\n\nPurpose: use one route name for SEO and GEO work while keeping the internal search-visibility mode explicit. Use when: the user asks for SEO audit/fix/verification, package/npm/GitHub search visibility, canonical, sitemap, robots.txt, hreflang, metadata, structured data, AI answer visibility, LLM citation readiness, answerability, entity/claim provenance, crawler policy, OAI-SearchBot/GPTBot/ChatGPT-User, Claude-SearchBot/ClaudeBot/Claude-User, or optional llms.txt planning. GEO means Generative Engine Optimization, not geolocation, GeoIP, maps, CDN geography, location permission, or regional redirect bugs. Workflow: run \`sks seo-geo-optimizer doctor --mode seo|geo\`, then audit, plan, explicit apply, verify, status, and rollback. Use \`--mode seo\` for technical/package search optimization and \`--mode geo\` for entity facts, claim evidence, answerability, crawler policy, and optional llms.txt. Safety: audit and plan must not mutate source; apply checks base hashes, ownership, scope, protected paths, rollback manifest, and post-verify. AI crawler policy must split search, training, user-directed retrieval, and ads/other; never use one allow_ai toggle and never auto-allow training crawlers. Evidence/artifacts: site-inventory.json, route-graph.json, seo-findings.json or geo-findings.json, entity-facts.json, claim-evidence-ledger.json, answerability-report.json, ai-crawler-policy.json, llms-txt-plan.json, mutation-plan.json, verification-report.json, seo-gate.json or geo-gate.json, completion-proof.json. Failure/recovery: unsupported frameworks stay plan-only; browser/production/Search Console/analytics outcomes are marked unverified when not actually run. Forbidden claims: no ranking, indexing, traffic lift, rich-result, answer inclusion, or AI citation guarantee; no keyword stuffing, doorway pages, fake reviews, fake prices, fake availability, fake shipping, fake awards, hidden AI-only text, or scaled spam. CLI entrypoint: \`sks seo-geo-optimizer doctor|audit|plan|apply|verify|status|rollback|fixture --mode seo|geo\`.\n`,
|
|
1072
1074
|
'reflection': `---\nname: reflection\ndescription: Post-route self-review for full SKS routes that records real misses, gaps, and corrective lessons into TriWiki memory.\n---\n\nUse after full route work/tests and before final. DFix, Answer, Help, Wiki, SKS discovery are exempt. Do not invent faults. Write reflection.md; append real lessons to ${REFLECTION_MEMORY_PATH}; refresh/pack, validate context-pack.json, pass reflection-gate.json.\n\n${reflectionInstructionText()}\n`,
|
|
1073
1075
|
'honest-mode': `---\nname: honest-mode\ndescription: Required final SKS verification pass before claiming a task is complete.\n---\n\nBefore final: include a completion summary explaining what was done, what changed for the user/repo, what was verified, and what remains unverified or blocked. Then restate the goal, compare result to evidence, list tests/commands/inspections, state uncertainty or blockers plainly, and do not claim completion beyond evidence. Full routes must pass reflection-gate.json first. Include concise SKS Honest Mode or 솔직모드 when required.\n`,
|
|
1074
1076
|
'autoresearch-loop': `---\nname: autoresearch-loop\ndescription: Iterative AutoResearch-style loop for open-ended improvement, discovery, prompt, ranking, SEO/GEO, and workflow-quality tasks.\n---\n\nUse for research, ranking, prompt/workflow improvement, benchmark gains, or repeated refinement. Loop: program, hypothesis, smallest falsifying experiment, metric, keep/discard, falsify, next step. Keep a ledger and do not claim improvement without evidence.\n`,
|