@relipa/ai-flow-kit 0.0.4-beta.3 → 0.0.5-beta.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.
Files changed (39) hide show
  1. package/README.md +10 -4
  2. package/bin/aiflow.js +77 -7
  3. package/custom/templates/laravel.md +15 -15
  4. package/custom/templates/nestjs.md +72 -72
  5. package/custom/templates/nextjs.md +14 -14
  6. package/custom/templates/nodejs-express.md +73 -73
  7. package/custom/templates/python-django.md +71 -71
  8. package/custom/templates/python-fastapi.md +54 -54
  9. package/custom/templates/reactjs.md +492 -492
  10. package/custom/templates/shared/gate-workflow.md +88 -75
  11. package/custom/templates/spring-boot.md +523 -523
  12. package/custom/templates/tools/claude.md +13 -0
  13. package/custom/templates/tools/copilot.md +12 -8
  14. package/custom/templates/tools/cursor.md +12 -8
  15. package/custom/templates/tools/gemini.md +12 -8
  16. package/custom/templates/tools/generic.md +17 -12
  17. package/custom/templates/vue-nuxt.md +14 -14
  18. package/{AIFLOW.md → docs/AIFLOW.md} +5 -0
  19. package/{CHANGELOG.md → docs/CHANGELOG.md} +41 -5
  20. package/{IMPLEMENTATION_SUMMARY.md → docs/IMPLEMENTATION_SUMMARY.md} +21 -39
  21. package/{QUICK_START.md → docs/QUICK_START.md} +8 -8
  22. package/docs/ai-integration.md +53 -53
  23. package/docs/architecture.md +4 -5
  24. package/docs/cli-reference.md +97 -27
  25. package/docs/developer-overview.md +126 -126
  26. package/docs/troubleshooting.md +15 -0
  27. package/package.json +6 -11
  28. package/scripts/guide.js +16 -0
  29. package/scripts/hooks/session-start.js +5 -1
  30. package/scripts/init.js +518 -460
  31. package/scripts/telemetry/cli.js +249 -0
  32. package/scripts/telemetry/config.js +94 -0
  33. package/scripts/telemetry/crypto.js +20 -0
  34. package/scripts/telemetry/flush.js +159 -0
  35. package/scripts/telemetry/record.js +138 -0
  36. package/scripts/use.js +594 -594
  37. package/upstream/skills/using-superpowers/SKILL.md +14 -0
  38. package/CONTRIBUTING.md +0 -388
  39. package/upstream/tests/brainstorm-server/package-lock.json +0 -36
@@ -1,75 +1,88 @@
1
- ## MANDATORY: Strict Gate Workflow
2
-
3
- > **Absolute Rule: Complete Gate N before entering Gate N+1.**
4
- > **Do not skip, shorten, or merge Gates.**
5
-
6
- You have superpowers. When a ticket context exists in `.aiflow/context/current.json`:
7
- - **AUTO-START Gate 1 immediately** do NOT wait for the developer to ask.
8
- - Read instructions and follow the gate sequence below NO EXCEPTIONS.
9
-
10
- ---
11
-
12
- ### GATE 1 — AI Analyze Requirement (auto-start)
13
-
14
- **INVOKE:** `validate-ticket` skill
15
-
16
- AI actively reads ticket + source code to understand the requirement:
17
- 1. Read `.aiflow/context/current.json` ticket info
18
- 2. Read source code architecture, related files, data flow
19
- 3. If anything is unclear ask ONE question at a time, wait for reply
20
- 4. Output `plan/[ticket-id]/requirement.md` with:
21
- - Requirements summary, source code analysis
22
- - Proposed solution and approach
23
- - Impact analysis, effort estimate, testing plan
24
- 5. Display "GATE 1: Requirement doc ready" → wait for **APPROVED**
25
-
26
- > [!TIP]
27
- > If auto-start doesn't trigger, the developer can start this gate by typing: **"start"**, **"Gate 1"** or **"Analyze ticket"**.
28
-
29
- DO NOT just check format — **understand the content and propose solutions**.
30
-
31
- ---
32
-
33
- ### GATE 2 — Implementation Plan (wait for APPROVED)
34
-
35
- **INVOKE:** `generate-spec` skill, then `superpowers:writing-plans`
36
-
37
- - Create a detailed TDD implementation plan based on the approved requirement.
38
- - Display: "GATE 2 PAUSED: type APPROVED to start coding".
39
- - CODE WILL NOT BE GENERATED until "APPROVED" is received.
40
-
41
- ---
42
-
43
- ### GATE 3 — Code Generation (TDD only)
44
-
45
- Only runs after Gate 2 has been APPROVED.
46
-
47
- **INVOKE:** `superpowers:test-driven-development`
48
- - Complex feature (3+ files): `superpowers:subagent-driven-development`
49
- - Write tests FIRST run to confirm FAIL -> implement -> PASS.
50
- - Bug fix EXTRA: `superpowers:systematic-debugging` + `investigate-bug` skill first.
51
-
52
- ---
53
-
54
- ### GATE 4 AI Self-Review (wait for APPROVED)
55
-
56
- **INVOKE:** `review-plan` skill
57
-
58
- Mandatory order:
59
- 1. `superpowers:verification-before-completion` — all tests must PASS
60
- 2. `impact-analysis` skill — check for breaking changes
61
- 3. Tick `custom/rules/review-checklist.md`
62
- 4. Create `plan/[ticket-id]/summary.md`
63
-
64
- Then: "GATE 4 PAUSED: type APPROVED or BUG: [description]"
65
- - Coding bug -> fix -> repeat Gate 4.
66
- - Requirement bug -> return to Gate 1.
67
-
68
- ---
69
-
70
- ### GATE 5 — Peer Review and Done
71
-
72
- Only runs after Gate 4 has been APPROVED.
73
-
74
- **INVOKE:** `superpowers:requesting-code-review`
75
- Guide on creating a Pull Request with the ticket link.
1
+ ## MANDATORY: Strict Gate Workflow
2
+
3
+ > **Absolute Rule: Complete Gate N before entering Gate N+1.**
4
+ > **Do not skip, shorten, or merge Gates.**
5
+
6
+ You have superpowers. When a ticket context exists in `.aiflow/context/current.json`:
7
+ - **Consult the "AI Skill Registry"** below to find instructions for each skill (`SKILL.md`).
8
+ - **AUTO-START Gate 1 immediately** do NOT wait for the developer to ask.
9
+ - Read instructions and follow the gate sequence below — NO EXCEPTIONS.
10
+
11
+ ---
12
+
13
+ ### GATE 1 — AI Analyze Requirement (auto-start)
14
+
15
+ **INVOKE:** `validate-ticket` skill
16
+
17
+ AI actively reads ticket + source code to understand the requirement:
18
+ 1. Read `.aiflow/context/current.json`ticket info
19
+ 2. Read source codearchitecture, related files, data flow
20
+ 3. If anything is unclear — ask ONE question at a time, wait for reply
21
+ 4. Output `plan/[ticket-id]/requirement.md` with:
22
+ - Requirements summary, source code analysis
23
+ - Proposed solution and approach
24
+ - Impact analysis, effort estimate, testing plan
25
+ 5. Display "GATE 1: Requirement doc ready" → wait for **APPROVED**
26
+
27
+ > **Tip:** If auto-start doesn't trigger, the developer can start this gate by typing: **"start"**, **"Gate 1"** or **"Analyze ticket"**.
28
+
29
+ DO NOT just check format — **understand the content and propose solutions**.
30
+
31
+ > **Telemetry:** Run `aiflow gate 1 start --ticket [ticket-id]` when starting this gate (auto-start or when developer types "start"/"Gate 1").
32
+ > Run `aiflow gate 1 approved --ticket [ticket-id]` immediately when APPROVED is received.
33
+
34
+ ---
35
+
36
+ ### GATE 2 — Implementation Plan (wait for APPROVED)
37
+
38
+ **INVOKE:** `generate-spec` skill, then `superpowers:writing-plans`
39
+
40
+ - Create a detailed TDD implementation plan based on the approved requirement.
41
+ - Display: "GATE 2 PAUSED: type APPROVED to start coding".
42
+ - CODE WILL NOT BE GENERATED until "APPROVED" is received.
43
+
44
+ > **Telemetry:** Run `aiflow gate 2 start --ticket [ticket-id]` when starting this gate.
45
+ > Run `aiflow gate 2 approved --ticket [ticket-id]` immediately when APPROVED is received.
46
+
47
+ ---
48
+
49
+ ### GATE 3Code Generation (TDD only)
50
+
51
+ Only runs after Gate 2 has been APPROVED.
52
+
53
+ **INVOKE:** `superpowers:test-driven-development`
54
+ - Complex feature (3+ files): `superpowers:subagent-driven-development`
55
+ - Write tests FIRST — run to confirm FAIL -> implement -> PASS.
56
+ - Bug fix EXTRA: `superpowers:systematic-debugging` + `investigate-bug` skill first.
57
+
58
+ > **Telemetry:** Run `aiflow gate 3 start --ticket [ticket-id]` when starting this gate.
59
+
60
+ ---
61
+
62
+ ### GATE 4 AI Self-Review (wait for APPROVED)
63
+
64
+ **INVOKE:** `review-plan` skill
65
+
66
+ Mandatory order:
67
+ 1. `superpowers:verification-before-completion` — all tests must PASS
68
+ 2. `impact-analysis` skill — check for breaking changes
69
+ 3. Tick `custom/rules/review-checklist.md`
70
+ 4. Create `plan/[ticket-id]/summary.md`
71
+
72
+ Then: "GATE 4 PAUSED: type APPROVED or BUG: [description]"
73
+ - Coding bug -> fix -> repeat Gate 4.
74
+ - Requirement bug -> return to Gate 1.
75
+
76
+ > **Telemetry:** Run `aiflow gate 4 start --ticket [ticket-id]` when starting this gate.
77
+ > Run `aiflow gate 4 approved --ticket [ticket-id]` immediately when APPROVED is received.
78
+
79
+ ---
80
+
81
+ ### GATE 5 — Peer Review and Done
82
+
83
+ Only runs after Gate 4 has been APPROVED.
84
+
85
+ **INVOKE:** `superpowers:requesting-code-review`
86
+ Guide on creating a Pull Request with the ticket link.
87
+
88
+ > **Telemetry:** Run `aiflow gate 5 start --ticket [ticket-id]` when starting this gate.