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

@ -17,9 +17,9 @@ external research could provide alone.
specialized agents, each seeing only what they need. The value is in triangulation
(cross-checking local vs. external) and synthesis (insights from combining both).
**Pipeline integration:** Research briefs feed into ultraplan via `--research`:
**Pipeline integration:** Research briefs feed into trekplan via `--research`:
```
/ultraresearch-local <question> → brief → /ultraplan-local --research <brief> <task>
/trekresearch <question> → brief → /trekplan --research <brief> <task>
```
## Phase 1 — Parse mode and validate input
@ -43,14 +43,14 @@ Supported flags:
is always foreground as of v2.4.0. Set **execution = foreground** (the
only mode).
5. `--project <dir>` — attach this research to an ultrabrief project folder.
5. `--project <dir>` — attach this research to an trekbrief project folder.
The brief will be written to `{dir}/research/{NN}-{slug}.md` (auto-incremented
index) instead of the default `.claude/research/` path. Set **project_dir = {dir}**.
If `{dir}` does not exist:
```
Error: project directory not found: {dir}
Run /ultrabrief-local first to create it.
Run /trekbrief first to create it.
```
Create `{dir}/research/` if it does not already exist.
@ -75,12 +75,12 @@ After stripping flags, the remaining text is the **research question**.
If no research question is provided, output usage and stop:
```
Usage: /ultraresearch-local <research question>
/ultraresearch-local --quick <research question>
/ultraresearch-local --local <research question>
/ultraresearch-local --external <research question>
/ultraresearch-local --fg <research question>
/ultraresearch-local --project <dir> [--external|--local|--quick|--fg] <research question>
Usage: /trekresearch <research question>
/trekresearch --quick <research question>
/trekresearch --local <research question>
/trekresearch --external <research question>
/trekresearch --fg <research question>
/trekresearch --project <dir> [--external|--local|--quick|--fg] <research question>
Modes:
default Interview → foreground research (local + external) → brief
@ -88,17 +88,17 @@ Modes:
--local Only codebase analysis agents (skip external + Gemini)
--external Only external research agents (skip codebase analysis)
--fg No-op alias (foreground is the only mode as of v2.4.0)
--project Write brief into an ultrabrief project folder (auto-indexed)
--project Write brief into an trekbrief project folder (auto-indexed)
Flags can be combined: --local, --external --quick, --project <dir> --external
Examples:
/ultraresearch-local Should we migrate from Express to Fastify?
/ultraresearch-local --quick What auth libraries are popular for Node.js?
/ultraresearch-local --local How is error handling structured in this codebase?
/ultraresearch-local --external What are the security implications of using Redis for sessions?
/ultraresearch-local --fg --local What patterns does this codebase use for database access?
/ultraresearch-local --project .claude/projects/2026-04-18-jwt-auth --external What JWT library is best for Node.js?
/trekresearch Should we migrate from Express to Fastify?
/trekresearch --quick What auth libraries are popular for Node.js?
/trekresearch --local How is error handling structured in this codebase?
/trekresearch --external What are the security implications of using Redis for sessions?
/trekresearch --fg --local What patterns does this codebase use for database access?
/trekresearch --project .claude/projects/2026-04-18-jwt-auth --external What JWT library is best for Node.js?
```
Do not continue past this step if no question was provided.
@ -119,7 +119,7 @@ If **project_dir is set**:
- Brief destination: `{project_dir}/research/{NN}-{slug}.md`
If **project_dir is not set**:
- Brief destination: `.claude/research/ultraresearch-{YYYY-MM-DD}-{slug}.md`
- Brief destination: `.claude/research/trekresearch-{YYYY-MM-DD}-{slug}.md`
Store as `brief_destination` for use in later phases.
@ -127,7 +127,7 @@ Store as `brief_destination` for use in later phases.
Use `AskUserQuestion` to clarify the research question. Ask **one question at a time**.
The interview is shorter than ultraplan's (2-4 questions, not 3-8) because research
The interview is shorter than trekplan's (2-4 questions, not 3-8) because research
is more focused than planning.
### Interview flow
@ -292,7 +292,7 @@ other agents — the value of Gemini is independence.
- Launch ALL selected agents **in parallel** in a single message
- Use model: "sonnet" for all sub-agents (the orchestrator runs on Opus)
- Scale maxTurns by codebase size for local agents (same as ultraplan):
- Scale maxTurns by codebase size for local agents (same as trekplan):
small = halved, medium/large = default
- convention-scanner: medium+ codebases only (50+ files)
@ -308,7 +308,7 @@ If no gaps exist, skip: "Initial research sufficient — no follow-ups needed."
## Phase 6 — Triangulation
This is the KEY phase that makes ultraresearch more than aggregation.
This is the KEY phase that makes trekresearch more than aggregation.
For each research dimension:
@ -346,7 +346,7 @@ Write the research brief following the template. Key rules:
Generate the slug from the research question (first 3-4 meaningful words).
Write the brief to the `brief_destination` computed in Phase 1:
- With `--project`: `{project_dir}/research/{NN}-{slug}.md`
- Without `--project`: `.claude/research/ultraresearch-{YYYY-MM-DD}-{slug}.md`
- Without `--project`: `.claude/research/trekresearch-{YYYY-MM-DD}-{slug}.md`
Create the parent directory if it does not exist.
@ -378,8 +378,8 @@ Present a summary to the user:
You can:
- Read the full brief at {brief_destination}
- If `--project` was used: run `/ultraplan-local --project {project_dir}` when all research topics are complete
- Otherwise: `/ultraplan-local --research {brief_destination} --brief <your-brief.md>`
- If `--project` was used: run `/trekplan --project {project_dir}` when all research topics are complete
- Otherwise: `/trekplan --research {brief_destination} --brief <your-brief.md>`
- Ask follow-up questions about specific findings
```
@ -413,7 +413,7 @@ If `${CLAUDE_PLUGIN_DATA}` is not set or not writable, skip tracking silently.
## Hard rules
- **No planning:** This command produces research briefs, not implementation plans.
If the user asks to plan, direct them to `/ultraplan-local --research <brief>`.
If the user asks to plan, direct them to `/trekplan --research <brief>`.
- **Sources required:** Every claim must cite a source. No unsourced findings.
- **Independence:** Do not pre-bias external agents with local findings or vice versa.
Triangulate AFTER independent research.