Revert "feat(ultraplan-local): M0 — profile foundation, no behaviour change"

This reverts commit 0b28f008ae.
This commit is contained in:
Kjell Tore Guttormsen 2026-04-30 14:33:36 +02:00
commit ae5c784ce7
7 changed files with 1 additions and 989 deletions

View file

@ -91,12 +91,7 @@ Parse `$ARGUMENTS` for mode flags. Order of precedence:
7. **`--quick`** — set **mode = quick**. Skip agent swarm; use lightweight
Glob/Grep scan and go directly to planning + adversarial review.
8. **`--profile <name>`** — explicit profile selection. Overrides any
`recommended_profile` from the brief frontmatter. Set
**profile_override = {name}**. Validation of the profile happens in the
profile-resolution step below; an unknown name aborts with a clear error.
9. If neither `--brief` nor `--project` is present after flag parsing,
8. If neither `--brief` nor `--project` is present after flag parsing,
output usage and stop:
```
@ -105,7 +100,6 @@ Usage: /ultraplan-local --brief <path-to-brief.md>
/ultraplan-local --brief <path> --research <research-brief.md>
/ultraplan-local --project <dir> --fg
/ultraplan-local --project <dir> --quick
/ultraplan-local --project <dir> --profile <name>
/ultraplan-local --export <pr|issue|markdown|headless> <plan-path>
/ultraplan-local --decompose <plan-path>
@ -117,8 +111,6 @@ Modes:
--research Add up to 3 extra research briefs as planning context
--fg No-op alias (foreground is the only mode as of v2.4.0)
--quick Skip exploration agent swarm; plan directly
--profile Explicit profile (overrides brief's recommended_profile).
List available with: node profile-loader.mjs list
--export Generate shareable output from an existing plan (no new planning)
--decompose Split an existing plan into self-contained headless sessions
@ -127,7 +119,6 @@ Examples:
/ultraplan-local --brief .claude/projects/2026-04-18-jwt-auth/brief.md
/ultraplan-local --project .claude/projects/2026-04-18-jwt-auth --research extra.md
/ultraplan-local --project .claude/projects/2026-04-18-jwt-auth --fg
/ultraplan-local --project .claude/projects/2026-04-18-jwt-auth --profile default
/ultraplan-local --export pr .claude/plans/ultraplan-2026-04-06-rate-limiting.md
/ultraplan-local --decompose .claude/plans/ultraplan-2026-04-06-rate-limiting.md
@ -153,52 +144,12 @@ If `research_status == pending` and `research_topics > 0`:
- If cancel: print the research invocations from the brief's "How to continue"
section and stop.
### Resolve the profile
After reading the brief, determine which profile this plan run should use.
Profiles describe which exploration/review agents to spawn, which
adversarial regime to apply, and which catalog filter the architect should
use. The full schema lives in `${CLAUDE_PLUGIN_ROOT}/profiles/`; the loader
is `${CLAUDE_PLUGIN_ROOT}/scripts/profile-loader.mjs`.
Resolution order (highest precedence first):
1. **`--profile <name>` flag** — use it. If the profile cannot be loaded,
abort with a clear error listing available profiles:
```
Error: profile '{name}' not found.
Available: {comma-separated list from `profile-loader.mjs list`}.
Use --profile=default to fall back.
```
2. **Brief frontmatter `recommended_profile`** — if present, use it.
3. **Otherwise** — use `default`.
If the resolved profile name is `default`, Phase 5 keeps its existing
size/conditional logic (convention-scanner only for medium+, research-scout
only for unfamiliar tech). For non-default profiles (M2 onward), Phase 5
will run exactly the agents listed in `agents.exploration`. **In M0 only
`default` exists**, so resolution effectively always lands on `default` and
no behaviour changes.
Load the resolved profile:
```
node ${CLAUDE_PLUGIN_ROOT}/scripts/profile-loader.mjs load {profile_name}
```
Capture the JSON output into **profile** state. If the loader exits non-zero,
abort with the loader's error text.
Set **profile_source** to one of `flag | brief | default-fallback` for the
mode report below.
Report the detected mode:
```
Mode: {foreground | quick | export | decompose}
Brief: {brief_path}
Project: {project_dir or "-"}
Research: {N local briefs, M extra via --research}
Profile: {profile.name} (source: {profile_source})
```
## Phase 1.5 — Export (runs only when mode = export)