25 Commits

Author SHA1 Message Date
697031c526 docs: overhaul CLAUDE.md for v2.2.0 with maintainer best practices
Complete rewrite following claude-config-maintainer principles:
- Clear, concise, complete, current
- Scannable structure with tables
- Critical rules prominently placed
- Quick Start section added

Updates:
- Version: 2.2.0, Status: Production Ready
- Four-Agent Model (added Code Reviewer)
- New commands: /review, /test-check
- New file: validate-marketplace.sh
- Removed outdated "Next Steps" and stale dates
- Consolidated verbose sections into tables
- Added Version History table

Reduced from ~480 lines to ~195 lines while maintaining all essential information.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 10:34:13 -05:00
32797ce473 Merge pull request 'development: new version launched (v2.2.0)' (#32) from development into main
Reviewed-on: personal-projects/support-claude-mktplace#32
2026-01-20 15:23:12 +00:00
368f9a4c2e Merge feat/marketplace-compliance-and-review into development
Release v2.2.0 - Marketplace Compliance Updates & Feature Additions

New Features:
- /review command for pre-sprint-close code quality checks
- /test-check command for test verification before sprint close
- code-reviewer agent for structured code review
- Validation script (scripts/validate-marketplace.sh)

Compliance Fixes:
- Updated marketplace.json with required fields (metadata, author, homepage, repository)
- Updated all plugin manifests with required fields
- Fixed installation documentation to use official Claude Code methods
- Prioritized public HTTPS URL over Tailscale SSH URL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 10:16:36 -05:00
cb0a5ddec5 chore: bump version to v2.2.0 and update documentation
Version updates:
- marketplace.json metadata.version: 2.0.0 → 2.2.0
- marketplace.json projman version: 2.0.0 → 2.2.0
- plugins/projman/plugin.json version: 2.0.0 → 2.2.0

Documentation updates:
- CHANGELOG.md: Changed [Unreleased] to [2.2.0] - 2026-01-20
- README.md: Updated projman version to v2.2.0
- README.md: Added /review and /test-check to commands list
- README.md: Added code-reviewer to agent list
- README.md: Updated Key Features section to v2.2.0
- README.md: Added validate-marketplace.sh to structure
- plugins/projman/README.md: Updated title to v2.2.0
- plugins/projman/README.md: Updated version changelog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 10:09:01 -05:00
8da7117b89 docs: update projman readme with new commands
- Add /review command documentation
- Add /test-check command documentation
- Add Code Quality Commands section
- Add code-reviewer agent to Agents section
- Update architecture directory listing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 10:00:37 -05:00
c322cf4b2f docs: update changelog with compliance and feature additions
- Document all compliance fixes (marketplace, plugins, README)
- Document new /review and /test-check commands
- Document code-reviewer agent addition
- Document validation script addition

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:59:43 -05:00
a6d3fe6c6c feat(projman): add /test-check command for test verification
- Add test-check.md command for pre-sprint-close test verification
- Automatic framework detection (pytest, jest, go test, cargo, etc.)
- Coverage reporting when available
- Sprint file analysis for untested changes
- Clear pass/fail summary with recommendations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:59:16 -05:00
c62e0dbd2c feat(projman): add /review command for code quality checks
- Add review.md command for pre-sprint-close code quality review
- Add code-reviewer.md agent for structured review workflow
- Covers debug artifacts, code quality, security, error handling
- Integrates with projman sprint context when available
- Provides structured output with severity levels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:58:35 -05:00
34c8f0bdb6 feat: add validation script for marketplace compliance
- Validates marketplace.json syntax and required fields
- Checks each plugin entry has required fields
- Validates individual plugin.json files
- Checks for recommended fields (author, homepage, repository)
- Returns non-zero exit code on errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:57:40 -05:00
72941c1fe1 docs: fix installation instructions for official methods
- Replace pluginMarketplace with extraKnownMarketplaces
- Add CLI command method (recommended)
- Add settings.json method for team distribution
- Add local development option
- Prioritize public HTTPS URL over Tailscale SSH URL
- Reorganize installation sections for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:56:41 -05:00
1adb434c58 fix: add required fields to plugin manifests
- Add author, homepage, repository to all plugin manifests
- Add license field where missing
- Add commands and agents directory references
- Update keywords for better discoverability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:55:57 -05:00
76462d5d8c fix: update marketplace.json with required fields
- Add metadata wrapper for description and version
- Add author, homepage, and repository to all plugin entries
- Ensure owner.email field exists and is valid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:55:13 -05:00
5b7c1f3fce Update plugins/projman/README.md 2026-01-20 13:55:26 +00:00
87b30cbb85 Update plugins/projman/README.md 2026-01-20 13:54:46 +00:00
67c057f9ee Merge pull request 'Update README.md' (#31) from development into main
Reviewed-on: personal-projects/support-claude-mktplace#31
2026-01-20 13:44:27 +00:00
c34fd22852 Update README.md 2026-01-20 13:42:39 +00:00
5fc18f28e9 Merge pull request 'feat: add plugin integration analysis to config-analyze command' (#30) from development into main
Reviewed-on: personal-projects/support-claude-mktplace#30
2026-01-19 23:27:15 +00:00
a12665c22d Merge pull request 'chore: rebrand for public release' (#28) from development into main
Reviewed-on: personal-projects/support-claude-mktplace#28
2026-01-19 22:54:29 +00:00
3c3b9329c5 Merge pull request 'development' (#27) from development into main
Reviewed-on: bandit/support-claude-mktplace#27
2026-01-19 22:23:28 +00:00
1e63de6679 Merge pull request 'refactor: bundle MCP servers inside plugins for cache compatibility' (#26) from development into main
Reviewed-on: bandit/support-claude-mktplace#26
2025-12-15 22:23:57 +00:00
6c77c264f6 Merge pull request 'fix: correct labels path in setup.sh' (#25) from development into main
Reviewed-on: bandit/support-claude-mktplace#25
2025-12-15 22:09:32 +00:00
b3a41f722c Merge pull request 'development' (#24) from development into main
Reviewed-on: bandit/support-claude-mktplace#24
2025-12-12 17:38:07 +00:00
97085021a9 Merge pull request 'fix: add missing plugin declarations and fix hardcoded paths' (#23) from development into main
Reviewed-on: bandit/support-claude-mktplace#23
2025-12-12 15:57:19 +00:00
eb2c184641 Merge pull request 'development' (#22) from development into main
Reviewed-on: bandit/support-claude-mktplace#22
2025-12-12 07:13:09 +00:00
5cfe858b12 Merge pull request 'Add path safeguards to prevent structural damage' (#21) from development into main
Reviewed-on: bandit/support-claude-mktplace#21
2025-12-12 05:15:04 +00:00
13 changed files with 867 additions and 541 deletions

View File

@@ -1,17 +1,25 @@
{ {
"name": "claude-code-marketplace", "name": "claude-code-marketplace",
"version": "2.0.0",
"description": "Project management plugins with Gitea and NetBox integrations",
"owner": { "owner": {
"name": "Leo Miranda", "name": "Leo Miranda",
"email": "leobmiranda@gmail.com" "email": "leobmiranda@gmail.com"
}, },
"metadata": {
"description": "Project management plugins with Gitea and NetBox integrations",
"version": "2.2.0"
},
"plugins": [ "plugins": [
{ {
"name": "projman", "name": "projman",
"version": "2.0.0", "version": "2.2.0",
"description": "Sprint planning and project management with Gitea integration", "description": "Sprint planning and project management with Gitea integration",
"source": "./plugins/projman", "source": "./plugins/projman",
"author": {
"name": "Leo Miranda",
"email": "leobmiranda@gmail.com"
},
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/projman/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"mcpServers": ["gitea"], "mcpServers": ["gitea"],
"integrationFile": "claude-md-integration.md" "integrationFile": "claude-md-integration.md"
}, },
@@ -20,6 +28,12 @@
"version": "0.1.0", "version": "0.1.0",
"description": "Post-task cleanup hook that removes temp files and manages orphaned files", "description": "Post-task cleanup hook that removes temp files and manages orphaned files",
"source": "./plugins/project-hygiene", "source": "./plugins/project-hygiene",
"author": {
"name": "Leo Miranda",
"email": "leobmiranda@gmail.com"
},
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/project-hygiene/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"mcpServers": [], "mcpServers": [],
"integrationFile": "claude-md-integration.md", "integrationFile": "claude-md-integration.md",
"hooks": ["PostToolUse"] "hooks": ["PostToolUse"]
@@ -29,6 +43,12 @@
"version": "1.0.0", "version": "1.0.0",
"description": "NetBox CMDB integration for infrastructure management", "description": "NetBox CMDB integration for infrastructure management",
"source": "./plugins/cmdb-assistant", "source": "./plugins/cmdb-assistant",
"author": {
"name": "Leo Miranda",
"email": "leobmiranda@gmail.com"
},
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/cmdb-assistant/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"mcpServers": ["netbox"], "mcpServers": ["netbox"],
"integrationFile": "claude-md-integration.md" "integrationFile": "claude-md-integration.md"
}, },
@@ -37,6 +57,12 @@
"version": "1.0.0", "version": "1.0.0",
"description": "CLAUDE.md optimization and maintenance for Claude Code projects", "description": "CLAUDE.md optimization and maintenance for Claude Code projects",
"source": "./plugins/claude-config-maintainer", "source": "./plugins/claude-config-maintainer",
"author": {
"name": "Leo Miranda",
"email": "leobmiranda@gmail.com"
},
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/claude-config-maintainer/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"mcpServers": [], "mcpServers": [],
"integrationFile": "claude-md-integration.md" "integrationFile": "claude-md-integration.md"
} }

View File

@@ -4,7 +4,29 @@ All notable changes to support-claude-mktplace will be documented in this file.
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] ## [2.2.0] - 2026-01-20
### Added
- `/review` command for pre-sprint-close code quality checks (projman)
- `/test-check` command for test verification before sprint close (projman)
- `code-reviewer` agent for structured code review workflow (projman)
- Validation script (`scripts/validate-marketplace.sh`) for marketplace compliance
- `homepage` and `repository` fields to all plugin entries in marketplace.json
- `metadata` wrapper for description/version in marketplace.json
- Keywords to all plugin manifests for better discoverability
- `commands` and `agents` directory references to plugin manifests
### Changed
- Updated marketplace.json with required fields per Claude Code spec
- Fixed installation documentation to use official Claude Code methods
- Prioritized public HTTPS URL over Tailscale SSH URL in documentation
- Updated all plugin manifests with author, homepage, repository, license fields
### Fixed
- Plugin manifests now include all required fields per Claude Code spec
- Installation section uses `extraKnownMarketplaces` instead of undocumented `pluginMarketplace`
## [2.1.0] - Previous Release
### Added ### Added
- `docs/CANONICAL-PATHS.md` - Single source of truth for all file paths - `docs/CANONICAL-PATHS.md` - Single source of truth for all file paths

609
CLAUDE.md
View File

@@ -1,478 +1,195 @@
# CLAUDE.md # CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. This file provides guidance to Claude Code when working with code in this repository.
## Project Overview ## Project Overview
This repository contains Claude Code plugins for project management: **Repository:** support-claude-mktplace
**Version:** 2.2.0
**Status:** Production Ready
1. **`projman`** - Single-repository project management plugin with Gitea integration A Claude Code plugin marketplace containing:
2. **`projman-pmo`** - Multi-project PMO coordination plugin
3. **`claude-config-maintainer`** - CLAUDE.md optimization and maintenance plugin
4. **`cmdb-assistant`** - NetBox CMDB integration for infrastructure management
These plugins transform a proven 15-sprint workflow into reusable, distributable tools for managing software development with Claude Code, Gitea, and agile methodologies. | Plugin | Description | Version |
|--------|-------------|---------|
| `projman` | Sprint planning and project management with Gitea integration | 2.2.0 |
| `claude-config-maintainer` | CLAUDE.md optimization and maintenance | 1.0.0 |
| `cmdb-assistant` | NetBox CMDB integration for infrastructure management | 1.0.0 |
| `project-hygiene` | Post-task cleanup automation via hooks | 0.1.0 |
**Status:** projman v1.0.0 complete with full Gitea integration ## Quick Start
## File Creation Governance ```bash
# Validate marketplace compliance
./scripts/validate-marketplace.sh
### Allowed Root Files # Run projman commands (in a target project with plugin installed)
/sprint-plan # Start sprint planning
/sprint-status # Check progress
/review # Pre-close code quality review
/test-check # Verify tests before close
/sprint-close # Complete sprint
```
Only these files may exist at the repository root: ## Repository Structure
- `CLAUDE.md` - This file
- `README.md` - Repository overview
- `LICENSE` - License file
- `CHANGELOG.md` - Version history
- `.gitignore` - Git ignore rules
- `.env.example` - Environment template (if needed)
### Allowed Root Directories
Only these directories may exist at the repository root:
| Directory | Purpose |
|-----------|---------|
| `.claude/` | Claude Code local settings |
| `.claude-plugin/` | Marketplace manifest |
| `.claude-plugins/` | Local marketplace definitions |
| `.scratch/` | Transient work (auto-cleaned) |
| `docs/` | Documentation |
| `hooks/` | Shared hooks (if any) |
| `plugins/` | All plugins (projman, projman-pmo, project-hygiene, cmdb-assistant, claude-config-maintainer) |
| `scripts/` | Setup and maintenance scripts |
### File Creation Rules
1. **No new root files** - Do not create files directly in the repository root unless listed above
2. **No new root directories** - Do not create top-level directories without explicit approval
3. **Transient work goes in `.scratch/`** - Any temporary files, test outputs, or exploratory work must be created in `.scratch/`
4. **Clean up after tasks** - Delete files in `.scratch/` when the task is complete
5. **Documentation location** - All documentation goes in `docs/` with appropriate subdirectory:
- `docs/references/` - Reference specifications and summaries
- `docs/architecture/` - Architecture diagrams (Draw.io files)
- `docs/workflows/` - Workflow documentation
6. **No output files** - Do not leave generated output, logs, or test results outside designated directories
### Enforcement
Before creating any file, verify:
1. Is this file type allowed in the target location?
2. If temporary, am I using `.scratch/`?
3. If documentation, am I using the correct `docs/` subdirectory?
4. Will this file be cleaned up after the task?
**Violation of these rules creates technical debt and project chaos.**
## Path Verification (MANDATORY)
### Before Generating Any Prompt or Creating Any File
**This is non-negotiable. Failure to follow causes structural damage.**
1. **READ `docs/CANONICAL-PATHS.md` FIRST**
- This file is the single source of truth
- Never infer paths from memory or context
- Never assume paths based on conversation history
2. **List All Paths**
- Before generating a prompt, list every file path it will create/modify
- Show the list to the user
3. **Verify Each Path**
- Check each path against `docs/CANONICAL-PATHS.md`
- If a path is not in that file, STOP and ask
4. **Show Verification**
- Present a verification table to user:
```
| Path | Matches CANONICAL-PATHS.md? |
|------|----------------------------|
| plugins/projman/... | ✅ Yes |
```
5. **Get Confirmation**
- User must confirm paths are correct before proceeding
### Relative Path Rules
- Plugin to bundled MCP server: `${CLAUDE_PLUGIN_ROOT}/mcp-servers/{server}`
- Marketplace to plugin: `./../../../plugins/{plugin-name}`
- **ALWAYS calculate from CANONICAL-PATHS.md, never from memory**
### Recovery Protocol
If you suspect paths are wrong:
1. Read `docs/CANONICAL-PATHS.md`
2. Compare actual structure against documented structure
3. Report discrepancies
4. Generate corrective prompt if needed
## Core Architecture
### Three-Agent Model
The plugins implement a three-agent architecture that mirrors the proven workflow:
**Planner Agent** (`agents/planner.md`)
- Performs architecture analysis and sprint planning
- Creates detailed planning documents
- Makes architectural decisions
- Creates Gitea issues with appropriate labels
- Personality: Asks clarifying questions, thinks through edge cases, never rushes
**Orchestrator Agent** (`agents/orchestrator.md`)
- Coordinates sprint execution
- Generates lean execution prompts (not full docs)
- Tracks progress and updates documentation
- Handles Git operations (commit, merge, cleanup)
- Manages task dependencies
- Personality: Concise, action-oriented, tracks details meticulously
**Executor Agent** (`agents/executor.md`)
- Implements features according to execution prompts
- Writes clean, tested code
- Follows architectural decisions from planning
- Generates completion reports
- Personality: Implementation-focused, follows specs precisely
### MCP Server Integration
**Gitea MCP Server** (Python) - bundled in projman plugin
**Issue Tools:**
- `list_issues` - Query issues with filters
- `get_issue` - Fetch single issue details
- `create_issue` - Create new issue with labels
- `update_issue` - Modify existing issue
- `add_comment` - Add comments to issues
- `get_labels` - Fetch org + repo label taxonomy
- `suggest_labels` - Analyze context and suggest appropriate labels
**Milestone Tools:**
- `list_milestones` - List sprint milestones
- `get_milestone` - Get milestone details
- `create_milestone` - Create sprint milestone
- `update_milestone` - Update/close milestone
**Dependency Tools:**
- `list_issue_dependencies` - Get issue dependencies
- `create_issue_dependency` - Create dependency between issues
- `get_execution_order` - Get parallel execution batches
**Wiki Tools (Gitea Wiki):**
- `list_wiki_pages` - List wiki pages
- `get_wiki_page` - Fetch specific page content
- `create_wiki_page` - Create new wiki page
- `create_lesson` - Create lessons learned document
- `search_lessons` - Search past lessons by tags
**Validation Tools:**
- `validate_repo_org` - Check repo belongs to organization
- `get_branch_protection` - Check branch protection rules
- `create_label` - Create missing required labels
**Key Architecture Points:**
- MCP servers are **bundled inside each plugin** at `plugins/{plugin}/mcp-servers/`
- This ensures plugins work when cached by Claude Code (only plugin directory is cached)
- Configuration uses hybrid approach (system-level + project-level)
- All plugins reference `${CLAUDE_PLUGIN_ROOT}/mcp-servers/` in their `.mcp.json` files
## Branch-Aware Security Model
Plugin behavior adapts to the current Git branch to prevent accidental changes:
**Development Mode** (`development`, `feat/*`)
- Full access to all operations
- Can create Gitea issues
- Can modify all files
**Staging Mode** (`staging`)
- Read-only for application code
- Can modify `.env` files
- Can create issues to document needed fixes
- Warns on attempted code changes
**Production Mode** (`main`)
- Read-only for application code
- Emergency-only `.env` modifications
- Can create incident issues
- Blocks code changes
This behavior is implemented in both CLAUDE.md (file-level) and plugin agents (tool-level).
## Label Taxonomy System
The project uses a sophisticated 43-label taxonomy at organization level:
**Organization Labels (27):**
- Agent/2, Complexity/3, Efforts/5, Priority/4, Risk/3, Source/4, Type/6
**Repository Labels (16):**
- Component/9, Tech/7
**Important Labels:**
- `Type/Refactor` - For architectural changes and code restructuring (exclusive Type label)
- Used for service extraction, architecture modifications, technical debt
The label system includes:
- `skills/label-taxonomy/labels-reference.md` - Local reference synced from Gitea
- Label suggestion logic that detects appropriate labels from context
- `/labels-sync` command to review and sync changes from Gitea
## Lessons Learned System
**Critical Feature:** After 15 sprints without lesson capture, repeated mistakes occurred (e.g., Claude Code infinite loops on similar issues 2-3 times).
**Gitea Wiki Structure:**
Lessons learned are stored in the Gitea repository's built-in wiki under `lessons-learned/sprints/`.
**Workflow:**
- Orchestrator captures lessons at sprint close via Gitea Wiki MCP tools
- Planner searches relevant lessons at sprint start using `search_lessons`
- Tags enable cross-project lesson discovery
- Focus on preventable repetitions, not every detail
- Web interface available through Gitea Wiki
## Development Workflow
### Build Order
1. **Phase 1-8:** Build `projman` plugin first (single-repo)
2. **Phase 9-11:** Build `pmo` plugin second (multi-project)
3. **Phase 12:** Production deployment
See [docs/reference-material/projman-implementation-plan.md](docs/reference-material/projman-implementation-plan.md) for the complete 12-phase implementation plan.
### Repository Structure (DEFINITIVE)
⚠️ **See `docs/CANONICAL-PATHS.md` for the authoritative path reference - THIS IS THE SINGLE SOURCE OF TRUTH**
``` ```
personal-projects/support-claude-mktplace/ support-claude-mktplace/
├── .claude-plugin/ ├── .claude-plugin/
│ └── marketplace.json │ └── marketplace.json # Marketplace manifest
├── plugins/ # ← ALL PLUGINS (with bundled MCP servers) ├── plugins/
│ ├── projman/ # ← PROJECT PLUGIN │ ├── projman/ # Sprint management (v2.2.0)
│ │ ├── .claude-plugin/ │ │ ├── .claude-plugin/plugin.json
│ │ │ └── plugin.json
│ │ ├── .mcp.json # Points to ${CLAUDE_PLUGIN_ROOT}/mcp-servers/
│ │ ├── mcp-servers/ # ← MCP servers BUNDLED IN plugin
│ │ │ └── gitea/ # Gitea + Wiki tools
│ │ │ ├── .venv/
│ │ │ ├── requirements.txt
│ │ │ ├── mcp_server/
│ │ │ └── tests/
│ │ ├── commands/
│ │ │ ├── sprint-plan.md
│ │ │ ├── sprint-start.md
│ │ │ ├── sprint-status.md
│ │ │ ├── sprint-close.md
│ │ │ ├── labels-sync.md
│ │ │ └── initial-setup.md
│ │ ├── agents/
│ │ │ ├── planner.md
│ │ │ ├── orchestrator.md
│ │ │ └── executor.md
│ │ ├── skills/
│ │ │ └── label-taxonomy/
│ │ │ └── labels-reference.md
│ │ ├── README.md
│ │ └── CONFIGURATION.md
│ ├── projman-pmo/ # ← PMO PLUGIN
│ │ ├── .claude-plugin/
│ │ │ └── plugin.json
│ │ ├── .mcp.json │ │ ├── .mcp.json
│ │ ├── commands/ │ │ ├── mcp-servers/gitea/ # Bundled MCP server
│ │ ├── agents/ │ │ ├── commands/ # 8 commands
│ │ │ ── pmo-coordinator.md │ │ │ ── sprint-plan.md, sprint-start.md, sprint-status.md
│ │ ── README.md │ │ ── sprint-close.md, labels-sync.md, initial-setup.md
├── cmdb-assistant/ # ← CMDB PLUGIN ├── review.md, test-check.md # NEW in v2.2.0
│ │ ├── .claude-plugin/ │ │ ├── agents/ # 4 agents
│ │ │ ── plugin.json │ │ │ ── planner.md, orchestrator.md, executor.md
│ │ ── .mcp.json # Points to ${CLAUDE_PLUGIN_ROOT}/mcp-servers/ │ │ ── code-reviewer.md # NEW in v2.2.0
│ │ ── mcp-servers/ # ← MCP servers BUNDLED IN plugin │ │ ── skills/label-taxonomy/
│ │ └── netbox/ ├── claude-config-maintainer/
│ │ ├── .venv/ ├── cmdb-assistant/
│ │ ├── requirements.txt └── project-hygiene/
│ │ │ └── mcp_server/ ├── scripts/
│ ├── commands/ │ ├── setup.sh, post-update.sh
│ └── agents/ │ └── validate-marketplace.sh # NEW in v2.2.0
│ └── project-hygiene/ # ← CLEANUP PLUGIN
│ └── ...
├── scripts/ # Setup and maintenance scripts
│ ├── setup.sh
│ └── post-update.sh
└── docs/ └── docs/
├── CANONICAL-PATHS.md # Single source of truth for paths
└── references/
``` ```
### Key Design Decisions
**MCP Servers (Bundled in Plugins):**
- **Gitea MCP**: Issues, labels, wiki, milestones, dependencies (bundled in projman)
- **NetBox MCP**: Infrastructure management (bundled in cmdb-assistant)
- Servers are **bundled inside each plugin** that needs them
- This ensures plugins work when cached by Claude Code
**Python Implementation:**
- Python chosen over Node.js for MCP servers
- Better suited for configuration management and modular code
- Easier to maintain and extend
- Virtual environment (.venv) per MCP server
**Hybrid Configuration:**
- **System-level**: `~/.config/claude/gitea.env` (credentials)
- **Project-level**: `project-root/.env` (repository specification)
- Merge strategy: project overrides system
- Benefits: Single token per service, easy multi-project setup
**Skills as Knowledge, Not Orchestrators:**
- Skills provide supporting knowledge loaded when relevant
- Agents are the primary interface
- Reduces token usage
- Makes knowledge reusable across agents
**Branch Detection:**
- Two layers: CLAUDE.md (file access) + Plugin agents (tool usage)
- Defense in depth approach
- Plugin works with or without CLAUDE.md
## Multi-Project Context (PMO Plugin)
The `projman-pmo` plugin coordinates interdependent projects across an organization. Example use cases:
- Main product repository
- Marketing/documentation sites
- Extracted services
- Supporting tools
PMO plugin adds:
- Cross-project issue aggregation (all repos in organization)
- Dependency tracking and visualization
- Resource allocation across projects
- Deployment coordination
- Multi-project prioritization
- Company-wide lessons learned search
**Configuration Difference:**
- PMO operates at company level (no `GITEA_REPO`)
- Accesses all repositories in organization
- Aggregates issues and lessons across projects
Build PMO plugin AFTER projman is working and validated.
## Testing Approach
**Local Marketplace:**
Create local marketplace for plugin development:
```
~/projman-dev-marketplace/
├── .claude-plugin/
│ └── marketplace.json
└── projman/ # Symlink to plugin directory
```
**Integration Testing:**
Test in a real repository with actual Gitea instance before distribution.
**Success Metrics:**
- Sprint planning time reduced 40%
- Manual steps eliminated: 10+ per sprint
- Lessons learned capture rate: 100% (vs 0% before)
- Label accuracy on issues: 90%+
- User satisfaction: Better than current manual workflow
## Important Notes
- **Never modify docker-compose files with 'version' attribute** - It's obsolete
- **Focus on implementation, not over-engineering** - This system has been validated over 15 sprints
- **Lessons learned is critical** - Prevents repeated mistakes (e.g., Claude infinite loops)
- **Type/Refactor label** - Newly implemented at org level for architectural work
- **Branch detection must be 100% reliable** - Prevents production accidents
- **Python for MCP servers** - Use Python 3.8+ with virtual environments
- **CLI tools forbidden** - Use MCP tools exclusively, never CLI tools like `tea` or `gh`
## CRITICAL: Rules You MUST Follow ## CRITICAL: Rules You MUST Follow
### DO NOT MODIFY .gitignore Without Explicit Permission ### File Operations
- This is a **private repository** - credentials in `.env` files are intentional - **NEVER** create files in repository root unless listed in "Allowed Root Files"
- **NEVER** add `.env` or `.env.*` to .gitignore - **NEVER** modify `.gitignore` without explicit permission
- **NEVER** add venv patterns unless explicitly asked - **ALWAYS** use `.scratch/` for temporary/exploratory work
- If you think something should be ignored, ASK FIRST - **ALWAYS** verify paths against `docs/CANONICAL-PATHS.md` before creating files
### Plugin Structure Requirements ### Plugin Development
- **plugin.json MUST be in `.claude-plugin/` directory** - NOT in plugin root - **plugin.json MUST be in `.claude-plugin/` directory** (not plugin root)
- Every plugin in the repo MUST be listed in the marketplace.json - **Every plugin MUST be listed in marketplace.json**
- After creating/modifying a plugin, VERIFY it's in the marketplace - **MCP servers MUST use venv python path**: `${CLAUDE_PLUGIN_ROOT}/mcp-servers/{name}/.venv/bin/python`
- **CLI tools forbidden** - Use MCP tools exclusively (never `tea`, `gh`, etc.)
### Hooks Syntax (Claude Code Official) ### Hooks (Valid Events Only)
- **Valid events**: `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Notification`, `Stop`, `SubagentStop`, `PreCompact` `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: **INVALID:** `task-completed`, `file-changed`, `git-commit-msg-needed`
```json
{ ### Allowed Root Files
"hooks": { `CLAUDE.md`, `README.md`, `LICENSE`, `CHANGELOG.md`, `.gitignore`, `.env.example`
"EventName": [
{ ### Allowed Root Directories
"matcher": "optional-pattern", `.claude/`, `.claude-plugin/`, `.claude-plugins/`, `.scratch/`, `docs/`, `hooks/`, `plugins/`, `scripts/`
"hooks": [
{ ## Architecture
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/path/to/script.sh" ### Four-Agent Model (projman v2.2.0)
}
] | Agent | Personality | Responsibilities |
} |-------|-------------|------------------|
] | **Planner** | Thoughtful, methodical | Sprint planning, architecture analysis, issue creation, lesson search |
} | **Orchestrator** | Concise, action-oriented | Sprint execution, parallel batching, Git operations, lesson capture |
} | **Executor** | Implementation-focused | Code implementation, branch management, MR creation |
| **Code Reviewer** | Thorough, practical | Pre-close quality review, security scan, test verification |
### MCP Server Tools (Gitea)
| Category | Tools |
|----------|-------|
| Issues | `list_issues`, `get_issue`, `create_issue`, `update_issue`, `add_comment` |
| Labels | `get_labels`, `suggest_labels`, `create_label` |
| Milestones | `list_milestones`, `get_milestone`, `create_milestone`, `update_milestone` |
| Dependencies | `list_issue_dependencies`, `create_issue_dependency`, `get_execution_order` |
| Wiki | `list_wiki_pages`, `get_wiki_page`, `create_wiki_page`, `create_lesson`, `search_lessons` |
| Validation | `validate_repo_org`, `get_branch_protection` |
### Hybrid Configuration
| Level | Location | Purpose |
|-------|----------|---------|
| System | `~/.config/claude/gitea.env` | Credentials (GITEA_URL, GITEA_TOKEN, GITEA_ORG) |
| Project | `.env` in project root | Repository specification (GITEA_REPO) |
### Branch-Aware Security
| Branch Pattern | Mode | Capabilities |
|----------------|------|--------------|
| `development`, `feat/*` | Development | Full access |
| `staging` | Staging | Read-only code, can create issues |
| `main`, `master` | Production | Read-only, emergency only |
## Label Taxonomy
43 labels total: 27 organization + 16 repository
**Organization:** Agent/2, Complexity/3, Efforts/5, Priority/4, Risk/3, Source/4, Type/6
**Repository:** Component/9, Tech/7
Sync with `/labels-sync` command.
## Lessons Learned System
Stored in Gitea Wiki under `lessons-learned/sprints/`.
**Workflow:**
1. Orchestrator captures at sprint close via MCP tools
2. Planner searches at sprint start using `search_lessons`
3. Tags enable cross-project discovery
## Common Operations
### Adding a New Plugin
1. Create `plugins/{name}/.claude-plugin/plugin.json`
2. Add entry to `.claude-plugin/marketplace.json`
3. Create `README.md` and `claude-md-integration.md`
4. Run `./scripts/validate-marketplace.sh`
5. Update `CHANGELOG.md`
### Adding a Command to projman
1. Create `plugins/projman/commands/{name}.md`
2. Update `plugins/projman/README.md`
3. Update marketplace description if significant
### Validation
```bash
./scripts/validate-marketplace.sh # Validates all manifests
``` ```
### MCP Server Configuration ## Path Verification Protocol
- 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 **Before creating any file:**
1. Verify plugin.json is in `.claude-plugin/` directory
2. Verify plugin is listed in marketplace.json 1. Read `docs/CANONICAL-PATHS.md`
3. Test MCP server configs load correctly 2. List all paths to be created/modified
4. Verify hooks use valid event types 3. Verify each against canonical paths
5. Check .gitignore wasn't modified inappropriately 4. If not in canonical paths, STOP and ask
## Documentation Index ## Documentation Index
This repository contains comprehensive planning documentation: | Document | Purpose |
|----------|---------|
| `docs/CANONICAL-PATHS.md` | **Single source of truth** for paths |
| `docs/references/` | Reference specs and summaries |
| `plugins/projman/CONFIGURATION.md` | Projman setup guide |
| `plugins/projman/README.md` | Projman full documentation |
- **`docs/CANONICAL-PATHS.md`** - ⚠️ SINGLE SOURCE OF TRUTH for all paths (MANDATORY reading before any file operations) ## Version History
- **`docs/DOCUMENT-INDEX.md`** - Complete guide to all planning documents
- **`docs/projman-implementation-plan-updated.md`** - Full 12-phase implementation plan
- **`docs/projman-python-quickstart.md`** - Python-specific implementation guide
- **`docs/two-mcp-architecture-guide.md`** - Deep dive into two-MCP architecture
**Start with:** `docs/DOCUMENT-INDEX.md` for navigation guidance | Version | Date | Highlights |
|---------|------|------------|
| 2.2.0 | 2026-01-20 | `/review`, `/test-check` commands, code-reviewer agent, validation script, marketplace compliance |
| 2.1.0 | Previous | Canonical paths, initial-setup command, documentation improvements |
| 2.0.0 | Previous | Full Gitea integration, wiki, milestones, dependencies, parallel execution |
| 0.1.0 | Initial | Basic plugin structure |
## Recent Updates (Updated: 2025-06-11) ---
### Planning Phase Complete **Last Updated:** 2026-01-20 | **Current Version:** 2.2.0
- Comprehensive 12-phase implementation plan finalized
- Architecture decisions documented and validated
- Two-MCP-server approach confirmed (Gitea + Wiki.js)
- Python selected for MCP server implementation
- Hybrid configuration strategy defined (system + project level)
- Wiki.js structure planned with configurable base path
- Repository structure designed with shared MCP servers
### Key Architectural Decisions Made
1. **Shared MCP Servers**: Both plugins use the same MCP codebase at `mcp-servers/`
2. **Mode Detection**: MCP servers detect project vs company-wide mode via environment variables
3. **Python Implementation**: MCP servers written in Python (not Node.js) for better configuration handling
4. **Wiki.js Integration**: Lessons learned and documentation moved to Wiki.js for better collaboration
5. **Hybrid Config**: System-level credentials + project-level paths for flexibility
### Next Steps
- Begin Phase 1.1a: Gitea MCP Server implementation
- Set up Python virtual environments
- Create configuration loaders
- Implement core Gitea tools (issues, labels)
- Write integration tests

140
README.md
View File

@@ -4,19 +4,20 @@ A collection of Claude Code plugins for project management, infrastructure autom
## Plugins ## Plugins
### [projman](./plugins/projman/README.md) v2.0.0 ### [projman](./plugins/projman/README.md) v2.2.0
**Sprint Planning and Project Management** **Sprint Planning and Project Management**
AI-guided sprint planning with full Gitea integration. Transforms a proven 15-sprint workflow into a distributable plugin. AI-guided sprint planning with full Gitea integration. Transforms a proven 15-sprint workflow into a distributable plugin.
- Three-agent model: Planner, Orchestrator, Executor - Three-agent model: Planner, Orchestrator, Executor, Code Reviewer
- Intelligent label suggestions from 43-label taxonomy - Intelligent label suggestions from 43-label taxonomy
- Lessons learned capture via Gitea Wiki - Lessons learned capture via Gitea Wiki
- Native issue dependencies with parallel execution - Native issue dependencies with parallel execution
- Milestone management for sprint organization - Milestone management for sprint organization
- Branch-aware security (development/staging/production) - Branch-aware security (development/staging/production)
- Pre-sprint-close code quality review and test verification
**Commands:** `/sprint-plan`, `/sprint-start`, `/sprint-status`, `/sprint-close`, `/labels-sync`, `/initial-setup` **Commands:** `/sprint-plan`, `/sprint-start`, `/sprint-status`, `/sprint-close`, `/labels-sync`, `/initial-setup`, `/review`, `/test-check`
### [claude-config-maintainer](./plugins/claude-config-maintainer/README.md) ### [claude-config-maintainer](./plugins/claude-config-maintainer/README.md)
**CLAUDE.md Optimization and Maintenance** **CLAUDE.md Optimization and Maintenance**
@@ -89,67 +90,92 @@ Comprehensive NetBox REST API integration for infrastructure management.
- Python 3.10+ - Python 3.10+
- Access to target services (Gitea, NetBox as needed) - Access to target services (Gitea, NetBox as needed)
### Quick Start ### Add Marketplace to Claude Code
1. **Clone the repository:** **Option 1 - CLI command (recommended):**
```bash ```bash
git clone ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/support-claude-mktplace.git /plugin marketplace add https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git
cd support-claude-mktplace ```
```
2. **Install MCP server dependencies:** **Option 2 - Settings file (for team distribution):**
```bash
# Gitea MCP (for projman)
cd plugins/projman/mcp-servers/gitea
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate
# NetBox MCP (for cmdb-assistant) Add to `.claude/settings.json` in your target project:
cd ../../../cmdb-assistant/mcp-servers/netbox ```json
python3 -m venv .venv {
source .venv/bin/activate "extraKnownMarketplaces": {
pip install -r requirements.txt "support-claude-mktplace": {
deactivate "source": {
``` "source": "git",
"url": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git"
}
}
}
}
```
3. **Configure system-level credentials:** **Option 3 - Local development:**
```bash ```bash
mkdir -p ~/.config/claude # Clone the repository first
git clone https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git
# Gitea credentials # Then add from local path
cat > ~/.config/claude/gitea.env << 'EOF' /plugin marketplace add /path/to/support-claude-mktplace
GITEA_URL=https://gitea.example.com ```
GITEA_TOKEN=your_token
GITEA_ORG=your_org
EOF
# NetBox credentials **Alternative SSH URL (for authenticated access):**
cat > ~/.config/claude/netbox.env << 'EOF' ```
NETBOX_API_URL=https://netbox.example.com/api ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/support-claude-mktplace.git
NETBOX_API_TOKEN=your_token ```
EOF
chmod 600 ~/.config/claude/*.env ### Configure MCP Server Dependencies
```
4. **Configure project-level settings:** If using plugins with MCP servers (projman, cmdb-assistant), install dependencies:
```bash
# In your target project root
cat > .env << 'EOF'
GITEA_REPO=your-repository-name
EOF
```
5. **Add marketplace to Claude Code:** ```bash
# Gitea MCP (for projman)
cd plugins/projman/mcp-servers/gitea
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate
Add to your project's `.claude/settings.json`: # NetBox MCP (for cmdb-assistant)
```json cd ../../../cmdb-assistant/mcp-servers/netbox
{ python3 -m venv .venv
"pluginMarketplace": "/path/to/support-claude-mktplace" source .venv/bin/activate
} pip install -r requirements.txt
``` deactivate
```
### Configure Credentials
**System-level credentials:**
```bash
mkdir -p ~/.config/claude
# Gitea credentials
cat > ~/.config/claude/gitea.env << 'EOF'
GITEA_URL=https://gitea.example.com
GITEA_TOKEN=your_token
GITEA_ORG=your_org
EOF
# NetBox credentials
cat > ~/.config/claude/netbox.env << 'EOF'
NETBOX_API_URL=https://netbox.example.com/api
NETBOX_API_TOKEN=your_token
EOF
chmod 600 ~/.config/claude/*.env
```
**Project-level settings:**
```bash
# In your target project root
cat > .env << 'EOF'
GITEA_REPO=your-repository-name
EOF
```
## Repository Structure ## Repository Structure
@@ -183,9 +209,10 @@ support-claude-mktplace/
│ ├── CANONICAL-PATHS.md # Single source of truth for paths │ ├── CANONICAL-PATHS.md # Single source of truth for paths
│ └── references/ │ └── references/
└── scripts/ # Setup and maintenance scripts └── scripts/ # Setup and maintenance scripts
└── validate-marketplace.sh # Marketplace compliance validation
``` ```
## Key Features (v2.0.0) ## Key Features (v2.2.0)
### Parallel Execution ### Parallel Execution
Tasks are batched by dependency graph for optimal parallel execution: Tasks are batched by dependency graph for optimal parallel execution:
@@ -217,4 +244,5 @@ MIT License
## Support ## Support
- **Issues**: Contact repository maintainer - **Issues**: Contact repository maintainer
- **Repository**: `ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/support-claude-mktplace.git` - **Repository**: `https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git`
- **SSH URL**: `ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/support-claude-mktplace.git`

View File

@@ -2,29 +2,21 @@
"name": "claude-config-maintainer", "name": "claude-config-maintainer",
"version": "1.0.0", "version": "1.0.0",
"description": "Maintains and optimizes CLAUDE.md configuration files for Claude Code projects", "description": "Maintains and optimizes CLAUDE.md configuration files for Claude Code projects",
"entryPoint": "agents/maintainer.md", "author": {
"commands": [ "name": "Leo Miranda",
{ "email": "leobmiranda@gmail.com"
"name": "config-analyze", },
"description": "Analyze CLAUDE.md for optimization opportunities", "homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/claude-config-maintainer/README.md",
"entryPoint": "commands/analyze.md" "repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
}, "license": "MIT",
{ "keywords": [
"name": "config-optimize", "claude-code",
"description": "Optimize CLAUDE.md structure and content", "configuration",
"entryPoint": "commands/optimize.md" "optimization",
}, "claude-md",
{ "developer-tools"
"name": "config-init",
"description": "Initialize a new CLAUDE.md file for a project",
"entryPoint": "commands/init.md"
}
], ],
"agents": [ "entryPoint": "agents/maintainer.md",
{ "commands": ["./commands/"],
"name": "maintainer", "agents": ["./agents/"]
"description": "CLAUDE.md optimization and maintenance agent",
"entryPoint": "agents/maintainer.md"
}
]
} }

View File

@@ -6,7 +6,8 @@
"name": "Leo Miranda", "name": "Leo Miranda",
"email": "leobmiranda@gmail.com" "email": "leobmiranda@gmail.com"
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace", "homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/cmdb-assistant/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [
"netbox", "netbox",
@@ -15,5 +16,8 @@
"network", "network",
"ipam", "ipam",
"dcim" "dcim"
] ],
"commands": ["./commands/"],
"agents": ["./agents/"],
"mcpServers": "./.mcp.json"
} }

View File

@@ -6,9 +6,16 @@
"name": "Leo Miranda", "name": "Leo Miranda",
"email": "leobmiranda@gmail.com" "email": "leobmiranda@gmail.com"
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/project-hygiene/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"license": "MIT", "license": "MIT",
"keywords": ["cleanup", "hygiene", "automation", "hooks", "maintenance"], "keywords": [
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace", "cleanup",
"hygiene",
"automation",
"hooks",
"maintenance"
],
"hooks": { "hooks": {
"PostToolUse": [ "PostToolUse": [
{ {

View File

@@ -1,18 +1,21 @@
{ {
"name": "projman", "name": "projman",
"version": "2.0.0", "version": "2.2.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",
"email": "leobmiranda@gmail.com" "email": "leobmiranda@gmail.com"
}, },
"homepage": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace/src/branch/main/plugins/projman/README.md",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace.git",
"license": "MIT", "license": "MIT",
"repository": "https://gitea.hotserv.cloud/personal-projects/support-claude-mktplace",
"keywords": [ "keywords": [
"project-management", "project-management",
"sprint-planning", "sprint-planning",
"gitea", "gitea",
"agile", "agile",
"lessons-learned" "lessons-learned"
] ],
"commands": ["./commands/"],
"agents": ["./agents/"]
} }

View File

@@ -1,4 +1,4 @@
# Projman v2.0.0 - Project Management for Claude Code # Projman v2.2.0 - Project Management for Claude Code
Sprint planning and project management plugin with full Gitea integration. Sprint planning and project management plugin with full Gitea integration.
@@ -174,6 +174,43 @@ Run initial setup for a new project.
**When to use:** First time setting up projman for a project **When to use:** First time setting up projman for a project
### `/review`
Pre-sprint-close code quality review.
**What it does:**
- Scans recent changes for debug artifacts (TODO, console.log, commented code)
- Checks for code complexity issues (long functions, deep nesting)
- Performs lightweight security scan (hardcoded secrets, SQL injection risks)
- Identifies error handling gaps (bare except, swallowed exceptions)
**Output format:**
- Critical Issues (Block Sprint Close)
- Warnings (Should Address)
- Recommendations (Nice to Have)
**When to use:** Before closing a sprint to ensure code quality
### `/test-check`
Test verification before sprint close.
**What it does:**
- Automatically detects test framework (pytest, Jest, Go test, Cargo, etc.)
- Runs the test suite
- Reports pass/fail summary with details on failures
- Includes coverage report when available
- Identifies sprint files lacking test coverage
**Flags:**
- "run tests with coverage" - Include coverage report
- "run tests verbose" - Show full output
- "just check, don't run" - Report framework detection only
**When to use:** Before closing a sprint to ensure tests pass
## Code Quality Commands
The `/review` and `/test-check` commands complement the Executor agent by catching issues before work is marked complete. Run both commands before `/sprint-close` for a complete quality check.
## Agents ## Agents
### Planner Agent ### Planner Agent
@@ -203,6 +240,17 @@ Run initial setup for a new project.
**Invoked by:** `/sprint-start`, `/sprint-close` **Invoked by:** `/sprint-start`, `/sprint-close`
### Code Reviewer Agent
**Personality:** Thorough, practical, severity-focused
**Responsibilities:**
- Identifying code quality issues before sprint close
- Prioritizing findings (Critical > Warning > Recommendation)
- Providing actionable feedback with file:line references
- Respecting sprint scope (only reviewing changed files)
**Invoked by:** `/review`
### Executor Agent ### Executor Agent
**Personality:** Implementation-focused, follows specs precisely **Personality:** Implementation-focused, follows specs precisely
@@ -373,11 +421,14 @@ projman/
│ ├── sprint-status.md │ ├── sprint-status.md
│ ├── sprint-close.md │ ├── sprint-close.md
│ ├── labels-sync.md │ ├── labels-sync.md
── initial-setup.md ── initial-setup.md
│ ├── review.md
│ └── test-check.md
├── agents/ # Agent prompts ├── agents/ # Agent prompts
│ ├── planner.md │ ├── planner.md
│ ├── orchestrator.md │ ├── orchestrator.md
── executor.md ── executor.md
│ └── code-reviewer.md
├── skills/ # Supporting knowledge ├── skills/ # Supporting knowledge
│ └── label-taxonomy/ │ └── label-taxonomy/
│ └── labels-reference.md │ └── labels-reference.md
@@ -430,9 +481,11 @@ MIT License - See repository root for details
## Version ## Version
**Current:** 2.0.0 **Current:** 2.2.0
**Changelog:** **Changelog:**
- v2.2.0: Added `/review` and `/test-check` commands, code-reviewer agent, marketplace compliance updates
- v2.1.0: Documentation improvements, canonical paths, initial-setup command
- v2.0.0: Full Gitea integration with wiki, milestones, dependencies, parallel execution - v2.0.0: Full Gitea integration with wiki, milestones, dependencies, parallel execution
- v1.0.0: Initial release with basic commands - v1.0.0: Initial release with basic commands

View File

@@ -0,0 +1,90 @@
---
name: code-reviewer
description: Specialized agent for pre-sprint code quality review
---
# Code Reviewer Agent
You are a code quality reviewer focused on catching issues before sprint close.
## Your Role
- Identify issues that should be fixed before work is marked complete
- Prioritize findings by severity (Critical > Warning > Recommendation)
- Be concise—developers need actionable feedback, not lectures
- Respect sprint scope—don't expand review beyond changed files
## Review Philosophy
**Critical**: Security issues, broken functionality, data loss risks
- Hardcoded credentials or API keys
- SQL injection vulnerabilities
- Missing authentication/authorization checks
- Unhandled errors that could crash the application
**Warning**: Technical debt that will cause problems soon
- TODO/FIXME comments left unresolved
- Debug statements (console.log, print) in production code
- Functions over 50 lines (complexity smell)
- Deeply nested conditionals (>3 levels)
- Bare except/catch blocks
**Recommendation**: Improvements that can wait for a future sprint
- Missing docstrings on public functions
- Minor code duplication
- Commented-out code blocks
## What You Don't Do
- Bikeshed on style (assume formatters handle this)
- Suggest architectural rewrites mid-sprint
- Flag issues in unchanged code (unless directly impacted)
- Automatically fix code without explicit approval
## Integration with Projman
When sprint context is available, you can:
- Reference the sprint's issue list
- Create follow-up issues for non-critical findings via Gitea MCP
- Tag findings with appropriate labels from the 43-label taxonomy
## Review Patterns by Language
### Python
- Look for: bare `except:`, `print()` statements, `# TODO`, missing type hints on public APIs
- Security: `eval()`, `exec()`, SQL string formatting, `verify=False`
### JavaScript/TypeScript
- Look for: `console.log`, `// TODO`, `any` type abuse, missing error boundaries
- Security: `eval()`, `innerHTML`, unescaped user input
### Go
- Look for: `// TODO`, ignored errors (`_`), missing error returns
- Security: SQL concatenation, missing input validation
### Rust
- Look for: `// TODO`, `unwrap()` chains, `unsafe` blocks without justification
- Security: unchecked `unwrap()` on user input
## Output Template
```
## Code Review Summary
**Scope**: [X files from sprint/last N commits]
**Verdict**: [READY FOR CLOSE / NEEDS ATTENTION / BLOCKED]
### Critical (Must Fix)
- `src/auth.py:45` - Hardcoded API key in source code
### Warnings (Should Fix)
- `src/utils.js:123` - console.log left in production code
- `src/handler.py:67` - Bare except block swallows all errors
### Recommendations (Future Sprint)
- `src/api.ts:89` - Function exceeds 50 lines, consider splitting
### Clean Files
- src/models.py
- src/tests/test_auth.py
```

View File

@@ -0,0 +1,82 @@
---
name: review
description: Pre-sprint-close code quality review
---
# Code Review for Sprint Close
Review the recent code changes for quality issues before closing the sprint.
## Review Checklist
Analyze the changes and report on:
### 1. Debug Artifacts
- [ ] TODO/FIXME comments that should be resolved or converted to issues
- [ ] Console.log, print(), debug statements left in code
- [ ] Commented-out code blocks
### 2. Code Quality
- [ ] Functions exceeding 50 lines (complexity smell)
- [ ] Deeply nested conditionals (>3 levels)
- [ ] Duplicate code patterns
- [ ] Missing docstrings/comments on public functions
### 3. Security Scan (Lightweight)
- [ ] Hardcoded strings that look like secrets (API keys, passwords, tokens)
- [ ] SQL strings with concatenation (injection risk)
- [ ] Disabled SSL verification
- [ ] Overly permissive file permissions in code
### 4. Error Handling
- [ ] Bare except/catch blocks
- [ ] Swallowed exceptions (catch with pass/empty block)
- [ ] Missing null/undefined checks on external data
## Output Format
Provide a structured report:
```
## Sprint Review Summary
### Critical Issues (Block Sprint Close)
- [file:line] Description
### Warnings (Should Address)
- [file:line] Description
### Recommendations (Nice to Have)
- [file:line] Description
### Clean Files
- List of files with no issues found
```
## Scope
If sprint context is available from projman, limit review to files touched in current sprint.
Otherwise, review staged changes or changes in the last 5 commits.
## How to Determine Scope
1. **Check for sprint context**: Look for `.projman/current-sprint.json` or similar
2. **Fall back to git changes**: Use `git diff --name-only HEAD~5` or staged files
3. **Filter by file type**: Focus on code files (.py, .js, .ts, .go, .rs, etc.)
## Execution Steps
1. Determine scope (sprint files or recent commits)
2. For each file in scope:
- Read the file content
- Scan for patterns in each category
- Record findings with file:line references
3. Compile findings into the structured report
4. Provide recommendation: READY / NEEDS ATTENTION / BLOCK
## Do NOT
- Rewrite or refactor code automatically
- Make changes without explicit approval
- Review files outside the sprint/change scope
- Spend excessive time on style issues (assume formatters handle this)

View File

@@ -0,0 +1,163 @@
---
name: test-check
description: Run tests and verify coverage before sprint close
---
# Test Check for Sprint Close
Verify test status and coverage before closing the sprint.
## Framework Detection
Detect the test framework by checking for:
| Indicator | Framework | Command |
|-----------|-----------|---------|
| `pytest.ini`, `pyproject.toml` with pytest, `tests/` with `test_*.py` | pytest | `pytest` |
| `package.json` with jest | Jest | `npm test` or `npx jest` |
| `package.json` with mocha | Mocha | `npm test` or `npx mocha` |
| `package.json` with vitest | Vitest | `npm test` or `npx vitest` |
| `go.mod` with `*_test.go` files | Go test | `go test ./...` |
| `Cargo.toml` with `tests/` or `#[test]` | Cargo test | `cargo test` |
| `Makefile` with test target | Make | `make test` |
| `tox.ini` | tox | `tox` |
| `setup.py` with test command | setuptools | `python setup.py test` |
## Execution Steps
### 1. Detect Framework
1. Check for framework indicators in project root
2. If multiple found, list them and ask which to run
3. If none found, report "No test framework detected"
### 2. Run Tests
1. Execute the appropriate test command
2. Capture stdout/stderr
3. Parse results for pass/fail counts
4. Note: Some frameworks may require dependencies to be installed first
### 3. Coverage Check (if available)
Coverage tools by framework:
- **Python**: `pytest --cov` or `coverage run`
- **JavaScript**: Jest has built-in coverage (`--coverage`)
- **Go**: `go test -cover`
- **Rust**: `cargo tarpaulin` or `cargo llvm-cov`
If coverage is configured:
- Report overall coverage percentage
- List files with 0% coverage that were changed in sprint
### 4. Sprint File Analysis
If sprint context is available:
- Identify which sprint files have tests
- Flag sprint files with no corresponding test coverage
## Output Format
```
## Test Check Summary
### Test Results
- Framework: {detected framework}
- Status: {PASS/FAIL}
- Passed: {n} | Failed: {n} | Skipped: {n}
- Duration: {time}
### Failed Tests
- test_name: error message (file:line)
### Coverage (if available)
- Overall: {n}%
- Sprint files coverage:
- file.py: {n}%
- file.py: NO TESTS
### Recommendation
{READY FOR CLOSE / TESTS MUST PASS / COVERAGE GAPS TO ADDRESS}
```
## Behavior Flags
The command accepts optional flags via natural language:
| Request | Behavior |
|---------|----------|
| "run tests with coverage" | Include coverage report |
| "run tests verbose" | Show full output |
| "just check, don't run" | Report framework detection only |
| "run specific tests for X" | Run tests matching pattern |
## Framework-Specific Notes
### Python (pytest)
```bash
# Basic run
pytest
# With coverage
pytest --cov=src --cov-report=term-missing
# Verbose
pytest -v
# Specific tests
pytest tests/test_specific.py -k "test_function_name"
```
### JavaScript (Jest/Vitest)
```bash
# Basic run
npm test
# With coverage
npm test -- --coverage
# Specific tests
npm test -- --testPathPattern="specific"
```
### Go
```bash
# Basic run
go test ./...
# With coverage
go test -cover ./...
# Verbose
go test -v ./...
```
### Rust
```bash
# Basic run
cargo test
# Verbose
cargo test -- --nocapture
```
## Do NOT
- Modify test files
- Skip failing tests to make the run pass
- Run tests in production environments (check for .env indicators)
- Install dependencies without asking first
- Run tests that require external services without confirmation
## Error Handling
If tests fail:
1. Report the failure clearly
2. List failed test names and error summaries
3. Recommend: "TESTS MUST PASS before sprint close"
4. Offer to help debug specific failures
If framework not detected:
1. List what was checked
2. Ask user to specify the test command
3. Offer common suggestions based on file types found

139
scripts/validate-marketplace.sh Executable file
View File

@@ -0,0 +1,139 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
echo "=== Validating Marketplace ==="
# Check marketplace.json exists and is valid JSON
MARKETPLACE_JSON="$ROOT_DIR/.claude-plugin/marketplace.json"
if [[ ! -f "$MARKETPLACE_JSON" ]]; then
echo "ERROR: Missing $MARKETPLACE_JSON"
exit 1
fi
if ! jq empty "$MARKETPLACE_JSON" 2>/dev/null; then
echo "ERROR: Invalid JSON in marketplace.json"
exit 1
fi
echo "✓ marketplace.json is valid JSON"
# Check required fields
if ! jq -e '.name' "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing 'name' field in marketplace.json"
exit 1
fi
if ! jq -e '.owner.name' "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing 'owner.name' field in marketplace.json"
exit 1
fi
if ! jq -e '.owner.email' "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing 'owner.email' field in marketplace.json"
exit 1
fi
echo "✓ Required marketplace fields present"
# Check plugins array exists
if ! jq -e '.plugins | type == "array"' "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing or invalid 'plugins' array in marketplace.json"
exit 1
fi
# Check each plugin entry in marketplace.json
PLUGIN_COUNT=$(jq '.plugins | length' "$MARKETPLACE_JSON")
echo "Found $PLUGIN_COUNT plugins in marketplace.json"
for i in $(seq 0 $((PLUGIN_COUNT - 1))); do
PLUGIN_NAME=$(jq -r ".plugins[$i].name" "$MARKETPLACE_JSON")
echo "--- Checking marketplace entry: $PLUGIN_NAME ---"
# Check required fields in marketplace entry
for field in name source description version; do
if ! jq -e ".plugins[$i].$field" "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing '$field' in marketplace entry for $PLUGIN_NAME"
exit 1
fi
done
# Check author field
if ! jq -e ".plugins[$i].author.name" "$MARKETPLACE_JSON" >/dev/null; then
echo "ERROR: Missing 'author.name' in marketplace entry for $PLUGIN_NAME"
exit 1
fi
# Check homepage and repository
if ! jq -e ".plugins[$i].homepage" "$MARKETPLACE_JSON" >/dev/null; then
echo "WARNING: Missing 'homepage' in marketplace entry for $PLUGIN_NAME"
fi
if ! jq -e ".plugins[$i].repository" "$MARKETPLACE_JSON" >/dev/null; then
echo "WARNING: Missing 'repository' in marketplace entry for $PLUGIN_NAME"
fi
echo "✓ Marketplace entry $PLUGIN_NAME valid"
done
# Validate each plugin directory
PLUGINS_DIR="$ROOT_DIR/plugins"
echo ""
echo "=== Validating Plugin Directories ==="
for plugin_dir in "$PLUGINS_DIR"/*/; do
plugin_name=$(basename "$plugin_dir")
echo "--- Checking plugin directory: $plugin_name ---"
# Check plugin.json exists
plugin_json="$plugin_dir.claude-plugin/plugin.json"
if [[ ! -f "$plugin_json" ]]; then
echo "WARNING: Missing plugin.json in $plugin_name/.claude-plugin/"
continue
fi
# Validate JSON syntax
if ! jq empty "$plugin_json" 2>/dev/null; then
echo "ERROR: Invalid JSON in $plugin_name/plugin.json"
exit 1
fi
# Check required plugin fields
for field in name description version; do
if ! jq -e ".$field" "$plugin_json" >/dev/null; then
echo "ERROR: Missing '$field' in $plugin_name/plugin.json"
exit 1
fi
done
# Check recommended fields
if ! jq -e '.author.name' "$plugin_json" >/dev/null; then
echo "WARNING: Missing 'author.name' in $plugin_name/plugin.json"
fi
if ! jq -e '.homepage' "$plugin_json" >/dev/null; then
echo "WARNING: Missing 'homepage' in $plugin_name/plugin.json"
fi
if ! jq -e '.repository' "$plugin_json" >/dev/null; then
echo "WARNING: Missing 'repository' in $plugin_name/plugin.json"
fi
if ! jq -e '.license' "$plugin_json" >/dev/null; then
echo "WARNING: Missing 'license' in $plugin_name/plugin.json"
fi
if ! jq -e '.keywords | type == "array"' "$plugin_json" >/dev/null; then
echo "WARNING: Missing 'keywords' array in $plugin_name/plugin.json"
fi
# Check README exists
if [[ ! -f "$plugin_dir/README.md" ]]; then
echo "WARNING: Missing README.md in $plugin_name/"
fi
echo "$plugin_name valid"
done
echo ""
echo "=== All validations passed ==="