feat(voyage)!: rename stats filenames, settings keys, hook prefixes [skip-docs]
- lib/stats/event-emit.mjs: STATS_FILENAME -> trekexecute-stats.jsonl + comment - hooks/scripts/post-bash-stats.mjs: stats target + comment -> trekexecute-stats.jsonl - lib/stats/cache-analyzer.mjs: help-text + comment -> trekexecute-stats.jsonl - tests/lib/stats-event-emit.test.mjs (lines 104, 117): fixture assertions - settings.json: ultraplan/ultraresearch -> trekplan/trekresearch keys + statsFile values - tests/lib/doc-consistency.test.mjs: allowlist (line 83) + accessor cfg.ultraplan?.* -> cfg.trekplan?.* (lines 91, 93) — atomic-pair, prevents vacuous undefined assertions - scripts/q3-cache-prefix-experiment.mjs: STATS_JSONL hardcoded path -> voyage data dir + trekexecute filename - hooks/scripts/pre-bash-executor.mjs (2 lines), pre-compact-flush.mjs (2 lines), pre-write-executor.mjs (1 line): [ultraplan]/[ultraplan-local] stderr prefix -> [voyage] - commands + agents/review-orchestrator.md + CLAUDE.md: prose stats filename literals -> trek* equivalents Atomic per session-spec: settings.json scope keys + doc-consistency.test.mjs allowlist + property accessors committed together to prevent silent vacuous undefined-equals-undefined assertions. Part of voyage-rebrand session 2 (W3.7 / Step 9). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
583a78c6cc
commit
c407d3451d
18 changed files with 34 additions and 34 deletions
|
|
@ -142,7 +142,7 @@ Doc-consistency test at `tests/lib/doc-consistency.test.mjs` pins agent-table co
|
|||
|
||||
`hooks/scripts/session-title.mjs` (UserPromptSubmit, CC v2.1.94+) sets `sessionTitle` to `ultra:<command>:<slug>` for ultra-command invocations. Helps multi-session headless runs identify themselves in process lists.
|
||||
|
||||
`hooks/scripts/post-bash-stats.mjs` (PostToolUse, CC v2.1.97+) appends `duration_ms` for each Bash call into `${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl`. Useful for finding long-running verify or checkpoint commands.
|
||||
`hooks/scripts/post-bash-stats.mjs` (PostToolUse, CC v2.1.97+) appends `duration_ms` for each Bash call into `${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl`. Useful for finding long-running verify or checkpoint commands.
|
||||
|
||||
`hooks/scripts/post-compact-flush.mjs` (PostCompact event, v3.4.0) re-injects `.session-state.local.json` after context compaction so multi-session work survives a compaction boundary. Companion to `pre-compact-flush.mjs` (which writes the state file before compaction); together they form the rehydrate cycle that keeps `/ultracontinue-local` reliable across long-running multi-session work.
|
||||
|
||||
|
|
@ -222,11 +222,11 @@ Legacy paths (still work without `--project`):
|
|||
- Progress: `{plan-dir}/.ultraexecute-progress-{slug}.json`
|
||||
|
||||
Stats:
|
||||
- Brief stats: `${CLAUDE_PLUGIN_DATA}/ultrabrief-stats.jsonl`
|
||||
- Plan stats: `${CLAUDE_PLUGIN_DATA}/ultraplan-stats.jsonl`
|
||||
- Exec stats: `${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl`
|
||||
- Research stats: `${CLAUDE_PLUGIN_DATA}/ultraresearch-stats.jsonl`
|
||||
- Continue stats: `${CLAUDE_PLUGIN_DATA}/ultracontinue-stats.jsonl`
|
||||
- Brief stats: `${CLAUDE_PLUGIN_DATA}/trekbrief-stats.jsonl`
|
||||
- Plan stats: `${CLAUDE_PLUGIN_DATA}/trekplan-stats.jsonl`
|
||||
- Exec stats: `${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl`
|
||||
- Research stats: `${CLAUDE_PLUGIN_DATA}/trekresearch-stats.jsonl`
|
||||
- Continue stats: `${CLAUDE_PLUGIN_DATA}/trekcontinue-stats.jsonl`
|
||||
|
||||
## Terminology
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ If validation fails, repair the file (most failures are fixable in place
|
|||
finding-ID). Do NOT proceed if any REVIEW_REQUIRED_FRONTMATTER field is
|
||||
missing.
|
||||
|
||||
Append a stats line to `${CLAUDE_PLUGIN_DATA}/ultrareview-stats.jsonl`:
|
||||
Append a stats line to `${CLAUDE_PLUGIN_DATA}/trekreview-stats.jsonl`:
|
||||
```json
|
||||
{"ts":"...","slug":"...","verdict":"BLOCK|WARN|ALLOW","counts":{"BLOCKER":N,"MAJOR":N,"MINOR":N,"SUGGESTION":N},"reviewed_files_count":N,"mode":"default|quick|validate|dry-run","duration_ms":N}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ Or:
|
|||
|
||||
## Phase 7 — Stats tracking
|
||||
|
||||
Append one record to `${CLAUDE_PLUGIN_DATA}/ultrabrief-stats.jsonl`:
|
||||
Append one record to `${CLAUDE_PLUGIN_DATA}/trekbrief-stats.jsonl`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ disk. Cannot continue automatically.` and exit. Do not guess.
|
|||
|
||||
## Phase 5 — Stats tracking
|
||||
|
||||
Append a one-line JSON record to `${CLAUDE_PLUGIN_DATA}/ultracontinue-stats.jsonl`
|
||||
Append a one-line JSON record to `${CLAUDE_PLUGIN_DATA}/trekcontinue-stats.jsonl`
|
||||
if the env var is set; silently skip otherwise.
|
||||
|
||||
```json
|
||||
|
|
|
|||
|
|
@ -1468,7 +1468,7 @@ The `ultraexecute_summary` key makes it grep-able in log files from headless run
|
|||
|
||||
## Phase 9 — Stats tracking
|
||||
|
||||
Append one record to `${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl`:
|
||||
Append one record to `${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ If eligible:
|
|||
## Phase 12 — Session tracking
|
||||
|
||||
After the plan is presented (Phase 10) or after handoff (Phase 11), write a
|
||||
session record to `${CLAUDE_PLUGIN_DATA}/ultraplan-stats.jsonl` (create the file
|
||||
session record to `${CLAUDE_PLUGIN_DATA}/trekplan-stats.jsonl` (create the file
|
||||
if it does not exist).
|
||||
|
||||
Record format (one JSON line):
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ You can:
|
|||
|
||||
### Stats tracking
|
||||
|
||||
Write a session record to `${CLAUDE_PLUGIN_DATA}/ultraresearch-stats.jsonl`
|
||||
Write a session record to `${CLAUDE_PLUGIN_DATA}/trekresearch-stats.jsonl`
|
||||
(create the file if it does not exist).
|
||||
|
||||
Record format (one JSON line):
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ If validation fails:
|
|||
stop and ask the user to re-run; do not silently produce an invalid
|
||||
review.md.
|
||||
|
||||
Append a stats line to `${CLAUDE_PLUGIN_DATA}/ultrareview-stats.jsonl`
|
||||
Append a stats line to `${CLAUDE_PLUGIN_DATA}/trekreview-stats.jsonl`
|
||||
(create the file if it does not exist):
|
||||
|
||||
```json
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// post-bash-stats.mjs — PostToolUse hook (CC v2.1.97+)
|
||||
//
|
||||
// Captures duration_ms from PostToolUse payload for Bash tool calls and
|
||||
// appends a structured stats line to ${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl
|
||||
// appends a structured stats line to ${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl
|
||||
// when the running session is an ultraexecute session.
|
||||
//
|
||||
// Detection: only fires when the tool input matches the verify/checkpoint
|
||||
|
|
@ -47,7 +47,7 @@ async function readStdin() {
|
|||
success: payload.tool_response?.success !== false,
|
||||
});
|
||||
|
||||
const target = join(dataDir, 'ultraexecute-stats.jsonl');
|
||||
const target = join(dataDir, 'trekexecute-stats.jsonl');
|
||||
try {
|
||||
mkdirSync(dirname(target), { recursive: true });
|
||||
} catch {}
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ const normalized = normalizeCommand(deobfuscated);
|
|||
for (const rule of BLOCK_RULES) {
|
||||
if (rule.pattern.test(normalized)) {
|
||||
process.stderr.write(
|
||||
`[ultraplan] BLOCKED: ${rule.name}\n` +
|
||||
`[voyage] BLOCKED: ${rule.name}\n` +
|
||||
` Command: ${normalized.slice(0, 200)}${normalized.length > 200 ? '...' : ''}\n` +
|
||||
` ${rule.description}\n`
|
||||
);
|
||||
|
|
@ -238,7 +238,7 @@ for (const rule of WARN_RULES) {
|
|||
|
||||
if (warnings.length > 0) {
|
||||
process.stderr.write(
|
||||
`[ultraplan] SECURITY ADVISORY: Potentially risky command.\n` +
|
||||
`[voyage] SECURITY ADVISORY: Potentially risky command.\n` +
|
||||
` Command: ${normalized.slice(0, 200)}${normalized.length > 200 ? '...' : ''}\n` +
|
||||
warnings.join('\n') + '\n'
|
||||
);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ for (const { projDir, progPath, planPath } of progressFiles) {
|
|||
};
|
||||
}
|
||||
atomicWriteJson(progPath, progress);
|
||||
process.stderr.write(`[ultraplan-local] pre-compact flush: ${progPath} -> current_step=${derivedStep}\n`);
|
||||
process.stderr.write(`[voyage] pre-compact flush: ${progPath} -> current_step=${derivedStep}\n`);
|
||||
mutationsMade++;
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ for (const { projDir, progPath, planPath } of progressFiles) {
|
|||
// progress.json mutation — the state file may exist for a session that
|
||||
// hasn't advanced step yet, and we still want updated_at to track liveness.
|
||||
if (refreshSessionState(projDir)) {
|
||||
process.stderr.write(`[ultraplan-local] pre-compact refresh: ${projDir}/.session-state.local.json\n`);
|
||||
process.stderr.write(`[voyage] pre-compact refresh: ${projDir}/.session-state.local.json\n`);
|
||||
mutationsMade++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ const resolved = resolve(filePath);
|
|||
for (const rule of BLOCK_RULES) {
|
||||
if (rule.test(resolved)) {
|
||||
process.stderr.write(
|
||||
`[ultraplan] BLOCKED: ${rule.name}\n` +
|
||||
`[voyage] BLOCKED: ${rule.name}\n` +
|
||||
` Path: ${resolved}\n` +
|
||||
` ${rule.description}\n`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// lib/stats/cache-analyzer.mjs
|
||||
// Summarizes ultraexecute-stats.jsonl: total events, percentile wall times,
|
||||
// Summarizes trekexecute-stats.jsonl: total events, percentile wall times,
|
||||
// time range. Companion to event-emit.mjs (which produces the jsonl).
|
||||
//
|
||||
// Designed for /ultraplan-local Spor C: gives C3 telemetry context when
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
import { readFileSync, existsSync } from 'node:fs';
|
||||
|
||||
function usage() {
|
||||
return `cache-analyzer.mjs — summarize ultraexecute-stats.jsonl
|
||||
return `cache-analyzer.mjs — summarize trekexecute-stats.jsonl
|
||||
|
||||
USAGE:
|
||||
node lib/stats/cache-analyzer.mjs --json <path-to-jsonl>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// lib/stats/event-emit.mjs
|
||||
// Atomic JSONL append for autonomy-lifecycle events (plan-v2 Step 6).
|
||||
//
|
||||
// Writes one line per event to ${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl
|
||||
// Writes one line per event to ${CLAUDE_PLUGIN_DATA}/trekexecute-stats.jsonl
|
||||
// (or override via CLAUDE_PLUGIN_DATA env var; falls back to silent skip if
|
||||
// the directory doesn't exist — stats failures must NEVER block workflow).
|
||||
//
|
||||
|
|
@ -28,7 +28,7 @@ export const KNOWN_EVENTS = Object.freeze(new Set([
|
|||
'user_input',
|
||||
]));
|
||||
|
||||
const STATS_FILENAME = 'ultraexecute-stats.jsonl';
|
||||
const STATS_FILENAME = 'trekexecute-stats.jsonl';
|
||||
|
||||
/**
|
||||
* Resolve the stats file path. Honors CLAUDE_PLUGIN_DATA env var.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const PROJECT_DIR = resolve(
|
|||
'.claude/projects/2026-05-04-spor-c-q3-cache-prefix-experiment',
|
||||
);
|
||||
const DEFAULT_OUT = join(PROJECT_DIR, 'q3-experiment-results.local.md');
|
||||
const STATS_JSONL = '/Users/ktg/.claude/plugins/data/ultraplan-local-ktg-plugin-marketplace/ultraexecute-stats.jsonl';
|
||||
const STATS_JSONL = '/Users/ktg/.claude/plugins/data/voyage-ktg-plugin-marketplace/trekexecute-stats.jsonl';
|
||||
const ANALYZER = resolve(process.cwd(), 'lib/stats/cache-analyzer.mjs');
|
||||
|
||||
const MIN_PARENT_TOKENS = 150_000;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"ultraplan": {
|
||||
"trekplan": {
|
||||
"defaultMode": "default",
|
||||
"autoResearch": true,
|
||||
"interview": {
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
},
|
||||
"tracking": {
|
||||
"enabled": true,
|
||||
"statsFile": "ultraplan-stats.jsonl"
|
||||
"statsFile": "trekplan-stats.jsonl"
|
||||
}
|
||||
},
|
||||
"ultraresearch": {
|
||||
"trekresearch": {
|
||||
"defaultMode": "default",
|
||||
"maxDimensions": 8,
|
||||
"geminiBridge": {
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
},
|
||||
"tracking": {
|
||||
"enabled": true,
|
||||
"statsFile": "ultraresearch-stats.jsonl"
|
||||
"statsFile": "trekresearch-stats.jsonl"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ test('commands/trekexecute.md still parses v1.7 plan schema', () => {
|
|||
|
||||
test('settings.json has only known top-level scopes after Spor 0 cleanup', () => {
|
||||
const cfg = JSON.parse(read('settings.json'));
|
||||
const known = ['ultraplan', 'ultraresearch'];
|
||||
const known = ['trekplan', 'trekresearch'];
|
||||
for (const k of Object.keys(cfg)) {
|
||||
assert.ok(known.includes(k), `Unknown top-level scope in settings.json: ${k}`);
|
||||
}
|
||||
|
|
@ -88,9 +88,9 @@ test('settings.json has only known top-level scopes after Spor 0 cleanup', () =>
|
|||
|
||||
test('settings.json no longer carries vestigial exploration block', () => {
|
||||
const cfg = JSON.parse(read('settings.json'));
|
||||
assert.equal(cfg.ultraplan?.exploration, undefined,
|
||||
assert.equal(cfg.trekplan?.exploration, undefined,
|
||||
'exploration block was vestigial — should be deleted in v3.1.0 Spor 0');
|
||||
assert.equal(cfg.ultraplan?.agentTeam, undefined,
|
||||
assert.equal(cfg.trekplan?.agentTeam, undefined,
|
||||
'agentTeam block was vestigial — should be deleted in v3.1.0 Spor 0');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ test('emit never throws when stats path is unwritable', () => {
|
|||
|
||||
test('resolveStatsPath honors CLAUDE_PLUGIN_DATA env var', () => {
|
||||
const r = resolveStatsPath({ CLAUDE_PLUGIN_DATA: '/var/data/plugin' });
|
||||
assert.equal(r, '/var/data/plugin/ultraexecute-stats.jsonl');
|
||||
assert.equal(r, '/var/data/plugin/trekexecute-stats.jsonl');
|
||||
assert.equal(resolveStatsPath({}), null);
|
||||
});
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ test('CLI shim writes via emit when CLAUDE_PLUGIN_DATA is set', () => {
|
|||
env: { ...process.env, CLAUDE_PLUGIN_DATA: dir },
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
const path = join(dir, 'ultraexecute-stats.jsonl');
|
||||
const path = join(dir, 'trekexecute-stats.jsonl');
|
||||
assert.ok(existsSync(path));
|
||||
const line = readFileSync(path, 'utf-8').trim();
|
||||
const parsed = JSON.parse(line);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue