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

@ -5,25 +5,25 @@ argument-hint: "<next-brief-path> <next-label> | --help"
model: sonnet
---
# Ultraplan End-Session Local v1.0
# Voyage End-Session Local v1.0
Tiny helper for **informal** multi-session flows (no formal plan with
Execution Strategy). Writes a `.session-state.local.json` pointing at the
next session so `/ultracontinue` can resume in a fresh Claude chat.
next session so `/trekcontinue` can resume in a fresh Claude chat.
For formal flows (a plan produced by `/ultraplan-local --project`),
`/ultraexecute-local` Phase 8 already writes the state file — this helper
For formal flows (a plan produced by `/trekplan --project`),
`/trekexecute` Phase 8 already writes the state file — this helper
is unnecessary there. Use this command for ad-hoc release runs, manual
multi-session handovers, or any flow that does not run through
`/ultraexecute-local`.
`/trekexecute`.
Pipeline position:
```
... session N work ...
/ultraplan-end-session-local <brief> "<next-label>" → writes state
/trekendsession <brief> "<next-label>" → writes state
... session boundary, fresh chat ...
/ultracontinue → reads state, starts session N+1
/trekcontinue → reads state, starts session N+1
```
See **Handover 7** in `docs/HANDOVER-CONTRACTS.md` for the schema.
@ -34,11 +34,11 @@ If `$ARGUMENTS` contains `--help` or `-h`, print the usage block below and exit
cleanly. Do NOT proceed to any further phase.
```
/ultraplan-end-session-local — Mark current session done; point at next session.
/trekendsession — Mark current session done; point at next session.
Usage:
/ultraplan-end-session-local <next-brief-path> <next-label>
/ultraplan-end-session-local --help
/trekendsession <next-brief-path> <next-label>
/trekendsession --help
Both arguments are REQUIRED. No interactive prompt — headless-safe.
@ -51,10 +51,10 @@ Writes <project-dir>/.session-state.local.json with:
updated_at <now, ISO-8601>
Then validates via lib/validators/session-state-validator.mjs and prints
the same 3-line narration that /ultracontinue will show in the next session.
the same 3-line narration that /trekcontinue will show in the next session.
Example:
/ultraplan-end-session-local .claude/projects/2026-05-01-feature/brief.md "Session 2 of 3"
/trekendsession .claude/projects/2026-05-01-feature/brief.md "Session 2 of 3"
```
## Phase 1 — Resolve project directory
@ -82,12 +82,12 @@ If either is missing or empty:
```
Error: missing required args.
Usage: /ultraplan-end-session-local <next-brief-path> '<next-label>'
Usage: /trekendsession <next-brief-path> '<next-label>'
```
Print to stderr and exit 1. **No interactive prompt** — this keeps the helper
headless-safe (per brief NFR; addresses adversarial-review major #11). If you
want an interactive flow, use `/ultracontinue --help` to see the full pipeline.
want an interactive flow, use `/trekcontinue --help` to see the full pipeline.
## Phase 3 — Atomically write `.session-state.local.json` + sibling NEXT-SESSION-PROMPT.local.md
@ -129,7 +129,7 @@ const stateObj = { schema_version: 1, project: dir, next_session_brief_path: bri
const stateFile = path.join(dir, '.session-state.local.json');
atomicWriteJson(stateFile, stateObj);
const promptFile = path.join(dir, 'NEXT-SESSION-PROMPT.local.md');
const promptBody = '---\\nproduced_by: trekendsession\\nproduced_at: ' + now + '\\nproject: ' + dir + '\\n---\\n\\n# ' + label + '\\n\\nResume via /ultracontinue.\\n';
const promptBody = '---\\nproduced_by: trekendsession\\nproduced_at: ' + now + '\\nproject: ' + dir + '\\n---\\n\\n# ' + label + '\\n\\nResume via /trekcontinue.\\n';
writeFileSync(promptFile, promptBody);
console.log(stateFile);
console.log(promptFile);
@ -144,7 +144,7 @@ Validate the freshly-written state file:
!`node lib/validators/session-state-validator.mjs --json <project-dir>/.session-state.local.json`
```
If `valid: true`, print the success block matching `/ultracontinue` Phase 3
If `valid: true`, print the success block matching `/trekcontinue` Phase 3
narration (SC-8 cross-project consistency — same template both sides):
```
@ -154,7 +154,7 @@ Project: <project-dir>
Next session: <next-label>
Brief: <next-brief-path>
In a fresh Claude session, run /ultracontinue to resume.
In a fresh Claude session, run /trekcontinue to resume.
```
If `valid: false`, print the structured `errors[]` and exit 1. Investigate