Repository navigation
perf(agents): trigger-first, 600-char delegate-catalog description for cli-expert (-77.4%) - #324
Merged
Merged
Conversation
…first The frontmatter `description` is injected into the delegate catalog of every session, every turn -- pay-per-turn context. cli-expert's was 3,037 chars (759 est. tokens) and carried three `<example>`/`<commentary>` tutorial blocks, which are pay-per-turn tuition nobody reads at routing time. Rewrites it to the kp79 standard: trigger-first (first clause says WHEN, not WHAT), 600 chars, explicit USE WHEN / DO NOT USE WHEN, zero example blocks. 3,037 -> 600 chars, -80.2%. Fidelity: every routing fact in the stock description survives -- verified fact by fact in docs/lanes/x99c-catalog-app-cli/DONE-NOTE.md. Zero restorations were needed. The enumerated slash commands are covered by the superset clause "any slash command"; the three worked examples' routing facts (model switching, --output json in CI, sub-agent tool inheritance) are all stated directly. The new DO NOT USE WHEN clause is sourced from the agent body's own Boundaries section, not invented. Body is byte-identical to stock (md5 b229c3d9258265c012d074146c74ed8e both sides); `meta.name` and `model_role` unchanged. Only the description moved. validate-agents v1.8.0 on this branch: PASS WITH WARNINGS, 0 errors, 1 agent discovered. Stock carried 3 structural ERRORs (DESCRIPTION_EXCESSIVE, COMMENTARY_TAG_PRESENT, EXAMPLE_BLOCK_PRESENT), so this is FAIL -> PASS. The one remaining warning, NO_TOOLS_SECTION, is identical to stock and is a `tools:` question, not a description question -- deliberately left for a separate PR. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Brian Krabach (bkrabach)
force-pushed
the
lane/x99c-catalog-app-cli
branch
2 times, most recently
from
September 7, 2026 22:02
aa66d2c to
c3d16c7
Compare
Fidelity table, before/after char counts, body md5 both sides, the validate-agents branch verdict, and the $0 stock-vs-branch structural comparison for the cli-expert description change. Baseline is origin/main (2,659 chars), not the older fork point the lane worktree was cut from -- main had already dropped this description's `MUST be used for` block in 68c8cf4. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Brian Krabach (bkrabach)
force-pushed
the
lane/x99c-catalog-app-cli
branch
from
September 7, 2026 22:07
c3d16c7 to
5e1dba6
Compare
Brian Krabach (bkrabach)
marked this pull request as ready for review
September 7, 2026 22:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
The
descriptionin an agent's frontmatter is pay-per-turn: it is injected into thedelegate catalog of every session, on every turn, whether or not the agent is ever spawned.
cli-expert's was 3,037 chars (759 est. tokens) and carried three<example>/<commentary>tutorial blocks — tuition nobody reads at routing time.This rewrites it to the kp79 standard and changes nothing else:
<example>/<commentary>blocksLane
x99cof the delegate-catalog SOURCES sweep (model_performance-x99c, one item /seven repos). Draft — the lane does not merge.
Scope: this repo has exactly one agent
validate-agents' own repo-wide discovery (
meta:-key classifier): 1 agent,agents/cli-expert.md;candidates_scanned1,non_agent_count0. A repo-wide grep for<example>finds no other carrier.behaviors/cli-expertise.yamlisagents.includeonly. One agent, one edit.
Before / after
cli-expertMeasured on the YAML-parsed
meta.description— the string the catalog actually injects.validate-agents independently reports the same numbers (
description_length3037 → 600;759 → 150 est. tokens).
Fidelity: 22 stock routing facts checked, 0 lost, 0 restorations
Full fact-by-fact table in
docs/lanes/x99c-catalog-app-cli/DONE-NOTE.md.Summary of the three judgment calls it contains:
lean says "any slash command (/provider, /config, /mode, /goal, /fork, /status)". A
question naming
/denied-dirsstill routes here — the trigger widened, it did not narrow.--output jsonin CI, sub-agent tool inheritance. Only the tutorial prose is dropped.agent body's own
## Boundariessection (project code → root session, bundle/agentauthoring → foundation, kernel internals → core). Stock's description had no DO NOT USE
WHEN at all.
Dropped and not a routing fact: the motive prose "answering from memory produces
confident, wrong instructions." Its routing consequence — "Carries THIS version's docs,
so answers match the running binary" — is kept.
Metric-only change, recorded for honesty:
triggers_foundmoves["MUST","PROACTIVELY"]→
["DO NOT"]. The recipe states keyword presence is "reported as a metric …, not agate";
has_strong_triggerstaystrue.Body is byte-identical
meta.nameandmodel_role: generalunchanged. Diff on the agent file:10 insertions, 58 deletions — description only.
validate-agents on this branch: PASS
@foundation:recipes/validate-agents.yamlv1.8.0, foundation @v2.1.2(
a27d5824517d078097b60d84779dd3eae80202cd), runrun-846079b2a5c5, 11/11 steps.Structural:
{"errors": 0, "passed": 1, "total": 1, "warnings": 1}.This is FAIL → PASS, not "PASS held." The discovery and structural phases are pure
python (no LLM call), so both sides were run locally at $0:
6f2ad04{"errors": 3, "passed": 0, "total": 1, "warnings": 1}{"errors": 0, "passed": 1, "total": 1, "warnings": 1}DESCRIPTION_EXCESSIVE,COMMENTARY_TAG_PRESENT,EXAMPLE_BLOCK_PRESENTNO_TOOLS_SECTIONNO_TOOLS_SECTION(identical)The description-quality phase's verdict on the rewrite itself:
[LOW] cli-expert - Description: make NO edit / Improved: (none -- leave unedited).The one warning, and why it is not fixed here
NO_TOOLS_SECTIONis byte-for-byte the finding stock produces. It is atools:question,not a description question, and the validation run's own scope note says to keep it out:
Recommendation: file it separately, and do file it. The body names
read_fileatagents/cli-expert.md:39for three docs reachable no other way, and explicit tools survivea restrictive spawn policy where inherited ones do not. Two real trade-offs make it a
decision rather than a copy-paste:
tool-filesystemover-grantswrite_file/edit_fileto a read-only consultant, and a
@mainsource:pin fights this repo's version-lockrationale. The decision is the work; the YAML is three lines.
Tests and CI
CI exists (
.github/workflows/ci.yml: pytest on {ubuntu, macos, windows} × py{3.11, 3.12},plus a POSIX-only
-m integrationjob). Both legs green locally on this branch:No test added: the change is one frontmatter string with no executable surface. GitHub CI
result on this PR is the authority.
One flag for the reviewer:
docs/ships inside the wheelpyproject.toml'sforce-includemaps"docs" = "amplifier_app_cli/_bundle/docs", so thelane artifacts under
docs/lanes/(~19 KB of markdown) are packaged into the installedwheel. That is unique to this repo among the seven in this sweep. The lane charter names
that path, so that is where they went.
My recommendation: add an explicit wheel exclude for
docs/lanes/— keeps the charterpath, drops the bytes from the package. Alternative: drop the lane directory before merge
and keep this PR body as the record. Either is a one-line call for the maintainer; I did
not make it unilaterally. (validate-agents already excludes
docs/, so these files cannever be mistaken for agents.)
Spend: $0.00 against a $0.00 authority — text edits, one recipe run, byte counts, two
local test suites. No API measurement performed.
Generated with Amplifier
Co-Authored-By: Amplifier 240397093+microsoft-amplifier@users.noreply.github.com