ai-development-framework 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/_template/AGENT.md +36 -0
- package/.claude/agents/architect-agent/AGENT.md +60 -0
- package/.claude/agents/architect-agent/decisions/log.md +18 -0
- package/.claude/agents/architect-agent/frontend/.gitkeep +0 -0
- package/.claude/agents/architect-agent/index.md +32 -0
- package/.claude/agents/architect-agent/modules/.gitkeep +0 -0
- package/.claude/agents/architect-agent/shared/patterns.md +19 -0
- package/.claude/agents/mobile-tester-agent/AGENT.md +46 -0
- package/.claude/agents/mobile-tester-agent/screen-patterns.md +42 -0
- package/.claude/agents/tester-agent/AGENT.md +44 -0
- package/.claude/agents/tester-agent/auth-state.md +22 -0
- package/.claude/agents/tester-agent/test-patterns.md +36 -0
- package/.claude/agents/ui-ux-analyzer/AGENT.md +75 -0
- package/.claude/commands/create-prd.md +55 -0
- package/.claude/commands/evolve.md +84 -0
- package/.claude/commands/execute.md +76 -0
- package/.claude/commands/plan-feature.md +100 -0
- package/.claude/commands/plan-project.md +110 -0
- package/.claude/commands/prime.md +71 -0
- package/.claude/commands/setup.md +81 -0
- package/.claude/commands/ship.md +73 -0
- package/.claude/commands/start.md +63 -0
- package/.claude/commands/validate.md +72 -0
- package/.claude/hooks/architect-sync.sh +18 -0
- package/.claude/hooks/branch-guard.sh +15 -0
- package/.claude/hooks/evolve-reminder.sh +13 -0
- package/.claude/hooks/plan-required.sh +20 -0
- package/.claude/hooks/session-primer.sh +38 -0
- package/.claude/references/claude-md-template.md +90 -0
- package/.claude/references/code-patterns.md +37 -0
- package/.claude/references/issue-template.md +56 -0
- package/.claude/references/plan-template.md +92 -0
- package/.claude/references/prd-template.md +119 -0
- package/.claude/rules/_global.md +22 -0
- package/.claude/rules/_template.md +23 -0
- package/.claude/rules/backend.md +29 -0
- package/.claude/rules/database.md +28 -0
- package/.claude/rules/frontend.md +34 -0
- package/.claude/rules/mobile.md +33 -0
- package/.claude/rules/testing.md +37 -0
- package/.claude/settings.local.json +27 -0
- package/.claude/skills/e2e-test/SKILL.md +87 -0
- package/.claude/skills/playwright-cli/SKILL.md +97 -0
- package/CLAUDE.md +65 -0
- package/README.md +83 -0
- package/cli/index.js +35 -0
- package/cli/init.js +219 -0
- package/cli/update.js +120 -0
- package/docs/command-reference.md +41 -0
- package/docs/customization.md +33 -0
- package/docs/getting-started.md +68 -0
- package/docs/methodology.md +78 -0
- package/docs/plans/2026-03-30-ai-development-framework-design.md +483 -0
- package/docs/plugin-install-guide.md +66 -0
- package/docs/superpowers/plans/2026-03-30-framework-implementation.md +3462 -0
- package/package.json +28 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# /plan-feature — Feature Implementation Planner
|
|
2
|
+
|
|
3
|
+
Creates a detailed implementation plan for a feature. The plan must pass the "no prior knowledge" test — an engineer unfamiliar with the codebase can implement using only the plan.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
- `$ARGUMENTS` — feature description OR GitHub issue number (e.g., `#42`)
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
### Phase 1: Feature Understanding
|
|
12
|
+
|
|
13
|
+
1. If an issue number is provided, read it: `gh issue view <number>`
|
|
14
|
+
2. If a description is provided, clarify:
|
|
15
|
+
- What user-facing behavior should change?
|
|
16
|
+
- What are the acceptance criteria?
|
|
17
|
+
- Is this S/M/L/XL scope?
|
|
18
|
+
3. For L/XL features, invoke brainstorming skill first
|
|
19
|
+
4. Write user stories in "As a [user], I want [action] so that [benefit]" format
|
|
20
|
+
|
|
21
|
+
### Phase 2: Codebase Intelligence (Parallel Sub-Agents)
|
|
22
|
+
|
|
23
|
+
Launch 2-3 parallel sub-agents for speed:
|
|
24
|
+
|
|
25
|
+
**Agent 1 — Structure and Patterns:**
|
|
26
|
+
- Run `/prime` if not already primed
|
|
27
|
+
- Glob for files related to the feature
|
|
28
|
+
- Identify existing patterns (how similar features are built)
|
|
29
|
+
- Map the directory structure for relevant areas
|
|
30
|
+
|
|
31
|
+
**Agent 2 — Dependencies and Integration:**
|
|
32
|
+
- architect-agent RETRIEVE for relevant domains
|
|
33
|
+
- architect-agent IMPACT to understand what this change affects
|
|
34
|
+
- Identify integration points with other modules
|
|
35
|
+
- Check for shared utilities, types, or components to reuse
|
|
36
|
+
|
|
37
|
+
**Agent 3 — Testing and Validation:**
|
|
38
|
+
- Find existing test patterns for similar features
|
|
39
|
+
- Identify what test infrastructure exists
|
|
40
|
+
- Note validation commands (lint, type-check, test runners)
|
|
41
|
+
|
|
42
|
+
### Phase 3: External Research
|
|
43
|
+
|
|
44
|
+
- Use context7 MCP to verify framework APIs you plan to use
|
|
45
|
+
- Check library documentation for any unfamiliar APIs
|
|
46
|
+
- Note any dependencies that need to be installed
|
|
47
|
+
|
|
48
|
+
### Phase 4: Strategic Thinking
|
|
49
|
+
|
|
50
|
+
Before writing the plan, think through:
|
|
51
|
+
- Does this fit the existing architecture? If not, is refactoring needed first?
|
|
52
|
+
- What are the edge cases? (empty states, error states, concurrent access)
|
|
53
|
+
- Security implications? (input validation, auth checks, data exposure)
|
|
54
|
+
- Performance concerns? (N+1 queries, large payloads, unnecessary re-renders)
|
|
55
|
+
- What could go wrong during implementation?
|
|
56
|
+
|
|
57
|
+
### Phase 5: Plan Generation
|
|
58
|
+
|
|
59
|
+
Read `.claude/references/plan-template.md` and generate a complete plan.
|
|
60
|
+
|
|
61
|
+
Requirements for every plan:
|
|
62
|
+
- Exact file paths for every file to create or modify
|
|
63
|
+
- Complete code in every step (no placeholders)
|
|
64
|
+
- Exact terminal commands with expected output for every verification step
|
|
65
|
+
- TDD: tests before implementation in every task
|
|
66
|
+
- Conventional commit after every task
|
|
67
|
+
- GOTCHA warnings for known pitfalls
|
|
68
|
+
- Confidence score (1-10) for one-pass success
|
|
69
|
+
|
|
70
|
+
### Phase 6: GitHub Issue
|
|
71
|
+
|
|
72
|
+
If no issue exists for this feature:
|
|
73
|
+
```bash
|
|
74
|
+
gh issue create --title "[type]: description" --body "..." --label "feat,size:M"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If issue exists, add a comment linking to the plan:
|
|
78
|
+
```bash
|
|
79
|
+
gh issue comment <number> --body "Implementation plan: docs/plans/<plan-file>.md"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Phase 7: Save and Offer Execution
|
|
83
|
+
|
|
84
|
+
Save to `docs/plans/<kebab-case-feature-name>.md`
|
|
85
|
+
|
|
86
|
+
Commit:
|
|
87
|
+
```bash
|
|
88
|
+
git add docs/plans/<plan-file>.md
|
|
89
|
+
git commit -m "docs: add implementation plan for <feature>"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then offer:
|
|
93
|
+
|
|
94
|
+
> **Plan saved. Ready to implement?**
|
|
95
|
+
>
|
|
96
|
+
> For complex features (context reset recommended):
|
|
97
|
+
> Start a new session, run `/prime`, then `/execute docs/plans/<plan-file>.md`
|
|
98
|
+
>
|
|
99
|
+
> For simpler features (stay in session):
|
|
100
|
+
> Run `/execute docs/plans/<plan-file>.md`
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# /plan-project — PRD to GitHub Issues Decomposer
|
|
2
|
+
|
|
3
|
+
Decomposes a PRD into GitHub milestones and issues. This bridges the gap between project vision and actionable work items.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
- `$ARGUMENTS` — optional: path to PRD file (default: `docs/plans/PRD.md`)
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- A PRD must exist (run `/create-prd` first if it doesn't)
|
|
12
|
+
- GitHub CLI (`gh`) must be authenticated
|
|
13
|
+
- Repository must have a GitHub remote
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
### Phase 1: Parse PRD
|
|
18
|
+
|
|
19
|
+
1. Read the PRD file
|
|
20
|
+
2. Identify the implementation phases — each becomes a **GitHub milestone**
|
|
21
|
+
3. Within each phase, identify discrete features — each becomes a **GitHub issue**
|
|
22
|
+
|
|
23
|
+
### Phase 2: Decompose into Issues
|
|
24
|
+
|
|
25
|
+
For each feature/task identified:
|
|
26
|
+
|
|
27
|
+
1. Write issue title: `[type]: brief description`
|
|
28
|
+
2. Write issue body using `.claude/references/issue-template.md` format:
|
|
29
|
+
- Description (what and why)
|
|
30
|
+
- Acceptance criteria (testable checkboxes)
|
|
31
|
+
- Technical notes (files to modify, patterns to follow)
|
|
32
|
+
- Size estimate (S/M/L/XL)
|
|
33
|
+
3. Assign labels: type (`feat`/`fix`/`chore`), priority, size
|
|
34
|
+
4. Map dependencies: which issues block which
|
|
35
|
+
|
|
36
|
+
### Phase 3: Determine Order
|
|
37
|
+
|
|
38
|
+
1. Build dependency graph
|
|
39
|
+
2. Identify critical path (longest chain of blocking dependencies)
|
|
40
|
+
3. Identify parallelizable work (independent issues that can be worked simultaneously)
|
|
41
|
+
4. Order issues by: dependencies first, then critical path, then highest value, then smallest size
|
|
42
|
+
|
|
43
|
+
### Phase 4: Present for Review
|
|
44
|
+
|
|
45
|
+
Present the full breakdown to the user:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
## Milestone 1: [Phase Name]
|
|
49
|
+
|
|
50
|
+
### Issue 1: [feat: description] (Size: M, Priority: High)
|
|
51
|
+
- Acceptance criteria: ...
|
|
52
|
+
- Depends on: nothing
|
|
53
|
+
- Blocks: Issue 2, Issue 3
|
|
54
|
+
|
|
55
|
+
### Issue 2: [feat: description] (Size: L, Priority: High)
|
|
56
|
+
- Acceptance criteria: ...
|
|
57
|
+
- Depends on: Issue 1
|
|
58
|
+
- Blocks: Issue 5
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Ask: "Does this breakdown look right? Any issues to add, remove, or resize?"
|
|
62
|
+
|
|
63
|
+
### Phase 5: Create in GitHub
|
|
64
|
+
|
|
65
|
+
After user approval, create milestones and issues using `gh` CLI:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Create milestones
|
|
69
|
+
gh api repos/{owner}/{repo}/milestones -f title="Phase 1: [Name]" -f description="[Description]"
|
|
70
|
+
|
|
71
|
+
# Create issues with labels and milestone
|
|
72
|
+
gh issue create --title "[type]: description" --body "..." --label "feat,priority:high,size:M" --milestone "Phase 1: [Name]"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For issues with dependencies, add a "Blocked by #N" line in the issue body.
|
|
76
|
+
|
|
77
|
+
### Phase 6: Generate Roadmap
|
|
78
|
+
|
|
79
|
+
Save a roadmap file to `docs/plans/roadmap.md`:
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
# Project Roadmap
|
|
83
|
+
|
|
84
|
+
Generated from PRD on YYYY-MM-DD
|
|
85
|
+
|
|
86
|
+
## Milestone 1: [Phase Name]
|
|
87
|
+
- [ ] #1 — [title] (Size: M)
|
|
88
|
+
- [ ] #2 — [title] (Size: L) — blocked by #1
|
|
89
|
+
|
|
90
|
+
## Critical Path
|
|
91
|
+
#1 → #2 → #4 → #7 → #9
|
|
92
|
+
|
|
93
|
+
## Parallel Tracks
|
|
94
|
+
Track A: #1 → #2 → #4
|
|
95
|
+
Track B: #1 → #3 → #5
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Commit:
|
|
99
|
+
```bash
|
|
100
|
+
git add docs/plans/roadmap.md
|
|
101
|
+
git commit -m "docs: add project roadmap with GitHub issues"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Re-running
|
|
105
|
+
|
|
106
|
+
When the PRD is updated, run `/plan-project` again. It will:
|
|
107
|
+
1. Read existing GitHub issues
|
|
108
|
+
2. Diff against updated PRD
|
|
109
|
+
3. Suggest: new issues to create, existing issues to update, obsolete issues to close
|
|
110
|
+
4. Present changes for approval before executing
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# /prime — Context Loader
|
|
2
|
+
|
|
3
|
+
Load the full codebase context into the current session. Run at the start of any session, after a context reset, or when switching tasks.
|
|
4
|
+
|
|
5
|
+
## Process
|
|
6
|
+
|
|
7
|
+
Run these in parallel for speed:
|
|
8
|
+
|
|
9
|
+
### 1. Project Structure
|
|
10
|
+
```bash
|
|
11
|
+
git ls-files | head -200
|
|
12
|
+
```
|
|
13
|
+
```bash
|
|
14
|
+
tree -L 3 -I 'node_modules|.next|dist|build|.git|__pycache__|.expo' --dirsfirst
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 2. Project Documentation
|
|
18
|
+
Read these files if they exist:
|
|
19
|
+
- `CLAUDE.md` (project root)
|
|
20
|
+
- `README.md`
|
|
21
|
+
- `docs/plans/PRD.md` (or latest PRD)
|
|
22
|
+
- Any plan file matching the current branch name
|
|
23
|
+
|
|
24
|
+
### 3. Recent History
|
|
25
|
+
```bash
|
|
26
|
+
git log --oneline -10
|
|
27
|
+
```
|
|
28
|
+
```bash
|
|
29
|
+
git status --short
|
|
30
|
+
```
|
|
31
|
+
```bash
|
|
32
|
+
git branch --show-current
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 4. Active Context
|
|
36
|
+
- If on a feature branch, extract the issue number from the branch name
|
|
37
|
+
- If issue number found: `gh issue view <number>`
|
|
38
|
+
- Check for existing plan: look for files in `docs/plans/` or `docs/superpowers/plans/` matching branch name
|
|
39
|
+
|
|
40
|
+
### 5. Configuration
|
|
41
|
+
- Read `.claude/agents/architect-agent/index.md` (knowledge base TOC)
|
|
42
|
+
- Read `.claude/agents/tester-agent/test-patterns.md` (page inventory)
|
|
43
|
+
- Check `package.json` or equivalent for available scripts/commands
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
Present a structured summary:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
=== Project Context ===
|
|
51
|
+
|
|
52
|
+
Project: [name from package.json/CLAUDE.md]
|
|
53
|
+
Branch: [current branch]
|
|
54
|
+
Issue: [linked issue if found, or "none"]
|
|
55
|
+
Plan: [active plan file if found, or "none"]
|
|
56
|
+
|
|
57
|
+
Structure: [key directories and their purposes]
|
|
58
|
+
|
|
59
|
+
Recent Activity:
|
|
60
|
+
[last 5 commits, one line each]
|
|
61
|
+
|
|
62
|
+
Uncommitted Changes:
|
|
63
|
+
[summary of staged/unstaged changes]
|
|
64
|
+
|
|
65
|
+
Available Commands:
|
|
66
|
+
[dev, test, build commands from package.json]
|
|
67
|
+
|
|
68
|
+
Knowledge Base: [N domains documented in architect-agent]
|
|
69
|
+
|
|
70
|
+
=== Ready. Run /start to begin or specify a command. ===
|
|
71
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# /setup — Framework Health Check
|
|
2
|
+
|
|
3
|
+
Checks what external plugins, skills, and MCP servers are installed and reports any gaps.
|
|
4
|
+
|
|
5
|
+
## Process
|
|
6
|
+
|
|
7
|
+
### Step 1: Check Plugins
|
|
8
|
+
|
|
9
|
+
Verify each required plugin is installed. Present results as a checklist.
|
|
10
|
+
|
|
11
|
+
**Core Workflow (required):**
|
|
12
|
+
|
|
13
|
+
| Plugin | Install Command |
|
|
14
|
+
|--------|----------------|
|
|
15
|
+
| superpowers | `claude plugin install superpowers` |
|
|
16
|
+
| feature-dev | `claude plugin install feature-dev` |
|
|
17
|
+
| code-review | `claude plugin install code-review` |
|
|
18
|
+
| commit-commands | `claude plugin install commit-commands` |
|
|
19
|
+
| claude-md-management | `claude plugin install claude-md-management` |
|
|
20
|
+
| security-guidance | `claude plugin install security-guidance` |
|
|
21
|
+
| skill-creator | `claude plugin install skill-creator` |
|
|
22
|
+
|
|
23
|
+
**Framework Support (recommended):**
|
|
24
|
+
|
|
25
|
+
| Plugin | Install Command |
|
|
26
|
+
|--------|----------------|
|
|
27
|
+
| firecrawl | `claude plugin install firecrawl` |
|
|
28
|
+
| frontend-design | `claude plugin install frontend-design` |
|
|
29
|
+
| claude-code-setup | `claude plugin install claude-code-setup` |
|
|
30
|
+
| agent-sdk-dev | `claude plugin install agent-sdk-dev` |
|
|
31
|
+
|
|
32
|
+
**Stack-Specific (install what applies):**
|
|
33
|
+
|
|
34
|
+
| Plugin | When Needed | Install Command |
|
|
35
|
+
|--------|------------|----------------|
|
|
36
|
+
| context7 | Any framework/library project | `claude plugin install context7` |
|
|
37
|
+
| supabase | Supabase projects | `claude plugin install supabase` |
|
|
38
|
+
| typescript-lsp | TypeScript projects | `claude plugin install typescript-lsp` |
|
|
39
|
+
| expo-app-design | Expo/React Native projects | `claude plugin install expo-app-design --marketplace expo-plugins` |
|
|
40
|
+
|
|
41
|
+
### Step 2: Check MCP Servers
|
|
42
|
+
|
|
43
|
+
Verify project-level MCP server configuration if applicable:
|
|
44
|
+
- shadcn — for shadcn/ui component projects
|
|
45
|
+
- context7 — for documentation lookup
|
|
46
|
+
- supabase — for database operations
|
|
47
|
+
- mobile-mcp — for mobile testing
|
|
48
|
+
|
|
49
|
+
### Step 3: Check Framework Files
|
|
50
|
+
|
|
51
|
+
Verify .claude/ structure is complete:
|
|
52
|
+
- commands/ (10 files)
|
|
53
|
+
- agents/ (4 agents + template)
|
|
54
|
+
- rules/ (6 rules + template)
|
|
55
|
+
- references/ (5 templates)
|
|
56
|
+
- hooks/ (5 scripts)
|
|
57
|
+
- settings.local.json
|
|
58
|
+
|
|
59
|
+
### Step 4: Report
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
=== Framework Health Check ===
|
|
63
|
+
|
|
64
|
+
Plugins:
|
|
65
|
+
[check] superpowers
|
|
66
|
+
[check] feature-dev
|
|
67
|
+
[missing] firecrawl — run: claude plugin install firecrawl
|
|
68
|
+
|
|
69
|
+
MCP Servers:
|
|
70
|
+
[check] context7
|
|
71
|
+
[missing] shadcn — add to .mcp.json if using shadcn/ui
|
|
72
|
+
|
|
73
|
+
Framework Files:
|
|
74
|
+
[check] .claude/commands/ (10 commands)
|
|
75
|
+
[check] .claude/agents/ (4 agents)
|
|
76
|
+
[check] .claude/rules/ (6 rules)
|
|
77
|
+
[check] .claude/references/ (5 templates)
|
|
78
|
+
[check] .claude/hooks/ (5 hooks)
|
|
79
|
+
|
|
80
|
+
Status: Ready (install missing items above for full functionality)
|
|
81
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# /ship — Commit, Push, and Create PR
|
|
2
|
+
|
|
3
|
+
Handles the full shipping workflow: staging, committing, pushing, and creating a pull request.
|
|
4
|
+
|
|
5
|
+
## Process
|
|
6
|
+
|
|
7
|
+
### Step 1: Pre-flight Check
|
|
8
|
+
|
|
9
|
+
1. Verify all tests pass: `npm test` (or detected test command)
|
|
10
|
+
2. Verify no uncommitted changes that shouldn't be included
|
|
11
|
+
3. Check current branch is not main/master
|
|
12
|
+
|
|
13
|
+
### Step 2: Stage and Commit
|
|
14
|
+
|
|
15
|
+
Use the `/commit` skill (from commit-commands plugin) for proper conventional commit formatting.
|
|
16
|
+
|
|
17
|
+
If the commit-commands plugin is not available, fall back to:
|
|
18
|
+
|
|
19
|
+
1. Show `git status` and `git diff --stat`
|
|
20
|
+
2. Ask which files to stage (or confirm staging all)
|
|
21
|
+
3. Generate conventional commit message from changes:
|
|
22
|
+
- `feat:` for new features
|
|
23
|
+
- `fix:` for bug fixes
|
|
24
|
+
- `refactor:` for code improvements
|
|
25
|
+
- `docs:` for documentation
|
|
26
|
+
- `test:` for test additions/changes
|
|
27
|
+
- `chore:` for maintenance
|
|
28
|
+
4. Commit with the generated message
|
|
29
|
+
|
|
30
|
+
### Step 3: Push
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git push -u origin $(git branch --show-current)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 4: Create Pull Request
|
|
37
|
+
|
|
38
|
+
Detect the linked GitHub issue from:
|
|
39
|
+
- Branch name (e.g., `feat/user-auth-42` implies issue #42)
|
|
40
|
+
- Recent commit messages
|
|
41
|
+
- Active plan file
|
|
42
|
+
|
|
43
|
+
Create PR:
|
|
44
|
+
```bash
|
|
45
|
+
gh pr create \
|
|
46
|
+
--title "[type]: brief description" \
|
|
47
|
+
--body "## Summary
|
|
48
|
+
- [what changed and why]
|
|
49
|
+
|
|
50
|
+
## Linked Issue
|
|
51
|
+
Closes #[number]
|
|
52
|
+
|
|
53
|
+
## Test Plan
|
|
54
|
+
- [ ] Automated tests pass
|
|
55
|
+
- [ ] Manual verification of [key behavior]
|
|
56
|
+
- [ ] Tested on [viewports/devices if applicable]
|
|
57
|
+
"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 5: Report
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
=== Shipped ===
|
|
64
|
+
|
|
65
|
+
Branch: [branch name]
|
|
66
|
+
Commit: [hash] — [message]
|
|
67
|
+
PR: [PR URL]
|
|
68
|
+
Closes: #[issue number]
|
|
69
|
+
|
|
70
|
+
Next steps:
|
|
71
|
+
- Wait for review
|
|
72
|
+
- After merge: run /evolve to update the system
|
|
73
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# /start — Smart Pipeline Router
|
|
2
|
+
|
|
3
|
+
You are the entry point to the AIDevelopmentFramework PIV+E pipeline. Your job is to detect where the user is in their workflow and route them to the right commands.
|
|
4
|
+
|
|
5
|
+
## Step 1: Gather Context
|
|
6
|
+
|
|
7
|
+
Run these in parallel:
|
|
8
|
+
1. Check if `CLAUDE.md` exists in the project root (not the framework's own CLAUDE.md)
|
|
9
|
+
2. Check if any PRD exists: `find docs/plans -name "PRD*" -o -name "prd*" 2>/dev/null`
|
|
10
|
+
3. Check current git branch and status
|
|
11
|
+
4. Check for existing GitHub issues: `gh issue list --limit 5 2>/dev/null`
|
|
12
|
+
5. Check for existing plan files: `find docs/plans docs/superpowers/plans -name "*.md" 2>/dev/null`
|
|
13
|
+
|
|
14
|
+
## Step 2: Detect Scope Level
|
|
15
|
+
|
|
16
|
+
Based on context, determine the entry point:
|
|
17
|
+
|
|
18
|
+
**L-1 (Onboard)** — No CLAUDE.md found for the project
|
|
19
|
+
→ "This project hasn't been set up with the framework yet."
|
|
20
|
+
→ Suggest: `/prime` then `/create-rules` then come back to `/start`
|
|
21
|
+
|
|
22
|
+
**L0 (New Project)** — No PRD, no issues, minimal/no code
|
|
23
|
+
→ "Looks like a fresh project. Let's plan it from scratch."
|
|
24
|
+
→ Route to: `/create-prd` then `/plan-project`
|
|
25
|
+
|
|
26
|
+
**L1 (New Feature)** — Project exists, user has a feature idea (no specific issue)
|
|
27
|
+
→ "Let's plan this feature."
|
|
28
|
+
→ Route to: `/plan-feature`
|
|
29
|
+
|
|
30
|
+
**L2 (Issue Work)** — User has or references a specific issue number
|
|
31
|
+
→ "Let's work on this issue."
|
|
32
|
+
→ Route to: `/prime` then `/plan-feature #<issue>` or direct `/execute` if plan exists
|
|
33
|
+
|
|
34
|
+
**L3 (Bug Fix)** — User describes a bug or references a bug issue
|
|
35
|
+
→ "Let's debug this."
|
|
36
|
+
→ Route to: `/prime` then use superpowers:systematic-debugging
|
|
37
|
+
|
|
38
|
+
## Step 3: Ask if Uncertain
|
|
39
|
+
|
|
40
|
+
If the scope level isn't clear from context, ask:
|
|
41
|
+
|
|
42
|
+
> **What are you working on today?**
|
|
43
|
+
>
|
|
44
|
+
> 1. **Starting a new project from an idea** (L0 — full planning pipeline)
|
|
45
|
+
> 2. **Building a new feature** (L1 — brainstorm + plan + implement)
|
|
46
|
+
> 3. **Working on a specific GitHub issue** (L2 — plan + implement)
|
|
47
|
+
> 4. **Fixing a bug** (L3 — debug + fix)
|
|
48
|
+
> 5. **Joining this project for the first time** (L-1 — onboard)
|
|
49
|
+
|
|
50
|
+
## Step 4: Mode Selection
|
|
51
|
+
|
|
52
|
+
For L0, L1, and complex L2 tasks, ask:
|
|
53
|
+
|
|
54
|
+
> **Which mode?**
|
|
55
|
+
>
|
|
56
|
+
> - **Superpowers Mode** — Full discipline: brainstorm, plan, TDD, execute, verify, review, ship, evolve
|
|
57
|
+
> - **Standard Mode** — Lighter: plan, implement, validate, ship
|
|
58
|
+
|
|
59
|
+
For L3 (bugs) and simple L2 (size S/M), default to Standard Mode without asking.
|
|
60
|
+
|
|
61
|
+
## Step 5: Route
|
|
62
|
+
|
|
63
|
+
Execute the appropriate command chain based on the detected level and chosen mode. Provide the user with a brief summary of what will happen next.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# /validate — Verification Orchestrator
|
|
2
|
+
|
|
3
|
+
Runs comprehensive verification: automated checks, visual testing, and code review.
|
|
4
|
+
|
|
5
|
+
## Process
|
|
6
|
+
|
|
7
|
+
### Phase 1: Automated Checks
|
|
8
|
+
|
|
9
|
+
Run in parallel:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Lint (detect from project)
|
|
13
|
+
npm run lint 2>/dev/null || npx eslint . 2>/dev/null || echo "No linter configured"
|
|
14
|
+
|
|
15
|
+
# Type check (detect from project)
|
|
16
|
+
npx tsc --noEmit 2>/dev/null || echo "No TypeScript configured"
|
|
17
|
+
|
|
18
|
+
# Tests (detect from project)
|
|
19
|
+
npm test 2>/dev/null || npx jest 2>/dev/null || npx vitest run 2>/dev/null || echo "No test runner configured"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If any check fails, report the failure and offer to fix it before continuing.
|
|
23
|
+
|
|
24
|
+
### Phase 2: Visual Verification (if applicable)
|
|
25
|
+
|
|
26
|
+
Detect what was changed:
|
|
27
|
+
```bash
|
|
28
|
+
git diff --name-only main...HEAD
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**If frontend files changed:**
|
|
32
|
+
- Dispatch tester-agent with VERIFY queries for affected pages
|
|
33
|
+
- Test at minimum: desktop and mobile viewports
|
|
34
|
+
- Check: elements render, navigation works, forms submit
|
|
35
|
+
|
|
36
|
+
**If mobile files changed:**
|
|
37
|
+
- Dispatch mobile-tester-agent with VERIFY queries for affected screens
|
|
38
|
+
- Check: elements visible, navigation works, interactions respond
|
|
39
|
+
|
|
40
|
+
**If API/backend files changed:**
|
|
41
|
+
- Run API tests if they exist
|
|
42
|
+
- Check: endpoints respond with correct status codes
|
|
43
|
+
- If Supabase: run `get_advisors` for schema safety
|
|
44
|
+
|
|
45
|
+
### Phase 3: Code Review
|
|
46
|
+
|
|
47
|
+
Invoke the code review skill:
|
|
48
|
+
- Review against the implementation plan (does the code match the plan?)
|
|
49
|
+
- Check for common issues: error handling, edge cases, security
|
|
50
|
+
- Verify no debug code left (console.log, TODO comments, commented-out code)
|
|
51
|
+
|
|
52
|
+
### Phase 4: Report
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
=== Validation Report ===
|
|
56
|
+
|
|
57
|
+
Automated Checks:
|
|
58
|
+
- Lint: PASS / N issues
|
|
59
|
+
- Types: PASS / N errors
|
|
60
|
+
- Tests: PASS (N/N) / N failures
|
|
61
|
+
|
|
62
|
+
Visual Verification:
|
|
63
|
+
- [Page/Screen]: PASS / FAIL — [description]
|
|
64
|
+
|
|
65
|
+
Code Review:
|
|
66
|
+
- [Finding 1]
|
|
67
|
+
- [Finding 2]
|
|
68
|
+
|
|
69
|
+
Verdict: Ready to ship / Needs fixes
|
|
70
|
+
|
|
71
|
+
Next: Run /ship when ready, or fix issues and re-run /validate
|
|
72
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: PostToolUse on Write/Edit
|
|
3
|
+
# Purpose: Reminds to update architect-agent after structural changes
|
|
4
|
+
# Behavior: REMIND
|
|
5
|
+
|
|
6
|
+
FILE="$1"
|
|
7
|
+
|
|
8
|
+
if echo "$FILE" | grep -qE '\.(module|controller|service|guard|middleware|resolver)\.(ts|js)$'; then
|
|
9
|
+
echo "REMINDER: Structural file changed. After completing this feature,"
|
|
10
|
+
echo "run architect-agent RECORD to update the codebase knowledge base."
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if echo "$FILE" | grep -qE '(migration|schema|\.sql)'; then
|
|
14
|
+
echo "REMINDER: Database schema changed. Run architect-agent RECORD"
|
|
15
|
+
echo "and check Supabase advisors (get_advisors) for security/performance."
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
exit 0
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: PreToolUse on Bash
|
|
3
|
+
# Purpose: Prevents direct commits and pushes to main/master
|
|
4
|
+
# Behavior: BLOCK
|
|
5
|
+
|
|
6
|
+
COMMAND="$*"
|
|
7
|
+
|
|
8
|
+
if echo "$COMMAND" | grep -qE 'git (commit|push).*(main|master)'; then
|
|
9
|
+
echo "BLOCKED: Direct commits/pushes to main/master are not allowed."
|
|
10
|
+
echo "Create a feature branch first: git checkout -b feat/your-feature"
|
|
11
|
+
echo "Then use /ship to commit, push, and create a PR."
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
exit 0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: Stop (after PR-related commands)
|
|
3
|
+
# Purpose: Reminds to run /evolve after merging
|
|
4
|
+
# Behavior: REMIND
|
|
5
|
+
|
|
6
|
+
echo ""
|
|
7
|
+
echo "If you just merged a PR, run /evolve to:"
|
|
8
|
+
echo " - Update CLAUDE.md with learnings from this session"
|
|
9
|
+
echo " - Update architect-agent knowledge base"
|
|
10
|
+
echo " - Improve the system for next time"
|
|
11
|
+
echo ""
|
|
12
|
+
|
|
13
|
+
exit 0
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: PreToolUse on Edit/Write (implementation files only)
|
|
3
|
+
# Purpose: Warns if no plan file exists for the current branch
|
|
4
|
+
# Behavior: WARN (does not block)
|
|
5
|
+
|
|
6
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
7
|
+
|
|
8
|
+
if [ -z "$BRANCH" ] || [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
PLAN_EXISTS=$(find docs/plans docs/superpowers/plans -name "*.md" 2>/dev/null | head -1)
|
|
13
|
+
|
|
14
|
+
if [ -z "$PLAN_EXISTS" ]; then
|
|
15
|
+
echo "NOTE: No implementation plan found for this branch."
|
|
16
|
+
echo "For L/XL tasks, consider running /plan-feature first."
|
|
17
|
+
echo "For small tasks, this is fine — carry on."
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
exit 0
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: Notification (session start)
|
|
3
|
+
# Purpose: Shows quick context on session start
|
|
4
|
+
# Behavior: INFORM
|
|
5
|
+
|
|
6
|
+
echo "=== Session Context ==="
|
|
7
|
+
|
|
8
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
9
|
+
if [ -n "$BRANCH" ]; then
|
|
10
|
+
echo "Branch: $BRANCH"
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
RECENT=$(git log --oneline -3 2>/dev/null)
|
|
14
|
+
if [ -n "$RECENT" ]; then
|
|
15
|
+
echo ""
|
|
16
|
+
echo "Recent commits:"
|
|
17
|
+
echo "$RECENT"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
if [ -n "$BRANCH" ] && [ "$BRANCH" != "main" ] && [ "$BRANCH" != "master" ]; then
|
|
21
|
+
PLANS=$(find docs/plans docs/superpowers/plans -name "*.md" -newer .git/HEAD 2>/dev/null | head -3)
|
|
22
|
+
if [ -n "$PLANS" ]; then
|
|
23
|
+
echo ""
|
|
24
|
+
echo "Active plans:"
|
|
25
|
+
echo "$PLANS"
|
|
26
|
+
fi
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
STATUS=$(git status --short 2>/dev/null | wc -l | tr -d ' ')
|
|
30
|
+
if [ "$STATUS" != "0" ]; then
|
|
31
|
+
echo ""
|
|
32
|
+
echo "Uncommitted changes: $STATUS files"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
echo "========================"
|
|
36
|
+
echo "Run /start to begin or /prime for full context."
|
|
37
|
+
|
|
38
|
+
exit 0
|