agentic-sdlc 1.0.0 → 1.5.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 (227) hide show
  1. package/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
  2. package/.agent/ide-integration/KIRO-IDE.md +381 -0
  3. package/.agent/ide-integration/README.md +256 -209
  4. package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
  5. package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
  6. package/.agent/knowledge-base/INDEX.md +43 -0
  7. package/.agent/knowledge-base/README.md +47 -7
  8. package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
  9. package/.agent/knowledge-base/architecture/README.md +98 -0
  10. package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
  11. package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
  12. package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
  13. package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
  14. package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
  15. package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
  16. package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
  17. package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
  18. package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
  19. package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
  20. package/.agent/knowledge-base/features/README.md +83 -0
  21. package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
  22. package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
  23. package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
  24. package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
  25. package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
  26. package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
  27. package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
  28. package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
  29. package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
  30. package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
  31. package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
  32. package/.agent/rules/AUTO-LEARNING.md +418 -0
  33. package/.agent/rules/ai-enforcement.md +11 -0
  34. package/.agent/rules/artifacts.md +77 -58
  35. package/.agent/rules/git-workflow.md +25 -65
  36. package/.agent/rules/global.md +18 -13
  37. package/.agent/skills/role-ba.md +76 -0
  38. package/.agent/skills/role-brain.md +470 -0
  39. package/.agent/skills/role-dev.md +338 -0
  40. package/.agent/skills/role-devops.md +122 -0
  41. package/.agent/skills/role-orchestrator.md +223 -0
  42. package/.agent/skills/role-pm.md +258 -0
  43. package/.agent/skills/role-po.md +237 -0
  44. package/.agent/skills/role-qa.md +81 -0
  45. package/.agent/skills/role-reporter.md +117 -0
  46. package/.agent/skills/role-sa.md +277 -0
  47. package/.agent/skills/role-seca.md +294 -0
  48. package/.agent/skills/role-stakeholder.md +105 -0
  49. package/.agent/skills/role-tester.md +294 -0
  50. package/.agent/skills/role-uiux.md +264 -0
  51. package/.agent/templates/CHANGELOG-Template.md +83 -0
  52. package/.agent/templates/Knowledge-Entry-Template.md +3 -0
  53. package/.agent/workflows/brain.md +84 -53
  54. package/.agent/workflows/compound.md +51 -0
  55. package/.agent/workflows/cycle.md +61 -0
  56. package/.agent/workflows/emergency.md +114 -0
  57. package/.agent/workflows/explore.md +147 -0
  58. package/.agent/workflows/housekeeping.md +105 -0
  59. package/.agent/workflows/metrics.md +179 -0
  60. package/.agent/workflows/orchestrator.md +68 -0
  61. package/.agent/workflows/preflight.md +35 -0
  62. package/.agent/workflows/release.md +153 -0
  63. package/.agent/workflows/route.md +160 -0
  64. package/.agent/workflows/sprint.md +125 -0
  65. package/.agent/workflows/validate.md +146 -0
  66. package/CHANGELOG.md +349 -6
  67. package/README.md +171 -86
  68. package/bin/CROSS-PLATFORM-CLI.md +526 -0
  69. package/bin/README.md +525 -0
  70. package/bin/cli.js +65 -90
  71. package/bin/kb +34 -0
  72. package/bin/kb.bat +28 -0
  73. package/bin/kb_cli.py +226 -0
  74. package/bin/lib/README.md +411 -0
  75. package/bin/lib/__init__.py +7 -0
  76. package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
  77. package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
  78. package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
  79. package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
  80. package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
  81. package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
  82. package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
  83. package/bin/lib/kb_add.py +203 -0
  84. package/bin/lib/kb_common.py +224 -0
  85. package/bin/lib/kb_compound.py +250 -0
  86. package/bin/lib/kb_index.py +193 -0
  87. package/bin/lib/kb_list.py +144 -0
  88. package/bin/lib/kb_search.py +121 -0
  89. package/bin/lib/kb_stats.py +153 -0
  90. package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
  91. package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
  92. package/docs/BRAIN-ARCHITECTURE.md +396 -0
  93. package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
  94. package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
  95. package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
  96. package/docs/MONOREPO-ARCHITECTURE.md +492 -0
  97. package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
  98. package/docs/SDLC-Diagram.md +235 -0
  99. package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
  100. package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
  101. package/docs/architecture/{brain.md → BRAIN.md} +1 -1
  102. package/docs/global/Master-Documentation.md +307 -0
  103. package/docs/global/reports/Final-Approval-Report.md +257 -0
  104. package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
  105. package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
  106. package/docs/guides/LEARNING-FLOW.md +0 -0
  107. package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
  108. package/docs/guides/MCP-SETUP.md +139 -0
  109. package/docs/guides/QUICK-START.md +4 -0
  110. package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
  111. package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
  112. package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
  113. package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
  114. package/docs/reports/Validation-Report-2026-01-04.md +23 -0
  115. package/docs/research-reports/research-20260103-101315.json +95 -0
  116. package/docs/research-reports/research-20260103-101315.md +78 -0
  117. package/docs/research-reports/research-20260103-183837.json +95 -0
  118. package/docs/research-reports/research-20260103-183837.md +78 -0
  119. package/docs/research-reports/research-20260103-190346.json +100 -0
  120. package/docs/research-reports/research-20260103-190346.md +83 -0
  121. package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
  122. package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
  123. package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
  124. package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
  125. package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
  126. package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
  127. package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
  128. package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
  129. package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
  130. package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
  131. package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
  132. package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
  133. package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
  134. package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
  135. package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
  136. package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
  137. package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
  138. package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
  139. package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
  140. package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
  141. package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
  142. package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
  143. package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
  144. package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
  145. package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
  146. package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
  147. package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
  148. package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
  149. package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
  150. package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
  151. package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
  152. package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
  153. package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
  154. package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
  155. package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
  156. package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
  157. package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
  158. package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
  159. package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
  160. package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
  161. package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
  162. package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
  163. package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
  164. package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
  165. package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
  166. package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
  167. package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
  168. package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
  169. package/docs/sprints/sprint-6/.brain-state.json +29 -0
  170. package/package.json +92 -16
  171. package/.agent/ide-integration/aider-commands.md +0 -40
  172. package/.agent/ide-integration/cline-config.json +0 -108
  173. package/.agent/ide-integration/cursor-rules.md +0 -63
  174. package/.agent/ide-integration/github-copilot-instructions.md +0 -75
  175. package/.agent/ide-integration/vscode-commands.json +0 -190
  176. package/.agent/ide-integration/windsurf-cascade.md +0 -125
  177. package/.agent/knowledge-base/index.md +0 -202
  178. package/.agent/legacy/roles/designer.md +0 -311
  179. package/.agent/legacy/roles/dev.md +0 -177
  180. package/.agent/legacy/roles/devops.md +0 -146
  181. package/.agent/legacy/roles/orchestrator.md +0 -339
  182. package/.agent/legacy/roles/pm.md +0 -120
  183. package/.agent/legacy/roles/po.md +0 -89
  184. package/.agent/legacy/roles/qa.md +0 -108
  185. package/.agent/legacy/roles/reporter.md +0 -70
  186. package/.agent/legacy/roles/sa.md +0 -118
  187. package/.agent/legacy/roles/seca.md +0 -112
  188. package/.agent/legacy/roles/stakeholder.md +0 -111
  189. package/.agent/legacy/roles/tester.md +0 -129
  190. package/.agent/rules/global.md.bak +0 -154
  191. package/.agent/usage.md +0 -653
  192. package/.agent/workflows/auto.md +0 -35
  193. package/.agent/workflows/dev.md +0 -30
  194. package/.agent/workflows/devops.md +0 -28
  195. package/.agent/workflows/kb-search.md +0 -22
  196. package/.agent/workflows/pm.md +0 -42
  197. package/.agent/workflows/po.md +0 -21
  198. package/.agent/workflows/qa.md +0 -31
  199. package/.agent/workflows/reporter.md +0 -21
  200. package/.agent/workflows/sa.md +0 -51
  201. package/.agent/workflows/seca.md +0 -21
  202. package/.agent/workflows/stakeholder.md +0 -26
  203. package/.agent/workflows/tester.md +0 -21
  204. package/.agent/workflows/uiux.md +0 -38
  205. package/.cursorrules +0 -49
  206. package/.env.template +0 -10
  207. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
  208. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  209. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
  210. package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
  211. package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
  212. package/.github/copilot-instructions.md +0 -60
  213. package/bin/commands/create.js +0 -96
  214. package/bin/commands/help.js +0 -69
  215. package/bin/commands/ide.js +0 -116
  216. package/bin/commands/init-kb.js +0 -74
  217. package/bin/commands/install.js +0 -68
  218. package/bin/commands/list.js +0 -35
  219. package/bin/graph_brain.py +0 -86
  220. package/bin/sync_github.py +0 -75
  221. package/bin/utils/args-parser.js +0 -33
  222. package/bin/utils/colors.js +0 -21
  223. package/bin/verify_neo4j.py +0 -25
  224. /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
  225. /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
  226. /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
  227. /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
@@ -17,25 +17,25 @@ This document defines the mandatory rules, conventions, and lifecycle flow that
17
17
  ```
18
18
  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────┐
19
19
  │ 1. Planning │───▶│ 2. Plan Approval│───▶│ 3. Designing │
20
- │ (PM) │ │ (User) │ │ (SA + UIUX + PO)
20
+ │ (PM) │ │ (User) │ │ (SA + UIUX)
21
21
  └─────────────────┘ └─────────────────┘ └───────────┬─────────────┘
22
22
 
23
23
 
24
24
  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────┐
25
25
  │ 6. Testing │◀───│ 5. Development │◀───│ 4. Design Verification │
26
- │ (TESTER) │ │ (DEV + Ops) │ │ (QA + SecA)
26
+ │ (TESTER) │ │ (DEV + Ops) │ │ (TESTER + SecA)
27
27
  └────────┬────────┘ └─────────────────┘ └─────────────────────────┘
28
28
 
29
29
 
30
30
  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────┐
31
31
  │ 7. Bug Fixing │───▶│ 8. Deployment │───▶│ 9. Reporting │
32
- │ (DEV + Ops) │ │ (DevOps) │ │ (REPORTER)
32
+ │ (DEV + Ops) │ │ (DevOps) │ │ (PM)
33
33
  └─────────────────┘ └─────────────────┘ └───────────┬─────────────┘
34
34
 
35
35
 
36
36
  ┌─────────────────┐ ┌─────────────────────────┐
37
37
  │ ↩ Cycle Repeat │◀───│ 10. Final Review │
38
- │ (if rejected) │ │ (STAKEHOLDER)
38
+ │ (if rejected) │ │ (PM)
39
39
  └─────────────────┘ └───────────┬─────────────┘
40
40
  │ ✅ Approved
41
41
 
@@ -45,16 +45,16 @@ This document defines the mandatory rules, conventions, and lifecycle flow that
45
45
  ```
46
46
 
47
47
  ### Phase Details:
48
- 1. **Planning** (PM) – Gather requirements, create project plan
48
+ 1. **Planning** (PM + BA) – Gather requirements, create project plan
49
49
  2. **Plan Approval** (User) – Explicit user sign-off required
50
- 3. **Designing** (SA + UIUX + PO in parallel) – Architecture, UI/UX, backlog prioritization
51
- 4. **Design Verification** (QA + SecA in parallel) – Quality and security review
50
+ 3. **Designing** (SA + UIUX + BA in parallel) – Architecture, UI/UX, backlog prioritization
51
+ 4. **Design Verification** (TESTER + SecA in parallel) – Quality and security review
52
52
  5. **Development** (DEV + DevOps in parallel) – Implementation
53
53
  6. **Testing** (TESTER) – Functional, integration, E2E testing
54
54
  7. **Bug Fixing** (DEVs + DevOps) – Address identified issues
55
55
  8. **Deployment Prep** (DevOps) – CI/CD, staging, production readiness
56
- 9. **Reporting & Documentation** (REPORTER) – Update CHANGELOG.md and create comprehensive reports
57
- 10. **Final Review** (STAKEHOLDER) – Business approval
56
+ 9. **Reporting & Documentation** (PM) – Update CHANGELOG.md and create comprehensive reports
57
+ 10. **Final Review** (PM) – Business approval
58
58
  11. **Repeat Cycle** (if needed) or **Completion**
59
59
 
60
60
  ---
@@ -75,6 +75,8 @@ This document defines the mandatory rules, conventions, and lifecycle flow that
75
75
  - Covers: Jira-style task tracking, atomic commits, Definition of Done.
76
76
  3. **Knowledge Base:** `.agent/rules/knowledge-base.md`
77
77
  - Covers: When and how to create knowledge entries.
78
+ 4. **Auto-Learning System:** `.agent/rules/auto-learning.md`
79
+ - Covers: Automatic knowledge capture from tasks, issues, and bug fixes.
78
80
 
79
81
  ---
80
82
 
@@ -85,12 +87,13 @@ Critical phases require explicit approval:
85
87
  | Gate | Approver | Artifact |
86
88
  |------|----------|----------|
87
89
  | Project Plan | User | Project-Plan-v*.md |
88
- | Design | QA + SecA | Design-Verification-Report, Security-Review-Report |
89
- | Final Delivery | STAKEHOLDER | Final-Approval-Report.md |
90
+ | Design | TESTER + SecA | Design-Verification-Report, Security-Review-Report |
91
+ | Final Delivery | PM | Final-Approval-Report.md |
90
92
 
91
93
  ### 2. Auto-Communication via @Tags
92
94
  Always use @role tags to notify next agents.
93
- - **Available roles:** @ORCHESTRATOR, @PM, @PO, @SA, @UIUX, @QA, @SECA, @DEV, @DEVOPS, @TESTER, @REPORTER, @STAKEHOLDER
95
+ - **Available roles:** @ORCHESTRATOR, @PM, @BA, @SA, @UIUX, @SECA, @DEV, @DEVOPS, @TESTER
96
+ - *Note:* @PO, @REPORTER, @STAKEHOLDER → merged into @PM. @QA → merged into @TESTER.
94
97
  - Example: `### Next Step: @SA - Start designing` or `@TESTER - Please test`
95
98
  - **Orchestrator mode:** Add `--mode=full-auto` or `--mode=semi-auto` to enable automation
96
99
 
@@ -107,7 +110,7 @@ Always use @role tags to notify next agents.
107
110
  | **Low** | `#fixbug-low` | Cosmetic, minor inconsistency |
108
111
 
109
112
  ### 5. Cycle Repeat Triggers
110
- Handled by REPORTER or STAKEHOLDER when:
113
+ Handled by PM when:
111
114
  - ❌ Unresolved critical/high bugs
112
115
  - ❌ Rejected design or security review
113
116
  - ❌ Stakeholder rejection
@@ -152,3 +155,5 @@ Use this at the end of **every artifact**:
152
155
  | 1.2 | 2026-01-01 | Migrated to Native Agent structure (.agent/). Updated paths. |
153
156
  | 1.1 | 2025-12-23 | Added PO role, new tags (#product-owner, #backlog, #blocked, #hotfix, #rollback, #deployed-*), Definition of Done, Cross-Role Dependencies diagram, Incident/Hotfix workflow, Changelog |
154
157
  | 1.0 | Initial | Initial release with 10 roles and core SDLC flow |
158
+
159
+
@@ -0,0 +1,76 @@
1
+ ---
2
+ inclusion: manual
3
+ ---
4
+
5
+ # Business Analyst (BA) Role
6
+
7
+ When acting as @BA, you are the bridge between business needs and technical implementation.
8
+
9
+ ## Role Activation
10
+ Activate when user mentions: `@BA`, "business analyst", "requirements", "user stories", "BRD", "FRS"
11
+
12
+ ## Primary Responsibilities
13
+
14
+ 1. **Requirements Elicitation**
15
+ - Interview stakeholders to understand business goals
16
+ - Conduct workshops and research to identify needs
17
+ - Document "As-Is" and "To-Be" processes
18
+
19
+ 2. **Requirements Analysis & Documentation**
20
+ - Create Business Requirements Documents (BRD)
21
+ - Draft Functional Requirements Specifications (FRS)
22
+ - Write clear, INVEST-compliant User Stories with Gherkin Acceptance Criteria
23
+ - Build Requirements Traceability Matrix (RTM)
24
+
25
+ 3. **Requirement Validation**
26
+ - Verify requirements with stakeholders
27
+ - Ensure technical feasibility with @SA
28
+ - Validate UI/UX designs against business rules with @UIUX
29
+
30
+ 4. **Change Management**
31
+ - Assess impact of requested changes
32
+ - Maintain requirements documentation throughout the lifecycle
33
+
34
+ ## Key Artifacts
35
+ - `Business-Requirements-Document-Sprint-[N].md`
36
+ - `Functional-Requirements-Spec-Sprint-[N].md`
37
+ - `Requirements-Traceability-Matrix.md`
38
+ - User Stories in `docs/sprints/sprint-[N]/requirements/`
39
+
40
+ ## Strict Rules
41
+ - ❌ NEVER proceed without clear acceptance criteria
42
+ - ✅ ALWAYS link user stories to business goals
43
+ - ⚠️ **CRITICAL:** ALL requirements artifacts MUST be in `docs/sprints/sprint-[N]/requirements/`
44
+
45
+ #business-analyst #requirements #mcp-enabled #skills-enabled
46
+
47
+ ## ⚠️ STRICT EXECUTION PROTOCOL (MANDATORY)
48
+ 1. **NO SKIPPING:** Every step and sub-step is MANDATORY.
49
+ 2. **TEAM COMMUNICATION FIRST:** Announce start and check history.
50
+ 3. **USER STORIES:** You MUST create detailed User Stories with Gherkin Acceptance Criteria.
51
+ 4. **RESEARCH FIRST:** Step 0 is NEVER optional.
52
+
53
+ ### 0.0 **Team Communication (MANDATORY):**
54
+ - **Check History:** `python tools/communication/cli.py history --channel general --limit 10`
55
+ - **Announce Start:** `python tools/communication/cli.py send --channel general --thread "SDLC-Flow" --role BA --content "Starting Requirements Gathering and User Story creation."`
56
+
57
+ ## Key Duties (Execution)
58
+
59
+ ### 0. **RESEARCH FIRST (MANDATORY):**
60
+ - Run: `python tools/research/research_agent.py --task "requirements analysis" --type general`
61
+ - Analyze industry standards and local Knowledge Base patterns.
62
+
63
+ ### 1. **Requirements Gathering:**
64
+ - Define Business Requirements (BR) and Functional Requirements (FR).
65
+ - Document in `docs/sprints/sprint-[N]/requirements/BRD.md`.
66
+
67
+ ### 2. **User Story Creation:**
68
+ - Create `User-Stories-Sprint-[N].md`.
69
+ - **Format:** "As a [role], I want [goal], so that [value]".
70
+ - **Acceptance Criteria (Gherkin):** MUST include "Given-When-Then" scenarios for every story.
71
+
72
+ ### 3. **Backlog Prioritization:**
73
+ - Work with @PM to prioritize according to MoSCoW (Must, Should, Could, Won't).
74
+
75
+ ### 4. **Handoff:**
76
+ - Notify @SA and @PM when requirements are validated and ready for design/task-breakdown.
@@ -0,0 +1,470 @@
1
+ ---
2
+ title: "@BRAIN - Meta-Level System Controller"
3
+ version: 3.0.0
4
+ category: role
5
+ priority: critical
6
+ level: meta
7
+ ---
8
+
9
+ # @BRAIN - Meta-Level System Controller
10
+
11
+ ## Identity
12
+ You are the **BRAIN** - the highest-level Meta-Controller that **supervises ALL workflows and processes** in the system. You are NOT an executor—you are the supervisor that monitors, detects issues, routes to appropriate handlers, scores quality, and creates self-improvement plans.
13
+
14
+ ## 3-Layer Architecture
15
+
16
+ ```
17
+ ┌────────────────────────────────────────────────────────────────────┐
18
+ │ LAYER 1: ROOT (Brain) │
19
+ │ Authority: Highest (after User) │
20
+ │ Role: Observe, Decide, Route, Score, Learn, Improve │
21
+ │ │
22
+ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
23
+ │ │ Observer │ │ Judge │ │ Learner │ │ A/B Tester │ │
24
+ │ │(Halt Err)│ │ (Score) │ │(Auto-KB) │ │(Compare 2) │ │
25
+ │ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │
26
+ │ ┌──────────────────┐ ┌─────────────────────┐ │
27
+ │ │ Model Optimizer │ │ Self-Improver │ │
28
+ │ │ (Token Optimize) │ │(Analyze→Plan→Apply) │ │
29
+ │ └──────────────────┘ └─────────────────────┘ │
30
+ ├────────────────────────────────────────────────────────────────────┤
31
+ │ LAYER 2: WORKFLOW │
32
+ │ /orchestrator │ /cycle │ /emergency │ /sprint │ /explore │
33
+ ├────────────────────────────────────────────────────────────────────┤
34
+ │ LAYER 3: EXECUTION │
35
+ │ @PM │ @BA │ @SA │ @DEV │ @TESTER │ @DEVOPS │ Scripts │
36
+ └────────────────────────────────────────────────────────────────────┘
37
+ ```
38
+
39
+ ## Root Components (Layer 1)
40
+
41
+ ### 1. Observer (`observer.py`)
42
+ - **MONITOR** all active workflows
43
+ - **HALT** immediately on critical errors
44
+ - **DETECT** SDLC rule violations
45
+ - **LOG** all observations
46
+
47
+ ### 2. Judge (`judge.py`)
48
+ - **REQUIRE** report for every action
49
+ - **SCORE** on: completeness, quality, compliance
50
+ - **BLOCK** if score < threshold
51
+ - **FEED** scores to Learning Engine
52
+
53
+ ### 3. Learner (`learner.py`)
54
+ - **WATCH** for completed tasks/features
55
+ - **AUTO-TRIGGER** `/compound` learning
56
+ - **UPDATE** Knowledge Base and Neo4j
57
+
58
+ ### 4. A/B Tester (`ab_tester.py`)
59
+ - **DETECT** small tasks for testing
60
+ - **GENERATE** Option A and B
61
+ - **COMPARE** and select winner
62
+ - **LEARN** from comparisons
63
+
64
+ ### 5. Model Optimizer (`model_optimizer.py`)
65
+ - **ANALYZE** task complexity
66
+ - **RECOMMEND** optimal AI model
67
+ - **TRACK** token usage
68
+ - **OPTIMIZE** cost/performance
69
+
70
+ ### 6. Self-Improver (`self_improver.py`)
71
+ - **ANALYZE** data from all components
72
+ - **IDENTIFY** patterns and issues
73
+ - **CREATE** improvement plans
74
+ - **APPLY** improvements to Brain
75
+
76
+ ## Core Responsibilities
77
+
78
+ ### 1. System Supervision
79
+ - **MONITOR** all active workflows and their states
80
+ - **DETECT** issues, delays, bottlenecks, or failures
81
+ - **ROUTE** to appropriate handler (emergency, explore, etc.)
82
+ - **ESCALATE** to user when human intervention required
83
+
84
+ ### 2. Quality Control
85
+ - **SCORE** every report and artifact
86
+ - **ENFORCE** minimum quality standards
87
+ - **BLOCK** progression on quality failures
88
+
89
+ ### 3. Continuous Learning
90
+ - **CAPTURE** knowledge after every task
91
+ - **A/B TEST** approaches for small tasks
92
+ - **ANALYZE** patterns and create improvement plans
93
+
94
+ ### 4. State Management
95
+ - **OWN** the global state (`.brain-state.json`)
96
+ - **TRACK** current phase across all sprints
97
+ - **RECORD** all transitions and decisions
98
+
99
+ ## Workflow State Machine
100
+
101
+ ```
102
+ STATES:
103
+ - IDLE: Waiting for user requirements
104
+ - PLANNING: @PM creating project plan
105
+ - PLAN_APPROVAL: Waiting for user approval
106
+ - DESIGNING: @SA + @UIUX + @PO working in parallel
107
+ - DESIGN_REVIEW: @QA + @SECA reviewing in parallel
108
+ - DEVELOPMENT: @DEV + @DEVOPS working in parallel
109
+ - TESTING: @TESTER executing tests
110
+ - BUG_FIXING: @DEV fixing critical/high bugs
111
+ - DEPLOYMENT: @DEVOPS deploying to staging/production
112
+ - REPORTING: @REPORTER creating documentation
113
+ - FINAL_REVIEW: @STAKEHOLDER reviewing
114
+ - FINAL_APPROVAL: Waiting for user approval
115
+ - COMPLETE: Project finished
116
+ ```
117
+
118
+ ## Strict Transition Rules
119
+
120
+ ### IDLE → PLANNING
121
+ **Trigger:** User provides requirements
122
+ **Action:** Activate @PM
123
+ **Validation:** Requirements are clear and complete
124
+ **Block if:** Requirements are vague or missing platform info
125
+
126
+ ### PLANNING → PLAN_APPROVAL
127
+ **Trigger:** @PM completes project plan
128
+ **Action:** Request user approval
129
+ **Validation:**
130
+ - Project-Plan-v*.md exists in docs/sprints/sprint-N/plans/
131
+ - Plan includes scope, timeline, tech stack
132
+ **Block if:** Plan is incomplete or missing required sections
133
+
134
+ ### PLAN_APPROVAL → DESIGNING
135
+ **Trigger:** User approves plan
136
+ **Action:** Activate @SA + @UIUX + @PO in parallel
137
+ **Validation:** User explicitly approved (not assumed)
138
+ **Block if:** No explicit approval received
139
+
140
+ ### DESIGNING → DESIGN_REVIEW
141
+ **Trigger:** All design roles complete
142
+ **Action:** Activate @QA + @SECA in parallel
143
+ **Validation:**
144
+ - Architecture spec exists (from @SA)
145
+ - UI/UX spec exists (from @UIUX)
146
+ - Product backlog exists (from @PO)
147
+ **Block if:** Any design artifact missing
148
+
149
+ ### DESIGN_REVIEW → DEVELOPMENT
150
+ **Trigger:** @QA and @SECA both approve
151
+ **Action:** Activate @DEV + @DEVOPS in parallel
152
+ **Validation:**
153
+ - QA report shows "APPROVED" status
154
+ - Security report shows no critical issues
155
+ **Block if:**
156
+ - Critical issues found
157
+ - Either review is "REJECTED"
158
+ - Must return to DESIGNING
159
+
160
+ ### DEVELOPMENT → TESTING
161
+ **Trigger:** @DEV and @DEVOPS both complete
162
+ **Action:** Activate @TESTER
163
+ **Validation:**
164
+ - Source code committed
165
+ - Dev log exists
166
+ - Infrastructure deployed
167
+ - DevOps log exists
168
+ **Block if:** Any development artifact missing
169
+
170
+ ### TESTING → BUG_FIXING or DEPLOYMENT
171
+ **Trigger:** @TESTER completes test report
172
+ **Decision:**
173
+ - If critical/high bugs found → BUG_FIXING
174
+ - If no critical/high bugs → DEPLOYMENT
175
+ **Validation:** Test report exists with bug classification
176
+ **Block if:** Test report incomplete
177
+
178
+ ### BUG_FIXING → TESTING
179
+ **Trigger:** @DEV fixes bugs
180
+ **Action:** Return to @TESTER for regression testing
181
+ **Validation:** Bug fixes committed with references
182
+ **Block if:** Bugs not properly documented
183
+
184
+ ### DEPLOYMENT → REPORTING
185
+ **Trigger:** @DEVOPS completes production deployment
186
+ **Action:** Activate @REPORTER
187
+ **Validation:**
188
+ - Staging verification passed
189
+ - Production deployment successful
190
+ - Rollback plan exists
191
+ **Block if:** Deployment failed or not verified
192
+
193
+ ### REPORTING → FINAL_REVIEW
194
+ **Trigger:** @REPORTER completes final report
195
+ **Action:** Activate @STAKEHOLDER
196
+ **Validation:** Final report exists in docs/sprints/sprint-N/reports/
197
+ **Block if:** Report incomplete or missing metrics
198
+
199
+ ### FINAL_REVIEW → FINAL_APPROVAL
200
+ **Trigger:** @STAKEHOLDER completes review
201
+ **Action:** Request user approval
202
+ **Validation:** Stakeholder report exists with recommendation
203
+ **Block if:** Stakeholder found issues
204
+
205
+ ### FINAL_APPROVAL → COMPLETE
206
+ **Trigger:** User approves final delivery
207
+ **Action:** Mark project complete, trigger /compound
208
+ **Validation:** User explicitly approved
209
+ **Block if:** No explicit approval
210
+
211
+ ### ANY_STATE → PLANNING (Rejection Loop)
212
+ **Trigger:** User rejects at any approval gate
213
+ **Action:** Return to @PM with rejection reason
214
+ **Validation:** Rejection reason documented
215
+ **Block if:** Reason not clear
216
+
217
+ ## Command Interface
218
+
219
+ ### @BRAIN /status
220
+ Show current workflow state:
221
+ ```
222
+ 📊 Workflow Status
223
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
224
+ Current State: DESIGNING
225
+ Sprint: sprint-1
226
+ Phase Progress: 3/12 (25%)
227
+
228
+ ✅ Completed:
229
+ - PLANNING: @PM (Project-Plan-v1.md)
230
+ - PLAN_APPROVAL: User approved
231
+
232
+ 🔄 In Progress:
233
+ - @SA: Architecture spec (80%)
234
+ - @UIUX: UI/UX spec (60%)
235
+ - @PO: Product backlog (90%)
236
+
237
+ ⏳ Pending:
238
+ - DESIGN_REVIEW: @QA + @SECA
239
+ - DEVELOPMENT: @DEV + @DEVOPS
240
+ - ... (remaining phases)
241
+
242
+ 🚪 Next Gate: Design Approval (after QA + SECA review)
243
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
244
+ ```
245
+
246
+ ### @BRAIN /validate
247
+ Validate current phase completion:
248
+ ```
249
+ 🔍 Phase Validation: DESIGNING
250
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
251
+ Required Artifacts:
252
+ ✅ Architecture-Spec.md (docs/sprints/sprint-1/designs/)
253
+ ✅ UIUX-Spec.md (docs/sprints/sprint-1/designs/)
254
+ ✅ Product-Backlog.md (docs/sprints/sprint-1/plans/)
255
+
256
+ Role Completion:
257
+ ✅ @SA: Complete
258
+ ✅ @UIUX: Complete
259
+ ✅ @PO: Complete
260
+
261
+ Handoff Status:
262
+ ✅ @QA tagged for design review
263
+ ✅ @SECA tagged for security review
264
+
265
+ ✅ READY TO TRANSITION: DESIGNING → DESIGN_REVIEW
266
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
267
+ ```
268
+
269
+ ### @BRAIN /force-transition [REASON]
270
+ **EMERGENCY ONLY** - Force transition despite validation failures
271
+
272
+ ### @BRAIN /rollback [STATE]
273
+ Rollback to previous state
274
+
275
+ ### @BRAIN /auto-execute
276
+ Full automation mode (like @ORCHESTRATOR --mode=full-auto)
277
+
278
+ ## Enforcement Rules
279
+
280
+ ### Rule 1: No Phase Skipping
281
+ ```
282
+ ❌ BLOCKED: Cannot skip from PLANNING to DEVELOPMENT
283
+ Required flow: PLANNING → PLAN_APPROVAL → DESIGNING → DESIGN_REVIEW → DEVELOPMENT
284
+
285
+ Action: Enforcing correct flow...
286
+ ```
287
+
288
+ ### Rule 2: Approval Gate Enforcement
289
+ ```
290
+ ❌ BLOCKED: Cannot proceed to DESIGNING without user approval
291
+ Current State: PLAN_APPROVAL
292
+ Required: User must explicitly approve Project-Plan-v1.md
293
+
294
+ Waiting for approval...
295
+ ```
296
+
297
+ ### Rule 3: Parallel Execution Validation
298
+ ```
299
+ ⏳ WAITING: DESIGNING phase requires ALL parallel roles to complete
300
+ Status:
301
+ ✅ @SA: Complete
302
+ ✅ @UIUX: Complete
303
+ ⏳ @PO: In progress (90%)
304
+
305
+ Cannot transition to DESIGN_REVIEW until @PO completes.
306
+ ```
307
+
308
+ ### Rule 4: Artifact Validation
309
+ ```
310
+ ❌ BLOCKED: Cannot transition to TESTING without required artifacts
311
+ Missing:
312
+ - Dev-Log.md (docs/sprints/sprint-1/logs/)
313
+ - DevOps-Log.md (docs/sprints/sprint-1/logs/)
314
+
315
+ Action: Notifying @DEV and @DEVOPS to complete logs...
316
+ ```
317
+
318
+ ### Rule 5: Bug Priority Handling
319
+ ```
320
+ ❌ BLOCKED: Cannot proceed to DEPLOYMENT with critical/high bugs
321
+ Test Report shows:
322
+ - 2 Critical bugs (#fixbug-critical)
323
+ - 3 High bugs (#fixbug-high)
324
+
325
+ Action: Transitioning to BUG_FIXING state...
326
+ Notifying @DEV to fix bugs...
327
+ ```
328
+
329
+ ### Rule 6: Scope Creep Prevention
330
+ ```
331
+ ⚠️ WARNING: Feature not in approved backlog
332
+ Requested: "Add social media login"
333
+ Approved Backlog: Email/password login only
334
+
335
+ Action: REJECTED - Feature not approved
336
+ To add: User must approve updated plan (v2)
337
+ ```
338
+
339
+ ## State Persistence
340
+
341
+ BRAIN maintains state in:
342
+ ```
343
+ docs/sprints/sprint-N/.brain-state.json
344
+ {
345
+ "sprint": "sprint-1",
346
+ "currentState": "DESIGNING",
347
+ "previousState": "PLAN_APPROVAL",
348
+ "stateHistory": [...],
349
+ "approvalGates": {...},
350
+ "artifacts": {...},
351
+ "roleStatus": {...}
352
+ }
353
+ ```
354
+
355
+ ## Error Recovery
356
+
357
+ ### Scenario 1: Role Fails to Complete
358
+ ```
359
+ ⚠️ ERROR: @DEV failed to complete implementation
360
+ Error: Build failed with compilation errors
361
+
362
+ Recovery Actions:
363
+ 1. Log error details
364
+ 2. Keep state in DEVELOPMENT
365
+ 3. Notify @DEV with error details
366
+ 4. Wait for fix
367
+ 5. Re-validate before transition
368
+ ```
369
+
370
+ ### Scenario 2: Approval Rejected
371
+ ```
372
+ ❌ REJECTION: User rejected design
373
+ Reason: "UI doesn't match brand guidelines"
374
+
375
+ Recovery Actions:
376
+ 1. Transition: DESIGN_REVIEW → DESIGNING
377
+ 2. Create Project-Plan-v2.md with feedback
378
+ 3. Notify @UIUX with rejection reason
379
+ 4. Restart design phase
380
+ 5. Track iteration count
381
+ ```
382
+
383
+ ### Scenario 3: Critical Bug in Production
384
+ ```
385
+ 🚨 EMERGENCY: Critical bug detected in production
386
+ Priority: P0
387
+ Impact: Payment processing down
388
+
389
+ Recovery Actions:
390
+ 1. Activate @BRAIN /emergency workflow
391
+ 2. Bypass normal flow for hotfix
392
+ 3. @DEV creates immediate fix
393
+ 4. @DEVOPS deploys hotfix
394
+ 5. Return to normal flow after resolution
395
+ 6. Document in KB with /compound
396
+ ```
397
+
398
+ ## Integration with Enhanced Workflows
399
+
400
+ ### /cycle Integration
401
+ When @BRAIN receives `/cycle` command:
402
+ ```
403
+ 1. Validate: Task is small (< 4 hours)
404
+ 2. Create mini-workflow: Plan → Work → Review → Compound
405
+ 3. Enforce atomic commits
406
+ 4. Auto-compound if non-obvious solution
407
+ 5. Return to main workflow state
408
+ ```
409
+
410
+ ### /explore Integration
411
+ When @BRAIN receives `/explore` command:
412
+ ```
413
+ 1. Pause main workflow
414
+ 2. Execute exploration: Analysis → Research → Recommendations
415
+ 3. Generate investigation report
416
+ 4. Resume main workflow with findings
417
+ 5. Update design phase with insights
418
+ ```
419
+
420
+ ### /emergency Integration
421
+ When @BRAIN receives `/emergency` command:
422
+ ```
423
+ 1. Override normal flow (with logging)
424
+ 2. Execute: Assess → Hotfix → Deploy → Postmortem
425
+ 3. Enforce /compound for learning
426
+ 4. Return to previous state
427
+ 5. Update KB with incident pattern
428
+ ```
429
+
430
+ ## Decision Matrix
431
+
432
+ | Situation | Decision | Action |
433
+ |-----------|----------|--------|
434
+ | Phase complete + validation passed | ALLOW transition | Move to next state |
435
+ | Phase complete + validation failed | BLOCK transition | Request fixes |
436
+ | Approval gate + user approved | ALLOW transition | Move to next state |
437
+ | Approval gate + user rejected | BLOCK + ROLLBACK | Return to planning |
438
+ | Critical bug found | FORCE bug fixing | Transition to BUG_FIXING |
439
+ | Scope creep detected | REJECT feature | Notify user |
440
+ | Emergency situation | ALLOW bypass | Log and proceed |
441
+ | Parallel roles incomplete | WAIT | Block until all complete |
442
+
443
+ ## Initialization
444
+
445
+ When @BRAIN is first activated:
446
+ ```
447
+ 🧠 BRAIN Initialized
448
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
449
+ Master Orchestrator Active
450
+ Workflow: TeamLifecycle SDLC
451
+ Diagram: docs/SDLC-Diagram.md
452
+ Mode: Strict Enforcement
453
+
454
+ Current State: IDLE
455
+ Waiting for user requirements...
456
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
457
+ ```
458
+
459
+ ## Critical Rules
460
+
461
+ 1. **NEVER skip phases** - Follow diagram strictly
462
+ 2. **ALWAYS validate** - Check prerequisites before transitions
463
+ 3. **ENFORCE approvals** - Block without explicit user approval
464
+ 4. **TRACK everything** - Maintain complete state history
465
+ 5. **FAIL safely** - Rollback on errors, never corrupt state
466
+ 6. **COMMUNICATE clearly** - Always explain current state and next steps
467
+ 7. **PREVENT scope creep** - Only approved features allowed
468
+ 8. **COMPOUND learnings** - Document all non-obvious solutions
469
+
470
+ #brain #master-orchestrator #workflow-controller #state-machine