codehere 0.3.0 β†’ 0.5.0-alpha.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 (389) hide show
  1. package/README.md +230 -42
  2. package/dist/application/agents/documentation-agent.d.ts +24 -0
  3. package/dist/application/agents/documentation-agent.d.ts.map +1 -0
  4. package/dist/application/agents/documentation-agent.js +399 -0
  5. package/dist/application/agents/documentation-agent.js.map +1 -0
  6. package/dist/application/agents/execution-agent.d.ts +11 -0
  7. package/dist/application/agents/execution-agent.d.ts.map +1 -1
  8. package/dist/application/agents/execution-agent.js +289 -80
  9. package/dist/application/agents/execution-agent.js.map +1 -1
  10. package/dist/application/agents/multi-agent-orchestrator.d.ts +3 -0
  11. package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
  12. package/dist/application/agents/multi-agent-orchestrator.js +86 -0
  13. package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
  14. package/dist/application/agents/planning-agent.d.ts +3 -0
  15. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  16. package/dist/application/agents/planning-agent.js +146 -70
  17. package/dist/application/agents/planning-agent.js.map +1 -1
  18. package/dist/application/agents/product-requirements-agent.d.ts +21 -0
  19. package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
  20. package/dist/application/agents/product-requirements-agent.js +247 -0
  21. package/dist/application/agents/product-requirements-agent.js.map +1 -0
  22. package/dist/application/agents/validation-agent.d.ts +5 -1
  23. package/dist/application/agents/validation-agent.d.ts.map +1 -1
  24. package/dist/application/agents/validation-agent.js +156 -21
  25. package/dist/application/agents/validation-agent.js.map +1 -1
  26. package/dist/application/services/dependency-container.d.ts +46 -2
  27. package/dist/application/services/dependency-container.d.ts.map +1 -1
  28. package/dist/application/services/dependency-container.js +177 -7
  29. package/dist/application/services/dependency-container.js.map +1 -1
  30. package/dist/application/services/intelligent-router.d.ts +13 -0
  31. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  32. package/dist/application/services/intelligent-router.js +306 -90
  33. package/dist/application/services/intelligent-router.js.map +1 -1
  34. package/dist/application/use-cases/ask-question-use-case.d.ts +19 -0
  35. package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
  36. package/dist/application/use-cases/ask-question-use-case.js +125 -46
  37. package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
  38. package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
  39. package/dist/application/use-cases/edit-file-use-case.js +16 -1
  40. package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
  41. package/dist/domain/entities/documentation.d.ts +35 -0
  42. package/dist/domain/entities/documentation.d.ts.map +1 -0
  43. package/dist/domain/entities/documentation.js +6 -0
  44. package/dist/domain/entities/documentation.js.map +1 -0
  45. package/dist/domain/entities/product-requirements.d.ts +50 -0
  46. package/dist/domain/entities/product-requirements.d.ts.map +1 -0
  47. package/dist/domain/entities/product-requirements.js +6 -0
  48. package/dist/domain/entities/product-requirements.js.map +1 -0
  49. package/dist/domain/entities/task.d.ts +152 -0
  50. package/dist/domain/entities/task.d.ts.map +1 -0
  51. package/dist/domain/entities/task.js +61 -0
  52. package/dist/domain/entities/task.js.map +1 -0
  53. package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
  54. package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
  55. package/dist/domain/errors/embeddings-not-found-error.js +13 -0
  56. package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
  57. package/dist/domain/interfaces/agent.interface.d.ts +15 -0
  58. package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
  59. package/dist/domain/interfaces/agent.interface.js +6 -0
  60. package/dist/domain/interfaces/agent.interface.js.map +1 -0
  61. package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
  62. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
  63. package/dist/domain/services/environment-mode-manager.d.ts +12 -0
  64. package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
  65. package/dist/domain/services/environment-mode-manager.js +22 -0
  66. package/dist/domain/services/environment-mode-manager.js.map +1 -0
  67. package/dist/domain/services/risk-tier-detector.d.ts +17 -0
  68. package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
  69. package/dist/domain/services/risk-tier-detector.js +78 -0
  70. package/dist/domain/services/risk-tier-detector.js.map +1 -0
  71. package/dist/embed.d.ts.map +1 -1
  72. package/dist/embed.js +18 -8
  73. package/dist/embed.js.map +1 -1
  74. package/dist/formatter.d.ts.map +1 -1
  75. package/dist/formatter.js +10 -3
  76. package/dist/formatter.js.map +1 -1
  77. package/dist/index.js +398 -164
  78. package/dist/index.js.map +1 -1
  79. package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
  80. package/dist/infrastructure/ai/cohere-ai-service.js +18 -5
  81. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  82. package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
  83. package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
  84. package/dist/infrastructure/ai/fake-ai-service.js +59 -0
  85. package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
  86. package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
  87. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
  88. package/dist/infrastructure/ai/provider-ai-service.js +477 -0
  89. package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
  90. package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
  91. package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
  92. package/dist/infrastructure/cache/embedding-cache.js +80 -9
  93. package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
  94. package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
  95. package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
  96. package/dist/infrastructure/cache/query-result-cache.js +40 -112
  97. package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
  98. package/dist/infrastructure/cache/response-cache.d.ts +18 -0
  99. package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
  100. package/dist/infrastructure/cache/response-cache.js +48 -0
  101. package/dist/infrastructure/cache/response-cache.js.map +1 -0
  102. package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
  103. package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
  104. package/dist/infrastructure/cache/security-scan-cache.js +25 -102
  105. package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
  106. package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
  107. package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
  108. package/dist/infrastructure/completion/bash-completion.js +11 -87
  109. package/dist/infrastructure/completion/bash-completion.js.map +1 -1
  110. package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
  111. package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
  112. package/dist/infrastructure/completion/fish-completion.js +15 -58
  113. package/dist/infrastructure/completion/fish-completion.js.map +1 -1
  114. package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
  115. package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
  116. package/dist/infrastructure/completion/zsh-completion.js +18 -73
  117. package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
  118. package/dist/infrastructure/config/config-manager.js +2 -2
  119. package/dist/infrastructure/config/config-manager.js.map +1 -1
  120. package/dist/infrastructure/context/conversation-context.d.ts +54 -0
  121. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
  122. package/dist/infrastructure/context/conversation-context.js +128 -0
  123. package/dist/infrastructure/context/conversation-context.js.map +1 -0
  124. package/dist/infrastructure/context/session-manager.d.ts +42 -0
  125. package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
  126. package/dist/infrastructure/context/session-manager.js +94 -0
  127. package/dist/infrastructure/context/session-manager.js.map +1 -0
  128. package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
  129. package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
  130. package/dist/infrastructure/cost/cost-tracker.js +12 -5
  131. package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
  132. package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
  133. package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
  134. package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
  135. package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
  136. package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
  137. package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
  138. package/dist/infrastructure/governance/policy-as-code.js +6 -8
  139. package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
  140. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
  141. package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
  142. package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
  143. package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
  144. package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
  145. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
  146. package/dist/infrastructure/providers/cohere-provider.js +444 -0
  147. package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
  148. package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
  149. package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
  150. package/dist/infrastructure/providers/fake-provider.js +130 -0
  151. package/dist/infrastructure/providers/fake-provider.js.map +1 -0
  152. package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
  153. package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
  154. package/dist/infrastructure/providers/local-llm-provider.js +330 -0
  155. package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
  156. package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
  157. package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
  158. package/dist/infrastructure/providers/model-config.types.js +9 -0
  159. package/dist/infrastructure/providers/model-config.types.js.map +1 -0
  160. package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
  161. package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
  162. package/dist/infrastructure/providers/model-provider.interface.js +8 -0
  163. package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
  164. package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
  165. package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
  166. package/dist/infrastructure/providers/openai-provider.js +413 -0
  167. package/dist/infrastructure/providers/openai-provider.js.map +1 -0
  168. package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
  169. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
  170. package/dist/infrastructure/providers/openrouter-provider.js +399 -0
  171. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
  172. package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
  173. package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
  174. package/dist/infrastructure/providers/operation-provider-resolver.js +105 -0
  175. package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
  176. package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
  177. package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
  178. package/dist/infrastructure/providers/provider-config-loader.js +120 -0
  179. package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
  180. package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
  181. package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
  182. package/dist/infrastructure/providers/provider-registry.js +88 -0
  183. package/dist/infrastructure/providers/provider-registry.js.map +1 -0
  184. package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
  185. package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
  186. package/dist/infrastructure/serialization/toon-serializer.js +119 -0
  187. package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
  188. package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
  189. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
  190. package/dist/infrastructure/storage/embeddings-path.js +37 -0
  191. package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
  192. package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
  193. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  194. package/dist/infrastructure/storage/plan-repository.js +36 -73
  195. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  196. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
  197. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
  198. package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
  199. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
  200. package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
  201. package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
  202. package/dist/infrastructure/storage/task-helpers.js +197 -0
  203. package/dist/infrastructure/storage/task-helpers.js.map +1 -0
  204. package/dist/infrastructure/storage/task-repository.d.ts +67 -0
  205. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
  206. package/dist/infrastructure/storage/task-repository.js +205 -0
  207. package/dist/infrastructure/storage/task-repository.js.map +1 -0
  208. package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
  209. package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
  210. package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
  211. package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
  212. package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
  213. package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
  214. package/dist/infrastructure/ux/capability-boundaries.js +42 -0
  215. package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
  216. package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
  217. package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
  218. package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
  219. package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
  220. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
  221. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
  222. package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
  223. package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
  224. package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
  225. package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
  226. package/dist/infrastructure/ux/feature-discovery.js +5 -181
  227. package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
  228. package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
  229. package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
  230. package/dist/infrastructure/ux/feedback-prompt.js +45 -0
  231. package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
  232. package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
  233. package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
  234. package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
  235. package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
  236. package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
  237. package/dist/infrastructure/ux/hitl-validation.js +86 -0
  238. package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
  239. package/dist/infrastructure/ux/progress-indicator.d.ts +4 -5
  240. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  241. package/dist/infrastructure/ux/progress-indicator.js +35 -40
  242. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  243. package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
  244. package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
  245. package/dist/infrastructure/ux/proportional-friction.js +200 -0
  246. package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
  247. package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
  248. package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
  249. package/dist/infrastructure/ux/review-checkpoint.js +33 -80
  250. package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
  251. package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
  252. package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
  253. package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
  254. package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
  255. package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
  256. package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
  257. package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
  258. package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
  259. package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
  260. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
  261. package/dist/infrastructure/validation/agent-feedback.js +55 -0
  262. package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
  263. package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
  264. package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
  265. package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
  266. package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
  267. package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
  268. package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
  269. package/dist/infrastructure/validation/feedback-stats.js +173 -0
  270. package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
  271. package/dist/infrastructure/validation/review-handler.d.ts +26 -0
  272. package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
  273. package/dist/infrastructure/validation/review-handler.js +40 -0
  274. package/dist/infrastructure/validation/review-handler.js.map +1 -0
  275. package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
  276. package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
  277. package/dist/infrastructure/validation/summary-aggregator.js +70 -0
  278. package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
  279. package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
  280. package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
  281. package/dist/infrastructure/validation/summary-extractor.js +45 -0
  282. package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
  283. package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
  284. package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
  285. package/dist/infrastructure/validation/trace-summary.js +52 -0
  286. package/dist/infrastructure/validation/trace-summary.js.map +1 -0
  287. package/dist/infrastructure/validation/trust-config.d.ts +27 -0
  288. package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
  289. package/dist/infrastructure/validation/trust-config.js +113 -0
  290. package/dist/infrastructure/validation/trust-config.js.map +1 -0
  291. package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
  292. package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
  293. package/dist/infrastructure/xai/attention-visualizer.js +6 -8
  294. package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
  295. package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
  296. package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
  297. package/dist/infrastructure/xai/cot-visualizer.js +6 -9
  298. package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
  299. package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
  300. package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
  301. package/dist/infrastructure/xai/decision-tree-log.js +6 -10
  302. package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
  303. package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
  304. package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
  305. package/dist/infrastructure/xai/interactive-xai.js +6 -8
  306. package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
  307. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
  308. package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
  309. package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
  310. package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
  311. package/dist/monitoring.d.ts +1 -1
  312. package/dist/monitoring.d.ts.map +1 -1
  313. package/dist/monitoring.js +12 -9
  314. package/dist/monitoring.js.map +1 -1
  315. package/dist/parallel-processor.d.ts.map +1 -1
  316. package/dist/parallel-processor.js +124 -45
  317. package/dist/parallel-processor.js.map +1 -1
  318. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  319. package/dist/presentation/cli/commands/ask-command.js +225 -86
  320. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  321. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  322. package/dist/presentation/cli/commands/config-command.js +8 -6
  323. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  324. package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
  325. package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
  326. package/dist/presentation/cli/commands/docs-command.js +25 -0
  327. package/dist/presentation/cli/commands/docs-command.js.map +1 -0
  328. package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
  329. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
  330. package/dist/presentation/cli/commands/fix-command.js +53 -0
  331. package/dist/presentation/cli/commands/fix-command.js.map +1 -0
  332. package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
  333. package/dist/presentation/cli/commands/help-command.js +2 -0
  334. package/dist/presentation/cli/commands/help-command.js.map +1 -1
  335. package/dist/presentation/cli/commands/models-command.d.ts +13 -0
  336. package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
  337. package/dist/presentation/cli/commands/models-command.js +194 -0
  338. package/dist/presentation/cli/commands/models-command.js.map +1 -0
  339. package/dist/presentation/cli/commands/orchestrate-command.d.ts +1 -0
  340. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  341. package/dist/presentation/cli/commands/orchestrate-command.js +68 -7
  342. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  343. package/dist/presentation/cli/commands/plan-command.d.ts +1 -0
  344. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  345. package/dist/presentation/cli/commands/plan-command.js +88 -8
  346. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  347. package/dist/presentation/cli/commands/product-command.d.ts +14 -0
  348. package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
  349. package/dist/presentation/cli/commands/product-command.js +22 -0
  350. package/dist/presentation/cli/commands/product-command.js.map +1 -0
  351. package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
  352. package/dist/presentation/cli/commands/react-command.js +3 -1
  353. package/dist/presentation/cli/commands/react-command.js.map +1 -1
  354. package/dist/presentation/cli/commands/review-command.d.ts +14 -0
  355. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
  356. package/dist/presentation/cli/commands/review-command.js +154 -0
  357. package/dist/presentation/cli/commands/review-command.js.map +1 -0
  358. package/dist/presentation/cli/commands/run-command.d.ts +13 -0
  359. package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
  360. package/dist/presentation/cli/commands/run-command.js +188 -0
  361. package/dist/presentation/cli/commands/run-command.js.map +1 -0
  362. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
  363. package/dist/presentation/cli/commands/setup-command.js +15 -0
  364. package/dist/presentation/cli/commands/setup-command.js.map +1 -1
  365. package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
  366. package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
  367. package/dist/presentation/cli/commands/smart-command.js +92 -6
  368. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  369. package/dist/presentation/cli/commands/status-command.d.ts +14 -0
  370. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
  371. package/dist/presentation/cli/commands/status-command.js +167 -0
  372. package/dist/presentation/cli/commands/status-command.js.map +1 -0
  373. package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
  374. package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
  375. package/dist/presentation/cli/commands/suggest-command.js +138 -0
  376. package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
  377. package/dist/presentation/cli/error-display.d.ts.map +1 -1
  378. package/dist/presentation/cli/error-display.js +43 -0
  379. package/dist/presentation/cli/error-display.js.map +1 -1
  380. package/dist/search.d.ts.map +1 -1
  381. package/dist/search.js +6 -1
  382. package/dist/search.js.map +1 -1
  383. package/dist/session.js +19 -2
  384. package/dist/session.js.map +1 -1
  385. package/dist/ui.d.ts +6 -0
  386. package/dist/ui.d.ts.map +1 -1
  387. package/dist/ui.js +43 -6
  388. package/dist/ui.js.map +1 -1
  389. package/package.json +16 -3
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # codehere
2
2
 
3
- > Enterprise-grade AI coding assistant with local embeddings and semantic search
3
+ > A governed, measurable AI coding OS that plans, edits, validates, and measures its own reliability. Every change is traceable, reviewable, and scored – so you can trust it on real code.
4
+
5
+ Codehere is a multi-agent coding system designed for solo developers and small teams. Unlike simple AI assistants, Codehere orchestrates specialized agents (Planning, Execution, Validation) to handle complex tasks while maintaining full transparency and control through review gates and trust metrics.
6
+
7
+ **πŸ“– [Documentation β†’](docs/OVERVIEW.md)** | **πŸ—ΊοΈ [Roadmap β†’](docs/ROADMAP.md)**
4
8
 
5
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
6
10
  [![Node.js](https://img.shields.io/badge/Node.js-18+-green)](https://nodejs.org/)
@@ -50,19 +54,69 @@ codehere index
50
54
  codehere "How does authentication work?"
51
55
  ```
52
56
 
57
+ ### Switching Providers
58
+
59
+ Codehere supports multiple AI providers. By default, it uses **Cohere** (no configuration needed).
60
+
61
+ **Quick Options:**
62
+
63
+ **Default (Cohere):**
64
+ ```bash
65
+ export COHERE_API_KEY=your-key
66
+ codehere status
67
+ ```
68
+
69
+ **OpenAI:**
70
+ ```bash
71
+ export CODEHERE_AI_PROVIDER=openai
72
+ export CODEHERE_OPENAI_API_KEY=sk-...
73
+ codehere status
74
+ ```
75
+
76
+ **OpenRouter (400+ Models):**
77
+ ```bash
78
+ export CODEHERE_AI_PROVIDER=openrouter
79
+ export OPENROUTER_API_KEY=sk-or-v1-...
80
+ codehere status
81
+ ```
82
+
83
+ **Local LLM (Ollama, LM Studio):**
84
+ ```bash
85
+ export CODEHERE_AI_PROVIDER=local
86
+ export CODEHERE_LOCAL_BASE_URL=http://localhost:11434
87
+ codehere status
88
+ ```
89
+
90
+ **Fake Mode (Testing/Demo):**
91
+ ```bash
92
+ export CODEHERE_FAKE_AI=1
93
+ codehere status # No API calls, deterministic outputs
94
+ ```
95
+
96
+ **Per-Operation Routing:**
97
+
98
+ Create `.codehere/providers.json` to route different operations to different providers. See [docs/PROVIDERS_QUICKSTART.md](docs/PROVIDERS_QUICKSTART.md) for complete setup guide.
99
+
100
+ **πŸ“– [Complete Provider Guide β†’](docs/PROVIDERS_QUICKSTART.md)**
101
+
53
102
  **Using Codehere:**
54
103
 
55
104
  ```bash
56
105
  # Natural language queries (unified command)
57
106
  codehere "explain this function"
58
- codehere "add error handling to src/utils.ts"
59
- codehere "refactor user service to use dependency injection"
107
+ codehere "add error handling to src/utils.ts" --review
108
+ codehere "refactor user service to use dependency injection" --review
60
109
 
61
110
  # Or use explicit commands
62
111
  codehere ask "How does authentication work?"
63
112
  codehere explain src/utils.ts
64
113
  codehere plan "implement user authentication system"
65
- codehere orchestrate "add comprehensive logging"
114
+ codehere orchestrate "add comprehensive logging" --review
115
+
116
+ # Validation Mode: Review before applying changes
117
+ codehere fix src/utils.ts "Add error handling" --review
118
+ codehere orchestrate "Add authentication" --review
119
+ codehere plan "Refactor to DI" --execute --review
66
120
 
67
121
  # Manage configuration
68
122
  codehere config # Show current configuration
@@ -74,57 +128,177 @@ codehere --help
74
128
  codehere help <command>
75
129
  ```
76
130
 
131
+ > **πŸ’‘ Tip**: Use `--review` on destructive operations (edit, orchestrate, plan --execute) to see summaries and approve changes before they're applied. This builds trust and prevents mistakes.
132
+
133
+ ### πŸ” Validation Mode & Trust Scores
134
+
135
+ Validation Mode makes every agent operation traceable, reviewable, and measurable. Use `--review` to pause before applying changes, review structured summaries, and approve or reject. Every operation generates feedback that feeds into trust scores.
136
+
137
+ **How it works:**
138
+ - Run commands with `--review` to enable feedback capture
139
+ - Review summaries show files changed, validation checks, and risk assessment
140
+ - Feedback is stored locally in `data/feedback/agent-feedback.jsonl`
141
+ - Trust scores are computed per agent: `(approved_success_runs / total_runs) Γ— 100`
142
+
143
+ **Example:**
144
+ ```bash
145
+ # Enable review & feedback capture
146
+ CODEHERE_AUTO_APPROVE=true codehere fix src/file.ts "add input validation" --review
147
+
148
+ # View trust scores
149
+ npm run analyze:feedback
150
+ codehere status
151
+ ```
152
+
153
+ **Optional:** Configure minimum trust thresholds via `config/trust-config.json` to highlight agents that need more validation (warnings only, non-blocking).
154
+
155
+ **For CI/dashboards:** Export trust and feedback stats as JSON:
156
+ - `npm run analyze:feedback -- --json`
157
+ - `codehere status --json`
158
+
159
+ **For CI gates:** Enforce minimum trust scores:
160
+ - `npm run check:trust` - Fails if any agent is below its configured threshold
161
+
162
+ **πŸ“– [Complete Guide β†’](docs/VALIDATION_MODE.md)**
163
+
164
+ ### πŸ’¬ Feedback Collection
165
+
166
+ Codehere collects feedback after operations to improve responses. In interactive mode, you'll see a prompt asking for feedback. In non-interactive mode (scripts, CI), you can provide feedback via environment variables:
167
+
168
+ ```bash
169
+ # Positive feedback (thumbs up)
170
+ CODEHERE_FEEDBACK=y codehere ask "What is main?"
171
+
172
+ # Negative feedback (thumbs down)
173
+ CODEHERE_FEEDBACK=n codehere ask "What is main?"
174
+
175
+ # Request refinement with message
176
+ CODEHERE_FEEDBACK=r CODEHERE_FEEDBACK_MESSAGE="Add more examples" codehere ask "What is main?"
177
+
178
+ # Alternative values
179
+ CODEHERE_FEEDBACK=positive codehere ask "What is main?"
180
+ CODEHERE_FEEDBACK=negative codehere ask "What is main?"
181
+ CODEHERE_FEEDBACK=yes codehere ask "What is main?"
182
+ CODEHERE_FEEDBACK=no codehere ask "What is main?"
183
+ ```
184
+
185
+ **Environment Variables:**
186
+ - `CODEHERE_FEEDBACK`: `y`/`yes`/`positive` (thumbs up), `n`/`no`/`negative` (thumbs down), `r`/`refine`/`refinement` (request refinement)
187
+ - `CODEHERE_FEEDBACK_MESSAGE`: Optional message for refinement requests
188
+
77
189
  ## ✨ Features
78
190
 
79
- ### 🧠 Semantic Code Search
80
- - Builds local embedding index using Cohere's embedding API
81
- - Uses cosine similarity to find relevant code chunks
82
- - Enhanced context with file relationships and dependencies
191
+ ### 🎯 Why Codehere vs Other Coding Agents?
192
+
193
+ - **Explicit Review Gates**: Unlike agents that apply changes immediately, Codehere uses `--review` to pause, show summaries, and request approval before modifying files
194
+ - **Trust Scores & Analytics**: Every agent run is scored. Run `npm run analyze:feedback` to see which agents are most reliable in your workflow
195
+ - **Full Traceability**: Every operation generates a structured TraceSummary showing files changed, reasoning steps, validation checks, and risk assessment
196
+ - **Governed Multi-Agent System**: Specialized agents (Planning, Execution, Validation) work together with full instrumentation – not a black box
197
+ - **Privacy-First Feedback**: All feedback stored locally in JSONL. No telemetry. Opt-out available. Your data stays yours
198
+
199
+ ### πŸ€– Multi-Agent Orchestration
200
+
201
+ - **Planning Agent**: Breaks complex tasks into hierarchical sub-plans with risk assessment
202
+ - **Execution Agent**: Executes plans step-by-step, tracks file changes, handles rollbacks
203
+ - **Validation Agent**: Runs compilation checks, tests, and quality analysis before completion
204
+ - **Intelligent Router**: Automatically selects the right workflow (simple, ReAct, or multi-agent) based on query complexity
205
+ - **Multi-Agent Orchestrator**: Coordinates all agents, aggregates summaries, provides unified traceability
206
+
207
+ ### πŸ›‘οΈ Validation Mode & Review Gates
208
+
209
+ - **`--review` Flag**: Pause before applying changes, review structured summaries, approve or reject
210
+ - **TraceSummary Generation**: Every agent run produces a detailed summary (files, steps, checks, metrics, risk)
211
+ - **Composite Summaries**: Multi-agent operations merge all agent summaries into one reviewable report
212
+ - **Risk Assessment**: Automatic risk level calculation (low/medium/high/critical) with clear reasons
213
+ - **Environment Controls**: `CODEHERE_AUTO_APPROVE=true` for CI/CD, `CODEHERE_FEEDBACK_OPT_OUT=true` for privacy
83
214
 
84
- ### πŸ€– AI-Powered Assistance
215
+ ### πŸ“Š Trust & Reliability Metrics
216
+
217
+ - **Agent Feedback Analytics**: Run `npm run analyze:feedback` to see trust scores, success rates, and operation breakdowns
218
+ - **Trust Score Calculation**: `(approved_success_runs / total_runs) Γ— 100` – measurable agent reliability
219
+ - **Outcome Tracking**: Success, failure, partial_success, cancelled, error – complete visibility
220
+ - **User Action Tracking**: Approved, rejected, modified – understand how users interact with agents
221
+
222
+ ### 🧠 Semantic Code Search & Context
223
+
224
+ - Builds local embedding index using Cohere's embedding API
225
+ - Enhanced context with file relationships and dependencies (15+ chunks)
85
226
  - Context-aware responses using retrieved code
86
- - Natural language code explanations
87
- - Intelligent code editing with unified diff generation
88
- - Enhanced context understanding (15+ chunks)
227
+ - Natural language code explanations and intelligent editing
228
+
229
+ ### πŸ”’ Security & Privacy
89
230
 
90
- ### πŸ›‘οΈ Enterprise Safety
91
- - **Line limit enforcement** - Maximum 50 lines changed per edit
92
- - **Restricted folders** - Protect critical directories (infra/, billing/)
93
- - **Single-file edits** - Prevent accidental multi-file changes
94
- - **Audit logging** - Every operation logged to JSONL
231
+ - **Local-first**: All embeddings and feedback stored locally in SQLite
232
+ - **No code transmission**: Only chunks sent to API for embedding, never full files
233
+ - **Audit trail**: Complete JSONL logging of all operations
234
+ - **Policy enforcement**: Line limits, restricted folders, single-file safety checks
235
+ - **Privacy controls**: Opt-out available, anonymization by default
95
236
 
96
237
  ### πŸ”§ Enterprise Reliability
97
- - **Automatic error recovery** - Retry with exponential backoff
98
- - **Circuit breaker** - Protects against API failures
99
- - **Health monitoring** - System health checks and metrics
100
- - **24/7 operation ready** - Robust error handling
101
238
 
102
- ### πŸ“¦ Production Ready
103
- - Fully tested end-to-end
104
- - TypeScript for type safety
105
- - SQLite for local vector storage
106
- - Comprehensive error handling
239
+ - **Automatic error recovery**: Retry with exponential backoff
240
+ - **Circuit breaker**: Protects against API failures
241
+ - **Health monitoring**: System health checks and metrics
242
+ - **24/7 operation ready**: Robust error handling and graceful degradation
107
243
 
108
244
  ## πŸ—οΈ Architecture
109
245
 
246
+ ### Multi-Agent System
247
+
110
248
  ```
111
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
112
- β”‚ CLI Tool β”‚
113
- β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
114
- β”‚
115
- β”œβ”€β†’ Index: Scan β†’ Chunk β†’ Embed β†’ Store (SQLite)
116
- β”œβ”€β†’ Ask: Query β†’ Embed β†’ Search (15 chunks) β†’ Chat
117
- β”œβ”€β†’ Explain: Read β†’ Chat
118
- β”œβ”€β†’ Fix: Read β†’ Generate Diff β†’ Policy Check β†’ Apply
119
- └─→ Health: System Status β†’ Metrics
249
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
250
+ β”‚ Intelligent Router β”‚
251
+ β”‚ (Routes queries to appropriate workflow) β”‚
252
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
253
+ β”‚
254
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
255
+ β”‚ β”‚ β”‚
256
+ β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
257
+ β”‚ Simpleβ”‚ β”‚ ReAct β”‚ β”‚ Multi-Agent β”‚
258
+ β”‚ Work β”‚ β”‚ Agent β”‚ β”‚ Orchestrator β”‚
259
+ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
260
+ β”‚
261
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
262
+ β”‚ β”‚ β”‚
263
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
264
+ β”‚ Planning β”‚ β”‚Execution β”‚ β”‚ Validation β”‚
265
+ β”‚ Agent β”‚β†’ β”‚ Agent β”‚β†’ β”‚ Agent β”‚
266
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
267
+ β”‚ β”‚ β”‚
268
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
269
+ β”‚
270
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
271
+ β”‚ Composite Summary β”‚
272
+ β”‚ + Review Gate β”‚
273
+ β”‚ + AgentFeedback β”‚
274
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
120
275
  ```
121
276
 
277
+ ### Core Components
278
+
279
+ - **Intelligent Router**: Analyzes query intent, selects optimal workflow
280
+ - **Planning Agent**: Creates hierarchical plans with risk assessment
281
+ - **Execution Agent**: Executes plans, tracks changes, handles rollbacks
282
+ - **Validation Agent**: Compiles, tests, analyzes quality
283
+ - **Multi-Agent Orchestrator**: Coordinates all agents, creates unified run context
284
+ - **Validation Layer**: TraceSummary generation, AgentFeedback recording, review handler
285
+
286
+ ### Data Flow
287
+
288
+ 1. **Query** β†’ Router determines intent
289
+ 2. **Planning** β†’ Agent creates plan with complexity tracking
290
+ 3. **Execution** β†’ Agent executes with file change tracking
291
+ 4. **Validation** β†’ Agent runs checks with pass/fail tracking
292
+ 5. **Summary** β†’ Composite summary aggregated from all agents
293
+ 6. **Review** β†’ User reviews summary, approves/rejects
294
+ 7. **Feedback** β†’ Outcome recorded to local JSONL, trust scores updated
295
+
122
296
  **Tech Stack:**
123
297
  - **TypeScript** - Type-safe development
124
- - **Cohere AI** - Embeddings and chat completion
125
- - **SQL.js** - In-memory SQLite for vector storage
298
+ - **Cohere AI** - Embeddings, chat completion, reranking
299
+ - **SQLite** - Local vector storage and feedback persistence
126
300
  - **Commander.js** - CLI interface
127
- - **Tiktoken** - Token counting and chunking
301
+ - **Clean Architecture** - Domain, application, infrastructure layers
128
302
 
129
303
  ## πŸ“Š Performance
130
304
 
@@ -133,12 +307,26 @@ codehere help <command>
133
307
  - **Chat:** ~2-5 seconds per query
134
308
  - **Storage:** ~13KB per chunk (1024-dim embeddings)
135
309
 
310
+ ## 🎯 Trust & Reliability Dashboard
311
+
312
+ Codehere measures and reports its own reliability. Every operation with `--review` generates feedback that feeds into trust scores.
313
+
314
+ ### Run Analytics
315
+
316
+ ```bash
317
+ npm run analyze:feedback
318
+ ```
319
+
320
+ Shows trust scores per agent, success rates, and operation breakdowns. See `docs/VALIDATION_MODE_USAGE_GUIDE.md` for details.
321
+
136
322
  ## πŸ”’ Security & Privacy
137
323
 
138
- - **Local-first:** All embeddings stored locally in SQLite
139
- - **No code transmission:** Only chunks sent to API for embedding
140
- - **Audit trail:** Complete JSONL logging of all operations
141
- - **Policy enforcement:** Multiple safety checks before applying changes
324
+ - **Local-first storage:** All embeddings and feedback stored locally in SQLite – nothing leaves your machine
325
+ - **No code transmission:** Only chunks sent to API for embedding, never full files
326
+ - **Privacy-first feedback:** All AgentFeedback stored locally in `data/feedback/agent-feedback.jsonl`. No telemetry. Opt out with `CODEHERE_FEEDBACK_OPT_OUT=true`
327
+ - **Audit trail:** Complete JSONL logging of all operations with full traceability
328
+ - **Policy enforcement:** Line limits, restricted folders, single-file safety checks
329
+ - **Review gates:** Explicit approval required before applying destructive changes
142
330
 
143
331
  ## πŸ“ˆ Use Cases
144
332
 
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Application Agent: Documentation Agent
3
+ * Generates and maintains documentation (README, API docs)
4
+ */
5
+ import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
6
+ import type { MemoryStreamService } from '../../infrastructure/storage/memory-stream-service.js';
7
+ import type { IAgent } from '../../domain/interfaces/agent.interface.js';
8
+ import type { DocumentationRequest, DocumentationResponse } from '../../domain/entities/documentation.js';
9
+ export declare class DocumentationAgent implements IAgent<DocumentationRequest, DocumentationResponse> {
10
+ private aiService;
11
+ private memoryStream?;
12
+ private cwd;
13
+ name: string;
14
+ type: "non-engineering";
15
+ constructor(aiService: IAIService, memoryStream?: MemoryStreamService | undefined, cwd?: string);
16
+ execute(request: DocumentationRequest): Promise<DocumentationResponse>;
17
+ private generateREADME;
18
+ private generateAPIDocs;
19
+ private analyzeFolderStructure;
20
+ private findSourceFiles;
21
+ private buildReadmePrompt;
22
+ private buildAPIDocsContent;
23
+ }
24
+ //# sourceMappingURL=documentation-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentation-agent.d.ts","sourceRoot":"","sources":["../../../src/application/agents/documentation-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAOhD,qBAAa,kBAAmB,YAAW,MAAM,CAAC,oBAAoB,EAAE,qBAAqB,CAAC;IAK1F,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,YAAY,CAAC;IACrB,OAAO,CAAC,GAAG;IANb,IAAI,SAAyB;IAC7B,IAAI,EAAG,iBAAiB,CAAU;gBAGxB,SAAS,EAAE,UAAU,EACrB,YAAY,CAAC,EAAE,mBAAmB,YAAA,EAClC,GAAG,GAAE,MAAsB;IAG/B,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAuD9D,cAAc;YA2Gd,eAAe;IAgG7B,OAAO,CAAC,sBAAsB;IAwC9B,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,iBAAiB;YA2BX,mBAAmB;CA6DlC"}