Skip to content

docs: move drift remediation, command and help-text workflows into skills (#1047, #1049, #1051) - #1048

Open
sdairs wants to merge 10 commits into
claude/auth-login-whoami-1044from
claude/drift-remediation-skill
Open

sdairs wants to merge 10 commits into
claude/auth-login-whoami-1044from
claude/drift-remediation-skill

Conversation

@sdairs

@sdairs sdairs commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1047. Closes #1049. Closes #1051. Closes #1053. Stacked on #1046.

Moves four task-specific workflows out of AGENTS.md into repo skills that any coding agent can load, so agents read them only when the task needs them. They are in one PR because the skills and AGENTS.md refer to each other.

Changes

openapi-drift-remediation skill (#1047)

.agents/skills/openapi-drift-remediation/SKILL.md, with name/description frontmatter. It covers:

  1. Reproducing the drift and grouping the findings by library domain and CLI command group.
  2. Planning PR pairs: an API PR, then a CLI PR. One pair per affected command group when the drift spans several groups or adds a library module. Notes that spec_coverage_test fails until the last API PR lands, and to run the library tests with --no-fail-fast in the meantime.
  3. The API PR: the fix for each finding kind, moved from the crate AGENTS.md, including the operation-permissions regeneration step.
  4. The CLI PR: points at the add-cli-command skill.

add-cli-command skill (#1049)

.agents/skills/add-cli-command/, replacing the "Adding a command" section of the root AGENTS.md:

  • SKILL.md: sends the agent to the local or Cloud procedure, then covers the steps both share: try_parse_from tests, both classifiers, the README and the gates. Includes a checklist the agent can copy.
  • references/local.md: the local procedure. It now also covers the --json output struct and LocalErrorOutput::from_error (choosing parity or redaction), which the old section left out.
  • references/cloud.md: the Cloud steps, including PERMISSIONS, rewritten in plain language, plus the files to change when adding a new command group.

cli-help-text skill (#1051)

.agents/skills/cli-help-text/SKILL.md, replacing the "Writing help text" section of the root AGENTS.md. Merged in from #1052. It covers:

  • Where help lives, the screen shape, about and flag rules, and option order with the help_order ranks.
  • The CONTEXT FOR AGENTS: block: at most 8 lines, written densely for agents. Permission lines from permissions.rs don't count toward the 8. What it may hold, with a precondition naming the command or flag that meets it. It never holds implementation details. Includes a before/after example.
  • A one-line test rule: never pin help or README wording.
  • A checklist: render each changed screen with --help, check each line, run the tests.

The add-cli-command and openapi-drift-remediation skills now point at it for help rules.

release skill (#1053)

.agents/skills/release/SKILL.md, replacing the "Releases" section of the root AGENTS.md. It covers the lockstep version bump, tagging the merge commit, and watching release.yml. It also covers a step that wasn't written down anywhere: run NightlyUpload in ClickHouse/ClickHouse (gh workflow run nightly_upload.yml -R ClickHouse/ClickHouse) as soon as Create Release succeeds. clickhousectl update, install.sh and the npm postinstall take the version from the GitHub release but download the archive from builds.clickhouse.com. That workflow otherwise runs once a day, so until it runs, all three get a 404 for the new version. The skill ends with a curl check of all four archives and a checklist.

Analyzer policy moved into the drift skill

The "Analyzer configuration and exemptions", "Enum value coverage" and "Extending the analyzer" sections of crates/clickhouse-cloud-api/AGENTS.md move to openapi-drift-remediation/references/analyzer.md. The crate file keeps the two rules any model change can hit: the VALUES const and deprecated-field gating. It also gets back the rename_all rule that the analyzer's error message points at. Step 3 of the drift skill now points at these rules instead of restating them.

Wiring

  • Claude Code: .claude/skills/<name> symlinks to each of the four skills.
  • .gitignore: .agents/ and .claude/ stay ignored (chctl skills installs there, and .claude/ holds worktrees), except for these skills and their symlinks.
  • AGENTS.md: a line in Workspace points at the drift skill. "Adding a command" is now a pointer plus two lines on code layout, and "Writing help text" is a two-line pointer. The Tests section points at the help skill for the wording rule "Releases" is a one-line pointer to the release skill. The CloudError and telemetry invariants are cut down to the rules themselves, the Cloud integration label rules point at .github/CLOUD_INTEGRATION.md, and the hand-kept list of local test binaries is gone (15.5 KB → 8.0 KB).
  • crates/clickhouse-cloud-api/AGENTS.md: the "Remediating a drift issue" procedure is replaced by a pointer to the drift skill. The model policy stays; the analyzer policy moves to the drift skill's reference (19.3 KB → 12.5 KB).
  • Analyzer rename_all error: now points at crates/clickhouse-cloud-api/AGENTS.md, "OpenAPI drift", instead of a bare "AGENTS.md", and says "on models" rather than "in models.rs".
  • .github/CLOUD_INTEGRATION.md: the intro now matches cloud-integration-decision.py. The planner runs on every same-repository push, and when it selects no live suites the check passes without the label.
  • README.md: removes the note about closed stdout (| head) from the intro.
  • scripts/check-openapi-drift.py: the drift issue's "Implementation Guide" points at the skill instead of carrying its own copy of the steps.

Authoring choices

These follow Anthropic's skill authoring best practices and OpenAI's Codex skills docs and model guidance:

  • Each description is in the third person, says what the skill does and when to use it, and puts trigger words first, because Codex shortens descriptions when space is tight.
  • Reference files sit one level below SKILL.md, so the agent loads only the one it needs.
  • Plain imperatives, with no emphasis words. A reason is given only where it isn't obvious.

Gates

  • Python tests: 96 pass.
  • Neither classifier selects any suites for this diff.
  • One Rust change, an error message. Library clippy is clean, and the clickhouse-openapi-analyzer and clickhouse-cloud-api tests pass.

🤖 Generated with Claude Code

sdairs and others added 2 commits October 4, 2026 10:19
Move the drift remediation procedure out of the API crate's AGENTS.md into
an agent-neutral skill at .agents/skills/openapi-drift-remediation, symlinked
into .claude/skills for Claude Code. The skill adds PR planning: an API PR
then a CLI PR, one pair per affected CLI command group. Both AGENTS.md files
now point at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rendered drift issue carried its own copy of the remediation steps.
Point it at the skill instead so the procedure lives in one place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs
sdairs requested a review from iskakaushik as a code owner October 4, 2026 09:20
@sdairs
sdairs added this pull request to stack #1001 October 4, 2026 09:20
Move the "Adding a command" procedure out of AGENTS.md into a skill that
agents load only when adding or changing a command. SKILL.md holds the
shared finish steps; local and Cloud procedures are separate reference
files. The drift remediation skill now points at it for the CLI PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs sdairs changed the title docs: add OpenAPI drift remediation skill (#1047) docs: move drift remediation and command workflows into skills (#1047, #1049) Oct 4, 2026
Moves the "Writing help text" standard from the root AGENTS.md into .agents/skills/cli-help-text/, and points the add-cli-command and openapi-drift-remediation skills at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs sdairs changed the title docs: move drift remediation and command workflows into skills (#1047, #1049) docs: move drift remediation, command and help-text workflows into skills (#1047, #1049, #1051) Oct 4, 2026
sdairs and others added 6 commits October 4, 2026 14:45
Condense the CloudError and telemetry invariants to their contracts, point
CI gate label rules at .github/CLOUD_INTEGRATION.md, and drop the
hand-maintained local test binary list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exemption, enum-mapping and analyzer-extension rules move to
openapi-drift-remediation/references/analyzer.md so non-drift library work
does not load them. The VALUES-const and deprecated-field rules stay in the
crate AGENTS.md because any model change can hit them; restore the
rename_all rule the analyzer's error message points at. The drift skill
points at the policy instead of restating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Releases are not finished until ClickHouse/ClickHouse NightlyUpload copies
the release archives to builds.clickhouse.com; until then update, install.sh
and npm install 404 on the new version. The root AGENTS.md now points here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The planner runs on every same-repository push and settles the decision
itself when it selects no live suites; the label is only needed when it
selects some.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The message said "AGENTS.md", which reads as the root file, and
"models.rs", though models now live in src/models/*.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant