voyage/tests/fixtures/synthesis/exploration/task-finder.md
Kjell Tore Guttormsen 6b30483304 feat(voyage): S12 — NW3 synthesis-agent built + measured → declined per measurement [skip-docs]
NW3 (CC-26 §6 PoC): delegate trekplan Phase 7 synthesis to a synthesis-agent,
adopt only if Δ main-context ≥30% with no quality loss. Operator chose the
deterministic-proof path (live ≥3-run bake-off was env-blocked: no API key;
installed plugin is a cache copy so a new agent is invisible to `claude -p`).

Decisive structural finding: trekplan Phase 5 runs the swarm FOREGROUND, so its
outputs are already resident in main before Phase 7. Delegating only Phase 7
evicts nothing → Δ_faithful = 0% (BASE-independent). The ≥30% saving needs an
out-of-scope Phase-5 redesign (swarm-writes-to-disk / nested orchestrator).
VERDICT: DECLINED per measurement.

- agents/synthesis-agent.md — dormant, schema-conformant deliverable (NOT wired)
- lib/plan/synthesis-digest-schema.mjs — digest output contract (+ tests)
- scripts/synthesis-measure.mjs — deterministic Δ-accounting core (+ tests)
- tests/fixtures/synthesis/ — 7 exploration outputs + representative digest
- docs/T1-synthesis-poc-results.md — measurement + verdict (reproducible)
- CLAUDE.md — agent table row (doc-consistency: 24 agents)

Tests 670 → 695 (693 pass / 2 skip / 0 fail). `claude plugin validate` clean
(only the pre-existing root-CLAUDE.md warning). commands/trekplan.md untouched.

[skip-docs] rationale: no user-facing feature ships (NW3 declined; agent dormant
and unwired). The substantive doc is docs/T1-synthesis-poc-results.md; the
README/CHANGELOG roll-up for NW1–NW3 is the S13 coordinated release per
docs/W1-narrow-wins-plan.md §S13.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqBYc8Ltrk7LipyJmGxXiB
2026-06-18 17:58:39 +02:00

36 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Task-Relevant Code — output of task-finder
Task: Add a per-wave concurrency cap to trekexecute headless launches.
## Direct hits
| File | Lines | Why relevant |
|------|-------|--------------|
| `templates/headless-launch-template.md` | ~1060 | The Bash fan-out: backgrounds each wave member, `wait`s on PIDs. Edit site for slot-limiting. |
| `commands/trekexecute.md` | Phase 2.6 | Prose that generates the launch batches; where a `--max-parallel` flag + profile lookup would be documented. |
| `lib/profiles/` | resolver dir | Profiles already carry per-phase knobs; a `max_parallel` default fits the existing `phase_signals`/profile lookup order. |
| `lib/util/result.mjs` | 33 | `issue()` — the error shape a `maxParallel` resolver returns on bad input. |
## Reuse candidates
- **arg-parser** (`lib/parsers/arg-parser.mjs`, per tests/lib/arg-parser.test.mjs)
already parses `--flag value` pairs for the commands. A `--max-parallel <n>`
flag plugs into the existing parser; do not hand-roll parsing.
- **profile-resolver** (`lib/profiles/`, profile-resolver.test.mjs) is the lookup
order CLI-flag → brief signal → profile → default. A concurrency default
belongs as a profile field consumed through this same resolver.
- **autonomy-gate** (`lib/` autonomy-gate.test.mjs) shows the established pattern
for "bounded integer with a safe default" — mirror its clamp/validate.
## Existing similar solutions
`scripts/q3-cache-prefix-experiment.mjs` spawns children **sequentially** to
avoid spawn-burst rate-limits — confirms the project already knows unbounded
fan-out is a risk and chose a manual bound there. A cap generalises that
instinct to the headless wave path.
## Models / config
No DB. Config lives in `settings.json` (`trekplan`/`trekresearch` scopes only —
doc-consistency pins this) and per-run profiles. A `max_parallel` knob should
ride the profile system, not add a new settings.json scope.