feat: add model index routing - #35
Draft
damusix wants to merge 1 commit into
Draft
Conversation
Every organizing folder of a model root gets a generated index.md router: a table of the folder's children with name, kind, description, and a relative link, so a reader descends root → group → entity through small tables instead of globbing the tree. Per-file hashes roll up into folder digests and a root digest; `validate --index` reports drift as a Class B finding. `index --agents` adds an in-folder AGENTS.md, a CLAUDE.md shim, and SKILL.md so the folder orients any agent that opens it, written only inside the model root. Routers mirror the filesystem, not declared groups: `group:` is declarative and a model may keep entities flat, so paths come from the parser's discovered sourcePath. The generator owns only the bytes inside its own <ignatius-*> tags, so hand-authored <ignatius-rules> blocks and an existing CLAUDE.md survive regeneration. A tag is a region boundary only at column 0 ending its line; anywhere else it is text, since a delimiter can be accidental and a position cannot. SKILL.md frontmatter is the one exception to region-only writes, because the harness needs it to discover the skill. `description:` is a new top-level field on all five file kinds and is the router's payload. The reserved index_file name is skipped by every scan. models/llm-memory-db-mssql is the fully realized exemplar. Claude-Session: https://claude.ai/code/session_019fHbm44mjjSyPgGaFh81T9
damusix
force-pushed
the
worktree-model-index-routing
branch
from
September 6, 2026 06:51
72074da to
85a6a59
Compare
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.
Generates a navigable
index.mdrouter into every organizing folder of a model root, with digests that roll up to the root soignatius validate --indexcatches drift, and optional in-folder agent guidance viaindex --agents. Design:docs/design/model-index-routing.md. Contract:docs/spec/model-index-routing.md.models/llm-memory-db-mssql/is the fully realized example:description:on all 74 authored files, routers carrying real routing text, and the three guidance files. Start at itsindex.md.Decisions worth a second opinion
index.staleis Class B, so a stale router fails the build. The flag is opt-in and the fix is one command.<ignatius-inside a generated file is always a region boundary, and column-0 boundaries must pair open and close by name. To mention a tag in a hand-authored rules block, indent the line or write<ignatius-index>. Three delimiter-based exemptions (fence, inline code, full containment) each let real markup hide, twice as silent truncation; a position cannot be accidental.mixedneeds the minority signature above a 20% share. The mssql model resolvesmixed, matching its ownignatius.ymlcomment.indexcreatesflows/,externals/, andstores/for models that lack them, soorm-pureandorm-hybridgained empty registries. Skip absent registries, or accept the directories.harness: autowalks to/, and~/.claudeexists on any Claude Code machine, so every model under$HOMEresolves to Claude. Bound the walk at the git root, or document it.Claude-Session:trailer from a session-level directive that overrode the repo's no-attribution rule. Amend before merge, or accept.validate --index, not byindexitself.