Skip to content

fix(skills): ship golang-cli examples as Markdown and guard managed skills against Go files - #202

Merged
bketelsen merged 2 commits into
mainfrom
lucilla/golang-cli-examples-markdown
Nov 6, 2026
Merged

bketelsen merged 2 commits into
mainfrom
lucilla/golang-cli-examples-markdown

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

core#200 vendored golang-cli/assets/examples/ as 12 .go files and a go.mod. The skills sync copied them into the Go consumers, and chairlift#268 fails TestOnlyReportingImportsNetHTTP: docs/agents/skills/golang-cli/assets/examples/signal.go imports net/http, which chairlift allows only in internal/reporting. Vendored Go files also risk other repository-walking guards, gofmt and lint in every consumer.

This PR:

  • Replaces golang-cli/assets/examples/ with 1 Markdown file, .agents/skills/golang-cli/references/examples.md: 1 section per upstream file, the code byte-for-byte unchanged in fenced blocks (checked by script against the removed files: 13 blocks, 0 differences).
  • Points the 12 links in golang-cli/SKILL.md at those sections and updates its Frostyard override bullet.
  • Updates docs/design/shared-skills.md: the vendoring sentence, a new Overrides bullet, and refresh step 2 (copy upstream's assets/examples changes into the fenced blocks by hand; git apply must never create a .go file there).
  • Adds the guard test/managed-skills-go-free.test.mjs: it expands .github/skills-sync.json (defaults, groups, repos, @group references), walks every managed skill directory, and fails on any *.go, go.mod, go.sum or go.work. It requires at least 20 managed skills, every directory to exist, and more than 0 files walked, and prints managed-skills-go-free: 23 skills, 127 files checked. A second test proves the walker on a temporary directory.
  • Adds 1 line to .memory/corrections.jsonl, promoted to the test.

Two upstream file names hold an underscore (exit_codes.go, cli_test.go). Core's docs gate drops underscores from slugs, and GitHub keeps them, so those 2 sections are headed "Exit codes" and "CLI tests" (with the upstream file name in the first line), and their anchors resolve in both.

After merge, the next skills sync updates the 8 open consumer sync PRs (chairlift#268 and the others) and removes the .go files there.

Risk tier

Risk tier: 1 — skills, docs and a test only; no path in .github/risk-paths.json changes (.github/skills-sync.json and scripts/ are untouched).

Docs housekeeping

  • Cross-links hold (docs gate green)
  • No new doc; no ADR needed (an override of a vendored skill, recorded in the design doc)
  • Conformance aliases untouched

Verification

  • make verify green: docs checked: 95 docs, 1728 links, 10 symlinks; 333 tests, 0 fail
  • Revert test: with signal.go restored, node --test test/managed-skills-go-free.test.mjs fails "managed skills hold no Go source or module files" and names .agents/skills/golang-cli/assets/examples/signal.go; with it removed, it passes.

Coder model: github-copilot/claude-sonnet-5.5 (subagent), reviewed and finished by Lucilla.

Cross-review

Reviewer openai/gpt-6.1-sol; coder github-copilot/claude-sonnet-5.5, finished by claude-opus-5.5; base d68fd52.

  • Initial review at 6c2a80b: 1 blocking finding (medium): the guard did not expand @group references in defaults (the sync allows them, docs/design/skills-sync-operations.md). Accepted and fixed in 0ffb854: managedSkills starts empty and expands defaults through add; new test managedSkills expands @group references in defaults and repos. Revert test (scratch worktree, old code restored): not ok 3 - managedSkills expands @group references in defaults and repos. Non-blocking note: the walk does not follow directory symlinks; none exist under .agents/skills/.
  • Re-review 1 at 0ffb854: finding 1 resolved. Ready, Blocking: none.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 6, 2026
@bketelsen
bketelsen merged commit 42cfa7e into main Nov 6, 2026
5 checks passed
@bketelsen
bketelsen deleted the lucilla/golang-cli-examples-markdown branch November 6, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants