Repository navigation
skills: convert four skills to thin behavioral guidance - #110
JakeSCahill wants to merge 36 commits into
Conversation
Add a runner that asks each case in four arms (no skill or docs, skill only, Docs MCP only, both) and grades every answer the same way, so a skill's value over the published docs can be measured. Subjects run isolated from plugins, CLAUDE.md, memory, and the skill files on disk, and each run checks the tools its arm actually had. Every case must fail an empty answer before any subject runs. Docs quota refusals count as errors, not results. Pilot suites for rpk-topic, connect-cdc-postgres, sql, and cloud-byoc.
Check the skills, slash commands, and plugins each subject reports at start, not just its tools, so a leaked plugin errors the run instead of being scored. Record input, cache, and output tokens per run.
A case can declare a mocked tool surface, served to every arm by a small stdio MCP server, and assert on the calls the subject made: first call, expected, forbidden, and ordered calls. Calls are graded from the mock's log, not the transcript.
The installed arm gives the subject the skill, the shared redpanda-docs skill and the docs server with no instruction to look things up, which is what a plugin user gets. The other docs arms keep the instruction, so they measure what the docs contain. Each row now records the subject and judge models, the runner commit and a hash of the skill text, and report mode refuses to pool rows from different skill text or models. A docs lookup that comes back as an upstream error or timeout is a harness error, not a docs answer. Suites with unknown case keys stop the run, and --no-judge no longer dies on invariant-only cases.
rpk-topic, connect-cdc-postgres, sql, and cloud-byoc now carry only the product-specific procedure an agent wouldn't follow on its own, each backed by a behavioral eval case, and point at the docs for everything else. Their reference files are gone except SOURCES.md. Add a redpanda-docs skill for using the docs at the user's platform and version, and ship the Redpanda Docs MCP server with the plugin. Describe the format in CLAUDE.md so the sync routines follow it.
A review found that several behavioral cases graded the method rather than the outcome, and that their mocks errored on legitimate commands. Graded on outcome with fair mocks, the baseline passes most of them. This drops the thin-skill steps those cases had backed and fixes the cases: outcome grading, fuller mocks, looser literals, and why text that matches the recorded runs. What remains: rpk-topic's parsed-partition rule, sql's catalog, login, and stored-grants procedures, and connect-cdc-postgres's two backfill procedures. cloud-byoc keeps no procedure. The sql wildcard step now asks the user to confirm before narrowing access.
b043b7b to
01268e9
Compare
|
Hi Jake, a heads-up: #107 and #111 merged after you branched and changed some of the The skills sync routines open PRs against these skills every few days, so it'll keep drifting until it merges. Probably easiest to rebase once, when you're ready to land it. Keeping your side drops two things you may want in "How to work":
|
Keep the thin versions of sql, connect-cdc-postgres, and cloud-byoc. The facts main added to them (SQL views, batch_transactions, Azure BYOVNet via Terraform) are in the Redpanda docs. Keep both README sections.
Add one How to work line each for rules main added as reference text: create an Azure BYOVNet cluster with Terraform alone, and never set postgres_cdc batch_transactions together with a batching policy.
|
Merged main and kept the thin versions. The facts main added to these skills are already in the docs, so no docs PRs were needed:
Two of these are also rules for the agent, so each got one How to work line in 15c3396 (BYOVNet in cloud-byoc, batch_transactions in connect-cdc-postgres). Neither has a behavioral eval case yet. |
batch-transactions-without-batching-policy (connect-cdc-postgres) and byovnet-azure-terraform-only (cloud-byoc). Live runs, 3 each: baseline 0/3 and skill 3/3 on both.
|
Added a behavioral eval case for each of the two new How to work lines (8bd43fc). Live local runs, 3 per arm, subject claude-sonnet-5-5, judge claude-opus-5-5:
The BYOVNet case took two reframes. When asked to create the cluster from scratch, the baseline already picked Terraform and never ran rpk apply, so that version didn't test the skill. The case now starts after terraform apply has finished. |
Keep the thin sql skill. The schema, ALTER ... OWNER TO and EXPLAIN facts that redpanda-data#115 added are on the published pages (create-schema, drop-schema, alter-owner, explain), so the skill reaches them through the docs MCP.
Make it a hard rule for every skill: never add a new fact, report a missing fact as a docs gap, correct drifted facts in skills that are not yet thin, and never add facts or reference files to a thin skill.
|
Thanks, Jake. I like where this is going: thin skills leave the routines far less to keep in sync, put less private-source detail in a public repo, and send every fix to the docs, where users get it too. Before merging
Rules that conflict or can't be followed
Evidence and upkeep
Smaller things in the new files
Happy to pair on the |
The docs server now lists get_config_property, list_config_properties, get_connect_component, list_connect_components and give_feedback, so every docs-arm run failed the tool check. Allow the four lookups and deny give_feedback, which replaced submit_documentation_feedback.
A view runs with its owner's privileges, so SELECT on it lets the grantee read everything it returns. Adds the How to work line and a behavioral case: baseline 0/3, skill 3/3, installed 3/3.
Names the docs server's real feedback tool and matches its privacy wording, lists the property and Connect component lookups, and tells users of other agents how to add the server. Drops the Tiered Storage, Cloud Topic and Remote Read Replica claims from the rpk-topic description, which the thin skill no longer covers.
Each How to work line now maps to its source and its eval case. Claims the thin skills no longer make are gone, so the drift audit stops re-checking them. Docs gaps the evals found are listed separately, as items for the docs, not claims to re-verify.
Rule 1 now applies only to thin skills; the others keep their facts and are converted one at a time, after their own evals. Any skill may correct or remove a drifted fact. The durability principle, the coverage pass, the size rule and the generator description now each state the thin and not-yet-thin cases. Adds the process for a new How to work line (a draft behavioral case, run by a maintainer before merge), a monthly re-run of the behavioral cases with the drift audit, and the handoff of docs gaps from the provenance report to the docs team. Documents the installed arm in the evals README.
The CREATE VIEW page already warns that a view grantee reads everything the view returns; only the GRANT page lacks the warning.
|
Thanks, Michele. I've pushed fixes for each point.
|
The docs section listed only three Docs MCP tools, two of them for API references. Follow redpanda-docs like the other thin skills, and name get_connect_component for postgres_cdc and its fields.
Restore the rpk-topic, cloud-byoc, and connect-cdc-postgres guardrails as How to work lines with behavioral cases, ask before REPLICA IDENTITY FULL, add a quota fallback, widen the sql and cloud-byoc triggers, drop the two published postgres_cdc gaps, and loosen three eval regexes.
The baseline passed the cases for the rpk-topic regex preview and destructive-change lines, the cloud-byoc network exposure line, and the connect-cdc-postgres WAL growth line 3/3. Record the results in SOURCES.md and drop the lines and their cases.
Register the redpanda-docs SOURCES.md in the source maps and drift audit scope, and say in the evals README that the installed arm always preloads redpanda-docs.
|
@Feediver1 thanks for the review. Each point at head 1f219b2: Blocker 1, dropped guardrails. 0fde9a7 restored each one as a How to work line with a behavioral case. I then ran each case 3 times in the baseline and skill arms. Four lines failed the bar because the baseline passed them 3/3, so b956dde removed them and recorded the runs in
Blocker 2. The PR is a draft. The heartbeat prefix and payload and the Suggestions
Other checks: |
Restore the rpk-topic regex preview and go-ahead lines, the cloud-byoc network exposure line, and the connect-cdc-postgres slot growth line, with their cases as regression guards. A line that guards against data loss, an irreversible change, or changing a cluster's network exposure now stays even when the baseline passes, because a few clean runs are thin evidence and a miss is costly. CLAUDE.md, MAINTAINING.md, and the evals README state the exception; SOURCES.md records each line as a safety guardrail with its baseline result.
|
@Feediver1 the four guardrails b956dde dropped are back in 78d2096: the rpk-topic regex preview and go-ahead lines, the cloud-byoc network exposure line, and the connect-cdc-postgres slot growth line. The repo rules now keep any line that guards against data loss, an irreversible change, or a cluster's network exposure even when the baseline passes, since a few clean baseline runs are thin evidence and a miss is costly. Their cases stay as regression guards and pass with the skill. |
|
Heads-up for the thin-format pilot: drift-audit PR #120 edits two files this PR deletes.
Both |
The live Docs MCP server now lists get_rpk_command and list_rpk_commands, so every docs arm errored on unexpected tools. Count a quota refusal as a harness error only when the real docs server returns it, so a behavioral case can mock one.
The baseline already knows Kafka ACLs do not limit SQL reads and uses psql's \copy for a local file (3/3 each), so neither gets a line. SOURCES.md records both. The ACL case stays as a second case for the stored-grants line: the baseline fails it 3/3, the skill passes 3/3.
Two behavioral cases with mocked docs tools: look up a property for the cluster's version rather than the latest (baseline 1/3, skill 3/3), and send the user to /mcp when the anonymous quota runs out (baseline 0/3, skill 3/3).
The Docs MCP search returns the heartbeat_interval section with the prefix as its first result for the question the installed arm sent, so heartbeat-prefix-per-slot is fair as written.
|
Follow-ups from the last review, at fa375bb:
Checks: ajv schema 0, |
|
Docs and installed arms at fa375bb, 3 runs per case per arm, with a trusted Docs MCP key (no quota errors). Every runner exited 0.
Cases below 3/3 in either arm (everything else was 3/3 in both):
Nothing contradicts the current SOURCES.md notes. Some things to know:
|
Keep the thin versions of rpk-topic, connect-cdc-postgres, and cloud-byoc, and record main's corrections to their pre-thin references in each SOURCES.md.
|
Merged main in bb563e2. Conflicts and how each was resolved:
skill-validator exits 2 (warnings only, all 33 skills pass), the ajv schema check exits 0, and node --test evals/run-evals.test.mjs exits 0. |
Conflicts: - skills/cloud-byoc/references/clusters-and-agent.md: main added the tier-only scaling rule (redpanda-data#124); this branch deletes the file. Kept the deletion. The published scale-cluster page states the rule, and SOURCES.md records where it lives now. - skills/cloud-byoc/SKILL.md: kept the thin description and added main's pointer to /redpanda:cloud-byoc-sizing (redpanda-data#91). - skills/cloud-byoc/references/SOURCES.md: kept the thin version. - CLAUDE.md, MAINTAINING.md: kept both sides (redpanda-docs entry and the thin-skill rules, plus main's cloud-byoc-sizing entries).
Rerun the three behavioral cases in baseline, skill and installed arms and record the rates. Cite config.go for alter-config --regex. The two removed lines have no committed case.
Rerun the four behavioral cases and record the rates. Remove three docs gaps the published docs now cover, cite the source that decides redpanda_cloud_provider_tags, and name the update validation behind the network exposure line.
Rerun both behavioral cases with the installed arm. The installed arm cannot test the quota case, because it reaches the live docs server instead of the mocked refusal.
Rerun the five behavioral cases and record the rates. A REVOKE pattern removes every stored grant it covers, so the stored-grants line no longer says it must name a stored pattern exactly. Fix three cases: list the catalog-wide grant in role_table_grants, require the wildcard REVOKE before the GRANTs, and accept a quoted catalog name. Remove two docs gaps the published docs now cover.
Converts
rpk-topic,connect-cdc-postgres,sqlandcloud-byocto thin skills that carry only product-specific procedure and point at the docs for everything else. The evals are from #108.What the evals showed
These procedures still hold up, so they're the only "How to work" content left:
GRANT CONNECT. Read the stored grants before anyREVOKE, and confirm with the user before narrowing a wildcard. Check what a view exposes before granting SELECT on it.snapshot-executesignal, not by dropping the slot. Check a table in order before or after a rejected signal. Choosebatch_transactionsor abatchingpolicy, never both. Ask before settingREPLICA IDENTITY FULLfor a backfill.%pneeds-pas well.--cloud-api-token, and keep the version-check override out of production. Don't move production data to Tiered Storage v2.The skills are now 40 to 76 lines (2 to 4 KB, down from 15 to 19 KB plus references). Their reference files are gone except
SOURCES.md.Also in this PR
redpanda-docsskill: how to look things up for the user's platform and version (the Docs MCPplatformandversionparameters, versioned URLs, Markdown pages)..mcp.jsonships the Redpanda Docs MCP server with the plugin. The README tells users to sign in through/mcp.CLAUDE.mdadds a hard rule for every skill: facts go in the docs, behavior goes in skills. Routines never add a new fact to a skill, report a missing fact as a docs gap, correct drifted facts only in skills that are not yet thin, and never add facts or reference files to a thin skill. The routine prompts change to match, and merge together with this PR.evals/suites/redpanda-docs.eval.jsontests theredpanda-docsskill with mocked docs tools: look a property up for the cluster's version, not the latest (baseline 1/3, skill 3/3), and send the user to/mcpwhen the anonymous quota runs out (baseline 0/3, skill 3/3).COPY TOpath is written on the engine's side (3/3 each).skills/sql/references/SOURCES.mdrecords both.get_rpk_commandandlist_rpk_commandstools, and treats a quota refusal as a harness error only when the real docs server returns it.CLAUDE.mddescribes the format, including the rule that a behavioral case counts only when it grades the outcome, uses fair mocks, and the baseline still fails it.Known gaps
rpk topic delete -r, asking before deleting records or adding partitions, sending a network exposure change to Support (the 2026-11-10 rerun scored the baseline 1/3, so this one now also fails the baseline), and fixing WAL growth behind a slot without dropping it. A line that guards against data loss, an irreversible change, or changing a cluster's network exposure stays, because a few clean baseline runs are thin evidence and a miss is costly.CLAUDE.md,MAINTAINING.md, andevals/README.mdstate the exception, each skill'sSOURCES.mdrecords the baseline result, and the cases stay as regression guards.installedarm, which drops the instruction to look things up first, matches thebotharm on all four suites (rpk-topic 56% vs 62%, connect-cdc-postgres 85% vs 85%, sql 100% vs 98%, cloud-byoc 71% vs 71%; 3 runs per case, no errored runs). Every thin-skill procedure passes 3/3 under it, and each failure is a fact the docs don't have yet.Before merging
The docs need to cover the facts the thin skills no longer carry, so users don't lose them in between. The evals found these gaps, and these are published now:
rpk topic consume: the digit count for a Unix-seconds offset.rpk topic describe-storage: the default sections, LAST-UPLOAD, and what thetiered_cloud_topicmode means.rpk topic produce: the schema-context fallback.custom_propertiesnumbers as strings, and reserved tag keys on PATCH.--redpanda-id, and skipping the rpk version check.Don't merge until these two are published. Both fixes are in review:
min.insync.replicasand 12 other Kafka topic configurations are accepted but have no effect (from the November drift audit).redpanda_cloud_provider_tagscan be empty on older clusters.Re-verification
Every line and case in the four thin skills was re-checked against source and rerun on 2026-11-10. The
sqlstored-grants line is reworded: a wildcardREVOKEremoves every stored grant it covers, and one that covers none is an error. Threesqlcases had mocks or grading that didn't match the engine and are fixed. No line changed verdict. Theredpanda-docsquota case can't test the installed arm, because that arm reaches the live docs server and is never refused.