archsutra-ai 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -6
- package/README.md +84 -12
- package/dist/audit.js +125 -44
- package/dist/cli.js +184 -96
- package/dist/drift.js +29 -15
- package/dist/fsutil.js +117 -20
- package/dist/history.js +40 -0
- package/dist/html.js +10 -8
- package/dist/map.js +26 -5
- package/dist/mcp.js +70 -55
- package/dist/redact.js +24 -11
- package/dist/report.js +69 -19
- package/dist/rules-extra.js +59 -0
- package/dist/secret-patterns.js +69 -0
- package/dist/suppress.js +31 -19
- package/dist/verify.js +2 -2
- package/dist/write.js +71 -0
- package/docs/architecture/overview.html +29 -12
- package/docs/architecture/overview.md +2 -2
- package/docs/architecture/threat-model.html +28 -11
- package/docs/assets/charts/coverage-dark.svg +11 -0
- package/docs/assets/charts/coverage.svg +11 -0
- package/docs/assets/charts/finding-anatomy-dark.svg +20 -0
- package/docs/assets/charts/finding-anatomy.svg +20 -0
- package/docs/assets/charts/pipeline-dark.svg +13 -0
- package/docs/assets/charts/pipeline.svg +13 -0
- package/docs/assets/charts/precision-by-batch-dark.svg +12 -0
- package/docs/assets/charts/precision-by-batch.svg +12 -0
- package/docs/assets/charts/precision-by-rule-dark.svg +12 -0
- package/docs/assets/charts/precision-by-rule.svg +12 -0
- package/docs/assets/charts/sample-findings-by-severity-dark.svg +11 -0
- package/docs/assets/charts/sample-findings-by-severity.svg +11 -0
- package/docs/assets/charts/scan-time-dark.svg +11 -0
- package/docs/assets/charts/scan-time.svg +11 -0
- package/docs/assets/site.css +259 -138
- package/docs/assets/site.js +92 -6
- package/docs/community/good-first-issues.html +28 -11
- package/docs/compatibility/matrix.html +28 -11
- package/docs/compatibility/smoke-tests/index.html +28 -11
- package/docs/decisions/ADR-0001-deterministic-cli-plus-ide-skills.html +28 -11
- package/docs/guides/cheat-sheet.html +100 -0
- package/docs/guides/cheat-sheet.md +146 -0
- package/docs/guides/ci-recipes.html +170 -0
- package/docs/guides/ci-recipes.md +176 -0
- package/docs/guides/evidence-at-a-glance.html +93 -0
- package/docs/guides/evidence-at-a-glance.md +65 -0
- package/docs/guides/getting-started.html +151 -0
- package/docs/guides/getting-started.md +160 -0
- package/docs/guides/how-it-works.html +161 -0
- package/docs/guides/how-it-works.md +148 -0
- package/docs/guides/mcp-server.html +99 -0
- package/docs/guides/mcp-server.md +81 -0
- package/docs/guides/reading-a-report.html +119 -0
- package/docs/guides/reading-a-report.md +111 -0
- package/docs/guides/real-world-scenarios.html +287 -0
- package/docs/guides/real-world-scenarios.md +377 -0
- package/docs/handbook/01-executive-summary.html +30 -13
- package/docs/handbook/01-executive-summary.md +2 -2
- package/docs/handbook/02-functional-specification.html +30 -13
- package/docs/handbook/02-functional-specification.md +3 -3
- package/docs/handbook/03-technical-specification.html +31 -14
- package/docs/handbook/03-technical-specification.md +3 -3
- package/docs/handbook/04-architecture.html +29 -12
- package/docs/handbook/04-architecture.md +1 -1
- package/docs/handbook/05-user-guide.html +33 -15
- package/docs/handbook/05-user-guide.md +5 -4
- package/docs/handbook/06-cli-reference.html +52 -16
- package/docs/handbook/06-cli-reference.md +47 -4
- package/docs/handbook/07-security-privacy-legal.html +31 -12
- package/docs/handbook/07-security-privacy-legal.md +4 -0
- package/docs/handbook/08-testing-and-proof.html +32 -15
- package/docs/handbook/08-testing-and-proof.md +4 -4
- package/docs/handbook/09-compatibility-and-roadmap.html +29 -12
- package/docs/handbook/09-compatibility-and-roadmap.md +3 -2
- package/docs/handbook/10-contributor-guide.html +29 -12
- package/docs/handbook/10-contributor-guide.md +1 -1
- package/docs/handbook/11-glossary-and-faq.html +34 -13
- package/docs/handbook/11-glossary-and-faq.md +7 -1
- package/docs/handbook/12-rule-catalog.html +59 -19
- package/docs/handbook/12-rule-catalog.md +62 -5
- package/docs/handbook/13-trust-and-assurance.html +29 -12
- package/docs/handbook/13-trust-and-assurance.md +1 -1
- package/docs/handbook/14-real-world-evaluation.html +28 -11
- package/docs/handbook/15-supply-chain-and-release.html +28 -11
- package/docs/handbook/16-performance-and-quality-metrics.html +28 -11
- package/docs/handbook/16-performance-and-quality-metrics.md +1 -1
- package/docs/handbook/README.md +4 -2
- package/docs/handbook/index.html +31 -13
- package/docs/index.html +101 -51
- package/docs/legal/legal-review-brief.html +28 -11
- package/docs/legal/trademark-and-name-clearance.html +28 -11
- package/docs/proof/accessibility.html +28 -11
- package/docs/proof/benchmarks.json +9 -9
- package/docs/proof/benchmarks.md +4 -4
- package/docs/proof/test-results.txt +56 -40
- package/docs/rfc/0001-archsutra-v0.1.html +28 -11
- package/docs/sample-report/architecture-register.json +46 -0
- package/docs/sample-report/audit-report.html +123 -0
- package/docs/sample-report/audit-report.md +314 -0
- package/docs/sample-report/current-state.html +77 -0
- package/docs/sample-report/current-state.md +51 -0
- package/docs/sample-report/findings.json +478 -0
- package/docs/sample-report/findings.sarif +754 -0
- package/docs/sample-report/index.html +57 -0
- package/docs/sample-report/overview.md +11 -0
- package/docs/search-index.json +1 -0
- package/docs/sitemap.xml +39 -28
- package/llms.txt +11 -2
- package/package.json +3 -2
- package/schemas/findings.schema.json +4 -3
- package/skills/architecture-audit/SKILL.md +2 -2
- package/skills/architecture-audit/references/report-template.md +1 -1
- package/skills/architecture-verification/references/fitness-functions.md +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Use ArchSutra as an MCP server | ArchSutra AI</title>
|
|
7
|
+
<meta name="description" content="Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems.">
|
|
8
|
+
<link rel="canonical" href="https://shahvatsalofficial.github.io/archsutra-ai/guides/mcp-server.html">
|
|
9
|
+
<meta name="color-scheme" content="light dark">
|
|
10
|
+
<meta name="theme-color" content="#ffffff">
|
|
11
|
+
<meta property="og:type" content="article">
|
|
12
|
+
<meta property="og:title" content="Use ArchSutra as an MCP server | ArchSutra AI">
|
|
13
|
+
<meta property="og:description" content="Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems.">
|
|
14
|
+
<meta property="og:url" content="https://shahvatsalofficial.github.io/archsutra-ai/guides/mcp-server.html">
|
|
15
|
+
<meta property="og:site_name" content="ArchSutra AI">
|
|
16
|
+
<meta name="twitter:card" content="summary">
|
|
17
|
+
<meta name="twitter:title" content="Use ArchSutra as an MCP server | ArchSutra AI">
|
|
18
|
+
<meta name="twitter:description" content="Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems.">
|
|
19
|
+
<meta name="author" content="Vatsal Shah">
|
|
20
|
+
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml">
|
|
21
|
+
<link rel="stylesheet" href="../assets/site.css">
|
|
22
|
+
<script>try{if(localStorage.getItem('as-theme')==='dark')document.documentElement.setAttribute('data-theme','dark')}catch(e){}</script>
|
|
23
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Use ArchSutra as an MCP server","description":"Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems.","author":{"@type":"Person","name":"Vatsal Shah","url":"https://shahvatsal.com"},"inLanguage":"en","isPartOf":{"@type":"WebSite","name":"ArchSutra AI","url":"https://shahvatsalofficial.github.io/archsutra-ai"}}</script>
|
|
24
|
+
</head>
|
|
25
|
+
<body class="doc" data-root="../">
|
|
26
|
+
<a class="skip" href="#main">Skip to content</a>
|
|
27
|
+
<header class="topbar">
|
|
28
|
+
<div class="topbar-inner">
|
|
29
|
+
<a class="brand" href="../index.html" aria-label="ArchSutra AI home"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a>
|
|
30
|
+
<nav class="top-links" aria-label="Primary"><a href="../guides/getting-started.html">Get started</a><a href="../guides/real-world-scenarios.html">Scenarios</a><a href="../handbook/index.html">Handbook</a><a href="../guides/evidence-at-a-glance.html">Proof</a></nav>
|
|
31
|
+
<span class="spacer"></span>
|
|
32
|
+
<div class="search" role="search"><label class="sr-only" for="q">Search the documentation</label><input id="q" type="search" placeholder="Search docs ( / )" autocomplete="off" aria-controls="results" aria-expanded="false"><ul id="results" class="results" role="listbox" hidden></ul></div>
|
|
33
|
+
<a class="gh-btn" href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12 12 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21"/></svg><span>GitHub</span></a>
|
|
34
|
+
<button class="icon-btn theme-btn" type="button" aria-label="Switch between light and dark theme"><span class="sun"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg></span><span class="moon"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg></span></button>
|
|
35
|
+
<button class="icon-btn menu-btn" type="button" aria-label="Open menu" aria-expanded="false" aria-controls="drawer"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg></button>
|
|
36
|
+
</div>
|
|
37
|
+
</header>
|
|
38
|
+
<div id="drawer" class="drawer" aria-hidden="true">
|
|
39
|
+
<div class="drawer-scrim" data-close></div>
|
|
40
|
+
<div class="drawer-panel" role="dialog" aria-label="Menu">
|
|
41
|
+
<div class="drawer-head"><a class="brand" href="../index.html"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a><button class="icon-btn" type="button" data-close aria-label="Close menu"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div>
|
|
42
|
+
<div class="primary-links"><a href="../index.html">Home</a><a href="../guides/getting-started.html">Get started</a><a href="../guides/real-world-scenarios.html">Scenarios</a><a href="../handbook/index.html">Handbook</a><a href="../guides/evidence-at-a-glance.html">Proof</a><a href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener">GitHub</a></div>
|
|
43
|
+
<div class="nav-group"><p class="nav-title">Start here</p><ul><li><a href="../guides/getting-started.html">Get started in 5 minutes</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works, in pictures</a></li><li><a href="../guides/reading-a-report.html">Reading and triaging a report</a></li><li><a href="../guides/ci-recipes.html">CI recipes</a></li><li><a href="../guides/mcp-server.html" aria-current="page">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li></ul></div><div class="nav-group"><p class="nav-title">Handbook</p><ul><li><a href="../handbook/index.html">Overview</a></li><li><a href="../handbook/01-executive-summary.html">Executive summary</a></li><li><a href="../handbook/02-functional-specification.html">Functional specification</a></li><li><a href="../handbook/03-technical-specification.html">Technical specification</a></li><li><a href="../handbook/04-architecture.html">Architecture</a></li><li><a href="../handbook/05-user-guide.html">User guide</a></li><li><a href="../handbook/06-cli-reference.html">CLI reference</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security, privacy and legal</a></li><li><a href="../handbook/08-testing-and-proof.html">Testing and proof</a></li><li><a href="../handbook/09-compatibility-and-roadmap.html">Compatibility and roadmap</a></li><li><a href="../handbook/10-contributor-guide.html">Contributor guide</a></li><li><a href="../handbook/11-glossary-and-faq.html">Glossary and FAQ</a></li><li><a href="../handbook/12-rule-catalog.html">Audit rule catalog</a></li><li><a href="../handbook/13-trust-and-assurance.html">Trust and assurance</a></li><li><a href="../handbook/14-real-world-evaluation.html">Real-world evaluation</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain and release</a></li><li><a href="../handbook/16-performance-and-quality-metrics.html">Performance and quality metrics</a></li></ul></div><div class="nav-group"><p class="nav-title">Reference</p><ul><li><a href="../architecture/overview.html">Architecture overview</a></li><li><a href="../architecture/threat-model.html">Threat model (ArchSutra CLI and skills)</a></li><li><a href="../compatibility/matrix.html">Compatibility matrix</a></li><li><a href="../rfc/0001-archsutra-v0.1.html">RFC 0001: ArchSutra AI v0.1</a></li><li><a href="../decisions/ADR-0001-deterministic-cli-plus-ide-skills.html">ADR-0001: Deterministic CLI plus IDE-native skills</a></li><li><a href="../compatibility/smoke-tests/index.html">Live smoke tests</a></li><li><a href="../community/good-first-issues.html">Good first issues (ready to file)</a></li><li><a href="../legal/trademark-and-name-clearance.html">Name and trademark clearance</a></li><li><a href="../legal/legal-review-brief.html">Legal review brief</a></li><li><a href="../proof/accessibility.html">Accessibility audit of the documentation site</a></li></ul></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="layout">
|
|
47
|
+
<aside id="sidebar" class="sidebar" aria-label="Documentation"><div class="nav-group"><p class="nav-title">Start here</p><ul><li><a href="../guides/getting-started.html">Get started in 5 minutes</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works, in pictures</a></li><li><a href="../guides/reading-a-report.html">Reading and triaging a report</a></li><li><a href="../guides/ci-recipes.html">CI recipes</a></li><li><a href="../guides/mcp-server.html" aria-current="page">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li></ul></div><div class="nav-group"><p class="nav-title">Handbook</p><ul><li><a href="../handbook/index.html">Overview</a></li><li><a href="../handbook/01-executive-summary.html">Executive summary</a></li><li><a href="../handbook/02-functional-specification.html">Functional specification</a></li><li><a href="../handbook/03-technical-specification.html">Technical specification</a></li><li><a href="../handbook/04-architecture.html">Architecture</a></li><li><a href="../handbook/05-user-guide.html">User guide</a></li><li><a href="../handbook/06-cli-reference.html">CLI reference</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security, privacy and legal</a></li><li><a href="../handbook/08-testing-and-proof.html">Testing and proof</a></li><li><a href="../handbook/09-compatibility-and-roadmap.html">Compatibility and roadmap</a></li><li><a href="../handbook/10-contributor-guide.html">Contributor guide</a></li><li><a href="../handbook/11-glossary-and-faq.html">Glossary and FAQ</a></li><li><a href="../handbook/12-rule-catalog.html">Audit rule catalog</a></li><li><a href="../handbook/13-trust-and-assurance.html">Trust and assurance</a></li><li><a href="../handbook/14-real-world-evaluation.html">Real-world evaluation</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain and release</a></li><li><a href="../handbook/16-performance-and-quality-metrics.html">Performance and quality metrics</a></li></ul></div><div class="nav-group"><p class="nav-title">Reference</p><ul><li><a href="../architecture/overview.html">Architecture overview</a></li><li><a href="../architecture/threat-model.html">Threat model (ArchSutra CLI and skills)</a></li><li><a href="../compatibility/matrix.html">Compatibility matrix</a></li><li><a href="../rfc/0001-archsutra-v0.1.html">RFC 0001: ArchSutra AI v0.1</a></li><li><a href="../decisions/ADR-0001-deterministic-cli-plus-ide-skills.html">ADR-0001: Deterministic CLI plus IDE-native skills</a></li><li><a href="../compatibility/smoke-tests/index.html">Live smoke tests</a></li><li><a href="../community/good-first-issues.html">Good first issues (ready to file)</a></li><li><a href="../legal/trademark-and-name-clearance.html">Name and trademark clearance</a></li><li><a href="../legal/legal-review-brief.html">Legal review brief</a></li><li><a href="../proof/accessibility.html">Accessibility audit of the documentation site</a></li></ul></div></aside>
|
|
48
|
+
<main id="main" class="content"><article class="prose"><p class="crumbs"><a href="../index.html">ArchSutra AI</a> / Start here</p><h1 id="use-archsutra-as-an-mcp-server">Use ArchSutra as an MCP server</h1>
|
|
49
|
+
<p class="lede">Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems.</p><p class="meta">Version 0.2.0 · Source: <a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/docs/guides/mcp-server.md" rel="noopener">docs/guides/mcp-server.md</a></p>
|
|
50
|
+
<p>Your AI assistant can run ArchSutra itself: ask for an audit and it receives findings with <code>file:line</code> evidence.</p>
|
|
51
|
+
<blockquote><strong>Version.</strong> These steps need <code>0.2.0</code> or newer. The <code>mcp</code> command in <code>0.1.5</code> does not answer standard MCP clients.</blockquote>
|
|
52
|
+
<blockquote><strong>Tested how far.</strong> An automated test drives the server like a client does (initialize, ping, list, call, keep stdin open). The configurations below follow each tool's documented format but have <strong>not</strong> been run inside those tools or MCP Inspector.</blockquote>
|
|
53
|
+
<h2 id="how-it-fits">How it fits<a class="anchor" href="#how-it-fits" aria-label="Link to this section">#</a></h2>
|
|
54
|
+
<figure class="diagram"><pre class="mermaid">sequenceDiagram
|
|
55
|
+
participant A as AI assistant
|
|
56
|
+
participant S as archsutra mcp
|
|
57
|
+
participant F as Files inside --root
|
|
58
|
+
A->>S: initialize
|
|
59
|
+
S-->>A: protocol version and tool list
|
|
60
|
+
A->>S: tools/call archsutra_audit (path)
|
|
61
|
+
S->>F: read only
|
|
62
|
+
S-->>A: findings with file and line
|
|
63
|
+
A->>S: tools/call with a path outside --root
|
|
64
|
+
S-->>A: error, nothing read</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
|
|
65
|
+
<h2 id="tools">Tools<a class="anchor" href="#tools" aria-label="Link to this section">#</a></h2>
|
|
66
|
+
<div class="table-wrap" tabindex="0" role="region" aria-label="Table 1: Tools"><table><thead><tr><th scope="col">Tool</th><th scope="col">Arguments</th><th scope="col">Returns</th></tr></thead><tbody><tr><td><code>archsutra_audit</code></td><td><code>path</code></td><td>Findings JSON</td></tr><tr><td><code>archsutra_map</code></td><td><code>path</code></td><td>Modules, dependencies, cycles, blind spots</td></tr><tr><td><code>archsutra_drift</code></td><td><code>before</code>, <code>after</code> (two <code>findings.json</code> files)</td><td>Added, removed and changed locations</td></tr></tbody></table></div>
|
|
67
|
+
<p>All three are read-only. Paths are relative to <code>--root</code>.</p>
|
|
68
|
+
<h2 id="configure-your-assistant">Configure your assistant<a class="anchor" href="#configure-your-assistant" aria-label="Link to this section">#</a></h2>
|
|
69
|
+
<p>To run from a source checkout instead, replace <code>npx --yes archsutra-ai@latest</code> with <code>node /path/to/archsutra-ai/dist/cli.js</code>.</p>
|
|
70
|
+
<p><strong>Claude Code</strong> (<code>.mcp.json</code> in the project) and <strong>Cursor</strong> (<code>.cursor/mcp.json</code>):</p>
|
|
71
|
+
<div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-json">{ "mcpServers": { "archsutra": { "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "."] } } }</code></pre></div>
|
|
72
|
+
<p><strong>VS Code with GitHub Copilot</strong> (<code>.vscode/mcp.json</code>):</p>
|
|
73
|
+
<div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-json">{ "servers": { "archsutra": { "type": "stdio", "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "${workspaceFolder}"] } } }</code></pre></div>
|
|
74
|
+
<p><strong>OpenAI Codex</strong> (<code>~/.codex/config.toml</code>):</p>
|
|
75
|
+
<div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-toml">[mcp_servers.archsutra]
|
|
76
|
+
command = "npx"
|
|
77
|
+
args = ["--yes", "archsutra-ai@latest", "mcp", "--root", "/path/to/project"]</code></pre></div>
|
|
78
|
+
<p><strong>Gemini CLI</strong> (<code>.gemini/settings.json</code>):</p>
|
|
79
|
+
<div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-json">{ "mcpServers": { "archsutra": { "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "."] } } }</code></pre></div>
|
|
80
|
+
<h2 id="security">Security<a class="anchor" href="#security" aria-label="Link to this section">#</a></h2>
|
|
81
|
+
<ul><li><code>--root</code> is the boundary. The server resolves each path, follows symlinks, and refuses anything outside. Use the narrowest folder you need.</li><li>An assistant can be steered by text it has read. Treat tool arguments as untrusted; that is why the boundary is enforced by the server.</li><li>Results contain file paths and redacted excerpts. Your assistant sends them to its model provider.</li></ul>
|
|
82
|
+
<h2 id="troubleshooting">Troubleshooting<a class="anchor" href="#troubleshooting" aria-label="Link to this section">#</a></h2>
|
|
83
|
+
<div class="table-wrap" tabindex="0" role="region" aria-label="Table 2: Troubleshooting"><table><thead><tr><th scope="col">Symptom</th><th scope="col">Likely cause</th><th scope="col">Fix</th></tr></thead><tbody><tr><td>No tools appear, or the client times out</td><td>Version <code>0.1.5</code> or older</td><td>Use <code>0.2.0</code> or newer</td></tr><tr><td><code>Path escapes root</code></td><td>The assistant asked outside <code>--root</code></td><td>Pass a path inside the project, or widen <code>--root</code> deliberately</td></tr><tr><td><code>Path not found</code> at start</td><td><code>--root</code> is not a folder</td><td>Use an absolute path</td></tr><tr><td>Result says <code>TRUNCATED</code></td><td>The project is large</td><td>Ask it to audit a sub-folder</td></tr><tr><td>Windows: <code>npx</code> not found by the client</td><td>The client does not use your shell</td><td>Set <code>"command": "cmd"</code> and put <code>"/c", "npx"</code> first in <code>args</code></td></tr></tbody></table></div></article><nav class="pn" aria-label="Previous and next page"><a class="prev" href="ci-recipes.html"><small>Previous</small><span>CI recipes</span></a><a class="next" href="cheat-sheet.html"><small>Next</small><span>Cheat sheet</span></a></nav><p class="edit"><a href="https://github.com/shahvatsalofficial/archsutra-ai/edit/main/docs/guides/mcp-server.md" rel="noopener">Edit this page on GitHub</a></p></main>
|
|
84
|
+
<aside class="rail"><nav class="toc" aria-label="On this page"><p class="nav-title">On this page</p><ul><li class="l2"><a href="#how-it-fits">How it fits</a></li><li class="l2"><a href="#tools">Tools</a></li><li class="l2"><a href="#configure-your-assistant">Configure your assistant</a></li><li class="l2"><a href="#security">Security</a></li><li class="l2"><a href="#troubleshooting">Troubleshooting</a></li></ul></nav></aside>
|
|
85
|
+
</div>
|
|
86
|
+
<footer class="footer">
|
|
87
|
+
<div class="footer-inner">
|
|
88
|
+
<div class="footer-grid">
|
|
89
|
+
<div class="about-col"><a class="brand" href="../index.html"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a><p class="about">Design. Audit. Evolve. An open-source, evidence-first software architecture agent. Created by <a href="https://shahvatsal.com" rel="noopener">Vatsal Shah</a>. Apache-2.0.</p></div>
|
|
90
|
+
<div><h4>Learn</h4><ul><li><a href="../guides/getting-started.html">Get started</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li></ul></div>
|
|
91
|
+
<div><h4>Trust</h4><ul><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li><li><a href="../handbook/13-trust-and-assurance.html">Honesty register</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security and legal</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain</a></li></ul></div>
|
|
92
|
+
<div><h4>Project</h4><ul><li><a href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener">GitHub</a></li><li><a href="https://www.npmjs.com/package/archsutra-ai" rel="noopener">npm</a></li><li><a href="../handbook/10-contributor-guide.html">Contribute</a></li><li><a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/CHANGELOG.md" rel="noopener">Changelog</a></li></ul></div>
|
|
93
|
+
</div>
|
|
94
|
+
<p class="fine">v0.2.0. Review aid only. Not a certification, compliance attestation, security guarantee or legal advice. Not affiliated with Anthropic, OpenAI, Cursor, GitHub or Google; product names belong to their owners. <a href="../handbook/07-security-privacy-legal.html">Legal details</a>.</p>
|
|
95
|
+
</div>
|
|
96
|
+
</footer>
|
|
97
|
+
<script src="../assets/site.js" type="module"></script>
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Use ArchSutra as an MCP server
|
|
2
|
+
|
|
3
|
+
<!-- summary: Connect ArchSutra to Claude Code, Cursor, VS Code, Codex or Gemini CLI over MCP, keep it inside one folder, and fix common problems. -->
|
|
4
|
+
|
|
5
|
+
Your AI assistant can run ArchSutra itself: ask for an audit and it receives findings with `file:line` evidence.
|
|
6
|
+
|
|
7
|
+
> **Version.** These steps need `0.2.0` or newer. The `mcp` command in `0.1.5` does not answer standard MCP clients.
|
|
8
|
+
|
|
9
|
+
> **Tested how far.** An automated test drives the server like a client does (initialize, ping, list, call, keep stdin open). The configurations below follow each tool's documented format but have **not** been run inside those tools or MCP Inspector.
|
|
10
|
+
|
|
11
|
+
## How it fits
|
|
12
|
+
|
|
13
|
+
```mermaid
|
|
14
|
+
sequenceDiagram
|
|
15
|
+
participant A as AI assistant
|
|
16
|
+
participant S as archsutra mcp
|
|
17
|
+
participant F as Files inside --root
|
|
18
|
+
A->>S: initialize
|
|
19
|
+
S-->>A: protocol version and tool list
|
|
20
|
+
A->>S: tools/call archsutra_audit (path)
|
|
21
|
+
S->>F: read only
|
|
22
|
+
S-->>A: findings with file and line
|
|
23
|
+
A->>S: tools/call with a path outside --root
|
|
24
|
+
S-->>A: error, nothing read
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Tools
|
|
28
|
+
|
|
29
|
+
| Tool | Arguments | Returns |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `archsutra_audit` | `path` | Findings JSON |
|
|
32
|
+
| `archsutra_map` | `path` | Modules, dependencies, cycles, blind spots |
|
|
33
|
+
| `archsutra_drift` | `before`, `after` (two `findings.json` files) | Added, removed and changed locations |
|
|
34
|
+
|
|
35
|
+
All three are read-only. Paths are relative to `--root`.
|
|
36
|
+
|
|
37
|
+
## Configure your assistant
|
|
38
|
+
|
|
39
|
+
To run from a source checkout instead, replace `npx --yes archsutra-ai@latest` with `node /path/to/archsutra-ai/dist/cli.js`.
|
|
40
|
+
|
|
41
|
+
**Claude Code** (`.mcp.json` in the project) and **Cursor** (`.cursor/mcp.json`):
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{ "mcpServers": { "archsutra": { "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "."] } } }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**VS Code with GitHub Copilot** (`.vscode/mcp.json`):
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{ "servers": { "archsutra": { "type": "stdio", "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "${workspaceFolder}"] } } }
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**OpenAI Codex** (`~/.codex/config.toml`):
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
[mcp_servers.archsutra]
|
|
57
|
+
command = "npx"
|
|
58
|
+
args = ["--yes", "archsutra-ai@latest", "mcp", "--root", "/path/to/project"]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Gemini CLI** (`.gemini/settings.json`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{ "mcpServers": { "archsutra": { "command": "npx", "args": ["--yes", "archsutra-ai@latest", "mcp", "--root", "."] } } }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Security
|
|
68
|
+
|
|
69
|
+
- `--root` is the boundary. The server resolves each path, follows symlinks, and refuses anything outside. Use the narrowest folder you need.
|
|
70
|
+
- An assistant can be steered by text it has read. Treat tool arguments as untrusted; that is why the boundary is enforced by the server.
|
|
71
|
+
- Results contain file paths and redacted excerpts. Your assistant sends them to its model provider.
|
|
72
|
+
|
|
73
|
+
## Troubleshooting
|
|
74
|
+
|
|
75
|
+
| Symptom | Likely cause | Fix |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| No tools appear, or the client times out | Version `0.1.5` or older | Use `0.2.0` or newer |
|
|
78
|
+
| `Path escapes root` | The assistant asked outside `--root` | Pass a path inside the project, or widen `--root` deliberately |
|
|
79
|
+
| `Path not found` at start | `--root` is not a folder | Use an absolute path |
|
|
80
|
+
| Result says `TRUNCATED` | The project is large | Ask it to audit a sub-folder |
|
|
81
|
+
| Windows: `npx` not found by the client | The client does not use your shell | Set `"command": "cmd"` and put `"/c", "npx"` first in `args` |
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Reading and triaging a report | ArchSutra AI</title>
|
|
7
|
+
<meta name="description" content="How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong.">
|
|
8
|
+
<link rel="canonical" href="https://shahvatsalofficial.github.io/archsutra-ai/guides/reading-a-report.html">
|
|
9
|
+
<meta name="color-scheme" content="light dark">
|
|
10
|
+
<meta name="theme-color" content="#ffffff">
|
|
11
|
+
<meta property="og:type" content="article">
|
|
12
|
+
<meta property="og:title" content="Reading and triaging a report | ArchSutra AI">
|
|
13
|
+
<meta property="og:description" content="How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong.">
|
|
14
|
+
<meta property="og:url" content="https://shahvatsalofficial.github.io/archsutra-ai/guides/reading-a-report.html">
|
|
15
|
+
<meta property="og:site_name" content="ArchSutra AI">
|
|
16
|
+
<meta name="twitter:card" content="summary">
|
|
17
|
+
<meta name="twitter:title" content="Reading and triaging a report | ArchSutra AI">
|
|
18
|
+
<meta name="twitter:description" content="How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong.">
|
|
19
|
+
<meta name="author" content="Vatsal Shah">
|
|
20
|
+
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml">
|
|
21
|
+
<link rel="stylesheet" href="../assets/site.css">
|
|
22
|
+
<script>try{if(localStorage.getItem('as-theme')==='dark')document.documentElement.setAttribute('data-theme','dark')}catch(e){}</script>
|
|
23
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Reading and triaging a report","description":"How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong.","author":{"@type":"Person","name":"Vatsal Shah","url":"https://shahvatsal.com"},"inLanguage":"en","isPartOf":{"@type":"WebSite","name":"ArchSutra AI","url":"https://shahvatsalofficial.github.io/archsutra-ai"}}</script>
|
|
24
|
+
</head>
|
|
25
|
+
<body class="doc" data-root="../">
|
|
26
|
+
<a class="skip" href="#main">Skip to content</a>
|
|
27
|
+
<header class="topbar">
|
|
28
|
+
<div class="topbar-inner">
|
|
29
|
+
<a class="brand" href="../index.html" aria-label="ArchSutra AI home"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a>
|
|
30
|
+
<nav class="top-links" aria-label="Primary"><a href="../guides/getting-started.html">Get started</a><a href="../guides/real-world-scenarios.html">Scenarios</a><a href="../handbook/index.html">Handbook</a><a href="../guides/evidence-at-a-glance.html">Proof</a></nav>
|
|
31
|
+
<span class="spacer"></span>
|
|
32
|
+
<div class="search" role="search"><label class="sr-only" for="q">Search the documentation</label><input id="q" type="search" placeholder="Search docs ( / )" autocomplete="off" aria-controls="results" aria-expanded="false"><ul id="results" class="results" role="listbox" hidden></ul></div>
|
|
33
|
+
<a class="gh-btn" href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12 12 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21"/></svg><span>GitHub</span></a>
|
|
34
|
+
<button class="icon-btn theme-btn" type="button" aria-label="Switch between light and dark theme"><span class="sun"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg></span><span class="moon"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg></span></button>
|
|
35
|
+
<button class="icon-btn menu-btn" type="button" aria-label="Open menu" aria-expanded="false" aria-controls="drawer"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg></button>
|
|
36
|
+
</div>
|
|
37
|
+
</header>
|
|
38
|
+
<div id="drawer" class="drawer" aria-hidden="true">
|
|
39
|
+
<div class="drawer-scrim" data-close></div>
|
|
40
|
+
<div class="drawer-panel" role="dialog" aria-label="Menu">
|
|
41
|
+
<div class="drawer-head"><a class="brand" href="../index.html"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a><button class="icon-btn" type="button" data-close aria-label="Close menu"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div>
|
|
42
|
+
<div class="primary-links"><a href="../index.html">Home</a><a href="../guides/getting-started.html">Get started</a><a href="../guides/real-world-scenarios.html">Scenarios</a><a href="../handbook/index.html">Handbook</a><a href="../guides/evidence-at-a-glance.html">Proof</a><a href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener">GitHub</a></div>
|
|
43
|
+
<div class="nav-group"><p class="nav-title">Start here</p><ul><li><a href="../guides/getting-started.html">Get started in 5 minutes</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works, in pictures</a></li><li><a href="../guides/reading-a-report.html" aria-current="page">Reading and triaging a report</a></li><li><a href="../guides/ci-recipes.html">CI recipes</a></li><li><a href="../guides/mcp-server.html">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li></ul></div><div class="nav-group"><p class="nav-title">Handbook</p><ul><li><a href="../handbook/index.html">Overview</a></li><li><a href="../handbook/01-executive-summary.html">Executive summary</a></li><li><a href="../handbook/02-functional-specification.html">Functional specification</a></li><li><a href="../handbook/03-technical-specification.html">Technical specification</a></li><li><a href="../handbook/04-architecture.html">Architecture</a></li><li><a href="../handbook/05-user-guide.html">User guide</a></li><li><a href="../handbook/06-cli-reference.html">CLI reference</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security, privacy and legal</a></li><li><a href="../handbook/08-testing-and-proof.html">Testing and proof</a></li><li><a href="../handbook/09-compatibility-and-roadmap.html">Compatibility and roadmap</a></li><li><a href="../handbook/10-contributor-guide.html">Contributor guide</a></li><li><a href="../handbook/11-glossary-and-faq.html">Glossary and FAQ</a></li><li><a href="../handbook/12-rule-catalog.html">Audit rule catalog</a></li><li><a href="../handbook/13-trust-and-assurance.html">Trust and assurance</a></li><li><a href="../handbook/14-real-world-evaluation.html">Real-world evaluation</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain and release</a></li><li><a href="../handbook/16-performance-and-quality-metrics.html">Performance and quality metrics</a></li></ul></div><div class="nav-group"><p class="nav-title">Reference</p><ul><li><a href="../architecture/overview.html">Architecture overview</a></li><li><a href="../architecture/threat-model.html">Threat model (ArchSutra CLI and skills)</a></li><li><a href="../compatibility/matrix.html">Compatibility matrix</a></li><li><a href="../rfc/0001-archsutra-v0.1.html">RFC 0001: ArchSutra AI v0.1</a></li><li><a href="../decisions/ADR-0001-deterministic-cli-plus-ide-skills.html">ADR-0001: Deterministic CLI plus IDE-native skills</a></li><li><a href="../compatibility/smoke-tests/index.html">Live smoke tests</a></li><li><a href="../community/good-first-issues.html">Good first issues (ready to file)</a></li><li><a href="../legal/trademark-and-name-clearance.html">Name and trademark clearance</a></li><li><a href="../legal/legal-review-brief.html">Legal review brief</a></li><li><a href="../proof/accessibility.html">Accessibility audit of the documentation site</a></li></ul></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="layout">
|
|
47
|
+
<aside id="sidebar" class="sidebar" aria-label="Documentation"><div class="nav-group"><p class="nav-title">Start here</p><ul><li><a href="../guides/getting-started.html">Get started in 5 minutes</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works, in pictures</a></li><li><a href="../guides/reading-a-report.html" aria-current="page">Reading and triaging a report</a></li><li><a href="../guides/ci-recipes.html">CI recipes</a></li><li><a href="../guides/mcp-server.html">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li></ul></div><div class="nav-group"><p class="nav-title">Handbook</p><ul><li><a href="../handbook/index.html">Overview</a></li><li><a href="../handbook/01-executive-summary.html">Executive summary</a></li><li><a href="../handbook/02-functional-specification.html">Functional specification</a></li><li><a href="../handbook/03-technical-specification.html">Technical specification</a></li><li><a href="../handbook/04-architecture.html">Architecture</a></li><li><a href="../handbook/05-user-guide.html">User guide</a></li><li><a href="../handbook/06-cli-reference.html">CLI reference</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security, privacy and legal</a></li><li><a href="../handbook/08-testing-and-proof.html">Testing and proof</a></li><li><a href="../handbook/09-compatibility-and-roadmap.html">Compatibility and roadmap</a></li><li><a href="../handbook/10-contributor-guide.html">Contributor guide</a></li><li><a href="../handbook/11-glossary-and-faq.html">Glossary and FAQ</a></li><li><a href="../handbook/12-rule-catalog.html">Audit rule catalog</a></li><li><a href="../handbook/13-trust-and-assurance.html">Trust and assurance</a></li><li><a href="../handbook/14-real-world-evaluation.html">Real-world evaluation</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain and release</a></li><li><a href="../handbook/16-performance-and-quality-metrics.html">Performance and quality metrics</a></li></ul></div><div class="nav-group"><p class="nav-title">Reference</p><ul><li><a href="../architecture/overview.html">Architecture overview</a></li><li><a href="../architecture/threat-model.html">Threat model (ArchSutra CLI and skills)</a></li><li><a href="../compatibility/matrix.html">Compatibility matrix</a></li><li><a href="../rfc/0001-archsutra-v0.1.html">RFC 0001: ArchSutra AI v0.1</a></li><li><a href="../decisions/ADR-0001-deterministic-cli-plus-ide-skills.html">ADR-0001: Deterministic CLI plus IDE-native skills</a></li><li><a href="../compatibility/smoke-tests/index.html">Live smoke tests</a></li><li><a href="../community/good-first-issues.html">Good first issues (ready to file)</a></li><li><a href="../legal/trademark-and-name-clearance.html">Name and trademark clearance</a></li><li><a href="../legal/legal-review-brief.html">Legal review brief</a></li><li><a href="../proof/accessibility.html">Accessibility audit of the documentation site</a></li></ul></div></aside>
|
|
48
|
+
<main id="main" class="content"><article class="prose"><p class="crumbs"><a href="../index.html">ArchSutra AI</a> / Start here</p><h1 id="reading-and-triaging-a-report">Reading and triaging a report</h1>
|
|
49
|
+
<p class="lede">How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong.</p><p class="meta">Version 0.2.0 · Source: <a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/docs/guides/reading-a-report.md" rel="noopener">docs/guides/reading-a-report.md</a></p>
|
|
50
|
+
<p>A report is only useful if you can decide what to do with it in a few minutes. This page gives you a reading order, a triage flowchart you can follow without thinking, and the rules for accepting a finding on purpose.</p>
|
|
51
|
+
<h2 id="the-reading-order-5-minutes">The reading order (5 minutes)<a class="anchor" href="#the-reading-order-5-minutes" aria-label="Link to this section">#</a></h2>
|
|
52
|
+
<figure class="diagram"><pre class="mermaid">flowchart LR
|
|
53
|
+
a["1. Summary<br/>how many, how bad"] --> b["2. Scorecard<br/>where is the weakness,<br/>what was not assessed"]
|
|
54
|
+
b --> c["3. Critical and high<br/>open each one"]
|
|
55
|
+
c --> d["4. Blind spots<br/>what the scan cannot see"]
|
|
56
|
+
d --> e["5. Decide: fix, ticket,<br/>accept or report as wrong"]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
|
|
57
|
+
<ol><li><strong>Summary.</strong> Counts by severity, files scanned, and whether the scan was cut off (<code>TRUNCATED</code>).</li><li><strong>Scorecard.</strong> Five categories get a rating from the rules we have; five (reliability, performance, scalability, data integrity, cost) are always <code>not assessed</code> from a static scan.</li><li><strong>Critical and high findings.</strong> Open each in the HTML report (they start expanded).</li><li><strong>Scope and blind spots.</strong> The honest list of what this report cannot tell you.</li></ol>
|
|
58
|
+
<h2 id="severity-confidence-and-actionability-are-three-different-things">Severity, confidence and actionability are three different things<a class="anchor" href="#severity-confidence-and-actionability-are-three-different-things" aria-label="Link to this section">#</a></h2>
|
|
59
|
+
<div class="table-wrap" tabindex="0" role="region" aria-label="Table 1: Severity, confidence and actionability are three different things"><table><thead><tr><th scope="col">Word</th><th scope="col">Question it answers</th><th scope="col">Example</th></tr></thead><tbody><tr><td><strong>Severity</strong></td><td>If this is real, how much does it matter?</td><td>An exposed key is critical; a missing README is low</td></tr><tr><td><strong>Confidence</strong></td><td>How sure is the rule that it is real?</td><td>A committed private key is high; a "possible credential" is medium; an inferred AI-risk co-location is low</td></tr><tr><td><strong>Actionable</strong></td><td>Would the owners actually change something?</td><td><code>eval</code> of a developer-typed value in a migration tool: real, but by design</td></tr></tbody></table></div>
|
|
60
|
+
<blockquote class="callout callout-why-it-matters"><strong>Why it matters.</strong> On 52 real repositories, most reported findings were genuine instances of the rule, but <strong>about half were not worth acting on</strong>. That is not a bug in your report: it is the difference between "this code does X" and "X is a problem here". Triage is where a human adds value (<a href="evidence-at-a-glance.html">evidence</a>).</blockquote>
|
|
61
|
+
<h2 id="triage-flowchart">Triage flowchart<a class="anchor" href="#triage-flowchart" aria-label="Link to this section">#</a></h2>
|
|
62
|
+
<p>Follow it for every high or critical finding.</p>
|
|
63
|
+
<figure class="diagram"><pre class="mermaid">flowchart TD
|
|
64
|
+
f(["A finding"]) --> o{"Open the file and line.<br/>Does the code really<br/>do what it says?"}
|
|
65
|
+
o -- "No: comment, test data,<br/>vendored or wrong claim" --> fp["Report it as a false positive<br/>(helps everyone) and move on"]
|
|
66
|
+
o -- Yes --> r{"Can attacker-influenced input<br/>or a real failure reach it?"}
|
|
67
|
+
r -- Yes --> now["Fix now.<br/>Use the Fix and Verify steps"]
|
|
68
|
+
r -- "No, constant or internal" --> a{"Is it cheap to fix?"}
|
|
69
|
+
a -- Yes --> t["Fix in the next change<br/>(hardening)"]
|
|
70
|
+
a -- No --> s{"Accept on purpose?"}
|
|
71
|
+
s -- Yes --> sup["Add a suppression with<br/>a reason and an expiry"]
|
|
72
|
+
s -- No --> tk["Create a ticket<br/>with the finding ID"]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
|
|
73
|
+
<h2 id="what-the-common-findings-usually-mean">What the common findings usually mean<a class="anchor" href="#what-the-common-findings-usually-mean" aria-label="Link to this section">#</a></h2>
|
|
74
|
+
<div class="table-wrap" tabindex="0" role="region" aria-label="Table 2: What the common findings usually mean"><table><thead><tr><th scope="col">Rule</th><th scope="col">Usually means</th><th scope="col">Often a false alarm when</th></tr></thead><tbody><tr><td>AS-SEC-001 possible credential</td><td>A real secret, or a default password in seed data</td><td>The value is a placeholder such as <code>password</code>, or a public key (search-only keys, Firebase web keys)</td></tr><tr><td>AS-SEC-002 private key committed</td><td>Rotate it, even if you think it is a test key</td><td>It is clearly an example key in docs (verify it is unused)</td></tr><tr><td>AS-SEC-004 dynamic execution</td><td>Injection sink: check what reaches it</td><td>Constant input, or tooling that must hide an import</td></tr><tr><td>AS-SEC-005 SQL by interpolation</td><td>Injection risk</td><td>The interpolated value is an internal, already-quoted identifier</td></tr><tr><td>AS-ARC-001 cycle</td><td>Modules cannot be understood or split independently</td><td>A cycle among test helpers or via a data file import (we ignore the common cases)</td></tr><tr><td>AS-OPS-003 root container</td><td>Hardening gap</td><td>A dev container that is never deployed</td></tr><tr><td>AS-SUP-001/002/003</td><td>Builds that are not reproducible</td><td>Intentional in a throwaway demo</td></tr></tbody></table></div>
|
|
75
|
+
<p>The full list with limits is the <a href="../handbook/12-rule-catalog.html">rule catalog</a>.</p>
|
|
76
|
+
<h2 id="accept-a-risk-on-purpose-and-keep-it-honest">Accept a risk on purpose (and keep it honest)<a class="anchor" href="#accept-a-risk-on-purpose-and-keep-it-honest" aria-label="Link to this section">#</a></h2>
|
|
77
|
+
<p>Create <code>.archsutra/suppress.json</code> in the project:</p>
|
|
78
|
+
<div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-json">{
|
|
79
|
+
"suppress": [
|
|
80
|
+
{
|
|
81
|
+
"rule": "AS-OPS-003",
|
|
82
|
+
"path": "tools/devcontainer/Dockerfile",
|
|
83
|
+
"reason": "Local dev container, never deployed",
|
|
84
|
+
"expires": "2027-06-30"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}</code></pre></div>
|
|
88
|
+
<p>Three rules keep suppression from becoming a hiding place:</p>
|
|
89
|
+
<ul><li><strong>A reason is required.</strong> A row without one is ignored.</li><li><strong>It expires.</strong> After <code>expires</code> the finding comes back for review.</li><li><strong>It is specific.</strong> A rule plus a path, not a blanket ignore.</li></ul>
|
|
90
|
+
<figure class="diagram"><pre class="mermaid">stateDiagram-v2
|
|
91
|
+
[*] --> Reported
|
|
92
|
+
Reported --> Suppressed: reason + path + (optional) expiry
|
|
93
|
+
Suppressed --> Reported: expiry date passes
|
|
94
|
+
Suppressed --> Reported: row removed or reason missing
|
|
95
|
+
Reported --> Fixed: code changed
|
|
96
|
+
Fixed --> [*]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
|
|
97
|
+
<h2 id="tell-us-when-a-finding-is-wrong">Tell us when a finding is wrong<a class="anchor" href="#tell-us-when-a-finding-is-wrong" aria-label="Link to this section">#</a></h2>
|
|
98
|
+
<p>False positives are the most valuable feedback we get. They became the regression tests that raised measured precision from 50% to 69% and then 95%.</p>
|
|
99
|
+
<ol><li>Note the rule ID and the file and line.</li><li>Say why it is wrong: comment or docstring, vendored code, test data, placeholder, wrong rule claim.</li><li>Open a <a href="https://github.com/shahvatsalofficial/archsutra-ai/issues/new?template=false_positive.md" rel="noopener">false-positive report</a>.</li></ol>
|
|
100
|
+
<h2 id="what-a-report-is-not">What a report is not<a class="anchor" href="#what-a-report-is-not" aria-label="Link to this section">#</a></h2>
|
|
101
|
+
<blockquote class="callout callout-warning"><strong>Warning.</strong> A report from this tool is a review aid. It is not a certification, a compliance attestation or a penetration test, and "no findings" is not "no problems". See the <a href="../handbook/07-security-privacy-legal.html">legal notes</a>.</blockquote>
|
|
102
|
+
<h2 id="next">Next<a class="anchor" href="#next" aria-label="Link to this section">#</a></h2>
|
|
103
|
+
<ul><li>Turn findings into a plan: ask Prime for a roadmap (<a href="real-world-scenarios.html#1-day-one-on-a-legacy-monolith">scenario 1</a>).</li><li>Stop new ones: <a href="ci-recipes.html">CI recipes</a>.</li></ul></article><nav class="pn" aria-label="Previous and next page"><a class="prev" href="how-it-works.html"><small>Previous</small><span>How it works, in pictures</span></a><a class="next" href="ci-recipes.html"><small>Next</small><span>CI recipes</span></a></nav><p class="edit"><a href="https://github.com/shahvatsalofficial/archsutra-ai/edit/main/docs/guides/reading-a-report.md" rel="noopener">Edit this page on GitHub</a></p></main>
|
|
104
|
+
<aside class="rail"><nav class="toc" aria-label="On this page"><p class="nav-title">On this page</p><ul><li class="l2"><a href="#the-reading-order-5-minutes">The reading order (5 minutes)</a></li><li class="l2"><a href="#severity-confidence-and-actionability-are-three-different-things">Severity, confidence and actionability are three different things</a></li><li class="l2"><a href="#triage-flowchart">Triage flowchart</a></li><li class="l2"><a href="#what-the-common-findings-usually-mean">What the common findings usually mean</a></li><li class="l2"><a href="#accept-a-risk-on-purpose-and-keep-it-honest">Accept a risk on purpose (and keep it honest)</a></li><li class="l2"><a href="#tell-us-when-a-finding-is-wrong">Tell us when a finding is wrong</a></li><li class="l2"><a href="#what-a-report-is-not">What a report is not</a></li><li class="l2"><a href="#next">Next</a></li></ul></nav></aside>
|
|
105
|
+
</div>
|
|
106
|
+
<footer class="footer">
|
|
107
|
+
<div class="footer-inner">
|
|
108
|
+
<div class="footer-grid">
|
|
109
|
+
<div class="about-col"><a class="brand" href="../index.html"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="currentColor" opacity=".14"/><path d="M6 24 16 7l10 17M10.5 18h11" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>ArchSutra <b>AI</b></span></a><p class="about">Design. Audit. Evolve. An open-source, evidence-first software architecture agent. Created by <a href="https://shahvatsal.com" rel="noopener">Vatsal Shah</a>. Apache-2.0.</p></div>
|
|
110
|
+
<div><h4>Learn</h4><ul><li><a href="../guides/getting-started.html">Get started</a></li><li><a href="../guides/real-world-scenarios.html">Real-world scenarios</a></li><li><a href="../guides/how-it-works.html">How it works</a></li><li><a href="../guides/cheat-sheet.html">Cheat sheet</a></li></ul></div>
|
|
111
|
+
<div><h4>Trust</h4><ul><li><a href="../guides/evidence-at-a-glance.html">Evidence at a glance</a></li><li><a href="../handbook/13-trust-and-assurance.html">Honesty register</a></li><li><a href="../handbook/07-security-privacy-legal.html">Security and legal</a></li><li><a href="../handbook/15-supply-chain-and-release.html">Supply chain</a></li></ul></div>
|
|
112
|
+
<div><h4>Project</h4><ul><li><a href="https://github.com/shahvatsalofficial/archsutra-ai" rel="noopener">GitHub</a></li><li><a href="https://www.npmjs.com/package/archsutra-ai" rel="noopener">npm</a></li><li><a href="../handbook/10-contributor-guide.html">Contribute</a></li><li><a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/CHANGELOG.md" rel="noopener">Changelog</a></li></ul></div>
|
|
113
|
+
</div>
|
|
114
|
+
<p class="fine">v0.2.0. Review aid only. Not a certification, compliance attestation, security guarantee or legal advice. Not affiliated with Anthropic, OpenAI, Cursor, GitHub or Google; product names belong to their owners. <a href="../handbook/07-security-privacy-legal.html">Legal details</a>.</p>
|
|
115
|
+
</div>
|
|
116
|
+
</footer>
|
|
117
|
+
<script src="../assets/site.js" type="module"></script>
|
|
118
|
+
</body>
|
|
119
|
+
</html>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Reading and triaging a report
|
|
2
|
+
|
|
3
|
+
<!-- summary: How to read an ArchSutra report, decide what to fix first, accept risk on purpose, and tell us when a finding is wrong. -->
|
|
4
|
+
|
|
5
|
+
A report is only useful if you can decide what to do with it in a few minutes. This page gives you a reading order, a triage flowchart you can follow without thinking, and the rules for accepting a finding on purpose.
|
|
6
|
+
|
|
7
|
+
## The reading order (5 minutes)
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart LR
|
|
11
|
+
a["1. Summary<br/>how many, how bad"] --> b["2. Scorecard<br/>where is the weakness,<br/>what was not assessed"]
|
|
12
|
+
b --> c["3. Critical and high<br/>open each one"]
|
|
13
|
+
c --> d["4. Blind spots<br/>what the scan cannot see"]
|
|
14
|
+
d --> e["5. Decide: fix, ticket,<br/>accept or report as wrong"]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
1. **Summary.** Counts by severity, files scanned, and whether the scan was cut off (`TRUNCATED`).
|
|
18
|
+
2. **Scorecard.** Five categories get a rating from the rules we have; five (reliability, performance, scalability, data integrity, cost) are always `not assessed` from a static scan.
|
|
19
|
+
3. **Critical and high findings.** Open each in the HTML report (they start expanded).
|
|
20
|
+
4. **Scope and blind spots.** The honest list of what this report cannot tell you.
|
|
21
|
+
|
|
22
|
+
## Severity, confidence and actionability are three different things
|
|
23
|
+
|
|
24
|
+
| Word | Question it answers | Example |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| **Severity** | If this is real, how much does it matter? | An exposed key is critical; a missing README is low |
|
|
27
|
+
| **Confidence** | How sure is the rule that it is real? | A committed private key is high; a "possible credential" is medium; an inferred AI-risk co-location is low |
|
|
28
|
+
| **Actionable** | Would the owners actually change something? | `eval` of a developer-typed value in a migration tool: real, but by design |
|
|
29
|
+
|
|
30
|
+
> **Why it matters.** On 52 real repositories, most reported findings were genuine instances of the rule, but **about half were not worth acting on**. That is not a bug in your report: it is the difference between "this code does X" and "X is a problem here". Triage is where a human adds value ([evidence](evidence-at-a-glance.md)).
|
|
31
|
+
|
|
32
|
+
## Triage flowchart
|
|
33
|
+
|
|
34
|
+
Follow it for every high or critical finding.
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
flowchart TD
|
|
38
|
+
f(["A finding"]) --> o{"Open the file and line.<br/>Does the code really<br/>do what it says?"}
|
|
39
|
+
o -- "No: comment, test data,<br/>vendored or wrong claim" --> fp["Report it as a false positive<br/>(helps everyone) and move on"]
|
|
40
|
+
o -- Yes --> r{"Can attacker-influenced input<br/>or a real failure reach it?"}
|
|
41
|
+
r -- Yes --> now["Fix now.<br/>Use the Fix and Verify steps"]
|
|
42
|
+
r -- "No, constant or internal" --> a{"Is it cheap to fix?"}
|
|
43
|
+
a -- Yes --> t["Fix in the next change<br/>(hardening)"]
|
|
44
|
+
a -- No --> s{"Accept on purpose?"}
|
|
45
|
+
s -- Yes --> sup["Add a suppression with<br/>a reason and an expiry"]
|
|
46
|
+
s -- No --> tk["Create a ticket<br/>with the finding ID"]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## What the common findings usually mean
|
|
50
|
+
|
|
51
|
+
| Rule | Usually means | Often a false alarm when |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| AS-SEC-001 possible credential | A real secret, or a default password in seed data | The value is a placeholder such as `password`, or a public key (search-only keys, Firebase web keys) |
|
|
54
|
+
| AS-SEC-002 private key committed | Rotate it, even if you think it is a test key | It is clearly an example key in docs (verify it is unused) |
|
|
55
|
+
| AS-SEC-004 dynamic execution | Injection sink: check what reaches it | Constant input, or tooling that must hide an import |
|
|
56
|
+
| AS-SEC-005 SQL by interpolation | Injection risk | The interpolated value is an internal, already-quoted identifier |
|
|
57
|
+
| AS-ARC-001 cycle | Modules cannot be understood or split independently | A cycle among test helpers or via a data file import (we ignore the common cases) |
|
|
58
|
+
| AS-OPS-003 root container | Hardening gap | A dev container that is never deployed |
|
|
59
|
+
| AS-SUP-001/002/003 | Builds that are not reproducible | Intentional in a throwaway demo |
|
|
60
|
+
|
|
61
|
+
The full list with limits is the [rule catalog](../handbook/12-rule-catalog.md).
|
|
62
|
+
|
|
63
|
+
## Accept a risk on purpose (and keep it honest)
|
|
64
|
+
|
|
65
|
+
Create `.archsutra/suppress.json` in the project:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"suppress": [
|
|
70
|
+
{
|
|
71
|
+
"rule": "AS-OPS-003",
|
|
72
|
+
"path": "tools/devcontainer/Dockerfile",
|
|
73
|
+
"reason": "Local dev container, never deployed",
|
|
74
|
+
"expires": "2027-06-30"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Three rules keep suppression from becoming a hiding place:
|
|
81
|
+
|
|
82
|
+
- **A reason is required.** A row without one is ignored.
|
|
83
|
+
- **It expires.** After `expires` the finding comes back for review.
|
|
84
|
+
- **It is specific.** A rule plus a path, not a blanket ignore.
|
|
85
|
+
|
|
86
|
+
```mermaid
|
|
87
|
+
stateDiagram-v2
|
|
88
|
+
[*] --> Reported
|
|
89
|
+
Reported --> Suppressed: reason + path + (optional) expiry
|
|
90
|
+
Suppressed --> Reported: expiry date passes
|
|
91
|
+
Suppressed --> Reported: row removed or reason missing
|
|
92
|
+
Reported --> Fixed: code changed
|
|
93
|
+
Fixed --> [*]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Tell us when a finding is wrong
|
|
97
|
+
|
|
98
|
+
False positives are the most valuable feedback we get. They became the regression tests that raised measured precision from 50% to 69% and then 95%.
|
|
99
|
+
|
|
100
|
+
1. Note the rule ID and the file and line.
|
|
101
|
+
2. Say why it is wrong: comment or docstring, vendored code, test data, placeholder, wrong rule claim.
|
|
102
|
+
3. Open a [false-positive report](https://github.com/shahvatsalofficial/archsutra-ai/issues/new?template=false_positive.md).
|
|
103
|
+
|
|
104
|
+
## What a report is not
|
|
105
|
+
|
|
106
|
+
> **Warning.** A report from this tool is a review aid. It is not a certification, a compliance attestation or a penetration test, and "no findings" is not "no problems". See the [legal notes](../handbook/07-security-privacy-legal.md).
|
|
107
|
+
|
|
108
|
+
## Next
|
|
109
|
+
|
|
110
|
+
- Turn findings into a plan: ask Prime for a roadmap ([scenario 1](real-world-scenarios.md#1-day-one-on-a-legacy-monolith)).
|
|
111
|
+
- Stop new ones: [CI recipes](ci-recipes.md).
|