sneakoscope 0.7.6 → 0.7.13
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 +31 -27
- package/package.json +2 -2
- package/src/cli/context7-command.mjs +163 -0
- package/src/cli/install-helpers.mjs +325 -0
- package/src/cli/main.mjs +245 -509
- package/src/cli/maintenance-commands.mjs +31 -31
- package/src/core/artifact-schemas.mjs +6 -6
- package/src/core/codex-app.mjs +1 -1
- package/src/core/db-safety.mjs +1 -1
- package/src/core/evaluation.mjs +3 -3
- package/src/core/fsx.mjs +1 -1
- package/src/core/init.mjs +20 -14
- package/src/core/pipeline.mjs +14 -3
- package/src/core/ppt.mjs +694 -0
- package/src/core/questions.mjs +51 -7
- package/src/core/routes.mjs +60 -10
- package/src/core/team-live.mjs +8 -8
- package/src/core/tmux-ui.mjs +447 -0
- package/src/core/warp-ui.mjs +0 -557
|
@@ -29,7 +29,7 @@ import { PIPELINE_PLAN_ARTIFACT, validatePipelinePlan, writePipelinePlan } from
|
|
|
29
29
|
import { GOAL_BRIDGE_ARTIFACT, GOAL_WORKFLOW_ARTIFACT, updateGoalWorkflow, writeGoalWorkflow } from '../core/goal-workflow.mjs';
|
|
30
30
|
import { scanCodeStructure, writeCodeStructureReport } from '../core/code-structure.mjs';
|
|
31
31
|
import { writeMemorySweepReport } from '../core/memory-governor.mjs';
|
|
32
|
-
import {
|
|
32
|
+
import { cleanupTmuxTeamView, launchTmuxTeamView } from '../core/tmux-ui.mjs';
|
|
33
33
|
import { loadSkillDreamState, recordSkillDreamEvent, runSkillDream, writeSkillForgeReport } from '../core/skill-forge.mjs';
|
|
34
34
|
import { writeMistakeMemoryReport } from '../core/mistake-memory.mjs';
|
|
35
35
|
import { checkDbOperation, checkSqlFile, classifyCommand, classifySql, loadDbSafetyPolicy, safeSupabaseMcpConfig, scanDbSafety } from '../core/db-safety.mjs';
|
|
@@ -56,8 +56,8 @@ Use outside a project:
|
|
|
56
56
|
sks deps check
|
|
57
57
|
sks team "global mission"
|
|
58
58
|
|
|
59
|
-
If
|
|
60
|
-
sks deps install
|
|
59
|
+
If tmux is missing:
|
|
60
|
+
sks deps install tmux
|
|
61
61
|
|
|
62
62
|
Initialize this project for CLI and Codex App:
|
|
63
63
|
sks setup --bootstrap
|
|
@@ -70,7 +70,7 @@ Open from terminal:
|
|
|
70
70
|
Verify:
|
|
71
71
|
sks deps check
|
|
72
72
|
sks codex-app check
|
|
73
|
-
sks
|
|
73
|
+
sks tmux check
|
|
74
74
|
sks auto-review status
|
|
75
75
|
sks doctor --fix
|
|
76
76
|
sks context7 check
|
|
@@ -640,7 +640,7 @@ export async function harnessCommand(sub, args = []) {
|
|
|
640
640
|
if (flag(args, '--json')) return console.log(JSON.stringify(report, null, 2));
|
|
641
641
|
console.log('SKS Harness Growth');
|
|
642
642
|
console.log(`Forgetting fixture: ${report.forgetting.fixture.passed ? 'pass' : 'fail'}`);
|
|
643
|
-
console.log(`
|
|
643
|
+
console.log(`tmux views: ${report.tmux.views.length}`);
|
|
644
644
|
console.log(`Tool taxonomy: ${report.reliability.tool_error_taxonomy.join(', ')}`);
|
|
645
645
|
console.log(`Unknown errors recorded as bugs: ${report.reliability.unknown_errors_are_bugs ? 'yes' : 'no'}`);
|
|
646
646
|
}
|
|
@@ -1172,7 +1172,7 @@ function userRequestSignal(prompt = '') {
|
|
|
1172
1172
|
const topicRules = [
|
|
1173
1173
|
['ambiguity-questions', /모호|ambiguity|clarification|질문|답변|answers?\.json|decision-contract|추론|예측/],
|
|
1174
1174
|
['triwiki-priority-memory', /triwiki|wiki|메모리|memory|기억|우선|반복|자주|카운팅|count|frequency|weight/],
|
|
1175
|
-
['install-bootstrap', /bootstrap|postinstall|doctor|deps|
|
|
1175
|
+
['install-bootstrap', /bootstrap|postinstall|doctor|deps|tmux|homebrew|최초\s*설치|셋업|setup/],
|
|
1176
1176
|
['version-release', /버전|version|publish:dry|release|npm\s+pack/],
|
|
1177
1177
|
['qa-loop', /qa|e2e|검증|리포트|report/],
|
|
1178
1178
|
['team-pipeline', /team|subagent|세션|cleanup|reflection|회고|반성/],
|
|
@@ -1416,15 +1416,15 @@ export async function gxCommand(sub, args) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
|
|
1418
1418
|
export async function team(args) {
|
|
1419
|
-
const teamSubcommands = new Set(['log', 'tail', 'watch', 'lane', 'status', 'dashboard', 'event', 'message', 'cleanup-
|
|
1419
|
+
const teamSubcommands = new Set(['log', 'tail', 'watch', 'lane', 'status', 'dashboard', 'event', 'message', 'cleanup-tmux']);
|
|
1420
1420
|
if (teamSubcommands.has(args[0])) return teamCommand(args[0], args.slice(1));
|
|
1421
|
-
const
|
|
1422
|
-
const cleanCreateArgs = args.filter((arg) => !['--open-
|
|
1421
|
+
const openTmux = flag(args, '--open-tmux') || flag(args, '--tmux-open');
|
|
1422
|
+
const cleanCreateArgs = args.filter((arg) => !['--open-tmux', '--tmux-open'].includes(String(arg)));
|
|
1423
1423
|
const opts = parseTeamCreateArgs(cleanCreateArgs);
|
|
1424
1424
|
const { prompt, agentSessions, roleCounts, roster } = opts;
|
|
1425
1425
|
if (!prompt) {
|
|
1426
|
-
console.error('Usage: sks team "task" [executor:5 reviewer:2 user:1] [--agents N] [--open-
|
|
1427
|
-
console.error(' sks team log|tail|watch|lane|status|message|cleanup-
|
|
1426
|
+
console.error('Usage: sks team "task" [executor:5 reviewer:2 user:1] [--agents N] [--open-tmux] [--json]');
|
|
1427
|
+
console.error(' sks team log|tail|watch|lane|status|message|cleanup-tmux [mission-id|latest]');
|
|
1428
1428
|
console.error(' sks team event [mission-id|latest] --agent <name> --phase <phase> --message "..."');
|
|
1429
1429
|
console.error(' sks team message [mission-id|latest] --from <agent> --to <agent|all> --message "..."');
|
|
1430
1430
|
process.exitCode = 1;
|
|
@@ -1490,7 +1490,7 @@ export async function team(args) {
|
|
|
1490
1490
|
questions: path.join(dir, 'questions.md'),
|
|
1491
1491
|
codex_agents: ['analysis_scout', 'team_consensus', 'implementation_worker', 'db_safety_reviewer', 'qa_reviewer']
|
|
1492
1492
|
};
|
|
1493
|
-
result.
|
|
1493
|
+
result.tmux = await launchTmuxTeamView({ root, missionId: id, plan, promptFile: result.workflow, json: flag(args, '--json') || !openTmux });
|
|
1494
1494
|
if (flag(args, '--json')) return console.log(JSON.stringify(result, null, 2));
|
|
1495
1495
|
console.log(`Team mission created: ${id}`);
|
|
1496
1496
|
console.log(`Plan: ${path.relative(root, result.plan)}`);
|
|
@@ -1501,13 +1501,13 @@ export async function team(args) {
|
|
|
1501
1501
|
console.log(`Runtime graph: ${path.relative(root, result.team_graph)}`);
|
|
1502
1502
|
console.log(`Worker inbox: ${path.relative(root, result.worker_inbox_dir)}`);
|
|
1503
1503
|
console.log(`Live: ${path.relative(root, result.live)}`);
|
|
1504
|
-
if (result.
|
|
1505
|
-
const
|
|
1506
|
-
console.log(`
|
|
1504
|
+
if (result.tmux.ready) {
|
|
1505
|
+
const tmuxState = result.tmux.created ? 'opened' : 'not opened; use --open-tmux for a tmux session';
|
|
1506
|
+
console.log(`tmux: ${tmuxState} ${result.tmux.opened_lane_count || result.tmux.agents.length} agent lane(s) in ${result.tmux.session || result.tmux.workspace}`);
|
|
1507
1507
|
}
|
|
1508
|
-
else console.log(`
|
|
1508
|
+
else console.log(`tmux: blocked (${Array.from(new Set(result.tmux.blockers || [])).join('; ')})`);
|
|
1509
1509
|
console.log(`Watch: sks team watch ${id}`);
|
|
1510
|
-
console.log('Use $Team in Codex App or the
|
|
1510
|
+
console.log('Use $Team in Codex App or the tmux launch view from this CLI flow to run scouts, debate/consensus, runtime graph/inbox handoff, then a fresh implementation team with disjoint ownership.');
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
1513
|
export function parseTeamCreateArgs(args) {
|
|
@@ -1654,7 +1654,7 @@ export function buildTeamPlan(id, prompt, opts = {}) {
|
|
|
1654
1654
|
markdown: 'team-live.md',
|
|
1655
1655
|
transcript: 'team-transcript.jsonl',
|
|
1656
1656
|
dashboard: 'team-dashboard.json',
|
|
1657
|
-
|
|
1657
|
+
tmux: 'sks team opens a tmux workspace with one live multi-line lane per visible Team agent budget when tmux is available.',
|
|
1658
1658
|
commands: [
|
|
1659
1659
|
'sks team status <mission-id>',
|
|
1660
1660
|
'sks team log <mission-id>',
|
|
@@ -1663,7 +1663,7 @@ export function buildTeamPlan(id, prompt, opts = {}) {
|
|
|
1663
1663
|
'sks team lane <mission-id> --agent <name> --follow',
|
|
1664
1664
|
'sks team event <mission-id> --agent <name> --phase <phase> --message "..."',
|
|
1665
1665
|
'sks team message <mission-id> --from <agent> --to <agent|all> --message "..."',
|
|
1666
|
-
'sks team cleanup-
|
|
1666
|
+
'sks team cleanup-tmux <mission-id>'
|
|
1667
1667
|
]
|
|
1668
1668
|
},
|
|
1669
1669
|
required_artifacts: requiredArtifacts,
|
|
@@ -1774,19 +1774,19 @@ async function teamCommand(sub, args) {
|
|
|
1774
1774
|
artifact: readFlagValue(args, '--artifact', ''),
|
|
1775
1775
|
message
|
|
1776
1776
|
});
|
|
1777
|
-
const
|
|
1777
|
+
const tmuxCleanup = /^session_cleanup$|^team_cleanup$|^cleanup$/i.test(String(phase || ''))
|
|
1778
1778
|
? await requestTeamSessionCleanup(dir, {
|
|
1779
1779
|
missionId: id,
|
|
1780
1780
|
agent: readFlagValue(args, '--agent', 'parent_orchestrator'),
|
|
1781
1781
|
reason: message,
|
|
1782
|
-
finalMessage: 'Team cleanup event received. Follow panes may stop;
|
|
1783
|
-
}).then(() =>
|
|
1782
|
+
finalMessage: 'Team cleanup event received. Follow panes may stop; tmux panes remain user-controlled.'
|
|
1783
|
+
}).then(() => cleanupTmuxTeamView({ root, missionId: id, closeSession: flag(args, '--close-session') || flag(args, '--close') })).catch((err) => ({ ok: false, reason: err.message || 'tmux cleanup failed' }))
|
|
1784
1784
|
: null;
|
|
1785
1785
|
if (flag(args, '--json')) return console.log(JSON.stringify(record, null, 2));
|
|
1786
1786
|
console.log(`${record.ts} [${record.phase}] ${record.agent}: ${record.message}`);
|
|
1787
|
-
if (
|
|
1788
|
-
if (
|
|
1789
|
-
else console.log(`
|
|
1787
|
+
if (tmuxCleanup) {
|
|
1788
|
+
if (tmuxCleanup.ok) console.log(`tmux cleanup: marked complete (${tmuxCleanup.reason || 'record updated'})`);
|
|
1789
|
+
else console.log(`tmux cleanup: skipped (${tmuxCleanup.reason || 'not available'})`);
|
|
1790
1790
|
}
|
|
1791
1791
|
return;
|
|
1792
1792
|
}
|
|
@@ -1810,12 +1810,12 @@ async function teamCommand(sub, args) {
|
|
|
1810
1810
|
console.log(`${record.ts} [${record.phase}] ${record.agent} -> ${record.to}: ${record.message}`);
|
|
1811
1811
|
return;
|
|
1812
1812
|
}
|
|
1813
|
-
if (sub === 'cleanup-
|
|
1813
|
+
if (sub === 'cleanup-tmux') {
|
|
1814
1814
|
const control = await requestTeamSessionCleanup(dir, {
|
|
1815
1815
|
missionId: id,
|
|
1816
1816
|
agent: readFlagValue(args, '--agent', 'parent_orchestrator'),
|
|
1817
1817
|
reason: readFlagValue(args, '--reason', 'Team session ended; clean up live follow panes.'),
|
|
1818
|
-
finalMessage: 'Team session ended. Lane/watch follow loops will stop after showing this cleanup summary;
|
|
1818
|
+
finalMessage: 'Team session ended. Lane/watch follow loops will stop after showing this cleanup summary; tmux panes remain user-controlled.'
|
|
1819
1819
|
});
|
|
1820
1820
|
await appendTeamEvent(dir, {
|
|
1821
1821
|
agent: readFlagValue(args, '--agent', 'parent_orchestrator'),
|
|
@@ -1823,16 +1823,16 @@ async function teamCommand(sub, args) {
|
|
|
1823
1823
|
type: 'cleanup',
|
|
1824
1824
|
message: control.cleanup_reason || 'Team session cleanup requested.'
|
|
1825
1825
|
});
|
|
1826
|
-
const cleanup = await
|
|
1826
|
+
const cleanup = await cleanupTmuxTeamView({ root, missionId: id, closeSession: flag(args, '--close-session') || flag(args, '--close') });
|
|
1827
1827
|
cleanup.control = control;
|
|
1828
1828
|
if (flag(args, '--json')) return console.log(JSON.stringify(cleanup, null, 2));
|
|
1829
1829
|
if (!cleanup.ok) {
|
|
1830
|
-
console.error(`
|
|
1830
|
+
console.error(`tmux cleanup skipped: ${cleanup.reason || 'not available'}`);
|
|
1831
1831
|
process.exitCode = cleanup.skipped ? 0 : 2;
|
|
1832
1832
|
return;
|
|
1833
1833
|
}
|
|
1834
|
-
if (cleanup.
|
|
1835
|
-
else console.log(`
|
|
1834
|
+
if (cleanup.killed_session) console.log(`tmux cleanup: killed session ${cleanup.session}`);
|
|
1835
|
+
else console.log(`tmux cleanup: marked complete (${cleanup.reason || 'record updated'})`);
|
|
1836
1836
|
console.log(renderTeamCleanupSummary(control));
|
|
1837
1837
|
return;
|
|
1838
1838
|
}
|
|
@@ -20,7 +20,7 @@ export const ARTIFACT_FILES = {
|
|
|
20
20
|
harness_growth_report: 'harness-growth-report.json',
|
|
21
21
|
code_structure_report: 'code-structure-report.json',
|
|
22
22
|
team_dashboard_state: 'team-dashboard-state.json',
|
|
23
|
-
|
|
23
|
+
tmux_pane_plan: 'tmux-pane-plan.json',
|
|
24
24
|
final_honest_mode_report: 'final-honest-mode-report.json'
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -170,12 +170,12 @@ export function validateHarnessGrowthReport(data = {}) {
|
|
|
170
170
|
pushMissing(errors, isObj(data.skills), 'skills_missing');
|
|
171
171
|
pushMissing(errors, isObj(data.experiments), 'experiments_missing');
|
|
172
172
|
pushMissing(errors, isObj(data.codex_native), 'codex_native_missing');
|
|
173
|
-
pushMissing(errors, isObj(data.
|
|
173
|
+
pushMissing(errors, isObj(data.tmux), 'tmux_missing');
|
|
174
174
|
pushMissing(errors, isObj(data.reliability), 'reliability_missing');
|
|
175
175
|
if (data.forgetting?.fixture?.passed !== true) errors.push('forgetting_fixture_failed');
|
|
176
176
|
if (!Array.isArray(data.reliability?.tool_error_taxonomy) || !data.reliability.tool_error_taxonomy.includes('Unknown')) errors.push('tool_error_taxonomy_missing_unknown');
|
|
177
177
|
if (data.reliability?.unknown_errors_are_bugs !== true) errors.push('unknown_errors_not_marked_bug');
|
|
178
|
-
if (!Array.isArray(data.
|
|
178
|
+
if (!Array.isArray(data.tmux?.views) || data.tmux.views.length < 10) errors.push('tmux_views_incomplete');
|
|
179
179
|
return validationResult('HarnessGrowthReport', errors);
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -202,12 +202,12 @@ export function validateTeamDashboardState(data = {}) {
|
|
|
202
202
|
return validationResult('TeamDashboardState', errors);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
export function
|
|
205
|
+
export function validateTmuxPanePlan(data = {}) {
|
|
206
206
|
const errors = [];
|
|
207
207
|
pushMissing(errors, nonEmpty(data.mission_id), 'mission_id_missing');
|
|
208
208
|
pushMissing(errors, Array.isArray(data.panes), 'panes_not_array');
|
|
209
209
|
if (arr(data.panes).some((pane) => !nonEmpty(pane.name) || !nonEmpty(pane.command))) errors.push('pane_missing_name_or_command');
|
|
210
|
-
return validationResult('
|
|
210
|
+
return validationResult('TmuxPanePlan', errors);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
export function validateFinalHonestModeReport(data = {}) {
|
|
@@ -233,7 +233,7 @@ export const ARTIFACT_VALIDATORS = {
|
|
|
233
233
|
harness_growth_report: validateHarnessGrowthReport,
|
|
234
234
|
code_structure_report: validateCodeStructureReport,
|
|
235
235
|
team_dashboard_state: validateTeamDashboardState,
|
|
236
|
-
|
|
236
|
+
tmux_pane_plan: validateTmuxPanePlan,
|
|
237
237
|
final_honest_mode_report: validateFinalHonestModeReport
|
|
238
238
|
};
|
|
239
239
|
|
package/src/core/codex-app.mjs
CHANGED
|
@@ -118,7 +118,7 @@ export async function codexAppIntegrationStatus(opts = {}) {
|
|
|
118
118
|
export function codexAppGuidance({ appInstalled, codex, mcpList, computerUseReady, browserUseReady }) {
|
|
119
119
|
const lines = [];
|
|
120
120
|
if (!appInstalled) {
|
|
121
|
-
lines.push('Install and open Codex App for first-party MCP/plugin tools. SKS
|
|
121
|
+
lines.push('Install and open Codex App for first-party MCP/plugin tools. SKS tmux launch can still run with Codex CLI alone, but Codex Computer Use evidence will be unavailable until Codex App is ready.');
|
|
122
122
|
lines.push(`Docs: ${CODEX_APP_DOCS_URL}`);
|
|
123
123
|
}
|
|
124
124
|
if (!codex?.bin) lines.push('Install Codex CLI too: npm i -g @openai/codex, or set SKS_CODEX_BIN.');
|
package/src/core/db-safety.mjs
CHANGED
|
@@ -198,7 +198,7 @@ export function classifyToolPayload(payload = {}) {
|
|
|
198
198
|
const sqlClass = classifySql(combined);
|
|
199
199
|
const commandClass = classifyCommand(strings.find((s) => /\b(supabase|psql|prisma|drizzle|knex|sequelize)\b/i.test(s)) || '');
|
|
200
200
|
const toolReasons = [];
|
|
201
|
-
if (/supabase|postgres|database|execute_sql|apply_migration|
|
|
201
|
+
if (/supabase|postgres|database|execute_sql|apply_migration|sql_query|db_|_db\b|migration/.test(toolName)) toolReasons.push('database_tool');
|
|
202
202
|
if (/delete_project|pause_project|restore_project|delete_branch|reset_branch|merge_branch/.test(toolName)) toolReasons.push('dangerous_supabase_management_tool');
|
|
203
203
|
let level = 'none';
|
|
204
204
|
for (const candidate of [sqlClass.level, commandClass.level]) {
|
package/src/core/evaluation.mjs
CHANGED
|
@@ -82,7 +82,7 @@ export const DEFAULT_MULTIAGENT_V2 = Object.freeze({
|
|
|
82
82
|
subagent_output: 'structured_summary_only'
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
export const
|
|
85
|
+
export const TMUX_COCKPIT_VIEWS = Object.freeze([
|
|
86
86
|
'Mission / Goal View',
|
|
87
87
|
'Agent Grid View',
|
|
88
88
|
'MultiAgentV2 Graph View',
|
|
@@ -287,8 +287,8 @@ export function harnessGrowthReport(input = {}) {
|
|
|
287
287
|
goal_checkpoint_required_fields: ['goal_id', 'phase', 'summary', 'completed_checkboxes', 'open_checkboxes', 'blockers', 'evidence'],
|
|
288
288
|
external_session_import: 'structured_summary_only_with_utility_score_and_forgetting_metadata'
|
|
289
289
|
},
|
|
290
|
-
|
|
291
|
-
views:
|
|
290
|
+
tmux: {
|
|
291
|
+
views: TMUX_COCKPIT_VIEWS,
|
|
292
292
|
status_terms: ['idle', 'planning', 'exploring', 'implementing', 'waiting_for_tool', 'waiting_for_approval', 'dogfooding', 'verifying', 'summarizing', 'blocked', 'failed', 'completed', 'paused', 'resuming']
|
|
293
293
|
},
|
|
294
294
|
reliability: {
|
package/src/core/fsx.mjs
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
|
|
|
8
|
-
export const PACKAGE_VERSION = '0.7.
|
|
8
|
+
export const PACKAGE_VERSION = '0.7.13';
|
|
9
9
|
export const DEFAULT_PROCESS_TAIL_BYTES = 256 * 1024;
|
|
10
10
|
export const DEFAULT_PROCESS_TIMEOUT_MS = 30 * 60 * 1000;
|
|
11
11
|
|
package/src/core/init.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { DEFAULT_DB_SAFETY_POLICY } from './db-safety.mjs';
|
|
|
6
6
|
import { isHarnessSourceProject, writeHarnessGuardPolicy } from './harness-guard.mjs';
|
|
7
7
|
import { repairSksGeneratedArtifacts } from './harness-conflicts.mjs';
|
|
8
8
|
import { installVersionGitHook } from './version-manager.mjs';
|
|
9
|
-
import { CODEX_COMPUTER_USE_ONLY_POLICY, 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, RECOMMENDED_MCP_SERVERS, RECOMMENDED_SKILLS, chatCaptureIntakeText, context7ConfigToml, outcomeRubricPolicyText, speedLanePolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.mjs';
|
|
9
|
+
import { CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_ONLY_POLICY, 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, RECOMMENDED_DESIGN_REFERENCES, RECOMMENDED_MCP_SERVERS, RECOMMENDED_SKILLS, chatCaptureIntakeText, context7ConfigToml, getdesignReferencePolicyText, outcomeRubricPolicyText, speedLanePolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.mjs';
|
|
10
10
|
import { SKILL_DREAM_POLICY, skillDreamPolicyText } from './skill-forge.mjs';
|
|
11
11
|
|
|
12
12
|
const REFLECTION_MEMORY_PATH = '.sneakoscope/memory/q2_facts/post-route-reflection.md';
|
|
@@ -91,7 +91,7 @@ function isSksManagedHook(hook) {
|
|
|
91
91
|
return hook.type === 'command' && /\bhook\s+(?:user-prompt-submit|pre-tool|post-tool|permission-request|stop)\b/.test(command) && /\b(?:sks|sneakoscope|sks\.mjs)\b/.test(command);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const AGENTS_BLOCK = "\n# Sneakoscope Codex Managed Rules\n\nThis repository uses Sneakoscope Codex.\n\n## Core Rules\n\n- Codex native `/goal` workflows are the persisted continuation surface; Ralph is removed from the user-facing SKS surface.\n- Keep runtime state bounded: raw logs go to files, prompts get tails/summaries, and `sks gc` may prune stale artifacts.\n- Before substantive work, SKS checks npm for a newer package. If newer, ask update-now vs skip-for-this-conversation.\n- Versioning is managed by the SKS pre-commit hook; check `sks versioning status`. Bypass only with `SKS_DISABLE_VERSIONING=1`.\n- Installed harness files are immutable to LLM edits: `.codex/*`, `.agents/skills/`, `.codex/agents/`, `.sneakoscope/*policy*.json`, `AGENTS.md`, and `node_modules/sneakoscope`. The Sneakoscope engine source repo is the only automatic exception.\n- OMX/DCodex conflicts block setup/doctor. Show `sks conflicts prompt`; cleanup requires explicit human approval.\n- Do not stop at a plan when implementation was requested. Finish, verify, or report the hard blocker.\n- Do not create unrequested fallback implementation code. If the requested path is impossible, block with evidence instead of inventing substitute behavior.\n\n## Routes\n\n- General execution/code-changing prompts default to `$Team`: analysis scouts, TriWiki refresh/validate, read-only debate, consensus, concrete runtime task graph/inboxes, fresh executor team, review, integration, Honest Mode.\n- `$Computer-Use` / `$CU` is the maximum-speed Codex Computer Use lane for UI/browser/visual tasks: skip Team debate and upfront TriWiki loops, use Codex Computer Use directly, then refresh/validate TriWiki and run Honest Mode at final closeout.\n- `$Goal` is a fast bridge/overlay for Codex native `/goal` create/pause/resume/clear persistence controls; implementation continues through the selected SKS execution route.\n- TriWiki recall must stay bounded. Use `sks wiki sweep` to record demote, soft-forget, archive, delete, promote-to-skill, and promote-to-rule candidates instead of injecting every old claim.\n- Team missions must keep schema-backed evidence current: `work-order-ledger.json`, `effort-decision.json`, `team-dashboard-state.json`, and route-specific visual/dogfood artifacts where applicable. Use `sks validate-artifacts latest` before claiming those artifacts pass.\n- `$DFix` is only for tiny design/content edits and bypasses the main pipeline, Team, TriWiki/TriFix/reflection recording, and persistent route state; it still uses a one-line DFix-specific Honest check before final. `$Answer`, `$Help`, and `$Wiki` stay lightweight.\n- For code work, surface route/guard/write scopes first, split independent worker scopes when available, and keep parent-owned integration and verification.\n- Design work reads `design.md`; if missing, use `design-system-builder`.
|
|
94
|
+
const AGENTS_BLOCK = "\n# Sneakoscope Codex Managed Rules\n\nThis repository uses Sneakoscope Codex.\n\n## Core Rules\n\n- Codex native `/goal` workflows are the persisted continuation surface; Ralph is removed from the user-facing SKS surface.\n- Keep runtime state bounded: raw logs go to files, prompts get tails/summaries, and `sks gc` may prune stale artifacts.\n- Before substantive work, SKS checks npm for a newer package. If newer, ask update-now vs skip-for-this-conversation.\n- Versioning is managed by the SKS pre-commit hook; check `sks versioning status`. Bypass only with `SKS_DISABLE_VERSIONING=1`.\n- Installed harness files are immutable to LLM edits: `.codex/*`, `.agents/skills/`, `.codex/agents/`, `.sneakoscope/*policy*.json`, `AGENTS.md`, and `node_modules/sneakoscope`. The Sneakoscope engine source repo is the only automatic exception.\n- OMX/DCodex conflicts block setup/doctor. Show `sks conflicts prompt`; cleanup requires explicit human approval.\n- Do not stop at a plan when implementation was requested. Finish, verify, or report the hard blocker.\n- Do not create unrequested fallback implementation code. If the requested path is impossible, block with evidence instead of inventing substitute behavior.\n\n## Routes\n\n- General execution/code-changing prompts default to `$Team`: analysis scouts, TriWiki refresh/validate, read-only debate, consensus, concrete runtime task graph/inboxes, fresh executor team, review, integration, Honest Mode.\n- `$Computer-Use` / `$CU` is the maximum-speed Codex Computer Use lane for UI/browser/visual tasks: skip Team debate and upfront TriWiki loops, use Codex Computer Use directly, then refresh/validate TriWiki and run Honest Mode at final closeout.\n- `$Goal` is a fast bridge/overlay for Codex native `/goal` create/pause/resume/clear persistence controls; implementation continues through the selected SKS execution route.\n- TriWiki recall must stay bounded. Use `sks wiki sweep` to record demote, soft-forget, archive, delete, promote-to-skill, and promote-to-rule candidates instead of injecting every old claim.\n- Team missions must keep schema-backed evidence current: `work-order-ledger.json`, `effort-decision.json`, `team-dashboard-state.json`, and route-specific visual/dogfood artifacts where applicable. Use `sks validate-artifacts latest` before claiming those artifacts pass.\n- `$DFix` is only for tiny design/content edits and bypasses the main pipeline, Team, TriWiki/TriFix/reflection recording, and persistent route state; it still uses a one-line DFix-specific Honest check before final. `$PPT` is the restrained, information-first HTML/PDF presentation route and must seal delivery context, audience profile, STP, decision context, and 3+ pain-point/solution/aha mappings before design/render work. It must avoid over-designed visuals, carry detail through hierarchy, spacing, alignment, thin rules, source clarity, and subtle accents, preserve editable source HTML under `source-html/`, record `ppt-parallel-report.json`, and clean PPT-only temporary build files before completion. `$Answer`, `$Help`, and `$Wiki` stay lightweight.\n- For code work, surface route/guard/write scopes first, split independent worker scopes when available, and keep parent-owned integration and verification.\n- Design work reads `design.md`; if missing, use `design-system-builder`. Design-system and presentation-like HTML/PDF work consults getdesign.md / getdesign-reference first; image/logo/raster assets use `imagegen`, which must prefer official Codex App built-in image generation via `$imagegen` / `gpt-image-2` before API generation.\n- Research, AutoResearch, performance, token, accuracy, SEO/GEO, or workflow-improvement claims need experiment/eval evidence. Do not claim live model accuracy without a scored dataset.\n- Treat handwritten files above 3000 lines as split-review risks. Run `sks code-structure scan` and prefer extraction before adding substantial logic.\n- Skill dreaming stays lightweight: route use records JSON counters in `.sneakoscope/skills/dream-state.json`, and full skill inventory/recommendation runs only after the configured count/cooldown threshold. Reports are recommendation-only; deleting or merging skills needs explicit user approval.\n\n## Evidence And Context\n\n- Context7 is required for external libraries, APIs, MCPs, package managers, SDKs, and generated docs: resolve-library-id then query-docs.\n- When tech stack, framework, package, runtime, or deployment-platform versions change, use Context7 or official vendor web docs, record current syntax/security/limit guidance as high-priority TriWiki claims, then refresh and validate before coding.\n- TriWiki is the context-tracking SSOT for long-running missions, Team handoffs, and context-pressure recovery. Read `.sneakoscope/wiki/context-pack.json` before each stage, use `attention.use_first` for compact high-trust recall, hydrate `attention.hydrate_first` from source before risky or lower-trust decisions, refresh after findings or artifact changes, and validate before handoffs/final claims.\n- Source priority: current code/tests/config, decision contract, vgraph, beta, GX render/snapshot metadata, LLM Wiki coordinate index, then model knowledge only if allowed.\n- Final response before stop: summarize what was done, what changed for the user/repo, what was verified, and what remains unverified or blocked; then run Honest Mode. Say what passed and what was not verified.\n- `$From-Chat-IMG` uses forensic visual effort, not ordinary Team effort. Completion is blocked until source inventory, visual mapping, work-order coverage, scoped dogfood/QA, and post-fix verification artifacts are present and valid.\n\n## Safety\n\n- Database access is high risk. Use read-only inspection by default; live data mutation is out of scope unless a sealed contract allows local or branch-only migration files.\n- MAD and MAD-SKS widen only explicit scoped permissions; they still do not authorize unrequested fallback implementation code.\n- Task completion requires relevant tests or justification, zero unsupported critical claims, accepted visual/wiki drift, and final evidence.\n\n## Codex App\n\nUse `.codex/SNEAKOSCOPE.md`, generated `.agents/skills`, `.codex/hooks.json`, and SKS dollar commands (`$sks`, `$team`, `$computer-use`, `$cu`, `$ppt`, `$goal`, `$dfix`, `$qa-loop`, etc.) as the app control surface.\n";
|
|
95
95
|
|
|
96
96
|
export async function initProject(root, opts = {}) {
|
|
97
97
|
const created = [];
|
|
@@ -146,6 +146,7 @@ export async function initProject(root, opts = {}) {
|
|
|
146
146
|
},
|
|
147
147
|
recommended_skills: RECOMMENDED_SKILLS,
|
|
148
148
|
recommended_mcp_servers: RECOMMENDED_MCP_SERVERS,
|
|
149
|
+
recommended_design_references: RECOMMENDED_DESIGN_REFERENCES,
|
|
149
150
|
skill_dreaming: {
|
|
150
151
|
state: SKILL_DREAM_POLICY.state_path,
|
|
151
152
|
latest_report: SKILL_DREAM_POLICY.latest_report_path,
|
|
@@ -274,7 +275,8 @@ export async function initProject(root, opts = {}) {
|
|
|
274
275
|
migration_model: 'setup_or_wiki_refresh_regenerates_required_voxel_overlay'
|
|
275
276
|
},
|
|
276
277
|
recommended_skills: RECOMMENDED_SKILLS,
|
|
277
|
-
recommended_mcp_servers: RECOMMENDED_MCP_SERVERS
|
|
278
|
+
recommended_mcp_servers: RECOMMENDED_MCP_SERVERS,
|
|
279
|
+
recommended_design_references: RECOMMENDED_DESIGN_REFERENCES
|
|
278
280
|
});
|
|
279
281
|
}
|
|
280
282
|
|
|
@@ -391,7 +393,8 @@ export async function initProject(root, opts = {}) {
|
|
|
391
393
|
human_approval_required: true
|
|
392
394
|
},
|
|
393
395
|
recommended_skills: RECOMMENDED_SKILLS,
|
|
394
|
-
recommended_mcp_servers: RECOMMENDED_MCP_SERVERS
|
|
396
|
+
recommended_mcp_servers: RECOMMENDED_MCP_SERVERS,
|
|
397
|
+
recommended_design_references: RECOMMENDED_DESIGN_REFERENCES
|
|
395
398
|
};
|
|
396
399
|
}
|
|
397
400
|
|
|
@@ -519,17 +522,18 @@ function codexAppQuickReference(scope, commandPrefix) {
|
|
|
519
522
|
`Install scope: \`${scope}\``,
|
|
520
523
|
`Command: \`${commandPrefix} <command>\``,
|
|
521
524
|
'Files: AGENTS.md, .codex/hooks.json, .codex/config.toml, .codex/SNEAKOSCOPE.md, .agents/skills, .codex/agents, .sneakoscope/missions.',
|
|
522
|
-
`Discover: ${commandPrefix} bootstrap; ${commandPrefix} deps check; ${commandPrefix} commands; ${commandPrefix} codex-app check; ${commandPrefix}
|
|
525
|
+
`Discover: ${commandPrefix} bootstrap; ${commandPrefix} deps check; ${commandPrefix} commands; ${commandPrefix} codex-app check; ${commandPrefix} tmux check; ${commandPrefix} dollar-commands; ${commandPrefix} pipeline status; ${commandPrefix} pipeline plan.`,
|
|
523
526
|
'dollar-commands:',
|
|
524
527
|
...DOLLAR_COMMANDS.map((c) => `- \`${c.command}\`: ${c.route}`),
|
|
525
528
|
`Picker skills: ${DOLLAR_COMMAND_ALIASES.map((x) => x.app_skill).join(', ')}.`,
|
|
526
529
|
'Routing: Answer direct, DFix ultralight no-record, execution routes ask only scope/safety/behavior/acceptance-changing questions before sealing answers.',
|
|
530
|
+
getdesignReferencePolicyText(),
|
|
527
531
|
`Full routes write reflection.md, record lessons to ${REFLECTION_MEMORY_PATH}, refresh/pack TriWiki, validate, then final-answer with a user-visible completion summary plus Honest Mode.`,
|
|
528
532
|
`Runtime root: ${commandPrefix} root shows whether SKS is using the nearest project root or the per-user global SKS runtime root; outside any project marker, runtime commands use the global root instead of writing .sneakoscope into the current random directory.`,
|
|
529
533
|
`Context Tracking: TriWiki SSOT. Before each route phase read only the latest coordinate+voxel overlay pack at .sneakoscope/wiki/context-pack.json; coordinate-only legacy packs are invalid. Use attention.use_first for compact high-trust recall and hydrate attention.hydrate_first from source before risky/lower-trust decisions. During every stage hydrate low-trust claims from source/hash/RGBA anchors; after changes run ${commandPrefix} wiki refresh or pack; before handoff/final run ${commandPrefix} wiki validate .sneakoscope/wiki/context-pack.json.`,
|
|
530
534
|
stackCurrentDocsPolicyText(commandPrefix),
|
|
531
|
-
`Team
|
|
532
|
-
`Runtime: open Codex App once, then run ${commandPrefix} bootstrap, ${commandPrefix} deps check, or ${commandPrefix}
|
|
535
|
+
`Team tmux view: ${commandPrefix} team "task" prepares live watch/lane commands without opening tmux by default; add --open-tmux when you explicitly want a named tmux session with an overview watch pane plus color-coded split per-agent lanes; ${commandPrefix} team lane latest --agent analysis_scout_1 --follow shows one agent's status, assigned runtime tasks, recent agent events, direct messages, and fallback global tail; ${commandPrefix} team message latest --from analysis_scout_1 --to executor_1 --message "handoff note" mirrors bounded agent communication into transcript/lane panes; ${commandPrefix} team cleanup-tmux latest marks the SKS session record complete and asks follow panes to show a cleanup summary then stop.`,
|
|
536
|
+
`Runtime: open Codex App once, then run ${commandPrefix} bootstrap, ${commandPrefix} deps check, or ${commandPrefix} tmux open when you explicitly want a tmux/Codex CLI launch.`,
|
|
533
537
|
`Guard: generated harness files are immutable outside the engine source repo; check ${commandPrefix} guard check; conflicts use ${commandPrefix} conflicts prompt with human approval.`
|
|
534
538
|
].join('\n') + '\n';
|
|
535
539
|
}
|
|
@@ -540,9 +544,10 @@ export async function installSkills(root) {
|
|
|
540
544
|
'answer': `---\nname: answer\ndescription: Answer-only research route for ordinary questions that should not start implementation.\n---\n\nUse for explanations, comparisons, status, facts, source-backed research, or docs guidance. Use repo/TriWiki first for project-local facts; hydrate low-trust claims from source. Browse or use Context7 for current external package/API/framework/MCP docs. End with a concise answer summary plus Honest Mode; do not create missions, subagents, or file edits.\n`,
|
|
541
545
|
'sks': `---\nname: sks\ndescription: General Sneakoscope Codex command route for $SKS or $sks usage, setup, status, and workflow help.\n---\n\nUse local SKS commands: bootstrap, deps, commands, quickstart, codex-app, context7, guard, conflicts, reasoning, wiki, pipeline status, pipeline plan, skill-dream. Promote code-changing work to Team unless Answer/DFix/Help/Wiki/safety route fits. Surface route/guard/scope, use TriWiki, do not edit installed harness files outside this engine repo, and require human-approved conflict cleanup. ${skillDreamPolicyText()}\n`,
|
|
542
546
|
'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`,
|
|
543
|
-
'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. Ambiguity gate first. 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 scouts, N debate voices, then fresh N executors. 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()} ${skillDreamPolicyText()} Log events and use sks team message for bounded inter-agent communication in transcript/lane panes. Color-coded
|
|
547
|
+
'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. Ambiguity gate first. 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 scouts, N debate voices, then fresh N executors. 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()} ${skillDreamPolicyText()} Log events and use sks team message for bounded inter-agent communication in transcript/lane panes. Color-coded tmux lanes distinguish overview/scout/planning/execution/review/safety sessions. End with cleanup-tmux 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`,
|
|
544
548
|
'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. 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_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`,
|
|
545
549
|
'qa-loop': `---\nname: qa-loop\ndescription: $QA-LOOP dogfoods UI/API as human proxy with safety gates, Codex Computer Use-only UI evidence, safe fixes, rechecks, and a QA report.\n---\n\nUse only $QA-LOOP. Ask scope, target, mutation, login. Credentials are runtime-only; never save secrets. UI-level E2E needs Codex Computer Use evidence or must be marked unverified; Chrome MCP, Browser Use, Playwright, Selenium, Puppeteer, and other browser automation do not satisfy UI/browser verification. Deployed targets are read-only; destructive removal is forbidden. After answer/run, dogfood real flows, apply safe contract-allowed code/test/docs fixes, recheck, and do not pass qa-gate.json with unresolved findings or without post_fix_verification_complete. Finish qa-ledger, date/version report, gate, completion summary, and Honest Mode.\n`,
|
|
550
|
+
'ppt': `---\nname: ppt\ndescription: $PPT information-first HTML/PDF presentation pipeline with STP, audience, pain-point, format, research, design-system, and verification questions.\n---\n\nUse only when the user invokes $PPT or asks to create a presentation, deck, slides, pitch deck, proposal deck, HTML presentation, or PDF presentation artifact. Before artifact work, seal presentation-specific ambiguity answers: delivery context, target audience profile including role/average age/job/industry/topic familiarity/decision power, STP strategy, decision context and objections, and 3+ pain-point to solution mappings with expected aha moments. Presentation design must be simple, restrained, and information-first: avoid over-designed decoration, ornamental gradients, nested cards, and effects that compete with the message. Design detail should be embedded through typography hierarchy, spacing, alignment, thin rules, source clarity, and subtle accents. Use getdesign-reference and design-artifact-expert for design-system grounding. If generated image assets are needed, use imagegen and prefer Codex App built-in image generation (${CODEX_APP_IMAGE_GENERATION_DOC_URL}) before API generation. Use web or Context7 evidence when external facts/libraries are involved, then create the PDF plus editable source HTML under source-html/, keep independent strategy/render/file-write phases parallel where inputs allow, record ppt-parallel-report.json, and verify readability, overlap, format fit, source coverage, export state, and temporary build files cleanup. Finish with reflection and Honest Mode; do not skip STP/audience questions for presentation artifacts.\n`,
|
|
546
551
|
'computer-use': `---\nname: computer-use\ndescription: Maximum-speed $Computer-Use/$CU lane for Codex Computer Use UI/browser/visual tasks.\n---\n\nUse only when the user invokes $Computer-Use/$CU or asks for a Computer Use-specific fast lane. Skip Team debate, QA-LOOP clarification, upfront TriWiki refresh, Context7, subagents, and reflection unless explicitly requested. Infer the smallest target, use Codex Computer Use directly, and never substitute Playwright, Chrome MCP, Browser Use, Selenium, Puppeteer, or other browser automation for UI/browser evidence. If Computer Use is unavailable, mark UI/browser evidence unverified and stop with the blocker. At the end only, refresh or pack TriWiki, validate it, then provide a concise completion summary plus Honest Mode.\n`,
|
|
547
552
|
'computer-use-fast': `---\nname: computer-use-fast\ndescription: Alias for the maximum-speed $Computer-Use/$CU Codex Computer Use lane.\n---\n\nUse the same rules as computer-use: skip Team debate, QA-LOOP clarification, upfront TriWiki refresh, Context7, subagents, and reflection unless explicitly requested. Use Codex Computer Use directly; never substitute Playwright, Chrome MCP, Browser Use, Selenium, Puppeteer, or other browser automation for UI/browser evidence. At the end only, refresh/pack TriWiki, validate it, then provide a concise completion summary plus Honest Mode.\n`,
|
|
548
553
|
'cu': `---\nname: cu\ndescription: Short alias for the maximum-speed $Computer-Use Codex Computer Use lane.\n---\n\nUse the same rules as computer-use. This is a speed lane for focused UI/browser/visual tasks that require Codex Computer Use evidence, with TriWiki refresh/validate and Honest Mode deferred to final closeout.\n`,
|
|
@@ -553,7 +558,7 @@ export async function installSkills(root) {
|
|
|
553
558
|
'mad-sks': `---\nname: mad-sks\ndescription: Explicit high-risk authorization modifier for $MAD-SKS scoped Supabase MCP DB permission widening.\n---\n\nUse only when the user explicitly invokes $MAD-SKS. 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 DB permission applies only while the active mission gate is open, must be deactivated when the task ends, and opens Supabase MCP column/schema cleanup, direct execute SQL, and normal DB write permissions. Keep only catastrophic database-wipe safeguards: whole database/table removal, all-row delete/update, reset, and dangerous project/branch management remain blocked. Do not carry MAD-SKS permission into later prompts or routes.\n`,
|
|
554
559
|
'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`,
|
|
555
560
|
'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`,
|
|
556
|
-
'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 tiny design/content; code defaults to Team unless safety/research/GX route fits. Infer goal, target, constraints, acceptance, risk, and smallest safe route. Ask only scope/safety/behavior/acceptance-changing questions; otherwise seal inferred answers. 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()} ${skillDreamPolicyText()}\n\n${chatCaptureIntakeText()}\n\nDesign: read design.md; if missing use design-system-builder; use imagegen for image/logo/raster. 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`,
|
|
561
|
+
'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 tiny design/content; code defaults to Team unless safety/research/GX route fits. Infer goal, target, constraints, acceptance, risk, and smallest safe route. Ask only scope/safety/behavior/acceptance-changing questions; otherwise seal inferred answers. 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()} ${skillDreamPolicyText()}\n\n${chatCaptureIntakeText()}\n\nDesign: read design.md; if missing use design-system-builder; 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. ${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`,
|
|
557
562
|
'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`,
|
|
558
563
|
'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`,
|
|
559
564
|
'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`,
|
|
@@ -570,10 +575,11 @@ export async function installSkills(root) {
|
|
|
570
575
|
'turbo-context-pack': `---\nname: turbo-context-pack\ndescription: Build ultra-low-token context packet with Q4 bits, Q3 tags, top-K claims, and minimal evidence.\n---\n\nDefault to Q4/Q3 plus TriWiki RGBA anchors and attention.use_first. Add Q2/Q1 only when needed or when attention.hydrate_first says source hydration is required. Keep id, hash, path, and coordinate tuple for hydration.\n`,
|
|
571
576
|
'research-discovery': `---\nname: research-discovery\ndescription: Run SKS Research Mode for frontier-style research, hypotheses, novelty ledgers, falsification, and experiments.\n---\n\nFrame criteria, map assumptions, generate hypotheses, falsify, keep surviving insights, and record novelty/confidence/falsifiers/next experiments. Do not overclaim.\n`,
|
|
572
577
|
'performance-evaluator': `---\nname: performance-evaluator\ndescription: Evaluate SKS performance, token-saving, accuracy-proxy, context-compression, or workflow improvements.\n---\n\nUse sks eval run/compare before claims. Report token_savings_pct, accuracy_delta/proxy, required_recall, support, and meaningful_improvement.\n`,
|
|
573
|
-
'imagegen': `---\nname: imagegen\ndescription: Required bridge to Codex image generation for logos, image assets, raster visuals, and image edits.\n---\n\nUse for generated or edited image assets: logo, product image, illustration, sprite, mockup, texture, cutout, or bitmap. Do not substitute placeholder SVG/HTML/CSS; follow design.md when relevant.\n`,
|
|
574
|
-
'
|
|
575
|
-
'design-
|
|
576
|
-
'design-
|
|
578
|
+
'imagegen': `---\nname: imagegen\ndescription: Required bridge to Codex App built-in image generation for logos, image assets, raster visuals, and image edits.\n---\n\nUse for generated or edited image assets: logo, product image, illustration, sprite, mockup, texture, cutout, or bitmap. Prefer the official Codex App built-in image generation feature documented at ${CODEX_APP_IMAGE_GENERATION_DOC_URL}: ask naturally or invoke \`$imagegen\`; Codex uses built-in image generation with gpt-image-2 and counts it against Codex usage limits. For larger batches only, use the API path when OPENAI_API_KEY is explicitly available and the user or route contract allows API-priced generation. Do not substitute placeholder SVG/HTML/CSS for requested raster assets; follow design.md when relevant.\n`,
|
|
579
|
+
'getdesign-reference': `---\nname: getdesign-reference\ndescription: Use getdesign.md official design reference for design.md, UI/UX, presentation, and HTML/PDF design systems.\n---\n\nUse when creating or improving design.md, UI/UX design systems, deck-like HTML artifacts, presentation PDFs, or brand-inspired visual systems. Reference ${GETDESIGN_REFERENCE.url} and ${GETDESIGN_REFERENCE.docs_url}; prefer the official Codex skill if available with \`${GETDESIGN_REFERENCE.codex_skill_install}\`. If the skill CLI is unavailable, use this generated skill plus official docs/API/CLI/SDK references. Do not claim getdesign MCP is configured unless a current official MCP surface is actually installed.\n`,
|
|
580
|
+
'design-system-builder': `---\nname: design-system-builder\ndescription: Create design.md from docs/Design-Sys-Prompt.md when UI/UX work has no design system.\n---\n\nWhen \`design.md\` is missing, read docs/Design-Sys-Prompt.md, inspect product/UI context, consult getdesign-reference and official getdesign.md docs, use the plan tool only for real ambiguity plus default font recommendation, then create tokens, components, states, imagery, accessibility, and verification rules. Use imagegen for assets.\n`,
|
|
581
|
+
'design-ui-editor': `---\nname: design-ui-editor\ndescription: Edit UI/UX using design.md, getdesign-reference, and design-artifact-expert.\n---\n\nRead \`design.md\`, inspect relevant UI/assets/tests, consult getdesign-reference when improving the design system, apply the smallest design-system-conformant change, use imagegen for image/logo/raster assets, and verify render quality. If missing, use design-system-builder first.\n`,
|
|
582
|
+
'design-artifact-expert': `---\nname: design-artifact-expert\ndescription: Create or revise high-fidelity HTML, UI, prototype, deck-like, or visual design artifacts with rendered verification.\n---\n\nUse for design/UI/prototype/HTML visual work, including presentation-like HTML/PDF artifacts. Read design.md when present, consult getdesign-reference for design-system grounding, build the usable artifact first, preserve state, verify overlap/readability/responsiveness, and use imagegen for required assets.\n`
|
|
577
583
|
};
|
|
578
584
|
for (const [name, content] of Object.entries(skills)) {
|
|
579
585
|
const dir = path.join(root, '.agents', 'skills', name);
|
|
@@ -591,7 +597,7 @@ export async function installSkills(root) {
|
|
|
591
597
|
}
|
|
592
598
|
|
|
593
599
|
function enrichSkillContent(name, content) {
|
|
594
|
-
if (!['sks', 'answer', 'wiki', 'team', 'qa-loop', 'computer-use', 'computer-use-fast', 'cu', 'goal', 'research', 'autoresearch', 'db', 'gx', 'reflection', 'prompt-pipeline', 'pipeline-runner', 'context7-docs', 'turbo-context-pack', 'hproof-evidence-bind'].includes(name)) return content;
|
|
600
|
+
if (!['sks', 'answer', 'wiki', 'team', 'qa-loop', 'ppt', 'computer-use', 'computer-use-fast', 'cu', 'goal', 'research', 'autoresearch', 'db', 'gx', 'reflection', 'prompt-pipeline', 'pipeline-runner', 'context7-docs', 'turbo-context-pack', 'hproof-evidence-bind'].includes(name)) return content;
|
|
595
601
|
const text = String(content || '').trimEnd();
|
|
596
602
|
if (text.includes('TriWiki context-tracking SSOT')) return text;
|
|
597
603
|
return `${text}
|
package/src/core/pipeline.mjs
CHANGED
|
@@ -12,8 +12,9 @@ import { writeMemorySweepReport } from './memory-governor.mjs';
|
|
|
12
12
|
import { writeMistakeMemoryReport } from './mistake-memory.mjs';
|
|
13
13
|
import { recordSkillDreamEvent, skillDreamPolicyText, writeSkillForgeReport } from './skill-forge.mjs';
|
|
14
14
|
import { writeResearchPlan } from './research.mjs';
|
|
15
|
+
import { PPT_REQUIRED_GATE_FIELDS } from './ppt.mjs';
|
|
15
16
|
import { SPEED_LANE_POLICY } from './proof-field.mjs';
|
|
16
|
-
import { CODEX_COMPUTER_USE_EVIDENCE_SOURCE, CODEX_COMPUTER_USE_ONLY_POLICY, 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, chatCaptureIntakeText, context7RequirementText, dollarCommand, evidenceMentionsForbiddenBrowserAutomation, hasFromChatImgSignal, hasMadSksSignal, noUnrequestedFallbackCodePolicyText, outcomeRubricPolicyText, reflectionRequiredForRoute, reasoningInstruction, routeNeedsContext7, routePrompt, routeReasoning, routeRequiresSubagents, speedLanePolicyText, stripDollarCommand, stripMadSksSignal, subagentExecutionPolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.mjs';
|
|
17
|
+
import { CODEX_APP_IMAGE_GENERATION_DOC_URL, CODEX_COMPUTER_USE_EVIDENCE_SOURCE, CODEX_COMPUTER_USE_ONLY_POLICY, 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, chatCaptureIntakeText, context7RequirementText, dollarCommand, evidenceMentionsForbiddenBrowserAutomation, getdesignReferencePolicyText, hasFromChatImgSignal, hasMadSksSignal, noUnrequestedFallbackCodePolicyText, outcomeRubricPolicyText, reflectionRequiredForRoute, reasoningInstruction, routeNeedsContext7, routePrompt, routeReasoning, routeRequiresSubagents, speedLanePolicyText, stripDollarCommand, stripMadSksSignal, subagentExecutionPolicyText, stackCurrentDocsPolicyText, triwikiContextTracking, triwikiContextTrackingText, triwikiStagePolicyText } from './routes.mjs';
|
|
17
18
|
import { TEAM_DECOMPOSITION_ARTIFACT, TEAM_GRAPH_ARTIFACT, TEAM_INBOX_DIR, TEAM_RUNTIME_TASKS_ARTIFACT, teamRuntimePlanMetadata, teamRuntimeRequiredArtifacts, validateTeamRuntimeArtifacts, writeTeamRuntimeArtifacts } from './team-dag.mjs';
|
|
18
19
|
import { formatRoleCounts, initTeamLive, parseTeamSpecText } from './team-live.mjs';
|
|
19
20
|
|
|
@@ -232,7 +233,7 @@ export function promptPipelineContext(prompt, route = routePrompt(prompt)) {
|
|
|
232
233
|
outcomeRubricPolicyText(),
|
|
233
234
|
speedLanePolicyText(),
|
|
234
235
|
skillDreamPolicyText(),
|
|
235
|
-
|
|
236
|
+
`Design routing: UI/UX reads design.md first; if missing, use design-system-builder from docs/Design-Sys-Prompt.md with plan-tool clarification and a default font recommendation. Existing designs use design-ui-editor plus design-artifact-expert. Image/logo/raster assets use imagegen, which must prefer Codex App built-in image generation documented at ${CODEX_APP_IMAGE_GENERATION_DOC_URL}. ${getdesignReferencePolicyText()}`,
|
|
236
237
|
triwikiContextTrackingText(),
|
|
237
238
|
triwikiStagePolicyText(),
|
|
238
239
|
stackCurrentDocsPolicyText(),
|
|
@@ -244,6 +245,7 @@ export function promptPipelineContext(prompt, route = routePrompt(prompt)) {
|
|
|
244
245
|
if (reflectionRequiredForRoute(route)) lines.push(reflectionInstructionText());
|
|
245
246
|
if (route?.id === 'Team') lines.push(`Team route: scouts, TriWiki refresh, debate, consensus, runtime graph compile with concrete task ids and worker inboxes, close planning agents, fresh executors, review/integration, ${TEAM_SESSION_CLEANUP_ARTIFACT}, reflection, and Honest Mode.`);
|
|
246
247
|
if (route?.id === 'Goal') lines.push('Goal route: write SKS goal bridge artifacts, then use Codex native /goal persistence for create, pause, resume, and clear continuation controls.');
|
|
248
|
+
if (route?.id === 'PPT') lines.push(`PPT route: before design or PDF work, seal delivery context, audience profile including average age/job/industry, STP strategy, decision context, and at least three pain-point to solution mappings. Keep the visual system simple, restrained, and information-first; design detail should come from hierarchy, spacing, alignment, rules, and subtle accents rather than decorative overdesign. If generated image assets are needed, prefer Codex App built-in image generation through the imagegen skill (${CODEX_APP_IMAGE_GENERATION_DOC_URL}). Then build source ledger, storyboard with aha moments, style tokens, editable source HTML under source-html/, PDF artifact, render QA, PPT-only temporary build file cleanup, and ppt-parallel-report.json so independent strategy/render/file-write phases stay parallel-friendly, then reflection and Honest Mode.`);
|
|
247
249
|
if (route?.id === 'AutoResearch') lines.push('AutoResearch route: load autoresearch-loop plus seo-geo-optimizer when SEO/GEO, discoverability, README, npm, GitHub stars, ranking, or AI-search visibility is relevant.');
|
|
248
250
|
if (route?.id === 'DB') lines.push('DB route: scan/check database risk first; destructive DB operations remain forbidden.');
|
|
249
251
|
if (route?.id === 'GX') lines.push('GX route: use deterministic vgraph/beta render, validate, drift, and snapshot artifacts.');
|
|
@@ -582,7 +584,7 @@ async function prepareTeam(root, route, task, required) {
|
|
|
582
584
|
markdown: 'team-live.md',
|
|
583
585
|
transcript: 'team-transcript.jsonl',
|
|
584
586
|
dashboard: 'team-dashboard.json',
|
|
585
|
-
|
|
587
|
+
tmux: 'CLI Team entrypoints open tmux live lanes for the visible Team agent budget when tmux is available.',
|
|
586
588
|
commands: ['sks team status latest', 'sks team log latest', 'sks team tail latest', 'sks team watch latest', 'sks team lane latest --agent <name> --follow', 'sks team event latest --agent <name> --phase <phase> --message "..."']
|
|
587
589
|
},
|
|
588
590
|
required_artifacts: ['team-roster.json', 'team-analysis.md', ...(fromChatImgRequired ? [FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT] : []), 'team-consensus.md', ...teamRuntimeRequiredArtifacts(), 'team-review.md', 'team-gate.json', TEAM_SESSION_CLEANUP_ARTIFACT, 'reflection.md', 'reflection-gate.json', 'team-live.md', 'team-transcript.jsonl', 'team-dashboard.json', '.sneakoscope/wiki/context-pack.json', 'context7-evidence.jsonl']
|
|
@@ -1054,6 +1056,14 @@ function missingRequiredGateFields(file, state, gate = {}) {
|
|
|
1054
1056
|
return ['clarification_contract_sealed', 'qa_report_written', 'qa_ledger_complete', 'checklist_completed', 'safety_reviewed', 'deployed_destructive_tests_blocked', 'credentials_not_persisted', 'ui_computer_use_evidence', 'honest_mode_complete']
|
|
1055
1057
|
.filter((key) => gate[key] !== true);
|
|
1056
1058
|
}
|
|
1059
|
+
if (file === 'ppt-gate.json' || mode === 'PPT') {
|
|
1060
|
+
const required = [...PPT_REQUIRED_GATE_FIELDS];
|
|
1061
|
+
if (Number(gate.painpoint_count || 0) < 3) required.push('painpoint_count>=3');
|
|
1062
|
+
return required.filter((key) => {
|
|
1063
|
+
if (key === 'painpoint_count>=3') return Number(gate.painpoint_count || 0) < 3;
|
|
1064
|
+
return gate[key] !== true;
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1057
1067
|
return [];
|
|
1058
1068
|
}
|
|
1059
1069
|
|
|
@@ -1152,6 +1162,7 @@ function gateFilesForState(state) {
|
|
|
1152
1162
|
if (state.mode === 'DB') return ['db-review.json'];
|
|
1153
1163
|
if (state.mode === 'GX') return ['gx-gate.json'];
|
|
1154
1164
|
if (state.mode === 'QALOOP') return ['qa-gate.json'];
|
|
1165
|
+
if (state.mode === 'PPT') return ['ppt-gate.json'];
|
|
1155
1166
|
return ['done-gate.json'];
|
|
1156
1167
|
}
|
|
1157
1168
|
|