diff --git a/.claude-plugins/projman-marketplace/.claude-plugin/marketplace.json b/.claude-plugins/projman-marketplace/.claude-plugin/marketplace.json index 21c86a6..f347c5e 100644 --- a/.claude-plugins/projman-marketplace/.claude-plugin/marketplace.json +++ b/.claude-plugins/projman-marketplace/.claude-plugin/marketplace.json @@ -16,6 +16,12 @@ "version": "0.1.0", "description": "Post-task cleanup hook that removes temp files, warns about unexpected root files, and manages orphans", "source": "./../../project-hygiene" + }, + { + "name": "cmdb-assistant", + "version": "1.0.0", + "description": "NetBox CMDB integration for infrastructure management - query, create, update, and manage network devices, IP addresses, sites, and more", + "source": "./../../cmdb-assistant" } ] } diff --git a/.gitignore b/.gitignore index 7a1cb5c..c207423 100644 --- a/.gitignore +++ b/.gitignore @@ -26,9 +26,7 @@ MANIFEST venv/ ENV/ env/ -.venv -.ENV -.env.local +.venv/ # PyCharm .idea/ @@ -62,10 +60,10 @@ package-lock.json dist/ build/ -# Environment variables (IMPORTANT: Contains Gitea credentials) -.env -.env.local -.env.*.local +# Environment variables - NOT ignored (private repo) +# .env +# .env.local +# .env.*.local # OS .DS_Store diff --git a/CLAUDE.md b/CLAUDE.md index a10bab0..86fddd8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -329,6 +329,53 @@ Test in real CuisineFlow repository with actual Gitea instance before distributi - **Python for MCP servers** - Use Python 3.8+ with virtual environments - **Wiki.js structure** - All HHL content under `/hyper-hive-labs` namespace +## CRITICAL: Rules You MUST Follow + +### DO NOT MODIFY .gitignore Without Explicit Permission +- This is a **private repository** - credentials in `.env` files are intentional +- **NEVER** add `.env` or `.env.*` to .gitignore +- **NEVER** add venv patterns unless explicitly asked +- If you think something should be ignored, ASK FIRST + +### Plugin Structure Requirements +- **plugin.json MUST be in `.claude-plugin/` directory** - NOT in plugin root +- Every plugin in the repo MUST be listed in the marketplace.json +- After creating/modifying a plugin, VERIFY it's in the marketplace + +### Hooks Syntax (Claude Code Official) +- **Valid events**: `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Notification`, `Stop`, `SubagentStop`, `PreCompact` +- **INVALID events**: `task-completed`, `file-changed`, `git-commit-msg-needed` (these DO NOT exist) +- Hooks schema: +```json +{ + "hooks": { + "EventName": [ + { + "matcher": "optional-pattern", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/path/to/script.sh" + } + ] + } + ] + } +} +``` + +### MCP Server Configuration +- MCP servers MUST use venv python: `${CLAUDE_PLUGIN_ROOT}/../mcp-servers/NAME/.venv/bin/python` +- NEVER use bare `python` command - always use venv path +- Test MCP servers after any config change + +### Before Completing Any Plugin Work +1. Verify plugin.json is in `.claude-plugin/` directory +2. Verify plugin is listed in marketplace.json +3. Test MCP server configs load correctly +4. Verify hooks use valid event types +5. Check .gitignore wasn't modified inappropriately + ## Documentation Index This repository contains comprehensive planning documentation: diff --git a/create_labels.py b/create_labels.py index be0f035..bfbdda1 100644 --- a/create_labels.py +++ b/create_labels.py @@ -6,8 +6,10 @@ Creates 28 organization labels + 16 repository labels = 44 total import requests import sys -GITEA_URL = "https://gitea.example.com" -TOKEN = "ae72c63cd7de02e40bd16f66d1e98059c187759b" +import os + +GITEA_URL = os.getenv("GITEA_API_URL", "").rstrip("/api/v1") +TOKEN = os.getenv("GITEA_API_TOKEN", "") ORG = "bandit" REPO = "support-claude-mktplace" diff --git a/project-hygiene/hooks/hooks.json b/project-hygiene/hooks/hooks.json index 7d922f1..4d5f9df 100644 --- a/project-hygiene/hooks/hooks.json +++ b/project-hygiene/hooks/hooks.json @@ -1,9 +1,15 @@ { - "hooks": [ - { - "event": "task-completed", - "script": "${CLAUDE_PLUGIN_ROOT}/hooks/cleanup.sh", - "description": "Post-task cleanup: remove temp files, warn about unexpected root files, manage orphans" - } - ] + "hooks": { + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/cleanup.sh" + } + ] + } + ] + } } diff --git a/projman/plugin.json b/projman/.claude-plugin/plugin.json similarity index 100% rename from projman/plugin.json rename to projman/.claude-plugin/plugin.json diff --git a/projman/.mcp.json b/projman/.mcp.json index a545963..a9ed3fb 100644 --- a/projman/.mcp.json +++ b/projman/.mcp.json @@ -1,20 +1,14 @@ { "mcpServers": { "gitea": { - "command": "python", + "command": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea/.venv/bin/python", "args": ["-m", "mcp_server.server"], - "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea", - "env": { - "PYTHONPATH": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea" - } + "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea" }, "wikijs": { - "command": "python", + "command": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs/.venv/bin/python", "args": ["-m", "mcp_server.server"], - "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs", - "env": { - "PYTHONPATH": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs" - } + "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs" } } }