@relipa/ai-flow-kit 0.0.1
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/AIFLOW.md +432 -0
- package/CHANGELOG.md +78 -0
- package/CONTRIBUTING.md +351 -0
- package/IMPLEMENTATION_SUMMARY.md +348 -0
- package/QUICK_START.md +392 -0
- package/README.md +323 -0
- package/bin/aiflow.js +178 -0
- package/custom/mcp-presets/README.md +138 -0
- package/custom/mcp-presets/backlog.json +15 -0
- package/custom/mcp-presets/figma.json +15 -0
- package/custom/mcp-presets/google-sheets.json +14 -0
- package/custom/mcp-presets/jira.json +16 -0
- package/custom/prompts/bug-fix.md +149 -0
- package/custom/prompts/feature.md +190 -0
- package/custom/prompts/investigation.md +164 -0
- package/custom/rules/code-style.md +7 -0
- package/custom/rules/java/code-style.md +11 -0
- package/custom/rules/java/naming.md +17 -0
- package/custom/rules/java/review-checklist.md +36 -0
- package/custom/rules/javascript/code-style.md +12 -0
- package/custom/rules/javascript/naming.md +14 -0
- package/custom/rules/naming.md +9 -0
- package/custom/rules/php/code-style.md +10 -0
- package/custom/rules/php/naming.md +15 -0
- package/custom/rules/review-checklist.md +9 -0
- package/custom/skills/figma-to-component/SKILL.md +207 -0
- package/custom/skills/generate-spec/SKILL.md +97 -0
- package/custom/skills/impact-analysis/SKILL.md +94 -0
- package/custom/skills/investigate-bug/SKILL.md +93 -0
- package/custom/skills/report-customer/SKILL.md +95 -0
- package/custom/skills/review-plan/SKILL.md +158 -0
- package/custom/skills/validate-ticket/SKILL.md +240 -0
- package/custom/templates/laravel.md +90 -0
- package/custom/templates/nextjs.md +89 -0
- package/custom/templates/reactjs.md +567 -0
- package/custom/templates/spring-boot.md +598 -0
- package/custom/templates/vue-nuxt.md +89 -0
- package/docs/architecture.md +395 -0
- package/docs/cli-reference.md +438 -0
- package/docs/configuration.md +412 -0
- package/docs/getting-started.md +248 -0
- package/docs/troubleshooting.md +587 -0
- package/docs/workflows/bug-fix.md +126 -0
- package/docs/workflows/feature.md +123 -0
- package/docs/workflows/impact-analysis.md +13 -0
- package/docs/workflows/investigation.md +13 -0
- package/docs/workflows/refactor.md +13 -0
- package/index.js +27 -0
- package/package.json +70 -0
- package/scripts/config.js +317 -0
- package/scripts/context.js +117 -0
- package/scripts/detect.js +239 -0
- package/scripts/doctor.js +48 -0
- package/scripts/guide.js +282 -0
- package/scripts/hooks/session-start.js +140 -0
- package/scripts/init.js +453 -0
- package/scripts/memory.js +247 -0
- package/scripts/prompt.js +392 -0
- package/scripts/remove.js +170 -0
- package/scripts/update.js +111 -0
- package/scripts/use.js +570 -0
- package/scripts/validate.js +303 -0
- package/upstream/.claude-plugin/marketplace.json +20 -0
- package/upstream/.claude-plugin/plugin.json +20 -0
- package/upstream/.codex/INSTALL.md +67 -0
- package/upstream/.cursor-plugin/plugin.json +25 -0
- package/upstream/.gitattributes +18 -0
- package/upstream/.github/FUNDING.yml +3 -0
- package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
- package/upstream/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
- package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
- package/upstream/.github/PULL_REQUEST_TEMPLATE.md +87 -0
- package/upstream/.opencode/INSTALL.md +83 -0
- package/upstream/.opencode/plugins/superpowers.js +112 -0
- package/upstream/.version-bump.json +19 -0
- package/upstream/AGENTS.md +1 -0
- package/upstream/CHANGELOG.md +13 -0
- package/upstream/CLAUDE.md +85 -0
- package/upstream/CODE_OF_CONDUCT.md +128 -0
- package/upstream/GEMINI.md +2 -0
- package/upstream/LICENSE +21 -0
- package/upstream/README.md +190 -0
- package/upstream/RELEASE-NOTES.md +1096 -0
- package/upstream/agents/code-reviewer.md +48 -0
- package/upstream/commands/brainstorm.md +5 -0
- package/upstream/commands/execute-plan.md +5 -0
- package/upstream/commands/write-plan.md +5 -0
- package/upstream/docs/README.codex.md +126 -0
- package/upstream/docs/README.opencode.md +130 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-design.md +294 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
- package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
- package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
- package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
- package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
- package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
- package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
- package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
- package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
- package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
- package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
- package/upstream/docs/testing.md +303 -0
- package/upstream/docs/windows/polyglot-hooks.md +212 -0
- package/upstream/gemini-extension.json +6 -0
- package/upstream/hooks/hooks-cursor.json +10 -0
- package/upstream/hooks/hooks.json +16 -0
- package/upstream/hooks/run-hook.cmd +46 -0
- package/upstream/hooks/session-start +57 -0
- package/upstream/package.json +6 -0
- package/upstream/scripts/bump-version.sh +220 -0
- package/upstream/skills/brainstorming/SKILL.md +164 -0
- package/upstream/skills/brainstorming/scripts/frame-template.html +214 -0
- package/upstream/skills/brainstorming/scripts/helper.js +88 -0
- package/upstream/skills/brainstorming/scripts/server.cjs +354 -0
- package/upstream/skills/brainstorming/scripts/start-server.sh +148 -0
- package/upstream/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/upstream/skills/brainstorming/visual-companion.md +287 -0
- package/upstream/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/upstream/skills/executing-plans/SKILL.md +70 -0
- package/upstream/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/upstream/skills/receiving-code-review/SKILL.md +213 -0
- package/upstream/skills/requesting-code-review/SKILL.md +105 -0
- package/upstream/skills/requesting-code-review/code-reviewer.md +146 -0
- package/upstream/skills/subagent-driven-development/SKILL.md +277 -0
- package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/upstream/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/upstream/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/upstream/skills/systematic-debugging/SKILL.md +296 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/upstream/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/upstream/skills/systematic-debugging/find-polluter.sh +63 -0
- package/upstream/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/upstream/skills/systematic-debugging/test-academic.md +14 -0
- package/upstream/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/upstream/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/upstream/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/upstream/skills/test-driven-development/SKILL.md +371 -0
- package/upstream/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/upstream/skills/using-git-worktrees/SKILL.md +218 -0
- package/upstream/skills/using-superpowers/SKILL.md +117 -0
- package/upstream/skills/using-superpowers/references/codex-tools.md +100 -0
- package/upstream/skills/using-superpowers/references/copilot-tools.md +52 -0
- package/upstream/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/upstream/skills/verification-before-completion/SKILL.md +139 -0
- package/upstream/skills/writing-plans/SKILL.md +152 -0
- package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/upstream/skills/writing-skills/SKILL.md +655 -0
- package/upstream/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/upstream/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/upstream/skills/writing-skills/persuasion-principles.md +187 -0
- package/upstream/skills/writing-skills/render-graphs.js +168 -0
- package/upstream/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/upstream/tests/brainstorm-server/package-lock.json +36 -0
- package/upstream/tests/brainstorm-server/package.json +10 -0
- package/upstream/tests/brainstorm-server/server.test.js +427 -0
- package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
- package/upstream/tests/brainstorm-server/ws-protocol.test.js +392 -0
- package/upstream/tests/claude-code/README.md +158 -0
- package/upstream/tests/claude-code/analyze-token-usage.py +168 -0
- package/upstream/tests/claude-code/run-skill-tests.sh +187 -0
- package/upstream/tests/claude-code/test-document-review-system.sh +177 -0
- package/upstream/tests/claude-code/test-helpers.sh +202 -0
- package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
- package/upstream/tests/claude-code/test-subagent-driven-development.sh +165 -0
- package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
- package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
- package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
- package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
- package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
- package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
- package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
- package/upstream/tests/explicit-skill-requests/run-all.sh +70 -0
- package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
- package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
- package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
- package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
- package/upstream/tests/explicit-skill-requests/run-test.sh +136 -0
- package/upstream/tests/opencode/run-tests.sh +163 -0
- package/upstream/tests/opencode/setup.sh +88 -0
- package/upstream/tests/opencode/test-plugin-loading.sh +82 -0
- package/upstream/tests/opencode/test-priority.sh +198 -0
- package/upstream/tests/opencode/test-tools.sh +104 -0
- package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
- package/upstream/tests/skill-triggering/prompts/executing-plans.txt +1 -0
- package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
- package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
- package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
- package/upstream/tests/skill-triggering/prompts/writing-plans.txt +10 -0
- package/upstream/tests/skill-triggering/run-all.sh +60 -0
- package/upstream/tests/skill-triggering/run-test.sh +88 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/design.md +81 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
- package/upstream/tests/subagent-driven-dev/run-test.sh +106 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
package/AIFLOW.md
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
# AIFLOW — Software Development Workflow with AI
|
|
2
|
+
|
|
3
|
+
**Version:** 2.0.0 | **Package:** ai-flow-kit
|
|
4
|
+
|
|
5
|
+
> This workflow applies to all tasks: feature, bug-fix, refactor, investigation.
|
|
6
|
+
> **Absolute Rule: Complete Gate N → Only then can you enter Gate N+1. No exceptions.**
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Workflow Overview
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
PM writes ticket on Backlog/Jira
|
|
14
|
+
│
|
|
15
|
+
▼
|
|
16
|
+
⛩️ GATE 1 — AI Analyze Requirement [AI + DEV]
|
|
17
|
+
AI loads ticket + reads source code
|
|
18
|
+
AI asks clarifying questions until clear
|
|
19
|
+
AI outputs: requirement.md
|
|
20
|
+
(requirements, solution, impact analysis, estimate)
|
|
21
|
+
DEV reviews → "APPROVED"
|
|
22
|
+
│ APPROVED
|
|
23
|
+
▼
|
|
24
|
+
⛩️ GATE 2 — Implementation Plan [AI + DEV]
|
|
25
|
+
AI creates detailed coding plan (TDD steps)
|
|
26
|
+
DEV reviews → "APPROVED"
|
|
27
|
+
│ APPROVED
|
|
28
|
+
▼
|
|
29
|
+
⛩️ GATE 3 — Code Generation (TDD) [AI]
|
|
30
|
+
AI writes tests first → implement → tests pass
|
|
31
|
+
Commit each small step
|
|
32
|
+
│ Code done
|
|
33
|
+
▼
|
|
34
|
+
⛩️ GATE 4 — AI Self-Review [AI + DEV]
|
|
35
|
+
AI runs: verification + impact-analysis + checklist
|
|
36
|
+
AI generates summary report
|
|
37
|
+
DEV reviews → "APPROVED" or "BUG: [description]"
|
|
38
|
+
│ APPROVED
|
|
39
|
+
▼
|
|
40
|
+
⛩️ GATE 5 — Peer Review & PR [DEV + Peer]
|
|
41
|
+
requesting-code-review skill
|
|
42
|
+
Create Pull Request → merge
|
|
43
|
+
│
|
|
44
|
+
▼
|
|
45
|
+
DONE
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Roles
|
|
51
|
+
|
|
52
|
+
| Role | Responsibility |
|
|
53
|
+
|------|---------------|
|
|
54
|
+
| **PM** | Write ticket on Backlog/Jira with description, acceptance criteria, context |
|
|
55
|
+
| **DEV** | Trigger workflow, review AI outputs at each gate, type APPROVED or provide feedback |
|
|
56
|
+
| **AI** | Analyze requirements, propose solutions, generate code (TDD), self-review |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Gate Details
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### ⛩️ GATE 1 — AI Analyze Requirement
|
|
65
|
+
|
|
66
|
+
**Who performs:** AI (analyze) + DEV (review & approve)
|
|
67
|
+
|
|
68
|
+
**Trigger:**
|
|
69
|
+
```bash
|
|
70
|
+
aiflow use PROJ-33 # load ticket from Backlog/Jira
|
|
71
|
+
claude # open Claude → AI auto-starts Gate 1
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> `aiflow prompt` is optional — use it only when pasting into Claude Desktop/Web.
|
|
75
|
+
> In Claude Code CLI, AI auto-starts Gate 1 via SessionStart hook.
|
|
76
|
+
|
|
77
|
+
**What AI does (in order):**
|
|
78
|
+
|
|
79
|
+
| Step | Action | Purpose |
|
|
80
|
+
|------|--------|---------|
|
|
81
|
+
| 1 | Load ticket from `.claude/context/current.json` | Get PM's requirements, comments |
|
|
82
|
+
| 2 | Read `CLAUDE.md` + source code | Understand architecture, tech stack, patterns |
|
|
83
|
+
| 3 | Investigate related files & data flow | Identify affected areas, dependencies |
|
|
84
|
+
| 4 | Ask clarifying questions (one at a time) | Ensure full understanding |
|
|
85
|
+
| 5 | Write `plan/[ticket-id]/requirement.md` | Structured requirement document |
|
|
86
|
+
|
|
87
|
+
**AI asks questions when:**
|
|
88
|
+
- Business requirements are vague or ambiguous
|
|
89
|
+
- Acceptance criteria are not measurable
|
|
90
|
+
- Edge cases are discovered in source code
|
|
91
|
+
- Multiple approaches are possible and need input
|
|
92
|
+
- Impact on existing features is unclear
|
|
93
|
+
|
|
94
|
+
**Requirement Document Output (`plan/[ticket-id]/requirement.md`):**
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
├── 1. Requirements Summary
|
|
98
|
+
│ ├── Description (AI's understanding in technical language)
|
|
99
|
+
│ ├── Current behavior / Business goal
|
|
100
|
+
│ ├── Acceptance Criteria (refined, measurable)
|
|
101
|
+
│ └── Context & Constraints
|
|
102
|
+
├── 2. Source Code Analysis
|
|
103
|
+
│ ├── Related files & their roles
|
|
104
|
+
│ ├── Data flow diagram
|
|
105
|
+
│ ├── Existing patterns to follow
|
|
106
|
+
│ └── Current test coverage
|
|
107
|
+
├── 3. Proposed Solution & Approach
|
|
108
|
+
│ ├── Option A (recommended) — pros/cons
|
|
109
|
+
│ ├── Option B (alternative) — pros/cons
|
|
110
|
+
│ ├── Chosen approach & rationale
|
|
111
|
+
│ ├── Files to create/modify
|
|
112
|
+
│ └── Database changes (if any)
|
|
113
|
+
├── 4. Impact Analysis
|
|
114
|
+
│ ├── Impact level (Low/Medium/High)
|
|
115
|
+
│ ├── Affected areas
|
|
116
|
+
│ ├── Breaking changes
|
|
117
|
+
│ └── Risks & mitigations
|
|
118
|
+
├── 5. Effort Estimate
|
|
119
|
+
│ ├── Task breakdown with size (S/M/L/XL)
|
|
120
|
+
│ └── Sub-task split for XL tasks
|
|
121
|
+
└── 6. Testing Plan
|
|
122
|
+
├── Unit tests
|
|
123
|
+
├── Integration tests
|
|
124
|
+
└── Manual test cases
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Gate 1 Display:**
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
⏸️ GATE 1: REQUIREMENT DOCUMENT READY
|
|
131
|
+
|
|
132
|
+
Summary:
|
|
133
|
+
- Type: [feature / bug-fix / refactor]
|
|
134
|
+
- Impact: [Low / Medium / High]
|
|
135
|
+
- Estimate: [S / M / L / XL]
|
|
136
|
+
- Approach: [brief description]
|
|
137
|
+
- Files affected: [N] files
|
|
138
|
+
|
|
139
|
+
→ Review: plan/[ticket-id]/requirement.md
|
|
140
|
+
→ Type APPROVED to proceed
|
|
141
|
+
→ Or provide feedback to update
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Gate 1 Output:**
|
|
145
|
+
- `plan/[ticket-id]/requirement.md` approved by DEV
|
|
146
|
+
- DEV has typed "APPROVED"
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### ⛩️ GATE 2 — Implementation Plan
|
|
151
|
+
|
|
152
|
+
**Who performs:** AI (create plan) + DEV (review & approve)
|
|
153
|
+
|
|
154
|
+
**What AI does:**
|
|
155
|
+
|
|
156
|
+
1. Read the approved requirement document
|
|
157
|
+
2. **Invoke** `superpowers:writing-plans` → create detailed implementation plan
|
|
158
|
+
3. Break down into TDD tasks: test first → implement → verify
|
|
159
|
+
4. Define commit strategy (small, focused commits)
|
|
160
|
+
5. Present plan and wait for APPROVED
|
|
161
|
+
|
|
162
|
+
**Implementation Plan Structure:**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
├── Task Breakdown (TDD Order)
|
|
166
|
+
│ ├── Task 1: Write test for [scenario]
|
|
167
|
+
│ ├── Task 2: Implement [component]
|
|
168
|
+
│ ├── Task 3: Write test for [next scenario]
|
|
169
|
+
│ └── ...
|
|
170
|
+
├── Commit Strategy
|
|
171
|
+
└── Test Commands
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Gate 2 Display:**
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
⏸️ GATE 2: IMPLEMENTATION PLAN READY
|
|
178
|
+
|
|
179
|
+
Tasks: [N] | Commits: [N] | Test-first tasks: [N]
|
|
180
|
+
|
|
181
|
+
→ Type APPROVED to start coding
|
|
182
|
+
→ Or provide feedback to adjust
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Gate 2 Output:**
|
|
186
|
+
- Implementation plan approved by DEV
|
|
187
|
+
- DEV has typed "APPROVED"
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### ⛩️ GATE 3 — Code Generation
|
|
192
|
+
|
|
193
|
+
**Who performs:** AI
|
|
194
|
+
|
|
195
|
+
**Only runs after Gate 2 APPROVED.**
|
|
196
|
+
|
|
197
|
+
**Mandatory Order:**
|
|
198
|
+
|
|
199
|
+
#### Feature task:
|
|
200
|
+
1. Complex feature (3+ files) → `superpowers:subagent-driven-development`
|
|
201
|
+
2. `superpowers:test-driven-development` — write tests FIRST
|
|
202
|
+
3. Run tests → confirm FAIL
|
|
203
|
+
4. Implement code → tests PASS
|
|
204
|
+
5. Commit each small step
|
|
205
|
+
|
|
206
|
+
#### Bug fix task (extra):
|
|
207
|
+
1. `superpowers:systematic-debugging` — trace root cause, NO guessing
|
|
208
|
+
2. `investigate-bug` skill — trace Controller→Service→Repository
|
|
209
|
+
3. Then TDD: write test to reproduce bug → fix → tests PASS
|
|
210
|
+
|
|
211
|
+
#### Refactor task (extra):
|
|
212
|
+
1. Ensure tests cover current behavior
|
|
213
|
+
2. Refactor in small steps — keep tests green continuously
|
|
214
|
+
|
|
215
|
+
**Gate 3 Output:**
|
|
216
|
+
- Code implementation finished
|
|
217
|
+
- All tests PASS
|
|
218
|
+
- Committed
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### ⛩️ GATE 4 — AI Self-Review
|
|
223
|
+
|
|
224
|
+
**Who performs:** AI (self-review) + DEV (final approve)
|
|
225
|
+
|
|
226
|
+
**AI runs in mandatory order:**
|
|
227
|
+
|
|
228
|
+
| Step | Action | Required Result |
|
|
229
|
+
|------|--------|------------|
|
|
230
|
+
| 1 | `superpowers:verification-before-completion` | All tests PASS |
|
|
231
|
+
| 2 | `impact-analysis` skill | No breaking changes outside scope |
|
|
232
|
+
| 3 | `custom/rules/review-checklist.md` | All items ticked |
|
|
233
|
+
| 4 | Create `plan/[ticket-id]/summary.md` | File exists and is complete |
|
|
234
|
+
|
|
235
|
+
**If any step fails → AI fixes it first, without showing DEV.**
|
|
236
|
+
|
|
237
|
+
**Summary report output:**
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
plan/[ticket-id]/summary.md
|
|
241
|
+
├── List of changed files + reasons
|
|
242
|
+
├── Acceptance Criteria → results (Done/Not Done)
|
|
243
|
+
├── Tests: quantity, coverage
|
|
244
|
+
├── Impact Analysis: level (Low/Medium/High)
|
|
245
|
+
└── Review Checklist: N/N items ✅
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Gate 4 Display:**
|
|
249
|
+
```
|
|
250
|
+
⏸️ GATE 4: WAITING FOR DEV REVIEW
|
|
251
|
+
|
|
252
|
+
Tests: ✅ [N] passed
|
|
253
|
+
Impact: [Low/Medium/High]
|
|
254
|
+
Checklist: [N/N] ✅
|
|
255
|
+
Summary: plan/[ticket-id]/summary.md
|
|
256
|
+
|
|
257
|
+
Type APPROVED if OK
|
|
258
|
+
Type BUG: [description] if there are issues
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**DEV Response:**
|
|
262
|
+
- `APPROVED` → move to Gate 5
|
|
263
|
+
- `BUG: coding bug` → AI fixes → repeat Gate 4
|
|
264
|
+
- `BUG: requirement bug` → AI updates requirement doc → back to Gate 1
|
|
265
|
+
|
|
266
|
+
**Gate 4 Output:**
|
|
267
|
+
- `plan/[ticket-id]/summary.md` completed
|
|
268
|
+
- DEV has typed "APPROVED"
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### ⛩️ GATE 5 — Peer Review & Pull Request
|
|
273
|
+
|
|
274
|
+
**Who performs:** DEV + Peer reviewer
|
|
275
|
+
|
|
276
|
+
**Only runs after Gate 4 APPROVED.**
|
|
277
|
+
|
|
278
|
+
**AI invokes:** `superpowers:requesting-code-review`
|
|
279
|
+
|
|
280
|
+
**AI guides PR creation:**
|
|
281
|
+
|
|
282
|
+
```markdown
|
|
283
|
+
## Pull Request Template
|
|
284
|
+
|
|
285
|
+
**Title:** [feat/fix/refactor]: [PROJ-XX] [Short description]
|
|
286
|
+
|
|
287
|
+
**Description:**
|
|
288
|
+
Closes [PROJ-XX]
|
|
289
|
+
|
|
290
|
+
### Changes
|
|
291
|
+
- [File A] — [what changed]
|
|
292
|
+
- [File B] — [what changed]
|
|
293
|
+
|
|
294
|
+
### Acceptance Criteria
|
|
295
|
+
- [x] [Criteria 1]
|
|
296
|
+
- [x] [Criteria 2]
|
|
297
|
+
|
|
298
|
+
### Testing
|
|
299
|
+
- Unit tests: [N] cases
|
|
300
|
+
- Integration tests: [N] cases
|
|
301
|
+
- Manual test: [tested manually?]
|
|
302
|
+
|
|
303
|
+
### Impact
|
|
304
|
+
[Low/Medium/High] — [short description]
|
|
305
|
+
|
|
306
|
+
### Reviewer notes
|
|
307
|
+
[Anything special for the reviewer to notice]
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Peer reviewer checks:**
|
|
311
|
+
- Code logic matches requirement document
|
|
312
|
+
- Tests are sufficient and meaningful
|
|
313
|
+
- No security issues
|
|
314
|
+
- Acceptable performance
|
|
315
|
+
- Follows team conventions
|
|
316
|
+
|
|
317
|
+
**Gate 5 Output:**
|
|
318
|
+
- PR created with full description
|
|
319
|
+
- Peer reviewer APPROVED
|
|
320
|
+
- Merged into main/develop
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Workflow by Task Type
|
|
325
|
+
|
|
326
|
+
### Bug Fix
|
|
327
|
+
```
|
|
328
|
+
Gate 1 (AI analyzes bug: root cause hypothesis + solution + impact + estimate)
|
|
329
|
+
→ Gate 2 (implementation plan: test reproduce bug → fix → verify)
|
|
330
|
+
→ Gate 3 (systematic-debugging + investigate-bug + TDD fix)
|
|
331
|
+
→ Gate 4 (verify fix + no regression)
|
|
332
|
+
→ Gate 5 (peer review + PR)
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Feature
|
|
336
|
+
```
|
|
337
|
+
Gate 1 (AI analyzes feature: architecture + solution options + impact + estimate)
|
|
338
|
+
→ Gate 2 (implementation plan: TDD task breakdown)
|
|
339
|
+
→ Gate 3 (TDD: test first, implement, subagent if complex)
|
|
340
|
+
→ Gate 4 (verify all AC done + impact check)
|
|
341
|
+
→ Gate 5 (peer review + PR)
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Investigation
|
|
345
|
+
```
|
|
346
|
+
Gate 1 (AI investigates: analyze scope, trace code, document findings + recommendations)
|
|
347
|
+
→ DEV reviews → APPROVED
|
|
348
|
+
→ DONE (no Gates 2-5, create new ticket if action needed)
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Refactor
|
|
352
|
+
```
|
|
353
|
+
Gate 1 (AI analyzes: current state, target state, impact + estimate)
|
|
354
|
+
→ Gate 2 (implementation plan: ensure tests cover behavior → refactor steps)
|
|
355
|
+
→ Gate 3 (TDD: cover behavior → refactor → tests green)
|
|
356
|
+
→ Gate 4 (verify no regressions)
|
|
357
|
+
→ Gate 5 (peer review + PR)
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Impact Analysis
|
|
361
|
+
```
|
|
362
|
+
Gate 1 (AI analyzes: dependency map, risk level, breaking changes, recommendations)
|
|
363
|
+
→ DEV reviews → APPROVED
|
|
364
|
+
→ DONE (no Gates 2-5, implementation needs a separate ticket)
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Skills Used in Workflow
|
|
370
|
+
|
|
371
|
+
| Skill | Gate | Purpose |
|
|
372
|
+
|-------|------|---------|
|
|
373
|
+
| `validate-ticket` | Gate 1 | AI reads, analyzes, asks questions, outputs requirement doc |
|
|
374
|
+
| `superpowers:brainstorming` | Gate 1 | Explore solution approaches for complex problems |
|
|
375
|
+
| `superpowers:systematic-debugging` | Gate 1 (bug) | Trace root cause hypothesis |
|
|
376
|
+
| `generate-spec` | Gate 2 | Create implementation plan |
|
|
377
|
+
| `superpowers:writing-plans` | Gate 2 | Detailed TDD task breakdown |
|
|
378
|
+
| `investigate-bug` | Gate 3 (bug) | Trace data flow per framework |
|
|
379
|
+
| `superpowers:test-driven-development` | Gate 3 | TDD workflow |
|
|
380
|
+
| `superpowers:subagent-driven-development` | Gate 3 (complex) | Parallel implementation |
|
|
381
|
+
| `review-plan` | Gate 4 | Orchestrate self-review |
|
|
382
|
+
| `superpowers:verification-before-completion` | Gate 4 | Verify tests pass |
|
|
383
|
+
| `impact-analysis` | Gate 4 | Check breaking changes |
|
|
384
|
+
| `superpowers:requesting-code-review` | Gate 5 | Peer review workflow |
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Commands Reference
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
# Setup (once per project)
|
|
392
|
+
aiflow init --framework spring-boot --adapter backlog
|
|
393
|
+
|
|
394
|
+
# Per task (2 commands only)
|
|
395
|
+
aiflow use PROJ-33 # load ticket context
|
|
396
|
+
claude # AI auto-starts Gate 1
|
|
397
|
+
|
|
398
|
+
# Optional: generate prompt for Claude Desktop/Web
|
|
399
|
+
aiflow prompt bug-fix # generate prompt to paste
|
|
400
|
+
aiflow prompt feature --output p.md # save prompt to file
|
|
401
|
+
|
|
402
|
+
# Utilities
|
|
403
|
+
aiflow context show # view active context
|
|
404
|
+
aiflow memory save "key" "value" # save team knowledge
|
|
405
|
+
aiflow doctor # health check
|
|
406
|
+
aiflow guide # view quickstart guide
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## FAQ
|
|
412
|
+
|
|
413
|
+
**Q: PM didn't write enough on the ticket, what happens?**
|
|
414
|
+
A: AI at Gate 1 will read what's available, then ask clarifying questions one at a time until the requirement is clear enough to propose a solution.
|
|
415
|
+
|
|
416
|
+
**Q: Does AI just check format or actually understand the requirement?**
|
|
417
|
+
A: AI actively reads source code, traces data flow, identifies related files, and proposes solutions. It asks questions based on what it finds in the code — not just checking if fields exist.
|
|
418
|
+
|
|
419
|
+
**Q: Can I skip Gate 2 for simple tasks?**
|
|
420
|
+
A: No. Gate 2 can be brief (simple plan), but DEV must still type "APPROVED" to confirm the approach.
|
|
421
|
+
|
|
422
|
+
**Q: AI reports test failures at Gate 4, what to do?**
|
|
423
|
+
A: AI will try to fix them before showing DEV. If it can't, it will report the reason and ask for DEV's support.
|
|
424
|
+
|
|
425
|
+
**Q: What's the difference between a requirement bug and a coding bug?**
|
|
426
|
+
A: Requirement bug = wrong/missing in requirement doc → back to Gate 1. Coding bug = wrong code but correct requirement → fix at Gate 4.
|
|
427
|
+
|
|
428
|
+
**Q: Who performs peer review (Gate 5)?**
|
|
429
|
+
A: Another developer in the team. Not the code author. The reviewer uses the `superpowers:receiving-code-review` skill.
|
|
430
|
+
|
|
431
|
+
**Q: How does AI estimate effort?**
|
|
432
|
+
A: AI analyzes the scope of changes (files affected, complexity, test requirements) and categorizes: S (< 1h), M (1-4h), L (4-8h), XL (8h+, should split).
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **ai-flow-kit** will be documented in this file.
|
|
4
|
+
|
|
5
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
> Changes that are merged but not yet released.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [0.0.1] - 2026-04-13 — Initial Release
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
#### CLI (`aiflow`)
|
|
21
|
+
- `aiflow init` — scaffold AI workflow config into any project
|
|
22
|
+
(supports `--framework` spring-boot/reactjs, `--adapter` jira/backlog)
|
|
23
|
+
- `aiflow use <skill>` — activate a custom skill in the current project
|
|
24
|
+
- `aiflow remove` — cleanly remove `ai-flow-kit` scaffolding from a project
|
|
25
|
+
- `aiflow guide` — interactive onboarding guide
|
|
26
|
+
- `aiflow update` — sync upstream skill/hook updates
|
|
27
|
+
- `aiflow doctor` — validate config, detect missing keys, report issues
|
|
28
|
+
- `aiflow --version` — print installed version
|
|
29
|
+
|
|
30
|
+
#### 5-Gate AI Workflow
|
|
31
|
+
- **Gate 1 — AI Analyze Requirement**: Auto-starts when a ticket context exists
|
|
32
|
+
in `.claude/context/current.json`; outputs `plan/[ticket-id]/requirement.md`
|
|
33
|
+
- **Gate 2 — Implementation Plan**: TDD plan generation, gated by `APPROVED`
|
|
34
|
+
- **Gate 3 — Code Generation**: TDD-only, test-first discipline enforced
|
|
35
|
+
- **Gate 4 — AI Self-Review**: Verification + impact analysis + checklist, gated by `APPROVED`
|
|
36
|
+
- **Gate 5 — Peer Review & PR**: Guided PR creation via `requesting-code-review` skill
|
|
37
|
+
|
|
38
|
+
#### Custom Skills (7 skills)
|
|
39
|
+
- `validate-ticket` — Gate 1 requirement analysis with clarifying Q&A loop
|
|
40
|
+
- `generate-spec` — Gate 2 TDD implementation spec generator
|
|
41
|
+
- `impact-analysis` — breaking-change and dependency impact assessment
|
|
42
|
+
- `investigate-bug` — systematic bug investigation (reproduce → root cause → fix)
|
|
43
|
+
- `report-customer` — customer-facing incident report generator
|
|
44
|
+
- `review-plan` — Gate 4 self-review orchestrator
|
|
45
|
+
- `figma-to-component` — Figma design → UI component code generator
|
|
46
|
+
|
|
47
|
+
#### Multi-AI Support
|
|
48
|
+
- **Claude Code** integration via `CLAUDE.md` + `.claude/` directory structure
|
|
49
|
+
- **Gemini CLI** integration via `GEMINI.md`
|
|
50
|
+
- **GitHub Copilot** integration via agents config
|
|
51
|
+
- Superpowers skill library bundled as `upstream/` (pinned to v5.0.5)
|
|
52
|
+
|
|
53
|
+
#### Project Templates
|
|
54
|
+
- `AIFLOW.md` — team workflow reference document
|
|
55
|
+
- `QUICK_START.md` — 5-minute setup guide
|
|
56
|
+
- `CONTRIBUTING.md` — contributor guide
|
|
57
|
+
- `.aiflowrc.json.example` — configuration file reference
|
|
58
|
+
|
|
59
|
+
### Architecture Notes
|
|
60
|
+
- Stateless per-ticket design — no persistent memory across sessions (planned: v0.1.x)
|
|
61
|
+
- Manual skill sync model via `aiflow use` (managed `aiflow skill` CLI planned: v0.1.x)
|
|
62
|
+
- Spring Boot (Java 17+) used as the reference framework in `CLAUDE.md` coding rules
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## How to upgrade
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install -g ai-flow-kit@latest
|
|
70
|
+
aiflow --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
After upgrading, run `aiflow update` inside your project to sync the latest skills and hooks:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd your-project
|
|
77
|
+
aiflow update
|
|
78
|
+
```
|