43 Commits

Author SHA1 Message Date
8fe685037e Merge pull request 'perf(hooks): Sprint 8 - Hook Efficiency Quick Wins' (#334) from feat/sprint-8-hook-efficiency into development
Reviewed-on: #334
2026-01-30 18:24:40 +00:00
c9276d983b docs(changelog): add Sprint 8 hook efficiency changes to Unreleased
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:22:12 -05:00
63327ecf65 perf(hooks): improve hook efficiency with early exits and cooldowns
Sprint 8 - Hook Efficiency Quick Wins (v5.5.0)

- Remove viz-platform SessionStart hook (zero value, just echoed "loaded")
- Add early git check to git-flow branch-check.sh (skip JSON parsing for non-git commands)
- Add early git check to git-flow commit-msg-check.sh (skip Python spawn for non-commit commands)
- Add 60-second cooldown to project-hygiene cleanup.sh (reduce find operations)

Closes #321, #322, #323, #324

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:19:03 -05:00
3839575272 Merge pull request 'fix(projman): add YAML frontmatter and remove unsupported model fields' (#332) from fix/projman-command-frontmatter into development
Reviewed-on: #332
2026-01-30 17:15:37 +00:00
11d77ebe84 revert: remove unsupported defaultModel and model fields
Claude Code rejects `defaultModel` in plugin.json and `model` in agent
frontmatter with "Unrecognized key" validation error.

Removed:
- defaultModel from 6 plugin.json files
- model from 7 agent frontmatter files
- docs/MODEL-RECOMMENDATIONS.md (deleted)
- Model config sections from CONFIGURATION.md and CLAUDE.md
- Model validation from validate-marketplace.sh

This reverts Sprint 7 (v5.4.0) multi-model feature that was never
supported by Claude Code's plugin schema.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:09:38 -05:00
e190eb8b28 Merge pull request 'fix(projman): add missing YAML frontmatter to command files' (#329) from fix/projman-command-frontmatter into development
Reviewed-on: #329
2026-01-30 16:49:20 +00:00
c81c4a9981 fix(projman): add missing YAML frontmatter to command files
clear-cache.md and suggest-version.md were missing the required YAML
frontmatter with description field. This caused Claude Code to skip
loading the entire projman plugin's commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:45:56 -05:00
45af713366 Merge pull request 'fix(hooks): remove all venv auto-repair code that deleted .venv directories' (#327) from fix/remove-venv-auto-repair into development
Reviewed-on: #327
2026-01-30 16:34:58 +00:00
9550a85f4d fix(hooks): remove all venv auto-repair code that deleted .venv directories
BREAKING: Removes automatic venv management that was causing session failures

Changes:
- Delete scripts/venv-repair.sh (was deleting and recreating venvs)
- Remove auto-repair code from projman/hooks/startup-check.sh
- Remove venv-repair call from scripts/post-update.sh
- Remove rm -rf .venv instructions from docs/UPDATING.md and CONFIGURATION.md
- Update docs/CANONICAL-PATHS.md to remove venv-repair.sh reference

Additionally:
- Add Pre-Change Protocol to CLAUDE.md (mandatory dependency check before edits)
- Add Pre-Change Protocol enforcement to claude-config-maintainer plugin
- Add Development Context section to CLAUDE.md clarifying which plugins are
  used in this project vs only being developed
- Reorganize commands table to separate relevant vs non-relevant commands

The venv auto-repair was the root cause of repeated MCP server failures,
requiring manual setup.sh runs after every session start.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:33:25 -05:00
e1d7ec46ae Merge pull request 'fix(plugins): remove broken mcpServers references that broke plugin loading' (#325) from fix/remove-broken-mcp-references into development
Reviewed-on: #325
2026-01-29 23:10:25 +00:00
c8b91f6a87 fix(plugins): remove broken mcpServers references that broke plugin loading
The MCP consolidation commit (afd4c44) deleted plugin-level .mcp.json files
but left references to them in plugin.json and marketplace.json. This caused
7 plugins to fail loading (projman, pr-review, cmdb-assistant, data-platform,
viz-platform, contract-validator, and indirectly git-flow/clarity-assist).

Changes:
- Remove mcpServers field from 6 plugin.json files (file no longer exists)
- Remove mcpServers field from 6 marketplace.json entries
- Add file reference validation to validate-marketplace.sh:
  - Validates mcpServers references point to existing files
  - Validates hooks references point to existing files
  - Validates commands references point to existing paths
- Add pre-commit hook (.git/hooks/pre-commit) to enforce validation

The validation script will now FAIL if any config file references a
non-existent file, preventing this class of bug from happening again.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:09:08 -05:00
ce106ace8a Merge pull request 'fix(mcp): consolidate all MCP servers at marketplace root' (#319) from fix/consolidate-mcp-servers into development
Reviewed-on: #319
2026-01-29 17:12:51 +00:00
afd4c44d11 fix(mcp): consolidate all MCP servers at marketplace root
Move all MCP server declarations from individual plugin .mcp.json files
to a single .mcp.json at the marketplace root. This fixes MCP loading
failures where only one plugin's MCP would load.

- Add .mcp.json at marketplace root with all 5 servers
- Remove plugin-level .mcp.json files (projman, pr-review, cmdb-assistant,
  data-platform, viz-platform, contract-validator)
- Update CLAUDE.md to reflect new architecture

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:12:08 -05:00
7c3a2ac31c Merge pull request 'fix(projman): remove automatic cache clearing from session start hook' (#317) from fix/remove-auto-cache-clear into development
Reviewed-on: #317
2026-01-29 16:59:53 +00:00
e0ab4c2ddf fix(projman): remove automatic cache clearing from session start hook
The startup-check.sh hook was clearing ~/.claude/plugins/cache/ at every
session start, which was aggressive and potentially disruptive. Cache
clearing is now a manual operation via the new /clear-cache command.

Changes:
- Remove automatic cache clearing from startup-check.sh
- Add /clear-cache command for manual cache clearing when needed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:58:31 -05:00
5f82f8ebbd Merge pull request 'fix(gitea-mcp): accept string or integer for numeric params' (#315) from fix/mcp-integer-type-coercion into development
Reviewed-on: #315
2026-01-29 03:20:10 +00:00
b492a13702 fix(gitea-mcp): accept string or integer for numeric params
MCP library validates schema BEFORE call_tool handler runs, so
our _coerce_types function never gets a chance to convert strings.

Changed all integer fields to accept both types:
- issue_number, milestone_id, pr_number, depends_on, milestone, limit, position

This fixes: "Input validation error: '312' is not of type 'integer'"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:17:19 -05:00
5aaab4cb9a Merge pull request 'fix(doc-guardian): make hook silent by default' (#313) from fix/312-doc-guardian-silent-hook into development
Reviewed-on: #313
2026-01-29 03:12:40 +00:00
3c3b3b4575 fix(doc-guardian): make hook silent by default
- Remove all output by default to prevent workflow interruption
- Queue changes silently to .doc-guardian-queue
- Add file+type deduplication (same file won't be queued twice)
- Add DOC_GUARDIAN_VERBOSE=1 env var for opt-in notifications
- Users run /doc-sync or /doc-audit to process queue

Fixes #312 (partial - addresses issues 1, 2, 3)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:12:09 -05:00
6e9b703151 Merge pull request 'chore: release v5.4.0' (#310) from chore/release-v5.4.0 into development
Reviewed-on: #310
2026-01-29 03:02:36 +00:00
b603743811 chore: release v5.4.0
- CHANGELOG.md: [Unreleased] → [5.4.0] - 2026-01-28
- README.md: title → v5.4.0
- marketplace.json: version → 5.4.0
- CLAUDE.md: version → 5.4.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:00:58 -05:00
a63ccc079d Merge pull request 'chore: add Sprint 7 changelog and fix version table' (#309) from chore/sprint-7-changelog into development
Reviewed-on: #309
2026-01-29 02:59:12 +00:00
d4481ec09f chore: add Sprint 7 changelog and fix version table
- Add [Unreleased] section with Sprint 7 multi-model support changes
- Fix CLAUDE.md plugin version table to match actual plugin.json files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:58:10 -05:00
50951378f7 Merge pull request '[Sprint 7] feat: add model field validation to marketplace script' (#308) from feat/306-model-validation into development
Reviewed-on: #308
2026-01-29 02:56:24 +00:00
b3975c2f4f Merge pull request '[Sprint 7] feat: add defaultModel to plugin manifests' (#307) from feat/305-plugin-defaults into development
Reviewed-on: #307
2026-01-29 02:56:08 +00:00
8a95e061ad feat: add model field validation to marketplace script
Add validation for:
- defaultModel field in plugin.json (must be opus|sonnet|haiku)
- model field in agent frontmatter (must be opus|sonnet|haiku)

The validation passes when fields are absent (optional) but errors
if present with invalid values.

Fixes #306

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:55:16 -05:00
4983cc9feb feat: add defaultModel to plugin manifests
Add defaultModel: sonnet to all plugin manifests that have agents,
establishing the plugin-level default in the model inheritance chain.

Version bumps:
- projman: 3.2.0 → 3.3.0 (minor: new feature)
- pr-review: 1.0.0 → 1.1.0 (minor: new feature)
- data-platform: 1.0.0 → 1.1.0 (minor: new feature)
- viz-platform: 1.0.0 → 1.1.0 (minor: new feature)
- code-sentinel: 1.0.0 → 1.0.1 (patch: config addition)
- contract-validator: 1.0.0 → 1.1.0 (minor: new feature)

Fixes #305

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:53:36 -05:00
cf4d1b595c feat: add model:haiku to validation agents
- viz-platform/component-check.md - simple prop validation
- contract-validator/agent-check.md - quick verification

Fixes #304

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:52:02 -05:00
5aff53972e feat: add model:opus to critical reasoning agents
- projman/planner.md - architecture decisions
- projman/code-reviewer.md - quality review
- pr-review/security-reviewer.md - security analysis
- code-sentinel/security-reviewer.md - security scanning
- data-platform/data-analysis.md - complex data insights

Fixes #303

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:51:20 -05:00
d429319392 docs: add model recommendations documentation
- Create docs/MODEL-RECOMMENDATIONS.md with task-type guidance
- Update docs/CONFIGURATION.md with model configuration section
- Update CLAUDE.md with agent model configuration overview

Fixes #302

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:48:17 -05:00
5b1b0f609c Merge pull request 'fix(git-flow): use array format for hooks.json' (#300) from fix/git-flow-hooks-format into development
Reviewed-on: #300
2026-01-29 02:25:49 +00:00
0acd42ea65 fix(git-flow): use array format for hooks.json
Changed from nested object format to array format to fix
"PreToolUse:Bash hook error" with no message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:24:52 -05:00
8c1890c258 Merge pull request 'docs: add protected branch rule to CLAUDE.md' (#298) from docs/add-protected-branch-rule into development
Reviewed-on: #298
2026-01-29 02:18:34 +00:00
e44d97edc2 docs: add protected branch rule to CLAUDE.md
NEVER push directly to development/main. Always use feature branch + PR.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:16:36 -05:00
dc96207da7 Merge pull request 'docs: consolidate CLAUDE.md redundant rules sections' (#295) from docs/claude-md-optimization into development
Reviewed-on: #295
2026-01-29 02:14:43 +00:00
c998c0a2dc Merge pull request 'docs(projman): add warning about manual issue closing in debug-review' (#294) from docs/debug-review-manual-close-warning into development
Reviewed-on: #294
2026-01-29 02:14:26 +00:00
14633736aa docs: add mandatory CLI tools prohibition rule
NEVER use gh, tea, curl to APIs, or any CLI for external services.
MCP tools are the ONLY allowed method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:11:28 -05:00
af46046bc8 docs: consolidate CLAUDE.md rules sections
Merged two overlapping rules sections into one unified section:
- "MANDATORY BEHAVIOR RULES" + "CRITICAL: Rules" → "RULES"
- Converted verbose lists to scannable tables
- Reduced from 381 to 332 lines (-13%)
- All rules preserved, just better organized

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:02:33 -05:00
f669479122 docs(projman): add warning about manual issue closing in debug-review
PRs merged to development don't trigger Gitea's auto-close feature
(only merges to main do). Added warnings in Steps 13 and 15 to remind
about mandatory manual issue closing after PR merge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:53:30 -05:00
d457e458a8 Merge pull request 'feat(projman): add SessionStart version sync check' (#292) from fix/issue-290-version-sync-check into development
Reviewed-on: #292
2026-01-29 01:41:17 +00:00
7c4959fb77 feat(projman): add SessionStart version sync check
Adds early detection of version drift between README.md, marketplace.json,
and CHANGELOG.md at session start. When versions don't match, displays
a warning and suggests running /suggest-version to analyze and fix.

This addresses acceptance criteria #4 from issue #290:
- [x] SessionStart warns about version drift

Remaining criteria for future PRs:
- [ ] Version mismatch detected before commit (PreToolUse hook)
- [ ] /sprint-close includes version bump step (enforcement)
- [ ] Release workflow works with protected branches (PR creation)

Partial fix for #290

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:39:49 -05:00
ba4db941ab Merge pull request 'fix(doc-guardian): use passive wording and add debouncing to reduce interruptions' (#291) from fix/issue-287-doc-guardian-hook-wording into development
Reviewed-on: #291
2026-01-29 01:34:43 +00:00
1dad393eaf fix(doc-guardian): use passive wording and add debouncing to reduce interruptions
The PostToolUse hook was causing workflow interruptions because:
1. Actionable language ("update needed") triggered Claude to seek confirmation
2. Rapid edits (4+ in sequence) generated multiple notifications

Changes:
- Message changed from "update needed" to "drift queued" (passive, informational)
- Added 5-second debouncing: same-type edits within window are silently queued
- Added queue clearing step to doc-sync.md command

Note: Issue #287 also mentions URL restriction behavior, but this was not
found in the current codebase - may have been a different component or
already fixed. Marking as partial fix.

Fixes #287

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:32:46 -05:00
45 changed files with 650 additions and 452 deletions

View File

@@ -6,7 +6,7 @@
}, },
"metadata": { "metadata": {
"description": "Project management plugins with Gitea and NetBox integrations", "description": "Project management plugins with Gitea and NetBox integrations",
"version": "5.3.0" "version": "5.4.0"
}, },
"plugins": [ "plugins": [
{ {
@@ -20,7 +20,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/projman/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/projman/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "development", "category": "development",
"tags": ["sprint", "agile", "gitea", "project-management"], "tags": ["sprint", "agile", "gitea", "project-management"],
"license": "MIT" "license": "MIT"
@@ -84,7 +83,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/cmdb-assistant/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/cmdb-assistant/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "infrastructure", "category": "infrastructure",
"tags": ["cmdb", "netbox", "dcim", "ipam", "data-quality", "validation"], "tags": ["cmdb", "netbox", "dcim", "ipam", "data-quality", "validation"],
"license": "MIT" "license": "MIT"
@@ -145,7 +143,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/pr-review/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/pr-review/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "development", "category": "development",
"tags": ["code-review", "pull-requests", "security", "quality"], "tags": ["code-review", "pull-requests", "security", "quality"],
"license": "MIT" "license": "MIT"
@@ -161,7 +158,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/data-platform/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/data-platform/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "data", "category": "data",
"tags": ["pandas", "postgresql", "postgis", "dbt", "data-engineering", "etl"], "tags": ["pandas", "postgresql", "postgis", "dbt", "data-engineering", "etl"],
"license": "MIT" "license": "MIT"
@@ -177,7 +173,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/viz-platform/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/viz-platform/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "visualization", "category": "visualization",
"tags": ["dash", "plotly", "mantine", "charts", "dashboards", "theming", "dmc"], "tags": ["dash", "plotly", "mantine", "charts", "dashboards", "theming", "dmc"],
"license": "MIT" "license": "MIT"
@@ -193,7 +188,6 @@
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/contract-validator/README.md", "homepage": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/src/branch/main/plugins/contract-validator/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git", "repository": "https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git",
"mcpServers": ["./.mcp.json"],
"category": "development", "category": "development",
"tags": ["validation", "contracts", "compatibility", "agents", "interfaces", "cross-plugin"], "tags": ["validation", "contracts", "compatibility", "agents", "interfaces", "cross-plugin"],
"license": "MIT" "license": "MIT"

24
.mcp.json Normal file
View File

@@ -0,0 +1,24 @@
{
"mcpServers": {
"gitea": {
"command": "/home/lmiranda/.claude/plugins/marketplaces/leo-claude-mktplace/mcp-servers/gitea/run.sh",
"args": []
},
"netbox": {
"command": "/home/lmiranda/.claude/plugins/marketplaces/leo-claude-mktplace/mcp-servers/netbox/run.sh",
"args": []
},
"viz-platform": {
"command": "/home/lmiranda/.claude/plugins/marketplaces/leo-claude-mktplace/mcp-servers/viz-platform/run.sh",
"args": []
},
"data-platform": {
"command": "/home/lmiranda/.claude/plugins/marketplaces/leo-claude-mktplace/mcp-servers/data-platform/run.sh",
"args": []
},
"contract-validator": {
"command": "/home/lmiranda/.claude/plugins/marketplaces/leo-claude-mktplace/mcp-servers/contract-validator/run.sh",
"args": []
}
}
}

View File

@@ -4,6 +4,59 @@ All notable changes to the Leo Claude Marketplace will be documented in this fil
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Changed
#### Sprint 8: Hook Efficiency Quick Wins
Performance optimizations for plugin hooks to reduce overhead on every command.
**Changes:**
- **viz-platform:** Remove SessionStart hook that only echoed "loaded" (zero value)
- **git-flow:** Add early exit to `branch-check.sh` for non-git commands (skip JSON parsing)
- **git-flow:** Add early exit to `commit-msg-check.sh` for non-git commands (skip Python spawn)
- **project-hygiene:** Add 60-second cooldown to `cleanup.sh` (reduce find operations)
**Impact:** Hooks now exit immediately for 90%+ of Bash commands that don't need processing.
**Issues:** #321, #322, #323, #324
**PR:** #334
---
## [5.4.1] - 2026-01-30
### Removed
#### Multi-Model Agent Support (REVERTED)
**Reason:** Claude Code does not support `defaultModel` in plugin.json or `model` in agent frontmatter. The schema validation rejects these as "Unrecognized key".
**Removed:**
- `defaultModel` field from all plugin.json files (6 plugins)
- `model` field references from agent frontmatter
- `docs/MODEL-RECOMMENDATIONS.md` - Deleted entirely
- Model configuration sections from `docs/CONFIGURATION.md` and `CLAUDE.md`
**Lesson:** Do not implement features without verifying they are supported by Claude Code's plugin schema.
---
## [5.4.0] - 2026-01-28 [REVERTED]
### Added (NOW REMOVED - See 5.4.1)
#### Sprint 7: Multi-Model Agent Support
~~Configurable model selection for agents with inheritance chain.~~
**This feature was reverted in 5.4.1 - Claude Code does not support these fields.**
Original sprint work:
- Issues: #302, #303, #304, #305, #306
- PRs: #307, #308
---
## [5.3.0] - 2026-01-28 ## [5.3.0] - 2026-01-28
### Added ### Added

203
CLAUDE.md
View File

@@ -1,56 +1,120 @@
# CLAUDE.md # CLAUDE.md
This file provides guidance to Claude Code when working with code in this repository. This file provides guidance to Claude Code when working with code in this repository.
## ⛔ MANDATORY BEHAVIOR RULES - READ FIRST
**These rules are NON-NEGOTIABLE. Violating them wastes the user's time and money.** ## ⛔ RULES - READ FIRST
### 1. WHEN USER ASKS YOU TO CHECK SOMETHING - CHECK EVERYTHING ### Behavioral Rules
- Search ALL locations, not just where you think it is
- Check cache directories: `~/.claude/plugins/cache/`
- Check installed: `~/.claude/plugins/marketplaces/`
- Check source: `~/claude-plugins-work/`
- **NEVER say "no" or "that's not the issue" without exhaustive verification**
### 2. WHEN USER SAYS SOMETHING IS WRONG - BELIEVE THEM | Rule | Summary |
- The user knows their system better than you |------|---------|
- Investigate thoroughly before disagreeing | **Check everything** | Search cache (`~/.claude/plugins/cache/`), installed (`~/.claude/plugins/marketplaces/`), and source (`~/claude-plugins-work/`) |
- If user suspects cache, CHECK THE CACHE | **Believe the user** | User knows their system. Investigate before disagreeing. |
- If user suspects a file, READ THE FILE | **Verify before "done"** | Run commands, show output, check all locations. "Done" = verified working. |
- **Your confidence is often wrong. User's instincts are often right.** | **Show what's asked** | Don't interpret or summarize unless asked. |
### 3. NEVER SAY "DONE" WITHOUT VERIFICATION ### After Plugin Updates
- Run the actual command/script to verify
- Show the output to the user
- Check ALL affected locations
- **"Done" means VERIFIED WORKING, not "I made changes"**
### 4. SHOW EXACTLY WHAT USER ASKS FOR Run `./scripts/verify-hooks.sh`. If changes affect MCP servers or hooks, inform user to restart session.
- If user asks for messages, show the MESSAGES **DO NOT clear cache mid-session** - breaks loaded MCP tools.
- If user asks for code, show the CODE
- If user asks for output, show the OUTPUT
- **Don't interpret or summarize unless asked**
### 5. AFTER PLUGIN UPDATES - VERIFY AND RESTART ### NEVER USE CLI TOOLS FOR EXTERNAL SERVICES
- **FORBIDDEN:** `gh`, `tea`, `curl` to APIs, any CLI that talks to Gitea/GitHub/external services
- **REQUIRED:** Use MCP tools exclusively (`mcp__plugin_projman_gitea__*`, `mcp__plugin_pr-review_gitea__*`)
- **NO EXCEPTIONS.** Don't try CLI first. Don't fall back to CLI. MCP ONLY.
**⚠️ DO NOT clear cache mid-session** - this breaks MCP tools that are already loaded. ### NEVER PUSH DIRECTLY TO PROTECTED BRANCHES
- **FORBIDDEN:** `git push origin development`, `git push origin main`, `git push origin master`
- **REQUIRED:** Create feature branch → push feature branch → create PR via MCP
- If you accidentally commit to a protected branch locally: `git checkout -b fix/branch-name` then reset the protected branch
1. Run `./scripts/verify-hooks.sh` to check hook types ### Repository Rules
2. If changes affect MCP servers or hooks, inform the user:
> "Plugin changes require a session restart to take effect. Please restart Claude Code."
3. Cache clearing is ONLY safe **before** starting a new session (not during)
See `docs/DEBUGGING-CHECKLIST.md` for details on cache timing. | Rule | Details |
|------|---------|
| **File creation** | Only in allowed paths. Use `.scratch/` for temp work. Verify against `docs/CANONICAL-PATHS.md` |
| **plugin.json location** | Must be in `.claude-plugin/` directory |
| **Hooks** | Use `hooks/hooks.json` (auto-discovered). Never inline in plugin.json |
| **MCP servers** | Shared at root with symlinks. Use MCP tools, never CLI (`tea`, `gh`) |
| **Allowed root files** | `CLAUDE.md`, `README.md`, `LICENSE`, `CHANGELOG.md`, `.gitignore`, `.env.example` |
**FAILURE TO FOLLOW THESE RULES = WASTED USER TIME = UNACCEPTABLE** **Valid hook events:** `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Notification`, `Stop`, `SubagentStop`, `PreCompact`
### ⛔ MANDATORY: Before Any Code Change
**Claude MUST show this checklist BEFORE editing any file:**
#### 1. Impact Search Results
Run and show output of:
```bash
grep -rn "PATTERN" --include="*.sh" --include="*.md" --include="*.json" --include="*.py" | grep -v ".git"
```
#### 2. Files That Will Be Affected
Numbered list of every file to be modified, with the specific change for each.
#### 3. Files Searched But Not Changed (and why)
Proof that related files were checked and determined unchanged.
#### 4. Documentation That References This
List of docs that mention this feature/script/function.
**User verifies this list before Claude proceeds. If Claude skips this, STOP IMMEDIATELY.**
#### After Changes
Run the same grep and show results proving no references remain unaddressed.
--- ---
## ⚠️ Development Context: We Build AND Use These Plugins
**This is a self-referential project.** We are:
1. **BUILDING** a plugin marketplace (source code in `plugins/`)
2. **USING** the installed marketplace to build it (dogfooding)
### Plugins ACTIVELY USED in This Project
These plugins are installed and should be used during development:
| Plugin | Used For |
|--------|----------|
| **projman** | Sprint planning, issue management, lessons learned |
| **git-flow** | Commits, branch management |
| **pr-review** | Pull request reviews |
| **doc-guardian** | Documentation drift detection |
| **code-sentinel** | Security scanning, refactoring |
| **clarity-assist** | Prompt clarification |
| **claude-config-maintainer** | CLAUDE.md optimization |
| **contract-validator** | Cross-plugin compatibility |
### Plugins NOT Used Here (Development Only)
These plugins exist in source but are **NOT relevant** to this project's workflow:
| Plugin | Why Not Used |
|--------|--------------|
| **data-platform** | For data engineering projects (pandas, PostgreSQL, dbt) |
| **viz-platform** | For dashboard projects (Dash, Plotly) |
| **cmdb-assistant** | For infrastructure projects (NetBox) |
**Do NOT suggest** `/ingest`, `/profile`, `/chart`, `/cmdb-*` commands - they don't apply here.
### Key Distinction
| Context | Path | What To Do |
|---------|------|------------|
| **Editing plugin source** | `~/claude-plugins-work/plugins/` | Modify code, add features |
| **Using installed plugins** | `~/.claude/plugins/marketplaces/` | Run commands like `/sprint-plan` |
When user says "run /sprint-plan", use the INSTALLED plugin.
When user says "fix the sprint-plan command", edit the SOURCE code.
---
## Project Overview ## Project Overview
**Repository:** leo-claude-mktplace **Repository:** leo-claude-mktplace
**Version:** 5.3.0 **Version:** 5.4.0
**Status:** Production Ready **Status:** Production Ready
A plugin marketplace for Claude Code containing: A plugin marketplace for Claude Code containing:
@@ -58,16 +122,16 @@ A plugin marketplace for Claude Code containing:
| Plugin | Description | Version | | Plugin | Description | Version |
|--------|-------------|---------| |--------|-------------|---------|
| `projman` | Sprint planning and project management with Gitea integration | 3.3.0 | | `projman` | Sprint planning and project management with Gitea integration | 3.3.0 |
| `git-flow` | Git workflow automation with smart commits and branch management | 1.2.0 | | `git-flow` | Git workflow automation with smart commits and branch management | 1.0.0 |
| `pr-review` | Multi-agent PR review with confidence scoring | 1.1.0 | | `pr-review` | Multi-agent PR review with confidence scoring | 1.1.0 |
| `clarity-assist` | Prompt optimization with ND-friendly accommodations | 1.2.0 | | `clarity-assist` | Prompt optimization with ND-friendly accommodations | 1.0.0 |
| `doc-guardian` | Automatic documentation drift detection and synchronization | 1.1.0 | | `doc-guardian` | Automatic documentation drift detection and synchronization | 1.0.0 |
| `code-sentinel` | Security scanning and code refactoring tools | 1.0.0 | | `code-sentinel` | Security scanning and code refactoring tools | 1.0.1 |
| `claude-config-maintainer` | CLAUDE.md optimization and maintenance | 1.1.0 | | `claude-config-maintainer` | CLAUDE.md optimization and maintenance | 1.0.0 |
| `cmdb-assistant` | NetBox CMDB integration for infrastructure management | 1.2.0 | | `cmdb-assistant` | NetBox CMDB integration for infrastructure management | 1.2.0 |
| `data-platform` | pandas, PostgreSQL, and dbt integration for data engineering | 1.2.0 | | `data-platform` | pandas, PostgreSQL, and dbt integration for data engineering | 1.1.0 |
| `viz-platform` | DMC validation, Plotly charts, and theming for dashboards | 1.1.0 | | `viz-platform` | DMC validation, Plotly charts, and theming for dashboards | 1.1.0 |
| `contract-validator` | Cross-plugin compatibility validation and agent verification | 1.2.0 | | `contract-validator` | Cross-plugin compatibility validation and agent verification | 1.1.0 |
| `project-hygiene` | Post-task cleanup automation via hooks | 0.1.0 | | `project-hygiene` | Post-task cleanup automation via hooks | 0.1.0 |
## Quick Start ## Quick Start
@@ -80,7 +144,7 @@ A plugin marketplace for Claude Code containing:
./scripts/post-update.sh # Rebuild venvs, verify symlinks ./scripts/post-update.sh # Rebuild venvs, verify symlinks
``` ```
### Plugin Commands by Category ### Plugin Commands - USE THESE in This Project
| Category | Commands | | Category | Commands |
|----------|----------| |----------|----------|
@@ -92,12 +156,19 @@ A plugin marketplace for Claude Code containing:
| **Docs** | `/doc-audit`, `/doc-sync`, `/changelog-gen`, `/doc-coverage`, `/stale-docs` | | **Docs** | `/doc-audit`, `/doc-sync`, `/changelog-gen`, `/doc-coverage`, `/stale-docs` |
| **Security** | `/security-scan`, `/refactor`, `/refactor-dry` | | **Security** | `/security-scan`, `/refactor`, `/refactor-dry` |
| **Config** | `/config-analyze`, `/config-optimize`, `/config-diff`, `/config-lint` | | **Config** | `/config-analyze`, `/config-optimize`, `/config-diff`, `/config-lint` |
| **Data** | `/ingest`, `/profile`, `/schema`, `/explain`, `/lineage`, `/lineage-viz`, `/run`, `/dbt-test`, `/data-quality` |
| **Visualization** | `/component`, `/chart`, `/chart-export`, `/dashboard`, `/theme`, `/theme-new`, `/theme-css`, `/accessibility-check`, `/breakpoints` |
| **Validation** | `/validate-contracts`, `/check-agent`, `/list-interfaces`, `/dependency-graph` | | **Validation** | `/validate-contracts`, `/check-agent`, `/list-interfaces`, `/dependency-graph` |
| **CMDB** | `/cmdb-search`, `/cmdb-device`, `/cmdb-ip`, `/cmdb-site`, `/cmdb-audit`, `/cmdb-register`, `/cmdb-sync`, `/cmdb-topology`, `/change-audit`, `/ip-conflicts` |
| **Debug** | `/debug-report`, `/debug-review` | | **Debug** | `/debug-report`, `/debug-review` |
### Plugin Commands - NOT RELEVANT to This Project
These commands are being developed but don't apply to this project's workflow:
| Category | Commands | For Projects Using |
|----------|----------|-------------------|
| **Data** | `/ingest`, `/profile`, `/schema`, `/lineage`, `/dbt-test` | pandas, PostgreSQL, dbt |
| **Visualization** | `/component`, `/chart`, `/dashboard`, `/theme` | Dash, Plotly dashboards |
| **CMDB** | `/cmdb-search`, `/cmdb-device`, `/cmdb-sync` | NetBox infrastructure |
## Repository Structure ## Repository Structure
``` ```
@@ -112,7 +183,7 @@ leo-claude-mktplace/
├── plugins/ ├── plugins/
│ ├── projman/ # Sprint management │ ├── projman/ # Sprint management
│ │ ├── .claude-plugin/plugin.json │ │ ├── .claude-plugin/plugin.json
│ │ ├── .mcp.json │ │ # .mcp.json removed - now at marketplace root
│ │ ├── mcp-servers/gitea -> ../../../mcp-servers/gitea # SYMLINK │ │ ├── mcp-servers/gitea -> ../../../mcp-servers/gitea # SYMLINK
│ │ ├── commands/ # 14 commands (incl. setup, debug, suggest-version) │ │ ├── commands/ # 14 commands (incl. setup, debug, suggest-version)
│ │ ├── hooks/ # SessionStart: mismatch detection + sprint suggestions │ │ ├── hooks/ # SessionStart: mismatch detection + sprint suggestions
@@ -124,7 +195,7 @@ leo-claude-mktplace/
│ │ └── agents/ │ │ └── agents/
│ ├── pr-review/ # Multi-agent PR review │ ├── pr-review/ # Multi-agent PR review
│ │ ├── .claude-plugin/plugin.json │ │ ├── .claude-plugin/plugin.json
│ │ ├── .mcp.json │ │ # .mcp.json removed - now at marketplace root
│ │ ├── mcp-servers/gitea -> ../../../mcp-servers/gitea # SYMLINK │ │ ├── mcp-servers/gitea -> ../../../mcp-servers/gitea # SYMLINK
│ │ ├── commands/ # 6 commands (incl. setup) │ │ ├── commands/ # 6 commands (incl. setup)
│ │ ├── hooks/ # SessionStart mismatch detection │ │ ├── hooks/ # SessionStart mismatch detection
@@ -135,14 +206,14 @@ leo-claude-mktplace/
│ │ └── agents/ │ │ └── agents/
│ ├── data-platform/ # Data engineering (NEW v4.0.0) │ ├── data-platform/ # Data engineering (NEW v4.0.0)
│ │ ├── .claude-plugin/plugin.json │ │ ├── .claude-plugin/plugin.json
│ │ ├── .mcp.json │ │ # .mcp.json removed - now at marketplace root
│ │ ├── mcp-servers/ # pandas, postgresql, dbt MCPs │ │ ├── mcp-servers/ # pandas, postgresql, dbt MCPs
│ │ ├── commands/ # 7 commands │ │ ├── commands/ # 7 commands
│ │ ├── hooks/ # SessionStart PostgreSQL check │ │ ├── hooks/ # SessionStart PostgreSQL check
│ │ └── agents/ # 2 agents │ │ └── agents/ # 2 agents
│ ├── viz-platform/ # Visualization (NEW v4.0.0) │ ├── viz-platform/ # Visualization (NEW v4.0.0)
│ │ ├── .claude-plugin/plugin.json │ │ ├── .claude-plugin/plugin.json
│ │ ├── .mcp.json │ │ # .mcp.json removed - now at marketplace root
│ │ ├── mcp-servers/ # viz-platform MCP │ │ ├── mcp-servers/ # viz-platform MCP
│ │ ├── commands/ # 7 commands │ │ ├── commands/ # 7 commands
│ │ ├── hooks/ # SessionStart DMC check │ │ ├── hooks/ # SessionStart DMC check
@@ -162,40 +233,6 @@ leo-claude-mktplace/
└── CONFIGURATION.md # Centralized configuration guide └── CONFIGURATION.md # Centralized configuration guide
``` ```
## CRITICAL: Rules You MUST Follow
### File Operations
- **NEVER** create files in repository root unless listed in "Allowed Root Files"
- **NEVER** modify `.gitignore` without explicit permission
- **ALWAYS** use `.scratch/` for temporary/exploratory work
- **ALWAYS** verify paths against `docs/CANONICAL-PATHS.md` before creating files
### Plugin Development
- **plugin.json MUST be in `.claude-plugin/` directory** (not plugin root)
- **Every plugin MUST be listed in marketplace.json**
- **MCP servers are SHARED at root** with symlinks from plugins
- **MCP server venv path**: `${CLAUDE_PLUGIN_ROOT}/mcp-servers/{name}/.venv/bin/python`
- **CLI tools forbidden** - Use MCP tools exclusively (never `tea`, `gh`, etc.)
#### ⚠️ plugin.json Format Rules (CRITICAL)
- **Hooks in separate file** - Use `hooks/hooks.json` (auto-discovered), NOT inline in plugin.json
- **NEVER reference hooks** - Don't add `"hooks": "..."` field to plugin.json at all
- **Agents auto-discover** - NEVER add `"agents": ["./agents/"]` - .md files found automatically
- **Always validate** - Run `./scripts/validate-marketplace.sh` before committing
- **Working examples:** projman, pr-review, claude-config-maintainer all use `hooks/hooks.json`
- See lesson: `lessons/patterns/plugin-manifest-validation---hooks-and-agents-format-requirements`
### Hooks (Valid Events Only)
`PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Notification`, `Stop`, `SubagentStop`, `PreCompact`
**INVALID:** `task-completed`, `file-changed`, `git-commit-msg-needed`
### Allowed Root Files
`CLAUDE.md`, `README.md`, `LICENSE`, `CHANGELOG.md`, `.gitignore`, `.env.example`
### Allowed Root Directories
`.claude/`, `.claude-plugin/`, `.claude-plugins/`, `.scratch/`, `docs/`, `hooks/`, `mcp-servers/`, `plugins/`, `scripts/`
## Architecture ## Architecture
### Four-Agent Model (projman) ### Four-Agent Model (projman)
@@ -377,4 +414,4 @@ The script will:
--- ---
**Last Updated:** 2026-01-28 **Last Updated:** 2026-01-30

View File

@@ -1,4 +1,4 @@
# Leo Claude Marketplace - v5.3.0 # Leo Claude Marketplace - v5.4.0
A collection of Claude Code plugins for project management, infrastructure automation, and development workflows. A collection of Claude Code plugins for project management, infrastructure automation, and development workflows.

View File

@@ -163,12 +163,11 @@ leo-claude-mktplace/
│ └── claude-md-integration.md │ └── claude-md-integration.md
├── scripts/ # Setup and maintenance scripts ├── scripts/ # Setup and maintenance scripts
│ ├── setup.sh # Initial setup (create venvs, config templates) │ ├── setup.sh # Initial setup (create venvs, config templates)
│ ├── post-update.sh # Post-update (rebuild venvs, verify symlinks) │ ├── post-update.sh # Post-update (clear cache, show changelog)
│ ├── check-venv.sh # Check if venvs exist (for hooks) │ ├── check-venv.sh # Check if venvs exist (read-only)
│ ├── validate-marketplace.sh # Marketplace compliance validation │ ├── validate-marketplace.sh # Marketplace compliance validation
│ ├── verify-hooks.sh # Verify all hooks use correct event types │ ├── verify-hooks.sh # Verify all hooks use correct event types
│ ├── setup-venvs.sh # Setup/repair MCP server venvs │ ├── setup-venvs.sh # Setup MCP server venvs (create only, never delete)
│ ├── venv-repair.sh # Repair broken venv symlinks
│ └── release.sh # Release automation with version bumping │ └── release.sh # Release automation with version bumping
├── CLAUDE.md ├── CLAUDE.md
├── README.md ├── README.md

View File

@@ -501,9 +501,8 @@ If you get 401, regenerate your token in Gitea.
# Check venv exists # Check venv exists
ls /path/to/mcp-servers/gitea/.venv ls /path/to/mcp-servers/gitea/.venv
# Reinstall if missing # If missing, create venv (do NOT delete existing venvs)
cd /path/to/mcp-servers/gitea cd /path/to/mcp-servers/gitea
rm -rf .venv
python3 -m venv .venv python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt

View File

@@ -132,10 +132,8 @@ When updating, review if changes affect the setup workflow:
### Dependencies fail to install ### Dependencies fail to install
```bash ```bash
# Rebuild virtual environment # Install missing dependencies (do NOT delete .venv)
cd mcp-servers/gitea cd mcp-servers/gitea
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
deactivate deactivate

View File

@@ -144,7 +144,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue number" "description": "Issue number"
}, },
"repo": { "repo": {
@@ -189,7 +189,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue number" "description": "Issue number"
}, },
"title": { "title": {
@@ -211,7 +211,7 @@ class GiteaMCPServer:
"description": "New labels" "description": "New labels"
}, },
"milestone": { "milestone": {
"type": "integer", "type": ["integer", "string"],
"description": "Milestone ID to assign" "description": "Milestone ID to assign"
}, },
"repo": { "repo": {
@@ -229,7 +229,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue number" "description": "Issue number"
}, },
"comment": { "comment": {
@@ -424,7 +424,7 @@ class GiteaMCPServer:
"description": "Tags to filter by (optional)" "description": "Tags to filter by (optional)"
}, },
"limit": { "limit": {
"type": "integer", "type": ["integer", "string"],
"default": 20, "default": 20,
"description": "Maximum results" "description": "Maximum results"
}, },
@@ -462,7 +462,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"milestone_id": { "milestone_id": {
"type": "integer", "type": ["integer", "string"],
"description": "Milestone ID" "description": "Milestone ID"
}, },
"repo": { "repo": {
@@ -506,7 +506,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"milestone_id": { "milestone_id": {
"type": "integer", "type": ["integer", "string"],
"description": "Milestone ID" "description": "Milestone ID"
}, },
"title": { "title": {
@@ -541,7 +541,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"milestone_id": { "milestone_id": {
"type": "integer", "type": ["integer", "string"],
"description": "Milestone ID" "description": "Milestone ID"
}, },
"repo": { "repo": {
@@ -560,7 +560,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue number" "description": "Issue number"
}, },
"repo": { "repo": {
@@ -578,11 +578,11 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue that will depend on another" "description": "Issue that will depend on another"
}, },
"depends_on": { "depends_on": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue that blocks issue_number" "description": "Issue that blocks issue_number"
}, },
"repo": { "repo": {
@@ -600,11 +600,11 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"issue_number": { "issue_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue that depends on another" "description": "Issue that depends on another"
}, },
"depends_on": { "depends_on": {
"type": "integer", "type": ["integer", "string"],
"description": "Issue being depended on" "description": "Issue being depended on"
}, },
"repo": { "repo": {
@@ -782,7 +782,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"pr_number": { "pr_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Pull request number" "description": "Pull request number"
}, },
"repo": { "repo": {
@@ -800,7 +800,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"pr_number": { "pr_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Pull request number" "description": "Pull request number"
}, },
"repo": { "repo": {
@@ -818,7 +818,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"pr_number": { "pr_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Pull request number" "description": "Pull request number"
}, },
"repo": { "repo": {
@@ -836,7 +836,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"pr_number": { "pr_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Pull request number" "description": "Pull request number"
}, },
"body": { "body": {
@@ -855,7 +855,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"path": {"type": "string"}, "path": {"type": "string"},
"position": {"type": "integer"}, "position": {"type": ["integer", "string"]},
"body": {"type": "string"} "body": {"type": "string"}
} }
}, },
@@ -876,7 +876,7 @@ class GiteaMCPServer:
"type": "object", "type": "object",
"properties": { "properties": {
"pr_number": { "pr_number": {
"type": "integer", "type": ["integer", "string"],
"description": "Pull request number" "description": "Pull request number"
}, },
"body": { "body": {

View File

@@ -277,6 +277,39 @@ Every CLAUDE.md should have:
1. **Project Overview** - What is this? 1. **Project Overview** - What is this?
2. **Quick Start** - How do I build/test/run? 2. **Quick Start** - How do I build/test/run?
3. **Important Rules** - What must I NOT do? 3. **Important Rules** - What must I NOT do?
4. **Pre-Change Protocol** - Mandatory dependency check before code changes
### Pre-Change Protocol Section (MANDATORY)
**This section is REQUIRED in every CLAUDE.md.** It ensures Claude performs comprehensive dependency analysis before making any code changes.
```markdown
## ⛔ MANDATORY: Before Any Code Change
**Claude MUST show this checklist BEFORE editing any file:**
### 1. Impact Search Results
Run and show output of:
```bash
grep -rn "PATTERN" --include="*.sh" --include="*.md" --include="*.json" --include="*.py" | grep -v ".git"
```
### 2. Files That Will Be Affected
Numbered list of every file to be modified, with the specific change for each.
### 3. Files Searched But Not Changed (and why)
Proof that related files were checked and determined unchanged.
### 4. Documentation That References This
List of docs that mention this feature/script/function.
**User verifies this list before Claude proceeds. If Claude skips this, stop immediately.**
### After Changes
Run the same grep and show results proving no references remain unaddressed.
```
**When analyzing a CLAUDE.md, flag as HIGH priority issue if this section is missing.**
### Optional Sections (as needed) ### Optional Sections (as needed)

View File

@@ -59,6 +59,7 @@ Analyze the CLAUDE.md file in this project
- Quick start commands documented - Quick start commands documented
- Critical rules highlighted - Critical rules highlighted
- Key workflows covered - Key workflows covered
- **Pre-Change Protocol section present** (MANDATORY - see below)
### Conciseness (25 points) ### Conciseness (25 points)
- No unnecessary repetition - No unnecessary repetition
@@ -66,6 +67,42 @@ Analyze the CLAUDE.md file in this project
- Appropriate length for project size - Appropriate length for project size
- No generic filler content - No generic filler content
## Pre-Change Protocol Check (MANDATORY)
**This check is CRITICAL.** The Pre-Change Protocol section ensures Claude performs comprehensive dependency analysis before making any code changes, preventing missed references and incomplete updates.
### What to Check
Search CLAUDE.md for:
- Section header containing "Pre-Change" or "Before Any Code Change"
- References to `grep -rn` or impact search
- Checklist with "Files That Will Be Affected"
- Requirement for user verification before proceeding
### If Missing
**Flag as HIGH PRIORITY issue:**
```
1. [HIGH] Missing Pre-Change Protocol section
CLAUDE.md lacks mandatory dependency-check protocol.
Impact: Claude may miss file references when making changes,
leading to broken dependencies and incomplete updates.
Recommendation: Add Pre-Change Protocol section immediately.
This is the #1 cause of cascading bugs from incomplete changes.
```
### Required Section Content
The Pre-Change Protocol section must include:
1. Requirement to run grep search and show results
2. List of files that will be affected
3. List of files searched but not changed (with reasoning)
4. Documentation that references the change target
5. User verification checkpoint before proceeding
6. Post-change verification step
## Plugin Integration Analysis ## Plugin Integration Analysis
After the content analysis, the command detects and analyzes marketplace plugin integration: After the content analysis, the command detects and analyzes marketplace plugin integration:

View File

@@ -139,6 +139,7 @@ For small projects or when starting fresh:
- Project Overview (required) - Project Overview (required)
- Quick Start (required) - Quick Start (required)
- Critical Rules (required) - Critical Rules (required)
- **Pre-Change Protocol (required)**
### Standard Template (default) ### Standard Template (default)
For typical projects: For typical projects:
@@ -146,6 +147,7 @@ For typical projects:
- Quick Start - Quick Start
- Architecture - Architecture
- Critical Rules - Critical Rules
- **Pre-Change Protocol**
- Common Operations - Common Operations
- File Structure - File Structure
@@ -153,11 +155,44 @@ For typical projects:
For large or complex projects: For large or complex projects:
- All standard sections plus: - All standard sections plus:
- Detailed Architecture - Detailed Architecture
- **Pre-Change Protocol**
- Troubleshooting - Troubleshooting
- Integration Points - Integration Points
- Development Workflow - Development Workflow
- Deployment Notes - Deployment Notes
### Pre-Change Protocol Section (MANDATORY in ALL templates)
**This section MUST be included in every generated CLAUDE.md:**
```markdown
## ⛔ MANDATORY: Before Any Code Change
**Claude MUST show this checklist BEFORE editing any file:**
### 1. Impact Search Results
Run and show output of:
\`\`\`bash
grep -rn "PATTERN" --include="*.sh" --include="*.md" --include="*.json" --include="*.py" | grep -v ".git"
\`\`\`
### 2. Files That Will Be Affected
Numbered list of every file to be modified, with the specific change for each.
### 3. Files Searched But Not Changed (and why)
Proof that related files were checked and determined unchanged.
### 4. Documentation That References This
List of docs that mention this feature/script/function.
**User verifies this list before Claude proceeds. If Claude skips this, stop immediately.**
### After Changes
Run the same grep and show results proving no references remain unaddressed.
```
**Rationale:** This protocol prevents incomplete changes where Claude modifies some files but misses others that reference the same code, causing cascading bugs.
## Auto-Detection ## Auto-Detection
The command automatically detects: The command automatically detects:

View File

@@ -56,6 +56,7 @@ Or specify specific optimizations:
### Enhance ### Enhance
- Add missing essential sections - Add missing essential sections
- **Add Pre-Change Protocol if missing (HIGH PRIORITY)**
- Improve unclear instructions - Improve unclear instructions
- Add helpful examples - Add helpful examples
- Highlight critical rules - Highlight critical rules
@@ -158,6 +159,49 @@ Backup saved to: .claude/backups/CLAUDE.md.2025-01-18
| `--preserve-comments` | Keep all existing comments | | `--preserve-comments` | Keep all existing comments |
| `--section=NAME` | Optimize specific section only | | `--section=NAME` | Optimize specific section only |
## Pre-Change Protocol (Mandatory Addition)
**If CLAUDE.md is missing the Pre-Change Protocol section, optimization MUST add it.**
This is the highest priority enhancement because it prevents cascading bugs from incomplete code changes.
### Detection
Search CLAUDE.md for:
- "Pre-Change" or "Before Any Code Change" in headers
- References to impact search or grep verification
- User verification checkpoint
### If Missing
Add this section (position: after Critical Rules, before Common Operations):
```markdown
## ⛔ MANDATORY: Before Any Code Change
**Claude MUST show this checklist BEFORE editing any file:**
### 1. Impact Search Results
Run and show output of:
\`\`\`bash
grep -rn "PATTERN" --include="*.sh" --include="*.md" --include="*.json" --include="*.py" | grep -v ".git"
\`\`\`
### 2. Files That Will Be Affected
Numbered list of every file to be modified, with the specific change for each.
### 3. Files Searched But Not Changed (and why)
Proof that related files were checked and determined unchanged.
### 4. Documentation That References This
List of docs that mention this feature/script/function.
**User verifies this list before Claude proceeds. If Claude skips this, stop immediately.**
### After Changes
Run the same grep and show results proving no references remain unaddressed.
```
## When to Use ## When to Use
Run `/config-optimize` when: Run `/config-optimize` when:

View File

@@ -19,6 +19,5 @@
"data-quality", "data-quality",
"validation" "validation"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,8 +0,0 @@
{
"mcpServers": {
"netbox": {
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/netbox/run.sh",
"args": []
}
}
}

View File

@@ -1,7 +1,7 @@
{ {
"name": "code-sentinel", "name": "code-sentinel",
"description": "Security scanning and code refactoring tools", "description": "Security scanning and code refactoring tools",
"version": "1.0.0", "version": "1.0.1",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
"email": "leobmiranda@gmail.com" "email": "leobmiranda@gmail.com"

View File

@@ -1,4 +1,5 @@
--- ---
name: security-reviewer
description: Security-focused code review agent description: Security-focused code review agent
--- ---

View File

@@ -1,6 +1,6 @@
{ {
"name": "contract-validator", "name": "contract-validator",
"version": "1.0.0", "version": "1.1.0",
"description": "Cross-plugin compatibility validation and Claude.md agent verification", "description": "Cross-plugin compatibility validation and Claude.md agent verification",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
@@ -17,6 +17,5 @@
"interfaces", "interfaces",
"cross-plugin" "cross-plugin"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,9 +0,0 @@
{
"mcpServers": {
"contract-validator": {
"type": "stdio",
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/contract-validator/run.sh",
"args": []
}
}
}

View File

@@ -1,3 +1,8 @@
---
name: agent-check
description: Agent definition validator for quick verification
---
# Agent Check Agent # Agent Check Agent
You are an agent definition validator. Your role is to verify that a specific agent's tool references and data flow are valid. You are an agent definition validator. Your role is to verify that a specific agent's tool references and data flow are valid.

View File

@@ -1,6 +1,6 @@
{ {
"name": "data-platform", "name": "data-platform",
"version": "1.0.0", "version": "1.1.0",
"description": "Data engineering tools with pandas, PostgreSQL/PostGIS, and dbt integration", "description": "Data engineering tools with pandas, PostgreSQL/PostGIS, and dbt integration",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
@@ -18,6 +18,5 @@
"etl", "etl",
"dataframe" "dataframe"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,9 +0,0 @@
{
"mcpServers": {
"data-platform": {
"type": "stdio",
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/data-platform/run.sh",
"args": []
}
}
}

View File

@@ -1,3 +1,8 @@
---
name: data-analysis
description: Data analysis specialist for exploration and profiling
---
# Data Analysis Agent # Data Analysis Agent
You are a data analysis specialist. Your role is to help users explore, profile, and understand their data. You are a data analysis specialist. Your role is to help users explore, profile, and understand their data.

View File

@@ -52,7 +52,13 @@ Then proceed with the sync.
- Single commit: `docs: sync documentation with code changes` - Single commit: `docs: sync documentation with code changes`
- Include summary of what was updated in commit body - Include summary of what was updated in commit body
5. **Output** 5. **Clear Queue**
After successful sync, clear the queue file:
```bash
echo "# Doc Guardian Queue - cleared after sync on $(date +%Y-%m-%d)" > .doc-guardian-queue
```
6. **Output**
``` ```
## Documentation Sync Complete ## Documentation Sync Complete

View File

@@ -1,7 +1,12 @@
#!/bin/bash #!/bin/bash
# doc-guardian notification hook # doc-guardian notification hook
# Tracks documentation dependencies and queues updates # Tracks documentation dependencies and queues updates
# This is a command hook - guaranteed not to block workflow #
# SILENT BY DEFAULT - No output to avoid interrupting Claude's workflow.
# Changes are queued to .doc-guardian-queue for later processing.
# Run /doc-sync or /doc-audit to see and process pending updates.
#
# Set DOC_GUARDIAN_VERBOSE=1 to enable notification output.
# Read tool input from stdin (JSON with file_path) # Read tool input from stdin (JSON with file_path)
INPUT=$(cat) INPUT=$(cat)
@@ -44,15 +49,26 @@ DEPENDENT_DOCS="${DOC_DEPS[$MODIFIED_TYPE]}"
# Queue file for tracking pending updates # Queue file for tracking pending updates
QUEUE_FILE="${CLAUDE_PROJECT_ROOT:-.}/.doc-guardian-queue" QUEUE_FILE="${CLAUDE_PROJECT_ROOT:-.}/.doc-guardian-queue"
# Add to queue (create if doesn't exist, append if does) # Add to queue (always, for deduplication we check file+type combo)
{ # Format: timestamp | type | file_path | dependent_docs
echo "$(date +%Y-%m-%dT%H:%M:%S) | $MODIFIED_TYPE | $FILE_PATH | $DEPENDENT_DOCS" QUEUE_ENTRY="$(date +%Y-%m-%dT%H:%M:%S) | $MODIFIED_TYPE | $FILE_PATH | $DEPENDENT_DOCS"
} >> "$QUEUE_FILE" 2>/dev/null || true
# Count pending updates # Check if this exact file+type combo already exists in queue (dedup)
PENDING_COUNT=$(wc -l < "$QUEUE_FILE" 2>/dev/null | tr -d ' ' || echo "1") if [ -f "$QUEUE_FILE" ]; then
if grep -qF "| $MODIFIED_TYPE | $FILE_PATH |" "$QUEUE_FILE" 2>/dev/null; then
# Already queued, skip silently
exit 0
fi
fi
# Output notification with specific docs that need updating # Add to queue
echo "[doc-guardian] $MODIFIED_TYPE changed → update needed: $DEPENDENT_DOCS (${PENDING_COUNT} pending)" echo "$QUEUE_ENTRY" >> "$QUEUE_FILE" 2>/dev/null || true
# SILENT by default - only output if DOC_GUARDIAN_VERBOSE is set
# This prevents Claude from stopping to ask about documentation updates
if [ "${DOC_GUARDIAN_VERBOSE:-0}" = "1" ]; then
PENDING_COUNT=$(wc -l < "$QUEUE_FILE" 2>/dev/null | tr -d ' ' || echo "1")
echo "[doc-guardian] queued: $MODIFIED_TYPE ($PENDING_COUNT pending)"
fi
exit 0 exit 0

View File

@@ -6,6 +6,11 @@
# Read tool input from stdin (JSON format) # Read tool input from stdin (JSON format)
INPUT=$(cat) INPUT=$(cat)
# Quick check - exit immediately if not a git command
if ! echo "$INPUT" | grep -q '"command".*git'; then
exit 0
fi
# Extract command from JSON input # Extract command from JSON input
# The Bash tool sends {"command": "..."} format # The Bash tool sends {"command": "..."} format
COMMAND=$(echo "$INPUT" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"command"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/') COMMAND=$(echo "$INPUT" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"command"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')

View File

@@ -6,6 +6,12 @@
# Read tool input from stdin # Read tool input from stdin
INPUT=$(cat) INPUT=$(cat)
# Quick check - exit immediately if not a git commit command
# This avoids spawning Python for 99% of Bash commands
if ! echo "$INPUT" | grep -q '"command".*git.*commit'; then
exit 0
fi
# Use Python to properly parse JSON and extract the command # Use Python to properly parse JSON and extract the command
COMMAND=$(echo "$INPUT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('command',''))" 2>/dev/null) COMMAND=$(echo "$INPUT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('command',''))" 2>/dev/null)

View File

@@ -1,19 +1,16 @@
{ {
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [ "hooks": [
{ {
"event": "PreToolUse",
"matcher": "Bash",
"type": "command", "type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/branch-check.sh" "command": "${CLAUDE_PLUGIN_ROOT}/hooks/branch-check.sh"
}, },
{ {
"event": "PreToolUse",
"matcher": "Bash",
"type": "command", "type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/commit-msg-check.sh" "command": "${CLAUDE_PLUGIN_ROOT}/hooks/commit-msg-check.sh"
} }
] ]
}
]
}
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "pr-review", "name": "pr-review",
"version": "1.0.0", "version": "1.1.0",
"description": "Multi-agent pull request review with confidence scoring and actionable feedback", "description": "Multi-agent pull request review with confidence scoring and actionable feedback",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
@@ -16,6 +16,5 @@
"performance", "performance",
"multi-agent" "multi-agent"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,8 +0,0 @@
{
"mcpServers": {
"gitea": {
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/gitea/run.sh",
"args": []
}
}
}

View File

@@ -1,3 +1,8 @@
---
name: security-reviewer
description: Security-focused code reviewer for PR analysis
---
# Security Reviewer Agent # Security Reviewer Agent
## Visual Output Requirements ## Visual Output Requirements

View File

@@ -10,6 +10,17 @@ PREFIX="[project-hygiene]"
# Read tool input from stdin (discard - we don't need it for cleanup) # Read tool input from stdin (discard - we don't need it for cleanup)
cat > /dev/null cat > /dev/null
# Cooldown - skip if ran in last 60 seconds
# Using $PPID ties cooldown to the Claude session
LAST_RUN_FILE="/tmp/project-hygiene-${PPID}-last-run"
if [[ -f "$LAST_RUN_FILE" ]]; then
LAST_RUN=$(cat "$LAST_RUN_FILE")
NOW=$(date +%s)
if (( NOW - LAST_RUN < 60 )); then
exit 0
fi
fi
PROJECT_ROOT="${PROJECT_ROOT:-.}" PROJECT_ROOT="${PROJECT_ROOT:-.}"
DELETED_COUNT=0 DELETED_COUNT=0
@@ -25,4 +36,7 @@ if [[ $DELETED_COUNT -gt 0 ]]; then
echo "$PREFIX Cleaned $DELETED_COUNT temp files" echo "$PREFIX Cleaned $DELETED_COUNT temp files"
fi fi
# Record this run for cooldown
date +%s > "$LAST_RUN_FILE"
exit 0 exit 0

View File

@@ -1,6 +1,6 @@
{ {
"name": "projman", "name": "projman",
"version": "3.2.0", "version": "3.3.0",
"description": "Sprint planning and project management with Gitea integration", "description": "Sprint planning and project management with Gitea integration",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
@@ -16,6 +16,5 @@
"agile", "agile",
"lessons-learned" "lessons-learned"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,8 +0,0 @@
{
"mcpServers": {
"gitea": {
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/gitea/run.sh",
"args": []
}
}
}

View File

@@ -0,0 +1,28 @@
---
description: Clear plugin cache to force fresh configuration reload after marketplace updates
---
# Clear Cache
Clear plugin cache to force fresh configuration reload. Run this after marketplace updates.
## When to Use
- After updating the marketplace (`git pull` or reinstall)
- When MCP servers show stale configuration
- When plugin changes don't take effect
## What It Does
1. Clears `~/.claude/plugins/cache/leo-claude-mktplace/`
2. Forces Claude Code to re-read `.mcp.json` files on next session
## Instructions
Run this command, then **restart your Claude Code session** for changes to take effect.
```bash
rm -rf ~/.claude/plugins/cache/leo-claude-mktplace/
```
After clearing, inform the user: "Cache cleared. Restart Claude Code for changes to take effect."

View File

@@ -385,6 +385,13 @@ git push -u origin fix/issue-[NUMBER]-[brief-description]
git checkout development git checkout development
``` ```
**⚠️ IMPORTANT: Issue will NOT auto-close**
PRs merged to `development` do NOT trigger Gitea's auto-close feature.
Auto-close only works when merging to the default branch (`main`).
You MUST manually close the issue in Step 15 after the PR is merged.
5. Add comment to original issue: 5. Add comment to original issue:
``` ```
mcp__plugin_projman_gitea__add_comment( mcp__plugin_projman_gitea__add_comment(
@@ -417,9 +424,14 @@ Next Steps:
**This step runs AFTER the user has verified the fix works.** **This step runs AFTER the user has verified the fix works.**
**⚠️ MANDATORY: You MUST manually close the issue.**
PRs merged to `development` do NOT auto-close issues (Gitea only auto-closes
on merges to the default branch `main`). Always close manually after merge.
When user returns and confirms the fix is working: When user returns and confirms the fix is working:
**1. Close the issue:** **1. Close the issue (REQUIRED - won't auto-close):**
``` ```
mcp__plugin_projman_gitea__update_issue( mcp__plugin_projman_gitea__update_issue(

View File

@@ -1,4 +1,8 @@
# /suggest-version ---
description: Analyze CHANGELOG.md and suggest appropriate semantic version bump
---
# Suggest Version
Analyze CHANGELOG.md and suggest appropriate semantic version bump. Analyze CHANGELOG.md and suggest appropriate semantic version bump.

View File

@@ -7,42 +7,6 @@ PREFIX="[projman]"
# Calculate paths # Calculate paths
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "$(realpath "$0")")")}" PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "$(realpath "$0")")")}"
# Marketplace root is 2 levels up from plugin root (plugins/projman -> .)
MARKETPLACE_ROOT="$(dirname "$(dirname "$PLUGIN_ROOT")")"
VENV_REPAIR_SCRIPT="$MARKETPLACE_ROOT/scripts/venv-repair.sh"
PLUGIN_CACHE="$HOME/.claude/plugins/cache/leo-claude-mktplace"
# ============================================================================
# Clear stale plugin cache (MUST run before MCP servers load)
# ============================================================================
# The cache at ~/.claude/plugins/cache/ holds versioned .mcp.json files.
# After marketplace updates, cached configs may point to old paths.
# Clearing forces Claude to read fresh configs from installed marketplace.
if [[ -d "$PLUGIN_CACHE" ]]; then
rm -rf "$PLUGIN_CACHE"
# Don't output anything - this should be silent and automatic
fi
# ============================================================================
# Auto-repair MCP venvs (runs before other checks)
# ============================================================================
if [[ -x "$VENV_REPAIR_SCRIPT" ]]; then
# Run venv repair - this creates symlinks to cached venvs
# Only outputs messages if something needed fixing
"$VENV_REPAIR_SCRIPT" 2>/dev/null || {
echo "$PREFIX MCP venv setup failed - run: cd $MARKETPLACE_ROOT && ./scripts/setup-venvs.sh"
exit 0
}
else
# Fallback: just check if venv exists
VENV_PATH="$PLUGIN_ROOT/mcp-servers/gitea/.venv/bin/python"
if [[ ! -f "$VENV_PATH" ]]; then
echo "$PREFIX MCP venvs missing - run setup.sh from installed marketplace"
exit 0
fi
fi
# Check git remote vs .env config (only if .env exists) # Check git remote vs .env config (only if .env exists)
if [[ -f ".env" ]]; then if [[ -f ".env" ]]; then
@@ -81,6 +45,29 @@ if [[ -f ".env" ]]; then
fi fi
fi fi
# ============================================================================
# Check version consistency across files (early drift detection)
# ============================================================================
# Versions must stay in sync across: README.md, marketplace.json, CHANGELOG.md
# Drift here causes confusion and release issues
if [[ -f "README.md" && -f ".claude-plugin/marketplace.json" && -f "CHANGELOG.md" ]]; then
VERSION_README=$(grep -oE "^# .* - v[0-9]+\.[0-9]+\.[0-9]+" README.md 2>/dev/null | grep -oE "[0-9]+\.[0-9]+\.[0-9]+" || echo "")
# Extract metadata.version specifically (appears after "metadata" in marketplace.json)
VERSION_MARKETPLACE=$(sed -n '/"metadata"/,/}/p' .claude-plugin/marketplace.json 2>/dev/null | grep -oE '"version"[[:space:]]*:[[:space:]]*"[0-9]+\.[0-9]+\.[0-9]+"' | head -1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+" || echo "")
VERSION_CHANGELOG=$(grep -oE "^## \[[0-9]+\.[0-9]+\.[0-9]+\]" CHANGELOG.md 2>/dev/null | head -1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+" || echo "")
if [[ -n "$VERSION_README" && -n "$VERSION_MARKETPLACE" && -n "$VERSION_CHANGELOG" ]]; then
if [[ "$VERSION_README" != "$VERSION_MARKETPLACE" ]] || [[ "$VERSION_README" != "$VERSION_CHANGELOG" ]]; then
echo "$PREFIX Version mismatch detected:"
echo "$PREFIX README.md: v$VERSION_README"
echo "$PREFIX marketplace.json: v$VERSION_MARKETPLACE"
echo "$PREFIX CHANGELOG.md: v$VERSION_CHANGELOG"
echo "$PREFIX Run /suggest-version to analyze and fix"
fi
fi
fi
# Check for CHANGELOG.md [Unreleased] content (version management) # Check for CHANGELOG.md [Unreleased] content (version management)
if [[ -f "CHANGELOG.md" ]]; then if [[ -f "CHANGELOG.md" ]]; then
# Check if there's content under [Unreleased] that hasn't been released # Check if there's content under [Unreleased] that hasn't been released

View File

@@ -1,6 +1,6 @@
{ {
"name": "viz-platform", "name": "viz-platform",
"version": "1.0.0", "version": "1.1.0",
"description": "Visualization tools with Dash Mantine Components validation, Plotly charts, and theming", "description": "Visualization tools with Dash Mantine Components validation, Plotly charts, and theming",
"author": { "author": {
"name": "Leo Miranda", "name": "Leo Miranda",
@@ -19,6 +19,5 @@
"visualization", "visualization",
"dmc" "dmc"
], ],
"commands": ["./commands/"], "commands": ["./commands/"]
"mcpServers": ["./.mcp.json"]
} }

View File

@@ -1,9 +0,0 @@
{
"mcpServers": {
"viz-platform": {
"type": "stdio",
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-servers/viz-platform/run.sh",
"args": []
}
}
}

View File

@@ -1,3 +1,8 @@
---
name: component-check
description: DMC component validation specialist
---
# Component Check Agent # Component Check Agent
You are a strict component validation specialist. Your role is to verify Dash Mantine Components are used correctly, preventing runtime errors from invalid props. You are a strict component validation specialist. Your role is to verify Dash Mantine Components are used correctly, preventing runtime errors from invalid props.

View File

@@ -1,10 +1,3 @@
{ {
"hooks": [ "hooks": []
{
"event": "SessionStart",
"type": "command",
"command": "echo 'viz-platform plugin loaded'",
"timeout": 5000
}
]
} }

View File

@@ -6,9 +6,10 @@
# #
# This script: # This script:
# 1. Clears Claude plugin cache (forces fresh .mcp.json reads) # 1. Clears Claude plugin cache (forces fresh .mcp.json reads)
# 2. Restores MCP venv symlinks (instant if cache exists) # 2. Shows recent changelog updates
# 3. Creates venvs in external cache if missing (first run only) #
# 4. Shows recent changelog updates # NOTE: This script does NOT touch .venv directories.
# If venvs are missing, run ./scripts/setup.sh manually.
# #
set -euo pipefail set -euo pipefail
@@ -22,13 +23,11 @@ REPO_ROOT="$(dirname "$SCRIPT_DIR")"
GREEN='\033[0;32m' GREEN='\033[0;32m'
YELLOW='\033[1;33m' YELLOW='\033[1;33m'
BLUE='\033[0;34m' BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m' NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; } log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_success() { echo -e "${GREEN}[OK]${NC} $1"; } log_success() { echo -e "${GREEN}[OK]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
check_changelog() { check_changelog() {
if [[ -f "$REPO_ROOT/CHANGELOG.md" ]]; then if [[ -f "$REPO_ROOT/CHANGELOG.md" ]]; then
@@ -52,35 +51,21 @@ main() {
# Clear Claude plugin cache to force fresh .mcp.json reads # Clear Claude plugin cache to force fresh .mcp.json reads
# This cache holds versioned copies that become stale after updates # This cache holds versioned copies that become stale after updates
# NOTE: This does NOT touch .venv directories
if [[ -d "$CLAUDE_PLUGIN_CACHE" ]]; then if [[ -d "$CLAUDE_PLUGIN_CACHE" ]]; then
log_info "Clearing Claude plugin cache..." log_info "Clearing Claude plugin cache..."
rm -rf "$CLAUDE_PLUGIN_CACHE" rm -rf "$CLAUDE_PLUGIN_CACHE"
log_success "Plugin cache cleared" log_success "Plugin cache cleared"
fi fi
# Run venv-repair.sh to restore symlinks to external cache
# This is instant if cache exists, or does full setup on first run
if [[ -x "$SCRIPT_DIR/venv-repair.sh" ]]; then
log_info "Restoring MCP venv symlinks..."
if "$SCRIPT_DIR/venv-repair.sh"; then
log_success "MCP venvs ready"
else
log_error "MCP venv setup failed"
log_warn "Run: $SCRIPT_DIR/setup-venvs.sh for full setup"
exit 1
fi
else
log_error "venv-repair.sh not found at $SCRIPT_DIR"
exit 1
fi
check_changelog check_changelog
echo "" echo ""
log_success "Post-update complete!" log_success "Post-update complete!"
echo "" echo ""
echo "IMPORTANT: Restart Claude Code for changes to take effect." echo "IMPORTANT: Restart Claude Code for changes to take effect."
echo "MCP servers will work immediately on next session start." echo ""
echo "If MCP servers are not working, run: ./scripts/setup.sh"
} }
main "$@" main "$@"

View File

@@ -148,9 +148,106 @@ for plugin_dir in "$PLUGINS_DIR"/*/; do
echo "WARNING: Missing README.md in $plugin_name/" echo "WARNING: Missing README.md in $plugin_name/"
fi fi
# CRITICAL: Validate file references exist (mcpServers, hooks, commands)
# This prevents broken references that silently break plugin loading
# Check mcpServers references
mcp_servers=$(jq -r '.mcpServers // [] | .[]' "$plugin_json" 2>/dev/null)
for mcp_ref in $mcp_servers; do
mcp_path="$plugin_dir/$mcp_ref"
if [[ ! -f "$mcp_path" ]]; then
echo "ERROR: BROKEN REFERENCE in $plugin_name/plugin.json"
echo " mcpServers references '$mcp_ref' but file does not exist at:"
echo " $mcp_path"
echo ""
echo " FIX: Either create the file or remove the mcpServers entry"
exit 1
fi
echo " ✓ mcpServers reference: $mcp_ref exists"
done
# Check hooks references (can be array of file paths OR object with handlers)
hooks_type=$(jq -r '.hooks | type' "$plugin_json" 2>/dev/null)
if [[ "$hooks_type" == "array" ]]; then
# Array format: ["./hooks/hooks.json"]
hooks=$(jq -r '.hooks[]' "$plugin_json" 2>/dev/null)
for hook_ref in $hooks; do
hook_path="$plugin_dir/$hook_ref"
if [[ ! -f "$hook_path" ]]; then
echo "ERROR: BROKEN REFERENCE in $plugin_name/plugin.json"
echo " hooks references '$hook_ref' but file does not exist at:"
echo " $hook_path"
echo ""
echo " FIX: Either create the file or remove the hooks entry"
exit 1
fi
echo " ✓ hooks reference: $hook_ref exists"
done
elif [[ "$hooks_type" == "object" ]]; then
# Object format: { "PostToolUse": [...] } - inline hooks, no file reference to validate
echo " ✓ hooks: inline object format (no file references)"
fi
# Check commands directory references
commands=$(jq -r '.commands // [] | .[]' "$plugin_json" 2>/dev/null)
for cmd_ref in $commands; do
cmd_path="$plugin_dir/$cmd_ref"
if [[ ! -d "$cmd_path" ]] && [[ ! -f "$cmd_path" ]]; then
echo "ERROR: BROKEN REFERENCE in $plugin_name/plugin.json"
echo " commands references '$cmd_ref' but path does not exist at:"
echo " $cmd_path"
echo ""
echo " FIX: Either create the path or remove the commands entry"
exit 1
fi
echo " ✓ commands reference: $cmd_ref exists"
done
echo "$plugin_name valid" echo "$plugin_name valid"
done done
# CRITICAL: Validate marketplace.json file references
echo ""
echo "=== Validating Marketplace File References (CRITICAL) ==="
for i in $(seq 0 $((PLUGIN_COUNT - 1))); do
PLUGIN_NAME=$(jq -r ".plugins[$i].name" "$MARKETPLACE_JSON")
PLUGIN_SOURCE=$(jq -r ".plugins[$i].source" "$MARKETPLACE_JSON")
PLUGIN_DIR="$ROOT_DIR/$PLUGIN_SOURCE"
# Check mcpServers in marketplace.json
mcp_servers=$(jq -r ".plugins[$i].mcpServers // [] | .[]" "$MARKETPLACE_JSON" 2>/dev/null)
for mcp_ref in $mcp_servers; do
mcp_path="$PLUGIN_DIR/$mcp_ref"
if [[ ! -f "$mcp_path" ]]; then
echo "ERROR: BROKEN REFERENCE in marketplace.json for $PLUGIN_NAME"
echo " mcpServers references '$mcp_ref' but file does not exist at:"
echo " $mcp_path"
echo ""
echo " FIX: Either create the file or remove the mcpServers entry from marketplace.json"
exit 1
fi
echo "$PLUGIN_NAME: mcpServers reference $mcp_ref exists"
done
# Check hooks in marketplace.json
hooks=$(jq -r ".plugins[$i].hooks // [] | .[]" "$MARKETPLACE_JSON" 2>/dev/null)
for hook_ref in $hooks; do
hook_path="$PLUGIN_DIR/$hook_ref"
if [[ ! -f "$hook_path" ]]; then
echo "ERROR: BROKEN REFERENCE in marketplace.json for $PLUGIN_NAME"
echo " hooks references '$hook_ref' but file does not exist at:"
echo " $hook_path"
echo ""
echo " FIX: Either create the file or remove the hooks entry from marketplace.json"
exit 1
fi
echo "$PLUGIN_NAME: hooks reference $hook_ref exists"
done
done
echo "✓ All file references validated"
# v3.0.0: Validate MCP server symlinks # v3.0.0: Validate MCP server symlinks
echo "" echo ""
echo "=== Validating MCP Server Symlinks (v3.0.0+) ===" echo "=== Validating MCP Server Symlinks (v3.0.0+) ==="

View File

@@ -1,169 +0,0 @@
#!/usr/bin/env bash
#
# venv-repair.sh - Fast MCP venv auto-repair for SessionStart hooks
#
# This script is designed to run at session start. It:
# 1. Checks if venvs exist in external cache (~/.cache/claude-mcp-venvs/)
# 2. Creates symlinks from marketplace to cache (instant operation)
# 3. Only runs pip install if cache is missing (first install)
#
# Output format: All messages prefixed with [mcp-venv] for hook display
#
# Usage:
# ./scripts/venv-repair.sh # Auto-repair (default)
# ./scripts/venv-repair.sh --silent # Silent mode (no output unless error)
#
set -euo pipefail
# ============================================================================
# Configuration
# ============================================================================
PREFIX="[mcp-venv]"
VENV_CACHE_DIR="${HOME}/.cache/claude-mcp-venvs/leo-claude-mktplace"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
# MCP servers
MCP_SERVERS=(gitea netbox data-platform viz-platform contract-validator)
# Parse args
SILENT=false
[[ "${1:-}" == "--silent" ]] && SILENT=true
log() {
[[ "$SILENT" == true ]] && return
echo "$PREFIX $1"
}
log_error() {
echo "$PREFIX ERROR: $1" >&2
}
# ============================================================================
# Check if all venvs exist in cache
# ============================================================================
cache_complete() {
for server in "${MCP_SERVERS[@]}"; do
local venv_python="$VENV_CACHE_DIR/$server/.venv/bin/python"
[[ ! -f "$venv_python" ]] && return 1
done
return 0
}
# ============================================================================
# Create symlinks from marketplace to cache
# ============================================================================
create_symlink() {
local server_name="$1"
local server_path="$REPO_ROOT/mcp-servers/$server_name"
local venv_cache="$VENV_CACHE_DIR/$server_name/.venv"
local venv_link="$server_path/.venv"
# Skip if server doesn't exist
[[ ! -d "$server_path" ]] && return 0
# Skip if cache doesn't exist
[[ ! -d "$venv_cache" ]] && return 1
# Already correct symlink?
if [[ -L "$venv_link" ]]; then
local target
target=$(readlink "$venv_link")
[[ "$target" == "$venv_cache" ]] && return 0
rm "$venv_link"
elif [[ -d "$venv_link" ]]; then
# Old venv directory exists - back it up or remove
rm -rf "$venv_link"
fi
# Create symlink
ln -s "$venv_cache" "$venv_link"
return 0
}
create_all_symlinks() {
local created=0
for server in "${MCP_SERVERS[@]}"; do
if create_symlink "$server"; then
((created++)) || true
fi
done
[[ $created -gt 0 ]] && log "Restored $created venv symlinks"
}
# ============================================================================
# Full setup (only if cache missing)
# ============================================================================
setup_server() {
local server_name="$1"
local server_path="$REPO_ROOT/mcp-servers/$server_name"
local venv_path="$VENV_CACHE_DIR/$server_name/.venv"
[[ ! -d "$server_path" ]] && return 0
mkdir -p "$VENV_CACHE_DIR/$server_name"
# Create venv
if [[ ! -d "$venv_path" ]]; then
python3 -m venv "$venv_path"
fi
# Install dependencies
# shellcheck disable=SC1091
source "$venv_path/bin/activate"
pip install -q --upgrade pip
if [[ -f "$server_path/requirements.txt" ]]; then
pip install -q -r "$server_path/requirements.txt"
fi
if [[ -f "$server_path/pyproject.toml" ]]; then
pip install -q -e "$server_path"
fi
deactivate
# Save hash for future quick checks
local hash_file="$VENV_CACHE_DIR/$server_name/.requirements_hash"
{
if [[ -f "$server_path/requirements.txt" ]]; then
cat "$server_path/requirements.txt"
fi
if [[ -f "$server_path/pyproject.toml" ]]; then
cat "$server_path/pyproject.toml"
fi
echo "" # Ensure non-empty input for sha256sum
} | sha256sum | cut -d' ' -f1 > "$hash_file"
}
full_setup() {
log "First run - setting up MCP venvs (this only happens once)..."
for server in "${MCP_SERVERS[@]}"; do
log " Setting up $server..."
setup_server "$server"
done
log "Setup complete. Future sessions will be instant."
}
# ============================================================================
# Main
# ============================================================================
main() {
# Fast path: cache exists, just ensure symlinks
if cache_complete; then
create_all_symlinks
exit 0
fi
# Slow path: need to create venvs (first install)
full_setup
create_all_symlinks
}
main "$@"