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.
Files changed (113) hide show
  1. package/CHANGELOG.md +56 -6
  2. package/README.md +84 -12
  3. package/dist/audit.js +125 -44
  4. package/dist/cli.js +184 -96
  5. package/dist/drift.js +29 -15
  6. package/dist/fsutil.js +117 -20
  7. package/dist/history.js +40 -0
  8. package/dist/html.js +10 -8
  9. package/dist/map.js +26 -5
  10. package/dist/mcp.js +70 -55
  11. package/dist/redact.js +24 -11
  12. package/dist/report.js +69 -19
  13. package/dist/rules-extra.js +59 -0
  14. package/dist/secret-patterns.js +69 -0
  15. package/dist/suppress.js +31 -19
  16. package/dist/verify.js +2 -2
  17. package/dist/write.js +71 -0
  18. package/docs/architecture/overview.html +29 -12
  19. package/docs/architecture/overview.md +2 -2
  20. package/docs/architecture/threat-model.html +28 -11
  21. package/docs/assets/charts/coverage-dark.svg +11 -0
  22. package/docs/assets/charts/coverage.svg +11 -0
  23. package/docs/assets/charts/finding-anatomy-dark.svg +20 -0
  24. package/docs/assets/charts/finding-anatomy.svg +20 -0
  25. package/docs/assets/charts/pipeline-dark.svg +13 -0
  26. package/docs/assets/charts/pipeline.svg +13 -0
  27. package/docs/assets/charts/precision-by-batch-dark.svg +12 -0
  28. package/docs/assets/charts/precision-by-batch.svg +12 -0
  29. package/docs/assets/charts/precision-by-rule-dark.svg +12 -0
  30. package/docs/assets/charts/precision-by-rule.svg +12 -0
  31. package/docs/assets/charts/sample-findings-by-severity-dark.svg +11 -0
  32. package/docs/assets/charts/sample-findings-by-severity.svg +11 -0
  33. package/docs/assets/charts/scan-time-dark.svg +11 -0
  34. package/docs/assets/charts/scan-time.svg +11 -0
  35. package/docs/assets/site.css +259 -138
  36. package/docs/assets/site.js +92 -6
  37. package/docs/community/good-first-issues.html +28 -11
  38. package/docs/compatibility/matrix.html +28 -11
  39. package/docs/compatibility/smoke-tests/index.html +28 -11
  40. package/docs/decisions/ADR-0001-deterministic-cli-plus-ide-skills.html +28 -11
  41. package/docs/guides/cheat-sheet.html +100 -0
  42. package/docs/guides/cheat-sheet.md +146 -0
  43. package/docs/guides/ci-recipes.html +170 -0
  44. package/docs/guides/ci-recipes.md +176 -0
  45. package/docs/guides/evidence-at-a-glance.html +93 -0
  46. package/docs/guides/evidence-at-a-glance.md +65 -0
  47. package/docs/guides/getting-started.html +151 -0
  48. package/docs/guides/getting-started.md +160 -0
  49. package/docs/guides/how-it-works.html +161 -0
  50. package/docs/guides/how-it-works.md +148 -0
  51. package/docs/guides/mcp-server.html +99 -0
  52. package/docs/guides/mcp-server.md +81 -0
  53. package/docs/guides/reading-a-report.html +119 -0
  54. package/docs/guides/reading-a-report.md +111 -0
  55. package/docs/guides/real-world-scenarios.html +287 -0
  56. package/docs/guides/real-world-scenarios.md +377 -0
  57. package/docs/handbook/01-executive-summary.html +30 -13
  58. package/docs/handbook/01-executive-summary.md +2 -2
  59. package/docs/handbook/02-functional-specification.html +30 -13
  60. package/docs/handbook/02-functional-specification.md +3 -3
  61. package/docs/handbook/03-technical-specification.html +31 -14
  62. package/docs/handbook/03-technical-specification.md +3 -3
  63. package/docs/handbook/04-architecture.html +29 -12
  64. package/docs/handbook/04-architecture.md +1 -1
  65. package/docs/handbook/05-user-guide.html +33 -15
  66. package/docs/handbook/05-user-guide.md +5 -4
  67. package/docs/handbook/06-cli-reference.html +52 -16
  68. package/docs/handbook/06-cli-reference.md +47 -4
  69. package/docs/handbook/07-security-privacy-legal.html +31 -12
  70. package/docs/handbook/07-security-privacy-legal.md +4 -0
  71. package/docs/handbook/08-testing-and-proof.html +32 -15
  72. package/docs/handbook/08-testing-and-proof.md +4 -4
  73. package/docs/handbook/09-compatibility-and-roadmap.html +29 -12
  74. package/docs/handbook/09-compatibility-and-roadmap.md +3 -2
  75. package/docs/handbook/10-contributor-guide.html +29 -12
  76. package/docs/handbook/10-contributor-guide.md +1 -1
  77. package/docs/handbook/11-glossary-and-faq.html +34 -13
  78. package/docs/handbook/11-glossary-and-faq.md +7 -1
  79. package/docs/handbook/12-rule-catalog.html +59 -19
  80. package/docs/handbook/12-rule-catalog.md +62 -5
  81. package/docs/handbook/13-trust-and-assurance.html +29 -12
  82. package/docs/handbook/13-trust-and-assurance.md +1 -1
  83. package/docs/handbook/14-real-world-evaluation.html +28 -11
  84. package/docs/handbook/15-supply-chain-and-release.html +28 -11
  85. package/docs/handbook/16-performance-and-quality-metrics.html +28 -11
  86. package/docs/handbook/16-performance-and-quality-metrics.md +1 -1
  87. package/docs/handbook/README.md +4 -2
  88. package/docs/handbook/index.html +31 -13
  89. package/docs/index.html +101 -51
  90. package/docs/legal/legal-review-brief.html +28 -11
  91. package/docs/legal/trademark-and-name-clearance.html +28 -11
  92. package/docs/proof/accessibility.html +28 -11
  93. package/docs/proof/benchmarks.json +9 -9
  94. package/docs/proof/benchmarks.md +4 -4
  95. package/docs/proof/test-results.txt +56 -40
  96. package/docs/rfc/0001-archsutra-v0.1.html +28 -11
  97. package/docs/sample-report/architecture-register.json +46 -0
  98. package/docs/sample-report/audit-report.html +123 -0
  99. package/docs/sample-report/audit-report.md +314 -0
  100. package/docs/sample-report/current-state.html +77 -0
  101. package/docs/sample-report/current-state.md +51 -0
  102. package/docs/sample-report/findings.json +478 -0
  103. package/docs/sample-report/findings.sarif +754 -0
  104. package/docs/sample-report/index.html +57 -0
  105. package/docs/sample-report/overview.md +11 -0
  106. package/docs/search-index.json +1 -0
  107. package/docs/sitemap.xml +39 -28
  108. package/llms.txt +11 -2
  109. package/package.json +3 -2
  110. package/schemas/findings.schema.json +4 -3
  111. package/skills/architecture-audit/SKILL.md +2 -2
  112. package/skills/architecture-audit/references/report-template.md +1 -1
  113. package/skills/architecture-verification/references/fitness-functions.md +1 -1
@@ -0,0 +1,160 @@
1
+ # Get started in 5 minutes
2
+
3
+ <!-- summary: From zero to a readable architecture report in five minutes: pick your path, run one command, open the report, then bring in your AI IDE and CI. -->
4
+
5
+ By the end of this page you will have an **audit report you can open in a browser**, you will know what each part means, and you will know the next step for your situation. You do not need an account, an API key or network access for the first four steps.
6
+
7
+ > **Tip.** Short on time? Run step 1 and step 2, then read [Reading a report](reading-a-report.md). That alone is a useful 3 minutes.
8
+
9
+ ## Pick your path
10
+
11
+ Start from what you want, not from the tool.
12
+
13
+ ```mermaid
14
+ flowchart TD
15
+ start(["What do you want?"]) --> q1{"Do you already<br/>have code?"}
16
+ q1 -- "Yes, I need to understand it" --> audit["Run: archsutra audit .<br/>then open the HTML report"]
17
+ q1 -- "No, I am designing something new" --> design["Install the skills,<br/>ask Prime to design it"]
18
+ audit --> q2{"What next?"}
19
+ q2 -- "Stop it getting worse" --> ci["Add the CI gate<br/>(step 5)"]
20
+ q2 -- "Fix the big problems" --> mod["Ask Prime for a<br/>phased roadmap"]
21
+ q2 -- "Is this part safe?" --> tm["Use the threat-modeling skill"]
22
+ design --> adr["You get options, an ADR,<br/>diagrams and a thin-slice plan"]
23
+ ```
24
+
25
+ ## Step 1. Run your first audit
26
+
27
+ You need Node.js 20 or newer. From the root of any project:
28
+
29
+ ```bash
30
+ npx archsutra-ai audit .
31
+ ```
32
+
33
+ On Windows `npx archsutra-ai` works from version 0.1.3. The command reads your files, never runs them, never uses the network, and prints a report. Here is the **real output** for the small sample project in this repository:
34
+
35
+ > **Real output.** Trimmed from `archsutra audit fixtures/brownfield-monolith`.
36
+
37
+ ```text
38
+ # Architecture Audit Report
39
+
40
+ ## Summary
41
+ - Files scanned: 7
42
+ - Stack observed: TypeScript, Node.js
43
+ - Findings: 12 (critical 0, high 3, medium 7, low 2, info 0)
44
+
45
+ ## Scorecard
46
+ | Category | Rating |
47
+ |-----------------|--------------|
48
+ | Security | weak |
49
+ | Maintainability | adequate |
50
+ | Operability | adequate |
51
+ | Supply chain | adequate |
52
+ | Reliability | not assessed |
53
+ | Performance | not assessed |
54
+ | Cost | not assessed |
55
+ ```
56
+
57
+ > **Why it matters.** Notice `not assessed`. A static scan cannot see traffic, incidents or your cloud bill, so it says so instead of guessing. A tool that scores everything is a tool that makes things up.
58
+
59
+ ## Step 2. Open the report as a web page
60
+
61
+ Reports that people can open are reports that get read. Write the full set, Markdown and HTML:
62
+
63
+ ```bash
64
+ npx archsutra-ai audit . --output arch-report
65
+ ```
66
+
67
+ ```text
68
+ index.html
69
+ current-state.md
70
+ current-state.html
71
+ audit-report.md
72
+ audit-report.html
73
+ findings.json
74
+ findings.sarif
75
+ architecture-register.json
76
+ Open index.html in a browser. Each report also has a Markdown file beside it.
77
+ ```
78
+
79
+ Open `arch-report/index.html`. You get severity cards, a filter by severity, and collapsible findings. Use the Markdown files in pull requests, the JSON in scripts, and the SARIF in GitHub code scanning.
80
+
81
+ ```mermaid
82
+ flowchart LR
83
+ A["archsutra audit . --output arch-report"] --> H["audit-report.html<br/>for people"]
84
+ A --> M["audit-report.md<br/>for pull requests"]
85
+ A --> J["findings.json<br/>for scripts"]
86
+ A --> S["findings.sarif<br/>for code scanning"]
87
+ A --> C["current-state.html and .md<br/>maps and diagrams"]
88
+ ```
89
+
90
+ > **Note.** `--output` must stay inside the project folder. That is a safety rule: the tool will not write outside the project you pointed it at.
91
+
92
+ ## Step 3. Understand what you are looking at
93
+
94
+ Every finding has the same shape, so you can learn it once.
95
+
96
+ ![Anatomy of one finding: stable ID, severity and confidence, evidence with file and line, impact, fix, verification and acceptance](../assets/charts/finding-anatomy.svg)
97
+
98
+ Read it top to bottom: **what** (title), **how bad** (severity), **how sure** (confidence), **where** (file and line), **so what** (impact), **now what** (fix), **how do I know** (verify and accept). If you cannot open the cited line and see the problem, treat the finding as wrong and tell us ([false-positive report](https://github.com/shahvatsalofficial/archsutra-ai/issues/new?template=false_positive.md)).
99
+
100
+ ## Step 4. Add your AI IDE (optional, where the depth is)
101
+
102
+ The CLI gives evidence. Your IDE's own model adds judgment: why a design is risky, what to change first, what to design next. ArchSutra's skills tell the model how to do that without making things up.
103
+
104
+ Pick **one** host (several hosts read the same folders, so installing more than one duplicates skills):
105
+
106
+ | Your IDE | Command |
107
+ |---|---|
108
+ | Claude Code | `npx archsutra-ai install --host claude --target .` |
109
+ | Cursor | `npx archsutra-ai install --host cursor --target .` |
110
+ | OpenAI Codex | `npx archsutra-ai install --host codex --target .` |
111
+ | GitHub Copilot | `npx archsutra-ai install --host copilot --target .` |
112
+ | Gemini CLI | `npx archsutra-ai install --host gemini --target .` |
113
+
114
+ Preview first with `--dry-run`; undo any time with `uninstall`. Then ask:
115
+
116
+ > ArchSutra Prime: audit this repository's architecture. Establish what the code actually does first, then give findings with file and line evidence, severity and confidence, prioritized fixes and a phased roadmap. Stay read-only and label unknowns.
117
+
118
+ ```mermaid
119
+ sequenceDiagram
120
+ participant You
121
+ participant IDE as Your AI IDE
122
+ participant Prime as ArchSutra Prime
123
+ participant CLI as archsutra CLI
124
+ You->>IDE: Ask for an architecture audit
125
+ IDE->>Prime: Loads the architecture-audit skill
126
+ Prime->>CLI: archsutra audit . --json
127
+ CLI-->>Prime: Evidence (offline, read-only)
128
+ Prime->>Prime: Opens each cited file and line, drops what it cannot reproduce
129
+ Prime-->>You: Report with evidence labels, roadmap and open questions
130
+ ```
131
+
132
+ > **Warning.** Layouts for all five IDEs follow each vendor's documentation, but a live session in each has not been recorded yet. If a skill does not appear, run `archsutra doctor .` and tell us which IDE and version; we track it in the [smoke test log](../compatibility/smoke-tests/README.md).
133
+
134
+ ## Step 5. Stop regressions in CI
135
+
136
+ Add one line to your pipeline so the same problems cannot come back:
137
+
138
+ ```yaml
139
+ - run: npx --yes archsutra-ai audit . --fail-on high
140
+ ```
141
+
142
+ The step passes when there are no high or critical findings and fails (exit code 1) when there are. On a codebase that already has findings, start with a baseline instead so only *new* problems fail the build; see [CI recipes](ci-recipes.md).
143
+
144
+ ## If something goes wrong
145
+
146
+ | What you see | Why | Fix |
147
+ |---|---|---|
148
+ | "archsutra is not recognized" on Windows | Older version of the package | Use `npx archsutra-ai ...` with version 0.1.3 or newer |
149
+ | `--output must stay inside the project directory` | Safety rule | Use a relative folder such as `arch-report` |
150
+ | `Blocked: N conflicting file(s)` on install | A file already exists and was not installed by ArchSutra | Run with `--dry-run`, then `--force` (originals are backed up) |
151
+ | Skill not found in your IDE | Layout or version mismatch | `archsutra doctor .`, then open a smoke-test report |
152
+ | Report says TRUNCATED | Repository is larger than the scan limits | Audit a subfolder, or see [scan limits](../handbook/03-technical-specification.md) |
153
+
154
+ ## Where to go next
155
+
156
+ - **New to the report?** [Reading and triaging a report](reading-a-report.md)
157
+ - **Want to see it used?** [Real-world scenarios](real-world-scenarios.md)
158
+ - **Curious how it works?** [How it works, in pictures](how-it-works.md)
159
+ - **Need a quick reference?** [Cheat sheet](cheat-sheet.md)
160
+ - **Do you trust the numbers?** [Evidence at a glance](evidence-at-a-glance.md)
@@ -0,0 +1,161 @@
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>How it works, in pictures | ArchSutra AI</title>
7
+ <meta name="description" content="Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries.">
8
+ <link rel="canonical" href="https://shahvatsalofficial.github.io/archsutra-ai/guides/how-it-works.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="How it works, in pictures | ArchSutra AI">
13
+ <meta property="og:description" content="Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries.">
14
+ <meta property="og:url" content="https://shahvatsalofficial.github.io/archsutra-ai/guides/how-it-works.html">
15
+ <meta property="og:site_name" content="ArchSutra AI">
16
+ <meta name="twitter:card" content="summary">
17
+ <meta name="twitter:title" content="How it works, in pictures | ArchSutra AI">
18
+ <meta name="twitter:description" content="Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries.">
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":"How it works, in pictures","description":"Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries.","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" aria-current="page">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">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" aria-current="page">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">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="how-it-works-in-pictures">How it works, in pictures</h1>
49
+ <p class="lede">Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries.</p><p class="meta">Version 0.2.0 &middot; Source: <a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/docs/guides/how-it-works.md" rel="noopener">docs/guides/how-it-works.md</a></p>
50
+ <p>You can use ArchSutra without reading this page. Read it when you want to know <em>why</em> the output looks the way it does and <em>how far to trust it</em>. Each picture answers one question.</p>
51
+ <h2 id="1-the-big-picture-who-does-what">1. The big picture: who does what?<a class="anchor" href="#1-the-big-picture-who-does-what" aria-label="Link to this section">#</a></h2>
52
+ <figure class="figure"><img class="theme-light" src="../assets/charts/pipeline.svg" alt="ArchSutra pipeline: your repository is scanned read-only by the CLI, which produces evidence; your IDE model, guided by ArchSutra skills, verifies the evidence and writes the report" loading="lazy"><img class="theme-dark" src="../assets/charts/pipeline-dark.svg" alt="ArchSutra pipeline: your repository is scanned read-only by the CLI, which produces evidence; your IDE model, guided by ArchSutra skills, verifies the evidence and writes the report" loading="lazy"><figcaption>ArchSutra pipeline: your repository is scanned read-only by the CLI, which produces evidence; your IDE model, guided by ArchSutra skills, verifies the evidence and writes the report</figcaption></figure>
53
+ <p>Two parts, two jobs:</p>
54
+ <ul><li>The <strong>CLI</strong> is a measuring tool. It always gives the same answer for the same input, runs offline and never calls a model. That makes it testable and safe in CI.</li><li>The <strong>skills and agents</strong> are a method for your IDE's model. They stop the model from guessing and make it check its own work.</li></ul>
55
+ <p>Neither needs an ArchSutra account or key.</p>
56
+ <h2 id="2-three-layers-three-kinds-of-trust">2. Three layers, three kinds of trust<a class="anchor" href="#2-three-layers-three-kinds-of-trust" aria-label="Link to this section">#</a></h2>
57
+ <figure class="diagram"><pre class="mermaid">flowchart TB
58
+ subgraph L1[&quot;Layer 1: Evidence (deterministic)&quot;]
59
+ direction LR
60
+ w[&quot;Walk files&lt;br/&gt;bounded, no symlinks&quot;] --&gt; m[&quot;Map modules&lt;br/&gt;and imports&quot;] --&gt; r[&quot;Apply 30 rules&lt;br/&gt;with redaction&quot;]
61
+ end
62
+ subgraph L2[&quot;Layer 2: Reasoning (your IDE model)&quot;]
63
+ direction LR
64
+ v[&quot;Verify each finding&lt;br/&gt;at file and line&quot;] --&gt; j[&quot;Judge impact&lt;br/&gt;and trade-offs&quot;] --&gt; p[&quot;Plan: roadmap,&lt;br/&gt;ADRs, designs&quot;]
65
+ end
66
+ subgraph L3[&quot;Layer 3: Delivery&quot;]
67
+ direction LR
68
+ h[&quot;HTML for people&quot;] --- md[&quot;Markdown for PRs&quot;] --- js[&quot;JSON and SARIF&lt;br/&gt;for tools&quot;]
69
+ end
70
+ L1 --&gt; L2 --&gt; L3</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
71
+ <p>How much to trust each layer:</p>
72
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 1: 2. Three layers, three kinds of trust"><table><thead><tr><th scope="col">Layer</th><th scope="col">Reproducible?</th><th scope="col">Can be wrong?</th><th scope="col">How we limit that</th></tr></thead><tbody><tr><td>1. Evidence</td><td>Yes, byte for byte</td><td>Yes, rules are heuristics</td><td>Measured on real repositories; every finding lists caveats</td></tr><tr><td>2. Reasoning</td><td>No, models vary</td><td>Yes</td><td>Skills require citing evidence and labeling claims</td></tr><tr><td>3. Delivery</td><td>Yes</td><td>Only if layers 1 or 2 were</td><td>Escaped output; sources linked</td></tr></tbody></table></div>
73
+ <h2 id="3-every-claim-wears-a-label">3. Every claim wears a label<a class="anchor" href="#3-every-claim-wears-a-label" aria-label="Link to this section">#</a></h2>
74
+ <figure class="diagram"><pre class="mermaid">flowchart TD
75
+ c([&quot;A claim in a report&quot;]) --&gt; q1{&quot;Did the tool or reviewer&lt;br/&gt;see it in a file?&quot;}
76
+ q1 -- Yes --&gt; obs[&quot;observed&lt;br/&gt;cites path and line&quot;]
77
+ q1 -- No --&gt; q2{&quot;Derived from observed facts&lt;br/&gt;by reasoning?&quot;}
78
+ q2 -- Yes --&gt; inf[&quot;inferred&lt;br/&gt;says what it was derived from&quot;]
79
+ q2 -- No --&gt; q3{&quot;A recommendation&lt;br/&gt;for the future?&quot;}
80
+ q3 -- Yes --&gt; prop[&quot;proposed&quot;]
81
+ q3 -- No --&gt; unk[&quot;unknown&lt;br/&gt;and what would settle it&quot;]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
82
+ <blockquote class="callout callout-why-it-matters"><strong>Why it matters.</strong> Most bad architecture advice is a guess presented as a fact. Labels let you see the difference at a glance, and they let a reviewer challenge exactly the part that is shaky.</blockquote>
83
+ <h2 id="4-a-scan-from-the-inside">4. A scan from the inside<a class="anchor" href="#4-a-scan-from-the-inside" aria-label="Link to this section">#</a></h2>
84
+ <figure class="diagram"><pre class="mermaid">sequenceDiagram
85
+ participant U as You or CI
86
+ participant C as archsutra CLI
87
+ participant F as File walker
88
+ participant M as Mapper
89
+ participant R as Rules
90
+ participant O as Output
91
+ U-&gt;&gt;C: archsutra audit . --output report
92
+ C-&gt;&gt;F: Walk with limits (5000 files, 512 KiB each, 120 MiB total)
93
+ F--&gt;&gt;C: Files (symlinks skipped, truncation flagged)
94
+ C-&gt;&gt;M: Build module graph from imports
95
+ M--&gt;&gt;C: Modules, edges, cycles
96
+ C-&gt;&gt;R: Run 30 rules (comments, tests, vendored code masked)
97
+ R--&gt;&gt;C: Findings with redacted excerpts
98
+ C-&gt;&gt;C: Apply .archsutra/suppress.json (needs a reason)
99
+ C-&gt;&gt;O: Write HTML, Markdown, JSON, SARIF
100
+ O--&gt;&gt;U: Exit code 0, or 1 if --fail-on is met</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
101
+ <p>Three details worth knowing:</p>
102
+ <ul><li><strong>Limits are always reported.</strong> If a repository is too big, the report says TRUNCATED. It never silently scans half.</li><li><strong>Noise is filtered before you see it.</strong> Comments, docstrings, test files, vendored libraries, minified bundles and dummy values are ignored. That is what raised measured precision from 50% to 69% and 95% (<a href="evidence-at-a-glance.html">evidence</a>).</li><li><strong>Suppression needs a reason.</strong> A row without a reason in <code>.archsutra/suppress.json</code> is ignored, and expired rows stop applying.</li></ul>
103
+ <h2 id="5-how-a-rating-is-decided">5. How a rating is decided<a class="anchor" href="#5-how-a-rating-is-decided" aria-label="Link to this section">#</a></h2>
104
+ <figure class="diagram"><pre class="mermaid">flowchart TD
105
+ cat([&quot;A scorecard category,&lt;br/&gt;for example Security&quot;]) --&gt; e{&quot;Is there evidence&lt;br/&gt;this tool can see?&quot;}
106
+ e -- No --&gt; na[&quot;not assessed&quot;]
107
+ e -- Yes --&gt; c1{&quot;Any critical finding?&quot;}
108
+ c1 -- Yes --&gt; crit[&quot;critical&quot;]
109
+ c1 -- No --&gt; c2{&quot;Any high finding?&quot;}
110
+ c2 -- Yes --&gt; weak[&quot;weak&quot;]
111
+ c2 -- No --&gt; c3{&quot;Any medium finding?&quot;}
112
+ c3 -- Yes --&gt; adq[&quot;adequate&quot;]
113
+ c3 -- No --&gt; strong[&quot;no findings&lt;br/&gt;(from the rules we have)&quot;]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
114
+ <p>Reliability, performance, scalability, data integrity and cost are <strong>always</strong> <code>not assessed</code> from a static scan: they need traffic, incidents, data volumes or billing. A <code>no findings</code> rating means &quot;no findings from these 30 rules&quot;, which is not the same as &quot;no problems&quot;.</p>
115
+ <h2 id="6-install-lifecycle-safe-reversible-never-destructive">6. Install lifecycle: safe, reversible, never destructive<a class="anchor" href="#6-install-lifecycle-safe-reversible-never-destructive" aria-label="Link to this section">#</a></h2>
116
+ <figure class="diagram"><pre class="mermaid">stateDiagram-v2
117
+ [*] --&gt; Planned: install --dry-run
118
+ Planned --&gt; Installed: install (writes files and a SHA-256 manifest)
119
+ Planned --&gt; Blocked: a file exists that we did not install
120
+ Blocked --&gt; Installed: install --force (originals backed up)
121
+ Installed --&gt; Modified: you edit an installed file
122
+ Modified --&gt; Installed: install --force (backup kept)
123
+ Installed --&gt; Removed: uninstall
124
+ Modified --&gt; Removed: uninstall (your edited file is kept)
125
+ Removed --&gt; [*]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
126
+ <p>The manifest at <code>.archsutra/install-manifest.json</code> records a hash of every file it wrote. <code>uninstall</code> deletes a file only if its hash still matches, so your edits are never lost.</p>
127
+ <h2 id="7-trust-boundaries-what-can-touch-what">7. Trust boundaries: what can touch what<a class="anchor" href="#7-trust-boundaries-what-can-touch-what" aria-label="Link to this section">#</a></h2>
128
+ <figure class="diagram"><pre class="mermaid">flowchart LR
129
+ subgraph U[&quot;Untrusted&quot;]
130
+ repo[&quot;Your repository content&lt;br/&gt;(code, comments, READMEs)&quot;]
131
+ end
132
+ subgraph T[&quot;Trusted and hashed&quot;]
133
+ skills[&quot;ArchSutra skills and agents&quot;]
134
+ end
135
+ subgraph P[&quot;Local process&quot;]
136
+ cli[&quot;archsutra CLI&quot;]
137
+ end
138
+ repo --&gt;|&quot;read only, bounded&quot;| cli
139
+ cli --&gt;|&quot;writes only inside the project&quot;| out[&quot;Reports and installed files&quot;]
140
+ skills --&gt; ide[&quot;Your IDE model&quot;]
141
+ repo -. &quot;may contain text aimed at an AI&quot; .-&gt; ide
142
+ ide --&gt;|&quot;read-only tools by default&quot;| repo</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
143
+ <p>The dotted line is the real risk: text inside a repository can try to instruct an AI. ArchSutra's answer is layered: skills declare repository content to be data, agents get read-only tools, and the CLI never executes anything it reads. Residual risk is documented in the <a href="../architecture/threat-model.html">threat model</a>.</p>
144
+ <h2 id="keep-going">Keep going<a class="anchor" href="#keep-going" aria-label="Link to this section">#</a></h2>
145
+ <ul><li>Use it on something real: <a href="real-world-scenarios.html">Real-world scenarios</a></li><li>The full reasoning behind the design: <a href="../handbook/04-architecture.html">Architecture</a></li><li>Every rule: <a href="../handbook/12-rule-catalog.html">Rule catalog</a></li></ul></article><nav class="pn" aria-label="Previous and next page"><a class="prev" href="real-world-scenarios.html"><small>Previous</small><span>Real-world scenarios</span></a><a class="next" href="reading-a-report.html"><small>Next</small><span>Reading and triaging a report</span></a></nav><p class="edit"><a href="https://github.com/shahvatsalofficial/archsutra-ai/edit/main/docs/guides/how-it-works.md" rel="noopener">Edit this page on GitHub</a></p></main>
146
+ <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="#1-the-big-picture-who-does-what">1. The big picture: who does what?</a></li><li class="l2"><a href="#2-three-layers-three-kinds-of-trust">2. Three layers, three kinds of trust</a></li><li class="l2"><a href="#3-every-claim-wears-a-label">3. Every claim wears a label</a></li><li class="l2"><a href="#4-a-scan-from-the-inside">4. A scan from the inside</a></li><li class="l2"><a href="#5-how-a-rating-is-decided">5. How a rating is decided</a></li><li class="l2"><a href="#6-install-lifecycle-safe-reversible-never-destructive">6. Install lifecycle: safe, reversible, never destructive</a></li><li class="l2"><a href="#7-trust-boundaries-what-can-touch-what">7. Trust boundaries: what can touch what</a></li><li class="l2"><a href="#keep-going">Keep going</a></li></ul></nav></aside>
147
+ </div>
148
+ <footer class="footer">
149
+ <div class="footer-inner">
150
+ <div class="footer-grid">
151
+ <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>
152
+ <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>
153
+ <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>
154
+ <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>
155
+ </div>
156
+ <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>
157
+ </div>
158
+ </footer>
159
+ <script src="../assets/site.js" type="module"></script>
160
+ </body>
161
+ </html>
@@ -0,0 +1,148 @@
1
+ # How it works, in pictures
2
+
3
+ <!-- summary: Seven diagrams that explain ArchSutra end to end: the pipeline, the three layers, evidence labels, a scan from the inside, how scores are decided, the install lifecycle and the trust boundaries. -->
4
+
5
+ You can use ArchSutra without reading this page. Read it when you want to know *why* the output looks the way it does and *how far to trust it*. Each picture answers one question.
6
+
7
+ ## 1. The big picture: who does what?
8
+
9
+ ![ArchSutra pipeline: your repository is scanned read-only by the CLI, which produces evidence; your IDE model, guided by ArchSutra skills, verifies the evidence and writes the report](../assets/charts/pipeline.svg)
10
+
11
+ Two parts, two jobs:
12
+
13
+ - The **CLI** is a measuring tool. It always gives the same answer for the same input, runs offline and never calls a model. That makes it testable and safe in CI.
14
+ - The **skills and agents** are a method for your IDE's model. They stop the model from guessing and make it check its own work.
15
+
16
+ Neither needs an ArchSutra account or key.
17
+
18
+ ## 2. Three layers, three kinds of trust
19
+
20
+ ```mermaid
21
+ flowchart TB
22
+ subgraph L1["Layer 1: Evidence (deterministic)"]
23
+ direction LR
24
+ w["Walk files<br/>bounded, no symlinks"] --> m["Map modules<br/>and imports"] --> r["Apply 30 rules<br/>with redaction"]
25
+ end
26
+ subgraph L2["Layer 2: Reasoning (your IDE model)"]
27
+ direction LR
28
+ v["Verify each finding<br/>at file and line"] --> j["Judge impact<br/>and trade-offs"] --> p["Plan: roadmap,<br/>ADRs, designs"]
29
+ end
30
+ subgraph L3["Layer 3: Delivery"]
31
+ direction LR
32
+ h["HTML for people"] --- md["Markdown for PRs"] --- js["JSON and SARIF<br/>for tools"]
33
+ end
34
+ L1 --> L2 --> L3
35
+ ```
36
+
37
+ How much to trust each layer:
38
+
39
+ | Layer | Reproducible? | Can be wrong? | How we limit that |
40
+ |---|---|---|---|
41
+ | 1. Evidence | Yes, byte for byte | Yes, rules are heuristics | Measured on real repositories; every finding lists caveats |
42
+ | 2. Reasoning | No, models vary | Yes | Skills require citing evidence and labeling claims |
43
+ | 3. Delivery | Yes | Only if layers 1 or 2 were | Escaped output; sources linked |
44
+
45
+ ## 3. Every claim wears a label
46
+
47
+ ```mermaid
48
+ flowchart TD
49
+ c(["A claim in a report"]) --> q1{"Did the tool or reviewer<br/>see it in a file?"}
50
+ q1 -- Yes --> obs["observed<br/>cites path and line"]
51
+ q1 -- No --> q2{"Derived from observed facts<br/>by reasoning?"}
52
+ q2 -- Yes --> inf["inferred<br/>says what it was derived from"]
53
+ q2 -- No --> q3{"A recommendation<br/>for the future?"}
54
+ q3 -- Yes --> prop["proposed"]
55
+ q3 -- No --> unk["unknown<br/>and what would settle it"]
56
+ ```
57
+
58
+ > **Why it matters.** Most bad architecture advice is a guess presented as a fact. Labels let you see the difference at a glance, and they let a reviewer challenge exactly the part that is shaky.
59
+
60
+ ## 4. A scan from the inside
61
+
62
+ ```mermaid
63
+ sequenceDiagram
64
+ participant U as You or CI
65
+ participant C as archsutra CLI
66
+ participant F as File walker
67
+ participant M as Mapper
68
+ participant R as Rules
69
+ participant O as Output
70
+ U->>C: archsutra audit . --output report
71
+ C->>F: Walk with limits (5000 files, 512 KiB each, 120 MiB total)
72
+ F-->>C: Files (symlinks skipped, truncation flagged)
73
+ C->>M: Build module graph from imports
74
+ M-->>C: Modules, edges, cycles
75
+ C->>R: Run 30 rules (comments, tests, vendored code masked)
76
+ R-->>C: Findings with redacted excerpts
77
+ C->>C: Apply .archsutra/suppress.json (needs a reason)
78
+ C->>O: Write HTML, Markdown, JSON, SARIF
79
+ O-->>U: Exit code 0, or 1 if --fail-on is met
80
+ ```
81
+
82
+ Three details worth knowing:
83
+
84
+ - **Limits are always reported.** If a repository is too big, the report says TRUNCATED. It never silently scans half.
85
+ - **Noise is filtered before you see it.** Comments, docstrings, test files, vendored libraries, minified bundles and dummy values are ignored. That is what raised measured precision from 50% to 69% and 95% ([evidence](evidence-at-a-glance.md)).
86
+ - **Suppression needs a reason.** A row without a reason in `.archsutra/suppress.json` is ignored, and expired rows stop applying.
87
+
88
+ ## 5. How a rating is decided
89
+
90
+ ```mermaid
91
+ flowchart TD
92
+ cat(["A scorecard category,<br/>for example Security"]) --> e{"Is there evidence<br/>this tool can see?"}
93
+ e -- No --> na["not assessed"]
94
+ e -- Yes --> c1{"Any critical finding?"}
95
+ c1 -- Yes --> crit["critical"]
96
+ c1 -- No --> c2{"Any high finding?"}
97
+ c2 -- Yes --> weak["weak"]
98
+ c2 -- No --> c3{"Any medium finding?"}
99
+ c3 -- Yes --> adq["adequate"]
100
+ c3 -- No --> strong["no findings<br/>(from the rules we have)"]
101
+ ```
102
+
103
+ Reliability, performance, scalability, data integrity and cost are **always** `not assessed` from a static scan: they need traffic, incidents, data volumes or billing. A `no findings` rating means "no findings from these 30 rules", which is not the same as "no problems".
104
+
105
+ ## 6. Install lifecycle: safe, reversible, never destructive
106
+
107
+ ```mermaid
108
+ stateDiagram-v2
109
+ [*] --> Planned: install --dry-run
110
+ Planned --> Installed: install (writes files and a SHA-256 manifest)
111
+ Planned --> Blocked: a file exists that we did not install
112
+ Blocked --> Installed: install --force (originals backed up)
113
+ Installed --> Modified: you edit an installed file
114
+ Modified --> Installed: install --force (backup kept)
115
+ Installed --> Removed: uninstall
116
+ Modified --> Removed: uninstall (your edited file is kept)
117
+ Removed --> [*]
118
+ ```
119
+
120
+ The manifest at `.archsutra/install-manifest.json` records a hash of every file it wrote. `uninstall` deletes a file only if its hash still matches, so your edits are never lost.
121
+
122
+ ## 7. Trust boundaries: what can touch what
123
+
124
+ ```mermaid
125
+ flowchart LR
126
+ subgraph U["Untrusted"]
127
+ repo["Your repository content<br/>(code, comments, READMEs)"]
128
+ end
129
+ subgraph T["Trusted and hashed"]
130
+ skills["ArchSutra skills and agents"]
131
+ end
132
+ subgraph P["Local process"]
133
+ cli["archsutra CLI"]
134
+ end
135
+ repo -->|"read only, bounded"| cli
136
+ cli -->|"writes only inside the project"| out["Reports and installed files"]
137
+ skills --> ide["Your IDE model"]
138
+ repo -. "may contain text aimed at an AI" .-> ide
139
+ ide -->|"read-only tools by default"| repo
140
+ ```
141
+
142
+ The dotted line is the real risk: text inside a repository can try to instruct an AI. ArchSutra's answer is layered: skills declare repository content to be data, agents get read-only tools, and the CLI never executes anything it reads. Residual risk is documented in the [threat model](../architecture/threat-model.md).
143
+
144
+ ## Keep going
145
+
146
+ - Use it on something real: [Real-world scenarios](real-world-scenarios.md)
147
+ - The full reasoning behind the design: [Architecture](../handbook/04-architecture.md)
148
+ - Every rule: [Rule catalog](../handbook/12-rule-catalog.md)