Repository navigation
Description
What happens
On tip 23b1b1eb (0.11.0, after #1294), a successful agentdescent init still ends with a next step that omits --probe.
algorithms run, a successful plan, the default / --kind / --algorithm demo footers, MCP demo.next, and the README / docs/start.md / docs/plugin-quickstart.md first-run blocks all name plan <spec> --probe, then evolve --max-calls <N>. init is the command those footers tell a new user to run, but its own follow-up does not:
wrote /path/spec.json
then: agentdescent plan /path/spec.json
--json is the same short line:
"next": ["agentdescent plan /path/spec.json"]Following that line skips the preflight every other first-run surface has been teaching since #1218 / #1232: a dead key, endpoint, model or subscription is only found inside evolve (or never, if the user also skips --max-calls). init cannot yet know N — it does not plan — but it can still name --probe on the plan it recommends, the same way the demo footer already does.
When --model / --base-url are omitted, the gap is sharper. init exits 0, warns that plan will refuse the placeholders, and then immediately prints then: agentdescent plan <spec> — the command it just said will fail. (algorithms run without the flags is better: next: fix <spec>, then agentdescent plan <spec>.)
This is the same leftover-surface class as #1217 / #1232, now for init's own then: / --json next (hardcoded in agentdescent/cli.py as report.append(("then", f"agentdescent plan {out}"))).
Repro
Fresh clone of ThinkFlowLab/agentdescent at 23b1b1eb. pip install -e ".[mcp]". Isolated AGENTDESCENT_HOME so this does not touch a real host tree. A 12-case text fixture (the packaged demo --kind text tree is enough).
agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec.json \
--model m --base-url https://example.test/v1 --rounds 1 --workers 1
# exit 0; then: agentdescent plan /abs/spec.json
agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec.json \
--model m --base-url https://example.test/v1 --rounds 1 --workers 1 --json
# "next": ["agentdescent plan /abs/spec.json"]
# the same short then: with --algorithm ace, and with --kind skill_library --algorithm evoskill
agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec-nomodel.json
# exit 0; warning that plan will refuse the placeholders
# then: agentdescent plan /abs/spec-nomodel.json
agentdescent plan spec-nomodel.json
# exit 2: agent.model / agent.default_base_url still '<your-model>' / '<your-endpoint-url>'By contrast, the same target through algorithms run (which also plans) already names the preflight and the cap:
next: agentdescent plan /abs/spec.json --probe, then agentdescent evolve /abs/spec.json --max-calls 19
Expected
- After a successful
initthat wrote a plan-ready spec,then:and--json nextshould beagentdescent plan <spec> --probe(optionally followed byevolve --max-calls <N>, with<N>from that plan). No model name is guessed. - When the written spec still has placeholders (or another condition
planwill refuse up front),then:/nextshould name the repair (--model/--base-url, or fill the placeholders), not aplanthat will exit 2. policy_slot/ missing-casesnext:lines stay as they are; only the finalthen: planline changes.
Suggested fix
- In
agentdescent/cli.py(_write_starter_spec/ thefollow_up == "plan"branch), append--probeto thethen: agentdescent plan {out}line when the spec is plan-ready. If_starter_model_warningsfired, pointthen:at filling--model/--base-url(or editing the placeholders) instead ofplan. - Update the tests that currently pin the short form:
tests/test_cli_init_policy_slot.py,tests/test_cli_json_errors.py, and add a pin intests/test_first_run_caps.py. changelog.d/<n>-init-then-probe.md.
No change to the placeholder-refusal behaviour of init / plan. init still does not plan or guess a model.
Acceptance
agentdescent init … --model m --base-url https://example.test/v1printsthen: agentdescent plan <spec> --probe, and--jsonnextcontains that same command.- The same line appears for
--algorithmand--kind skill_library. - A bare
initwithout the flags still writes placeholders, still exits 0 with the warning, and no longer tells the user toplanthat spec until the placeholders are filled. pytest -q -o addopts='' tests/test_cli_init_policy_slot.py tests/test_cli_json_errors.py tests/test_first_run_caps.pypasses, including the new pins.
Activity