invar-tools 1.6.0__tar.gz → 1.7.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.
- {invar_tools-1.6.0 → invar_tools-1.7.0}/PKG-INFO +1 -1
- invar_tools-1.7.0/docs/proposals/DX-69-project-uninstall.md +181 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/index.md +2 -1
- {invar_tools-1.6.0 → invar_tools-1.7.0}/pyproject.toml +1 -1
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/guard.py +2 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/init.py +8 -79
- invar_tools-1.7.0/src/invar/shell/commands/uninstall.py +341 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/templates.py +1 -70
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/commands/audit.md +6 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/commands/guard.md +6 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/pre-commit-config.yaml.template +2 -0
- invar_tools-1.6.0/.serena/cache/python/document_symbols.pkl +0 -0
- invar_tools-1.6.0/.serena/cache/python/raw_document_symbols.pkl +0 -0
- invar_tools-1.6.0/src/invar/templates/aider.conf.yml.template +0 -31
- invar_tools-1.6.0/src/invar/templates/cursorrules.template +0 -40
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.aider.conf.yml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/commands/audit.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/commands/guard.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/PostToolUse.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/PreToolUse.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/Stop.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/UserPromptSubmit.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/invar.PostToolUse.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/invar.PreToolUse.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/invar.Stop.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/hooks/invar.UserPromptSubmit.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/skills/develop/SKILL.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/skills/investigate/SKILL.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/skills/propose/SKILL.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.claude/skills/review/SKILL.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.cursorrules +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.github/workflows/ci.yml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.github/workflows/publish.yml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.gitignore +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/archive/sessions-2025-12.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/context.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/README.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/conftest.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/contracts.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/core_shell.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/functional.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/examples/workflow.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/mcp-setup.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/project-additions.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.invar/proposals/TEMPLATE.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.mcp.json +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.pre-commit-config.yaml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.serena/.gitignore +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/.serena/project.yml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/CLAUDE.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/INVAR.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/LICENSE +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/LICENSE-GPL +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/NOTICE +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/README.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/.nojekyll +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/agents.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/design.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/diagrams.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guide.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guides/aider.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guides/cline.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guides/continue.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guides/cursor.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/guides/multi-agent.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/decisions-2024.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/feedback/compliance-analysis.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/feedback/feedback-memo.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/feedback/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/original-vision.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/protocol-evolution.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/history/research/cruxeval-quick-validation.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/index.html +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/logo.svg +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-23-entry-point-detection.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-25-functional-patterns.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-29-pure-content-detection.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-37-coverage-integration.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-38-contract-quality-rules.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-39-workflow-efficiency.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-40-smart-tool-redirect-hook.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-41-automatic-review-orchestration.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-42-workflow-auto-routing.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-43-cross-platform-distribution.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-46-documentation-audit.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-48-code-structure-reorganization.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-49-protocol-distribution-unification.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-50-workflow-enforcement.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-51-workflow-phase-visibility.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-52-venv-dependency-injection.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-53-review-loop-effectiveness.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-54-agent-native-context-management.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-55-claude-init-conflict-resolution.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-56-template-sync-unification.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-60-structured-rules-ssot.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-61-functional-pattern-guidance.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-61-implementation-design.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-62-proactive-reference-reading.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-64-version-display-unification.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-65-single-file-guard.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-66-escape-hatch-visibility.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-67-explicit-skill-invocation.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/DX-68-agent-behavior-optimization.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/LX-01-multi-language-feasibility.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/LX-02-agent-portability-analysis.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/LX-04-pi-agent-support.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2024-12-21-guard-enhancements.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2024-12-21-language-inspired-enhancements.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2024-12-21-test-first-enhancement.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2025-12-21-dx-improvements.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2025-12-23-dx-20-property-testing-enhancements.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/2025-12-23-dx-21-package-and-init.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/AGENT-IMPROVEMENTS.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-11-documentation-restructure.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-12-hypothesis-fallback.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-13-incremental-prove.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-14-expanded-prove-usage.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-16-agent-tool-enforcement.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-17-workflow-enforcement.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-22-verification-strategy.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-24-mechanism-documentation.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-26-guard-simplification.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-27-system-prompt-protocol.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-28-semantic-verification.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-30-visible-workflow.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-31-adversarial-reviewer.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-32-workflow-iteration.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-33-verification-blind-spots.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-34-review-cycle.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-35-workflow-phase-separation.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-36-documentation-restructuring.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-45-template-consistency.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-47-command-skill-naming.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-57-claude-code-hooks.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-58-document-structure-optimization.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/DX-63-contracts-first-enforcement.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/proposals/completed/LX-03-multi-agent-support.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/agent-information-hierarchy.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/architecture/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/contracts/advanced.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/contracts/completeness.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/contracts/doctests.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/contracts/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/contracts/pre-post.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/documentation.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/proposal-workflow.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/rules/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/rules/severity.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/verification/crosshair-vs-hypothesis.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/verification/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/verification/smart-routing.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/workflow/index.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/workflow/session-start.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/reference/workflow/usbv.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/terminal-gif-guide.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/test-reports/DX-55-test-report.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/test-reports/DX-56-test-report.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/test-reports/DX-58-test-scenario.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/testing/v1.5.0-stress-test.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/testing/v1.5.0-test-report.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/testing/v1.5.0-workflow-compliance.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/docs/vision.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/LICENSE +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/README.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/pyproject.toml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/contracts.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/decorators.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/invariant.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/relations.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/runtime/src/invar_runtime/resource.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/scripts/smart-guard.sh +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/core/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/contracts.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/entry_points.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/extraction.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/format_specs.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/format_strategies.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/formatter.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/hypothesis_strategies.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/inspect.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/lambda_helpers.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/models.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/must_use.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/parser.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/detector.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/p0_exhaustive.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/p0_literal.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/p0_newtype.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/p0_nonempty.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/p0_validation.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/registry.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/patterns/types.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/postcondition_scope.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/property_gen.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/purity.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/purity_heuristics.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/references.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/review_trigger.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/rule_meta.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/rules.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/shell_analysis.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/shell_architecture.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/strategies.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/suggestions.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/sync_helpers.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/tautology.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/template_parser.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/timeout_inference.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/trivial_detection.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/utils.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/core/verification_routing.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/mcp/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/mcp/__main__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/mcp/server.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/py.typed +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/claude_hooks.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/hooks.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/merge.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/mutate.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/perception.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/sync_self.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/template_sync.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/test.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/commands/update.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/config.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/contract_coverage.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/coverage.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/fs.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/git.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/guard_helpers.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/guard_output.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/mcp_config.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/mutation.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/pattern_integration.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/property_tests.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/prove/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/prove/accept.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/prove/cache.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/prove/crosshair.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/prove/hypothesis.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/subprocess_env.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/template_engine.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/shell/testing.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/CLAUDE.md.template +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/config/CLAUDE.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/config/context.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/config/pre-commit.yaml.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/context.md.template +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/examples/README.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/examples/conftest.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/examples/contracts.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/examples/core_shell.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/examples/workflow.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/hooks/PostToolUse.sh.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/hooks/PreToolUse.sh.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/hooks/Stop.sh.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/hooks/UserPromptSubmit.sh.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/hooks/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/manifest.toml +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/proposal.md.template +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/protocol/INVAR.md +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/skills/develop/SKILL.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/skills/investigate/SKILL.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/skills/propose/SKILL.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/invar/templates/skills/review/SKILL.md.jinja +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/src/shell/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/conftest.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/integration/__init__.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/integration/test_cli_flags.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/integration/test_dx55_regression.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/integration/test_dx56_sync.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/tests/test_subprocess_env.py +0 -0
- {invar_tools-1.6.0 → invar_tools-1.7.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: invar-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.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
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# DX-69: Project Uninstall Command
|
|
2
|
+
|
|
3
|
+
**Status:** ✅ Complete
|
|
4
|
+
**Created:** 2024-12-30
|
|
5
|
+
**Author:** Claude
|
|
6
|
+
|
|
7
|
+
## Problem Statement
|
|
8
|
+
|
|
9
|
+
When users want to remove Invar from a project, there is no `invar uninstall` command. Users must manually identify and delete Invar-generated files, risking:
|
|
10
|
+
|
|
11
|
+
1. **Incomplete removal** - Missing files or leaving orphaned configurations
|
|
12
|
+
2. **Data loss** - Deleting files that contain user content mixed with Invar content
|
|
13
|
+
3. **Broken configurations** - Removing entire config files instead of just Invar sections
|
|
14
|
+
|
|
15
|
+
### Evidence
|
|
16
|
+
|
|
17
|
+
User request: "是否有命令可以从项目卸载 invar"
|
|
18
|
+
|
|
19
|
+
Current situation:
|
|
20
|
+
- No uninstall command exists
|
|
21
|
+
- Manual deletion risks user data loss
|
|
22
|
+
- Files like CLAUDE.md contain both Invar-managed and user regions
|
|
23
|
+
|
|
24
|
+
## Solution
|
|
25
|
+
|
|
26
|
+
### Design Principles
|
|
27
|
+
|
|
28
|
+
1. **Preserve user content** - Never delete user-added content
|
|
29
|
+
2. **Use markers for detection** - Only remove content with Invar markers
|
|
30
|
+
3. **Safe by default** - Require `--force` for destructive operations
|
|
31
|
+
4. **Dry-run support** - Show what would be removed without removing
|
|
32
|
+
|
|
33
|
+
### File Classification
|
|
34
|
+
|
|
35
|
+
| File | Detection Method | Removal Strategy |
|
|
36
|
+
|------|------------------|------------------|
|
|
37
|
+
| `.invar/` | Directory | Delete entirely |
|
|
38
|
+
| `invar.toml` | File | Delete entirely |
|
|
39
|
+
| `INVAR.md` | File | Delete entirely |
|
|
40
|
+
| `CLAUDE.md` | Region markers | Remove `<!--invar:critical-->`, `<!--invar:managed-->`, `<!--invar:project-->` regions, keep `<!--invar:user-->` |
|
|
41
|
+
| `.claude/skills/*/SKILL.md` | `_invar:` in YAML frontmatter | Delete if has marker |
|
|
42
|
+
| `.claude/commands/*.md` | `_invar:` in YAML frontmatter | Delete if has marker (need to add markers first) |
|
|
43
|
+
| `.claude/hooks/*.sh` | `# invar:hook` comment | Delete if has marker |
|
|
44
|
+
| `.mcp.json` | JSON structure | Remove `mcpServers.invar` key only |
|
|
45
|
+
| `.cursorrules` | `# invar:begin/end` markers | Remove marked region |
|
|
46
|
+
| `.aider.conf.yml` | `# invar:begin/end` markers | Remove marked region |
|
|
47
|
+
| `.pre-commit-config.yaml` | `# invar:begin/end` markers | Remove marked region |
|
|
48
|
+
| `src/core/`, `src/shell/` | Empty check | Delete if empty |
|
|
49
|
+
|
|
50
|
+
### Implementation Phases
|
|
51
|
+
|
|
52
|
+
#### Phase 1: Add Missing Markers
|
|
53
|
+
|
|
54
|
+
**Commands templates** - Add `_invar:` frontmatter:
|
|
55
|
+
```yaml
|
|
56
|
+
---
|
|
57
|
+
_invar:
|
|
58
|
+
version: "5.0"
|
|
59
|
+
type: command
|
|
60
|
+
---
|
|
61
|
+
# Audit
|
|
62
|
+
...
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Agent config templates** - Add region markers:
|
|
66
|
+
```yaml
|
|
67
|
+
# invar:begin
|
|
68
|
+
# Invar Protocol Configuration
|
|
69
|
+
...
|
|
70
|
+
# invar:end
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Phase 2: Implement Uninstall Command
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
@app.command()
|
|
77
|
+
def uninstall(
|
|
78
|
+
path: Path = typer.Argument(Path("."), help="Project path"),
|
|
79
|
+
dry_run: bool = typer.Option(False, "--dry-run", help="Show what would be removed"),
|
|
80
|
+
force: bool = typer.Option(False, "--force", help="Skip confirmation"),
|
|
81
|
+
keep_claude_md: bool = typer.Option(False, "--keep-claude-md", help="Don't touch CLAUDE.md"),
|
|
82
|
+
) -> None:
|
|
83
|
+
"""Remove Invar from a project."""
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### Phase 3: Region Removal Logic
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
def remove_invar_regions(content: str) -> str:
|
|
90
|
+
"""Remove <!--invar:xxx-->...<!--/invar:xxx--> regions except user region."""
|
|
91
|
+
patterns = [
|
|
92
|
+
(r'<!--invar:critical-->.*?<!--/invar:critical-->\n?', ''),
|
|
93
|
+
(r'<!--invar:managed[^>]*-->.*?<!--/invar:managed-->\n?', ''),
|
|
94
|
+
(r'<!--invar:project-->.*?<!--/invar:project-->\n?', ''),
|
|
95
|
+
(r'# invar:begin\n.*?# invar:end\n?', ''),
|
|
96
|
+
]
|
|
97
|
+
for pattern, replacement in patterns:
|
|
98
|
+
content = re.sub(pattern, replacement, content, flags=re.DOTALL)
|
|
99
|
+
return content
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### CLI Interface
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Preview what would be removed
|
|
106
|
+
invar uninstall --dry-run
|
|
107
|
+
|
|
108
|
+
# Perform uninstall with confirmation
|
|
109
|
+
invar uninstall
|
|
110
|
+
|
|
111
|
+
# Skip confirmation
|
|
112
|
+
invar uninstall --force
|
|
113
|
+
|
|
114
|
+
# Keep CLAUDE.md intact
|
|
115
|
+
invar uninstall --keep-claude-md
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Output Format
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Invar Uninstall Preview
|
|
122
|
+
=======================
|
|
123
|
+
|
|
124
|
+
Will DELETE:
|
|
125
|
+
.invar/ (directory)
|
|
126
|
+
invar.toml (config)
|
|
127
|
+
INVAR.md (protocol)
|
|
128
|
+
.claude/skills/develop/ (skill, has _invar marker)
|
|
129
|
+
.claude/skills/review/ (skill, has _invar marker)
|
|
130
|
+
.claude/commands/audit.md (command, has _invar marker)
|
|
131
|
+
.claude/hooks/*.sh (hooks, has invar:hook marker)
|
|
132
|
+
|
|
133
|
+
Will MODIFY:
|
|
134
|
+
CLAUDE.md (remove 3 invar regions, keep user region)
|
|
135
|
+
.mcp.json (remove mcpServers.invar)
|
|
136
|
+
.cursorrules (remove invar:begin..end block)
|
|
137
|
+
.aider.conf.yml (remove invar:begin..end block)
|
|
138
|
+
|
|
139
|
+
Will SKIP:
|
|
140
|
+
.claude/skills/custom/ (no _invar marker)
|
|
141
|
+
.claude/commands/my-cmd.md (no _invar marker)
|
|
142
|
+
|
|
143
|
+
Proceed? [y/N]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Alternatives Considered
|
|
147
|
+
|
|
148
|
+
### Alternative 1: Delete everything with "invar" in name
|
|
149
|
+
Rejected: Would miss CLAUDE.md regions, would delete user files containing "invar" string.
|
|
150
|
+
|
|
151
|
+
### Alternative 2: Track installed files in manifest
|
|
152
|
+
Rejected: Requires maintaining state file, complex when files are manually edited.
|
|
153
|
+
|
|
154
|
+
### Alternative 3: Marker-based detection (chosen)
|
|
155
|
+
Pros: Self-describing, no external state, works with manual edits.
|
|
156
|
+
Cons: Requires adding markers to templates first.
|
|
157
|
+
|
|
158
|
+
## Implementation Checklist
|
|
159
|
+
|
|
160
|
+
- [ ] Add `_invar:` marker to command templates (audit.md, guard.md)
|
|
161
|
+
- [ ] Add `# invar:begin/end` markers to agent config templates
|
|
162
|
+
- [ ] Implement `uninstall` command in `src/invar/shell/commands/`
|
|
163
|
+
- [ ] Add `--dry-run`, `--force`, `--keep-claude-md` options
|
|
164
|
+
- [ ] Handle JSON (`.mcp.json`) partial removal
|
|
165
|
+
- [ ] Handle YAML (`.aider.conf.yml`) partial removal
|
|
166
|
+
- [ ] Handle Markdown (`.cursorrules`) partial removal
|
|
167
|
+
- [ ] Clean empty directories (`src/core/`, `src/shell/`, `.claude/skills/`, etc.)
|
|
168
|
+
- [ ] Add tests
|
|
169
|
+
- [ ] Update `invar --help` and documentation
|
|
170
|
+
|
|
171
|
+
## Dependencies
|
|
172
|
+
|
|
173
|
+
None - standalone feature.
|
|
174
|
+
|
|
175
|
+
## Risk Assessment
|
|
176
|
+
|
|
177
|
+
| Risk | Mitigation |
|
|
178
|
+
|------|------------|
|
|
179
|
+
| Accidental data loss | `--dry-run` default preview, require `--force` or confirmation |
|
|
180
|
+
| Incomplete marker coverage | Phase 1 adds all missing markers before implementing uninstall |
|
|
181
|
+
| Edge cases in regex parsing | Comprehensive test coverage for region parsing |
|
|
@@ -8,12 +8,13 @@ This directory contains design proposals for Invar development.
|
|
|
8
8
|
- `LX-XX-name.md` — Language eXtension (multi-language evolution)
|
|
9
9
|
- Completed/archived proposals in `completed/` subdirectory
|
|
10
10
|
|
|
11
|
-
## Active Proposals (
|
|
11
|
+
## Active Proposals (10)
|
|
12
12
|
|
|
13
13
|
### DX Series (Developer Experience)
|
|
14
14
|
|
|
15
15
|
| ID | Name | Status | Description |
|
|
16
16
|
|----|------|--------|-------------|
|
|
17
|
+
| DX-69 | project-uninstall | ✅ Complete | `invar uninstall` command with marker-based detection |
|
|
17
18
|
| DX-68 | agent-behavior-optimization | Draft | Agent reading reliability improvements (P3-P5) |
|
|
18
19
|
| DX-67 | explicit-skill-invocation | **New** | Require Skill tool call for workflow routing |
|
|
19
20
|
| DX-62 | proactive-reference-reading | Partial | Task Router (Layer 1) done, Layers 2-4 pending |
|
|
@@ -521,9 +521,11 @@ from invar.shell.commands.init import init
|
|
|
521
521
|
from invar.shell.commands.mutate import mutate # DX-28
|
|
522
522
|
from invar.shell.commands.sync_self import sync_self # DX-49
|
|
523
523
|
from invar.shell.commands.test import test, verify
|
|
524
|
+
from invar.shell.commands.uninstall import uninstall # DX-69
|
|
524
525
|
from invar.shell.commands.update import update
|
|
525
526
|
|
|
526
527
|
app.command()(init)
|
|
528
|
+
app.command()(uninstall) # DX-69: Remove Invar from project
|
|
527
529
|
app.command()(update)
|
|
528
530
|
app.command()(test)
|
|
529
531
|
app.command()(verify)
|
|
@@ -38,8 +38,6 @@ from invar.shell.mcp_config import (
|
|
|
38
38
|
from invar.shell.template_engine import generate_from_manifest
|
|
39
39
|
from invar.shell.templates import (
|
|
40
40
|
add_config,
|
|
41
|
-
add_invar_reference,
|
|
42
|
-
create_agent_config,
|
|
43
41
|
create_directories,
|
|
44
42
|
detect_agent_configs,
|
|
45
43
|
install_hooks,
|
|
@@ -65,18 +63,17 @@ def run_claude_init(path: Path) -> bool:
|
|
|
65
63
|
|
|
66
64
|
console.print("\n[bold]Running claude /init...[/bold]")
|
|
67
65
|
try:
|
|
66
|
+
# Don't capture output - claude /init is interactive and needs user input
|
|
68
67
|
result = subprocess.run(
|
|
69
68
|
["claude", "/init"],
|
|
70
69
|
cwd=path,
|
|
71
|
-
capture_output=True,
|
|
72
|
-
text=True,
|
|
73
70
|
timeout=120,
|
|
74
71
|
)
|
|
75
72
|
if result.returncode == 0:
|
|
76
73
|
console.print("[green]claude /init completed successfully[/green]")
|
|
77
74
|
return True
|
|
78
75
|
else:
|
|
79
|
-
console.print(
|
|
76
|
+
console.print("[yellow]Warning:[/yellow] claude /init failed")
|
|
80
77
|
return False
|
|
81
78
|
except subprocess.TimeoutExpired:
|
|
82
79
|
console.print("[yellow]Warning:[/yellow] claude /init timed out")
|
|
@@ -86,57 +83,6 @@ def run_claude_init(path: Path) -> bool:
|
|
|
86
83
|
return False
|
|
87
84
|
|
|
88
85
|
|
|
89
|
-
def append_invar_reference_to_claude_md(path: Path) -> bool:
|
|
90
|
-
"""
|
|
91
|
-
Append Invar reference to existing CLAUDE.md.
|
|
92
|
-
|
|
93
|
-
Preserves content generated by 'claude /init'.
|
|
94
|
-
Returns True if modified, False otherwise.
|
|
95
|
-
"""
|
|
96
|
-
claude_md = path / "CLAUDE.md"
|
|
97
|
-
if not claude_md.exists():
|
|
98
|
-
return False
|
|
99
|
-
|
|
100
|
-
content = claude_md.read_text()
|
|
101
|
-
if "INVAR.md" in content:
|
|
102
|
-
console.print("[dim]CLAUDE.md already references INVAR.md[/dim]")
|
|
103
|
-
return False
|
|
104
|
-
|
|
105
|
-
# Append reference at the end
|
|
106
|
-
invar_reference = """
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Invar Protocol
|
|
111
|
-
|
|
112
|
-
> **Protocol:** Follow [INVAR.md](./INVAR.md) — includes Check-In, USBV workflow, and Task Completion.
|
|
113
|
-
|
|
114
|
-
### Check-In
|
|
115
|
-
|
|
116
|
-
Your first message MUST display:
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
✓ Check-In: [project] | [branch] | [clean/dirty]
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Read `.invar/context.md` first. Do NOT run guard/map at Check-In.
|
|
123
|
-
|
|
124
|
-
### Final
|
|
125
|
-
|
|
126
|
-
Your last message MUST display:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
✓ Final: guard PASS | 0 errors, 2 warnings
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Execute `invar guard` and show this one-line summary.
|
|
133
|
-
"""
|
|
134
|
-
|
|
135
|
-
claude_md.write_text(content + invar_reference)
|
|
136
|
-
console.print("[green]Updated[/green] CLAUDE.md (added Invar reference)")
|
|
137
|
-
return True
|
|
138
|
-
|
|
139
|
-
|
|
140
86
|
# @shell_complexity: MCP config with method selection and validation
|
|
141
87
|
def configure_mcp_with_method(
|
|
142
88
|
path: Path, mcp_method: str | None
|
|
@@ -312,11 +258,9 @@ def init(
|
|
|
312
258
|
return
|
|
313
259
|
|
|
314
260
|
# DX-21B: Run claude /init if requested (before sync)
|
|
261
|
+
# DX-69: sync_templates() will merge claude's CLAUDE.md with invar template
|
|
315
262
|
if claude:
|
|
316
|
-
|
|
317
|
-
if claude_success:
|
|
318
|
-
# Append Invar reference to generated CLAUDE.md
|
|
319
|
-
append_invar_reference_to_claude_md(path)
|
|
263
|
+
run_claude_init(path)
|
|
320
264
|
|
|
321
265
|
config_result = add_config(path, console)
|
|
322
266
|
if isinstance(config_result, Failure):
|
|
@@ -371,28 +315,13 @@ def init(
|
|
|
371
315
|
if isinstance(result, Success) and result.unwrap():
|
|
372
316
|
console.print("[green]Created[/green] .invar/proposals/TEMPLATE.md")
|
|
373
317
|
|
|
374
|
-
# Agent detection
|
|
318
|
+
# Agent detection (DX-69: simplified, only Claude Code supported)
|
|
375
319
|
console.print("\n[bold]Checking for agent configurations...[/bold]")
|
|
376
320
|
agent_result = detect_agent_configs(path)
|
|
377
|
-
if isinstance(agent_result,
|
|
378
|
-
console.print(f"[yellow]Warning:[/yellow] {agent_result.failure()}")
|
|
379
|
-
agent_status: dict[str, str] = {}
|
|
380
|
-
else:
|
|
321
|
+
if isinstance(agent_result, Success):
|
|
381
322
|
agent_status = agent_result.unwrap()
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
for agent, status in agent_status.items():
|
|
385
|
-
if status == "configured":
|
|
386
|
-
console.print(f" [green]✓[/green] {agent}: already configured")
|
|
387
|
-
elif status == "found":
|
|
388
|
-
# Existing file without Invar reference - ask before modifying
|
|
389
|
-
if yes or typer.confirm(f" Add Invar reference to {agent} config?", default=True):
|
|
390
|
-
add_invar_reference(path, agent, console)
|
|
391
|
-
else:
|
|
392
|
-
console.print(f" [yellow]○[/yellow] {agent}: skipped")
|
|
393
|
-
elif status == "not_found":
|
|
394
|
-
# Create full template with workflow enforcement (DX-17)
|
|
395
|
-
create_agent_config(path, agent, console)
|
|
323
|
+
if agent_status.get("claude") == "configured":
|
|
324
|
+
console.print(" [green]✓[/green] claude: already configured")
|
|
396
325
|
|
|
397
326
|
# Configure MCP server (DX-16, DX-21B)
|
|
398
327
|
configure_mcp_with_method(path, mcp_method)
|