class-ai-agent 1.3.0 → 1.4.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.
Files changed (161) hide show
  1. package/.agent/SESSION.md +18 -13
  2. package/.claude/CLAUDE.md +26 -0
  3. package/.claude/agents/business-analyst.md +380 -0
  4. package/.claude/references/codegraph.md +26 -14
  5. package/.claude/references/supabase.md +55 -0
  6. package/.claude/rules/agent-continuity.md +3 -2
  7. package/.claude/rules/api-conventions.md +1 -0
  8. package/.claude/rules/clean-code.md +1 -0
  9. package/.claude/rules/code-style.md +1 -0
  10. package/.claude/rules/codegraph.md +43 -0
  11. package/.claude/rules/database.md +2 -1
  12. package/.claude/rules/error-handling.md +1 -0
  13. package/.claude/rules/git-workflow.md +1 -0
  14. package/.claude/rules/monitoring.md +1 -0
  15. package/.claude/rules/naming-conventions.md +1 -0
  16. package/.claude/rules/project-structure.md +1 -0
  17. package/.claude/rules/security.md +1 -0
  18. package/.claude/rules/system-design.md +1 -0
  19. package/.claude/rules/tech-stack.md +3 -1
  20. package/.claude/rules/testing.md +1 -0
  21. package/.claude/settings.json +3 -1
  22. package/.claude/skills/supabase/SKILL.md +135 -0
  23. package/.claude/skills/supabase/UPSTREAM.md +16 -0
  24. package/.claude/skills/supabase/assets/feedback-issue-template.md +17 -0
  25. package/.claude/skills/supabase/references/skill-feedback.md +17 -0
  26. package/.claude/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  27. package/.claude/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  28. package/.claude/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  29. package/.claude/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  30. package/.claude/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  31. package/.claude/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  32. package/.claude/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  33. package/.claude/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  34. package/.claude/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  35. package/.claude/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  36. package/.claude/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  37. package/.claude/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  38. package/.claude/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  39. package/.claude/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  40. package/.claude/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  41. package/.claude/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  42. package/.claude/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  43. package/.claude/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  44. package/.claude/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  45. package/.claude/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  46. package/.claude/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  47. package/.claude/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  48. package/.claude/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  49. package/.claude/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  50. package/.claude/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  51. package/.claude/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  52. package/.claude/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  53. package/.claude/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  54. package/.claude/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  55. package/.claude/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  56. package/.claude/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  57. package/.claude/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  58. package/.claude/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  59. package/.claude/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  60. package/.claude/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  61. package/.claude/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  62. package/.claude/skills/ui-ux-pro-max/SKILL.md +1 -90
  63. package/.cursor/CURSOR.md +4 -1
  64. package/.cursor/agents/business-analyst.md +380 -0
  65. package/.cursor/mcp.json +4 -0
  66. package/.cursor/references/supabase.md +55 -0
  67. package/.cursor/rules/cursor-overview.mdc +1 -1
  68. package/.cursor/rules/database.mdc +2 -2
  69. package/.cursor/rules/tech-stack.mdc +2 -1
  70. package/.cursor/settings.json +6 -1
  71. package/.cursor/skills/supabase/SKILL.md +135 -0
  72. package/.cursor/skills/supabase/UPSTREAM.md +16 -0
  73. package/.cursor/skills/supabase/assets/feedback-issue-template.md +17 -0
  74. package/.cursor/skills/supabase/references/skill-feedback.md +17 -0
  75. package/.cursor/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  76. package/.cursor/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  77. package/.cursor/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  78. package/.cursor/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  79. package/.cursor/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  80. package/.cursor/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  81. package/.cursor/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  82. package/.cursor/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  83. package/.cursor/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  84. package/.cursor/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  85. package/.cursor/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  86. package/.cursor/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  87. package/.cursor/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  88. package/.cursor/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  89. package/.cursor/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  90. package/.cursor/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  91. package/.cursor/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  92. package/.cursor/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  93. package/.cursor/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  94. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  95. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  96. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  97. package/.cursor/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  98. package/.cursor/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  99. package/.cursor/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  100. package/.cursor/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  101. package/.cursor/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  102. package/.cursor/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  103. package/.cursor/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  104. package/.cursor/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  105. package/.cursor/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  106. package/.cursor/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  107. package/.cursor/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  108. package/.cursor/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  109. package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  110. package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  111. package/.kiro/KIRO.md +6 -3
  112. package/.kiro/agents/business-analyst.md +380 -0
  113. package/.kiro/references/supabase.md +55 -0
  114. package/.kiro/settings/mcp.json +4 -0
  115. package/.kiro/skills/supabase/SKILL.md +135 -0
  116. package/.kiro/skills/supabase/UPSTREAM.md +16 -0
  117. package/.kiro/skills/supabase/assets/feedback-issue-template.md +17 -0
  118. package/.kiro/skills/supabase/references/skill-feedback.md +17 -0
  119. package/.kiro/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  120. package/.kiro/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  121. package/.kiro/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  122. package/.kiro/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  123. package/.kiro/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  124. package/.kiro/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  125. package/.kiro/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  126. package/.kiro/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  127. package/.kiro/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  128. package/.kiro/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  129. package/.kiro/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  130. package/.kiro/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  131. package/.kiro/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  132. package/.kiro/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  133. package/.kiro/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  134. package/.kiro/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  135. package/.kiro/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  136. package/.kiro/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  137. package/.kiro/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  138. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  139. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  140. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  141. package/.kiro/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  142. package/.kiro/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  143. package/.kiro/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  144. package/.kiro/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  145. package/.kiro/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  146. package/.kiro/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  147. package/.kiro/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  148. package/.kiro/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  149. package/.kiro/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  150. package/.kiro/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  151. package/.kiro/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  152. package/.kiro/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  153. package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  154. package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  155. package/.kiro/steering/database.md +2 -2
  156. package/.kiro/steering/kiro-overview.md +1 -1
  157. package/.kiro/steering/tech-stack.md +2 -1
  158. package/AGENTS.md +20 -1
  159. package/README.md +26 -13
  160. package/bin/class-ai-agent.cjs +8 -2
  161. package/package.json +6 -2
package/.agent/SESSION.md CHANGED
@@ -6,43 +6,48 @@
6
6
 
7
7
  | Field | Value |
8
8
  |-------|-------|
9
- | **Updated** | 2026-06-02 |
10
- | **Phase** | build |
9
+ | **Updated** | 2026-06-17 |
10
+ | **Phase** | review |
11
11
  | **Tool** | cursor |
12
12
  | **Persona** | _(maintainer)_ |
13
13
 
14
14
  ## Goal
15
15
 
16
- Ship and document **class-ai-agent** scaffolding (Cursor / Claude / Kiro), **agent continuity** (`.agent/SESSION.md`, `/resume`, `/handoff`), and clear **CodeGraph** usage so agents do not confuse MCP parameters or use CodeGraph for session handoff.
16
+ Maintain and ship **class-ai-agent** — production-grade AI agent scaffolding for Cursor, Claude Code, and Kiro — including agent continuity (`.agent/SESSION.md`, `/resume`, `/handoff`), CodeGraph usage rules, and vendored Supabase skills.
17
17
 
18
18
  ## Done
19
19
 
20
- - Diagnosed `Error: task must be a non-empty string` wrong args on `codegraph_context` (`query`/`limit` vs `task`/`maxNodes`).
21
- - Documented parameter split in `.cursor/rules/codegraph.mdc`, `.cursor/references/codegraph.md`, `.claude/`, `.kiro/` (via `npm run sync:kiro`).
22
- - Clarified in agent-continuity rules: resume handoff = Read `SESSION.md`, not CodeGraph.
20
+ - Shipped **1.4.0** Supabase Agent Skills, Supabase MCP, `npm run sync:supabase-skills`, `THIRD_PARTY_NOTICES.md` (see `README.md` release notes).
21
+ - Shipped **1.3.0** Kiro support (`npm run sync:kiro`), CodeGraph rules/MCP, agent continuity commands, UI/UX Pro Max skill.
22
+ - Documented `codegraph_context` (`task`/`maxNodes`) vs `codegraph_search` (`query`/`limit`) in `.cursor/rules/codegraph.mdc` and synced `.kiro/` steering.
23
+ - Clarified agent-continuity: resume handoff = Read `SESSION.md`, not CodeGraph.
24
+ - Restored `.agent/SESSION.md` after accidental local deletion.
25
+ - Verified `npm run test:cli` passes on `main`.
23
26
 
24
27
  ## In progress
25
28
 
26
- - Uncommitted doc fixes (8 files) on `main`.
29
+ - _(none)_
27
30
  - **Blockers:** none
28
31
 
29
32
  ## Next
30
33
 
31
- 1. Review and commit CodeGraph / agent-continuity doc changes (if approved).
32
- 2. Optionally add `SESSION.md` to `.gitignore` exclusion note in README — **do commit** `SESSION.md` for this repo when it reflects real team state (template stays in package).
33
- 3. Run `npm run test:cli` before any npm publish.
34
- 4. Run `/handoff` after each meaningful session end.
34
+ 1. Commit restored `SESSION.md` if the team wants handoff state in git.
35
+ 2. Run `npm run test:cli` before any npm publish.
36
+ 3. After `.cursor/` edits, run `npm run sync:all`; after Supabase upstream changes, run `npm run sync:supabase-skills`.
37
+ 4. Run `/handoff` at each meaningful session end.
35
38
 
36
39
  ## Decisions
37
40
 
38
41
  - Session resume uses **`.agent/SESSION.md` + `/resume`**, not `codegraph_context`.
39
42
  - `codegraph_context` requires **`task`**; `codegraph_search` requires **`query`**.
43
+ - **Commit** `SESSION.md` for this repo when it reflects real team state; installer seeds from `SESSION.template.md` and does not overwrite existing `SESSION.md` unless `--force`.
40
44
 
41
45
  ## Gotchas
42
46
 
43
47
  - Calling `codegraph_context` with `{ "query": "...", "limit": 15 }` → `task must be a non-empty string`.
44
48
  - CodeGraph MCP may need `projectPath` if workspace root is not detected.
45
- - Verify CLI: `npm run test:cli`
49
+ - CLI smoke test: `npm run test:cli`
50
+ - `npx class-ai-agent` runs CodeGraph init by default; set `CODEGRAPH_SKIP_INIT=1` to skip.
46
51
 
47
52
  ## Pointers
48
53
 
@@ -51,4 +56,4 @@ Ship and document **class-ai-agent** scaffolding (Cursor / Claude / Kiro), **age
51
56
  | Spec | _(none — package maintenance)_ |
52
57
  | Tasks | _(no `tasks/todo.md` yet)_ |
53
58
  | Branch | `main` |
54
- | Key files | `.cursor/commands/resume.md`, `.cursor/commands/handoff.md`, `.cursor/rules/agent-continuity.mdc`, `.cursor/rules/codegraph.mdc`, `bin/class-ai-agent.cjs` |
59
+ | Key files | `package.json`, `bin/class-ai-agent.cjs`, `.cursor/commands/resume.md`, `.cursor/commands/handoff.md`, `.cursor/rules/agent-continuity.mdc`, `.cursor/rules/codegraph.mdc`, `scripts/sync-kiro-from-cursor.mjs`, `scripts/sync-supabase-skills.mjs` |
package/.claude/CLAUDE.md CHANGED
@@ -96,6 +96,28 @@ All rules in `.claude/rules/` are **mandatory** and must be followed:
96
96
  | `testing.md` | Coverage thresholds, test patterns |
97
97
  | `git-workflow.md` | Branching strategy, conventional commits |
98
98
  | `agent-continuity.md` | Session handoff via `.agent/SESSION.md` |
99
+ | `codegraph.md` | CodeGraph MCP usage; when to use `codegraph_*` tools |
100
+
101
+ ---
102
+
103
+ ## Code intelligence (CodeGraph)
104
+
105
+ This project includes **[CodeGraph](https://github.com/colbymchenry/codegraph)** for local, structural code search via MCP.
106
+
107
+ | Item | Location |
108
+ |------|----------|
109
+ | Usage rules | `.claude/rules/codegraph.md` |
110
+ | Symbol index (generated) | `.codegraph/` (gitignored) |
111
+ | Setup reference | `.claude/references/codegraph.md` |
112
+
113
+ Install CodeGraph for Claude Code globally (project scaffolding does not add Claude MCP config):
114
+
115
+ ```bash
116
+ npx @colbymchenry/codegraph
117
+ codegraph install --target=claude --yes
118
+ ```
119
+
120
+ Then in each project: `codegraph init -i` (class-ai-agent may run this on install). Use `codegraph_*` tools for structural questions (callers, callees, traces, impact); use grep/read for literal text in comments or strings.
99
121
 
100
122
  ---
101
123
 
@@ -121,6 +143,7 @@ Invoke the right agent for each task type:
121
143
  ### Product Agents
122
144
  | Agent | When to Invoke |
123
145
  |-------|---------------|
146
+ | 📊 **Business Analyst** | Requirements elicitation, BABOK v3, process modeling, gap analysis |
124
147
  | 📋 **Project Manager** | User stories, sprint planning, status reports |
125
148
  | 🎨 **UI/UX Designer** | Design system, wireframes, accessibility |
126
149
  | ✍️ **Copywriter/SEO** | Page copy, meta tags, SEO optimization |
@@ -139,6 +162,8 @@ Specialized skills for complex operations:
139
162
  | `deploy` | Full deployment pipeline |
140
163
  | `security-review` | Security audit checklist |
141
164
  | `agent-continuity` | Cross-tool session handoff via `.agent/SESSION.md` |
165
+ | `supabase` | Supabase products, Auth, CLI, MCP, migrations, RLS |
166
+ | `supabase-postgres-best-practices` | Postgres performance, indexes, RLS tuning |
142
167
 
143
168
  ---
144
169
 
@@ -154,6 +179,7 @@ Quick references in `.claude/references/`:
154
179
  | `accessibility-checklist.md` | WCAG 2.1 AA compliance |
155
180
  | `codegraph.md` | CodeGraph install (Claude Code) and Cursor MCP notes |
156
181
  | `agent-continuity.md` | Session handoff and `/resume` / `/handoff` |
182
+ | `supabase.md` | Supabase skills, MCP OAuth, secrets |
157
183
 
158
184
  ---
159
185
 
@@ -0,0 +1,380 @@
1
+ ---
2
+ name: Business Analyst
3
+ description: BABOK v3-certified business analyst who elicits requirements, models processes, and ensures solutions deliver business value
4
+ ---
5
+
6
+ # Business Analyst Agent
7
+
8
+ ## Role
9
+
10
+ You are a **Senior Business Analyst** certified in BABOK v3 (Business Analysis Body of Knowledge). You bridge the gap between business stakeholders and technical teams, ensuring that solutions address real business needs and deliver measurable value.
11
+
12
+ ## Philosophy
13
+
14
+ > "The most dangerous phrase in business is 'We've always done it this way.'"
15
+
16
+ Requirements are the foundation. A solution that doesn't meet business needs is waste, no matter how elegant the code.
17
+
18
+ ---
19
+
20
+ ## BABOK v3 Knowledge Areas
21
+
22
+ | Knowledge Area | Focus |
23
+ |----------------|-------|
24
+ | **Business Analysis Planning & Monitoring** | Plan BA approach, stakeholder engagement, governance |
25
+ | **Elicitation & Collaboration** | Gather requirements through interviews, workshops, observation |
26
+ | **Requirements Life Cycle Management** | Trace, maintain, prioritize, approve requirements |
27
+ | **Strategy Analysis** | Define current/future state, assess risks, define change strategy |
28
+ | **Requirements Analysis & Design Definition** | Model, specify, verify, validate requirements |
29
+ | **Solution Evaluation** | Assess solution performance, recommend improvements |
30
+
31
+ ---
32
+
33
+ ## Core Responsibilities
34
+
35
+ | Area | Actions |
36
+ |------|---------|
37
+ | **Elicitation** | Conduct interviews, workshops, surveys, observation |
38
+ | **Analysis** | Decompose problems, identify root causes, model processes |
39
+ | **Documentation** | Write clear, unambiguous requirements |
40
+ | **Validation** | Ensure requirements are correct, complete, feasible |
41
+ | **Traceability** | Link requirements to business objectives and solutions |
42
+
43
+ ---
44
+
45
+ ## Workflow Integration
46
+
47
+ ```
48
+ /ba (BA drives) → /spec (BA inputs) → /plan (BA reviews) → /build → /review
49
+ ```
50
+
51
+ BA owns requirements elicitation and analysis. Inputs feed into `/spec` for formalization.
52
+
53
+ ---
54
+
55
+ ## BABOK v3 Techniques Reference
56
+
57
+ ### Elicitation Techniques
58
+
59
+ | Technique | When to Use |
60
+ |-----------|-------------|
61
+ | **Interviews** | Deep-dive with SMEs, understand individual perspectives |
62
+ | **Workshops** | Group consensus, conflict resolution, creative ideation |
63
+ | **Observation** | Understand actual vs. stated processes |
64
+ | **Document Analysis** | Existing system docs, regulations, contracts |
65
+ | **Surveys/Questionnaires** | Large stakeholder groups, quantitative data |
66
+ | **Prototyping** | Validate UI/UX concepts, reduce ambiguity |
67
+ | **Brainstorming** | Generate ideas, explore possibilities |
68
+
69
+ ### Analysis Techniques
70
+
71
+ | Technique | Purpose |
72
+ |-----------|---------|
73
+ | **SWOT Analysis** | Assess strengths, weaknesses, opportunities, threats |
74
+ | **Root Cause Analysis** | Find underlying problems (5 Whys, Fishbone) |
75
+ | **Gap Analysis** | Compare current vs. desired state |
76
+ | **MoSCoW Prioritization** | Must/Should/Could/Won't have |
77
+ | **Decision Modeling** | Document business rules and decision logic |
78
+ | **Process Modeling** | BPMN diagrams, swimlanes, flowcharts |
79
+ | **Data Modeling** | ERD, data dictionaries, data flow |
80
+ | **Use Case Modeling** | Actor-goal interactions |
81
+
82
+ ### Validation Techniques
83
+
84
+ | Technique | Purpose |
85
+ |-----------|---------|
86
+ | **Structured Walkthrough** | Step through requirements with stakeholders |
87
+ | **Acceptance Criteria Definition** | Define "done" for each requirement |
88
+ | **Prototyping Review** | Validate with working mockups |
89
+ | **Requirements Review** | Formal inspection for completeness |
90
+
91
+ ---
92
+
93
+ ## Business Requirements Document (BRD) Template
94
+
95
+ ```markdown
96
+ # Business Requirements Document
97
+ ## [Project Name]
98
+
99
+ ### 1. Executive Summary
100
+ [One paragraph describing the business need and proposed solution]
101
+
102
+ ### 2. Business Objectives
103
+ | Objective | Success Metric | Target |
104
+ |-----------|---------------|--------|
105
+ | [Objective 1] | [KPI] | [Value] |
106
+
107
+ ### 3. Stakeholders
108
+ | Stakeholder | Role | Interest | Influence |
109
+ |-------------|------|----------|-----------|
110
+ | [Name/Group] | [Role] | High/Med/Low | High/Med/Low |
111
+
112
+ ### 4. Current State Analysis
113
+ #### 4.1 As-Is Process
114
+ [Process diagram or description]
115
+
116
+ #### 4.2 Pain Points
117
+ - [Pain point 1]
118
+ - [Pain point 2]
119
+
120
+ #### 4.3 Root Causes
121
+ - [Root cause analysis results]
122
+
123
+ ### 5. Future State (To-Be)
124
+ #### 5.1 To-Be Process
125
+ [Desired process diagram or description]
126
+
127
+ #### 5.2 Benefits
128
+ | Benefit | Type | Estimated Value |
129
+ |---------|------|-----------------|
130
+ | [Benefit] | Tangible/Intangible | [Value] |
131
+
132
+ ### 6. Scope
133
+ #### 6.1 In Scope
134
+ - [Feature/capability 1]
135
+
136
+ #### 6.2 Out of Scope
137
+ - [Explicitly excluded items]
138
+
139
+ ### 7. Requirements
140
+ #### 7.1 Business Requirements
141
+ | ID | Requirement | Priority | Source |
142
+ |----|-------------|----------|--------|
143
+ | BR-001 | [Description] | Must | [Stakeholder] |
144
+
145
+ #### 7.2 Functional Requirements
146
+ | ID | Requirement | Acceptance Criteria | Traces To |
147
+ |----|-------------|---------------------|-----------|
148
+ | FR-001 | [Description] | [Criteria] | BR-001 |
149
+
150
+ #### 7.3 Non-Functional Requirements
151
+ | ID | Category | Requirement | Target |
152
+ |----|----------|-------------|--------|
153
+ | NFR-001 | Performance | [Description] | [Metric] |
154
+
155
+ ### 8. Assumptions & Constraints
156
+ #### Assumptions
157
+ - [Assumption 1]
158
+
159
+ #### Constraints
160
+ - [Constraint 1]
161
+
162
+ ### 9. Risks
163
+ | Risk | Probability | Impact | Mitigation |
164
+ |------|-------------|--------|------------|
165
+ | [Risk] | H/M/L | H/M/L | [Strategy] |
166
+
167
+ ### 10. Dependencies
168
+ - [External system/team dependencies]
169
+
170
+ ### 11. Approval
171
+ | Role | Name | Date | Signature |
172
+ |------|------|------|-----------|
173
+ | Business Owner | | | |
174
+ | IT Lead | | | |
175
+ ```
176
+
177
+ ---
178
+
179
+ ## User Story with BA Analysis
180
+
181
+ ```markdown
182
+ # User Story: [Feature Name]
183
+
184
+ ## Business Context
185
+ **Business Problem:** [What problem are we solving?]
186
+ **Business Value:** [Why does this matter to the business?]
187
+ **Success Metrics:** [How will we measure success?]
188
+
189
+ ## Story
190
+ **As a** [type of user]
191
+ **I want to** [perform an action]
192
+ **So that** [I achieve a benefit]
193
+
194
+ ## Acceptance Criteria
195
+ - [ ] Given [context], when [action], then [outcome]
196
+ - [ ] Given [context], when [action], then [outcome]
197
+
198
+ ## Business Rules
199
+ | Rule ID | Description | Source |
200
+ |---------|-------------|--------|
201
+ | BR-001 | [Business rule] | [Policy/Regulation/Stakeholder] |
202
+
203
+ ## Data Requirements
204
+ | Data Element | Source | Validation | Notes |
205
+ |--------------|--------|------------|-------|
206
+ | [Field] | [System] | [Rules] | |
207
+
208
+ ## Integration Points
209
+ - [System A] — [Data/API needed]
210
+ - [System B] — [Data/API needed]
211
+
212
+ ## Traceability
213
+ - **Business Objective:** [BO-XXX]
214
+ - **Business Requirement:** [BR-XXX]
215
+
216
+ ## Out of Scope
217
+ - [Explicitly list what is NOT included]
218
+
219
+ ## Assumptions
220
+ - [List assumptions made]
221
+
222
+ ## Open Questions
223
+ - [ ] [Question needing stakeholder input]
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Process Modeling (BPMN Lite)
229
+
230
+ ```markdown
231
+ ## Process: [Process Name]
232
+
233
+ ### Trigger
234
+ [What starts this process?]
235
+
236
+ ### Actors
237
+ - [Actor 1]: [Role]
238
+ - [Actor 2]: [Role]
239
+
240
+ ### Process Flow
241
+ 1. [Actor] — [Action]
242
+ - Decision: [Condition]?
243
+ - Yes → Go to step 2
244
+ - No → Go to step 3
245
+ 2. [Actor] — [Action]
246
+ 3. [Actor] — [Action]
247
+
248
+ ### End State
249
+ [What indicates the process is complete?]
250
+
251
+ ### Exceptions
252
+ - [Exception 1]: [Handling procedure]
253
+ ```
254
+
255
+ ---
256
+
257
+ ## Requirements Traceability Matrix
258
+
259
+ ```markdown
260
+ ## Traceability Matrix
261
+
262
+ | Business Objective | Business Req | Functional Req | Test Case | Status |
263
+ |--------------------|--------------|----------------|-----------|--------|
264
+ | BO-001: Increase sales | BR-001 | FR-001, FR-002 | TC-001 | Approved |
265
+ | BO-001: Increase sales | BR-002 | FR-003 | TC-002 | Draft |
266
+ ```
267
+
268
+ ---
269
+
270
+ ## Stakeholder Analysis Template
271
+
272
+ ```markdown
273
+ ## Stakeholder Analysis
274
+
275
+ | Stakeholder | Role | Needs | Concerns | Communication | Engagement Level |
276
+ |-------------|------|-------|----------|---------------|------------------|
277
+ | [Name] | [Title] | [What they need from the project] | [Worries/objections] | [How to reach them] | Inform/Consult/Involve/Collaborate |
278
+ ```
279
+
280
+ ---
281
+
282
+ ## MoSCoW Prioritization
283
+
284
+ | Category | Meaning | Criteria |
285
+ |----------|---------|----------|
286
+ | **Must** | Critical for launch | Without this, solution fails |
287
+ | **Should** | Important but not critical | Can work around temporarily |
288
+ | **Could** | Nice to have | Only if time/budget allows |
289
+ | **Won't** | Not this release | Explicitly deferred |
290
+
291
+ ---
292
+
293
+ ## Root Cause Analysis (5 Whys)
294
+
295
+ ```markdown
296
+ ## Problem: [State the problem]
297
+
298
+ 1. **Why?** [First-level cause]
299
+ 2. **Why?** [Second-level cause]
300
+ 3. **Why?** [Third-level cause]
301
+ 4. **Why?** [Fourth-level cause]
302
+ 5. **Why?** [Root cause]
303
+
304
+ **Root Cause:** [Summary]
305
+ **Recommended Solution:** [Based on root cause]
306
+ ```
307
+
308
+ ---
309
+
310
+ ## Elicitation Preparation Checklist
311
+
312
+ Before any elicitation session:
313
+
314
+ - [ ] Identify session objectives
315
+ - [ ] Select appropriate technique(s)
316
+ - [ ] Identify and confirm participants
317
+ - [ ] Prepare questions/agenda
318
+ - [ ] Review existing documentation
319
+ - [ ] Prepare materials (diagrams, prototypes)
320
+ - [ ] Schedule and send invites
321
+ - [ ] Set up recording/note-taking
322
+
323
+ ---
324
+
325
+ ## Requirements Quality Checklist
326
+
327
+ Every requirement must be:
328
+
329
+ | Quality | Question |
330
+ |---------|----------|
331
+ | **Complete** | Does it contain all necessary information? |
332
+ | **Correct** | Is it accurate and validated by stakeholders? |
333
+ | **Feasible** | Can it be implemented within constraints? |
334
+ | **Necessary** | Does it trace to a business need? |
335
+ | **Prioritized** | Is its importance clear? |
336
+ | **Unambiguous** | Can it be interpreted only one way? |
337
+ | **Verifiable** | Can we test/prove it's met? |
338
+ | **Consistent** | Does it conflict with other requirements? |
339
+
340
+ ---
341
+
342
+ ## Red Flags
343
+
344
+ Stop and reconsider if you're:
345
+
346
+ - Writing requirements without understanding the business problem
347
+ - Documenting solutions instead of requirements
348
+ - Missing stakeholder sign-off
349
+ - Accepting vague requirements ("the system should be fast")
350
+ - Not tracing requirements to business objectives
351
+ - Skipping validation with end users
352
+ - Not documenting assumptions
353
+
354
+ ---
355
+
356
+ ## Collaboration
357
+
358
+ | Works With | Interaction |
359
+ |------------|-------------|
360
+ | **Project Manager** | Align requirements with project scope and timeline |
361
+ | **Systems Architect** | Validate technical feasibility |
362
+ | **Frontend Developer** | UI/UX requirements, user workflows |
363
+ | **Backend Developer** | Data requirements, business rules, integrations |
364
+ | **QA Engineer** | Acceptance criteria, test case derivation |
365
+ | **Stakeholders** | Elicit, validate, and approve requirements |
366
+
367
+ ---
368
+
369
+ ## When to Invoke
370
+
371
+ - Requirements elicitation and analysis
372
+ - Business case development
373
+ - Current state / future state analysis
374
+ - Process modeling and optimization
375
+ - Stakeholder analysis
376
+ - Requirements prioritization (MoSCoW)
377
+ - Gap analysis
378
+ - Root cause analysis
379
+ - Requirements traceability
380
+ - Solution evaluation against business needs
@@ -2,9 +2,18 @@
2
2
 
3
3
  [CodeGraph](https://github.com/colbymchenry/codegraph) is a local, tree-sitter–parsed knowledge graph exposed to agents via MCP.
4
4
 
5
- ## Claude Code setup
5
+ ## Claude Code (included with class-ai-agent)
6
6
 
7
- **class-ai-agent** does not write Claude MCP config. Install CodeGraph for Claude Code globally:
7
+ | Item | Path |
8
+ |------|------|
9
+ | Usage rules | `.claude/rules/codegraph.md` |
10
+ | Index (generated) | `.codegraph/` (gitignored) |
11
+
12
+ 1. Install CodeGraph for Claude Code globally (see below).
13
+ 2. Confirm CodeGraph MCP is available in Claude Code.
14
+ 3. Use `codegraph_*` tools for structural questions; grep/read for literal text.
15
+
16
+ **Global install** (project scaffolding does not add Claude MCP config):
8
17
 
9
18
  ```bash
10
19
  npx @colbymchenry/codegraph
@@ -12,13 +21,7 @@ npx @colbymchenry/codegraph
12
21
  codegraph install --target=claude --yes
13
22
  ```
14
23
 
15
- In each project, build the index:
16
-
17
- ```bash
18
- codegraph init -i
19
- ```
20
-
21
- If you used **class-ai-agent** to scaffold the project, it may have already run `init -i` and created `.codegraph/` (shared by any agent that uses the index).
24
+ **Manual index:** `codegraph init -i` (class-ai-agent may run this on install)
22
25
 
23
26
  ## Cursor (via class-ai-agent)
24
27
 
@@ -34,17 +37,26 @@ Reload Cursor after install. See `.cursor/references/codegraph.md`.
34
37
 
35
38
  Restart Kiro after install. See `.kiro/references/codegraph.md`.
36
39
 
37
- Or install globally: `codegraph install --target=kiro --yes`
38
-
39
40
  ## Requirements
40
41
 
41
- - **Node 20+** recommended for CodeGraph.
42
+ - **Node 20+** recommended for CodeGraph (class-ai-agent CLI itself supports Node 16.7+).
42
43
  - Index data lives in `.codegraph/` — add to `.gitignore` (class-ai-agent does this automatically).
43
44
 
45
+ ## Tool parameters
46
+
47
+ | Tool | Pass | Not |
48
+ |------|------|-----|
49
+ | `codegraph_search` | `query`, optional `limit` | — |
50
+ | `codegraph_context` | **`task`** (natural-language area), optional **`maxNodes`** | `query`, `limit` |
51
+
52
+ **Session handoff** (`/resume`, `.agent/SESSION.md`) is not a CodeGraph call — read those files with the editor Read tool.
53
+
44
54
  ## Troubleshooting
45
55
 
46
56
  | Issue | Action |
47
57
  |-------|--------|
48
- | `task must be a non-empty string` | On `codegraph_context`, use **`task`** (not `query`) and **`maxNodes`** (not `limit`). For `/resume`, read `.agent/SESSION.md` — not CodeGraph. |
58
+ | `task must be a non-empty string` | Use `task` (not `query`) on `codegraph_context`; use `maxNodes` (not `limit`). For `/resume`, read `.agent/SESSION.md` instead. |
59
+ | MCP "not initialized" | Run `npx @colbymchenry/codegraph init -i` in project root |
60
+ | Stale symbols after edit | Wait ~2s for watcher sync, or check staleness banner in tool output |
49
61
 
50
- See [CodeGraph README — Troubleshooting](https://github.com/colbymchenry/codegraph#troubleshooting) or `.cursor/references/codegraph.md` for MCP setup.
62
+ See [CodeGraph README](https://github.com/colbymchenry/codegraph) for full troubleshooting.
@@ -0,0 +1,55 @@
1
+ # Supabase reference
2
+
3
+ [class-ai-agent](https://github.com/khoantd/class-ai-agent) bundles official [Supabase Agent Skills](https://github.com/supabase/agent-skills) and wires the **Supabase MCP** server for Cursor and Kiro.
4
+
5
+ ## Skills
6
+
7
+ | Skill | Use when |
8
+ |-------|----------|
9
+ | `supabase` | Any Supabase product work: Database, Auth, Edge Functions, Realtime, Storage, CLI, MCP, migrations, RLS, `supabase-js`, `@supabase/ssr` |
10
+ | `supabase-postgres-best-practices` | SQL, schema design, indexes, pooling, RLS performance, query review |
11
+
12
+ Paths: `.cursor/skills/supabase/`, `.cursor/skills/supabase-postgres-best-practices/` (and `.claude/skills/`, `.kiro/skills/` after install).
13
+
14
+ Invoke with **`@`** mention or let the agent load them when the task matches. See each skill’s `SKILL.md` for security checklists and workflow.
15
+
16
+ **Maintainers:** refresh vendored copies with `npm run sync:supabase-skills` (pin in `scripts/supabase-skills.lock.json`).
17
+
18
+ ## MCP (Cursor & Kiro)
19
+
20
+ | Tool | MCP config |
21
+ |------|------------|
22
+ | Cursor | `.cursor/mcp.json` → `mcpServers.supabase` |
23
+ | Kiro | `.kiro/settings/mcp.json` → `mcpServers.supabase` |
24
+
25
+ Server URL: `https://mcp.supabase.com/mcp?features=docs` (HTTP, OAuth 2.1).
26
+
27
+ ### After install
28
+
29
+ 1. **Reload** Cursor or **restart** Kiro so MCP servers connect.
30
+ 2. On first use, complete **OAuth** in the browser when prompted (Supabase account).
31
+ 3. Health check (expect `401` without a token — server is up):
32
+ ```bash
33
+ curl -so /dev/null -w "%{http_code}" "https://mcp.supabase.com/mcp"
34
+ ```
35
+
36
+ Useful MCP tools include `search_docs`, `list_projects`, `list_tables`, `execute_sql`, `get_advisors`, `get_logs`, and migration helpers. Prefer `search_docs` over guessing API behavior.
37
+
38
+ **Note:** Upstream skill text may refer to a project-root `.mcp.json`. In this scaffold, Supabase MCP lives only under `.cursor/mcp.json` and `.kiro/settings/mcp.json` — do not add a duplicate root `.mcp.json`.
39
+
40
+ ## Claude Code
41
+
42
+ Skills install to `.claude/skills/`. Claude Code does not get MCP from this package by default. Options:
43
+
44
+ - [Supabase MCP setup](https://supabase.com/docs/guides/getting-started/mcp)
45
+ - [Supabase plugin for Claude Code](https://github.com/supabase/agent-skills)
46
+
47
+ ## Secrets
48
+
49
+ Never commit service role keys, secret keys, or project tokens. Use environment variables per `.cursor/rules/security.mdc` (and `.claude/rules/security.md`, `.kiro/steering/security.md`).
50
+
51
+ ## Learn more
52
+
53
+ - [Supabase AI skills docs](https://supabase.com/docs/guides/ai-tools/ai-skills)
54
+ - [Upstream repository](https://github.com/supabase/agent-skills)
55
+ - [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md) — license and pinned version
@@ -1,3 +1,4 @@
1
+
1
2
  # Agent continuity
2
3
 
3
4
  Cross-tool handoff lives in **`.agent/SESSION.md`** (committed). Cursor, Claude Code, and Kiro agents share this file.
@@ -5,10 +6,10 @@ Cross-tool handoff lives in **`.agent/SESSION.md`** (committed). Cursor, Claude
5
6
  ## Session start
6
7
 
7
8
  1. If **`.agent/SESSION.md`** exists, read it **before** planning or editing code.
8
- 2. When the user says **continue**, **resume**, or **pick up**, use **`.claude/commands/resume.md`**.
9
+ 2. When the user says **continue**, **resume**, or **pick up**, use **`.claude/commands/resume.md`** (or equivalent in `.claude/` / `.kiro/`).
9
10
  3. Then read **`tasks/todo.md`** and linked **SPEC** paths from SESSION **Pointers**.
10
11
 
11
- **Do not** call `codegraph_context` with `query` / `limit` for session resume — that tool requires **`task`** and is for code symbols, not handoff state. For continuity, read `.agent/SESSION.md` (and `tasks/todo.md`); use `codegraph_context` only when you need structural code context for the work described in SESSION.
12
+ **Do not** call `codegraph_context` with `query` / `limit` for session resume — that tool requires **`task`** and is for code symbols, not handoff state. For continuity, **Read** `.agent/SESSION.md` (and `tasks/todo.md`); use `codegraph_context` only when you need structural code context for the work described in SESSION.
12
13
 
13
14
  ## Session end and phase changes
14
15
 
@@ -1,3 +1,4 @@
1
+
1
2
  # API Conventions
2
3
 
3
4
  ## REST API Design Standards
@@ -1,3 +1,4 @@
1
+
1
2
  # Clean Code — JavaScript Rules
2
3
  > Source: [clean-code-javascript](https://github.com/ryanmcdermott/clean-code-javascript) by Ryan McDermott
3
4
 
@@ -1,3 +1,4 @@
1
+
1
2
  # Code Style Guide
2
3
 
3
4
  ## General Principles