Skip to content

refactor(agents): extract AGENTS.md subsystem gotchas into repo-local skills#109

Merged
ChipWolf merged 14 commits into
mainfrom
refactor/extract-subsystem-skills
Jun 15, 2026
Merged

refactor(agents): extract AGENTS.md subsystem gotchas into repo-local skills#109
ChipWolf merged 14 commits into
mainfrom
refactor/extract-subsystem-skills

Conversation

@ChipWolf

@ChipWolf ChipWolf commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

The repo-root AGENTS.md had grown to 269 lines, past its own meta-rule's ~200-line "propose splitting" ceiling, and ~83 of those lines (~31%) were situational, platform/app-specific subsystem gotchas paid for as always-on context in every session in this repo. This moves them into on-demand repo-local skills.

  • Extracts six situational sections into five repo-local skills under .agents/skills/:
    • finicky, hammerspoon (macOS)
    • komorebi, mise-on-windows, windows-internals (Windows; windows-internals bundles Rancher Desktop + WSL + ssh-tpm-agent + dual-gpg + WezTerm + bootstrap/elevation)
  • Each section is replaced by a one-line Load .agents/skills/<name>/SKILL.md before changing <globs> pointer in the Repo-specific conventions block, matching the existing homebrew-management / update-* convention.
  • AGENTS.md: 269 → 195 lines.

.agents/ is outside the chezmoi source state (.chezmoiroot=home), so this has zero chezmoi apply impact — it's read-in-place repo tooling, like the existing repo-local skills.

Why / how it was decided

Decided via two independent consensus-skill panels (one seeded with options, one unseeded); both converged with no dissent on per-subsystem extraction. Rationale, options considered, and consequences are recorded in ADR-0003 (the canonical record for this change).

Notable refinements beyond a naive cut:

  • The ## Windows support section is split, not moved wholesale. Cross-platform OS-gating mechanics (.chezmoiignore conditionals, the bash/PowerShell chezmoiscript OS-guard rule, the new-config decision rule) fire on any new-file edit and stay inline in conventions; only Windows-operational internals move to the skill.
  • The mislabeled OpenCode/Atlassian bullet is removed — it described a cross-platform MCP/overlay conditions gate, not Windows behaviour; keeping it in a Windows skill would hide it from macOS/Linux sessions. Already covered by the condition-gate concept + the MCP/permission skills.
  • No meta trigger-table (rejected to avoid a second, drift-prone source of truth for path globs).
  • The Finicky↔Hammerspoon auto-reload contrast (FSEvents survives chezmoi's atomic-rename; kqueue doesn't) is made self-contained in each skill.

Test plan

No code test suite (chezmoi dotfiles repo). Verified:

  • All six subsystem ## headings removed from AGENTS.md; five pointers present.
  • Content fidelity: every moved gotcha's signature string is gone from AGENTS.md and present in exactly one skill.
  • Cross-platform OS-gating rules confirmed still inline.
  • Pointer path globs cross-checked against real files in the tree.
  • chezmoi source state still renders; repo-root .agents/ is not a managed target (no apply impact).
  • No em dashes introduced in authored text; AGENTS.md = 195 lines.

Post-review changes

A two-axis /review (standards + spec) ran on the branch. Fixes applied as follow-up commits: swapped em-dash separators for colons in the five new skill descriptions (repo bans em dashes), added the macOS trigger term to finicky, and named the shared run_onchange_after_bootstrap_windows.ps1.tmpl explicitly in the windows-internals pointer. The implementation plan and design spec were dropped — they were execution artifacts; ADR-0003 is the canonical record.

Known follow-up (out of scope): a repo-wide em-dash sweep — AGENTS.md and several skill bodies (including the pre-existing update-* skills) carry em dashes in prose that predate this PR.

🤖 Generated with Claude Code

ChipWolf and others added 14 commits June 15, 2026 18:34
ADR-0003 plus an implementation spec for moving the situational
platform/app-specific sections of the root AGENTS.md (Finicky,
Hammerspoon, Komorebi, Rancher Desktop, Windows support, mise-on-Windows)
into five repo-local skills under .agents/skills/, keeping core chezmoi
knowledge and cross-platform mechanics inline. Decision reached via two
independent consensus panels (seeded + unseeded), both unanimous.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…section

Remove the inline ## Windows support, ## Finicky, ## Hammerspoon, ## Rancher Desktop, ## Komorebi, and ## mise on Windows sections now covered by repo-local skills; add compact skill-pointer bullets in Repo-specific conventions and a meta-rule entry for the new pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- swap em-dash separator for a colon in all five new SKILL.md
  descriptions (repo bans em dashes)
- add 'macOS' trigger term to the finicky skill description
- name run_onchange_after_bootstrap_windows.ps1.tmpl explicitly in the
  windows-internals scope and AGENTS.md pointer (shared with mise-on-windows)
- fix an em dash in the windows-internals scope line

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The implementation plan and design spec were execution artifacts; the
work is done and ADR-0003 captures the decision and consequences. Remove
the dangling spec reference from the ADR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
main reworked the hammerspoon config after this branch was cut (Ctrl->Option
keybinds, added space_indicator.lua menu-bar badge, mru-spaces position
stability via run_onchange_after_macos_defaults.sh.tmpl). The extracted skill
captured the old Ctrl/2-file version; resync it to main's current content so
the rebase doesn't silently drop that work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChipWolf
ChipWolf force-pushed the refactor/extract-subsystem-skills branch from 4dc42ea to 47b5d6d Compare June 15, 2026 17:40
@ChipWolf
ChipWolf merged commit 68065b5 into main Jun 15, 2026
13 checks passed
@ChipWolf
ChipWolf deleted the refactor/extract-subsystem-skills branch June 15, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant