pramanasutra 0.0.0-stage → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/.agents/skills/pramanasutra-access/SKILL.md +34 -0
  2. package/.agents/skills/pramanasutra-api/SKILL.md +34 -0
  3. package/.agents/skills/pramanasutra-data/SKILL.md +34 -0
  4. package/.agents/skills/pramanasutra-defect/SKILL.md +34 -0
  5. package/.agents/skills/pramanasutra-evidence/SKILL.md +34 -0
  6. package/.agents/skills/pramanasutra-flake/SKILL.md +34 -0
  7. package/.agents/skills/pramanasutra-flow/SKILL.md +34 -0
  8. package/.agents/skills/pramanasutra-load/SKILL.md +34 -0
  9. package/.agents/skills/pramanasutra-pipeline/SKILL.md +34 -0
  10. package/.agents/skills/pramanasutra-prime/SKILL.md +38 -0
  11. package/.agents/skills/pramanasutra-regression/SKILL.md +34 -0
  12. package/.agents/skills/pramanasutra-release/SKILL.md +34 -0
  13. package/.agents/skills/pramanasutra-secure/SKILL.md +34 -0
  14. package/.agents/skills/pramanasutra-strategy/SKILL.md +34 -0
  15. package/.agents/skills/pramanasutra-unit/SKILL.md +34 -0
  16. package/.agents/skills/pramanasutra-verify/SKILL.md +34 -0
  17. package/.agents/skills/pramanasutra-visual/SKILL.md +34 -0
  18. package/.claude/agents/pramanasutra-prime.md +7 -0
  19. package/CHANGELOG.md +56 -0
  20. package/LICENSE +201 -0
  21. package/NOTICE +2 -0
  22. package/README.md +138 -2
  23. package/docs/.nojekyll +0 -0
  24. package/docs/00-start-here.html +195 -0
  25. package/docs/01-executive-summary.html +192 -0
  26. package/docs/02-functional-specification.html +199 -0
  27. package/docs/03-architecture.html +233 -0
  28. package/docs/04-technical-reference.html +204 -0
  29. package/docs/05-user-guide.html +232 -0
  30. package/docs/06-cli-and-reports.html +200 -0
  31. package/docs/07-rule-catalog.html +194 -0
  32. package/docs/08-skills-and-agents.html +191 -0
  33. package/docs/09-security-and-privacy.html +192 -0
  34. package/docs/10-legal-and-compliance.html +203 -0
  35. package/docs/11-testing-and-proof.html +197 -0
  36. package/docs/12-ci-and-release.html +208 -0
  37. package/docs/13-roadmap-and-status.html +186 -0
  38. package/docs/14-faq-and-glossary.html +204 -0
  39. package/docs/15-maintainer-guide.html +200 -0
  40. package/docs/agent-catalog.md +3 -0
  41. package/docs/api.md +3 -0
  42. package/docs/architecture.md +15 -0
  43. package/docs/assets/favicon.svg +1 -0
  44. package/docs/assets/site.css +183 -0
  45. package/docs/assets/site.js +79 -0
  46. package/docs/audit/report.html +39 -0
  47. package/docs/audit/report.json +59 -0
  48. package/docs/audit/report.md +80 -0
  49. package/docs/commands.md +13 -0
  50. package/docs/compatibility.md +15 -0
  51. package/docs/configuration.md +3 -0
  52. package/docs/execution-safety.md +3 -0
  53. package/docs/handbook/01-executive-summary.html +1 -0
  54. package/docs/handbook/01-executive-summary.md +51 -0
  55. package/docs/handbook/02-functional-specification.html +1 -0
  56. package/docs/handbook/02-functional-specification.md +69 -0
  57. package/docs/handbook/03-technical-specification.html +1 -0
  58. package/docs/handbook/03-technical-specification.md +85 -0
  59. package/docs/handbook/04-architecture.html +1 -0
  60. package/docs/handbook/04-architecture.md +107 -0
  61. package/docs/handbook/05-user-guide.html +1 -0
  62. package/docs/handbook/05-user-guide.md +117 -0
  63. package/docs/handbook/06-cli-reference.html +1 -0
  64. package/docs/handbook/06-cli-reference.md +88 -0
  65. package/docs/handbook/07-security-privacy-legal.html +1 -0
  66. package/docs/handbook/07-security-privacy-legal.md +65 -0
  67. package/docs/handbook/08-testing-and-proof.html +1 -0
  68. package/docs/handbook/08-testing-and-proof.md +83 -0
  69. package/docs/handbook/09-compatibility-and-roadmap.html +1 -0
  70. package/docs/handbook/09-compatibility-and-roadmap.md +53 -0
  71. package/docs/handbook/10-contributor-guide.html +1 -0
  72. package/docs/handbook/10-contributor-guide.md +64 -0
  73. package/docs/handbook/11-glossary-and-faq.html +1 -0
  74. package/docs/handbook/11-glossary-and-faq.md +52 -0
  75. package/docs/handbook/12-rule-catalog.html +1 -0
  76. package/docs/handbook/12-rule-catalog.md +65 -0
  77. package/docs/handbook/README.md +40 -0
  78. package/docs/handbook/index.html +1 -0
  79. package/docs/index.html +195 -0
  80. package/docs/legal/trademark-and-name-clearance.html +1 -0
  81. package/docs/legal/trademark-and-name-clearance.md +32 -0
  82. package/docs/master-claude-prompt.md +483 -0
  83. package/docs/proof/eval-results.json +91 -0
  84. package/docs/proof/test-results.txt +51 -0
  85. package/docs/quality-gates.md +10 -0
  86. package/docs/report-schema.md +22 -0
  87. package/docs/roadmap.md +3 -0
  88. package/docs/robots.txt +22 -0
  89. package/docs/samples/clean-project/report.html +29 -0
  90. package/docs/samples/clean-project/report.json +45 -0
  91. package/docs/samples/clean-project/report.md +67 -0
  92. package/docs/samples/focused-test/report.html +29 -0
  93. package/docs/samples/focused-test/report.json +60 -0
  94. package/docs/samples/focused-test/report.md +74 -0
  95. package/docs/samples/missing-ci/report.html +29 -0
  96. package/docs/samples/missing-ci/report.json +59 -0
  97. package/docs/samples/missing-ci/report.md +75 -0
  98. package/docs/samples/missing-tests/report.html +29 -0
  99. package/docs/samples/missing-tests/report.json +59 -0
  100. package/docs/samples/missing-tests/report.md +75 -0
  101. package/docs/samples/multi-language/report.html +33 -0
  102. package/docs/samples/multi-language/report.json +116 -0
  103. package/docs/samples/multi-language/report.md +110 -0
  104. package/docs/samples/unsafe-names/report.html +29 -0
  105. package/docs/samples/unsafe-names/report.json +61 -0
  106. package/docs/samples/unsafe-names/report.md +75 -0
  107. package/docs/server-deployment.md +3 -0
  108. package/docs/sitemap.xml +20 -0
  109. package/docs/standards.md +12 -0
  110. package/docs/status.md +20 -0
  111. package/docs/troubleshooting.md +7 -0
  112. package/docs/trust-model.md +3 -0
  113. package/documents/pramanasutra/00-start-here.md +85 -0
  114. package/documents/pramanasutra/01-executive-summary.md +61 -0
  115. package/documents/pramanasutra/02-functional-specification.md +90 -0
  116. package/documents/pramanasutra/03-architecture.md +102 -0
  117. package/documents/pramanasutra/04-technical-reference.md +121 -0
  118. package/documents/pramanasutra/05-user-guide.md +152 -0
  119. package/documents/pramanasutra/06-cli-and-reports.md +79 -0
  120. package/documents/pramanasutra/07-rule-catalog.md +79 -0
  121. package/documents/pramanasutra/08-skills-and-agents.md +68 -0
  122. package/documents/pramanasutra/09-security-and-privacy.md +73 -0
  123. package/documents/pramanasutra/10-legal-and-compliance.md +72 -0
  124. package/documents/pramanasutra/11-testing-and-proof.md +72 -0
  125. package/documents/pramanasutra/12-ci-and-release.md +89 -0
  126. package/documents/pramanasutra/13-roadmap-and-status.md +68 -0
  127. package/documents/pramanasutra/14-faq-and-glossary.md +81 -0
  128. package/documents/pramanasutra/15-maintainer-guide.md +81 -0
  129. package/documents/pramanasutra/README.md +11 -0
  130. package/documents/pramanasutra/audit/report.html +39 -0
  131. package/documents/pramanasutra/audit/report.json +59 -0
  132. package/documents/pramanasutra/audit/report.md +80 -0
  133. package/documents/pramanasutra/html/00-start-here.html +195 -0
  134. package/documents/pramanasutra/html/01-executive-summary.html +192 -0
  135. package/documents/pramanasutra/html/02-functional-specification.html +199 -0
  136. package/documents/pramanasutra/html/03-architecture.html +233 -0
  137. package/documents/pramanasutra/html/04-technical-reference.html +204 -0
  138. package/documents/pramanasutra/html/05-user-guide.html +232 -0
  139. package/documents/pramanasutra/html/06-cli-and-reports.html +200 -0
  140. package/documents/pramanasutra/html/07-rule-catalog.html +194 -0
  141. package/documents/pramanasutra/html/08-skills-and-agents.html +191 -0
  142. package/documents/pramanasutra/html/09-security-and-privacy.html +192 -0
  143. package/documents/pramanasutra/html/10-legal-and-compliance.html +203 -0
  144. package/documents/pramanasutra/html/11-testing-and-proof.html +197 -0
  145. package/documents/pramanasutra/html/12-ci-and-release.html +208 -0
  146. package/documents/pramanasutra/html/13-roadmap-and-status.html +186 -0
  147. package/documents/pramanasutra/html/14-faq-and-glossary.html +204 -0
  148. package/documents/pramanasutra/html/15-maintainer-guide.html +200 -0
  149. package/documents/pramanasutra/html/audit/report.html +39 -0
  150. package/documents/pramanasutra/html/audit/report.json +59 -0
  151. package/documents/pramanasutra/html/audit/report.md +80 -0
  152. package/documents/pramanasutra/html/index.html +195 -0
  153. package/documents/pramanasutra/html/proof/eval-results.json +91 -0
  154. package/documents/pramanasutra/html/proof/test-results.txt +51 -0
  155. package/documents/pramanasutra/html/robots.txt +22 -0
  156. package/documents/pramanasutra/html/samples/clean-project/report.html +29 -0
  157. package/documents/pramanasutra/html/samples/clean-project/report.json +45 -0
  158. package/documents/pramanasutra/html/samples/clean-project/report.md +67 -0
  159. package/documents/pramanasutra/html/samples/focused-test/report.html +29 -0
  160. package/documents/pramanasutra/html/samples/focused-test/report.json +60 -0
  161. package/documents/pramanasutra/html/samples/focused-test/report.md +74 -0
  162. package/documents/pramanasutra/html/samples/missing-ci/report.html +29 -0
  163. package/documents/pramanasutra/html/samples/missing-ci/report.json +59 -0
  164. package/documents/pramanasutra/html/samples/missing-ci/report.md +75 -0
  165. package/documents/pramanasutra/html/samples/missing-tests/report.html +29 -0
  166. package/documents/pramanasutra/html/samples/missing-tests/report.json +59 -0
  167. package/documents/pramanasutra/html/samples/missing-tests/report.md +75 -0
  168. package/documents/pramanasutra/html/samples/multi-language/report.html +33 -0
  169. package/documents/pramanasutra/html/samples/multi-language/report.json +116 -0
  170. package/documents/pramanasutra/html/samples/multi-language/report.md +110 -0
  171. package/documents/pramanasutra/html/samples/unsafe-names/report.html +29 -0
  172. package/documents/pramanasutra/html/samples/unsafe-names/report.json +61 -0
  173. package/documents/pramanasutra/html/samples/unsafe-names/report.md +75 -0
  174. package/documents/pramanasutra/html/sitemap.xml +20 -0
  175. package/documents/pramanasutra/proof/eval-results.json +91 -0
  176. package/documents/pramanasutra/proof/test-results.txt +51 -0
  177. package/documents/pramanasutra/samples/clean-project/report.html +29 -0
  178. package/documents/pramanasutra/samples/clean-project/report.json +45 -0
  179. package/documents/pramanasutra/samples/clean-project/report.md +67 -0
  180. package/documents/pramanasutra/samples/focused-test/report.html +29 -0
  181. package/documents/pramanasutra/samples/focused-test/report.json +60 -0
  182. package/documents/pramanasutra/samples/focused-test/report.md +74 -0
  183. package/documents/pramanasutra/samples/missing-ci/report.html +29 -0
  184. package/documents/pramanasutra/samples/missing-ci/report.json +59 -0
  185. package/documents/pramanasutra/samples/missing-ci/report.md +75 -0
  186. package/documents/pramanasutra/samples/missing-tests/report.html +29 -0
  187. package/documents/pramanasutra/samples/missing-tests/report.json +59 -0
  188. package/documents/pramanasutra/samples/missing-tests/report.md +75 -0
  189. package/documents/pramanasutra/samples/multi-language/report.html +33 -0
  190. package/documents/pramanasutra/samples/multi-language/report.json +116 -0
  191. package/documents/pramanasutra/samples/multi-language/report.md +110 -0
  192. package/documents/pramanasutra/samples/unsafe-names/report.html +29 -0
  193. package/documents/pramanasutra/samples/unsafe-names/report.json +61 -0
  194. package/documents/pramanasutra/samples/unsafe-names/report.md +75 -0
  195. package/examples/dotnet-app/README.md +3 -0
  196. package/examples/evidence/passing.json +12 -0
  197. package/examples/java-service/README.md +3 -0
  198. package/examples/mobile/README.md +3 -0
  199. package/examples/python-api/README.md +3 -0
  200. package/examples/release-policy/README.md +3 -0
  201. package/examples/sample-app/README.md +3 -0
  202. package/examples/sample-app/package.json +8 -0
  203. package/examples/sample-app/src/math.js +1 -0
  204. package/examples/sample-app/tests/math.test.js +5 -0
  205. package/examples/sample-output/clean-project/report.html +29 -0
  206. package/examples/sample-output/clean-project/report.json +45 -0
  207. package/examples/sample-output/clean-project/report.md +67 -0
  208. package/examples/sample-output/focused-test/report.html +29 -0
  209. package/examples/sample-output/focused-test/report.json +60 -0
  210. package/examples/sample-output/focused-test/report.md +74 -0
  211. package/examples/sample-output/missing-ci/report.html +29 -0
  212. package/examples/sample-output/missing-ci/report.json +59 -0
  213. package/examples/sample-output/missing-ci/report.md +75 -0
  214. package/examples/sample-output/missing-tests/report.html +29 -0
  215. package/examples/sample-output/missing-tests/report.json +59 -0
  216. package/examples/sample-output/missing-tests/report.md +75 -0
  217. package/examples/sample-output/multi-language/report.html +33 -0
  218. package/examples/sample-output/multi-language/report.json +116 -0
  219. package/examples/sample-output/multi-language/report.md +110 -0
  220. package/examples/sample-output/unsafe-names/report.html +29 -0
  221. package/examples/sample-output/unsafe-names/report.json +61 -0
  222. package/examples/sample-output/unsafe-names/report.md +75 -0
  223. package/llms.txt +60 -0
  224. package/package.json +65 -4
  225. package/packages/cli/bin/pramanasutra.mjs +90 -0
  226. package/packages/cli/lib/evidence.mjs +46 -0
  227. package/packages/cli/lib/installer.mjs +39 -0
  228. package/packages/cli/lib/policy.mjs +33 -0
  229. package/packages/cli/lib/report.mjs +169 -0
  230. package/packages/cli/lib/scanner.mjs +146 -0
  231. package/policies/recommended.json +11 -0
  232. package/policies/strict.json +12 -0
  233. package/templates/defect-report.md +11 -0
  234. package/templates/qa-strategy.md +9 -0
  235. package/templates/release-notes.md +9 -0
  236. package/templates/release-readiness.md +9 -0
  237. package/templates/rollback-plan.md +7 -0
  238. package/templates/test-evidence.json +11 -0
  239. package/templates/test-plan.md +4 -0
  240. package/templates/traceability-matrix.csv +1 -0
  241. package/workflows/create-test-plan.md +9 -0
  242. package/workflows/implement-tests.md +9 -0
  243. package/workflows/inspect-project.md +9 -0
  244. package/workflows/investigate-failure.md +9 -0
  245. package/workflows/post-release-observability.md +9 -0
  246. package/workflows/release-readiness.md +9 -0
  247. package/workflows/verify-regression.md +9 -0
package/docs/status.md ADDED
@@ -0,0 +1,20 @@
1
+ # Implementation status
2
+
3
+ Canonical narrative: [documents/pramanasutra/13-roadmap-and-status.md](../documents/pramanasutra/13-roadmap-and-status.md). This table is the short form for agents that open `docs/status.md` first.
4
+
5
+ | Capability | Status | Evidence / limitation |
6
+ |---|---|---|
7
+ | CLI doctor, version, scan, verify, release-check, agents, init | Implemented | `npm test` |
8
+ | Offline static checks, including todo/pytest.skip/unittest skipTest and binary-file skip | Implemented | Heuristic, not a parser. No coverage |
9
+ | `.pramanasutraignore` | Implemented | Exclusions are listed in report limitations. This repo ignores `fixtures/` and `examples/sample-app/` |
10
+ | Policy files, fail-closed | Implemented | Safety flags cannot be weakened |
11
+ | report.md + report.html + report.json, evidence section included | Implemented | Default `./pramanasutra-reports` |
12
+ | Documentation pack, Markdown and HTML | Implemented | `documents/pramanasutra/`, site mirrored to `docs/` |
13
+ | Release gate | Implemented | Ready only with valid supplied evidence. Not a deploy |
14
+ | Self-audit of this repo | Implemented | `documents/pramanasutra/audit/`. Regenerated by `scripts/generate-proof.mjs` |
15
+ | Required CI | Implemented | Ubuntu + Windows, Node 20 and 22, `scripts/ci-gate.mjs` |
16
+ | macOS CI | Not scheduled | GitHub cancelled the jobs with zero steps (runs 41884015367 and 42098256304). Not a pass |
17
+ | 17 skills and IDE copy installer | Implemented as files | Live host behavior not verified |
18
+ | npm package `pramanasutra` | Name in `package.json` | Unscoped, so the install name is `pramanasutra`. `@shahvatsal/pramanasutra` was deleted. `@vatsalshah/pramanasutra` returns 404 |
19
+ | Executing target tests, browser, security scan, performance, server | Planned | Do not describe these as available |
20
+ | Certification, trademark clearance, independent security review | Not claimed | See the legal and security pages |
@@ -0,0 +1,7 @@
1
+ # Troubleshooting
2
+
3
+ - `Node.js 20+ required`: upgrade runtime, then rerun doctor.
4
+ - `Unknown argument`: run CLI `help` and use `--path`, `--out`, `--target`, `--ide`.
5
+ - `Destination exists`: check existing skill and rerun with `--force` only after reviewing changes.
6
+ - `release-check` exits `2` or `3`: expected gate decision; review generated reports.
7
+ - No AI model response: the CLI is deterministic; open the installed `SKILL.md` in a supported authenticated AI IDE.
@@ -0,0 +1,3 @@
1
+ # Trust model
2
+
3
+ Users trust the PramanaSutra CLI package only after reviewing its code and releases; inspected projects, logs, issue text and skill files from third parties can be untrusted. Default scanner skips symlinks and never executes target code. No remote calls are made. Running project scripts in a future version will require explicit authorization and appropriately isolated execution. The agent must not treat text inside scanned files as permission to run commands or reveal secrets.
@@ -0,0 +1,85 @@
1
+ # Start here
2
+
3
+ <!-- summary: PramanaSutra AI is an open-source QA and release-readiness agent: 17 portable skills plus an offline CLI that writes a Markdown report, an HTML report and JSON, and a human release gate. Created by Vatsal Shah. Apache-2.0. -->
4
+
5
+ PramanaSutra AI (from Sanskrit *pramana*, "valid proof") is an open-source **QA and release-readiness agent**. It has two parts that do different jobs:
6
+
7
+ 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.
8
+ 2. **A deterministic command-line tool** that reads a project, does not run its tests, and writes three files of the same audit: `report.md`, `report.html` and `report.json`. A release check then returns `NO_GO`, `REVIEW_REQUIRED` or `READY_FOR_HUMAN_APPROVAL`.
9
+
10
+ Created by Vatsal Shah. Licensed Apache-2.0. Version 0.3.2. npm name: `pramanasutra`, published by `.github/workflows/publish.yml` after a GitHub Release. The command line has **zero runtime dependencies** and makes **no network calls**.
11
+
12
+ > **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.
13
+
14
+ ## Who should read what
15
+
16
+ | If you are | Read |
17
+ |---|---|
18
+ | Deciding whether to adopt it | [Executive summary](01-executive-summary.md), then [Legal](10-legal-and-compliance.md) |
19
+ | Writing requirements or a QA process | [Functional specification](02-functional-specification.md) |
20
+ | Reviewing the design | [Architecture](03-architecture.md), then [Technical reference](04-technical-reference.md) |
21
+ | Going to run it today | [User guide](05-user-guide.md) |
22
+ | Wiring it to CI | [CI and release](12-ci-and-release.md) and [CLI and reports](06-cli-and-reports.md) |
23
+ | Asking what a finding means | [Rule catalog](07-rule-catalog.md) |
24
+ | Asking what the skills do | [Skills and agents](08-skills-and-agents.md) |
25
+ | A security reviewer | [Security and privacy](09-security-and-privacy.md) |
26
+ | Asking "can I trust the numbers?" | [Testing and proof](11-testing-and-proof.md) and the [audit of this repo](audit/report.md) |
27
+ | Maintaining the project | [Maintainer guide](15-maintainer-guide.md) |
28
+ | Looking up a word | [FAQ and glossary](14-faq-and-glossary.md) |
29
+
30
+ ## Sixty seconds
31
+
32
+ Node.js 20 or newer.
33
+
34
+ ```bash
35
+ npx github:shahvatsalofficial/pramanasutra-ai release-check --path .
36
+ ```
37
+
38
+ After `npm view pramanasutra version` prints `0.3.2`, use `npx pramanasutra release-check --path .`.
39
+
40
+ That writes `./pramanasutra-reports/report.md`, `report.html` and `report.json` in the current directory, not inside the project you scanned. Open the HTML file in a browser. The exit code is `2` for `NO_GO`, `3` for `REVIEW_REQUIRED`, `0` for `READY_FOR_HUMAN_APPROVAL`.
41
+
42
+ To copy the skills into an IDE:
43
+
44
+ ```bash
45
+ npx github:shahvatsalofficial/pramanasutra-ai init --ide cursor --target .
46
+ ```
47
+
48
+ Use `claude`, `cursor`, `codex`, `gemini`, `copilot`, `generic` or `all`. The copy refuses to overwrite an existing skill unless you pass `--force`.
49
+
50
+ ## What is already proven
51
+
52
+ The captured run on the maintainer's Windows machine is in [proof/test-results.txt](proof/test-results.txt): **38 tests, 37 passed, 0 failed, 1 skipped**. The skip is the symlink test, because creating a symlink was prohibited by the OS. 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.
53
+
54
+ 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.
55
+
56
+ ## What is not proven
57
+
58
+ - 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.
59
+ - Accuracy on large real repositories. The rules are line heuristics, not parsers.
60
+ - An independent security review.
61
+ - Trademark clearance of the name PramanaSutra. See [Legal](10-legal-and-compliance.md).
62
+ - A public npm tarball of 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` returned `404`. `.github/workflows/publish.yml` publishes `pramanasutra@0.3.2` when a GitHub Release is published and an npm trusted publisher is connected for that package name.
63
+
64
+ ## The documentation set
65
+
66
+ | # | Document | Question it answers |
67
+ |---|---|---|
68
+ | 00 | Start here | What is this, and where do I go? |
69
+ | 01 | Executive summary | Should we use it, and what must we not claim? |
70
+ | 02 | Functional specification | What must it do, for whom, and what is out of scope? |
71
+ | 03 | Architecture | How do the pieces connect, and which boundaries matter? |
72
+ | 04 | Technical reference | Modules, schemas, limits, exit codes |
73
+ | 05 | User guide | Install, run, read, fix, repeat |
74
+ | 06 | CLI and reports | Every flag, and how to read `report.md` and `report.html` |
75
+ | 07 | Rule catalog | Every static rule, with an example and its limit |
76
+ | 08 | Skills and agents | The 17 skills and the safety contract |
77
+ | 09 | Security and privacy | Threats, controls, what is left over |
78
+ | 10 | Legal and compliance | License, names, disclaimers. Not a legal opinion |
79
+ | 11 | Testing and proof | Real output, fixtures, how to reproduce |
80
+ | 12 | CI and release | GitHub Actions, why macOS is not scheduled, exit codes in a pipeline |
81
+ | 13 | Roadmap and status | Implemented, planned, and not claimed |
82
+ | 14 | FAQ and glossary | Short answers and terms |
83
+ | 15 | Maintainer guide | How to change a rule, rebuild docs, and release |
84
+
85
+ Machine-readable summary for tools: [llms.txt](../../llms.txt) at the repository root.
@@ -0,0 +1,61 @@
1
+ # Executive summary
2
+
3
+ <!-- summary: What PramanaSutra AI is for a decision maker: the problem, the product, what the gate means, what evidence exists, and what must not be claimed in a rollout. -->
4
+
5
+ ## The problem
6
+
7
+ 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.
8
+
9
+ PramanaSutra AI is a counter to that habit. It separates three things that get mixed together:
10
+
11
+ - what a static reading of the repository **observed**
12
+ - what a test command **actually returned**, and only when someone supplies that result
13
+ - what a **human** still has to approve
14
+
15
+ ## The product
16
+
17
+ | Piece | What a buyer gets | What they do not get |
18
+ |---|---|---|
19
+ | 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 |
20
+ | CLI | An offline scan and a release gate, with Markdown, HTML and JSON of the same audit | Test execution, coverage, a browser, a vulnerability scan, or a deploy |
21
+ | Reports | A page a reviewer can read without the CLI | A certificate, an audit attestation, or legal advice |
22
+ | Policy | A fail-closed JSON file. Unknown keys are rejected. "Allow automatic deploy" cannot be turned on | A workflow engine or an approval product |
23
+
24
+ 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.
25
+
26
+ ## The decision, in one table
27
+
28
+ | Gate | Exit code | Plain meaning | Typical next step |
29
+ |---|---|---|---|
30
+ | `NO_GO` | 2 | A blocking static finding (by default a focused test) or supplied evidence that failed | Fix, re-run the tests, re-check |
31
+ | `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 |
32
+ | `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 |
33
+
34
+ `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.
35
+
36
+ ## What leadership can say
37
+
38
+ Supported by the artifacts in [Testing and proof](11-testing-and-proof.md):
39
+
40
+ - The unit suite on the captured Windows run: 38 tests, 37 passed, 0 failed, 1 skipped (OS refused a symlink).
41
+ - 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.
42
+ - 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.
43
+ - 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.
44
+ - 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).
45
+
46
+ ## What leadership must not say
47
+
48
+ - "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.
49
+ - "It passed a penetration test." It is not a security scanner. The secure skill coordinates *gaps*. It does not attack.
50
+ - "It is WCAG certified" or "SOC 2 certified" or "ISO certified." No such claim exists.
51
+ - "Every IDE was verified." The install paths are implemented. Live host behavior is not.
52
+ - "The name is trademark-cleared." It is not. See [Legal](10-legal-and-compliance.md).
53
+ - "Tested on macOS in CI." Those jobs never started.
54
+
55
+ ## Adoption shape
56
+
57
+ 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.
58
+
59
+ ## Cost of being wrong
60
+
61
+ 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.
@@ -0,0 +1,90 @@
1
+ # Functional specification
2
+
3
+ <!-- summary: Actors, use cases, functional requirements and acceptance criteria for PramanaSutra AI 0.3.0. Planned work is marked planned and is not described as shipped. -->
4
+
5
+ This specification describes version 0.3.0 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`.
6
+
7
+ ## Actors
8
+
9
+ | Actor | Goal | What they can do |
10
+ |---|---|---|
11
+ | Developer | Know if a change is even a candidate for release | Run the CLI locally. Read `report.md` or `report.html` |
12
+ | AI assistant inside an IDE | Plan QA without inventing results | Follow a skill. The skill forbids claiming a test ran without a tool result |
13
+ | CI job | Fail the build on a blocking finding, and record evidence | Run tests, pass the counts as `--evidence`, fail on exit 2 |
14
+ | Reviewer | Understand a gate without installing Node | Open the HTML report or the Markdown report |
15
+ | Maintainer | Keep the rules honest | Add a fixture and a test before changing a rule. See the [maintainer guide](15-maintainer-guide.md) |
16
+ | Release approver | Decide | Read the gate. The tool will not approve for them |
17
+
18
+ ## Use cases
19
+
20
+ ### UC-1 Static audit
21
+
22
+ 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` and `report.json` together. It does not execute the project.
23
+
24
+ ### UC-2 Release check with evidence
25
+
26
+ 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.
27
+
28
+ ### UC-3 Install skills
29
+
30
+ The developer runs `init --ide <host> --target <existing 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.
31
+
32
+ ### UC-4 Policy
33
+
34
+ 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.
35
+
36
+ ### UC-5 Exclude examples
37
+
38
+ 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.
39
+
40
+ ## Functional requirements
41
+
42
+ | ID | Statement | Status | Acceptance |
43
+ |---|---|---|---|
44
+ | FR-1 | `doctor` reports Node, platform, offline, and that no model is called | Implemented | Test `doctor succeeds without a provider key` |
45
+ | FR-2 | `version` and `--version` print the version from `package.json` | Implemented | Test `version and --version print the package version` |
46
+ | FR-3 | `agents list` lists 17 skills whose folder name matches frontmatter | Implemented | Test `agents catalog includes Prime and 16 specialists` |
47
+ | FR-4 | `scan` and `release-check` require `--path` to a real directory | Implemented | Missing path exits 1, no stack trace |
48
+ | 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` |
49
+ | FR-6 | The three report files are always written together unless `--no-report` | Implemented | Tests assert `report.md`, `report.html`, `report.json` |
50
+ | FR-7 | HTML and Markdown escape `<`, `>` 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 |
51
+ | 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` |
52
+ | 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 |
53
+ | 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 |
54
+ | FR-11 | No recognised tests, no recognised CI, and no root license are separate findings | Implemented | Fixture cases and unit tests |
55
+ | FR-12 | Without evidence, a clean static project is `REVIEW_REQUIRED`, never ready | Implemented | Exit code 3 |
56
+ | 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 |
57
+ | FR-14 | Failing evidence is `NO_GO` even when the static scan is clean | Implemented | Exit code 2 |
58
+ | FR-15 | `external-unverified` evidence and zero-pass evidence stay `REVIEW_REQUIRED` | Implemented | Unit tests |
59
+ | FR-16 | `--evidence` and `--policy` are rejected on `scan` | Implemented | Unit test |
60
+ | FR-17 | Symlinks are not followed | Implemented | Skipped when the OS denies symlink creation |
61
+ | FR-18 | `.pramanasutraignore` excludes prefixes and rejects `..` | Implemented | Unit test |
62
+ | FR-19 | Binary test files (NUL byte) are not decoded as source; the scan is marked partial | Implemented | Unit test |
63
+ | FR-20 | Skill install does not overwrite and does not follow a symlinked destination | Implemented | Installer tests |
64
+ | FR-21 | The CLI executes the target project's tests | **Planned** | Must stay `not-run` until a real executor exists |
65
+ | FR-22 | Browser, accessibility measurement, load, security scan | **Planned** or explicitly not supported | Capabilities in every report |
66
+ | FR-23 | Hosted server, Ollama, extra model API | **Planned** | Not in the CLI |
67
+
68
+ ## Out of scope
69
+
70
+ - Replacing Jest, pytest, JUnit, Playwright or a CI provider.
71
+ - Mutating the scanned project. The only writes are the report directory, and `init` into the target the user named.
72
+ - Secret detection, dependency CVE scanning, SBOM, provenance attestations, SLSA.
73
+ - Deciding production rollout, feature flags, or customer communication.
74
+ - Legal conclusions about the user's product. See [Legal](10-legal-and-compliance.md).
75
+
76
+ ## Policies shipped in the box
77
+
78
+ `policies/recommended.json` blocks focused tests, requires executed evidence, requires tests, CI and a license, and does not block on skipped tests.
79
+
80
+ `policies/strict.json` is the same and also blocks on skipped tests, so a skip becomes `NO_GO` even when evidence passes.
81
+
82
+ Both set `allowAutomatedDeployment` to false. The loader will not accept true.
83
+
84
+ ## User-visible errors
85
+
86
+ Errors go to stderr as `PramanaSutra error: <message>` and exit 1. The message is the thrown error's message, not a stack, for the cases tests cover (missing path, bad evidence, bad policy, unknown option). A bug that throws an unexpected exception is also caught and printed as that one line, which hides the stack from the user. Maintainers reproduce with the unit suite.
87
+
88
+ ## Acceptance of the documentation itself
89
+
90
+ A reader who has not seen the source can: install, run a check, open both report files, explain the three gate words, point at a sample for each gate, and state two things the tool does not do. The pages linked from [Start here](00-start-here.md) are the checklist.
@@ -0,0 +1,102 @@
1
+ # Architecture
2
+
3
+ <!-- summary: Components, data flow, trust boundaries and design decisions for the PramanaSutra AI CLI and skills. The CLI does not call a model and does not run the target's tests. -->
4
+
5
+ ## What exists at runtime
6
+
7
+ 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.
8
+
9
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 880 460" role="img" aria-labelledby="archTitle archDesc">
10
+ <title id="archTitle">PramanaSutra components</title>
11
+ <desc 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.</desc>
12
+ <style>text{font-family:ui-sans-serif,system-ui,sans-serif}</style>
13
+ <rect width="880" height="460" fill="#f7f4ee"/>
14
+ <rect x="24" y="24" width="250" height="120" rx="12" fill="#fff" stroke="#0f3d3e"/>
15
+ <text x="40" y="56" font-size="15" font-weight="700" fill="#0f3d3e">AI IDE</text>
16
+ <text x="40" y="80" font-size="13" fill="#1c1915">Claude, Cursor, Codex,</text>
17
+ <text x="40" y="100" font-size="13" fill="#1c1915">Copilot, Gemini CLI</text>
18
+ <text x="40" y="124" font-size="12" fill="#5e584e">Model stays in the IDE</text>
19
+ <rect x="24" y="168" width="250" height="100" rx="12" fill="#fff" stroke="#0f3d3e"/>
20
+ <text x="40" y="200" font-size="15" font-weight="700" fill="#0f3d3e">17 Agent Skills</text>
21
+ <text x="40" y="224" font-size="13" fill="#1c1915">.agents/skills is canonical</text>
22
+ <text x="40" y="244" font-size="12" fill="#5e584e">init copies them. It does not run them</text>
23
+ <rect x="330" y="70" width="250" height="210" rx="12" fill="#0f3d3e"/>
24
+ <text x="348" y="104" font-size="16" font-weight="700" fill="#f4fffe">pramanasutra CLI</text>
25
+ <text x="348" y="132" font-size="13" fill="#d5efec">scanner.mjs walk + rules</text>
26
+ <text x="348" y="156" font-size="13" fill="#d5efec">policy.mjs fail-closed</text>
27
+ <text x="348" y="180" font-size="13" fill="#d5efec">evidence.mjs schema</text>
28
+ <text x="348" y="204" font-size="13" fill="#d5efec">evaluateGate</text>
29
+ <text x="348" y="236" font-size="13" fill="#f4fffe">No network. No test exec.</text>
30
+ <rect x="630" y="24" width="226" height="78" rx="12" fill="#fff" stroke="#92400e"/>
31
+ <text x="646" y="52" font-size="14" font-weight="700" fill="#92400e">Policy JSON</text>
32
+ <text x="646" y="76" font-size="12" fill="#1c1915">optional --policy</text>
33
+ <rect x="630" y="118" width="226" height="78" rx="12" fill="#fff" stroke="#92400e"/>
34
+ <text x="646" y="146" font-size="14" font-weight="700" fill="#92400e">Evidence JSON</text>
35
+ <text x="646" y="170" font-size="12" fill="#1c1915">optional --evidence</text>
36
+ <rect x="630" y="214" width="226" height="110" rx="12" fill="#fff" stroke="#166534"/>
37
+ <text x="646" y="244" font-size="14" font-weight="700" fill="#166534">Reports</text>
38
+ <text x="646" y="268" font-size="13" fill="#1c1915">report.md</text>
39
+ <text x="646" y="288" font-size="13" fill="#1c1915">report.html</text>
40
+ <text x="646" y="308" font-size="13" fill="#1c1915">report.json</text>
41
+ <rect x="24" y="310" width="832" height="124" rx="12" fill="#fff" stroke="#ddd4c4"/>
42
+ <text x="40" y="342" font-size="14" font-weight="700" fill="#1c1915">Target repository (read-only)</text>
43
+ <text x="40" y="368" font-size="13" fill="#1c1915">Files, test names, CI config, LICENSE. Symlinks skipped. .pramanasutraignore prefixes excluded.</text>
44
+ <text x="40" y="392" font-size="13" fill="#1c1915">The report stores the folder's base name, not the absolute path.</text>
45
+ <text 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.</text>
46
+ </svg>
47
+
48
+ The diagram is inline. The page does not fetch a chart library.
49
+
50
+ ## Trust boundaries
51
+
52
+ | Boundary | Rule |
53
+ |---|---|
54
+ | 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 |
55
+ | Ignore file to scanner | Prefixes only. `..`, absolute paths and NUL are rejected. The file is data, not code |
56
+ | 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` |
57
+ | Policy file to gate | Fail closed. Safety flags cannot be weakened |
58
+ | Report to the reader | Every string that came from the repo or the evidence file is escaped in HTML and in Markdown |
59
+ | IDE to skill | The skill is text. The model is the IDE's. PramanaSutra does not see that traffic |
60
+ | CLI to network | No HTTP client is used by the scan, gate, report or installer |
61
+
62
+ ## Command flow
63
+
64
+ `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.
65
+
66
+ `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.
67
+
68
+ `verify` only validates an evidence file. It does not scan.
69
+
70
+ `init` only copies directories.
71
+
72
+ ## Design decisions
73
+
74
+ **Heuristics, not parsers.** A real parser for every language would be a different product and a large dependency. The cost is false positives and false negatives. Each rule says its confidence is `medium` except the license check, which is `high` because it is a file-name check. The report repeats the limitation so a green gate is not read as a proof of absence.
75
+
76
+ **Evidence is supplied, not collected by running tests.** Running the target's test script would execute arbitrary code. The CLI refuses that. CI runs the tests in its own job, where the user already accepted that risk, and passes the summary in.
77
+
78
+ **Ready still needs a human.** `requiresHumanApproval` is always true. `automatedDeploymentAuthorized` is always false. A policy cannot flip them.
79
+
80
+ **Reports are the product, not a log line.** Reviewers live in pull requests and browsers. Markdown, HTML and JSON are written in one function so they cannot drift into different facts. JSON is the machine copy of the same object the prose describes.
81
+
82
+ **Ignore is visible.** Hiding `fixtures/` without saying so would make this repository's own gate dishonest. The limitation line is mandatory when the ignore file matches anything.
83
+
84
+ ## What the other packages are
85
+
86
+ Directories under `packages/` other than `cli` (`core`, `runner`, `server`, `reporter`, and the rest) contain README notes for planned modules. They are not imported by the CLI. Treat them as roadmap, not as running code. The status page says the same thing. Do not document them as features.
87
+
88
+ ## Failure behavior
89
+
90
+ | Condition | Result |
91
+ |---|---|
92
+ | Path missing, not a directory, or a symlink | Error, exit 1 |
93
+ | Evidence or policy unreadable, huge, or schema-invalid | Error, exit 1 |
94
+ | Unreadable subdirectory during the walk | Limitation on the report, scan continues, `inventory.partial` may be true, gate will not be ready |
95
+ | More than 20,000 files or depth 22 | Truncation limitation, partial scan, not ready |
96
+ | Test file bigger than 2,000,000 bytes | Skipped, partial, not ready |
97
+ | Test file contains a NUL | Skipped as binary, partial, not ready |
98
+ | Output directory cannot be created | Error, exit 1 |
99
+
100
+ ## Extension points
101
+
102
+ A new static rule belongs in `scanner.mjs` next to the existing ones, with a fixture and a test. A new evidence source belongs in `evidence.mjs` and must not be added to the "can count as passing" set unless the provenance story is real. A new IDE path belongs in `installer.mjs` `ADAPTERS`. None of these load remote code.
@@ -0,0 +1,121 @@
1
+ # Technical reference
2
+
3
+ <!-- summary: Modules, report schema, evidence schema, policy keys, scan limits and exit codes for the PramanaSutra AI CLI. -->
4
+
5
+ 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`.
6
+
7
+ ## Modules
8
+
9
+ | File | Responsibility |
10
+ |---|---|
11
+ | `packages/cli/bin/pramanasutra.mjs` | Argument parsing, commands, process exit code. Version string is read from root `package.json` |
12
+ | `packages/cli/lib/scanner.mjs` | Directory walk, test-file classification, rules, `evaluateGate` |
13
+ | `packages/cli/lib/evidence.mjs` | Load and validate evidence. Classify it as absent, failing, inconclusive, unverified or passing |
14
+ | `packages/cli/lib/policy.mjs` | Default policy and fail-closed loader |
15
+ | `packages/cli/lib/report.mjs` | `markdown()`, `html()`, `writeReports()`. `escapeHtml` is exported and tested |
16
+ | `packages/cli/lib/installer.mjs` | Map of IDE directories and the copy routine |
17
+ | `scripts/ci-gate.mjs` | Runs the unit tests, builds evidence from that output, release-checks this repo |
18
+ | `scripts/generate-proof.mjs` | Regenerates sample reports, `proof/` and `documents/pramanasutra/audit` |
19
+ | `scripts/build-docs.mjs` | Builds this HTML site from the numbered Markdown files |
20
+
21
+ ## Exit codes
22
+
23
+ | Code | When |
24
+ |---|---|
25
+ | 0 | `doctor` on Node 20+, `help`, `version`, `agents`, `init`, `verify` success, `scan` finished, `release-check` with `READY_FOR_HUMAN_APPROVAL` |
26
+ | 1 | Bad arguments, unreadable input, invalid evidence, invalid policy, doctor on Node older than 20, unknown command |
27
+ | 2 | `release-check` decision `NO_GO` |
28
+ | 3 | `release-check` decision `REVIEW_REQUIRED` |
29
+
30
+ `scan` does not use 2 or 3. It always exits 0 after a successful inspection so a search can be informational. Use `release-check` when the exit code must mean the gate.
31
+
32
+ ## Report object (schema 1.0.0)
33
+
34
+ Written as `report.json`. The Markdown and HTML are renderings of this object, plus a few fixed explanation sentences.
35
+
36
+ | Field | Meaning |
37
+ |---|---|
38
+ | `schemaVersion` | `"1.0.0"` |
39
+ | `product` | `PramanaSutra AI` |
40
+ | `toolVersion` | Version from `package.json` at scan time |
41
+ | `generatedAt` | ISO-8601 UTC |
42
+ | `scannedPath` | Base name of the target directory only |
43
+ | `capabilities` | Map of capability to `executed`, `not-run`, `not-supported` or `evidence-supplied` |
44
+ | `inventory.fileCount` | Files that were listed, after ignore rules and skip directories |
45
+ | `inventory.testFiles` | Relative paths classified as tests |
46
+ | `inventory.manifests` | `package.json`, `pyproject.toml`, `go.mod`, Gradle, Maven, Cargo, Gemfile, Composer, pubspec, `.sln`, `.csproj`, `requirements.txt` |
47
+ | `inventory.ciWorkflows` | GitHub Actions under `.github/workflows`, plus GitLab, Jenkins, Azure Pipelines, Bitbucket Pipelines file names |
48
+ | `inventory.partial` | True when the walk truncated, skipped a large or binary test file, or could not read a directory |
49
+ | `inventory.ignoredPaths` | Count of file or directory entries skipped because of `.pramanasutraignore` |
50
+ | `findings[]` | `id`, `ruleId`, `severity`, `confidence`, `title`, `description`, `evidence.path`, `evidence.line`, `recommendation`, `status` |
51
+ | `limitations[]` | Sentences about skips, truncation, ignore |
52
+ | `releaseGate` | `decision`, `policy`, `reasons[]`, `requiresHumanApproval`, `executedTestEvidence`, `evidenceState`, `automatedDeploymentAuthorized` |
53
+ | `evidence` | Present only when `--evidence` was accepted. Echoes source, command, time, exit code, passed, failed, skipped, environment, commit. Omitted on a plain scan |
54
+
55
+ 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.
56
+
57
+ ## Evidence file
58
+
59
+ | Field | Rule |
60
+ |---|---|
61
+ | `schemaVersion` | Must be `"1.0.0"` |
62
+ | `source` | `local-executed`, `ci-ingested`, or `external-unverified` |
63
+ | `command` | Non-empty string. Shown in the report. Escaped. It is not executed |
64
+ | `executedAt` | ISO-8601 timestamp |
65
+ | `exitCode` | Integer. Non-zero is failing even if `failed` is 0 |
66
+ | `passed`, `failed` | Integers ≥ 0 |
67
+ | `skipped` | Optional integer ≥ 0 |
68
+ | `environment`, `commit` | Optional strings |
69
+
70
+ 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.
71
+
72
+ ## Policy keys
73
+
74
+ Boolean keys, defaulting to the recommended policy when omitted: `releaseRequiresExecutedEvidence`, `blockOnFocusedTests`, `blockOnSkippedTests`, `requireCi`, `requireLicense`, `requireTests`.
75
+
76
+ `name` is a string up to 80 characters.
77
+
78
+ 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.
79
+
80
+ ## Scan limits
81
+
82
+ | Limit | Value |
83
+ |---|---|
84
+ | Max depth | 22 |
85
+ | Max files listed | 20,000 |
86
+ | Max test file read | 2,000,000 bytes |
87
+ | Max evidence file | 1,000,000 bytes |
88
+ | Max policy file | 100,000 bytes |
89
+ | Max ignore file | 100,000 bytes |
90
+
91
+ Skipped directory names: `.git`, `node_modules`, `.venv`, `venv`, `dist`, `build`, `target`, `coverage`, `.next`, `.nuxt`, `.turbo`, `.cache`, `reports`, `pramanasutra-reports`, `.idea`, `.gradle`, `vendor`, `bin`, `obj`.
92
+
93
+ ## Test detection
94
+
95
+ A file is a test if the relative path (forward slashes) matches a test directory (`test`, `tests`, `__tests__`, `spec`, `specs`, `e2e`), or a name like `*.test.*`, `*.spec.*`, `*_test.go`, `test_*.py`, `*_spec.rb`, or a class-style name such as `UserServiceTest.java`. Look-alikes such as `Submit.java` are not tests. The check is a regex, not a language module.
96
+
97
+ Rules run only on test files whose extension is in the source list: JS/TS and JSX/TSX, Python, Go, Rust, Ruby, PHP, Java, Kotlin, Swift, Dart, C#, Vue, Svelte.
98
+
99
+ ## Ignore file
100
+
101
+ `.pramanasutraignore` at the scan root. Blank lines and `#` comments are ignored. A line ending in `/` excludes that directory and everything under it. Any other line excludes that relative path and its children. Backslashes are normalized. `..` and absolute paths throw.
102
+
103
+ This repository's file excludes `fixtures/` and `examples/sample-app/` because those trees contain intentional `test.only` examples.
104
+
105
+ ## Installer map
106
+
107
+ | `--ide` | Directory under the target |
108
+ |---|---|
109
+ | `claude` | `.claude/skills` |
110
+ | `cursor` | `.cursor/skills` |
111
+ | `codex` | `.agents/skills` |
112
+ | `gemini` | `.gemini/skills` |
113
+ | `copilot` | `.github/skills` |
114
+ | `generic` | `.agents/skills` |
115
+ | `all` | Each distinct path above |
116
+
117
+ `codex` and `generic` share a path, so `all` does not copy that directory twice. Copying onto the canonical source directory itself is a no-op for that one destination.
118
+
119
+ ## Commands the shell accepts
120
+
121
+ See [CLI and reports](06-cli-and-reports.md) for examples. Unknown options fail. `--help`, `-h`, `--version` and `-v` are commands, not errors. Values are required for `--path`, `--out`, `--ide`, `--target`, `--evidence` and `--policy`.