install: slim the generated agent guidance to a policy core, move reference to gortex://guide#253
Merged
Merged
Conversation
…on-demand reference home
Introduce a single on-demand home for reference detail that the installed
CLAUDE.md section used to pre-pay every session: the LLM-provider matrix, the
non-obvious capabilities catalog, the token-economy content knobs, the MCP
resources list, and section pointers into the analyze / search_ast catalogs
(rendered from the same source that backs kind:"help" / detector:"help").
- gortex://guide MCP resource + gortex://guide/{topic} section template
- `gortex guide [topic]` CLI verb for non-resource clients
- the wire-format deep-dive stays in the server instructions; the guide points
at it rather than repeating it (single-home invariant, tested)
… core Rewrite the generated global rule block (gortex install -> ~/.claude/CLAUDE.md) and the per-project block down to the load-bearing policy: the mandatory graph-tools mapping (Grep->search_symbols, Read->get_symbol_source/read_file, callers->get_callers, edit verbs) with the deny-hook note, the behavior-critical memory-workflow triggers (distill_session / surface_memories / save_note / store_memory), and pointers to gortex://guide and tools_search. The relocated reference content — the LLM-provider matrix, the analyze / search_ast catalogs, and the wire-format deep-dive — now lives in exactly one home each (gortex://guide, kind:"help"/gortex://schema, and the server instructions respectively) and is asserted absent from both rule blocks. Global block 18,791 -> 4,308 bytes; project block 43,783 -> 2,264 bytes. The memory triggers live fully in the global policy; the project block keeps a compact pointer so nothing is written to both homes.
…e line Cut every installed skill and sub-agent description to a single trigger line; the lazy bodies are unchanged. The eager skill frontmatter total drops from 9,234 to 2,147 bytes; sub-agent frontmatter from 1,751 to 1,203 (the tool allowlist stays). Regenerate the hermes render golden, which embeds the descriptions in its toolset manifest.
… migration Add the permanent measurement gate — the global CLAUDE.md rule block must stay under 6.5 KiB and the eager skill frontmatter total under 2.5 KiB, actuals printed — plus a migration gate that re-installs over a fat pre-diet marker block and asserts the slim block replaces it in place with surrounding user prose preserved and no duplicate block. The single-home spot-checks (provider matrix only in the guide, analyze catalog only in help/guide, wire-format deep-dive only in the server instructions) ride on the rule-block and guide tests added with the earlier commits.
Add `gortex guide [topic]` to the CLI reference and the gortex://guide +
gortex://guide/{topic} entries to the MCP resources table (16 -> 18).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
`gortex install` writes agent guidance (CLAUDE.md sections, skill/sub-agent frontmatters) that had accreted a paragraph per feature and re-stated facts the MCP schema and server instructions already carry. Every agent session pre-paid ~6.8k tokens for it. This PR gives every fact exactly one home:
Numbers (bytes; ~tokens at 4.4 B/tok)
Verification
Single-home spot-check tests (provider matrix only in the guide; catalogs only in help/schema; wire-format deep-dive only in server instructions); fat→slim migration fixture with user content preserved; render goldens regenerated; skill-drift check, golangci-lint, and `go test -race` green on all changed packages.
Note for reviewers: `TestSchemaParityAudit` (internal/graph) false-fails when run from a checkout under a `/worktrees/` path — its path filter skips the whole tree. It passes on a normal checkout; this branch touches no internal/graph files.