Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 10:03
6c47f2d

Adds mounts: one project router can now list, load and check a second, independently maintained router tree that lives inside the project.

Add the field to the outer config, keeping its existing topics:

"mounts": {
  "kb": { "root": "modules/kb-core" }
}
python3 scripts/ai-context.py list
python3 scripts/ai-context.py guide kb/guide
python3 scripts/ai-context.py check
  • list shows local topics plus <mount>/<topic> names, each with its origin. A local guide and a mounted kb/guide can coexist.
  • check applies each root's own instructions, byte budgets, discovery and orphan, history, indexed and link rules. The outer scan leaves a mounted tree to its owner; explicitly routed outer sources are still checked.
  • The mounted config defaults to wiki/ai-context.json inside that root. Add "config": "context/router.json" to select another file there.
  • A request for several topics prints nothing unless every one of them renders, so a failure cannot leave a partial result on stdout.

A mounted root must be inside the project after symlinks are resolved. It cannot contain the outer wiki, history directory, config or root instructions, and one mount root cannot contain another. A mounted config cannot declare mounts of its own. The router only reads files that are already present; it does not fetch modules or run their scripts.

A missing mount root is a one-line NOTICE in list, with status 0; check and requests for that mount fail. Other mount errors fail with a diagnostic naming the mount while list and check continue through the healthy roots.

Without mounts, or with "mounts": {}, successful list, check and topic output is the same as 0.2.1. Two failure cases now report a clean error instead of a traceback: a missing root instructions file in check, and a topic source that is a directory.

To update an existing routed repository, compare local customizations before replacing its copied scripts/ai-context.py. Updating the installed skill does not replace copied routers, and mounts needs the 0.3.0 script. Preserve the repository's config and documentation, then run python3 scripts/ai-context.py --version and check.

For a pinned Pi installation:

pi install git:github.com/runkids/agents-context-router@v0.3.0

Known limitation: check does more path resolution than before. On a tree of 4,000 Markdown files without mounts it took 0.65 s, up from 0.44 s on 0.2.1. list and topic loading are unaffected.

Validation: the 106-test suite passed locally and in CI on Linux (Python 3.8 and 3.13), macOS and Windows; a few filesystem-specific cases skip on platforms that cannot exercise them. Antigravity and Claude Code manifest validation passed locally. Pi skill discovery and the model-based evals were not run for this release.

Thanks to @salmonumbrella for #14, which closes #13.