feat(ultraplan-local)!: v2.4.0 — commands default to foreground

Remove background-transition phases from /ultraresearch-local,
/ultraplan-local, /ultra-cc-architect-local, /ultrabrief-local.
All four commands now run their full pipelines inline in main
context; --fg is retained as a no-op alias for backwards
compatibility.

The Claude Code harness does not expose the Agent tool to
sub-agents, so orchestrators launched with run_in_background:true
cannot spawn their documented swarms (docs-researcher,
community-researcher, architecture-mapper, plan-critic, etc.) and
silently degrade to single-context reasoning. Foreground execution
keeps the swarms intact.

Source: github.com/anthropics/claude-code/issues/19077
Confirmed empirically 2026-04-19.

BREAKING CHANGE: Default execution is foreground — the session
blocks until the brief/plan is ready. Use `claude -p` in a
separate terminal for long-running headless work.
This commit is contained in:
Kjell Tore Guttormsen 2026-04-19 21:23:02 +02:00
commit 4bba65cddf
4 changed files with 105 additions and 173 deletions

View file

@ -48,8 +48,9 @@ Parse `$ARGUMENTS` for flags. Ordered precedence:
Sett **architecture_dir = {dir}/architecture/** — opprettes i
Phase 2 hvis den mangler.
2. **`--fg`** — foreground. Alle faser inline. Default er background
via `architect-orchestrator`. Sett **execution = foreground**.
2. **`--fg`** — no-op alias beholdt for bakoverkompatibilitet. Alle faser
kjører alltid inline i main-kontekst som av v2.4.0. Sett
**execution = foreground** (eneste modus).
3. **`--quick`** — hopp over Phase 6 (adversarial review). Sett
**mode = quick**.
@ -66,8 +67,8 @@ Usage: /ultra-cc-architect-local --project <dir> [--fg] [--quick] [--no-gaps]
A project directory is required. Run /ultrabrief-local first to create one.
Modes:
default Background via architect-orchestrator → overview.md + gaps.md
--fg All phases in foreground (blocks session)
default Foreground pipeline → overview.md + gaps.md
--fg No-op alias (foreground is the only mode as of v2.4.0)
--quick Skip adversarial review (no architecture-critic pass)
--no-gaps Do not write gaps.md (gap-section stays inside overview.md)
@ -101,61 +102,41 @@ Glob `{project_dir}/research/*.md`. Lagre liste som
### Rapporter detektert modus
```
Mode: {default | foreground}{, quick}{, no-gaps}
Mode: foreground{, quick}{, no-gaps}
Project: {project_dir}
Brief: {brief_path} ({brief_quality})
Research: {N} files detected
```
## Phase 2 — Background transition
**Hvis execution = foreground:** hopp over denne fasen. Fortsett inline
fra Phase 3.
**Hvis execution = default (background):**
## Phase 2 — Forbered output-mappe (foreground)
Opprett `{architecture_dir}` hvis den ikke eksisterer (`mkdir -p`).
Launch the **architect-orchestrator** agent with this prompt:
Rapporter til brukeren:
```
Brief file: {brief_path}
Project dir: {project_dir}
Architecture dir: {architecture_dir}
Research briefs: {comma-separated research_paths, or "none"}
Skill catalog root: ${CLAUDE_PLUGIN_ROOT}/skills/cc-architect-catalog
Plugin root: ${CLAUDE_PLUGIN_ROOT}
Mode: {default | quick}{, no-gaps if set}
Read the brief and every research brief. Execute your full workflow.
Write overview.md to the architecture dir. Write gaps.md unless mode
includes no-gaps.
```
Launch via Agent-tool med `run_in_background: true`, `subagent_type:
architect-orchestrator`.
Deretter output til bruker og **stopp ditt svar**:
```
Background architecture run started via architect-orchestrator.
Architecture pipeline running in foreground.
Project: {project_dir}
Brief: {brief_path}
Research: {N} briefs
Output: {architecture_dir}/overview.md (+ gaps.md)
You will be notified when the architecture note is ready.
You can continue working on other tasks in the meantime.
```
Ikke vent på orchestratoren. Ikke fortsett til Phase 3.
architect-orchestrator håndterer Phase 37 autonomt.
Fortsett deretter inline til neste fase.
> **Hvorfor foreground?** Som av v2.4.0 spawnes `architect-orchestrator`
> ikke lenger som en background-agent. Claude Code-harnessen eksponerer
> ikke Agent-tool til sub-agenter, så en orchestrator startet med
> `run_in_background: true` kan ikke spawne `feature-matcher` /
> `gap-identifier` / `architecture-critic`-swarm og degraderer stille til
> enkelt-kontekst-resonnering. Å kjøre fasene inline i main-kontekst holder
> swarm-en intakt. Bruk `claude -p` i et separat terminal-vindu for
> langvarige headless-kjøringer.
---
**Alt under denne linjen kjører enten i foreground-modus eller inne i
background-agenten. Instruksjonene er identiske uavhengig av kontekst.**
**Alle resterende faser kjører inline i hovedkommandoens kontekst.**
---