archsutra-ai 0.1.5 → 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 +47 -6
  2. package/README.md +83 -11
  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 +2 -1
  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,100 @@
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>Cheat sheet | ArchSutra AI</title>
7
+ <meta name="description" content="One page: every command, flag, exit code, output file, label and install path.">
8
+ <link rel="canonical" href="https://shahvatsalofficial.github.io/archsutra-ai/guides/cheat-sheet.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="Cheat sheet | ArchSutra AI">
13
+ <meta property="og:description" content="One page: every command, flag, exit code, output file, label and install path.">
14
+ <meta property="og:url" content="https://shahvatsalofficial.github.io/archsutra-ai/guides/cheat-sheet.html">
15
+ <meta property="og:site_name" content="ArchSutra AI">
16
+ <meta name="twitter:card" content="summary">
17
+ <meta name="twitter:title" content="Cheat sheet | ArchSutra AI">
18
+ <meta name="twitter:description" content="One page: every command, flag, exit code, output file, label and install path.">
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":"Cheat sheet","description":"One page: every command, flag, exit code, output file, label and install path.","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">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html" aria-current="page">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">Use ArchSutra as an MCP server</a></li><li><a href="../guides/cheat-sheet.html" aria-current="page">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="cheat-sheet">Cheat sheet</h1>
49
+ <p class="lede">One page: every command, flag, exit code, output file, label and install path.</p><p class="meta">Version 0.2.0 &middot; Source: <a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/docs/guides/cheat-sheet.md" rel="noopener">docs/guides/cheat-sheet.md</a></p>
50
+ <p>Print it, pin it, or keep this tab open.</p>
51
+ <h2 id="the-five-commands-you-will-use-most">The five commands you will use most<a class="anchor" href="#the-five-commands-you-will-use-most" aria-label="Link to this section">#</a></h2>
52
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-bash">npx archsutra-ai audit . # findings + scorecard, printed
53
+ npx archsutra-ai audit . --output arch-report # full report set: HTML + Markdown + JSON + SARIF
54
+ npx archsutra-ai audit . --fail-on high # CI gate (exit 1 on high or critical)
55
+ npx archsutra-ai drift . --baseline baseline/findings.json --fail-on high # only NEW findings fail
56
+ npx archsutra-ai install --host claude --target . # add skills and agents to your IDE</code></pre></div>
57
+ <h2 id="all-commands">All commands<a class="anchor" href="#all-commands" aria-label="Link to this section">#</a></h2>
58
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 1: All commands"><table><thead><tr><th scope="col">Command</th><th scope="col">What it does</th><th scope="col">Writes files?</th></tr></thead><tbody><tr><td><code>audit [path]</code></td><td>Evidence-linked findings and scorecard</td><td>with <code>--output</code></td></tr><tr><td><code>map [path]</code></td><td>Modules, imports, cycles, diagrams</td><td>with <code>--output</code></td></tr><tr><td><code>review [path]</code></td><td>Audit evidence as a review starter</td><td>with <code>--output</code></td></tr><tr><td><code>design [path]</code></td><td>Design starter from the module map; decisions stay <code>unknown</code></td><td>with <code>--output</code></td></tr><tr><td><code>threat-model [path]</code></td><td>STRIDE starter from security findings; the rest stays <code>unknown</code></td><td>with <code>--output</code></td></tr><tr><td><code>modernize [path]</code></td><td>One slice per finding; target architecture stays <code>unknown</code></td><td>with <code>--output</code></td></tr><tr><td><code>cost [path]</code></td><td>States that cost is not assessed</td><td>with <code>--output</code></td></tr><tr><td><code>drift</code> / <code>compare</code></td><td>Diff two <code>findings.json</code> files, or a project against <code>--baseline</code></td><td>no</td></tr><tr><td><code>verify [path]</code></td><td>Check skills, agents, links, diagrams, <code>findings.json</code></td><td>no</td></tr><tr><td><code>export [path]</code></td><td>Write every report as Markdown and HTML</td><td>yes</td></tr><tr><td><code>html &lt;file.md&gt;</code></td><td>Render a Markdown report to a self-contained HTML page</td><td>yes (next to the file)</td></tr><tr><td><code>install</code> / <code>uninstall</code></td><td>Add or remove skills and agents (<code>--host</code>, <code>--target</code>)</td><td>yes</td></tr><tr><td><code>doctor [path]</code></td><td>Check Node, hosts, install drift</td><td>no</td></tr><tr><td><code>hosts</code></td><td>List adapters and support levels</td><td>no</td></tr><tr><td><code>mcp</code></td><td>MCP server on stdio (tools: audit, map, drift)</td><td>no</td></tr></tbody></table></div>
59
+ <p>None of them calls a model or the network.</p>
60
+ <h2 id="flags">Flags<a class="anchor" href="#flags" aria-label="Link to this section">#</a></h2>
61
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 2: Flags"><table><thead><tr><th scope="col">Flag</th><th scope="col">Meaning</th></tr></thead><tbody><tr><td><code>--json</code></td><td>Machine-readable output</td></tr><tr><td><code>--format &lt;md|html&gt;</code></td><td>Stdout format for <code>audit</code> and <code>map</code></td></tr><tr><td><code>--output &lt;dir&gt;</code></td><td>Write files into a folder <strong>inside</strong> the project</td></tr><tr><td><code>--baseline &lt;file&gt;</code></td><td><code>findings.json</code> to diff against (<code>drift</code>, <code>compare</code>)</td></tr><tr><td><code>--fail-on &lt;sev&gt;</code></td><td>Exit 1 at or above <code>critical</code>, <code>high</code>, <code>medium</code> or <code>low</code></td></tr><tr><td><code>--host &lt;id&gt;</code></td><td><code>claude</code>, <code>cursor</code>, <code>codex</code>, <code>copilot</code>, <code>gemini</code></td></tr><tr><td><code>--target &lt;dir&gt;</code></td><td>Project to install into</td></tr><tr><td><code>--dry-run</code></td><td>Show changes, write nothing</td></tr><tr><td><code>--force</code></td><td>Overwrite modified files (backups kept)</td></tr><tr><td><code>--verbose</code></td><td>Extra detail</td></tr></tbody></table></div>
62
+ <h2 id="new-in-020">New in 0.2.0<a class="anchor" href="#new-in-020" aria-label="Link to this section">#</a></h2>
63
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 3: New in 0.2.0"><table><thead><tr><th scope="col">Command or flag</th><th scope="col">Use</th></tr></thead><tbody><tr><td><code>baseline create</code> / <code>baseline update</code></td><td>Record today's findings</td></tr><tr><td><code>audit --fail-on-new</code></td><td>Fail only on new locations</td></tr><tr><td><code>suppressions</code></td><td>List and spot expired entries</td></tr><tr><td><code>--strict</code></td><td>Fail on an empty or partial scan</td></tr><tr><td><code>--history</code></td><td>Find secrets in git history</td></tr><tr><td><code>--include</code>, <code>--exclude</code>, <code>--respect-gitignore</code></td><td>Choose what is scanned</td></tr><tr><td><code>--no-score</code></td><td>Hide the scorecard</td></tr><tr><td><code>mcp --root .</code></td><td><a href="mcp-server.html">Use as an MCP server</a></td></tr></tbody></table></div>
64
+ <h2 id="exit-codes">Exit codes<a class="anchor" href="#exit-codes" aria-label="Link to this section">#</a></h2>
65
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 4: Exit codes"><table><thead><tr><th scope="col">Code</th><th scope="col">Meaning</th></tr></thead><tbody><tr><td>0</td><td>Success, or nothing at or above <code>--fail-on</code></td></tr><tr><td>1</td><td>Finding at or above <code>--fail-on</code> (for <code>drift</code>: added), or install conflict, or failed <code>doctor</code></td></tr><tr><td>2</td><td>Usage error</td></tr><tr><td>4</td><td><code>verify</code> failed</td></tr><tr><td>5</td><td>Internal error</td></tr><tr><td>6</td><td>Incomplete scan with <code>--strict</code></td></tr></tbody></table></div>
66
+ <h2 id="files-you-get-from---output">Files you get from <code>--output</code><a class="anchor" href="#files-you-get-from---output" aria-label="Link to this section">#</a></h2>
67
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 5: Files you get from --output"><table><thead><tr><th scope="col">File</th><th scope="col">For</th><th scope="col">Open it with</th></tr></thead><tbody><tr><td><code>index.html</code></td><td>Start here</td><td>a browser</td></tr><tr><td><code>audit-report.html</code> / <code>.md</code></td><td>The findings</td><td>browser / pull request</td></tr><tr><td><code>current-state.html</code> / <code>.md</code></td><td>Stack, maps, diagrams, cycles</td><td>browser / pull request</td></tr><tr><td><code>findings.json</code></td><td>Scripts and <code>drift</code> baselines</td><td>your tooling</td></tr><tr><td><code>findings.sarif</code></td><td>GitHub code scanning</td><td>upload action</td></tr><tr><td><code>architecture-register.json</code></td><td>SHA-256 of every file</td><td>integrity checks</td></tr></tbody></table></div>
68
+ <h2 id="claim-labels">Claim labels<a class="anchor" href="#claim-labels" aria-label="Link to this section">#</a></h2>
69
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 6: Claim labels"><table><thead><tr><th scope="col">Label</th><th scope="col">Meaning</th></tr></thead><tbody><tr><td><code>observed</code></td><td>Seen in a file; cites <code>path:line</code></td></tr><tr><td><code>inferred</code></td><td>Derived from observed facts; says from what</td></tr><tr><td><code>proposed</code></td><td>A recommendation, not a fact</td></tr><tr><td><code>unknown</code></td><td>Cannot be decided from the evidence; says what would settle it</td></tr></tbody></table></div>
70
+ <h2 id="ratings">Ratings<a class="anchor" href="#ratings" aria-label="Link to this section">#</a></h2>
71
+ <p><code>no findings</code> (none from the rules we have; not proof of safety) · <code>adequate</code> (medium, or 3+ low) · <code>weak</code> (high) · <code>critical</code> · <code>not assessed</code> (needs evidence a static scan cannot see).</p>
72
+ <h2 id="severity-guide">Severity guide<a class="anchor" href="#severity-guide" aria-label="Link to this section">#</a></h2>
73
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 7: Severity guide"><table><thead><tr><th scope="col">Severity</th><th scope="col">Rough meaning</th></tr></thead><tbody><tr><td>critical</td><td>Exploitable now with major impact (exposed secret, private key)</td></tr><tr><td>high</td><td>Serious weakness with a plausible exploit or outage</td></tr><tr><td>medium</td><td>Meaningful risk or debt</td></tr><tr><td>low</td><td>Hygiene</td></tr><tr><td>info</td><td>Observation</td></tr></tbody></table></div>
74
+ <h2 id="where-skills-land-per-ide">Where skills land per IDE<a class="anchor" href="#where-skills-land-per-ide" aria-label="Link to this section">#</a></h2>
75
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 8: Where skills land per IDE"><table><thead><tr><th scope="col">Host</th><th scope="col">Skills</th><th scope="col">Agents</th></tr></thead><tbody><tr><td>Claude Code</td><td><code>.claude/skills/</code></td><td><code>.claude/agents/</code></td></tr><tr><td>Cursor</td><td><code>.cursor/skills/</code></td><td><code>.cursor/agents/</code></td></tr><tr><td>OpenAI Codex</td><td><code>.agents/skills/</code></td><td>none (managed block in <code>AGENTS.md</code>)</td></tr><tr><td>GitHub Copilot</td><td><code>.github/skills/</code></td><td><code>.github/agents/*.agent.md</code></td></tr><tr><td>Gemini CLI</td><td><code>.gemini/skills/</code></td><td>none</td></tr></tbody></table></div>
76
+ <p>Install <strong>one</strong> host per project: several hosts also read <code>.agents/skills</code> and <code>.claude/skills</code>.</p>
77
+ <h2 id="the-five-skills">The five skills<a class="anchor" href="#the-five-skills" aria-label="Link to this section">#</a></h2>
78
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 9: The five skills"><table><thead><tr><th scope="col">Skill</th><th scope="col">Ask it when</th></tr></thead><tbody><tr><td><code>architecture-audit</code></td><td>&quot;Review this codebase&quot;</td></tr><tr><td><code>architecture-design</code></td><td>&quot;How should we build this?&quot;</td></tr><tr><td><code>architecture-modernization</code></td><td>&quot;How do we get off the legacy system safely?&quot;</td></tr><tr><td><code>threat-modeling</code></td><td>&quot;What could go wrong with this feature?&quot;</td></tr><tr><td><code>architecture-verification</code></td><td>&quot;Check this report before I send it&quot;</td></tr></tbody></table></div>
79
+ <h2 id="limits-to-remember">Limits to remember<a class="anchor" href="#limits-to-remember" aria-label="Link to this section">#</a></h2>
80
+ <p>5 000 files · 512 KiB per file · 120 MiB total · 15 s traversal · lines over 2 000 characters skipped · symlinks never followed · writes only inside the project.</p>
81
+ <h2 id="suppress-a-finding">Suppress a finding<a class="anchor" href="#suppress-a-finding" aria-label="Link to this section">#</a></h2>
82
+ <p><code>.archsutra/suppress.json</code>:</p>
83
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-json">{ &quot;suppress&quot;: [ { &quot;rule&quot;: &quot;AS-SEC-006&quot;, &quot;path&quot;: &quot;src/dev.ts&quot;, &quot;reason&quot;: &quot;Dev only&quot;, &quot;expires&quot;: &quot;2027-03-31&quot; } ] }</code></pre></div>
84
+ <p>A row needs a <code>reason</code>; expired rows are ignored.</p></article><nav class="pn" aria-label="Previous and next page"><a class="prev" href="mcp-server.html"><small>Previous</small><span>Use ArchSutra as an MCP server</span></a><a class="next" href="evidence-at-a-glance.html"><small>Next</small><span>Evidence at a glance</span></a></nav><p class="edit"><a href="https://github.com/shahvatsalofficial/archsutra-ai/edit/main/docs/guides/cheat-sheet.md" rel="noopener">Edit this page on GitHub</a></p></main>
85
+ <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-five-commands-you-will-use-most">The five commands you will use most</a></li><li class="l2"><a href="#all-commands">All commands</a></li><li class="l2"><a href="#flags">Flags</a></li><li class="l2"><a href="#new-in-020">New in 0.2.0</a></li><li class="l2"><a href="#exit-codes">Exit codes</a></li><li class="l2"><a href="#files-you-get-from---output">Files you get from --output</a></li><li class="l2"><a href="#claim-labels">Claim labels</a></li><li class="l2"><a href="#ratings">Ratings</a></li><li class="l2"><a href="#severity-guide">Severity guide</a></li><li class="l2"><a href="#where-skills-land-per-ide">Where skills land per IDE</a></li><li class="l2"><a href="#the-five-skills">The five skills</a></li><li class="l2"><a href="#limits-to-remember">Limits to remember</a></li><li class="l2"><a href="#suppress-a-finding">Suppress a finding</a></li></ul></nav></aside>
86
+ </div>
87
+ <footer class="footer">
88
+ <div class="footer-inner">
89
+ <div class="footer-grid">
90
+ <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>
91
+ <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>
92
+ <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>
93
+ <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>
94
+ </div>
95
+ <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>
96
+ </div>
97
+ </footer>
98
+ <script src="../assets/site.js" type="module"></script>
99
+ </body>
100
+ </html>
@@ -0,0 +1,146 @@
1
+ # Cheat sheet
2
+
3
+ <!-- summary: One page: every command, flag, exit code, output file, label and install path. -->
4
+
5
+ Print it, pin it, or keep this tab open.
6
+
7
+ ## The five commands you will use most
8
+
9
+ ```bash
10
+ npx archsutra-ai audit . # findings + scorecard, printed
11
+ npx archsutra-ai audit . --output arch-report # full report set: HTML + Markdown + JSON + SARIF
12
+ npx archsutra-ai audit . --fail-on high # CI gate (exit 1 on high or critical)
13
+ npx archsutra-ai drift . --baseline baseline/findings.json --fail-on high # only NEW findings fail
14
+ npx archsutra-ai install --host claude --target . # add skills and agents to your IDE
15
+ ```
16
+
17
+ ## All commands
18
+
19
+ | Command | What it does | Writes files? |
20
+ |---|---|---|
21
+ | `audit [path]` | Evidence-linked findings and scorecard | with `--output` |
22
+ | `map [path]` | Modules, imports, cycles, diagrams | with `--output` |
23
+ | `review [path]` | Audit evidence as a review starter | with `--output` |
24
+ | `design [path]` | Design starter from the module map; decisions stay `unknown` | with `--output` |
25
+ | `threat-model [path]` | STRIDE starter from security findings; the rest stays `unknown` | with `--output` |
26
+ | `modernize [path]` | One slice per finding; target architecture stays `unknown` | with `--output` |
27
+ | `cost [path]` | States that cost is not assessed | with `--output` |
28
+ | `drift` / `compare` | Diff two `findings.json` files, or a project against `--baseline` | no |
29
+ | `verify [path]` | Check skills, agents, links, diagrams, `findings.json` | no |
30
+ | `export [path]` | Write every report as Markdown and HTML | yes |
31
+ | `html <file.md>` | Render a Markdown report to a self-contained HTML page | yes (next to the file) |
32
+ | `install` / `uninstall` | Add or remove skills and agents (`--host`, `--target`) | yes |
33
+ | `doctor [path]` | Check Node, hosts, install drift | no |
34
+ | `hosts` | List adapters and support levels | no |
35
+ | `mcp` | MCP server on stdio (tools: audit, map, drift) | no |
36
+
37
+ None of them calls a model or the network.
38
+
39
+ ## Flags
40
+
41
+ | Flag | Meaning |
42
+ |---|---|
43
+ | `--json` | Machine-readable output |
44
+ | `--format <md\|html>` | Stdout format for `audit` and `map` |
45
+ | `--output <dir>` | Write files into a folder **inside** the project |
46
+ | `--baseline <file>` | `findings.json` to diff against (`drift`, `compare`) |
47
+ | `--fail-on <sev>` | Exit 1 at or above `critical`, `high`, `medium` or `low` |
48
+ | `--host <id>` | `claude`, `cursor`, `codex`, `copilot`, `gemini` |
49
+ | `--target <dir>` | Project to install into |
50
+ | `--dry-run` | Show changes, write nothing |
51
+ | `--force` | Overwrite modified files (backups kept) |
52
+ | `--verbose` | Extra detail |
53
+
54
+ ## New in 0.2.0
55
+
56
+ | Command or flag | Use |
57
+ |---|---|
58
+ | `baseline create` / `baseline update` | Record today's findings |
59
+ | `audit --fail-on-new` | Fail only on new locations |
60
+ | `suppressions` | List and spot expired entries |
61
+ | `--strict` | Fail on an empty or partial scan |
62
+ | `--history` | Find secrets in git history |
63
+ | `--include`, `--exclude`, `--respect-gitignore` | Choose what is scanned |
64
+ | `--no-score` | Hide the scorecard |
65
+ | `mcp --root .` | [Use as an MCP server](mcp-server.md) |
66
+
67
+ ## Exit codes
68
+
69
+ | Code | Meaning |
70
+ |---|---|
71
+ | 0 | Success, or nothing at or above `--fail-on` |
72
+ | 1 | Finding at or above `--fail-on` (for `drift`: added), or install conflict, or failed `doctor` |
73
+ | 2 | Usage error |
74
+ | 4 | `verify` failed |
75
+ | 5 | Internal error |
76
+ | 6 | Incomplete scan with `--strict` |
77
+
78
+ ## Files you get from `--output`
79
+
80
+ | File | For | Open it with |
81
+ |---|---|---|
82
+ | `index.html` | Start here | a browser |
83
+ | `audit-report.html` / `.md` | The findings | browser / pull request |
84
+ | `current-state.html` / `.md` | Stack, maps, diagrams, cycles | browser / pull request |
85
+ | `findings.json` | Scripts and `drift` baselines | your tooling |
86
+ | `findings.sarif` | GitHub code scanning | upload action |
87
+ | `architecture-register.json` | SHA-256 of every file | integrity checks |
88
+
89
+ ## Claim labels
90
+
91
+ | Label | Meaning |
92
+ |---|---|
93
+ | `observed` | Seen in a file; cites `path:line` |
94
+ | `inferred` | Derived from observed facts; says from what |
95
+ | `proposed` | A recommendation, not a fact |
96
+ | `unknown` | Cannot be decided from the evidence; says what would settle it |
97
+
98
+ ## Ratings
99
+
100
+ `no findings` (none from the rules we have; not proof of safety) · `adequate` (medium, or 3+ low) · `weak` (high) · `critical` · `not assessed` (needs evidence a static scan cannot see).
101
+
102
+ ## Severity guide
103
+
104
+ | Severity | Rough meaning |
105
+ |---|---|
106
+ | critical | Exploitable now with major impact (exposed secret, private key) |
107
+ | high | Serious weakness with a plausible exploit or outage |
108
+ | medium | Meaningful risk or debt |
109
+ | low | Hygiene |
110
+ | info | Observation |
111
+
112
+ ## Where skills land per IDE
113
+
114
+ | Host | Skills | Agents |
115
+ |---|---|---|
116
+ | Claude Code | `.claude/skills/` | `.claude/agents/` |
117
+ | Cursor | `.cursor/skills/` | `.cursor/agents/` |
118
+ | OpenAI Codex | `.agents/skills/` | none (managed block in `AGENTS.md`) |
119
+ | GitHub Copilot | `.github/skills/` | `.github/agents/*.agent.md` |
120
+ | Gemini CLI | `.gemini/skills/` | none |
121
+
122
+ Install **one** host per project: several hosts also read `.agents/skills` and `.claude/skills`.
123
+
124
+ ## The five skills
125
+
126
+ | Skill | Ask it when |
127
+ |---|---|
128
+ | `architecture-audit` | "Review this codebase" |
129
+ | `architecture-design` | "How should we build this?" |
130
+ | `architecture-modernization` | "How do we get off the legacy system safely?" |
131
+ | `threat-modeling` | "What could go wrong with this feature?" |
132
+ | `architecture-verification` | "Check this report before I send it" |
133
+
134
+ ## Limits to remember
135
+
136
+ 5 000 files · 512 KiB per file · 120 MiB total · 15 s traversal · lines over 2 000 characters skipped · symlinks never followed · writes only inside the project.
137
+
138
+ ## Suppress a finding
139
+
140
+ `.archsutra/suppress.json`:
141
+
142
+ ```json
143
+ { "suppress": [ { "rule": "AS-SEC-006", "path": "src/dev.ts", "reason": "Dev only", "expires": "2027-03-31" } ] }
144
+ ```
145
+
146
+ A row needs a `reason`; expired rows are ignored.
@@ -0,0 +1,170 @@
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>CI recipes | ArchSutra AI</title>
7
+ <meta name="description" content="Copy-paste setups for GitHub Actions, GitLab CI, pre-commit and generic pipelines: a simple gate, a baseline for legacy code, SARIF upload, and report artifacts.">
8
+ <link rel="canonical" href="https://shahvatsalofficial.github.io/archsutra-ai/guides/ci-recipes.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="CI recipes | ArchSutra AI">
13
+ <meta property="og:description" content="Copy-paste setups for GitHub Actions, GitLab CI, pre-commit and generic pipelines: a simple gate, a baseline for legacy code, SARIF upload, and report artifacts.">
14
+ <meta property="og:url" content="https://shahvatsalofficial.github.io/archsutra-ai/guides/ci-recipes.html">
15
+ <meta property="og:site_name" content="ArchSutra AI">
16
+ <meta name="twitter:card" content="summary">
17
+ <meta name="twitter:title" content="CI recipes | ArchSutra AI">
18
+ <meta name="twitter:description" content="Copy-paste setups for GitHub Actions, GitLab CI, pre-commit and generic pipelines: a simple gate, a baseline for legacy code, SARIF upload, and report artifacts.">
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":"CI recipes","description":"Copy-paste setups for GitHub Actions, GitLab CI, pre-commit and generic pipelines: a simple gate, a baseline for legacy code, SARIF upload, and report artifacts.","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" aria-current="page">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">Reading and triaging a report</a></li><li><a href="../guides/ci-recipes.html" aria-current="page">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="ci-recipes">CI recipes</h1>
49
+ <p class="lede">Copy-paste setups for GitHub Actions, GitLab CI, pre-commit and generic pipelines: a simple gate, a baseline for legacy code, SARIF upload, and report artifacts.</p><p class="meta">Version 0.2.0 &middot; Source: <a href="https://github.com/shahvatsalofficial/archsutra-ai/blob/main/docs/guides/ci-recipes.md" rel="noopener">docs/guides/ci-recipes.md</a></p>
50
+ <p>ArchSutra's CLI is offline and deterministic, so it fits any pipeline: it needs only Node.js 20 or newer, no secrets and no network access to your code.</p>
51
+ <h2 id="choose-a-strategy">Choose a strategy<a class="anchor" href="#choose-a-strategy" aria-label="Link to this section">#</a></h2>
52
+ <figure class="diagram"><pre class="mermaid">flowchart TD
53
+ s([&quot;Adding ArchSutra to CI&quot;]) --&gt; q{&quot;Does the repository&lt;br/&gt;already have high findings?&quot;}
54
+ q -- No --&gt; g[&quot;Strategy A: simple gate&lt;br/&gt;audit --fail-on high&quot;]
55
+ q -- Yes --&gt; b[&quot;Strategy B: baseline&lt;br/&gt;drift --baseline findings.json --fail-on high&quot;]
56
+ g --&gt; r[&quot;Later: tighten to&lt;br/&gt;--fail-on medium&quot;]
57
+ b --&gt; f[&quot;Fix the backlog over time,&lt;br/&gt;refresh the baseline in the same PR&quot;]</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
58
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 1: Choose a strategy"><table><thead><tr><th scope="col">Strategy</th><th scope="col">Fails when</th><th scope="col">Best for</th></tr></thead><tbody><tr><td>A. Simple gate</td><td>the repository has any finding at or above the level</td><td>new or clean projects</td></tr><tr><td>B. Baseline</td><td>a pull request <strong>adds</strong> a finding at or above the level</td><td>legacy codebases you are improving</td></tr></tbody></table></div>
59
+ <h2 id="make-your-gate-fail-safely">Make your gate fail safely<a class="anchor" href="#make-your-gate-fail-safely" aria-label="Link to this section">#</a></h2>
60
+ <blockquote>Needs <code>0.2.0</code> or newer.</blockquote>
61
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-bash">archsutra audit . --fail-on high --strict # exit 6 if nothing, or only part, was scanned
62
+ archsutra baseline create # once; commit .archsutra/baseline.json
63
+ archsutra audit . --fail-on-new --fail-on high # then fail only on new locations</code></pre></div>
64
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 2: Make your gate fail safely"><table><thead><tr><th scope="col">What went wrong</th><th scope="col">Exit</th></tr></thead><tbody><tr><td>Findings at or above the level, or new ones</td><td>1</td></tr><tr><td>Wrong path, mistyped option, missing baseline</td><td>2</td></tr><tr><td>Zero files scanned or a limit was hit (<code>--strict</code>)</td><td>6</td></tr></tbody></table></div>
65
+ <p>With <code>--json</code> the output carries <code>exitReason</code>: <code>ok</code>, <code>findings</code>, <code>new-findings</code> or <code>incomplete</code>.</p>
66
+ <h2 id="github-actions-simple-gate">GitHub Actions: simple gate<a class="anchor" href="#github-actions-simple-gate" aria-label="Link to this section">#</a></h2>
67
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-yaml">name: architecture
68
+ on: [pull_request]
69
+ permissions:
70
+ contents: read
71
+ jobs:
72
+ audit:
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - uses: actions/setup-node@v4
77
+ with: { node-version: 22 }
78
+ - run: npx --yes archsutra-ai@0.2.0 audit . --fail-on high</code></pre></div>
79
+ <blockquote class="callout callout-tip"><strong>Tip.</strong> Pin the version (<code>@0.1.5</code>) so a new release cannot change your build overnight, and pin the actions to commit SHAs in production pipelines.</blockquote>
80
+ <h2 id="github-actions-baseline-report-artifact-and-code-scanning-upload">GitHub Actions: baseline, report artifact and code-scanning upload<a class="anchor" href="#github-actions-baseline-report-artifact-and-code-scanning-upload" aria-label="Link to this section">#</a></h2>
81
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-yaml">name: architecture
82
+ on: [pull_request]
83
+ permissions:
84
+ contents: read
85
+ security-events: write
86
+ jobs:
87
+ audit:
88
+ runs-on: ubuntu-latest
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+ - uses: actions/setup-node@v4
92
+ with: { node-version: 22 }
93
+
94
+ # Strategy B: fail only on NEW high or critical findings
95
+ - run: npx --yes archsutra-ai@0.2.0 drift . --baseline baseline/findings.json --fail-on high
96
+
97
+ # Always produce the readable report, even when the gate fails
98
+ - if: always()
99
+ run: npx --yes archsutra-ai@0.2.0 audit . --output arch-report
100
+ - if: always()
101
+ uses: actions/upload-artifact@v4
102
+ with: { name: architecture-report, path: arch-report }
103
+
104
+ # Show findings in the GitHub Security tab
105
+ - if: always()
106
+ uses: github/codeql-action/upload-sarif@v4
107
+ with: { sarif_file: arch-report/findings.sarif }</code></pre></div>
108
+ <p>The reviewer downloads <code>architecture-report</code>, opens <code>index.html</code>, and sees the same readable report you saw locally.</p>
109
+ <figure class="diagram"><pre class="mermaid">sequenceDiagram
110
+ participant Dev
111
+ participant GH as GitHub
112
+ participant Job as architecture job
113
+ Dev-&gt;&gt;GH: Push to a pull request
114
+ GH-&gt;&gt;Job: Run workflow
115
+ Job-&gt;&gt;Job: drift against baseline/findings.json
116
+ Job-&gt;&gt;Job: audit --output arch-report
117
+ Job-&gt;&gt;GH: Upload report artifact and SARIF
118
+ alt New high or critical finding
119
+ Job--&gt;&gt;GH: Check fails with the added findings
120
+ else Clean
121
+ Job--&gt;&gt;GH: Check passes
122
+ end</pre><figcaption>Diagram (Mermaid). If it does not render, the source is shown above.</figcaption></figure>
123
+ <h2 id="refresh-the-baseline-the-ratchet">Refresh the baseline (the ratchet)<a class="anchor" href="#refresh-the-baseline-the-ratchet" aria-label="Link to this section">#</a></h2>
124
+ <p>When a pull request fixes findings, record the better state in the same pull request so the bar only moves up:</p>
125
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-bash">npx archsutra-ai audit . --json &gt; baseline/findings.json
126
+ git add baseline/findings.json</code></pre></div>
127
+ <p><code>drift</code> also tells you what a change <em>removed</em>, which is a nice line for a pull-request description.</p>
128
+ <h2 id="gitlab-ci">GitLab CI<a class="anchor" href="#gitlab-ci" aria-label="Link to this section">#</a></h2>
129
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-yaml">architecture:
130
+ image: node:22
131
+ stage: test
132
+ script:
133
+ - npx --yes archsutra-ai@0.2.0 drift . --baseline baseline/findings.json --fail-on high
134
+ - npx --yes archsutra-ai@0.2.0 audit . --output arch-report
135
+ artifacts:
136
+ when: always
137
+ paths: [arch-report/]</code></pre></div>
138
+ <h2 id="pre-commit-hook-local-fast">Pre-commit hook (local, fast)<a class="anchor" href="#pre-commit-hook-local-fast" aria-label="Link to this section">#</a></h2>
139
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-bash">#!/usr/bin/env sh
140
+ # .git/hooks/pre-commit (chmod +x)
141
+ npx --yes archsutra-ai@0.2.0 audit . --fail-on critical &gt;/dev/null || {
142
+ echo &quot;ArchSutra: critical finding. Run: npx archsutra-ai audit .&quot; &gt;&amp;2
143
+ exit 1
144
+ }</code></pre></div>
145
+ <p>Use <code>critical</code> locally so the hook stays quiet unless a secret or committed private key slipped in; run the stricter gate in CI.</p>
146
+ <h2 id="any-other-ci-jenkins-azure-pipelines-circleci">Any other CI (Jenkins, Azure Pipelines, CircleCI)<a class="anchor" href="#any-other-ci-jenkins-azure-pipelines-circleci" aria-label="Link to this section">#</a></h2>
147
+ <p>The contract is three lines: have Node 20 or newer, run the command, treat a non-zero exit as failure.</p>
148
+ <div class="code"><button class="copy" type="button" aria-label="Copy code">Copy</button><pre tabindex="0"><code class="language-bash">node --version
149
+ npx --yes archsutra-ai@0.2.0 audit . --fail-on high</code></pre></div>
150
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Table 3: Any other CI (Jenkins, Azure Pipelines, CircleCI)"><table><thead><tr><th scope="col">Exit code</th><th scope="col">Meaning</th></tr></thead><tbody><tr><td><code>0</code></td><td>Success, or no finding at or above <code>--fail-on</code></td></tr><tr><td><code>1</code></td><td>A finding at or above <code>--fail-on</code> (for <code>drift</code>: an <strong>added</strong> one) or an install conflict</td></tr><tr><td><code>2</code></td><td>Usage error (unknown command, bad flag value)</td></tr><tr><td><code>4</code></td><td><code>verify</code> found a problem</td></tr><tr><td><code>5</code></td><td>Internal error</td></tr></tbody></table></div>
151
+ <h2 id="keep-ci-fast-and-safe">Keep CI fast and safe<a class="anchor" href="#keep-ci-fast-and-safe" aria-label="Link to this section">#</a></h2>
152
+ <ul><li><strong>Time.</strong> Typical repositories take well under 10 seconds; the scan is capped at 5 000 files, so a monorepo should be audited per package.</li><li><strong>Secrets.</strong> The CLI needs none and sends nothing anywhere.</li><li><strong>Forks.</strong> Because nothing is sent out, it is safe on pull requests from forks.</li><li><strong>Pin.</strong> Pin the package version and the actions.</li></ul>
153
+ <h2 id="next">Next<a class="anchor" href="#next" aria-label="Link to this section">#</a></h2>
154
+ <ul><li>Understand what failed: <a href="reading-a-report.html">Reading and triaging a report</a></li><li>See it in a story: <a href="real-world-scenarios.html#2-stop-regressions-at-the-door">scenario 2</a></li></ul></article><nav class="pn" aria-label="Previous and next page"><a class="prev" href="reading-a-report.html"><small>Previous</small><span>Reading and triaging a report</span></a><a class="next" href="mcp-server.html"><small>Next</small><span>Use ArchSutra as an MCP server</span></a></nav><p class="edit"><a href="https://github.com/shahvatsalofficial/archsutra-ai/edit/main/docs/guides/ci-recipes.md" rel="noopener">Edit this page on GitHub</a></p></main>
155
+ <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="#choose-a-strategy">Choose a strategy</a></li><li class="l2"><a href="#make-your-gate-fail-safely">Make your gate fail safely</a></li><li class="l2"><a href="#github-actions-simple-gate">GitHub Actions: simple gate</a></li><li class="l2"><a href="#github-actions-baseline-report-artifact-and-code-scanning-upload">GitHub Actions: baseline, report artifact and code-scanning upload</a></li><li class="l2"><a href="#refresh-the-baseline-the-ratchet">Refresh the baseline (the ratchet)</a></li><li class="l2"><a href="#gitlab-ci">GitLab CI</a></li><li class="l2"><a href="#pre-commit-hook-local-fast">Pre-commit hook (local, fast)</a></li><li class="l2"><a href="#any-other-ci-jenkins-azure-pipelines-circleci">Any other CI (Jenkins, Azure Pipelines, CircleCI)</a></li><li class="l2"><a href="#keep-ci-fast-and-safe">Keep CI fast and safe</a></li><li class="l2"><a href="#next">Next</a></li></ul></nav></aside>
156
+ </div>
157
+ <footer class="footer">
158
+ <div class="footer-inner">
159
+ <div class="footer-grid">
160
+ <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>
161
+ <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>
162
+ <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>
163
+ <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>
164
+ </div>
165
+ <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>
166
+ </div>
167
+ </footer>
168
+ <script src="../assets/site.js" type="module"></script>
169
+ </body>
170
+ </html>