Skip to content

fix(cli): algorithms show names the algorithms run recipe with --model and --base-url - #1294

Merged
Birfy merged 1 commit into
mainfrom
agent/1293-show-run-recipe
Nov 26, 2026
Merged

Birfy merged 1 commit into
mainfrom
agent/1293-show-run-recipe

Conversation

@Birfy

@Birfy Birfy commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #1293

Base: d7dccf5
Tip SHA: eeb4342

What changed

On tip d7dccf5, #1292 already named --model <model> [--base-url <url>] on leftover algorithms run refusal and kind-mismatch hints. The card a user or host looks at before running a method still did not:

  • algorithms show NAME (and --json) printed summary, kinds, params and docs, but no copyable algorithms run line.
  • MCP describe_algorithm (and list_algorithms, which already uses describe()) returned the same object, so a host that listed a card still had to invent the Path A verb and the flags plan requires.

Algorithm.describe() now carries run, in the same recipe shape #1276 / #1292 already use, with a kind-aware target placeholder (<your-prompt.txt> for text-only cards, <your-skill-library> for a skill-library-only card, <your-skill-dir> when every kind is a directory, <path> when kinds mix text and directories). _algorithm_card_text prints it as a run: line. The describe_algorithm tool description names the field. No model name is guessed.

changelog.d/1293-show-run-recipe.md.

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

Verification

Tip SHA: eeb4342

Ran:

  • pytest -q -o addopts='' tests/test_algorithms.py tests/test_mcp.py tests/test_cli_algorithms_run.py tests/test_first_run_caps.py tests/test_demo.py → 128 passed, 6 skipped
  • python -m tools.changelog_fragments check → 52 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 26, 2026
@Birfy

Birfy commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Review (Birfy)

Tip SHA: eeb4342
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1294 → T2 (package CLI, algorithm card text, MCP tool description, plus tests and the changelog fragment)
  • pytest -q -o addopts='' tests/test_algorithms.py tests/test_mcp.py tests/test_cli_algorithms_run.py tests/test_first_run_caps.py tests/test_demo.py at this tip → 128 passed, 6 skipped
  • python -m tools.changelog_fragments check → 52 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. algorithms show, describe() and MCP describe_algorithm (and list_algorithms, which already uses describe()) now name a copyable algorithms run recipe with --model and --base-url, in the same shape fix(plugins): first-run algorithms run recipes name --model and --base-url #1276 / fix(cli): leftover algorithms run refusal recipes name --model and --base-url #1292 already put on first-run recipes. A bare algorithms run without those flags still refuses placeholders. No model name is guessed.
    Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 26, 2026 22:33
@Birfy
Birfy merged commit 23b1b1e into main Nov 26, 2026
12 checks passed
@Birfy
Birfy deleted the agent/1293-show-run-recipe branch November 26, 2026 22:59
Birfy added a commit that referenced this pull request Nov 27, 2026
…1297)

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
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: algorithms show and describe_algorithm omit the algorithms run recipe with --model / --base-url

1 participant