feat(voyage)!: bulk content rewrite ultra -> voyage/trek prose [skip-docs]

Sed-pipeline (16 patterns, longest-match-first) sweeper residuelle ultra*-treff
i prose, command-narrativ, agent-prompts, hook-kommentarer, doc-prosa.

Pipeline-utvidelser fra V4-prompten:
- BSD-syntax [[:<:]]ultra[[:>:]] istedenfor \bultra\b (BSD sed mangler \b)
- 6 compound-patterns for ultraplan/ultraexecute/ultraresearch/ultrabrief/
  ultrareview/ultracontinue uten -local-suffiks
- ultra*-stats glob -> trek*-stats glob
- Linje-eksklusjon redusert til ultra-cc-architect (Q8); session-state-
  eksklusjonen var over-protektiv
- File-eksklusjon utvidet til settings.json, package.json, plugin.json,
  hele .claude/-treet (gitignored + V5-territorium)

Q8-undantak holdt: architecture-discovery.mjs + project-discovery.mjs urort.
Filnavn-konvensjon holdt: .session-state.local.json + *.local.* preservert.

Manuell narrative-fix: tests/lib/agent-frontmatter.test.mjs linje 10
mangled "/ultra*-local" til "/voyage*-local" (ingen slik kommando finnes);
korrigert til "/trek*".

Residualer utenfor scope (V5 handterer): package.json + .claude-plugin/
plugin.json (Step 12-14 versjons-bump). .claude/* er gitignored
spec-historikk med tilsiktet BEFORE/AFTER-narrativ.

Part of voyage-rebrand session 3 (Wave 4 / Step 10).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-05 15:08:20 +02:00
commit 14ecda886c
81 changed files with 672 additions and 672 deletions

View file

@ -1,8 +1,8 @@
// tests/commands/ultracontinue.test.mjs
// Regression tests for /ultracontinue-local (commands/ultracontinue-local.md).
// tests/commands/trekcontinue.test.mjs
// Regression tests for /trekcontinue (commands/trekcontinue.md).
//
// Steps 2 + 4 of the v3.4.1 hot-fix plan
// (project 2026-05-04-v3.3.1-ultracontinue-fixes).
// (project 2026-05-04-v3.3.1-trekcontinue-fixes).
//
// Pattern mix:
// - Pattern B (tmp-dir, mkdtempSync + try/finally) — fixture builds
@ -64,10 +64,10 @@ function completedState(updatedAtIso) {
// Step 2 — Bug 1 regression tests (SC-1, SC-2)
// ---------------------------------------------------------------
test('ultracontinue Bug 1 — Phase 1 documents auto-discovery sort by Date.parse(updated_at) DESC', () => {
test('trekcontinue Bug 1 — Phase 1 documents auto-discovery sort by Date.parse(updated_at) DESC', () => {
// Fixture-builds two project dirs and verifies our chosen sort key
// matches what Phase 1 prose documents.
const root = mkdtempSync(join(tmpdir(), 'ultracontinue-disc-'));
const root = mkdtempSync(join(tmpdir(), 'trekcontinue-disc-'));
try {
const projectsRoot = join(root, '.claude', 'projects');
mkdirSync(join(projectsRoot, '2026-05-04-fixture-a'), { recursive: true });
@ -103,7 +103,7 @@ test('ultracontinue Bug 1 — Phase 1 documents auto-discovery sort by Date.pars
}
});
test('ultracontinue Bug 1 — Phase 0 dispatches via parsed flags, not substring contains', () => {
test('trekcontinue Bug 1 — Phase 0 dispatches via parsed flags, not substring contains', () => {
const phase0 = extractPhase(readCommand(), '## Phase 0 ');
// Must NOT use the legacy "contains --help or -h" substring dispatch.
assert.doesNotMatch(
@ -121,7 +121,7 @@ test('ultracontinue Bug 1 — Phase 0 dispatches via parsed flags, not substring
);
});
test('ultracontinue Bug 1 — Phase 1 documents empty-args path explicitly to auto-discovery', () => {
test('trekcontinue Bug 1 — Phase 1 documents empty-args path explicitly to auto-discovery', () => {
const phase1 = extractPhase(readCommand(), '## Phase 1 ');
// Some explicit text mentioning the empty / whitespace path so a future reader
// can't misread Phase 0 as "fall through to usage on empty".
@ -137,7 +137,7 @@ test('ultracontinue Bug 1 — Phase 1 documents empty-args path explicitly to au
);
});
test('ultracontinue Bug 1 sub — Phase 1 emits SC-2 diagnostic for .md positional arg', () => {
test('trekcontinue Bug 1 sub — Phase 1 emits SC-2 diagnostic for .md positional arg', () => {
const phase1 = extractPhase(readCommand(), '## Phase 1 ');
// SC-2 verbatim diagnostic strings.
assert.match(
@ -162,7 +162,7 @@ test('ultracontinue Bug 1 sub — Phase 1 emits SC-2 diagnostic for .md position
// Step 4 — Bug 2 regression tests (SC-3)
// ---------------------------------------------------------------
test('ultracontinue Bug 2 — pre-bash-executor ALLOWS resolved validator invocation', async () => {
test('trekcontinue Bug 2 — pre-bash-executor ALLOWS resolved validator invocation', async () => {
// (d-1) Sanity-check that the planned Phase 2 Bash form (validator
// invocation with a concrete absolute path) is not blocked by the
// marketplace pre-bash-executor hook chain.
@ -175,7 +175,7 @@ test('ultracontinue Bug 2 — pre-bash-executor ALLOWS resolved validator invoca
// Step 8 — Bug 3 regression test (Phase 1.5 consistency wire-up)
// ---------------------------------------------------------------
test('ultracontinue Bug 3 — Phase 1.5 documents consistency check between Phase 1 and Phase 2', () => {
test('trekcontinue Bug 3 — Phase 1.5 documents consistency check between Phase 1 and Phase 2', () => {
const cmd = readCommand();
// Phase 1.5 must exist literally in the prose between Phase 1 and Phase 2.
assert.match(cmd, /## Phase 1\.5 /, 'Phase 1.5 header must be present');
@ -187,8 +187,8 @@ test('ultracontinue Bug 3 — Phase 1.5 documents consistency check between Phas
'Phase 1.5 must appear before Phase 2');
});
test('ultracontinue Bug 3 (e) — CLI consistency mode flags producer mismatch in JSON output', () => {
const root = mkdtempSync(join(tmpdir(), 'ultracontinue-fm-'));
test('trekcontinue Bug 3 (e) — CLI consistency mode flags producer mismatch in JSON output', () => {
const root = mkdtempSync(join(tmpdir(), 'trekcontinue-fm-'));
try {
const projectDir = join(root, '.claude', 'projects', '2026-05-04-fixture-c');
mkdirSync(projectDir, { recursive: true });
@ -207,7 +207,7 @@ test('ultracontinue Bug 3 (e) — CLI consistency mode flags producer mismatch i
}, null, 2),
);
// Project-dir prompt: produced_by ultraexecute-local at T-1
// Project-dir prompt: produced_by trekexecute at T-1
const projectPrompt = join(projectDir, 'NEXT-SESSION-PROMPT.local.md');
writeFileSync(projectPrompt,
'---\nproduced_by: trekexecute\nproduced_at: 2026-05-04T15:30:00.000Z\n---\n\n# Session 2\n');
@ -245,7 +245,7 @@ test('ultracontinue Bug 3 (e) — CLI consistency mode flags producer mismatch i
}
});
test('ultracontinue Bug 2 — Phase 2 contains no {state-file-path} or any {curly-template} placeholder', () => {
test('trekcontinue Bug 2 — Phase 2 contains no {state-file-path} or any {curly-template} placeholder', () => {
// (d-2) Pattern D structure test. The fix must eliminate the
// {state-file-path} placeholder and any other {anything} curly-brace
// template syntax from Phase 2 — substitution failures are the
@ -272,7 +272,7 @@ test('ultracontinue Bug 2 — Phase 2 contains no {state-file-path} or any {curl
// Step 10 — Bug 4 regression tests (Phase 0.5 wire-up + cleanup f-1/f-2/f-3)
// ---------------------------------------------------------------
test('ultracontinue Bug 4 — Phase 0.5 documents cleanup mode dispatch', () => {
test('trekcontinue Bug 4 — Phase 0.5 documents cleanup mode dispatch', () => {
const cmd = readCommand();
assert.match(cmd, /## Phase 0\.5 /, 'Phase 0.5 header must be present');
// Phase 0.5 must come BETWEEN Phase 0 and Phase 1.
@ -288,9 +288,9 @@ test('ultracontinue Bug 4 — Phase 0.5 documents cleanup mode dispatch', () =>
assert.match(cmd, /--cleanup --confirm/, 'usage must mention --cleanup --confirm');
});
test('ultracontinue Bug 4 (f-1) dry-run lists candidates without deleting', async () => {
test('trekcontinue Bug 4 (f-1) dry-run lists candidates without deleting', async () => {
const { cleanupProject } = await import('../../lib/util/cleanup.mjs');
const root = mkdtempSync(join(tmpdir(), 'ultracontinue-cleanup-'));
const root = mkdtempSync(join(tmpdir(), 'trekcontinue-cleanup-'));
try {
const dir = join(root, 'project-completed');
mkdirSync(dir, { recursive: true });
@ -314,10 +314,10 @@ test('ultracontinue Bug 4 (f-1) dry-run lists candidates without deleting', asyn
}
});
test('ultracontinue Bug 4 (f-2) confirm deletes and (f-3) idempotent re-run handles already-clean dir', async () => {
test('trekcontinue Bug 4 (f-2) confirm deletes and (f-3) idempotent re-run handles already-clean dir', async () => {
const { cleanupProject } = await import('../../lib/util/cleanup.mjs');
const { existsSync } = await import('node:fs');
const root = mkdtempSync(join(tmpdir(), 'ultracontinue-cleanup-'));
const root = mkdtempSync(join(tmpdir(), 'trekcontinue-cleanup-'));
try {
const dir = join(root, 'project-completed');
mkdirSync(dir, { recursive: true });