invar-tools 1.11.0__py3-none-any.whl → 1.14.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.
- invar/core/feedback.py +110 -0
- invar/mcp/handlers.py +28 -0
- invar/mcp/server.py +64 -14
- invar/node_tools/ts-query.js +396 -0
- invar/shell/claude_hooks.py +49 -0
- invar/shell/commands/feedback.py +258 -0
- invar/shell/commands/guard.py +33 -1
- invar/shell/commands/init.py +51 -1
- invar/shell/commands/perception.py +302 -6
- invar/shell/py_refs.py +156 -0
- invar/shell/ts_compiler.py +238 -0
- invar/templates/claude-md/universal/tool-selection.md +110 -0
- invar/templates/config/CLAUDE.md.jinja +2 -0
- invar/templates/examples/typescript/patterns.md +193 -0
- invar/templates/manifest.toml +8 -0
- invar/templates/protocol/python/tools.md +5 -2
- invar/templates/protocol/typescript/tools.md +5 -2
- invar/templates/skills/invar-reflect/CONFIG.md +355 -0
- invar/templates/skills/invar-reflect/SKILL.md +466 -0
- invar/templates/skills/invar-reflect/template.md +343 -0
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/METADATA +25 -7
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/RECORD +27 -17
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/WHEEL +0 -0
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/entry_points.txt +0 -0
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/licenses/LICENSE +0 -0
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/licenses/LICENSE-GPL +0 -0
- {invar_tools-1.11.0.dist-info → invar_tools-1.14.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# Invar Usage Feedback - 2026-01-03
|
|
2
|
+
|
|
3
|
+
**Sessions**: 3 sessions today
|
|
4
|
+
**Total Duration**: 7.5 hours
|
|
5
|
+
**Total Messages**: 107
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Session Timeline
|
|
10
|
+
|
|
11
|
+
### Session 1: 08:30-11:30 (Implement Authentication)
|
|
12
|
+
**Messages**: 40 | **Duration**: 3h
|
|
13
|
+
|
|
14
|
+
Implemented JWT authentication for API endpoints. Main challenge was understanding Core/Shell separation for token validation logic.
|
|
15
|
+
|
|
16
|
+
### Session 2: 13:00-15:30 (Add Tests)
|
|
17
|
+
**Messages**: 35 | **Duration**: 2.5h
|
|
18
|
+
|
|
19
|
+
Added comprehensive test suite with doctests and property tests. Guard verification took longer than expected due to CrossHair timeout issues.
|
|
20
|
+
|
|
21
|
+
### Session 3: 16:00-18:00 (Fix Bugs)
|
|
22
|
+
**Messages**: 32 | **Duration**: 2h
|
|
23
|
+
|
|
24
|
+
Fixed edge cases found in code review. Learning curve improved - fewer contract syntax errors.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 📊 Tool Usage Statistics
|
|
29
|
+
|
|
30
|
+
| Tool | Calls | Success | Failure | Success Rate |
|
|
31
|
+
|------|-------|---------|---------|--------------|
|
|
32
|
+
| invar_guard | 12 | 10 | 2 | 83.3% |
|
|
33
|
+
| invar_sig | 18 | 18 | 0 | 100% |
|
|
34
|
+
| invar_map | 5 | 5 | 0 | 100% |
|
|
35
|
+
| invar_refs | 3 | 2 | 1 | 66.7% |
|
|
36
|
+
|
|
37
|
+
**Total**: 38 tool calls, 35 successful (92.1% success rate)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 😫 Aggregated Pain Points
|
|
42
|
+
|
|
43
|
+
### P1: [Critical] Guard Performance Issues
|
|
44
|
+
|
|
45
|
+
**First seen**: Session 1 (08:30)
|
|
46
|
+
**Last seen**: Session 3 (16:45)
|
|
47
|
+
**Total occurrences**: 12 times across 3 sessions
|
|
48
|
+
|
|
49
|
+
**Session breakdown**:
|
|
50
|
+
- Session 1: 4 times → "Takes 5 minutes to run"
|
|
51
|
+
- Session 2: 5 times → "Timeout on CrossHair verification"
|
|
52
|
+
- Session 3: 3 times → "Still slow even with --changed"
|
|
53
|
+
|
|
54
|
+
**Context**:
|
|
55
|
+
Project has 500+ Python files. Guard takes 3-5 minutes even with `--changed` flag. CrossHair verification frequently times out on complex contract conditions.
|
|
56
|
+
|
|
57
|
+
**Evolution**:
|
|
58
|
+
> Session 1: "5 minutes breaks my flow, totally blocking"
|
|
59
|
+
> Session 3: "Found workaround but still annoying"
|
|
60
|
+
|
|
61
|
+
**Current status**: Unresolved, workaround reduces impact
|
|
62
|
+
|
|
63
|
+
**Workaround**:
|
|
64
|
+
```bash
|
|
65
|
+
invar guard --changed --skip-crosshair # First pass
|
|
66
|
+
invar guard src/core/critical.py # Manual targeted check
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Suggested Improvement**:
|
|
70
|
+
- Add incremental verification mode (only changed functions + callers)
|
|
71
|
+
- Show progress bar with ETA during long runs
|
|
72
|
+
- Allow cancellation with partial results
|
|
73
|
+
- Consider caching CrossHair results for unchanged functions
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### P2: [High] Contract Syntax Confusion
|
|
78
|
+
|
|
79
|
+
**First seen**: Session 1 (08:45)
|
|
80
|
+
**Last seen**: Session 2 (14:20)
|
|
81
|
+
**Total occurrences**: 7 times across 2 sessions
|
|
82
|
+
|
|
83
|
+
**Session breakdown**:
|
|
84
|
+
- Session 1: 5 errors → Learning phase
|
|
85
|
+
- Session 2: 2 errors → Improving
|
|
86
|
+
- Session 3: 0 errors → Learned! ✓
|
|
87
|
+
|
|
88
|
+
**Context**:
|
|
89
|
+
Confusion about lambda parameter requirements in `@pre`/`@post` decorators. Error messages didn't clearly explain that lambda must include ALL parameters including defaults.
|
|
90
|
+
|
|
91
|
+
**What I tried** (wrong):
|
|
92
|
+
```python
|
|
93
|
+
@pre(lambda x: x >= 0) # Missing y parameter!
|
|
94
|
+
def calc(x: int, y: int = 0):
|
|
95
|
+
...
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**What worked**:
|
|
99
|
+
```python
|
|
100
|
+
@pre(lambda x, y=0: x >= 0) # Include defaults
|
|
101
|
+
def calc(x: int, y: int = 0):
|
|
102
|
+
...
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Evolution**: **RESOLVED** through practice and better error messages in latest Guard version
|
|
106
|
+
|
|
107
|
+
**Suggested Improvement**:
|
|
108
|
+
- Show example in error message: "Did you forget parameters? Try: @pre(lambda x, y=0: ...)"
|
|
109
|
+
- Add to INVAR.md Critical Rules with prominent placement
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### P3: [Medium] Core/Shell Decision Unclear
|
|
114
|
+
|
|
115
|
+
**First seen**: Session 1 (09:15)
|
|
116
|
+
**Last seen**: Session 3 (17:00)
|
|
117
|
+
**Total occurrences**: 5 times across 3 sessions
|
|
118
|
+
|
|
119
|
+
**Session breakdown**:
|
|
120
|
+
- Session 1: 3 decisions, ~15 min each → Re-read docs multiple times
|
|
121
|
+
- Session 2: 1 decision, ~5 min → Pattern becoming clearer
|
|
122
|
+
- Session 3: 1 decision, ~2 min → Faster decisions
|
|
123
|
+
|
|
124
|
+
**Context**:
|
|
125
|
+
Edge cases not covered in documentation:
|
|
126
|
+
- Function accepting `Path` parameter but not reading it
|
|
127
|
+
- Functions using `datetime.now()` or `random`
|
|
128
|
+
- Logging/stderr output
|
|
129
|
+
|
|
130
|
+
**Decision Pattern**:
|
|
131
|
+
| Function | My Guess | Actual | Time Spent |
|
|
132
|
+
|----------|----------|--------|------------|
|
|
133
|
+
| validate_path(p: Path) | Core? | Core ✓ | 5 min |
|
|
134
|
+
| read_config(p: Path) | Shell | Shell ✓ | 2 min |
|
|
135
|
+
| log_error(msg: str) | ??? | Shell | 15 min (re-read docs) |
|
|
136
|
+
| format_timestamp(dt) | Core? | Core ✓ | 3 min |
|
|
137
|
+
|
|
138
|
+
**Current status**: Ongoing learning, improving with experience
|
|
139
|
+
|
|
140
|
+
**Suggested Improvement**:
|
|
141
|
+
- Decision flowchart in INVAR.md
|
|
142
|
+
- More edge case examples in `.invar/examples/core_shell.py`
|
|
143
|
+
- Guard could hint: "This looks like Shell (uses logging)"
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## ✅ What Worked Well
|
|
148
|
+
|
|
149
|
+
### 1. `invar_sig` for quick contract lookup
|
|
150
|
+
|
|
151
|
+
**Usage**: 18 times (most used tool)
|
|
152
|
+
**Success**: 100%
|
|
153
|
+
|
|
154
|
+
**Why it worked**:
|
|
155
|
+
- Instant feedback - no need to read full file
|
|
156
|
+
- Clear output format - contracts highlighted
|
|
157
|
+
- Fast - <1s response time
|
|
158
|
+
|
|
159
|
+
**Typical workflow**:
|
|
160
|
+
```bash
|
|
161
|
+
invar sig src/core/parser.py # See all contracts
|
|
162
|
+
# Spot the function I need
|
|
163
|
+
# Copy contract pattern
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**User experience**:
|
|
167
|
+
> "This is my go-to tool. Saves tons of time vs opening files. I now check contracts before writing any Core function."
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### 2. Guard auto-fix suggestions
|
|
172
|
+
|
|
173
|
+
**Fixed automatically**: 5 issues
|
|
174
|
+
- 3x `missing_contract` → Guard suggested contracts based on type signatures
|
|
175
|
+
- 2x `redundant_type_contract` → Guard explained semantic constraint needed
|
|
176
|
+
|
|
177
|
+
**User experience**:
|
|
178
|
+
> "When Guard suggests fixes, I learn the pattern. By the 3rd similar error, I stopped making that mistake. The suggestions are educational, not just fixes."
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### 3. Contract-first workflow (USBV)
|
|
183
|
+
|
|
184
|
+
**Followed**: Understand → Specify → Build → Validate
|
|
185
|
+
**Result**: 0 contract violations caught by CrossHair in Session 3
|
|
186
|
+
|
|
187
|
+
**User experience**:
|
|
188
|
+
> "Writing contracts before code felt slow at first (Session 1), but by Session 3, Guard caught zero violations. Saved debugging time. The upfront investment paid off."
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 🤔 Confusion Points
|
|
193
|
+
|
|
194
|
+
### 1. @post cannot access parameters
|
|
195
|
+
|
|
196
|
+
**What I tried** (wrong):
|
|
197
|
+
```python
|
|
198
|
+
@pre(lambda x: x > 0)
|
|
199
|
+
@post(lambda result: result > x) # ERROR: 'x' not available!
|
|
200
|
+
def double(x: int) -> int:
|
|
201
|
+
return x * 2
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Error**:
|
|
205
|
+
```
|
|
206
|
+
NameError: name 'x' is not defined
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**What worked**:
|
|
210
|
+
```python
|
|
211
|
+
@pre(lambda x: x > 0)
|
|
212
|
+
@post(lambda result: result >= 0) # Only access 'result'
|
|
213
|
+
def double(x: int) -> int:
|
|
214
|
+
return x * 2
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Gap**: CLAUDE.md "Contract Rules" section mentions this, but I skimmed it and missed the detail. Could be more prominent.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### 2. Deal vs invar_runtime contracts
|
|
222
|
+
|
|
223
|
+
**Confusion**: When to use `from deal import pre` vs `from invar_runtime import pre`?
|
|
224
|
+
|
|
225
|
+
**What I learned** (after trial and error):
|
|
226
|
+
- `deal.pre` → Lambda-based contracts: `@pre(lambda x: x > 0)`
|
|
227
|
+
- `invar_runtime.pre` → Pre-built contract objects: `@pre(NonEmpty())`
|
|
228
|
+
|
|
229
|
+
**Gap**: This distinction not explained in INVAR.md "Critical Rules" section. Found it in examples after searching.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 🔄 Workarounds Used
|
|
234
|
+
|
|
235
|
+
| Issue | Workaround | Frequency |
|
|
236
|
+
|-------|------------|-----------|
|
|
237
|
+
| Guard timeout | `--changed` + manual spot checks | 12 times |
|
|
238
|
+
| Core/Shell confusion | Copy from examples instead of thinking | 5 times |
|
|
239
|
+
| Contract syntax | Copy-paste from `.invar/examples/` | 7 times (Sessions 1-2) |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 💡 Improvement Suggestions
|
|
244
|
+
|
|
245
|
+
### High Priority
|
|
246
|
+
|
|
247
|
+
1. **Incremental Guard mode**
|
|
248
|
+
- Problem: Full project scan too slow (3-5 minutes)
|
|
249
|
+
- Solution: Only verify changed functions + their callers
|
|
250
|
+
- Benefit: 10x speedup for iterative development
|
|
251
|
+
|
|
252
|
+
2. **Contextual error messages**
|
|
253
|
+
- Problem: Errors say WHAT but not HOW
|
|
254
|
+
- Solution: Include example link + fix hint in error
|
|
255
|
+
- Benefit: Reduce "search for examples" friction
|
|
256
|
+
|
|
257
|
+
3. **Core/Shell decision tree**
|
|
258
|
+
- Problem: Edge cases unclear
|
|
259
|
+
- Solution: Flowchart in INVAR.md + more examples
|
|
260
|
+
- Benefit: Faster decisions, less re-reading
|
|
261
|
+
|
|
262
|
+
### Medium Priority
|
|
263
|
+
|
|
264
|
+
4. **Interactive tutorial for first-time users**
|
|
265
|
+
- Problem: Learning curve steep (Session 1 had 5 contract errors)
|
|
266
|
+
- Solution: `invar tutorial` command with guided examples
|
|
267
|
+
- Benefit: Faster onboarding
|
|
268
|
+
|
|
269
|
+
5. **Guard progress indicator**
|
|
270
|
+
- Problem: No feedback during long runs (anxiety-inducing)
|
|
271
|
+
- Solution: Show "Checking file 45/120..." with ETA
|
|
272
|
+
- Benefit: Less anxiety, can estimate wait time
|
|
273
|
+
|
|
274
|
+
6. **Contract snippet library**
|
|
275
|
+
- Problem: Repetitive contract patterns (e.g., "non-empty string")
|
|
276
|
+
- Solution: `invar snippet list` with common patterns
|
|
277
|
+
- Benefit: Copy-paste correct patterns quickly
|
|
278
|
+
|
|
279
|
+
### Low Priority
|
|
280
|
+
|
|
281
|
+
7. **Guard performance dashboard**
|
|
282
|
+
- Problem: Can't see what's slow
|
|
283
|
+
- Solution: `--profile` flag showing time per rule/file
|
|
284
|
+
- Benefit: Optimize workflow, identify bottlenecks
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 📈 Daily Summary
|
|
289
|
+
|
|
290
|
+
### High-Frequency Issues (Top 3)
|
|
291
|
+
1. **Guard performance** - 12 occurrences, still blocking
|
|
292
|
+
2. **Contract syntax** - 7 occurrences, now resolved ✓
|
|
293
|
+
3. **Core/Shell decision** - 5 occurrences, ongoing learning
|
|
294
|
+
|
|
295
|
+
### Learning Progress
|
|
296
|
+
| Issue | Session 1 | Session 2 | Session 3 | Trend |
|
|
297
|
+
|-------|-----------|-----------|-----------|-------|
|
|
298
|
+
| Contract syntax | 5 errors | 2 errors | 0 errors | ✅ Learned |
|
|
299
|
+
| Core/Shell | Confused (15 min) | Still unsure (5 min) | Clearer (2 min) | 📈 Improving |
|
|
300
|
+
| Guard usage | Blocked | Found workaround | Using workaround | ⚠️ Not fixed |
|
|
301
|
+
|
|
302
|
+
### Sentiment Evolution
|
|
303
|
+
- **Morning (Session 1)**: Frustrated (Guard blocks progress, contract errors)
|
|
304
|
+
- **Afternoon (Session 2)**: Adapting (workarounds found, fewer errors)
|
|
305
|
+
- **Evening (Session 3)**: Productive (main friction remains but manageable)
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## 🎯 Session Success Metrics
|
|
310
|
+
|
|
311
|
+
| Metric | Value | Assessment |
|
|
312
|
+
|--------|-------|------------|
|
|
313
|
+
| Task completed | ✅ Yes | Success |
|
|
314
|
+
| Guard final pass | ✅ 0 errors | Success |
|
|
315
|
+
| Time to first Guard pass | 2.5 hours | Could be faster |
|
|
316
|
+
| Stuck on Invar issues | ~45 min total | Acceptable |
|
|
317
|
+
| Would recommend Invar | ✅ Yes | Positive overall |
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 📝 Additional Notes
|
|
322
|
+
|
|
323
|
+
- First time using `invar refs` - worked great for finding TypeScript symbol usage
|
|
324
|
+
- Didn't use `invar map` much this session - not sure when it's better than `invar sig`
|
|
325
|
+
- Skill system (`/develop`, `/review`) works smoothly - no issues
|
|
326
|
+
- USBV workflow feels natural by Session 3 - initial friction worth it
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 🔒 Privacy Notice
|
|
331
|
+
|
|
332
|
+
This feedback document is stored locally in `.invar/feedback/`.
|
|
333
|
+
You control what (if anything) to share with Invar maintainers.
|
|
334
|
+
|
|
335
|
+
**To share feedback**:
|
|
336
|
+
1. Review this document
|
|
337
|
+
2. Remove any sensitive project details
|
|
338
|
+
3. Submit via GitHub issue or email to invar-maintainers@example.com
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
*Generated by `/invar-reflect` v1.0*
|
|
343
|
+
*Last updated: 2026-01-03 18:15*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: invar-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.14.0
|
|
4
4
|
Summary: AI-native software engineering tools with design-by-contract verification
|
|
5
5
|
Project-URL: Homepage, https://github.com/tefx/invar
|
|
6
6
|
Project-URL: Documentation, https://github.com/tefx/invar#readme
|
|
@@ -24,6 +24,7 @@ Requires-Python: >=3.11
|
|
|
24
24
|
Requires-Dist: crosshair-tool>=0.0.60
|
|
25
25
|
Requires-Dist: hypothesis>=6.0
|
|
26
26
|
Requires-Dist: invar-runtime>=1.0
|
|
27
|
+
Requires-Dist: jedi>=0.19
|
|
27
28
|
Requires-Dist: jinja2>=3.0
|
|
28
29
|
Requires-Dist: markdown-it-py>=3.0
|
|
29
30
|
Requires-Dist: mcp>=1.0
|
|
@@ -146,7 +147,19 @@ Guard passed.
|
|
|
146
147
|
|
|
147
148
|
## 🚀 Quick Start
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
### Tool × Language Support
|
|
151
|
+
|
|
152
|
+
| Tool | Python | TypeScript | Notes |
|
|
153
|
+
|------|--------|------------|-------|
|
|
154
|
+
| `invar guard` | ✅ Full | ⚠️ Partial | TS: tsc + eslint + vitest |
|
|
155
|
+
| `invar sig` | ✅ Full | ✅ Full | TS: TS Compiler API |
|
|
156
|
+
| `invar map` | ✅ Full | ✅ Full | TS: With reference counts |
|
|
157
|
+
| `invar refs` | ✅ Full | ✅ Full | Cross-file reference finding |
|
|
158
|
+
| `invar doc *` | ✅ Full | ✅ Full | Language-agnostic |
|
|
159
|
+
|
|
160
|
+
**TypeScript Notes:**
|
|
161
|
+
- Requires Node.js + TypeScript (most TS projects have these)
|
|
162
|
+
- Falls back to regex parser if Node.js unavailable
|
|
150
163
|
|
|
151
164
|
### 📦 Two Packages, Different Purposes
|
|
152
165
|
|
|
@@ -303,14 +316,17 @@ function average(items: number[]): number {
|
|
|
303
316
|
|
|
304
317
|
### ✅ Solution 2: Multi-Layer Verification
|
|
305
318
|
|
|
306
|
-
Guard provides fast feedback
|
|
319
|
+
Guard provides fast feedback **on top of standard type checking**. Agent sees errors, fixes immediately:
|
|
307
320
|
|
|
308
321
|
| Layer | Tool | Speed | What It Catches |
|
|
309
322
|
|-------|------|-------|-----------------|
|
|
323
|
+
| **Type Check*** | mypy (Python) / tsc (TypeScript) | ~1s | Type errors, missing annotations |
|
|
310
324
|
| **Static** | Guard rules | ~0.5s | Architecture violations, missing contracts |
|
|
311
|
-
| **Doctest** | pytest | ~2s | Example correctness |
|
|
312
|
-
| **Property** | Hypothesis | ~10s | Edge cases via random inputs |
|
|
313
|
-
| **Symbolic** | CrossHair | ~30s | Mathematical proof of contracts |
|
|
325
|
+
| **Doctest** | pytest / vitest | ~2s | Example correctness |
|
|
326
|
+
| **Property** | Hypothesis / fast-check | ~10s | Edge cases via random inputs |
|
|
327
|
+
| **Symbolic** | CrossHair / (TS: N/A) | ~30s | Mathematical proof of contracts |
|
|
328
|
+
|
|
329
|
+
<sup>* Requires separate installation: `pip install mypy` or configure TypeScript in your project</sup>
|
|
314
330
|
|
|
315
331
|
```
|
|
316
332
|
┌──────────┐ ┌───────────┐ ┌───────────┐ ┌────────────┐
|
|
@@ -525,7 +541,7 @@ Cursor users get full verification via MCP:
|
|
|
525
541
|
|----------------|---------|----------|
|
|
526
542
|
| `INVAR.md` | Protocol for AI agents | Required |
|
|
527
543
|
| `.invar/` | Config, context, examples | Required |
|
|
528
|
-
| `.pre-commit-config.yaml` | Verification before commit | Optional |
|
|
544
|
+
| `.pre-commit-config.yaml` | Verification before commit (Ruff, mypy*, Guard) | Optional |
|
|
529
545
|
| `src/core/`, `src/shell/` | Recommended structure | Optional |
|
|
530
546
|
| `CLAUDE.md` | Agent instructions | Claude Code |
|
|
531
547
|
| `.claude/skills/` | Workflow + extension skills | Claude Code |
|
|
@@ -534,6 +550,8 @@ Cursor users get full verification via MCP:
|
|
|
534
550
|
| `.mcp.json` | MCP server config | Claude Code |
|
|
535
551
|
| `AGENT.md` | Universal agent instructions | Other agents |
|
|
536
552
|
|
|
553
|
+
<sup>* mypy hook included in `.pre-commit-config.yaml` but requires: `pip install mypy`</sup>
|
|
554
|
+
|
|
537
555
|
**Note:** If `pyproject.toml` exists, Guard configuration goes there as `[tool.invar.guard]` instead of `.invar/config.toml`.
|
|
538
556
|
|
|
539
557
|
**Recommended structure:**
|
|
@@ -6,6 +6,7 @@ invar/core/doc_edit.py,sha256=kLBkSQMFiXKdZMlQYAy-pzld1f1p2UFKGpKVVJo8Nes,6690
|
|
|
6
6
|
invar/core/doc_parser.py,sha256=yzZKzgr9myUiiRGtRidT2tubrs4-omtGlTwbUkSKhoM,18197
|
|
7
7
|
invar/core/entry_points.py,sha256=1p6GRGTp9kA9spNkGKidFLlzLPheh6JO2XFb68Cr0sE,12209
|
|
8
8
|
invar/core/extraction.py,sha256=mScqEMEEQdsd-Z0jx9g3scK6Z1vI9l-ESjggXPIWHZ4,6112
|
|
9
|
+
invar/core/feedback.py,sha256=JhQf32y_Qutza8D2b5qX2U4fM--vtR3sBdV22KrVNY0,3246
|
|
9
10
|
invar/core/format_specs.py,sha256=P299aRHFMXyow8STwsvaT6Bg2ALPs2wSy7SByiRZZ-A,5610
|
|
10
11
|
invar/core/format_strategies.py,sha256=LifL97JbsF8WEkVNmQpq2htyFUC3pW21myAjtRGpSxU,5774
|
|
11
12
|
invar/core/formatter.py,sha256=rCGZhMpl4dPLrztgKDkNtAvnv2vKfomyIHl_6fThuno,11293
|
|
@@ -49,15 +50,16 @@ invar/core/patterns/registry.py,sha256=2rz0wWDRarMkuHN-qM_ZrT3qeGFDSKMABvRvPNZxQ
|
|
|
49
50
|
invar/core/patterns/types.py,sha256=ULAlWuAdmO6CFcEDjTrWBfzNTBsnomAl2d25tR11ihU,5506
|
|
50
51
|
invar/mcp/__init__.py,sha256=n3S7QwMjSMqOMT8cI2jf9E0yZPjKmBOJyIYhq4WZ8TQ,226
|
|
51
52
|
invar/mcp/__main__.py,sha256=ZcIT2U6xUyGOWucl4jq422BDE3lRLjqyxb9pFylRBdk,219
|
|
52
|
-
invar/mcp/handlers.py,sha256=
|
|
53
|
-
invar/mcp/server.py,sha256=
|
|
53
|
+
invar/mcp/handlers.py,sha256=b0LRWKMpu6lnjPV7SozH0cxKYJufVWy3eJhiAu3of-M,15947
|
|
54
|
+
invar/mcp/server.py,sha256=WmVNs2_AcOMbmp3tEgWR57hjqqJkMx3nV3z9fcNuSAA,20109
|
|
54
55
|
invar/node_tools/MANIFEST,sha256=UwtO2AsQ-0UwskG6ZkE2kXqz_hdp-gzRTyp32-X22Mc,131
|
|
55
56
|
invar/node_tools/__init__.py,sha256=HzILh3jtP28Lm2jZwss1SY65ECxbtw2J2uFpXQA6Y94,1740
|
|
57
|
+
invar/node_tools/ts-query.js,sha256=fEc_f0JT_Mb18dEoA4_vJoazvd7Lqv_rsed4eHSAbCg,13303
|
|
56
58
|
invar/node_tools/fc-runner/cli.js,sha256=72_gIhvnx2peKITdzdnFWI5fzGaNTS3BcEqyS628cI0,243277
|
|
57
59
|
invar/node_tools/quick-check/cli.js,sha256=dwV3hdJleFQga2cKUn3PPfQDvvujhzKdjQcIvWsKgM0,66196
|
|
58
60
|
invar/node_tools/ts-analyzer/cli.js,sha256=SvZ6HyjmobpP8NAZqXFiy8BwH_t5Hb17Ytar_18udaQ,4092887
|
|
59
61
|
invar/shell/__init__.py,sha256=FFw1mNbh_97PeKPcHIqQpQ7mw-JoIvyLM1yOdxLw5uk,204
|
|
60
|
-
invar/shell/claude_hooks.py,sha256=
|
|
62
|
+
invar/shell/claude_hooks.py,sha256=hV4DfG3cVng32f0Rxoo070tliVlYFC5v9slIWEbAD7E,18899
|
|
61
63
|
invar/shell/config.py,sha256=6-kbo6--SxfROXoyU-v7InSLR8f_U1Mar_xEOdCXFkY,17633
|
|
62
64
|
invar/shell/contract_coverage.py,sha256=81OQkQqUVYUKytG5aiJyRK62gwh9UzbSG926vkvFTc8,12088
|
|
63
65
|
invar/shell/coverage.py,sha256=m01o898IFIdBztEBQLwwL1Vt5PWrpUntO4lv4nWEkls,11344
|
|
@@ -71,19 +73,22 @@ invar/shell/mutation.py,sha256=Lfyk2b8j8-hxAq-iwAgQeOhr7Ci6c5tRF1TXe3CxQCs,8914
|
|
|
71
73
|
invar/shell/pattern_integration.py,sha256=pRcjfq3NvMW_tvQCnaXZnD1k5AVEWK8CYOE2jN6VTro,7842
|
|
72
74
|
invar/shell/pi_hooks.py,sha256=ulZc1sP8mTRJTBsjwFHQzUgg-h8ajRIMp7iF1Y4UUtw,6885
|
|
73
75
|
invar/shell/property_tests.py,sha256=N9JreyH5PqR89oF5yLcX7ZAV-Koyg5BKo-J05-GUPsA,9109
|
|
76
|
+
invar/shell/py_refs.py,sha256=Vjz50lmt9prDBcBv4nkkODdiJ7_DKu5zO4UPZBjAfmM,4638
|
|
74
77
|
invar/shell/skill_manager.py,sha256=Mr7Mh9rxPSKSAOTJCAM5ZHiG5nfUf6KQVCuD4LBNHSI,12440
|
|
75
78
|
invar/shell/subprocess_env.py,sha256=9oXl3eMEbzLsFEgMHqobEw6oW_wV0qMEP7pklwm58Pw,11453
|
|
76
79
|
invar/shell/template_engine.py,sha256=eNKMz7R8g9Xp3_1TGx-QH137jf52E0u3KaVcnotu1Tg,12056
|
|
77
80
|
invar/shell/templates.py,sha256=31f5ieoGeWU0qqfLJUMWnz0yyLa1FBc_sOz6UGzToqk,13884
|
|
78
81
|
invar/shell/testing.py,sha256=rTNBH0Okh2qtG9ohSXOz487baQ2gXrWT3s_WECW3HJs,11143
|
|
82
|
+
invar/shell/ts_compiler.py,sha256=nA8brnOhThj9J_J3vAEGjDsM4NjbWQ_eX8Yf4pHPOgk,6672
|
|
79
83
|
invar/shell/commands/__init__.py,sha256=MEkKwVyjI9DmkvBpJcuumXo2Pg_FFkfEr-Rr3nrAt7A,284
|
|
80
84
|
invar/shell/commands/doc.py,sha256=SOLDoCXXGxx_JU0PKXlAIGEF36PzconHmmAtL-rM6D4,13819
|
|
81
|
-
invar/shell/commands/
|
|
85
|
+
invar/shell/commands/feedback.py,sha256=lLxEeWW_71US_vlmorFrGXS8IARB9nbV6D0zruLs660,7640
|
|
86
|
+
invar/shell/commands/guard.py,sha256=xTQ8cPp-x1xMCtufKxmMNUSpIpH31uUjziAB8ifCnC0,24837
|
|
82
87
|
invar/shell/commands/hooks.py,sha256=W-SOnT4VQyUvXwipozkJwgEYfiOJGz7wksrbcdWegUg,2356
|
|
83
|
-
invar/shell/commands/init.py,sha256
|
|
88
|
+
invar/shell/commands/init.py,sha256=bYrQWkDXGKEqncLgCFicSRt6LAmA34XyBFJ31kip-1Q,22564
|
|
84
89
|
invar/shell/commands/merge.py,sha256=nuvKo8m32-OL-SCQlS4SLKmOZxQ3qj-1nGCx1Pgzifw,8183
|
|
85
90
|
invar/shell/commands/mutate.py,sha256=GwemiO6LlbGCBEQsBFnzZuKhF-wIMEl79GAMnKUWc8U,5765
|
|
86
|
-
invar/shell/commands/perception.py,sha256=
|
|
91
|
+
invar/shell/commands/perception.py,sha256=HewSv6Kv8Gw2UQqkGY2rP5YKlnwyC3LBrQ2hFVXXw30,19304
|
|
87
92
|
invar/shell/commands/skill.py,sha256=oKVyaxQ_LK28FpJhRpBDpXcpRdUBK3n6rC0qD77ax1M,5803
|
|
88
93
|
invar/shell/commands/sync_self.py,sha256=nmqBry7V2_enKwy2zzHg8UoedZNicLe3yKDhjmBeZ68,3880
|
|
89
94
|
invar/shell/commands/template_sync.py,sha256=aNWyFPMFT7pSwHrvwGCqcKAwb4dp7S9tvZzy9H4gAnw,16094
|
|
@@ -99,7 +104,7 @@ invar/shell/prove/hypothesis.py,sha256=QUclOOUg_VB6wbmHw8O2EPiL5qBOeBRqQeM04AVuL
|
|
|
99
104
|
invar/templates/CLAUDE.md.template,sha256=eaGU3SyRO_NEifw5b26k3srgQH4jyeujjCJ-HbM36_w,4913
|
|
100
105
|
invar/templates/__init__.py,sha256=cb3ht8KPK5oBn5oG6HsTznujmo9WriJ_P--fVxJwycc,45
|
|
101
106
|
invar/templates/context.md.template,sha256=FKyI1ghpqcf4wftyv9-auIFHor8Nm8lETN45Ja-L8Og,2386
|
|
102
|
-
invar/templates/manifest.toml,sha256=
|
|
107
|
+
invar/templates/manifest.toml,sha256=2S_pmyH4bcsJEeSbrIJVfkso4mPu5wHDHgy48uTzyK0,4981
|
|
103
108
|
invar/templates/proposal.md.template,sha256=UP7SpQ7gk8jVlHGLQCSQ5c-kCj1DBQEz8M-vEStK77I,1573
|
|
104
109
|
invar/templates/claude-md/python/critical-rules.md,sha256=Pkw6ZXFtAN2WGOeTD0CwkB_T73fd66NGzdOFM0wn-80,895
|
|
105
110
|
invar/templates/claude-md/python/quick-reference.md,sha256=ttd0TwgyIY0qt6qbeaCn4GO0e2OKedFLQE3yG32SlrA,672
|
|
@@ -107,11 +112,12 @@ invar/templates/claude-md/typescript/critical-rules.md,sha256=wC8EsPMR6R5sEAi6a3
|
|
|
107
112
|
invar/templates/claude-md/typescript/quick-reference.md,sha256=JtuUOrExY3TURZwc8vZA0t83etYL6ci1d7AqjUkUM3U,695
|
|
108
113
|
invar/templates/claude-md/universal/check-in.md,sha256=EUlpig5Cp0MRctlx7U49Ia7lEHkZriFXWj4-qHkDmTU,616
|
|
109
114
|
invar/templates/claude-md/universal/skills.md,sha256=O0JgCQNzUTEGAsGYTZg0HoBTffn-pRxQV6iso4MTUuc,2584
|
|
115
|
+
invar/templates/claude-md/universal/tool-selection.md,sha256=QJcxDmXE6atiRU3d-Autm3q5gOedBumG_foikcIiG8o,3707
|
|
110
116
|
invar/templates/claude-md/universal/workflow.md,sha256=MatlbihubRg9zAjjuR331PSJ9xwMCusUVfbc86YEVoE,1966
|
|
111
117
|
invar/templates/commands/audit.md.jinja,sha256=Gwh3LNNcNWHzsOC7chYYg5ym8BxWTjySain3qPOs8pM,4817
|
|
112
118
|
invar/templates/commands/guard.md,sha256=N_C_AXd9kI85W1B0aTEycjiDp_jdaP8eeq8O0FQ_WQ8,1227
|
|
113
119
|
invar/templates/config/AGENT.md.jinja,sha256=tBIK5kZ7hjWgABU96Yq5_w3gNw_F31gQ19h4u1MLY4o,7037
|
|
114
|
-
invar/templates/config/CLAUDE.md.jinja,sha256
|
|
120
|
+
invar/templates/config/CLAUDE.md.jinja,sha256=Mr3Q6B5ojczLlHmxLO8xnoHNDS2oqWoswdMi69X_oHc,1792
|
|
115
121
|
invar/templates/config/context.md.jinja,sha256=BZnqBg_CXz3QFiCc8rfG8Kav_BGaGmSqxATKMliMA7k,3911
|
|
116
122
|
invar/templates/config/pre-commit.yaml.jinja,sha256=nUPxLxkTHAgZwhFAuOMDbZ8v0NQV9FlQPbr2MDEOsoA,1778
|
|
117
123
|
invar/templates/examples/python/README.md,sha256=mBsWKgQOF_PMQ_rf91TTjAEHpwfnb8Bb3x80D82bNZE,703
|
|
@@ -124,6 +130,7 @@ invar/templates/examples/typescript/README.md,sha256=I6kVTJAk6wqb21eC09hyOZXRP74
|
|
|
124
130
|
invar/templates/examples/typescript/contracts.ts,sha256=X6EeNUAurw9MHJlHPDos_JtnScMu2aDMSkveIaA4wHs,4597
|
|
125
131
|
invar/templates/examples/typescript/core_shell.ts,sha256=VuPl0xmn_s6pA7ZJtq0zNjXzK_DRmq3LexwTS8MEqnQ,11267
|
|
126
132
|
invar/templates/examples/typescript/functional.ts,sha256=bQHfl0EYDC_RziRQLJBgPNBGhWBBO7SVSVchqBJUetM,17347
|
|
133
|
+
invar/templates/examples/typescript/patterns.md,sha256=rlZ6IOC8iYUQzIXaW7fUf95OQbeWPWSjQXDDJNoU05E,4859
|
|
127
134
|
invar/templates/examples/typescript/workflow.md,sha256=5byADjA3WgOgiDbkEtVRKKGvlhvu3EbFCzqEg9lEV7k,2764
|
|
128
135
|
invar/templates/hooks/PostToolUse.sh.jinja,sha256=JHJGMdF3xp2qEqkPC9GaLp0NCa5gdRzqAmgRy4IldBg,3428
|
|
129
136
|
invar/templates/hooks/PreToolUse.sh.jinja,sha256=tZb-FGFxOBtTprUfeChau7rZOMPII69_5HSF-i_WD4Q,3558
|
|
@@ -139,12 +146,12 @@ invar/templates/protocol/INVAR.md.jinja,sha256=t2ZIQZJvzDTJMrRw_ijUo6ScZmeNK0-nV
|
|
|
139
146
|
invar/templates/protocol/python/architecture-examples.md,sha256=O96LH9WFpk7G9MrhSbifLS5pyibTIDG-_EGFF7g3V4M,1175
|
|
140
147
|
invar/templates/protocol/python/contracts-syntax.md,sha256=Q6supTQ3tChVrlN7xhcdb3Q8VGIESxQLA-mQvrNIZmo,1162
|
|
141
148
|
invar/templates/protocol/python/markers.md,sha256=fzltCKbdPVz_vCuJFiQ9pbRPztvpMJpSf_4aFHcXFLM,1223
|
|
142
|
-
invar/templates/protocol/python/tools.md,sha256=
|
|
149
|
+
invar/templates/protocol/python/tools.md,sha256=RULbZhisRxNI1oTxYzhWI3NTVyKNukrkQbwR5XWQt2Y,1043
|
|
143
150
|
invar/templates/protocol/python/troubleshooting.md,sha256=-JHLUOxvfQeSrLpqKrxUXQ5UrkW44AHFr3LGHwxnw7w,1081
|
|
144
151
|
invar/templates/protocol/typescript/architecture-examples.md,sha256=Dej-DI6OqRVsbzjukjOqdO8WEz0aT-1iwYqrah2B_xk,1454
|
|
145
152
|
invar/templates/protocol/typescript/contracts-syntax.md,sha256=yKyM6WhyF5p-bt-RqD5SI4ZZudE7bLLFTAMzVSa74QE,1610
|
|
146
153
|
invar/templates/protocol/typescript/markers.md,sha256=8mHzYfBlQ2baeQSV2e7uY2p6_EW1rwKVjToTLiQwUrQ,1536
|
|
147
|
-
invar/templates/protocol/typescript/tools.md,sha256=
|
|
154
|
+
invar/templates/protocol/typescript/tools.md,sha256=c0xu0n15iFcNAET8wOqKdcgG2n_OC0hP4xE7rZaFDI0,1691
|
|
148
155
|
invar/templates/protocol/typescript/troubleshooting.md,sha256=kHx4Ykfgv6S1OXMmLZ3jMft6aqy60c9ODEhfs5kcybo,2588
|
|
149
156
|
invar/templates/protocol/universal/architecture.md,sha256=WT6wL0VDPD4n8yXBQEOXXnzh2IkK18oOt76lZelN3As,1379
|
|
150
157
|
invar/templates/protocol/universal/completion.md,sha256=bFo8-Npa7vb1efQLgOdGDSWnho45f0BBxvaD8awFLus,425
|
|
@@ -166,13 +173,16 @@ invar/templates/skills/extensions/security/SKILL.md,sha256=5mLwf4JP82Wq1vKkDIJwi
|
|
|
166
173
|
invar/templates/skills/extensions/security/patterns/_common.yaml,sha256=75BvSABWUtO1VXFvdsMgqi86J1759T4ROhYYcizSygQ,3680
|
|
167
174
|
invar/templates/skills/extensions/security/patterns/python.yaml,sha256=osyR8mWiyjW6tWjZA7QZfBIiim7XqgBYnrE45ktDx50,4658
|
|
168
175
|
invar/templates/skills/extensions/security/patterns/typescript.yaml,sha256=qDEg-sxSE63Bis2IZG1y4L8m8g2ZYkC29o6t-J_LmUo,5508
|
|
176
|
+
invar/templates/skills/invar-reflect/CONFIG.md,sha256=xBiKEy0TnoXNxqn55_GpkNGgmXoUg65RXwb_RdF-eGk,9291
|
|
177
|
+
invar/templates/skills/invar-reflect/SKILL.md,sha256=z0Nyh9JasZr70XhE9Es7IslxL3C8wH2lf8RewQi4Lbs,11285
|
|
178
|
+
invar/templates/skills/invar-reflect/template.md,sha256=Rr5hvbllvmd8jSLf_0ZjyKt6KOod0RlNdCtZJ3lYjiM,10470
|
|
169
179
|
invar/templates/skills/investigate/SKILL.md.jinja,sha256=cp6TBEixBYh1rLeeHOR1yqEnFqv1NZYePORMnavLkQI,3231
|
|
170
180
|
invar/templates/skills/propose/SKILL.md.jinja,sha256=6BuKiCqO1AEu3VtzMHy1QWGqr_xqG9eJlhbsKT4jev4,3463
|
|
171
181
|
invar/templates/skills/review/SKILL.md.jinja,sha256=ET5mbdSe_eKgJbi2LbgFC-z1aviKcHOBw7J5Q28fr4U,14105
|
|
172
|
-
invar_tools-1.
|
|
173
|
-
invar_tools-1.
|
|
174
|
-
invar_tools-1.
|
|
175
|
-
invar_tools-1.
|
|
176
|
-
invar_tools-1.
|
|
177
|
-
invar_tools-1.
|
|
178
|
-
invar_tools-1.
|
|
182
|
+
invar_tools-1.14.0.dist-info/METADATA,sha256=1cKRlX8XrRzgAVc_9EJeCzXWrDBAUFooA8tSIktfclk,28409
|
|
183
|
+
invar_tools-1.14.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
184
|
+
invar_tools-1.14.0.dist-info/entry_points.txt,sha256=RwH_EhqgtFPsnO6RcrwrAb70Zyfb8Mh6uUtztWnUxGk,102
|
|
185
|
+
invar_tools-1.14.0.dist-info/licenses/LICENSE,sha256=qeFksp4H4kfTgQxPCIu3OdagXyiZcgBlVfsQ6M5oFyk,10767
|
|
186
|
+
invar_tools-1.14.0.dist-info/licenses/LICENSE-GPL,sha256=IvZfC6ZbP7CLjytoHVzvpDZpD-Z3R_qa1GdMdWlWQ6Q,35157
|
|
187
|
+
invar_tools-1.14.0.dist-info/licenses/NOTICE,sha256=joEyMyFhFY8Vd8tTJ-a3SirI0m2Sd0WjzqYt3sdcglc,2561
|
|
188
|
+
invar_tools-1.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|