Skip to content

Commit b440230

Browse files
docs(miner): cross-reference the MCP tool surface from coding-agent-driver.md (#5418)
The README's MCP server section already documents every landed gittensory-miner-mcp tool, including the excluded-columns safety note for the ledger/governor tools, but nothing pointed a coding-agent-driver.md reader at it, and there was no automated check keeping the docs in sync with the actual tool registry. Adds the cross-reference, strengthens the paragraph relating AMS's local tools to ORB's hosted ones (naming convention, local SQLite vs. hosted backing store), and adds a parity test that fails if a registered tool goes undocumented or vice versa. Closes #5162
1 parent fd5800f commit b440230

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

packages/gittensory-miner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ This completes the read-only AMS MCP tool surface (status, portfolio, claims, ev
172172
}
173173
```
174174

175-
`gittensory` exposes ORB's hosted contributor-workflow tools (issue ranking, PR packet prep, decision packs). `gittensory-miner` exposes AMS's own local state-visibility tools listed above (portfolio dashboard, claims, audit feed, run state, plans) — a fully separate, 100% local tool surface with no shared code or network calls between the two.
175+
`gittensory` exposes ORB's hosted contributor-workflow tools (issue ranking, PR packet prep, decision packs). `gittensory-miner` exposes AMS's own local state-visibility tools listed above (portfolio dashboard, claims, audit feed, run state, plans) — a fully separate, 100% local tool surface with no shared code or network calls between the two. Both follow the same `gittensory_*` tool-naming convention (`gittensory_...` vs. `gittensory_miner_...`), but back onto different stores: ORB's tools read the hosted gittensory backend, AMS's tools read this machine's own local SQLite files (see [Local storage](#local-storage)) — a handful of AMS tools even name the ORB tool they mirror (e.g. `gittensory_miner_get_run_state` is the read-only analog of `gittensory_get_automation_state`) so the relationship is explicit at the point of use, not just here.
176176

177177
## Version check
178178

packages/gittensory-miner/docs/coding-agent-driver.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,4 @@ between loop cycles -- an after-the-fact, cross-cycle total, not the per-iterati
129129
- [`env-reference.md`](env-reference.md) — env vars including ledger path overrides.
130130
- [`../DEPLOYMENT.md`](../DEPLOYMENT.md) — laptop vs fleet deployment and state directory layout.
131131
- [`miner-goal-spec.md`](miner-goal-spec.md) — per-repo `.gittensory-miner.yml` targeting policy.
132+
- [`../README.md#mcp-server`](../README.md#mcp-server) — the `gittensory-miner-mcp` read-only tool surface for querying this driver's resolved status (provider, model env-var name, CLI presence) and the rest of AMS's local state over MCP.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
3+
import { describe, expect, it } from "vitest";
4+
5+
const MCP_BIN_PATH = join(process.cwd(), "packages/gittensory-miner/bin/gittensory-miner-mcp.js");
6+
const README_PATH = join(process.cwd(), "packages/gittensory-miner/README.md");
7+
const CODING_AGENT_DRIVER_DOC_PATH = join(process.cwd(), "packages/gittensory-miner/docs/coding-agent-driver.md");
8+
9+
/** Every `server.registerTool("gittensory_miner_...", ...)` name in the real MCP bin -- the source of truth
10+
* this test pins the README's "MCP server" section against, so the two can never silently drift (#5162). */
11+
function registeredMinerMcpToolNames(): string[] {
12+
const source = readFileSync(MCP_BIN_PATH, "utf8");
13+
const names = [...source.matchAll(/server\.registerTool\(\s*\n?\s*"(gittensory_miner_\w+)"/g)]
14+
.map((m) => m[1])
15+
.filter((name): name is string => name !== undefined);
16+
expect(names.length).toBeGreaterThan(0);
17+
return names;
18+
}
19+
20+
describe("miner MCP tool documentation parity (#5162)", () => {
21+
it("documents every registered tool in the README, and documents nothing else", () => {
22+
const registered = registeredMinerMcpToolNames();
23+
const readme = readFileSync(README_PATH, "utf8");
24+
const mcpSection = readme.slice(readme.indexOf("## MCP server"), readme.indexOf("## Version check"));
25+
26+
for (const name of registered) {
27+
expect(mcpSection).toContain(`\`${name}\``);
28+
}
29+
30+
const documented = [...mcpSection.matchAll(/`(gittensory_miner_\w+)`/g)]
31+
.map((m) => m[1])
32+
.filter((name): name is string => name !== undefined);
33+
for (const name of documented) {
34+
expect(registered).toContain(name);
35+
}
36+
});
37+
38+
it("documents the excluded-column safety property for the ledger/governor tools", () => {
39+
const readme = readFileSync(README_PATH, "utf8");
40+
const mcpSection = readme.slice(readme.indexOf("## MCP server"), readme.indexOf("## Version check"));
41+
expect(mcpSection).toContain("payload_json");
42+
});
43+
44+
it("relates AMS's local MCP tools to the hosted gittensory-mcp tools", () => {
45+
const readme = readFileSync(README_PATH, "utf8");
46+
const mcpSection = readme.slice(readme.indexOf("## MCP server"), readme.indexOf("## Version check"));
47+
expect(mcpSection).toContain("local SQLite");
48+
expect(mcpSection).toContain("hosted");
49+
});
50+
51+
it("is cross-referenced from the coding-agent-driver doc", () => {
52+
const doc = readFileSync(CODING_AGENT_DRIVER_DOC_PATH, "utf8");
53+
expect(doc).toContain("../README.md#mcp-server");
54+
});
55+
});

0 commit comments

Comments
 (0)