Commit Graph

8 Commits

Author SHA1 Message Date
2925ec4229 feat(contract-validator): add validate_workflow_integration tool (v5.7.1)
Domain Advisory Pattern Hardening - patch release to close gaps from v5.6.0/v5.7.0:

## Added
- New `validate_workflow_integration` MCP tool validates domain plugins expose
  required advisory interfaces (gate command, review command, advisory agent)
- New `MISSING_INTEGRATION` issue type for workflow integration validation
- New `WorkflowIntegrationResult` Pydantic model for structured validation output
- `integrates_with` field on viz-platform and data-platform in marketplace.json
  declaring projman integration metadata
- 4 new test cases for workflow integration validation

## Fixed
- scripts/setup.sh banner version updated from v5.1.0 to v5.7.1

## Documentation
- Updated mcp-tools-reference.md with new tool
- Updated validation-rules.md with Workflow Integration Checks section
- Added /design-gate, /design-review, /data-gate, /data-review to COMMANDS-CHEATSHEET
- Added contract-validator to CONFIGURATION.md plugin table
- Updated README.md Contract Validator tools table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:24:51 -05:00
6e90064160 fix(mcp): capture CLAUDE_PROJECT_DIR from PWD before cd
All MCP server run.sh scripts now capture the original working
directory as CLAUDE_PROJECT_DIR before changing to the script
directory. This fixes the branch detection issue where MCP tools
detected the plugin repo's branch instead of the user's project branch.

This is a follow-up fix to #231 - the original fix relied on
CLAUDE_PROJECT_DIR being set by Claude Code, but it isn't.
Now we capture it ourselves from PWD at startup time.

Closes #231 (proper fix)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:43:07 -05:00
e7050e2ad8 fix(mcp): use wrapper scripts instead of venv symlinks
Replace direct python path in .mcp.json with run.sh wrapper scripts
that automatically locate the venv in cache or local directory.

Problem: .venv symlinks are gitignored, causing them to be wiped on
every git operation. The SessionStart hook should recreate them but
this was unreliable, leading to repeated MCP server failures.

Solution: run.sh scripts that:
- First check ~/.cache/claude-mcp-venvs/leo-claude-mktplace/{server}/.venv
- Fallback to local .venv if exists
- Exit with helpful error if neither found

This eliminates dependency on symlinks entirely - the scripts are
tracked in git and will always be present after clone/pull/update.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:36:05 -05:00
d580464f4a test(contract-validator): add comprehensive tests (#193)
Add 34 tests across 3 test modules:
- test_parse_tools.py: 11 tests for README/CLAUDE.md parsing
- test_validation_tools.py: 11 tests for compatibility and agent validation
- test_report_tools.py: 12 tests for report generation and filtering

Coverage: parse_tools 79%, validation_tools 96%, report_tools 89%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:04:26 -05:00
0e9187c5a9 feat(contract-validator): implement report tools (#188)
Add report generation and issue listing tools:
- generate_compatibility_report: Full marketplace validation with
  markdown or JSON output, includes summary statistics
- list_issues: Filtered issue listing by severity and type

The report tools coordinate parse_tools and validation_tools to
scan all plugins in a marketplace, run pairwise compatibility
checks, and aggregate findings into comprehensive reports.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:54:03 -05:00
46af00019c feat(contract-validator): implement validation tools (#187)
Implement validate_compatibility, validate_agent_refs, and
validate_data_flow tools for cross-plugin validation.

validate_compatibility:
- Compares tool and command names between plugins
- Identifies naming conflicts (ERROR) and shared tools (WARNING)
- Found: data-platform and projman share /initial-setup command

validate_agent_refs:
- Checks agent tool references against available plugins
- Reports missing tools and undocumented references
- Supports optional plugin_paths for tool lookup

validate_data_flow:
- Validates data flow through agent tool sequences
- Checks producer/consumer patterns (e.g., data_ref)
- Extracts workflow steps from responsibilities

Issue types detected:
- missing_tool (ERROR)
- interface_mismatch (ERROR/WARNING)
- optional_dependency (WARNING)
- undeclared_output (WARNING/INFO)

Sprint: Sprint 2 - contract-validator Plugin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:50:12 -05:00
2b041cb771 feat(contract-validator): implement parse tools (#186)
Implement parse_plugin_interface and parse_claude_md_agents tools
for extracting structured data from plugin documentation.

parse_plugin_interface extracts:
- Plugin name and description
- Commands (from tables and ### headers)
- Agents (from Agents section tables)
- Tools (with categories from Tools Summary)
- Features list

parse_claude_md_agents extracts:
- Agent definitions from Four-Agent Model tables
- Agent personality and responsibilities
- Tool references in agent workflows

Tested on: projman (12 cmds), data-platform (7 cmds, 2 agents, 32 tools),
pr-review (3 cmds), code-sentinel (1 cmd), and CLAUDE.md (4 agents)

Sprint: Sprint 2 - contract-validator Plugin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:41:10 -05:00
0fc40d0fda feat(contract-validator): create plugin structure (#185)
Create the basic plugin structure for contract-validator:

Plugin structure:
- plugins/contract-validator/.claude-plugin/plugin.json
- plugins/contract-validator/.mcp.json
- plugins/contract-validator/mcp-servers/contract-validator -> symlink

MCP server scaffolding:
- mcp-servers/contract-validator/mcp_server/server.py (7 placeholder tools)
- mcp-servers/contract-validator/pyproject.toml
- mcp-servers/contract-validator/requirements.txt
- Virtual environment with mcp>=0.9.0

Tools defined (placeholders):
- parse_plugin_interface
- parse_claude_md_agents
- validate_compatibility
- validate_agent_refs
- validate_data_flow
- generate_compatibility_report
- list_issues

Sprint: Sprint 2 - contract-validator Plugin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:32:10 -05:00