invar-tools 1.3.0__tar.gz → 1.3.2__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.
- invar_tools-1.3.2/.claude/skills/develop/SKILL.md +288 -0
- invar_tools-1.3.2/.claude/skills/investigate/SKILL.md +90 -0
- invar_tools-1.3.2/.claude/skills/propose/SKILL.md +101 -0
- invar_tools-1.3.0/src/invar/templates/skills/review/SKILL.md.jinja → invar_tools-1.3.2/.claude/skills/review/SKILL.md +63 -15
- invar_tools-1.3.2/.invar/archive/sessions-2025-12.md +147 -0
- invar_tools-1.3.2/.invar/context.md +150 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/project-additions.md +2 -2
- {invar_tools-1.3.0 → invar_tools-1.3.2}/CLAUDE.md +13 -3
- {invar_tools-1.3.0 → invar_tools-1.3.2}/INVAR.md +105 -6
- invar_tools-1.3.2/PKG-INFO +505 -0
- invar_tools-1.3.2/README.md +464 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/agents.md +1 -1
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/design.md +4 -4
- invar_tools-1.3.2/docs/diagrams.md +200 -0
- invar_tools-1.3.2/docs/index.html +779 -0
- invar_tools-1.3.2/docs/logo.svg +8 -0
- invar_tools-1.3.2/docs/proposals/DX-60-structured-rules-ssot.md +416 -0
- invar_tools-1.3.2/docs/proposals/DX-61-functional-pattern-guidance.md +1137 -0
- invar_tools-1.3.2/docs/proposals/completed/DX-57-claude-code-hooks.md +802 -0
- invar_tools-1.3.2/docs/proposals/completed/DX-58-document-structure-optimization.md +453 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/index.md +36 -9
- invar_tools-1.3.2/docs/terminal-gif-guide.md +230 -0
- invar_tools-1.3.2/docs/test-reports/DX-58-test-scenario.md +165 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/pyproject.toml +1 -1
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/README.md +1 -1
- invar_tools-1.3.2/src/invar/shell/claude_hooks.py +387 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/guard.py +2 -0
- invar_tools-1.3.2/src/invar/shell/commands/hooks.py +74 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/init.py +30 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/template_sync.py +42 -11
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/test.py +1 -1
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/templates.py +2 -2
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/CLAUDE.md.template +25 -5
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/config/CLAUDE.md.jinja +16 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/config/context.md.jinja +11 -6
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/context.md.template +35 -18
- invar_tools-1.3.2/src/invar/templates/hooks/PostToolUse.sh.jinja +102 -0
- invar_tools-1.3.2/src/invar/templates/hooks/PreToolUse.sh.jinja +74 -0
- invar_tools-1.3.2/src/invar/templates/hooks/Stop.sh.jinja +23 -0
- invar_tools-1.3.2/src/invar/templates/hooks/UserPromptSubmit.sh.jinja +77 -0
- invar_tools-1.3.2/src/invar/templates/hooks/__init__.py +1 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/manifest.toml +2 -2
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/protocol/INVAR.md +105 -6
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/skills/develop/SKILL.md.jinja +4 -7
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/skills/investigate/SKILL.md.jinja +4 -7
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/skills/propose/SKILL.md.jinja +4 -7
- invar_tools-1.3.2/src/invar/templates/skills/review/SKILL.md.jinja +173 -0
- invar_tools-1.3.0/.claude/skills/develop/SKILL.md +0 -583
- invar_tools-1.3.0/.claude/skills/investigate/SKILL.md +0 -187
- invar_tools-1.3.0/.claude/skills/propose/SKILL.md +0 -209
- invar_tools-1.3.0/.claude/skills/review/SKILL.md +0 -251
- invar_tools-1.3.0/.invar/context.md +0 -1110
- invar_tools-1.3.0/PKG-INFO +0 -377
- invar_tools-1.3.0/README.md +0 -336
- invar_tools-1.3.0/docs/index.html +0 -1107
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.aider.conf.yml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.claude/commands/audit.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.claude/commands/guard.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.cursorrules +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.github/workflows/ci.yml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.github/workflows/publish.yml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.gitignore +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/examples/README.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/examples/conftest.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/examples/contracts.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/examples/core_shell.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/examples/workflow.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.invar/proposals/TEMPLATE.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.mcp.json +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.pre-commit-config.yaml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.serena/.gitignore +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/.serena/project.yml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/LICENSE +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/LICENSE-GPL +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/NOTICE +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/guide.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/decisions-2024.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/feedback/compliance-analysis.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/feedback/feedback-memo.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/feedback/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/original-vision.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/protocol-evolution.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/history/research/cruxeval-quick-validation.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-23-entry-point-detection.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-25-functional-patterns.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-29-pure-content-detection.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-37-coverage-integration.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-38-contract-quality-rules.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-39-workflow-efficiency.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-40-smart-tool-redirect-hook.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-41-automatic-review-orchestration.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-42-workflow-auto-routing.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-43-cross-platform-distribution.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-46-documentation-audit.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-48-code-structure-reorganization.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-49-protocol-distribution-unification.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-50-workflow-enforcement.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-51-workflow-phase-visibility.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-52-venv-dependency-injection.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-53-review-loop-effectiveness.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-54-agent-native-context-management.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-55-claude-init-conflict-resolution.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/DX-56-template-sync-unification.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/LX-01-multi-language-feasibility.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2024-12-21-guard-enhancements.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2024-12-21-language-inspired-enhancements.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2024-12-21-test-first-enhancement.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2025-12-21-dx-improvements.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2025-12-23-dx-20-property-testing-enhancements.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/2025-12-23-dx-21-package-and-init.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/AGENT-IMPROVEMENTS.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-11-documentation-restructure.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-12-hypothesis-fallback.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-13-incremental-prove.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-14-expanded-prove-usage.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-16-agent-tool-enforcement.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-17-workflow-enforcement.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-22-verification-strategy.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-24-mechanism-documentation.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-26-guard-simplification.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-27-system-prompt-protocol.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-28-semantic-verification.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-30-visible-workflow.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-31-adversarial-reviewer.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-32-workflow-iteration.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-33-verification-blind-spots.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-34-review-cycle.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-35-workflow-phase-separation.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-36-documentation-restructuring.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-45-template-consistency.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/proposals/completed/DX-47-command-skill-naming.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/architecture/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/contracts/advanced.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/contracts/completeness.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/contracts/doctests.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/contracts/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/contracts/pre-post.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/documentation.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/proposal-workflow.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/rules/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/rules/severity.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/verification/crosshair-vs-hypothesis.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/verification/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/verification/smart-routing.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/workflow/index.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/workflow/session-start.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/reference/workflow/usbv.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/test-reports/DX-55-test-report.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/test-reports/DX-56-test-report.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/docs/vision.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/LICENSE +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/pyproject.toml +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/contracts.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/decorators.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/invariant.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/relations.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/runtime/src/invar_runtime/resource.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/scripts/smart-guard.sh +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/contracts.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/entry_points.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/extraction.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/format_specs.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/format_strategies.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/formatter.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/hypothesis_strategies.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/inspect.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/lambda_helpers.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/models.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/must_use.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/parser.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/postcondition_scope.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/property_gen.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/purity.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/purity_heuristics.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/references.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/review_trigger.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/rule_meta.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/rules.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/shell_analysis.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/shell_architecture.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/strategies.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/suggestions.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/sync_helpers.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/tautology.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/template_parser.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/timeout_inference.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/utils.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/core/verification_routing.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/mcp/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/mcp/__main__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/mcp/server.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/py.typed +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/merge.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/mutate.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/perception.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/sync_self.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/commands/update.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/config.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/coverage.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/fs.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/git.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/guard_helpers.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/guard_output.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/mcp_config.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/mutation.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/property_tests.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/prove/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/prove/accept.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/prove/cache.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/prove/crosshair.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/prove/hypothesis.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/subprocess_env.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/template_engine.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/shell/testing.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/aider.conf.yml.template +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/commands/audit.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/commands/guard.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/config/pre-commit.yaml.jinja +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/cursorrules.template +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/examples/README.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/examples/conftest.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/examples/contracts.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/examples/core_shell.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/examples/workflow.md +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/pre-commit-config.yaml.template +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/src/invar/templates/proposal.md.template +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/conftest.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/integration/__init__.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/integration/test_cli_flags.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/integration/test_dx55_regression.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/integration/test_dx56_sync.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/tests/test_subprocess_env.py +0 -0
- {invar_tools-1.3.0 → invar_tools-1.3.2}/uv.lock +0 -0
|
@@ -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-->
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
<!--invar:skill version="{{ version }}"-->
|
|
2
|
-
<!-- ========================================================================
|
|
3
|
-
SKILL REGION - DO NOT EDIT
|
|
4
|
-
This section is managed by Invar and will be overwritten on update.
|
|
5
|
-
To add project-specific extensions, use the "extensions" region below.
|
|
6
|
-
======================================================================== -->
|
|
7
1
|
---
|
|
8
2
|
name: review
|
|
9
3
|
description: Adversarial code review with fix loop. Use after development, when Guard reports review_suggested, or user explicitly requests review. Finds issues that automated verification misses. Supports isolated mode (sub-agent) and quick mode (same context).
|
|
4
|
+
_invar:
|
|
5
|
+
version: "5.0"
|
|
6
|
+
managed: skill
|
|
10
7
|
---
|
|
8
|
+
<!--invar:skill-->
|
|
11
9
|
|
|
12
10
|
# Review Mode
|
|
13
11
|
|
|
14
12
|
> **Purpose:** Find problems that Guard, doctests, and property tests missed.
|
|
15
13
|
> **Mindset:** Adversarial. Your success is measured by problems found, not code approved.
|
|
16
14
|
|
|
15
|
+
## Adversarial Reviewer Persona
|
|
16
|
+
|
|
17
|
+
Assume:
|
|
18
|
+
- The code has bugs until proven otherwise
|
|
19
|
+
- The contracts may be meaningless ceremony
|
|
20
|
+
- The implementer may have rationalized poor decisions
|
|
21
|
+
- Escape hatches may be abused
|
|
22
|
+
|
|
23
|
+
You ARE here to:
|
|
24
|
+
- Find bugs, logic errors, edge cases
|
|
25
|
+
- Challenge whether contracts have semantic value
|
|
26
|
+
- Check if code matches contracts (not if code "seems right")
|
|
27
|
+
|
|
17
28
|
## Entry Actions
|
|
18
29
|
|
|
19
30
|
### Context Refresh (DX-54)
|
|
@@ -50,23 +61,61 @@ WARNING: review_suggested - Low contract coverage
|
|
|
50
61
|
|
|
51
62
|
## Review Checklist
|
|
52
63
|
|
|
64
|
+
> **Principle:** Only items requiring semantic judgment. Mechanical checks are handled by Guard.
|
|
65
|
+
|
|
53
66
|
### A. Contract Semantic Value
|
|
54
67
|
- [ ] Does @pre constrain inputs beyond type checking?
|
|
68
|
+
- Bad: `@pre(lambda x: isinstance(x, int))`
|
|
69
|
+
- Good: `@pre(lambda x: x > 0 and x < MAX_VALUE)`
|
|
55
70
|
- [ ] Does @post verify meaningful output properties?
|
|
71
|
+
- Bad: `@post(lambda result: result is not None)`
|
|
72
|
+
- Good: `@post(lambda result: len(result) == len(input))`
|
|
56
73
|
- [ ] Could someone implement correctly from contracts alone?
|
|
74
|
+
- [ ] Are boundary conditions explicit in contracts?
|
|
57
75
|
|
|
58
|
-
### B.
|
|
59
|
-
- [ ] Do
|
|
60
|
-
- [ ]
|
|
61
|
-
- [ ]
|
|
76
|
+
### B. Doctest Coverage
|
|
77
|
+
- [ ] Do doctests cover normal cases?
|
|
78
|
+
- [ ] Do doctests cover boundary cases?
|
|
79
|
+
- [ ] Do doctests cover error cases?
|
|
80
|
+
- [ ] Are doctests testing behavior, not just syntax?
|
|
62
81
|
|
|
63
|
-
### C.
|
|
82
|
+
### C. Code Quality
|
|
83
|
+
- [ ] Is duplicated code worth extracting?
|
|
84
|
+
- [ ] Is naming consistent and clear?
|
|
85
|
+
- [ ] Is complexity justified?
|
|
86
|
+
|
|
87
|
+
### D. Escape Hatch Audit
|
|
64
88
|
- [ ] Is each @invar:allow justification valid?
|
|
65
89
|
- [ ] Could refactoring eliminate the need?
|
|
90
|
+
- [ ] Is there a pattern suggesting systematic issues?
|
|
91
|
+
|
|
92
|
+
### E. Logic Verification
|
|
93
|
+
- [ ] Do contracts correctly capture intended behavior?
|
|
94
|
+
- [ ] Are there paths that bypass contract checks?
|
|
95
|
+
- [ ] Are there implicit assumptions not in contracts?
|
|
96
|
+
- [ ] Is there dead code or unreachable branches?
|
|
66
97
|
|
|
67
|
-
###
|
|
68
|
-
- [ ]
|
|
69
|
-
- [ ] No hardcoded secrets?
|
|
98
|
+
### F. Security
|
|
99
|
+
- [ ] Are inputs validated against security threats (injection, XSS)?
|
|
100
|
+
- [ ] No hardcoded secrets (API keys, passwords, tokens)?
|
|
101
|
+
- [ ] Are authentication/authorization checks correct?
|
|
102
|
+
- [ ] Is sensitive data properly protected?
|
|
103
|
+
|
|
104
|
+
### G. Error Handling & Observability
|
|
105
|
+
- [ ] Are exceptions caught at appropriate level?
|
|
106
|
+
- [ ] Are error messages clear without leaking sensitive info?
|
|
107
|
+
- [ ] Are critical operations logged for debugging?
|
|
108
|
+
- [ ] Is there graceful degradation on failure?
|
|
109
|
+
|
|
110
|
+
## Excluded (Covered by Guard)
|
|
111
|
+
|
|
112
|
+
These are checked by Guard or linters - don't duplicate:
|
|
113
|
+
- Core/Shell separation → Guard (forbidden_import, impure_call)
|
|
114
|
+
- Shell returns Result[T,E] → Guard (shell_result)
|
|
115
|
+
- Missing contracts → Guard (missing_contract)
|
|
116
|
+
- File/function size limits → Guard (file_size, function_size)
|
|
117
|
+
- Entry point thickness → Guard (entry_point_too_thick)
|
|
118
|
+
- Escape hatch count → Guard (review_suggested)
|
|
70
119
|
|
|
71
120
|
## Review-Fix Loop
|
|
72
121
|
|
|
@@ -110,7 +159,6 @@ Convergence check:
|
|
|
110
159
|
- [ ] Needs more work: [issues]
|
|
111
160
|
```
|
|
112
161
|
<!--/invar:skill-->
|
|
113
|
-
|
|
114
162
|
<!--invar:extensions-->
|
|
115
163
|
<!-- ========================================================================
|
|
116
164
|
EXTENSIONS REGION - USER EDITABLE
|