@bhimudev/gnanai 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +270 -0
  2. package/dist/bin/cli.d.ts +3 -0
  3. package/dist/bin/cli.d.ts.map +1 -0
  4. package/dist/bin/cli.js +188 -0
  5. package/dist/bin/cli.js.map +1 -0
  6. package/dist/commands/cleanup.d.ts +21 -0
  7. package/dist/commands/cleanup.d.ts.map +1 -0
  8. package/dist/commands/cleanup.js +380 -0
  9. package/dist/commands/cleanup.js.map +1 -0
  10. package/dist/commands/dispatch.d.ts +13 -0
  11. package/dist/commands/dispatch.d.ts.map +1 -0
  12. package/dist/commands/dispatch.js +85 -0
  13. package/dist/commands/dispatch.js.map +1 -0
  14. package/dist/commands/doctor.d.ts +2 -0
  15. package/dist/commands/doctor.d.ts.map +1 -0
  16. package/dist/commands/doctor.js +155 -0
  17. package/dist/commands/doctor.js.map +1 -0
  18. package/dist/commands/generate.d.ts +3 -0
  19. package/dist/commands/generate.d.ts.map +1 -0
  20. package/dist/commands/generate.js +167 -0
  21. package/dist/commands/generate.js.map +1 -0
  22. package/dist/commands/init.d.ts +10 -0
  23. package/dist/commands/init.d.ts.map +1 -0
  24. package/dist/commands/init.js +711 -0
  25. package/dist/commands/init.js.map +1 -0
  26. package/dist/commands/knowledge-sync.d.ts +69 -0
  27. package/dist/commands/knowledge-sync.d.ts.map +1 -0
  28. package/dist/commands/knowledge-sync.js +661 -0
  29. package/dist/commands/knowledge-sync.js.map +1 -0
  30. package/dist/commands/knowledge.d.ts +35 -0
  31. package/dist/commands/knowledge.d.ts.map +1 -0
  32. package/dist/commands/knowledge.js +254 -0
  33. package/dist/commands/knowledge.js.map +1 -0
  34. package/dist/commands/rollback.d.ts +13 -0
  35. package/dist/commands/rollback.d.ts.map +1 -0
  36. package/dist/commands/rollback.js +186 -0
  37. package/dist/commands/rollback.js.map +1 -0
  38. package/dist/commands/setup-config.d.ts +6 -0
  39. package/dist/commands/setup-config.d.ts.map +1 -0
  40. package/dist/commands/setup-config.js +663 -0
  41. package/dist/commands/setup-config.js.map +1 -0
  42. package/dist/commands/setup-project.d.ts +6 -0
  43. package/dist/commands/setup-project.d.ts.map +1 -0
  44. package/dist/commands/setup-project.js +361 -0
  45. package/dist/commands/setup-project.js.map +1 -0
  46. package/dist/commands/setup.d.ts +3 -0
  47. package/dist/commands/setup.d.ts.map +1 -0
  48. package/dist/commands/setup.js +293 -0
  49. package/dist/commands/setup.js.map +1 -0
  50. package/dist/commands/status.d.ts +51 -0
  51. package/dist/commands/status.d.ts.map +1 -0
  52. package/dist/commands/status.js +182 -0
  53. package/dist/commands/status.js.map +1 -0
  54. package/dist/commands/uninstall.d.ts +3 -0
  55. package/dist/commands/uninstall.d.ts.map +1 -0
  56. package/dist/commands/uninstall.js +173 -0
  57. package/dist/commands/uninstall.js.map +1 -0
  58. package/dist/commands/update.d.ts +10 -0
  59. package/dist/commands/update.d.ts.map +1 -0
  60. package/dist/commands/update.js +435 -0
  61. package/dist/commands/update.js.map +1 -0
  62. package/dist/commands/worktree.d.ts +30 -0
  63. package/dist/commands/worktree.d.ts.map +1 -0
  64. package/dist/commands/worktree.js +262 -0
  65. package/dist/commands/worktree.js.map +1 -0
  66. package/dist/generator/claude-cli.d.ts +24 -0
  67. package/dist/generator/claude-cli.d.ts.map +1 -0
  68. package/dist/generator/claude-cli.js +239 -0
  69. package/dist/generator/claude-cli.js.map +1 -0
  70. package/dist/generator/prompt-builder.d.ts +7 -0
  71. package/dist/generator/prompt-builder.d.ts.map +1 -0
  72. package/dist/generator/prompt-builder.js +144 -0
  73. package/dist/generator/prompt-builder.js.map +1 -0
  74. package/dist/index.d.ts +36 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +45 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/mcp/embeddings.d.ts +53 -0
  79. package/dist/mcp/embeddings.d.ts.map +1 -0
  80. package/dist/mcp/embeddings.js +68 -0
  81. package/dist/mcp/embeddings.js.map +1 -0
  82. package/dist/mcp/hybrid-search.d.ts +25 -0
  83. package/dist/mcp/hybrid-search.d.ts.map +1 -0
  84. package/dist/mcp/hybrid-search.js +72 -0
  85. package/dist/mcp/hybrid-search.js.map +1 -0
  86. package/dist/mcp/knowledge-server.d.ts +4 -0
  87. package/dist/mcp/knowledge-server.d.ts.map +1 -0
  88. package/dist/mcp/knowledge-server.js +294 -0
  89. package/dist/mcp/knowledge-server.js.map +1 -0
  90. package/dist/mcp/knowledge-utils.d.ts +65 -0
  91. package/dist/mcp/knowledge-utils.d.ts.map +1 -0
  92. package/dist/mcp/knowledge-utils.js +207 -0
  93. package/dist/mcp/knowledge-utils.js.map +1 -0
  94. package/dist/mcp/search-factory.d.ts +9 -0
  95. package/dist/mcp/search-factory.d.ts.map +1 -0
  96. package/dist/mcp/search-factory.js +23 -0
  97. package/dist/mcp/search-factory.js.map +1 -0
  98. package/dist/mcp/search-index.d.ts +45 -0
  99. package/dist/mcp/search-index.d.ts.map +1 -0
  100. package/dist/mcp/search-index.js +2 -0
  101. package/dist/mcp/search-index.js.map +1 -0
  102. package/dist/mcp/search-minisearch.d.ts +46 -0
  103. package/dist/mcp/search-minisearch.d.ts.map +1 -0
  104. package/dist/mcp/search-minisearch.js +99 -0
  105. package/dist/mcp/search-minisearch.js.map +1 -0
  106. package/dist/mcp/search-sqlite.d.ts +30 -0
  107. package/dist/mcp/search-sqlite.d.ts.map +1 -0
  108. package/dist/mcp/search-sqlite.js +188 -0
  109. package/dist/mcp/search-sqlite.js.map +1 -0
  110. package/dist/mcp/vector-store.d.ts +52 -0
  111. package/dist/mcp/vector-store.d.ts.map +1 -0
  112. package/dist/mcp/vector-store.js +183 -0
  113. package/dist/mcp/vector-store.js.map +1 -0
  114. package/dist/scaffold/copy-core-agents.d.ts +2 -0
  115. package/dist/scaffold/copy-core-agents.d.ts.map +1 -0
  116. package/dist/scaffold/copy-core-agents.js +90 -0
  117. package/dist/scaffold/copy-core-agents.js.map +1 -0
  118. package/dist/scaffold/create-claude-settings.d.ts +40 -0
  119. package/dist/scaffold/create-claude-settings.d.ts.map +1 -0
  120. package/dist/scaffold/create-claude-settings.js +422 -0
  121. package/dist/scaffold/create-claude-settings.js.map +1 -0
  122. package/dist/scaffold/create-config.d.ts +14 -0
  123. package/dist/scaffold/create-config.d.ts.map +1 -0
  124. package/dist/scaffold/create-config.js +199 -0
  125. package/dist/scaffold/create-config.js.map +1 -0
  126. package/dist/scaffold/create-project-description.d.ts +12 -0
  127. package/dist/scaffold/create-project-description.d.ts.map +1 -0
  128. package/dist/scaffold/create-project-description.js +104 -0
  129. package/dist/scaffold/create-project-description.js.map +1 -0
  130. package/dist/scaffold/create-structure.d.ts +2 -0
  131. package/dist/scaffold/create-structure.d.ts.map +1 -0
  132. package/dist/scaffold/create-structure.js +146 -0
  133. package/dist/scaffold/create-structure.js.map +1 -0
  134. package/dist/types/dependency-analysis.d.ts +11 -0
  135. package/dist/types/dependency-analysis.d.ts.map +1 -0
  136. package/dist/types/dependency-analysis.js +2 -0
  137. package/dist/types/dependency-analysis.js.map +1 -0
  138. package/dist/types/index.d.ts +526 -0
  139. package/dist/types/index.d.ts.map +1 -0
  140. package/dist/types/index.js +3 -0
  141. package/dist/types/index.js.map +1 -0
  142. package/dist/types/task.d.ts +25 -0
  143. package/dist/types/task.d.ts.map +1 -0
  144. package/dist/types/task.js +3 -0
  145. package/dist/types/task.js.map +1 -0
  146. package/dist/utils/analyze-files.d.ts +7 -0
  147. package/dist/utils/analyze-files.d.ts.map +1 -0
  148. package/dist/utils/analyze-files.js +27 -0
  149. package/dist/utils/analyze-files.js.map +1 -0
  150. package/dist/utils/backup.d.ts +102 -0
  151. package/dist/utils/backup.d.ts.map +1 -0
  152. package/dist/utils/backup.js +352 -0
  153. package/dist/utils/backup.js.map +1 -0
  154. package/dist/utils/ci-provider.d.ts +23 -0
  155. package/dist/utils/ci-provider.d.ts.map +1 -0
  156. package/dist/utils/ci-provider.js +525 -0
  157. package/dist/utils/ci-provider.js.map +1 -0
  158. package/dist/utils/ci-status.d.ts +57 -0
  159. package/dist/utils/ci-status.d.ts.map +1 -0
  160. package/dist/utils/ci-status.js +349 -0
  161. package/dist/utils/ci-status.js.map +1 -0
  162. package/dist/utils/dependency-analysis.d.ts +34 -0
  163. package/dist/utils/dependency-analysis.d.ts.map +1 -0
  164. package/dist/utils/dependency-analysis.js +298 -0
  165. package/dist/utils/dependency-analysis.js.map +1 -0
  166. package/dist/utils/detect-git.d.ts +57 -0
  167. package/dist/utils/detect-git.d.ts.map +1 -0
  168. package/dist/utils/detect-git.js +439 -0
  169. package/dist/utils/detect-git.js.map +1 -0
  170. package/dist/utils/detect-mcp.d.ts +32 -0
  171. package/dist/utils/detect-mcp.d.ts.map +1 -0
  172. package/dist/utils/detect-mcp.js +178 -0
  173. package/dist/utils/detect-mcp.js.map +1 -0
  174. package/dist/utils/detect-project.d.ts +3 -0
  175. package/dist/utils/detect-project.d.ts.map +1 -0
  176. package/dist/utils/detect-project.js +155 -0
  177. package/dist/utils/detect-project.js.map +1 -0
  178. package/dist/utils/file-comparison.d.ts +89 -0
  179. package/dist/utils/file-comparison.d.ts.map +1 -0
  180. package/dist/utils/file-comparison.js +301 -0
  181. package/dist/utils/file-comparison.js.map +1 -0
  182. package/dist/utils/file-merger.d.ts +74 -0
  183. package/dist/utils/file-merger.d.ts.map +1 -0
  184. package/dist/utils/file-merger.js +350 -0
  185. package/dist/utils/file-merger.js.map +1 -0
  186. package/dist/utils/logger.d.ts +26 -0
  187. package/dist/utils/logger.d.ts.map +1 -0
  188. package/dist/utils/logger.js +72 -0
  189. package/dist/utils/logger.js.map +1 -0
  190. package/dist/utils/managed-process.d.ts +109 -0
  191. package/dist/utils/managed-process.d.ts.map +1 -0
  192. package/dist/utils/managed-process.js +481 -0
  193. package/dist/utils/managed-process.js.map +1 -0
  194. package/dist/utils/merge-claude-settings.d.ts +65 -0
  195. package/dist/utils/merge-claude-settings.d.ts.map +1 -0
  196. package/dist/utils/merge-claude-settings.js +133 -0
  197. package/dist/utils/merge-claude-settings.js.map +1 -0
  198. package/dist/utils/migration.d.ts +74 -0
  199. package/dist/utils/migration.d.ts.map +1 -0
  200. package/dist/utils/migration.js +345 -0
  201. package/dist/utils/migration.js.map +1 -0
  202. package/dist/utils/process-health.d.ts +51 -0
  203. package/dist/utils/process-health.d.ts.map +1 -0
  204. package/dist/utils/process-health.js +123 -0
  205. package/dist/utils/process-health.js.map +1 -0
  206. package/dist/utils/process-registry.d.ts +20 -0
  207. package/dist/utils/process-registry.d.ts.map +1 -0
  208. package/dist/utils/process-registry.js +151 -0
  209. package/dist/utils/process-registry.js.map +1 -0
  210. package/dist/utils/process-tree.d.ts +51 -0
  211. package/dist/utils/process-tree.d.ts.map +1 -0
  212. package/dist/utils/process-tree.js +499 -0
  213. package/dist/utils/process-tree.js.map +1 -0
  214. package/dist/utils/repair-mcp-config.d.ts +15 -0
  215. package/dist/utils/repair-mcp-config.d.ts.map +1 -0
  216. package/dist/utils/repair-mcp-config.js +129 -0
  217. package/dist/utils/repair-mcp-config.js.map +1 -0
  218. package/dist/utils/task-lifecycle.d.ts +60 -0
  219. package/dist/utils/task-lifecycle.d.ts.map +1 -0
  220. package/dist/utils/task-lifecycle.js +310 -0
  221. package/dist/utils/task-lifecycle.js.map +1 -0
  222. package/dist/utils/update-agent-mcp.d.ts +7 -0
  223. package/dist/utils/update-agent-mcp.d.ts.map +1 -0
  224. package/dist/utils/update-agent-mcp.js +115 -0
  225. package/dist/utils/update-agent-mcp.js.map +1 -0
  226. package/dist/utils/update-agent-templates.d.ts +6 -0
  227. package/dist/utils/update-agent-templates.d.ts.map +1 -0
  228. package/dist/utils/update-agent-templates.js +56 -0
  229. package/dist/utils/update-agent-templates.js.map +1 -0
  230. package/dist/utils/update-config-ci.d.ts +7 -0
  231. package/dist/utils/update-config-ci.d.ts.map +1 -0
  232. package/dist/utils/update-config-ci.js +72 -0
  233. package/dist/utils/update-config-ci.js.map +1 -0
  234. package/dist/utils/update-config-git.d.ts +18 -0
  235. package/dist/utils/update-config-git.d.ts.map +1 -0
  236. package/dist/utils/update-config-git.js +146 -0
  237. package/dist/utils/update-config-git.js.map +1 -0
  238. package/dist/utils/update-config-mcp.d.ts +7 -0
  239. package/dist/utils/update-config-mcp.d.ts.map +1 -0
  240. package/dist/utils/update-config-mcp.js +98 -0
  241. package/dist/utils/update-config-mcp.js.map +1 -0
  242. package/dist/utils/validate-config.d.ts +3 -0
  243. package/dist/utils/validate-config.d.ts.map +1 -0
  244. package/dist/utils/validate-config.js +109 -0
  245. package/dist/utils/validate-config.js.map +1 -0
  246. package/dist/utils/version-tracker.d.ts +130 -0
  247. package/dist/utils/version-tracker.d.ts.map +1 -0
  248. package/dist/utils/version-tracker.js +298 -0
  249. package/dist/utils/version-tracker.js.map +1 -0
  250. package/dist/utils/worktree.d.ts +68 -0
  251. package/dist/utils/worktree.d.ts.map +1 -0
  252. package/dist/utils/worktree.js +446 -0
  253. package/dist/utils/worktree.js.map +1 -0
  254. package/package.json +77 -0
  255. package/templates/ARCHAI_README.md +329 -0
  256. package/templates/CLAUDE.md +67 -0
  257. package/templates/PROMPTS.md +506 -0
  258. package/templates/core-agents/boss-agent.md +671 -0
  259. package/templates/core-agents/cleanup-agent.md +145 -0
  260. package/templates/core-agents/code-reviewer.md +175 -0
  261. package/templates/core-agents/critical-reviewer.md +117 -0
  262. package/templates/core-agents/deep-analyst.md +216 -0
  263. package/templates/core-agents/finalization-agent.md +252 -0
  264. package/templates/core-agents/git-coordinator.md +240 -0
  265. package/templates/core-agents/implementation-agent.md +151 -0
  266. package/templates/core-agents/maestro-agent.md +413 -0
  267. package/templates/core-agents/maestro-headless-agent.md +422 -0
  268. package/templates/core-agents/plan-validator.md +198 -0
  269. package/templates/core-agents/quick-fix.md +56 -0
  270. package/templates/core-agents/routing-templates.md +338 -0
  271. package/templates/core-agents/task-orchestrator.md +143 -0
  272. package/templates/core-agents/task-prep.md +202 -0
  273. package/templates/core-agents/tdd-designer.md +143 -0
  274. package/templates/specialist-meta.md +275 -0
@@ -0,0 +1,329 @@
1
+ # archai Agent System
2
+
3
+ This project uses **archai** - a multi-agent AI development workflow powered by Claude Code.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Open Claude Code in this project
9
+ claude
10
+
11
+ # Start with the full workflow
12
+ > "Use iteration-controller for: [your task description]"
13
+ ```
14
+
15
+ ## How It Works
16
+
17
+ ### The Three-Phase Workflow
18
+
19
+ ```
20
+ Phase 1: PLANNING (requires your approval)
21
+
22
+ ├── deep-analyst → Analyzes the task deeply
23
+ ├── plan-validator → Challenges the plan, finds gaps
24
+ └── tdd-designer → Designs tests BEFORE code
25
+
26
+
27
+ 🛑 STOP: Review plan → Say "APPROVE" or "REVISE: [feedback]"
28
+
29
+
30
+ Phase 2: IMPLEMENTATION (autonomous after approval)
31
+
32
+ ├── implementation-agent → Writes code following the plan
33
+ └── code-reviewer → Verifies the implementation
34
+
35
+
36
+ 🛑 STOP: Review implementation → Say "APPROVE" to finalize
37
+
38
+
39
+ Phase 3: FINALIZATION
40
+
41
+ ├── cleanup-agent → Cleans temporary files
42
+ ├── finalization-agent → Commits, pushes, verifies CI
43
+ └── git-coordinator → Merges branches, resolves conflicts
44
+ ```
45
+
46
+ ### Key Principle: Think Before Coding
47
+
48
+ **No code is written until you approve the plan.** This prevents:
49
+ - Implementing the wrong thing
50
+ - Missing edge cases
51
+ - Rewriting code due to poor planning
52
+
53
+ ## Launching Tasks
54
+
55
+ ### For New Features (Full Workflow)
56
+
57
+ ```
58
+ Use iteration-controller for: Add user authentication with JWT
59
+
60
+ Run Phase 1 with at least 2 iterations.
61
+ Write plan to .claude/plans/jwt-auth.md.
62
+ STOP and wait for my APPROVE before implementing.
63
+ ```
64
+
65
+ ### For Quick Fixes (Skip Planning)
66
+
67
+ ```
68
+ Use implementation-agent for: Fix the typo in Header.tsx
69
+ ```
70
+
71
+ ### For Analysis Only
72
+
73
+ ```
74
+ Use deep-analyst for: Analyze how the caching layer works
75
+ ```
76
+
77
+ ## Prompting Guide
78
+
79
+ ### Starting a Task
80
+
81
+ | What you want | Prompt |
82
+ |---------------|--------|
83
+ | New feature | `Use iteration-controller for: [feature]` |
84
+ | Bug fix (complex) | `Use iteration-controller for: [bug description]` |
85
+ | Bug fix (simple) | `Use implementation-agent for: [fix]` |
86
+ | Code analysis | `Use deep-analyst for: [what to analyze]` |
87
+ | Test design | `Use tdd-designer for: [feature to test]` |
88
+ | Code review | `Use code-reviewer for: [what to review]` |
89
+ | Branch merging | `Use git-coordinator for: Merge branches X and Y into dev` |
90
+ | Batch task execution | `claude --agent boss-agent` then: "Process the tasks in the inbox" |
91
+
92
+ ### Controlling the Workflow
93
+
94
+ | Action | Say |
95
+ |--------|-----|
96
+ | Approve plan/implementation | `APPROVE` |
97
+ | Request changes | `REVISE: [specific feedback]` |
98
+ | Stop completely | `REJECT: [reason]` |
99
+
100
+ ### Tips for Good Prompts
101
+
102
+ **Be specific:**
103
+ ```
104
+ # BAD
105
+ "Add authentication"
106
+
107
+ # GOOD
108
+ "Add JWT authentication with:
109
+ - Login endpoint returning access + refresh tokens
110
+ - Token refresh endpoint
111
+ - Middleware for protected routes
112
+ - 15 minute access token expiry"
113
+ ```
114
+
115
+ **Include constraints:**
116
+ ```
117
+ "Use iteration-controller for: Add rate limiting
118
+
119
+ Constraints:
120
+ - 100 requests per minute per IP
121
+ - Use Redis for distributed counting
122
+ - Return 429 with Retry-After header"
123
+ ```
124
+
125
+ ## Using Tasks & Epics
126
+
127
+ ### Task Directory Structure
128
+
129
+ ```
130
+ .tasks/
131
+ ├── inbox/ # New tasks waiting to be picked up
132
+ ├── epics/ # Active work in progress
133
+ ├── review/ # Completed, awaiting review/merge
134
+ └── done/ # Completed and merged
135
+ ```
136
+
137
+ ### Creating a Task
138
+
139
+ 1. Create a folder in `.tasks/inbox/`:
140
+ ```
141
+ .tasks/inbox/TASK-001/epic.md
142
+ ```
143
+
144
+ 2. Use the epic template:
145
+ ```markdown
146
+ ---
147
+ id: TASK-001
148
+ title: "Add user authentication"
149
+ type: epic
150
+ priority: high
151
+ status: inbox
152
+ created: 2024-01-15
153
+ ---
154
+
155
+ ## Description
156
+ Add JWT-based authentication to the API.
157
+
158
+ ## Acceptance Criteria
159
+ - [ ] Users can register with email/password
160
+ - [ ] Users can login and receive tokens
161
+ - [ ] Protected routes require valid token
162
+ - [ ] Tokens expire and can be refreshed
163
+ ```
164
+
165
+ ### Working with Tasks
166
+
167
+ ```
168
+ # Pick up next task from inbox
169
+ Use task-orchestrator for: Pick up the next task from inbox
170
+
171
+ # Create a new epic
172
+ Use task-orchestrator for: Create an epic for user authentication
173
+ ```
174
+
175
+ ### Task Lifecycle
176
+
177
+ ```
178
+ inbox/ → epics/ → review/ → done/
179
+ │ │ │
180
+ │ │ └── Merged to main
181
+ │ └── Implementation complete, PR created
182
+ └── Claimed and work started
183
+ ```
184
+
185
+ ## Core Principles
186
+
187
+ ### 1. Plan First, Code Second
188
+
189
+ Every feature goes through planning:
190
+ - What exactly needs to be built?
191
+ - What are the edge cases?
192
+ - How will we test it?
193
+ - What could go wrong?
194
+
195
+ ### 2. Tests Define Done
196
+
197
+ Tests are designed BEFORE implementation:
198
+ - Use concrete values, not "valid input"
199
+ - Tests should FAIL if code is broken
200
+ - Cover edge cases and error states
201
+
202
+ ### 3. Human Approval Gates
203
+
204
+ You control when to proceed:
205
+ - Review plans before implementation starts
206
+ - Review implementation before it's committed
207
+ - Nothing happens without your explicit `APPROVE`
208
+
209
+ ### 4. Adversarial Validation
210
+
211
+ The `plan-validator` agent exists to find problems:
212
+ - Challenges assumptions
213
+ - Finds missing edge cases
214
+ - Rejects vague plans
215
+ - Expects 2-4 planning iterations
216
+
217
+ ### 5. Autonomous Execution
218
+
219
+ Once approved, implementation runs without interruption:
220
+ - Implements step by step
221
+ - Runs tests after each change
222
+ - Fixes failures automatically
223
+ - Only stops when done or truly blocked
224
+
225
+ ## Directory Structure
226
+
227
+ ```
228
+ your-project/
229
+ ├── .claude/
230
+ │ ├── agents/ # Agent instruction files
231
+ │ ├── plans/ # Approved implementation plans
232
+ │ │ └── archived/ # Completed plans
233
+ │ └── state/ # Working state (auto-cleaned)
234
+ ├── .knowledge/
235
+ │ ├── context/ # Project description (READ THIS)
236
+ │ ├── decisions/ # Architecture decision records
237
+ │ └── learnings/ # Patterns learned during development
238
+ ├── .tasks/
239
+ │ ├── inbox/ # New tasks
240
+ │ ├── epics/ # Active work
241
+ │ ├── review/ # Awaiting merge
242
+ │ └── done/ # Completed
243
+ ├── PROMPTS.md # Full prompt reference
244
+ └── archai.config.md # Configuration
245
+ ```
246
+
247
+ ## Common Workflows
248
+
249
+ ### Starting Your Day
250
+
251
+ ```
252
+ # Check for pending tasks
253
+ ls .tasks/inbox/
254
+
255
+ # Or pick up the next one
256
+ Use task-orchestrator for: Pick up the next task from inbox
257
+ ```
258
+
259
+ ### Feature Development
260
+
261
+ ```
262
+ # 1. Start with full workflow
263
+ Use iteration-controller for: [feature description]
264
+
265
+ # 2. Review the plan when presented
266
+ # Read .claude/plans/[feature].md
267
+
268
+ # 3. Approve or revise
269
+ APPROVE
270
+ # or
271
+ REVISE: Add error handling for network failures
272
+
273
+ # 4. Let implementation run
274
+
275
+ # 5. Approve final implementation
276
+ APPROVE
277
+ ```
278
+
279
+ ### Quick Bug Fix
280
+
281
+ ```
282
+ Use implementation-agent for: Fix null pointer in getUserById when user not found
283
+
284
+ The function should return null instead of throwing.
285
+ ```
286
+
287
+ ### Code Investigation
288
+
289
+ ```
290
+ Use deep-analyst for: Trace how authentication tokens flow through the system
291
+
292
+ I need to understand:
293
+ 1. Where tokens are created
294
+ 2. How they're validated
295
+ 3. Where they're stored
296
+ ```
297
+
298
+ ## Troubleshooting
299
+
300
+ ### "Agent isn't following the plan"
301
+
302
+ Make sure the plan was specific enough. Vague plans lead to interpretation.
303
+
304
+ ### "Tests are too shallow"
305
+
306
+ Ask `tdd-designer` to include:
307
+ - Edge cases with specific values
308
+ - Error conditions
309
+ - Boundary values
310
+
311
+ ### "Phase 1 keeps iterating"
312
+
313
+ After 4 iterations, the requirements might be unclear. Provide more context or simplify the task.
314
+
315
+ ### "Implementation keeps failing"
316
+
317
+ 1. Check if the plan covered the failing scenario
318
+ 2. Let it retry (up to 5 attempts)
319
+ 3. If still failing, it will escalate to you
320
+
321
+ ## Need Help?
322
+
323
+ - **PROMPTS.md** - Full prompt reference with examples
324
+ - **.knowledge/context/project-description.md** - Project context (fill this in!)
325
+ - **archai.config.md** - Configuration options
326
+
327
+ ---
328
+
329
+ *Powered by [@zik000/archai](https://www.npmjs.com/package/@zik000/archai) - Multi-agent AI development workflow*
@@ -0,0 +1,67 @@
1
+ # Project Guidelines
2
+
3
+ ## Agentic Workflow
4
+
5
+ This project uses **archai** agents for development. For non-trivial tasks, use the agent workflow:
6
+
7
+ 1. **Plan first** — Use `task-prep` to structure tasks, then `maestro-agent` to execute
8
+ 2. **Never skip planning** for multi-file changes
9
+ 3. **Follow the 3-phase loop**: Plan → Implement → Finalize
10
+
11
+ ### Launching the Workflow
12
+
13
+ `maestro-agent` must run as the **main thread** (not a sub-agent) to spawn sub-agents:
14
+
15
+ ```bash
16
+ # Launch maestro-agent as main thread
17
+ claude --agent maestro-agent
18
+ ```
19
+
20
+ Then provide your task in the conversation. For other agents:
21
+ - Use `task-prep` for task structuring
22
+ - Use `quick-fix` for small changes (1-3 files)
23
+
24
+ ### Agent Model & Permission Summary
25
+
26
+ | Agent | Model | Permission Mode | Role |
27
+ |-------|-------|----------------|------|
28
+ | maestro-agent | opus | (main thread) | Orchestration |
29
+ | maestro-headless-agent | opus | (headless, claude -p) | Headless orchestration (boss dispatch) |
30
+ | boss-agent | opus | (main thread) | Batch task dispatch & supervision |
31
+ | deep-analyst | opus | dontAsk | Analysis & planning |
32
+ | implementation-agent | opus | dontAsk | Code implementation |
33
+ | task-prep | opus | dontAsk | Task structuring |
34
+ | plan-validator | opus | dontAsk | Plan validation |
35
+ | tdd-designer | opus | dontAsk | Test design |
36
+ | critical-reviewer | opus | dontAsk | Adversarial review (headless `unset CLAUDECODE && claude -p`) |
37
+ | code-reviewer | opus | dontAsk | Post-implementation review |
38
+ | git-coordinator | opus | dontAsk | Git coordination & merging |
39
+ | finalization-agent | sonnet | dontAsk | Commit, push, CI |
40
+ | quick-fix | sonnet | dontAsk | Small fixes |
41
+ | task-orchestrator | haiku | dontAsk | Epic lifecycle |
42
+ | cleanup-agent | haiku | dontAsk | Temp file cleanup |
43
+
44
+ ## Development Rules
45
+
46
+ - Read existing code before modifying it
47
+ - Run tests after every implementation
48
+ - Don't over-engineer — only make changes that are requested
49
+ - Don't add features, refactoring, or "improvements" beyond the task
50
+ - Keep solutions simple and focused
51
+
52
+ ## Task Intake
53
+
54
+ When a non-trivial task is described, offer to prepare a structured spec first:
55
+ - **Vague or multi-step task** → suggest `task-prep` to clarify scope and create a spec
56
+ - **Clear, well-defined task** → proceed directly with `maestro-agent`
57
+ - **Small fix** → use `quick-fix`
58
+
59
+ Task preparation captures business requirements, defines acceptance criteria, and identifies affected areas — so the execution loop can focus on implementation.
60
+
61
+ ## Project Context
62
+
63
+ See `archai.config.md` for:
64
+ - Tech stack and frameworks
65
+ - Build, test, and lint commands
66
+ - Project structure and conventions
67
+ - Specialist agent configuration