Skip to content

fix(cli): init then: names plan --probe, or the placeholder repair - #1297

Merged
Birfy merged 1 commit into
mainfrom
agent/1295-init-then-probe
Nov 27, 2026
Merged

Birfy merged 1 commit into
mainfrom
agent/1295-init-then-probe

Conversation

@Birfy

@Birfy Birfy commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Closes #1295

Base: 23b1b1e
Tip SHA: a7dc87a

What changed

On tip 23b1b1eb, #1294 and earlier first-run work already named plan <spec> --probe on algorithms run, a successful plan, the demo footers, and the README / start / plugin-quickstart blocks. A successful init — the command those footers tell a new user to run — still ended with the short follow-up:

then: agentdescent plan /path/spec.json

--json next was the same short line. Following it skipped the preflight every other first-run surface has been teaching since #1218 / #1232. When --model / --base-url were omitted, init exited 0, warned that plan would refuse the placeholders, and then immediately recommended that failing plan.

write_starter_spec now appends then: agentdescent plan <spec> --probe when the written spec is plan-ready, and a repair line (re-run with --model / --base-url, or fill the placeholders in <spec>, then agentdescent plan <spec> --probe) when placeholders remain. policy_slot / missing-cases next: lines are unchanged. No model name is guessed. init still does not plan.

changelog.d/1295-init-then-probe.md.

No change to the placeholder-refusal behaviour of init / plan.

Verification

Tip SHA: a7dc87a

Ran:

  • pytest -q -o addopts='' tests/test_cli_init_policy_slot.py tests/test_cli_json_errors.py tests/test_first_run_caps.py → 59 passed
  • pytest -q -o addopts='' tests/test_init_default_agent.py tests/test_init_key_aware_reflect.py tests/test_init_doctor_opencode_ark.py tests/test_guess_kind_skill_library.py tests/test_skill_library_kind.py tests/test_cli_skill_library_seed.py tests/test_init_data_columns.py tests/test_init_honor_agent.py → 141 passed
  • python -m tools.changelog_fragments check → 53 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix is the line

@github-actions github-actions Bot added risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff agent-pr Pull request opened by an agent labels Nov 27, 2026
@Birfy

Birfy commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Review (Birfy)

Tip SHA: a7dc87a
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1297 → T2 (package CLI plus tests and the changelog fragment)
  • pytest -q -o addopts='' tests/test_cli_init_policy_slot.py tests/test_cli_json_errors.py tests/test_first_run_caps.py at this tip → 59 passed
  • pytest -q -o addopts='' tests/test_init_default_agent.py tests/test_init_key_aware_reflect.py tests/test_init_doctor_opencode_ark.py tests/test_guess_kind_skill_library.py tests/test_skill_library_kind.py tests/test_cli_skill_library_seed.py tests/test_init_data_columns.py tests/test_init_honor_agent.py → 141 passed
  • python -m tools.changelog_fragments check → 53 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix on this tip is the line
    Findings:
  • No actionable defects. A successful init now names plan <spec> --probe in then: / --json next when the written spec is plan-ready, matching the preflight every other first-run surface already teaches. When placeholders remain, that line names --model / --base-url (or filling the placeholders) instead of a plan that would exit 2. policy_slot / missing-cases next: lines are unchanged. init still does not plan or guess a model. A bare init without the flags still writes placeholders and still exits 0 with the warning.
    Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 27, 2026 04:43
@Birfy
Birfy merged commit 224e552 into main Nov 27, 2026
12 checks passed
@Birfy
Birfy deleted the agent/1295-init-then-probe branch November 27, 2026 04:56
Birfy added a commit that referenced this pull request Nov 27, 2026
…art (#1298)

Closes #1296

Base: 224e552
Tip SHA: ae85e51

## What changed

On tip `224e5521`, #1294 / #1297 and earlier first-run work already
named `plan --probe` then a capped `evolve` on the CLI (`algorithms
run`, a successful `plan`, `init`, the demo footers, and the host
skills). MCP `algorithm_spec` — documented as the same verb as
`algorithms run` — still ended a successful call with:

```
next: show the user this estimate; after their yes, call start with `spec`
```

A host that follows the tool's own `next`, rather than the skill /
slash-command prose, would start the run unprobed and uncapped. A
related gap on the same Path A surface: MCP `plan(spec)` with the
default `probe=false` returned `ok: true` and no `next` field at all,
while the CLI counterpart already names `plan --probe`, then `evolve
--max-calls N`.

A successful `algorithm_spec` now returns a `next` that names
`plan(spec, probe=true)` and `start` with `max_calls` from
`estimate.agent_calls_upper_bound` (or `<N>` when no bound is known). A
successful MCP `plan` without `probe` returns a `next` in the same
shape. The plan tool description mentions this `next`. No model name is
guessed. `algorithm_spec` still does not probe itself.

`changelog.d/1296-mcp-algorithm-spec-next.md`.

No change to the probe-refusal contract (`ok: false`, `ready: false`,
repair `next`). CLI `algorithms run --json` is unchanged.

## Verification

Tip SHA: ae85e51

Ran:
- `pytest -q -o addopts='' tests/test_mcp_algorithm_spec.py
tests/test_mcp_plan_probe.py
tests/test_mcp_algorithm_spec_default_out.py
tests/test_mcp_algorithm_spec_target_dir.py tests/test_first_run_caps.py
tests/test_mcp.py` → 95 passed
- `pytest -q -o addopts='' tests/test_mcp_call_limit.py
tests/test_connection_kwargs.py tests/test_cli_algorithms_run.py` → 81
passed (together with the algorithm_spec file already counted above)
- `python -m tools.changelog_fragments check` → 54 changelog fragment(s)
OK
  - `python -m tools.gen_api_docs --check` → docs/api.md is up to date
Not run:
  - Full offline suite locally — the CI test matrix is the line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli: successful init still says then: plan <spec>, omitting --probe that every other first-run surface names

1 participant