invar-tools 1.2.0__tar.gz → 1.3.1__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 (254) hide show
  1. invar_tools-1.2.0/src/invar/templates/commands/review.md → invar_tools-1.3.1/.claude/commands/audit.md +20 -82
  2. invar_tools-1.3.1/.claude/commands/guard.md +77 -0
  3. invar_tools-1.3.1/.claude/skills/develop/SKILL.md +288 -0
  4. invar_tools-1.3.1/.claude/skills/investigate/SKILL.md +90 -0
  5. invar_tools-1.3.1/.claude/skills/propose/SKILL.md +101 -0
  6. invar_tools-1.3.1/.claude/skills/review/SKILL.md +173 -0
  7. invar_tools-1.3.1/.invar/archive/sessions-2025-12.md +147 -0
  8. invar_tools-1.3.1/.invar/context.md +150 -0
  9. invar_tools-1.3.1/.invar/examples/conftest.py +3 -0
  10. {invar_tools-1.2.0 → invar_tools-1.3.1}/.invar/examples/contracts.py +5 -5
  11. {invar_tools-1.2.0 → invar_tools-1.3.1}/.invar/examples/core_shell.py +11 -7
  12. {invar_tools-1.2.0 → invar_tools-1.3.1}/.invar/examples/workflow.md +10 -0
  13. invar_tools-1.3.1/.invar/project-additions.md +45 -0
  14. invar_tools-1.3.1/CLAUDE.md +249 -0
  15. {invar_tools-1.2.0/src/invar/templates → invar_tools-1.3.1}/INVAR.md +114 -12
  16. {invar_tools-1.2.0 → invar_tools-1.3.1}/PKG-INFO +108 -118
  17. {invar_tools-1.2.0 → invar_tools-1.3.1}/README.md +105 -117
  18. invar_tools-1.2.0/docs/AGENTS.md → invar_tools-1.3.1/docs/agents.md +18 -8
  19. invar_tools-1.2.0/docs/DESIGN.md → invar_tools-1.3.1/docs/design.md +5 -5
  20. invar_tools-1.2.0/docs/INVAR-GUIDE.md → invar_tools-1.3.1/docs/guide.md +1 -1
  21. invar_tools-1.2.0/docs/feedback/INVAR-COMPLIANCE-ANALYSIS.md → invar_tools-1.3.1/docs/history/feedback/compliance-analysis.md +2 -0
  22. invar_tools-1.2.0/docs/feedback/INVAR_FEEDBACK_MEMO.md → invar_tools-1.3.1/docs/history/feedback/feedback-memo.md +2 -0
  23. invar_tools-1.3.1/docs/history/feedback/index.md +11 -0
  24. invar_tools-1.3.1/docs/history/index.md +22 -0
  25. {invar_tools-1.2.0 → invar_tools-1.3.1}/docs/index.html +32 -14
  26. {invar_tools-1.2.0 → invar_tools-1.3.1}/docs/proposals/DX-23-entry-point-detection.md +2 -2
  27. invar_tools-1.3.1/docs/proposals/DX-37-coverage-integration.md +322 -0
  28. invar_tools-1.3.1/docs/proposals/DX-38-contract-quality-rules.md +285 -0
  29. invar_tools-1.3.1/docs/proposals/DX-39-workflow-efficiency.md +294 -0
  30. invar_tools-1.3.1/docs/proposals/DX-40-smart-tool-redirect-hook.md +147 -0
  31. invar_tools-1.3.1/docs/proposals/DX-41-automatic-review-orchestration.md +212 -0
  32. invar_tools-1.3.1/docs/proposals/DX-42-workflow-auto-routing.md +325 -0
  33. invar_tools-1.3.1/docs/proposals/DX-43-cross-platform-distribution.md +68 -0
  34. invar_tools-1.3.1/docs/proposals/DX-46-documentation-audit.md +142 -0
  35. invar_tools-1.3.1/docs/proposals/DX-48-code-structure-reorganization.md +498 -0
  36. invar_tools-1.3.1/docs/proposals/DX-49-protocol-distribution-unification.md +741 -0
  37. invar_tools-1.3.1/docs/proposals/DX-50-workflow-enforcement.md +119 -0
  38. invar_tools-1.3.1/docs/proposals/DX-51-workflow-phase-visibility.md +250 -0
  39. invar_tools-1.3.1/docs/proposals/DX-52-venv-dependency-injection.md +836 -0
  40. invar_tools-1.3.1/docs/proposals/DX-53-review-loop-effectiveness.md +420 -0
  41. invar_tools-1.3.1/docs/proposals/DX-54-agent-native-context-management.md +214 -0
  42. invar_tools-1.3.1/docs/proposals/DX-55-claude-init-conflict-resolution.md +792 -0
  43. invar_tools-1.3.1/docs/proposals/DX-56-template-sync-unification.md +542 -0
  44. invar_tools-1.3.1/docs/proposals/DX-57-claude-code-hooks.md +802 -0
  45. invar_tools-1.3.1/docs/proposals/DX-58-document-structure-optimization.md +453 -0
  46. invar_tools-1.3.1/docs/proposals/DX-60-structured-rules-ssot.md +416 -0
  47. invar_tools-1.3.1/docs/proposals/LX-01-multi-language-feasibility.md +494 -0
  48. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-11-documentation-restructure.md +14 -1
  49. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-16-agent-tool-enforcement.md +16 -1
  50. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-24-mechanism-documentation.md +13 -1
  51. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-27-system-prompt-protocol.md +9 -1
  52. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-28-semantic-verification.md +13 -2
  53. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-31-adversarial-reviewer.md +20 -1
  54. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-32-workflow-iteration.md +17 -1
  55. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-33-verification-blind-spots.md +33 -1
  56. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-34-review-cycle.md +14 -2
  57. invar_tools-1.3.1/docs/proposals/completed/DX-35-workflow-phase-separation.md +1276 -0
  58. invar_tools-1.3.1/docs/proposals/completed/DX-36-documentation-restructuring.md +855 -0
  59. invar_tools-1.3.1/docs/proposals/completed/DX-45-template-consistency.md +282 -0
  60. invar_tools-1.3.1/docs/proposals/completed/DX-47-command-skill-naming.md +210 -0
  61. invar_tools-1.3.1/docs/proposals/index.md +289 -0
  62. invar_tools-1.3.1/docs/reference/contracts/advanced.md +100 -0
  63. invar_tools-1.2.0/docs/mechanisms/contracts/contract-complete.md → invar_tools-1.3.1/docs/reference/contracts/completeness.md +8 -10
  64. invar_tools-1.2.0/docs/mechanisms/contracts/README.md → invar_tools-1.3.1/docs/reference/contracts/index.md +2 -1
  65. {invar_tools-1.2.0/docs/mechanisms → invar_tools-1.3.1/docs/reference}/documentation.md +9 -9
  66. invar_tools-1.2.0/docs/mechanisms/README.md → invar_tools-1.3.1/docs/reference/index.md +1 -0
  67. invar_tools-1.3.1/docs/reference/proposal-workflow.md +229 -0
  68. invar_tools-1.3.1/docs/reference/verification/crosshair-vs-hypothesis.md +147 -0
  69. invar_tools-1.2.0/docs/mechanisms/verification/README.md → invar_tools-1.3.1/docs/reference/verification/index.md +57 -1
  70. invar_tools-1.2.0/docs/mechanisms/workflow/README.md → invar_tools-1.3.1/docs/reference/workflow/index.md +2 -2
  71. invar_tools-1.3.1/docs/reference/workflow/session-start.md +228 -0
  72. invar_tools-1.3.1/docs/test-reports/DX-55-test-report.md +172 -0
  73. invar_tools-1.3.1/docs/test-reports/DX-56-test-report.md +209 -0
  74. invar_tools-1.3.1/docs/test-reports/DX-58-test-scenario.md +165 -0
  75. {invar_tools-1.2.0 → invar_tools-1.3.1}/pyproject.toml +6 -3
  76. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/pyproject.toml +1 -1
  77. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/contracts.py +5 -4
  78. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/__init__.py +1 -0
  79. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/contracts.py +10 -10
  80. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/entry_points.py +105 -32
  81. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/extraction.py +5 -6
  82. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/format_specs.py +1 -2
  83. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/formatter.py +6 -7
  84. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/hypothesis_strategies.py +5 -7
  85. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/inspect.py +1 -1
  86. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/lambda_helpers.py +3 -3
  87. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/models.py +7 -1
  88. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/must_use.py +2 -1
  89. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/parser.py +7 -4
  90. invar_tools-1.3.1/src/invar/core/postcondition_scope.py +128 -0
  91. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/property_gen.py +8 -5
  92. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/purity.py +3 -3
  93. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/purity_heuristics.py +5 -9
  94. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/references.py +8 -6
  95. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/review_trigger.py +78 -6
  96. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/rule_meta.py +8 -0
  97. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/rules.py +18 -19
  98. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/shell_analysis.py +5 -10
  99. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/shell_architecture.py +2 -2
  100. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/strategies.py +7 -14
  101. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/suggestions.py +86 -0
  102. invar_tools-1.3.1/src/invar/core/sync_helpers.py +238 -0
  103. invar_tools-1.3.1/src/invar/core/tautology.py +203 -0
  104. invar_tools-1.3.1/src/invar/core/template_parser.py +467 -0
  105. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/timeout_inference.py +4 -7
  106. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/utils.py +13 -15
  107. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/verification_routing.py +4 -7
  108. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/mcp/server.py +100 -17
  109. invar_tools-1.3.1/src/invar/shell/claude_hooks.py +387 -0
  110. invar_tools-1.3.1/src/invar/shell/commands/__init__.py +11 -0
  111. invar_tools-1.2.0/src/invar/shell/cli.py → invar_tools-1.3.1/src/invar/shell/commands/guard.py +96 -14
  112. invar_tools-1.3.1/src/invar/shell/commands/hooks.py +74 -0
  113. invar_tools-1.2.0/src/invar/shell/init_cmd.py → invar_tools-1.3.1/src/invar/shell/commands/init.py +209 -27
  114. invar_tools-1.3.1/src/invar/shell/commands/merge.py +256 -0
  115. invar_tools-1.3.1/src/invar/shell/commands/sync_self.py +113 -0
  116. invar_tools-1.3.1/src/invar/shell/commands/template_sync.py +397 -0
  117. invar_tools-1.2.0/src/invar/shell/test_cmd.py → invar_tools-1.3.1/src/invar/shell/commands/test.py +1 -1
  118. invar_tools-1.3.1/src/invar/shell/commands/update.py +48 -0
  119. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/config.py +12 -24
  120. invar_tools-1.3.1/src/invar/shell/coverage.py +351 -0
  121. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/guard_helpers.py +38 -17
  122. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/guard_output.py +7 -1
  123. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/property_tests.py +58 -22
  124. invar_tools-1.3.1/src/invar/shell/prove/__init__.py +9 -0
  125. invar_tools-1.2.0/src/invar/shell/prove.py → invar_tools-1.3.1/src/invar/shell/prove/crosshair.py +40 -33
  126. invar_tools-1.2.0/src/invar/shell/prove_fallback.py → invar_tools-1.3.1/src/invar/shell/prove/hypothesis.py +12 -4
  127. invar_tools-1.3.1/src/invar/shell/subprocess_env.py +393 -0
  128. invar_tools-1.3.1/src/invar/shell/template_engine.py +345 -0
  129. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/templates.py +19 -0
  130. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/testing.py +71 -20
  131. invar_tools-1.3.1/src/invar/templates/CLAUDE.md.template +155 -0
  132. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/aider.conf.yml.template +2 -2
  133. invar_tools-1.2.0/.claude/commands/review.md → invar_tools-1.3.1/src/invar/templates/commands/audit.md +20 -82
  134. invar_tools-1.3.1/src/invar/templates/commands/guard.md +77 -0
  135. invar_tools-1.3.1/src/invar/templates/config/CLAUDE.md.jinja +222 -0
  136. invar_tools-1.3.1/src/invar/templates/config/context.md.jinja +97 -0
  137. invar_tools-1.3.1/src/invar/templates/config/pre-commit.yaml.jinja +44 -0
  138. invar_tools-1.3.1/src/invar/templates/context.md.template +101 -0
  139. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/cursorrules.template +7 -4
  140. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/examples/README.md +2 -0
  141. invar_tools-1.3.1/src/invar/templates/examples/conftest.py +3 -0
  142. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/examples/contracts.py +5 -5
  143. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/examples/core_shell.py +11 -7
  144. invar_tools-1.3.1/src/invar/templates/examples/workflow.md +81 -0
  145. invar_tools-1.3.1/src/invar/templates/hooks/PostToolUse.sh.jinja +102 -0
  146. invar_tools-1.3.1/src/invar/templates/hooks/PreToolUse.sh.jinja +74 -0
  147. invar_tools-1.3.1/src/invar/templates/hooks/Stop.sh.jinja +23 -0
  148. invar_tools-1.3.1/src/invar/templates/hooks/UserPromptSubmit.sh.jinja +77 -0
  149. invar_tools-1.3.1/src/invar/templates/hooks/__init__.py +1 -0
  150. invar_tools-1.3.1/src/invar/templates/manifest.toml +137 -0
  151. invar_tools-1.3.1/src/invar/templates/protocol/INVAR.md +309 -0
  152. invar_tools-1.3.1/src/invar/templates/skills/develop/SKILL.md.jinja +315 -0
  153. invar_tools-1.3.1/src/invar/templates/skills/investigate/SKILL.md.jinja +103 -0
  154. invar_tools-1.3.1/src/invar/templates/skills/propose/SKILL.md.jinja +101 -0
  155. invar_tools-1.3.1/src/invar/templates/skills/review/SKILL.md.jinja +173 -0
  156. {invar_tools-1.2.0 → invar_tools-1.3.1}/tests/integration/test_cli_flags.py +6 -4
  157. invar_tools-1.3.1/tests/integration/test_dx55_regression.py +404 -0
  158. invar_tools-1.3.1/tests/integration/test_dx56_sync.py +229 -0
  159. invar_tools-1.3.1/tests/test_subprocess_env.py +290 -0
  160. invar_tools-1.2.0/.invar/context.md +0 -1011
  161. invar_tools-1.2.0/.serena/cache/python/document_symbols.pkl +0 -0
  162. invar_tools-1.2.0/.serena/cache/python/raw_document_symbols.pkl +0 -0
  163. invar_tools-1.2.0/CLAUDE.md +0 -260
  164. invar_tools-1.2.0/INVAR.md +0 -464
  165. invar_tools-1.2.0/RELEASE_NOTES_v0.1.0.md +0 -102
  166. invar_tools-1.2.0/deprecated/python-invar/README.md +0 -61
  167. invar_tools-1.2.0/deprecated/python-invar/pyproject.toml +0 -34
  168. invar_tools-1.2.0/deprecated/python-invar/src/python_invar/__init__.py +0 -29
  169. invar_tools-1.2.0/docs/archive/FIRST_PRINCIPLES_REVIEW.md +0 -307
  170. invar_tools-1.2.0/docs/archive/INVAR-DETAILED-v3.16.md +0 -1296
  171. invar_tools-1.2.0/docs/archive/PHASE3_REVIEW.md +0 -347
  172. invar_tools-1.2.0/docs/archive/proposals-P15-P23-2025.md +0 -1573
  173. invar_tools-1.2.0/docs/archive/proposals-phase9-reflection-2025.md +0 -523
  174. invar_tools-1.2.0/docs/mechanisms/workflow/session-start.md +0 -265
  175. invar_tools-1.2.0/docs/proposals/README.md +0 -78
  176. invar_tools-1.2.0/src/invar/contracts.py +0 -152
  177. invar_tools-1.2.0/src/invar/core/tautology.py +0 -138
  178. invar_tools-1.2.0/src/invar/decorators.py +0 -94
  179. invar_tools-1.2.0/src/invar/invariant.py +0 -58
  180. invar_tools-1.2.0/src/invar/resource.py +0 -99
  181. invar_tools-1.2.0/src/invar/shell/update_cmd.py +0 -193
  182. invar_tools-1.2.0/src/invar/templates/CLAUDE.md.template +0 -114
  183. invar_tools-1.2.0/src/invar/templates/context.md.template +0 -51
  184. {invar_tools-1.2.0 → invar_tools-1.3.1}/.aider.conf.yml +0 -0
  185. {invar_tools-1.2.0 → invar_tools-1.3.1}/.cursorrules +0 -0
  186. {invar_tools-1.2.0 → invar_tools-1.3.1}/.github/workflows/ci.yml +0 -0
  187. {invar_tools-1.2.0 → invar_tools-1.3.1}/.github/workflows/publish.yml +0 -0
  188. {invar_tools-1.2.0 → invar_tools-1.3.1}/.gitignore +0 -0
  189. {invar_tools-1.2.0 → invar_tools-1.3.1}/.invar/examples/README.md +0 -0
  190. {invar_tools-1.2.0 → invar_tools-1.3.1}/.invar/proposals/TEMPLATE.md +0 -0
  191. {invar_tools-1.2.0 → invar_tools-1.3.1}/.mcp.json +0 -0
  192. {invar_tools-1.2.0 → invar_tools-1.3.1}/.pre-commit-config.yaml +0 -0
  193. {invar_tools-1.2.0 → invar_tools-1.3.1}/.serena/.gitignore +0 -0
  194. {invar_tools-1.2.0 → invar_tools-1.3.1}/.serena/project.yml +0 -0
  195. {invar_tools-1.2.0 → invar_tools-1.3.1}/LICENSE +0 -0
  196. {invar_tools-1.2.0 → invar_tools-1.3.1}/LICENSE-GPL +0 -0
  197. {invar_tools-1.2.0 → invar_tools-1.3.1}/NOTICE +0 -0
  198. {invar_tools-1.2.0/docs/archive → invar_tools-1.3.1/docs/history}/decisions-2024.md +0 -0
  199. /invar_tools-1.2.0/docs/archive/VISION-ORIGINAL.md → /invar_tools-1.3.1/docs/history/original-vision.md +0 -0
  200. /invar_tools-1.2.0/docs/archive/PROTOCOL_EVOLUTION.md → /invar_tools-1.3.1/docs/history/protocol-evolution.md +0 -0
  201. {invar_tools-1.2.0/docs → invar_tools-1.3.1/docs/history}/research/cruxeval-quick-validation.md +0 -0
  202. {invar_tools-1.2.0 → invar_tools-1.3.1}/docs/proposals/DX-25-functional-patterns.md +0 -0
  203. {invar_tools-1.2.0 → invar_tools-1.3.1}/docs/proposals/DX-29-pure-content-detection.md +0 -0
  204. {invar_tools-1.2.0/docs/proposals/archive → invar_tools-1.3.1/docs/proposals/completed}/2024-12-21-guard-enhancements.md +0 -0
  205. {invar_tools-1.2.0/docs/proposals/archive → invar_tools-1.3.1/docs/proposals/completed}/2024-12-21-language-inspired-enhancements.md +0 -0
  206. {invar_tools-1.2.0/docs/proposals/archive → invar_tools-1.3.1/docs/proposals/completed}/2024-12-21-test-first-enhancement.md +0 -0
  207. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/2025-12-21-dx-improvements.md +0 -0
  208. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/2025-12-23-dx-20-property-testing-enhancements.md +0 -0
  209. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/2025-12-23-dx-21-package-and-init.md +0 -0
  210. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/AGENT-IMPROVEMENTS.md +0 -0
  211. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-12-hypothesis-fallback.md +0 -0
  212. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-13-incremental-prove.md +0 -0
  213. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-14-expanded-prove-usage.md +0 -0
  214. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-17-workflow-enforcement.md +0 -0
  215. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-22-verification-strategy.md +0 -0
  216. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-26-guard-simplification.md +0 -0
  217. {invar_tools-1.2.0/docs/proposals → invar_tools-1.3.1/docs/proposals/completed}/DX-30-visible-workflow.md +0 -0
  218. /invar_tools-1.2.0/docs/mechanisms/architecture/README.md → /invar_tools-1.3.1/docs/reference/architecture/index.md +0 -0
  219. {invar_tools-1.2.0/docs/mechanisms → invar_tools-1.3.1/docs/reference}/contracts/doctests.md +0 -0
  220. {invar_tools-1.2.0/docs/mechanisms → invar_tools-1.3.1/docs/reference}/contracts/pre-post.md +0 -0
  221. /invar_tools-1.2.0/docs/mechanisms/rules/README.md → /invar_tools-1.3.1/docs/reference/rules/index.md +0 -0
  222. /invar_tools-1.2.0/docs/mechanisms/rules/severity-design.md → /invar_tools-1.3.1/docs/reference/rules/severity.md +0 -0
  223. {invar_tools-1.2.0/docs/mechanisms → invar_tools-1.3.1/docs/reference}/verification/smart-routing.md +0 -0
  224. {invar_tools-1.2.0/docs/mechanisms → invar_tools-1.3.1/docs/reference}/workflow/usbv.md +0 -0
  225. /invar_tools-1.2.0/docs/VISION.md → /invar_tools-1.3.1/docs/vision.md +0 -0
  226. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/LICENSE +0 -0
  227. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/README.md +0 -0
  228. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/__init__.py +0 -0
  229. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/decorators.py +0 -0
  230. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/invariant.py +0 -0
  231. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/relations.py +0 -0
  232. {invar_tools-1.2.0 → invar_tools-1.3.1}/runtime/src/invar_runtime/resource.py +0 -0
  233. {invar_tools-1.2.0 → invar_tools-1.3.1}/scripts/smart-guard.sh +0 -0
  234. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/__init__.py +0 -0
  235. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/core/format_strategies.py +0 -0
  236. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/mcp/__init__.py +0 -0
  237. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/mcp/__main__.py +0 -0
  238. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/py.typed +0 -0
  239. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/__init__.py +0 -0
  240. /invar_tools-1.2.0/src/invar/shell/mutate_cmd.py → /invar_tools-1.3.1/src/invar/shell/commands/mutate.py +0 -0
  241. {invar_tools-1.2.0/src/invar/shell → invar_tools-1.3.1/src/invar/shell/commands}/perception.py +0 -0
  242. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/fs.py +0 -0
  243. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/git.py +0 -0
  244. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/mcp_config.py +0 -0
  245. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/shell/mutation.py +0 -0
  246. /invar_tools-1.2.0/src/invar/shell/prove_accept.py → /invar_tools-1.3.1/src/invar/shell/prove/accept.py +0 -0
  247. /invar_tools-1.2.0/src/invar/shell/prove_cache.py → /invar_tools-1.3.1/src/invar/shell/prove/cache.py +0 -0
  248. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/__init__.py +0 -0
  249. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/pre-commit-config.yaml.template +0 -0
  250. {invar_tools-1.2.0 → invar_tools-1.3.1}/src/invar/templates/proposal.md.template +0 -0
  251. {invar_tools-1.2.0 → invar_tools-1.3.1}/tests/__init__.py +0 -0
  252. {invar_tools-1.2.0 → invar_tools-1.3.1}/tests/conftest.py +0 -0
  253. {invar_tools-1.2.0 → invar_tools-1.3.1}/tests/integration/__init__.py +0 -0
  254. {invar_tools-1.2.0 → invar_tools-1.3.1}/uv.lock +0 -0
@@ -1,73 +1,14 @@
1
- # Code Review (Reviewer Role)
1
+ # Audit
2
2
 
3
- ## Mode Detection (Required First Step)
4
-
5
- Before reviewing, determine the appropriate mode:
6
-
7
- ### Check for `review_suggested`
8
-
9
- Look at your conversation history for recent `invar guard` output, or run:
10
- ```bash
11
- invar guard --changed
12
- ```
13
-
14
- Check if `review_suggested` warning is present:
15
- ```
16
- WARNING: review_suggested - High escape hatch count: N @invar:allow markers
17
- WARNING: review_suggested - Security-sensitive path detected
18
- WARNING: review_suggested - Low contract coverage
19
- ```
20
-
21
- ### Select Mode
22
-
23
- | Condition | Mode | Why |
24
- |-----------|------|-----|
25
- | `review_suggested` present | **Isolated** | Eliminates confirmation bias |
26
- | No trigger | **Quick** | Faster, context preserved |
27
- | User requests `--isolated` | **Isolated** | Explicit override |
28
- | User requests `--quick` | **Quick** | Explicit override |
29
-
30
- ---
31
-
32
- ## Isolated Mode
33
-
34
- **Use when:** `review_suggested` triggered, or user explicitly requests isolation.
35
-
36
- Spawn an independent reviewer with fresh context using Task tool:
37
-
38
- ```
39
- I'll spawn an independent reviewer to eliminate confirmation bias...
40
-
41
- [Task tool call]
42
- prompt: |
43
- You are an adversarial code reviewer. Your job is to FIND PROBLEMS.
44
-
45
- Review these files: {files_to_review}
46
-
47
- Read .claude/commands/review.md for the full checklist, then:
48
- 1. Check contract semantic value (not just syntax)
49
- 2. Audit all escape hatches (@invar:allow)
50
- 3. Look for logic errors and edge cases
51
- 4. Check security if applicable
52
-
53
- Report issues as CRITICAL/MAJOR/MINOR with file:line locations.
54
-
55
- Your success is measured by problems found, not code approved.
56
-
57
- subagent_type: "general-purpose"
58
- ```
59
-
60
- After receiving the sub-agent's report, summarize findings for the user.
61
-
62
- **Key:** The sub-agent has NO conversation history. It only sees the code.
3
+ Read-only code review. Reports issues without fixing them.
63
4
 
64
5
  ---
65
6
 
66
- ## Quick Mode
67
-
68
- **Use when:** No `review_suggested` trigger, routine review needed.
7
+ ## Behavior
69
8
 
70
- Proceed with same-context review below.
9
+ 1. Analyze code for issues (style, bugs, security, architecture)
10
+ 2. Report findings with file:line references
11
+ 3. **Do NOT make any changes** - report only
71
12
 
72
13
  ---
73
14
 
@@ -149,7 +90,7 @@ You ARE here to:
149
90
 
150
91
  ---
151
92
 
152
- ## Excluded (Covered by Tools)
93
+ ## Excluded (Covered by Guard)
153
94
 
154
95
  These are checked by Guard or linters - don't duplicate:
155
96
  - Core/Shell separation → Guard (forbidden_import, impure_call)
@@ -157,7 +98,6 @@ These are checked by Guard or linters - don't duplicate:
157
98
  - Missing contracts → Guard (missing_contract)
158
99
  - File/function size limits → Guard (file_size, function_size)
159
100
  - Entry point thickness → Guard (entry_point_too_thick)
160
- - Magic numbers → Linters (ruff)
161
101
  - Escape hatch count → Guard (review_suggested)
162
102
 
163
103
  ---
@@ -166,11 +106,11 @@ These are checked by Guard or linters - don't duplicate:
166
106
 
167
107
  For each issue found, use severity levels:
168
108
 
169
- | Severity | Meaning | Enforcement |
170
- |----------|---------|-------------|
171
- | **CRITICAL** | Must fix before completion | Blocking |
172
- | **MAJOR** | Fix or provide written justification | Strong |
173
- | **MINOR** | Optional, can defer | Advisory |
109
+ | Severity | Meaning |
110
+ |----------|---------|
111
+ | **CRITICAL** | Must fix before completion |
112
+ | **MAJOR** | Fix or provide written justification |
113
+ | **MINOR** | Optional, can defer |
174
114
 
175
115
  ```markdown
176
116
  ### [CRITICAL/MAJOR/MINOR] Issue Title
@@ -178,22 +118,20 @@ For each issue found, use severity levels:
178
118
  **Location:** file.py:line_number
179
119
  **Category:** contract_quality | logic_error | security | escape_hatch | code_smell
180
120
  **Problem:** What's wrong
181
- **Suggestion:** How to fix (if applicable)
121
+ **Suggestion:** How to fix (but don't implement)
182
122
  ```
183
123
 
184
124
  ---
185
125
 
186
- ## Instructions Summary
126
+ ## Instructions
187
127
 
188
- 1. **Mode Detection:** Check for `review_suggested` in guard output
189
- 2. **If Isolated Mode:** Spawn Task sub-agent (fresh context)
190
- 3. **If Quick Mode:** Proceed with same-context adversarial review
191
- 4. Go through each checklist category
192
- 5. For each issue, determine severity (CRITICAL/MAJOR/MINOR)
193
- 6. Report with structured format above
194
- 7. Be thorough and adversarial
128
+ 1. Run `invar guard --changed` to see current state
129
+ 2. Go through each checklist category
130
+ 3. For each issue, determine severity (CRITICAL/MAJOR/MINOR)
131
+ 4. Report with structured format above
132
+ 5. Be thorough and adversarial
195
133
 
196
- **Remember:** You are READ-ONLY. Report issues, don't fix them directly.
134
+ **Remember:** You are READ-ONLY. Report issues, don't fix them.
197
135
 
198
136
  ---
199
137
 
@@ -0,0 +1,77 @@
1
+ # Guard
2
+
3
+ Run Invar verification on the project and report results.
4
+
5
+ ---
6
+
7
+ ## Behavior
8
+
9
+ Execute `invar_guard()` and report:
10
+ - Pass/fail status
11
+ - Error count with details
12
+ - Warning count with details
13
+
14
+ **Do NOT fix issues** - just report verification results.
15
+
16
+ ---
17
+
18
+ ## When to Use
19
+
20
+ - Quick verification check
21
+ - Before committing changes
22
+ - After pulling changes
23
+ - To see current project health
24
+
25
+ ---
26
+
27
+ ## Execution
28
+
29
+ Run verification:
30
+
31
+ ```
32
+ invar_guard(changed=true)
33
+ ```
34
+
35
+ Or for full project verification:
36
+
37
+ ```
38
+ invar_guard()
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Report Format
44
+
45
+ ```
46
+ ## Guard Results
47
+
48
+ **Status:** PASS / FAIL
49
+ **Errors:** N
50
+ **Warnings:** N
51
+
52
+ ### Errors (if any)
53
+
54
+ | Rule | File | Line | Message |
55
+ |------|------|------|---------|
56
+ | missing_contract | src/foo.py | 42 | Function 'bar' has no @pre/@post |
57
+
58
+ ### Warnings (if any)
59
+
60
+ | Rule | File | Line | Message |
61
+ |------|------|------|---------|
62
+ | function_size | src/baz.py | 15 | Function exceeds 50 lines |
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Next Steps
68
+
69
+ After reporting results:
70
+ - If PASS: No action needed
71
+ - If FAIL: User decides whether to fix issues
72
+
73
+ **Remember:** You are READ-ONLY. Report results, don't fix them.
74
+
75
+ ---
76
+
77
+ Now run verification on the current project.
@@ -0,0 +1,288 @@
1
+ ---
2
+ name: develop
3
+ description: Implementation phase following USBV workflow. Use when task is clear and actionable - "add", "implement", "create", "fix", "update", "build", "write". Requires Check-In at start and Final at end.
4
+ _invar:
5
+ version: "5.0"
6
+ managed: skill
7
+ ---
8
+ <!--invar:skill-->
9
+
10
+ # Development Mode
11
+
12
+ > **Purpose:** Implement solution following USBV workflow with verification.
13
+
14
+ ## Entry Actions (REQUIRED)
15
+
16
+ ### Context Refresh (DX-54)
17
+
18
+ Before any workflow action:
19
+ 1. Read `.invar/context.md` (especially Key Rules section)
20
+ 2. Display routing announcement
21
+
22
+ ### Routing Announcement
23
+
24
+ ```
25
+ 📍 Routing: /develop — [trigger detected, e.g. "add", "fix", "implement"]
26
+ Task: [user's request summary]
27
+ ```
28
+
29
+ ### Simple Task Detection
30
+
31
+ If task appears simple (4+ signals: single file, clear target, additive change, <50 lines):
32
+
33
+ ```
34
+ 📊 Simple task (1 file, ~N lines).
35
+ Auto-orchestrate: investigate → develop → validate?
36
+ [Y/N]
37
+ ```
38
+
39
+ - Y → Execute full cycle without intermediate confirmations
40
+ - N → Proceed with normal USBV checkpoints
41
+ - No response → Default to step-by-step (safe)
42
+
43
+ ## USBV Workflow
44
+
45
+ ### 1. UNDERSTAND
46
+
47
+ - **Intent:** What exactly needs to be done?
48
+ - **Inspect:** Use `invar_sig` to see existing contracts
49
+ - **Context:** Read relevant code, understand patterns
50
+ - **Constraints:** What must NOT change?
51
+
52
+ ### 2. SPECIFY
53
+
54
+ - **Contracts FIRST:** Write `@pre`/`@post` before implementation
55
+ - **Doctests:** Add examples for expected behavior
56
+ - **Design:** Decompose complex tasks into sub-functions
57
+
58
+ ```python
59
+ # SPECIFY before BUILD:
60
+ @pre(lambda x: x > 0)
61
+ @post(lambda result: result >= 0)
62
+ def calculate(x: int) -> int:
63
+ """
64
+ >>> calculate(10)
65
+ 100
66
+ """
67
+ ... # Implementation comes in BUILD
68
+ ```
69
+
70
+ ### 3. BUILD
71
+
72
+ **For complex tasks:** Enter Plan Mode first, get user approval.
73
+
74
+ **Implementation rules:**
75
+ - Follow the contracts written in SPECIFY
76
+ - Run `invar_guard(changed=true)` frequently
77
+ - Commit after each logical unit
78
+
79
+ **Commit format:**
80
+ ```bash
81
+ git add . && git commit -m "feat: [description]
82
+
83
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
84
+
85
+ Co-Authored-By: Claude <noreply@anthropic.com>"
86
+ ```
87
+
88
+ ### 4. VALIDATE
89
+
90
+ - Run `invar_guard()` (full verification)
91
+ - All TodoWrite items complete
92
+ - Integration works (if applicable)
93
+
94
+ ## Task Batching
95
+
96
+ For multiple tasks:
97
+ 1. Create TodoWrite with all items upfront
98
+ 2. Execute sequentially (not parallel)
99
+ 3. After each task:
100
+ - Commit changes
101
+ - Run `invar_guard(changed=true)`
102
+ - Update TodoWrite
103
+ 4. **Limits:** Max 5 tasks OR 4 hours OR Guard failure
104
+
105
+ ## Failure Handling
106
+
107
+ | Guard Result | Action |
108
+ |--------------|--------|
109
+ | Static fixable (missing contract) | Auto-fix, retry (max 2) |
110
+ | Test failure | Report to user, ask for guidance |
111
+ | Contract violation | Report, suggest `/investigate` |
112
+ | Repeated failure | Stop, ask user |
113
+
114
+ ## Common Guard Errors
115
+
116
+ Quick reference for resolving common Guard errors:
117
+
118
+ | Error | Cause | Quick Fix |
119
+ |-------|-------|-----------|
120
+ | `forbidden_import: io` | I/O library in Core | Use `iter(s.splitlines())` not `io.StringIO` |
121
+ | `forbidden_import: os` | os module in Core | Accept `Path` as parameter instead |
122
+ | `forbidden_import: pathlib` | pathlib in Core | Accept `Path` or `str` as parameter |
123
+ | `internal_import` | Import inside function | Move import to module top |
124
+ | `missing_contract` | Core function without @pre/@post | Add contract before implementation |
125
+ | `empty_contract` | Contract with no condition | Add meaningful condition |
126
+ | `redundant_type_contract` | Contract only checks types | Add semantic constraints (bounds, relationships) |
127
+ | `partial_contract` | Only some params validated | Validate all params or document why partial |
128
+ | `file_size` | File > 500 lines | Extract functions to new module |
129
+ | `shell_result` | Shell function missing Result | Return `Result[T, E]` from `returns` |
130
+
131
+ **Tip:** For `missing_contract`, Guard automatically suggests contracts based on parameter types.
132
+ Check the "Suggested:" line in Guard output.
133
+
134
+ **Note:** Use `from deal import pre, post` for lambda-based contracts.
135
+ `invar_runtime.pre/post` are for Contract objects like `NonEmpty`.
136
+
137
+ ## Timeout Handling
138
+
139
+ | Threshold | Duration | Action |
140
+ |-----------|----------|--------|
141
+ | Warning | 3 hours (75%) | Soft warning with options |
142
+ | Hard stop | 4 hours (max) | Save state, exit |
143
+
144
+ **75% Warning:**
145
+ ```
146
+ ⏱ Time check: /develop has been running for 3 hours.
147
+ Remaining estimate: [based on TodoWrite progress]
148
+
149
+ Options:
150
+ A: Continue (1 hour max remaining)
151
+ B: Wrap up current task and exit
152
+ C: Checkpoint and pause for later
153
+
154
+ Choice? (auto-continue in 2 minutes if no response)
155
+ ```
156
+
157
+ **Hard Stop:**
158
+ ```
159
+ ⏱ /develop reached 4-hour limit.
160
+
161
+ Completed: [N]/[M] tasks
162
+ Current task: [description] - [%] complete
163
+
164
+ Saving state for resume. Run '/develop --resume' to continue.
165
+ ```
166
+
167
+ ## Exit Actions (REQUIRED)
168
+
169
+ ### Final
170
+
171
+ ```python
172
+ invar_guard()
173
+ ```
174
+
175
+
176
+ **Display:**
177
+ ```
178
+ ✓ Final: guard [PASS/FAIL] | [errors] errors, [warnings] warnings
179
+ ```
180
+
181
+ ### Auto-Review (DX-41)
182
+
183
+ If Guard outputs `review_suggested`:
184
+
185
+ ```
186
+ ⚠ review_suggested: [reason]
187
+
188
+ 📍 Routing: /review — review_suggested triggered
189
+ Task: Review [N files changed]
190
+ ```
191
+
192
+ Proceed directly to /review skill. User can say "skip" to bypass.
193
+
194
+ ## Phase Visibility (DX-51)
195
+
196
+ **USBV phases must be visually distinct.** On each phase transition, display a phase header:
197
+
198
+ ### Phase Header Format
199
+
200
+ ```
201
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
202
+ 📍 /develop → SPECIFY (2/4)
203
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
204
+ ```
205
+
206
+ ### Compact Format (brief updates)
207
+
208
+ ```
209
+ 📍 VALIDATE — Running guard...
210
+ ```
211
+
212
+ ### Three-Layer Visibility
213
+
214
+ | Layer | What | Tool |
215
+ |-------|------|------|
216
+ | Skill | `/develop` | Routing announcement |
217
+ | Phase | `SPECIFY (2/4)` | Phase header (this section) |
218
+ | Tasks | Concrete items | TodoWrite |
219
+
220
+ **Phase headers are SEPARATE from TodoWrite.**
221
+ - Phase = where you are in workflow (visible in output)
222
+ - TodoWrite = what tasks need doing (visible in status panel)
223
+
224
+ **BUILD is internal work** — show header but no detailed breakdown.
225
+
226
+ ## Tool Selection
227
+
228
+ | I want to... | Use |
229
+ |--------------|-----|
230
+ | See contracts | `invar_sig <file>` |
231
+ | Find entry points | `invar_map --top 10` |
232
+ | Verify code | `invar_guard` |
233
+ | Edit symbol | Serena `replace_symbol_body` |
234
+ | Add after symbol | Serena `insert_after_symbol` |
235
+ | Rename symbol | Serena `rename_symbol` |
236
+
237
+ ## Example
238
+
239
+ ```
240
+ User: "Add input validation to parse_source"
241
+
242
+ Agent:
243
+ 📍 Routing: /develop — "add" trigger detected
244
+ Task: Add input validation to parse_source
245
+
246
+ ✓ Check-In: Invar | main | clean
247
+
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+ 📍 /develop → UNDERSTAND (1/4)
250
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
251
+
252
+ - Current: accepts any string
253
+ - Need: reject whitespace-only strings
254
+ - File: src/invar/core/parser.py
255
+
256
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
257
+ 📍 /develop → SPECIFY (2/4)
258
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
259
+
260
+ @pre(lambda source, path: len(source.strip()) > 0)
261
+
262
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
263
+ 📍 /develop → BUILD (3/4)
264
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
265
+
266
+ [Implementation...]
267
+
268
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
+ 📍 /develop → VALIDATE (4/4)
270
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
+
272
+ ✓ guard PASS | 0 errors, 1 warning
273
+
274
+ ✓ Final: guard PASS | 0 errors, 1 warning
275
+ ```
276
+ <!--/invar:skill-->
277
+ <!--invar:extensions-->
278
+ <!-- ========================================================================
279
+ EXTENSIONS REGION - USER EDITABLE
280
+ Add project-specific extensions here. This section is preserved on update.
281
+
282
+ Examples of what to add:
283
+ - Project-specific validation steps
284
+ - Custom commit message formats
285
+ - Additional tool integrations
286
+ - Team-specific workflows
287
+ ======================================================================== -->
288
+ <!--/invar:extensions-->
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: investigate
3
+ description: Exploration and understanding phase. Use when task is vague, needs analysis, or requires understanding before action. Triggers on "why", "what is", "how does", "explain", "understand", "analyze", "investigate", "explore". NO CODE CHANGES in this phase.
4
+ _invar:
5
+ version: "5.0"
6
+ managed: skill
7
+ ---
8
+ <!--invar:skill-->
9
+
10
+ # Investigation Mode
11
+
12
+ > **Purpose:** Understand before acting. Gather information, analyze code, report findings.
13
+
14
+ ## Constraints
15
+
16
+ **FORBIDDEN in this phase:**
17
+ - Edit, Write (no code changes)
18
+ - git commit (nothing to commit)
19
+ - Creating new files
20
+
21
+ **ALLOWED:**
22
+ - Read, Glob, Grep (exploration)
23
+ - invar_sig, invar_map (perception)
24
+ - WebSearch, WebFetch (research)
25
+
26
+ ## Entry Actions
27
+
28
+ ### Context Refresh (DX-54)
29
+
30
+ Before any workflow action:
31
+ 1. Read `.invar/context.md` (especially Key Rules section)
32
+ 2. Display routing announcement
33
+
34
+ ### Routing Announcement
35
+
36
+ ```
37
+ 📍 Routing: /investigate — [reason, e.g. "task is vague", "trigger 'why'"]
38
+ Task: [user's request summary]
39
+ ```
40
+
41
+ ### Entry Steps
42
+
43
+ 1. Display routing announcement (above)
44
+ 2. Run `invar_map(top=10)` for codebase orientation
45
+ 3. Explore relevant code and documentation
46
+
47
+ ## Tool Selection
48
+
49
+ | I want to... | Use |
50
+ |--------------|-----|
51
+ | See function contracts | `invar_sig(target="<file>")` |
52
+ | Find entry points | `invar_map(top=10)` |
53
+ | Search code patterns | Grep with regex |
54
+ | Explore codebase | Task(Explore) agent |
55
+
56
+ ## Exit Format
57
+
58
+ ```markdown
59
+ ### Investigation Complete
60
+
61
+ **Topic:** [what was investigated]
62
+
63
+ **Findings:**
64
+ 1. [Key finding 1]
65
+ 2. [Key finding 2]
66
+ 3. [Key finding 3]
67
+
68
+ **Details:**
69
+ [Detailed explanation with file:line references]
70
+
71
+ **Recommendation:**
72
+ - [ ] /propose — Design decision needed
73
+ - [ ] /develop — Ready to implement [specific task]
74
+ - [ ] More investigation — [what's still unclear]
75
+
76
+ **Next step?**
77
+ ```
78
+ <!--/invar:skill-->
79
+ <!--invar:extensions-->
80
+ <!-- ========================================================================
81
+ EXTENSIONS REGION - USER EDITABLE
82
+ Add project-specific extensions here. This section is preserved on update.
83
+
84
+ Examples of what to add:
85
+ - Project-specific investigation checklists
86
+ - Custom analysis tools or scripts
87
+ - Domain-specific research sources
88
+ - Team documentation references
89
+ ======================================================================== -->
90
+ <!--/invar:extensions-->
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: propose
3
+ description: Decision facilitation phase. Use when design decision is needed, multiple approaches are valid, or user asks "should we", "how should", "which", "compare", "design", "architect". Presents options with trade-offs for human choice.
4
+ _invar:
5
+ version: "5.0"
6
+ managed: skill
7
+ ---
8
+ <!--invar:skill-->
9
+
10
+ # Proposal Mode
11
+
12
+ > **Purpose:** Facilitate human decision-making with clear options and trade-offs.
13
+
14
+ ## Entry Actions
15
+
16
+ ### Context Refresh (DX-54)
17
+
18
+ Before any workflow action:
19
+ 1. Read `.invar/context.md` (especially Key Rules section)
20
+ 2. Display routing announcement
21
+
22
+ ### Routing Announcement
23
+
24
+ ```
25
+ 📍 Routing: /propose — [trigger detected, e.g. "should we", "compare", "design"]
26
+ Task: [decision topic summary]
27
+ ```
28
+
29
+ ### Entry Steps
30
+
31
+ 1. Display routing announcement (above)
32
+ 2. Explore relevant context if needed
33
+
34
+ ## Output Formats
35
+
36
+ ### Quick Decision (2-4 options)
37
+
38
+ ```markdown
39
+ ### Decision: [Topic]
40
+
41
+ | Option | Description | Pros | Cons |
42
+ |--------|-------------|------|------|
43
+ | A: [name] | [brief] | [pros] | [cons] |
44
+ | B: [name] | [brief] | [pros] | [cons] |
45
+
46
+ **Recommendation:** [A/B] because [concise reason]
47
+
48
+ **Your choice?**
49
+ ```
50
+
51
+ ### Formal Proposal (complex decision)
52
+
53
+ Create `docs/proposals/DX-XX-[topic].md`:
54
+
55
+ ```markdown
56
+ # DX-XX: [Title]
57
+
58
+ **Status:** Discussion
59
+ **Created:** [date]
60
+
61
+ ## Problem Statement
62
+ [What needs to be decided]
63
+
64
+ ## Options
65
+
66
+ ### Option A: [Name]
67
+ - **Description:** [What this involves]
68
+ - **Pros:** [Benefits]
69
+ - **Cons:** [Drawbacks]
70
+ - **Effort:** Low/Medium/High
71
+
72
+ ### Option B: [Name]
73
+ ...
74
+
75
+ ## Recommendation
76
+ [Which option and why]
77
+
78
+ ## Open Questions
79
+ [What needs clarification]
80
+ ```
81
+
82
+ ## Exit Conditions
83
+
84
+ | User Response | Next Action |
85
+ |---------------|-------------|
86
+ | Chooses option | /develop to implement |
87
+ | Needs more info | /investigate for analysis |
88
+ | Approves proposal | Document created |
89
+ <!--/invar:skill-->
90
+ <!--invar:extensions-->
91
+ <!-- ========================================================================
92
+ EXTENSIONS REGION - USER EDITABLE
93
+ Add project-specific extensions here. This section is preserved on update.
94
+
95
+ Examples of what to add:
96
+ - Project-specific proposal templates
97
+ - Decision criteria or checklists
98
+ - Stakeholder notification rules
99
+ - Architecture decision record (ADR) formats
100
+ ======================================================================== -->
101
+ <!--/invar:extensions-->