Skip to content

Commit 0f64e8b

Browse files
ZenterFlowclaude
andcommitted
Repository reorganization v2.1.0 - docs/ and tests/ structure
Major reorganization preparing for two-repository migration: Structure Changes: - Moved all documentation to docs/ directory - Moved test suite to tests/ directory - Added persistence/ directory for project tracking - Clean root directory with only essential files Documentation Added: - MIGRATION_CHECKLIST.md - 34-step migration guide - READY_TO_MIGRATE.md - Migration overview and timeline - docs/DEV_REPO_SETUP.md - Development repository setup - docs/PRODUCTION_CLEANUP.md - Production cleanup procedures - docs/DEPLOYMENT_GUIDE.md - Deployment strategies - docs/PUBLIC_MARKETPLACE_STRATEGY.md - Public marketplace considerations - tests/TEST_README.md - Test suite documentation Test Suite: - tests/test-all.sh - Cross-platform test runner (Linux/macOS/Git Bash) - tests/test-all.bat - Windows wrapper - All tests passing (100% validation) Validation Fixes: - validate-json.sh: OS-independent Python detection - validate-frontmatter.sh: Fixed YAML extraction - All validation scripts now cross-platform Updated Documentation: - README.md: Added migration notice, updated version to 2.1.0 - docs/CLAUDE.md: Updated structure, added migration section - docs/CHANGELOG.md: Added v2.1.0 entry - All cross-references updated Migration Preparation: - Two-repository strategy documented - Production/development split planned - Auto-sync workflow designed - Low-risk, fully reversible process Version: 2.1.0 Status: Ready for migration (not yet executed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 789dc7d commit 0f64e8b

59 files changed

Lines changed: 10195 additions & 122 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "claude-priority",
33
"owner": {
4-
"name": "Jonathan"
4+
"name": "ZenterFlow"
55
},
66
"description": "Personal collection of priority Claude Code skills and plugins for development workflows, including plugin formatting and task prioritization tools.",
77
"version": "1.0.0",
@@ -12,7 +12,7 @@
1212
"description": "Formats plugin folders and files according to Claude Code plugin marketplace guidelines",
1313
"version": "1.0.0",
1414
"author": {
15-
"name": "Jonathan"
15+
"name": "ZenterFlow"
1616
},
1717
"keywords": ["formatting", "validation", "plugin-development", "tools"],
1818
"category": "tools"
@@ -23,7 +23,7 @@
2323
"description": "One-command project status, priority surfacing and persistent backlog grooming for development workflows",
2424
"version": "1.0.0",
2525
"author": {
26-
"name": "Jonathan"
26+
"name": "ZenterFlow"
2727
},
2828
"keywords": ["project-management", "backlog", "status", "github", "tools"],
2929
"category": "tools"

.githooks/README.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Git Hooks
2+
3+
This directory contains git hooks for the claude-priority marketplace.
4+
5+
## Available Hooks
6+
7+
### pre-commit
8+
Runs validation on all modified plugins before allowing commits.
9+
10+
**What it does:**
11+
- Detects which plugins were modified
12+
- Runs naming convention validation
13+
- Validates JSON syntax and schema
14+
- Checks frontmatter in skill.md files
15+
- Validates marketplace.json (if modified)
16+
- Blocks commit if errors are found
17+
18+
**Installation:**
19+
```bash
20+
# Option 1: Copy to .git/hooks
21+
cp .githooks/pre-commit .git/hooks/pre-commit
22+
chmod +x .git/hooks/pre-commit
23+
24+
# Option 2: Use git config (Git 2.9+)
25+
git config core.hooksPath .githooks
26+
```
27+
28+
**Usage:**
29+
Once installed, the hook runs automatically on `git commit`.
30+
31+
To bypass (not recommended):
32+
```bash
33+
git commit --no-verify
34+
```
35+
36+
## Hook Output Example
37+
38+
```
39+
🔍 Running pre-commit validation...
40+
41+
Modified plugins:
42+
• plugin-formatter
43+
• example-plugin
44+
45+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46+
Validating: plugin-formatter
47+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
48+
49+
1. Checking naming conventions...
50+
✅ Plugin directory name valid: plugin-formatter
51+
✅ Plugin.json name valid and matches directory
52+
✅ All naming conventions are valid!
53+
54+
2. Validating JSON files...
55+
✅ plugin.json has valid JSON syntax
56+
✅ All required fields present
57+
✅ All JSON files are valid!
58+
59+
3. Checking frontmatter...
60+
Checking skill: plugin-formatter
61+
✅ Frontmatter name matches directory
62+
✅ All frontmatter is valid!
63+
64+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65+
📊 VALIDATION SUMMARY
66+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67+
✅ All validations passed!
68+
69+
Proceeding with commit...
70+
```
71+
72+
## Testing Hooks
73+
74+
Test the pre-commit hook without committing:
75+
```bash
76+
# Make some changes
77+
echo "# Test" >> example-plugin/README.md
78+
79+
# Stage changes
80+
git add example-plugin/README.md
81+
82+
# Test hook manually
83+
.githooks/pre-commit
84+
85+
# If successful, commit
86+
git commit -m "Test commit"
87+
```
88+
89+
## Debugging
90+
91+
If the hook fails unexpectedly:
92+
93+
1. **Check script permissions:**
94+
```bash
95+
ls -la .git/hooks/pre-commit
96+
# Should show: -rwxr-xr-x (executable)
97+
```
98+
99+
2. **Test validation scripts directly:**
100+
```bash
101+
./plugin-formatter/skills/plugin-formatter/scripts/validate-naming.sh plugin-formatter
102+
```
103+
104+
3. **Check for syntax errors:**
105+
```bash
106+
bash -n .githooks/pre-commit
107+
```
108+
109+
4. **Run with debugging:**
110+
```bash
111+
bash -x .githooks/pre-commit
112+
```
113+
114+
## Customization
115+
116+
Edit `.githooks/pre-commit` to:
117+
- Add custom validation rules
118+
- Change error threshold
119+
- Modify output format
120+
- Add notifications (Slack, email, etc.)
121+
122+
## Best Practices
123+
124+
1. **Always install hooks** when cloning the repository
125+
2. **Don't bypass validation** unless absolutely necessary
126+
3. **Fix errors** rather than using `--no-verify`
127+
4. **Update hooks** when validation requirements change
128+
5. **Test hooks locally** before pushing
129+
130+
## CI/CD Integration
131+
132+
These hooks complement the GitHub Actions workflows in `.github/workflows/`:
133+
- Hooks: Fast, local validation before commit
134+
- Actions: Comprehensive validation on push/PR
135+
136+
Both use the same validation scripts for consistency.

.githooks/pre-commit

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#!/bin/bash
2+
# Git pre-commit hook for validating plugins before commit
3+
# Install: cp .githooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
4+
5+
set -e
6+
7+
echo "🔍 Running pre-commit validation..."
8+
echo ""
9+
10+
ERRORS=0
11+
SCRIPT_DIR="plugin-formatter/skills/plugin-formatter/scripts"
12+
13+
# Check if validation scripts exist
14+
if [ ! -d "$SCRIPT_DIR" ]; then
15+
echo "⚠️ Validation scripts not found. Skipping validation."
16+
exit 0
17+
fi
18+
19+
# Get list of modified plugin directories
20+
MODIFIED_PLUGINS=$(git diff --cached --name-only | grep -oP '^(plugin-formatter|claude-prioritise|example-plugin)' | sort -u || true)
21+
22+
if [ -z "$MODIFIED_PLUGINS" ]; then
23+
echo "ℹ️ No plugin files modified. Skipping validation."
24+
exit 0
25+
fi
26+
27+
echo "Modified plugins:"
28+
echo "$MODIFIED_PLUGINS" | sed 's/^/ • /'
29+
echo ""
30+
31+
# Validate each modified plugin
32+
for plugin in $MODIFIED_PLUGINS; do
33+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
34+
echo "Validating: $plugin"
35+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
36+
37+
# Run naming validation
38+
echo "1. Checking naming conventions..."
39+
if ! "$SCRIPT_DIR/validate-naming.sh" "$plugin" 2>&1; then
40+
((ERRORS++))
41+
fi
42+
echo ""
43+
44+
# Run JSON validation
45+
echo "2. Validating JSON files..."
46+
if ! "$SCRIPT_DIR/validate-json.sh" "$plugin" 2>&1; then
47+
((ERRORS++))
48+
fi
49+
echo ""
50+
51+
# Run frontmatter validation
52+
echo "3. Checking frontmatter..."
53+
if ! "$SCRIPT_DIR/validate-frontmatter.sh" "$plugin" 2>&1; then
54+
((ERRORS++))
55+
fi
56+
echo ""
57+
done
58+
59+
# Check marketplace.json if it was modified
60+
if git diff --cached --name-only | grep -q "\.claude-plugin/marketplace.json"; then
61+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
62+
echo "Validating: marketplace.json"
63+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
64+
65+
if ! python3 -m json.tool .claude-plugin/marketplace.json > /dev/null 2>&1; then
66+
echo "❌ marketplace.json has invalid JSON syntax"
67+
((ERRORS++))
68+
else
69+
echo "✅ marketplace.json is valid JSON"
70+
fi
71+
echo ""
72+
fi
73+
74+
# Summary
75+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
76+
echo "📊 VALIDATION SUMMARY"
77+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
78+
79+
if [ $ERRORS -eq 0 ]; then
80+
echo "✅ All validations passed!"
81+
echo ""
82+
echo "Proceeding with commit..."
83+
exit 0
84+
else
85+
echo "❌ Found $ERRORS validation error(s)"
86+
echo ""
87+
echo "Please fix the errors above before committing."
88+
echo ""
89+
echo "To bypass this check (not recommended):"
90+
echo " git commit --no-verify"
91+
echo ""
92+
exit 1
93+
fi
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Test Plugin Installation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch: # Allow manual triggering
9+
10+
jobs:
11+
test-marketplace:
12+
name: Test Marketplace Installation
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Verify marketplace structure
23+
run: |
24+
echo "🔍 Checking marketplace structure..."
25+
26+
# Check marketplace.json exists
27+
if [ ! -f ".claude-plugin/marketplace.json" ]; then
28+
echo "❌ marketplace.json not found"
29+
exit 1
30+
fi
31+
echo "✅ marketplace.json found"
32+
33+
# Check each plugin directory exists
34+
for plugin in plugin-formatter claude-prioritise example-plugin; do
35+
if [ ! -d "$plugin" ]; then
36+
echo "❌ Plugin directory not found: $plugin"
37+
exit 1
38+
fi
39+
echo "✅ Plugin directory found: $plugin"
40+
done
41+
shell: bash
42+
43+
- name: Verify plugin.json files
44+
run: |
45+
echo "🔍 Checking plugin.json files..."
46+
47+
for plugin in plugin-formatter claude-prioritise example-plugin; do
48+
if [ ! -f "$plugin/.claude-plugin/plugin.json" ]; then
49+
echo "❌ plugin.json not found in: $plugin"
50+
exit 1
51+
fi
52+
echo "✅ plugin.json found in: $plugin"
53+
done
54+
shell: bash
55+
56+
- name: Check for required skills
57+
run: |
58+
echo "🔍 Checking skills directories..."
59+
60+
# plugin-formatter should have plugin-formatter skill
61+
if [ ! -d "plugin-formatter/skills/plugin-formatter" ]; then
62+
echo "❌ plugin-formatter skill not found"
63+
exit 1
64+
fi
65+
echo "✅ plugin-formatter skill found"
66+
67+
# claude-prioritise should have project-status skill
68+
if [ ! -d "claude-prioritise/skills/project-status" ]; then
69+
echo "❌ project-status skill not found"
70+
exit 1
71+
fi
72+
echo "✅ project-status skill found"
73+
74+
# example-plugin should have hello-world and status-checker skills
75+
if [ ! -d "example-plugin/skills/hello-world" ]; then
76+
echo "❌ hello-world skill not found"
77+
exit 1
78+
fi
79+
echo "✅ hello-world skill found"
80+
81+
if [ ! -d "example-plugin/skills/status-checker" ]; then
82+
echo "❌ status-checker skill not found"
83+
exit 1
84+
fi
85+
echo "✅ status-checker skill found"
86+
shell: bash
87+
88+
- name: Installation test summary
89+
if: success()
90+
run: |
91+
echo ""
92+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
93+
echo "✅ Marketplace structure validated on ${{ matrix.os }}"
94+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
95+
echo ""
96+
echo "Ready for installation:"
97+
echo " /plugin marketplace add $(pwd)"
98+
echo " /plugin install plugin-formatter@claude-priority"
99+
echo " /plugin install claude-prioritise@claude-priority"
100+
echo " /plugin install example-plugin@claude-priority"
101+
shell: bash

0 commit comments

Comments
 (0)