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:
119
plugins/projman/skills/repo-validation.md
Normal file
119
plugins/projman/skills/repo-validation.md
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
name: repo-validation
|
||||
description: Repository organization check and label taxonomy validation
|
||||
---
|
||||
|
||||
# Repository Validation
|
||||
|
||||
## Purpose
|
||||
|
||||
Validates that the repository belongs to an organization and has the required label taxonomy.
|
||||
|
||||
## When to Use
|
||||
|
||||
- **Planner agent**: At start of sprint planning
|
||||
- **Commands**: `/sprint-plan`, `/labels-sync`, `/project-init`
|
||||
|
||||
---
|
||||
|
||||
## Step 1: Detect Repository from Git Remote
|
||||
|
||||
```bash
|
||||
git remote get-url origin
|
||||
```
|
||||
|
||||
Parse output to extract `owner/repo`:
|
||||
- SSH: `git@host:owner/repo.git` → `owner/repo`
|
||||
- SSH with port: `ssh://git@host:port/owner/repo.git` → `owner/repo`
|
||||
- HTTPS: `https://host/owner/repo.git` → `owner/repo`
|
||||
|
||||
---
|
||||
|
||||
## Step 2: Validate Organization Ownership
|
||||
|
||||
```python
|
||||
validate_repo_org(repo="owner/repo")
|
||||
```
|
||||
|
||||
**If NOT an organization repository:**
|
||||
```
|
||||
REPOSITORY VALIDATION FAILED
|
||||
|
||||
This plugin requires the repository to belong to an organization, not a user.
|
||||
Current repository appears to be a personal repository.
|
||||
|
||||
Please:
|
||||
1. Create an organization in Gitea
|
||||
2. Transfer or create the repository under that organization
|
||||
3. Update your configuration
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 3: Validate Label Taxonomy
|
||||
|
||||
```python
|
||||
get_labels(repo="owner/repo")
|
||||
```
|
||||
|
||||
**Required label categories:**
|
||||
|
||||
| Category | Required Labels |
|
||||
|----------|-----------------|
|
||||
| Type/* | Bug, Feature, Refactor, Documentation, Test, Chore |
|
||||
| Priority/* | Low, Medium, High, Critical |
|
||||
| Complexity/* | Simple, Medium, Complex |
|
||||
| Efforts/* | XS, S, M, L, XL |
|
||||
|
||||
**If labels are missing:**
|
||||
- Use `create_label_smart()` to create them (auto-detects org vs repo level)
|
||||
- Report which labels were created
|
||||
|
||||
---
|
||||
|
||||
## Validation Report Format
|
||||
|
||||
```
|
||||
Repository Validation
|
||||
=====================
|
||||
|
||||
Git Remote: git@gitea.example.com:org/repo.git
|
||||
Detected: org/repo
|
||||
|
||||
Organization Check:
|
||||
✓ Repository belongs to organization "org"
|
||||
|
||||
Label Taxonomy:
|
||||
✓ Type/* labels: 6/6 present
|
||||
✓ Priority/* labels: 4/4 present
|
||||
✓ Complexity/* labels: 3/3 present
|
||||
✓ Efforts/* labels: 5/5 present
|
||||
|
||||
All validations passed. Ready for planning.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Repository Not Found (404)
|
||||
```
|
||||
Repository validation failed: Not found
|
||||
|
||||
The repository "owner/repo" does not exist or you don't have access.
|
||||
Please verify:
|
||||
1. Repository name is correct
|
||||
2. Your token has repository access
|
||||
3. Organization/owner name is correct
|
||||
```
|
||||
|
||||
### Authentication Error (401/403)
|
||||
```
|
||||
Repository validation failed: Authentication error
|
||||
|
||||
Your Gitea token may be invalid or lack permissions.
|
||||
Please verify:
|
||||
1. Token is valid and not expired
|
||||
2. Token has 'repo' scope
|
||||
3. You have access to this repository
|
||||
```
|
||||
Reference in New Issue
Block a user