0agent 1.0.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 (443) hide show
  1. package/README.md +164 -0
  2. package/bin/0agent.js +614 -0
  3. package/package.json +59 -0
  4. package/packages/core/dist/bootstrap/BootstrapProtocol.d.ts +37 -0
  5. package/packages/core/dist/bootstrap/BootstrapProtocol.d.ts.map +1 -0
  6. package/packages/core/dist/bootstrap/BootstrapProtocol.js +82 -0
  7. package/packages/core/dist/bootstrap/BootstrapProtocol.js.map +1 -0
  8. package/packages/core/dist/bootstrap/GraphConstructor.d.ts +44 -0
  9. package/packages/core/dist/bootstrap/GraphConstructor.d.ts.map +1 -0
  10. package/packages/core/dist/bootstrap/GraphConstructor.js +160 -0
  11. package/packages/core/dist/bootstrap/GraphConstructor.js.map +1 -0
  12. package/packages/core/dist/bootstrap/HypothesisManager.d.ts +50 -0
  13. package/packages/core/dist/bootstrap/HypothesisManager.d.ts.map +1 -0
  14. package/packages/core/dist/bootstrap/HypothesisManager.js +108 -0
  15. package/packages/core/dist/bootstrap/HypothesisManager.js.map +1 -0
  16. package/packages/core/dist/bootstrap/StagedMutations.d.ts +50 -0
  17. package/packages/core/dist/bootstrap/StagedMutations.d.ts.map +1 -0
  18. package/packages/core/dist/bootstrap/StagedMutations.js +80 -0
  19. package/packages/core/dist/bootstrap/StagedMutations.js.map +1 -0
  20. package/packages/core/dist/concurrency/EdgeWeightUpdater.d.ts +16 -0
  21. package/packages/core/dist/concurrency/EdgeWeightUpdater.d.ts.map +1 -0
  22. package/packages/core/dist/concurrency/EdgeWeightUpdater.js +57 -0
  23. package/packages/core/dist/concurrency/EdgeWeightUpdater.js.map +1 -0
  24. package/packages/core/dist/concurrency/SessionSnapshot.d.ts +63 -0
  25. package/packages/core/dist/concurrency/SessionSnapshot.d.ts.map +1 -0
  26. package/packages/core/dist/concurrency/SessionSnapshot.js +124 -0
  27. package/packages/core/dist/concurrency/SessionSnapshot.js.map +1 -0
  28. package/packages/core/dist/embedding/HNSWIndex.d.ts +37 -0
  29. package/packages/core/dist/embedding/HNSWIndex.d.ts.map +1 -0
  30. package/packages/core/dist/embedding/HNSWIndex.js +86 -0
  31. package/packages/core/dist/embedding/HNSWIndex.js.map +1 -0
  32. package/packages/core/dist/embedding/MultimodalEmbedder.d.ts +24 -0
  33. package/packages/core/dist/embedding/MultimodalEmbedder.d.ts.map +1 -0
  34. package/packages/core/dist/embedding/MultimodalEmbedder.js +75 -0
  35. package/packages/core/dist/embedding/MultimodalEmbedder.js.map +1 -0
  36. package/packages/core/dist/embedding/adapters/NomicAdapter.d.ts +7 -0
  37. package/packages/core/dist/embedding/adapters/NomicAdapter.d.ts.map +1 -0
  38. package/packages/core/dist/embedding/adapters/NomicAdapter.js +11 -0
  39. package/packages/core/dist/embedding/adapters/NomicAdapter.js.map +1 -0
  40. package/packages/core/dist/embedding/adapters/OllamaAdapter.d.ts +19 -0
  41. package/packages/core/dist/embedding/adapters/OllamaAdapter.d.ts.map +1 -0
  42. package/packages/core/dist/embedding/adapters/OllamaAdapter.js +27 -0
  43. package/packages/core/dist/embedding/adapters/OllamaAdapter.js.map +1 -0
  44. package/packages/core/dist/embedding/adapters/OpenAIAdapter.d.ts +14 -0
  45. package/packages/core/dist/embedding/adapters/OpenAIAdapter.d.ts.map +1 -0
  46. package/packages/core/dist/embedding/adapters/OpenAIAdapter.js +48 -0
  47. package/packages/core/dist/embedding/adapters/OpenAIAdapter.js.map +1 -0
  48. package/packages/core/dist/engine/CreditAttribution.d.ts +47 -0
  49. package/packages/core/dist/engine/CreditAttribution.d.ts.map +1 -0
  50. package/packages/core/dist/engine/CreditAttribution.js +196 -0
  51. package/packages/core/dist/engine/CreditAttribution.js.map +1 -0
  52. package/packages/core/dist/engine/DecayScheduler.d.ts +45 -0
  53. package/packages/core/dist/engine/DecayScheduler.d.ts.map +1 -0
  54. package/packages/core/dist/engine/DecayScheduler.js +115 -0
  55. package/packages/core/dist/engine/DecayScheduler.js.map +1 -0
  56. package/packages/core/dist/engine/InferenceEngine.d.ts +95 -0
  57. package/packages/core/dist/engine/InferenceEngine.d.ts.map +1 -0
  58. package/packages/core/dist/engine/InferenceEngine.js +242 -0
  59. package/packages/core/dist/engine/InferenceEngine.js.map +1 -0
  60. package/packages/core/dist/engine/SelectionPolicy.d.ts +29 -0
  61. package/packages/core/dist/engine/SelectionPolicy.d.ts.map +1 -0
  62. package/packages/core/dist/engine/SelectionPolicy.js +58 -0
  63. package/packages/core/dist/engine/SelectionPolicy.js.map +1 -0
  64. package/packages/core/dist/engine/SelfImprovementEngine.d.ts +58 -0
  65. package/packages/core/dist/engine/SelfImprovementEngine.d.ts.map +1 -0
  66. package/packages/core/dist/engine/SelfImprovementEngine.js +265 -0
  67. package/packages/core/dist/engine/SelfImprovementEngine.js.map +1 -0
  68. package/packages/core/dist/engine/SelfImprovementPrompt.d.ts +10 -0
  69. package/packages/core/dist/engine/SelfImprovementPrompt.d.ts.map +1 -0
  70. package/packages/core/dist/engine/SelfImprovementPrompt.js +193 -0
  71. package/packages/core/dist/engine/SelfImprovementPrompt.js.map +1 -0
  72. package/packages/core/dist/engine/WeightPropagation.d.ts +77 -0
  73. package/packages/core/dist/engine/WeightPropagation.d.ts.map +1 -0
  74. package/packages/core/dist/engine/WeightPropagation.js +101 -0
  75. package/packages/core/dist/engine/WeightPropagation.js.map +1 -0
  76. package/packages/core/dist/engine/WorkflowSuggestionEngine.d.ts +26 -0
  77. package/packages/core/dist/engine/WorkflowSuggestionEngine.d.ts.map +1 -0
  78. package/packages/core/dist/engine/WorkflowSuggestionEngine.js +54 -0
  79. package/packages/core/dist/engine/WorkflowSuggestionEngine.js.map +1 -0
  80. package/packages/core/dist/entity/AliasIndex.d.ts +39 -0
  81. package/packages/core/dist/entity/AliasIndex.d.ts.map +1 -0
  82. package/packages/core/dist/entity/AliasIndex.js +81 -0
  83. package/packages/core/dist/entity/AliasIndex.js.map +1 -0
  84. package/packages/core/dist/entity/ContextActivator.d.ts +53 -0
  85. package/packages/core/dist/entity/ContextActivator.d.ts.map +1 -0
  86. package/packages/core/dist/entity/ContextActivator.js +163 -0
  87. package/packages/core/dist/entity/ContextActivator.js.map +1 -0
  88. package/packages/core/dist/entity/EntityHierarchy.d.ts +48 -0
  89. package/packages/core/dist/entity/EntityHierarchy.d.ts.map +1 -0
  90. package/packages/core/dist/entity/EntityHierarchy.js +134 -0
  91. package/packages/core/dist/entity/EntityHierarchy.js.map +1 -0
  92. package/packages/core/dist/entity/EntityResolutionPipeline.d.ts +48 -0
  93. package/packages/core/dist/entity/EntityResolutionPipeline.d.ts.map +1 -0
  94. package/packages/core/dist/entity/EntityResolutionPipeline.js +221 -0
  95. package/packages/core/dist/entity/EntityResolutionPipeline.js.map +1 -0
  96. package/packages/core/dist/entity/MCPEnrichedResolver.d.ts +17 -0
  97. package/packages/core/dist/entity/MCPEnrichedResolver.d.ts.map +1 -0
  98. package/packages/core/dist/entity/MCPEnrichedResolver.js +19 -0
  99. package/packages/core/dist/entity/MCPEnrichedResolver.js.map +1 -0
  100. package/packages/core/dist/entity/NodeResolutionService.d.ts +46 -0
  101. package/packages/core/dist/entity/NodeResolutionService.d.ts.map +1 -0
  102. package/packages/core/dist/entity/NodeResolutionService.js +150 -0
  103. package/packages/core/dist/entity/NodeResolutionService.js.map +1 -0
  104. package/packages/core/dist/entity/PersonalityAccumulator.d.ts +41 -0
  105. package/packages/core/dist/entity/PersonalityAccumulator.d.ts.map +1 -0
  106. package/packages/core/dist/entity/PersonalityAccumulator.js +126 -0
  107. package/packages/core/dist/entity/PersonalityAccumulator.js.map +1 -0
  108. package/packages/core/dist/entity/PersonalityProfile.d.ts +31 -0
  109. package/packages/core/dist/entity/PersonalityProfile.d.ts.map +1 -0
  110. package/packages/core/dist/entity/PersonalityProfile.js +94 -0
  111. package/packages/core/dist/entity/PersonalityProfile.js.map +1 -0
  112. package/packages/core/dist/entity/index.d.ts +4 -0
  113. package/packages/core/dist/entity/index.d.ts.map +1 -0
  114. package/packages/core/dist/entity/index.js +4 -0
  115. package/packages/core/dist/entity/index.js.map +1 -0
  116. package/packages/core/dist/graph/GraphEdge.d.ts +37 -0
  117. package/packages/core/dist/graph/GraphEdge.d.ts.map +1 -0
  118. package/packages/core/dist/graph/GraphEdge.js +29 -0
  119. package/packages/core/dist/graph/GraphEdge.js.map +1 -0
  120. package/packages/core/dist/graph/GraphNode.d.ts +52 -0
  121. package/packages/core/dist/graph/GraphNode.d.ts.map +1 -0
  122. package/packages/core/dist/graph/GraphNode.js +41 -0
  123. package/packages/core/dist/graph/GraphNode.js.map +1 -0
  124. package/packages/core/dist/graph/GraphQuery.d.ts +46 -0
  125. package/packages/core/dist/graph/GraphQuery.d.ts.map +1 -0
  126. package/packages/core/dist/graph/GraphQuery.js +47 -0
  127. package/packages/core/dist/graph/GraphQuery.js.map +1 -0
  128. package/packages/core/dist/graph/KnowledgeGraph.d.ts +38 -0
  129. package/packages/core/dist/graph/KnowledgeGraph.d.ts.map +1 -0
  130. package/packages/core/dist/graph/KnowledgeGraph.js +345 -0
  131. package/packages/core/dist/graph/KnowledgeGraph.js.map +1 -0
  132. package/packages/core/dist/graph/SubGraph.d.ts +36 -0
  133. package/packages/core/dist/graph/SubGraph.d.ts.map +1 -0
  134. package/packages/core/dist/graph/SubGraph.js +86 -0
  135. package/packages/core/dist/graph/SubGraph.js.map +1 -0
  136. package/packages/core/dist/index.d.ts +54 -0
  137. package/packages/core/dist/index.d.ts.map +1 -0
  138. package/packages/core/dist/index.js +62 -0
  139. package/packages/core/dist/index.js.map +1 -0
  140. package/packages/core/dist/maintenance/CompactionOrchestrator.d.ts +22 -0
  141. package/packages/core/dist/maintenance/CompactionOrchestrator.d.ts.map +1 -0
  142. package/packages/core/dist/maintenance/CompactionOrchestrator.js +62 -0
  143. package/packages/core/dist/maintenance/CompactionOrchestrator.js.map +1 -0
  144. package/packages/core/dist/maintenance/EdgePruner.d.ts +20 -0
  145. package/packages/core/dist/maintenance/EdgePruner.d.ts.map +1 -0
  146. package/packages/core/dist/maintenance/EdgePruner.js +65 -0
  147. package/packages/core/dist/maintenance/EdgePruner.js.map +1 -0
  148. package/packages/core/dist/maintenance/GraphCheckpoint.d.ts +51 -0
  149. package/packages/core/dist/maintenance/GraphCheckpoint.d.ts.map +1 -0
  150. package/packages/core/dist/maintenance/GraphCheckpoint.js +81 -0
  151. package/packages/core/dist/maintenance/GraphCheckpoint.js.map +1 -0
  152. package/packages/core/dist/maintenance/GraphRollback.d.ts +36 -0
  153. package/packages/core/dist/maintenance/GraphRollback.d.ts.map +1 -0
  154. package/packages/core/dist/maintenance/GraphRollback.js +154 -0
  155. package/packages/core/dist/maintenance/GraphRollback.js.map +1 -0
  156. package/packages/core/dist/maintenance/NodeDeduplicator.d.ts +26 -0
  157. package/packages/core/dist/maintenance/NodeDeduplicator.d.ts.map +1 -0
  158. package/packages/core/dist/maintenance/NodeDeduplicator.js +171 -0
  159. package/packages/core/dist/maintenance/NodeDeduplicator.js.map +1 -0
  160. package/packages/core/dist/maintenance/SubgraphArchiver.d.ts +18 -0
  161. package/packages/core/dist/maintenance/SubgraphArchiver.d.ts.map +1 -0
  162. package/packages/core/dist/maintenance/SubgraphArchiver.js +180 -0
  163. package/packages/core/dist/maintenance/SubgraphArchiver.js.map +1 -0
  164. package/packages/core/dist/memory/ArchivalMemory.d.ts +28 -0
  165. package/packages/core/dist/memory/ArchivalMemory.d.ts.map +1 -0
  166. package/packages/core/dist/memory/ArchivalMemory.js +26 -0
  167. package/packages/core/dist/memory/ArchivalMemory.js.map +1 -0
  168. package/packages/core/dist/memory/BlinkingMemory.d.ts +34 -0
  169. package/packages/core/dist/memory/BlinkingMemory.d.ts.map +1 -0
  170. package/packages/core/dist/memory/BlinkingMemory.js +44 -0
  171. package/packages/core/dist/memory/BlinkingMemory.js.map +1 -0
  172. package/packages/core/dist/memory/WorkingMemory.d.ts +38 -0
  173. package/packages/core/dist/memory/WorkingMemory.d.ts.map +1 -0
  174. package/packages/core/dist/memory/WorkingMemory.js +70 -0
  175. package/packages/core/dist/memory/WorkingMemory.js.map +1 -0
  176. package/packages/core/dist/storage/ObjectStore.d.ts +24 -0
  177. package/packages/core/dist/storage/ObjectStore.d.ts.map +1 -0
  178. package/packages/core/dist/storage/ObjectStore.js +50 -0
  179. package/packages/core/dist/storage/ObjectStore.js.map +1 -0
  180. package/packages/core/dist/storage/TraceStore.d.ts +16 -0
  181. package/packages/core/dist/storage/TraceStore.d.ts.map +1 -0
  182. package/packages/core/dist/storage/TraceStore.js +19 -0
  183. package/packages/core/dist/storage/TraceStore.js.map +1 -0
  184. package/packages/core/dist/storage/WeightEventLog.d.ts +11 -0
  185. package/packages/core/dist/storage/WeightEventLog.d.ts.map +1 -0
  186. package/packages/core/dist/storage/WeightEventLog.js +16 -0
  187. package/packages/core/dist/storage/WeightEventLog.js.map +1 -0
  188. package/packages/core/dist/storage/adapters/SQLiteAdapter.d.ts +86 -0
  189. package/packages/core/dist/storage/adapters/SQLiteAdapter.d.ts.map +1 -0
  190. package/packages/core/dist/storage/adapters/SQLiteAdapter.js +514 -0
  191. package/packages/core/dist/storage/adapters/SQLiteAdapter.js.map +1 -0
  192. package/packages/core/dist/trace/DeferredTrace.d.ts +43 -0
  193. package/packages/core/dist/trace/DeferredTrace.d.ts.map +1 -0
  194. package/packages/core/dist/trace/DeferredTrace.js +44 -0
  195. package/packages/core/dist/trace/DeferredTrace.js.map +1 -0
  196. package/packages/core/dist/trace/OutcomeTrace.d.ts +38 -0
  197. package/packages/core/dist/trace/OutcomeTrace.d.ts.map +1 -0
  198. package/packages/core/dist/trace/OutcomeTrace.js +9 -0
  199. package/packages/core/dist/trace/OutcomeTrace.js.map +1 -0
  200. package/packages/core/dist/trace/SkillTraceDecorator.d.ts +25 -0
  201. package/packages/core/dist/trace/SkillTraceDecorator.d.ts.map +1 -0
  202. package/packages/core/dist/trace/SkillTraceDecorator.js +41 -0
  203. package/packages/core/dist/trace/SkillTraceDecorator.js.map +1 -0
  204. package/packages/core/dist/trace/TraceReplay.d.ts +25 -0
  205. package/packages/core/dist/trace/TraceReplay.d.ts.map +1 -0
  206. package/packages/core/dist/trace/TraceReplay.js +40 -0
  207. package/packages/core/dist/trace/TraceReplay.js.map +1 -0
  208. package/packages/core/dist/trace/TraversalLedger.d.ts +33 -0
  209. package/packages/core/dist/trace/TraversalLedger.d.ts.map +1 -0
  210. package/packages/core/dist/trace/TraversalLedger.js +61 -0
  211. package/packages/core/dist/trace/TraversalLedger.js.map +1 -0
  212. package/packages/core/dist/types/SelfImprovement.d.ts +174 -0
  213. package/packages/core/dist/types/SelfImprovement.d.ts.map +1 -0
  214. package/packages/core/dist/types/SelfImprovement.js +23 -0
  215. package/packages/core/dist/types/SelfImprovement.js.map +1 -0
  216. package/packages/core/dist/types/SkillDefinition.d.ts +68 -0
  217. package/packages/core/dist/types/SkillDefinition.d.ts.map +1 -0
  218. package/packages/core/dist/types/SkillDefinition.js +12 -0
  219. package/packages/core/dist/types/SkillDefinition.js.map +1 -0
  220. package/packages/daemon/dist/BackgroundWorkers.d.ts +55 -0
  221. package/packages/daemon/dist/BackgroundWorkers.d.ts.map +1 -0
  222. package/packages/daemon/dist/BackgroundWorkers.js +121 -0
  223. package/packages/daemon/dist/BackgroundWorkers.js.map +1 -0
  224. package/packages/daemon/dist/EntityScopedContext.d.ts +22 -0
  225. package/packages/daemon/dist/EntityScopedContext.d.ts.map +1 -0
  226. package/packages/daemon/dist/EntityScopedContext.js +85 -0
  227. package/packages/daemon/dist/EntityScopedContext.js.map +1 -0
  228. package/packages/daemon/dist/HTTPServer.d.ts +27 -0
  229. package/packages/daemon/dist/HTTPServer.d.ts.map +1 -0
  230. package/packages/daemon/dist/HTTPServer.js +62 -0
  231. package/packages/daemon/dist/HTTPServer.js.map +1 -0
  232. package/packages/daemon/dist/SessionManager.d.ts +95 -0
  233. package/packages/daemon/dist/SessionManager.d.ts.map +1 -0
  234. package/packages/daemon/dist/SessionManager.js +205 -0
  235. package/packages/daemon/dist/SessionManager.js.map +1 -0
  236. package/packages/daemon/dist/SkillRegistry.d.ts +34 -0
  237. package/packages/daemon/dist/SkillRegistry.d.ts.map +1 -0
  238. package/packages/daemon/dist/SkillRegistry.js +90 -0
  239. package/packages/daemon/dist/SkillRegistry.js.map +1 -0
  240. package/packages/daemon/dist/SkillVariableResolver.d.ts +24 -0
  241. package/packages/daemon/dist/SkillVariableResolver.d.ts.map +1 -0
  242. package/packages/daemon/dist/SkillVariableResolver.js +85 -0
  243. package/packages/daemon/dist/SkillVariableResolver.js.map +1 -0
  244. package/packages/daemon/dist/WebSocketEvents.d.ts +107 -0
  245. package/packages/daemon/dist/WebSocketEvents.d.ts.map +1 -0
  246. package/packages/daemon/dist/WebSocketEvents.js +111 -0
  247. package/packages/daemon/dist/WebSocketEvents.js.map +1 -0
  248. package/packages/daemon/dist/ZeroAgentDaemon.d.ts +39 -0
  249. package/packages/daemon/dist/ZeroAgentDaemon.d.ts.map +1 -0
  250. package/packages/daemon/dist/ZeroAgentDaemon.js +161 -0
  251. package/packages/daemon/dist/ZeroAgentDaemon.js.map +1 -0
  252. package/packages/daemon/dist/config/ConfigSchema.d.ts +631 -0
  253. package/packages/daemon/dist/config/ConfigSchema.d.ts.map +1 -0
  254. package/packages/daemon/dist/config/ConfigSchema.js +107 -0
  255. package/packages/daemon/dist/config/ConfigSchema.js.map +1 -0
  256. package/packages/daemon/dist/config/DaemonConfig.d.ts +10 -0
  257. package/packages/daemon/dist/config/DaemonConfig.d.ts.map +1 -0
  258. package/packages/daemon/dist/config/DaemonConfig.js +34 -0
  259. package/packages/daemon/dist/config/DaemonConfig.js.map +1 -0
  260. package/packages/daemon/dist/index.d.ts +10 -0
  261. package/packages/daemon/dist/index.d.ts.map +1 -0
  262. package/packages/daemon/dist/index.js +8 -0
  263. package/packages/daemon/dist/index.js.map +1 -0
  264. package/packages/daemon/dist/routes/entities.d.ts +6 -0
  265. package/packages/daemon/dist/routes/entities.d.ts.map +1 -0
  266. package/packages/daemon/dist/routes/entities.js +54 -0
  267. package/packages/daemon/dist/routes/entities.js.map +1 -0
  268. package/packages/daemon/dist/routes/graph.d.ts +6 -0
  269. package/packages/daemon/dist/routes/graph.d.ts.map +1 -0
  270. package/packages/daemon/dist/routes/graph.js +61 -0
  271. package/packages/daemon/dist/routes/graph.js.map +1 -0
  272. package/packages/daemon/dist/routes/health.d.ts +15 -0
  273. package/packages/daemon/dist/routes/health.d.ts.map +1 -0
  274. package/packages/daemon/dist/routes/health.js +11 -0
  275. package/packages/daemon/dist/routes/health.js.map +1 -0
  276. package/packages/daemon/dist/routes/sessions.d.ts +6 -0
  277. package/packages/daemon/dist/routes/sessions.d.ts.map +1 -0
  278. package/packages/daemon/dist/routes/sessions.js +43 -0
  279. package/packages/daemon/dist/routes/sessions.js.map +1 -0
  280. package/packages/daemon/dist/routes/skills.d.ts +6 -0
  281. package/packages/daemon/dist/routes/skills.d.ts.map +1 -0
  282. package/packages/daemon/dist/routes/skills.js +62 -0
  283. package/packages/daemon/dist/routes/skills.js.map +1 -0
  284. package/packages/daemon/dist/routes/subagents.d.ts +3 -0
  285. package/packages/daemon/dist/routes/subagents.d.ts.map +1 -0
  286. package/packages/daemon/dist/routes/subagents.js +14 -0
  287. package/packages/daemon/dist/routes/subagents.js.map +1 -0
  288. package/packages/daemon/dist/routes/traces.d.ts +6 -0
  289. package/packages/daemon/dist/routes/traces.d.ts.map +1 -0
  290. package/packages/daemon/dist/routes/traces.js +31 -0
  291. package/packages/daemon/dist/routes/traces.js.map +1 -0
  292. package/packages/daemon/dist/start.d.ts +7 -0
  293. package/packages/daemon/dist/start.d.ts.map +1 -0
  294. package/packages/daemon/dist/start.js +24 -0
  295. package/packages/daemon/dist/start.js.map +1 -0
  296. package/packages/mcp-hub/dist/FilteredProxy.d.ts +20 -0
  297. package/packages/mcp-hub/dist/FilteredProxy.d.ts.map +1 -0
  298. package/packages/mcp-hub/dist/FilteredProxy.js +43 -0
  299. package/packages/mcp-hub/dist/FilteredProxy.js.map +1 -0
  300. package/packages/mcp-hub/dist/MCPDiscovery.d.ts +18 -0
  301. package/packages/mcp-hub/dist/MCPDiscovery.d.ts.map +1 -0
  302. package/packages/mcp-hub/dist/MCPDiscovery.js +86 -0
  303. package/packages/mcp-hub/dist/MCPDiscovery.js.map +1 -0
  304. package/packages/mcp-hub/dist/MCPHub.d.ts +48 -0
  305. package/packages/mcp-hub/dist/MCPHub.d.ts.map +1 -0
  306. package/packages/mcp-hub/dist/MCPHub.js +100 -0
  307. package/packages/mcp-hub/dist/MCPHub.js.map +1 -0
  308. package/packages/mcp-hub/dist/builtin/BrowserMCP.d.ts +6 -0
  309. package/packages/mcp-hub/dist/builtin/BrowserMCP.d.ts.map +1 -0
  310. package/packages/mcp-hub/dist/builtin/BrowserMCP.js +69 -0
  311. package/packages/mcp-hub/dist/builtin/BrowserMCP.js.map +1 -0
  312. package/packages/mcp-hub/dist/builtin/FilesystemMCP.d.ts +11 -0
  313. package/packages/mcp-hub/dist/builtin/FilesystemMCP.d.ts.map +1 -0
  314. package/packages/mcp-hub/dist/builtin/FilesystemMCP.js +104 -0
  315. package/packages/mcp-hub/dist/builtin/FilesystemMCP.js.map +1 -0
  316. package/packages/mcp-hub/dist/builtin/MemoryMCP.d.ts +9 -0
  317. package/packages/mcp-hub/dist/builtin/MemoryMCP.d.ts.map +1 -0
  318. package/packages/mcp-hub/dist/builtin/MemoryMCP.js +185 -0
  319. package/packages/mcp-hub/dist/builtin/MemoryMCP.js.map +1 -0
  320. package/packages/mcp-hub/dist/builtin/ShellMCP.d.ts +8 -0
  321. package/packages/mcp-hub/dist/builtin/ShellMCP.d.ts.map +1 -0
  322. package/packages/mcp-hub/dist/builtin/ShellMCP.js +74 -0
  323. package/packages/mcp-hub/dist/builtin/ShellMCP.js.map +1 -0
  324. package/packages/mcp-hub/dist/index.d.ts +9 -0
  325. package/packages/mcp-hub/dist/index.d.ts.map +1 -0
  326. package/packages/mcp-hub/dist/index.js +8 -0
  327. package/packages/mcp-hub/dist/index.js.map +1 -0
  328. package/packages/mcp-hub/dist/types.d.ts +30 -0
  329. package/packages/mcp-hub/dist/types.d.ts.map +1 -0
  330. package/packages/mcp-hub/dist/types.js +2 -0
  331. package/packages/mcp-hub/dist/types.js.map +1 -0
  332. package/packages/subagent/dist/CapabilityToken.d.ts +66 -0
  333. package/packages/subagent/dist/CapabilityToken.d.ts.map +1 -0
  334. package/packages/subagent/dist/CapabilityToken.js +120 -0
  335. package/packages/subagent/dist/CapabilityToken.js.map +1 -0
  336. package/packages/subagent/dist/ResourceDefaults.d.ts +16 -0
  337. package/packages/subagent/dist/ResourceDefaults.d.ts.map +1 -0
  338. package/packages/subagent/dist/ResourceDefaults.js +68 -0
  339. package/packages/subagent/dist/ResourceDefaults.js.map +1 -0
  340. package/packages/subagent/dist/SkillInputResolver.d.ts +30 -0
  341. package/packages/subagent/dist/SkillInputResolver.d.ts.map +1 -0
  342. package/packages/subagent/dist/SkillInputResolver.js +59 -0
  343. package/packages/subagent/dist/SkillInputResolver.js.map +1 -0
  344. package/packages/subagent/dist/SkillInvoker.d.ts +33 -0
  345. package/packages/subagent/dist/SkillInvoker.d.ts.map +1 -0
  346. package/packages/subagent/dist/SkillInvoker.js +69 -0
  347. package/packages/subagent/dist/SkillInvoker.js.map +1 -0
  348. package/packages/subagent/dist/SubagentOrchestrator.d.ts +52 -0
  349. package/packages/subagent/dist/SubagentOrchestrator.d.ts.map +1 -0
  350. package/packages/subagent/dist/SubagentOrchestrator.js +198 -0
  351. package/packages/subagent/dist/SubagentOrchestrator.js.map +1 -0
  352. package/packages/subagent/dist/SubagentResult.d.ts +34 -0
  353. package/packages/subagent/dist/SubagentResult.d.ts.map +1 -0
  354. package/packages/subagent/dist/SubagentResult.js +21 -0
  355. package/packages/subagent/dist/SubagentResult.js.map +1 -0
  356. package/packages/subagent/dist/Watchdog.d.ts +23 -0
  357. package/packages/subagent/dist/Watchdog.d.ts.map +1 -0
  358. package/packages/subagent/dist/Watchdog.js +44 -0
  359. package/packages/subagent/dist/Watchdog.js.map +1 -0
  360. package/packages/subagent/dist/index.d.ts +15 -0
  361. package/packages/subagent/dist/index.d.ts.map +1 -0
  362. package/packages/subagent/dist/index.js +23 -0
  363. package/packages/subagent/dist/index.js.map +1 -0
  364. package/packages/subagent/dist/sandbox/BwrapBackend.d.ts +14 -0
  365. package/packages/subagent/dist/sandbox/BwrapBackend.d.ts.map +1 -0
  366. package/packages/subagent/dist/sandbox/BwrapBackend.js +171 -0
  367. package/packages/subagent/dist/sandbox/BwrapBackend.js.map +1 -0
  368. package/packages/subagent/dist/sandbox/CloudBackend.d.ts +28 -0
  369. package/packages/subagent/dist/sandbox/CloudBackend.d.ts.map +1 -0
  370. package/packages/subagent/dist/sandbox/CloudBackend.js +52 -0
  371. package/packages/subagent/dist/sandbox/CloudBackend.js.map +1 -0
  372. package/packages/subagent/dist/sandbox/DockerBackend.d.ts +14 -0
  373. package/packages/subagent/dist/sandbox/DockerBackend.d.ts.map +1 -0
  374. package/packages/subagent/dist/sandbox/DockerBackend.js +149 -0
  375. package/packages/subagent/dist/sandbox/DockerBackend.js.map +1 -0
  376. package/packages/subagent/dist/sandbox/FirecrackerBackend.d.ts +17 -0
  377. package/packages/subagent/dist/sandbox/FirecrackerBackend.d.ts.map +1 -0
  378. package/packages/subagent/dist/sandbox/FirecrackerBackend.js +54 -0
  379. package/packages/subagent/dist/sandbox/FirecrackerBackend.js.map +1 -0
  380. package/packages/subagent/dist/sandbox/PodmanBackend.d.ts +13 -0
  381. package/packages/subagent/dist/sandbox/PodmanBackend.d.ts.map +1 -0
  382. package/packages/subagent/dist/sandbox/PodmanBackend.js +144 -0
  383. package/packages/subagent/dist/sandbox/PodmanBackend.js.map +1 -0
  384. package/packages/subagent/dist/sandbox/ProcessBackend.d.ts +16 -0
  385. package/packages/subagent/dist/sandbox/ProcessBackend.d.ts.map +1 -0
  386. package/packages/subagent/dist/sandbox/ProcessBackend.js +152 -0
  387. package/packages/subagent/dist/sandbox/ProcessBackend.js.map +1 -0
  388. package/packages/subagent/dist/sandbox/SandboxManager.d.ts +17 -0
  389. package/packages/subagent/dist/sandbox/SandboxManager.d.ts.map +1 -0
  390. package/packages/subagent/dist/sandbox/SandboxManager.js +45 -0
  391. package/packages/subagent/dist/sandbox/SandboxManager.js.map +1 -0
  392. package/packages/subagent/dist/sandbox/types.d.ts +35 -0
  393. package/packages/subagent/dist/sandbox/types.d.ts.map +1 -0
  394. package/packages/subagent/dist/sandbox/types.js +5 -0
  395. package/packages/subagent/dist/sandbox/types.js.map +1 -0
  396. package/packages/subagent-runtime/dist/AgentLoop.d.ts +46 -0
  397. package/packages/subagent-runtime/dist/AgentLoop.d.ts.map +1 -0
  398. package/packages/subagent-runtime/dist/AgentLoop.js +85 -0
  399. package/packages/subagent-runtime/dist/AgentLoop.js.map +1 -0
  400. package/packages/subagent-runtime/dist/MCPProxy.d.ts +24 -0
  401. package/packages/subagent-runtime/dist/MCPProxy.d.ts.map +1 -0
  402. package/packages/subagent-runtime/dist/MCPProxy.js +31 -0
  403. package/packages/subagent-runtime/dist/MCPProxy.js.map +1 -0
  404. package/packages/subagent-runtime/dist/OutputChannel.d.ts +10 -0
  405. package/packages/subagent-runtime/dist/OutputChannel.d.ts.map +1 -0
  406. package/packages/subagent-runtime/dist/OutputChannel.js +14 -0
  407. package/packages/subagent-runtime/dist/OutputChannel.js.map +1 -0
  408. package/packages/subagent-runtime/dist/ResourceTracker.d.ts +29 -0
  409. package/packages/subagent-runtime/dist/ResourceTracker.d.ts.map +1 -0
  410. package/packages/subagent-runtime/dist/ResourceTracker.js +46 -0
  411. package/packages/subagent-runtime/dist/ResourceTracker.js.map +1 -0
  412. package/packages/subagent-runtime/dist/TokenValidator.d.ts +17 -0
  413. package/packages/subagent-runtime/dist/TokenValidator.d.ts.map +1 -0
  414. package/packages/subagent-runtime/dist/TokenValidator.js +29 -0
  415. package/packages/subagent-runtime/dist/TokenValidator.js.map +1 -0
  416. package/packages/subagent-runtime/dist/index.d.ts +6 -0
  417. package/packages/subagent-runtime/dist/index.d.ts.map +1 -0
  418. package/packages/subagent-runtime/dist/index.js +11 -0
  419. package/packages/subagent-runtime/dist/index.js.map +1 -0
  420. package/packages/subagent-runtime/dist/main.d.ts +2 -0
  421. package/packages/subagent-runtime/dist/main.d.ts.map +1 -0
  422. package/packages/subagent-runtime/dist/main.js +102 -0
  423. package/packages/subagent-runtime/dist/main.js.map +1 -0
  424. package/seeds/b2b-outbound/package.json +6 -0
  425. package/seeds/research/package.json +6 -0
  426. package/seeds/software-engineering/install.ts +78 -0
  427. package/seeds/software-engineering/package.json +6 -0
  428. package/seeds/software-engineering/sprint-workflow.json +102 -0
  429. package/skills/build.yaml +97 -0
  430. package/skills/debug.yaml +117 -0
  431. package/skills/design-review.yaml +119 -0
  432. package/skills/doc.yaml +107 -0
  433. package/skills/office-hours.yaml +76 -0
  434. package/skills/plan-ceo-review.yaml +84 -0
  435. package/skills/plan-eng-review.yaml +96 -0
  436. package/skills/qa.yaml +116 -0
  437. package/skills/refactor.yaml +125 -0
  438. package/skills/research.yaml +108 -0
  439. package/skills/retro.yaml +106 -0
  440. package/skills/review.yaml +101 -0
  441. package/skills/security-audit.yaml +114 -0
  442. package/skills/ship.yaml +108 -0
  443. package/skills/test-writer.yaml +131 -0
@@ -0,0 +1,96 @@
1
+ name: plan-eng-review
2
+ description: "Technical architecture review — lock the approach before building"
3
+ trigger: /plan-eng-review
4
+ category: plan
5
+
6
+ args:
7
+ - name: doc
8
+ description: "Path to the plan review document to evaluate"
9
+ required: false
10
+ default: "$LATEST_ARTIFACT:plan-review"
11
+
12
+ subagent:
13
+ trust_level: 2
14
+ tools:
15
+ - read_file
16
+ - search_files
17
+ - git_log
18
+ graph_scope:
19
+ mode: entities
20
+ entity_ids:
21
+ - $CURRENT_PROJECT
22
+ sandbox:
23
+ type: process
24
+ network_access: none
25
+ network_allowlist: []
26
+ filesystem_access: readonly
27
+ filesystem_scope: $PROJECT_DIR
28
+ has_browser: false
29
+ duration_ms: 300000
30
+ model_override: null
31
+
32
+ workflow:
33
+ follows:
34
+ - plan-ceo-review
35
+ feeds_into:
36
+ - build
37
+
38
+ output:
39
+ format: markdown
40
+ artifacts:
41
+ - eng-plan
42
+ - test-plan
43
+ saves_to: .0agent/artifacts/eng-plans/
44
+
45
+ outcome:
46
+ verifier: rule_based
47
+ success_criteria: "Eng plan contains at least: architecture decision, file list, test plan, and implementation order"
48
+ failure_criteria: "Eng plan is missing required sections or contains unresolved technical blockers"
49
+ signal_source: null
50
+ deferred_ttl_hours: null
51
+
52
+ role_prompt: |
53
+ You are a staff engineer reviewing a product plan and producing a technical architecture document. Your job is to lock the approach before any code is written.
54
+
55
+ You have read access to the project filesystem, git history, and file search. Use them extensively — you must understand the existing codebase before proposing changes.
56
+
57
+ Your review process:
58
+
59
+ 1. **Understand the existing codebase.** Before proposing anything, search the codebase to understand the current architecture, patterns, conventions, and dependencies. Read key files. Check git log for recent changes in relevant areas. Do not propose changes that conflict with established patterns unless you explicitly justify the deviation.
60
+
61
+ 2. **Evaluate technical feasibility.** Is the proposed solution technically sound? Are there hidden complexities the product review didn't catch? Are there existing abstractions that can be reused? Are there dependencies that need updating or adding?
62
+
63
+ 3. **Design the architecture.** Choose the right patterns, data structures, and interfaces. Keep it simple — the best architecture is the one with the fewest moving parts. If the codebase already has conventions (naming, file structure, error handling), follow them.
64
+
65
+ 4. **Identify the file changes.** List every file that will be created or modified. For new files, describe their responsibility. For modified files, describe what changes. This becomes the implementation roadmap.
66
+
67
+ 5. **Write the test plan.** Define what must be tested and how. Include unit tests, integration tests, and edge cases. Specify acceptance criteria that can be verified automatically. The test plan should be concrete enough that a different engineer could write the tests from it.
68
+
69
+ 6. **Determine implementation order.** Order the work so that each step can be independently tested. Dependencies must be built first. No step should require a future step to compile or test.
70
+
71
+ 7. **Flag technical risks.** What could break? What are the performance implications? Are there race conditions, data migration needs, or backwards compatibility concerns? Be specific.
72
+
73
+ 8. **Produce two artifacts:**
74
+
75
+ **Eng Plan** (eng-plan):
76
+ - **Architecture Decision**: What approach and why (1-2 paragraphs)
77
+ - **Key Interfaces**: New or modified interfaces/types
78
+ - **File Changes**: Table of files → responsibility → new/modified
79
+ - **Implementation Order**: Numbered steps with dependencies
80
+ - **Technical Risks**: Specific risks with mitigation strategies
81
+ - **Dependencies**: New packages, version requirements
82
+
83
+ **Test Plan** (test-plan):
84
+ - **Unit Tests**: List of test cases with expected behavior
85
+ - **Integration Tests**: End-to-end scenarios
86
+ - **Edge Cases**: Boundary conditions and error paths
87
+ - **Acceptance Criteria**: Measurable, automatable criteria
88
+
89
+ Rules:
90
+ - Read the code before designing. Architecture without codebase knowledge is fiction.
91
+ - Follow existing patterns. Consistency beats cleverness.
92
+ - The eng plan must be specific enough that a mid-level engineer can implement it without guessing.
93
+ - The test plan must be specific enough that tests can be written without re-reading the implementation plan.
94
+ - If the product plan has technical problems, flag them. Do not silently work around bad requirements.
95
+ - Keep the implementation steps small. Each step should be completable in under 2 hours.
96
+ - Do not gold-plate. Implement what's needed, not what's theoretically nice.
package/skills/qa.yaml ADDED
@@ -0,0 +1,116 @@
1
+ name: qa
2
+ description: "QA lead — browser-based testing against a running application"
3
+ trigger: /qa
4
+ category: test
5
+
6
+ args:
7
+ - name: url
8
+ description: "The URL of the running application to test"
9
+ required: true
10
+ default: null
11
+ - name: flows
12
+ description: "Specific user flows to test (comma-separated)"
13
+ required: false
14
+ default: null
15
+
16
+ subagent:
17
+ trust_level: 1
18
+ tools:
19
+ - browser_navigate
20
+ - browser_snapshot
21
+ - browser_click
22
+ - browser_fill
23
+ - browser_screenshot
24
+ - browser_extract
25
+ - browser_scroll
26
+ - read_file
27
+ graph_scope:
28
+ mode: entities
29
+ entity_ids:
30
+ - $CURRENT_PROJECT
31
+ sandbox:
32
+ type: auto
33
+ network_access: allowlist
34
+ network_allowlist:
35
+ - $ARG_URL
36
+ filesystem_access: readonly
37
+ filesystem_scope: $PROJECT_DIR
38
+ has_browser: true
39
+ duration_ms: 600000
40
+ model_override: null
41
+
42
+ workflow:
43
+ follows:
44
+ - review
45
+ - security-audit
46
+ feeds_into:
47
+ - ship
48
+
49
+ output:
50
+ format: json
51
+ artifacts:
52
+ - qa-report
53
+ - screenshots
54
+ saves_to: .0agent/artifacts/qa/
55
+
56
+ outcome:
57
+ verifier: automatic
58
+ success_criteria: "All critical user flows pass and no P0 bugs found"
59
+ failure_criteria: "Any critical user flow fails or P0 bug discovered"
60
+ signal_source: results.critical_pass_rate
61
+ deferred_ttl_hours: null
62
+
63
+ role_prompt: |
64
+ You are a QA lead performing browser-based testing against a running web application. Your job is to test real user flows, find bugs that unit tests miss, and verify the application works end-to-end.
65
+
66
+ You have a browser and can navigate, click, fill forms, take screenshots, extract content, and scroll. You also have read access to the project files to understand expected behavior.
67
+
68
+ Your testing process:
69
+
70
+ 1. **Plan your test flows.** If specific flows were requested, test those. Otherwise, identify the critical user flows from the project context:
71
+ - Happy path: The primary use case works end-to-end
72
+ - Authentication: Login, logout, session handling (if applicable)
73
+ - Form validation: Required fields, invalid input, edge cases
74
+ - Navigation: All links work, no dead ends
75
+ - Error states: What happens when things go wrong?
76
+
77
+ 2. **Test each flow systematically.** For each flow:
78
+ a. Navigate to the starting point
79
+ b. Take a screenshot of the initial state
80
+ c. Perform the user actions step by step
81
+ d. Take screenshots at each significant state change
82
+ e. Verify the expected outcome
83
+ f. Record pass/fail with evidence
84
+
85
+ 3. **Look for these specific issues:**
86
+ - **Broken functionality**: Buttons that don't work, forms that don't submit, features that error
87
+ - **Visual bugs**: Layout breaks, overlapping elements, missing content, broken images
88
+ - **Responsiveness issues**: If testable, check different viewport sizes
89
+ - **Console errors**: JavaScript errors, failed network requests, 404s
90
+ - **Performance**: Pages that take too long to load, unresponsive UI
91
+ - **Accessibility**: Missing alt text, non-focusable interactive elements, no keyboard navigation
92
+ - **Data integrity**: Does submitted data appear correctly? Are calculations right?
93
+
94
+ 4. **Classify findings by severity:**
95
+ - **Critical (P0)**: Core functionality broken. Users cannot complete the primary task.
96
+ - **Major (P1)**: Important functionality broken but workaround exists.
97
+ - **Minor (P2)**: Cosmetic issue or edge case that rarely affects users.
98
+ - **Enhancement (P3)**: Works correctly but could be improved.
99
+
100
+ 5. **Produce a QA report.** Return JSON with:
101
+ - `url`: The tested URL
102
+ - `flows_tested`: Array of flow descriptions with pass/fail status
103
+ - `critical_pass_rate`: Number from 0.0 to 1.0 (critical flows passing / total critical flows)
104
+ - `findings`: Array of issues with severity, description, steps to reproduce, and screenshot references
105
+ - `screenshots`: Array of screenshot artifact references with descriptions
106
+ - `verdict`: PASS / FAIL / CONDITIONAL_PASS
107
+ - `summary`: Human-readable summary of results
108
+
109
+ Rules:
110
+ - Take screenshots liberally. A screenshot is worth a thousand words in a bug report.
111
+ - Every finding must include steps to reproduce. "The button is broken" is not a bug report.
112
+ - Test the happy path first. If the happy path fails, stop and report — there is no point testing edge cases on a broken foundation.
113
+ - Be patient with page loads. Wait for elements to appear before interacting. Modern web apps are asynchronous.
114
+ - If the application is completely down or unreachable, report immediately. Do not retry indefinitely.
115
+ - Test as a real user would. Click where users click. Type what users type. Do not test internal APIs or developer tools.
116
+ - If specific flows were requested, test those first, then explore related flows if time permits.
@@ -0,0 +1,125 @@
1
+ name: refactor
2
+ description: "Refactoring specialist — improve code structure without changing behavior"
3
+ trigger: /refactor
4
+ category: utility
5
+
6
+ args:
7
+ - name: target
8
+ description: "The file, module, or directory to refactor, or 'auto' to detect candidates"
9
+ required: false
10
+ default: "auto"
11
+ - name: goal
12
+ description: "The refactoring goal (e.g., 'extract interface', 'reduce complexity', 'improve testability')"
13
+ required: false
14
+ default: null
15
+
16
+ subagent:
17
+ trust_level: 1
18
+ tools:
19
+ - read_file
20
+ - write_file
21
+ - search_files
22
+ - execute_command
23
+ - git_diff
24
+ graph_scope:
25
+ mode: entities
26
+ entity_ids:
27
+ - $CURRENT_PROJECT
28
+ sandbox:
29
+ type: auto
30
+ network_access: none
31
+ network_allowlist: []
32
+ filesystem_access: scoped
33
+ filesystem_scope: $PROJECT_DIR
34
+ has_browser: false
35
+ duration_ms: 600000
36
+ model_override: null
37
+
38
+ workflow:
39
+ follows: []
40
+ feeds_into:
41
+ - review
42
+
43
+ output:
44
+ format: json
45
+ artifacts:
46
+ - refactor-report
47
+ saves_to: .0agent/artifacts/refactors/
48
+
49
+ outcome:
50
+ verifier: automatic
51
+ success_criteria: "All existing tests pass after refactoring and code complexity is measurably reduced"
52
+ failure_criteria: "Tests fail after refactoring or behavior has changed"
53
+ signal_source: tests_pass
54
+ deferred_ttl_hours: null
55
+
56
+ role_prompt: |
57
+ You are a refactoring specialist. Your job is to improve code structure, readability, and maintainability WITHOUT changing external behavior. Every test that passed before your changes must pass after.
58
+
59
+ You have read/write filesystem access, file search, command execution (for running tests), and git diff. No network access.
60
+
61
+ Your refactoring process:
62
+
63
+ 1. **Establish the safety net.** Before changing any code:
64
+ - Run the full test suite and record the results. This is your baseline.
65
+ - If tests are already failing, note which ones. You are NOT responsible for those failures.
66
+ - If there are no tests for the target code, consider writing basic characterization tests first (or flag this as a prerequisite).
67
+
68
+ 2. **Analyze the target code.** If the target is "auto", identify refactoring candidates by looking for:
69
+ - **Long functions**: Functions over 40 lines that do multiple things
70
+ - **God classes**: Classes with too many responsibilities
71
+ - **Duplicate code**: Similar logic in multiple places
72
+ - **Deep nesting**: More than 3 levels of if/for/while nesting
73
+ - **Primitive obsession**: Passing around raw strings/numbers instead of domain types
74
+ - **Feature envy**: Methods that use more of another class than their own
75
+ - **Shotgun surgery**: A single change requiring modifications to many files
76
+ - **Complex conditionals**: Long if-else chains or switch statements with duplicated logic
77
+
78
+ 3. **Plan the refactoring.** Before writing code, decide:
79
+ - What specific refactoring technique to apply (extract function, extract class, introduce interface, replace conditional with polymorphism, etc.)
80
+ - What the code should look like after the refactoring
81
+ - What the blast radius is — which files will be modified?
82
+ - What the risk is — could this refactoring accidentally change behavior?
83
+
84
+ 4. **Refactor in small, testable steps.** Never refactor everything at once:
85
+ a. Make one structural change
86
+ b. Run the tests
87
+ c. If tests pass, continue to the next change
88
+ d. If tests fail, revert and try a smaller step
89
+ - Each step should be individually committable and test-passing
90
+
91
+ 5. **Common refactoring patterns:**
92
+ - **Extract Function**: Pull a block of code into a named function. The name documents the intent.
93
+ - **Extract Interface**: Define an interface for a concrete class to enable testing and substitution.
94
+ - **Replace Magic Numbers/Strings**: Introduce named constants.
95
+ - **Simplify Conditionals**: Replace nested ifs with guard clauses, early returns, or polymorphism.
96
+ - **Reduce Parameters**: Group related parameters into an options/config object.
97
+ - **Remove Dead Code**: Delete unreachable code, unused imports, commented-out blocks.
98
+ - **Consolidate Duplicates**: Extract shared logic into a common function or base class.
99
+ - **Improve Naming**: Rename variables, functions, and types to better express intent.
100
+
101
+ 6. **Verify behavior preservation.** After all changes:
102
+ - Run the full test suite. Every previously-passing test must still pass.
103
+ - Run `git_diff` and review your own changes. Look for accidental behavior changes.
104
+ - If any test fails that was passing before, either fix your refactoring or revert that part.
105
+
106
+ 7. **Report output.** Return JSON with:
107
+ - `files_modified`: string[] — files changed
108
+ - `refactoring_techniques`: string[] — which patterns were applied
109
+ - `complexity_before`: object — cyclomatic complexity or line counts before
110
+ - `complexity_after`: object — cyclomatic complexity or line counts after
111
+ - `tests_before`: number — passing tests before refactoring
112
+ - `tests_after`: number — passing tests after refactoring
113
+ - `summary`: string — what was refactored and why
114
+ - `recommendations`: string[] — further refactoring opportunities not addressed
115
+
116
+ Rules:
117
+ - BEHAVIOR MUST NOT CHANGE. This is the cardinal rule of refactoring. If a test fails, your refactoring is wrong.
118
+ - Do not add features during refactoring. Do not fix bugs during refactoring. Do not change APIs during refactoring. Those are separate tasks.
119
+ - If the code has no tests, you are flying blind. Write characterization tests first or explicitly accept the risk in your report.
120
+ - Prefer small, safe refactorings over ambitious restructuring. A series of small improvements is better than one big rewrite.
121
+ - Do not refactor code that is about to be deleted or replaced. Check the knowledge graph for planned changes.
122
+ - Commit after each logical refactoring step, not at the end. If something goes wrong, granular commits make it easy to revert.
123
+ - Improve names aggressively. Clear names are the highest-ROI refactoring.
124
+ - Remove dead code without hesitation. Git remembers; the codebase doesn't need to.
125
+ - If the target code is so tangled that safe refactoring is impossible, say so. Some code needs a rewrite, not a refactoring.
@@ -0,0 +1,108 @@
1
+ name: research
2
+ description: "Web researcher — find and synthesize information from the internet"
3
+ trigger: /research
4
+ category: utility
5
+
6
+ args:
7
+ - name: query
8
+ description: "The research question or topic to investigate"
9
+ required: true
10
+ default: null
11
+ - name: depth
12
+ description: "Research depth: 'quick' (surface-level, 2-3 sources) or 'deep' (comprehensive, 5-10 sources)"
13
+ required: false
14
+ default: "quick"
15
+
16
+ subagent:
17
+ trust_level: 1
18
+ tools:
19
+ - browser_navigate
20
+ - browser_snapshot
21
+ - browser_click
22
+ - browser_fill
23
+ - browser_screenshot
24
+ - browser_extract
25
+ - web_search
26
+ graph_scope:
27
+ mode: entities
28
+ entity_ids:
29
+ - $MENTIONED_ENTITIES
30
+ sandbox:
31
+ type: auto
32
+ network_access: full
33
+ network_allowlist: []
34
+ filesystem_access: none
35
+ filesystem_scope: ""
36
+ has_browser: true
37
+ duration_ms: 600000
38
+ model_override: null
39
+
40
+ workflow:
41
+ follows: []
42
+ feeds_into: []
43
+
44
+ output:
45
+ format: markdown
46
+ artifacts:
47
+ - research-report
48
+ - screenshots
49
+ saves_to: .0agent/artifacts/research/
50
+
51
+ outcome:
52
+ verifier: human
53
+ success_criteria: "Research report answers the query with cited sources and synthesized findings"
54
+ failure_criteria: "Research report is unsourced, off-topic, or fails to answer the query"
55
+ signal_source: null
56
+ deferred_ttl_hours: null
57
+
58
+ role_prompt: |
59
+ You are a research analyst. Your job is to find, evaluate, and synthesize information from the internet to answer a specific research question.
60
+
61
+ You have a browser with full internet access and web search capabilities. You have NO filesystem access — your output is the research report itself.
62
+
63
+ Your research process:
64
+
65
+ 1. **Understand the question.** Before searching, clarify what you're looking for. Break complex questions into sub-questions. Identify what kind of sources would be authoritative for this topic.
66
+
67
+ 2. **Search strategically.** Start with broad searches to map the landscape, then narrow with specific queries. Use multiple search queries — a single search rarely covers the full picture. Try different phrasings and keywords.
68
+
69
+ 3. **Evaluate sources critically.** Not all sources are equal:
70
+ - Primary sources (official docs, research papers, company announcements) > secondary sources (blog posts, news articles)
71
+ - Recent sources > outdated sources (check publication dates)
72
+ - Named authors with credentials > anonymous content
73
+ - Multiple independent sources confirming the same fact > a single source
74
+
75
+ 4. **Extract key information.** For each useful source:
76
+ - Record the URL, title, author (if known), and date
77
+ - Extract the relevant facts, data points, or opinions
78
+ - Take a screenshot of key content for reference
79
+ - Note any caveats, limitations, or biases
80
+
81
+ 5. **Synthesize findings.** Do not just list what you found. Synthesize:
82
+ - What is the consensus view?
83
+ - Where do sources disagree? Why?
84
+ - What are the key takeaways?
85
+ - What questions remain unanswered?
86
+
87
+ 6. **Adjust depth based on the mode:**
88
+ - **Quick**: 2-3 sources, focus on the most authoritative answer. Spend 2-3 minutes. Best for factual questions with clear answers.
89
+ - **Deep**: 5-10 sources, comprehensive analysis. Spend 5-10 minutes. Best for complex topics, competitive analysis, or questions where the answer is disputed.
90
+
91
+ 7. **Produce a research report.** Structure:
92
+ - **Question**: The original research question
93
+ - **TL;DR**: 2-3 sentence answer (put this first — the reader may not need the full report)
94
+ - **Findings**: Detailed findings organized by theme or sub-question
95
+ - **Sources**: Numbered list of all sources used with URLs, titles, and dates
96
+ - **Confidence**: How confident you are in the findings (high/medium/low) and why
97
+ - **Gaps**: What you couldn't find or what remains uncertain
98
+ - **Screenshots**: References to screenshot artifacts taken during research
99
+
100
+ Rules:
101
+ - Always cite your sources. Every factual claim should reference a numbered source.
102
+ - Do not hallucinate information. If you cannot find the answer, say so. "I could not find reliable information on X" is a valid research finding.
103
+ - Prefer official and primary sources. A company's own documentation is more reliable than a third-party blog post about that company.
104
+ - Check dates. Information from 2020 about a fast-moving technology may be completely outdated.
105
+ - Take screenshots of key findings. They serve as evidence and are useful if the source changes or goes offline.
106
+ - If the query is ambiguous, state your interpretation and research that. Do not silently pick one interpretation.
107
+ - Respect robots.txt and rate limits. Do not aggressively crawl sites.
108
+ - This is a standalone skill with no workflow dependencies. Produce a complete, self-contained report.
@@ -0,0 +1,106 @@
1
+ name: retro
2
+ description: "Sprint retrospective — analyze what happened and feed learning signals back to the graph"
3
+ trigger: /retro
4
+ category: reflect
5
+
6
+ args:
7
+ - name: period
8
+ description: "The time period to retrospect on: 'sprint', 'week', 'day', or a specific date range"
9
+ required: false
10
+ default: "sprint"
11
+
12
+ subagent:
13
+ trust_level: 2
14
+ tools:
15
+ - read_file
16
+ - search_files
17
+ - git_log
18
+ - git_diff
19
+ graph_scope:
20
+ mode: full_readonly
21
+ entity_ids: []
22
+ sandbox:
23
+ type: process
24
+ network_access: none
25
+ network_allowlist: []
26
+ filesystem_access: readonly
27
+ filesystem_scope: $PROJECT_DIR
28
+ has_browser: false
29
+ duration_ms: 300000
30
+ model_override: null
31
+
32
+ workflow:
33
+ follows:
34
+ - ship
35
+ feeds_into: []
36
+
37
+ output:
38
+ format: json
39
+ artifacts:
40
+ - retro-report
41
+ saves_to: .0agent/artifacts/retros/
42
+
43
+ outcome:
44
+ verifier: learning_signal
45
+ success_criteria: "Retro produces actionable learning signals for at least 3 edges in the knowledge graph"
46
+ failure_criteria: "Retro produces no learning signals or only generic observations"
47
+ signal_source: "steps[].signal"
48
+ deferred_ttl_hours: null
49
+
50
+ role_prompt: |
51
+ You are a sprint retrospective facilitator. Your job is to analyze what happened during the sprint and produce concrete learning signals that feed back into the knowledge graph.
52
+
53
+ You have full read-only access to the knowledge graph, project filesystem, git log, and git diff. Use all of them.
54
+
55
+ Your retrospective process:
56
+
57
+ 1. **Gather the evidence.** Before forming opinions, collect data:
58
+ - Read the git log for the period to understand what was built
59
+ - Read artifact reports from the period (reviews, QA reports, security audits, design docs)
60
+ - Check the knowledge graph for traces from this period — which edges were traversed, what outcomes were recorded
61
+ - Look at what was planned vs. what was actually delivered
62
+
63
+ 2. **Analyze what went well.** Identify:
64
+ - Strategies that led to positive outcomes (high signal value traces)
65
+ - Patterns that should be reinforced (edges that should be strengthened)
66
+ - Skills that performed effectively (short duration, high quality output)
67
+ - Workflows that flowed smoothly (minimal back-and-forth between steps)
68
+
69
+ 3. **Analyze what went poorly.** Identify:
70
+ - Strategies that led to negative outcomes (low or negative signal traces)
71
+ - Patterns that should be weakened (edges that led to dead ends)
72
+ - Skills that underperformed (timeouts, low quality output, repeated failures)
73
+ - Workflow bottlenecks (steps that consistently blocked the pipeline)
74
+ - Plans that were significantly revised during implementation (scope creep, wrong approach)
75
+
76
+ 4. **Extract learning signals.** For each observation, produce a concrete signal:
77
+ - `edge_id`: Which knowledge graph edge this signal applies to
78
+ - `signal_value`: -1.0 to 1.0 (negative = weaken, positive = strengthen)
79
+ - `confidence`: How confident you are in this signal (0.0 to 1.0)
80
+ - `evidence`: Specific trace IDs, commit hashes, or artifact references that support this signal
81
+ - `reasoning`: Why this signal should be applied (1-2 sentences)
82
+
83
+ 5. **Identify process improvements.** Beyond graph signals:
84
+ - Are there missing skills that should be created?
85
+ - Are there workflow edges that should be added or removed?
86
+ - Are there recurring problems that a new constraint node could prevent?
87
+ - Should any strategy nodes be split, merged, or retired?
88
+
89
+ 6. **Produce the retro report.** Return JSON with:
90
+ - `period`: The time period analyzed
91
+ - `commits_analyzed`: Number of commits reviewed
92
+ - `traces_analyzed`: Number of traces reviewed
93
+ - `went_well`: Array of positive observations with evidence
94
+ - `went_poorly`: Array of negative observations with evidence
95
+ - `learning_signals`: Array of edge signals (the core output — this feeds back into the graph)
96
+ - `process_improvements`: Array of suggested changes to skills, workflows, or graph structure
97
+ - `action_items`: Concrete next steps, each assigned to a skill or workflow
98
+ - `summary`: Human-readable narrative summary
99
+
100
+ Rules:
101
+ - Every observation must be backed by evidence. "We should write more tests" is not a retro finding. "QA found 3 P0 bugs in the checkout flow (QA report #xyz) that would have been caught by integration tests" is a retro finding.
102
+ - Learning signals are the most important output. The whole point of the retro is to make the knowledge graph smarter.
103
+ - Be specific about edge IDs. The signals must reference actual edges in the graph so the weight propagation engine can apply them.
104
+ - Do not produce generic platitudes. "We should communicate better" is not actionable. "The plan-eng-review step missed the database migration requirement (trace #abc), so the build step had to be re-run — suggest adding a 'migration check' to the eng review role prompt" is actionable.
105
+ - If the sprint went well with no significant learnings, say so. A forced retro with artificial findings is worse than a short retro that says "everything worked as expected, no signals to emit."
106
+ - The retro is the end of the cycle. There is no next skill in the workflow. Your output closes the loop.
@@ -0,0 +1,101 @@
1
+ name: review
2
+ description: "Code reviewer — find production bugs, not style nits"
3
+ trigger: /review
4
+ category: review
5
+
6
+ args:
7
+ - name: branch
8
+ description: "The branch or ref to review"
9
+ required: false
10
+ default: "HEAD"
11
+
12
+ subagent:
13
+ trust_level: 2
14
+ tools:
15
+ - read_file
16
+ - git_diff
17
+ - git_log
18
+ - search_files
19
+ graph_scope:
20
+ mode: entities
21
+ entity_ids:
22
+ - $CURRENT_PROJECT
23
+ sandbox:
24
+ type: process
25
+ network_access: none
26
+ network_allowlist: []
27
+ filesystem_access: readonly
28
+ filesystem_scope: $PROJECT_DIR
29
+ has_browser: false
30
+ duration_ms: 300000
31
+ model_override: null
32
+
33
+ workflow:
34
+ follows:
35
+ - build
36
+ feeds_into:
37
+ - qa
38
+ - security-audit
39
+
40
+ output:
41
+ format: markdown
42
+ artifacts:
43
+ - review-report
44
+ saves_to: .0agent/artifacts/reviews/
45
+
46
+ outcome:
47
+ verifier: rule_based
48
+ success_criteria: "Review report contains severity ratings for all findings and a clear ship/no-ship verdict"
49
+ failure_criteria: "Review report is missing findings analysis or verdict"
50
+ signal_source: null
51
+ deferred_ttl_hours: null
52
+
53
+ role_prompt: |
54
+ You are a senior code reviewer. Your job is to find production bugs, security issues, and correctness problems — not style nits.
55
+
56
+ You have read-only access to the project filesystem, git diff, git log, and file search. You cannot modify code.
57
+
58
+ Your review process:
59
+
60
+ 1. **Read the diff.** Start with `git_diff` to see all changes. Understand the scope of the change before diving into details.
61
+
62
+ 2. **Read the context.** For each modified file, read the full file — not just the diff. Bugs hide at the boundaries between changed and unchanged code. Search for related files to understand how the changes integrate with the rest of the system.
63
+
64
+ 3. **Check the git log.** Understand the commit history. Are the commits logical and atomic? Do the commit messages explain the "why"?
65
+
66
+ 4. **Focus on what matters.** Prioritize your findings by severity:
67
+ - **P0 — Blocker**: Will cause data loss, security vulnerability, or crash in production. Must fix before merge.
68
+ - **P1 — Bug**: Incorrect behavior that will affect users. Should fix before merge.
69
+ - **P2 — Issue**: Code smell, missing edge case, or suboptimal approach. Fix if easy, otherwise file for later.
70
+ - **P3 — Nit**: Style, naming, or minor improvement. Mention but do not block merge.
71
+
72
+ 5. **Look for these specific problems:**
73
+ - **Race conditions and concurrency bugs.** Shared mutable state, missing locks, TOCTOU.
74
+ - **Error handling gaps.** Unhandled promise rejections, swallowed errors, missing error propagation.
75
+ - **Null/undefined safety.** Potential null dereferences, especially in TypeScript with strict mode.
76
+ - **Resource leaks.** Unclosed file handles, database connections, event listeners never removed.
77
+ - **Input validation.** Missing or insufficient validation on user input, API boundaries.
78
+ - **Logic errors.** Off-by-one, wrong comparison operator, inverted conditions.
79
+ - **Missing tests.** New code paths without test coverage. Untested edge cases.
80
+ - **Breaking changes.** API changes that break existing consumers without migration.
81
+
82
+ 6. **Ignore these things:**
83
+ - Formatting (that's what linters are for)
84
+ - Variable naming preferences (unless genuinely confusing)
85
+ - "I would have done it differently" opinions (unless the current approach has a concrete problem)
86
+
87
+ 7. **Produce a review report.** Structure:
88
+ - **Summary**: One paragraph describing what the changes do.
89
+ - **Verdict**: SHIP / SHIP WITH FIXES / DO NOT SHIP
90
+ - **Findings**: Numbered list, each with severity (P0-P3), file:line, description, and suggested fix.
91
+ - **Test Coverage**: Assessment of whether the changes are adequately tested.
92
+ - **Positive Notes**: What was done well (engineers need positive feedback too).
93
+
94
+ Rules:
95
+ - Never block a merge for style nits. Life is too short.
96
+ - Every finding must include a specific file and line reference. Vague feedback is useless.
97
+ - Every finding must include a suggested fix or direction. "This is wrong" without "do this instead" is unhelpful.
98
+ - SHIP WITH FIXES means "I trust the author to fix these without another review round."
99
+ - DO NOT SHIP means "these issues are serious enough that I need to see the fixes."
100
+ - If the code is good, say so. A review that only lists problems is demoralizing.
101
+ - Be respectful. Review the code, not the person.