Skip to content

chore: instruction-file hygiene and keep removed process directories removed - #2134

Merged
rdimitrov merged 4 commits into
mainfrom
chore/instruction-hygiene
Oct 6, 2026
Merged

rdimitrov merged 4 commits into
mainfrom
chore/instruction-hygiene

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

Summary

Follow-up to #2103, #2105, and #2106: cheap hygiene for agent context, plus a guard so the removed process directories stay removed. Four commits, each reviewable alone.

1. Shorter agent descriptions. Every session loads each agent's description. The nine reviewer agents' descriptions totalled about 19,000 characters, roughly 7× the root AGENTS.md. Each now says what the agent does, when to use it, and which agent to use instead: about 2,700 characters in total. Inline examples and pointers to agents that don't exist here are gone. Agent bodies, tools, and settings are unchanged.

2. Instruction-file check (.github/scripts/instruction-files.py, run by task docs:check and the CI docs job; its fixture test runs under task lint:actions):

Check Limit Basis
Each AGENTS.md under 200 lines Anthropic's documented CLAUDE.md target
AGENTS.md files from the root down to any directory ≤ 32 KiB Codex's default project_doc_max_bytes
CLAUDE.md beside every AGENTS.md must be a symlink to it Claude Code + tool-neutral single source
task … named in an AGENTS.md code span or block must exist stale commands misdirect agents
.claude/rules/*.md ≤ 25 lines several can load at once
Agent and skill description ≤ 1024 chars Agent Skills spec maximum

docs/README.md gains a "What goes where" table: root and module AGENTS.md, rules, skills, docs/, user-docs/.

3. Removed directories stay removed. The gates are gone, so a PR adding a file under docs/adr/, docs/acceptance/, docs/superpowers/, or .claude/plans/ would quietly recreate them. About 26 open PRs currently add files there. The check now fails on any such file and says where that content belongs: the PR description or an issue for plans and design notes, docs/ or user-docs/ for current behavior.

4. docs/usage redirect stubs deleted. The 20 pages existed only so historical ADR links would resolve. Their four inbound links now point at the canonical microVM guide. Also removes ADR 0351 citations from apps/biome.json lint messages.

Heads-up for open PRs

After this merges, PRs that add files under the removed directories fail Doc validation with a message saying where to move the content.

Test plan

  • task docs:check: instruction-files ok; matlatl strict 0 broken / 0 orphans
  • python3 .github/scripts/instruction-files_test.py: 16 fixture cases, including edges (199 vs 200 lines, prose "task" ignored, docs/adr-notes.md not flagged)
  • task studio:lint (biome config)
  • actionlint on ci.yml
  • task lint:actions stops locally at microvm-ci-release_test.sh, the darwin-arm64 failure that also happens on main; the new test passes when run directly

User-facing change

None.

🤖 Generated with Claude Code

rdimitrov and others added 4 commits October 6, 2026 15:15
Every session loads each agent's description, so the nine reviewer
agents cost about 19,000 characters of context on every task. Cut each
description to what the agent does, when to use it, and which agent to
use instead (about 2,700 characters in total). Drop the inline
examples and pointers to agents that do not exist in this repo. Agent
bodies, tools, and settings are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add .github/scripts/instruction-files.py, run by task docs:check and the
CI docs job:
- AGENTS.md under 200 lines per file (Anthropic's CLAUDE.md target)
- AGENTS.md files from the root down at most 32 KiB (Codex's cap)
- a CLAUDE.md symlink beside every AGENTS.md
- every `task` an AGENTS.md names exists
- .claude/rules files at most 25 lines
- agent and skill descriptions at most 1024 characters (Agent Skills spec)

Its fixture test runs under task lint:actions. docs/README.md gains a
"What goes where" table and drops two entries for deleted ADRs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since the process gates were removed, a PR that adds a file under
docs/adr/, docs/acceptance/, docs/superpowers/, or .claude/plans/ would
quietly recreate them. instruction-files.py now fails on any tracked
file there and says where that content belongs instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/usage.md, docs/usage/*, and docs/configuration-reference.md only
redirected to user-docs/ so historical ADR links would resolve; the
ADRs are gone. Point their four inbound links at the canonical microVM
guide, drop the reader-map and user-docs mentions, and remove ADR 0351
citations from apps/biome.json lint messages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdimitrov
rdimitrov merged commit 08d9865 into main Oct 6, 2026
40 checks passed
@rdimitrov
rdimitrov deleted the chore/instruction-hygiene branch October 6, 2026 12:55
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 7, 2026
2 tasks

This branch was successfully deployed

1 active deployment
Preview — c228eb24 Deployed Oct 6, 2026 by vercel[bot]
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.

2 participants