@mirnoorata/codexa 0.2.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 (364) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +634 -0
  3. package/dist/artifacts.d.ts +2 -0
  4. package/dist/artifacts.js +375 -0
  5. package/dist/artifacts.js.map +1 -0
  6. package/dist/autonomy.d.ts +17 -0
  7. package/dist/autonomy.js +124 -0
  8. package/dist/autonomy.js.map +1 -0
  9. package/dist/autoverify/policy.d.ts +5 -0
  10. package/dist/autoverify/policy.js +18 -0
  11. package/dist/autoverify/policy.js.map +1 -0
  12. package/dist/autoverify.d.ts +45 -0
  13. package/dist/autoverify.js +1041 -0
  14. package/dist/autoverify.js.map +1 -0
  15. package/dist/cache-lock.d.ts +16 -0
  16. package/dist/cache-lock.js +181 -0
  17. package/dist/cache-lock.js.map +1 -0
  18. package/dist/cli/hooks.d.ts +5 -0
  19. package/dist/cli/hooks.js +264 -0
  20. package/dist/cli/hooks.js.map +1 -0
  21. package/dist/cli.d.ts +2 -0
  22. package/dist/cli.js +1034 -0
  23. package/dist/cli.js.map +1 -0
  24. package/dist/codex-contract.d.ts +2 -0
  25. package/dist/codex-contract.js +78 -0
  26. package/dist/codex-contract.js.map +1 -0
  27. package/dist/command.d.ts +34 -0
  28. package/dist/command.js +162 -0
  29. package/dist/command.js.map +1 -0
  30. package/dist/doctor.d.ts +112 -0
  31. package/dist/doctor.js +518 -0
  32. package/dist/doctor.js.map +1 -0
  33. package/dist/eval/baseline.d.ts +7 -0
  34. package/dist/eval/baseline.js +146 -0
  35. package/dist/eval/baseline.js.map +1 -0
  36. package/dist/eval/historical.d.ts +4 -0
  37. package/dist/eval/historical.js +663 -0
  38. package/dist/eval/historical.js.map +1 -0
  39. package/dist/eval/render.d.ts +2 -0
  40. package/dist/eval/render.js +53 -0
  41. package/dist/eval/render.js.map +1 -0
  42. package/dist/eval/scoring.d.ts +21 -0
  43. package/dist/eval/scoring.js +618 -0
  44. package/dist/eval/scoring.js.map +1 -0
  45. package/dist/eval/synthetic.d.ts +36 -0
  46. package/dist/eval/synthetic.js +107 -0
  47. package/dist/eval/synthetic.js.map +1 -0
  48. package/dist/eval/types.d.ts +36 -0
  49. package/dist/eval/types.js +2 -0
  50. package/dist/eval/types.js.map +1 -0
  51. package/dist/eval.d.ts +140 -0
  52. package/dist/eval.js +551 -0
  53. package/dist/eval.js.map +1 -0
  54. package/dist/git.d.ts +17 -0
  55. package/dist/git.js +189 -0
  56. package/dist/git.js.map +1 -0
  57. package/dist/github-release.d.ts +47 -0
  58. package/dist/github-release.js +610 -0
  59. package/dist/github-release.js.map +1 -0
  60. package/dist/github-sync.d.ts +68 -0
  61. package/dist/github-sync.js +345 -0
  62. package/dist/github-sync.js.map +1 -0
  63. package/dist/graph.d.ts +10 -0
  64. package/dist/graph.js +665 -0
  65. package/dist/graph.js.map +1 -0
  66. package/dist/indexer/aliases.d.ts +2 -0
  67. package/dist/indexer/aliases.js +190 -0
  68. package/dist/indexer/aliases.js.map +1 -0
  69. package/dist/indexer/artifact-writing.d.ts +3 -0
  70. package/dist/indexer/artifact-writing.js +79 -0
  71. package/dist/indexer/artifact-writing.js.map +1 -0
  72. package/dist/indexer/discovery.d.ts +2 -0
  73. package/dist/indexer/discovery.js +5 -0
  74. package/dist/indexer/discovery.js.map +1 -0
  75. package/dist/indexer/external-facts.d.ts +6 -0
  76. package/dist/indexer/external-facts.js +45 -0
  77. package/dist/indexer/external-facts.js.map +1 -0
  78. package/dist/indexer/freshness.d.ts +8 -0
  79. package/dist/indexer/freshness.js +56 -0
  80. package/dist/indexer/freshness.js.map +1 -0
  81. package/dist/indexer/graph-stage.d.ts +2 -0
  82. package/dist/indexer/graph-stage.js +21 -0
  83. package/dist/indexer/graph-stage.js.map +1 -0
  84. package/dist/indexer/parsing.d.ts +30 -0
  85. package/dist/indexer/parsing.js +177 -0
  86. package/dist/indexer/parsing.js.map +1 -0
  87. package/dist/indexer/pipeline.d.ts +5 -0
  88. package/dist/indexer/pipeline.js +8 -0
  89. package/dist/indexer/pipeline.js.map +1 -0
  90. package/dist/indexer/ranking.d.ts +4 -0
  91. package/dist/indexer/ranking.js +134 -0
  92. package/dist/indexer/ranking.js.map +1 -0
  93. package/dist/indexer.d.ts +13 -0
  94. package/dist/indexer.js +395 -0
  95. package/dist/indexer.js.map +1 -0
  96. package/dist/init.d.ts +24 -0
  97. package/dist/init.js +566 -0
  98. package/dist/init.js.map +1 -0
  99. package/dist/language.d.ts +8 -0
  100. package/dist/language.js +123 -0
  101. package/dist/language.js.map +1 -0
  102. package/dist/live-index.d.ts +68 -0
  103. package/dist/live-index.js +215 -0
  104. package/dist/live-index.js.map +1 -0
  105. package/dist/lsp/assist.d.ts +44 -0
  106. package/dist/lsp/assist.js +331 -0
  107. package/dist/lsp/assist.js.map +1 -0
  108. package/dist/lsp/client.d.ts +59 -0
  109. package/dist/lsp/client.js +208 -0
  110. package/dist/lsp/client.js.map +1 -0
  111. package/dist/mcp/compaction.d.ts +15 -0
  112. package/dist/mcp/compaction.js +1249 -0
  113. package/dist/mcp/compaction.js.map +1 -0
  114. package/dist/mcp/envelope.d.ts +44 -0
  115. package/dist/mcp/envelope.js +425 -0
  116. package/dist/mcp/envelope.js.map +1 -0
  117. package/dist/mcp/prompts.d.ts +2 -0
  118. package/dist/mcp/prompts.js +109 -0
  119. package/dist/mcp/prompts.js.map +1 -0
  120. package/dist/mcp/resources.d.ts +2 -0
  121. package/dist/mcp/resources.js +132 -0
  122. package/dist/mcp/resources.js.map +1 -0
  123. package/dist/mcp/runtime.d.ts +15 -0
  124. package/dist/mcp/runtime.js +122 -0
  125. package/dist/mcp/runtime.js.map +1 -0
  126. package/dist/mcp/session-memory.d.ts +3 -0
  127. package/dist/mcp/session-memory.js +61 -0
  128. package/dist/mcp/session-memory.js.map +1 -0
  129. package/dist/mcp/tool-registry.d.ts +269 -0
  130. package/dist/mcp/tool-registry.js +284 -0
  131. package/dist/mcp/tool-registry.js.map +1 -0
  132. package/dist/mcp/tools.d.ts +53 -0
  133. package/dist/mcp/tools.js +372 -0
  134. package/dist/mcp/tools.js.map +1 -0
  135. package/dist/mcp-repo-root.d.ts +16 -0
  136. package/dist/mcp-repo-root.js +322 -0
  137. package/dist/mcp-repo-root.js.map +1 -0
  138. package/dist/mcp-tool-catalog.d.ts +2 -0
  139. package/dist/mcp-tool-catalog.js +2 -0
  140. package/dist/mcp-tool-catalog.js.map +1 -0
  141. package/dist/mcp.d.ts +11 -0
  142. package/dist/mcp.js +332 -0
  143. package/dist/mcp.js.map +1 -0
  144. package/dist/outcome-ranking.d.ts +5 -0
  145. package/dist/outcome-ranking.js +115 -0
  146. package/dist/outcome-ranking.js.map +1 -0
  147. package/dist/parser/context.d.ts +28 -0
  148. package/dist/parser/context.js +2 -0
  149. package/dist/parser/context.js.map +1 -0
  150. package/dist/parser/ecma.d.ts +5 -0
  151. package/dist/parser/ecma.js +388 -0
  152. package/dist/parser/ecma.js.map +1 -0
  153. package/dist/parser/facts.d.ts +12 -0
  154. package/dist/parser/facts.js +137 -0
  155. package/dist/parser/facts.js.map +1 -0
  156. package/dist/parser/json.d.ts +3 -0
  157. package/dist/parser/json.js +318 -0
  158. package/dist/parser/json.js.map +1 -0
  159. package/dist/parser/markdown.d.ts +3 -0
  160. package/dist/parser/markdown.js +180 -0
  161. package/dist/parser/markdown.js.map +1 -0
  162. package/dist/parser/nodes.d.ts +5 -0
  163. package/dist/parser/nodes.js +75 -0
  164. package/dist/parser/nodes.js.map +1 -0
  165. package/dist/parser/python.d.ts +2 -0
  166. package/dist/parser/python.js +307 -0
  167. package/dist/parser/python.js.map +1 -0
  168. package/dist/parser/references.d.ts +3 -0
  169. package/dist/parser/references.js +204 -0
  170. package/dist/parser/references.js.map +1 -0
  171. package/dist/parser/risks.d.ts +4 -0
  172. package/dist/parser/risks.js +62 -0
  173. package/dist/parser/risks.js.map +1 -0
  174. package/dist/parser/routes.d.ts +5 -0
  175. package/dist/parser/routes.js +97 -0
  176. package/dist/parser/routes.js.map +1 -0
  177. package/dist/parser/shallow.d.ts +3 -0
  178. package/dist/parser/shallow.js +545 -0
  179. package/dist/parser/shallow.js.map +1 -0
  180. package/dist/parser/source.d.ts +4 -0
  181. package/dist/parser/source.js +127 -0
  182. package/dist/parser/source.js.map +1 -0
  183. package/dist/parser.d.ts +2 -0
  184. package/dist/parser.js +2 -0
  185. package/dist/parser.js.map +1 -0
  186. package/dist/placeholder-signals.d.ts +15 -0
  187. package/dist/placeholder-signals.js +511 -0
  188. package/dist/placeholder-signals.js.map +1 -0
  189. package/dist/post-edit-outcomes.d.ts +167 -0
  190. package/dist/post-edit-outcomes.js +484 -0
  191. package/dist/post-edit-outcomes.js.map +1 -0
  192. package/dist/queries.d.ts +12 -0
  193. package/dist/queries.js +13 -0
  194. package/dist/queries.js.map +1 -0
  195. package/dist/query/change-plan.d.ts +48 -0
  196. package/dist/query/change-plan.js +858 -0
  197. package/dist/query/change-plan.js.map +1 -0
  198. package/dist/query/compact-data.d.ts +25 -0
  199. package/dist/query/compact-data.js +74 -0
  200. package/dist/query/compact-data.js.map +1 -0
  201. package/dist/query/context.d.ts +5 -0
  202. package/dist/query/context.js +1162 -0
  203. package/dist/query/context.js.map +1 -0
  204. package/dist/query/diff.d.ts +5 -0
  205. package/dist/query/diff.js +111 -0
  206. package/dist/query/diff.js.map +1 -0
  207. package/dist/query/edge-evidence.d.ts +3 -0
  208. package/dist/query/edge-evidence.js +36 -0
  209. package/dist/query/edge-evidence.js.map +1 -0
  210. package/dist/query/formatting.d.ts +14 -0
  211. package/dist/query/formatting.js +67 -0
  212. package/dist/query/formatting.js.map +1 -0
  213. package/dist/query/graph-traversal.d.ts +22 -0
  214. package/dist/query/graph-traversal.js +218 -0
  215. package/dist/query/graph-traversal.js.map +1 -0
  216. package/dist/query/graph.d.ts +14 -0
  217. package/dist/query/graph.js +102 -0
  218. package/dist/query/graph.js.map +1 -0
  219. package/dist/query/impact.d.ts +28 -0
  220. package/dist/query/impact.js +568 -0
  221. package/dist/query/impact.js.map +1 -0
  222. package/dist/query/inspection.d.ts +9 -0
  223. package/dist/query/inspection.js +290 -0
  224. package/dist/query/inspection.js.map +1 -0
  225. package/dist/query/next-tools.d.ts +3 -0
  226. package/dist/query/next-tools.js +25 -0
  227. package/dist/query/next-tools.js.map +1 -0
  228. package/dist/query/placeholders.d.ts +24 -0
  229. package/dist/query/placeholders.js +121 -0
  230. package/dist/query/placeholders.js.map +1 -0
  231. package/dist/query/post-edit/decision.d.ts +49 -0
  232. package/dist/query/post-edit/decision.js +130 -0
  233. package/dist/query/post-edit/decision.js.map +1 -0
  234. package/dist/query/post-edit/dirty-scope.d.ts +16 -0
  235. package/dist/query/post-edit/dirty-scope.js +21 -0
  236. package/dist/query/post-edit/dirty-scope.js.map +1 -0
  237. package/dist/query/post-edit/next-actions.d.ts +22 -0
  238. package/dist/query/post-edit/next-actions.js +44 -0
  239. package/dist/query/post-edit/next-actions.js.map +1 -0
  240. package/dist/query/post-edit/snapshot-contract.d.ts +8 -0
  241. package/dist/query/post-edit/snapshot-contract.js +111 -0
  242. package/dist/query/post-edit/snapshot-contract.js.map +1 -0
  243. package/dist/query/post-edit.d.ts +5 -0
  244. package/dist/query/post-edit.js +1108 -0
  245. package/dist/query/post-edit.js.map +1 -0
  246. package/dist/query/quality.d.ts +43 -0
  247. package/dist/query/quality.js +134 -0
  248. package/dist/query/quality.js.map +1 -0
  249. package/dist/query/raw-search.d.ts +23 -0
  250. package/dist/query/raw-search.js +147 -0
  251. package/dist/query/raw-search.js.map +1 -0
  252. package/dist/query/runtime.d.ts +11 -0
  253. package/dist/query/runtime.js +79 -0
  254. package/dist/query/runtime.js.map +1 -0
  255. package/dist/query/search.d.ts +25 -0
  256. package/dist/query/search.js +429 -0
  257. package/dist/query/search.js.map +1 -0
  258. package/dist/query/session-memory.d.ts +3 -0
  259. package/dist/query/session-memory.js +108 -0
  260. package/dist/query/session-memory.js.map +1 -0
  261. package/dist/query/session.d.ts +41 -0
  262. package/dist/query/session.js +90 -0
  263. package/dist/query/session.js.map +1 -0
  264. package/dist/query/targets.d.ts +25 -0
  265. package/dist/query/targets.js +97 -0
  266. package/dist/query/targets.js.map +1 -0
  267. package/dist/query/test-commands.d.ts +10 -0
  268. package/dist/query/test-commands.js +110 -0
  269. package/dist/query/test-commands.js.map +1 -0
  270. package/dist/query/test-plan.d.ts +6 -0
  271. package/dist/query/test-plan.js +104 -0
  272. package/dist/query/test-plan.js.map +1 -0
  273. package/dist/query/tests.d.ts +48 -0
  274. package/dist/query/tests.js +444 -0
  275. package/dist/query/tests.js.map +1 -0
  276. package/dist/query/verification/shell.d.ts +20 -0
  277. package/dist/query/verification/shell.js +164 -0
  278. package/dist/query/verification/shell.js.map +1 -0
  279. package/dist/query/verification.d.ts +47 -0
  280. package/dist/query/verification.js +1123 -0
  281. package/dist/query/verification.js.map +1 -0
  282. package/dist/query/workflow.d.ts +17 -0
  283. package/dist/query/workflow.js +252 -0
  284. package/dist/query/workflow.js.map +1 -0
  285. package/dist/query/workspace-guidance.d.ts +26 -0
  286. package/dist/query/workspace-guidance.js +214 -0
  287. package/dist/query/workspace-guidance.js.map +1 -0
  288. package/dist/query/worktree-state.d.ts +22 -0
  289. package/dist/query/worktree-state.js +32 -0
  290. package/dist/query/worktree-state.js.map +1 -0
  291. package/dist/query/worktree.d.ts +16 -0
  292. package/dist/query/worktree.js +194 -0
  293. package/dist/query/worktree.js.map +1 -0
  294. package/dist/query-data.d.ts +4 -0
  295. package/dist/query-data.js +112 -0
  296. package/dist/query-data.js.map +1 -0
  297. package/dist/repo-files.d.ts +24 -0
  298. package/dist/repo-files.js +105 -0
  299. package/dist/repo-files.js.map +1 -0
  300. package/dist/resolver.d.ts +9 -0
  301. package/dist/resolver.js +555 -0
  302. package/dist/resolver.js.map +1 -0
  303. package/dist/retrieval.d.ts +46 -0
  304. package/dist/retrieval.js +783 -0
  305. package/dist/retrieval.js.map +1 -0
  306. package/dist/risk-ingest.d.ts +16 -0
  307. package/dist/risk-ingest.js +458 -0
  308. package/dist/risk-ingest.js.map +1 -0
  309. package/dist/rules.d.ts +10 -0
  310. package/dist/rules.js +107 -0
  311. package/dist/rules.js.map +1 -0
  312. package/dist/semantic/python.d.ts +9 -0
  313. package/dist/semantic/python.js +817 -0
  314. package/dist/semantic/python.js.map +1 -0
  315. package/dist/semantic/typescript.d.ts +10 -0
  316. package/dist/semantic/typescript.js +714 -0
  317. package/dist/semantic/typescript.js.map +1 -0
  318. package/dist/semantic-retrieval.d.ts +53 -0
  319. package/dist/semantic-retrieval.js +673 -0
  320. package/dist/semantic-retrieval.js.map +1 -0
  321. package/dist/session-memory/derivation.d.ts +6 -0
  322. package/dist/session-memory/derivation.js +400 -0
  323. package/dist/session-memory/derivation.js.map +1 -0
  324. package/dist/session-memory/event-log.d.ts +23 -0
  325. package/dist/session-memory/event-log.js +126 -0
  326. package/dist/session-memory/event-log.js.map +1 -0
  327. package/dist/session-memory/formatting.d.ts +7 -0
  328. package/dist/session-memory/formatting.js +86 -0
  329. package/dist/session-memory/formatting.js.map +1 -0
  330. package/dist/session-memory/model.d.ts +94 -0
  331. package/dist/session-memory/model.js +17 -0
  332. package/dist/session-memory/model.js.map +1 -0
  333. package/dist/session-memory/runtime.d.ts +24 -0
  334. package/dist/session-memory/runtime.js +289 -0
  335. package/dist/session-memory/runtime.js.map +1 -0
  336. package/dist/session-memory/store.d.ts +27 -0
  337. package/dist/session-memory/store.js +447 -0
  338. package/dist/session-memory/store.js.map +1 -0
  339. package/dist/session-memory.d.ts +1 -0
  340. package/dist/session-memory.js +2 -0
  341. package/dist/session-memory.js.map +1 -0
  342. package/dist/static-analysis.d.ts +36 -0
  343. package/dist/static-analysis.js +505 -0
  344. package/dist/static-analysis.js.map +1 -0
  345. package/dist/symbol-report-ingest.d.ts +8 -0
  346. package/dist/symbol-report-ingest.js +504 -0
  347. package/dist/symbol-report-ingest.js.map +1 -0
  348. package/dist/task-snapshots.d.ts +41 -0
  349. package/dist/task-snapshots.js +430 -0
  350. package/dist/task-snapshots.js.map +1 -0
  351. package/dist/types.d.ts +848 -0
  352. package/dist/types.js +12 -0
  353. package/dist/types.js.map +1 -0
  354. package/dist/util.d.ts +11 -0
  355. package/dist/util.js +63 -0
  356. package/dist/util.js.map +1 -0
  357. package/dist/version.d.ts +1 -0
  358. package/dist/version.js +5 -0
  359. package/dist/version.js.map +1 -0
  360. package/package.json +81 -0
  361. package/plugins/codexa/.codex-plugin/plugin.json +38 -0
  362. package/plugins/codexa/.mcp.json +20 -0
  363. package/plugins/codexa/scripts/codexa-mcp.js +100 -0
  364. package/plugins/codexa/skills/codexa/SKILL.md +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mir Ural Noorata
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,634 @@
1
+ # Codexa
2
+
3
+ Codexa is a local codebase map for AI coding agents.
4
+
5
+ In plain English: it reads a repository, builds a compact index of the files,
6
+ symbols, imports, tests, risks, and workflows it can prove, then gives Codex or
7
+ another MCP client small evidence-backed packets before and after edits. It is
8
+ meant to help an agent answer questions like:
9
+
10
+ - What should I read first?
11
+ - What could this change break?
12
+ - Which tests are relevant?
13
+ - Did my final dirty tree match the plan I saved before editing?
14
+
15
+ It is not an autonomous coding agent. It does not edit your source files through
16
+ MCP. It is a context compiler, query server, and verification guide.
17
+
18
+ ## Maintainer Expectations
19
+
20
+ Codexa is maintained by one person, in spare time, with a deliberately narrow
21
+ scope. That shapes how this repo works:
22
+
23
+ - Response times are days to weeks, not hours.
24
+ - Scope is narrow on purpose. Deep native language indexers, new LLM analysis
25
+ layers, broad IDE products, and general-purpose search modes are usually out
26
+ of scope.
27
+ - Not every working PR will be merged. Open an issue first for anything beyond
28
+ a typo or small docs fix.
29
+ - Security issues go through
30
+ [private advisories](https://github.com/mirnoorata/codexa/security/advisories/new),
31
+ not public issues. See [SECURITY.md](SECURITY.md).
32
+ - Questions and "is this the right tool?" discussions belong in
33
+ [Discussions](https://github.com/mirnoorata/codexa/discussions), not the
34
+ issue tracker.
35
+
36
+ ## Quick Start
37
+
38
+ Codexa requires Node.js 22 or newer.
39
+
40
+ Install from npm:
41
+
42
+ ```bash
43
+ npm install -g @mirnoorata/codexa
44
+ ```
45
+
46
+ Or work from a checkout:
47
+
48
+ ```bash
49
+ git clone https://github.com/mirnoorata/codexa.git
50
+ cd codexa
51
+ npm install
52
+ npm run build
53
+ npm link
54
+ ```
55
+
56
+ Wire Codexa into another repository:
57
+
58
+ ```bash
59
+ codexa init /path/to/project
60
+ codexa session-start /path/to/project
61
+ ```
62
+
63
+ After `codexa init`, the target repository gets a repo-local `.codex/config.toml`
64
+ entry that lets Codex discover the Codexa MCP server automatically. Useful flags:
65
+ `--tools core` exposes only the primary-loop tools (plus `impact`/`freshness`) via an
66
+ `enabled_tools` allowlist to cut per-turn schema token cost (confirm your Codex CLI
67
+ supports `enabled_tools` first), and `--agents-md` (opt-in) writes a managed Codexa
68
+ workflow block into the repo's `AGENTS.md`.
69
+
70
+ The installed command is `codexa`, and the server can also run ad hoc:
71
+
72
+ ```bash
73
+ npx -y @mirnoorata/codexa serve /path/to/project --auto-refresh
74
+ ```
75
+
76
+ Codexa is also listed in the official MCP registry as
77
+ `io.github.mirnoorata/codexa` for MCP clients that discover servers there.
78
+
79
+ Token discipline is built in: every tool description states its typical output
80
+ cost, structured results are budget-compacted with truncation records naming
81
+ dropped fields, hosts with small MCP result limits can set
82
+ `CODEXA_MCP_STRUCTURED_BUDGET_BYTES`, and the big retrieval tools accept
83
+ `responseFormat: "concise"` for a summary-tier packet.
84
+
85
+ ## The Everyday Workflow
86
+
87
+ Use Codexa as a guardrail around code changes:
88
+
89
+ 1. Start with `session_context` or `codexa session-start`.
90
+ This tells the agent whether the index is fresh and what loop to use.
91
+
92
+ 2. Search when the target is unclear.
93
+ `search` combines bounded raw search, exact/symbol evidence, Codexa ranking,
94
+ optional semantic retrieval, likely tests, and known gaps.
95
+
96
+ 3. Ask for a task brief before editing.
97
+ `task_brief` / `brief` returns read-first files, impact expansion, risks,
98
+ snippets, test recommendations, freshness, and next tool guidance.
99
+
100
+ 4. Save a change plan before non-trivial edits.
101
+ `change_plan` with `saveSnapshot=true`, or CLI
102
+ `change-plan --save-snapshot`, records the intended scope and test plan.
103
+
104
+ 5. Review after editing.
105
+ `post_edit_review` / `post-edit-review` compares the actual dirty tree with
106
+ the saved snapshot, reports drift, and tells you whether to continue, run
107
+ tests, inspect, or replan.
108
+
109
+ 6. Finish with a test plan if verification is unclear.
110
+ `test_plan` recommends targeted commands and shows what they would cover.
111
+
112
+ Primary MCP loop:
113
+
114
+ ```text
115
+ session_context -> search(if target unclear) -> task_brief ->
116
+ change_plan(saveSnapshot) -> post_edit_review -> test_plan
117
+ ```
118
+
119
+ ## What Codexa Builds
120
+
121
+ Running `codexa index /path/to/project` writes generated files under the target
122
+ repo's `.codex/codebase/` directory:
123
+
124
+ ```text
125
+ .codex/codebase/README.md
126
+ .codex/codebase/codex-contract.md
127
+ .codex/codebase/repo-map.md
128
+ .codex/codebase/risk-map.md
129
+ .codex/codebase/placeholder-map.md
130
+ .codex/codebase/test-map.md
131
+ .codex/codebase/conventions.md
132
+ .codex/codebase/workflows.md
133
+ .codex/codebase/freshness.json
134
+ .codex/codebase/index.json
135
+ .codex/codebase/facts.ndjson
136
+ .codex/codebase/modules/
137
+ .codex/codebase/playbooks/
138
+ ```
139
+
140
+ For lay readers, these are the maps and checklists Codex reads. For engineers,
141
+ the durable machine-readable index is `index.json` plus `facts.ndjson`; the
142
+ Markdown files are compact human/agent-facing projections of the same facts.
143
+
144
+ Generated cache and working state live under `.codex/cache/`. Codexa-owned cache
145
+ writes are allowed; source-file mutation is not exposed through MCP tools.
146
+
147
+ ## Main Commands
148
+
149
+ | Command | Use it for |
150
+ | --- | --- |
151
+ | `codexa init <repo>` | Write repo-local Codex MCP config/hooks and index the repo (`--tools core` for a lean tool allowlist, `--agents-md` for an AGENTS.md workflow block). |
152
+ | `codexa session-start <repo>` | Print cheap startup status and the automatic-use loop. |
153
+ | `codexa index <repo>` | Build `.codex/codebase/` artifacts once. |
154
+ | `codexa watch <repo>` | Keep artifacts fresh during active edit sessions. |
155
+ | `codexa status <repo>` | Check freshness and parser errors without refreshing. |
156
+ | `codexa doctor <repo>` | Diagnose wiring, freshness, hooks, artifacts, and MCP readiness. |
157
+ | `codexa repo-map <repo>` | Show ranked modules/files. |
158
+ | `codexa search <repo> --query "..."` | Discover a target from natural language, identifiers, or broad prompts. |
159
+ | `codexa find-context <repo> --query "..."` | Find matching files, symbols, and usage sites. |
160
+ | `codexa explain <repo> --file path` | Explain a file. |
161
+ | `codexa explain <repo> --symbol name` | Explain a symbol neighborhood. |
162
+ | `codexa impact <repo> --file path` | Estimate blast radius for a file or symbol. |
163
+ | `codexa diff-impact <repo>` | Summarize current dirty worktree impact. |
164
+ | `codexa test-plan <repo> --diff` | Recommend targeted tests for current changes. |
165
+ | `codexa brief <repo> --task "..."` | Get the default read-first packet before editing. |
166
+ | `codexa context-pack <repo> --task "..."` | Get a larger task-shaped context packet. |
167
+ | `codexa focus-brief <repo> --task "..."` | Orient around a broad project question. |
168
+ | `codexa callers <repo> --symbol name` | Find who calls or references a symbol/file. |
169
+ | `codexa callees <repo> --file path` | Find what a symbol/file calls or references. |
170
+ | `codexa dependency-path <repo> ...` | Find a bounded graph path between two files/symbols. |
171
+ | `codexa workflow-path <repo> --query "..."` | Trace route, job, manifest, or workflow paths. |
172
+ | `codexa change-plan <repo> --task "..." --save-snapshot` | Save a pre-edit plan and dirty baseline. |
173
+ | `codexa post-edit-review <repo> --task-id ...` | Review the final dirty tree against the saved plan. |
174
+ | `codexa semantic-index <repo> --provider ...` | Build optional semantic retrieval cache. |
175
+ | `codexa static-analysis <repo> ...` | Import or optionally run external scanner reports. |
176
+ | `codexa eval <repo>` | Run structured retrieval/verification benchmark scenarios. |
177
+ | `codexa github-sync-check <repo>` | Diagnose GitHub source sync readiness. |
178
+ | `codexa github-release <repo>` | Create release notes, tags, and GitHub Release entries. |
179
+ | `codexa serve <repo>` | Start the MCP context server over stdio. |
180
+ | `codexa serve <repo> --transport http --host 127.0.0.1 --port 8729` | Start loopback-only HTTP MCP. |
181
+
182
+ Most context commands auto-refresh stale or missing Codexa artifacts before
183
+ answering. Use `--no-auto-refresh` when you intentionally want to inspect only
184
+ the stored index.
185
+
186
+ ## What It Understands
187
+
188
+ Codexa indexes git-visible files and skips common generated or dependency
189
+ directories. The source reader is intentionally small and deterministic.
190
+
191
+ Native parser lanes:
192
+
193
+ - TypeScript, TSX, JavaScript, and JSX through Tree-sitter plus TypeScript
194
+ compiler assist.
195
+ - Python through Tree-sitter plus lightweight semantic assist.
196
+
197
+ Shallow deterministic lanes:
198
+
199
+ - Rust declarations, imports, methods, calls, and tests.
200
+ - Go packages, imports, functions, methods, types, constants, variables, and
201
+ tests with module-aware import resolution.
202
+ - Java packages, imports, classes, interfaces, enums, records, methods, and
203
+ direct call-like usage.
204
+
205
+ Lightweight file lanes:
206
+
207
+ - JSON manifests.
208
+ - Markdown, MDX, RST, and text docs.
209
+ - Shell scripts.
210
+ - Systemd service files.
211
+
212
+ Facts carry explicit confidence:
213
+
214
+ - `authoritative`: syntax or git facts Codexa directly read.
215
+ - `derived`: deterministic links, static assists, report-backed relationships,
216
+ and likely test relationships.
217
+ - `heuristic`: framework hints, string references, dynamic behavior guesses, or
218
+ risk hints.
219
+ - `fallback`: low-confidence context used only when nothing better is available.
220
+
221
+ Codexa should never make heuristic-heavy output look stronger than it is.
222
+
223
+ ## Architecture For Engineers
224
+
225
+ Codexa is a TypeScript package with five main layers.
226
+
227
+ ### 1. Indexing
228
+
229
+ Entry point: `src/indexer.ts`.
230
+
231
+ Pipeline:
232
+
233
+ 1. Discover git-visible files and dirty state.
234
+ 2. Parse source files and reuse the content-hash parse cache where possible.
235
+ 3. Import external static-analysis and symbol-report facts.
236
+ 4. Apply TypeScript/Python semantic assists.
237
+ 5. Resolve imports, usage sites, aliases, test edges, and graph links.
238
+ 6. Rank files/modules with centrality, usage, churn, tests, dirty risk, and
239
+ bounded outcome signals.
240
+ 7. Build typed graph edges and workflow traces.
241
+ 8. Record freshness, parser errors, and dirty hashes.
242
+ 9. Publish artifacts atomically.
243
+
244
+ The indexer uses a cross-process cache lock so parallel Codexa commands do not
245
+ stampede artifact writes.
246
+
247
+ ### 2. Fact Model
248
+
249
+ Core types live in `src/types.ts`.
250
+
251
+ Important fact types:
252
+
253
+ - `RepoSnapshot`
254
+ - `File`
255
+ - `Symbol`
256
+ - `UsageSite`
257
+ - `ImportEdge`
258
+ - `TestEdge`
259
+ - `GraphEdge`
260
+ - `WorkflowTrace`
261
+ - `ModuleCluster`
262
+ - `RiskSignal`
263
+ - `ParserError`
264
+ - `SessionMemoryEntry`
265
+
266
+ Important graph edge kinds:
267
+
268
+ - `DEFINES`
269
+ - `IMPORTS`
270
+ - `CALLS`
271
+ - `REFERENCES`
272
+ - `TESTS`
273
+ - `ROUTE`
274
+ - `JOB`
275
+ - `RISK`
276
+ - `ROUTE_HANDLES`
277
+ - `ROUTE_CALLS_STORE`
278
+ - `STORE_DISPATCHES_ADAPTER`
279
+ - `ADAPTER_REFERENCED_BY_MANIFEST`
280
+ - `UI_CALLS_ENDPOINT`
281
+ - `TEST_COVERS_WORKFLOW`
282
+ - `IMPLEMENTS`
283
+ - `EXTENDS`
284
+ - `EXPORTS`
285
+ - `TYPE_EXPORTS`
286
+
287
+ Relationship claims can include `EdgeEvidenceV1`, which carries edge kind,
288
+ source, confidence, reason, path/symbol endpoints, optional range, and
289
+ stale/degraded flags.
290
+
291
+ ### 3. Query Layer
292
+
293
+ Public query exports live in `src/queries.ts`, intentionally kept as a thin
294
+ barrel. Implementations live under `src/query/`.
295
+
296
+ Key query modules:
297
+
298
+ - `search.ts`: repo maps, raw/BM25/exact/symbol/semantic search, and target
299
+ discovery.
300
+ - `context.ts`: `context_pack`, `task_brief`, `focus_brief`, and
301
+ `session_context`.
302
+ - `impact.ts`: file/symbol blast-radius expansion and verification recipes.
303
+ - `graph-traversal.ts`: callers, callees, and dependency paths.
304
+ - `workflow.ts`: route/job/manifest workflow traces.
305
+ - `change-plan.ts`: pre-edit plans and saved snapshots.
306
+ - `post-edit.ts`: dirty-tree review against saved snapshots.
307
+ - `test-plan.ts` and `tests.ts`: test recommendations and provenance.
308
+ - `verification.ts`: command coverage, command envelopes, and verification
309
+ ledger entries.
310
+ - `session-memory.ts`: cache-only working memory queries.
311
+
312
+ Query sessions (`src/query/session.ts`) carry the repo root, loaded index,
313
+ freshness, git state, command budget, warnings, provenance, changed files, and
314
+ changed symbols. Worktree inspection is allowed to degrade; an empty changed-file
315
+ set with degradation warnings means "unknown", not "clean".
316
+
317
+ ### 4. MCP Server
318
+
319
+ Entry point: `src/mcp.ts`.
320
+
321
+ Codexa registers a query-only MCP server. Stdio is the default transport for
322
+ local Codex use. Streamable HTTP is available only on loopback addresses unless
323
+ future auth/origin policy is added.
324
+
325
+ MCP tools:
326
+
327
+ ```text
328
+ freshness
329
+ repo_map
330
+ find_context
331
+ search
332
+ placeholder_report
333
+ symbol_context
334
+ impact
335
+ diff_impact
336
+ test_plan
337
+ task_brief
338
+ context_pack
339
+ focus_brief
340
+ session_context
341
+ callers
342
+ callees
343
+ dependency_path
344
+ workflow_path
345
+ change_plan
346
+ post_edit_review
347
+ session_memory
348
+ ```
349
+
350
+ MCP resources expose generated `.codex/codebase/` artifacts. MCP prompts expose
351
+ small workflow prompts for impact-before-edit, dirty-diff review, snapshot edit
352
+ loops, and targeted test planning.
353
+
354
+ MCP tools may update Codexa-generated artifacts or cache state when
355
+ auto-refresh, snapshots, or session memory are enabled. They do not expose a
356
+ source-editing tool.
357
+
358
+ ### 5. Adapters, Packaging, And Release Tools
359
+
360
+ Adapters:
361
+
362
+ - `src/cli.ts`: Commander-based CLI.
363
+ - `src/init.ts`: repo-local MCP config and hook setup.
364
+ - `integrations/claude-code/`: Claude Code plugin, hooks, and slash commands.
365
+ - `plugins/codexa/`: Codex plugin bundle with manifest, skill, and MCP wrapper.
366
+
367
+ Operational tools:
368
+
369
+ - `src/doctor.ts`: local readiness checks.
370
+ - `src/github-sync.ts`: git/GitHub sync diagnostics.
371
+ - `src/github-release.ts`: release notes, tags, and GitHub Release flow.
372
+ - `scripts/*.mjs` and `scripts/*.sh`: source hygiene, privacy, package smoke,
373
+ public snapshot, benchmark, and publish gates.
374
+
375
+ ## Optional Lanes
376
+
377
+ ### Semantic Retrieval
378
+
379
+ Semantic retrieval is opt-in and cache-based.
380
+
381
+ Build the cache:
382
+
383
+ ```bash
384
+ codexa semantic-index /path/to/project --provider openai
385
+ codexa semantic-index /path/to/project --provider local-command --command ./embed-jsonl
386
+ ```
387
+
388
+ After the cache exists, query commands can use it automatically when the snapshot
389
+ and provider settings match. `--semantic` forces diagnostics, and
390
+ `--no-semantic` disables the lane for one call.
391
+
392
+ OpenAI uses `OPENAI_API_KEY` and defaults to `text-embedding-3-small`.
393
+ `local-command` receives JSONL on stdin and returns embedding records. Codexa
394
+ does not ship a vector database and does not call embedding providers unless the
395
+ semantic cache/provider path is configured or explicitly forced.
396
+
397
+ ### LSP Assist
398
+
399
+ LSP assist is read-only and bounded. Enable it with `--lsp` or
400
+ `CODEXA_LSP=1` on supported query commands.
401
+
402
+ Codexa can query:
403
+
404
+ - `typescript-language-server --stdio`
405
+ - `basedpyright-langserver --stdio`
406
+ - `pyright-langserver --stdio`
407
+
408
+ LSP failures are warnings in the packet, not hard failures. LSP never edits
409
+ source files.
410
+
411
+ ### Static Analysis Reports
412
+
413
+ Codexa does not vendor Semgrep, CodeQL, ShellCheck, or other scanner engines.
414
+ The default safe shape is report ingestion:
415
+
416
+ ```bash
417
+ codexa static-analysis /path/to/project \
418
+ --semgrep-report /tmp/semgrep.json \
419
+ --codeql-report /tmp/codeql.sarif \
420
+ --symbol-report /tmp/codexa-symbols.json
421
+ ```
422
+
423
+ Codexa also accepts a bounded `CodexaSymbolReportV1` JSON document so external
424
+ language tools can feed symbols and relationships into Codexa with `derived`
425
+ confidence.
426
+
427
+ Scanner execution flags such as `--run-semgrep`, `--run-codeql`, and
428
+ `--run-shellcheck` are explicit opt-ins. They run installed local tools under
429
+ scrubbed environments and write reports under `.codex/static-analysis/`.
430
+
431
+ ### AutoVerify Hooks
432
+
433
+ `codexa init` writes advisory hooks when Codex hooks are available:
434
+
435
+ - `hook-pre-edit` reminds the agent to save a change-plan snapshot.
436
+ - `hook-post-edit` runs a bounded post-edit review after edits.
437
+
438
+ AutoVerify command execution is disabled unless user-owned autonomy is
439
+ `full-access` or the environment sets `CODEXA_AUTOVERIFY=1` /
440
+ `CODEXA_AUTOVERIFY=true`. Even then, AutoVerify is hook-only. MCP
441
+ `post_edit_review` never spawns commands.
442
+
443
+ AutoVerify is not a sandbox. Test code still runs locally with the user's file
444
+ permissions. Codexa records whether verification mutated source/test/provenance
445
+ state and treats such reports as non-covering evidence.
446
+
447
+ ## Source Map
448
+
449
+ | Path | Purpose |
450
+ | --- | --- |
451
+ | `src/cli.ts` | CLI command registration and option parsing. |
452
+ | `src/indexer.ts` | Main index pipeline orchestration. |
453
+ | `src/indexer/` | Discovery, parsing, graph stage, ranking, freshness, and artifact writing helpers. |
454
+ | `src/parser/` | Tree-sitter and shallow language extraction. |
455
+ | `src/resolver.ts` | Import, alias, usage, and symbol relationship resolution. |
456
+ | `src/graph.ts` | Typed graph and workflow trace construction. |
457
+ | `src/query/` | Query packets, edit planning, post-edit review, test planning, and verification logic. |
458
+ | `src/mcp.ts` | MCP server creation and transport setup. |
459
+ | `src/mcp/` | MCP tool/resource/prompt registration, runtime refresh, result compaction, and session-memory adapter code. |
460
+ | `src/session-memory/` | Cache-only structured working memory store. |
461
+ | `src/semantic-retrieval.ts` | Optional embedding cache build/query lane. |
462
+ | `src/static-analysis.ts` | Static-analysis report import and optional scanner execution. |
463
+ | `src/autoverify.ts` | Hook-only targeted verification runner. |
464
+ | `src/github-sync.ts` | GitHub source-sync diagnostics. |
465
+ | `src/github-release.ts` | GitHub Release and restore-note generation. |
466
+ | `scripts/` | Hygiene, privacy, package, benchmark, and publish checks. |
467
+ | `tests/` | Vitest coverage for indexing, MCP, CLI hooks, session memory, static analysis, packaging, and release helpers. |
468
+ | `docs/architecture/` | Design notes for the context server and session memory. |
469
+ | `integrations/claude-code/` | Claude Code plugin adapter and smoke tests. |
470
+ | `plugins/codexa/` | Codex plugin package. |
471
+
472
+ ## Safety Boundaries
473
+
474
+ Codexa is deliberately constrained:
475
+
476
+ - Local-first by default.
477
+ - Query-only MCP surface.
478
+ - No source-mutating MCP tools.
479
+ - No graph database.
480
+ - No vector database.
481
+ - No web UI.
482
+ - No mandatory embeddings.
483
+ - No always-on LSP daemon.
484
+ - No hidden scanner execution.
485
+ - No broad host-specific planning layer.
486
+ - No project-specific private rules in the public setup path.
487
+
488
+ Context commands can refresh generated `.codex/codebase/` artifacts. Snapshot
489
+ and session-memory tools can write under `.codex/cache/`. Those are Codexa-owned
490
+ state paths, not source edits.
491
+
492
+ ## Testing And Verification
493
+
494
+ Common development commands:
495
+
496
+ ```bash
497
+ npm run typecheck
498
+ npm run lint
499
+ npm run privacy
500
+ npm test
501
+ npm run check
502
+ ```
503
+
504
+ `npm run check` runs typecheck, source hygiene, release-path hygiene, privacy,
505
+ Claude Code smoke tests, and the Vitest suite.
506
+
507
+ Release-oriented checks:
508
+
509
+ ```bash
510
+ npm run smoke:package
511
+ npm run benchmark:ci
512
+ npm run public:snapshot-check
513
+ npm run package:hygiene
514
+ npm run security:check
515
+ ```
516
+
517
+ `security:check` runs the development gate, dependency audit, clean-tree public
518
+ snapshot verification, package hygiene, and installed-package smoke test. The
519
+ public snapshot check intentionally refuses a dirty tree so the verified archive
520
+ matches `HEAD`.
521
+
522
+ ## Public Proof
523
+
524
+ Codexa has a structured eval harness:
525
+
526
+ ```bash
527
+ node dist/cli.js eval /path/to/project --suite all --seed codexa-v1-benchmark
528
+ ```
529
+
530
+ The eval scores structured query data, not prose. It compares Codexa packets
531
+ against raw `rg`/`git status` baselines, tracks recall/precision/test
532
+ recommendations/context size, and can run ranking experiments without changing
533
+ production ranking. A scenario fails outright if the raw-grep baseline does the
534
+ job better.
535
+
536
+ Measured results for v0.2.0 (seed `codexa-v020-release`, full suite, archived
537
+ in [`reports/benchmarks/v0.2.0-eval.json`](reports/benchmarks/v0.2.0-eval.json)):
538
+
539
+ | Metric | Result |
540
+ | --- | --- |
541
+ | Scenarios passed | 20/20 (2 project, 12 synthetic anti-cheat, 6 historical fixture) |
542
+ | File recall (mean) | 1.00 |
543
+ | Precision@k (mean) | 1.00 |
544
+ | Test recall (mean) | 1.00 |
545
+ | Scenarios where raw `rg`/`git` beat Codexa | 0 |
546
+ | Packet size vs. raw baseline output (mean) | 0.66x |
547
+ | Over-budget packets | 0 |
548
+
549
+ Do not update public benchmark claims without rerunning the eval on the current
550
+ checkout and current target.
551
+
552
+ ## GitHub Release Timeline
553
+
554
+ Use GitHub Releases as the visible source timeline for the current project.
555
+
556
+ Source sync diagnostic:
557
+
558
+ ```bash
559
+ codexa github-sync-check /path/to/codexa-checkout
560
+ codexa github-sync-check /path/to/codexa-checkout --no-network
561
+ ```
562
+
563
+ GitHub Release dry run and real release:
564
+
565
+ ```bash
566
+ npm run release:github:dry-run -- --tag v0.2.0
567
+ npm run release:github -- --tag v0.2.0
568
+ ```
569
+
570
+ The release command generates a changelog-style summary, changed-area summary,
571
+ restore commands, branch/worktree continuation commands, and forward-only PR rollback commands.
572
+ Official releases should come from a clean `main` after the normal GitHub flow
573
+ has landed.
574
+
575
+ ## Release Automation
576
+
577
+ Release Please runs after pushes to `main`. It reads conventional commits,
578
+ opens or updates a release PR with the package version and changelog changes,
579
+ and creates the GitHub Release after that release PR is merged.
580
+
581
+ This does not publish npm on every main merge. Normal feature and fix PRs land
582
+ on `main` first, Release Please batches releasable changes into its release PR,
583
+ and npm publishing stays downstream of the GitHub Release event.
584
+
585
+ Configure a `RELEASE_PLEASE_TOKEN` GitHub repository secret with a personal
586
+ access token that can create pull requests, tags, and releases. Do not use the
587
+ default `GITHUB_TOKEN` for Release Please if npm publishing should happen
588
+ automatically, because releases created by `GITHUB_TOKEN` do not trigger the
589
+ separate `release: published` npm workflow.
590
+
591
+ ## npm Package Publishing
592
+
593
+ The npm package is published by GitHub Actions after the GitHub Release lane
594
+ publishes a release. The trigger is `release: published`; pushed tags alone do
595
+ not publish to npm. The workflow checks the released tag, package identity,
596
+ repository URL, version availability, and `npm run security:check`, then runs:
597
+
598
+ ```bash
599
+ npm publish --registry https://registry.npmjs.org --access public --tag latest --provenance --ignore-scripts
600
+ ```
601
+
602
+ For the first public npm release, configure an `NPM_TOKEN` GitHub repository
603
+ secret with publish access. After the package exists and npm trusted publishing
604
+ is configured, the workflow can remove token-based publishing while keeping the
605
+ same release gate and `--ignore-scripts` protection.
606
+
607
+ ## Contributing
608
+
609
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
610
+
611
+ What usually fits:
612
+
613
+ - Bug fixes with clear reproduction and regression tests.
614
+ - Performance improvements with before/after measurements.
615
+ - Documentation fixes.
616
+ - Targeted improvements to existing commands or MCP tools.
617
+
618
+ What usually does not fit:
619
+
620
+ - New deep language indexers.
621
+ - New LLM-based analysis layers.
622
+ - Whole-file rewrites for style preference.
623
+ - Heavy dependencies where a small deterministic helper is enough.
624
+ - New source-mutating agent behavior.
625
+
626
+ Run this before proposing code changes:
627
+
628
+ ```bash
629
+ npm run check
630
+ ```
631
+
632
+ ## License
633
+
634
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,2 @@
1
+ import type { CodexaIndex } from "./types.js";
2
+ export declare function writeArtifacts(index: CodexaIndex, outputDir: string): Promise<void>;