invar-tools 1.0.0__py3-none-any.whl → 1.3.0__py3-none-any.whl

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 (98) hide show
  1. invar/__init__.py +1 -0
  2. invar/core/contracts.py +80 -10
  3. invar/core/entry_points.py +367 -0
  4. invar/core/extraction.py +5 -6
  5. invar/core/format_specs.py +195 -0
  6. invar/core/format_strategies.py +197 -0
  7. invar/core/formatter.py +32 -10
  8. invar/core/hypothesis_strategies.py +50 -10
  9. invar/core/inspect.py +1 -1
  10. invar/core/lambda_helpers.py +3 -2
  11. invar/core/models.py +30 -18
  12. invar/core/must_use.py +2 -1
  13. invar/core/parser.py +13 -6
  14. invar/core/postcondition_scope.py +128 -0
  15. invar/core/property_gen.py +86 -42
  16. invar/core/purity.py +13 -7
  17. invar/core/purity_heuristics.py +5 -9
  18. invar/core/references.py +8 -6
  19. invar/core/review_trigger.py +370 -0
  20. invar/core/rule_meta.py +69 -2
  21. invar/core/rules.py +91 -28
  22. invar/core/shell_analysis.py +247 -0
  23. invar/core/shell_architecture.py +171 -0
  24. invar/core/strategies.py +7 -14
  25. invar/core/suggestions.py +92 -0
  26. invar/core/sync_helpers.py +238 -0
  27. invar/core/tautology.py +103 -37
  28. invar/core/template_parser.py +467 -0
  29. invar/core/timeout_inference.py +4 -7
  30. invar/core/utils.py +63 -18
  31. invar/core/verification_routing.py +155 -0
  32. invar/mcp/server.py +113 -13
  33. invar/shell/commands/__init__.py +11 -0
  34. invar/shell/{cli.py → commands/guard.py} +152 -44
  35. invar/shell/{init_cmd.py → commands/init.py} +200 -28
  36. invar/shell/commands/merge.py +256 -0
  37. invar/shell/commands/mutate.py +184 -0
  38. invar/shell/{perception.py → commands/perception.py} +2 -0
  39. invar/shell/commands/sync_self.py +113 -0
  40. invar/shell/commands/template_sync.py +366 -0
  41. invar/shell/{test_cmd.py → commands/test.py} +3 -1
  42. invar/shell/commands/update.py +48 -0
  43. invar/shell/config.py +247 -10
  44. invar/shell/coverage.py +351 -0
  45. invar/shell/fs.py +5 -2
  46. invar/shell/git.py +2 -0
  47. invar/shell/guard_helpers.py +116 -20
  48. invar/shell/guard_output.py +106 -24
  49. invar/shell/mcp_config.py +3 -0
  50. invar/shell/mutation.py +314 -0
  51. invar/shell/property_tests.py +75 -24
  52. invar/shell/prove/__init__.py +9 -0
  53. invar/shell/prove/accept.py +113 -0
  54. invar/shell/{prove.py → prove/crosshair.py} +69 -30
  55. invar/shell/prove/hypothesis.py +293 -0
  56. invar/shell/subprocess_env.py +393 -0
  57. invar/shell/template_engine.py +345 -0
  58. invar/shell/templates.py +53 -0
  59. invar/shell/testing.py +77 -37
  60. invar/templates/CLAUDE.md.template +86 -9
  61. invar/templates/aider.conf.yml.template +16 -14
  62. invar/templates/commands/audit.md +138 -0
  63. invar/templates/commands/guard.md +77 -0
  64. invar/templates/config/CLAUDE.md.jinja +206 -0
  65. invar/templates/config/context.md.jinja +92 -0
  66. invar/templates/config/pre-commit.yaml.jinja +44 -0
  67. invar/templates/context.md.template +33 -0
  68. invar/templates/cursorrules.template +25 -13
  69. invar/templates/examples/README.md +2 -0
  70. invar/templates/examples/conftest.py +3 -0
  71. invar/templates/examples/contracts.py +4 -2
  72. invar/templates/examples/core_shell.py +10 -4
  73. invar/templates/examples/workflow.md +81 -0
  74. invar/templates/manifest.toml +137 -0
  75. invar/templates/protocol/INVAR.md +210 -0
  76. invar/templates/skills/develop/SKILL.md.jinja +318 -0
  77. invar/templates/skills/investigate/SKILL.md.jinja +106 -0
  78. invar/templates/skills/propose/SKILL.md.jinja +104 -0
  79. invar/templates/skills/review/SKILL.md.jinja +125 -0
  80. invar_tools-1.3.0.dist-info/METADATA +377 -0
  81. invar_tools-1.3.0.dist-info/RECORD +95 -0
  82. invar_tools-1.3.0.dist-info/entry_points.txt +2 -0
  83. invar_tools-1.3.0.dist-info/licenses/LICENSE +190 -0
  84. invar_tools-1.3.0.dist-info/licenses/LICENSE-GPL +674 -0
  85. invar_tools-1.3.0.dist-info/licenses/NOTICE +63 -0
  86. invar/contracts.py +0 -152
  87. invar/decorators.py +0 -94
  88. invar/invariant.py +0 -57
  89. invar/resource.py +0 -99
  90. invar/shell/prove_fallback.py +0 -183
  91. invar/shell/update_cmd.py +0 -191
  92. invar/templates/INVAR.md +0 -134
  93. invar_tools-1.0.0.dist-info/METADATA +0 -321
  94. invar_tools-1.0.0.dist-info/RECORD +0 -64
  95. invar_tools-1.0.0.dist-info/entry_points.txt +0 -2
  96. invar_tools-1.0.0.dist-info/licenses/LICENSE +0 -21
  97. /invar/shell/{prove_cache.py → prove/cache.py} +0 -0
  98. {invar_tools-1.0.0.dist-info → invar_tools-1.3.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,377 @@
1
+ Metadata-Version: 2.4
2
+ Name: invar-tools
3
+ Version: 1.3.0
4
+ Summary: AI-native software engineering tools with design-by-contract verification
5
+ Project-URL: Homepage, https://github.com/tefx/invar
6
+ Project-URL: Documentation, https://github.com/tefx/invar#readme
7
+ Project-URL: Repository, https://github.com/tefx/invar
8
+ Project-URL: Issues, https://github.com/tefx/invar/issues
9
+ Author: Invar Team
10
+ License-Expression: GPL-3.0-or-later
11
+ License-File: LICENSE
12
+ License-File: LICENSE-GPL
13
+ License-File: NOTICE
14
+ Keywords: ai,code-quality,contracts,design-by-contract,static-analysis
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: crosshair-tool>=0.0.60
25
+ Requires-Dist: hypothesis>=6.0
26
+ Requires-Dist: invar-runtime>=1.0
27
+ Requires-Dist: jinja2>=3.0
28
+ Requires-Dist: mcp>=1.0
29
+ Requires-Dist: pre-commit>=3.0
30
+ Requires-Dist: pydantic>=2.0
31
+ Requires-Dist: returns>=0.20
32
+ Requires-Dist: rich>=13.0
33
+ Requires-Dist: typer>=0.9
34
+ Provides-Extra: dev
35
+ Requires-Dist: coverage[toml]>=7.0; extra == 'dev'
36
+ Requires-Dist: mypy>=1.0; extra == 'dev'
37
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
38
+ Requires-Dist: pytest>=7.0; extra == 'dev'
39
+ Requires-Dist: ruff>=0.1; extra == 'dev'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # Invar
43
+
44
+ [![PyPI version](https://badge.fury.io/py/invar-tools.svg)](https://badge.fury.io/py/invar-tools)
45
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
46
+ [![License](https://img.shields.io/badge/License-Apache%202.0%20%2B%20GPL--3.0-blue.svg)](#license)
47
+
48
+ > **Don't hope AI code is correct. Know it.**
49
+
50
+ Invar is a verification framework for AI-assisted development. It provides contracts, verification, and a structured workflow methodology.
51
+
52
+ ```python
53
+ from invar_runtime import pre, post
54
+
55
+ @pre(lambda items: len(items) > 0)
56
+ @post(lambda result: result >= 0)
57
+ def average(items: list[float]) -> float:
58
+ """
59
+ >>> average([1, 2, 3])
60
+ 2.0
61
+ """
62
+ return sum(items) / len(items)
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Experience Tiers
68
+
69
+ | Platform | Experience | Features |
70
+ |----------|------------|----------|
71
+ | **Claude Code** | Full | USBV workflow + skill automation + MCP integration |
72
+ | **Cursor/Windsurf** | Basic | INVAR.md protocol + CLI verification |
73
+ | **Other editors** | Minimal | CLI verification tools only |
74
+
75
+ **Why tiers?** The skill system (`/develop`, `/review`, etc.) requires Claude Code's sub-agent capabilities. Other editors receive the protocol document and CLI tools.
76
+
77
+ ---
78
+
79
+ ## Installation
80
+
81
+ ### Two Packages, Different Purposes
82
+
83
+ ```
84
+ ┌─────────────────────────────────────────────────────────────────┐
85
+ │ Your Project │
86
+ │ ├── src/ │
87
+ │ │ └── from invar_runtime import pre, post ← Runtime │
88
+ │ │ │
89
+ │ └── Development (not shipped with your code) │
90
+ │ └── uvx invar-tools guard ← Tools │
91
+ └─────────────────────────────────────────────────────────────────┘
92
+ ```
93
+
94
+ | Package | Install | Purpose |
95
+ |---------|---------|---------|
96
+ | **invar-tools** | `uvx invar-tools <cmd>` | Development: verification, init, MCP server |
97
+ | **invar-runtime** | `pip install invar-runtime` | Production: add to your project's dependencies |
98
+
99
+ ### Quick Install
100
+
101
+ ```bash
102
+ # Development tools (recommended: use without installing)
103
+ uvx invar-tools guard
104
+ uvx invar-tools init --claude
105
+
106
+ # Runtime contracts (add to your project)
107
+ pip install invar-runtime
108
+ ```
109
+
110
+ **Why uvx is recommended:**
111
+ - Always uses latest version
112
+ - Doesn't pollute project dependencies
113
+ - Automatically accesses your project's venv dependencies (numpy, pandas, etc.)
114
+ - If your project has `invar-tools` installed, uvx will detect and use it
115
+
116
+ **When to use pip install instead:**
117
+ - CI/CD environments where uvx isn't available
118
+ - Projects with C extensions AND Python version mismatch between uvx and project
119
+
120
+ ---
121
+
122
+ ## Quick Start
123
+
124
+ ```bash
125
+ # 1. Initialize your project
126
+ cd your-project
127
+ uvx invar-tools init --claude # Full experience (Claude Code)
128
+ uvx invar-tools init # Basic experience (other editors)
129
+
130
+ # 2. Write code with AI (AI follows INVAR.md protocol)
131
+
132
+ # 3. Verify code quality
133
+ uvx invar-tools guard # Runs static analysis + doctests + property tests
134
+ ```
135
+
136
+ ---
137
+
138
+ ## The USBV Workflow
139
+
140
+ AI agents follow a four-phase development cycle:
141
+
142
+ ```
143
+ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐
144
+ │ Understand│ → │ Specify │ → │ Build │ → │ Validate │
145
+ │ │ │ │ │ │ │ │
146
+ │ Intent │ │ @pre/@post│ │ Implement │ │ invar │
147
+ │ Inspect │ │ Doctests │ │ leaves │ │ guard │
148
+ │ Constraints │ Design │ │ first │ │ │
149
+ └───────────┘ └───────────┘ └───────────┘ └───────────┘
150
+ ```
151
+
152
+ **Key insight:** Specify contracts BEFORE implementation. The contract becomes the specification.
153
+
154
+ See [INVAR.md](./INVAR.md) for complete protocol.
155
+
156
+ ---
157
+
158
+ ## Session Protocol
159
+
160
+ Every AI session follows this format:
161
+
162
+ **First message (Check-In):**
163
+ ```
164
+ ✓ Check-In: [project] | [branch] | [clean/dirty]
165
+ ```
166
+
167
+ **Last message (Final):**
168
+ ```
169
+ ✓ Final: guard PASS | 0 errors, 2 warnings
170
+ ```
171
+
172
+ Check-In shows project context. Guard verification runs during VALIDATE phase and Final, not at Check-In.
173
+
174
+ ---
175
+
176
+ ## Core/Shell Architecture
177
+
178
+ Invar enforces separation between pure logic and I/O:
179
+
180
+ | Zone | Requirements | Forbidden |
181
+ |------|--------------|-----------|
182
+ | **Core** (`**/core/**`) | `@pre`/`@post` contracts, doctests | I/O imports (os, pathlib, requests...) |
183
+ | **Shell** (`**/shell/**`) | `Result[T, E]` returns | - |
184
+
185
+ ```python
186
+ # Core: Pure logic, receives data
187
+ def parse_config(content: str) -> Config:
188
+ return Config.parse(content)
189
+
190
+ # Shell: Handles I/O, returns Result
191
+ def load_config(path: Path) -> Result[Config, str]:
192
+ content = path.read_text()
193
+ return Success(parse_config(content))
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Commands
199
+
200
+ ### Guard (Primary)
201
+
202
+ ```bash
203
+ invar guard # Full verification (static + doctests + property tests)
204
+ invar guard --changed # Only git-modified files
205
+ invar guard --static # Static analysis only (~0.5s)
206
+ invar guard --coverage # Collect branch coverage (doctest + hypothesis)
207
+ ```
208
+
209
+ **Flags:**
210
+
211
+ | Flag | Purpose |
212
+ |------|---------|
213
+ | `--strict` | Treat warnings as errors |
214
+ | `--explain` | Show rule explanations |
215
+ | `--agent` | JSON output for AI tools |
216
+ | `--coverage` | Branch coverage from doctest + hypothesis phases |
217
+
218
+ ### Other Commands
219
+
220
+ ```bash
221
+ invar sig <file> # Show signatures + contracts
222
+ invar map --top 10 # Most-referenced symbols
223
+ invar rules # List all rules
224
+ invar update # Update managed files
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Workflow Skills (Claude Code)
230
+
231
+ `invar init --claude` creates workflow skills in `.claude/skills/`:
232
+
233
+ | Skill | Trigger | Purpose |
234
+ |-------|---------|---------|
235
+ | `/investigate` | "why", "explain", vague tasks | Exploration, no code changes |
236
+ | `/propose` | "should we", "compare" | Decision facilitation with options |
237
+ | `/develop` | "add", "fix", "implement" | USBV implementation workflow |
238
+ | `/review` | After develop, `review_suggested` | Adversarial review with fix loop |
239
+
240
+ **Note:** Skills are Claude Code exclusive. Other editors use INVAR.md protocol directly.
241
+
242
+ ---
243
+
244
+ ## Configuration
245
+
246
+ ### pyproject.toml
247
+
248
+ ```toml
249
+ [tool.invar.guard]
250
+ # Directory classification
251
+ core_paths = ["src/myapp/core"]
252
+ shell_paths = ["src/myapp/shell"]
253
+
254
+ # Or use patterns for existing projects
255
+ core_patterns = ["**/domain/**", "**/models/**"]
256
+ shell_patterns = ["**/api/**", "**/cli/**"]
257
+
258
+ # Size limits
259
+ max_file_lines = 500
260
+ max_function_lines = 50
261
+
262
+ # Contract requirements
263
+ require_contracts = true
264
+ require_doctests = true
265
+
266
+ # Doctest-heavy code
267
+ exclude_doctest_lines = true
268
+
269
+ # Rule exclusions
270
+ [[tool.invar.guard.rule_exclusions]]
271
+ pattern = "**/generated/**"
272
+ rules = ["*"]
273
+ ```
274
+
275
+ ---
276
+
277
+ ## Rules Reference
278
+
279
+ | Rule | Severity | What It Checks |
280
+ |------|----------|----------------|
281
+ | `file_size` | ERROR | File > max lines |
282
+ | `function_size` | WARN | Function > max lines |
283
+ | `missing_contract` | ERROR | Core function lacks @pre/@post |
284
+ | `missing_doctest` | WARN | Contracted function lacks doctest |
285
+ | `forbidden_import` | ERROR | I/O import in Core |
286
+ | `shell_result` | WARN | Shell function not returning Result |
287
+ | `empty_contract` | ERROR | Contract is `lambda: True` |
288
+
289
+ Full list: `invar rules --explain`
290
+
291
+ ---
292
+
293
+ ## MCP Integration (Claude Code)
294
+
295
+ `invar init --claude` automatically configures MCP:
296
+
297
+ ```json
298
+ {
299
+ "mcpServers": {
300
+ "invar": {
301
+ "command": "uvx",
302
+ "args": ["invar-tools", "mcp"]
303
+ }
304
+ }
305
+ }
306
+ ```
307
+
308
+ **MCP Tools:**
309
+
310
+ | Tool | Replaces | Purpose |
311
+ |------|----------|---------|
312
+ | `invar_guard` | `pytest`, `crosshair` | Smart verification |
313
+ | `invar_sig` | Reading entire files | Show contracts and signatures |
314
+ | `invar_map` | `grep` for functions | Symbol map with reference counts |
315
+
316
+ ---
317
+
318
+ ## Platform Support
319
+
320
+ | Feature | Claude Code | Cursor/Windsurf | Others |
321
+ |---------|-------------|-----------------|--------|
322
+ | Smart Guard CLI | ✅ | ✅ | ✅ |
323
+ | INVAR.md protocol | ✅ | ✅ | ✅ |
324
+ | MCP integration | ✅ | ❌ | ❌ |
325
+ | Workflow skills | ✅ | ❌ | ❌ |
326
+ | Sub-agent review | ✅ | ❌ | ❌ |
327
+
328
+ **Claude Code** provides the full experience with automated workflow and independent review.
329
+
330
+ **Other editors** receive the protocol and CLI tools. Workflow adherence is manual.
331
+
332
+ ---
333
+
334
+ ## File Ownership
335
+
336
+ | File | Owner | Edit? |
337
+ |------|-------|-------|
338
+ | `INVAR.md` | Invar | No (`invar update` manages) |
339
+ | `CLAUDE.md` | You | Yes (project config) |
340
+ | `.claude/skills/` | You | Yes (customize workflows) |
341
+
342
+ ---
343
+
344
+ ## Runtime Behavior
345
+
346
+ Contracts are checked at runtime via [deal](https://github.com/life4/deal).
347
+
348
+ ```bash
349
+ # Disable in production for performance
350
+ DEAL_DISABLE=1 python app.py
351
+ ```
352
+
353
+ ---
354
+
355
+ ## Learn More
356
+
357
+ **In your project** (created by `invar init`):
358
+ - `INVAR.md` — Protocol v5.0 for AI agents
359
+ - `CLAUDE.md` — Project configuration
360
+ - `.invar/examples/` — Reference patterns
361
+
362
+ **Documentation:**
363
+ - [docs/vision.md](./docs/vision.md) — Design philosophy
364
+ - [docs/design.md](./docs/design.md) — Technical architecture
365
+ - [GitHub Pages](https://tefx.github.io/Invar/) — Visual overview
366
+
367
+ ---
368
+
369
+ ## License
370
+
371
+ | Component | License | Purpose |
372
+ |-----------|---------|---------|
373
+ | **invar-runtime** | [Apache-2.0](LICENSE) | Runtime contracts - use freely |
374
+ | **invar-tools** | [GPL-3.0](LICENSE-GPL) | CLI tools - improvements shared |
375
+ | **Documentation** | [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) | Share with attribution |
376
+
377
+ See [NOTICE](NOTICE) for third-party licenses.
@@ -0,0 +1,95 @@
1
+ invar/__init__.py,sha256=Bzp8MpdH-uUNe6qY9ITv6LLOn0HUomtIToQ0zUS1mkg,1342
2
+ invar/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ invar/core/__init__.py,sha256=01TgQ2bqTFV4VFdksfqXYPa2WUqo-DpUWUkEcIUXFb4,218
4
+ invar/core/contracts.py,sha256=SOyF1KeJ6hrEwfQ09UzMt881OJKDXRbPTslKA6HzdKg,19085
5
+ invar/core/entry_points.py,sha256=gB6h2O9gp9larxDWVA2IUclLadMF_H8eJErnscYm0GU,12012
6
+ invar/core/extraction.py,sha256=mScqEMEEQdsd-Z0jx9g3scK6Z1vI9l-ESjggXPIWHZ4,6112
7
+ invar/core/format_specs.py,sha256=P299aRHFMXyow8STwsvaT6Bg2ALPs2wSy7SByiRZZ-A,5610
8
+ invar/core/format_strategies.py,sha256=LifL97JbsF8WEkVNmQpq2htyFUC3pW21myAjtRGpSxU,5774
9
+ invar/core/formatter.py,sha256=Ct-8x4wYoMNfi6-ub5IjoQJ80mMAXlAhsXweRrxKkGw,10548
10
+ invar/core/hypothesis_strategies.py,sha256=_MfjG7KxkmJvuPsczr_1JayR_YmiDzU2jJ8fQPoKGgs,16517
11
+ invar/core/inspect.py,sha256=l1knohwpLRHSNySPUjyeBHJusnU0vYiQGj4dMVgQZIo,4381
12
+ invar/core/lambda_helpers.py,sha256=Ap1y7N0wpgCgPHwrs2pd7zD9Qq4Ptfd2iTliprXIkME,6457
13
+ invar/core/models.py,sha256=BbGiUQh6QdhHaw1fUQjFT6fm9bOUiHRam3d95rKOKYE,10089
14
+ invar/core/must_use.py,sha256=7HnnbT53lb4dOT-1mL64pz0JbQYytuw4eejNVe7iWKY,5496
15
+ invar/core/parser.py,sha256=ucVpGziVzUvbkXT1n_SgOrYdStDEcNBqLuRGqK3_M5g,9205
16
+ invar/core/postcondition_scope.py,sha256=ykjVNqZZ1zItBmI7ebgmLW5vFGE-vpaLRTvSgWaJMgM,5245
17
+ invar/core/property_gen.py,sha256=_IvBJNUqd8pwu7wXuIProZn5RZksqFdmtXt3GnLU6Vo,14033
18
+ invar/core/purity.py,sha256=dt5dFy5V8Ch93iBJF5OuKUr1jjfimfY3oHLQD8KmLHw,12036
19
+ invar/core/purity_heuristics.py,sha256=vsgphC1XPIFtsoLB0xvp--AyaJHqlh83LyKXYda4pWc,4546
20
+ invar/core/references.py,sha256=64yGIdj9vL72Y4uUhJsi9pztZkuMnLN-7OcOziyxYMo,6339
21
+ invar/core/review_trigger.py,sha256=4GGHUmgbVsQJAob4OO6A8G7KrLcNMwNOuqHiT6Jc7cs,14085
22
+ invar/core/rule_meta.py,sha256=il_KUTjSlW1MOVgLguuLDS9wEdyqUe3CDvUx4gQjACo,10180
23
+ invar/core/rules.py,sha256=6MvqO4dQXYwYe3ICp1bT2s_33O7FkpGwUzOrgHL16X4,19962
24
+ invar/core/shell_analysis.py,sha256=i2A9SMqBI3Rb4Ai0QNTM7awIkSJIY6yZJVWS72lv0bY,6457
25
+ invar/core/shell_architecture.py,sha256=98EVdBFIs8tO-i9jKuzdmv7fLB4PKnyI-vKh5lxnB98,6538
26
+ invar/core/strategies.py,sha256=2DPl0z2p_CBNd4RlSbZzTeAy6Dq6cpCiBCB2p5qHHkk,8798
27
+ invar/core/suggestions.py,sha256=LCg2Dy9EHh_n1t9jATRZ0gTkgJkAEZk3vp2nuuCyr-s,15129
28
+ invar/core/sync_helpers.py,sha256=kd6VyFAcpKfkVcbDk3GaBi2n0EWOGICz4VmdxwbshfI,7523
29
+ invar/core/tautology.py,sha256=Pmn__a0Bt55W0lAQo1G5q8Ory9KuE23dRknKw45xxbs,9221
30
+ invar/core/template_parser.py,sha256=vH3H8OX55scZ1hWh3xoA8oJMhgleKufCOhkTvsSuu_4,14730
31
+ invar/core/timeout_inference.py,sha256=BS2fJGmwOrLpYZUku4qrizgNDSIXVLFBslW-6sRAvpc,3451
32
+ invar/core/utils.py,sha256=4ani-6XcWF__sD0c_tKcCA2FunaF2pYIfvR5BACWkDg,14168
33
+ invar/core/verification_routing.py,sha256=_jXi1txFCcUdnB3-Yavtuyk8N-XhEO_Vu_051Vuz27Y,5020
34
+ invar/mcp/__init__.py,sha256=n3S7QwMjSMqOMT8cI2jf9E0yZPjKmBOJyIYhq4WZ8TQ,226
35
+ invar/mcp/__main__.py,sha256=ZcIT2U6xUyGOWucl4jq422BDE3lRLjqyxb9pFylRBdk,219
36
+ invar/mcp/server.py,sha256=0a9eAuIZ62UaDGewKhAn8-PhLYvFHta-w_XcygcXCtE,11981
37
+ invar/shell/__init__.py,sha256=FFw1mNbh_97PeKPcHIqQpQ7mw-JoIvyLM1yOdxLw5uk,204
38
+ invar/shell/config.py,sha256=cixlq47h8HYa9Ku-JOo66KCUyrf59R0NX_Yb7A1fAv4,16134
39
+ invar/shell/coverage.py,sha256=m01o898IFIdBztEBQLwwL1Vt5PWrpUntO4lv4nWEkls,11344
40
+ invar/shell/fs.py,sha256=wVD7DPWsCIJXuTyY_pi-5_LS82mXRdn_grJCOLn9zpU,3699
41
+ invar/shell/git.py,sha256=s6RQxEDQuLrmK3mru88EoYP8__4hiFW8AozlcxmY47E,2784
42
+ invar/shell/guard_helpers.py,sha256=QeYgbW0lgUa9Z_RCjAMG7UJdiMzz5cW48Lb2u-qgQi8,15114
43
+ invar/shell/guard_output.py,sha256=hcgamhSI781zUjHmrkNhYAjsy5qgEzCbxdtXuw1I-8w,11838
44
+ invar/shell/mcp_config.py,sha256=-hC7Y5BGuVs285b6gBARk7ZyzVxHwPgXSyt_GoN0jfs,4580
45
+ invar/shell/mutation.py,sha256=Lfyk2b8j8-hxAq-iwAgQeOhr7Ci6c5tRF1TXe3CxQCs,8914
46
+ invar/shell/property_tests.py,sha256=N9JreyH5PqR89oF5yLcX7ZAV-Koyg5BKo-J05-GUPsA,9109
47
+ invar/shell/subprocess_env.py,sha256=9oXl3eMEbzLsFEgMHqobEw6oW_wV0qMEP7pklwm58Pw,11453
48
+ invar/shell/template_engine.py,sha256=IzOiGsKVFo0lDUdtg27wMzIJJKToclv151RDZuDnHHo,11027
49
+ invar/shell/templates.py,sha256=l2En95E8jRVlojdQIqdZgRLVB43f_b1d_AJapKkozwA,15908
50
+ invar/shell/testing.py,sha256=PTrrCB0nIARuDQa_XREoRzbnqjXxju1l9Eb83pivH6c,10634
51
+ invar/shell/commands/__init__.py,sha256=MEkKwVyjI9DmkvBpJcuumXo2Pg_FFkfEr-Rr3nrAt7A,284
52
+ invar/shell/commands/guard.py,sha256=0v4kfDyxIEl3iZiYjCeTwTgAEUnL-DvCKSvXaDwqRX8,17895
53
+ invar/shell/commands/init.py,sha256=K8nz1D3RqWPUr61-gYnMiSg-9cRnnYXPCR-4x37LMQA,17004
54
+ invar/shell/commands/merge.py,sha256=nuvKo8m32-OL-SCQlS4SLKmOZxQ3qj-1nGCx1Pgzifw,8183
55
+ invar/shell/commands/mutate.py,sha256=GwemiO6LlbGCBEQsBFnzZuKhF-wIMEl79GAMnKUWc8U,5765
56
+ invar/shell/commands/perception.py,sha256=TyH_HpqyKkmE3-zcU4YyBG8ghwJaSFeRC-OQMVBDTbQ,3837
57
+ invar/shell/commands/sync_self.py,sha256=nmqBry7V2_enKwy2zzHg8UoedZNicLe3yKDhjmBeZ68,3880
58
+ invar/shell/commands/template_sync.py,sha256=g-IV4X1TGFVIypw9RBToexX7ZCSaCsD9yz-A0Sm-OmM,12155
59
+ invar/shell/commands/test.py,sha256=DKnlSbUydKq6skHLLKhZGg42qTAKtiLxrTU3oyFDmAo,4189
60
+ invar/shell/commands/update.py,sha256=0V5F8vxQ6PHPHPVYDmxdRD7xXeQEFypiJMYpY5ryiek,1349
61
+ invar/shell/prove/__init__.py,sha256=ZqlbmyMFJf6yAle8634jFuPRv8wNvHps8loMlOJyf8A,240
62
+ invar/shell/prove/accept.py,sha256=cnY_6jzU1EBnpLF8-zWUWcXiSXtCwxPsXEYXsSVPG38,3717
63
+ invar/shell/prove/cache.py,sha256=jbNdrvfLjvK7S0iqugErqeabb4YIbQuwIlcSRyCKbcg,4105
64
+ invar/shell/prove/crosshair.py,sha256=4Z_iIYBlkp-I6FqSYZa89wWB09V4Ouw2PduYhTn6rfw,16525
65
+ invar/shell/prove/hypothesis.py,sha256=QUclOOUg_VB6wbmHw8O2EPiL5qBOeBRqQeM04AVuLw0,9880
66
+ invar/templates/CLAUDE.md.template,sha256=W8o6M-wasCMg-7Ef2-RloDqvSKGS_9KUsy8DVbbUwDo,3719
67
+ invar/templates/__init__.py,sha256=cb3ht8KPK5oBn5oG6HsTznujmo9WriJ_P--fVxJwycc,45
68
+ invar/templates/aider.conf.yml.template,sha256=4xzSs3BXzFJvwdhnWbmzSY0yCbfx5oxqnV8ZjehqHBg,853
69
+ invar/templates/context.md.template,sha256=p1-iHl32Z30-FocJa7slcmoA7gtQrUrMO7cE_u5MrSo,2073
70
+ invar/templates/cursorrules.template,sha256=N6AiEJRJHGkHm2tswh3PnZ_07ozeyQQI8iEOGK5Aqoc,1023
71
+ invar/templates/manifest.toml,sha256=5JxaY9nl9hK5d1qWc2OJEGID6bFSX_Dp39lc5kRoIXk,4252
72
+ invar/templates/pre-commit-config.yaml.template,sha256=2qWY3E8iDUqi85jE_X7y0atE88YOlL5IZ93wkjCgQGo,1737
73
+ invar/templates/proposal.md.template,sha256=UP7SpQ7gk8jVlHGLQCSQ5c-kCj1DBQEz8M-vEStK77I,1573
74
+ invar/templates/commands/audit.md,sha256=eXBySlQrVyk054vYQWAZYzj-HgT2QXhpzziw6GlIeGM,4112
75
+ invar/templates/commands/guard.md,sha256=PyeAKfrmlXsgbrTDypQqXmTDKK1JHKhHEQrHqftA7X0,1177
76
+ invar/templates/config/CLAUDE.md.jinja,sha256=bowI-vhIHJvTCL20L4dwFtPODvkTWTllH2TRRVUf-cg,6295
77
+ invar/templates/config/context.md.jinja,sha256=sEQc-9jBqPpovlbnHSHcH7rwXVChfqDtUbYFTanStJI,2284
78
+ invar/templates/config/pre-commit.yaml.jinja,sha256=Qflmii8hngHciSgfa8mIlg3-E3D4b0xflm0-Q-cWcCc,1752
79
+ invar/templates/examples/README.md,sha256=xMcJZ1KEcfLJi5Ope_4FIbqDWKK3mRleAgllvgeNT6I,572
80
+ invar/templates/examples/conftest.py,sha256=uKA4NR7nyZWeSzY0URdZtw5zCcJpU32jNcaSKrI1Mxc,152
81
+ invar/templates/examples/contracts.py,sha256=uqJ6Y1GADo246MjFKoLY-_2E74cfBQsLO4vTqYcR81c,3241
82
+ invar/templates/examples/core_shell.py,sha256=ckor-7ZoaF7n8gVjnIO0CXlBjKGcVwmOGSDJbaXCSrM,4247
83
+ invar/templates/examples/workflow.md,sha256=jAopzQH1xE9_leJFdav4oj1AkI46-a2q4L8RQCkDknw,2334
84
+ invar/templates/protocol/INVAR.md,sha256=5u4q5PTVHHnJzRVEzfp4rXAfTHajIUNioRB4CQAs4JM,6662
85
+ invar/templates/skills/develop/SKILL.md.jinja,sha256=A0Hnx9FlBfPXdk2Mswx0zOnDZbgszI3u5MvLVd2rlM4,9544
86
+ invar/templates/skills/investigate/SKILL.md.jinja,sha256=vY6Hri5Nsy9C0JsLWU64NUitrPnBx49NtG0d4cg_FgI,3058
87
+ invar/templates/skills/propose/SKILL.md.jinja,sha256=b_cw_EiAneSGSOMTJWu_j9UwIlW7h-xab39uQgFb5wY,2734
88
+ invar/templates/skills/review/SKILL.md.jinja,sha256=hkLs5BHlzKNat4BdXNfgB3-3Bvz7C6gFEQJq-0hQHSk,3679
89
+ invar_tools-1.3.0.dist-info/METADATA,sha256=Gwg9kdiPndJzHV5168zGSGKXw9O1IXvIEbIgCashDjQ,11656
90
+ invar_tools-1.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
91
+ invar_tools-1.3.0.dist-info/entry_points.txt,sha256=xjkp8_Kipb6KJR6VNfkAEqiOpvrwUnwUG53cegBA6pQ,57
92
+ invar_tools-1.3.0.dist-info/licenses/LICENSE,sha256=qeFksp4H4kfTgQxPCIu3OdagXyiZcgBlVfsQ6M5oFyk,10767
93
+ invar_tools-1.3.0.dist-info/licenses/LICENSE-GPL,sha256=IvZfC6ZbP7CLjytoHVzvpDZpD-Z3R_qa1GdMdWlWQ6Q,35157
94
+ invar_tools-1.3.0.dist-info/licenses/NOTICE,sha256=joEyMyFhFY8Vd8tTJ-a3SirI0m2Sd0WjzqYt3sdcglc,2561
95
+ invar_tools-1.3.0.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ invar = invar.shell.commands.guard:app
@@ -0,0 +1,190 @@
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
32
+ not limited to compiled object code, generated documentation,
33
+ and 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
38
+ (an 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 modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ 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
111
+ of the following places: within a NOTICE text file distributed
112
+ as 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
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying 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
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions 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
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR 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
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 Invar Contributors
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.