pramanasutra 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +18 -3
- package/docs/00-start-here.html +160 -151
- package/docs/01-executive-summary.html +151 -148
- package/docs/02-functional-specification.html +152 -150
- package/docs/03-architecture.html +151 -147
- package/docs/04-technical-reference.html +149 -147
- package/docs/05-user-guide.html +153 -147
- package/docs/06-cli-and-reports.html +150 -147
- package/docs/07-rule-catalog.html +152 -149
- package/docs/08-skills-and-agents.html +150 -147
- package/docs/09-security-and-privacy.html +149 -147
- package/docs/10-legal-and-compliance.html +150 -148
- package/docs/11-testing-and-proof.html +151 -148
- package/docs/12-ci-and-release.html +151 -148
- package/docs/13-roadmap-and-status.html +155 -153
- package/docs/14-faq-and-glossary.html +149 -147
- package/docs/15-maintainer-guide.html +150 -148
- package/docs/16-real-world-scenarios.html +293 -0
- package/docs/audit/report.html +3 -3
- package/docs/audit/report.json +2 -2
- package/docs/audit/report.md +3 -3
- package/docs/audit/report.sarif.json +1 -1
- package/docs/diagrams/ci-pipeline.svg +21 -0
- package/docs/diagrams/components.svg +19 -0
- package/docs/diagrams/evidence-binding.svg +12 -0
- package/docs/diagrams/evidence-states.svg +39 -0
- package/docs/diagrams/gate-flow.svg +23 -0
- package/docs/diagrams/overview.svg +25 -0
- package/docs/diagrams/proof-graphs.svg +32 -0
- package/docs/diagrams/quickstart.svg +25 -0
- package/docs/diagrams/report-files.svg +22 -0
- package/docs/diagrams/rules-overview.svg +35 -0
- package/docs/diagrams/scenario-ai-claim.svg +14 -0
- package/docs/diagrams/scenario-focused-test.svg +28 -0
- package/docs/diagrams/scenario-picker.svg +22 -0
- package/docs/diagrams/skills-team.svg +15 -0
- package/docs/diagrams/trust-boundaries.svg +22 -0
- package/docs/index.html +157 -149
- package/docs/proof/test-results.txt +44 -44
- package/docs/samples/clean-project/report.html +2 -2
- package/docs/samples/clean-project/report.json +1 -1
- package/docs/samples/clean-project/report.md +2 -2
- package/docs/samples/clean-project/report.sarif.json +1 -1
- package/docs/samples/focused-test/report.html +2 -2
- package/docs/samples/focused-test/report.json +1 -1
- package/docs/samples/focused-test/report.md +2 -2
- package/docs/samples/focused-test/report.sarif.json +1 -1
- package/docs/samples/missing-ci/report.html +2 -2
- package/docs/samples/missing-ci/report.json +1 -1
- package/docs/samples/missing-ci/report.md +2 -2
- package/docs/samples/missing-ci/report.sarif.json +1 -1
- package/docs/samples/missing-tests/report.html +2 -2
- package/docs/samples/missing-tests/report.json +1 -1
- package/docs/samples/missing-tests/report.md +2 -2
- package/docs/samples/missing-tests/report.sarif.json +1 -1
- package/docs/samples/multi-language/report.html +2 -2
- package/docs/samples/multi-language/report.json +1 -1
- package/docs/samples/multi-language/report.md +2 -2
- package/docs/samples/multi-language/report.sarif.json +1 -1
- package/docs/samples/unsafe-names/report.html +2 -2
- package/docs/samples/unsafe-names/report.json +1 -1
- package/docs/samples/unsafe-names/report.md +2 -2
- package/docs/samples/unsafe-names/report.sarif.json +1 -1
- package/docs/sitemap.xml +1 -0
- package/documents/pramanasutra/00-start-here.md +18 -2
- package/documents/pramanasutra/01-executive-summary.md +4 -1
- package/documents/pramanasutra/02-functional-specification.md +2 -2
- package/documents/pramanasutra/03-architecture.md +6 -0
- package/documents/pramanasutra/05-user-guide.md +11 -0
- package/documents/pramanasutra/06-cli-and-reports.md +3 -0
- package/documents/pramanasutra/07-rule-catalog.md +3 -1
- package/documents/pramanasutra/08-skills-and-agents.md +3 -0
- package/documents/pramanasutra/10-legal-and-compliance.md +1 -1
- package/documents/pramanasutra/11-testing-and-proof.md +4 -1
- package/documents/pramanasutra/12-ci-and-release.md +4 -1
- package/documents/pramanasutra/13-roadmap-and-status.md +4 -4
- package/documents/pramanasutra/16-real-world-scenarios.md +252 -0
- package/documents/pramanasutra/README.md +11 -11
- package/documents/pramanasutra/audit/report.html +3 -3
- package/documents/pramanasutra/audit/report.json +2 -2
- package/documents/pramanasutra/audit/report.md +3 -3
- package/documents/pramanasutra/audit/report.sarif.json +1 -1
- package/documents/pramanasutra/diagrams/ci-pipeline.svg +21 -0
- package/documents/pramanasutra/diagrams/components.svg +19 -0
- package/documents/pramanasutra/diagrams/evidence-binding.svg +12 -0
- package/documents/pramanasutra/diagrams/evidence-states.svg +39 -0
- package/documents/pramanasutra/diagrams/gate-flow.svg +23 -0
- package/documents/pramanasutra/diagrams/overview.svg +25 -0
- package/documents/pramanasutra/diagrams/proof-graphs.svg +32 -0
- package/documents/pramanasutra/diagrams/quickstart.svg +25 -0
- package/documents/pramanasutra/diagrams/report-files.svg +22 -0
- package/documents/pramanasutra/diagrams/rules-overview.svg +35 -0
- package/documents/pramanasutra/diagrams/scenario-ai-claim.svg +14 -0
- package/documents/pramanasutra/diagrams/scenario-focused-test.svg +28 -0
- package/documents/pramanasutra/diagrams/scenario-picker.svg +22 -0
- package/documents/pramanasutra/diagrams/skills-team.svg +15 -0
- package/documents/pramanasutra/diagrams/trust-boundaries.svg +22 -0
- package/documents/pramanasutra/html/00-start-here.html +160 -151
- package/documents/pramanasutra/html/01-executive-summary.html +151 -148
- package/documents/pramanasutra/html/02-functional-specification.html +152 -150
- package/documents/pramanasutra/html/03-architecture.html +151 -147
- package/documents/pramanasutra/html/04-technical-reference.html +149 -147
- package/documents/pramanasutra/html/05-user-guide.html +153 -147
- package/documents/pramanasutra/html/06-cli-and-reports.html +150 -147
- package/documents/pramanasutra/html/07-rule-catalog.html +152 -149
- package/documents/pramanasutra/html/08-skills-and-agents.html +150 -147
- package/documents/pramanasutra/html/09-security-and-privacy.html +149 -147
- package/documents/pramanasutra/html/10-legal-and-compliance.html +150 -148
- package/documents/pramanasutra/html/11-testing-and-proof.html +151 -148
- package/documents/pramanasutra/html/12-ci-and-release.html +151 -148
- package/documents/pramanasutra/html/13-roadmap-and-status.html +155 -153
- package/documents/pramanasutra/html/14-faq-and-glossary.html +149 -147
- package/documents/pramanasutra/html/15-maintainer-guide.html +150 -148
- package/documents/pramanasutra/html/16-real-world-scenarios.html +293 -0
- package/documents/pramanasutra/html/audit/report.html +3 -3
- package/documents/pramanasutra/html/audit/report.json +2 -2
- package/documents/pramanasutra/html/audit/report.md +3 -3
- package/documents/pramanasutra/html/audit/report.sarif.json +1 -1
- package/documents/pramanasutra/html/diagrams/ci-pipeline.svg +21 -0
- package/documents/pramanasutra/html/diagrams/components.svg +19 -0
- package/documents/pramanasutra/html/diagrams/evidence-binding.svg +12 -0
- package/documents/pramanasutra/html/diagrams/evidence-states.svg +39 -0
- package/documents/pramanasutra/html/diagrams/gate-flow.svg +23 -0
- package/documents/pramanasutra/html/diagrams/overview.svg +25 -0
- package/documents/pramanasutra/html/diagrams/proof-graphs.svg +32 -0
- package/documents/pramanasutra/html/diagrams/quickstart.svg +25 -0
- package/documents/pramanasutra/html/diagrams/report-files.svg +22 -0
- package/documents/pramanasutra/html/diagrams/rules-overview.svg +35 -0
- package/documents/pramanasutra/html/diagrams/scenario-ai-claim.svg +14 -0
- package/documents/pramanasutra/html/diagrams/scenario-focused-test.svg +28 -0
- package/documents/pramanasutra/html/diagrams/scenario-picker.svg +22 -0
- package/documents/pramanasutra/html/diagrams/skills-team.svg +15 -0
- package/documents/pramanasutra/html/diagrams/trust-boundaries.svg +22 -0
- package/documents/pramanasutra/html/index.html +157 -149
- package/documents/pramanasutra/html/proof/test-results.txt +44 -44
- package/documents/pramanasutra/html/samples/clean-project/report.html +2 -2
- package/documents/pramanasutra/html/samples/clean-project/report.json +1 -1
- package/documents/pramanasutra/html/samples/clean-project/report.md +2 -2
- package/documents/pramanasutra/html/samples/clean-project/report.sarif.json +1 -1
- package/documents/pramanasutra/html/samples/focused-test/report.html +2 -2
- package/documents/pramanasutra/html/samples/focused-test/report.json +1 -1
- package/documents/pramanasutra/html/samples/focused-test/report.md +2 -2
- package/documents/pramanasutra/html/samples/focused-test/report.sarif.json +1 -1
- package/documents/pramanasutra/html/samples/missing-ci/report.html +2 -2
- package/documents/pramanasutra/html/samples/missing-ci/report.json +1 -1
- package/documents/pramanasutra/html/samples/missing-ci/report.md +2 -2
- package/documents/pramanasutra/html/samples/missing-ci/report.sarif.json +1 -1
- package/documents/pramanasutra/html/samples/missing-tests/report.html +2 -2
- package/documents/pramanasutra/html/samples/missing-tests/report.json +1 -1
- package/documents/pramanasutra/html/samples/missing-tests/report.md +2 -2
- package/documents/pramanasutra/html/samples/missing-tests/report.sarif.json +1 -1
- package/documents/pramanasutra/html/samples/multi-language/report.html +2 -2
- package/documents/pramanasutra/html/samples/multi-language/report.json +1 -1
- package/documents/pramanasutra/html/samples/multi-language/report.md +2 -2
- package/documents/pramanasutra/html/samples/multi-language/report.sarif.json +1 -1
- package/documents/pramanasutra/html/samples/unsafe-names/report.html +2 -2
- package/documents/pramanasutra/html/samples/unsafe-names/report.json +1 -1
- package/documents/pramanasutra/html/samples/unsafe-names/report.md +2 -2
- package/documents/pramanasutra/html/samples/unsafe-names/report.sarif.json +1 -1
- package/documents/pramanasutra/html/sitemap.xml +1 -0
- package/documents/pramanasutra/proof/test-results.txt +44 -44
- package/documents/pramanasutra/samples/clean-project/report.html +2 -2
- package/documents/pramanasutra/samples/clean-project/report.json +1 -1
- package/documents/pramanasutra/samples/clean-project/report.md +2 -2
- package/documents/pramanasutra/samples/clean-project/report.sarif.json +1 -1
- package/documents/pramanasutra/samples/focused-test/report.html +2 -2
- package/documents/pramanasutra/samples/focused-test/report.json +1 -1
- package/documents/pramanasutra/samples/focused-test/report.md +2 -2
- package/documents/pramanasutra/samples/focused-test/report.sarif.json +1 -1
- package/documents/pramanasutra/samples/missing-ci/report.html +2 -2
- package/documents/pramanasutra/samples/missing-ci/report.json +1 -1
- package/documents/pramanasutra/samples/missing-ci/report.md +2 -2
- package/documents/pramanasutra/samples/missing-ci/report.sarif.json +1 -1
- package/documents/pramanasutra/samples/missing-tests/report.html +2 -2
- package/documents/pramanasutra/samples/missing-tests/report.json +1 -1
- package/documents/pramanasutra/samples/missing-tests/report.md +2 -2
- package/documents/pramanasutra/samples/missing-tests/report.sarif.json +1 -1
- package/documents/pramanasutra/samples/multi-language/report.html +2 -2
- package/documents/pramanasutra/samples/multi-language/report.json +1 -1
- package/documents/pramanasutra/samples/multi-language/report.md +2 -2
- package/documents/pramanasutra/samples/multi-language/report.sarif.json +1 -1
- package/documents/pramanasutra/samples/unsafe-names/report.html +2 -2
- package/documents/pramanasutra/samples/unsafe-names/report.json +1 -1
- package/documents/pramanasutra/samples/unsafe-names/report.md +2 -2
- package/documents/pramanasutra/samples/unsafe-names/report.sarif.json +1 -1
- package/examples/sample-output/clean-project/report.html +2 -2
- package/examples/sample-output/clean-project/report.json +1 -1
- package/examples/sample-output/clean-project/report.md +2 -2
- package/examples/sample-output/clean-project/report.sarif.json +1 -1
- package/examples/sample-output/focused-test/report.html +2 -2
- package/examples/sample-output/focused-test/report.json +1 -1
- package/examples/sample-output/focused-test/report.md +2 -2
- package/examples/sample-output/focused-test/report.sarif.json +1 -1
- package/examples/sample-output/missing-ci/report.html +2 -2
- package/examples/sample-output/missing-ci/report.json +1 -1
- package/examples/sample-output/missing-ci/report.md +2 -2
- package/examples/sample-output/missing-ci/report.sarif.json +1 -1
- package/examples/sample-output/missing-tests/report.html +2 -2
- package/examples/sample-output/missing-tests/report.json +1 -1
- package/examples/sample-output/missing-tests/report.md +2 -2
- package/examples/sample-output/missing-tests/report.sarif.json +1 -1
- package/examples/sample-output/multi-language/report.html +2 -2
- package/examples/sample-output/multi-language/report.json +1 -1
- package/examples/sample-output/multi-language/report.md +2 -2
- package/examples/sample-output/multi-language/report.sarif.json +1 -1
- package/examples/sample-output/unsafe-names/report.html +2 -2
- package/examples/sample-output/unsafe-names/report.json +1 -1
- package/examples/sample-output/unsafe-names/report.md +2 -2
- package/examples/sample-output/unsafe-names/report.sarif.json +1 -1
- package/llms.txt +2 -1
- package/package.json +5 -2
- package/packages/cli/lib/report.mjs +2 -2
|
@@ -13,77 +13,79 @@
|
|
|
13
13
|
<meta property="og:url" content="https://shahvatsalofficial.github.io/pramanasutra-ai/04-technical-reference.html">
|
|
14
14
|
<link rel="canonical" href="https://shahvatsalofficial.github.io/pramanasutra-ai/04-technical-reference.html">
|
|
15
15
|
<meta name="color-scheme" content="light dark">
|
|
16
|
-
<script type="application/ld+json">[{"@context":"https://schema.org","@type":"TechArticle","headline":"Technical reference","description":"Modules, report schema, evidence schema, policy keys, scan limits and exit codes for the PramanaSutra AI CLI.","author":{"@type":"Person","name":"Vatsal Shah","url":"https://
|
|
17
|
-
<style>:root{--bg:#f3f0e8;--surface:#fffdf8;--surface2:#efeae0;--fg:#1c1915;--muted:#5e584e;--line:#ddd4c4;--brand:#0f3d3e;--brand-fg:#f4fffe;--accent:#0b5f63;--ok:#166534;--warn:#92400e;--bad:#991b1b;--code-bg:#1b2423;--code-fg:#f3efe6;--shadow:0 1px 2px rgba(20,16,8,.05),0 12px 32px rgba(20,16,8,.06);--radius:.8rem;--font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;--mono:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}
|
|
18
|
-
:root[data-theme=dark]{--bg:#121614;--surface:#1b211e;--surface2:#26302c;--fg:#f6f3ec;--muted:#c9c0b0;--line:#3a463f;--brand:#9ed9d2;--brand-fg:#10201f;--accent:#b7ebe4;--ok:#86efac;--warn:#fbbf24;--bad:#fca5a5;--code-bg:#0e1412;--code-fg:#f3efe6;--shadow:none}
|
|
19
|
-
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#121614;--surface:#1b211e;--surface2:#26302c;--fg:#f6f3ec;--muted:#c9c0b0;--line:#3a463f;--brand:#9ed9d2;--brand-fg:#10201f;--accent:#b7ebe4;--ok:#86efac;--warn:#fbbf24;--bad:#fca5a5;--code-bg:#0e1412;--code-fg:#f3efe6;--shadow:none}}
|
|
20
|
-
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:5rem;-webkit-text-size-adjust:100%}
|
|
21
|
-
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
|
|
22
|
-
body{margin:0;background:var(--bg);color:var(--fg);font:1.05rem/1.7 var(--font);text-rendering:optimizeLegibility}
|
|
23
|
-
a{color:var(--accent);text-underline-offset:.16em}a:hover{text-decoration-thickness:2px}
|
|
24
|
-
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:3px}
|
|
25
|
-
.skip{position:absolute;left:-999px;top:.5rem;background:var(--brand);color:var(--brand-fg);padding:.55rem 1rem;border-radius:.45rem;z-index:100}.skip:focus{left:.5rem}
|
|
26
|
-
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
27
|
-
.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:.75rem;padding:.65rem 1rem;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
|
|
28
|
-
.brand{display:flex;align-items:center;gap:.65rem;font-weight:750;color:var(--fg);text-decoration:none;white-space:nowrap;letter-spacing:-.02em}.brand small{font-weight:550;color:var(--muted);margin-left:.25rem}
|
|
29
|
-
.logo{display:grid;place-items:center;width:2.1rem;height:2.1rem;border-radius:.6rem;background:var(--brand);color:var(--brand-fg);font-size:.78rem;font-weight:800}
|
|
30
|
-
.menu-btn,.theme-btn,.gh{border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:.55rem;padding:.45rem .75rem;font:inherit;cursor:pointer;text-decoration:none;min-height:2.75rem;min-width:2.75rem}
|
|
31
|
-
.menu-btn{display:none}.gh{font-size:.92rem;display:inline-flex;align-items:center}
|
|
32
|
-
.search{position:relative;flex:1;max-width:28rem;margin-left:auto}.search input{width:100%;min-height:2.75rem;padding:.45rem .85rem;border:1px solid var(--line);border-radius:.55rem;background:var(--surface);color:var(--fg);font:inherit}
|
|
33
|
-
#results{position:absolute;top:110%;left:0;right:0;list-style:none;margin:0;padding:.35rem;background:var(--surface);border:1px solid var(--line);border-radius:.7rem;box-shadow:var(--shadow);max-height:60vh;overflow:auto}
|
|
34
|
-
#results li a{display:block;padding:.55rem .7rem;border-radius:.45rem;text-decoration:none;color:var(--fg)}#results li a:hover,#results li a[aria-selected=true]{background:var(--surface2)}#results small{display:block;color:var(--muted)}
|
|
35
|
-
.layout{display:grid;grid-template-columns:17.5rem minmax(0,1fr) 15rem;gap:2rem;max-width:92rem;margin:0 auto;padding:0 1.1rem}
|
|
36
|
-
.sidebar{position:sticky;top:4.4rem;align-self:start;max-height:calc(100vh - 5.2rem);overflow:auto;padding:1.2rem 0}
|
|
37
|
-
.sidebar ol{list-style:none;margin:0;padding:0}.sidebar a{display:block;padding:.42rem .75rem;border-radius:.5rem;color:var(--muted);text-decoration:none;font-size:.95rem}
|
|
38
|
-
.sidebar a:hover{background:var(--surface2);color:var(--fg)}.sidebar a[aria-current=page]{background:var(--surface2);color:var(--brand);font-weight:700;box-shadow:inset 3px 0 0 var(--brand)}
|
|
39
|
-
.home{max-width:62rem}
|
|
40
|
-
.lead{font-size:1.15rem;max-width:46rem}
|
|
41
|
-
.actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0 1.4rem}
|
|
42
|
-
.actions a{display:inline-flex;align-items:center;min-height:2.75rem;padding:.45rem .95rem;border-radius:.55rem;text-decoration:none;font-weight:650}
|
|
43
|
-
.actions .primary{background:var(--brand);color:var(--brand-fg)}
|
|
44
|
-
.actions .secondary{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
|
|
45
|
-
.stat-grid,.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem;margin:1rem 0 1.5rem}
|
|
46
|
-
.stat,.mini{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:.9rem 1rem;box-shadow:var(--shadow)}
|
|
47
|
-
.stat b{display:block;font-size:1.35rem;letter-spacing:-.03em;line-height:1.2}
|
|
48
|
-
.stat span{color:var(--muted);font-size:.92rem}
|
|
49
|
-
.mini h2{font-size:1.05rem;margin:0 0 .35rem;padding:0;border:0}
|
|
50
|
-
.mini p{margin:.35rem 0;color:var(--muted);font-size:.95rem}
|
|
51
|
-
.mini a{font-weight:650}
|
|
52
|
-
.content{padding:2rem 0 4rem;min-width:0;max-width:
|
|
53
|
-
h1{font-size:clamp(2rem,4vw,2.7rem);line-height:1.12;margin:.2rem 0 1rem;letter-spacing:-.03em}
|
|
54
|
-
h2{font-size:1.45rem;margin:2.5rem 0 .8rem;padding-bottom:.35rem;border-bottom:1px solid var(--line);letter-spacing:-.02em}h3{font-size:1.12rem;margin:1.7rem 0 .45rem}
|
|
55
|
-
.anchor{margin-left:.35rem;color:var(--muted);text-decoration:none;opacity:0;font-weight:500}h2:hover .anchor,h3:hover .anchor,.anchor:focus{opacity:1}
|
|
56
|
-
p,li{max-width:68ch}ul,ol{padding-left:1.35rem}li{margin:.28rem 0}
|
|
57
|
-
code{font-family:var(--mono);font-size:.88em;background:var(--surface2);padding:.08em .35em;border-radius:.3rem;overflow-wrap:anywhere}
|
|
58
|
-
pre.code{position:relative;background:var(--code-bg);color:var(--code-fg);padding:1rem 1.1rem 2rem;border-radius:var(--radius);overflow:auto;line-height:1.55;border:1px solid var(--line)}pre.code code{background:none;padding:0;font-size:.86rem;color:inherit;overflow-wrap:normal;white-space:pre}
|
|
59
|
-
pre.code[data-lang]:not([data-lang=""])::before{content:attr(data-lang);position:absolute;top:.4rem;right:.75rem;font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:#b7aea0}
|
|
60
|
-
.copy{position:absolute;bottom:.45rem;right:.45rem;font-size:.75rem;background:#31403c;color:#f3efe6;border:0;border-radius:.35rem;padding:.3rem .6rem;cursor:pointer;min-height:2rem}
|
|
61
|
-
.table-wrap{overflow-x:auto;margin:1rem 0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
|
|
62
|
-
table{border-collapse:collapse;width:100%;font-size:.94rem}th,td{padding:.62rem .8rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}thead th{background:var(--surface2);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}tbody th{font-weight:650}tbody tr:last-child>*{border-bottom:0}
|
|
63
|
-
blockquote{margin:1.2rem 0;padding:.85rem 1.1rem;border-left:4px solid var(--line);background:var(--surface);border-radius:0 var(--radius) var(--radius) 0;color:var(--muted)}
|
|
64
|
-
.callout-note{border-color:var(--accent)}.callout-important,.callout-warning{border-color:var(--warn);background:color-mix(in srgb,var(--warn) 8%,var(--surface))}.callout-tip{border-color:var(--ok)}
|
|
65
|
-
hr{border:0;border-top:1px solid var(--line);margin:2rem 0}
|
|
66
|
-
.toc{position:sticky;top:4.4rem;align-self:start;max-height:calc(100vh - 5.2rem);overflow:auto;padding:1.4rem 0;font-size:.86rem}.toc h2{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);border:0;margin:0 0 .5rem;padding:0}
|
|
67
|
-
.toc ul{list-style:none;margin:0;padding:0}.toc a{display:block;padding:.22rem .6rem;color:var(--muted);text-decoration:none;border-left:2px solid var(--line)}.toc .l3 a{padding-left:1.2rem}.toc a:hover,.toc a.on{color:var(--brand);border-left-color:var(--brand)}
|
|
68
|
-
.pager{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:3rem}.pager a{display:block;padding:1rem 1.05rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--fg);text-decoration:none;font-weight:680;min-height:4.5rem}.pager a:hover{border-color:var(--brand)}.pager span{display:block;font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:600}.pager .next{text-align:right}
|
|
69
|
-
.foot{margin-top:2.4rem;padding-top:1rem;border-top:1px solid var(--line);color:var(--muted);font-size:.86rem}
|
|
70
|
-
figure{margin:1.3rem 0}figure svg{width:100%;height:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}figcaption{color:var(--muted);font-size:.85rem;margin-top:.4rem}
|
|
71
|
-
@media (max-width:1100px){.layout{grid-template-columns:15.5rem minmax(0,1fr)}.toc{display:none}}
|
|
72
|
-
@media (max-width:760px){.layout{grid-template-columns:1fr;gap:0}.menu-btn{display:inline-flex;align-items:center;justify-content:center}.sidebar{position:fixed;inset:4rem 0 0 0;z-index:40;background:var(--bg);padding:1rem;transform:translateX(-100%);max-height:none}.sidebar.open{transform:none}.brand small{display:none}.pager{grid-template-columns:1fr}}
|
|
73
|
-
@media print{.topbar,.sidebar,.toc,.pager,.skip,.copy,.search{display:none!important}.layout{display:block}body{background:#fff;color:#000}a{color:#000;text-decoration:none}pre.code{background:#f4f4f4;color:#000;border:1px solid #bbb}}
|
|
16
|
+
<script type="application/ld+json">[{"@context":"https://schema.org","@type":"TechArticle","headline":"Technical reference","description":"Modules, report schema, evidence schema, policy keys, scan limits and exit codes for the PramanaSutra AI CLI.","author":{"@type":"Person","name":"Vatsal Shah","url":"https://shahvatsal.com"},"inLanguage":"en","isPartOf":{"@type":"SoftwareSourceCode","name":"PramanaSutra AI","codeRepository":"https://github.com/shahvatsalofficial/pramanasutra-ai","license":"https://www.apache.org/licenses/LICENSE-2.0","version":"0.3.6"}}]</script>
|
|
17
|
+
<style>:root{--bg:#f3f0e8;--surface:#fffdf8;--surface2:#efeae0;--fg:#1c1915;--muted:#5e584e;--line:#ddd4c4;--brand:#0f3d3e;--brand-fg:#f4fffe;--accent:#0b5f63;--ok:#166534;--warn:#92400e;--bad:#991b1b;--code-bg:#1b2423;--code-fg:#f3efe6;--shadow:0 1px 2px rgba(20,16,8,.05),0 12px 32px rgba(20,16,8,.06);--radius:.8rem;--font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;--mono:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}
|
|
18
|
+
:root[data-theme=dark]{--bg:#121614;--surface:#1b211e;--surface2:#26302c;--fg:#f6f3ec;--muted:#c9c0b0;--line:#3a463f;--brand:#9ed9d2;--brand-fg:#10201f;--accent:#b7ebe4;--ok:#86efac;--warn:#fbbf24;--bad:#fca5a5;--code-bg:#0e1412;--code-fg:#f3efe6;--shadow:none}
|
|
19
|
+
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#121614;--surface:#1b211e;--surface2:#26302c;--fg:#f6f3ec;--muted:#c9c0b0;--line:#3a463f;--brand:#9ed9d2;--brand-fg:#10201f;--accent:#b7ebe4;--ok:#86efac;--warn:#fbbf24;--bad:#fca5a5;--code-bg:#0e1412;--code-fg:#f3efe6;--shadow:none}}
|
|
20
|
+
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:5rem;-webkit-text-size-adjust:100%}
|
|
21
|
+
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
|
|
22
|
+
body{margin:0;background:var(--bg);color:var(--fg);font:1.05rem/1.7 var(--font);text-rendering:optimizeLegibility}
|
|
23
|
+
a{color:var(--accent);text-underline-offset:.16em}a:hover{text-decoration-thickness:2px}
|
|
24
|
+
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:3px}
|
|
25
|
+
.skip{position:absolute;left:-999px;top:.5rem;background:var(--brand);color:var(--brand-fg);padding:.55rem 1rem;border-radius:.45rem;z-index:100}.skip:focus{left:.5rem}
|
|
26
|
+
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
27
|
+
.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:.75rem;padding:.65rem 1rem;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
|
|
28
|
+
.brand{display:flex;align-items:center;gap:.65rem;font-weight:750;color:var(--fg);text-decoration:none;white-space:nowrap;letter-spacing:-.02em}.brand small{font-weight:550;color:var(--muted);margin-left:.25rem}
|
|
29
|
+
.logo{display:grid;place-items:center;width:2.1rem;height:2.1rem;border-radius:.6rem;background:var(--brand);color:var(--brand-fg);font-size:.78rem;font-weight:800}
|
|
30
|
+
.menu-btn,.theme-btn,.gh{border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:.55rem;padding:.45rem .75rem;font:inherit;cursor:pointer;text-decoration:none;min-height:2.75rem;min-width:2.75rem}
|
|
31
|
+
.menu-btn{display:none}.gh{font-size:.92rem;display:inline-flex;align-items:center}
|
|
32
|
+
.search{position:relative;flex:1;max-width:28rem;margin-left:auto}.search input{width:100%;min-height:2.75rem;padding:.45rem .85rem;border:1px solid var(--line);border-radius:.55rem;background:var(--surface);color:var(--fg);font:inherit}
|
|
33
|
+
#results{position:absolute;top:110%;left:0;right:0;list-style:none;margin:0;padding:.35rem;background:var(--surface);border:1px solid var(--line);border-radius:.7rem;box-shadow:var(--shadow);max-height:60vh;overflow:auto}
|
|
34
|
+
#results li a{display:block;padding:.55rem .7rem;border-radius:.45rem;text-decoration:none;color:var(--fg)}#results li a:hover,#results li a[aria-selected=true]{background:var(--surface2)}#results small{display:block;color:var(--muted)}
|
|
35
|
+
.layout{display:grid;grid-template-columns:17.5rem minmax(0,1fr) 15rem;gap:2rem;max-width:92rem;margin:0 auto;padding:0 1.1rem}
|
|
36
|
+
.sidebar{position:sticky;top:4.4rem;align-self:start;max-height:calc(100vh - 5.2rem);overflow:auto;padding:1.2rem 0}
|
|
37
|
+
.sidebar ol{list-style:none;margin:0;padding:0}.sidebar a{display:block;padding:.42rem .75rem;border-radius:.5rem;color:var(--muted);text-decoration:none;font-size:.95rem}
|
|
38
|
+
.sidebar a:hover{background:var(--surface2);color:var(--fg)}.sidebar a[aria-current=page]{background:var(--surface2);color:var(--brand);font-weight:700;box-shadow:inset 3px 0 0 var(--brand)}
|
|
39
|
+
.home{max-width:62rem}
|
|
40
|
+
.lead{font-size:1.15rem;max-width:46rem}
|
|
41
|
+
.actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0 1.4rem}
|
|
42
|
+
.actions a{display:inline-flex;align-items:center;min-height:2.75rem;padding:.45rem .95rem;border-radius:.55rem;text-decoration:none;font-weight:650}
|
|
43
|
+
.actions .primary{background:var(--brand);color:var(--brand-fg)}
|
|
44
|
+
.actions .secondary{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
|
|
45
|
+
.stat-grid,.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem;margin:1rem 0 1.5rem}
|
|
46
|
+
.stat,.mini{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:.9rem 1rem;box-shadow:var(--shadow)}
|
|
47
|
+
.stat b{display:block;font-size:1.35rem;letter-spacing:-.03em;line-height:1.2}
|
|
48
|
+
.stat span{color:var(--muted);font-size:.92rem}
|
|
49
|
+
.mini h2{font-size:1.05rem;margin:0 0 .35rem;padding:0;border:0}
|
|
50
|
+
.mini p{margin:.35rem 0;color:var(--muted);font-size:.95rem}
|
|
51
|
+
.mini a{font-weight:650}
|
|
52
|
+
.content{padding:2rem 0 4rem;min-width:0;max-width:56rem}.content:focus{outline:none}
|
|
53
|
+
h1{font-size:clamp(2rem,4vw,2.7rem);line-height:1.12;margin:.2rem 0 1rem;letter-spacing:-.03em}
|
|
54
|
+
h2{font-size:1.45rem;margin:2.5rem 0 .8rem;padding-bottom:.35rem;border-bottom:1px solid var(--line);letter-spacing:-.02em}h3{font-size:1.12rem;margin:1.7rem 0 .45rem}
|
|
55
|
+
.anchor{margin-left:.35rem;color:var(--muted);text-decoration:none;opacity:0;font-weight:500}h2:hover .anchor,h3:hover .anchor,.anchor:focus{opacity:1}
|
|
56
|
+
p,li{max-width:68ch}ul,ol{padding-left:1.35rem}li{margin:.28rem 0}
|
|
57
|
+
code{font-family:var(--mono);font-size:.88em;background:var(--surface2);padding:.08em .35em;border-radius:.3rem;overflow-wrap:anywhere}
|
|
58
|
+
pre.code{position:relative;background:var(--code-bg);color:var(--code-fg);padding:1rem 1.1rem 2rem;border-radius:var(--radius);overflow:auto;line-height:1.55;border:1px solid var(--line)}pre.code code{background:none;padding:0;font-size:.86rem;color:inherit;overflow-wrap:normal;white-space:pre}
|
|
59
|
+
pre.code[data-lang]:not([data-lang=""])::before{content:attr(data-lang);position:absolute;top:.4rem;right:.75rem;font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:#b7aea0}
|
|
60
|
+
.copy{position:absolute;bottom:.45rem;right:.45rem;font-size:.75rem;background:#31403c;color:#f3efe6;border:0;border-radius:.35rem;padding:.3rem .6rem;cursor:pointer;min-height:2rem}
|
|
61
|
+
.table-wrap{overflow-x:auto;margin:1rem 0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
|
|
62
|
+
table{border-collapse:collapse;width:100%;font-size:.94rem}th,td{padding:.62rem .8rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}thead th{background:var(--surface2);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}tbody th{font-weight:650}tbody tr:last-child>*{border-bottom:0}
|
|
63
|
+
blockquote{margin:1.2rem 0;padding:.85rem 1.1rem;border-left:4px solid var(--line);background:var(--surface);border-radius:0 var(--radius) var(--radius) 0;color:var(--muted)}
|
|
64
|
+
.callout-note{border-color:var(--accent)}.callout-important,.callout-warning{border-color:var(--warn);background:color-mix(in srgb,var(--warn) 8%,var(--surface))}.callout-tip{border-color:var(--ok)}
|
|
65
|
+
hr{border:0;border-top:1px solid var(--line);margin:2rem 0}
|
|
66
|
+
.toc{position:sticky;top:4.4rem;align-self:start;max-height:calc(100vh - 5.2rem);overflow:auto;padding:1.4rem 0;font-size:.86rem}.toc h2{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);border:0;margin:0 0 .5rem;padding:0}
|
|
67
|
+
.toc ul{list-style:none;margin:0;padding:0}.toc a{display:block;padding:.22rem .6rem;color:var(--muted);text-decoration:none;border-left:2px solid var(--line)}.toc .l3 a{padding-left:1.2rem}.toc a:hover,.toc a.on{color:var(--brand);border-left-color:var(--brand)}
|
|
68
|
+
.pager{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:3rem}.pager a{display:block;padding:1rem 1.05rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--fg);text-decoration:none;font-weight:680;min-height:4.5rem}.pager a:hover{border-color:var(--brand)}.pager span{display:block;font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:600}.pager .next{text-align:right}
|
|
69
|
+
.foot{margin-top:2.4rem;padding-top:1rem;border-top:1px solid var(--line);color:var(--muted);font-size:.86rem}
|
|
70
|
+
figure{margin:1.3rem 0}.fig img{width:100%;height:auto;display:block;border-radius:var(--radius);border:1px solid var(--line);box-shadow:var(--shadow);background:#fffdf8}.fig figcaption{text-align:center}.figlink{display:block}figure svg{width:100%;height:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}figcaption{color:var(--muted);font-size:.85rem;margin-top:.4rem}
|
|
71
|
+
@media (max-width:1100px){.layout{grid-template-columns:15.5rem minmax(0,1fr)}.toc{display:none}}
|
|
72
|
+
@media (max-width:760px){.layout{grid-template-columns:1fr;gap:0}.menu-btn{display:inline-flex;align-items:center;justify-content:center}.sidebar{position:fixed;inset:4rem 0 0 0;z-index:40;background:var(--bg);padding:1rem;transform:translateX(-100%);max-height:none}.sidebar.open{transform:none}.brand small{display:none}.pager{grid-template-columns:1fr}}
|
|
73
|
+
@media print{.topbar,.sidebar,.toc,.pager,.skip,.copy,.search{display:none!important}.layout{display:block}body{background:#fff;color:#000}a{color:#000;text-decoration:none}pre.code{background:#f4f4f4;color:#000;border:1px solid #bbb}}
|
|
74
|
+
|
|
75
|
+
.hero-fig{margin:1.2rem 0 1.6rem}
|
|
74
76
|
</style>
|
|
75
77
|
</head>
|
|
76
78
|
<body>
|
|
77
79
|
<a class="skip" href="#content">Skip to content</a>
|
|
78
80
|
<header class="topbar">
|
|
79
81
|
<button class="menu-btn" type="button" aria-controls="sidebar" aria-expanded="false" aria-label="Open navigation">Menu</button>
|
|
80
|
-
<a class="brand" href="index.html"><span class="logo" aria-hidden="true">PS</span><span>PramanaSutra AI <small>v0.3.
|
|
82
|
+
<a class="brand" href="index.html"><span class="logo" aria-hidden="true">PS</span><span>PramanaSutra AI <small>v0.3.6</small></span></a>
|
|
81
83
|
<div class="search"><label class="sr" for="q">Search documentation</label><input id="q" type="search" placeholder="Search docs (press /)" autocomplete="off" aria-controls="results"><ul id="results" role="listbox" hidden></ul></div>
|
|
82
84
|
<button class="theme-btn" type="button" aria-label="Toggle colour theme">Theme</button>
|
|
83
85
|
<a class="gh" href="https://github.com/shahvatsalofficial/pramanasutra-ai" rel="noopener">GitHub</a>
|
|
84
86
|
</header>
|
|
85
87
|
<div class="layout">
|
|
86
|
-
<aside id="sidebar" class="sidebar"><nav aria-label="Documentation"><ol><li><a href="index.html">Home</a></li><li><a href="00-start-here.html">Start here</a></li><li><a href="01-executive-summary.html">Executive summary</a></li><li><a href="02-functional-specification.html">Functional specification</a></li><li><a href="03-architecture.html">Architecture</a></li><li><a href="04-technical-reference.html" aria-current="page">Technical reference</a></li><li><a href="05-user-guide.html">User guide</a></li><li><a href="06-cli-and-reports.html">CLI and reports</a></li><li><a href="07-rule-catalog.html">Rule catalog</a></li><li><a href="08-skills-and-agents.html">Skills and agents</a></li><li><a href="09-security-and-privacy.html">Security and privacy</a></li><li><a href="10-legal-and-compliance.html">Legal and compliance</a></li><li><a href="11-testing-and-proof.html">Testing and proof</a></li><li><a href="12-ci-and-release.html">CI and release</a></li><li><a href="13-roadmap-and-status.html">Roadmap and status</a></li><li><a href="14-faq-and-glossary.html">FAQ and glossary</a></li><li><a href="15-maintainer-guide.html">Maintainer guide</a></li></ol></nav></aside>
|
|
88
|
+
<aside id="sidebar" class="sidebar"><nav aria-label="Documentation"><ol><li><a href="index.html">Home</a></li><li><a href="00-start-here.html">Start here</a></li><li><a href="01-executive-summary.html">Executive summary</a></li><li><a href="02-functional-specification.html">Functional specification</a></li><li><a href="03-architecture.html">Architecture</a></li><li><a href="04-technical-reference.html" aria-current="page">Technical reference</a></li><li><a href="05-user-guide.html">User guide</a></li><li><a href="06-cli-and-reports.html">CLI and reports</a></li><li><a href="07-rule-catalog.html">Rule catalog</a></li><li><a href="08-skills-and-agents.html">Skills and agents</a></li><li><a href="09-security-and-privacy.html">Security and privacy</a></li><li><a href="10-legal-and-compliance.html">Legal and compliance</a></li><li><a href="11-testing-and-proof.html">Testing and proof</a></li><li><a href="12-ci-and-release.html">CI and release</a></li><li><a href="13-roadmap-and-status.html">Roadmap and status</a></li><li><a href="14-faq-and-glossary.html">FAQ and glossary</a></li><li><a href="15-maintainer-guide.html">Maintainer guide</a></li><li><a href="16-real-world-scenarios.html">Real-world scenarios</a></li></ol></nav></aside>
|
|
87
89
|
<main id="content" class="content" tabindex="-1"><article>
|
|
88
90
|
<h1 id="technical-reference">Technical reference</h1>
|
|
89
91
|
<p>Source of the running tool: <code>packages/cli/</code>. Node.js ES modules. No <code>npm install</code> is required to run it, because there are no dependencies. Dev-time checks are <code>node --test</code>.</p>
|
|
@@ -122,96 +124,96 @@ figure{margin:1.3rem 0}figure svg{width:100%;height:auto;background:var(--surfac
|
|
|
122
124
|
<a class="prev" href="03-architecture.html"><span>Previous</span>Architecture</a>
|
|
123
125
|
<a class="next" href="05-user-guide.html"><span>Next</span>User guide</a>
|
|
124
126
|
</nav>
|
|
125
|
-
<footer class="foot">PramanaSutra AI 0.3.
|
|
127
|
+
<footer class="foot">PramanaSutra AI 0.3.6 · Created by <a href="https://shahvatsal.com" rel="noopener">Vatsal Shah</a> · <a href="https://shahvatsal.com" rel="noopener">shahvatsal.com</a> · Apache-2.0 · Decision support, not a certification · <a href="https://github.com/shahvatsalofficial/pramanasutra-ai/blob/main/documents/pramanasutra/04-technical-reference.md" rel="noopener">Page source</a></footer>
|
|
126
128
|
</main>
|
|
127
129
|
<nav class="toc" aria-label="On this page"><h2>On this page</h2><ul><li class="l2"><a href="#modules">Modules</a></li><li class="l2"><a href="#exit-codes">Exit codes</a></li><li class="l2"><a href="#report-object-schema-1-0-0">Report object (schema 1.0.0)</a></li><li class="l2"><a href="#evidence-file">Evidence file</a></li><li class="l2"><a href="#policy-keys">Policy keys</a></li><li class="l2"><a href="#scan-limits">Scan limits</a></li><li class="l2"><a href="#test-detection">Test detection</a></li><li class="l2"><a href="#ignore-file">Ignore file</a></li><li class="l2"><a href="#installer-map">Installer map</a></li><li class="l2"><a href="#commands-the-shell-accepts">Commands the shell accepts</a></li></ul></nav>
|
|
128
130
|
</div>
|
|
129
|
-
<script>window.__DOCS_INDEX__=[{"t":"PramanaSutra AI","u":"index.html","x":"Offline QA and release check. Four report files. Evidence binding none unbound ci-environment. Five static rules. Skills are instructions. scan and release-check share exit codes. macOS CI is not scheduled."},{"t":"Start here","u":"00-start-here.html","x":" Start here PramanaSutra AI (from Sanskrit pramana , \"valid proof\") is an open-source QA and release-readiness agent . It has two parts that do different jobs: 1. Seventeen Agent Skills , led by PramanaSutra Prime, for Claude Code, Cursor, OpenAI Codex, GitHub Copilot and Gemini CLI. The skill uses the IDE's own model. There is no extra API key. 2. A deterministic command-line tool that reads a project, does not run its tests, and writes four files of the same audit: report.md , report.html , report.json and report.sarif.json . scan and release-check both return NO_GO (exit 2), REVIEW_REQUIRED (exit 3) or READY_FOR_HUMAN_APPROVAL (exit 0). Created by Vatsal Shah. Licensed Apache-2.0. Version 0.3.4. npm package: pramanasutra . The command line has zero runtime dependencies and makes no network calls . The copy on npmjs.com is the last tarball someone published. It can lag this version until that publish finishes. Important: The tool does not certify quality, security or compliance. READY_FOR_HUMAN_APPROVAL means the configured checks passed. A person still decides. It is never a deploy order. Who should read what If you are Read --- --- Deciding whether to adopt it [Executive summary](01-executive-summary.md), then [Legal](10-legal-and-compliance.md) Writing requirements or a QA process [Functional specification](02-functional-specification.md) Reviewing the design [Architecture](03-architecture.md), then [Technical reference](04-technical-reference.md) Going to run it today [User guide](05-user-guide.md) Wiring it to CI [CI and release](12-ci-and-release.md) and [CLI and reports](06-cli-and-reports.md) Asking what a finding means [Rule catalog](07-rule-catalog.md) Asking what the skills do [Skills and agents](08-skills-and-agents.md) A security reviewer [Security and privacy](09-security-and-privacy.md) Asking \"can I trust the numbers?\" [Testing and proof](11-testing-and-proof.md) and the [audit of this repo](audit/report.md) Maintaining the project [Maintainer guide](15-maintainer-guide.md) Looking up a word [FAQ and glossary](14-faq-and-glossary.md) Sixty seconds Node.js 20 or newer. bash npx pramanasutra release-check --path . That writes ./pramanasutra-reports/report.md , report.html , report.json and report.sarif.json in the current directory, not inside the project you scanned. Open the HTML file in a browser. For both scan and release-check , the exit code is 2 for NO_GO , 3 for REVIEW_REQUIRED , 0 for READY_FOR_HUMAN_APPROVAL . A scan with no evidence file exits 3 . To copy the skills into an IDE: bash npx pramanasutra init --ide cursor --target . Use claude , cursor , codex , gemini , copilot , generic or all . The copy refuses to overwrite an existing skill unless you pass --force . What is already proven The captured run on the maintainer's Windows machine is in [proof/test-results.txt](proof/test-results.txt): 43 tests, 43 passed, 0 failed, 0 skipped . The symlink test creates a directory junction when Windows refuses a symlink, and checks the scanner does not follow it. Six labeled fixtures match the expected rules and gate with no false positives and no false negatives on those fixtures . That is a regression check written by the same author as the rules. It is not a measure of accuracy on arbitrary repositories. With that same test output supplied as evidence, a release check of this repository returned READY_FOR_HUMAN_APPROVAL . The report is [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). Focused-test examples under fixtures/ and examples/sample-app/ are excluded by .pramanasutraignore so they are not treated as product failures. The report says they were excluded. What is not proven - Live behavior inside each AI IDE. The installer copies files. Nobody has published a smoke test that a host loaded the skill and followed it. - Accuracy on large real repositories. The rules are line heuristics, not parsers. - An independent security review. - Trademark clearance of the name PramanaSutra. See [Legal](10-legal-and-compliance.md). The documentation set Document Question it answers --- --- --- 00 Start here What is this, and where do I go? 01 Executive summary Should we use it, and what must we not claim? 02 Functional specification What must it do, for whom, and what is out of scope? 03 Architecture How do the pieces connect, and which boundaries matter? 04 Technical reference Modules, schemas, limits, exit codes 05 User guide Install, run, read, fix, repeat 06 CLI and reports Every flag, and how to read report.md and report.html 07 Rule catalog Every static rule, with an example and its limit 08 Skills and agents The 17 skills and the safety contract 09 Security and privacy Threats, controls, what is left over 10 Legal and compliance License, names, disclaimers. Not a legal opinion 11 Testing and proof Real output, fixtures, how to reproduce 12 CI and release GitHub Actions, why macOS is not scheduled, exit codes in a pipeline 13 Roadmap and status Implemented, p"},{"t":"Executive summary","u":"01-executive-summary.html","x":" Executive summary The problem Teams ask an AI assistant whether a change is safe to release. The assistant often answers from the look of the code. It has not run the tests. A focused test ( test.only , fit , fdescribe ) can make a suite look green while almost nothing ran. A dashboard can be green because the failing job was not required. People then treat the story as evidence. PramanaSutra AI is a counter to that habit. It separates three things that get mixed together: - what a static reading of the repository observed - what a test command actually returned , and only when someone supplies that result - what a human still has to approve The product Piece What a buyer gets What they do not get --- --- --- Agent Skills (17) Instructions a supported IDE can load, so the assistant plans QA, cites files, and asks before running tests A private model, a hosted agent, or a guarantee the IDE obeyed the skill CLI An offline scan and a release gate. Four files of the same audit: Markdown, HTML, JSON, SARIF. scan and release-check both exit 2, 3, or 0 Test execution, coverage, a browser, a vulnerability scan, a signed evidence file, or a deploy Reports A page a reviewer can read without the CLI A certificate, an audit attestation, or legal advice Policy A fail-closed JSON file. Unknown keys are rejected. \"Allow automatic deploy\" cannot be turned on A workflow engine or an approval product Price of the software: zero. License: Apache-2.0. Operator cost: Node.js 20+ and the IDE subscription the team already pays, if they use the skills. The CLI needs neither. The decision, in one table Gate Exit code Plain meaning Typical next step --- --- --- --- NO_GO 2 A blocking static finding (by default a focused test) or supplied evidence that failed Fix, re-run the tests, re-check REVIEW_REQUIRED 3 Evidence missing, not trusted, or the scan is incomplete; or no tests, CI or license when the policy requires them A person looks, or the missing input is supplied READY_FOR_HUMAN_APPROVAL 0 Policy checks passed, including passing evidence from local-executed or ci-ingested A named person approves. The tool will not deploy external-unverified evidence can never produce the ready state. Zero passed tests cannot. A clean static scan without an evidence file cannot. That is deliberate. What leadership can say Supported by the artifacts in [Testing and proof](11-testing-and-proof.md): - The unit suite on the captured Windows run: 43 tests, 43 passed, 0 failed, 0 skipped. The symlink case uses a directory junction when Windows refuses a symlink. - Ubuntu and Windows CI are required checks on Node 20 and 22. The job runs the tests and then the release gate with that output as evidence. - macOS is not in CI. Actions run 41884015367 cancelled both macOS jobs while they were queued, with zero steps. Run 42098256304 cancelled a macos-14 job in about a second, with no runner. Neither run executed tests. Ubuntu and Windows are the required checks. - Six author-written fixtures produce exactly the expected rules. State the caveat in the same sentence: perfect precision here is a regression lock, not field accuracy. - The CLI's own release check of this repository, given that test evidence, was READY_FOR_HUMAN_APPROVAL . Read [audit/report.md](audit/report.md). What leadership must not say - \"It proved the product is bug-free.\" It did not run the product's tests unless an evidence file says a command ran, and even then it trusts the file's counts. - \"It passed a penetration test.\" It is not a security scanner. The secure skill coordinates gaps . It does not attack. - \"It is WCAG certified\" or \"SOC 2 certified\" or \"ISO certified.\" No such claim exists. - \"Every IDE was verified.\" The install paths are implemented. Live host behavior is not. - \"The name is trademark-cleared.\" It is not. See [Legal](10-legal-and-compliance.md). - \"Tested on macOS in CI.\" Those jobs never started. Adoption shape A sensible first use is read-only: run release-check in CI, publish report.md on the pull request, and block the merge only on exit code 2 ( NO_GO ). Treat exit code 3 as a comment, not a red build, until the team supplies evidence on purpose. Do not give the tool permission to deploy. The policy loader rejects a flag that would authorize unattended deployment, and the gate object always sets automatedDeploymentAuthorized to false. Cost of being wrong A false positive (a line that looks like test.only but is not) delays a release until a person looks. A false negative (a focused test written in a form the heuristic misses, or a test file it does not recognise) can let a weak suite through if someone also supplies passing evidence. The report lists what was not run: browser, security scan, performance, model calls. Reviewers who only read the gate word, and skip the limitations, will over-trust it. The HTML report puts the decision and the \"tests were not executed by this tool\" sentence on the first screen for that reason. "},{"t":"Functional specification","u":"02-functional-specification.html","x":" Functional specification This specification describes version 0.3.4 as implemented. A requirement marked planned is not available. Tests that mention a requirement are named so a reader can find them in tests/cli.test.mjs . Actors Actor Goal What they can do --- --- --- Developer Know if a change is even a candidate for release Run the CLI locally. Read report.md or report.html AI assistant inside an IDE Plan QA without inventing results Follow a skill. The skill forbids claiming a test ran without a tool result CI job Fail the build on a blocking finding, and record evidence Run tests, pass the counts as --evidence , fail on exit 2 Reviewer Understand a gate without installing Node Open the HTML report or the Markdown report Maintainer Keep the rules honest Add a fixture and a test before changing a rule. See the [maintainer guide](15-maintainer-guide.md) Release approver Decide Read the gate. The tool will not approve for them Use cases UC-1 Static audit The developer points the CLI at a directory. The tool walks the tree, skips symlinks, skips ignored paths, and reports focused tests, skipped tests, missing tests, missing CI and a missing license. It writes report.md , report.html , report.json and report.sarif.json together. It does not execute the project. scan and release-check use the same exit codes. UC-2 Release check with evidence The developer, or CI, has already run the test command. They write a JSON evidence file (or the CI helper writes it from the real output) and pass --evidence . The gate combines the static findings and that file. Passing evidence from local-executed or ci-ingested , plus a clean required static picture, yields READY_FOR_HUMAN_APPROVAL and exit 0. The report shows the counts from the file and states that PramanaSutra did not run the command. UC-3 Install skills The developer runs init --ide \u003chost --target \u003cexisting directory . The tool copies the canonical skills from .agents/skills into the host's directory. If a skill directory already exists, the copy stops unless --force is set. The target must be a real directory, not a file and not a symlink. A symlink anywhere on the destination path is refused. UC-4 Policy A team commits policies/strict.json or their own file. --policy loads it. Unknown keys, wrong types, and any attempt to set allowAutomatedDeployment to true or manualApprovalsRequired to false are errors. Exit code 1. The default policy is recommended when --policy is omitted. UC-5 Exclude examples A repository that contains labeled bad examples (this one does) lists them in .pramanasutraignore . The report's limitations say how many paths were excluded. Excluded content is not inspected. The author of the ignore file is responsible for not hiding the tests that matter. Functional requirements ID Statement Status Acceptance --- --- --- --- FR-1 doctor reports Node, platform, offline, and that no model is called Implemented Test doctor succeeds without a provider key FR-2 version and --version print the version from package.json Implemented Test version and --version print the package version FR-3 agents list lists 17 skills whose folder name matches frontmatter Implemented Test agents catalog includes Prime and 16 specialists FR-4 scan and release-check require --path to a real directory Implemented Missing path exits 1, no stack trace FR-5 Default output is ./pramanasutra-reports in the current working directory, not inside the scanned project Implemented Test scan writes md, html and json reports by default FR-6 The four report files are always written together unless --no-report Implemented Tests assert report.md , report.html , report.json , and SARIF 2.1.0 FR-7 HTML and Markdown escape \u003c , and quotes from file names, titles and evidence commands Implemented Escape tests, including a portable path test that does not need a forbidden file name FR-8 The scanned path stored in the report is the directory's base name, not the absolute path Implemented Test reports do not disclose absolute target paths by default FR-9 A focused test ( test.only , it.only , describe.only , fit , fdescribe ) is high severity and NO_GO under the default policy Implemented Fixture focused-test , exit code 2 FR-10 A skipped or todo test is reported and is not described as an executed test Implemented it.skip , test.todo , pytest, unittest, JUnit, Go FR-11 No recognised tests, no recognised CI, and no root license are separate findings Implemented Fixture cases and unit tests FR-12 Without evidence, a clean static project is REVIEW_REQUIRED , never ready Implemented Exit code 3 FR-13 Passing ci-ingested or local-executed evidence, with failed = 0, exit 0, passed 0, and a clean policy picture, is READY_FOR_HUMAN_APPROVAL and still automatedDeploymentAuthorized: false Implemented Exit code 0 test FR-14 Failing evidence is NO_GO even when the static scan is clean Implemented Exit code 2 FR-15 external-unverified evidence and zero-pass evidence stay REVIEW_REQUIRED Implemented Unit tests "},{"t":"Architecture","u":"03-architecture.html","x":" Architecture What exists at runtime There is one program: packages/cli/bin/pramanasutra.mjs . It loads four libraries and nothing else. There is no database, no daemon, no plugin loader and no network stack in the scan path. \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 880 460\" role=\"img\" aria-labelledby=\"archTitle archDesc\" \u003ctitle id=\"archTitle\" PramanaSutra components\u003c/title \u003cdesc id=\"archDesc\" Skills stay in the IDE. The CLI reads the repo, optional policy and evidence, evaluates a gate, and writes Markdown, HTML and JSON locally.\u003c/desc \u003cstyle text{font-family:ui-sans-serif,system-ui,sans-serif}\u003c/style \u003crect width=\"880\" height=\"460\" fill=\" f7f4ee\"/ \u003crect x=\"24\" y=\"24\" width=\"250\" height=\"120\" rx=\"12\" fill=\" fff\" stroke=\" 0f3d3e\"/ \u003ctext x=\"40\" y=\"56\" font-size=\"15\" font-weight=\"700\" fill=\" 0f3d3e\" AI IDE\u003c/text \u003ctext x=\"40\" y=\"80\" font-size=\"13\" fill=\" 1c1915\" Claude, Cursor, Codex,\u003c/text \u003ctext x=\"40\" y=\"100\" font-size=\"13\" fill=\" 1c1915\" Copilot, Gemini CLI\u003c/text \u003ctext x=\"40\" y=\"124\" font-size=\"12\" fill=\" 5e584e\" Model stays in the IDE\u003c/text \u003crect x=\"24\" y=\"168\" width=\"250\" height=\"100\" rx=\"12\" fill=\" fff\" stroke=\" 0f3d3e\"/ \u003ctext x=\"40\" y=\"200\" font-size=\"15\" font-weight=\"700\" fill=\" 0f3d3e\" 17 Agent Skills\u003c/text \u003ctext x=\"40\" y=\"224\" font-size=\"13\" fill=\" 1c1915\" .agents/skills is canonical\u003c/text \u003ctext x=\"40\" y=\"244\" font-size=\"12\" fill=\" 5e584e\" init copies them. It does not run them\u003c/text \u003crect x=\"330\" y=\"70\" width=\"250\" height=\"210\" rx=\"12\" fill=\" 0f3d3e\"/ \u003ctext x=\"348\" y=\"104\" font-size=\"16\" font-weight=\"700\" fill=\" f4fffe\" pramanasutra CLI\u003c/text \u003ctext x=\"348\" y=\"132\" font-size=\"13\" fill=\" d5efec\" scanner.mjs walk + rules\u003c/text \u003ctext x=\"348\" y=\"156\" font-size=\"13\" fill=\" d5efec\" policy.mjs fail-closed\u003c/text \u003ctext x=\"348\" y=\"180\" font-size=\"13\" fill=\" d5efec\" evidence.mjs schema\u003c/text \u003ctext x=\"348\" y=\"204\" font-size=\"13\" fill=\" d5efec\" evaluateGate\u003c/text \u003ctext x=\"348\" y=\"236\" font-size=\"13\" fill=\" f4fffe\" No network. No test exec.\u003c/text \u003crect x=\"630\" y=\"24\" width=\"226\" height=\"78\" rx=\"12\" fill=\" fff\" stroke=\" 92400e\"/ \u003ctext x=\"646\" y=\"52\" font-size=\"14\" font-weight=\"700\" fill=\" 92400e\" Policy JSON\u003c/text \u003ctext x=\"646\" y=\"76\" font-size=\"12\" fill=\" 1c1915\" optional --policy\u003c/text \u003crect x=\"630\" y=\"118\" width=\"226\" height=\"78\" rx=\"12\" fill=\" fff\" stroke=\" 92400e\"/ \u003ctext x=\"646\" y=\"146\" font-size=\"14\" font-weight=\"700\" fill=\" 92400e\" Evidence JSON\u003c/text \u003ctext x=\"646\" y=\"170\" font-size=\"12\" fill=\" 1c1915\" optional --evidence\u003c/text \u003crect x=\"630\" y=\"214\" width=\"226\" height=\"110\" rx=\"12\" fill=\" fff\" stroke=\" 166534\"/ \u003ctext x=\"646\" y=\"244\" font-size=\"14\" font-weight=\"700\" fill=\" 166534\" Reports\u003c/text \u003ctext x=\"646\" y=\"268\" font-size=\"13\" fill=\" 1c1915\" report.md\u003c/text \u003ctext x=\"646\" y=\"288\" font-size=\"13\" fill=\" 1c1915\" report.html\u003c/text \u003ctext x=\"646\" y=\"308\" font-size=\"13\" fill=\" 1c1915\" report.json\u003c/text \u003crect x=\"24\" y=\"310\" width=\"832\" height=\"124\" rx=\"12\" fill=\" fff\" stroke=\" ddd4c4\"/ \u003ctext x=\"40\" y=\"342\" font-size=\"14\" font-weight=\"700\" fill=\" 1c1915\" Target repository (read-only)\u003c/text \u003ctext x=\"40\" y=\"368\" font-size=\"13\" fill=\" 1c1915\" Files, test names, CI config, LICENSE. Symlinks skipped. .pramanasutraignore prefixes excluded.\u003c/text \u003ctext x=\"40\" y=\"392\" font-size=\"13\" fill=\" 1c1915\" The report stores the folder's base name, not the absolute path.\u003c/text \u003ctext x=\"40\" y=\"416\" font-size=\"12\" fill=\" 5e584e\" Writes go to the output directory the operator chose, default ./pramanasutra-reports in the current working directory.\u003c/text \u003c/svg The diagram is inline. The page does not fetch a chart library. The reports box lists Markdown, HTML and JSON. The same write also emits report.sarif.json (SARIF 2.1.0). Trust boundaries Boundary Rule --- --- Target tree to scanner Read-only. Symlinks skipped, not followed. Directories in the skip list ( .git , node_modules , build outputs, pramanasutra-reports ) are not entered Ignore file to scanner Prefixes only. .. , absolute paths and NUL are rejected. The file is data, not code Evidence file to gate Schema-checked JSON, max 1 MB, must be a regular file. The counts are believed as data. The provenance is only as good as source Policy file to gate Fail closed. Safety flags cannot be weakened Report to the reader Every string that came from the repo or the evidence file is escaped in HTML and in Markdown IDE to skill The skill is text. The model is the IDE's. PramanaSutra does not see that traffic CLI to network No HTTP client is used by the scan, gate, report or installer Command flow scan calls scanProject , runs evaluateGate with no evidence (so the decision is at best REVIEW_REQUIRED unless something is already NO_GO ), and writes reports. Exit code is 0 even when the gate is not ready, because scan is an inspection. release-check is the same pipeline plus optional evidence and policy. Its exit code is the gate: 2, 3 or 0. That is the code CI should use. verify only validates an evidence file. It does not scan. init only copies directories. Design decisions Heuris"},{"t":"Technical reference","u":"04-technical-reference.html","x":" Technical reference Source of the running tool: packages/cli/ . Node.js ES modules. No npm install is required to run it, because there are no dependencies. Dev-time checks are node --test . Modules File Responsibility --- --- packages/cli/bin/pramanasutra.mjs Argument parsing, commands, process exit code. Version string is read from root package.json packages/cli/lib/scanner.mjs Directory walk, test-file classification, rules, evaluateGate packages/cli/lib/evidence.mjs Load and validate evidence. Classify it as absent, failing, inconclusive, unverified or passing packages/cli/lib/policy.mjs Default policy and fail-closed loader packages/cli/lib/report.mjs markdown() , html() , writeReports() . escapeHtml is exported and tested packages/cli/lib/installer.mjs Map of IDE directories and the copy routine scripts/ci-gate.mjs Runs the unit tests, builds evidence from that output, release-checks this repo scripts/generate-proof.mjs Regenerates sample reports, proof/ and documents/pramanasutra/audit scripts/build-docs.mjs Builds this HTML site from the numbered Markdown files Exit codes Code When --- --- 0 doctor on Node 20+, help , version , agents , init , verify success, scan or release-check with READY_FOR_HUMAN_APPROVAL 1 Bad arguments, unreadable input, invalid evidence, invalid policy, doctor on Node older than 20, unknown command 2 scan or release-check decision NO_GO 3 scan or release-check decision REVIEW_REQUIRED scan and release-check both use 2 for NO_GO and 3 for REVIEW_REQUIRED . Exit 0 from either command is READY_FOR_HUMAN_APPROVAL only. A scan without an evidence file cannot be ready. Report object (schema 1.0.0) Written as report.json . The Markdown and HTML are renderings of this object, plus a few fixed explanation sentences. Field Meaning --- --- schemaVersion \"1.0.0\" product PramanaSutra AI toolVersion Version from package.json at scan time generatedAt ISO-8601 UTC scannedPath Base name of the target directory only capabilities Map of capability to executed , not-run , not-supported or evidence-supplied inventory.fileCount Files that were listed, after ignore rules and skip directories inventory.testFiles Relative paths classified as tests inventory.manifests package.json , pyproject.toml , go.mod , Gradle, Maven, Cargo, Gemfile, Composer, pubspec, .sln , .csproj , requirements.txt inventory.ciWorkflows GitHub Actions under .github/workflows , plus GitLab, Jenkins, Azure Pipelines, Bitbucket Pipelines, CircleCI, Buildkite, Drone and Woodpecker file names inventory.changedFiles Present as an array only when --changed could run git diff . null when the flag was omitted or git was unavailable inventory.partial True when the walk truncated, skipped a large or binary test file, or could not read a directory inventory.ignoredPaths Count of file or directory entries skipped because of .pramanasutraignore findings[] id , ruleId , severity , confidence , title , description , evidence.path , evidence.line , recommendation , status limitations[] Sentences about skips, truncation, ignore releaseGate decision , policy , reasons[] , requiresHumanApproval , executedTestEvidence , evidenceState , automatedDeploymentAuthorized evidence Present only when --evidence was accepted. Echoes source, command, time, exit code, passed, failed, skipped, environment, commit, and github or null. Omitted on a plain scan Adding toolVersion and evidence does not change schemaVersion . Consumers that ignore unknown fields keep working. Consumers that reject unknown fields will need a change; none are shipped in this repo. Evidence file Field Rule --- --- schemaVersion Must be \"1.0.0\" source local-executed , ci-ingested , or external-unverified command Non-empty string. Shown in the report. Escaped. It is not executed executedAt ISO-8601 timestamp exitCode Integer. Non-zero is failing even if failed is 0 passed , failed Integers ≥ 0 skipped Optional integer ≥ 0 environment , commit Optional strings github Optional object. When present, repository , sha , runId and workflow must each be a non-empty string. The report then says ci-environment . Missing github is unbound . Neither state is a signature Classification order: no file → absent . failed 0 or exitCode !== 0 → failing . passed === 0 → inconclusive . external-unverified → unverified . Otherwise → passing . Only passing can unlock the ready state, and only together with the policy's static requirements. Policy keys Boolean keys, defaulting to the recommended policy when omitted: releaseRequiresExecutedEvidence , blockOnFocusedTests , blockOnSkippedTests , requireCi , requireLicense , requireTests . name is a string up to 80 characters. Fixed keys, accepted only at the safe value: schemaVersion must be \"1.0.0\" if present, allowAutomatedDeployment must be false, manualApprovalsRequired must be true. Any other key is an error. Scan limits Limit Value --- --- Max depth 22 Max files listed 20,000 Max test file read 2,000,000 bytes Max evidence file 1,000,000 bytes Max polic"},{"t":"User guide","u":"05-user-guide.html","x":" User guide Before you start Install Node.js 20 or newer. Check with node --version . You do not need an API key, an account, or npm install inside this repository. From a clone of this repository the command is: bash node packages/cli/bin/pramanasutra.mjs doctor From anywhere, once the repository is public on GitHub: bash npx pramanasutra doctor npx downloads the repository. The CLI that then runs still does not call a model and does not scan until you ask it to. Check a project bash node packages/cli/bin/pramanasutra.mjs release-check --path path/to/project You get a paragraph on the terminal and four files in ./pramanasutra-reports/ : File Open it with --- --- report.md The pull request, an editor, or GitHub report.html Any browser. Light and dark follow the system. It prints report.json A script. Same facts as the other files report.sarif.json A SARIF 2.1.0 reader. The CLI writes the file and does not upload it scan and release-check use the same exit codes: 2 for NO_GO , 3 for REVIEW_REQUIRED , 0 for READY_FOR_HUMAN_APPROVAL . A scan with no evidence file exits 3 . --changed adds names from git diff when the directory is a Git checkout. Those names are not a test selection. If git cannot read the directory, the report says git diff was not available for this directory, so no changed-file list was collected. Choose another folder with --out reports/feature-a . Skip the files with --no-report if you only want the exit code. The terminal line always includes Tests executed by this tool: NO . If you did not pass --evidence , the gate cannot be ready. Read the result Open report.html first if you are a person. The first block is the decision: - NO_GO (exit 2). Something blocking was seen, usually a focused test, or the evidence file says the tests failed. Do not release on this output. - REVIEW_REQUIRED (exit 3). The static picture is not blocking, but evidence is missing, untrusted, empty, or the scan was partial, or tests, CI or a license are missing under the policy. A person has to look. - READY_FOR_HUMAN_APPROVAL (exit 0). The policy's checks passed. It is still not permission to deploy. Then read \"Supplied test evidence\". If it says no file was supplied, the pass/fail counts you might imagine are not in this report. Then read the findings table: severity, rule, file:line, and the fix. The limitations at the bottom are part of the result, not a footnote to skip. Samples you can open without scanning anything: Situation Markdown HTML --- --- --- Focused test, NO_GO [report.md](samples/focused-test/report.md) [report.html](samples/focused-test/report.html) Clean project plus passing evidence [report.md](samples/clean-project/report.md) [report.html](samples/clean-project/report.html) Tests exist, CI does not [report.md](samples/missing-ci/report.md) [report.html](samples/missing-ci/report.html) CI exists, tests do not [report.md](samples/missing-tests/report.md) [report.html](samples/missing-tests/report.html) Odd file names, still a focused test [report.md](samples/unsafe-names/report.md) [report.html](samples/unsafe-names/report.html) Python, Java and Go skips [report.md](samples/multi-language/report.md) [report.html](samples/multi-language/report.html) This repository's own audit: [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). Supply evidence The CLI will not run your tests. You run them, then describe the result. Minimum shape: json { \"schemaVersion\": \"1.0.0\", \"source\": \"local-executed\", \"command\": \"npm test\", \"executedAt\": \"2026-11-06T12:00:00Z\", \"exitCode\": 0, \"passed\": 37, \"failed\": 0, \"skipped\": 1 } source is local-executed when you ran it on a machine you control, or ci-ingested when the counts came from the CI log. Use external-unverified when you cannot stand behind the file; the gate will stay in review. bash node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json Check a file alone: bash node packages/cli/bin/pramanasutra.mjs verify --evidence evidence.json In this repository, node scripts/ci-gate.mjs runs the unit tests and builds that file from the summary. It does not hand-type the counts. Copy that pattern in your own CI rather than committing a stale evidence file. Choose a policy bash node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json --policy policies/strict.json Strict mode turns skipped tests into NO_GO . Recommended mode reports them and does not block on them. Write your own file with only the keys in the [technical reference](04-technical-reference.md). A typo in a key is an error, on purpose. Install the skills bash node packages/cli/bin/pramanasutra.mjs init --ide claude --target /path/to/your/app The target must already exist. The command copies folders. It does not call the model. If you already have a pramanasutra-prime skill there, it stops. Read the existing file before you pass --force . Then tell the assistant, in your own words or this one: PramanaSutra Prime: assess this"},{"t":"CLI and reports","u":"06-cli-and-reports.html","x":" CLI and reports Binary name: pramanasutra . From a clone: node packages/cli/bin/pramanasutra.mjs . Commands Command What it does Exit --- --- --- version , --version , -v Prints PramanaSutra AI and the version 0 help , --help , -h Prints usage 0 doctor [--json] Node major version, platform, offline, no model 0 if Node ≥ 20, else 1 agents list [--json] Canonical skill names 0 scan --path \u003cdir [--changed] [--out \u003cdir ] [--no-report] [--json] Static audit plus a gate with no evidence file. Same exit codes as release-check 0, 2, 3, or 1 release-check --path \u003cdir [--evidence \u003cfile ] [--policy \u003cfile ] [--changed] [--out \u003cdir ] [--no-report] [--json] Audit plus gate. This is the CI command 0, 2, 3, or 1 verify --evidence \u003cfile [--json] Schema-check an evidence file. Does not scan 0 or 1 init --ide \u003cname --target \u003cdir [--force] Copy skills. --ide is claude , cursor , codex , gemini , copilot , generic or all 0 or 1 --json prints the object instead of the sentence. For release-check --json , the process exit code is still the gate. Do not parse the exit code from the JSON alone; use releaseGate.decision if you need the word, and the process status if you need CI to fail. --evidence and --policy on scan are errors. They belong to release-check so a scan cannot quietly change meaning. Flags that take a value --path , --out , --ide , --target , --evidence , --policy . The value is the next argument. A missing value is an error. --force , --json , --no-report and --changed take no value. --changed is only meaningful on scan and release-check . Where files are written Default: pramanasutra-reports under the current working directory , resolved to an absolute path at write time. The scanned project is not the default output location, so a scan of a foreign tree does not drop files into it. The four names are fixed: report.md , report.html , report.json , report.sarif.json . They are written in that order, in one directory, in one call. If the directory cannot be created, nothing is reported as success. SARIF is a rendering of the findings for other tools. The CLI does not upload it and does not fetch the SARIF schema. How to read report.md 1. The first table is identity: project base name, time, tool version, schema, Release decision , policy, evidence state. 2. The blockquote repeats the decision in a sentence. 3. Summary counts files, test files, workflows, manifests and findings by severity. It states that this tool did not execute tests. 4. Supplied test evidence is either an explicit \"no file\" or a table of source, command, time, exit code, passed, failed, skipped, and GitHub fields when present. Those numbers are from the file. They are not a new test run. The next paragraph is the binding: none (no file), unbound (no github object), or ci-environment (repository, commit, run id and workflow are all set). ci-environment is still not checked with GitHub. A person can type those four strings. 5. Findings at a glance is the table to paste into a review: severity, rule, path:line , fix. 6. Findings repeats each item with why it matters. 7. Test files seen and CI workflows seen show what the classification actually matched, up to 40 paths, then a count of the rest. 8. Capabilities translates not-run and not-supported . 9. Release gate reasons is the list that produced the decision. 10. Limitations includes walk limits, ignore exclusions, and the standing disclaimer. Characters that would be HTML in a file name are escaped in the Markdown too, so a hostile path does not become a tag when GitHub renders the file. How to read report.html Same sections, in the same order. The decision is a banner with a text label, not color alone. Stats are the counts. There is a skip link, a system light/dark theme, and a print style. No script is required to read it, and the file does not load a remote stylesheet or font. Open it from disk. Do not host the HTML from an untrusted scan on a site that other people browse if the report might contain internal paths. The tool strips the absolute target path, but evidence command , environment and commit are whatever the evidence file contained, escaped for HTML and still visible as text. How to read report.json Parse it. Do not scrape the Markdown. Fields are listed in the [technical reference](04-technical-reference.md). releaseGate.automatedDeploymentAuthorized is false. releaseGate.requiresHumanApproval is true. If your automation treats a ready decision as permission to deploy, it is ignoring those fields. Worked terminal session Against the focused-test fixture, from a clone: bash node packages/cli/bin/pramanasutra.mjs release-check --path fixtures/focused-test --no-report Expect exit code 2 and a line containing Gate: NO_GO and Tests executed by this tool: NO . The fixture is a bad example on purpose. The full rendered reports are already committed under [samples/focused-test](samples/focused-test/report.md). Against the clean fixture with its evidence file: bash node packages/cli/bin/pr"},{"t":"Rule catalog","u":"07-rule-catalog.html","x":" Rule catalog Rules are regular expressions on a single line of a file already classified as a test. They are not ASTs. Confidence is medium unless noted. Status on a finding is observed , which means \"the pattern matched\", not \"a test was executed\". A line that is a string in the middle of other code does not match, because the pattern is anchored at the start of the line (after whitespace). A line that is only the declaration does match. That is why a fixture string inside const fixture = 'test.only(...)' is not a finding, and a real test.only line is. FOCUSED_TEST --- --- Severity high Default gate NO_GO when blockOnFocusedTests is true (the default) Why A focused test runs one case and silently drops the rest. CI can be green and meaningless Matches Line starts with optional await , then describe.only( , test.only( , it.only( , or fit( , fdescribe( Fix text Remove .only / fit / fdescribe , then execute the full suite Sample [samples/focused-test](samples/focused-test/report.md) Does not match test.only split across two lines, a custom wrapper such as only(test( , or a focused test in a language outside the pattern (for example Rust [ignore] is not this rule). A team that uses a helper named test.only for something else will get a false positive. SKIPPED_TEST --- --- Severity low Default gate Reported. Blocks only when blockOnSkippedTests is true ( policies/strict.json ) Why A skip can be an honest pending test or a buried failure. The tool cannot tell Matches describe.skip( , test.skip( , it.skip( , test.todo( , xit( , xtest( , xdescribe( Also matches @pytest.mark.skip , @pytest.mark.xfail (including skipif , because skip is a prefix), @unittest.skip... , @Ignore , @Disabled , t.Skip( and t.SkipNow( (Go), pytest.skip( , pytest.xfail( , self.skipTest( , raise unittest.SkipTest Fix text Confirm the skip is intended, tracked, and does not hide a required case Sample [samples/multi-language](samples/multi-language/report.md) (pytest decorator, JUnit @Disabled , Go t.Skip ) Does not match a skip buried in a helper, pending( in Mocha, it.skip if the call is not at the start of the line, or Rust [ignore] . @Disabled with a trailing word and a word boundary will not match @DisabledIf . NO_TESTS --- --- Severity medium Default gate REVIEW_REQUIRED when requireTests is true and the test list is empty Why The supported naming conventions found nothing. The project may still have tests under an unknown layout Evidence path is . , no line Fix text Confirm the framework location; add and execute relevant tests Sample [samples/missing-tests](samples/missing-tests/report.md) False positive: tests live in a folder this regex does not treat as tests, and none of the file names match. False negative: a file is named like a test and contains no assertions. The rule does not read assertions. NO_CI --- --- Severity medium Default gate REVIEW_REQUIRED when requireCi is true and no workflow file matched Recognises .github/workflows/ .yml and .yaml , .gitlab-ci.yml , Jenkinsfile , azure-pipelines.yml , bitbucket-pipelines.yml , .circleci/config.yml , .buildkite/pipeline.yml , .drone.yml , woodpecker.yml Does not recognise A CI config with another name, a workflow that exists only in a hosted UI, or a file that is present but never runs Sample [samples/missing-ci](samples/missing-ci/report.md) Finding a workflow file does not mean the workflow runs tests. The rule is presence, not semantics. NO_LICENSE --- --- Severity low Confidence high (it is a file name check) Default gate REVIEW_REQUIRED when requireLicense is true Recognises LICENSE , LICENSE.md , LICENSE.txt , COPYING at the repository root only, any case Sample [samples/multi-language](samples/multi-language/report.md) includes this finding together with the skips A license inside docs/ or a package.json \"license\" field without a file is not detected. The recommendation is to review intended licensing, not to invent a license the project did not choose. Gate interaction Blocking findings are evaluated before evidence. A high finding (or a focused test while that block is on, or a skip while the strict block is on) is NO_GO even if evidence passes. If nothing blocks and evidence is failing , the decision is still NO_GO . Only then does the gate look at missing evidence, a partial scan, missing tests, missing CI and a missing license. Any of those yield REVIEW_REQUIRED . If none of them fire, the decision is READY_FOR_HUMAN_APPROVAL . Adding a rule Do not add a rule that the tests do not lock with a true positive and a false positive. The [maintainer guide](15-maintainer-guide.md) is the procedure. Update this page in the same change, then rebuild the HTML. "},{"t":"Skills and agents","u":"08-skills-and-agents.html","x":" Skills and agents Canonical files: .agents/skills/\u003cname /SKILL.md . agents list reads that tree. init copies it. Editing a copy inside .claude or .cursor and not the canonical file will be overwritten on the next forced install, and will not ship. The skills are instructions. They are not models, not processes, and not a guarantee. A host that does not load SKILL.md will not follow them. Live loading has not been smoke-tested in each IDE. See [Roadmap](13-roadmap-and-status.md). Shared contract Every skill in this repository is required by test to: - start with YAML frontmatter - set name equal to the directory name - include a description - include a Safe workflow section that is not a copy of another skill's workflow - tell the model not to fabricate, claim, or approve results it does not have Each workflow is a different procedure: prime routes one lane, strategy picks the lane, unit reads focused-test markers, flow reads a written journey, api reads a contract, visual reads an attached image note, access reads source text, load reads a written budget, data reads a named fixture, secure reads a pasted diff for literals, regression reads a --changed report, flake reads a pasted rerun log, defect quotes a pasted error, pipeline reads the workflow files the scan listed, release runs release-check only when asked, evidence reads the JSON, verify compares verify output to saved stdout. None of them run a suite, open a browser, or sign a file. If an assistant using these skills claims \"all tests passed\" and cannot point at a command and an output, it is breaking the skill. Prefer the CLI report. The roster Skill Job --- --- pramanasutra-prime Coordinates inspection, QA strategy, evidence review and a release recommendation. Does not approve a deploy pramanasutra-strategy Risk-based quality strategy and traceability from requirement to test pramanasutra-unit Focused, deterministic unit and component tests with real assertions pramanasutra-flow Cross-system and end-to-end scenarios that can be repeated pramanasutra-api REST, GraphQL, gRPC and event contracts, and whether tests cover them pramanasutra-visual Screenshot baselines and rendering gaps. Does not take screenshots by itself pramanasutra-access Accessibility and cross-device planning, including manual checks pramanasutra-load Performance test design, thresholds and abort rules. Not a license to load-test production pramanasutra-data Migration, backup, rollback and fixture review pramanasutra-secure Security-test gaps from evidence. Not a penetration test pramanasutra-regression What changed, and which tests are relevant pramanasutra-flake Nondeterministic tests, using a reproduction, not a hunch pramanasutra-defect A failure turned into a minimal reproduction pramanasutra-pipeline Whether automation and gates mean what the team thinks pramanasutra-release Criteria, rollout and rollback. Human approval stays human pramanasutra-evidence Reports and evidence that stay traceable and avoid leaking secrets pramanasutra-verify Challenges the gate before someone approves Install paths Host Path Verified live in that host? --- --- --- Claude Code .claude/skills No Cursor .cursor/skills No OpenAI Codex .agents/skills No GitHub Copilot .github/skills No Gemini CLI .gemini/skills No Generic .agents/skills No Product names belong to their owners. Listing a path is compatibility information, not an endorsement and not a partnership. See [Legal](10-legal-and-compliance.md). How Prime is meant to delegate The skill text tells the model to delegate to a specialist only if the host supports delegation, and otherwise to do the stages in order. PramanaSutra does not implement an orchestrator process. There is no message bus. \"Agent team\" in the README means seventeen instruction files and one chief file, not seventeen running programs. What to put in a prompt Name the skill, name the repository, and restate the two rules that matter most: cite file and line, and do not claim a test ran unless a tool returned that result. Ask it to read report.md if you have already produced one. Do not paste production secrets into the prompt. The skill tells the model not to collect secrets; the prompt should not hand them over anyway. Changing a skill Edit .agents/skills/\u003cname /SKILL.md . Keep the frontmatter name equal to the folder. Keep the safe workflow. Run npm test . The test reads every skill. Copies in a target project are not updated until someone runs init again with --force after review. "},{"t":"Security and privacy","u":"09-security-and-privacy.html","x":" Security and privacy PramanaSutra is not a SAST product, not a secret scanner, and not a penetration test. This page describes how the CLI and the skills are built to avoid a class of mistakes. It is not a claim that the software has been attacked by a third party and found clean. It has not had an independent security review. Assets Asset Why it matters --- --- The target source tree May contain proprietary code. The scanner reads it Evidence and policy files May contain commands, host names, commit ids The report Repeats finding paths and the evidence fields. People forward it Skill text Tells a model how to behave. A hostile edit changes the assistant's instructions The machine running the CLI The process has the user's filesystem rights What the CLI does not do - It does not open a socket as part of scan, gate, report or install. (The documentation HTML also does not load a third-party script. npx itself uses the network to download the package; that is npm, not the scan.) - It does not execute the target's tests, package scripts, or binaries. - It does not follow symlinks, so a link cannot pull in a directory outside the tree. - It does not walk into a path that contains a symlink component during install. - It does not put the absolute target path in the report. It stores the base name. - It escapes report text so a file name or an evidence command cannot inject a tag. Controls Threat Control --- --- Accidental execution of repo code No test runner in the CLI. Evidence is data Symlink escape while scanning lstat / Dirent symlink check, skip, count Symlink escape while installing skills Walk the destination, refuse if any component is a symlink Overwriting a team's own skills Refuse when the destination exists, unless --force Policy that allows unattended deploy Loader rejects allowAutomatedDeployment: true Tampered evidence promoted to \"ready\" external-unverified cannot reach ready. This does not detect a lie in a ci-ingested file HTML injection via a crafted file name escapeHtml on every interpolated value. Tested Markdown injection of the same name \u003c and escaped in the Markdown renderer Ignore file used as a path traversal Entries containing .. or an absolute path throw Huge input Size caps on evidence, policy, ignore, and per test file Binary mistaken for source NUL byte skips the file and marks the scan partial, so the gate cannot be ready Secrets in a report The tool does not redact. Do not put secrets in the evidence command or environment . The evidence skill tells the model the same Privacy The CLI does not phone home, does not have an analytics hook, and does not write a user id. Data stays in the process and in the output directory you chose. You can still leak data yourself: - The evidence file's command , environment and commit are copied into the report. - Finding paths are relative and can still reveal internal layout. - If you paste a report or a skill prompt into a hosted model, that provider processes it under their terms. PramanaSutra does not control that. - init copies skill files into the target. Those files are project content, not telemetry. The HTML documentation uses localStorage only if you toggle the theme, and only in that browser. Search runs on the page. Nothing is sent. GitHub Pages serves a copy of the HTML. That is a public site of this public repository. Do not put private audit output into docs/ . Residual risk - Heuristic rules miss vulnerabilities entirely. Do not use a ready gate as a security sign-off. - A person can write ci-ingested evidence that does not match any CI run. The schema cannot prove the command happened. - --out writes wherever the operator points. That is intended. Point it at a directory you mean to create. - init --force deletes an existing skill directory and replaces it. Read the diff first. - Skill files are instructions to a model. Review them like code before you install them into a repository with secrets in context. - Dependencies: there are none at runtime. The GitHub Actions workflows pin actions/checkout and actions/setup-node to commit SHAs. CodeQL actions are still on the v4 major tag; Dependabot is configured. Reporting a vulnerability Use GitHub private vulnerability reporting on [the repository](https://github.com/shahvatsalofficial/pramanasutra-ai). Do not open a public issue with an exploit, a token, or customer data. The policy file is SECURITY.md . CodeQL The CodeQL workflow runs on push to main , on pull requests, and weekly. A green CodeQL check is the queries that shipped with that action, on this JavaScript. It is not a full application assessment. "},{"t":"Legal and compliance","u":"10-legal-and-compliance.html","x":" Legal and compliance Important: This page is a project notice written so users and reviewers can see what has and has not been checked. It is not legal advice, not a lawyer's opinion, and not a compliance attestation. Have a qualified lawyer review trademark, export, and regulated-industry use before you bet a company name or a certification on this project. License The source is Apache License 2.0. The full text is [LICENSE](../../LICENSE). [NOTICE](../../NOTICE) attributes the work to Vatsal Shah. Contributors keep the attribution the license requires. Apache-2.0 is a permissive license with a patent grant and a requirement to keep notices. It is not a warranty. The license's disclaimer of warranty and limitation of liability apply. The software is provided \"AS IS\". Third-party code Version 0.3.4 has no runtime npm dependencies and does not vendor third-party libraries inside packages/cli . [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md) records that. If a later change adds a dependency, that file has to change in the same commit. Documentation pages use system fonts and no remote script, so the HTML does not pull in a font license or a CDN library. GitHub Actions are third-party workflows pinned by SHA for checkout and setup-node. Their licenses are their own. Using them does not copy their source into this repository. Names that are not ours Claude, Claude Code, Cursor, OpenAI, Codex, GitHub, Copilot, Google, Gemini, Node.js, npm, Jest, pytest, JUnit and the other product names in the docs are used to describe compatibility. They are the property of their owners. This project is not affiliated with, endorsed by, or sponsored by those owners. Do not write marketing that implies otherwise. The name PramanaSutra \"PramanaSutra\" and \"PramanaSutra AI\" are project names used by Vatsal Shah. As of this version: - They are not described here as registered trademarks. - A clearance search of trademark registers, domains and package names has not been completed for this project. - No filing is claimed. Before a company adopts the name in commerce, a trademark lawyer should search the classes that matter (commonly Nice classes 9 and 42 for software and software services, plus the countries where the name will be used) and should search package registries and domains. This document cannot do that search, and a previous draft that said the same thing is still the accurate status. The Sanskrit word pramana is used here in its ordinary meaning, \"valid proof\" or \"means of knowledge\", as a project metaphor. That sentence is an explanation of the name, not a claim of exclusive rights over the word. What the output is A report is decision support. It is not: - a certification of quality, security, accessibility or compliance - an audit opinion under any professional standard - a representation that tests passed, unless the evidence block is quoting a file the operator supplied - legal advice about the scanned project - permission to ship Do not attach a PramanaSutra report to a regulatory submission as if it were an independent assessment. Privacy laws The CLI does not operate a service and does not collect accounts. If you put personal data into an evidence file or you scan a repository that contains personal data, you are the one processing it. The report will copy evidence fields through. Strip them before you publish a report. The public documentation site contains no customer data. Acceptable use The skills forbid destructive actions, unapproved production load tests, secret collection and publishing. Use the CLI on trees you are allowed to read. Do not point it at systems you do not own in order to interfere with them. The tool's refusal to execute target tests is a safety property; do not wrap it in a script that then runs arbitrary repository code unless that is already your CI and you accept that risk there. Regulated industries If the scanned product is medical, financial, aviation, or otherwise regulated, a heuristic QA gate is not your validation record. Keep the validation process your regulator already requires. This project does not claim IEC 62304, ISO 13485, SOC 2, FedRAMP, PCI-DSS, HIPAA, or any other program. Export This repository is a local source scanner and a set of text files. It does not implement cryptography as a product. This sentence is not an export classification. If your counsel needs a classification, ask them, with the source in front of them. What a lawyer should still be asked 1. Is \"PramanaSutra\" available for the goods and countries you care about? 2. Does your use of the Apache-2.0 project, including NOTICE, match how you distribute it? 3. If you publish reports from private repositories, what do they disclose? 4. If a customer will rely on a gate in a contract, what warranty are you accidentally giving? The upstream license gives none. Your contract might. Contact Security reports: [Security and privacy](09-security-and-privacy.md) and SECURITY.md . Other maintainer contact i"},{"t":"Testing and proof","u":"11-testing-and-proof.html","x":" Testing and proof Trust the files, then the prose. If they disagree, the files win, and this page is stale. Artifact What it is --- --- [proof/test-results.txt](proof/test-results.txt) The stdout of node --test --test-reporter=spec tests/cli.test.mjs , with the Node version and OS on the first lines [proof/eval-results.json](proof/eval-results.json) Per-fixture expected rules versus found rules, plus precision and recall on those fixtures [audit/report.md](audit/report.md) Release check of this repository using that test run as evidence [audit/report.html](audit/report.html) The same audit [samples/](samples) The six fixtures rendered to Markdown, HTML and JSON Regenerate all of them with: bash node scripts/generate-proof.mjs The sample reports pin generatedAt to 2026-11-06T00:00:00.000Z so a review is not a wall of timestamp noise. The test-results file is not pinned. It is the command output. Captured unit run On the run captured for version 0.3.4 the summary was: - tests: 43 - pass: 43 - fail: 0 - skipped: 0 nested symlink is skipped rather than followed now runs on this Windows machine. A real symlink is refused, so the test creates a directory junction and checks the scanner does not follow it. On a machine that allows symlinks, the same test uses a symlink. Do not quote \"43 passed\" as a universal CI number. Quote the file, and quote the CI run for Ubuntu and Windows. The command does not use a network and does not need npm install . What the tests lock The suite in tests/cli.test.mjs covers doctor, the 17 skills' frontmatter and distinct Safe workflow bodies, focused and skipped tests, missing tests/CI/license, CircleCI recognition, shared scan and release-check exit codes, HTML and Markdown escaping, default report paths, SARIF 2.1.0, evidence classification, the unbound and ci-environment binding sentences, --changed when git is unavailable, policy rejection, Java/C /Ruby file names, the multi-language fixture, ignore-file traversal, binary test files, and pytest.skip / test.todo . It does not cover a live IDE. It does not measure recall on a corpus the author did not write. Labeled fixtures Fixture Expected rules Expected gate --- --- --- fixtures/clean-project none READY_FOR_HUMAN_APPROVAL (its evidence.json is passing and ci-ingested ) fixtures/focused-test FOCUSED_TEST NO_GO fixtures/missing-ci NO_CI REVIEW_REQUIRED fixtures/missing-tests NO_TESTS REVIEW_REQUIRED fixtures/unsafe-names FOCUSED_TEST NO_GO fixtures/multi-language SKIPPED_TEST three times, NO_CI , NO_LICENSE REVIEW_REQUIRED eval-results.json records true positives, false positives and false negatives against that table. A value of 1.0 for precision and recall means every expected rule was found and no extra rule was found in these six trees . The file's caveat field says the fixtures were written by the rule author. Repeat that caveat wherever you quote the ratio. It is a regression lock. Self-audit generate-proof.mjs scans the repository root, attaches evidence built from the test summary ( source: local-executed , counts copied from the reporter, not typed), and writes documents/pramanasutra/audit . .pramanasutraignore excludes fixtures/ and examples/sample-app/ because those trees contain deliberate test.only lines. The limitation section of the audit says they were excluded. Read that section or you will misread a ready gate. The HTML documentation is generated after the audit file. A file count in the audit does not include pages that did not exist yet. Run npm run proof again after a large file add if you need the count to match the tree you are looking at. node scripts/ci-gate.mjs is the same idea for CI: run the tests, parse pass and fail from the reporter, refuse to continue if the summary cannot be parsed, then release-check this repo. Exit code is the gate. On the maintainer run that gate was READY_FOR_HUMAN_APPROVAL with 0 findings. CI must show the same for the commit you care about. Do not paste this sentence over a red Actions run. What would falsify the claims - A unit test fails. The claim \"37 passed\" is then false for that run. - A fixture in the table gains or loses a rule. eval-results.json will show pass: false and the script exits 1. - ci-gate cannot parse the reporter. It exits 1 and writes no ready evidence. That is preferred to a made-up count. - A ready gate appears while releaseGate.evidenceState is not passing . That would be a defect. The tests forbid it for the cases they construct. Not in this proof Field accuracy, mutation testing, a comparison against a commercial SAST tool, performance on a monorepo of tens of thousands of files beyond the documented caps, and any IDE transcript. Those are absent, not implied. "},{"t":"CI and release","u":"12-ci-and-release.html","x":" CI and release Workflows in this repository File What it gates Badge --- --- --- .github/workflows/ci.yml Ubuntu and Windows, Node 20 and 22. Unit tests, doctor , then scripts/ci-gate.mjs . Does not publish The CI badge on the README .github/workflows/publish.yml On a GitHub Release: npm test , then npm publish --provenance for the unscoped package pramanasutra None. It is not a required check .github/workflows/codeql.yml CodeQL javascript-typescript on Ubuntu CodeQL badge .github/dependabot.yml Update PRs for Actions None actions/checkout and actions/setup-node are pinned to commit SHAs. Timeouts are 20 minutes. Concurrency cancels a superseded run on the same ref. Why macOS is not scheduled On 4 November 2026, Actions run [41884015367](https://github.com/shahvatsalofficial/pramanasutra-ai/actions/runs/41884015367) finished as a failure. Ubuntu and Windows jobs succeeded. Both macos-latest jobs were cancelled with zero steps . They never checked out the repo. That failure painted the only CI badge red. A separate macos-14 workflow was tried on the 0.3.0 push. Run [42098256304](https://github.com/shahvatsalofficial/pramanasutra-ai/actions/runs/42098256304) cancelled both jobs in about a second. runner_name was empty. No step ran. Scheduling that workflow again would only add a red badge. It was removed. macOS test execution in GitHub Actions is unverified . The unit suite has been run on the maintainer's Windows machine, and the required workflow covers Ubuntu and Windows. What the gate job proves scripts/ci-gate.mjs : 1. Runs node --test --test-reporter=spec tests/cli.test.mjs . 2. Reads the last pass and fail counts from that output. 3. If it cannot read them, exits 1. It does not invent a passing evidence file. 4. Writes a temporary evidence file with source: ci-ingested and those counts. When GITHUB_REPOSITORY , GITHUB_SHA , GITHUB_RUN_ID and GITHUB_WORKFLOW are all set, it also writes github with those four strings. The report then says ci-environment . That is not a signature. A checkout outside Actions omits github , and the report says unbound . 5. Runs release-check on the repository root with that file. 6. Exits with the gate code. Because fixtures/ and examples/sample-app/ contain intentional focused tests, they are listed in .pramanasutraignore . The gate is about the product, and the report names the exclusion. A pull request that adds test.only under tests/ or packages/ fails this job with exit 2. Use it on your repository Run your tests in the job you already trust. Then either: - call your own small script that writes evidence from that output, the way ci-gate.mjs does, or - fail only when you are ready to maintain an evidence file Example pattern, after your tests have already run and you have written evidence.json honestly: yaml - name: PramanaSutra release check run: npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports Exit 2 fails the step. Exit 3 also fails a step, because it is non-zero. If you want review to be a comment and only NO_GO to be red, branch on the status in the shell and upload report.md as an artifact either way: bash set +e npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports code=$? set -e if [ \"$code\" -eq 2 ]; then exit 2; fi if [ \"$code\" -eq 1 ]; then exit 1; fi exit 0 Exit 3 is then visible in the log and the report, and the job stays green. Do this on purpose. Do not \"fix\" a red gate by deleting findings. Upload pramanasutra-reports/report.md and report.html as build artifacts so reviewers can read them without re-running. GitHub Pages Pages serves the /docs directory on main . scripts/build-docs.mjs writes the site to documents/pramanasutra/html and copies it to docs/ , including index.html , sitemap.xml and robots.txt . Old handbook URLs under docs/handbook/ redirect to the new pages. The site URL is https://shahvatsalofficial.github.io/pramanasutra-ai/ . robots.txt allows general crawlers and names common answer-engine crawlers as allowed. The content is public documentation. Do not put a private report in docs/ . Releasing this project 1. Update package.json , CHANGELOG.md and CITATION.cff to the same version. 2. node --test tests/cli.test.mjs 3. node scripts/generate-proof.mjs 4. node scripts/build-docs.mjs 5. Read documents/pramanasutra/audit/report.md . If the gate is not what you expect, stop. 6. Commit, push to main . 7. Wait until the required CI workflow is green. Do not claim macOS CI passed. 8. On npm, as user shahvatsal , add a trusted publisher for shahvatsalofficial/pramanasutra-ai workflow file publish.yml . Do this once. 9. gh release create vX.Y.Z with the changelog as notes. That event runs publish.yml . npm name is the unscoped package pramanasutra . @shahvatsal/pramanasutra@0.3.1 was published and then deleted so the install name would not show that scope. @vatsalshah/pramanasutra still returns 404. Local npm"},{"t":"Roadmap and status","u":"13-roadmap-and-status.html","x":" Roadmap and status Status words mean only what they say. Implemented has a command or file and a test or a committed artifact. Planned is a directory, a sentence, or an intention. It does not run. Not claimed is something people might assume that this project refuses. Implemented in 0.3.4 Capability Evidence --- --- CLI: version, doctor, agents, scan, release-check, verify, init packages/cli , npm test Offline static rules in the [catalog](07-rule-catalog.md), including CircleCI, Buildkite, Drone and Woodpecker file names Unit tests and six fixtures Evidence ingestion and fail-closed policy Unit tests, policies/ Evidence binding sentence: none , unbound , or ci-environment Unit test. ci-environment is not a signature report.md , report.html , report.json , report.sarif.json written together Unit tests, samples/ , audit/ --changed lists git diff names and says when git is unavailable Unit test. Not a test selector scan and release-check exit 2 or 3 for a failing gate. Exit 0 is READY_FOR_HUMAN_APPROVAL only Help text and packages/cli/bin/pramanasutra.mjs .pramanasutraignore Unit test, this repo's ignore file 17 skills with distinct Safe workflow sections Installer tests and the uniqueness assertion Required CI on Ubuntu and Windows, Node 20 and 22, with a real release gate .github/workflows/ci.yml CI gate writes github when the four GITHUB_ variables exist scripts/ci-gate.mjs macOS in GitHub Actions Not scheduled. Runs 41884015367 and 42098256304 cancelled with zero steps CodeQL workflow .github/workflows/codeql.yml Documentation site with a product front page plus this handbook scripts/build-docs.mjs Public GitHub repository https://github.com/shahvatsalofficial/pramanasutra-ai npm publish workflow .github/workflows/publish.yml . It has not been proven by a green run. A GitHub Release is what starts it, and npm must already list this repo as a trusted publisher Planned These README-level packages exist as notes only. The CLI does not import them. Item Not yet --- --- Executing the target's tests Would run arbitrary code. Needs an explicit, separate, opt-in design Browser and device checks No driver is bundled Accessibility measurement The access skill plans. It does not score Performance measurement The load skill plans. It does not generate load Coverage, flake detection from history, mutation testing No storage, no history SBOM and SLSA provenance No release attestation workflow A long-running server or a local model adapter packages/server is a note Live smoke test in each IDE Install paths only Not claimed Claim Why it is absent --- --- Certification or compliance Reports say they are decision support Independent security review None has been commissioned Trademark clearance [Legal](10-legal-and-compliance.md) Field precision equal to the fixture score The fixture score is a regression lock macOS CI passed Those jobs never started a runner npm package @vatsalshah/pramanasutra Registry returned 404. The account is shahvatsal Signed or GitHub-verified evidence ci-environment only echoes four strings. verify checks schema. A person can still type them The twelve packages/ notes ( runner , server , reporter , quality-gates , release , impact , integrators , evidence , discovery , core , static-audit , test-generation ) READMEs only. The CLI does not import them The assistant always obeys the skill The host is outside this process Near-term work, in order 1. Keep the required CI green on Ubuntu and Windows. Add macOS back only when a runner actually starts and the log shows test output. 2. Confirm npm view pramanasutra version matches package.json after each release. Do not publish @vatsalshah/pramanasutra . 3. One live smoke note per IDE: did init land where the host reads, and did a trivial prompt cite a file. Until that note exists, the compatibility table stays \"not verified\". 4. A rule only with a true-positive fixture and a false-positive fixture. No drive-by patterns. Compatibility summary Environment Status --- --- Node 20 and 22 on Ubuntu and Windows in CI Required workflow. Trust the latest green run, not this sentence Node on the maintainer's Windows machine The captured proof file macOS in CI Not scheduled. Unverified Claude Code, Cursor, Codex, Copilot, Gemini CLI Copy paths implemented. Behavior not verified Older handbook pages under docs/handbook/ .md are earlier write-ups. The numbered files in this folder are the ones to update. "},{"t":"FAQ and glossary","u":"14-faq-and-glossary.html","x":" FAQ and glossary Questions Is this a test framework? No. It reviews test hygiene and release evidence. Keep Jest, pytest, JUnit, Go test, Playwright or whatever you already run. PramanaSutra reads the result only when you pass an evidence file. Does the scan send my code anywhere? No. The scan, the gate, the report writer and the skill installer do not open network connections. npx downloads the tool before it runs; that download is npm. After the process starts, the audit stays local. Why is the gate REVIEW_REQUIRED when I can see tests? Because nobody passed --evidence , or the evidence is unverified, or it records zero passes, or the scan was partial, or CI or a license file is missing under the policy. A clean reading of the files is not a test run. That split is the point of the tool. Why did a clean scan still not say ready? READY_FOR_HUMAN_APPROVAL requires passing local-executed or ci-ingested evidence and the policy's static checks. No evidence file means not ready. See the clean-project sample, which includes an evidence file, versus any scan without one. Can I turn off the human? No. automatedDeploymentAuthorized is always false, and the policy loader rejects an attempt to set it true. The ready state means \"a person may now look\", not \"ship it\". The HTML and the Markdown disagree. Which is wrong? They are written from the same object in one function. If they disagree, it is a bug. Open report.json for the object. Please report it. It flagged test.only inside a string. The pattern matches a line that starts with the declaration, after whitespace. A string later on the line does not match. A line whose first code is test.only( does match, even if a human considers it data. Move the sample off the start of the line, or exclude the path in .pramanasutraignore if it is a fixture tree. Do not ignore your real tests to silence a true positive. It did not see my tests. The naming rules are in the [technical reference](04-technical-reference.md). A custom folder that matches none of them produces NO_TESTS . That finding means \"not recognised\", not \"proven absent\". Does a green CI file mean the tests ran? No. NO_CI checks that a known file exists. It does not read the workflow steps. Is the skill going to edit my repository? Only if you ask the assistant to and the host allows it. The skill text says to ask before running tests or changing files. The CLI scan and release-check do not edit the target. init writes only the skill directories you named. Which IDE was tested? None end to end. The installer copies into documented paths. [Roadmap and status](13-roadmap-and-status.md) keeps the \"verified live\" column on No until there is a note. Is the name trademarked? Not as far as this project claims, and no clearance search has been completed. Details: [Legal](10-legal-and-compliance.md). Where is the audit of PramanaSutra itself? [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). How do I cite it? [CITATION.cff](../../CITATION.cff) at the repository root. Glossary Term Meaning --- --- Agent Skill A SKILL.md file an IDE may load as instructions. Not a running process Prime pramanasutra-prime , the coordinating skill Static finding A rule matched source text. Status observed Evidence A JSON file describing a test command someone already ran Evidence state absent , failing , inconclusive , unverified , or passing Gate The release decision derived from findings, evidence and policy NO_GO Do not release on this output. Exit 2 REVIEW_REQUIRED A person must look, or inputs are missing. Exit 3 READY_FOR_HUMAN_APPROVAL Policy checks passed. A person still approves. Exit 0 Partial scan The walk hit a limit or could not read something. Cannot be ready Policy JSON that turns optional strictness on or off, and cannot enable auto-deploy Capability A named activity and whether this run executed it, skipped it, or cannot do it Ignore file .pramanasutraignore , prefixes excluded from the walk, disclosed in limitations Focused test A declaration that runs a subset ( .only , fit , fdescribe ) Base name The last segment of the scanned directory. The report does not store the full path "},{"t":"Maintainer guide","u":"15-maintainer-guide.html","x":" Maintainer guide Layout a maintainer actually edits Path Edit when --- --- packages/cli/lib/scanner.mjs Rules, walk limits, gate logic, ignore file packages/cli/lib/evidence.mjs Evidence schema packages/cli/lib/policy.mjs Policy keys packages/cli/lib/report.mjs Wording or layout of report.md and report.html packages/cli/bin/pramanasutra.mjs Flags and exit codes packages/cli/lib/installer.mjs IDE paths .agents/skills/ Skill text. This is the canonical copy tests/cli.test.mjs Every behavior change fixtures/ A labeled tree for a rule. Excluded from the product gate by .pramanasutraignore documents/pramanasutra/ .md These pages. Then rebuild HTML scripts/generate-proof.mjs How samples and the self-audit are produced scripts/ci-gate.mjs How CI turns a test run into evidence scripts/build-docs.mjs HTML chrome. The words live in the Markdown packages/ other than cli are notes. Do not import them from the CLI until they have tests and a status-page change from planned to implemented. Change a rule 1. Write the smallest fixture that should match, and one that should not. 2. Add or extend a test in tests/cli.test.mjs before you celebrate the regex. 3. Change scanner.mjs . 4. Add the rule to [the catalog](07-rule-catalog.md) in the same change, including what it misses. 5. Run node --test tests/cli.test.mjs . 6. Run node scripts/generate-proof.mjs so samples and eval-results.json match. 7. If the self-audit gate changes, read why before you commit it. A new NO_GO on the product itself means the rule hit the product, not only the fixture. Fixtures are ignored. Product tests are not. Do not weaken a test to match a sloppy pattern. Do not special-case this repository inside the scanner. Use .pramanasutraignore for example trees, and keep the limitation text. Change the report markdown() and html() must show the same decision, the same location, and the same fix. The tests look for NO_GO , a path:line , and the remediation sentence. Escaping is not optional: a new interpolated field goes through escMd or escapeHtml . Add a hostile string to the escape test when you add a field. Keep the report free of remote URLs for CSS, fonts and scripts. It is opened from disk and it is quoted as local. Change the docs Edit the numbered Markdown. Do not hand-edit documents/pramanasutra/html or the mirrored files under docs/ . Those are generated. bash node scripts/build-docs.mjs The script also writes redirects from the old docs/handbook/ .html names. If you rename a page, update the moved map in the script or the old URL 404s on Pages. Pages must stay readable without JavaScript: the article HTML is server-side (here, build-time). JavaScript only adds search, theme and copy buttons. Checks before a commit that claims a fix bash node --test tests/cli.test.mjs node scripts/ci-gate.mjs node scripts/generate-proof.mjs node scripts/build-docs.mjs ci-gate runs the tests again. That is deliberate. It is the path CI uses. Release Follow [CI and release](12-ci-and-release.md). Version strings that must move together: package.json , CHANGELOG.md , CITATION.cff . The CLI reads the version from package.json at runtime, so the help text does not have its own copy. The docs site prints package.json too. Do not commit reports/ or pramanasutra-reports/ . They are gitignored local output. Do commit documents/pramanasutra/audit and samples , because those are the public proof. Reviewing someone else's change - A new ready-path without a test is a defect. - A claim of IDE support, certification, or trademark clearance in a doc page is a defect unless the artifact exists. - A dependency added \"to make the HTML nicer\" needs a third-party notice and a reason that beats the zero-dependency promise. System fonts and inline CSS are the current answer. - Generated HTML that does not match the Markdown means the generator was not run. Ask for the rebuild. Do not patch the HTML by hand. Secrets Do not commit .env , tokens, or a real customer tree as a fixture. The unsafe-names fixture uses punctuation in a file name on purpose. It is not a credential. "}];</script>
|
|
130
|
-
<script>const root = document.documentElement;
|
|
131
|
-
const store = {
|
|
132
|
-
get: (k) => { try { return localStorage.getItem(k); } catch { return null; } },
|
|
133
|
-
set: (k, v) => { try { localStorage.setItem(k, v); } catch { /* private mode */ } }
|
|
134
|
-
};
|
|
135
|
-
const saved = store.get('ps-docs-theme');
|
|
136
|
-
if (saved === 'light' || saved === 'dark') root.setAttribute('data-theme', saved);
|
|
137
|
-
function currentTheme() {
|
|
138
|
-
return root.getAttribute('data-theme') || (matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
139
|
-
}
|
|
140
|
-
document.querySelector('.theme-btn')?.addEventListener('click', () => {
|
|
141
|
-
const next = currentTheme() === 'dark' ? 'light' : 'dark';
|
|
142
|
-
root.setAttribute('data-theme', next);
|
|
143
|
-
store.set('ps-docs-theme', next);
|
|
144
|
-
});
|
|
145
|
-
const menu = document.querySelector('.menu-btn');
|
|
146
|
-
const sidebar = document.getElementById('sidebar');
|
|
147
|
-
menu?.addEventListener('click', () => {
|
|
148
|
-
const open = sidebar?.classList.toggle('open');
|
|
149
|
-
menu.setAttribute('aria-expanded', String(Boolean(open)));
|
|
150
|
-
});
|
|
151
|
-
document.querySelectorAll('.copy').forEach((btn) => {
|
|
152
|
-
btn.addEventListener('click', async () => {
|
|
153
|
-
const code = btn.parentElement?.querySelector('code')?.textContent ?? '';
|
|
154
|
-
try { await navigator.clipboard.writeText(code); btn.textContent = 'Copied'; }
|
|
155
|
-
catch { btn.textContent = 'Select the code'; }
|
|
156
|
-
setTimeout(() => { btn.textContent = 'Copy'; }, 1600);
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
const links = [...document.querySelectorAll('.toc a')];
|
|
160
|
-
if (links.length && 'IntersectionObserver' in window) {
|
|
161
|
-
const map = new Map(links.map((a) => [a.getAttribute('href')?.slice(1), a]));
|
|
162
|
-
const io = new IntersectionObserver((entries) => {
|
|
163
|
-
const visible = entries.filter((e) => e.isIntersecting).sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
|
|
164
|
-
if (!visible) return;
|
|
165
|
-
links.forEach((l) => l.classList.remove('on'));
|
|
166
|
-
map.get(visible.target.id)?.classList.add('on');
|
|
167
|
-
}, { rootMargin: '-80px 0px -65% 0px', threshold: [0.1, 0.5] });
|
|
168
|
-
map.forEach((_a, id) => { const el = id ? document.getElementById(id) : null; if (el) io.observe(el); });
|
|
169
|
-
}
|
|
170
|
-
const index = Array.isArray(window.__DOCS_INDEX__) ? window.__DOCS_INDEX__ : [];
|
|
171
|
-
const q = document.getElementById('q');
|
|
172
|
-
const results = document.getElementById('results');
|
|
173
|
-
let active = -1;
|
|
174
|
-
function hideResults() { if (!results) return; results.hidden = true; results.replaceChildren(); active = -1; }
|
|
175
|
-
function showResults(items) {
|
|
176
|
-
if (!results) return;
|
|
177
|
-
results.replaceChildren();
|
|
178
|
-
active = -1;
|
|
179
|
-
if (!items.length) { results.hidden = true; return; }
|
|
180
|
-
for (const item of items) {
|
|
181
|
-
const li = document.createElement('li');
|
|
182
|
-
const a = document.createElement('a');
|
|
183
|
-
a.href = item.u;
|
|
184
|
-
a.setAttribute('role', 'option');
|
|
185
|
-
a.textContent = item.t;
|
|
186
|
-
li.append(a);
|
|
187
|
-
results.append(li);
|
|
188
|
-
}
|
|
189
|
-
results.hidden = false;
|
|
190
|
-
}
|
|
191
|
-
q?.addEventListener('input', () => {
|
|
192
|
-
const term = q.value.trim().toLowerCase();
|
|
193
|
-
if (term.length < 2) { hideResults(); return; }
|
|
194
|
-
showResults(index.filter((item) => `${item.t} ${item.x}`.toLowerCase().includes(term)).slice(0, 8));
|
|
195
|
-
});
|
|
196
|
-
q?.addEventListener('keydown', (event) => {
|
|
197
|
-
const opts = [...(results?.querySelectorAll('a') ?? [])];
|
|
198
|
-
if (event.key === 'Escape') { hideResults(); return; }
|
|
199
|
-
if (!opts.length) return;
|
|
200
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
201
|
-
event.preventDefault();
|
|
202
|
-
active = event.key === 'ArrowDown' ? Math.min(active + 1, opts.length - 1) : Math.max(active - 1, 0);
|
|
203
|
-
opts.forEach((a, i) => a.setAttribute('aria-selected', String(i === active)));
|
|
204
|
-
opts[active]?.scrollIntoView({ block: 'nearest' });
|
|
205
|
-
}
|
|
206
|
-
if (event.key === 'Enter' && active >= 0) { event.preventDefault(); opts[active].click(); }
|
|
207
|
-
});
|
|
208
|
-
document.addEventListener('click', (event) => { if (!event.target.closest('.search')) hideResults(); });
|
|
209
|
-
document.addEventListener('keydown', (event) => {
|
|
210
|
-
if (event.key === '/' && document.activeElement !== q && !event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
211
|
-
event.preventDefault();
|
|
212
|
-
q?.focus();
|
|
213
|
-
}
|
|
214
|
-
});
|
|
131
|
+
<script>window.__DOCS_INDEX__=[{"t":"PramanaSutra AI","u":"index.html","x":"Offline QA and release check. Four report files. Evidence binding none unbound ci-environment. Five static rules. Skills are instructions. scan and release-check share exit codes. macOS CI is not scheduled."},{"t":"Start here","u":"00-start-here.html","x":" Start here PramanaSutra AI (from Sanskrit pramana , \"valid proof\") is an open-source QA and release-readiness agent . It has two parts that do different jobs: 1. Seventeen Agent Skills , led by PramanaSutra Prime, for Claude Code, Cursor, OpenAI Codex, GitHub Copilot and Gemini CLI. The skill uses the IDE's own model. There is no extra API key. 2. A deterministic command-line tool that reads a project, does not run its tests, and writes four files of the same audit: report.md , report.html , report.json and report.sarif.json . scan and release-check both return NO_GO (exit 2), REVIEW_REQUIRED (exit 3) or READY_FOR_HUMAN_APPROVAL (exit 0). Created by [Vatsal Shah](https://shahvatsal.com). Official site: [shahvatsal.com](https://shahvatsal.com). Licensed Apache-2.0. Version 0.3.6. npm package: pramanasutra . The command line has zero runtime dependencies and makes no network calls . The copy on npmjs.com is the last tarball someone published. It can lag this version until that publish finishes. Important: The tool does not certify quality, security or compliance. READY_FOR_HUMAN_APPROVAL means the configured checks passed. A person still decides. It is never a deploy order. The whole thing in one picture You give the tool your project and, optionally, test results. It scans, checks the evidence and decides. A person makes the last call.  How a decision is made The gate reads top to bottom. The first match wins. There is no score and no percentage.  Who should read what If you are Read --- --- Deciding whether to adopt it [Executive summary](01-executive-summary.md), then [Legal](10-legal-and-compliance.md) Writing requirements or a QA process [Functional specification](02-functional-specification.md) Reviewing the design [Architecture](03-architecture.md), then [Technical reference](04-technical-reference.md) Going to run it today [User guide](05-user-guide.md), then [Real-world scenarios](16-real-world-scenarios.md) Wiring it to CI [CI and release](12-ci-and-release.md) and [CLI and reports](06-cli-and-reports.md) Asking what a finding means [Rule catalog](07-rule-catalog.md) Asking what the skills do [Skills and agents](08-skills-and-agents.md) A security reviewer [Security and privacy](09-security-and-privacy.md) Asking \"can I trust the numbers?\" [Testing and proof](11-testing-and-proof.md) and the [audit of this repo](audit/report.md) Maintaining the project [Maintainer guide](15-maintainer-guide.md) Looking up a word [FAQ and glossary](14-faq-and-glossary.md) Sixty seconds  Node.js 20 or newer. bash npx pramanasutra release-check --path . That writes ./pramanasutra-reports/report.md , report.html , report.json and report.sarif.json in the current directory, not inside the project you scanned. Open the HTML file in a browser. For both scan and release-check , the exit code is 2 for NO_GO , 3 for REVIEW_REQUIRED , 0 for READY_FOR_HUMAN_APPROVAL . A scan with no evidence file exits 3 . To copy the skills into an IDE: bash npx pramanasutra init --ide cursor --target . Use claude , cursor , codex , gemini , copilot , generic or all . The copy refuses to overwrite an existing skill unless you pass --force . What is already proven The captured run on the maintainer's Windows machine is in [proof/test-results.txt](proof/test-results.txt): 43 tests, 43 passed, 0 failed, 0 skipped . The symlink test creates a directory junction when Windows refuses a symlink, and checks the scanner does not follow it. Six labeled fixtures match the expected rules and gate with no false positives and no false negatives on those fixtures . That is a regression check written by the same author as the rules. It is not a measure of accuracy on arbitrary repositories. With that same test output supplied as evidence, a release check of this repository returned READY_FOR_HUMAN_APPROVAL . The report is [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). Focused-test examples under fixtures/ and examples/sample-app/ are excluded by .pramanasutraignore so they are not treated as product failures. The report says they were excluded. What is not proven - Live behavior inside each AI IDE. The installer copies files. Nobody has published a smoke test that a host loaded the skill and followed it. - Accuracy on large real repositories. The rules are line heuristics, not parsers. - An independent security review. - Trademark clearance of the name PramanaSutra. See [Legal](10-legal-and-compliance.md). The documentation set Document Question it answers "},{"t":"Executive summary","u":"01-executive-summary.html","x":" Executive summary The problem Teams ask an AI assistant whether a change is safe to release. The assistant often answers from the look of the code. It has not run the tests. A focused test ( test.only , fit , fdescribe ) can make a suite look green while almost nothing ran. A dashboard can be green because the failing job was not required. People then treat the story as evidence. PramanaSutra AI is a counter to that habit. It separates three things that get mixed together: - what a static reading of the repository observed - what a test command actually returned , and only when someone supplies that result - what a human still has to approve The product Piece What a buyer gets What they do not get --- --- --- Agent Skills (17) Instructions a supported IDE can load, so the assistant plans QA, cites files, and asks before running tests A private model, a hosted agent, or a guarantee the IDE obeyed the skill CLI An offline scan and a release gate. Four files of the same audit: Markdown, HTML, JSON, SARIF. scan and release-check both exit 2, 3, or 0 Test execution, coverage, a browser, a vulnerability scan, a signed evidence file, or a deploy Reports A page a reviewer can read without the CLI A certificate, an audit attestation, or legal advice Policy A fail-closed JSON file. Unknown keys are rejected. \"Allow automatic deploy\" cannot be turned on A workflow engine or an approval product Price of the software: zero. License: Apache-2.0. Operator cost: Node.js 20+ and the IDE subscription the team already pays, if they use the skills. The CLI needs neither. The decision, in one table  Gate Exit code Plain meaning Typical next step --- --- --- --- NO_GO 2 A blocking static finding (by default a focused test) or supplied evidence that failed Fix, re-run the tests, re-check REVIEW_REQUIRED 3 Evidence missing, not trusted, or the scan is incomplete; or no tests, CI or license when the policy requires them A person looks, or the missing input is supplied READY_FOR_HUMAN_APPROVAL 0 Policy checks passed, including passing evidence from local-executed or ci-ingested A named person approves. The tool will not deploy external-unverified evidence can never produce the ready state. Zero passed tests cannot. A clean static scan without an evidence file cannot. That is deliberate. What leadership can say Supported by the artifacts in [Testing and proof](11-testing-and-proof.md): - The unit suite on the captured Windows run: 43 tests, 43 passed, 0 failed, 0 skipped. The symlink case uses a directory junction when Windows refuses a symlink. - Ubuntu and Windows CI are required checks on Node 20, 22 and 24. The job runs the tests and then the release gate with that output as evidence. - macOS is not in CI. Actions run 41884015367 cancelled both macOS jobs while they were queued, with zero steps. Run 42098256304 cancelled a macos-14 job in about a second, with no runner. Neither run executed tests. Ubuntu and Windows are the required checks. - Six author-written fixtures produce exactly the expected rules. State the caveat in the same sentence: perfect precision here is a regression lock, not field accuracy. - The CLI's own release check of this repository, given that test evidence, was READY_FOR_HUMAN_APPROVAL . Read [audit/report.md](audit/report.md). What leadership must not say - \"It proved the product is bug-free.\" It did not run the product's tests unless an evidence file says a command ran, and even then it trusts the file's counts. - \"It passed a penetration test.\" It is not a security scanner. The secure skill coordinates gaps . It does not attack. - \"It is WCAG certified\" or \"SOC 2 certified\" or \"ISO certified.\" No such claim exists. - \"Every IDE was verified.\" The install paths are implemented. Live host behavior is not. - \"The name is trademark-cleared.\" It is not. See [Legal](10-legal-and-compliance.md). - \"Tested on macOS in CI.\" Those jobs never started. Adoption shape A sensible first use is read-only: run release-check in CI, publish report.md on the pull request, and block the merge only on exit code 2 ( NO_GO ). Treat exit code 3 as a comment, not a red build, until the team supplies evidence on purpose. Do not give the tool permission to deploy. The policy loader rejects a flag that would authorize unattended deployment, and the gate object always sets automatedDeploymentAuthorized to false. Cost of being wrong A false positive (a line that looks like test.only but is not) delays a release until a person looks. A false negative (a focused test written in a form the heuristic misses, or a test file it does not recognise) can let a weak suite through if someone also supplies passing evidence. The report lists what was not run: browser, security scan, performance, model calls. Reviewers who only read the gate word, and skip the limitations, will ove"},{"t":"Functional specification","u":"02-functional-specification.html","x":" Functional specification This specification describes version 0.3.6 as implemented. A requirement marked planned is not available. Tests that mention a requirement are named so a reader can find them in tests/cli.test.mjs . Actors Actor Goal What they can do --- --- --- Developer Know if a change is even a candidate for release Run the CLI locally. Read report.md or report.html AI assistant inside an IDE Plan QA without inventing results Follow a skill. The skill forbids claiming a test ran without a tool result CI job Fail the build on a blocking finding, and record evidence Run tests, pass the counts as --evidence , fail on exit 2 Reviewer Understand a gate without installing Node Open the HTML report or the Markdown report Maintainer Keep the rules honest Add a fixture and a test before changing a rule. See the [maintainer guide](15-maintainer-guide.md) Release approver Decide Read the gate. The tool will not approve for them Use cases UC-1 Static audit The developer points the CLI at a directory. The tool walks the tree, skips symlinks, skips ignored paths, and reports focused tests, skipped tests, missing tests, missing CI and a missing license. It writes report.md , report.html , report.json and report.sarif.json together. It does not execute the project. scan and release-check use the same exit codes. UC-2 Release check with evidence The developer, or CI, has already run the test command. They write a JSON evidence file (or the CI helper writes it from the real output) and pass --evidence . The gate combines the static findings and that file. Passing evidence from local-executed or ci-ingested , plus a clean required static picture, yields READY_FOR_HUMAN_APPROVAL and exit 0. The report shows the counts from the file and states that PramanaSutra did not run the command. UC-3 Install skills The developer runs init --ide \u003chost --target \u003cexisting directory . The tool copies the canonical skills from .agents/skills into the host's directory. If a skill directory already exists, the copy stops unless --force is set. The target must be a real directory, not a file and not a symlink. A symlink anywhere on the destination path is refused. UC-4 Policy A team commits policies/strict.json or their own file. --policy loads it. Unknown keys, wrong types, and any attempt to set allowAutomatedDeployment to true or manualApprovalsRequired to false are errors. Exit code 1. The default policy is recommended when --policy is omitted. UC-5 Exclude examples A repository that contains labeled bad examples (this one does) lists them in .pramanasutraignore . The report's limitations say how many paths were excluded. Excluded content is not inspected. The author of the ignore file is responsible for not hiding the tests that matter. Functional requirements ID Statement Status Acceptance --- --- --- --- FR-1 doctor reports Node, platform, offline, and that no model is called Implemented Test doctor succeeds without a provider key FR-2 version and --version print the version from package.json Implemented Test version and --version print the package version FR-3 agents list lists 17 skills whose folder name matches frontmatter Implemented Test agents catalog includes Prime and 16 specialists FR-4 scan and release-check require --path to a real directory Implemented Missing path exits 1, no stack trace FR-5 Default output is ./pramanasutra-reports in the current working directory, not inside the scanned project Implemented Test scan writes md, html and json reports by default FR-6 The four report files are always written together unless --no-report Implemented Tests assert report.md , report.html , report.json , and SARIF 2.1.0 FR-7 HTML and Markdown escape \u003c , and quotes from file names, titles and evidence commands Implemented Escape tests, including a portable path test that does not need a forbidden file name FR-8 The scanned path stored in the report is the directory's base name, not the absolute path Implemented Test reports do not disclose absolute target paths by default FR-9 A focused test ( test.only , it.only , describe.only , fit , fdescribe ) is high severity and NO_GO under the default policy Implemented Fixture focused-test , exit code 2 FR-10 A skipped or todo test is reported and is not described as an executed test Implemented it.skip , test.todo , pytest, unittest, JUnit, Go FR-11 No recognised tests, no recognised CI, and no root license are separate findings Implemented Fixture cases and unit tests FR-12 Without evidence, a clean static project is REVIEW_REQUIRED , never ready Implemented Exit code 3 FR-13 Passing ci-ingested or local-executed evidence, with failed = 0, exit 0, passed 0, and a clean policy picture, is READY_FOR_HUMAN_APPROVAL and still automatedDeploymentAuthorized: false Implemented Exit code 0 test FR-14 Failing evidence is NO_GO even when the static scan is clean Implemented Exit code 2 FR-15 external-unverified evidence and zero-pass evidence stay REVIEW_REQUIRED Implemented Unit tests "},{"t":"Architecture","u":"03-architecture.html","x":" Architecture What exists at runtime  There is one program: packages/cli/bin/pramanasutra.mjs . It loads four libraries and nothing else. There is no database, no daemon, no plugin loader and no network stack in the scan path. \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 880 460\" role=\"img\" aria-labelledby=\"archTitle archDesc\" \u003ctitle id=\"archTitle\" PramanaSutra components\u003c/title \u003cdesc id=\"archDesc\" Skills stay in the IDE. The CLI reads the repo, optional policy and evidence, evaluates a gate, and writes Markdown, HTML and JSON locally.\u003c/desc \u003cstyle text{font-family:ui-sans-serif,system-ui,sans-serif}\u003c/style \u003crect width=\"880\" height=\"460\" fill=\" f7f4ee\"/ \u003crect x=\"24\" y=\"24\" width=\"250\" height=\"120\" rx=\"12\" fill=\" fff\" stroke=\" 0f3d3e\"/ \u003ctext x=\"40\" y=\"56\" font-size=\"15\" font-weight=\"700\" fill=\" 0f3d3e\" AI IDE\u003c/text \u003ctext x=\"40\" y=\"80\" font-size=\"13\" fill=\" 1c1915\" Claude, Cursor, Codex,\u003c/text \u003ctext x=\"40\" y=\"100\" font-size=\"13\" fill=\" 1c1915\" Copilot, Gemini CLI\u003c/text \u003ctext x=\"40\" y=\"124\" font-size=\"12\" fill=\" 5e584e\" Model stays in the IDE\u003c/text \u003crect x=\"24\" y=\"168\" width=\"250\" height=\"100\" rx=\"12\" fill=\" fff\" stroke=\" 0f3d3e\"/ \u003ctext x=\"40\" y=\"200\" font-size=\"15\" font-weight=\"700\" fill=\" 0f3d3e\" 17 Agent Skills\u003c/text \u003ctext x=\"40\" y=\"224\" font-size=\"13\" fill=\" 1c1915\" .agents/skills is canonical\u003c/text \u003ctext x=\"40\" y=\"244\" font-size=\"12\" fill=\" 5e584e\" init copies them. It does not run them\u003c/text \u003crect x=\"330\" y=\"70\" width=\"250\" height=\"210\" rx=\"12\" fill=\" 0f3d3e\"/ \u003ctext x=\"348\" y=\"104\" font-size=\"16\" font-weight=\"700\" fill=\" f4fffe\" pramanasutra CLI\u003c/text \u003ctext x=\"348\" y=\"132\" font-size=\"13\" fill=\" d5efec\" scanner.mjs walk + rules\u003c/text \u003ctext x=\"348\" y=\"156\" font-size=\"13\" fill=\" d5efec\" policy.mjs fail-closed\u003c/text \u003ctext x=\"348\" y=\"180\" font-size=\"13\" fill=\" d5efec\" evidence.mjs schema\u003c/text \u003ctext x=\"348\" y=\"204\" font-size=\"13\" fill=\" d5efec\" evaluateGate\u003c/text \u003ctext x=\"348\" y=\"236\" font-size=\"13\" fill=\" f4fffe\" No network. No test exec.\u003c/text \u003crect x=\"630\" y=\"24\" width=\"226\" height=\"78\" rx=\"12\" fill=\" fff\" stroke=\" 92400e\"/ \u003ctext x=\"646\" y=\"52\" font-size=\"14\" font-weight=\"700\" fill=\" 92400e\" Policy JSON\u003c/text \u003ctext x=\"646\" y=\"76\" font-size=\"12\" fill=\" 1c1915\" optional --policy\u003c/text \u003crect x=\"630\" y=\"118\" width=\"226\" height=\"78\" rx=\"12\" fill=\" fff\" stroke=\" 92400e\"/ \u003ctext x=\"646\" y=\"146\" font-size=\"14\" font-weight=\"700\" fill=\" 92400e\" Evidence JSON\u003c/text \u003ctext x=\"646\" y=\"170\" font-size=\"12\" fill=\" 1c1915\" optional --evidence\u003c/text \u003crect x=\"630\" y=\"214\" width=\"226\" height=\"110\" rx=\"12\" fill=\" fff\" stroke=\" 166534\"/ \u003ctext x=\"646\" y=\"244\" font-size=\"14\" font-weight=\"700\" fill=\" 166534\" Reports\u003c/text \u003ctext x=\"646\" y=\"268\" font-size=\"13\" fill=\" 1c1915\" report.md\u003c/text \u003ctext x=\"646\" y=\"288\" font-size=\"13\" fill=\" 1c1915\" report.html\u003c/text \u003ctext x=\"646\" y=\"308\" font-size=\"13\" fill=\" 1c1915\" report.json\u003c/text \u003crect x=\"24\" y=\"310\" width=\"832\" height=\"124\" rx=\"12\" fill=\" fff\" stroke=\" ddd4c4\"/ \u003ctext x=\"40\" y=\"342\" font-size=\"14\" font-weight=\"700\" fill=\" 1c1915\" Target repository (read-only)\u003c/text \u003ctext x=\"40\" y=\"368\" font-size=\"13\" fill=\" 1c1915\" Files, test names, CI config, LICENSE. Symlinks skipped. .pramanasutraignore prefixes excluded.\u003c/text \u003ctext x=\"40\" y=\"392\" font-size=\"13\" fill=\" 1c1915\" The report stores the folder's base name, not the absolute path.\u003c/text \u003ctext x=\"40\" y=\"416\" font-size=\"12\" fill=\" 5e584e\" Writes go to the output directory the operator chose, default ./pramanasutra-reports in the current working directory.\u003c/text \u003c/svg The diagram is inline. The page does not fetch a chart library. The reports box lists Markdown, HTML and JSON. The same write also emits report.sarif.json (SARIF 2.1.0). Trust boundaries  Boundary Rule --- --- Target tree to scanner Read-only. Symlinks skipped, not followed. Directories in the skip list ( .git , node_modules , build outputs, pramanasutra-reports ) are not entered Ignore file to scanner Prefixes only. .. , absolute paths and NUL are rejected. The file is data, not code Evidence file to gate Schema-checked JSON, max 1 MB, must be a regular file. The counts are believed as data. The provenance is only as good as source Policy file to gate Fail closed. Safety flags cannot be weakened Report to the reader Every string that came from the repo or the evidence file is escaped in HTML and in Markdown IDE to skill The skill is text. The model is the IDE's. PramanaSutra does not see that traffic CLI to network No HTTP client is used by the scan, gate, report or installer Command flow scan calls scanProject , runs evaluateGate with no evidence (so the decision is at best REVIEW_REQUIRED unless something is already NO_GO ), and writes reports. Exit code is 0 even when the gate is not ready, because scan is an inspection. "},{"t":"Technical reference","u":"04-technical-reference.html","x":" Technical reference Source of the running tool: packages/cli/ . Node.js ES modules. No npm install is required to run it, because there are no dependencies. Dev-time checks are node --test . Modules File Responsibility --- --- packages/cli/bin/pramanasutra.mjs Argument parsing, commands, process exit code. Version string is read from root package.json packages/cli/lib/scanner.mjs Directory walk, test-file classification, rules, evaluateGate packages/cli/lib/evidence.mjs Load and validate evidence. Classify it as absent, failing, inconclusive, unverified or passing packages/cli/lib/policy.mjs Default policy and fail-closed loader packages/cli/lib/report.mjs markdown() , html() , writeReports() . escapeHtml is exported and tested packages/cli/lib/installer.mjs Map of IDE directories and the copy routine scripts/ci-gate.mjs Runs the unit tests, builds evidence from that output, release-checks this repo scripts/generate-proof.mjs Regenerates sample reports, proof/ and documents/pramanasutra/audit scripts/build-docs.mjs Builds this HTML site from the numbered Markdown files Exit codes Code When --- --- 0 doctor on Node 20+, help , version , agents , init , verify success, scan or release-check with READY_FOR_HUMAN_APPROVAL 1 Bad arguments, unreadable input, invalid evidence, invalid policy, doctor on Node older than 20, unknown command 2 scan or release-check decision NO_GO 3 scan or release-check decision REVIEW_REQUIRED scan and release-check both use 2 for NO_GO and 3 for REVIEW_REQUIRED . Exit 0 from either command is READY_FOR_HUMAN_APPROVAL only. A scan without an evidence file cannot be ready. Report object (schema 1.0.0) Written as report.json . The Markdown and HTML are renderings of this object, plus a few fixed explanation sentences. Field Meaning --- --- schemaVersion \"1.0.0\" product PramanaSutra AI toolVersion Version from package.json at scan time generatedAt ISO-8601 UTC scannedPath Base name of the target directory only capabilities Map of capability to executed , not-run , not-supported or evidence-supplied inventory.fileCount Files that were listed, after ignore rules and skip directories inventory.testFiles Relative paths classified as tests inventory.manifests package.json , pyproject.toml , go.mod , Gradle, Maven, Cargo, Gemfile, Composer, pubspec, .sln , .csproj , requirements.txt inventory.ciWorkflows GitHub Actions under .github/workflows , plus GitLab, Jenkins, Azure Pipelines, Bitbucket Pipelines, CircleCI, Buildkite, Drone and Woodpecker file names inventory.changedFiles Present as an array only when --changed could run git diff . null when the flag was omitted or git was unavailable inventory.partial True when the walk truncated, skipped a large or binary test file, or could not read a directory inventory.ignoredPaths Count of file or directory entries skipped because of .pramanasutraignore findings[] id , ruleId , severity , confidence , title , description , evidence.path , evidence.line , recommendation , status limitations[] Sentences about skips, truncation, ignore releaseGate decision , policy , reasons[] , requiresHumanApproval , executedTestEvidence , evidenceState , automatedDeploymentAuthorized evidence Present only when --evidence was accepted. Echoes source, command, time, exit code, passed, failed, skipped, environment, commit, and github or null. Omitted on a plain scan Adding toolVersion and evidence does not change schemaVersion . Consumers that ignore unknown fields keep working. Consumers that reject unknown fields will need a change; none are shipped in this repo. Evidence file Field Rule --- --- schemaVersion Must be \"1.0.0\" source local-executed , ci-ingested , or external-unverified command Non-empty string. Shown in the report. Escaped. It is not executed executedAt ISO-8601 timestamp exitCode Integer. Non-zero is failing even if failed is 0 passed , failed Integers ≥ 0 skipped Optional integer ≥ 0 environment , commit Optional strings github Optional object. When present, repository , sha , runId and workflow must each be a non-empty string. The report then says ci-environment . Missing github is unbound . Neither state is a signature Classification order: no file → absent . failed 0 or exitCode !== 0 → failing . passed === 0 → inconclusive . external-unverified → unverified . Otherwise → passing . Only passing can unlock the ready state, and only together with the policy's static requirements. Policy keys Boolean keys, defaulting to the recommended policy when omitted: releaseRequiresExecutedEvidence , blockOnFocusedTests , blockOnSkippedTests , requireCi , requireLicense , requireTests . name is a string up to 80 characters. Fixed keys, accepted only at the safe value: schemaVersion must be \"1.0.0\" if present, allowAutomatedDeployment must be false, manualApprovalsRequired must be true. Any other key is an error. Scan limits Limit Value --- --- Max depth 22 Max files listed 20,000 Max test file read 2,000,000 bytes Max evidence file 1,000,000 bytes Max polic"},{"t":"User guide","u":"05-user-guide.html","x":" User guide Before you start Install Node.js 20 or newer. Check with node --version . You do not need an API key, an account, or npm install inside this repository. From a clone of this repository the command is: bash node packages/cli/bin/pramanasutra.mjs doctor From anywhere, once the repository is public on GitHub: bash npx pramanasutra doctor npx downloads the repository. The CLI that then runs still does not call a model and does not scan until you ask it to. Check a project  bash node packages/cli/bin/pramanasutra.mjs release-check --path path/to/project You get a paragraph on the terminal and four files in ./pramanasutra-reports/ : File Open it with --- --- report.md The pull request, an editor, or GitHub report.html Any browser. Light and dark follow the system. It prints report.json A script. Same facts as the other files report.sarif.json A SARIF 2.1.0 reader. The CLI writes the file and does not upload it scan and release-check use the same exit codes: 2 for NO_GO , 3 for REVIEW_REQUIRED , 0 for READY_FOR_HUMAN_APPROVAL . A scan with no evidence file exits 3 . --changed adds names from git diff when the directory is a Git checkout. Those names are not a test selection. If git cannot read the directory, the report says git diff was not available for this directory, so no changed-file list was collected. Choose another folder with --out reports/feature-a . Skip the files with --no-report if you only want the exit code. The terminal line always includes Tests executed by this tool: NO . If you did not pass --evidence , the gate cannot be ready. Read the result Open report.html first if you are a person. The first block is the decision: - NO_GO (exit 2). Something blocking was seen, usually a focused test, or the evidence file says the tests failed. Do not release on this output. - REVIEW_REQUIRED (exit 3). The static picture is not blocking, but evidence is missing, untrusted, empty, or the scan was partial, or tests, CI or a license are missing under the policy. A person has to look. - READY_FOR_HUMAN_APPROVAL (exit 0). The policy's checks passed. It is still not permission to deploy. Then read \"Supplied test evidence\". If it says no file was supplied, the pass/fail counts you might imagine are not in this report. Then read the findings table: severity, rule, file:line, and the fix. The limitations at the bottom are part of the result, not a footnote to skip. Samples you can open without scanning anything: Situation Markdown HTML --- --- --- Focused test, NO_GO [report.md](samples/focused-test/report.md) [report.html](samples/focused-test/report.html) Clean project plus passing evidence [report.md](samples/clean-project/report.md) [report.html](samples/clean-project/report.html) Tests exist, CI does not [report.md](samples/missing-ci/report.md) [report.html](samples/missing-ci/report.html) CI exists, tests do not [report.md](samples/missing-tests/report.md) [report.html](samples/missing-tests/report.html) Odd file names, still a focused test [report.md](samples/unsafe-names/report.md) [report.html](samples/unsafe-names/report.html) Python, Java and Go skips [report.md](samples/multi-language/report.md) [report.html](samples/multi-language/report.html) This repository's own audit: [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). Supply evidence   The CLI will not run your tests. You run them, then describe the result. Minimum shape: json { \"schemaVersion\": \"1.0.0\", \"source\": \"local-executed\", \"command\": \"npm test\", \"executedAt\": \"2026-11-06T12:00:00Z\", \"exitCode\": 0, \"passed\": 37, \"failed\": 0, \"skipped\": 1 } source is local-executed when you ran it on a machine you control, or ci-ingested when the counts came from the CI log. Use external-unverified when you cannot stand behind the file; the gate will stay in review. bash node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json Check a file alone: bash node packages/cli/bin/pramanasutra.mjs verify --evidence evidence.json In this repository, node scripts/ci-gate.mjs runs the unit tests and builds that file from the summary. It does not hand-type the counts. Copy that pattern in your own CI rather than committing a stale evidence file. Choose a policy bash node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json --policy policies/strict.json Strict mode turns skipped tests into NO_GO . Recommended mode reports them and does not block on them. Write your own file with only the keys in the [technical reference](04-technical-reference.md). A typo in a key is an error, on purpose. Install the skills bash node packages/cli/bin/pramanasutra.mjs init --ide claude --target /path/to/your/app The target must already exist. The command copies folders"},{"t":"CLI and reports","u":"06-cli-and-reports.html","x":" CLI and reports Binary name: pramanasutra . From a clone: node packages/cli/bin/pramanasutra.mjs . Commands Command What it does Exit --- --- --- version , --version , -v Prints PramanaSutra AI and the version 0 help , --help , -h Prints usage 0 doctor [--json] Node major version, platform, offline, no model 0 if Node ≥ 20, else 1 agents list [--json] Canonical skill names 0 scan --path \u003cdir [--changed] [--out \u003cdir ] [--no-report] [--json] Static audit plus a gate with no evidence file. Same exit codes as release-check 0, 2, 3, or 1 release-check --path \u003cdir [--evidence \u003cfile ] [--policy \u003cfile ] [--changed] [--out \u003cdir ] [--no-report] [--json] Audit plus gate. This is the CI command 0, 2, 3, or 1 verify --evidence \u003cfile [--json] Schema-check an evidence file. Does not scan 0 or 1 init --ide \u003cname --target \u003cdir [--force] Copy skills. --ide is claude , cursor , codex , gemini , copilot , generic or all 0 or 1 --json prints the object instead of the sentence. For release-check --json , the process exit code is still the gate. Do not parse the exit code from the JSON alone; use releaseGate.decision if you need the word, and the process status if you need CI to fail. --evidence and --policy on scan are errors. They belong to release-check so a scan cannot quietly change meaning. Flags that take a value --path , --out , --ide , --target , --evidence , --policy . The value is the next argument. A missing value is an error. --force , --json , --no-report and --changed take no value. --changed is only meaningful on scan and release-check . Where files are written  Default: pramanasutra-reports under the current working directory , resolved to an absolute path at write time. The scanned project is not the default output location, so a scan of a foreign tree does not drop files into it. The four names are fixed: report.md , report.html , report.json , report.sarif.json . They are written in that order, in one directory, in one call. If the directory cannot be created, nothing is reported as success. SARIF is a rendering of the findings for other tools. The CLI does not upload it and does not fetch the SARIF schema. How to read report.md 1. The first table is identity: project base name, time, tool version, schema, Release decision , policy, evidence state. 2. The blockquote repeats the decision in a sentence. 3. Summary counts files, test files, workflows, manifests and findings by severity. It states that this tool did not execute tests. 4. Supplied test evidence is either an explicit \"no file\" or a table of source, command, time, exit code, passed, failed, skipped, and GitHub fields when present. Those numbers are from the file. They are not a new test run. The next paragraph is the binding: none (no file), unbound (no github object), or ci-environment (repository, commit, run id and workflow are all set). ci-environment is still not checked with GitHub. A person can type those four strings. 5. Findings at a glance is the table to paste into a review: severity, rule, path:line , fix. 6. Findings repeats each item with why it matters. 7. Test files seen and CI workflows seen show what the classification actually matched, up to 40 paths, then a count of the rest. 8. Capabilities translates not-run and not-supported . 9. Release gate reasons is the list that produced the decision. 10. Limitations includes walk limits, ignore exclusions, and the standing disclaimer. Characters that would be HTML in a file name are escaped in the Markdown too, so a hostile path does not become a tag when GitHub renders the file. How to read report.html Same sections, in the same order. The decision is a banner with a text label, not color alone. Stats are the counts. There is a skip link, a system light/dark theme, and a print style. No script is required to read it, and the file does not load a remote stylesheet or font. Open it from disk. Do not host the HTML from an untrusted scan on a site that other people browse if the report might contain internal paths. The tool strips the absolute target path, but evidence command , environment and commit are whatever the evidence file contained, escaped for HTML and still visible as text. How to read report.json Parse it. Do not scrape the Markdown. Fields are listed in the [technical reference](04-technical-reference.md). releaseGate.automatedDeploymentAuthorized is false. releaseGate.requiresHumanApproval is true. If your automation treats a ready decision as permission to deploy, it is ignoring those fields. Worked terminal session Against the focused-test fixture, from a clone: bash node packages/cli/bin/pramanasutra.mjs release-check --path fixtures/focused-test --no-report Expect exit code 2 and a line containing Gate: NO_GO and Tests executed by this tool: NO . The fixture is a bad example on purpose. The full rendered reports are already committed under [samples/focused-test](samples/focused-te"},{"t":"Rule catalog","u":"07-rule-catalog.html","x":" Rule catalog Rules are regular expressions on a single line of a file already classified as a test. They are not ASTs. Confidence is medium unless noted. Status on a finding is observed , which means \"the pattern matched\", not \"a test was executed\". A line that is a string in the middle of other code does not match, because the pattern is anchored at the start of the line (after whitespace). A line that is only the declaration does match. That is why a fixture string inside const fixture = 'test.only(...)' is not a finding, and a real test.only line is.  FOCUSED_TEST --- --- Severity high Default gate NO_GO when blockOnFocusedTests is true (the default) Why A focused test runs one case and silently drops the rest. CI can be green and meaningless Matches Line starts with optional await , then describe.only( , test.only( , it.only( , or fit( , fdescribe( Fix text Remove .only / fit / fdescribe , then execute the full suite Sample [samples/focused-test](samples/focused-test/report.md) Does not match test.only split across two lines, a custom wrapper such as only(test( , or a focused test in a language outside the pattern (for example Rust [ignore] is not this rule). A team that uses a helper named test.only for something else will get a false positive. SKIPPED_TEST --- --- Severity low Default gate Reported. Blocks only when blockOnSkippedTests is true ( policies/strict.json ) Why A skip can be an honest pending test or a buried failure. The tool cannot tell Matches describe.skip( , test.skip( , it.skip( , test.todo( , xit( , xtest( , xdescribe( Also matches @pytest.mark.skip , @pytest.mark.xfail (including skipif , because skip is a prefix), @unittest.skip... , @Ignore , @Disabled , t.Skip( and t.SkipNow( (Go), pytest.skip( , pytest.xfail( , self.skipTest( , raise unittest.SkipTest Fix text Confirm the skip is intended, tracked, and does not hide a required case Sample [samples/multi-language](samples/multi-language/report.md) (pytest decorator, JUnit @Disabled , Go t.Skip ) Does not match a skip buried in a helper, pending( in Mocha, it.skip if the call is not at the start of the line, or Rust [ignore] . @Disabled with a trailing word and a word boundary will not match @DisabledIf . NO_TESTS --- --- Severity medium Default gate REVIEW_REQUIRED when requireTests is true and the test list is empty Why The supported naming conventions found nothing. The project may still have tests under an unknown layout Evidence path is . , no line Fix text Confirm the framework location; add and execute relevant tests Sample [samples/missing-tests](samples/missing-tests/report.md) False positive: tests live in a folder this regex does not treat as tests, and none of the file names match. False negative: a file is named like a test and contains no assertions. The rule does not read assertions. NO_CI --- --- Severity medium Default gate REVIEW_REQUIRED when requireCi is true and no workflow file matched Recognises .github/workflows/ .yml and .yaml , .gitlab-ci.yml , Jenkinsfile , azure-pipelines.yml , bitbucket-pipelines.yml , .circleci/config.yml , .buildkite/pipeline.yml , .drone.yml , woodpecker.yml Does not recognise A CI config with another name, a workflow that exists only in a hosted UI, or a file that is present but never runs Sample [samples/missing-ci](samples/missing-ci/report.md) Finding a workflow file does not mean the workflow runs tests. The rule is presence, not semantics. NO_LICENSE --- --- Severity low Confidence high (it is a file name check) Default gate REVIEW_REQUIRED when requireLicense is true Recognises LICENSE , LICENSE.md , LICENSE.txt , COPYING at the repository root only, any case Sample [samples/multi-language](samples/multi-language/report.md) includes this finding together with the skips A license inside docs/ or a package.json \"license\" field without a file is not detected. The recommendation is to review intended licensing, not to invent a license the project did not choose. Gate interaction Blocking findings are evaluated before evidence. A high finding (or a focused test while that block is on, or a skip while the strict block is on) is NO_GO even if evidence passes. If nothing blocks and evidence is failing , the decision is still NO_GO . Only then does the gate look at missing evidence, a partial scan, missing tests, missing CI and a missing license. Any of those yield REVIEW_REQUIRED . If none of them fire, the decision is READY_FOR_HUMAN_APPROVAL . Adding a rule Do not add a rule that the tests do not lock with a true positive and a false positive. The [maintainer guide](15-maintainer-guide.md) is the procedure. Update this page in the same change, then rebuild the HTML. "},{"t":"Skills and agents","u":"08-skills-and-agents.html","x":" Skills and agents Canonical files: .agents/skills/\u003cname /SKILL.md . agents list reads that tree. init copies it. Editing a copy inside .claude or .cursor and not the canonical file will be overwritten on the next forced install, and will not ship. The skills are instructions. They are not models, not processes, and not a guarantee. A host that does not load SKILL.md will not follow them. Live loading has not been smoke-tested in each IDE. See [Roadmap](13-roadmap-and-status.md). Shared contract Every skill in this repository is required by test to: - start with YAML frontmatter - set name equal to the directory name - include a description - include a Safe workflow section that is not a copy of another skill's workflow - tell the model not to fabricate, claim, or approve results it does not have Each workflow is a different procedure: prime routes one lane, strategy picks the lane, unit reads focused-test markers, flow reads a written journey, api reads a contract, visual reads an attached image note, access reads source text, load reads a written budget, data reads a named fixture, secure reads a pasted diff for literals, regression reads a --changed report, flake reads a pasted rerun log, defect quotes a pasted error, pipeline reads the workflow files the scan listed, release runs release-check only when asked, evidence reads the JSON, verify compares verify output to saved stdout. None of them run a suite, open a browser, or sign a file. If an assistant using these skills claims \"all tests passed\" and cannot point at a command and an output, it is breaking the skill. Prefer the CLI report. The roster  Skill Job --- --- pramanasutra-prime Coordinates inspection, QA strategy, evidence review and a release recommendation. Does not approve a deploy pramanasutra-strategy Risk-based quality strategy and traceability from requirement to test pramanasutra-unit Focused, deterministic unit and component tests with real assertions pramanasutra-flow Cross-system and end-to-end scenarios that can be repeated pramanasutra-api REST, GraphQL, gRPC and event contracts, and whether tests cover them pramanasutra-visual Screenshot baselines and rendering gaps. Does not take screenshots by itself pramanasutra-access Accessibility and cross-device planning, including manual checks pramanasutra-load Performance test design, thresholds and abort rules. Not a license to load-test production pramanasutra-data Migration, backup, rollback and fixture review pramanasutra-secure Security-test gaps from evidence. Not a penetration test pramanasutra-regression What changed, and which tests are relevant pramanasutra-flake Nondeterministic tests, using a reproduction, not a hunch pramanasutra-defect A failure turned into a minimal reproduction pramanasutra-pipeline Whether automation and gates mean what the team thinks pramanasutra-release Criteria, rollout and rollback. Human approval stays human pramanasutra-evidence Reports and evidence that stay traceable and avoid leaking secrets pramanasutra-verify Challenges the gate before someone approves Install paths Host Path Verified live in that host? --- --- --- Claude Code .claude/skills No Cursor .cursor/skills No OpenAI Codex .agents/skills No GitHub Copilot .github/skills No Gemini CLI .gemini/skills No Generic .agents/skills No Product names belong to their owners. Listing a path is compatibility information, not an endorsement and not a partnership. See [Legal](10-legal-and-compliance.md). How Prime is meant to delegate The skill text tells the model to delegate to a specialist only if the host supports delegation, and otherwise to do the stages in order. PramanaSutra does not implement an orchestrator process. There is no message bus. \"Agent team\" in the README means seventeen instruction files and one chief file, not seventeen running programs. What to put in a prompt Name the skill, name the repository, and restate the two rules that matter most: cite file and line, and do not claim a test ran unless a tool returned that result. Ask it to read report.md if you have already produced one. Do not paste production secrets into the prompt. The skill tells the model not to collect secrets; the prompt should not hand them over anyway. Changing a skill Edit .agents/skills/\u003cname /SKILL.md . Keep the frontmatter name equal to the folder. Keep the safe workflow. Run npm test . The test reads every skill. Copies in a target project are not updated until someone runs init again with --force after review. "},{"t":"Security and privacy","u":"09-security-and-privacy.html","x":" Security and privacy PramanaSutra is not a SAST product, not a secret scanner, and not a penetration test. This page describes how the CLI and the skills are built to avoid a class of mistakes. It is not a claim that the software has been attacked by a third party and found clean. It has not had an independent security review. Assets Asset Why it matters --- --- The target source tree May contain proprietary code. The scanner reads it Evidence and policy files May contain commands, host names, commit ids The report Repeats finding paths and the evidence fields. People forward it Skill text Tells a model how to behave. A hostile edit changes the assistant's instructions The machine running the CLI The process has the user's filesystem rights What the CLI does not do - It does not open a socket as part of scan, gate, report or install. (The documentation HTML also does not load a third-party script. npx itself uses the network to download the package; that is npm, not the scan.) - It does not execute the target's tests, package scripts, or binaries. - It does not follow symlinks, so a link cannot pull in a directory outside the tree. - It does not walk into a path that contains a symlink component during install. - It does not put the absolute target path in the report. It stores the base name. - It escapes report text so a file name or an evidence command cannot inject a tag. Controls Threat Control --- --- Accidental execution of repo code No test runner in the CLI. Evidence is data Symlink escape while scanning lstat / Dirent symlink check, skip, count Symlink escape while installing skills Walk the destination, refuse if any component is a symlink Overwriting a team's own skills Refuse when the destination exists, unless --force Policy that allows unattended deploy Loader rejects allowAutomatedDeployment: true Tampered evidence promoted to \"ready\" external-unverified cannot reach ready. This does not detect a lie in a ci-ingested file HTML injection via a crafted file name escapeHtml on every interpolated value. Tested Markdown injection of the same name \u003c and escaped in the Markdown renderer Ignore file used as a path traversal Entries containing .. or an absolute path throw Huge input Size caps on evidence, policy, ignore, and per test file Binary mistaken for source NUL byte skips the file and marks the scan partial, so the gate cannot be ready Secrets in a report The tool does not redact. Do not put secrets in the evidence command or environment . The evidence skill tells the model the same Privacy The CLI does not phone home, does not have an analytics hook, and does not write a user id. Data stays in the process and in the output directory you chose. You can still leak data yourself: - The evidence file's command , environment and commit are copied into the report. - Finding paths are relative and can still reveal internal layout. - If you paste a report or a skill prompt into a hosted model, that provider processes it under their terms. PramanaSutra does not control that. - init copies skill files into the target. Those files are project content, not telemetry. The HTML documentation uses localStorage only if you toggle the theme, and only in that browser. Search runs on the page. Nothing is sent. GitHub Pages serves a copy of the HTML. That is a public site of this public repository. Do not put private audit output into docs/ . Residual risk - Heuristic rules miss vulnerabilities entirely. Do not use a ready gate as a security sign-off. - A person can write ci-ingested evidence that does not match any CI run. The schema cannot prove the command happened. - --out writes wherever the operator points. That is intended. Point it at a directory you mean to create. - init --force deletes an existing skill directory and replaces it. Read the diff first. - Skill files are instructions to a model. Review them like code before you install them into a repository with secrets in context. - Dependencies: there are none at runtime. The GitHub Actions workflows pin actions/checkout and actions/setup-node to commit SHAs. CodeQL actions are still on the v4 major tag; Dependabot is configured. Reporting a vulnerability Use GitHub private vulnerability reporting on [the repository](https://github.com/shahvatsalofficial/pramanasutra-ai). Do not open a public issue with an exploit, a token, or customer data. The policy file is SECURITY.md . CodeQL The CodeQL workflow runs on push to main , on pull requests, and weekly. A green CodeQL check is the queries that shipped with that action, on this JavaScript. It is not a full application assessment. "},{"t":"Legal and compliance","u":"10-legal-and-compliance.html","x":" Legal and compliance Important: This page is a project notice written so users and reviewers can see what has and has not been checked. It is not legal advice, not a lawyer's opinion, and not a compliance attestation. Have a qualified lawyer review trademark, export, and regulated-industry use before you bet a company name or a certification on this project. License The source is Apache License 2.0. The full text is [LICENSE](../../LICENSE). [NOTICE](../../NOTICE) attributes the work to Vatsal Shah. Contributors keep the attribution the license requires. Apache-2.0 is a permissive license with a patent grant and a requirement to keep notices. It is not a warranty. The license's disclaimer of warranty and limitation of liability apply. The software is provided \"AS IS\". Third-party code Version 0.3.6 has no runtime npm dependencies and does not vendor third-party libraries inside packages/cli . [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md) records that. If a later change adds a dependency, that file has to change in the same commit. Documentation pages use system fonts and no remote script, so the HTML does not pull in a font license or a CDN library. GitHub Actions are third-party workflows pinned by SHA for checkout and setup-node. Their licenses are their own. Using them does not copy their source into this repository. Names that are not ours Claude, Claude Code, Cursor, OpenAI, Codex, GitHub, Copilot, Google, Gemini, Node.js, npm, Jest, pytest, JUnit and the other product names in the docs are used to describe compatibility. They are the property of their owners. This project is not affiliated with, endorsed by, or sponsored by those owners. Do not write marketing that implies otherwise. The name PramanaSutra \"PramanaSutra\" and \"PramanaSutra AI\" are project names used by Vatsal Shah. As of this version: - They are not described here as registered trademarks. - A clearance search of trademark registers, domains and package names has not been completed for this project. - No filing is claimed. Before a company adopts the name in commerce, a trademark lawyer should search the classes that matter (commonly Nice classes 9 and 42 for software and software services, plus the countries where the name will be used) and should search package registries and domains. This document cannot do that search, and a previous draft that said the same thing is still the accurate status. The Sanskrit word pramana is used here in its ordinary meaning, \"valid proof\" or \"means of knowledge\", as a project metaphor. That sentence is an explanation of the name, not a claim of exclusive rights over the word. What the output is A report is decision support. It is not: - a certification of quality, security, accessibility or compliance - an audit opinion under any professional standard - a representation that tests passed, unless the evidence block is quoting a file the operator supplied - legal advice about the scanned project - permission to ship Do not attach a PramanaSutra report to a regulatory submission as if it were an independent assessment. Privacy laws The CLI does not operate a service and does not collect accounts. If you put personal data into an evidence file or you scan a repository that contains personal data, you are the one processing it. The report will copy evidence fields through. Strip them before you publish a report. The public documentation site contains no customer data. Acceptable use The skills forbid destructive actions, unapproved production load tests, secret collection and publishing. Use the CLI on trees you are allowed to read. Do not point it at systems you do not own in order to interfere with them. The tool's refusal to execute target tests is a safety property; do not wrap it in a script that then runs arbitrary repository code unless that is already your CI and you accept that risk there. Regulated industries If the scanned product is medical, financial, aviation, or otherwise regulated, a heuristic QA gate is not your validation record. Keep the validation process your regulator already requires. This project does not claim IEC 62304, ISO 13485, SOC 2, FedRAMP, PCI-DSS, HIPAA, or any other program. Export This repository is a local source scanner and a set of text files. It does not implement cryptography as a product. This sentence is not an export classification. If your counsel needs a classification, ask them, with the source in front of them. What a lawyer should still be asked 1. Is \"PramanaSutra\" available for the goods and countries you care about? 2. Does your use of the Apache-2.0 project, including NOTICE, match how you distribute it? 3. If you publish reports from private repositories, what do they disclose? 4. If a customer will rely on a gate in a contract, what warranty are you accidentally giving? The upstream license gives none. Your contract might. Contact Security reports: [Security and privacy](09-security-and-privacy.md) and SECURITY.md . Other maintainer contact i"},{"t":"Testing and proof","u":"11-testing-and-proof.html","x":" Testing and proof Trust the files, then the prose. If they disagree, the files win, and this page is stale. Artifact What it is --- --- [proof/test-results.txt](proof/test-results.txt) The stdout of node --test --test-reporter=spec tests/cli.test.mjs , with the Node version and OS on the first lines [proof/eval-results.json](proof/eval-results.json) Per-fixture expected rules versus found rules, plus precision and recall on those fixtures [audit/report.md](audit/report.md) Release check of this repository using that test run as evidence [audit/report.html](audit/report.html) The same audit [samples/](samples) The six fixtures rendered to Markdown, HTML and JSON Regenerate all of them with: bash node scripts/generate-proof.mjs The sample reports pin generatedAt to 2026-11-06T00:00:00.000Z so a review is not a wall of timestamp noise. The test-results file is not pinned. It is the command output. Captured unit run  On the run captured for version 0.3.6 the summary was: - tests: 43 - pass: 43 - fail: 0 - skipped: 0 nested symlink is skipped rather than followed now runs on this Windows machine. A real symlink is refused, so the test creates a directory junction and checks the scanner does not follow it. On a machine that allows symlinks, the same test uses a symlink. Do not quote \"43 passed\" as a universal CI number. Quote the file, and quote the CI run for Ubuntu and Windows. The command does not use a network and does not need npm install . What the tests lock The suite in tests/cli.test.mjs covers doctor, the 17 skills' frontmatter and distinct Safe workflow bodies, focused and skipped tests, missing tests/CI/license, CircleCI recognition, shared scan and release-check exit codes, HTML and Markdown escaping, default report paths, SARIF 2.1.0, evidence classification, the unbound and ci-environment binding sentences, --changed when git is unavailable, policy rejection, Java/C /Ruby file names, the multi-language fixture, ignore-file traversal, binary test files, and pytest.skip / test.todo . It does not cover a live IDE. It does not measure recall on a corpus the author did not write. Labeled fixtures Fixture Expected rules Expected gate --- --- --- fixtures/clean-project none READY_FOR_HUMAN_APPROVAL (its evidence.json is passing and ci-ingested ) fixtures/focused-test FOCUSED_TEST NO_GO fixtures/missing-ci NO_CI REVIEW_REQUIRED fixtures/missing-tests NO_TESTS REVIEW_REQUIRED fixtures/unsafe-names FOCUSED_TEST NO_GO fixtures/multi-language SKIPPED_TEST three times, NO_CI , NO_LICENSE REVIEW_REQUIRED eval-results.json records true positives, false positives and false negatives against that table. A value of 1.0 for precision and recall means every expected rule was found and no extra rule was found in these six trees . The file's caveat field says the fixtures were written by the rule author. Repeat that caveat wherever you quote the ratio. It is a regression lock. Self-audit generate-proof.mjs scans the repository root, attaches evidence built from the test summary ( source: local-executed , counts copied from the reporter, not typed), and writes documents/pramanasutra/audit . .pramanasutraignore excludes fixtures/ and examples/sample-app/ because those trees contain deliberate test.only lines. The limitation section of the audit says they were excluded. Read that section or you will misread a ready gate. The HTML documentation is generated after the audit file. A file count in the audit does not include pages that did not exist yet. Run npm run proof again after a large file add if you need the count to match the tree you are looking at. node scripts/ci-gate.mjs is the same idea for CI: run the tests, parse pass and fail from the reporter, refuse to continue if the summary cannot be parsed, then release-check this repo. Exit code is the gate. On the maintainer run that gate was READY_FOR_HUMAN_APPROVAL with 0 findings. CI must show the same for the commit you care about. Do not paste this sentence over a red Actions run. What would falsify the claims - A unit test fails. The claim \"37 passed\" is then false for that run. - A fixture in the table gains or loses a rule. eval-results.json will show pass: false and the script exits 1. - ci-gate cannot parse the reporter. It exits 1 and writes no ready evidence. That is preferred to a made-up count. - A ready gate appears while releaseGate.evidenceState is not passing . That would be a defect. The tests forbid it for the cases they construct. Not in this proof Field accuracy, mutation testing, a comparison against a commercial SAST tool, performance on a monorepo of tens of thousands of files beyond the documented caps, and any IDE transcript. Those are absent, not implied. "},{"t":"CI and release","u":"12-ci-and-release.html","x":" CI and release Workflows in this repository  File What it gates Badge --- --- --- .github/workflows/ci.yml Ubuntu and Windows, Node 20, 22 and 24. Unit tests, doctor , then scripts/ci-gate.mjs . Does not publish The CI badge on the README .github/workflows/publish.yml On a GitHub Release: npm test , then npm publish --provenance for the unscoped package pramanasutra None. It is not a required check .github/workflows/codeql.yml CodeQL javascript-typescript on Ubuntu CodeQL badge .github/dependabot.yml Update PRs for Actions None actions/checkout and actions/setup-node are pinned to commit SHAs. Timeouts are 20 minutes. Concurrency cancels a superseded run on the same ref. Why macOS is not scheduled On 4 November 2026, Actions run [41884015367](https://github.com/shahvatsalofficial/pramanasutra-ai/actions/runs/41884015367) finished as a failure. Ubuntu and Windows jobs succeeded. Both macos-latest jobs were cancelled with zero steps . They never checked out the repo. That failure painted the only CI badge red. A separate macos-14 workflow was tried on the 0.3.0 push. Run [42098256304](https://github.com/shahvatsalofficial/pramanasutra-ai/actions/runs/42098256304) cancelled both jobs in about a second. runner_name was empty. No step ran. Scheduling that workflow again would only add a red badge. It was removed. macOS test execution in GitHub Actions is unverified . The unit suite has been run on the maintainer's Windows machine, and the required workflow covers Ubuntu and Windows. What the gate job proves scripts/ci-gate.mjs : 1. Runs node --test --test-reporter=spec tests/cli.test.mjs . 2. Reads the last pass and fail counts from that output. 3. If it cannot read them, exits 1. It does not invent a passing evidence file. 4. Writes a temporary evidence file with source: ci-ingested and those counts. When GITHUB_REPOSITORY , GITHUB_SHA , GITHUB_RUN_ID and GITHUB_WORKFLOW are all set, it also writes github with those four strings. The report then says ci-environment . That is not a signature. A checkout outside Actions omits github , and the report says unbound . 5. Runs release-check on the repository root with that file. 6. Exits with the gate code. Because fixtures/ and examples/sample-app/ contain intentional focused tests, they are listed in .pramanasutraignore . The gate is about the product, and the report names the exclusion. A pull request that adds test.only under tests/ or packages/ fails this job with exit 2. Use it on your repository Run your tests in the job you already trust. Then either: - call your own small script that writes evidence from that output, the way ci-gate.mjs does, or - fail only when you are ready to maintain an evidence file Example pattern, after your tests have already run and you have written evidence.json honestly: yaml - name: PramanaSutra release check run: npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports Exit 2 fails the step. Exit 3 also fails a step, because it is non-zero. If you want review to be a comment and only NO_GO to be red, branch on the status in the shell and upload report.md as an artifact either way: bash set +e npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports code=$? set -e if [ \"$code\" -eq 2 ]; then exit 2; fi if [ \"$code\" -eq 1 ]; then exit 1; fi exit 0 Exit 3 is then visible in the log and the report, and the job stays green. Do this on purpose. Do not \"fix\" a red gate by deleting findings. Upload pramanasutra-reports/report.md and report.html as build artifacts so reviewers can read them without re-running. GitHub Pages Pages serves the /docs directory on main . scripts/build-docs.mjs writes the site to documents/pramanasutra/html and copies it to docs/ , including index.html , sitemap.xml and robots.txt . Old handbook URLs under docs/handbook/ redirect to the new pages. The site URL is https://shahvatsalofficial.github.io/pramanasutra-ai/ . robots.txt allows general crawlers and names common answer-engine crawlers as allowed. The content is public documentation. Do not put a private report in docs/ . Releasing this project 1. Update package.json , CHANGELOG.md and CITATION.cff to the same version. 2. node --test tests/cli.test.mjs 3. node scripts/generate-proof.mjs 4. node scripts/build-docs.mjs 5. Read documents/pramanasutra/audit/report.md . If the gate is not what you expect, stop. 6. Commit, push to main . 7. Wait until the required CI workflow is green. Do not claim macOS CI passed. 8. On npm, as user shahvatsal , add a trusted publisher for shahvatsalofficial/pramanasutra-ai workflow file publish.yml . Do this once. 9. gh release create vX.Y.Z with the changelog as notes. That event runs publish.yml . npm name is the unscoped package pramanasutra . @shahvatsal/pramanasutra@0.3.1 was published and"},{"t":"Roadmap and status","u":"13-roadmap-and-status.html","x":" Roadmap and status Status words mean only what they say. Implemented has a command or file and a test or a committed artifact. Planned is a directory, a sentence, or an intention. It does not run. Not claimed is something people might assume that this project refuses. Implemented in 0.3.6 Capability Evidence --- --- CLI: version, doctor, agents, scan, release-check, verify, init packages/cli , npm test Offline static rules in the [catalog](07-rule-catalog.md), including CircleCI, Buildkite, Drone and Woodpecker file names Unit tests and six fixtures Evidence ingestion and fail-closed policy Unit tests, policies/ Evidence binding sentence: none , unbound , or ci-environment Unit test. ci-environment is not a signature report.md , report.html , report.json , report.sarif.json written together Unit tests, samples/ , audit/ --changed lists git diff names and says when git is unavailable Unit test. Not a test selector scan and release-check exit 2 or 3 for a failing gate. Exit 0 is READY_FOR_HUMAN_APPROVAL only Help text and packages/cli/bin/pramanasutra.mjs .pramanasutraignore Unit test, this repo's ignore file 17 skills with distinct Safe workflow sections Installer tests and the uniqueness assertion Required CI on Ubuntu and Windows, Node 20, 22 and 24, with a real release gate .github/workflows/ci.yml CI gate writes github when the four GITHUB_ variables exist scripts/ci-gate.mjs macOS in GitHub Actions Not scheduled. Runs 41884015367 and 42098256304 cancelled with zero steps CodeQL workflow .github/workflows/codeql.yml Documentation site with a product front page plus this handbook scripts/build-docs.mjs Public GitHub repository https://github.com/shahvatsalofficial/pramanasutra-ai npm publish workflow .github/workflows/publish.yml . It has not been proven by a green run. A GitHub Release is what starts it, and npm must already list this repo as a trusted publisher Planned These README-level packages exist as notes only. The CLI does not import them. Item Not yet --- --- Executing the target's tests Would run arbitrary code. Needs an explicit, separate, opt-in design Browser and device checks No driver is bundled Accessibility measurement The access skill plans. It does not score Performance measurement The load skill plans. It does not generate load Coverage, flake detection from history, mutation testing No storage, no history SBOM and SLSA provenance No release attestation workflow A long-running server or a local model adapter packages/server is a note Live smoke test in each IDE Install paths only Not claimed Claim Why it is absent --- --- Certification or compliance Reports say they are decision support Independent security review None has been commissioned Trademark clearance [Legal](10-legal-and-compliance.md) Field precision equal to the fixture score The fixture score is a regression lock macOS CI passed Those jobs never started a runner npm package @vatsalshah/pramanasutra Registry returned 404. The account is shahvatsal Signed or GitHub-verified evidence ci-environment only echoes four strings. verify checks schema. A person can still type them The twelve packages/ notes ( runner , server , reporter , quality-gates , release , impact , integrators , evidence , discovery , core , static-audit , test-generation ) READMEs only. The CLI does not import them The assistant always obeys the skill The host is outside this process Near-term work, in order 1. Keep the required CI green on Ubuntu and Windows. Add macOS back only when a runner actually starts and the log shows test output. 2. Confirm npm view pramanasutra version matches package.json after each release. Do not publish @vatsalshah/pramanasutra . 3. One live smoke note per IDE: did init land where the host reads, and did a trivial prompt cite a file. Until that note exists, the compatibility table stays \"not verified\". 4. A rule only with a true-positive fixture and a false-positive fixture. No drive-by patterns. Compatibility summary Environment Status --- --- Node 20, 22 and 24 on Ubuntu and Windows in CI Required workflow. Trust the latest green run, not this sentence Node on the maintainer's Windows machine The captured proof file macOS in CI Not scheduled. Unverified Claude Code, Cursor, Codex, Copilot, Gemini CLI Copy paths implemented. Behavior not verified Older handbook pages under docs/handbook/ .md are earlier write-ups. The numbered files in this folder are the ones to update. "},{"t":"FAQ and glossary","u":"14-faq-and-glossary.html","x":" FAQ and glossary Questions Is this a test framework? No. It reviews test hygiene and release evidence. Keep Jest, pytest, JUnit, Go test, Playwright or whatever you already run. PramanaSutra reads the result only when you pass an evidence file. Does the scan send my code anywhere? No. The scan, the gate, the report writer and the skill installer do not open network connections. npx downloads the tool before it runs; that download is npm. After the process starts, the audit stays local. Why is the gate REVIEW_REQUIRED when I can see tests? Because nobody passed --evidence , or the evidence is unverified, or it records zero passes, or the scan was partial, or CI or a license file is missing under the policy. A clean reading of the files is not a test run. That split is the point of the tool. Why did a clean scan still not say ready? READY_FOR_HUMAN_APPROVAL requires passing local-executed or ci-ingested evidence and the policy's static checks. No evidence file means not ready. See the clean-project sample, which includes an evidence file, versus any scan without one. Can I turn off the human? No. automatedDeploymentAuthorized is always false, and the policy loader rejects an attempt to set it true. The ready state means \"a person may now look\", not \"ship it\". The HTML and the Markdown disagree. Which is wrong? They are written from the same object in one function. If they disagree, it is a bug. Open report.json for the object. Please report it. It flagged test.only inside a string. The pattern matches a line that starts with the declaration, after whitespace. A string later on the line does not match. A line whose first code is test.only( does match, even if a human considers it data. Move the sample off the start of the line, or exclude the path in .pramanasutraignore if it is a fixture tree. Do not ignore your real tests to silence a true positive. It did not see my tests. The naming rules are in the [technical reference](04-technical-reference.md). A custom folder that matches none of them produces NO_TESTS . That finding means \"not recognised\", not \"proven absent\". Does a green CI file mean the tests ran? No. NO_CI checks that a known file exists. It does not read the workflow steps. Is the skill going to edit my repository? Only if you ask the assistant to and the host allows it. The skill text says to ask before running tests or changing files. The CLI scan and release-check do not edit the target. init writes only the skill directories you named. Which IDE was tested? None end to end. The installer copies into documented paths. [Roadmap and status](13-roadmap-and-status.md) keeps the \"verified live\" column on No until there is a note. Is the name trademarked? Not as far as this project claims, and no clearance search has been completed. Details: [Legal](10-legal-and-compliance.md). Where is the audit of PramanaSutra itself? [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html). How do I cite it? [CITATION.cff](../../CITATION.cff) at the repository root. Glossary Term Meaning --- --- Agent Skill A SKILL.md file an IDE may load as instructions. Not a running process Prime pramanasutra-prime , the coordinating skill Static finding A rule matched source text. Status observed Evidence A JSON file describing a test command someone already ran Evidence state absent , failing , inconclusive , unverified , or passing Gate The release decision derived from findings, evidence and policy NO_GO Do not release on this output. Exit 2 REVIEW_REQUIRED A person must look, or inputs are missing. Exit 3 READY_FOR_HUMAN_APPROVAL Policy checks passed. A person still approves. Exit 0 Partial scan The walk hit a limit or could not read something. Cannot be ready Policy JSON that turns optional strictness on or off, and cannot enable auto-deploy Capability A named activity and whether this run executed it, skipped it, or cannot do it Ignore file .pramanasutraignore , prefixes excluded from the walk, disclosed in limitations Focused test A declaration that runs a subset ( .only , fit , fdescribe ) Base name The last segment of the scanned directory. The report does not store the full path "},{"t":"Maintainer guide","u":"15-maintainer-guide.html","x":" Maintainer guide Layout a maintainer actually edits Path Edit when --- --- packages/cli/lib/scanner.mjs Rules, walk limits, gate logic, ignore file packages/cli/lib/evidence.mjs Evidence schema packages/cli/lib/policy.mjs Policy keys packages/cli/lib/report.mjs Wording or layout of report.md and report.html packages/cli/bin/pramanasutra.mjs Flags and exit codes packages/cli/lib/installer.mjs IDE paths .agents/skills/ Skill text. This is the canonical copy tests/cli.test.mjs Every behavior change fixtures/ A labeled tree for a rule. Excluded from the product gate by .pramanasutraignore documents/pramanasutra/ .md These pages. Then rebuild HTML scripts/generate-proof.mjs How samples and the self-audit are produced scripts/ci-gate.mjs How CI turns a test run into evidence scripts/build-docs.mjs HTML chrome. The words live in the Markdown packages/ other than cli are notes. Do not import them from the CLI until they have tests and a status-page change from planned to implemented. Change a rule 1. Write the smallest fixture that should match, and one that should not. 2. Add or extend a test in tests/cli.test.mjs before you celebrate the regex. 3. Change scanner.mjs . 4. Add the rule to [the catalog](07-rule-catalog.md) in the same change, including what it misses. 5. Run node --test tests/cli.test.mjs . 6. Run node scripts/generate-proof.mjs so samples and eval-results.json match. 7. If the self-audit gate changes, read why before you commit it. A new NO_GO on the product itself means the rule hit the product, not only the fixture. Fixtures are ignored. Product tests are not. Do not weaken a test to match a sloppy pattern. Do not special-case this repository inside the scanner. Use .pramanasutraignore for example trees, and keep the limitation text. Change the report markdown() and html() must show the same decision, the same location, and the same fix. The tests look for NO_GO , a path:line , and the remediation sentence. Escaping is not optional: a new interpolated field goes through escMd or escapeHtml . Add a hostile string to the escape test when you add a field. Keep the report free of remote URLs for CSS, fonts and scripts. It is opened from disk and it is quoted as local. Change the docs Edit the numbered Markdown. Do not hand-edit documents/pramanasutra/html or the mirrored files under docs/ . Those are generated. bash node scripts/build-docs.mjs The script also writes redirects from the old docs/handbook/ .html names. If you rename a page, update the moved map in the script or the old URL 404s on Pages. Pages must stay readable without JavaScript: the article HTML is server-side (here, build-time). JavaScript only adds search, theme and copy buttons. Checks before a commit that claims a fix bash node --test tests/cli.test.mjs node scripts/ci-gate.mjs node scripts/generate-proof.mjs node scripts/build-docs.mjs ci-gate runs the tests again. That is deliberate. It is the path CI uses. Release Follow [CI and release](12-ci-and-release.md). Version strings that must move together: package.json , CHANGELOG.md , CITATION.cff . The CLI reads the version from package.json at runtime, so the help text does not have its own copy. The docs site prints package.json too. Do not commit reports/ or pramanasutra-reports/ . They are gitignored local output. Do commit documents/pramanasutra/audit and samples , because those are the public proof. Reviewing someone else's change - A new ready-path without a test is a defect. - A claim of IDE support, certification, or trademark clearance in a doc page is a defect unless the artifact exists. - A dependency added \"to make the HTML nicer\" needs a third-party notice and a reason that beats the zero-dependency promise. System fonts and inline CSS are the current answer. - Generated HTML that does not match the Markdown means the generator was not run. Ask for the rebuild. Do not patch the HTML by hand. Secrets Do not commit .env , tokens, or a real customer tree as a fixture. The unsafe-names fixture uses punctuation in a file name on purpose. It is not a credential. "},{"t":"Real-world scenarios","u":"16-real-world-scenarios.html","x":" Real-world scenarios Every command on this page was run against a committed project in fixtures/ of this repository. The terminal output is copied, not written by hand. Where a picture helps, it is drawn from the same facts. Note: Nothing here runs your tests. In each story the tests are run by your own tool. PramanaSutra reads the project and reads the result you hand it. The eight stories at a glance Story Who feels it What PramanaSutra does --- --- --- --- 1 A stray test.only before Friday's release Developer Finds it by line and blocks with NO_GO 2 \"The AI said all tests pass\" Tech lead Refuses to treat a claim as evidence 3 The pull-request gate Team Fails the build with an exit code and a readable report 4 Skipped tests pile up QA lead Lists every skip in three languages, can block on them 5 The pasted \"passing\" JSON Release manager Labels how much the evidence can be trusted 6 A legacy service with no tests New owner Says plainly that nothing was found, not that it is fine 7 A repository with hostile file names Security reviewer Scans safely and escapes every name in the report 8 Teaching your AI IDE the method Any developer Installs 17 skills and shows the prompt to use Story 1: the stray test.only The situation. It is 16:40 on a Friday. A developer was debugging one test and typed test.only . The build is green because the runner now executes one test. Nobody notices.  What you run. bash npx pramanasutra release-check --path fixtures/focused-test What you see. text PramanaSutra release-check: 4 file(s), 1 test file(s), 1 finding(s). Gate: NO_GO. Tests executed by this tool: NO. Evidence: absent. exit=2 What the report says ( report.md , trimmed): text high FOCUSED_TEST tests/a.test.js:2 Remove .only / fit / fdescribe, then execute the full suite. What you do. Delete .only on line 2, run your full suite, write the result to an evidence file, and run the check again. See [story 2]( story-2-the-ai-said-all-tests-pass) for that last step. Why it matters. A focused test is the cheapest way to lose coverage without any alarm. The scanner reads the line, not the runner's summary, so it still sees the problem when the build is green. Story 2: \"the AI said all tests pass\" The situation. An assistant summarised a pull request and wrote \"all tests pass\". There is no log. You need to know whether to believe it.  Step 1: check the project without evidence. bash npx pramanasutra release-check --path fixtures/clean-project text PramanaSutra release-check: 6 file(s), 1 test file(s), 0 finding(s). Gate: REVIEW_REQUIRED. Tests executed by this tool: NO. Evidence: absent. exit=3 A clean project with no findings still stops at REVIEW_REQUIRED . The reason is in the report: No executed-test evidence supplied. Step 2: run the tests yourself, then describe the result. json { \"schemaVersion\": \"1.0.0\", \"source\": \"ci-ingested\", \"command\": \"npm test\", \"executedAt\": \"2026-11-01T10:00:00Z\", \"exitCode\": 0, \"passed\": 1, \"failed\": 0 } bash npx pramanasutra verify --evidence evidence.json npx pramanasutra release-check --path fixtures/clean-project --evidence fixtures/clean-project/evidence.json text Evidence valid: source=ci-ingested, passed=1, failed=0, exitCode=0. Provenance is only as trustworthy as its source. PramanaSutra release-check: 6 file(s), 1 test file(s), 0 finding(s). Gate: READY_FOR_HUMAN_APPROVAL. Tests executed by this tool: NO. Evidence: passing. exit=0 The lesson. The first answer was REVIEW_REQUIRED for a project that really was fine. That is the design. Being right without proof does not count. Important: READY_FOR_HUMAN_APPROVAL is not a deploy order. The gate always records requiresHumanApproval: true and automatedDeploymentAuthorized: false . Story 3: the pull-request gate The situation. Your team wants every pull request to prove its tests ran before a person reviews it.  This repository does exactly that. The CI workflow runs the real tests on Ubuntu and Windows with Node 20, 22 and 24. Then scripts/ci-gate.mjs reads the real test output, writes an evidence file, and runs release-check on the repository. yaml - run: npm test - name: Release gate on this repo, using the test run as evidence run: node scripts/ci-gate.mjs On the latest run all six jobs passed. A red step means the process stopped there: exit 2 is a blocker, exit 3 is missing evidence. A person reads report.html and decides. Tip: Upload the pramanasutra-reports folder as a CI artifact so reviewers can open the HTML report from the pull request. Read [CI and release](12-ci-and-release.md) for the full wor"}];</script>
|
|
132
|
+
<script>const root = document.documentElement;
|
|
133
|
+
const store = {
|
|
134
|
+
get: (k) => { try { return localStorage.getItem(k); } catch { return null; } },
|
|
135
|
+
set: (k, v) => { try { localStorage.setItem(k, v); } catch { /* private mode */ } }
|
|
136
|
+
};
|
|
137
|
+
const saved = store.get('ps-docs-theme');
|
|
138
|
+
if (saved === 'light' || saved === 'dark') root.setAttribute('data-theme', saved);
|
|
139
|
+
function currentTheme() {
|
|
140
|
+
return root.getAttribute('data-theme') || (matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
141
|
+
}
|
|
142
|
+
document.querySelector('.theme-btn')?.addEventListener('click', () => {
|
|
143
|
+
const next = currentTheme() === 'dark' ? 'light' : 'dark';
|
|
144
|
+
root.setAttribute('data-theme', next);
|
|
145
|
+
store.set('ps-docs-theme', next);
|
|
146
|
+
});
|
|
147
|
+
const menu = document.querySelector('.menu-btn');
|
|
148
|
+
const sidebar = document.getElementById('sidebar');
|
|
149
|
+
menu?.addEventListener('click', () => {
|
|
150
|
+
const open = sidebar?.classList.toggle('open');
|
|
151
|
+
menu.setAttribute('aria-expanded', String(Boolean(open)));
|
|
152
|
+
});
|
|
153
|
+
document.querySelectorAll('.copy').forEach((btn) => {
|
|
154
|
+
btn.addEventListener('click', async () => {
|
|
155
|
+
const code = btn.parentElement?.querySelector('code')?.textContent ?? '';
|
|
156
|
+
try { await navigator.clipboard.writeText(code); btn.textContent = 'Copied'; }
|
|
157
|
+
catch { btn.textContent = 'Select the code'; }
|
|
158
|
+
setTimeout(() => { btn.textContent = 'Copy'; }, 1600);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
const links = [...document.querySelectorAll('.toc a')];
|
|
162
|
+
if (links.length && 'IntersectionObserver' in window) {
|
|
163
|
+
const map = new Map(links.map((a) => [a.getAttribute('href')?.slice(1), a]));
|
|
164
|
+
const io = new IntersectionObserver((entries) => {
|
|
165
|
+
const visible = entries.filter((e) => e.isIntersecting).sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
|
|
166
|
+
if (!visible) return;
|
|
167
|
+
links.forEach((l) => l.classList.remove('on'));
|
|
168
|
+
map.get(visible.target.id)?.classList.add('on');
|
|
169
|
+
}, { rootMargin: '-80px 0px -65% 0px', threshold: [0.1, 0.5] });
|
|
170
|
+
map.forEach((_a, id) => { const el = id ? document.getElementById(id) : null; if (el) io.observe(el); });
|
|
171
|
+
}
|
|
172
|
+
const index = Array.isArray(window.__DOCS_INDEX__) ? window.__DOCS_INDEX__ : [];
|
|
173
|
+
const q = document.getElementById('q');
|
|
174
|
+
const results = document.getElementById('results');
|
|
175
|
+
let active = -1;
|
|
176
|
+
function hideResults() { if (!results) return; results.hidden = true; results.replaceChildren(); active = -1; }
|
|
177
|
+
function showResults(items) {
|
|
178
|
+
if (!results) return;
|
|
179
|
+
results.replaceChildren();
|
|
180
|
+
active = -1;
|
|
181
|
+
if (!items.length) { results.hidden = true; return; }
|
|
182
|
+
for (const item of items) {
|
|
183
|
+
const li = document.createElement('li');
|
|
184
|
+
const a = document.createElement('a');
|
|
185
|
+
a.href = item.u;
|
|
186
|
+
a.setAttribute('role', 'option');
|
|
187
|
+
a.textContent = item.t;
|
|
188
|
+
li.append(a);
|
|
189
|
+
results.append(li);
|
|
190
|
+
}
|
|
191
|
+
results.hidden = false;
|
|
192
|
+
}
|
|
193
|
+
q?.addEventListener('input', () => {
|
|
194
|
+
const term = q.value.trim().toLowerCase();
|
|
195
|
+
if (term.length < 2) { hideResults(); return; }
|
|
196
|
+
showResults(index.filter((item) => `${item.t} ${item.x}`.toLowerCase().includes(term)).slice(0, 8));
|
|
197
|
+
});
|
|
198
|
+
q?.addEventListener('keydown', (event) => {
|
|
199
|
+
const opts = [...(results?.querySelectorAll('a') ?? [])];
|
|
200
|
+
if (event.key === 'Escape') { hideResults(); return; }
|
|
201
|
+
if (!opts.length) return;
|
|
202
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
203
|
+
event.preventDefault();
|
|
204
|
+
active = event.key === 'ArrowDown' ? Math.min(active + 1, opts.length - 1) : Math.max(active - 1, 0);
|
|
205
|
+
opts.forEach((a, i) => a.setAttribute('aria-selected', String(i === active)));
|
|
206
|
+
opts[active]?.scrollIntoView({ block: 'nearest' });
|
|
207
|
+
}
|
|
208
|
+
if (event.key === 'Enter' && active >= 0) { event.preventDefault(); opts[active].click(); }
|
|
209
|
+
});
|
|
210
|
+
document.addEventListener('click', (event) => { if (!event.target.closest('.search')) hideResults(); });
|
|
211
|
+
document.addEventListener('keydown', (event) => {
|
|
212
|
+
if (event.key === '/' && document.activeElement !== q && !event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
213
|
+
event.preventDefault();
|
|
214
|
+
q?.focus();
|
|
215
|
+
}
|
|
216
|
+
});
|
|
215
217
|
</script>
|
|
216
218
|
</body>
|
|
217
219
|
</html>
|