sneakoscope 6.1.0 → 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 +35 -11
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +18 -9
- package/dist/bin/sks-dispatch.js +2 -2
- package/dist/cli/args.js +2 -0
- package/dist/cli/command-manifest-lite.js +2 -3
- package/dist/cli/command-registry.js +3 -4
- package/dist/cli/help-fast.js +1 -1
- package/dist/cli/install-helpers.js +116 -306
- package/dist/cli/install-tool-helpers.js +287 -0
- package/dist/cli/router.js +40 -4
- package/dist/commands/codex-lb.js +51 -20
- package/dist/commands/codex.js +39 -1
- package/dist/commands/doctor.js +242 -20
- package/dist/commands/tmux.js +5 -1
- package/dist/commands/zellij-monitor-pane.js +2 -0
- package/dist/commands/zellij-viewport-pane.js +3 -1
- package/dist/commands/zellij.js +1 -1
- package/dist/config/skills-manifest.json +59 -59
- package/dist/core/agent-bridge/agent-manifest.js +48 -0
- package/dist/core/agents/agent-command-surface.js +2 -1
- package/dist/core/agents/agent-effort-policy.js +38 -35
- package/dist/core/agents/agent-plan.js +100 -21
- package/dist/core/agents/agent-role-config.js +43 -46
- package/dist/core/agents/agent-runner-codex-exec.js +16 -3
- package/dist/core/agents/agent-schema.js +3 -2
- package/dist/core/agents/native-cli-session-swarm.js +1 -1
- package/dist/core/agents/zellij-right-lane-cockpit.js +2 -2
- package/dist/core/codex/agent-config-file-repair.js +94 -193
- package/dist/core/codex/codex-cli-update.js +723 -0
- package/dist/core/codex/codex-config-guard.js +185 -9
- package/dist/core/codex/codex-config-readability.js +21 -8
- package/dist/core/codex/codex-config-toml.js +14 -11
- package/dist/core/codex/codex-project-config-policy.js +3 -6
- package/dist/core/codex/codex-startup-config-postcheck.js +52 -42
- package/dist/core/codex-adapter.js +35 -22
- package/dist/core/codex-app/codex-agent-role-sync.js +13 -54
- package/dist/core/codex-app/codex-app-launcher.js +48 -17
- package/dist/core/codex-app/codex-app-restart.js +23 -2
- package/dist/core/codex-app/mcp-manager.js +679 -0
- package/dist/core/codex-app/sks-menubar.js +533 -8
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +15 -4
- package/dist/core/codex-control/codex-0139-web-search-probe.js +17 -6
- package/dist/core/codex-control/codex-lb-launch-recovery.js +293 -0
- package/dist/core/codex-control/codex-reliability-shield.js +89 -29
- package/dist/core/codex-control/codex-sdk-adapter.js +44 -8
- package/dist/core/codex-control/codex-task-runner.js +62 -9
- package/dist/core/codex-control/python-codex-sdk-adapter.js +30 -3
- package/dist/core/codex-exec-output-schema.js +35 -6
- package/dist/core/codex-lb/codex-lb-env.js +1 -1
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +291 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +9 -16
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -1
- package/dist/core/codex-native/core-skill-manifest.js +8 -4
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +2 -3
- package/dist/core/commands/agent-bridge-command.js +23 -2
- package/dist/core/commands/agent-command.js +19 -5
- package/dist/core/commands/basic-cli.js +47 -6
- package/dist/core/commands/command-utils.js +1 -1
- package/dist/core/commands/mad-sks-command.js +76 -10
- package/dist/core/commands/menubar-command.js +94 -0
- package/dist/core/commands/naruto-command.js +645 -1156
- package/dist/core/commands/research-command.js +293 -231
- package/dist/core/commands/run-command.js +100 -23
- package/dist/core/commands/team-command.js +2 -3
- package/dist/core/commands/team-legacy-observe-command.js +94 -359
- package/dist/core/commands/wiki-command.js +11 -5
- package/dist/core/db-safety.js +2 -2
- package/dist/core/decision-lattice.js +6 -6
- package/dist/core/doctor/codex-startup-config-repair.js +8 -3
- package/dist/core/doctor/doctor-codex-startup-repair.js +6 -141
- package/dist/core/feature-fixture-executor.js +71 -7
- package/dist/core/feature-fixture-runner.js +53 -12
- package/dist/core/feature-fixtures.js +47 -14
- package/dist/core/feature-registry.js +28 -27
- package/dist/core/fsx.js +1 -0
- package/dist/core/harness-conflicts.js +18 -9
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +14 -8
- package/dist/core/hooks-runtime/hook-io.js +8 -4
- package/dist/core/hooks-runtime/light-turn.js +70 -0
- package/dist/core/hooks-runtime/naruto-decision-gate.js +184 -0
- package/dist/core/hooks-runtime/payload-signals.js +270 -0
- package/dist/core/hooks-runtime/stop-repeat-guard.js +89 -0
- package/dist/core/hooks-runtime/team-digest.js +0 -1
- package/dist/core/hooks-runtime/tool-output-quarantine.js +93 -0
- package/dist/core/hooks-runtime.js +438 -354
- package/dist/core/init/skills.js +16 -30
- package/dist/core/init.js +144 -36
- package/dist/core/managed-assets/managed-assets-manifest.js +566 -10
- package/dist/core/mission.js +24 -1
- package/dist/core/pipeline-internals/runtime-core.js +570 -177
- package/dist/core/pipeline-internals/runtime-gates.js +174 -48
- package/dist/core/preflight/parallel-preflight-engine.js +66 -4
- package/dist/core/proof/route-adapter.js +1 -1
- package/dist/core/proof/route-proof-gate.js +7 -2
- package/dist/core/proof/selftest-proof-fixtures.js +3 -5
- package/dist/core/proof-field.js +1 -1
- package/dist/core/provider/model-router.js +42 -31
- package/dist/core/recallpulse/policy.js +12 -28
- package/dist/core/recallpulse.js +11 -6
- package/dist/core/release/npm-pack-proof.js +247 -0
- package/dist/core/release/package-dist-snapshot.js +151 -0
- package/dist/core/release/package-size-budget.js +4 -1
- package/dist/core/release/release-authorization-snapshot.js +115 -0
- package/dist/core/release/release-gate-affected-selector.js +14 -2
- package/dist/core/release/release-gate-cache-v2.js +30 -0
- package/dist/core/release/release-gate-contract.js +161 -0
- package/dist/core/release/release-gate-dag.js +1 -0
- package/dist/core/release/release-real-contract.js +90 -10
- package/dist/core/release-parallel-full-coverage.js +31 -143
- package/dist/core/research/claim-evidence-matrix.js +41 -6
- package/dist/core/research/experiment-plan.js +14 -10
- package/dist/core/research/falsification.js +9 -2
- package/dist/core/research/implementation-blueprint-densifier.js +82 -60
- package/dist/core/research/implementation-blueprint.js +32 -26
- package/dist/core/research/mock-result.js +122 -11
- package/dist/core/research/replication-pack.js +15 -8
- package/dist/core/research/research-adversarial-review.js +1068 -0
- package/dist/core/research/research-claim-builder.js +69 -17
- package/dist/core/research/research-claim-synthesizer.js +343 -0
- package/dist/core/research/research-cycle-runner.js +53 -3
- package/dist/core/research/research-falsification-runner.js +176 -0
- package/dist/core/research/research-final-reviewer.js +44 -125
- package/dist/core/research/research-plan-markdown.js +123 -0
- package/dist/core/research/research-realistic-report.js +14 -6
- package/dist/core/research/research-review-artifact-digest.js +66 -0
- package/dist/core/research/research-source-evidence.js +144 -0
- package/dist/core/research/research-source-layer-catalog.js +68 -0
- package/dist/core/research/research-source-ledger-merge.js +250 -12
- package/dist/core/research/research-source-shards.js +26 -70
- package/dist/core/research/research-stage-runner.js +237 -247
- package/dist/core/research/research-super-search.js +188 -0
- package/dist/core/research/research-synthesis-prompt.js +20 -1
- package/dist/core/research/research-synthesis-writer.js +86 -5
- package/dist/core/research/research-work-graph.js +25 -18
- package/dist/core/research/source-quality-report.js +21 -0
- package/dist/core/research.js +424 -390
- package/dist/core/retention.js +70 -2
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/dollar-manifest-lite.js +11 -11
- package/dist/core/routes.js +149 -69
- package/dist/core/runtime/task-profile.js +66 -0
- package/dist/core/runtime/verification-budget.js +12 -0
- package/dist/core/security/high-risk-contracts.js +6 -6
- package/dist/core/stop-gate/stop-gate-check.js +49 -12
- package/dist/core/subagents/agent-catalog.js +287 -0
- package/dist/core/subagents/model-policy.js +259 -0
- package/dist/core/subagents/naruto-help-contract.js +47 -0
- package/dist/core/subagents/official-subagent-config.js +488 -0
- package/dist/core/subagents/official-subagent-preparation.js +297 -0
- package/dist/core/subagents/official-subagent-prompt.js +159 -0
- package/dist/core/subagents/official-subagent-runner.js +129 -0
- package/dist/core/subagents/subagent-evidence.js +663 -0
- package/dist/core/subagents/terminology.js +16 -0
- package/dist/core/subagents/thread-budget.js +21 -0
- package/dist/core/subagents/triwiki-attention.js +168 -0
- package/dist/core/super-search/runtime-helpers.js +173 -19
- package/dist/core/super-search/runtime.js +140 -15
- package/dist/core/super-search/source-records.js +49 -8
- package/dist/core/team-review-policy.js +15 -0
- package/dist/core/triwiki/code-pack-head-freshness.js +291 -0
- package/dist/core/triwiki/triwiki-module-card.js +1 -1
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +9 -2
- package/dist/core/version-manager.js +51 -1
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +40 -1
- package/dist/core/zellij/zellij-fake-adapter.js +3 -1
- package/dist/core/zellij/zellij-launcher.js +49 -10
- package/dist/core/zellij/zellij-layout-builder.js +14 -5
- package/dist/core/zellij/zellij-official-subagent-activity.js +477 -0
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +264 -0
- package/dist/core/zellij/zellij-pane-proof.js +9 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +17 -5
- package/dist/core/zellij/zellij-slot-telemetry.js +15 -3
- package/dist/core/zellij/zellij-ui-mode.js +1 -1
- package/dist/core/zellij/zellij-update.js +14 -1
- package/dist/core/zellij/zellij-viewport-binder.js +3 -0
- package/dist/scripts/agent-role-config-repair-check.js +14 -16
- package/dist/scripts/architecture-guard-check.js +8 -1
- package/dist/scripts/canonical-test-runner.js +7 -1
- package/dist/scripts/check-route-modularity.js +0 -1
- package/dist/scripts/check-ts-contracts.js +1 -1
- package/dist/scripts/codex-control-all-pipelines-check.js +7 -3
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +27 -0
- 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 +27 -7
- package/dist/scripts/codex-native-repair-transaction-check.js +3 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +7 -4
- package/dist/scripts/codex-sdk-backend-router-check.js +2 -0
- package/dist/scripts/codex-sdk-research-pipeline-check.js +30 -8
- package/dist/scripts/db-route-materialization-check.js +33 -0
- package/dist/scripts/docs-truthfulness-check.js +3 -1
- package/dist/scripts/doctor-codex-startup-repair-check.js +12 -15
- package/dist/scripts/doctor-fix-production-blackbox.js +12 -2
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +8 -2
- package/dist/scripts/doctor-startup-config-repair-check.js +12 -2
- package/dist/scripts/install-update-preserves-config-check.js +6 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +4 -0
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -1
- package/dist/scripts/managed-role-manifest-parity-check.js +5 -4
- package/dist/scripts/naruto-codex-e2e-check.js +14 -7
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +4 -201
- package/dist/scripts/npm-publish-performance-check.js +20 -12
- package/dist/scripts/official-subagent-workflow-check.js +145 -0
- package/dist/scripts/package-published-contract-check.js +6 -29
- package/dist/scripts/packlist-performance-check.js +18 -21
- package/dist/scripts/parallel-verification-engine-check.js +2 -2
- package/dist/scripts/prepublish-release-check-or-fast.js +23 -86
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +8 -0
- package/dist/scripts/release-affected-selector-check.js +74 -1
- package/dist/scripts/release-check-stamp.js +153 -248
- package/dist/scripts/release-dag-full-coverage-check.js +7 -15
- package/dist/scripts/release-dynamic-presets-check.js +2 -1
- package/dist/scripts/release-gate-dag-runner-check.js +0 -1
- package/dist/scripts/release-gate-dag-runner.js +12 -1
- package/dist/scripts/release-gate-existence-audit.js +1 -2
- package/dist/scripts/release-parallel-full-coverage-check.js +12 -6
- package/dist/scripts/release-parallel-speed-budget-check.js +18 -2
- package/dist/scripts/release-real-check.js +26 -4
- package/dist/scripts/release-registry-check.js +61 -16
- package/dist/scripts/research-blueprint-densifier-check.js +2 -2
- package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +11 -7
- package/dist/scripts/sizecheck.js +2 -2
- package/dist/scripts/sks-3-1-4-directive-check-lib.js +8 -2
- package/dist/scripts/sks-3-1-5-directive-check-lib.js +3 -2
- package/dist/scripts/sks-3-1-6-directive-check-lib.js +5 -3
- package/dist/scripts/sks-menubar-install-check.js +14 -1
- package/dist/scripts/super-search-provider-interface-check.js +31 -18
- package/dist/scripts/trust-fixture-check.js +32 -10
- package/dist/scripts/wrongness-fixture-check.js +1 -1
- package/dist/scripts/zellij-layout-valid-check.js +5 -5
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +3 -3
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1486 -0
- package/package.json +15 -10
- package/release-gates.v2.json +4060 -0
- package/runtime-required-scripts.json +9 -0
- package/dist/commands/db.js +0 -6
- package/dist/core/commands/db-command.js +0 -146
- package/dist/core/research/prompt.js +0 -15
- package/dist/scripts/codex-0139-feature-probes-check.js +0 -30
- package/dist/scripts/codex-0139-marketplace-source-check.js +0 -13
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
package/dist/core/retention.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import { exists, readJson, writeJsonAtomic, ensureDir, dirSize, fileSize, formatBytes, rmrf, nowIso, appendJsonlBounded, listFilesRecursive, managedSksTmpRoot, sha256 } from './fsx.js';
|
|
4
|
+
import { exists, readJson, writeJsonAtomic, ensureDir, dirSize, fileSize, formatBytes, rmrf, nowIso, appendJsonlBounded, listFilesRecursive, managedSksTmpRoot, sha256, SKS_TEMP_LEASE_FILE } from './fsx.js';
|
|
5
5
|
import { FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS } from './routes.js';
|
|
6
6
|
export const DEFAULT_RETENTION_POLICY = Object.freeze({
|
|
7
7
|
schema_version: 1,
|
|
@@ -487,6 +487,44 @@ function currentProcessOwns(stat) {
|
|
|
487
487
|
function sharedTempEntryMatchesProject(entryName, projectHash) {
|
|
488
488
|
return entryName === `sks-${projectHash}` || entryName.startsWith(`sks-${projectHash}-`);
|
|
489
489
|
}
|
|
490
|
+
function activeTempEnvironmentKey(target) {
|
|
491
|
+
const resolvedTarget = path.resolve(target);
|
|
492
|
+
for (const key of ['SKS_TMP_DIR', 'TMPDIR', 'TMP', 'TEMP']) {
|
|
493
|
+
const raw = process.env[key];
|
|
494
|
+
if (!raw)
|
|
495
|
+
continue;
|
|
496
|
+
const activePath = path.resolve(raw);
|
|
497
|
+
if (isWithin(resolvedTarget, activePath))
|
|
498
|
+
return key;
|
|
499
|
+
}
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
async function liveTempLease(target) {
|
|
503
|
+
const leasePath = path.join(target, SKS_TEMP_LEASE_FILE);
|
|
504
|
+
const stat = await fs.lstat(leasePath).catch(() => null);
|
|
505
|
+
if (!stat?.isFile() || stat.isSymbolicLink() || !currentProcessOwns(stat))
|
|
506
|
+
return null;
|
|
507
|
+
const lease = await readJson(leasePath, null).catch(() => null);
|
|
508
|
+
const pid = Number(lease?.pid);
|
|
509
|
+
if (lease?.schema !== 'sks.temp-lease.v1' || !processIdAlive(pid))
|
|
510
|
+
return null;
|
|
511
|
+
return {
|
|
512
|
+
path: leasePath,
|
|
513
|
+
pid,
|
|
514
|
+
kind: lease?.kind ? String(lease.kind) : null
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function processIdAlive(pid) {
|
|
518
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
519
|
+
return false;
|
|
520
|
+
try {
|
|
521
|
+
process.kill(pid, 0);
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
catch (error) {
|
|
525
|
+
return error?.code === 'EPERM';
|
|
526
|
+
}
|
|
527
|
+
}
|
|
490
528
|
async function pruneTmp(root, policy, dryRun, actions) {
|
|
491
529
|
const tmp = path.join(root, '.sneakoscope', 'tmp');
|
|
492
530
|
if (!(await exists(tmp)))
|
|
@@ -1138,6 +1176,28 @@ export async function sweepSksTempDirs(root, opts = {}) {
|
|
|
1138
1176
|
const stat = await fs.lstat(target).catch(() => null);
|
|
1139
1177
|
if (!stat || stat.isSymbolicLink() || !currentProcessOwns(stat))
|
|
1140
1178
|
continue;
|
|
1179
|
+
const environmentKey = activeTempEnvironmentKey(target);
|
|
1180
|
+
if (environmentKey) {
|
|
1181
|
+
actions.push({
|
|
1182
|
+
action: 'retain_active_sks_temp',
|
|
1183
|
+
path: target,
|
|
1184
|
+
reason: 'active_temp_environment',
|
|
1185
|
+
environment_key: environmentKey
|
|
1186
|
+
});
|
|
1187
|
+
continue;
|
|
1188
|
+
}
|
|
1189
|
+
const lease = stat.isDirectory() ? await liveTempLease(target) : null;
|
|
1190
|
+
if (lease) {
|
|
1191
|
+
actions.push({
|
|
1192
|
+
action: 'retain_active_sks_temp',
|
|
1193
|
+
path: target,
|
|
1194
|
+
reason: 'active_temp_lease',
|
|
1195
|
+
lease_path: lease.path,
|
|
1196
|
+
owner_pid: lease.pid,
|
|
1197
|
+
lease_kind: lease.kind
|
|
1198
|
+
});
|
|
1199
|
+
continue;
|
|
1200
|
+
}
|
|
1141
1201
|
const inspected = await inspectTempPath(target);
|
|
1142
1202
|
if (!inspected.complete) {
|
|
1143
1203
|
actions.push({ action: 'skip_unsafe_temp_entry', path: target, reason: inspected.blockers.join(',') });
|
|
@@ -1561,7 +1621,15 @@ export async function enforceRetention(root, opts = {}) {
|
|
|
1561
1621
|
await rotateLargeJsonl(root, policy, dryRun, actions);
|
|
1562
1622
|
await pruneDisposableReportLogs(root, policy, dryRun, actions, opts);
|
|
1563
1623
|
await pruneSessionStateFiles(root, policy, dryRun, actions);
|
|
1564
|
-
|
|
1624
|
+
if (opts.skipSksTempSweep === true) {
|
|
1625
|
+
actions.push({
|
|
1626
|
+
action: 'skip_sks_temp_sweep',
|
|
1627
|
+
reason: opts.afterRoute ? 'post_route_global_temp_isolation' : 'explicit_temp_sweep_skip'
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
else {
|
|
1631
|
+
await sweepSksTempDirs(root, { dryRun, actions, maxAgeHours: opts.sksTempMaxAgeHours ?? policy.max_tmp_age_hours ?? 0 });
|
|
1632
|
+
}
|
|
1565
1633
|
if (opts.pruneWikiArtifacts || policy.prune_wiki_artifacts)
|
|
1566
1634
|
await pruneWikiArtifacts(root, { policy, dryRun, actions, lowTrust: opts.pruneWikiLowTrust });
|
|
1567
1635
|
let report = boundedMode || opts.skipStorageReport === true ? await lightweightStorageReport(root) : await storageReport(root);
|
|
@@ -9,7 +9,7 @@ export const FROM_CHAT_IMG_CHECKLIST_ARTIFACT = 'from-chat-img-checklist.md';
|
|
|
9
9
|
export const FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT = 'from-chat-img-temp-triwiki.json';
|
|
10
10
|
export const FROM_CHAT_IMG_QA_LOOP_ARTIFACT = 'from-chat-img-qa-loop.json';
|
|
11
11
|
export const FROM_CHAT_IMG_TEMP_TRIWIKI_SESSIONS = 5;
|
|
12
|
-
export const USAGE_TOPICS = 'install|setup|bootstrap|root|deps|zellij|tmux|auto-review|team|qa-loop|ppt|image-ux-review|computer-use|goal|fast-mode|review|ui|research|seo-geo-optimizer|
|
|
12
|
+
export const USAGE_TOPICS = 'install|setup|bootstrap|root|deps|zellij|tmux|auto-review|naruto|team|qa-loop|ppt|image-ux-review|computer-use|goal|fast-mode|review|ui|research|seo-geo-optimizer|git|codex|codex-app|codex-native|hooks|features|all-features|dfix|commit|commit-and-push|design|imagegen|dollar|context7|super-search|xai|pipeline|reasoning|guard|conflicts|versioning|eval|harness|hproof|gx|wiki|memory|wrongness|code-structure|proof-field|skill-dream|rust';
|
|
13
13
|
export const RECOMMENDED_MCP_SERVERS = [
|
|
14
14
|
{
|
|
15
15
|
id: 'context7',
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const NARUTO_DESCRIPTION = '$Naruto
|
|
1
|
+
const NARUTO_DESCRIPTION = '$Naruto is the lightweight Codex official subagent workflow. The Sol Max parent uses two independent children for non-trivial work and at most three for critical multi-domain risk; explicit --agents remains authoritative. Child routing is fixed to Luna Max mechanical, Sol High implementation, Sol Max judgment, and Terra Medium long-context/Computer Use/Browser/ImageGen execution. It delegates only defensible independent slices, reuses bounded query-aware TriWiki attention anchors, and requires official lifecycle events plus a trustworthy structured parent summary.';
|
|
2
2
|
const COMPUTER_USE_DESCRIPTION = 'Maximum-speed Codex Computer Use lane for native macOS, desktop-app, OS-settings, and non-web visual tasks only. Browser, localhost, website, webapp, and web-based app verification must route through Codex Chrome Extension readiness first.';
|
|
3
3
|
export const DOLLAR_COMMANDS_LITE = [
|
|
4
4
|
{ command: '$DFix', route: 'fast direct fix', description: 'Tiny simple direct edits such as copy, labels, typos, wording, spacing, colors, or clearly scoped one-line changes. Bypasses the general SKS pipeline and runs an ultralight, no-record task-list path.' },
|
|
5
5
|
{ command: '$Answer', route: 'answer-only research', description: 'Answer questions without starting implementation. Uses TriWiki, web, Context7 when relevant, and Honest Mode fact-checking.' },
|
|
6
6
|
{ command: '$SKS', route: 'general SKS workflow', description: 'General Sneakoscope setup, help, status, and workflow routing.' },
|
|
7
|
-
{ command: '$Plan', route: 'planning-only frontdoor', description: 'Plan scaffold only: writes a fixed-template .sneakoscope/plans/<slug>.md (goal/scope/steps headings to fill in), not project-specific decision-complete planning. Keeps implementation disallowed until $Work runs the plan.' },
|
|
7
|
+
{ command: '$Plan', route: 'planning-only frontdoor', description: 'Plan scaffold only: writes a fixed-template .sneakoscope/plans/<slug>.md (goal/scope/steps headings to fill in), not project-specific decision-complete planning. Keeps implementation disallowed until an explicit $Work alias or $Naruto runs the plan.' },
|
|
8
8
|
{ command: '$Review', route: 'machine-first diff review', description: 'Review staged or selected diffs with machine evidence sorted above LLM opinion.' },
|
|
9
|
-
{ command: '$Fast-Mode', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and
|
|
10
|
-
{ command: '$Fast-On', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and
|
|
11
|
-
{ command: '$Fast-Off', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and
|
|
9
|
+
{ command: '$Fast-Mode', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and routed workflows. Explicit --fast, --no-fast, and --service-tier flags still override it.' },
|
|
10
|
+
{ command: '$Fast-On', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and routed workflows. Explicit --fast, --no-fast, and --service-tier flags still override it.' },
|
|
11
|
+
{ command: '$Fast-Off', route: 'fast-mode toggle', description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and routed workflows. Explicit --fast, --no-fast, and --service-tier flags still override it.' },
|
|
12
12
|
{ command: '$with-local-llm-on', route: 'local Ollama worker toggle', description: 'Turn the optional local Ollama worker backend on or off. Default off keeps SKS GPT-only; enabled mode lets eligible simple code/collection worker slices use Ollama while GPT/Codex owns strategy, design, review, verification, and integration.' },
|
|
13
13
|
{ command: '$with-local-llm-off', route: 'local Ollama worker toggle', description: 'Turn the optional local Ollama worker backend on or off. Default off keeps SKS GPT-only; enabled mode lets eligible simple code/collection worker slices use Ollama while GPT/Codex owns strategy, design, review, verification, and integration.' },
|
|
14
|
-
{ command: '$Naruto', route: '
|
|
15
|
-
{ command: '$ShadowClone', route: '
|
|
16
|
-
{ command: '$Kagebunshin', route: '
|
|
17
|
-
{ command: '$Work', route: '
|
|
18
|
-
{ command: '$Swarm', route: '
|
|
19
|
-
{ command: '$Release-Review', route: '
|
|
14
|
+
{ command: '$Naruto', route: 'Codex official subagent workflow', description: NARUTO_DESCRIPTION },
|
|
15
|
+
{ command: '$ShadowClone', route: 'deprecated alias to the Codex official subagent workflow', description: NARUTO_DESCRIPTION },
|
|
16
|
+
{ command: '$Kagebunshin', route: 'deprecated alias to the Codex official subagent workflow', description: NARUTO_DESCRIPTION },
|
|
17
|
+
{ command: '$Work', route: 'compatibility alias to the Codex official subagent workflow', description: NARUTO_DESCRIPTION },
|
|
18
|
+
{ command: '$Swarm', route: 'compatibility alias to the Codex official subagent workflow', description: NARUTO_DESCRIPTION },
|
|
19
|
+
{ command: '$Release-Review', route: 'official subagent release review', description: 'Run release-readiness collaboration through Codex official subagent threads with explicit review lanes, bounded thread budgets, structured parent outcomes, evidence, and cleanup artifacts.' },
|
|
20
20
|
{ command: '$QA-LOOP', route: 'QA loop', description: 'Dogfood UI/API as human proxy with safety gates, Codex Chrome Extension-first web UI evidence, safe fixes, rechecks, Honest Mode.' },
|
|
21
21
|
{ command: '$PPT', route: 'HTML/PDF presentation pipeline', description: 'Create restrained, information-first HTML/PDF presentation artifacts after delivery context, audience profile, STP, decision context, pain-point, research, design-system, and verification questions are sealed.' },
|
|
22
22
|
{ command: '$Image-UX-Review', route: 'image-generation UI/UX review loop', description: 'Review UI/UX through the imagegen/gpt-image-2 visual critique loop: source screenshots become generated annotated review images, those images become issue ledgers, then fixes are rechecked.' },
|
package/dist/core/routes.js
CHANGED
|
@@ -4,6 +4,7 @@ import { ALLOWED_REASONING_EFFORTS, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_
|
|
|
4
4
|
import { CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_IMAGEGEN_REQUIRED_POLICY, CODEX_WEB_VERIFICATION_POLICY, RESERVED_CODEX_PLUGIN_SKILL_NAMES } from './routes/evidence.js';
|
|
5
5
|
import { getdesignReferencePolicyText, imageUxReviewPipelinePolicyText } from './routes/design-policy.js';
|
|
6
6
|
import { PPT_PIPELINE_SKILL_ALLOWLIST, pptPipelineAllowlistPolicyText } from './routes/ppt-policy.js';
|
|
7
|
+
import { classifyTaskProfile, looksLikeDatabaseWorkRequest } from './runtime/task-profile.js';
|
|
7
8
|
export * from './routes/constants.js';
|
|
8
9
|
export * from './routes/design-policy.js';
|
|
9
10
|
export * from './routes/evidence.js';
|
|
@@ -217,7 +218,7 @@ export const ROUTES = [
|
|
|
217
218
|
command: '$Fast-Mode',
|
|
218
219
|
mode: 'FAST_MODE',
|
|
219
220
|
route: 'fast-mode toggle',
|
|
220
|
-
description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and
|
|
221
|
+
description: 'Turn the SKS Fast mode default on or off for project-local dollar-command and routed workflows. Explicit --fast, --no-fast, and --service-tier flags still override it.',
|
|
221
222
|
requiredSkills: ['fast-mode', 'honest-mode'],
|
|
222
223
|
dollarAliases: ['$Fast-On', '$Fast-Off'],
|
|
223
224
|
appSkillAliases: ['fast-on', 'fast-off'],
|
|
@@ -251,52 +252,52 @@ export const ROUTES = [
|
|
|
251
252
|
command: '$Team',
|
|
252
253
|
mode: 'TEAM',
|
|
253
254
|
route: 'deprecated alias to Naruto',
|
|
254
|
-
description: 'Deprecated compatibility alias. New substantial work is routed to $Naruto, the
|
|
255
|
+
description: 'Deprecated compatibility alias. New substantial work is routed to $Naruto, the Codex official subagent workflow SSOT.',
|
|
255
256
|
requiredSkills: ['team', 'pipeline-runner', 'context7-docs', 'prompt-pipeline', REFLECTION_SKILL_NAME, 'honest-mode'],
|
|
256
257
|
dollarAliases: ['$From-Chat-IMG'],
|
|
257
258
|
appSkillAliases: ['from-chat-img'],
|
|
258
259
|
deprecated: true,
|
|
259
260
|
hidden: true,
|
|
260
261
|
aliasTo: '$Naruto',
|
|
261
|
-
deprecationMessage: '$Team is deprecated and redirects new execution missions to $Naruto.
|
|
262
|
+
deprecationMessage: '$Team is deprecated and redirects new execution missions to $Naruto. Only read-only Team log/tail/watch/lane/status commands remain for old missions.',
|
|
262
263
|
lifecycle: ['deprecated_alias_redirect', 'naruto_gate', 'honest_mode'],
|
|
263
264
|
context7Policy: 'optional',
|
|
264
265
|
reasoningPolicy: 'high',
|
|
265
266
|
stopGate: 'naruto-gate.json',
|
|
266
267
|
coverage_required: true,
|
|
267
|
-
cliEntrypoint: 'sks team "task"
|
|
268
|
+
cliEntrypoint: 'sks team "task" | sks team log|tail|watch|lane|status',
|
|
268
269
|
examples: ['$Team executor:5 agree on the best plan and implement it', '$From-Chat-IMG 채팅+첨부 이미지 작업 지시서']
|
|
269
270
|
},
|
|
270
271
|
{
|
|
271
272
|
id: 'Naruto',
|
|
272
273
|
command: '$Naruto',
|
|
273
274
|
mode: 'NARUTO',
|
|
274
|
-
route: '
|
|
275
|
-
description: '$Naruto
|
|
275
|
+
route: 'Codex official subagent workflow',
|
|
276
|
+
description: '$Naruto prepares a lightweight Codex official subagent workflow. The Sol Max parent owns decomposition, delegates only defensible direct-child slices, reuses bounded query-aware TriWiki attention anchors, waits for every requested thread, integrates the results, and reports scoped verification. Automatic fan-out is two for non-trivial work and at most three for critical multi-domain risk; explicit --agents remains authoritative.',
|
|
276
277
|
requiredSkills: ['naruto', 'pipeline-runner', 'prompt-pipeline', 'honest-mode'],
|
|
277
278
|
dollarAliases: ['$ShadowClone', '$Kagebunshin', '$Work', '$Swarm'],
|
|
278
279
|
appSkillAliases: ['shadow-clone', 'kage-bunshin', 'work', 'swarm'],
|
|
279
|
-
lifecycle: ['
|
|
280
|
+
lifecycle: ['task_profile', 'subagent_plan', 'official_delegation_context', 'subagent_events', 'parent_integration', 'scoped_verification', 'honest_mode'],
|
|
280
281
|
context7Policy: 'optional',
|
|
281
282
|
reasoningPolicy: 'high',
|
|
282
283
|
stopGate: 'naruto-gate.json',
|
|
283
284
|
coverage_required: true,
|
|
284
|
-
cliEntrypoint: 'sks naruto run "task" [--
|
|
285
|
-
examples: ['$Naruto run
|
|
285
|
+
cliEntrypoint: 'sks naruto run "task" [--agents N] [--max-threads N] | sks naruto status|subagents|proof',
|
|
286
|
+
examples: ['$Naruto run review twelve independent packages with --agents 12', '$Work', '$Swarm "fix all lint errors"']
|
|
286
287
|
},
|
|
287
288
|
{
|
|
288
289
|
id: 'ReleaseReview',
|
|
289
290
|
command: '$Release-Review',
|
|
290
291
|
mode: 'RELEASE_REVIEW',
|
|
291
|
-
route: '
|
|
292
|
-
description: 'Run release-readiness collaboration through
|
|
293
|
-
requiredSkills: ['
|
|
294
|
-
lifecycle: ['
|
|
292
|
+
route: 'official subagent release review',
|
|
293
|
+
description: 'Run release-readiness collaboration through official Codex subagents with explicit thread budget, disjoint ownership, parent integration, scoped verification, and cleanup evidence.',
|
|
294
|
+
requiredSkills: ['naruto', 'pipeline-runner', REFLECTION_SKILL_NAME, 'honest-mode'],
|
|
295
|
+
lifecycle: ['subagent_plan', 'release_fixture_matrix', 'risk_scoped_review', 'parent_integration', 'session_cleanup', 'honest_mode'],
|
|
295
296
|
context7Policy: 'optional',
|
|
296
297
|
reasoningPolicy: 'high',
|
|
297
298
|
stopGate: 'release-readiness-report.json',
|
|
298
|
-
cliEntrypoint: 'sks
|
|
299
|
-
examples: ['$Release-Review agents:10
|
|
299
|
+
cliEntrypoint: 'sks naruto run "$Release-Review release audit" --agents <n> --read-only --json',
|
|
300
|
+
examples: ['$Release-Review agents:10 release audit', 'sks naruto run "$Release-Review wide release audit" --agents 10 --read-only --json']
|
|
300
301
|
},
|
|
301
302
|
{
|
|
302
303
|
id: 'QALoop',
|
|
@@ -471,7 +472,9 @@ export const ROUTES = [
|
|
|
471
472
|
context7Policy: 'required',
|
|
472
473
|
reasoningPolicy: 'high',
|
|
473
474
|
stopGate: 'db-review.json',
|
|
474
|
-
cliEntrypoint: 'sks db
|
|
475
|
+
cliEntrypoint: 'Codex App prompt route only; the legacy `sks db` CLI is removed',
|
|
476
|
+
codexAppOnly: true,
|
|
477
|
+
codexAppOnlyReason: '$DB remains a route-level safety policy. The legacy `sks db` CLI is removed from public dispatch and returns unknown_command.',
|
|
475
478
|
examples: ['$DB check this migration safely']
|
|
476
479
|
},
|
|
477
480
|
{
|
|
@@ -601,9 +604,9 @@ export const COMMAND_CATALOG = [
|
|
|
601
604
|
{ name: 'daemon', usage: 'sks daemon status|warm|stop [--json]', description: 'Inspect or warm the local SKS daemon cache state for build/proof reuse.' },
|
|
602
605
|
{ name: 'run', usage: 'sks run "task" [--visual|--research|--db] [--json]', description: 'Classify a plain-language task, materialize a mission, and route it through the SKS trust kernel.' },
|
|
603
606
|
{ name: 'plan', usage: 'sks plan "task" [--json]', description: 'Write a planning-only artifact under .sneakoscope/plans without editing code.' },
|
|
604
|
-
{ name: 'status', usage: 'sks status [--json]', description: 'Show the active mission, route, phase, proof, trust,
|
|
607
|
+
{ name: 'status', usage: 'sks status [--json]', description: 'Show the active mission, route, phase, proof, trust, subagent or legacy-agent evidence, image voxel, DB safety, and next action.' },
|
|
605
608
|
{ name: 'review', usage: 'sks review [--staged|--diff <ref>] [--fix] [--json]', description: 'Review a diff with machine-evidence findings sorted above LLM review notes.' },
|
|
606
|
-
{ name: 'ui', usage: 'sks ui [--port 4477] [--mission latest] [--once] [--json]', description: 'Open the localhost SKS dashboard with live
|
|
609
|
+
{ name: 'ui', usage: 'sks ui [--port 4477] [--mission latest] [--once] [--json]', description: 'Open the localhost SKS dashboard with live agent-thread slots, events, and gate status.' },
|
|
607
610
|
{ name: 'usage', usage: `sks usage [${USAGE_TOPICS}]`, description: 'Print copy-ready workflows for common tasks.' },
|
|
608
611
|
{ name: 'quickstart', usage: 'sks quickstart', description: 'Show the shortest safe setup and verification flow.' },
|
|
609
612
|
{ name: 'bootstrap', usage: 'sks bootstrap [--install-scope global|project] [--local-only] [--json]', description: 'Initialize the current project, install SKS Codex App files/skills, check Context7/Codex App/Zellij, and print ready true/false.' },
|
|
@@ -611,12 +614,12 @@ export const COMMAND_CATALOG = [
|
|
|
611
614
|
{ name: 'update', usage: 'sks update [check|now] [--version <version>] [--json] [--dry-run]', description: 'Check npm for the latest SKS release and update the global package by default; use `check` for status-only.' },
|
|
612
615
|
{ name: 'uninstall', usage: 'sks uninstall [--dry-run] [--yes] [--keep-config] [--keep-data] [--purge-projects] [--json]', description: 'Remove SKS global skills, hooks, menu bar, state, temp files, and optional project residue while preserving user-owned content by default.' },
|
|
613
616
|
{ name: 'deps', usage: 'sks deps check [--json] [--yes]', description: 'Check Node/npm, Codex CLI, and Zellij readiness; pass --yes to repair missing Codex CLI/Zellij tooling when supported.' },
|
|
614
|
-
{ name: 'codex', usage: 'sks codex compatibility|version|doctor|schema|0.144 [--json]', description: 'Check Codex CLI
|
|
617
|
+
{ name: 'codex', usage: 'sks codex compatibility|version|update-status [--refresh]|update|doctor|schema|0.144 [--json]', description: 'Check Codex CLI compatibility/version/update status, run the official `codex update`, and inspect current manifest, capability, and hook-schema evidence.' },
|
|
615
618
|
{ name: 'codex-app', usage: 'sks codex-app [check|glm-profile install|set-openrouter-key --api-key-stdin|product-design|chrome-extension|pat status|remote-control]', description: 'Check Codex App install, GLM/OpenRouter model profile visibility, codex-lb key-entry guidance, Product Design plugin readiness, Codex Chrome Extension web verification readiness, PAT-safe status, first-party MCP/plugin readiness, and Codex CLI 0.130.0+ remote-control availability.' },
|
|
616
619
|
{ name: 'codex-native', usage: 'sks codex-native status|feature-broker|invocation-plan|init-deep [--json]', description: 'Inspect Codex Native feature broker readiness, invocation routing, pattern evidence, and managed memory setup.' },
|
|
617
620
|
{ name: 'hooks', usage: 'sks hooks explain|status|trust-report|replay|codex-validate|warning-check ... [--json]', description: 'Explain Codex hook events, validate vendored latest 10-event output schemas, replay fixtures, and enforce warning-zero SKS hook policies under the 0.134 compatibility matrix.' },
|
|
618
621
|
{ name: 'codex-lb', usage: 'sks codex-lb status|health|metrics|doctor|circuit|repair|setup ...', description: 'Configure, health-check, repair, and record circuit evidence for codex-lb provider auth without confusing ChatGPT OAuth and proxy keys.' },
|
|
619
|
-
{ name: 'zellij', usage: 'sks zellij status|repair [--json] | sks
|
|
622
|
+
{ name: 'zellij', usage: 'sks zellij status|repair [--json] | sks --mad', description: 'Inspect Zellij runtime status, explain repair (no auto-install), and open the SKS Zellij runtime used by MAD. Zellij panes are not official Naruto subagent evidence.' },
|
|
620
623
|
{ name: 'tmux', usage: 'removed-runtime migration notice (replacement: zellij)', description: 'Show the removed-runtime migration notice and point operators to Zellij.' },
|
|
621
624
|
{ name: 'mad-sks', usage: 'sks mad-sks plan|run|apply|sql|apply-migration|status|close|rollback-apply ... | sks --mad [--high]', description: 'Open or inspect MAD-SKS scoped permission workflows, merged SQL-plane execution, and the Zellij permission launcher.' },
|
|
622
625
|
{ name: 'auto-review', usage: 'sks auto-review status|enable|start [--high] | sks --Auto-review --high', description: 'Enable Codex automatic approval review and launch SKS Zellij with the auto-review profile.' },
|
|
@@ -652,7 +655,6 @@ export const COMMAND_CATALOG = [
|
|
|
652
655
|
{ name: 'goal', usage: 'sks goal create|pause|resume|clear|status ...', description: 'Prepare and control the fast SKS bridge overlay for Codex native persisted /goal workflows.' },
|
|
653
656
|
{ name: 'seo-geo-optimizer', usage: 'sks seo-geo-optimizer [seo|geo] doctor|audit|research|strategy|plan|apply|verify|status|rollback|fixture [mission|latest] [--mode seo|geo] [--target auto|website|docs|package] [--include-marketing] [--json]', description: 'Run the unified SEO/GEO optimizer on the shared search-visibility kernel with mode-specific gates, marketing research/strategy, safe apply, and proof.' },
|
|
654
657
|
{ name: 'research', usage: 'sks research prepare|run|status ...', description: 'Run long-form real research missions with xhigh agent Eureka ideas, debate, layered sources, paper, novelty, and falsification gates.' },
|
|
655
|
-
{ name: 'db', usage: 'sks db policy|scan|mcp-config|classify|check ...', description: 'Inspect and enforce database/Supabase safety policy.' },
|
|
656
658
|
{ name: 'eval', usage: 'sks eval run|compare|thresholds ...', description: 'Run deterministic context-quality and performance evidence checks.' },
|
|
657
659
|
{ name: 'harness', usage: 'sks harness fixture|review [--json]', description: 'Run Harness Growth Factory fixtures for forgetting, skills, experiments, tool taxonomy, permissions, MultiAgentV2, and Zellij views.' },
|
|
658
660
|
{ name: 'perf', usage: 'sks perf run|workflow|cold-start [--json] [--iterations N]', description: 'Measure structured GPT-5.6/SKS performance budgets, including cold-start, Proof Field workflow decisions, and fast-lane evidence.' },
|
|
@@ -668,8 +670,9 @@ export const COMMAND_CATALOG = [
|
|
|
668
670
|
{ name: 'wiki', usage: 'sks wiki coords|pack|refresh|publish|rebuild-index|validate|validate-shared|wrongness ...', description: 'Build, refresh, publish shared shards, rebuild ignored indexes, validate, and attach wrongness-memory context to RGBA/trig LLM Wiki packs with attention.use_first and attention.hydrate_first for compact recall plus source hydration.' },
|
|
669
671
|
{ name: 'memory', usage: 'sks memory build [--json] | sks memory gc [--dry-run]', description: 'Project TriWiki context-pack memory into managed AGENTS.md blocks or run bounded memory cleanup.' },
|
|
670
672
|
{ name: 'hproof', usage: 'sks hproof check [mission-id|latest]', description: 'Evaluate the H-Proof done gate for a mission.' },
|
|
671
|
-
{ name: 'agent', usage: 'sks agent run|status|close|cleanup <mission-id|latest> [--agents N] [--work-items N] [--target-active-slots N] [--mock] [--apply|--dry-run] [--drain] [--stale-ms N] [--json] | sks agent rollback-patches [mission-id|latest] [--patch-entry-id id] [--dry-run|--apply] [--json]', description: 'Run, inspect, close, clean, or
|
|
672
|
-
{ name: '
|
|
673
|
+
{ name: 'agent', usage: 'sks agent run|status|close|cleanup <mission-id|latest> [--agents N] [--work-items N] [--target-active-slots N] [--mock] [--apply|--dry-run] [--drain] [--stale-ms N] [--json] | sks agent rollback-patches [mission-id|latest] [--patch-entry-id id] [--dry-run|--apply] [--json]', description: 'Run, inspect, close, clean, or roll back Codex subagent missions with an explicit requested-agent/thread budget, disjoint work ownership, official event evidence, and parent-owned integration.' },
|
|
674
|
+
{ name: 'naruto', usage: 'sks naruto run \"task\" [--agents N] [--max-threads N] [--json] | sks naruto status|subagents|proof [latest|M-...] [--json]', description: 'Run or inspect the Codex official subagent workflow with a Sol Max parent and fixed Luna Max mechanical, Sol High implementation, Sol Max judgment, and Terra Medium long-context/tool profiles, max_depth=1, and structured parent-thread completion evidence.' },
|
|
675
|
+
{ name: 'team', usage: 'sks team \"task\" | sks team log|tail|watch|lane|status ...', description: 'Deprecated compatibility command: new tasks redirect to Naruto; only read-only observation subcommands remain for old Team missions.' },
|
|
673
676
|
{ name: 'reasoning', usage: 'sks reasoning ["prompt"] [--json]', description: 'Show SKS temporary reasoning-effort routing: medium for simple tasks, high for logic, xhigh for research.' },
|
|
674
677
|
{ name: 'gx', usage: 'sks gx init|render|validate|drift|snapshot [name]', description: 'Create and verify deterministic SVG/HTML visual context cartridges.' },
|
|
675
678
|
{ name: 'profile', usage: 'sks profile show|set <model>', description: 'Inspect or set the current SKS model profile metadata.' },
|
|
@@ -804,10 +807,14 @@ export function looksLikeSuperSearchRequest(prompt = '') {
|
|
|
804
807
|
export function routePrompt(prompt) {
|
|
805
808
|
const text = stripVisibleDecisionAnswerBlocks(prompt);
|
|
806
809
|
const intentScores = scorePromptIntent(text);
|
|
807
|
-
const
|
|
810
|
+
const taskProfile = classifyTaskProfile(text);
|
|
811
|
+
const explicitCommand = Boolean(dollarCommand(text)) || /^\$?(?:plan|swarm)\b/i.test(text);
|
|
812
|
+
const select = (route) => withTaskProfile(withPromptIntentScores(route, intentScores), taskProfile, explicitCommand);
|
|
813
|
+
if (!explicitCommand && taskProfile === 'passthrough')
|
|
814
|
+
return null;
|
|
808
815
|
if (/^\$?plan\b/i.test(text))
|
|
809
816
|
return select(routeById('Planner'));
|
|
810
|
-
if (
|
|
817
|
+
if (/^\$work\b/i.test(text))
|
|
811
818
|
return select(routeById('Naruto'));
|
|
812
819
|
if (/^\$?swarm\b/i.test(text))
|
|
813
820
|
return select(routeById('Naruto'));
|
|
@@ -844,10 +851,18 @@ export function routePrompt(prompt) {
|
|
|
844
851
|
return select(routeById('ComputerUse'));
|
|
845
852
|
if (looksLikeTinyDirectFix(text))
|
|
846
853
|
return select(routeById('DFix'));
|
|
847
|
-
if (
|
|
854
|
+
if (looksLikeDatabaseWorkRequest(text))
|
|
848
855
|
return select(routeById('DB'));
|
|
849
856
|
if (looksLikeSuperSearchRequest(text) && !looksLikeCodeChangingWork(text))
|
|
850
857
|
return select(routeById('SuperSearch'));
|
|
858
|
+
if (taskProfile === 'answer' && !looksLikeSpecializedAnswerRouteSignal(text) && !looksLikeDirectWorkRequest(text))
|
|
859
|
+
return select(routeById('Answer'));
|
|
860
|
+
if (/\bautoresearch\b/i.test(text) && !looksLikeCodeChangingWork(text))
|
|
861
|
+
return select(routeById('AutoResearch'));
|
|
862
|
+
if (/\b(research|hypothesis|falsify|novelty|frontier)\b|조사|연구/i.test(text) && !looksLikeCodeChangingWork(text))
|
|
863
|
+
return select(routeById('Research'));
|
|
864
|
+
if (taskProfile === 'parallel-read' || taskProfile === 'parallel-write')
|
|
865
|
+
return select(routeById('Naruto'));
|
|
851
866
|
if (looksLikeQuestionShapedDirective(text))
|
|
852
867
|
return select(routeById('Naruto'));
|
|
853
868
|
if (looksLikeDirectWorkRequest(text))
|
|
@@ -876,8 +891,14 @@ export function routePrompt(prompt) {
|
|
|
876
891
|
return select(routeById('GX'));
|
|
877
892
|
if (looksLikeTeamDefaultWork(text))
|
|
878
893
|
return select(routeById('Naruto'));
|
|
894
|
+
if (taskProfile === 'answer')
|
|
895
|
+
return select(routeById('Answer'));
|
|
879
896
|
return select(routeById('SKS'));
|
|
880
897
|
}
|
|
898
|
+
function looksLikeSpecializedAnswerRouteSignal(prompt = '') {
|
|
899
|
+
const text = String(prompt || '');
|
|
900
|
+
return /\b(qa[-\s]?loop|qaloop|autoresearch|research|hypothesis|falsify|novelty|frontier|wiki|triwiki|GX|vgraph|visual context|render cartridge|wiki coordinate|rgba|trig|llm wiki|SEO|GEO|generative engine optimization)\b|조사|연구|위키|트라이위키|검색\s*엔진\s*최적화|생성형\s*엔진\s*최적화/i.test(text);
|
|
901
|
+
}
|
|
881
902
|
export function scorePromptIntent(prompt = '') {
|
|
882
903
|
const text = String(prompt || '').trim();
|
|
883
904
|
const reasons = new Set();
|
|
@@ -929,7 +950,7 @@ export function scorePromptIntent(prompt = '') {
|
|
|
929
950
|
researchScore += 2;
|
|
930
951
|
reasons.add('research');
|
|
931
952
|
}
|
|
932
|
-
if (
|
|
953
|
+
if (looksLikeDatabaseWorkRequest(text)) {
|
|
933
954
|
dbScore += 3;
|
|
934
955
|
reasons.add('db');
|
|
935
956
|
}
|
|
@@ -952,6 +973,11 @@ function withPromptIntentScores(route, intentScores) {
|
|
|
952
973
|
return route;
|
|
953
974
|
return { ...route, intent_scores: intentScores };
|
|
954
975
|
}
|
|
976
|
+
function withTaskProfile(route, taskProfile, explicitInvocation = false) {
|
|
977
|
+
if (!route)
|
|
978
|
+
return route;
|
|
979
|
+
return { ...route, task_profile: taskProfile, explicit_invocation: explicitInvocation };
|
|
980
|
+
}
|
|
955
981
|
export function looksLikeComputerUseFastLane(prompt = '') {
|
|
956
982
|
const text = String(prompt || '');
|
|
957
983
|
const computerUseCue = /\b(computer\s*use|codex\s+computer\s+use|computer-use)\b|컴퓨터\s*유즈|컴퓨터\s*사용|컴퓨터유즈/i.test(text);
|
|
@@ -1000,6 +1026,8 @@ export function looksLikeDirectWorkRequest(prompt = '') {
|
|
|
1000
1026
|
const text = String(prompt || '');
|
|
1001
1027
|
if (/(?:설명만|설명\s*만|just\s+explain|explain\s+only|only\s+explain)/i.test(text))
|
|
1002
1028
|
return false;
|
|
1029
|
+
if (looksLikePureExplanationRequest(text))
|
|
1030
|
+
return false;
|
|
1003
1031
|
const explicitDirective = looksLikeExplicitDirectWorkDirective(text);
|
|
1004
1032
|
if (looksLikeDirectFixQuestion(text) && !explicitDirective)
|
|
1005
1033
|
return false;
|
|
@@ -1013,6 +1041,14 @@ export function looksLikeDirectWorkRequest(prompt = '') {
|
|
|
1013
1041
|
|| /(작업|파이프라인|구현|수정|변경|추가|적용|반영|처리|수행|검수|설치|해결|리드미|README).*(해줘|해달|해라|해야|되게|줘야|줘야지|달라)/i.test(text)
|
|
1014
1042
|
|| /(진행해|수행해|작업해|처리해|적용해|반영해|검수해|고쳐줘|바꿔줘|해결해줘|만들어줘|해줘야|해줘야지|해달라|해야지|되게 해|install|run|execute|test|deploy|commit|push)/i.test(text);
|
|
1015
1043
|
}
|
|
1044
|
+
function looksLikePureExplanationRequest(prompt = '') {
|
|
1045
|
+
const text = String(prompt || '').trim();
|
|
1046
|
+
const explanationEnding = /(?:설명|알려)\s*(?:해\s*줘|해\s*주세요|해달라|줘)\s*[.!?]*$/i.test(text)
|
|
1047
|
+
|| /^(?:can|could|would) you explain\b/i.test(text);
|
|
1048
|
+
if (!explanationEnding)
|
|
1049
|
+
return false;
|
|
1050
|
+
return !/\b(fix|implement|change|edit|add|remove|delete|modify|refactor|build|create|write|update|rename|rewrite|patch|apply|execute|repair|resolve|publish|release|deploy|migrate)\b|고쳐|수정|변경|추가|삭제|구현|리팩터|작성|생성|업데이트|적용|실행|해결|배포|출시|마이그레이션/i.test(text);
|
|
1051
|
+
}
|
|
1016
1052
|
function looksLikeConditionalWorkRequest(prompt = '') {
|
|
1017
1053
|
const text = String(prompt || '').trim();
|
|
1018
1054
|
if (!text)
|
|
@@ -1034,6 +1070,7 @@ function looksLikeExplicitDirectWorkDirective(prompt = '') {
|
|
|
1034
1070
|
return false;
|
|
1035
1071
|
const koreanDirective = /(해\s*줘|해\s*주세요|해달|달라|진행해|수행해|작업해|처리해|적용해|반영해|검수해|고쳐줘|수정해줘|변경해줘|바꿔줘|해결해줘|만들어줘|준비해줘|완료해줘|배포\s*준비|릴리즈\s*준비|다음\s*버전)/i.test(text);
|
|
1036
1072
|
const englishDirective = /\b(?:please\s+)?(?:fix|repair|resolve|solve|implement|patch|update|change|modify|prepare|ship|release|publish|deploy)\b[\s\S]{0,180}\b(?:for\s+me|now|release|deployment|publish|next\s+version|ship|deploy|prepare)\b/i.test(text)
|
|
1073
|
+
|| /^(?:please\s+)?work\s+on\b/i.test(text)
|
|
1037
1074
|
|| /\b(?:prepare|make)\b[\s\S]{0,120}\b(?:next\s+version|release|deployment|publish|ship)\b/i.test(text)
|
|
1038
1075
|
|| /\b(?:fix|repair|resolve|solve|implement|patch|update|change|modify)\b[\s\S]{0,180}\b(?:prepare|ship|release|publish|deploy)\b/i.test(text);
|
|
1039
1076
|
return koreanDirective || englishDirective;
|
|
@@ -1047,34 +1084,80 @@ export function routeNeedsContext7(route, prompt = '') {
|
|
|
1047
1084
|
return false;
|
|
1048
1085
|
return /\b(package|library|framework|SDK|API|MCP|Supabase|React|Next|Vue|Svelte|Vite|Prisma|Drizzle|Knex|Postgres|npm|node_modules|docs?|documentation)\b/i.test(String(prompt || ''));
|
|
1049
1086
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1087
|
+
const NARUTO_GATE_BYPASS_ROUTE_IDS = new Set([
|
|
1088
|
+
'Answer',
|
|
1089
|
+
'DFix',
|
|
1090
|
+
'Help',
|
|
1091
|
+
'Wiki',
|
|
1092
|
+
'ComputerUse',
|
|
1093
|
+
'Goal',
|
|
1094
|
+
'Commit',
|
|
1095
|
+
'CommitAndPush',
|
|
1096
|
+
'FastMode',
|
|
1097
|
+
'LocalModel',
|
|
1098
|
+
'Planner'
|
|
1099
|
+
]);
|
|
1100
|
+
const NARUTO_GATE_ROUTE_OWNED_IDS = new Set([
|
|
1101
|
+
'Research',
|
|
1102
|
+
'AutoResearch',
|
|
1103
|
+
'QALoop'
|
|
1104
|
+
]);
|
|
1105
|
+
const NARUTO_GATE_SPECIALIZED_PARALLEL_ROUTE_IDS = new Set([
|
|
1106
|
+
'Review',
|
|
1107
|
+
'ReleaseReview',
|
|
1108
|
+
'PPT',
|
|
1109
|
+
'ImageUXReview',
|
|
1110
|
+
'SuperSearch',
|
|
1111
|
+
'SEOGEOOptimizer',
|
|
1112
|
+
'DB',
|
|
1113
|
+
'MadDB',
|
|
1114
|
+
'MadSKS',
|
|
1115
|
+
'GX'
|
|
1116
|
+
]);
|
|
1117
|
+
export function narutoDecisionForRoute(route, prompt = '', profile = classifyTaskProfile(prompt)) {
|
|
1118
|
+
const routeId = route?.id ? String(route.id) : null;
|
|
1119
|
+
if (!routeId) {
|
|
1120
|
+
return narutoRouteDecision('none', null, profile, 'no_route_or_task_context', true);
|
|
1121
|
+
}
|
|
1122
|
+
if (NARUTO_GATE_ROUTE_OWNED_IDS.has(routeId)) {
|
|
1123
|
+
// These routes already own their orchestration lifecycle. The common
|
|
1124
|
+
// Naruto gate records that fact but must not add a second generic fanout.
|
|
1125
|
+
return narutoRouteDecision('route_owned', routeId, profile, `route_owned_orchestration:${routeId}`, false);
|
|
1126
|
+
}
|
|
1127
|
+
if (NARUTO_GATE_BYPASS_ROUTE_IDS.has(routeId)) {
|
|
1128
|
+
return narutoRouteDecision('none', routeId, profile, `lightweight_route_bypass:${routeId}`, true);
|
|
1129
|
+
}
|
|
1130
|
+
if ((routeId === 'Team' || routeId === 'Naruto') && route.explicit_invocation !== false) {
|
|
1131
|
+
return narutoRouteDecision('generic_naruto', routeId, profile, 'explicit_official_subagent_route', false);
|
|
1132
|
+
}
|
|
1133
|
+
if (/(?:^|\s)--(?:agents|clones)(?:=|\s+)\d+\b/i.test(String(prompt || ''))) {
|
|
1134
|
+
return narutoRouteDecision('generic_naruto', routeId, profile, 'explicit_subagent_count', false);
|
|
1135
|
+
}
|
|
1136
|
+
if (NARUTO_GATE_SPECIALIZED_PARALLEL_ROUTE_IDS.has(routeId)) {
|
|
1137
|
+
return narutoRouteDecision('generic_naruto', routeId, profile, `specialized_route_default_parallel:${routeId}`, false);
|
|
1138
|
+
}
|
|
1139
|
+
if (profile === 'passthrough' || profile === 'answer' || profile === 'tiny-change') {
|
|
1140
|
+
return narutoRouteDecision('none', routeId, profile, `task_profile_${profile}_bypass`, true);
|
|
1141
|
+
}
|
|
1142
|
+
if (profile === 'bounded-work' || profile === 'parallel-read' || profile === 'parallel-write' || profile === 'high-risk') {
|
|
1143
|
+
return narutoRouteDecision('generic_naruto', routeId, profile, `task_profile_${profile}_default_parallel`, false);
|
|
1144
|
+
}
|
|
1145
|
+
return narutoRouteDecision('none', routeId, profile, `task_profile_${profile}_bypass`, true);
|
|
1146
|
+
}
|
|
1147
|
+
export function routeRequiresSubagents(route, prompt = '', profile = classifyTaskProfile(prompt)) {
|
|
1148
|
+
return narutoDecisionForRoute(route, prompt, profile).mode === 'generic_naruto';
|
|
1149
|
+
}
|
|
1150
|
+
function narutoRouteDecision(mode, routeId, profile, reason, trivial) {
|
|
1151
|
+
const required = mode === 'generic_naruto';
|
|
1152
|
+
return {
|
|
1153
|
+
mode,
|
|
1154
|
+
required,
|
|
1155
|
+
route_id: routeId,
|
|
1156
|
+
task_profile: profile,
|
|
1157
|
+
reason,
|
|
1158
|
+
trivial,
|
|
1159
|
+
default_parallel: required
|
|
1160
|
+
};
|
|
1078
1161
|
}
|
|
1079
1162
|
export function simpleGitOnlyRouteId(prompt = '') {
|
|
1080
1163
|
const text = stripVisibleDecisionAnswerBlocks(String(prompt || '')).trim();
|
|
@@ -1115,23 +1198,22 @@ export function subagentExecutionPolicyText(route, prompt = '') {
|
|
|
1115
1198
|
const required = routeRequiresSubagents(route, prompt);
|
|
1116
1199
|
if (route?.id === 'Goal') {
|
|
1117
1200
|
if (!required)
|
|
1118
|
-
return '
|
|
1201
|
+
return 'Subagent policy: Goal is a lightweight native /goal persistence overlay; a subagent workflow is not required for bridge creation or control.';
|
|
1119
1202
|
return [
|
|
1120
|
-
'
|
|
1121
|
-
'Because the prompt also
|
|
1203
|
+
'Subagent policy: Goal remains a lightweight native /goal persistence overlay.',
|
|
1204
|
+
'Because the prompt also requests explicitly parallel execution, continue through the selected SKS execution route and use that route\'s Codex subagent workflow.',
|
|
1122
1205
|
noUnrequestedFallbackCodePolicyText()
|
|
1123
1206
|
].join(' ');
|
|
1124
1207
|
}
|
|
1125
1208
|
if (!required) {
|
|
1126
|
-
return '
|
|
1209
|
+
return 'Subagent policy: not required for this task profile. Keep the work parent-owned unless a later, concrete decomposition reveals independent slices.';
|
|
1127
1210
|
}
|
|
1128
1211
|
return [
|
|
1129
|
-
'
|
|
1130
|
-
'The
|
|
1131
|
-
'
|
|
1132
|
-
'
|
|
1133
|
-
'
|
|
1134
|
-
'If native sessions are unavailable or the work cannot be safely split, record explicit unavailable/unsplittable native-session evidence before editing.',
|
|
1212
|
+
'Codex subagent workflow: required for this explicit Naruto or parallel task.',
|
|
1213
|
+
'The parent agent owns decomposition, integration, scoped verification, and the final answer.',
|
|
1214
|
+
'Delegate only genuinely independent slices. Use Luna Max only for tiny short-context mechanical work, Sol High for ordinary implementation, Sol Max for review/debug/planning/architecture/integration/risk judgment, and Terra Medium for long-context or Computer Use, Browser/Chrome, and image-generation execution.',
|
|
1215
|
+
'Parallel writes require disjoint paths; serialize overlapping paths, prohibit nested delegation, avoid duplicate work, wait for all requested agent threads, and close completed threads after collecting results.',
|
|
1216
|
+
'Completion evidence comes from official SubagentStart/SubagentStop events plus the parent integration summary, not process counts or PID evidence.',
|
|
1135
1217
|
noUnrequestedFallbackCodePolicyText()
|
|
1136
1218
|
].join(' ');
|
|
1137
1219
|
}
|
|
@@ -1162,10 +1244,8 @@ export function routeReasoning(route, prompt = '') {
|
|
|
1162
1244
|
return reasoning('low', 'route_policy_low');
|
|
1163
1245
|
return reasoning('medium', 'simple_fulfillment');
|
|
1164
1246
|
}
|
|
1165
|
-
function narutoRouteReasoning(
|
|
1166
|
-
|
|
1167
|
-
return reasoning('max', 'naruto_complex_or_high_risk_signal');
|
|
1168
|
-
return reasoning('xhigh', 'naruto_gpt56_baseline');
|
|
1247
|
+
function narutoRouteReasoning(_text = '') {
|
|
1248
|
+
return reasoning('max', 'naruto_parent_sol_max');
|
|
1169
1249
|
}
|
|
1170
1250
|
export function reasoningProfileName(effort) {
|
|
1171
1251
|
if (effort === 'low')
|