chore(cleanup): R-b R1 — Voyage's own stats, events and OTel export removed
Removes Voyage's measurement, statistics and export apparatus (decision 189; condition 175 met in step 1) and the R-a leftovers: lib/stats/, lib/exporters/, the otel-export and post-bash-stats hooks, yardstick, end-state and comparison gates, synthesis-measure, gold-scorer, docs/observability.md, examples/observability/, docs/T1-cc26-delegated-orchestration.md and their tests and fixtures. The six command stats phases and the /trekexecute main-merge event blocks go; intent-approval --stamp no longer emits brief-approved. README and docs point to Claude Code's own OpenTelemetry. Files removed: 52. Files edited: 37. npm test: 2930 tests (2928 pass / 0 fail / 2 skipped) before, 2600 tests (2598 pass / 0 fail / 2 skipped) after. removed-surfaces group R1 green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
92010d20de
commit
21480e8627
89 changed files with 94 additions and 10290 deletions
|
|
@ -34,7 +34,7 @@
|
|||
// node lib/validators/intent-approval.mjs --check [--json] <brief.md>
|
||||
// exit 0 = approved and current; exit 1 = stop (errors); exit 2 = usage
|
||||
// node lib/validators/intent-approval.mjs --stamp <brief.md>
|
||||
// writes the marker and emits `brief-approved`; exit 0 stamped, 1 refused
|
||||
// writes the marker; exit 0 stamped, 1 refused
|
||||
// node lib/validators/intent-approval.mjs --resolve <project-dir | brief-file>
|
||||
// what `/trekbrief --approve` approves: {brief_path, project_dir, plan_command}; exit 1 = no brief
|
||||
|
||||
|
|
@ -43,15 +43,12 @@ import { existsSync, readFileSync, renameSync, statSync, writeFileSync } from 'n
|
|||
import { basename, dirname, join } from 'node:path';
|
||||
import { parseDocument } from '../util/frontmatter.mjs';
|
||||
import { issue } from '../util/result.mjs';
|
||||
import { emit } from '../stats/event-emit.mjs';
|
||||
import { resolveStatsDir } from '../stats/stats-append.mjs';
|
||||
import { isMain } from '../util/is-main.mjs';
|
||||
|
||||
export const INTENT_HASH_FIELD = 'intent_approved_hash';
|
||||
export const INTENT_APPROVED_AT_FIELD = 'intent_approved_at';
|
||||
export const INTENT_SECTIONS = Object.freeze(['Intent', 'Goal']);
|
||||
const HASH_RE = /^sha256:[0-9a-f]{64}$/;
|
||||
const STATS_FILENAME = 'trekexecute-stats.jsonl'; // where event-emit writes lifecycle events
|
||||
|
||||
const APPROVE_HINT = 'Run /trekbrief --approve <project-dir | brief-file> — the operator reads ## Intent + ## Goal and answers "Approve".';
|
||||
|
||||
|
|
@ -200,18 +197,6 @@ export function stampIntentApproval(text, now = new Date()) {
|
|||
return { stamped: true, text: out, hash, approvedAt };
|
||||
}
|
||||
|
||||
/**
|
||||
* Where the brief-approved record goes. CLAUDE_PLUGIN_DATA when the harness
|
||||
* provides it; otherwise the plugin data dir the hooks write to and
|
||||
* scripts/yardstick.mjs reads — the Bash tool env carries no CLAUDE_PLUGIN_DATA.
|
||||
* event-emit's fallback used to be a silent skip, which is how brief-approved
|
||||
* reached 0 records; it now resolves the same directory. One resolver for every
|
||||
* stats writer: lib/stats/stats-append.mjs.
|
||||
*/
|
||||
export function resolveApprovalDataDir(env = process.env) {
|
||||
return resolveStatsDir(env);
|
||||
}
|
||||
|
||||
/**
|
||||
* What `/trekbrief --approve <arg>` approves. A directory means `<dir>/brief.md`
|
||||
* (a /trekplan --project brief); a file is itself (a /trekplan --brief brief,
|
||||
|
|
@ -278,12 +263,8 @@ if (isMain(import.meta.url)) {
|
|||
const tmp = join(dirname(file), `.${basename(file)}.approve.tmp`);
|
||||
writeFileSync(tmp, s.text);
|
||||
renameSync(tmp, file);
|
||||
const fm = parseDocument(s.text).parsed.frontmatter || {};
|
||||
const record = emit('brief-approved',
|
||||
{ project: dirname(file), slug: fm.slug ?? null, intent_hash: s.hash },
|
||||
{ path: join(resolveApprovalDataDir(), STATS_FILENAME) });
|
||||
process.stdout.write(JSON.stringify({
|
||||
stamped: true, intent_hash: s.hash, approved_at: s.approvedAt, record,
|
||||
stamped: true, intent_hash: s.hash, approved_at: s.approvedAt,
|
||||
}) + '\n');
|
||||
process.exit(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue