@deimoscloud/coreai 0.1.9 → 0.1.11

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 (196) hide show
  1. package/dist/cli/index.js +7 -0
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/index.js +7 -0
  4. package/dist/index.js.map +1 -1
  5. package/package.json +6 -1
  6. package/.prettierrc +0 -9
  7. package/AGENT_SPEC.md +0 -347
  8. package/ARCHITECTURE.md +0 -547
  9. package/DRAFT_PRD.md +0 -1440
  10. package/IMPLEMENTATION_PLAN.md +0 -256
  11. package/PRODUCT.md +0 -473
  12. package/WORKFLOWS.md +0 -295
  13. package/commands/core/check-inbox.md +0 -34
  14. package/commands/core/delegate.md +0 -30
  15. package/commands/core/git-commit.md +0 -144
  16. package/commands/core/pr-create.md +0 -193
  17. package/commands/core/review.md +0 -56
  18. package/commands/core/sprint-status.md +0 -65
  19. package/commands/optional/docs-update.md +0 -200
  20. package/commands/optional/jira-create.md +0 -200
  21. package/commands/optional/jira-transition.md +0 -184
  22. package/commands/optional/worktree-cleanup.md +0 -167
  23. package/commands/optional/worktree-setup.md +0 -110
  24. package/eslint.config.js +0 -29
  25. package/jest.config.js +0 -22
  26. package/knowledge-library/README.md +0 -118
  27. package/knowledge-library/android-engineer/context/current.txt +0 -42
  28. package/knowledge-library/android-engineer/control/decisions.txt +0 -9
  29. package/knowledge-library/android-engineer/control/dependencies.txt +0 -19
  30. package/knowledge-library/android-engineer/control/objectives.txt +0 -26
  31. package/knowledge-library/android-engineer/history/.gitkeep +0 -0
  32. package/knowledge-library/android-engineer/inbox/processed/.gitkeep +0 -0
  33. package/knowledge-library/android-engineer/outbox/.gitkeep +0 -0
  34. package/knowledge-library/android-engineer/tech/.gitkeep +0 -0
  35. package/knowledge-library/architecture.txt +0 -61
  36. package/knowledge-library/backend-engineer/context/current.txt +0 -42
  37. package/knowledge-library/backend-engineer/control/decisions.txt +0 -9
  38. package/knowledge-library/backend-engineer/control/dependencies.txt +0 -19
  39. package/knowledge-library/backend-engineer/control/objectives.txt +0 -26
  40. package/knowledge-library/backend-engineer/history/.gitkeep +0 -0
  41. package/knowledge-library/backend-engineer/inbox/processed/.gitkeep +0 -0
  42. package/knowledge-library/backend-engineer/outbox/.gitkeep +0 -0
  43. package/knowledge-library/backend-engineer/tech/.gitkeep +0 -0
  44. package/knowledge-library/context.txt +0 -52
  45. package/knowledge-library/devops-engineer/context/current.txt +0 -42
  46. package/knowledge-library/devops-engineer/control/decisions.txt +0 -9
  47. package/knowledge-library/devops-engineer/control/dependencies.txt +0 -19
  48. package/knowledge-library/devops-engineer/control/objectives.txt +0 -26
  49. package/knowledge-library/devops-engineer/history/.gitkeep +0 -0
  50. package/knowledge-library/devops-engineer/inbox/processed/.gitkeep +0 -0
  51. package/knowledge-library/devops-engineer/outbox/.gitkeep +0 -0
  52. package/knowledge-library/devops-engineer/tech/.gitkeep +0 -0
  53. package/knowledge-library/engineering-manager/context/current.txt +0 -40
  54. package/knowledge-library/engineering-manager/control/decisions.txt +0 -9
  55. package/knowledge-library/engineering-manager/control/objectives.txt +0 -27
  56. package/knowledge-library/engineering-manager/history/.gitkeep +0 -0
  57. package/knowledge-library/engineering-manager/inbox/processed/.gitkeep +0 -0
  58. package/knowledge-library/engineering-manager/outbox/.gitkeep +0 -0
  59. package/knowledge-library/engineering-manager/tech/.gitkeep +0 -0
  60. package/knowledge-library/prd.txt +0 -81
  61. package/knowledge-library/product-manager/context/current.txt +0 -42
  62. package/knowledge-library/product-manager/control/decisions.txt +0 -9
  63. package/knowledge-library/product-manager/control/dependencies.txt +0 -19
  64. package/knowledge-library/product-manager/control/objectives.txt +0 -26
  65. package/knowledge-library/product-manager/history/.gitkeep +0 -0
  66. package/knowledge-library/product-manager/inbox/processed/.gitkeep +0 -0
  67. package/knowledge-library/product-manager/outbox/.gitkeep +0 -0
  68. package/knowledge-library/product-manager/tech/.gitkeep +0 -0
  69. package/knowledge-library/qa-engineer/context/current.txt +0 -42
  70. package/knowledge-library/qa-engineer/control/decisions.txt +0 -9
  71. package/knowledge-library/qa-engineer/control/dependencies.txt +0 -19
  72. package/knowledge-library/qa-engineer/control/objectives.txt +0 -26
  73. package/knowledge-library/qa-engineer/history/.gitkeep +0 -0
  74. package/knowledge-library/qa-engineer/inbox/processed/.gitkeep +0 -0
  75. package/knowledge-library/qa-engineer/outbox/.gitkeep +0 -0
  76. package/knowledge-library/qa-engineer/tech/.gitkeep +0 -0
  77. package/knowledge-library/security-engineer/context/current.txt +0 -42
  78. package/knowledge-library/security-engineer/control/decisions.txt +0 -9
  79. package/knowledge-library/security-engineer/control/dependencies.txt +0 -19
  80. package/knowledge-library/security-engineer/control/objectives.txt +0 -26
  81. package/knowledge-library/security-engineer/history/.gitkeep +0 -0
  82. package/knowledge-library/security-engineer/inbox/processed/.gitkeep +0 -0
  83. package/knowledge-library/security-engineer/outbox/.gitkeep +0 -0
  84. package/knowledge-library/security-engineer/tech/.gitkeep +0 -0
  85. package/knowledge-library/solutions-architect/context/current.txt +0 -42
  86. package/knowledge-library/solutions-architect/control/decisions.txt +0 -9
  87. package/knowledge-library/solutions-architect/control/dependencies.txt +0 -19
  88. package/knowledge-library/solutions-architect/control/objectives.txt +0 -26
  89. package/knowledge-library/solutions-architect/history/.gitkeep +0 -0
  90. package/knowledge-library/solutions-architect/inbox/processed/.gitkeep +0 -0
  91. package/knowledge-library/solutions-architect/outbox/.gitkeep +0 -0
  92. package/knowledge-library/solutions-architect/tech/.gitkeep +0 -0
  93. package/knowledge-library/wearos-engineer/context/current.txt +0 -42
  94. package/knowledge-library/wearos-engineer/control/decisions.txt +0 -9
  95. package/knowledge-library/wearos-engineer/control/dependencies.txt +0 -19
  96. package/knowledge-library/wearos-engineer/control/objectives.txt +0 -26
  97. package/knowledge-library/wearos-engineer/history/.gitkeep +0 -0
  98. package/knowledge-library/wearos-engineer/inbox/processed/.gitkeep +0 -0
  99. package/knowledge-library/wearos-engineer/outbox/.gitkeep +0 -0
  100. package/knowledge-library/wearos-engineer/tech/.gitkeep +0 -0
  101. package/scripts/add-agent.sh +0 -323
  102. package/scripts/install.sh +0 -354
  103. package/src/adapters/factory.test.ts +0 -386
  104. package/src/adapters/factory.ts +0 -305
  105. package/src/adapters/index.ts +0 -113
  106. package/src/adapters/interfaces.ts +0 -268
  107. package/src/adapters/mcp/client.test.ts +0 -130
  108. package/src/adapters/mcp/client.ts +0 -451
  109. package/src/adapters/mcp/discovery.test.ts +0 -315
  110. package/src/adapters/mcp/discovery.ts +0 -340
  111. package/src/adapters/mcp/index.ts +0 -66
  112. package/src/adapters/mcp/mapper.test.ts +0 -218
  113. package/src/adapters/mcp/mapper.ts +0 -536
  114. package/src/adapters/mcp/registry.test.ts +0 -433
  115. package/src/adapters/mcp/registry.ts +0 -550
  116. package/src/adapters/mcp/types.ts +0 -258
  117. package/src/adapters/native/filesystem.test.ts +0 -350
  118. package/src/adapters/native/filesystem.ts +0 -393
  119. package/src/adapters/native/github.test.ts +0 -173
  120. package/src/adapters/native/github.ts +0 -627
  121. package/src/adapters/native/index.ts +0 -22
  122. package/src/adapters/native/selector.test.ts +0 -224
  123. package/src/adapters/native/selector.ts +0 -150
  124. package/src/adapters/types.ts +0 -270
  125. package/src/agents/compiler.test.ts +0 -410
  126. package/src/agents/compiler.ts +0 -424
  127. package/src/agents/index.ts +0 -37
  128. package/src/agents/loader.test.ts +0 -319
  129. package/src/agents/loader.ts +0 -143
  130. package/src/agents/resolver.test.ts +0 -282
  131. package/src/agents/resolver.ts +0 -262
  132. package/src/agents/types.ts +0 -97
  133. package/src/cache/index.ts +0 -38
  134. package/src/cache/interfaces.ts +0 -283
  135. package/src/cache/manager.test.ts +0 -266
  136. package/src/cache/manager.ts +0 -388
  137. package/src/cache/provider.test.ts +0 -485
  138. package/src/cache/provider.ts +0 -745
  139. package/src/cache/types.test.ts +0 -192
  140. package/src/cache/types.ts +0 -313
  141. package/src/cli/commands/build.test.ts +0 -248
  142. package/src/cli/commands/build.ts +0 -284
  143. package/src/cli/commands/cache.test.ts +0 -221
  144. package/src/cli/commands/cache.ts +0 -229
  145. package/src/cli/commands/index.ts +0 -63
  146. package/src/cli/commands/init.test.ts +0 -173
  147. package/src/cli/commands/init.ts +0 -296
  148. package/src/cli/commands/skills.test.ts +0 -272
  149. package/src/cli/commands/skills.ts +0 -348
  150. package/src/cli/commands/status.test.ts +0 -392
  151. package/src/cli/commands/status.ts +0 -332
  152. package/src/cli/commands/sync.test.ts +0 -213
  153. package/src/cli/commands/sync.ts +0 -251
  154. package/src/cli/commands/validate.test.ts +0 -216
  155. package/src/cli/commands/validate.ts +0 -340
  156. package/src/cli/index.test.ts +0 -190
  157. package/src/cli/index.ts +0 -493
  158. package/src/commands/context.test.ts +0 -163
  159. package/src/commands/context.ts +0 -111
  160. package/src/commands/index.ts +0 -56
  161. package/src/commands/loader.test.ts +0 -273
  162. package/src/commands/loader.ts +0 -355
  163. package/src/commands/registry.test.ts +0 -384
  164. package/src/commands/registry.ts +0 -248
  165. package/src/commands/runner.test.ts +0 -297
  166. package/src/commands/runner.ts +0 -222
  167. package/src/commands/types.ts +0 -361
  168. package/src/config/index.ts +0 -19
  169. package/src/config/loader.test.ts +0 -262
  170. package/src/config/loader.ts +0 -188
  171. package/src/config/types.ts +0 -154
  172. package/src/context/index.ts +0 -14
  173. package/src/context/loader.test.ts +0 -334
  174. package/src/context/loader.ts +0 -357
  175. package/src/index.test.ts +0 -13
  176. package/src/index.ts +0 -268
  177. package/src/knowledge-library/index.ts +0 -44
  178. package/src/knowledge-library/manager.test.ts +0 -536
  179. package/src/knowledge-library/manager.ts +0 -804
  180. package/src/knowledge-library/types.ts +0 -432
  181. package/src/skills/generator.test.ts +0 -602
  182. package/src/skills/generator.ts +0 -491
  183. package/src/skills/index.ts +0 -27
  184. package/src/skills/templates.ts +0 -520
  185. package/src/skills/types.ts +0 -251
  186. package/templates/completion-report.md +0 -72
  187. package/templates/feedback.md +0 -56
  188. package/templates/project-files/CLAUDE.md.template +0 -109
  189. package/templates/project-files/coreai.json.example +0 -47
  190. package/templates/project-files/mcp.json.template +0 -20
  191. package/templates/review-complete.md +0 -64
  192. package/templates/review-request.md +0 -67
  193. package/templates/task-assignment.md +0 -51
  194. package/tsconfig.build.json +0 -4
  195. package/tsconfig.json +0 -26
  196. package/tsup.config.ts +0 -23
package/PRODUCT.md DELETED
@@ -1,473 +0,0 @@
1
- # CoreAI - Multi-Agent Development System
2
-
3
- > **Product Vision:** A reusable, template-based system for orchestrating AI agents that simulate a software development team.
4
-
5
- ---
6
-
7
- ## Executive Summary
8
-
9
- CoreAI is a framework for setting up AI agent teams that work together on software development tasks. It provides:
10
-
11
- - **Agent definitions** with clear roles and responsibilities
12
- - **Workflow state machines** for ticket lifecycle management
13
- - **Inbox-based communication** for async agent collaboration
14
- - **Standardized message templates** for consistent handoffs
15
- - **Knowledge library structure** for shared context and state
16
-
17
- The system is designed to be cloned and customized for any software project.
18
-
19
- ---
20
-
21
- ## Problem Statement
22
-
23
- ### The Challenge
24
-
25
- When using AI agents for software development:
26
-
27
- 1. **Inconsistent behavior** - Agents forget instructions or ignore workflow rules
28
- 2. **Lost context** - Each conversation starts fresh with no memory
29
- 3. **MCP access issues** - Subagents lose access to external tools (Jira, GitHub)
30
- 4. **Manual overhead** - Too much human intervention required
31
- 5. **No standard patterns** - Each project reinvents agent workflows
32
-
33
- ### Our Solution
34
-
35
- A template-based system that:
36
-
37
- - Embeds critical instructions in commands (not just agent files)
38
- - Maintains persistent context via file-based knowledge library
39
- - Uses direct agent invocation to preserve MCP access
40
- - Provides explicit validation checkpoints
41
- - Can be cloned and customized for any project
42
-
43
- ---
44
-
45
- ## Goals
46
-
47
- ### Primary Goals
48
-
49
- 1. **Reusability** - Clone this template for any new project
50
- 2. **Consistency** - Agents follow workflows reliably
51
- 3. **Minimal overhead** - Reduce human intervention in agent orchestration
52
- 4. **Clear ownership** - Engineers own ticket lifecycle, EM validates
53
-
54
- ### Success Metrics
55
-
56
- - Agents follow ticket workflow correctly (status transitions)
57
- - PRs have proper reviews posted to GitHub (not just inbox)
58
- - Completion reports include valid workflow checkpoints
59
- - New project setup time < 30 minutes
60
-
61
- ---
62
-
63
- ## Architecture
64
-
65
- ### System Overview
66
-
67
- ```
68
- ┌─────────────────────────────────────────────────────────────────┐
69
- │ User │
70
- │ (invokes agents via @agent-name or /command) │
71
- └─────────────────────────────────────────────────────────────────┘
72
-
73
- ┌─────────────────────────────────────────────────────────────────┐
74
- │ Claude Code + MCP │
75
- │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
76
- │ │ Atlassian │ │ GitHub │ │ Other │ │
77
- │ │ (Jira/ │ │ (gh CLI) │ │ MCPs │ │
78
- │ │ Confluence)│ │ │ │ │ │
79
- │ └─────────────┘ └─────────────┘ └─────────────┘ │
80
- └─────────────────────────────────────────────────────────────────┘
81
-
82
- ┌─────────────────────────────────────────────────────────────────┐
83
- │ Agent Layer │
84
- │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
85
- │ │ EM │ │ Engineer │ │ Reviewer │ │ PM │ │
86
- │ │(delegate,│ │(implement│ │(review, │ │(require- │ │
87
- │ │ validate)│ │ own life-│ │ approve) │ │ ments) │ │
88
- │ │ │ │ cycle) │ │ │ │ │ │
89
- │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
90
- └─────────────────────────────────────────────────────────────────┘
91
-
92
- ┌─────────────────────────────────────────────────────────────────┐
93
- │ Knowledge Library │
94
- │ ┌─────────────────────────────────────────────────────────┐ │
95
- │ │ Shared Context: context.txt, architecture.txt, prd.txt │ │
96
- │ └─────────────────────────────────────────────────────────┘ │
97
- │ ┌─────────────────────────────────────────────────────────┐ │
98
- │ │ Agent Directories: inbox/, outbox/, context/, control/ │ │
99
- │ └─────────────────────────────────────────────────────────┘ │
100
- └─────────────────────────────────────────────────────────────────┘
101
- ```
102
-
103
- ### Key Components
104
-
105
- | Component | Location | Purpose |
106
- |-----------|----------|---------|
107
- | Agent Specs | `coreai/AGENT_SPEC.md` | Master behavior specification |
108
- | Workflows | `coreai/WORKFLOWS.md` | State machines for ticket/review |
109
- | Agent Files | `coreai/agents/*.md` | Individual agent definitions |
110
- | Commands | `coreai/commands/*.md` | User-invocable slash commands |
111
- | Templates | `coreai/templates/*.md` | Inbox message formats |
112
- | Knowledge Library | `coreai/knowledge-library/` | Shared context & communication |
113
-
114
- ---
115
-
116
- ## Agent Roles & Responsibilities
117
-
118
- ### Engineering Manager (EM)
119
-
120
- **Role:** Coordination and validation (NOT implementation)
121
-
122
- | Does | Does NOT |
123
- |------|----------|
124
- | Delegate tasks via inbox | Write code |
125
- | Validate completion reports | Create PRs |
126
- | Assign reviewers | Move tickets to In Progress |
127
- | Track sprint progress | Move tickets to In Review |
128
- | Remove blockers | Use Task tool for agents |
129
-
130
- ### IC Engineers (wearos, android, backend, devops)
131
-
132
- **Role:** Implementation with full lifecycle ownership
133
-
134
- | Responsibility | When |
135
- |----------------|------|
136
- | Move ticket to In Progress | On task start |
137
- | Create feature branch | After status update |
138
- | Implement with tests | During development |
139
- | Run quality checks | Before PR |
140
- | Create PR | After tests pass |
141
- | Move ticket to In Review | After PR created |
142
- | Send completion report | After all above |
143
-
144
- ### Reviewers (solutions-architect, security-engineer, qa-engineer)
145
-
146
- **Role:** Code review and specialized guidance
147
-
148
- | Responsibility | Where |
149
- |----------------|-------|
150
- | Review PR thoroughly | GitHub |
151
- | Post review comment | On the PR (not just inbox) |
152
- | State APPROVED or CHANGES_REQUESTED | In PR comment |
153
- | Send summary to EM | Via inbox |
154
-
155
- ### Product Manager
156
-
157
- **Role:** Requirements and prioritization
158
-
159
- ---
160
-
161
- ## Workflow Design
162
-
163
- ### Ticket Implementation Workflow
164
-
165
- ```
166
- BACKLOG → IN_PROGRESS → PR_CREATED → IN_REVIEW → APPROVED → MERGED → DONE
167
- │ │ │ │ │ │ │
168
- │ │ │ │ │ │ │
169
- ▼ ▼ ▼ ▼ ▼ ▼ ▼
170
- EM Engineer Engineer Engineer→ Reviewer User EM
171
- delegates moves tkt, creates PR EM→Reviewer approves merges validates
172
- branches & closes
173
- ```
174
-
175
- ### Key Design Decisions
176
-
177
- 1. **Engineers own ticket lifecycle** - Reduces EM overhead, clearer ownership
178
- 2. **EM validates, doesn't execute** - Separation of concerns
179
- 3. **Reviews on GitHub PR** - Visible to everyone, not hidden in inbox
180
- 4. **Standardized messages** - YAML frontmatter + workflow checkpoint
181
-
182
- ---
183
-
184
- ## Lessons Learned
185
-
186
- ### From SurfTrack Development (3 weeks)
187
-
188
- #### What Worked Well
189
-
190
- 1. **Custom commands** - Embedding instructions in `/delegate`, `/review` prevented agents from ignoring workflow rules
191
- 2. **Inbox-based communication** - Persistent async messaging survived context resets
192
- 3. **Direct @agent invocation** - Full MCP access without workarounds
193
- 4. **Workflow checkpoints** - Explicit validation gates caught issues early
194
- 5. **Processed folder pattern** - Moving messages to `processed/` prevented duplicate work
195
-
196
- #### What Didn't Work
197
-
198
- 1. **Long agent files** - 400+ line agent files were hard to maintain and often ignored
199
- 2. **Implicit validation** - EM wasn't checking if tickets were in correct status
200
- 3. **Freeform messages** - Inconsistent formats led to missed information
201
- 4. **EM doing too much** - EM was moving tickets, should have been engineers
202
- 5. **Task tool for agents** - Lost MCP access, required workarounds
203
-
204
- #### Key Insights
205
-
206
- 1. **Shorter is better** - Lean agent files that reference specs work better than verbose ones
207
- 2. **Commands > Agent files** - Critical instructions in commands get followed more reliably
208
- 3. **Explicit > Implicit** - Validation checklists catch what assumptions miss
209
- 4. **Ownership matters** - Clear ownership of ticket lifecycle reduces back-and-forth
210
-
211
- ### Common Failure Modes
212
-
213
- | Failure | Cause | Solution |
214
- |---------|-------|----------|
215
- | Agent uses Task tool | Default behavior, ignores instructions | FORBIDDEN ACTIONS section + commands |
216
- | Review not posted to PR | Agent only sends to inbox | Explicit requirement in reviewer template |
217
- | Ticket stuck in wrong status | Engineer didn't move it | Engineer responsibility in workflow |
218
- | Missing workflow checkpoint | Agent forgot | Required in completion report template |
219
- | Duplicate work | Inbox message processed twice | Move to `processed/` folder |
220
-
221
- ---
222
-
223
- ## Agent Autonomy Roadmap
224
-
225
- ### Phase 1: Task Tool Subagents (Deprecated)
226
-
227
- **Status:** Superseded
228
-
229
- - Agents invoked via Task tool as subagents
230
- - No MCP access - required workarounds
231
- - User/parent executed MCP operations on agent's behalf
232
-
233
- **User effort:** High
234
-
235
- ### Phase 2: Direct Agent Invocation (Current)
236
-
237
- **Status:** Active
238
-
239
- ```
240
- @engineering-manager /delegate SUR-XX to wearos-engineer
241
- @wearos-engineer /check-inbox
242
- ```
243
-
244
- **Benefits:**
245
- - Full MCP access (Atlassian, GitHub)
246
- - No workarounds needed
247
- - Agents can update Jira/GitHub directly
248
-
249
- **Limitations:**
250
- - Can't approve own PRs (GitHub restriction)
251
- - User must invoke each agent manually
252
- - No automatic agent-to-agent handoffs
253
-
254
- **User effort:** Low-Medium
255
-
256
- ### Phase 3: Agent-to-Agent Orchestration (Future)
257
-
258
- EM can directly invoke other agents with full MCP access.
259
-
260
- **Requirements:**
261
- - Agent invocation that preserves MCP context
262
- - Or: Each agent as separate root conversation
263
- - Possibly: Claude Code hooks
264
-
265
- **User effort:** Low
266
-
267
- ### Phase 4: Event-Driven Automation (Future)
268
-
269
- Agents triggered by events:
270
-
271
- | Event | Trigger | Action |
272
- |-------|---------|--------|
273
- | PR created | GitHub webhook | QA runs tests |
274
- | CI passes | GitHub Actions | SA reviews |
275
- | Review approved | PR comment | EM notified |
276
-
277
- **Requirements:**
278
- - Webhook infrastructure
279
- - Agent persistence
280
- - Event routing
281
-
282
- **User effort:** Minimal
283
-
284
- ### Phase 5: Full Autonomy (Vision)
285
-
286
- - Agents collaborate without intervention
287
- - Self-healing and self-improving
288
- - Human-in-the-loop only for strategic decisions
289
-
290
- ---
291
-
292
- ## Implementation Approaches
293
-
294
- ### Option A: Shared Knowledge Base (Current)
295
-
296
- ```
297
- ┌─────────────────────────────────┐
298
- │ Knowledge Library │
299
- │ ├── context.txt │
300
- │ └── [agent]/inbox/ │
301
- └─────────────────────────────────┘
302
- ↑ ↑ ↑
303
- Agent 1 Agent 2 Agent 3
304
- (root) (root) (root)
305
- ```
306
-
307
- - Agents communicate via inbox files
308
- - User invokes agents as needed
309
- - Each has full MCP access
310
-
311
- ### Option B: Custom Orchestration Layer
312
-
313
- External service manages agent invocation:
314
-
315
- ```
316
- ┌────────────────────────────┐
317
- │ Orchestration Service │
318
- │ - Event listeners │
319
- │ - Agent invocation API │
320
- └────────────────────────────┘
321
- ↓ invokes
322
- Claude Agents (via API)
323
- ```
324
-
325
- ### Option C: Claude Code Hooks
326
-
327
- Use hooks for event-driven automation:
328
-
329
- ```javascript
330
- // .claude/hooks/pr-created.js
331
- module.exports = async (context) => {
332
- await context.invokeAgent('solutions-architect', {
333
- task: `Review PR #${context.pr.number}`
334
- });
335
- };
336
- ```
337
-
338
- ---
339
-
340
- ## Directory Structure
341
-
342
- ```
343
- coreai/
344
- ├── PRODUCT.md # This file - vision, goals, lessons
345
- ├── README.md # Setup instructions
346
- ├── AGENT_SPEC.md # Master agent specification
347
- ├── WORKFLOWS.md # Workflow state machines
348
- ├── ARCHITECTURE.md # Technical architecture
349
-
350
- ├── scripts/
351
- │ ├── install.sh # Main installer
352
- │ └── add-agent.sh # Add new agent
353
-
354
- ├── agents/
355
- │ ├── _templates/ # Agent templates for add-agent.sh
356
- │ │ ├── ic-engineer.md
357
- │ │ └── reviewer.md
358
- │ └── examples/ # Ready-to-use agents (copied on install)
359
- │ ├── engineering-manager.md
360
- │ ├── backend-engineer.md
361
- │ ├── android-engineer.md
362
- │ ├── wearos-engineer.md
363
- │ ├── devops-engineer.md
364
- │ ├── solutions-architect.md
365
- │ ├── qa-engineer.md
366
- │ ├── security-engineer.md
367
- │ ├── product-manager.md
368
- │ └── frontend-engineer.md
369
-
370
- ├── commands/
371
- │ ├── core/ # Always installed
372
- │ │ ├── delegate.md
373
- │ │ ├── check-inbox.md
374
- │ │ ├── review.md
375
- │ │ ├── sprint-status.md
376
- │ │ ├── git-commit.md
377
- │ │ └── pr-create.md
378
- │ └── optional/ # Install as needed
379
- │ ├── worktree-setup.md
380
- │ ├── worktree-cleanup.md
381
- │ ├── jira-create.md
382
- │ ├── jira-transition.md
383
- │ └── docs-update.md
384
-
385
- ├── templates/ # Inbox message formats
386
- │ ├── task-assignment.md
387
- │ ├── completion-report.md
388
- │ ├── review-request.md
389
- │ ├── review-complete.md
390
- │ └── feedback.md
391
-
392
- └── knowledge-library/ # → KnowledgeLibrary/
393
- ├── README.md
394
- ├── context.txt
395
- ├── architecture.txt
396
- ├── prd.txt
397
- └── [agent-name]/
398
- ├── inbox/processed/
399
- ├── outbox/
400
- ├── context/current.txt
401
- ├── history/
402
- ├── tech/
403
- └── control/
404
- ```
405
-
406
- ---
407
-
408
- ## Quick Start for New Project
409
-
410
- ```bash
411
- # 1. Navigate to your project
412
- cd /path/to/your-project
413
-
414
- # 2. Run the installer
415
- /path/to/coreai/scripts/install.sh \
416
- --name "Your Project" \
417
- --jira "PROJ" \
418
- --github "owner/repo" \
419
- --agents "engineering-manager,backend-engineer,qa-engineer" \
420
- --all-commands
421
-
422
- # 3. Add additional agents as needed
423
- ./coreai/scripts/add-agent.sh frontend-engineer --type ic
424
- ./coreai/scripts/add-agent.sh security-engineer --type reviewer
425
-
426
- # 4. Customize
427
- # - Update tech stack in agent files
428
- # - Update Jira project key, GitHub repo
429
- # - Fill in KnowledgeLibrary/context.txt, architecture.txt, prd.txt
430
- ```
431
-
432
- ---
433
-
434
- ## Next Steps
435
-
436
- ### Immediate
437
-
438
- 1. Test the template with a sample workflow
439
- 2. Create specific engineer agents from templates
440
- 3. Validate message templates work as expected
441
-
442
- ### Short Term
443
-
444
- 1. Migrate SurfTrack to use coreai patterns
445
- 2. Refine based on real usage
446
- 3. Add more commands as needed
447
-
448
- ### Medium Term
449
-
450
- 1. Explore Phase 3 (agent-to-agent orchestration)
451
- 2. Consider GitHub Actions integration
452
- 3. Build release/hotfix commands
453
-
454
- ### Long Term
455
-
456
- 1. Event-driven automation
457
- 2. Self-improving agent patterns
458
- 3. Full autonomy for routine tasks
459
-
460
- ---
461
-
462
- ## References
463
-
464
- - [README.md](README.md) - Setup instructions
465
- - [AGENT_SPEC.md](AGENT_SPEC.md) - Master specification
466
- - [WORKFLOWS.md](WORKFLOWS.md) - State machines
467
- - [knowledge-library/README.md](knowledge-library/README.md) - Communication hub
468
-
469
- ---
470
-
471
- *Version: 1.0.0*
472
- *Created: 2026-01-05*
473
- *Origin: SurfTrack multi-agent system learnings*