{"at":"2026-11-23T00:11:56.163Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T00:11:57.221Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:11:57.371Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T00:11:58.389Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-11-25","serverInfo":{"name":"archprint","version":"0.18.3"}}}}
{"at":"2026-11-23T00:11:58.389Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:11:58.389Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:11:58.391Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"List the architecture rules this TypeScript repo already follows, with the evidence: each rule stated in plain words, whether it is AUTO (clears the confidence gate) or SUGGEST (short of it), its adoption (\"enforce\": archprint init or generate writes a rule for it, which archprint wire connects to the linter, and public-API rules need dependency-cruiser; \"review\": held for a human to review, not enforced by default; \"report-only\": the code follows it but archprint writes no rule for it), how many files conform vs. break it, the files that break it, and the confidence. Read-only. `path` defaults to \".\" and a monorepo root scans every app.","inputSchema":{"properties":{"deep":{"description":"resolve imports through barrels and aliases (slower, more accurate)","type":"boolean"},"path":{"description":"app or monorepo-root directory on this machine (default \".\"), not a URL","type":"string"}},"type":"object"},"name":"archprint_scan","title":"Scan architecture rules"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Recommend an architecture rule set for this repo from its evidence and detected stack: what to enforce now, what the code already follows that archprint reports but does not write a rule for yet (reportOnly), what to review before enforcing, and what comparable repos commonly adopt that this repo does not yet. Read-only.","inputSchema":{"properties":{"path":{"description":"app or monorepo-root directory on this machine (default \".\"), not a URL","type":"string"}},"type":"object"},"name":"archprint_recommend","title":"Recommend architecture rules"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Explain one rule from archprint_scan in depth, by its id, label or ESLint name (e.g. AP-002, env-access, no-lib-to-app, \"lib !-> app\" or archprint/no-lib-to-app): its statement, gate status, adoption (enforce, review, or report-only, as in archprint_scan), observed conformance and confidence floor, and every file that breaks it (scan lists only a few). For the forbidden-import rules (AP-001, AP-002) it also returns each confidence-gate condition with its value and threshold, how to fix a violation, and when not to adopt the rule. A rule the team stated in CLAUDE.md or AGENTS.md and adopted (its id starts with doc-) comes back with the sentence the team wrote, its source line, what it enforces in plain words, its evidence and its exceptions. Read-only.","inputSchema":{"properties":{"id":{"description":"rule id, label or ESLint name from archprint_scan, e.g. AP-002, no-lib-to-app or \"lib !-> app\", or a declared rule id such as doc-no-fetch-in-components","type":"string"},"path":{"description":"app or monorepo-root directory on this machine (default \".\"), not a URL","type":"string"}},"required":["id"],"type":"object"},"name":"archprint_explain","title":"Explain an architecture rule"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Verify the rules a repo states in its context files (CLAUDE.md, AGENTS.md, .cursor/rules, ...) against its code. Read those files, then map each rule-like sentence to one template, quoting it exactly. archprint checks the quote is in the file and the mapping matches real files, measures how many files follow or break it, and returns a gap report: enforce now, enforce with a baseline (broken today, with the files), already an archprint rule, check the mapping, or guidance only. Show the report to the user: adopting a rule is their decision. Templates, with globs relative to `path` in ESLint syntax: \"forbid-import\" (files must not import `targets`, path globs matched on the file an import resolves to, or `packages`, specifier globs, each optionally limited to named `imports` such as {\"name\": \"next/cache\", \"imports\": [\"unstable_cache\"]}); \"forbid-usage\" (files must not use a global named in `usage`, such as \"fetch\", \"window\" or \"process.env\"); \"forbid-file\" (no new file may match `files`); \"inferred\" (the sentence is a rule archprint_scan lists; `rule` is its id); \"none\" (no template fits; give the `reason`, e.g. a style rule a standard linter covers). Read-only.","inputSchema":{"properties":{"mapping":{"description":"one entry per rule-like sentence","properties":{"rules":{"items":{"properties":{"except":{"description":"files it does not cover","items":{"type":"string"},"type":"array"},"files":{"description":"files the rule covers","items":{"type":"string"},"type":"array"},"name":{"description":"for forbid-*: lowercase words joined by \"-\", e.g. no-fetch-in-components","type":"string"},"packages":{"items":{"properties":{"imports":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"required":["name"],"type":"object"},"type":"array"},"reason":{"description":"for none: why no template fits","type":"string"},"rule":{"description":"for inferred: the archprint rule id","type":"string"},"source":{"properties":{"file":{"description":"context file, relative to path","type":"string"},"quote":{"description":"the sentence, word for word","type":"string"}},"required":["file","quote"],"type":"object"},"targets":{"items":{"type":"string"},"type":"array"},"template":{"enum":["forbid-import","forbid-usage","forbid-file","inferred","none"],"type":"string"},"usage":{"items":{"type":"string"},"type":"array"}},"required":["template","source"],"type":"object"},"type":"array"}},"required":["rules"],"type":"object"},"path":{"description":"repository root on this machine, where the context files are (default \".\"), not a URL","type":"string"}},"required":["mapping"],"type":"object"},"name":"archprint_gap_report","title":"Verify the rules in CLAUDE.md or AGENTS.md"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Check the current change, including uncommitted edits, against the rules this repo adopted with archprint init or generate, and report only the violations the change introduces (file, line, rule, and the evidence for the rule), plus those it fixed and any exceptions allowed with a reason in .archprint/config.json. Use it before finishing a change. Compares with `base` (a branch or commit, default origin/HEAD). Read-only: the files of the base commit are copied to a temporary folder outside the repo and deleted afterwards; it runs no git hooks and changes nothing in the repo. Returns status \"skipped\" with the reason when the repo has not adopted rules.","inputSchema":{"properties":{"base":{"description":"branch or commit to compare against (default origin/HEAD)","type":"string"},"path":{"description":"repository directory where archprint was set up, on this machine (default \".\")","type":"string"}},"type":"object"},"name":"archprint_check","title":"Check a change against adopted rules"}]}}}
