Repository navigation
fix(skills): stop downstream skills leaking announce lines and approach labels - #816
Conversation
…ch labels
Downstream sumo-qa skills told the host to open every reply with a scripted
announce line, and the TDD skill's first step re-stated the catalogue approach
as a label ("Approach restated: Regression-first ..."). Both reached the user
verbatim on a real install.
- Remove the announce instruction from the 16 skills that carried it, with the
example replies that echoed it; the TDD skill's first step now names the risk
and keeps the approach internal.
- Widen the routing-state leak check (Python and the promptfoo JS mirror) to a
qualified label ("Approach restated:", "Chosen approach:", "Classification
identified:") whose value opens with a whole catalogue name, whatever prose
follows. Ordinary prose ("a regression-first approach") still passes.
- A skill-conformance test fails any SKILL.md that instructs an announce
preamble.
- Evals that anchored on an announce line now assert its absence
(closing-qa-gaps, triaging-test-failures, security-testing); the
preparing-for-work and finding-test-data prompts no longer script it.
Closes #735
…catch italic approach labels - closing-qa-gaps, triaging-test-failures and security-testing evals now run the routing-leak assert plus a per-seed deterministic discipline marker grounded in each skill's checklist, replacing the absent-phrase check that passed every reply - the qualified-label matcher (Python and JS) catches an underscore-italic catalogue value while a glued suffix such as regression-first_ish stays clean - the skill scaffolder no longer seeds an announce preamble into new skills - implementing-with-tdd step 1 says what it shows the user without quoting the forbidden label
…tream eval markers Downstream skills (triaging, security-testing, closing-qa-gaps, implementing-with-tdd) now hand off by invoking the next skill, so the user sees that step's work and never a skill name or a routing line; the closing-qa-gaps merge decline no longer names the review skill. The implementing-with-tdd eval is wired to the routing-leak assert. The security-testing no-anchor marker checks only what the skill mandates deterministically: a question and none of the brief's field labels. The closing-qa-gaps seeds tolerate separators around the evidence lines, need a runner term in the refusal, and accept "line 42" for the survivor. The qualified-label lookahead treats any underscore run glued to a word character or hyphen as continuation in both engines, and CONFORMANCE.md describes the current assert wiring.
…ipline - using-sumo-qa's global discipline now says skill-to-skill hand-offs are invocations: the user sees the next skill's work, never a skill name or a routing line. The four per-skill copies are removed. - The triage step-4 output line names the next step, a regression-first fix, never a skill: the isolation eval sees only that skill's text. - Rubrics describe the next step without skill names (triaging stale-test, security dependency, closing ledger seeds). - closing-qa-gaps: the ledger seed takes the verbatim evidence lines again; the refusal seed's runner check follows prerequisite (c)'s wording. - security-testing: the no-anchor marker no longer treats "source anchor" as a brief label. - CONFORMANCE.md separates the detector's boundary from the never-name rule and lists the wired configs as wired configs. - Validator not-leak list pins the underscore-run lookahead.
Revert the never-name-a-skill hand-off rule: the using-sumo-qa global line, triage step 4's clause, the invoke-not-name hand-off wording in triaging, security-testing, closing-qa-gaps and implementing-with-tdd, the rubric clauses that banned skill names, and the CONFORMANCE.md paragraph. The announce-line and approach-label removals stay. no-routing-leak.js takes an optional config.families filter (default: every family). The four downstream evals check only taxonomy_label, since a legitimate hand-off may name the next skill. The closing-qa-gaps refusal seed leaves prerequisite (c), a way to run the tests, to the judge rubric instead of a runner regex.
Finish proof, head 6728ae9CI: 33 of 33 checks pass. Mutation gate: run 37058225868 on this head, success. Open review threads: 0. Per-file review (sumo-qa-reviewing-before-merge, each changed file's full post-change content vs main): SAFE for every file. The 13 announce-line-only SKILL.md edits are the same shape (one line plus its blank line removed); closing-qa-gaps, triaging, security-testing and implementing-with-tdd were reviewed individually; /code-review (high): 5 rounds; final round clean. Behaviour ledger (finish-pr 4.7):
Acceptance criteria (#735): AC1 and AC2 met (rows 4 and 5), AC3 met (row 1: the routed Terraform prompt on a real install returns no announce line or taxonomy label). Test plan: unit tests met; targeted evals rerun for every config the changed skills feed, one case UNVERIFIED by judge bug #796 as recorded above. Integration (finish-pr-batch 5.5) with #811, #813, #814, #816 and #818 merged in drain order on a throwaway branch off main: full suite 5323 passed, 100% coverage; live MCP routing reaches the routed skill through dispatch; tools/list unset/full equal main (48), core 40; no conflicts except #811 vs #813 (one import block in |
🤖 I have created a release *beep* *boop* --- ## [0.70.1](v0.70.0...v0.70.1) (2026-10-02) ### Bug Fixes * **skills:** stop downstream skills leaking announce lines and approach labels ([#816](#816)) ([f21f376](f21f376)) ### Tests * **conformance:** add a live-host first-hop harness that scores real host tool selection ([#814](#814)) ([6e1cac7](6e1cac7)) ### Continuous Integration * **tests:** cut the pytest matrix to 9 jobs and run the suite under pytest-xdist ([#813](#813)) ([7a84f9b](7a84f9b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
## Summary Slice 1 of #515. Every MCP tool now has one `ToolMeta` entry (group, core, open_world, integration) in `src/sumo_qa/tool_registry.py`, and the `core` and `full` profiles are derived from it. `SUMO_QA_MCP_PROFILE=core|full` selects the profile before tools are listed; unset or empty means `full`, so the default `tools/list` is byte-identical to `main`. Any other value stops the server, installer and doctor with one clean line. A configured profile also survives the documented update flow: re-running the installer keeps each host entry's `env` (and `envFile` where the host reads it), and `sumo-qa-doctor --host <host>` probes the entry the way that host launches it, with that entry's profile. ## Related issue Closes #806 ## Changes - `tool_registry.py`: the registry, `resolve_profile`, `resolve_profile_or_exit`, `profile_tool_names`. Core is 40 of 48 tools: every workflow skill tool, the knowledge and test-data loaders, analysis and evidence/reporting tools. Out of core: 4 specialist tools and the 4 external-skill search/check/install/execute tools. - `server.py`: resolves the profile before registration and removes non-profile tools in registration order; a registered tool without metadata warns and is served under `full` only, and `test_tool_registry.py` fails on it. - `installer.py`: a bad profile exits cleanly before any host config is written. A refresh keeps the existing entry's `env` in `claude_desktop_config.json`, `.vscode/mcp.json` and Claude Code's user registry, and `envFile` in the first two; the registry is re-registered with `claude mcp add-json` (string env values only; `claude mcp add -e` fallback for a CLI without `add-json`, warning on keys it cannot pass; the removed entry is restored if the add fails). `REQUIRED_TOOL_NAMES` is derived lazily per profile, so importing the installer never exits. - `doctor.py`: `--host claude-code|claude-desktop|vscode` probes that host's `sumo-qa` entry with its `env`, expands `${...}` the way that host does, requires every tool of the entry's profile, and reports an invalid profile, an unlaunchable command or an unexpandable VS Code placeholder as a check result instead of crashing. Claude Desktop does not inherit the doctor shell's profile; the Claude Code CLI and VS Code keep it. - Snapshot fixture gains `core_tools`; the regen script writes it and refuses to pin a tool without metadata. - `tests/conftest.py`: clears `SUMO_QA_MCP_PROFILE` in `pytest_configure`, and runs doctor and installer test modules in a temp HOME so nothing reads the real `~/.claude.json`. - Docs: `CONFIGURATION.md` (Tool profiles, refresh and doctor behaviour per host), `INSTALL.md`, `TOOLS.md`, `DEVELOPMENT.md`. ## How it was verified - CI green on ec7a49d across the full matrix (pytest on macOS, Ubuntu and Windows, py3.10 to 3.14; mypy; ruff; install and handshake jobs). Mutation gate run 37062233685 on ec7a49d: success. - Real install from the built wheel (b1d571f; later commits change one test assertion and one doc paragraph), 13 of 13 acceptance rows met, driven by a real `claude -p` (haiku) host with only the built sumo-qa attached plus JSON-RPC cross-checks: profiles are `core` and `full` only; the metadata test goes red when a `ToolMeta` is removed; `core` is 40 tools with the external and open-world ones absent; `full` and the default equal `origin/main`'s names and input schemas; `bogus` exits 1 with `sumo-qa: SUMO_QA_MCP_PROFILE='bogus' is not a valid MCP tool profile; expected one of: core, full`; order is stable; the installer keeps `env`/`envFile` for VS Code and Claude Desktop; `claude mcp get` shows the env kept for Claude Code; the doctor judges 40 required tools for `core` entries on all three hosts; VS Code `${workspaceFolder}` resolves. The router plus `load_classifications` return byte-identical results to `main`. - Snapshot regenerated into a temp path at the head: identical to the committed fixture, and its `required_tools` and `schemas` equal `origin/main`'s. - Targeted modules (registry, tools-list contract, doctor, installer, server, skill resources) with `SUMO_QA_MCP_PROFILE=core` exported and a temp HOME: 298 passed, 0 skipped, including the round trip through the real `claude` CLI. - Integration check with #813, #814 and #816: full suite 5291 passed at 100% on the merged tip, live MCP routing and tool surface correct; one import-block conflict in `tests/test_tools_list_contract.py` with #813. Review: per-file sumo-qa review plus `/code-review` (high) over several rounds, and a final per-file pass at the head with every file SAFE. The two Codex threads (installer refresh dropping the profile env; doctor probing with the ambient env) are fixed and resolved. ## Decisions recorded here (not changed) - Under `core`, the external-skill workflow is listed but its search/check/install/execute tools are absent; the actionable activation path is #807. - `ToolMeta.integration` and `open_world` stay: #515's spec lists both as registry metadata. - The doctor does not read a VS Code `envFile`; a profile set only there is probed as the shell's profile (documented in `CONFIGURATION.md`). - Low review notes left as is: the skill-reference regex can over-match a hyphen-suffixed token; the doctor test compares stderr exactly; the regen script keeps a local `PROFILE_ENV` literal so it runs without an installed package; the conftest pop is not restored after the session; `_required_tool_names_for` ignores its argument (only caller passes the env's profile). ## Checklist - [x] PR title follows Conventional Commits - [x] Tests pass locally and lint/type checks are green - [x] Added or updated tests covering the change - [x] Updated the relevant docs in this same PR - [x] No breaking changes (default profile is unchanged)
Summary
Downstream sumo-qa skills no longer instruct a self-narrating announce preamble, and catalogue approach labels like
Approach restated: Regression-first ...now fail conformance validation while ordinary prose ("a regression-first approach") does not. Extends the #248 router-hop fix to every downstream skill.Related issue
Closes #735
Changes
**Announce at start:**line (and example replies that repeated it) removed from all 16 skills that had one;sumo-qa-implementing-with-tddstep 1 names the target risk in plain words and keeps the approach internal. The skill scaffolder no longer emits an announce line (test_scaffolded_skill_has_no_announce_preamble), andtest_skill_does_not_instruct_an_announce_preambleguards every SKILL.md.src/sumo_qa/conformance.pyand its JS mirrortests/evals/promptfoo/asserts/no-routing-leak.js, kept in lockstep): a qualified label at line start (Approach restated:,Chosen approach:,Selected classification:and similar) whose value starts with a whole catalogue name is ataxonomy_labelleak, including bold, backticked and underscore-emphasised values; near-misses likeregression-first_ishstay clean. A differential fuzz over 40,000 strings found no Python/JS mismatch.route_announcement, since a hand-off may name the next skill) plus per-seed deterministic discipline markers taken from each skill. The preparing-for-work and finding-test-data prompt templates no longer ask for an announce line. The leak assert gains aconfig.skipoption; an unknown family name fails the assert.tests/scenarios/CONFORMANCE.md: thetaxonomy_labelrow and the downstream wiring.How it was verified
claude -p --strict-mcp-config, host skills disabled, claude-haiku-4-5):using_sumo_qa->deciding_approach->reviewing_before_merge;find_routing_leaksreturned no leak; the reply opens "For a Terraform infrastructure change moving the payments service behind a load balancer, validate the change with these three layers:".implementing_with_tdd; no leak, no announce line.load_classificationsoutput is byte-identical to main."pass": true, "score": 0.93, and the leak and technique asserts passed.Review: per-file sumo-qa review plus
/code-review(high), 5 rounds, and a final per-file pre-merge pass with every file SAFE; no high or medium findings remain.Notes and decisions
main.*-PRE-*.SKILL.mdeval fixtures keep their announce lines on purpose: they are frozen historical baselines for A/B controls.route_announcementfamily downstream also skips router-only phrases such as "Picking the QA approach";config.skipis not type-checked as a list (a non-list value errors the assert rather than skipping silently); planning-qa-rollout's plan template line is not covered by a wired eval; the.ablift configs were not rerun.Checklist