fix: critical plugin structure and configuration fixes #17
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -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
|
||||
|
||||
47
CLAUDE.md
47
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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user