refactor(projman): extract skills and consolidate commands

Major refactoring of projman plugin architecture:

Skills Extraction (17 new files):
- Extracted reusable knowledge from commands and agents into skills/
- branch-security, dependency-management, git-workflow, input-detection
- issue-conventions, lessons-learned, mcp-tools-reference, planning-workflow
- progress-tracking, repo-validation, review-checklist, runaway-detection
- setup-workflows, sprint-approval, task-sizing, test-standards, wiki-conventions

Command Consolidation (17 → 12 commands):
- /setup: consolidates initial-setup, project-init, project-sync (--full/--quick/--sync)
- /debug: consolidates debug-report, debug-review (report/review modes)
- /test: consolidates test-check, test-gen (run/gen modes)
- /sprint-status: absorbs sprint-diagram via --diagram flag

Architecture Cleanup:
- Remove plugin-level mcp-servers/ symlinks (6 plugins)
- Remove plugin README.md files (12 files, ~2000 lines)
- Update all documentation to reflect new command structure
- Fix documentation drift in CONFIGURATION.md, COMMANDS-CHEATSHEET.md

Commands are now thin dispatchers (~20-50 lines) that reference skills.
Agents reference skills for domain knowledge instead of inline content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 15:02:16 -05:00
parent 8fe685037e
commit 2e65b60725
70 changed files with 3450 additions and 8887 deletions

View File

@@ -1,83 +1,47 @@
---
name: review
description: Pre-sprint-close code quality review
agent: code-reviewer
---
# Code Review for Sprint Close
Review the recent code changes for quality issues before closing the sprint.
## Skills Required
## Review Checklist
- skills/review-checklist.md
Analyze the changes and report on:
## Purpose
### 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
Review recent code changes for quality issues before closing the sprint.
### 2. Code Quality
- [ ] Functions exceeding 50 lines (complexity smell)
- [ ] Deeply nested conditionals (>3 levels)
- [ ] Duplicate code patterns
- [ ] Missing docstrings/comments on public functions
## Invocation
### 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
Run `/review` before `/sprint-close` to catch issues.
### 4. Error Handling
- [ ] Bare except/catch blocks
- [ ] Swallowed exceptions (catch with pass/empty block)
- [ ] Missing null/undefined checks on external data
## Workflow
## Output Format
1. **Determine Scope** - Sprint files or recent commits (`git diff --name-only HEAD~5`)
2. **Read Files** - Use Read tool for each file in scope
3. **Scan for Patterns** - Check each category from review checklist
4. **Compile Findings** - Group by severity (Critical, Warning, Recommendation)
5. **Report Verdict** - READY / NEEDS ATTENTION / BLOCK
Provide a structured report:
## Review Categories
```
## Sprint Review Summary
See `skills/review-checklist.md` for complete patterns:
- Debug artifacts (TODO, console.log, commented code)
- Code quality (long functions, deep nesting, duplication)
- Security (hardcoded secrets, SQL injection, disabled SSL)
- Error handling (bare except, swallowed exceptions)
### Critical Issues (Block Sprint Close)
- [file:line] Description
## DO NOT
### 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
- Rewrite or refactor code automatically
- Make changes without explicit approval
- Review files outside sprint/change scope
- Spend excessive time on style issues
## Visual Output
When executing this command, display the plugin header:
```
╔══════════════════════════════════════════════════════════════════╗
║ 📋 PROJMAN ║
@@ -85,12 +49,3 @@ When executing this command, display the plugin header:
║ Code Review ║
╚══════════════════════════════════════════════════════════════════╝
```
Then proceed with the review workflow.
## 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)