class-ai-agent 1.4.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.
- package/.agent/SESSION.md +18 -13
- package/.claude/CLAUDE.md +23 -0
- package/.claude/agents/business-analyst.md +380 -0
- package/.claude/references/codegraph.md +26 -14
- package/.claude/rules/agent-continuity.md +3 -2
- package/.claude/rules/api-conventions.md +1 -0
- package/.claude/rules/clean-code.md +1 -0
- package/.claude/rules/code-style.md +1 -0
- package/.claude/rules/codegraph.md +43 -0
- package/.claude/rules/database.md +2 -1
- package/.claude/rules/error-handling.md +1 -0
- package/.claude/rules/git-workflow.md +1 -0
- package/.claude/rules/monitoring.md +1 -0
- package/.claude/rules/naming-conventions.md +1 -0
- package/.claude/rules/project-structure.md +1 -0
- package/.claude/rules/security.md +1 -0
- package/.claude/rules/system-design.md +1 -0
- package/.claude/rules/tech-stack.md +1 -0
- package/.claude/rules/testing.md +1 -0
- package/.claude/settings.json +3 -1
- package/.claude/skills/ui-ux-pro-max/SKILL.md +1 -90
- package/.cursor/CURSOR.md +1 -1
- package/.cursor/agents/business-analyst.md +380 -0
- package/.cursor/rules/cursor-overview.mdc +1 -1
- package/.cursor/rules/database.mdc +2 -2
- package/.kiro/KIRO.md +3 -3
- package/.kiro/agents/business-analyst.md +380 -0
- package/.kiro/steering/database.md +2 -2
- package/.kiro/steering/kiro-overview.md +1 -1
- package/AGENTS.md +20 -1
- package/README.md +17 -8
- package/package.json +4 -2
package/.agent/SESSION.md
CHANGED
|
@@ -6,43 +6,48 @@
|
|
|
6
6
|
|
|
7
7
|
| Field | Value |
|
|
8
8
|
|-------|-------|
|
|
9
|
-
| **Updated** | 2026-06-
|
|
10
|
-
| **Phase** |
|
|
9
|
+
| **Updated** | 2026-06-17 |
|
|
10
|
+
| **Phase** | review |
|
|
11
11
|
| **Tool** | cursor |
|
|
12
12
|
| **Persona** | _(maintainer)_ |
|
|
13
13
|
|
|
14
14
|
## Goal
|
|
15
15
|
|
|
16
|
-
|
|
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
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
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
|
-
-
|
|
29
|
+
- _(none)_
|
|
27
30
|
- **Blockers:** none
|
|
28
31
|
|
|
29
32
|
## Next
|
|
30
33
|
|
|
31
|
-
1.
|
|
32
|
-
2.
|
|
33
|
-
3.
|
|
34
|
-
4. Run `/handoff`
|
|
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
|
-
-
|
|
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`, `
|
|
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 |
|
|
@@ -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
|
|
5
|
+
## Claude Code (included with class-ai-agent)
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
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` |
|
|
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
|
|
62
|
+
See [CodeGraph README](https://github.com/colbymchenry/codegraph) for full troubleshooting.
|
|
@@ -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,
|
|
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
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
## CodeGraph
|
|
3
|
+
|
|
4
|
+
This project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.
|
|
5
|
+
|
|
6
|
+
### When to prefer codegraph over native search
|
|
7
|
+
|
|
8
|
+
Use codegraph for **structural** questions — what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.
|
|
9
|
+
|
|
10
|
+
| Question | Tool |
|
|
11
|
+
|---|---|
|
|
12
|
+
| "Where is X defined?" / "Find symbol named X" | `codegraph_search` |
|
|
13
|
+
| "What calls function Y?" | `codegraph_callers` |
|
|
14
|
+
| "What does Y call?" | `codegraph_callees` |
|
|
15
|
+
| "How does X reach/become Y? / trace the flow from X to Y" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) |
|
|
16
|
+
| "What would break if I changed Z?" | `codegraph_impact` |
|
|
17
|
+
| "Show me Y's signature / source / docstring" | `codegraph_node` |
|
|
18
|
+
| "Give me focused context for a task/area" | `codegraph_context` |
|
|
19
|
+
| "See several related symbols' source at once" | `codegraph_explore` |
|
|
20
|
+
| "What files exist under path/" | `codegraph_files` |
|
|
21
|
+
| "Is the index healthy?" | `codegraph_status` |
|
|
22
|
+
|
|
23
|
+
### Tool parameters (do not mix)
|
|
24
|
+
|
|
25
|
+
| Tool | Required arg | Optional cap | Wrong args → error |
|
|
26
|
+
|------|--------------|--------------|-------------------|
|
|
27
|
+
| `codegraph_search` | **`query`** (symbol name) | `limit` (default 10) | — |
|
|
28
|
+
| `codegraph_context` | **`task`** (feature/bug description) | `maxNodes` (default 20) | `query` / `limit` → **`task must be a non-empty string`** |
|
|
29
|
+
|
|
30
|
+
`codegraph_context` is for **code structure** around a task — not for loading **`.agent/SESSION.md`** or `/resume` handoff (use **Read** + `.claude/commands/resume.md`).
|
|
31
|
+
|
|
32
|
+
### Rules of thumb
|
|
33
|
+
|
|
34
|
+
- **Answer directly — don't delegate exploration.** For "how does X work" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** ("how does X reach Y") start with `codegraph_trace` from→to — one call returns the whole path with dynamic hops bridged — then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent — or running a grep + read loop — repeats work codegraph already did and costs more for the same answer.
|
|
35
|
+
- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep — that's slower, less accurate, and wastes context.
|
|
36
|
+
- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.
|
|
37
|
+
- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context — `codegraph_context` is one call.
|
|
38
|
+
- **Don't loop `codegraph_node` over many symbols** — one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.
|
|
39
|
+
- **Index lag — check the staleness banner, don't guess a wait.** When a codegraph response starts with "⚠️ Some files referenced below were edited since the last index sync…", the listed files are pending re-index — Read those specific files for accurate content. Files NOT in that banner are fresh and codegraph is authoritative for them. `codegraph_status` also lists pending files under "Pending sync".
|
|
40
|
+
|
|
41
|
+
### If `.codegraph/` doesn't exist
|
|
42
|
+
|
|
43
|
+
The MCP server returns "not initialized." Ask the user: *"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?"*
|