invairiant 0.2.3__tar.gz

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 (76) hide show
  1. invairiant-0.2.3/.gitignore +50 -0
  2. invairiant-0.2.3/CHANGELOG.md +272 -0
  3. invairiant-0.2.3/LICENSE +201 -0
  4. invairiant-0.2.3/NOTICE +12 -0
  5. invairiant-0.2.3/PKG-INFO +56 -0
  6. invairiant-0.2.3/README.md +295 -0
  7. invairiant-0.2.3/cli/README.md +38 -0
  8. invairiant-0.2.3/cli/invairiant.py +1390 -0
  9. invairiant-0.2.3/docs/audit-workflow.md +193 -0
  10. invairiant-0.2.3/docs/audits/2026-07-03-closure-6-phase.json +90 -0
  11. invairiant-0.2.3/docs/audits/2026-07-03-closure-6-phase.md +29 -0
  12. invairiant-0.2.3/docs/audits/2026-07-03-self-audit.json +90 -0
  13. invairiant-0.2.3/docs/audits/2026-07-03-self-audit.md +146 -0
  14. invairiant-0.2.3/docs/cli.md +210 -0
  15. invairiant-0.2.3/docs/demo.md +144 -0
  16. invairiant-0.2.3/docs/evidence-rules.md +167 -0
  17. invairiant-0.2.3/docs/github-action.md +70 -0
  18. invairiant-0.2.3/docs/lens-taxonomy.md +145 -0
  19. invairiant-0.2.3/docs/methodology.md +239 -0
  20. invairiant-0.2.3/docs/publishing.md +93 -0
  21. invairiant-0.2.3/docs/related-work.md +121 -0
  22. invairiant-0.2.3/docs/severity-model.md +155 -0
  23. invairiant-0.2.3/examples/README.md +21 -0
  24. invairiant-0.2.3/examples/ai-agent-system/invairiant.config.yml +70 -0
  25. invairiant-0.2.3/examples/infra-service/example-audit.md +216 -0
  26. invairiant-0.2.3/examples/infra-service/example-findings.json +71 -0
  27. invairiant-0.2.3/examples/infra-service/example-report.json +129 -0
  28. invairiant-0.2.3/examples/infra-service/invairiant.config.yml +59 -0
  29. invairiant-0.2.3/examples/minimal-webapp/invairiant.config.yml +50 -0
  30. invairiant-0.2.3/lenses/README.md +39 -0
  31. invairiant-0.2.3/lenses/ai-generated-code/generated-surface-area.md +189 -0
  32. invairiant-0.2.3/lenses/ai-generated-code/oracle-boundary.md +193 -0
  33. invairiant-0.2.3/lenses/ai-generated-code/prompt-code-drift.md +190 -0
  34. invairiant-0.2.3/lenses/ai-generated-code/review-bottleneck.md +188 -0
  35. invairiant-0.2.3/lenses/core/brooks.md +200 -0
  36. invairiant-0.2.3/lenses/core/cormen.md +200 -0
  37. invairiant-0.2.3/lenses/core/dijkstra.md +200 -0
  38. invairiant-0.2.3/lenses/core/mcconnell.md +200 -0
  39. invairiant-0.2.3/lenses/core/parnas.md +189 -0
  40. invairiant-0.2.3/lenses/core/turing.md +191 -0
  41. invairiant-0.2.3/lenses/correctness/cormen.md +17 -0
  42. invairiant-0.2.3/lenses/correctness/harel.md +17 -0
  43. invairiant-0.2.3/lenses/correctness/hoare.md +199 -0
  44. invairiant-0.2.3/lenses/correctness/turing.md +17 -0
  45. invairiant-0.2.3/lenses/domain/distributed-systems.md +196 -0
  46. invairiant-0.2.3/lenses/domain/network-persistence.md +198 -0
  47. invairiant-0.2.3/lenses/domain/product-operability.md +196 -0
  48. invairiant-0.2.3/lenses/implementation/kernighan.md +199 -0
  49. invairiant-0.2.3/lenses/implementation/liskov.md +199 -0
  50. invairiant-0.2.3/lenses/implementation/ousterhout.md +200 -0
  51. invairiant-0.2.3/lenses/implementation/ritchie.md +199 -0
  52. invairiant-0.2.3/lenses/security-safety/leveson.md +198 -0
  53. invairiant-0.2.3/lenses/security-safety/operational-resilience.md +214 -0
  54. invairiant-0.2.3/lenses/security-safety/privacy-knowledge-minimization.md +208 -0
  55. invairiant-0.2.3/lenses/security-safety/saltzer-schroeder.md +208 -0
  56. invairiant-0.2.3/lenses/security-safety/security-threat.md +218 -0
  57. invairiant-0.2.3/lenses/systems/harel.md +199 -0
  58. invairiant-0.2.3/lenses/systems/kleppmann.md +199 -0
  59. invairiant-0.2.3/lenses/systems/lamport.md +199 -0
  60. invairiant-0.2.3/lenses/systems/tanenbaum.md +199 -0
  61. invairiant-0.2.3/lenses/systems/von-neumann.md +199 -0
  62. invairiant-0.2.3/prompts/evidence-verifier.md +72 -0
  63. invairiant-0.2.3/prompts/lens-auditor.md +83 -0
  64. invairiant-0.2.3/prompts/report-synthesizer.md +61 -0
  65. invairiant-0.2.3/prompts/severity-classifier.md +67 -0
  66. invairiant-0.2.3/pyproject.toml +70 -0
  67. invairiant-0.2.3/schemas/audit-report.schema.json +118 -0
  68. invairiant-0.2.3/schemas/evidence-bundle.schema.json +92 -0
  69. invairiant-0.2.3/schemas/finding.schema.json +160 -0
  70. invairiant-0.2.3/schemas/invairiant.config.schema.json +127 -0
  71. invairiant-0.2.3/schemas/lens.schema.json +70 -0
  72. invairiant-0.2.3/templates/audit-report.md +112 -0
  73. invairiant-0.2.3/templates/event-triggered-audit.md +86 -0
  74. invairiant-0.2.3/templates/finding.md +57 -0
  75. invairiant-0.2.3/templates/phase-transition-audit.md +76 -0
  76. invairiant-0.2.3/templates/pr-comment.md +51 -0
@@ -0,0 +1,50 @@
1
+ # macOS
2
+ .DS_Store
3
+ .AppleDouble
4
+ .LSOverride
5
+ Icon?
6
+
7
+ # Editors / IDEs
8
+ .idea/
9
+ .vscode/
10
+ *.swp
11
+ *.swo
12
+ *~
13
+
14
+ # Local agent-harness state (machine-specific; install the skill per skill/README.md)
15
+ .claude/
16
+
17
+ # Python (validation tooling)
18
+ __pycache__/
19
+ *.py[cod]
20
+ .venv/
21
+ venv/
22
+ .mypy_cache/
23
+ .pytest_cache/
24
+
25
+ # Node (potential future product tooling)
26
+ node_modules/
27
+ npm-debug.log*
28
+ dist/
29
+ build/
30
+
31
+ # invAIriant local audit output (projects using the framework may commit
32
+ # their own audits; this repo does not carry generated reports)
33
+ /audits-local/
34
+ *.audit.local.md
35
+
36
+ # Scratch / temp
37
+ scratchpad/
38
+ tmp/
39
+ *.tmp
40
+
41
+ # Stray spreadsheets dropped into the working dir (not part of the framework)
42
+ *.xlsx
43
+
44
+ # Python build/install artifacts
45
+ *.egg-info/
46
+
47
+ # Audit memory: commit ONLY the sanitized history/. Raw evidence bundles
48
+ # (invairiant collect) and any local agent transcripts stay local.
49
+ .invairiant/*
50
+ !.invairiant/history/
@@ -0,0 +1,272 @@
1
+ # Changelog
2
+
3
+ All notable changes to invAIriant are documented here. The format loosely
4
+ follows Keep a Changelog; versions track the protocol.
5
+
6
+ ## [Unreleased]
7
+
8
+ _Nothing yet._
9
+
10
+ ## [0.2.3] — 2026-07-04
11
+
12
+ ### Changed
13
+
14
+ - **README quickstart split into two independent tracks** — *enable the skill*
15
+ (the product) and *install the CLI helper* (optional infrastructure) — leading
16
+ with the skill and framing `pip install` as the seatbelt the skill shells out
17
+ to, not "installing invAIriant". The two install independently.
18
+ - **`pip install` is now production-grade.** The wheel and sdist bundle the
19
+ framework data the CLI reads at runtime (schemas, examples, lens ids) under
20
+ `invairiant_framework/`, and `framework_root()` falls back to it — so a plain
21
+ `pip install invairiant` works **outside a checkout**, no `INVAIRIANT_HOME`
22
+ needed. Before, a non-editable install shipped only the module and any real
23
+ command died with `schema not found`. The build backend moved to hatchling
24
+ (`force-include` maps the repo-root dirs into the distribution without moving
25
+ or duplicating them — the checkout stays the single source of truth). A CI
26
+ **packaging smoke** installs the wheel in a clean venv and runs a command from
27
+ outside the checkout, so this can't silently regress.
28
+
29
+ ### Added
30
+
31
+ - **GitHub Action understands the bounded scopes.** The Action's optional
32
+ `collect` step gains `scope` / `pr` / `commit` / `path` / `narrow` inputs
33
+ (`range` kept), so CI can gather a bundle for a PR, module, ADR, or
34
+ refactoring proposal — not just a range. Inputs pass via env; the step builds
35
+ only the flags that are set, so it stays a bounded gather.
36
+
37
+ ### Fixed
38
+
39
+ - **PR scope warns when the head isn't checked out.** `collect --scope pr` now
40
+ records `head_checked_out` in `resolved_scope` and prints a NOTICE (pointing
41
+ at `gh pr checkout <N>`, or auditing in CI where the PR head is the checkout)
42
+ when the PR head is not the working tree — because content-level grep signals
43
+ are then sparse. The diff, file set, and mass stay correct from git regardless.
44
+
45
+ ## [0.2.2] — 2026-07-04
46
+
47
+ ### Added
48
+
49
+ - **`--scope pr` — first-class PR resolver (the main entrypoint, now backed).**
50
+ `invairiant collect --scope pr --pr <N>` pins a pull request **by number** and
51
+ resolves it to an ordinary bounded `base...head` range — so `audit-pr <N>` is
52
+ finally real, not just a promise in the command signature. It is an **optional
53
+ resolver adapter**: every other scope is pure-local git, and **only** `--scope
54
+ pr` may reach the remote — via `gh` if present, else the `pull/<n>/head` ref.
55
+ If the PR can't be reached (no remote, offline, non-GitHub remote) it **fails
56
+ closed and suggests `--range`**, never widening to the repo. `resolved_scope`
57
+ records `base`, `head`, and `resolver` (`gh`/`git`). Content-level signals read
58
+ the working tree, so check out the PR (or run in CI) for full fidelity; the
59
+ diff, file set, and mass are correct from git regardless. Documented across the
60
+ skill, `docs/methodology.md` §4.1, `docs/cli.md`, the schema, and the adapters;
61
+ 6 hermetic tests (fail-closed cases + pull-ref resolution against a bare remote
62
+ carrying `refs/pull/1/head`, no gh/network). 82 tests total.
63
+
64
+ ## [0.2.1] — 2026-07-04
65
+
66
+ ### Added
67
+
68
+ - **`audit-rp` — refactoring-proposal scope.** A sixth bounded scope kind
69
+ (`collect --scope rp --path <proposal.md>`) and skill command `audit-rp`. An
70
+ RP is the mirror image of an ADR: an ADR is a *made* decision (audit for
71
+ drift — does the code still match?), an RP is a *proposed* change (audit for
72
+ risk — would applying it break an invariant the code holds now?). It resolves
73
+ the proposal to the tracked code it references, snapshots that code, and
74
+ reuses the same fail-closed bounding as `adr` (no refs / too broad → exit 2,
75
+ `--narrow` to tighten). Documented across the skill, `docs/methodology.md`
76
+ §4.1 (seven scope kinds; adr = decision drift, rp = invariant risk),
77
+ `docs/cli.md`, the schema enum, and the cross-agent adapters. **No new
78
+ lenses**; the CLI still performs no judgment.
79
+
80
+ ### Changed
81
+
82
+ - **README positioning.** Lead with the one-line promise — *invAIriant keeps
83
+ architectural invariants from drifting under AI-assisted change* — with the
84
+ slogan **No evidence. No finding.** as the brand stamp; the
85
+ "mindicator & silicon bags quartet" credit moves off the very top (it still
86
+ stands in Contributing and the License). The product row lists the bounded
87
+ targets, and "What it is not" states the discipline outright: **invAIriant
88
+ audits bounded engineering scopes, not vibes** — a scope it cannot bound is
89
+ refused, not widened.
90
+
91
+ ## [0.2.0] — 2026-07-04
92
+
93
+ ### Added
94
+
95
+ - **Scope resolvers — the audit target beyond PRs.** `invairiant collect` now
96
+ takes `--scope {working,range,commit,module,adr,repo}` and resolves the pin to
97
+ a **bounded file set**; the entire evidence bundle (tree, language stats, grep
98
+ signals, generated mass) is computed over that set only — scoped gathering, not
99
+ a whole-repo scan. It **fails closed** (exit 2) when a scope can't be bounded —
100
+ a missing `--range`, an unknown `--path`/`--commit`, or an ADR whose references
101
+ don't resolve or resolve too broadly (unless `--narrow` tightens them) — and
102
+ never silently widens; `repo` is the one opt-in unbounded scope. Every bundle
103
+ now carries a **`resolved_scope`** block (documented in the evidence-bundle
104
+ schema) making the boundary explicit and auditable.
105
+ - **`adr` scope** — `collect --scope adr --path <ADR.md>` pins an
106
+ **ADR ↔ code** audit: the ADR text joins the canonical docs and its referenced
107
+ paths/symbols resolve to the tracked files in scope, so decision-vs-code drift
108
+ is first-class evidence.
109
+ - **Skill commands `audit-range`, `audit-commit`, `audit-module`, `audit-adr`**
110
+ ([`skill/SKILL.md`](skill/SKILL.md)) — thin scope-selectors over the **same**
111
+ four-stage pipeline, plus the unifying **audit target** concept
112
+ (`pinned scope + evidence bundle + selected lenses + report type`) in the skill
113
+ and [`docs/methodology.md`](docs/methodology.md) §4.1. **No new lenses** — a
114
+ wider set of things to point the audit at, not new judgment. Cross-agent
115
+ adapters (`AGENTS.md`, Cursor rule) updated to match.
116
+ - **14 scope tests** (`tests/test_scope.py`): per-kind resolution, fail-closed
117
+ exit-2 cases, the `resolved_scope` shape, ADR reference/identifier resolution
118
+ with `--narrow`, and an end-to-end proof that a module scan stays inside its
119
+ subtree. 69 tests total.
120
+
121
+ ### Non-goal reaffirmed
122
+
123
+ - invAIriant audits **bounded engineering scopes** — PRs, ranges, commits,
124
+ modules, ADR↔code drift, the repo by explicit choice. It does **not** perform
125
+ general repository search or brainstorming; an unbounded scope is refused, not
126
+ widened ([`docs/methodology.md`](docs/methodology.md) §7).
127
+
128
+ ## [0.1.2] — 2026-07-04
129
+
130
+ ### Added
131
+
132
+ - **Two real (redacted) case studies** (`case-studies/`): `low-latency-runtime`
133
+ — a **full-scale** audit scoring the whole core lens block + Lamport, where a
134
+ ~7 average and a *pass* verdict still surface a real correctness finding
135
+ (anti-averaging on real code); and `social-autopost` — a focused PR audit of
136
+ raw model output auto-published with no content gate. Both from private
137
+ codebases with names and specifics withheld. The case set now spans the
138
+ depth × source × status range (see `case-studies/README.md`).
139
+ - **GitHub Action** ([`action.yml`](action.yml)) — a composite action that
140
+ validates an audit report (schema + semantic), renders it into the job
141
+ summary, and **gates CI on open S0/S1** findings. Use it as
142
+ `uses: mindicator/invairiant@v0.1.2`. Docs:
143
+ [`docs/github-action.md`](docs/github-action.md).
144
+ - **Unit-test suite** (`tests/`, 55 tests) for the CLI — parser dispatch,
145
+ `validate-report` semantic-linter rules, secret redaction, `record`
146
+ idempotency + sanitization, claim-key matching, `history` trends, repo-root
147
+ memory resolution, and the bounded `collect` scan. CI runs `pytest`. (Closes
148
+ self-audit finding CLOSE-003.)
149
+ - **Roadmap for v0.2** ([`ROADMAP.md`](ROADMAP.md)) — hardening and reach, **no
150
+ new lenses**.
151
+ - A **60-second Quickstart** at the top of the README and a demo PR-comment
152
+ visual ([`assets/pr-comment.svg`](assets/pr-comment.svg)).
153
+
154
+ ### Changed
155
+
156
+ - **Origin narrative** reframed (README / NOTICE): invAIriant was forged in
157
+ AI-assisted development of complex, high-load systems — that is its story.
158
+ - **`pyproject.toml` version bumped to 0.1.2** for this release.
159
+
160
+ ### Fixed
161
+
162
+ - **Memory & `collect` hardening on large repos** (from self-audit #2):
163
+ - `record` / `history` / the memory-aware linter now resolve
164
+ `.invairiant/history/` from the **repo root**, not the current directory,
165
+ so running the CLI from a subdirectory no longer silently misses committed
166
+ audit memory (**CLOSE-001**).
167
+ - `collect` bounds its scan — skips large (>512 KB) and binary files, caps the
168
+ file count, does a single O(files) pass, and reports `limits` in the bundle
169
+ (no silent truncation) (**CLOSE-002**).
170
+ - `record` secret redaction hardened: full PEM blocks (not just the header),
171
+ AWS/GitHub/Slack tokens, and `Authorization` / `Bearer` values.
172
+
173
+ ## [0.1.1] — 2026-07-03
174
+
175
+ ### Added
176
+
177
+ - **Cross-agent adapters** — the skill now runs beyond Claude Code. A portable
178
+ root [`AGENTS.md`](AGENTS.md) (Codex and any AGENTS.md-aware agent) and
179
+ [`.cursor/rules/invairiant.mdc`](.cursor/rules/invairiant.mdc) (Cursor) reach
180
+ the same protocol, both pointing to the canonical `skill/SKILL.md` instead of
181
+ duplicating it. Per-agent install in `skill/README.md`; README badges link
182
+ each.
183
+
184
+ ## [0.1.0] — 2026-07-03
185
+
186
+ First public release. A reusable, evidence-first, multi-lens architecture-audit
187
+ protocol for AI-era codebases, distilled from real-world auditing of AI-assisted
188
+ development on complex, high-load systems. One rule underneath all of it: **no
189
+ evidence, no finding.**
190
+
191
+ ### Protocol & lenses
192
+
193
+ - **Docs** (`docs/`): methodology, evidence rules, severity model, audit
194
+ workflow, lens taxonomy, related work, CLI spec.
195
+ - **Lens library** (`lenses/`): 28 lenses across 7 packs — core, systems,
196
+ implementation, correctness, security-safety, ai-generated-code, domain —
197
+ each with purpose, scope, core questions, good-state examples, red flags,
198
+ required evidence, a 0–10 rubric, finding examples, and an AI prompt block.
199
+ New lenses include Turing, von Neumann, Ritchie, Kernighan, Hoare, Lamport,
200
+ Liskov, Saltzer–Schroeder, and Leveson.
201
+ - **Schemas** (`schemas/`): finding, audit-report, lens, config, and
202
+ evidence-bundle (JSON Schema draft 2020-12) — the stable contract for tooling.
203
+ - **Templates** (`templates/`): audit-report, finding, pr-comment,
204
+ phase-transition-audit, event-triggered-audit.
205
+ - **Prompt pack** (`prompts/`): lens-auditor, evidence-verifier,
206
+ severity-classifier, report-synthesizer — the four pipeline stages.
207
+
208
+ ### Skill — the primary product
209
+
210
+ - **`/invairiant`** (`skill/`): an LLM coding agent runs the audit. Commands:
211
+ `audit-pr`, `full-audit`, `verify-findings`, `classify-severity`,
212
+ `synthesize-report`, `closure-verification`; a `--lenses a,b` override; and a
213
+ concrete `audit-pr` runbook (collect → lens passes → verify → classify → PR
214
+ comment). Other skills and tools attach as **evidence adapters**.
215
+
216
+ ### CLI — the narrow helper (serves the audit, never performs one)
217
+
218
+ - **`invairiant`** (`cli/invairiant.py`, `pyproject.toml`, spec in
219
+ `docs/cli.md`): `init`, `collect`, `validate-config`, `validate-report`,
220
+ `render-report`, `render-comment`, `ci-gate`, `record`, `history`
221
+ (+ `collect-evidence` alias). Installs as the `invairiant` command; no
222
+ lenses, findings, or scores.
223
+ - **`collect`** builds a deterministic evidence bundle (diff scope, tree,
224
+ language stats, grep signals, import hints, generated mass, known-rejected) —
225
+ candidate pointers only.
226
+ - **`validate-report`** runs schema validation **plus a semantic pass**:
227
+ verdict↔severity consistency (open S0 → fail; open S1 → not pass), S0/S1
228
+ confidence, referential integrity, and a kept-`hypotheses` check.
229
+ `--schema-only` / `--md`.
230
+ - **`render-comment`** turns a report into a paste-ready PR comment;
231
+ **`ci-gate`** exits non-zero on open S0/S1.
232
+ - **Audit memory** (`record` / `history`): committed, **sanitized**
233
+ `.invairiant/history/` (rejected hypotheses, finding registry, lens-score
234
+ trends) — never raw evidence; secrets redacted; idempotent by audit label.
235
+ Raw bundles and transcripts stay gitignored under `.invairiant/cache/`.
236
+
237
+ ### Examples, case studies & dogfood
238
+
239
+ - **Examples** (`examples/`): minimal-webapp, infra-service, ai-agent-system
240
+ configs + a worked infra-service report.
241
+ - **Case studies** (`case-studies/`): four illustrative worked audits
242
+ (`persistent-mesh-transport`, `ai-agent-refund-bot`,
243
+ `generated-typescript-api`, `p2p-network-transport-change`) — each with the
244
+ diff, selected lenses, candidate/rejected/verified findings, a schema-valid
245
+ report, and a
246
+ side-by-side of **what a normal AI reviewer missed**.
247
+ - **Two self-audits** of the framework recorded to audit memory, so
248
+ `invairiant history` shows a real per-lens trend.
249
+
250
+ ### Quality gates
251
+
252
+ - **CI** (`.github/workflows/validate.yml`): validates schemas, examples, and
253
+ lens structure, and smoke-tests every CLI command (including a negative test
254
+ that the semantic linter fails an inconsistent report).
255
+ - **Local authorship gate** (`commit-msg` hook): rejects AI co-author trailers
256
+ — commits are authored by the maintainer alone.
257
+
258
+ ### Principles enforced
259
+
260
+ - No evidence, no finding.
261
+ - A high average score never cancels an S0/S1 finding.
262
+ - Observations and hypotheses stay separate from verified findings.
263
+ - Default audits use 4–6 lenses, not 20.
264
+
265
+ [Unreleased]: https://github.com/mindicator/invairiant/compare/v0.2.3...HEAD
266
+ [0.2.3]: https://github.com/mindicator/invairiant/releases/tag/v0.2.3
267
+ [0.2.2]: https://github.com/mindicator/invairiant/releases/tag/v0.2.2
268
+ [0.2.1]: https://github.com/mindicator/invairiant/releases/tag/v0.2.1
269
+ [0.2.0]: https://github.com/mindicator/invairiant/releases/tag/v0.2.0
270
+ [0.1.2]: https://github.com/mindicator/invairiant/releases/tag/v0.1.2
271
+ [0.1.1]: https://github.com/mindicator/invairiant/releases/tag/v0.1.1
272
+ [0.1.0]: https://github.com/mindicator/invairiant/releases/tag/v0.1.0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work (an
38
+ example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other
43
+ modifications represent, as a whole, an original work of authorship.
44
+ For the purposes of this License, Derivative Works shall not include
45
+ works that remain separable from, or merely link (or bind by name)
46
+ to the interfaces of, the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including the
49
+ original version of the Work and any modifications or additions to
50
+ that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright
52
+ owner or by an individual or Legal Entity authorized to submit on
53
+ behalf of the copyright owner. For the purposes of this definition,
54
+ "submitted" means any form of electronic, verbal, or written
55
+ communication sent to the Licensor or its representatives, including
56
+ but not limited to communication on electronic mailing lists, source
57
+ code control systems, and issue tracking systems that are managed by,
58
+ or on behalf of, the Licensor for the purpose of discussing and
59
+ improving the Work, but excluding communication that is conspicuously
60
+ marked or otherwise designated in writing by the copyright owner as
61
+ "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have
78
+ made, use, offer to sell, sell, import, and otherwise transfer the
79
+ Work, where such license applies only to those patent claims
80
+ licensable by such Contributor that are necessarily infringed by
81
+ their Contribution(s) alone or by combination of their
82
+ Contribution(s) with the Work to which such Contribution(s) was
83
+ submitted. If You institute patent litigation against any entity
84
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
85
+ the Work or a Contribution incorporated within the Work constitutes
86
+ direct or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate as of
88
+ the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the Work
91
+ or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You meet
93
+ the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or Derivative
96
+ Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works that
102
+ You distribute, all copyright, patent, trademark, and attribution
103
+ notices from the Source form of the Work, excluding those notices
104
+ that do not pertain to any part of the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one of
111
+ the following places: within a NOTICE text file distributed as
112
+ part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and do not
117
+ modify the License. You may add Your own attribution notices
118
+ within Derivative Works that You distribute, alongside or as an
119
+ addendum to the NOTICE text from the Work, provided that such
120
+ additional attribution notices cannot be construed as modifying
121
+ the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions for
125
+ use, reproduction, or distribution of Your modifications, or for any
126
+ such Derivative Works as a whole, provided Your use, reproduction,
127
+ and distribution of the Work otherwise complies with the conditions
128
+ stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed
144
+ to in writing, Licensor provides the Work (and each Contributor
145
+ provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
146
+ OR CONDITIONS OF ANY KIND, either express or implied, including,
147
+ without limitation, any warranties or conditions of TITLE,
148
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
149
+ PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all other
162
+ commercial damages or losses), even if such Contributor has been
163
+ advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing the
166
+ Work or Derivative Works thereof, You may choose to offer, and charge
167
+ a fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your own
170
+ behalf and on Your sole responsibility, not on behalf of any other
171
+ Contributor, and only if You agree to indemnify, defend, and hold
172
+ each Contributor harmless for any liability incurred by, or claims
173
+ asserted against, such Contributor by reason of your accepting any
174
+ such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 mindicator & silicon bags quartet
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,12 @@
1
+ invAIriant — evidence-based multi-lens architecture audits for AI-era codebases
2
+ Copyright 2026 mindicator & silicon bags quartet
3
+
4
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ This work distills a body of architecture-audit practice (the audit types, the
7
+ 0–10 lens scale, the score-to-severity mapping, the anti-averaging rules, and
8
+ the network-persistence domain lens) developed while auditing AI-assisted
9
+ development of complex, high-load systems.
10
+ Lens names (Cormen, Parnas, Turing, Lamport, Leveson, and others) are used as
11
+ mnemonic devices for schools of engineering questioning and imply no
12
+ endorsement by the individuals named.
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: invairiant
3
+ Version: 0.2.3
4
+ Summary: Helper CLI for the invAIriant agentic audit protocol — it serves the audit, it does not audit.
5
+ Project-URL: Homepage, https://github.com/mindicator/invairiant
6
+ Project-URL: Documentation, https://github.com/mindicator/invairiant/blob/main/docs/cli.md
7
+ Author: mindicator & silicon bags quartet
8
+ License: Apache-2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Keywords: architecture,audit,code-review,evidence,llm
12
+ Requires-Python: >=3.9
13
+ Requires-Dist: jsonschema>=4.18
14
+ Requires-Dist: pyyaml>=6
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest>=7; extra == 'dev'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # `invairiant` CLI
20
+
21
+ Infrastructure around the agentic audit — **not an architecture auditor.** No
22
+ lenses, no findings, no scores. All judgment lives in the
23
+ [`/invairiant` skill](../skill/SKILL.md); this CLI scaffolds, validates,
24
+ collects evidence, renders, and gates.
25
+
26
+ Full spec and rationale: [`docs/cli.md`](../docs/cli.md).
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install -e . # or: pipx install -e . → gives the `invairiant` command
32
+ ```
33
+
34
+ (No install? Run `python3 cli/invairiant.py <command>` directly.) Python 3.9+;
35
+ `jsonschema` + `pyyaml` are pulled in as dependencies.
36
+
37
+ ## Commands
38
+
39
+ | Command | Purpose |
40
+ |---|---|
41
+ | `init [--type T]` | scaffold `invairiant.config.yml` |
42
+ | `collect [--range A..B] [--out F]` | build a deterministic evidence bundle (candidate pointers only) |
43
+ | `validate-config [paths…]` | schema-check configs + cross-check lens ids |
44
+ | `validate-report <paths…> [--schema-only] [--md]` | schema **+ semantic** checks on a report |
45
+ | `render-report <report.json> [--out F]` | report JSON → Markdown |
46
+ | `render-comment <report.json> [--out F]` | report JSON → paste-ready PR comment |
47
+ | `ci-gate <report.json> [--max-severity S0\|S1]` | exit non-zero on open S0/S1 |
48
+ | `record <report.json> [--force]` | append distilled, **sanitized** memory to `.invairiant/history/` |
49
+ | `history [--lens L]` | lens-score trends + recurring findings |
50
+
51
+ `collect-evidence` is a thin alias for the adapter-only subset of `collect`.
52
+
53
+ Full spec: [`docs/cli.md`](../docs/cli.md). Worked flow:
54
+ [`docs/demo.md`](../docs/demo.md). Resolves the framework via
55
+ `$INVAIRIANT_HOME`, the repo layout, or by searching upward from the current
56
+ directory.