feat: mirror tag-vocabulary summary and note-type validation
Ports two changes from the knowledge-base vault this skeleton is extracted from, keeping the shared scripts byte-identical across the pair: - `graph_summary` reports `by_tag` and `tag_count`, sized by `topTags`, and drops the `by_type`/`by_status` breakdowns. An MCP-only agent could not otherwise discover the tag spellings that `graph_search_nodes` matches verbatim. - `generate-graph.py --validate` now enforces a controlled vocabulary for a note's `type`, which is where the drift signal `by_type` used to give now lives. `AGENT_QUERY_GUIDE.md`, both skills and the-knowing-one quote the enforced enum. `tests/test_generate_graph.py` is new; `make test` is 50 tests. Regenerating the graph also drops a stale `GLOBAL_AGENTS` node for a file this skeleton does not carry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
638cbe6b39
commit
1cb6369282
@@ -26,7 +26,8 @@ through MCP.
|
||||
|
||||
## MCP tools
|
||||
|
||||
- `graph_summary` — overview of the graph: counts, types, tags, central nodes.
|
||||
- `graph_summary` — overview of the graph: counts, repo scopes, the tag
|
||||
vocabulary (`by_tag`, most frequent first) and central nodes.
|
||||
- `graph_search_nodes` — find nodes by tag / type / repo / id / text.
|
||||
- `graph_neighbors` — outbound + inbound links for a node id, each with its edge
|
||||
`type` + `annotation` (traverse the graph).
|
||||
@@ -56,15 +57,18 @@ README.md vault hub
|
||||
```
|
||||
|
||||
Every note carries taxonomy frontmatter: `id`, `title`, `type`
|
||||
(`hub|project|guideline|policy|feature|roadmap|decision|note|meta`), `status`
|
||||
(`hub|project|area|guideline|policy|feature|roadmap|decision|note|meta|reference`, enforced by
|
||||
`generate-graph.py --validate`), `status`
|
||||
(`active|draft|deprecated`), `tags`, `last_reviewed`, optional `repo`. Notes link
|
||||
with typed markdown links — `[text](note-id){"type":"…"}` — resolved by `id`.
|
||||
Legacy `[[wiki links]]` are rejected by the graph validator and must not be written.
|
||||
|
||||
## 1. Orient
|
||||
|
||||
Start broad with `graph_summary` to see node counts, types, tags, and the
|
||||
most-central notes. Then `read_note` the entry points:
|
||||
Start broad with `graph_summary` to see node counts, repo scopes, the tag
|
||||
vocabulary and the most-central notes. Its `by_tag` list is the only place the
|
||||
tag spellings are visible — read it before filtering by `tag`, which matches
|
||||
verbatim. Then `read_note` the entry points:
|
||||
|
||||
- vault hub (`README.md`) — entry points.
|
||||
- `03_resources/repos/repo-landscape.md` — index of documented repos, grouped.
|
||||
@@ -80,8 +84,9 @@ Use `graph_search_nodes` to locate notes:
|
||||
|
||||
- by **repo** — every note tied to a repo (e.g. `tenant-controller`).
|
||||
- by **type** — `policy`, `decision`, `feature`, `guideline`, `project`, ...
|
||||
- by **tag** — e.g. `kcp`.
|
||||
- by **text** — when tag/type/id unknown, full-text search the notes.
|
||||
- by **tag** — e.g. `kcp`. Exact match; take the spelling from `by_tag`.
|
||||
- by **text** — `query` matches a node's id, title, path and tags, not the note
|
||||
body. Widen with a tag or repo filter rather than a longer phrase.
|
||||
|
||||
Use `graph_summary` to spot central (most-linked) notes worth reading early.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user