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.
- package/.agents/skills/pramanasutra-access/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-api/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-data/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-defect/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-evidence/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-flake/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-flow/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-load/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-pipeline/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-prime/SKILL.md +38 -0
- package/.agents/skills/pramanasutra-regression/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-release/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-secure/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-strategy/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-unit/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-verify/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-visual/SKILL.md +34 -0
- package/.claude/agents/pramanasutra-prime.md +7 -0
- package/CHANGELOG.md +56 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +138 -2
- package/docs/.nojekyll +0 -0
- package/docs/00-start-here.html +195 -0
- package/docs/01-executive-summary.html +192 -0
- package/docs/02-functional-specification.html +199 -0
- package/docs/03-architecture.html +233 -0
- package/docs/04-technical-reference.html +204 -0
- package/docs/05-user-guide.html +232 -0
- package/docs/06-cli-and-reports.html +200 -0
- package/docs/07-rule-catalog.html +194 -0
- package/docs/08-skills-and-agents.html +191 -0
- package/docs/09-security-and-privacy.html +192 -0
- package/docs/10-legal-and-compliance.html +203 -0
- package/docs/11-testing-and-proof.html +197 -0
- package/docs/12-ci-and-release.html +208 -0
- package/docs/13-roadmap-and-status.html +186 -0
- package/docs/14-faq-and-glossary.html +204 -0
- package/docs/15-maintainer-guide.html +200 -0
- package/docs/agent-catalog.md +3 -0
- package/docs/api.md +3 -0
- package/docs/architecture.md +15 -0
- package/docs/assets/favicon.svg +1 -0
- package/docs/assets/site.css +183 -0
- package/docs/assets/site.js +79 -0
- package/docs/audit/report.html +39 -0
- package/docs/audit/report.json +59 -0
- package/docs/audit/report.md +80 -0
- package/docs/commands.md +13 -0
- package/docs/compatibility.md +15 -0
- package/docs/configuration.md +3 -0
- package/docs/execution-safety.md +3 -0
- package/docs/handbook/01-executive-summary.html +1 -0
- package/docs/handbook/01-executive-summary.md +51 -0
- package/docs/handbook/02-functional-specification.html +1 -0
- package/docs/handbook/02-functional-specification.md +69 -0
- package/docs/handbook/03-technical-specification.html +1 -0
- package/docs/handbook/03-technical-specification.md +85 -0
- package/docs/handbook/04-architecture.html +1 -0
- package/docs/handbook/04-architecture.md +107 -0
- package/docs/handbook/05-user-guide.html +1 -0
- package/docs/handbook/05-user-guide.md +117 -0
- package/docs/handbook/06-cli-reference.html +1 -0
- package/docs/handbook/06-cli-reference.md +88 -0
- package/docs/handbook/07-security-privacy-legal.html +1 -0
- package/docs/handbook/07-security-privacy-legal.md +65 -0
- package/docs/handbook/08-testing-and-proof.html +1 -0
- package/docs/handbook/08-testing-and-proof.md +83 -0
- package/docs/handbook/09-compatibility-and-roadmap.html +1 -0
- package/docs/handbook/09-compatibility-and-roadmap.md +53 -0
- package/docs/handbook/10-contributor-guide.html +1 -0
- package/docs/handbook/10-contributor-guide.md +64 -0
- package/docs/handbook/11-glossary-and-faq.html +1 -0
- package/docs/handbook/11-glossary-and-faq.md +52 -0
- package/docs/handbook/12-rule-catalog.html +1 -0
- package/docs/handbook/12-rule-catalog.md +65 -0
- package/docs/handbook/README.md +40 -0
- package/docs/handbook/index.html +1 -0
- package/docs/index.html +195 -0
- package/docs/legal/trademark-and-name-clearance.html +1 -0
- package/docs/legal/trademark-and-name-clearance.md +32 -0
- package/docs/master-claude-prompt.md +483 -0
- package/docs/proof/eval-results.json +91 -0
- package/docs/proof/test-results.txt +51 -0
- package/docs/quality-gates.md +10 -0
- package/docs/report-schema.md +22 -0
- package/docs/roadmap.md +3 -0
- package/docs/robots.txt +22 -0
- package/docs/samples/clean-project/report.html +29 -0
- package/docs/samples/clean-project/report.json +45 -0
- package/docs/samples/clean-project/report.md +67 -0
- package/docs/samples/focused-test/report.html +29 -0
- package/docs/samples/focused-test/report.json +60 -0
- package/docs/samples/focused-test/report.md +74 -0
- package/docs/samples/missing-ci/report.html +29 -0
- package/docs/samples/missing-ci/report.json +59 -0
- package/docs/samples/missing-ci/report.md +75 -0
- package/docs/samples/missing-tests/report.html +29 -0
- package/docs/samples/missing-tests/report.json +59 -0
- package/docs/samples/missing-tests/report.md +75 -0
- package/docs/samples/multi-language/report.html +33 -0
- package/docs/samples/multi-language/report.json +116 -0
- package/docs/samples/multi-language/report.md +110 -0
- package/docs/samples/unsafe-names/report.html +29 -0
- package/docs/samples/unsafe-names/report.json +61 -0
- package/docs/samples/unsafe-names/report.md +75 -0
- package/docs/server-deployment.md +3 -0
- package/docs/sitemap.xml +20 -0
- package/docs/standards.md +12 -0
- package/docs/status.md +20 -0
- package/docs/troubleshooting.md +7 -0
- package/docs/trust-model.md +3 -0
- package/documents/pramanasutra/00-start-here.md +85 -0
- package/documents/pramanasutra/01-executive-summary.md +61 -0
- package/documents/pramanasutra/02-functional-specification.md +90 -0
- package/documents/pramanasutra/03-architecture.md +102 -0
- package/documents/pramanasutra/04-technical-reference.md +121 -0
- package/documents/pramanasutra/05-user-guide.md +152 -0
- package/documents/pramanasutra/06-cli-and-reports.md +79 -0
- package/documents/pramanasutra/07-rule-catalog.md +79 -0
- package/documents/pramanasutra/08-skills-and-agents.md +68 -0
- package/documents/pramanasutra/09-security-and-privacy.md +73 -0
- package/documents/pramanasutra/10-legal-and-compliance.md +72 -0
- package/documents/pramanasutra/11-testing-and-proof.md +72 -0
- package/documents/pramanasutra/12-ci-and-release.md +89 -0
- package/documents/pramanasutra/13-roadmap-and-status.md +68 -0
- package/documents/pramanasutra/14-faq-and-glossary.md +81 -0
- package/documents/pramanasutra/15-maintainer-guide.md +81 -0
- package/documents/pramanasutra/README.md +11 -0
- package/documents/pramanasutra/audit/report.html +39 -0
- package/documents/pramanasutra/audit/report.json +59 -0
- package/documents/pramanasutra/audit/report.md +80 -0
- package/documents/pramanasutra/html/00-start-here.html +195 -0
- package/documents/pramanasutra/html/01-executive-summary.html +192 -0
- package/documents/pramanasutra/html/02-functional-specification.html +199 -0
- package/documents/pramanasutra/html/03-architecture.html +233 -0
- package/documents/pramanasutra/html/04-technical-reference.html +204 -0
- package/documents/pramanasutra/html/05-user-guide.html +232 -0
- package/documents/pramanasutra/html/06-cli-and-reports.html +200 -0
- package/documents/pramanasutra/html/07-rule-catalog.html +194 -0
- package/documents/pramanasutra/html/08-skills-and-agents.html +191 -0
- package/documents/pramanasutra/html/09-security-and-privacy.html +192 -0
- package/documents/pramanasutra/html/10-legal-and-compliance.html +203 -0
- package/documents/pramanasutra/html/11-testing-and-proof.html +197 -0
- package/documents/pramanasutra/html/12-ci-and-release.html +208 -0
- package/documents/pramanasutra/html/13-roadmap-and-status.html +186 -0
- package/documents/pramanasutra/html/14-faq-and-glossary.html +204 -0
- package/documents/pramanasutra/html/15-maintainer-guide.html +200 -0
- package/documents/pramanasutra/html/audit/report.html +39 -0
- package/documents/pramanasutra/html/audit/report.json +59 -0
- package/documents/pramanasutra/html/audit/report.md +80 -0
- package/documents/pramanasutra/html/index.html +195 -0
- package/documents/pramanasutra/html/proof/eval-results.json +91 -0
- package/documents/pramanasutra/html/proof/test-results.txt +51 -0
- package/documents/pramanasutra/html/robots.txt +22 -0
- package/documents/pramanasutra/html/samples/clean-project/report.html +29 -0
- package/documents/pramanasutra/html/samples/clean-project/report.json +45 -0
- package/documents/pramanasutra/html/samples/clean-project/report.md +67 -0
- package/documents/pramanasutra/html/samples/focused-test/report.html +29 -0
- package/documents/pramanasutra/html/samples/focused-test/report.json +60 -0
- package/documents/pramanasutra/html/samples/focused-test/report.md +74 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.html +29 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.json +59 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.md +75 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.html +29 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.json +59 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.md +75 -0
- package/documents/pramanasutra/html/samples/multi-language/report.html +33 -0
- package/documents/pramanasutra/html/samples/multi-language/report.json +116 -0
- package/documents/pramanasutra/html/samples/multi-language/report.md +110 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.html +29 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.json +61 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.md +75 -0
- package/documents/pramanasutra/html/sitemap.xml +20 -0
- package/documents/pramanasutra/proof/eval-results.json +91 -0
- package/documents/pramanasutra/proof/test-results.txt +51 -0
- package/documents/pramanasutra/samples/clean-project/report.html +29 -0
- package/documents/pramanasutra/samples/clean-project/report.json +45 -0
- package/documents/pramanasutra/samples/clean-project/report.md +67 -0
- package/documents/pramanasutra/samples/focused-test/report.html +29 -0
- package/documents/pramanasutra/samples/focused-test/report.json +60 -0
- package/documents/pramanasutra/samples/focused-test/report.md +74 -0
- package/documents/pramanasutra/samples/missing-ci/report.html +29 -0
- package/documents/pramanasutra/samples/missing-ci/report.json +59 -0
- package/documents/pramanasutra/samples/missing-ci/report.md +75 -0
- package/documents/pramanasutra/samples/missing-tests/report.html +29 -0
- package/documents/pramanasutra/samples/missing-tests/report.json +59 -0
- package/documents/pramanasutra/samples/missing-tests/report.md +75 -0
- package/documents/pramanasutra/samples/multi-language/report.html +33 -0
- package/documents/pramanasutra/samples/multi-language/report.json +116 -0
- package/documents/pramanasutra/samples/multi-language/report.md +110 -0
- package/documents/pramanasutra/samples/unsafe-names/report.html +29 -0
- package/documents/pramanasutra/samples/unsafe-names/report.json +61 -0
- package/documents/pramanasutra/samples/unsafe-names/report.md +75 -0
- package/examples/dotnet-app/README.md +3 -0
- package/examples/evidence/passing.json +12 -0
- package/examples/java-service/README.md +3 -0
- package/examples/mobile/README.md +3 -0
- package/examples/python-api/README.md +3 -0
- package/examples/release-policy/README.md +3 -0
- package/examples/sample-app/README.md +3 -0
- package/examples/sample-app/package.json +8 -0
- package/examples/sample-app/src/math.js +1 -0
- package/examples/sample-app/tests/math.test.js +5 -0
- package/examples/sample-output/clean-project/report.html +29 -0
- package/examples/sample-output/clean-project/report.json +45 -0
- package/examples/sample-output/clean-project/report.md +67 -0
- package/examples/sample-output/focused-test/report.html +29 -0
- package/examples/sample-output/focused-test/report.json +60 -0
- package/examples/sample-output/focused-test/report.md +74 -0
- package/examples/sample-output/missing-ci/report.html +29 -0
- package/examples/sample-output/missing-ci/report.json +59 -0
- package/examples/sample-output/missing-ci/report.md +75 -0
- package/examples/sample-output/missing-tests/report.html +29 -0
- package/examples/sample-output/missing-tests/report.json +59 -0
- package/examples/sample-output/missing-tests/report.md +75 -0
- package/examples/sample-output/multi-language/report.html +33 -0
- package/examples/sample-output/multi-language/report.json +116 -0
- package/examples/sample-output/multi-language/report.md +110 -0
- package/examples/sample-output/unsafe-names/report.html +29 -0
- package/examples/sample-output/unsafe-names/report.json +61 -0
- package/examples/sample-output/unsafe-names/report.md +75 -0
- package/llms.txt +60 -0
- package/package.json +65 -4
- package/packages/cli/bin/pramanasutra.mjs +90 -0
- package/packages/cli/lib/evidence.mjs +46 -0
- package/packages/cli/lib/installer.mjs +39 -0
- package/packages/cli/lib/policy.mjs +33 -0
- package/packages/cli/lib/report.mjs +169 -0
- package/packages/cli/lib/scanner.mjs +146 -0
- package/policies/recommended.json +11 -0
- package/policies/strict.json +12 -0
- package/templates/defect-report.md +11 -0
- package/templates/qa-strategy.md +9 -0
- package/templates/release-notes.md +9 -0
- package/templates/release-readiness.md +9 -0
- package/templates/rollback-plan.md +7 -0
- package/templates/test-evidence.json +11 -0
- package/templates/test-plan.md +4 -0
- package/templates/traceability-matrix.csv +1 -0
- package/workflows/create-test-plan.md +9 -0
- package/workflows/implement-tests.md +9 -0
- package/workflows/inspect-project.md +9 -0
- package/workflows/investigate-failure.md +9 -0
- package/workflows/post-release-observability.md +9 -0
- package/workflows/release-readiness.md +9 -0
- package/workflows/verify-regression.md +9 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# User guide
|
|
2
|
+
|
|
3
|
+
<!-- summary: How to install PramanaSutra AI, run a release check, read the Markdown and HTML reports, supply evidence, and install skills. Node.js 20 or newer. No API key. -->
|
|
4
|
+
|
|
5
|
+
## Before you start
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
From a clone of this repository the command is:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node packages/cli/bin/pramanasutra.mjs doctor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
From anywhere, once the repository is public on GitHub:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx github:shahvatsalofficial/pramanasutra-ai doctor
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
After the publish workflow has released `0.3.2`, `npx pramanasutra doctor` is the same command.
|
|
22
|
+
|
|
23
|
+
`npx` downloads the repository. The CLI that then runs still does not call a model and does not scan until you ask it to.
|
|
24
|
+
|
|
25
|
+
## Check a project
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node packages/cli/bin/pramanasutra.mjs release-check --path path/to/project
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You get a paragraph on the terminal and three files in `./pramanasutra-reports/`:
|
|
32
|
+
|
|
33
|
+
| File | Open it with |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `report.md` | The pull request, an editor, or GitHub |
|
|
36
|
+
| `report.html` | Any browser. Light and dark follow the system. It prints |
|
|
37
|
+
| `report.json` | A script. Same facts as the other two |
|
|
38
|
+
|
|
39
|
+
Choose another folder with `--out reports/feature-a`. Skip the files with `--no-report` if you only want the exit code.
|
|
40
|
+
|
|
41
|
+
The terminal line always includes `Tests executed by this tool: NO`. If you did not pass `--evidence`, the gate cannot be ready.
|
|
42
|
+
|
|
43
|
+
## Read the result
|
|
44
|
+
|
|
45
|
+
Open `report.html` first if you are a person. The first block is the decision:
|
|
46
|
+
|
|
47
|
+
- **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.
|
|
48
|
+
- **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.
|
|
49
|
+
- **READY_FOR_HUMAN_APPROVAL** (exit 0). The policy's checks passed. It is still not permission to deploy.
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
Samples you can open without scanning anything:
|
|
54
|
+
|
|
55
|
+
| Situation | Markdown | HTML |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| Focused test, NO_GO | [report.md](samples/focused-test/report.md) | [report.html](samples/focused-test/report.html) |
|
|
58
|
+
| Clean project plus passing evidence | [report.md](samples/clean-project/report.md) | [report.html](samples/clean-project/report.html) |
|
|
59
|
+
| Tests exist, CI does not | [report.md](samples/missing-ci/report.md) | [report.html](samples/missing-ci/report.html) |
|
|
60
|
+
| CI exists, tests do not | [report.md](samples/missing-tests/report.md) | [report.html](samples/missing-tests/report.html) |
|
|
61
|
+
| Odd file names, still a focused test | [report.md](samples/unsafe-names/report.md) | [report.html](samples/unsafe-names/report.html) |
|
|
62
|
+
| Python, Java and Go skips | [report.md](samples/multi-language/report.md) | [report.html](samples/multi-language/report.html) |
|
|
63
|
+
|
|
64
|
+
This repository's own audit: [audit/report.md](audit/report.md) and [audit/report.html](audit/report.html).
|
|
65
|
+
|
|
66
|
+
## Supply evidence
|
|
67
|
+
|
|
68
|
+
The CLI will not run your tests. You run them, then describe the result. Minimum shape:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"schemaVersion": "1.0.0",
|
|
73
|
+
"source": "local-executed",
|
|
74
|
+
"command": "npm test",
|
|
75
|
+
"executedAt": "2026-11-06T12:00:00Z",
|
|
76
|
+
"exitCode": 0,
|
|
77
|
+
"passed": 37,
|
|
78
|
+
"failed": 0,
|
|
79
|
+
"skipped": 1
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`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.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Check a file alone:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
node packages/cli/bin/pramanasutra.mjs verify --evidence evidence.json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
## Choose a policy
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
node packages/cli/bin/pramanasutra.mjs release-check --path . --evidence evidence.json --policy policies/strict.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
## Install the skills
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node packages/cli/bin/pramanasutra.mjs init --ide claude --target /path/to/your/app
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
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`.
|
|
112
|
+
|
|
113
|
+
Then tell the assistant, in your own words or this one:
|
|
114
|
+
|
|
115
|
+
> PramanaSutra Prime: assess this repository's test quality and release readiness. Stay read-only, cite file and line, separate observed facts from executed results, and ask before running any tests.
|
|
116
|
+
|
|
117
|
+
The skill is supposed to refuse to invent a pass. If a host ignores the skill, that is a host limitation. It is listed as not verified in [Roadmap and status](13-roadmap-and-status.md).
|
|
118
|
+
|
|
119
|
+
## Exclude paths
|
|
120
|
+
|
|
121
|
+
Put `.pramanasutraignore` at the root of the project you scan. Example:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
# generated fixtures, not the product
|
|
125
|
+
fixtures/
|
|
126
|
+
examples/sample-app/
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The report will say how many paths were excluded. If you exclude your real tests, the gate can look healthier than the project is. That is your file. Read the limitation line.
|
|
130
|
+
|
|
131
|
+
## Fix a NO_GO for a focused test
|
|
132
|
+
|
|
133
|
+
1. Open the path in the finding, for example `tests/a.test.js:2`.
|
|
134
|
+
2. Remove `.only`, `fit` or `fdescribe`.
|
|
135
|
+
3. Run the project's real test command and keep the output.
|
|
136
|
+
4. Run `release-check` again with `--evidence` pointing at a file that matches that output.
|
|
137
|
+
|
|
138
|
+
Removing `.only` without running the suite only clears the static finding. Without evidence the gate becomes `REVIEW_REQUIRED`, which is still not ready. That is the correct outcome.
|
|
139
|
+
|
|
140
|
+
## When something fails
|
|
141
|
+
|
|
142
|
+
| Symptom | What it usually means |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `Node 20+ required` | `doctor` saw an older Node. Install 20 or newer |
|
|
145
|
+
| `Scan target must be a real directory` | The path is missing, a file, or a symlink |
|
|
146
|
+
| `Invalid evidence` | A field is missing or the wrong type. `verify` prints the reason |
|
|
147
|
+
| `Invalid policy` | Unknown key, or a safety flag set to an unsafe value |
|
|
148
|
+
| Exit 3 and you expected 0 | No evidence, evidence not from a trusted source, zero passes, partial scan, or missing tests, CI or license |
|
|
149
|
+
| HTML looks empty of findings | The scan found none. Read the limitations and the evidence block before you treat that as healthy |
|
|
150
|
+
| Tests "passed" inside an AI chat but the CLI says not-run | The chat is not evidence. Pass `--evidence` or do not claim the run |
|
|
151
|
+
|
|
152
|
+
More terms: [FAQ](14-faq-and-glossary.md).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# CLI and reports
|
|
2
|
+
|
|
3
|
+
<!-- summary: Every PramanaSutra AI command and flag, and how report.md, report.html and report.json present the same audit. -->
|
|
4
|
+
|
|
5
|
+
Binary name: `pramanasutra`. From a clone: `node packages/cli/bin/pramanasutra.mjs`.
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
| Command | What it does | Exit |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `version`, `--version`, `-v` | Prints `PramanaSutra AI` and the version | 0 |
|
|
12
|
+
| `help`, `--help`, `-h` | Prints usage | 0 |
|
|
13
|
+
| `doctor [--json]` | Node major version, platform, offline, no model | 0 if Node ≥ 20, else 1 |
|
|
14
|
+
| `agents list [--json]` | Canonical skill names | 0 |
|
|
15
|
+
| `scan --path <dir> [--out <dir>] [--no-report] [--json]` | Static audit plus a gate with no evidence file | 0 on success, 1 on bad input |
|
|
16
|
+
| `release-check --path <dir> [--evidence <file>] [--policy <file>] [--out <dir>] [--no-report] [--json]` | Audit plus gate. This is the CI command | 0, 2, 3, or 1 |
|
|
17
|
+
| `verify --evidence <file> [--json]` | Schema-check an evidence file. Does not scan | 0 or 1 |
|
|
18
|
+
| `init --ide <name> --target <dir> [--force]` | Copy skills. `--ide` is `claude`, `cursor`, `codex`, `gemini`, `copilot`, `generic` or `all` | 0 or 1 |
|
|
19
|
+
|
|
20
|
+
`--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.
|
|
21
|
+
|
|
22
|
+
`--evidence` and `--policy` on `scan` are errors. They belong to `release-check` so a scan cannot quietly change meaning.
|
|
23
|
+
|
|
24
|
+
## Flags that take a value
|
|
25
|
+
|
|
26
|
+
`--path`, `--out`, `--ide`, `--target`, `--evidence`, `--policy`. The value is the next argument. A missing value is an error. `--force`, `--json` and `--no-report` take no value.
|
|
27
|
+
|
|
28
|
+
## Where files are written
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
The three names are fixed: `report.md`, `report.html`, `report.json`. They are written in that order, in one directory, in one call. If the directory cannot be created, nothing is reported as success.
|
|
33
|
+
|
|
34
|
+
## How to read report.md
|
|
35
|
+
|
|
36
|
+
1. The first table is identity: project base name, time, tool version, schema, **Release decision**, policy, evidence state.
|
|
37
|
+
2. The blockquote repeats the decision in a sentence.
|
|
38
|
+
3. **Summary** counts files, test files, workflows, manifests and findings by severity. It states that this tool did not execute tests.
|
|
39
|
+
4. **Supplied test evidence** is either an explicit "no file" or a table of source, command, time, exit code, passed, failed, skipped. Those numbers are from the file. They are not a new test run.
|
|
40
|
+
5. **Findings at a glance** is the table to paste into a review: severity, rule, `path:line`, fix.
|
|
41
|
+
6. **Findings** repeats each item with why it matters.
|
|
42
|
+
7. **Test files seen** and **CI workflows seen** show what the classification actually matched, up to 40 paths, then a count of the rest.
|
|
43
|
+
8. **Capabilities** translates `not-run` and `not-supported`.
|
|
44
|
+
9. **Release gate reasons** is the list that produced the decision.
|
|
45
|
+
10. **Limitations** includes walk limits, ignore exclusions, and the standing disclaimer.
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
## How to read report.html
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
## How to read report.json
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
## Worked terminal session
|
|
60
|
+
|
|
61
|
+
Against the focused-test fixture, from a clone:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node packages/cli/bin/pramanasutra.mjs release-check --path fixtures/focused-test --no-report
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
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).
|
|
68
|
+
|
|
69
|
+
Against the clean fixture with its evidence file:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node packages/cli/bin/pramanasutra.mjs release-check --path fixtures/clean-project --evidence fixtures/clean-project/evidence.json --no-report
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Expect exit code 0 and `READY_FOR_HUMAN_APPROVAL`.
|
|
76
|
+
|
|
77
|
+
## What the report will not contain
|
|
78
|
+
|
|
79
|
+
A coverage percentage, a flaky-test rate, a screenshot, a CVE list, a performance number, or a sentence that the suite passed, unless that sentence is the evidence table quoting the file you passed in. If a field is absent, it was not measured.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Rule catalog
|
|
2
|
+
|
|
3
|
+
<!-- summary: Every static rule PramanaSutra AI 0.3.0 can emit, with severity, what the line looks like, a committed sample, and the misses to expect. -->
|
|
4
|
+
|
|
5
|
+
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".
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
## FOCUSED_TEST
|
|
10
|
+
|
|
11
|
+
| | |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Severity | high |
|
|
14
|
+
| Default gate | `NO_GO` when `blockOnFocusedTests` is true (the default) |
|
|
15
|
+
| Why | A focused test runs one case and silently drops the rest. CI can be green and meaningless |
|
|
16
|
+
| Matches | Line starts with optional `await`, then `describe.only(`, `test.only(`, `it.only(`, or `fit(`, `fdescribe(` |
|
|
17
|
+
| Fix text | Remove `.only` / `fit` / `fdescribe`, then execute the full suite |
|
|
18
|
+
| Sample | [samples/focused-test](samples/focused-test/report.md) |
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
## SKIPPED_TEST
|
|
23
|
+
|
|
24
|
+
| | |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Severity | low |
|
|
27
|
+
| Default gate | Reported. Blocks only when `blockOnSkippedTests` is true (`policies/strict.json`) |
|
|
28
|
+
| Why | A skip can be an honest pending test or a buried failure. The tool cannot tell |
|
|
29
|
+
| Matches | `describe.skip(`, `test.skip(`, `it.skip(`, `test.todo(`, `xit(`, `xtest(`, `xdescribe(` |
|
|
30
|
+
| 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` |
|
|
31
|
+
| Fix text | Confirm the skip is intended, tracked, and does not hide a required case |
|
|
32
|
+
| Sample | [samples/multi-language](samples/multi-language/report.md) (pytest decorator, JUnit `@Disabled`, Go `t.Skip`) |
|
|
33
|
+
|
|
34
|
+
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`.
|
|
35
|
+
|
|
36
|
+
## NO_TESTS
|
|
37
|
+
|
|
38
|
+
| | |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Severity | medium |
|
|
41
|
+
| Default gate | `REVIEW_REQUIRED` when `requireTests` is true and the test list is empty |
|
|
42
|
+
| Why | The supported naming conventions found nothing. The project may still have tests under an unknown layout |
|
|
43
|
+
| Evidence | `path` is `.`, no line |
|
|
44
|
+
| Fix text | Confirm the framework location; add and execute relevant tests |
|
|
45
|
+
| Sample | [samples/missing-tests](samples/missing-tests/report.md) |
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
## NO_CI
|
|
50
|
+
|
|
51
|
+
| | |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Severity | medium |
|
|
54
|
+
| Default gate | `REVIEW_REQUIRED` when `requireCi` is true and no workflow file matched |
|
|
55
|
+
| Recognises | `.github/workflows/*.yml` and `.yaml`, `.gitlab-ci.yml`, `Jenkinsfile`, `azure-pipelines.yml`, `bitbucket-pipelines.yml` |
|
|
56
|
+
| Does not recognise | CircleCI's usual `.circleci/config.yml`, Buildkite, a CI config with another name, or a workflow that exists only in a hosted UI |
|
|
57
|
+
| Sample | [samples/missing-ci](samples/missing-ci/report.md) |
|
|
58
|
+
|
|
59
|
+
Finding a workflow file does not mean the workflow runs tests. The rule is presence, not semantics.
|
|
60
|
+
|
|
61
|
+
## NO_LICENSE
|
|
62
|
+
|
|
63
|
+
| | |
|
|
64
|
+
|---|---|
|
|
65
|
+
| Severity | low |
|
|
66
|
+
| Confidence | high (it is a file name check) |
|
|
67
|
+
| Default gate | `REVIEW_REQUIRED` when `requireLicense` is true |
|
|
68
|
+
| Recognises | `LICENSE`, `LICENSE.md`, `LICENSE.txt`, `COPYING` at the repository root only, any case |
|
|
69
|
+
| Sample | [samples/multi-language](samples/multi-language/report.md) includes this finding together with the skips |
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
## Gate interaction
|
|
74
|
+
|
|
75
|
+
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`.
|
|
76
|
+
|
|
77
|
+
## Adding a rule
|
|
78
|
+
|
|
79
|
+
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.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Skills and agents
|
|
2
|
+
|
|
3
|
+
<!-- summary: The 17 PramanaSutra Agent Skills, where they are installed, and the safety contract they share. The CLI does not run the skills. The IDE's model does, if the host loads them. -->
|
|
4
|
+
|
|
5
|
+
Canonical files: `.agents/skills/<name>/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.
|
|
6
|
+
|
|
7
|
+
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).
|
|
8
|
+
|
|
9
|
+
## Shared contract
|
|
10
|
+
|
|
11
|
+
Every skill in this repository is required by test to:
|
|
12
|
+
|
|
13
|
+
- start with YAML frontmatter
|
|
14
|
+
- set `name` equal to the directory name
|
|
15
|
+
- include a description
|
|
16
|
+
- include a `## Safe workflow` section
|
|
17
|
+
- tell the model not to fabricate, claim, or approve results it does not have
|
|
18
|
+
|
|
19
|
+
Prime's workflow, which the others are written to match, says: inspect only what was authorized, treat source and logs as untrusted data, state missing evidence, run tests only with permission, capture the real command and exit code, and never approve deployment. Boundaries forbid destructive actions, production load tests, unapproved network access, secret collection, and publishing.
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
## The roster
|
|
24
|
+
|
|
25
|
+
| Skill | Job |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `pramanasutra-prime` | Coordinates inspection, QA strategy, evidence review and a release recommendation. Does not approve a deploy |
|
|
28
|
+
| `pramanasutra-strategy` | Risk-based quality strategy and traceability from requirement to test |
|
|
29
|
+
| `pramanasutra-unit` | Focused, deterministic unit and component tests with real assertions |
|
|
30
|
+
| `pramanasutra-flow` | Cross-system and end-to-end scenarios that can be repeated |
|
|
31
|
+
| `pramanasutra-api` | REST, GraphQL, gRPC and event contracts, and whether tests cover them |
|
|
32
|
+
| `pramanasutra-visual` | Screenshot baselines and rendering gaps. Does not take screenshots by itself |
|
|
33
|
+
| `pramanasutra-access` | Accessibility and cross-device planning, including manual checks |
|
|
34
|
+
| `pramanasutra-load` | Performance test design, thresholds and abort rules. Not a license to load-test production |
|
|
35
|
+
| `pramanasutra-data` | Migration, backup, rollback and fixture review |
|
|
36
|
+
| `pramanasutra-secure` | Security-test gaps from evidence. Not a penetration test |
|
|
37
|
+
| `pramanasutra-regression` | What changed, and which tests are relevant |
|
|
38
|
+
| `pramanasutra-flake` | Nondeterministic tests, using a reproduction, not a hunch |
|
|
39
|
+
| `pramanasutra-defect` | A failure turned into a minimal reproduction |
|
|
40
|
+
| `pramanasutra-pipeline` | Whether automation and gates mean what the team thinks |
|
|
41
|
+
| `pramanasutra-release` | Criteria, rollout and rollback. Human approval stays human |
|
|
42
|
+
| `pramanasutra-evidence` | Reports and evidence that stay traceable and avoid leaking secrets |
|
|
43
|
+
| `pramanasutra-verify` | Challenges the gate before someone approves |
|
|
44
|
+
|
|
45
|
+
## Install paths
|
|
46
|
+
|
|
47
|
+
| Host | Path | Verified live in that host? |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Claude Code | `.claude/skills` | No |
|
|
50
|
+
| Cursor | `.cursor/skills` | No |
|
|
51
|
+
| OpenAI Codex | `.agents/skills` | No |
|
|
52
|
+
| GitHub Copilot | `.github/skills` | No |
|
|
53
|
+
| Gemini CLI | `.gemini/skills` | No |
|
|
54
|
+
| Generic | `.agents/skills` | No |
|
|
55
|
+
|
|
56
|
+
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).
|
|
57
|
+
|
|
58
|
+
## How Prime is meant to delegate
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
## What to put in a prompt
|
|
63
|
+
|
|
64
|
+
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.
|
|
65
|
+
|
|
66
|
+
## Changing a skill
|
|
67
|
+
|
|
68
|
+
Edit `.agents/skills/<name>/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.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Security and privacy
|
|
2
|
+
|
|
3
|
+
<!-- summary: Threat model, controls and residual risk for PramanaSutra AI. The CLI is local, read-only on the target, and not a vulnerability scanner. No independent security review has been done. -->
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
## Assets
|
|
8
|
+
|
|
9
|
+
| Asset | Why it matters |
|
|
10
|
+
|---|---|
|
|
11
|
+
| The target source tree | May contain proprietary code. The scanner reads it |
|
|
12
|
+
| Evidence and policy files | May contain commands, host names, commit ids |
|
|
13
|
+
| The report | Repeats finding paths and the evidence fields. People forward it |
|
|
14
|
+
| Skill text | Tells a model how to behave. A hostile edit changes the assistant's instructions |
|
|
15
|
+
| The machine running the CLI | The process has the user's filesystem rights |
|
|
16
|
+
|
|
17
|
+
## What the CLI does not do
|
|
18
|
+
|
|
19
|
+
- 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.)
|
|
20
|
+
- It does not execute the target's tests, package scripts, or binaries.
|
|
21
|
+
- It does not follow symlinks, so a link cannot pull in a directory outside the tree.
|
|
22
|
+
- It does not walk into a path that contains a symlink component during install.
|
|
23
|
+
- It does not put the absolute target path in the report. It stores the base name.
|
|
24
|
+
- It escapes report text so a file name or an evidence command cannot inject a tag.
|
|
25
|
+
|
|
26
|
+
## Controls
|
|
27
|
+
|
|
28
|
+
| Threat | Control |
|
|
29
|
+
|---|---|
|
|
30
|
+
| Accidental execution of repo code | No test runner in the CLI. Evidence is data |
|
|
31
|
+
| Symlink escape while scanning | `lstat` / `Dirent` symlink check, skip, count |
|
|
32
|
+
| Symlink escape while installing skills | Walk the destination, refuse if any component is a symlink |
|
|
33
|
+
| Overwriting a team's own skills | Refuse when the destination exists, unless `--force` |
|
|
34
|
+
| Policy that allows unattended deploy | Loader rejects `allowAutomatedDeployment: true` |
|
|
35
|
+
| Tampered evidence promoted to "ready" | `external-unverified` cannot reach ready. This does not detect a lie in a `ci-ingested` file |
|
|
36
|
+
| HTML injection via a crafted file name | `escapeHtml` on every interpolated value. Tested |
|
|
37
|
+
| Markdown injection of the same name | `<` and `>` escaped in the Markdown renderer |
|
|
38
|
+
| Ignore file used as a path traversal | Entries containing `..` or an absolute path throw |
|
|
39
|
+
| Huge input | Size caps on evidence, policy, ignore, and per test file |
|
|
40
|
+
| Binary mistaken for source | NUL byte skips the file and marks the scan partial, so the gate cannot be ready |
|
|
41
|
+
| 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 |
|
|
42
|
+
|
|
43
|
+
## Privacy
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
You can still leak data yourself:
|
|
48
|
+
|
|
49
|
+
- The evidence file's `command`, `environment` and `commit` are copied into the report.
|
|
50
|
+
- Finding paths are relative and can still reveal internal layout.
|
|
51
|
+
- 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.
|
|
52
|
+
- `init` copies skill files into the target. Those files are project content, not telemetry.
|
|
53
|
+
|
|
54
|
+
The HTML documentation uses `localStorage` only if you toggle the theme, and only in that browser. Search runs on the page. Nothing is sent.
|
|
55
|
+
|
|
56
|
+
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/`.
|
|
57
|
+
|
|
58
|
+
## Residual risk
|
|
59
|
+
|
|
60
|
+
- Heuristic rules miss vulnerabilities entirely. Do not use a ready gate as a security sign-off.
|
|
61
|
+
- A person can write `ci-ingested` evidence that does not match any CI run. The schema cannot prove the command happened.
|
|
62
|
+
- `--out` writes wherever the operator points. That is intended. Point it at a directory you mean to create.
|
|
63
|
+
- `init --force` deletes an existing skill directory and replaces it. Read the diff first.
|
|
64
|
+
- Skill files are instructions to a model. Review them like code before you install them into a repository with secrets in context.
|
|
65
|
+
- 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.
|
|
66
|
+
|
|
67
|
+
## Reporting a vulnerability
|
|
68
|
+
|
|
69
|
+
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`.
|
|
70
|
+
|
|
71
|
+
## CodeQL
|
|
72
|
+
|
|
73
|
+
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.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Legal and compliance
|
|
2
|
+
|
|
3
|
+
<!-- summary: Project notice for PramanaSutra AI: Apache-2.0, third-party names, trademarks not cleared, and what the output is not. This page is not a legal opinion and not legal advice. -->
|
|
4
|
+
|
|
5
|
+
> **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.
|
|
6
|
+
|
|
7
|
+
## License
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
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".
|
|
12
|
+
|
|
13
|
+
## Third-party code
|
|
14
|
+
|
|
15
|
+
Version 0.3.0 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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
## Names that are not ours
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
## The name PramanaSutra
|
|
24
|
+
|
|
25
|
+
"PramanaSutra" and "PramanaSutra AI" are project names used by Vatsal Shah. As of this version:
|
|
26
|
+
|
|
27
|
+
- They are **not** described here as registered trademarks.
|
|
28
|
+
- A clearance search of trademark registers, domains and package names has **not** been completed for this project.
|
|
29
|
+
- No filing is claimed.
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
## What the output is
|
|
36
|
+
|
|
37
|
+
A report is decision support. It is not:
|
|
38
|
+
|
|
39
|
+
- a certification of quality, security, accessibility or compliance
|
|
40
|
+
- an audit opinion under any professional standard
|
|
41
|
+
- a representation that tests passed, unless the evidence block is quoting a file the operator supplied
|
|
42
|
+
- legal advice about the scanned project
|
|
43
|
+
- permission to ship
|
|
44
|
+
|
|
45
|
+
Do not attach a PramanaSutra report to a regulatory submission as if it were an independent assessment.
|
|
46
|
+
|
|
47
|
+
## Privacy laws
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
## Acceptable use
|
|
52
|
+
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
## Regulated industries
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
## Export
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
## What a lawyer should still be asked
|
|
64
|
+
|
|
65
|
+
1. Is "PramanaSutra" available for the goods and countries you care about?
|
|
66
|
+
2. Does your use of the Apache-2.0 project, including NOTICE, match how you distribute it?
|
|
67
|
+
3. If you publish reports from private repositories, what do they disclose?
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
## Contact
|
|
71
|
+
|
|
72
|
+
Security reports: [Security and privacy](09-security-and-privacy.md) and `SECURITY.md`. Other maintainer contact is the GitHub repository [shahvatsalofficial/pramanasutra-ai](https://github.com/shahvatsalofficial/pramanasutra-ai).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Testing and proof
|
|
2
|
+
|
|
3
|
+
<!-- summary: How PramanaSutra AI is tested, the captured results, the labeled fixtures, and the limits of that evidence. Numbers below come from scripts/generate-proof.mjs, not from memory. -->
|
|
4
|
+
|
|
5
|
+
Trust the files, then the prose. If they disagree, the files win, and this page is stale.
|
|
6
|
+
|
|
7
|
+
| Artifact | What it is |
|
|
8
|
+
|---|---|
|
|
9
|
+
| [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 |
|
|
10
|
+
| [proof/eval-results.json](proof/eval-results.json) | Per-fixture expected rules versus found rules, plus precision and recall **on those fixtures** |
|
|
11
|
+
| [audit/report.md](audit/report.md) | Release check of this repository using that test run as evidence |
|
|
12
|
+
| [audit/report.html](audit/report.html) | The same audit |
|
|
13
|
+
| [samples/](samples) | The six fixtures rendered to Markdown, HTML and JSON |
|
|
14
|
+
|
|
15
|
+
Regenerate all of them with:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node scripts/generate-proof.mjs
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
## Captured unit run
|
|
24
|
+
|
|
25
|
+
On the run committed with version 0.3.0 the summary was:
|
|
26
|
+
|
|
27
|
+
- tests: 38
|
|
28
|
+
- pass: 37
|
|
29
|
+
- fail: 0
|
|
30
|
+
- skipped: 1
|
|
31
|
+
|
|
32
|
+
The skipped test is `nested symlink is skipped rather than followed`. The runtime could not create a symlink (`Symlink creation prohibited by OS permissions`). The test skips instead of failing. On a machine that allows symlinks the same test runs and must show the link was not followed. Do not quote "37 passed" as a universal CI number. Quote the file, and quote the CI run for Ubuntu and Windows.
|
|
33
|
+
|
|
34
|
+
The command does not use a network and does not need `npm install`.
|
|
35
|
+
|
|
36
|
+
## What the tests lock
|
|
37
|
+
|
|
38
|
+
The suite in `tests/cli.test.mjs` covers doctor, the 17 skills' frontmatter, focused and skipped tests, missing tests/CI/license, the three exit codes, HTML and Markdown escaping, default report paths, evidence classification, policy rejection, Java/C#/Ruby file names, the multi-language fixture, ignore-file traversal, binary test files, and `pytest.skip` / `test.todo`.
|
|
39
|
+
|
|
40
|
+
It does not cover a live IDE. It does not measure recall on a corpus the author did not write.
|
|
41
|
+
|
|
42
|
+
## Labeled fixtures
|
|
43
|
+
|
|
44
|
+
| Fixture | Expected rules | Expected gate |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `fixtures/clean-project` | none | `READY_FOR_HUMAN_APPROVAL` (its `evidence.json` is passing and `ci-ingested`) |
|
|
47
|
+
| `fixtures/focused-test` | `FOCUSED_TEST` | `NO_GO` |
|
|
48
|
+
| `fixtures/missing-ci` | `NO_CI` | `REVIEW_REQUIRED` |
|
|
49
|
+
| `fixtures/missing-tests` | `NO_TESTS` | `REVIEW_REQUIRED` |
|
|
50
|
+
| `fixtures/unsafe-names` | `FOCUSED_TEST` | `NO_GO` |
|
|
51
|
+
| `fixtures/multi-language` | `SKIPPED_TEST` three times, `NO_CI`, `NO_LICENSE` | `REVIEW_REQUIRED` |
|
|
52
|
+
|
|
53
|
+
`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.
|
|
54
|
+
|
|
55
|
+
## Self-audit
|
|
56
|
+
|
|
57
|
+
`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.
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
`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.
|
|
62
|
+
|
|
63
|
+
## What would falsify the claims
|
|
64
|
+
|
|
65
|
+
- A unit test fails. The claim "37 passed" is then false for that run.
|
|
66
|
+
- A fixture in the table gains or loses a rule. `eval-results.json` will show `pass: false` and the script exits 1.
|
|
67
|
+
- `ci-gate` cannot parse the reporter. It exits 1 and writes no ready evidence. That is preferred to a made-up count.
|
|
68
|
+
- A ready gate appears while `releaseGate.evidenceState` is not `passing`. That would be a defect. The tests forbid it for the cases they construct.
|
|
69
|
+
|
|
70
|
+
## Not in this proof
|
|
71
|
+
|
|
72
|
+
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.
|