Commit Graph

494 Commits

Author SHA1 Message Date
eb85ea31bb feat(data-platform): add schema diff detection hook (#228)
Implements PostToolUse hook to warn about potentially breaking schema changes:
- DROP COLUMN/TABLE/INDEX detection
- Column type changes (ALTER TYPE, MODIFY COLUMN)
- NOT NULL constraint additions
- RENAME operations
- ORM model field removals

Non-blocking - outputs warnings only.
Configurable via DATA_PLATFORM_SCHEMA_WARN env var.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:38:26 -05:00
8627d9e968 Merge pull request 'development' (#224) from development into main
Reviewed-on: #224
2026-01-27 20:16:30 +00:00
3da9adf44e Merge pull request 'docs: sync documentation with code changes for v5.1.0' (#223) from docs/sync-documentation-v5.1.0 into development
Reviewed-on: #223
2026-01-27 20:16:17 +00:00
bcb24ae641 docs: sync documentation with code changes for v5.1.0
Changes applied:
- Updated version references from 5.0.0 to 5.1.0 (CLAUDE.md, CANONICAL-PATHS.md, setup.sh)
- Added missing projman commands to README.md (/suggest-version, /proposal-status)
- Added missing cmdb-assistant commands to README.md (/cmdb-audit, /cmdb-register, /cmdb-sync)
- Added /proposal-status to projman section in COMMANDS-CHEATSHEET.md
- Added 3 cmdb-assistant commands to COMMANDS-CHEATSHEET.md
- Added /suggest-version documentation to plugins/projman/README.md
- Added 4 missing scripts to CANONICAL-PATHS.md (verify-hooks.sh, setup-venvs.sh, venv-repair.sh, release.sh)

Fixes 14 documentation drift issues identified by /doc-guardian:doc-audit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:12:11 -05:00
c8ede3c30b Merge pull request 'development' (#222) from development into main
Reviewed-on: #222
2026-01-27 19:58:14 +00:00
fb1c664309 Merge pull request 'fix(post-update): clear Claude plugin cache on update' (#221) from fix/clear-plugin-cache-on-update into development
Reviewed-on: #221
2026-01-27 19:57:59 +00:00
90f19dfc0f fix(post-update): clear Claude plugin cache on update
The Claude plugin cache at ~/.claude/plugins/cache/leo-claude-mktplace/
holds versioned copies of .mcp.json files. When we update .mcp.json
to use run.sh instead of direct python paths, the cache retains old
versions, causing MCP servers to fail.

Now post-update.sh clears this cache, forcing Claude to read fresh
configs from the installed marketplace on next session start.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:55:42 -05:00
75492b0d38 Merge pull request 'development' (#220) from development into main
Reviewed-on: #220
2026-01-27 19:42:17 +00:00
54bb347ee1 Merge pull request 'fix(gitea-mcp): add fix/* and other branch patterns to permissions' (#219) from fix/branch-permission-patterns into development
Reviewed-on: #219
2026-01-27 19:42:02 +00:00
51bcc26ea9 fix(gitea-mcp): add fix/* and other branch patterns to permissions
The branch permission check was only allowing feat/, feature/, and dev/
prefixes for write operations. This blocked PR creation from fix/*
branches, forcing fallback to direct API calls.

Added patterns:
- fix/, bugfix/, hotfix/ - for bug fixes
- chore/, refactor/ - for maintenance
- docs/, test/ - for documentation and tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:41:18 -05:00
d813147ca7 Merge pull request 'development' (#218) from development into main
Reviewed-on: #218
2026-01-27 19:38:48 +00:00
dbb6d46fa4 Merge pull request 'fix(mcp): use wrapper scripts instead of venv symlinks' (#217) from fix/mcp-venv-wrapper-scripts into development
Reviewed-on: #217
2026-01-27 19:38:31 +00: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
206f1c378e Merge pull request 'development' (#216) from development into main
Reviewed-on: #216
2026-01-27 17:34:34 +00:00
35380594b4 Merge pull request 'feat(cmdb-assistant): add data quality validation v1.1.0' (#215) from feat/cmdb-assistant-data-quality into development
Reviewed-on: #215
2026-01-27 17:34:19 +00:00
0055c9ecf2 feat(gitea-mcp): add create_pull_request tool
Add missing create_pull_request tool to Gitea MCP server. This completes
the PR lifecycle - previously only had list/get/review/comment tools.

- Add create_pull_request to GiteaClient
- Add async wrapper to PullRequestTools with branch permissions
- Register tool in server.py with proper schema
- Parameters: title, body, head, base, labels (optional)
- Branch-aware security: only allowed on development/feature branches

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:30:48 -05:00
a74a048898 feat(cmdb-assistant): add data quality validation v1.1.0
Add validation hooks, best practices skill, and new commands to enforce
NetBox data quality standards:

Hooks:
- SessionStart: Test NetBox connectivity, report data quality issues
- PreToolUse: Validate VM/device parameters before create/update

New Commands:
- /cmdb-audit: Data quality analysis (vms, devices, naming, roles)
- /cmdb-register: Register current machine with running applications
- /cmdb-sync: Sync machine state with NetBox, detect drift

Best Practices Skill:
- Dependency order (regions -> sites -> devices -> VMs)
- Site/tenant/platform assignment requirements
- Naming conventions enforcement
- Role consolidation guidance

Updated agent with validation requirements, dependency order checks,
naming convention warnings, and duplicate prevention.

Marketplace: 5.0.0 -> 5.1.0
Plugin: 1.0.0 -> 1.1.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:27:23 -05:00
37676d4645 Merge pull request 'development' (#214) from development into main
Reviewed-on: #214
2026-01-27 16:57:12 +00:00
7492cfad66 Merge pull request 'fix(post-update): use venv-repair for instant symlink restoration' (#213) from fix/post-update-venv-repair into development
Reviewed-on: #213
2026-01-27 16:56:52 +00:00
59db9ea0b0 fix(post-update): use venv-repair for instant symlink restoration
Replace the old approach (create venvs in marketplace directory) with
the new venv-repair.sh approach (symlinks to external cache).

This ensures post-update.sh:
- Instantly restores symlinks if cache exists
- Only does full pip install on first run
- Works correctly after marketplace updates

Flow after this fix:
  Update marketplace → post-update.sh → venv-repair → Session works

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:55:43 -05:00
9234cf1add Merge pull request 'development' (#212) from development into main
Reviewed-on: #212
2026-01-27 16:49:33 +00:00
a21199d3db Merge pull request 'fix(mcp): persistent venv cache survives marketplace updates' (#211) from fix/persistent-venv-cache into development
Reviewed-on: #211
2026-01-27 16:49:19 +00:00
1abda1ca0f fix(mcp): persistent venv cache survives marketplace updates
Problem:
- Venvs in marketplace directory got deleted on every update
- Users had to manually run setup.sh and wait for full pip install
- This caused MCP servers to fail until manually fixed

Solution:
- Store venvs in external cache (~/.cache/claude-mcp-venvs/)
- Auto-repair symlinks via SessionStart hook (instant operation)
- Only run pip install on first use or when requirements change

Architecture:
  Cache (runtime) → Marketplaces → External venv cache

  The chain of symlinks ensures all three locations work:
  1. ~/.claude/plugins/cache/.../mcp-servers/* (runtime)
  2. ~/.claude/plugins/marketplaces/.../mcp-servers/* (install)
  3. ~/.cache/claude-mcp-venvs/* (persistent venvs)

Performance:
- First install: ~2-3 min (unchanged)
- After marketplace update: 0.03 sec (was 2-3 min)

Files:
- scripts/venv-repair.sh: Fast symlink restoration for hooks
- scripts/setup-venvs.sh: Full setup with external cache
- plugins/projman/hooks/startup-check.sh: Auto-repair on session start
- .gitignore: Ignore .venv symlinks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:48:13 -05:00
0118bc7b9b Merge pull request 'development' (#210) from development into main
Reviewed-on: #210
2026-01-27 15:51:57 +00:00
bbb822db16 Merge pull request 'fix(post-update): create missing venvs instead of just warning' (#209) from fix/post-update-create-venvs into development
Reviewed-on: #209
2026-01-27 15:51:39 +00:00
08e1dcb1f5 fix(post-update): create missing venvs instead of just warning
Previously post-update.sh would only warn when venvs were missing,
requiring a separate setup.sh run. Now it automatically creates
missing venvs and installs dependencies including editable packages.

Also added viz-platform and contract-validator to the update list.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 10:41:04 -05:00
ec7141a5aa Merge pull request 'development' (#208) from development into main
Reviewed-on: #208
2026-01-26 22:27:33 +00:00
1b029d97b8 Merge pull request 'fix/data-platform-filter-index' (#207) from fix/data-platform-filter-index into development
Reviewed-on: #207
2026-01-26 22:27:19 +00:00
4ed3ed7e14 fix(data-platform): reset index after filter to prevent extra column
The filter tool was adding an __index_level_0__ column to results
because pandas query() preserves the original index, which gets
converted to a column when storing the DataFrame.

Added .reset_index(drop=True) after query() to drop the preserved
index and create a clean sequential index.

Fixes #203

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:25:37 -05:00
c5232bd7bf Merge pull request 'development' (#202) from development into main
Reviewed-on: #202
2026-01-26 21:49:08 +00:00
f9e23fd6eb Merge pull request 'fix/setup-editable-install' (#201) from fix/setup-editable-install into development
Reviewed-on: #201
2026-01-26 21:48:50 +00:00
457ed9c9ff fix(setup): install MCP packages in editable mode for viz-platform and contract-validator
The setup script only installed requirements.txt dependencies but not the
local package itself, causing MCP servers to fail with ModuleNotFoundError.

Changes:
- Add `pip install -e .` for servers with pyproject.toml
- Add viz-platform and contract-validator to MCP server setup
- Add symlink verification for new plugins
- Update version banner to v5.0.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:44:11 -05:00
dadb4d3576 Merge pull request 'Merge development into main: contract-validator setup docs' (#200) from development into main 2026-01-26 20:57:23 +00:00
ba771f100f Merge pull request 'docs: add contract-validator initial-setup and update version tags' (#199) from docs/contract-validator-setup into development 2026-01-26 20:57:09 +00:00
2b9cb5defd docs: add contract-validator initial-setup and update version tags
- Add /initial-setup command for contract-validator plugin
- Add contract-validator section to README.md (NEW in v5.0.0)
- Update data-platform version tag: *NEW* -> *NEW in v4.0.0*
- Update viz-platform version tag: *NEW* -> *NEW in v4.0.0*
- Add Contract Validator MCP Server section to README.md
- Add contract-validator to test commands table and repo structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:55:17 -05:00
34227126c2 Merge pull request 'Release v5.0.0' (#198) from development into main v5.0.0 2026-01-26 20:29:28 +00:00
ef94602eba Merge pull request 'chore: release v5.0.0 - version updates' (#197) from release/v5.0.0 into development 2026-01-26 20:29:05 +00:00
155e7be399 chore: release v5.0.0
- Update version to 5.0.0 in README.md, marketplace.json, CLAUDE.md
- Convert [Unreleased] to [5.0.0] in CHANGELOG.md
- Add contract-validator to CANONICAL-PATHS.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:28:27 -05:00
1fb9e6cece Merge pull request 'Release: Merge development into main (Sprint 2 - contract-validator v5.0.0)' (#196) from development into main 2026-01-26 20:24:46 +00:00
f2cf082ba8 Merge pull request 'feat(contract-validator): Complete Sprint 2 - Contract Validator Plugin' (#195) from feat/193-tests into development 2026-01-26 20:22:41 +00: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
fe6b354ee2 chore(contract-validator): marketplace integration (#192)
- Add contract-validator to marketplace.json with proper metadata
- Update CLAUDE.md plugin table and commands list
- Validation passes with ./scripts/validate-marketplace.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:00:09 -05:00
ec965dc8ee docs(contract-validator): create documentation (#191)
Add comprehensive plugin documentation:
- README.md: Plugin overview, problem statement, tool docs,
  example workflows, issue types, best practices
- claude-md-integration.md: CLAUDE.md snippets, interface
  documentation standards, CI/CD integration guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:58:34 -05:00
cb07a382ea feat(contract-validator): create agents (#190)
Add 2 autonomous agents:
- full-validation: Complete cross-plugin compatibility validation
  triggered by /validate-contracts command
- agent-check: Single agent definition validation triggered
  by /check-agent command

Each agent documents capabilities, workflow, validation rules,
and example interactions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:57:15 -05:00
8f450c0e7b feat(contract-validator): create commands (#189)
Add 3 user-facing commands:
- /validate-contracts: Full marketplace compatibility validation
- /check-agent: Validate single agent definition
- /list-interfaces: Show plugin interfaces summary

Each command documents usage, workflow, parameters, and available
MCP tools for implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:55:58 -05:00
fdee539371 Merge feat/188-report-tools: implement report tools 2026-01-26 14:54:24 -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