Support external vault roots across tooling

This commit is contained in:
2026-09-20 17:05:21 +02:00
parent 1cb6369282
commit 293b582e97
16 changed files with 573 additions and 204 deletions
+19 -22
View File
@@ -25,6 +25,8 @@ already captured into `raw/` (a PDF, an image) at the absolute path
## MCP tools
Read:
- `read_instructions` — framework `AGENTS.md` and `AGENT_QUERY_GUIDE.md`,
available without a graph or a data-vault copy of either document.
- `graph_summary` — counts, repo scopes, the tag vocabulary (`by_tag`), most-linked notes.
- `graph_search_nodes` — find notes by tag / type / repo / id / free text.
- `graph_neighbors` — inbound + outbound links of a node, with edge `type` and `annotation`.
@@ -42,8 +44,9 @@ Write:
- `edit_note(path, old_string, new_string, replace_all?)` — exact-string edit,
for backlinks into notes that already exist.
Publish:
- `refresh_graph(validate=true)` — regenerate and validate `index/graph.json`.
Publish only when the caller explicitly authorizes it:
- `git_commit(message, paths[])` — stage the named paths and commit.
- `git_push(remote?, branch?)` — push to `origin` / current branch.
@@ -55,21 +58,14 @@ Invoke the skill first, then follow it step by step:
Skill(knowledge-base-ingest-resource)
```
The skill is the source of truth for the procedure. Translate each of its shell
steps into the MCP equivalent:
Then call `read_instructions` and read both documents before any vault mutation.
The MCP server locates the framework; no filesystem access or path guessing is
needed. If instructions cannot be loaded, report the failure before writing.
Use the skill's explicit graph queries to discover additional vault policies.
Apply task-specific instructions supplied by the caller as well.
| Skill step | Your call |
|-------------------------------------|--------------------------------------------------|
| check slug not taken / find matches | `graph_search_nodes`, `read_note` |
| `printf … > raw/source.url` | `write_note("03_resources/<slug>/raw/source.url", …)` |
| save fetched page to `raw/page.md` | `WebFetch` → `write_note(".../raw/page.md", …)` |
| `cp "<source-path>" raw/` | `capture_raw(path=".../raw/<file>", source_path="<source-path>")` |
| `curl -fsSL "<url>" -o raw/<file>` | `capture_raw(path=".../raw/<file>", url="<url>")` |
| read the captured binary | `Read(<absolute_path from capture_raw>)` |
| write the topic + index notes | `write_note` |
| backlink an existing note | `edit_note` |
| `make graph` | `refresh_graph(validate=true)` |
| `git add <path>` (one by one) | `git_commit(message, paths=[…])` |
The skill is the source of truth for the procedure. Follow its MCP calls directly;
do not translate missing operations into shell commands.
## Operating rules
@@ -84,10 +80,10 @@ steps into the MCP equivalent:
Never fabricate a page or transcript — if the fetch or capture fails, stop and
report what is missing. Verify the capture landed: the result carries `bytes`
and `sha256`.
- **YouTube is still out of reach.** Transcripts need `yt-dlp` or
`youtube-transcript-api`, which are shell tools you do not have. Capture the
URL into `raw/source.url`, then hand the video to **the-collector** rather than
inventing transcript text.
- **YouTube transcripts must be supplied.** Capture a supplied transcript with
`capture_raw` or `write_note`. If none is supplied, preserve the source URL and
report the missing transcript before writing content notes. Do not run shell
extractors or invent transcript text.
- **Link, don't duplicate.** Search the graph before writing a topic note. If the
vault already covers the topic, link it instead of creating a second note.
- **Typed markdown links only.** `[title](note-id){"type":"…","link-info":"…"}`.
@@ -100,9 +96,10 @@ steps into the MCP equivalent:
- **Name every path you commit.** `git_commit` takes an explicit list; wildcard
staging is rejected by the server. Include the resource folder, every
backlinked note, and `index/graph.json`.
- **Push straight to `main`.** This vault takes ingests as direct commits; no
branch, no PR. Commit with Conventional Commits (`feat: ingest <resource>`),
then `git_push`. If the caller says "don't push", stop after the commit.
- **Follow the caller's publishing instructions.** Do not commit or push unless
explicitly authorized. Use the selected vault's branch and review policy;
do not assume a branch name or a direct-push workflow. Without publishing
authorization, report the changed paths and validation result.
## Report