invar-tools 1.7.1__tar.gz → 1.8.0__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 (284) hide show
  1. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/skills/develop/SKILL.md +59 -0
  2. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/skills/investigate/SKILL.md +15 -0
  3. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/skills/propose/SKILL.md +29 -0
  4. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/skills/review/SKILL.md +15 -0
  5. {invar_tools-1.7.1 → invar_tools-1.8.0}/CLAUDE.md +18 -0
  6. {invar_tools-1.7.1 → invar_tools-1.8.0}/PKG-INFO +25 -10
  7. {invar_tools-1.7.1 → invar_tools-1.8.0}/README.md +24 -9
  8. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guides/multi-agent.md +50 -13
  9. invar_tools-1.8.0/docs/guides/pi.md +275 -0
  10. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/index.html +6 -6
  11. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/LX-04-pi-agent-support.md +153 -37
  12. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/index.md +28 -19
  13. {invar_tools-1.7.1 → invar_tools-1.8.0}/pyproject.toml +1 -1
  14. invar_tools-1.8.0/src/invar/core/template_helpers.py +32 -0
  15. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/init.py +51 -4
  16. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/uninstall.py +17 -0
  17. invar_tools-1.8.0/src/invar/shell/pi_hooks.py +207 -0
  18. invar_tools-1.8.0/src/invar/templates/config/AGENT.md.jinja +198 -0
  19. invar_tools-1.8.0/src/invar/templates/hooks/pi/invar.ts.jinja +73 -0
  20. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/manifest.toml +1 -0
  21. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/skills/develop/SKILL.md.jinja +59 -0
  22. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/skills/investigate/SKILL.md.jinja +15 -0
  23. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/skills/propose/SKILL.md.jinja +33 -0
  24. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/skills/review/SKILL.md.jinja +15 -0
  25. {invar_tools-1.7.1 → invar_tools-1.8.0}/.aider.conf.yml +0 -0
  26. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/commands/audit.md +0 -0
  27. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/commands/guard.md +0 -0
  28. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/PostToolUse.sh +0 -0
  29. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/PreToolUse.sh +0 -0
  30. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/Stop.sh +0 -0
  31. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/UserPromptSubmit.sh +0 -0
  32. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/invar.PostToolUse.sh +0 -0
  33. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/invar.PreToolUse.sh +0 -0
  34. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/invar.Stop.sh +0 -0
  35. {invar_tools-1.7.1 → invar_tools-1.8.0}/.claude/hooks/invar.UserPromptSubmit.sh +0 -0
  36. {invar_tools-1.7.1 → invar_tools-1.8.0}/.cursorrules +0 -0
  37. {invar_tools-1.7.1 → invar_tools-1.8.0}/.github/workflows/ci.yml +0 -0
  38. {invar_tools-1.7.1 → invar_tools-1.8.0}/.github/workflows/publish.yml +0 -0
  39. {invar_tools-1.7.1 → invar_tools-1.8.0}/.gitignore +0 -0
  40. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/archive/sessions-2025-12.md +0 -0
  41. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/context.md +0 -0
  42. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/README.md +0 -0
  43. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/conftest.py +0 -0
  44. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/contracts.py +0 -0
  45. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/core_shell.py +0 -0
  46. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/functional.py +0 -0
  47. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/examples/workflow.md +0 -0
  48. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/mcp-setup.md +0 -0
  49. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/project-additions.md +0 -0
  50. {invar_tools-1.7.1 → invar_tools-1.8.0}/.invar/proposals/TEMPLATE.md +0 -0
  51. {invar_tools-1.7.1 → invar_tools-1.8.0}/.mcp.json +0 -0
  52. {invar_tools-1.7.1 → invar_tools-1.8.0}/.pre-commit-config.yaml +0 -0
  53. {invar_tools-1.7.1 → invar_tools-1.8.0}/.serena/.gitignore +0 -0
  54. {invar_tools-1.7.1 → invar_tools-1.8.0}/.serena/project.yml +0 -0
  55. {invar_tools-1.7.1 → invar_tools-1.8.0}/INVAR.md +0 -0
  56. {invar_tools-1.7.1 → invar_tools-1.8.0}/LICENSE +0 -0
  57. {invar_tools-1.7.1 → invar_tools-1.8.0}/LICENSE-GPL +0 -0
  58. {invar_tools-1.7.1 → invar_tools-1.8.0}/NOTICE +0 -0
  59. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/.nojekyll +0 -0
  60. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/agents.md +0 -0
  61. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/design.md +0 -0
  62. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/diagrams.md +0 -0
  63. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guide.md +0 -0
  64. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guides/aider.md +0 -0
  65. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guides/cline.md +0 -0
  66. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guides/continue.md +0 -0
  67. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/guides/cursor.md +0 -0
  68. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/decisions-2024.md +0 -0
  69. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/feedback/compliance-analysis.md +0 -0
  70. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/feedback/feedback-memo.md +0 -0
  71. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/feedback/index.md +0 -0
  72. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/index.md +0 -0
  73. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/original-vision.md +0 -0
  74. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/protocol-evolution.md +0 -0
  75. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/history/research/cruxeval-quick-validation.md +0 -0
  76. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/logo.svg +0 -0
  77. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-23-entry-point-detection.md +0 -0
  78. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-25-functional-patterns.md +0 -0
  79. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-29-pure-content-detection.md +0 -0
  80. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-37-coverage-integration.md +0 -0
  81. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-38-contract-quality-rules.md +0 -0
  82. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-39-workflow-efficiency.md +0 -0
  83. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-40-smart-tool-redirect-hook.md +0 -0
  84. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-41-automatic-review-orchestration.md +0 -0
  85. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-42-workflow-auto-routing.md +0 -0
  86. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-43-cross-platform-distribution.md +0 -0
  87. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-46-documentation-audit.md +0 -0
  88. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-48-code-structure-reorganization.md +0 -0
  89. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-49-protocol-distribution-unification.md +0 -0
  90. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-50-workflow-enforcement.md +0 -0
  91. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-51-workflow-phase-visibility.md +0 -0
  92. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-52-venv-dependency-injection.md +0 -0
  93. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-53-review-loop-effectiveness.md +0 -0
  94. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-54-agent-native-context-management.md +0 -0
  95. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-55-claude-init-conflict-resolution.md +0 -0
  96. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-56-template-sync-unification.md +0 -0
  97. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-60-structured-rules-ssot.md +0 -0
  98. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-61-functional-pattern-guidance.md +0 -0
  99. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-61-implementation-design.md +0 -0
  100. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-62-proactive-reference-reading.md +0 -0
  101. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-64-version-display-unification.md +0 -0
  102. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-65-single-file-guard.md +0 -0
  103. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-66-escape-hatch-visibility.md +0 -0
  104. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-67-explicit-skill-invocation.md +0 -0
  105. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-68-agent-behavior-optimization.md +0 -0
  106. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-69-project-uninstall.md +0 -0
  107. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/DX-70-init-simplification.md +0 -0
  108. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/LX-01-multi-language-feasibility.md +0 -0
  109. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/LX-02-agent-portability-analysis.md +0 -0
  110. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2024-12-21-guard-enhancements.md +0 -0
  111. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2024-12-21-language-inspired-enhancements.md +0 -0
  112. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2024-12-21-test-first-enhancement.md +0 -0
  113. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2025-12-21-dx-improvements.md +0 -0
  114. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2025-12-23-dx-20-property-testing-enhancements.md +0 -0
  115. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/2025-12-23-dx-21-package-and-init.md +0 -0
  116. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/AGENT-IMPROVEMENTS.md +0 -0
  117. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-11-documentation-restructure.md +0 -0
  118. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-12-hypothesis-fallback.md +0 -0
  119. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-13-incremental-prove.md +0 -0
  120. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-14-expanded-prove-usage.md +0 -0
  121. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-16-agent-tool-enforcement.md +0 -0
  122. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-17-workflow-enforcement.md +0 -0
  123. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-22-verification-strategy.md +0 -0
  124. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-24-mechanism-documentation.md +0 -0
  125. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-26-guard-simplification.md +0 -0
  126. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-27-system-prompt-protocol.md +0 -0
  127. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-28-semantic-verification.md +0 -0
  128. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-30-visible-workflow.md +0 -0
  129. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-31-adversarial-reviewer.md +0 -0
  130. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-32-workflow-iteration.md +0 -0
  131. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-33-verification-blind-spots.md +0 -0
  132. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-34-review-cycle.md +0 -0
  133. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-35-workflow-phase-separation.md +0 -0
  134. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-36-documentation-restructuring.md +0 -0
  135. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-45-template-consistency.md +0 -0
  136. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-47-command-skill-naming.md +0 -0
  137. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-57-claude-code-hooks.md +0 -0
  138. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-58-document-structure-optimization.md +0 -0
  139. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/DX-63-contracts-first-enforcement.md +0 -0
  140. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/proposals/completed/LX-03-multi-agent-support.md +0 -0
  141. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/agent-information-hierarchy.md +0 -0
  142. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/architecture/index.md +0 -0
  143. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/contracts/advanced.md +0 -0
  144. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/contracts/completeness.md +0 -0
  145. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/contracts/doctests.md +0 -0
  146. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/contracts/index.md +0 -0
  147. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/contracts/pre-post.md +0 -0
  148. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/documentation.md +0 -0
  149. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/index.md +0 -0
  150. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/proposal-workflow.md +0 -0
  151. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/rules/index.md +0 -0
  152. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/rules/severity.md +0 -0
  153. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/verification/crosshair-vs-hypothesis.md +0 -0
  154. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/verification/index.md +0 -0
  155. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/verification/smart-routing.md +0 -0
  156. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/workflow/index.md +0 -0
  157. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/workflow/session-start.md +0 -0
  158. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/reference/workflow/usbv.md +0 -0
  159. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/terminal-gif-guide.md +0 -0
  160. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/test-reports/DX-55-test-report.md +0 -0
  161. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/test-reports/DX-56-test-report.md +0 -0
  162. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/test-reports/DX-58-test-scenario.md +0 -0
  163. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/testing/v1.5.0-stress-test.md +0 -0
  164. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/testing/v1.5.0-test-report.md +0 -0
  165. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/testing/v1.5.0-workflow-compliance.md +0 -0
  166. {invar_tools-1.7.1 → invar_tools-1.8.0}/docs/vision.md +0 -0
  167. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/LICENSE +0 -0
  168. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/README.md +0 -0
  169. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/pyproject.toml +0 -0
  170. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/__init__.py +0 -0
  171. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/contracts.py +0 -0
  172. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/decorators.py +0 -0
  173. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/invariant.py +0 -0
  174. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/relations.py +0 -0
  175. {invar_tools-1.7.1 → invar_tools-1.8.0}/runtime/src/invar_runtime/resource.py +0 -0
  176. {invar_tools-1.7.1 → invar_tools-1.8.0}/scripts/smart-guard.sh +0 -0
  177. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/core/__init__.py +0 -0
  178. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/__init__.py +0 -0
  179. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/__init__.py +0 -0
  180. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/contracts.py +0 -0
  181. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/entry_points.py +0 -0
  182. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/extraction.py +0 -0
  183. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/format_specs.py +0 -0
  184. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/format_strategies.py +0 -0
  185. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/formatter.py +0 -0
  186. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/hypothesis_strategies.py +0 -0
  187. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/inspect.py +0 -0
  188. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/lambda_helpers.py +0 -0
  189. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/models.py +0 -0
  190. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/must_use.py +0 -0
  191. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/parser.py +0 -0
  192. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/__init__.py +0 -0
  193. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/detector.py +0 -0
  194. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/p0_exhaustive.py +0 -0
  195. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/p0_literal.py +0 -0
  196. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/p0_newtype.py +0 -0
  197. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/p0_nonempty.py +0 -0
  198. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/p0_validation.py +0 -0
  199. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/registry.py +0 -0
  200. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/patterns/types.py +0 -0
  201. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/postcondition_scope.py +0 -0
  202. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/property_gen.py +0 -0
  203. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/purity.py +0 -0
  204. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/purity_heuristics.py +0 -0
  205. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/references.py +0 -0
  206. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/review_trigger.py +0 -0
  207. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/rule_meta.py +0 -0
  208. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/rules.py +0 -0
  209. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/shell_analysis.py +0 -0
  210. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/shell_architecture.py +0 -0
  211. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/strategies.py +0 -0
  212. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/suggestions.py +0 -0
  213. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/sync_helpers.py +0 -0
  214. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/tautology.py +0 -0
  215. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/template_parser.py +0 -0
  216. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/timeout_inference.py +0 -0
  217. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/trivial_detection.py +0 -0
  218. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/utils.py +0 -0
  219. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/core/verification_routing.py +0 -0
  220. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/mcp/__init__.py +0 -0
  221. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/mcp/__main__.py +0 -0
  222. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/mcp/server.py +0 -0
  223. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/py.typed +0 -0
  224. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/__init__.py +0 -0
  225. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/claude_hooks.py +0 -0
  226. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/__init__.py +0 -0
  227. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/guard.py +0 -0
  228. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/hooks.py +0 -0
  229. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/merge.py +0 -0
  230. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/mutate.py +0 -0
  231. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/perception.py +0 -0
  232. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/sync_self.py +0 -0
  233. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/template_sync.py +0 -0
  234. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/test.py +0 -0
  235. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/commands/update.py +0 -0
  236. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/config.py +0 -0
  237. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/contract_coverage.py +0 -0
  238. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/coverage.py +0 -0
  239. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/fs.py +0 -0
  240. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/git.py +0 -0
  241. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/guard_helpers.py +0 -0
  242. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/guard_output.py +0 -0
  243. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/mcp_config.py +0 -0
  244. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/mutation.py +0 -0
  245. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/pattern_integration.py +0 -0
  246. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/property_tests.py +0 -0
  247. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/prove/__init__.py +0 -0
  248. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/prove/accept.py +0 -0
  249. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/prove/cache.py +0 -0
  250. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/prove/crosshair.py +0 -0
  251. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/prove/hypothesis.py +0 -0
  252. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/subprocess_env.py +0 -0
  253. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/template_engine.py +0 -0
  254. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/templates.py +0 -0
  255. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/shell/testing.py +0 -0
  256. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/CLAUDE.md.template +0 -0
  257. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/__init__.py +0 -0
  258. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/commands/audit.md +0 -0
  259. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/commands/guard.md +0 -0
  260. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/config/CLAUDE.md.jinja +0 -0
  261. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/config/context.md.jinja +0 -0
  262. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/config/pre-commit.yaml.jinja +0 -0
  263. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/context.md.template +0 -0
  264. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/examples/README.md +0 -0
  265. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/examples/conftest.py +0 -0
  266. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/examples/contracts.py +0 -0
  267. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/examples/core_shell.py +0 -0
  268. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/examples/workflow.md +0 -0
  269. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/hooks/PostToolUse.sh.jinja +0 -0
  270. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/hooks/PreToolUse.sh.jinja +0 -0
  271. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/hooks/Stop.sh.jinja +0 -0
  272. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/hooks/UserPromptSubmit.sh.jinja +0 -0
  273. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/hooks/__init__.py +0 -0
  274. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/proposal.md.template +0 -0
  275. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/invar/templates/protocol/INVAR.md +0 -0
  276. {invar_tools-1.7.1 → invar_tools-1.8.0}/src/shell/__init__.py +0 -0
  277. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/__init__.py +0 -0
  278. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/conftest.py +0 -0
  279. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/integration/__init__.py +0 -0
  280. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/integration/test_cli_flags.py +0 -0
  281. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/integration/test_dx55_regression.py +0 -0
  282. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/integration/test_dx56_sync.py +0 -0
  283. {invar_tools-1.7.1 → invar_tools-1.8.0}/tests/test_subprocess_env.py +0 -0
  284. {invar_tools-1.7.1 → invar_tools-1.8.0}/uv.lock +0 -0
@@ -10,9 +10,49 @@ _invar:
10
10
  # Development Mode
11
11
 
12
12
  > **Purpose:** Implement solution following USBV workflow with verification.
13
+ > **Mindset:** CONTRACTS before code — no exceptions.
14
+
15
+ ## Scope Boundaries
16
+
17
+ **This skill IS for:**
18
+ - Implementing features ("add", "create", "build")
19
+ - Fixing bugs ("fix", "resolve")
20
+ - Modifying existing code ("update", "change")
21
+ - Writing tests and contracts
22
+
23
+ **This skill is NOT for:**
24
+ - Exploring unclear requirements → switch to `/investigate`
25
+ - Choosing between approaches → switch to `/propose`
26
+ - Reviewing completed work → switch to `/review`
27
+
28
+ **Drift detection:** If requirements are unclear → STOP, exit to `/investigate` first.
13
29
 
14
30
  ## Entry Actions (REQUIRED)
15
31
 
32
+ ### Session Restore (if continuing from summary)
33
+
34
+ When conversation begins with a previous session summary:
35
+
36
+ 1. **ALWAYS display Check-In first** — even when continuing
37
+ 2. **Determine current phase** from todo items:
38
+ | Todo keywords | Phase |
39
+ |---------------|-------|
40
+ | "research", "understand", "analyze" | UNDERSTAND |
41
+ | "contract", "design", "specify" | SPECIFY |
42
+ | "implement", "code", "build" | BUILD |
43
+ | "verify", "test", "guard" | VALIDATE |
44
+ 3. **Display phase header** before resuming work
45
+ 4. **Re-read context.md** for project state
46
+
47
+ ```
48
+ # Example session restore:
49
+ ✓ Check-In: Invar | Main | dirty
50
+
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ 📍 /develop → BUILD (3/4) [resumed]
53
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
+ ```
55
+
16
56
  ### Context Refresh (DX-54)
17
57
 
18
58
  Before any workflow action:
@@ -106,6 +146,25 @@ If any NO → Stop. Write contract first.
106
146
 
107
147
  ### 3. BUILD
108
148
 
149
+ #### New Function Gate (MANDATORY)
150
+
151
+ **Before writing ANY new Core function, STOP and verify:**
152
+
153
+ | Check | If NO → Action |
154
+ |-------|----------------|
155
+ | Contract shown in SPECIFY phase? | ⛔ STOP. Return to SPECIFY. |
156
+ | Doctest written? | ⛔ STOP. Write doctest first. |
157
+
158
+ ```
159
+ ⛔ GATE VIOLATION: Writing new function without prior contract.
160
+ → Return to SPECIFY phase. Show contract first.
161
+ ```
162
+
163
+ **Exempt from gate:**
164
+ - Shell functions (no @pre/@post required)
165
+ - Editing existing functions (contract already exists)
166
+ - Non-Python files
167
+
109
168
  **For complex tasks:** Enter Plan Mode first, get user approval.
110
169
 
111
170
  **Implementation rules:**
@@ -11,6 +11,21 @@ _invar:
11
11
 
12
12
  > **Purpose:** Understand before acting. Gather information, analyze code, report findings.
13
13
 
14
+ ## Scope Boundaries
15
+
16
+ **This skill IS for:**
17
+ - Understanding vague or unclear tasks
18
+ - Analyzing existing code and architecture
19
+ - Researching before implementation
20
+ - Answering "why", "what", "how does" questions
21
+
22
+ **This skill is NOT for:**
23
+ - Writing or modifying code → switch to `/develop`
24
+ - Making design decisions → switch to `/propose`
25
+ - Reviewing code quality → switch to `/review`
26
+
27
+ **Drift detection:** If you find yourself wanting to edit files → STOP, exit to `/develop`.
28
+
14
29
  ## Constraints
15
30
 
16
31
  **FORBIDDEN in this phase:**
@@ -10,6 +10,35 @@ _invar:
10
10
  # Proposal Mode
11
11
 
12
12
  > **Purpose:** Facilitate human decision-making with clear options and trade-offs.
13
+ > **Mindset:** OPTIONS, not decisions — human chooses.
14
+
15
+ ## Scope Boundaries
16
+
17
+ **This skill IS for:**
18
+ - Presenting design choices with trade-offs
19
+ - Facilitating architectural decisions
20
+ - Comparing approaches (A vs B)
21
+ - Creating formal proposals for complex decisions
22
+
23
+ **This skill is NOT for:**
24
+ - Implementing the chosen option → switch to `/develop`
25
+ - Researching to understand the problem → switch to `/investigate`
26
+ - Reviewing existing code → switch to `/review`
27
+
28
+ **Drift detection:** If you find yourself writing implementation code → STOP, wait for user choice, then exit to `/develop`.
29
+
30
+ ## Constraints
31
+
32
+ **FORBIDDEN in this phase:**
33
+ - Writing implementation code (beyond examples)
34
+ - Making decisions for the user
35
+ - Creating files other than proposals
36
+ - Committing changes
37
+
38
+ **ALLOWED:**
39
+ - Read, Glob, Grep (research for options)
40
+ - invar_sig, invar_map (understand current state)
41
+ - Creating proposal documents in `docs/proposals/`
13
42
 
14
43
  ## Entry Actions
15
44
 
@@ -14,6 +14,21 @@ _invar:
14
14
  > **Success Metric:** Issues FOUND, not code approved. Zero issues = you failed to look hard enough.
15
15
  > **Workflow:** AUTOMATIC Reviewer↔Fixer loop until quality_met or max_rounds (no human confirmation).
16
16
 
17
+ ## Scope Boundaries
18
+
19
+ **This skill IS for:**
20
+ - Finding bugs and logic errors in existing code
21
+ - Verifying contract semantic value
22
+ - Auditing escape hatches
23
+ - Security review
24
+
25
+ **This skill is NOT for:**
26
+ - Implementing new features → switch to `/develop`
27
+ - Understanding how code works → switch to `/investigate`
28
+ - Deciding on architecture → switch to `/propose`
29
+
30
+ **Drift detection:** If you're writing significant new code (not fixes) → STOP, you're in wrong skill.
31
+
17
32
  ## Auto-Loop Configuration
18
33
 
19
34
  ```
@@ -264,6 +264,24 @@ pip install -e runtime/ # Runtime in dev mode
264
264
  Add your team conventions and project-specific rules below.
265
265
  This section is preserved across `invar update` and `invar dev sync`.
266
266
  ======================================================================== -->
267
+
268
+ ## Code Style
269
+
270
+ Run `ruff check --fix` frequently after changing code to fix lint issues before commit.
271
+
272
+ ## Session Restore
273
+
274
+ When continuing from a previous session summary:
275
+
276
+ 1. **ALWAYS display Check-In first**
277
+ 2. **Infer current phase** from todo keywords:
278
+ - "research/understand" → UNDERSTAND
279
+ - "contract/design" → SPECIFY
280
+ - "implement/code" → BUILD
281
+ - "verify/test" → VALIDATE
282
+ 3. **Display phase header** before resuming work
283
+ 4. **Re-read context.md** for project state
284
+
267
285
  <!--/invar:user-->
268
286
 
269
287
  ---
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invar-tools
3
- Version: 1.7.1
3
+ Version: 1.8.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
@@ -138,8 +138,9 @@ cd your-project
138
138
  # Interactive mode - choose what to install
139
139
  uvx invar-tools init
140
140
 
141
- # Or quick setup for Claude Code (skip prompts)
142
- uvx invar-tools init --claude
141
+ # Or quick setup (skip prompts)
142
+ uvx invar-tools init --claude # Claude Code
143
+ uvx invar-tools init --pi # Pi Coding Agent
143
144
 
144
145
  # Add runtime contracts to your project
145
146
  pip install invar-runtime
@@ -369,10 +370,13 @@ AlphaCodium · Parsel · Reflexion · Clover
369
370
 
370
371
  | Agent | Status | Setup |
371
372
  |-------|--------|-------|
372
- | **Claude Code** | ✅ Full | `invar init` → select Claude Code |
373
- | **Pi / Cursor** | 🚧 In progress | `invar init` → select Other, include `AGENT.md` in prompt |
373
+ | **Claude Code** | ✅ Full | `invar init --claude` |
374
+ | **Pi** | Full | `invar init --pi` |
375
+ | **Cursor** | ✅ MCP | `invar init` → select Other, add MCP config |
374
376
  | **Other** | 📝 Manual | `invar init` → select Other, include `AGENT.md` in prompt |
375
377
 
378
+ > **See also:** [Multi-Agent Guide](./docs/guides/multi-agent.md) for detailed integration instructions.
379
+
376
380
  ### Claude Code (Full Experience)
377
381
 
378
382
  All features auto-configured:
@@ -381,13 +385,24 @@ All features auto-configured:
381
385
  - Claude Code hooks (tool guidance, verification reminders)
382
386
  - Pre-commit hooks
383
387
 
384
- ### Pi / Cursor (In Progress)
388
+ ### Pi (Full Support)
389
+
390
+ Pi reads CLAUDE.md and .claude/skills/ directly, sharing configuration with Claude Code:
391
+ - **Same instruction file** — CLAUDE.md (no separate AGENT.md needed)
392
+ - **Same workflow skills** — .claude/skills/ work in Pi
393
+ - **Pi-specific hooks** — .pi/hooks/invar.ts for pytest blocking and protocol refresh
394
+ - **Protocol injection** — Long conversation support via `pi.send()`
395
+ - Pre-commit hooks
396
+
397
+ ### Cursor (MCP + Rules)
385
398
 
386
- Currently available:
387
- - Protocol document (INVAR.md)
388
- - CLI verification (`invar guard`)
399
+ Cursor users get full verification via MCP:
400
+ - MCP tools (`invar_guard`, `invar_sig`, `invar_map`)
401
+ - .cursor/rules/ for USBV workflow guidance
402
+ - Hooks (beta) for pytest blocking
389
403
  - Pre-commit hooks
390
- - MCP server (manual configuration)
404
+
405
+ > See [Cursor Guide](./docs/guides/cursor.md) for detailed setup.
391
406
 
392
407
  ### Other Editors (Manual)
393
408
 
@@ -96,8 +96,9 @@ cd your-project
96
96
  # Interactive mode - choose what to install
97
97
  uvx invar-tools init
98
98
 
99
- # Or quick setup for Claude Code (skip prompts)
100
- uvx invar-tools init --claude
99
+ # Or quick setup (skip prompts)
100
+ uvx invar-tools init --claude # Claude Code
101
+ uvx invar-tools init --pi # Pi Coding Agent
101
102
 
102
103
  # Add runtime contracts to your project
103
104
  pip install invar-runtime
@@ -327,10 +328,13 @@ AlphaCodium · Parsel · Reflexion · Clover
327
328
 
328
329
  | Agent | Status | Setup |
329
330
  |-------|--------|-------|
330
- | **Claude Code** | ✅ Full | `invar init` → select Claude Code |
331
- | **Pi / Cursor** | 🚧 In progress | `invar init` → select Other, include `AGENT.md` in prompt |
331
+ | **Claude Code** | ✅ Full | `invar init --claude` |
332
+ | **Pi** | Full | `invar init --pi` |
333
+ | **Cursor** | ✅ MCP | `invar init` → select Other, add MCP config |
332
334
  | **Other** | 📝 Manual | `invar init` → select Other, include `AGENT.md` in prompt |
333
335
 
336
+ > **See also:** [Multi-Agent Guide](./docs/guides/multi-agent.md) for detailed integration instructions.
337
+
334
338
  ### Claude Code (Full Experience)
335
339
 
336
340
  All features auto-configured:
@@ -339,13 +343,24 @@ All features auto-configured:
339
343
  - Claude Code hooks (tool guidance, verification reminders)
340
344
  - Pre-commit hooks
341
345
 
342
- ### Pi / Cursor (In Progress)
346
+ ### Pi (Full Support)
347
+
348
+ Pi reads CLAUDE.md and .claude/skills/ directly, sharing configuration with Claude Code:
349
+ - **Same instruction file** — CLAUDE.md (no separate AGENT.md needed)
350
+ - **Same workflow skills** — .claude/skills/ work in Pi
351
+ - **Pi-specific hooks** — .pi/hooks/invar.ts for pytest blocking and protocol refresh
352
+ - **Protocol injection** — Long conversation support via `pi.send()`
353
+ - Pre-commit hooks
354
+
355
+ ### Cursor (MCP + Rules)
343
356
 
344
- Currently available:
345
- - Protocol document (INVAR.md)
346
- - CLI verification (`invar guard`)
357
+ Cursor users get full verification via MCP:
358
+ - MCP tools (`invar_guard`, `invar_sig`, `invar_map`)
359
+ - .cursor/rules/ for USBV workflow guidance
360
+ - Hooks (beta) for pytest blocking
347
361
  - Pre-commit hooks
348
- - MCP server (manual configuration)
362
+
363
+ > See [Cursor Guide](./docs/guides/cursor.md) for detailed setup.
349
364
 
350
365
  ### Other Editors (Manual)
351
366
 
@@ -6,8 +6,9 @@ Invar's core value—USBV workflow, contract-driven development, and automated v
6
6
 
7
7
  | Agent | Status | Setup |
8
8
  |-------|--------|-------|
9
- | **Claude Code** | ✅ Full | `invar init` → select Claude Code |
10
- | **Pi / Cursor** | 🚧 In progress | `invar init` → select Other, include `AGENT.md` in prompt |
9
+ | **Claude Code** | ✅ Full | `invar init --claude` |
10
+ | **Pi** | Full | `invar init --pi` |
11
+ | **Cursor** | ✅ MCP | `invar init` → select Other, add MCP |
11
12
  | **Other** | 📝 Manual | `invar init` → select Other, include `AGENT.md` in prompt |
12
13
 
13
14
  ## Quick Comparison
@@ -15,6 +16,7 @@ Invar's core value—USBV workflow, contract-driven development, and automated v
15
16
  | Agent | Instruction File | MCP Support | Hooks | Effort |
16
17
  |-------|------------------|-------------|-------|--------|
17
18
  | [Claude Code](../agents.md) | CLAUDE.md | ✅ Full | ✅ 4 types | Native |
19
+ | [Pi](#pi) | CLAUDE.md (shared) | ❌ | ✅ TypeScript | Native |
18
20
  | [Cline](#cline) | .clinerules | ✅ Full | ❌ | Manual |
19
21
  | [Cursor](#cursor) | .cursorrules | ✅ Full | ✅ Beta | Manual |
20
22
  | [Aider](#aider) | CONVENTIONS.md | ⚠️ CLI | ❌ | Manual |
@@ -34,12 +36,37 @@ Invar's core value—USBV workflow, contract-driven development, and automated v
34
36
 
35
37
  | Feature | Alternative |
36
38
  |---------|-------------|
37
- | Skills (auto-routing) | Manual workflow triggers |
38
- | Hooks (pytest blocking) | Cursor Beta / Manual discipline |
39
+ | Skills (auto-routing) | Pi: skills work / Others: Manual triggers |
40
+ | Hooks (pytest blocking) | Pi: TypeScript hooks / Cursor: Beta / Others: Manual |
39
41
  | Commands (/audit, /guard) | Direct tool calls |
40
42
 
41
43
  ---
42
44
 
45
+ ## Pi
46
+
47
+ **Terminal-based coding agent with CLAUDE.md support**
48
+
49
+ → [Full Guide: Pi Integration](./pi.md)
50
+
51
+ ```bash
52
+ # Setup
53
+ invar init # Select "Pi Coding Agent"
54
+ ```
55
+
56
+ **Key discovery:** Pi reads CLAUDE.md and .claude/skills/ directly — no separate configuration needed!
57
+
58
+ **Features:**
59
+ - **Same instruction file** — CLAUDE.md (shared with Claude Code)
60
+ - **Same workflow skills** — .claude/skills/ work natively
61
+ - **TypeScript hooks** — .pi/hooks/invar.ts for pytest blocking
62
+ - **Protocol injection** — `pi.send()` for long conversation support
63
+ - Pre-commit hooks
64
+
65
+ **What's installed:**
66
+ - `.pi/hooks/invar.ts` — pytest/crosshair blocking + protocol refresh
67
+
68
+ ---
69
+
43
70
  ## Cline
44
71
 
45
72
  **VS Code extension with Plan & Act modes**
@@ -151,14 +178,15 @@ Or if installed in a virtual environment:
151
178
 
152
179
  ## Feature Parity Matrix
153
180
 
154
- | Feature | Claude | Cursor | Cline | Continue | Aider |
155
- |---------|--------|--------|-------|----------|-------|
156
- | USBV Workflow | ✅ | ✅ | ✅ | ✅ | ✅ |
157
- | Guard via MCP | ✅ | ✅ | ✅ | ✅ | ❌ CLI |
158
- | Guard via CLI | ✅ | ✅ | ✅ | ✅ | ✅ |
159
- | pytest Blocking | ✅ Hook | ⚠️ Beta | ❌ | ❌ | ✅ Built-in |
160
- | Auto-routing | ✅ Skills | ❌ | ⚠️ Modes | ⚠️ Commands | ❌ |
161
- | Plan Mode | | ❌ | | ❌ | ❌ |
181
+ | Feature | Claude | Pi | Cursor | Cline | Continue | Aider |
182
+ |---------|--------|-----|--------|-------|----------|-------|
183
+ | USBV Workflow | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
184
+ | Guard via MCP | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ CLI |
185
+ | Guard via CLI | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
186
+ | pytest Blocking | ✅ Hook | ✅ Hook | ⚠️ Beta | ❌ | ❌ | ✅ Built-in |
187
+ | Auto-routing | ✅ Skills | ✅ Skills | ❌ | ⚠️ Modes | ⚠️ Commands | ❌ |
188
+ | Protocol Refresh | Hook | ✅ Hook | ❌ | | ❌ | ❌ |
189
+ | Plan Mode | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ |
162
190
 
163
191
  ---
164
192
 
@@ -167,15 +195,23 @@ Or if installed in a virtual environment:
167
195
  | If you want... | Choose |
168
196
  |----------------|--------|
169
197
  | Full Invar experience | Claude Code |
198
+ | Terminal + skill sharing | Pi |
170
199
  | IDE integration + hooks | Cursor |
171
200
  | Open source + Plan Mode | Cline |
172
- | Terminal workflow | Aider |
201
+ | Terminal + git-aware | Aider |
173
202
  | Model flexibility | Continue |
174
203
 
175
204
  ---
176
205
 
177
206
  ## Migration Path
178
207
 
208
+ ### From Claude Code to Pi
209
+
210
+ No migration needed! Pi reads the same files:
211
+ - CLAUDE.md → works in Pi
212
+ - .claude/skills/ → works in Pi
213
+ - Just run `invar init` → select Pi to add hooks
214
+
179
215
  ### From Claude Code to Others
180
216
 
181
217
  1. Run `invar init` → select "Other (AGENT.md)"
@@ -223,6 +259,7 @@ Each agent has specific file locations:
223
259
 
224
260
  ## Next Steps
225
261
 
262
+ - [Pi Integration Guide](./pi.md) — Native support, shares CLAUDE.md
226
263
  - [Cline Integration Guide](./cline.md)
227
264
  - [Cursor Integration Guide](./cursor.md)
228
265
  - [Aider Integration Guide](./aider.md)
@@ -0,0 +1,275 @@
1
+ # Invar + Pi Integration Guide
2
+
3
+ [Pi](https://github.com/badlogic/pi-mono) is a terminal-based coding agent that reads CLAUDE.md and .claude/skills/ directly, making it the closest alternative to Claude Code for Invar users.
4
+
5
+ ## Key Discovery
6
+
7
+ **Pi shares configuration with Claude Code!**
8
+
9
+ | File | Claude Code | Pi | Sharing |
10
+ |------|-------------|-----|---------|
11
+ | CLAUDE.md | ✅ Native | ✅ Reads directly | Same file |
12
+ | .claude/skills/ | ✅ Native | ✅ Reads directly | Same files |
13
+ | .claude/hooks/ | ✅ Bash | ❌ | Separate |
14
+ | .pi/hooks/ | ❌ | ✅ TypeScript | Separate |
15
+
16
+ This means you can use **both agents on the same project** without duplicating configuration.
17
+
18
+ ## Quick Start
19
+
20
+ ### 1. Install Invar
21
+
22
+ ```bash
23
+ # Install runtime contracts (add to your project)
24
+ pip install invar-runtime
25
+
26
+ # Development tools (use with uvx)
27
+ uvx invar-tools guard
28
+ ```
29
+
30
+ ### 2. Initialize Project
31
+
32
+ ```bash
33
+ cd your-project
34
+
35
+ # Interactive mode
36
+ uvx invar-tools init
37
+ # → Select "Pi Coding Agent"
38
+
39
+ # This installs:
40
+ # - CLAUDE.md (shared with Claude Code)
41
+ # - .claude/skills/ (shared with Claude Code)
42
+ # - .pi/hooks/invar.ts (Pi-specific hooks)
43
+ # - INVAR.md, .invar/, pre-commit hooks
44
+ ```
45
+
46
+ ### 3. Start Pi Session
47
+
48
+ ```bash
49
+ pi
50
+ # Pi will automatically read CLAUDE.md and follow USBV workflow
51
+ ```
52
+
53
+ ---
54
+
55
+ ## What Gets Installed
56
+
57
+ | File/Directory | Purpose | Shared with Claude? |
58
+ |----------------|---------|---------------------|
59
+ | `CLAUDE.md` | Agent instructions | ✅ Yes |
60
+ | `.claude/skills/` | Workflow automation | ✅ Yes |
61
+ | `.pi/hooks/invar.ts` | pytest blocking + protocol refresh | ❌ Pi only |
62
+ | `INVAR.md` | Protocol document | ✅ Yes |
63
+ | `.invar/` | Config, context, examples | ✅ Yes |
64
+ | `.pre-commit-config.yaml` | Pre-commit hooks | ✅ Yes |
65
+
66
+ ---
67
+
68
+ ## Pi Hooks
69
+
70
+ Pi supports TypeScript hooks in `.pi/hooks/`. Invar installs one hook file:
71
+
72
+ ### invar.ts
73
+
74
+ ```typescript
75
+ // .pi/hooks/invar.ts
76
+ // - Blocks pytest/crosshair → redirects to invar guard
77
+ // - Protocol refresh at message 15, 25, 35, ...
78
+ ```
79
+
80
+ **Features:**
81
+
82
+ 1. **pytest/crosshair Blocking**
83
+ - Intercepts `pytest` and `crosshair` commands
84
+ - Returns block message: "Use invar guard instead"
85
+ - Allows debug flags (--pdb, --cov)
86
+
87
+ 2. **Protocol Refresh (Long Conversations)**
88
+ - Message 15: Lightweight checkpoint reminder
89
+ - Message 25+: Full protocol injection every 10 messages
90
+ - Uses `pi.send()` to inject reminders
91
+
92
+ ---
93
+
94
+ ## Verification
95
+
96
+ Pi doesn't support MCP, so use CLI commands:
97
+
98
+ ```bash
99
+ # Full verification
100
+ invar guard
101
+
102
+ # Only changed files
103
+ invar guard --changed
104
+
105
+ # Show signatures
106
+ invar sig src/core/module.py
107
+
108
+ # Symbol map
109
+ invar map --top 10
110
+ ```
111
+
112
+ ---
113
+
114
+ ## USBV Workflow in Pi
115
+
116
+ Pi reads `.claude/skills/` and follows the same USBV workflow as Claude Code:
117
+
118
+ ### 1. UNDERSTAND
119
+ - Read context.md and relevant code
120
+ - Use `invar sig` to see existing contracts
121
+
122
+ ### 2. SPECIFY
123
+ - Write @pre/@post contracts first
124
+ - Add doctests for expected behavior
125
+
126
+ ### 3. BUILD
127
+ - Follow the contracts from SPECIFY
128
+ - Run `invar guard --changed` frequently
129
+
130
+ ### 4. VALIDATE
131
+ - Run `invar guard` (full verification)
132
+ - Ensure all requirements met
133
+
134
+ ---
135
+
136
+ ## Feature Comparison
137
+
138
+ | Feature | Claude Code | Pi |
139
+ |---------|-------------|-----|
140
+ | CLAUDE.md | ✅ | ✅ |
141
+ | Skills | ✅ | ✅ |
142
+ | MCP Tools | ✅ | ❌ CLI only |
143
+ | Hooks | ✅ Bash | ✅ TypeScript |
144
+ | pytest Blocking | ✅ | ✅ |
145
+ | Protocol Refresh | ✅ | ✅ |
146
+ | Pre-commit | ✅ | ✅ |
147
+
148
+ **Key differences:**
149
+ - Pi uses CLI (`invar guard`) instead of MCP (`invar_guard`)
150
+ - Pi hooks are TypeScript, Claude Code hooks are Bash
151
+
152
+ ---
153
+
154
+ ## Troubleshooting
155
+
156
+ ### Hooks Not Working
157
+
158
+ 1. Check Pi version (requires 0.30.2+):
159
+ ```bash
160
+ pi --version
161
+ ```
162
+
163
+ 2. Verify hook file exists:
164
+ ```bash
165
+ ls -la .pi/hooks/invar.ts
166
+ ```
167
+
168
+ 3. Check hook syntax:
169
+ ```bash
170
+ # Pi should report hook loading errors on startup
171
+ pi
172
+ ```
173
+
174
+ ### Skills Not Recognized
175
+
176
+ 1. Verify skills directory:
177
+ ```bash
178
+ ls -la .claude/skills/
179
+ ```
180
+
181
+ 2. Check SKILL.md format:
182
+ ```bash
183
+ cat .claude/skills/develop/SKILL.md | head -20
184
+ ```
185
+
186
+ ### Guard Command Not Found
187
+
188
+ ```bash
189
+ # Install invar-tools
190
+ pip install invar-tools
191
+
192
+ # Or use uvx (no install needed)
193
+ uvx invar-tools guard
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Migration
199
+
200
+ ### From Claude Code to Pi
201
+
202
+ No migration needed! Just run:
203
+ ```bash
204
+ invar init # Select Pi to add hooks
205
+ ```
206
+
207
+ Pi will read your existing CLAUDE.md and .claude/skills/.
208
+
209
+ ### From Pi to Claude Code
210
+
211
+ ```bash
212
+ invar init # Select Claude Code
213
+ ```
214
+
215
+ This adds Claude-specific hooks while keeping shared files.
216
+
217
+ ### Using Both Agents
218
+
219
+ You can use both Claude Code and Pi on the same project:
220
+
221
+ ```
222
+ your-project/
223
+ ├── CLAUDE.md # Shared
224
+ ├── .claude/
225
+ │ ├── skills/ # Shared (both read)
226
+ │ └── hooks/ # Claude Code only
227
+ └── .pi/
228
+ └── hooks/ # Pi only
229
+ ```
230
+
231
+ ---
232
+
233
+ ## Example Session
234
+
235
+ ```
236
+ $ pi
237
+
238
+ Pi: I'll read the project context.
239
+
240
+ ✓ Check-In: my-project | main | clean
241
+
242
+ You: Add a function to calculate compound interest
243
+
244
+ Pi: I'll follow the USBV workflow.
245
+
246
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
247
+ 📍 /develop → SPECIFY (2/4)
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+
250
+ First, I'll define the contract:
251
+
252
+ @pre(lambda principal, rate, years: principal > 0 and rate >= 0 and years > 0)
253
+ @post(lambda result: result >= principal)
254
+ def compound_interest(principal: float, rate: float, years: int) -> float:
255
+ """
256
+ >>> compound_interest(1000, 0.05, 1)
257
+ 1050.0
258
+ """
259
+ ...
260
+
261
+ [implements function]
262
+
263
+ $ invar guard --changed
264
+ Guard passed. (1 file, 0 errors)
265
+
266
+ ✓ Final: guard PASS | 0 errors, 0 warnings
267
+ ```
268
+
269
+ ---
270
+
271
+ ## Next Steps
272
+
273
+ - [Multi-Agent Overview](./multi-agent.md)
274
+ - [Cursor Integration](./cursor.md)
275
+ - [Aider Integration](./aider.md)