ai-development-framework 0.1.0 → 0.1.2
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/commands/create-prd.md +23 -2
- package/.claude/commands/execute.md +14 -0
- package/.claude/commands/plan-project.md +18 -0
- package/.claude/commands/prime.md +14 -0
- package/.claude/commands/ship.md +45 -0
- package/.claude/commands/start.md +10 -1
- package/.claude/references/knowledge-base-templates.md +124 -0
- package/CLAUDE.md +38 -0
- package/cli/init.js +308 -73
- package/cli/protected-files.js +65 -0
- package/cli/update.js +145 -55
- package/docs/customization.md +56 -0
- package/docs/plans/2026-04-04-knowledge-base-integration-design.md +209 -0
- package/docs/superpowers/plans/2026-04-04-knowledge-base-integration.md +526 -0
- package/package.json +1 -1
|
@@ -31,6 +31,25 @@ Invoke the brainstorming skill to explore the idea before writing anything:
|
|
|
31
31
|
4. User stories should be concrete and testable
|
|
32
32
|
5. Implementation phases should be ordered by dependency and value
|
|
33
33
|
|
|
34
|
+
### Phase 2.5: Seed Knowledge Base (if configured)
|
|
35
|
+
|
|
36
|
+
Check CLAUDE.md for a `## Knowledge Base` section with a `Path:` value. If configured:
|
|
37
|
+
|
|
38
|
+
1. Read `.claude/references/knowledge-base-templates.md` for templates
|
|
39
|
+
2. Create `<kb-path>/overview.md` from the PRD:
|
|
40
|
+
- Vision from Executive Summary
|
|
41
|
+
- Goals from Goals & Success Criteria
|
|
42
|
+
- Target Users from Target Users section
|
|
43
|
+
- Tech Stack from Technical Architecture
|
|
44
|
+
- Feature Areas listing each epic/feature
|
|
45
|
+
3. Create `<kb-path>/architecture/system-design.md` from the PRD's Technical Architecture and System Diagram sections
|
|
46
|
+
4. For each epic or major feature in the PRD, create `<kb-path>/features/<feature-name>.md` using the feature note template:
|
|
47
|
+
- Summary from the epic description
|
|
48
|
+
- GitHub Issues section left empty (populated by `/plan-project`)
|
|
49
|
+
- Key Decisions from any decisions made during brainstorming
|
|
50
|
+
|
|
51
|
+
If no knowledge base configured, skip this phase.
|
|
52
|
+
|
|
34
53
|
### Phase 3: Review and Save
|
|
35
54
|
|
|
36
55
|
1. Present the PRD to the user section by section
|
|
@@ -48,8 +67,10 @@ After saving, tell the user:
|
|
|
48
67
|
> - Run `/plan-project` to decompose this into GitHub milestones and issues
|
|
49
68
|
> - Or run `/plan-feature` to start planning a specific feature from the PRD
|
|
50
69
|
|
|
51
|
-
Commit the PRD:
|
|
70
|
+
Commit the PRD and knowledge base files (if created):
|
|
52
71
|
```bash
|
|
53
72
|
git add docs/plans/PRD.md
|
|
54
|
-
|
|
73
|
+
# If knowledge base was seeded:
|
|
74
|
+
git add <kb-path>/overview.md <kb-path>/architecture/ <kb-path>/features/
|
|
75
|
+
git commit -m "docs: add PRD and seed project knowledge base"
|
|
55
76
|
```
|
|
@@ -27,6 +27,20 @@ Executes an implementation plan task by task with TDD discipline.
|
|
|
27
27
|
|
|
28
28
|
Read every file listed in the plan's "Mandatory Reading" section. This ensures you have the codebase context needed for implementation.
|
|
29
29
|
|
|
30
|
+
#### Knowledge Base Context (if configured)
|
|
31
|
+
|
|
32
|
+
Check CLAUDE.md for a `## Knowledge Base` section with a `Path:` value. If configured:
|
|
33
|
+
|
|
34
|
+
1. Detect the issue number from the plan file or current branch
|
|
35
|
+
2. Grep `<kb-path>/features/*.md` for the issue number — read the matching feature note
|
|
36
|
+
3. Scan other feature notes (first 5 lines each) for related features — read any with clear overlap
|
|
37
|
+
4. Check `<kb-path>/decisions/` for decisions referencing the same feature area
|
|
38
|
+
5. Read `<kb-path>/overview.md` for project context
|
|
39
|
+
|
|
40
|
+
This supplements the plan's mandatory reading with project-level context the plan author may not have included.
|
|
41
|
+
|
|
42
|
+
If no knowledge base configured, skip this step.
|
|
43
|
+
|
|
30
44
|
### Step 3: Execute Tasks
|
|
31
45
|
|
|
32
46
|
For each task in the plan:
|
|
@@ -74,6 +74,24 @@ gh issue create --title "[type]: description" --body "..." --label "feat,priorit
|
|
|
74
74
|
|
|
75
75
|
For issues with dependencies, add a "Blocked by #N" line in the issue body.
|
|
76
76
|
|
|
77
|
+
#### Knowledge Base Integration (if configured)
|
|
78
|
+
|
|
79
|
+
Check CLAUDE.md for a `## Knowledge Base` section with a `Path:` value. If configured, after creating each GitHub issue:
|
|
80
|
+
|
|
81
|
+
1. Check if a feature note already exists in `<kb-path>/features/` for this feature area
|
|
82
|
+
2. If yes: update the `## GitHub Issues` section with the new issue number and title
|
|
83
|
+
3. If no: create a new feature note using `.claude/references/knowledge-base-templates.md` template, with:
|
|
84
|
+
- Summary from the issue description
|
|
85
|
+
- GitHub Issues section listing the new issue
|
|
86
|
+
4. If architectural decisions were made during the planning process, create `<kb-path>/decisions/NNN-title.md` for each significant decision
|
|
87
|
+
|
|
88
|
+
Stage knowledge base files for commit:
|
|
89
|
+
```bash
|
|
90
|
+
git add <kb-path>/features/ <kb-path>/decisions/
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If no knowledge base configured, skip this step.
|
|
94
|
+
|
|
77
95
|
### Phase 6: Generate Roadmap
|
|
78
96
|
|
|
79
97
|
Save a roadmap file to `docs/plans/roadmap.md`:
|
|
@@ -42,6 +42,17 @@ git branch --show-current
|
|
|
42
42
|
- Read `.claude/agents/tester-agent/test-patterns.md` (page inventory)
|
|
43
43
|
- Check `package.json` or equivalent for available scripts/commands
|
|
44
44
|
|
|
45
|
+
### 6. Knowledge Base Context
|
|
46
|
+
|
|
47
|
+
Check CLAUDE.md for a `## Knowledge Base` section with a `Path:` value (e.g., `.obsidian/`). If configured and the directory exists:
|
|
48
|
+
|
|
49
|
+
1. **Always read:** `<kb-path>/overview.md`
|
|
50
|
+
2. **Find linked feature note:** If working on a specific issue (detected from branch name or user input), grep `<kb-path>/features/*.md` for the issue number. Read the matching feature note.
|
|
51
|
+
3. **Scan for related features:** List all files in `<kb-path>/features/`. Read the first 5 lines (`## Summary`) of each. If any feature has a clear dependency or overlap with the current issue (shared entities, referenced in acceptance criteria, same domain area), read the full note.
|
|
52
|
+
4. **Check decisions:** List `<kb-path>/decisions/`. Read any whose title references the same feature area.
|
|
53
|
+
|
|
54
|
+
If no knowledge base configured, skip this section entirely.
|
|
55
|
+
|
|
45
56
|
## Output Format
|
|
46
57
|
|
|
47
58
|
Present a structured summary:
|
|
@@ -67,5 +78,8 @@ Available Commands:
|
|
|
67
78
|
|
|
68
79
|
Knowledge Base: [N domains documented in architect-agent]
|
|
69
80
|
|
|
81
|
+
Project Knowledge: [summary from overview.md if knowledge base exists, or "not configured"]
|
|
82
|
+
Related Features: [list of feature notes loaded for this session]
|
|
83
|
+
|
|
70
84
|
=== Ready. Run /start to begin or specify a command. ===
|
|
71
85
|
```
|
package/.claude/commands/ship.md
CHANGED
|
@@ -10,6 +10,51 @@ Handles the full shipping workflow: staging, committing, pushing, and creating a
|
|
|
10
10
|
2. Verify no uncommitted changes that shouldn't be included
|
|
11
11
|
3. Check current branch is not main/master
|
|
12
12
|
|
|
13
|
+
### Step 1.5: Update Knowledge Base (if configured)
|
|
14
|
+
|
|
15
|
+
Check CLAUDE.md for a `## Knowledge Base` section with a `Path:` value. If configured:
|
|
16
|
+
|
|
17
|
+
1. **Find the feature note:** Detect the current issue number from the branch name. Grep `<kb-path>/features/*.md` for that issue number. If no match, use keyword matching between branch name and feature note filenames.
|
|
18
|
+
|
|
19
|
+
2. **Update the feature note:**
|
|
20
|
+
- `## Implementation Notes` — append what was built: key files created/modified, endpoints added, components built, patterns used
|
|
21
|
+
- `## GitHub Issues` — update the status of the current issue to reflect completion
|
|
22
|
+
- `## Key Decisions` — add any decisions made during implementation that weren't pre-planned
|
|
23
|
+
|
|
24
|
+
3. **Create decision records** (only if warranted):
|
|
25
|
+
- A technology or approach was chosen over alternatives during implementation
|
|
26
|
+
- A pattern was established that future features should follow
|
|
27
|
+
- Something was intentionally excluded and the reason matters for future work
|
|
28
|
+
|
|
29
|
+
4. **Update overview** (only if significant):
|
|
30
|
+
- New integration or service was added to the stack
|
|
31
|
+
- Project scope changed
|
|
32
|
+
|
|
33
|
+
5. Stage knowledge base changes alongside code changes.
|
|
34
|
+
|
|
35
|
+
If no knowledge base configured, skip to Step 2.
|
|
36
|
+
|
|
37
|
+
### Step 1.6: Codex Adversarial Review (optional)
|
|
38
|
+
|
|
39
|
+
This step requires an OpenAI subscription and the Codex plugin installed. If not available, skip to Step 2.
|
|
40
|
+
|
|
41
|
+
Check if the Codex companion script exists:
|
|
42
|
+
```bash
|
|
43
|
+
test -f "$HOME/.claude/plugins/cache/openai-codex/codex/*/scripts/codex-companion.mjs" && echo "codex available" || echo "codex not available"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If Codex is available:
|
|
47
|
+
|
|
48
|
+
1. Ask the user: "Run Codex adversarial review before committing? (requires OpenAI subscription)"
|
|
49
|
+
- If yes: run `/codex:adversarial-review` against the working tree changes
|
|
50
|
+
- If no: skip to Step 2
|
|
51
|
+
2. Present the review output to the user
|
|
52
|
+
3. If the review surfaces significant concerns, ask: "Address these findings before committing, or proceed?"
|
|
53
|
+
- If address: stop `/ship`, let the user fix issues, then re-run `/ship`
|
|
54
|
+
- If proceed: continue to Step 2
|
|
55
|
+
|
|
56
|
+
This does NOT replace the superpowers code review in `/validate`. It is an additional, adversarial perspective that questions design choices, tradeoffs, and assumptions — not just implementation defects.
|
|
57
|
+
|
|
13
58
|
### Step 2: Stage and Commit
|
|
14
59
|
|
|
15
60
|
Use the `/commit` skill (from commit-commands plugin) for proper conventional commit formatting.
|
|
@@ -10,6 +10,7 @@ Run these in parallel:
|
|
|
10
10
|
3. Check current git branch and status
|
|
11
11
|
4. Check for existing GitHub issues: `gh issue list --limit 5 2>/dev/null`
|
|
12
12
|
5. Check for existing plan files: `find docs/plans docs/superpowers/plans -name "*.md" 2>/dev/null`
|
|
13
|
+
6. Check if knowledge base is configured: look for `## Knowledge Base` section with `Path:` in CLAUDE.md. If found, check if the directory exists and has `overview.md`
|
|
13
14
|
|
|
14
15
|
## Step 2: Detect Scope Level
|
|
15
16
|
|
|
@@ -21,7 +22,15 @@ Based on context, determine the entry point:
|
|
|
21
22
|
|
|
22
23
|
**L0 (New Project)** — No PRD, no issues, minimal/no code
|
|
23
24
|
→ "Looks like a fresh project. Let's plan it from scratch."
|
|
24
|
-
→ Route to:
|
|
25
|
+
→ Route to:
|
|
26
|
+
1. Brainstorm functionalities (interactive discussion)
|
|
27
|
+
2. If knowledge base configured in CLAUDE.md:
|
|
28
|
+
a. Create knowledge base folder structure (`overview.md`, `features/`, `decisions/`, `config/`, `research/`, `architecture/`)
|
|
29
|
+
b. Create `overview.md` from brainstorming results using `.claude/references/knowledge-base-templates.md`
|
|
30
|
+
c. Create feature notes in `features/` for each agreed functionality
|
|
31
|
+
3. `/create-prd` (generates PRD from brainstorming, seeds knowledge base if configured)
|
|
32
|
+
4. `/plan-project` (creates GitHub issues, links them to feature notes)
|
|
33
|
+
5. STOP — present the issue list and ask: "Which issue do you want to work on first?"
|
|
25
34
|
|
|
26
35
|
**L1 (New Feature)** — Project exists, user has a feature idea (no specific issue)
|
|
27
36
|
→ "Let's plan this feature."
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Knowledge Base Templates
|
|
2
|
+
|
|
3
|
+
Used by pipeline commands when creating knowledge base notes. The knowledge base path is configured in the project's CLAUDE.md under `## Knowledge Base`.
|
|
4
|
+
|
|
5
|
+
**Security:** Knowledge base notes are committed to git. NEVER store actual secret values (API keys, tokens, passwords) in any note. Store only metadata: which env vars are needed, which services are used, who owns credentials. Actual secrets belong in `.env` files, secret managers, or CI/CD variables.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Note Template
|
|
10
|
+
|
|
11
|
+
Create one per feature area in `<kb-path>/features/<feature-name>.md`.
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# Feature: [Name]
|
|
15
|
+
|
|
16
|
+
## Summary
|
|
17
|
+
|
|
18
|
+
[1-2 sentences: what this feature does and why]
|
|
19
|
+
|
|
20
|
+
## GitHub Issues
|
|
21
|
+
|
|
22
|
+
- #N — [title] (status: open/closed)
|
|
23
|
+
|
|
24
|
+
## Key Decisions
|
|
25
|
+
|
|
26
|
+
- [Decision and why]
|
|
27
|
+
|
|
28
|
+
## Implementation Notes
|
|
29
|
+
|
|
30
|
+
[Updated by /ship after work is completed — endpoints created, components built, patterns used]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Decision Record Template
|
|
36
|
+
|
|
37
|
+
Create in `<kb-path>/decisions/NNN-title.md` when:
|
|
38
|
+
- A technology or approach was chosen over alternatives
|
|
39
|
+
- A pattern was established that future work should follow
|
|
40
|
+
- Something was intentionally excluded (and why)
|
|
41
|
+
|
|
42
|
+
NOT for every small implementation choice.
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
# NNN: [Title]
|
|
46
|
+
|
|
47
|
+
**Date:** YYYY-MM-DD
|
|
48
|
+
**Status:** Accepted
|
|
49
|
+
|
|
50
|
+
## Context
|
|
51
|
+
|
|
52
|
+
[What situation led to this decision]
|
|
53
|
+
|
|
54
|
+
## Decision
|
|
55
|
+
|
|
56
|
+
[What we chose and why]
|
|
57
|
+
|
|
58
|
+
## Consequences
|
|
59
|
+
|
|
60
|
+
[What this means for future work — both positive and negative]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Overview Template
|
|
66
|
+
|
|
67
|
+
Create once at `<kb-path>/overview.md` during project setup or PRD creation.
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# [Project Name]
|
|
71
|
+
|
|
72
|
+
## Vision
|
|
73
|
+
|
|
74
|
+
[1-2 sentences: what this project is and why it exists]
|
|
75
|
+
|
|
76
|
+
## Goals
|
|
77
|
+
|
|
78
|
+
- [Goal 1]
|
|
79
|
+
- [Goal 2]
|
|
80
|
+
|
|
81
|
+
## Target Users
|
|
82
|
+
|
|
83
|
+
- [User type 1]: [their key need]
|
|
84
|
+
- [User type 2]: [their key need]
|
|
85
|
+
|
|
86
|
+
## Tech Stack
|
|
87
|
+
|
|
88
|
+
| Layer | Technology | Rationale |
|
|
89
|
+
|-------|-----------|-----------|
|
|
90
|
+
| | | |
|
|
91
|
+
|
|
92
|
+
## Feature Areas
|
|
93
|
+
|
|
94
|
+
- [Feature 1] — see `features/feature-1.md`
|
|
95
|
+
- [Feature 2] — see `features/feature-2.md`
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Architecture Template
|
|
101
|
+
|
|
102
|
+
Create at `<kb-path>/architecture/system-design.md` from PRD's technical architecture section.
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
# System Design
|
|
106
|
+
|
|
107
|
+
## Overview
|
|
108
|
+
|
|
109
|
+
[High-level description of the system architecture]
|
|
110
|
+
|
|
111
|
+
## Components
|
|
112
|
+
|
|
113
|
+
| Component | Responsibility | Tech |
|
|
114
|
+
|-----------|---------------|------|
|
|
115
|
+
| | | |
|
|
116
|
+
|
|
117
|
+
## Data Flow
|
|
118
|
+
|
|
119
|
+
[How data moves through the system]
|
|
120
|
+
|
|
121
|
+
## Integrations
|
|
122
|
+
|
|
123
|
+
[External services and how they connect]
|
|
124
|
+
```
|
package/CLAUDE.md
CHANGED
|
@@ -54,6 +54,44 @@ For non-trivial tasks, choose your discipline level:
|
|
|
54
54
|
- **mobile-tester-agent** — Mobile app testing via mobile-mcp (VERIFY/FLOW)
|
|
55
55
|
- **ui-ux-analyzer** — Design audit agent with screenshots and reports
|
|
56
56
|
|
|
57
|
+
## Knowledge Base
|
|
58
|
+
|
|
59
|
+
Optional Obsidian-compatible project knowledge base. Stores feature specs, architecture decisions, and project overview as markdown notes that the agent reads/writes during the pipeline.
|
|
60
|
+
|
|
61
|
+
**Configuration:** Add `## Knowledge Base` with `Path: <path>` to your project's CLAUDE.md. Default: `.obsidian/`. Remove the section to disable.
|
|
62
|
+
|
|
63
|
+
**Structure:**
|
|
64
|
+
```
|
|
65
|
+
<path>/
|
|
66
|
+
├── overview.md # Project vision, goals, tech stack
|
|
67
|
+
├── architecture/ # System design, data model
|
|
68
|
+
├── features/ # One note per feature area, linked to GitHub issues
|
|
69
|
+
├── decisions/ # Architecture Decision Records (ADRs)
|
|
70
|
+
├── config/ # Integration metadata, env var names (never actual secrets)
|
|
71
|
+
└── research/ # Brainstorming notes, tech comparisons
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**When commands read it:**
|
|
75
|
+
- `/prime` — loads overview + related feature notes (smart/targeted)
|
|
76
|
+
- `/execute` — reads feature context before implementing
|
|
77
|
+
|
|
78
|
+
**When commands write it:**
|
|
79
|
+
- `/start` (L0) — creates structure + feature notes during brainstorming
|
|
80
|
+
- `/create-prd` — seeds overview + architecture from PRD
|
|
81
|
+
- `/plan-project` — creates feature notes alongside GitHub issues
|
|
82
|
+
- `/ship` — updates feature notes with implementation details
|
|
83
|
+
|
|
84
|
+
## Code Review Layers
|
|
85
|
+
|
|
86
|
+
The framework supports two complementary review layers:
|
|
87
|
+
|
|
88
|
+
| Layer | Command | What it checks | Required |
|
|
89
|
+
|-------|---------|---------------|----------|
|
|
90
|
+
| **Superpowers Code Review** | `/validate` Phase 3 | Implementation defects, plan adherence, security, edge cases | Always available |
|
|
91
|
+
| **Codex Adversarial Review** | `/ship` Step 1.6 | Design choices, tradeoffs, assumptions, alternative approaches | Optional (requires OpenAI subscription + Codex plugin) |
|
|
92
|
+
|
|
93
|
+
These are additive — the adversarial review questions whether the *approach* is right, while the code review checks whether the *implementation* is correct.
|
|
94
|
+
|
|
57
95
|
## Rules & References
|
|
58
96
|
|
|
59
97
|
- Domain-specific rules auto-load from `.claude/rules/` based on file paths being edited
|