contextos-agents 1.7.0 → 2.0.0-beta.2

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 (309) hide show
  1. package/.agents/AGENTS.md +1 -1
  2. package/.agents/adapters/aider/export.js +117 -99
  3. package/.agents/adapters/claude/export.js +68 -26
  4. package/.agents/adapters/copilot/export.js +90 -53
  5. package/.agents/adapters/cursor/export.js +80 -101
  6. package/.agents/adapters/drift-detector.js +196 -0
  7. package/.agents/adapters/gemini/export.js +76 -45
  8. package/.agents/adapters/pure-compiler.js +443 -0
  9. package/.agents/adapters/zed/export.js +104 -96
  10. package/.agents/compiled/registry.v2.json +504 -0
  11. package/.agents/compiled/registry.v2.sha256 +1 -0
  12. package/.agents/compiler/manifest-compiler.js +963 -0
  13. package/.agents/compiler/vendor/yaml.LICENSE.txt +13 -0
  14. package/.agents/compiler/vendor/yaml.SBOM.json +6 -0
  15. package/.agents/compiler/vendor/yaml.js +139 -0
  16. package/.agents/core/profiles/init.yaml +25 -0
  17. package/.agents/core/skills/context-manager/skill.yaml +3 -5
  18. package/.agents/core/skills/context-os/SKILL.md +3 -6
  19. package/.agents/core/skills/context-os/skill.yaml +3 -8
  20. package/.agents/core/skills/engineering-workflow/skill.yaml +1 -7
  21. package/.agents/core/skills/gemini-precision/skill.yaml +1 -6
  22. package/.agents/core/skills/gstack-roles/skill.yaml +3 -6
  23. package/.agents/core/skills/ponytail-mindset/skill.yaml +1 -7
  24. package/.agents/core/skills/security/skill.yaml +15 -3
  25. package/.agents/ctx.js +574 -111
  26. package/.agents/customization-dx.js +282 -0
  27. package/.agents/doctor.js +719 -64
  28. package/.agents/filesystem/index.js +71 -0
  29. package/.agents/filesystem/journaled-transaction.js +451 -0
  30. package/.agents/filesystem/lockfile-v2.js +275 -0
  31. package/.agents/filesystem/platform-hardening.js +222 -0
  32. package/.agents/filesystem/project-lock.js +218 -0
  33. package/.agents/filesystem/safe-path.js +256 -0
  34. package/.agents/generated/claude/skills/context-os/SKILL.md +1 -1
  35. package/.agents/generated/gemini/skills/context-os/SKILL.md +2 -2
  36. package/.agents/plugins/contextos/plugin.json +1 -1
  37. package/.agents/plugins.js +259 -60
  38. package/.agents/profiles.js +486 -51
  39. package/.agents/resolver.js +50 -534
  40. package/.agents/schemas/attestation.review.v1.json +111 -0
  41. package/.agents/schemas/attestation.verification.v1.json +85 -0
  42. package/.agents/schemas/lockfile.v2.schema.json +134 -0
  43. package/.agents/schemas/profile.v2.schema.json +114 -0
  44. package/.agents/schemas/runtime.thread.v1.json +192 -0
  45. package/.agents/schemas/skill.manifest.v2.json +177 -0
  46. package/.agents/schemas/verification.spec.v1.json +39 -0
  47. package/.agents/schemas/workspace.graph.schema.json +106 -0
  48. package/.agents/transaction-core/event-store.js +288 -0
  49. package/.agents/transaction-core/idempotency.js +129 -0
  50. package/.agents/transaction-core/ipc-lock.js +311 -0
  51. package/.agents/transaction-core/plugin-supply-chain-bundle.js +436 -0
  52. package/.agents/validate.js +44 -1
  53. package/.agents/watch.js +354 -102
  54. package/.agents/workspace/workspace-graph.js +778 -0
  55. package/README.md +59 -387
  56. package/benchmarks/v2/analysis/statistics.js +140 -0
  57. package/benchmarks/v2/analysis/stats.js +69 -0
  58. package/benchmarks/v2/arms/arm-definitions.js +79 -0
  59. package/benchmarks/v2/dataset.schema.json +34 -0
  60. package/benchmarks/v2/evaluators/index.js +25 -0
  61. package/benchmarks/v2/evaluators/verified-success.js +116 -0
  62. package/benchmarks/v2/harness/runner.js +88 -0
  63. package/benchmarks/v2/pilot-tasks.json +392 -0
  64. package/bin/commands/recover.js +88 -0
  65. package/bin/commands/update.js +80 -17
  66. package/bin/commands.js +62 -25
  67. package/bin/index.js +138 -81
  68. package/bin/lib/lockfile.js +5 -3
  69. package/bin/lib/safe-writer.js +34 -3
  70. package/package.json +85 -72
  71. package/registry.json +2 -2
  72. package/registry.v2.schema.json +86 -0
  73. package/.agents/core/profiles/backend.yaml +0 -47
  74. package/.agents/core/profiles/enterprise.yaml +0 -46
  75. package/.agents/core/profiles/frontend.yaml +0 -46
  76. package/.agents/core/profiles/hackathon.yaml +0 -45
  77. package/.agents/core/profiles/mvp.yaml +0 -44
  78. package/.agents/core/profiles/startup.yaml +0 -48
  79. package/.agents/core/skills/adapters/EXAMPLES.md +0 -19
  80. package/.agents/core/skills/adapters/SKILL.md +0 -105
  81. package/.agents/core/skills/adapters/TROUBLESHOOTING.md +0 -7
  82. package/.agents/core/skills/adapters/VALIDATION.json +0 -12
  83. package/.agents/core/skills/adapters/skill.yaml +0 -16
  84. package/.agents/core/skills/architecture-diagrams/SKILL.md +0 -108
  85. package/.agents/core/skills/architecture-diagrams/VALIDATION.json +0 -12
  86. package/.agents/core/skills/architecture-diagrams/skill.yaml +0 -12
  87. package/.agents/core/skills/brutalist-design/SKILL.md +0 -150
  88. package/.agents/core/skills/brutalist-design/VALIDATION.json +0 -12
  89. package/.agents/core/skills/brutalist-design/skill.yaml +0 -12
  90. package/.agents/core/skills/database/EXAMPLES.md +0 -74
  91. package/.agents/core/skills/database/SKILL.md +0 -101
  92. package/.agents/core/skills/database/TROUBLESHOOTING.md +0 -18
  93. package/.agents/core/skills/database/VALIDATION.json +0 -11
  94. package/.agents/core/skills/database/skill.yaml +0 -31
  95. package/.agents/core/skills/ddd/EXAMPLES.md +0 -42
  96. package/.agents/core/skills/ddd/SKILL.md +0 -247
  97. package/.agents/core/skills/ddd/TROUBLESHOOTING.md +0 -19
  98. package/.agents/core/skills/ddd/VALIDATION.json +0 -12
  99. package/.agents/core/skills/ddd/ddd.md +0 -178
  100. package/.agents/core/skills/ddd/skill.yaml +0 -17
  101. package/.agents/core/skills/decisions/EXAMPLES.md +0 -35
  102. package/.agents/core/skills/decisions/SKILL.md +0 -90
  103. package/.agents/core/skills/decisions/TROUBLESHOOTING.md +0 -13
  104. package/.agents/core/skills/decisions/VALIDATION.json +0 -12
  105. package/.agents/core/skills/decisions/skill.yaml +0 -16
  106. package/.agents/core/skills/docker/EXAMPLES.md +0 -56
  107. package/.agents/core/skills/docker/SKILL.md +0 -63
  108. package/.agents/core/skills/docker/TROUBLESHOOTING.md +0 -18
  109. package/.agents/core/skills/docker/VALIDATION.json +0 -11
  110. package/.agents/core/skills/docker/skill.yaml +0 -29
  111. package/.agents/core/skills/fastapi/EXAMPLES.md +0 -36
  112. package/.agents/core/skills/fastapi/SKILL.md +0 -148
  113. package/.agents/core/skills/fastapi/TROUBLESHOOTING.md +0 -19
  114. package/.agents/core/skills/fastapi/VALIDATION.json +0 -12
  115. package/.agents/core/skills/fastapi/fastapi.md +0 -112
  116. package/.agents/core/skills/fastapi/skill.yaml +0 -17
  117. package/.agents/core/skills/generators/EXAMPLES.md +0 -19
  118. package/.agents/core/skills/generators/SKILL.md +0 -112
  119. package/.agents/core/skills/generators/TROUBLESHOOTING.md +0 -7
  120. package/.agents/core/skills/generators/VALIDATION.json +0 -12
  121. package/.agents/core/skills/generators/skill.yaml +0 -25
  122. package/.agents/core/skills/generators/templates/API.md +0 -77
  123. package/.agents/core/skills/generators/templates/ARCHITECTURE.md +0 -70
  124. package/.agents/core/skills/generators/templates/DATABASE.md +0 -42
  125. package/.agents/core/skills/generators/templates/DECISION.md +0 -46
  126. package/.agents/core/skills/generators/templates/PRD.md +0 -67
  127. package/.agents/core/skills/generators/templates/PROJECT_GRAPH.md +0 -56
  128. package/.agents/core/skills/generators/templates/ROADMAP.md +0 -51
  129. package/.agents/core/skills/generators/templates/TASKS.md +0 -43
  130. package/.agents/core/skills/generators/templates/UI.md +0 -73
  131. package/.agents/core/skills/graphify/EXAMPLES.md +0 -73
  132. package/.agents/core/skills/graphify/SKILL.md +0 -130
  133. package/.agents/core/skills/graphify/VALIDATION.json +0 -12
  134. package/.agents/core/skills/graphify/skill.yaml +0 -18
  135. package/.agents/core/skills/impeccable-design/EXAMPLES.md +0 -26
  136. package/.agents/core/skills/impeccable-design/SKILL.md +0 -201
  137. package/.agents/core/skills/impeccable-design/TROUBLESHOOTING.md +0 -19
  138. package/.agents/core/skills/impeccable-design/VALIDATION.json +0 -12
  139. package/.agents/core/skills/impeccable-design/skill.yaml +0 -20
  140. package/.agents/core/skills/interview-me/SKILL.md +0 -97
  141. package/.agents/core/skills/interview-me/VALIDATION.json +0 -12
  142. package/.agents/core/skills/interview-me/skill.yaml +0 -12
  143. package/.agents/core/skills/microservices/EXAMPLES.md +0 -38
  144. package/.agents/core/skills/microservices/SKILL.md +0 -164
  145. package/.agents/core/skills/microservices/TROUBLESHOOTING.md +0 -19
  146. package/.agents/core/skills/microservices/VALIDATION.json +0 -12
  147. package/.agents/core/skills/microservices/microservices.md +0 -119
  148. package/.agents/core/skills/microservices/skill.yaml +0 -17
  149. package/.agents/core/skills/minimalist-design/SKILL.md +0 -113
  150. package/.agents/core/skills/minimalist-design/VALIDATION.json +0 -12
  151. package/.agents/core/skills/minimalist-design/skill.yaml +0 -12
  152. package/.agents/core/skills/nestjs/EXAMPLES.md +0 -40
  153. package/.agents/core/skills/nestjs/SKILL.md +0 -139
  154. package/.agents/core/skills/nestjs/TROUBLESHOOTING.md +0 -19
  155. package/.agents/core/skills/nestjs/VALIDATION.json +0 -12
  156. package/.agents/core/skills/nestjs/nestjs.md +0 -103
  157. package/.agents/core/skills/nestjs/skill.yaml +0 -17
  158. package/.agents/core/skills/nextjs/EXAMPLES.md +0 -40
  159. package/.agents/core/skills/nextjs/SKILL.md +0 -163
  160. package/.agents/core/skills/nextjs/TROUBLESHOOTING.md +0 -19
  161. package/.agents/core/skills/nextjs/VALIDATION.json +0 -12
  162. package/.agents/core/skills/nextjs/nextjs.md +0 -67
  163. package/.agents/core/skills/nextjs/skill.yaml +0 -17
  164. package/.agents/core/skills/node/EXAMPLES.md +0 -80
  165. package/.agents/core/skills/node/SKILL.md +0 -128
  166. package/.agents/core/skills/node/TROUBLESHOOTING.md +0 -19
  167. package/.agents/core/skills/node/VALIDATION.json +0 -12
  168. package/.agents/core/skills/node/node.md +0 -87
  169. package/.agents/core/skills/node/skill.yaml +0 -17
  170. package/.agents/core/skills/performance/EXAMPLES.md +0 -30
  171. package/.agents/core/skills/performance/SKILL.md +0 -75
  172. package/.agents/core/skills/performance/TROUBLESHOOTING.md +0 -19
  173. package/.agents/core/skills/performance/VALIDATION.json +0 -12
  174. package/.agents/core/skills/performance/performance.md +0 -52
  175. package/.agents/core/skills/performance/skill.yaml +0 -17
  176. package/.agents/core/skills/react/EXAMPLES.md +0 -79
  177. package/.agents/core/skills/react/SKILL.md +0 -132
  178. package/.agents/core/skills/react/TROUBLESHOOTING.md +0 -19
  179. package/.agents/core/skills/react/VALIDATION.json +0 -12
  180. package/.agents/core/skills/react/react.md +0 -93
  181. package/.agents/core/skills/react/skill.yaml +0 -17
  182. package/.agents/core/skills/react-best-practices/SKILL.md +0 -155
  183. package/.agents/core/skills/react-best-practices/VALIDATION.json +0 -12
  184. package/.agents/core/skills/react-best-practices/skill.yaml +0 -14
  185. package/.agents/core/skills/redesign-audit/SKILL.md +0 -117
  186. package/.agents/core/skills/redesign-audit/VALIDATION.json +0 -12
  187. package/.agents/core/skills/redesign-audit/skill.yaml +0 -12
  188. package/.agents/core/skills/soft-design/SKILL.md +0 -108
  189. package/.agents/core/skills/soft-design/VALIDATION.json +0 -12
  190. package/.agents/core/skills/soft-design/skill.yaml +0 -12
  191. package/.agents/core/skills/state-management/EXAMPLES.md +0 -56
  192. package/.agents/core/skills/state-management/SKILL.md +0 -48
  193. package/.agents/core/skills/state-management/TROUBLESHOOTING.md +0 -18
  194. package/.agents/core/skills/state-management/VALIDATION.json +0 -11
  195. package/.agents/core/skills/state-management/skill.yaml +0 -28
  196. package/.agents/core/skills/subagent-orchestrator/SKILL.md +0 -117
  197. package/.agents/core/skills/subagent-orchestrator/VALIDATION.json +0 -12
  198. package/.agents/core/skills/subagent-orchestrator/skill.yaml +0 -12
  199. package/.agents/core/skills/system-design/EXAMPLES.md +0 -75
  200. package/.agents/core/skills/system-design/SKILL.md +0 -419
  201. package/.agents/core/skills/system-design/TROUBLESHOOTING.md +0 -19
  202. package/.agents/core/skills/system-design/VALIDATION.json +0 -12
  203. package/.agents/core/skills/system-design/skill.yaml +0 -20
  204. package/.agents/core/skills/system-design/system-design.md +0 -112
  205. package/.agents/core/skills/testing/EXAMPLES.md +0 -71
  206. package/.agents/core/skills/testing/SKILL.md +0 -70
  207. package/.agents/core/skills/testing/TROUBLESHOOTING.md +0 -18
  208. package/.agents/core/skills/testing/VALIDATION.json +0 -11
  209. package/.agents/core/skills/testing/skill.yaml +0 -32
  210. package/.agents/core/skills/typescript/EXAMPLES.md +0 -64
  211. package/.agents/core/skills/typescript/SKILL.md +0 -112
  212. package/.agents/core/skills/typescript/TROUBLESHOOTING.md +0 -19
  213. package/.agents/core/skills/typescript/VALIDATION.json +0 -12
  214. package/.agents/core/skills/typescript/skill.yaml +0 -17
  215. package/.agents/core/skills/typescript/typescript.md +0 -71
  216. package/.agents/core/skills/ui-design/EXAMPLES.md +0 -21
  217. package/.agents/core/skills/ui-design/SKILL.md +0 -124
  218. package/.agents/core/skills/ui-design/TROUBLESHOOTING.md +0 -19
  219. package/.agents/core/skills/ui-design/VALIDATION.json +0 -12
  220. package/.agents/core/skills/ui-design/skill.yaml +0 -17
  221. package/.agents/core/skills/ui-design/ui.md +0 -88
  222. package/.agents/core/skills/ui-ux-pro/EXAMPLES.md +0 -62
  223. package/.agents/core/skills/ui-ux-pro/SKILL.md +0 -375
  224. package/.agents/core/skills/ui-ux-pro/TROUBLESHOOTING.md +0 -19
  225. package/.agents/core/skills/ui-ux-pro/VALIDATION.json +0 -12
  226. package/.agents/core/skills/ui-ux-pro/skill.yaml +0 -19
  227. package/.agents/core/skills/ux-design/EXAMPLES.md +0 -36
  228. package/.agents/core/skills/ux-design/SKILL.md +0 -116
  229. package/.agents/core/skills/ux-design/TROUBLESHOOTING.md +0 -19
  230. package/.agents/core/skills/ux-design/VALIDATION.json +0 -12
  231. package/.agents/core/skills/ux-design/skill.yaml +0 -17
  232. package/.agents/core/skills/ux-design/ux.md +0 -80
  233. package/.agents/core/skills/vercel-optimize/SKILL.md +0 -83
  234. package/.agents/core/skills/vercel-optimize/VALIDATION.json +0 -12
  235. package/.agents/core/skills/vercel-optimize/scripts/collect-signals.mjs +0 -131
  236. package/.agents/core/skills/vercel-optimize/scripts/gate-investigations.mjs +0 -142
  237. package/.agents/core/skills/vercel-optimize/scripts/merge-signals.mjs +0 -143
  238. package/.agents/core/skills/vercel-optimize/scripts/scan-codebase.mjs +0 -174
  239. package/.agents/core/skills/vercel-optimize/skill.yaml +0 -18
  240. package/.agents/core/skills/web-accessibility/EXAMPLES.md +0 -39
  241. package/.agents/core/skills/web-accessibility/SKILL.md +0 -170
  242. package/.agents/core/skills/web-accessibility/TROUBLESHOOTING.md +0 -19
  243. package/.agents/core/skills/web-accessibility/VALIDATION.json +0 -12
  244. package/.agents/core/skills/web-accessibility/accessibility.md +0 -63
  245. package/.agents/core/skills/web-accessibility/skill.yaml +0 -17
  246. package/.agents/generated/claude/skills/adapters/SKILL.md +0 -126
  247. package/.agents/generated/claude/skills/architecture-diagrams/SKILL.md +0 -101
  248. package/.agents/generated/claude/skills/brutalist-design/SKILL.md +0 -145
  249. package/.agents/generated/claude/skills/database/SKILL.md +0 -191
  250. package/.agents/generated/claude/skills/ddd/SKILL.md +0 -305
  251. package/.agents/generated/claude/skills/decisions/SKILL.md +0 -134
  252. package/.agents/generated/claude/skills/docker/SKILL.md +0 -135
  253. package/.agents/generated/claude/skills/fastapi/SKILL.md +0 -200
  254. package/.agents/generated/claude/skills/generators/SKILL.md +0 -133
  255. package/.agents/generated/claude/skills/graphify/SKILL.md +0 -198
  256. package/.agents/generated/claude/skills/impeccable-design/SKILL.md +0 -241
  257. package/.agents/generated/claude/skills/interview-me/SKILL.md +0 -90
  258. package/.agents/generated/claude/skills/microservices/SKILL.md +0 -218
  259. package/.agents/generated/claude/skills/minimalist-design/SKILL.md +0 -108
  260. package/.agents/generated/claude/skills/nestjs/SKILL.md +0 -195
  261. package/.agents/generated/claude/skills/nextjs/SKILL.md +0 -219
  262. package/.agents/generated/claude/skills/node/SKILL.md +0 -224
  263. package/.agents/generated/claude/skills/performance/SKILL.md +0 -121
  264. package/.agents/generated/claude/skills/react/SKILL.md +0 -227
  265. package/.agents/generated/claude/skills/react-best-practices/SKILL.md +0 -146
  266. package/.agents/generated/claude/skills/redesign-audit/SKILL.md +0 -112
  267. package/.agents/generated/claude/skills/soft-design/SKILL.md +0 -103
  268. package/.agents/generated/claude/skills/state-management/SKILL.md +0 -120
  269. package/.agents/generated/claude/skills/subagent-orchestrator/SKILL.md +0 -110
  270. package/.agents/generated/claude/skills/system-design/SKILL.md +0 -507
  271. package/.agents/generated/claude/skills/testing/SKILL.md +0 -157
  272. package/.agents/generated/claude/skills/typescript/SKILL.md +0 -192
  273. package/.agents/generated/claude/skills/ui-design/SKILL.md +0 -161
  274. package/.agents/generated/claude/skills/ui-ux-pro/SKILL.md +0 -451
  275. package/.agents/generated/claude/skills/ux-design/SKILL.md +0 -168
  276. package/.agents/generated/claude/skills/vercel-optimize/SKILL.md +0 -76
  277. package/.agents/generated/claude/skills/web-accessibility/SKILL.md +0 -225
  278. package/.agents/generated/gemini/skills/adapters/SKILL.md +0 -135
  279. package/.agents/generated/gemini/skills/architecture-diagrams/SKILL.md +0 -107
  280. package/.agents/generated/gemini/skills/brutalist-design/SKILL.md +0 -151
  281. package/.agents/generated/gemini/skills/database/SKILL.md +0 -200
  282. package/.agents/generated/gemini/skills/ddd/SKILL.md +0 -314
  283. package/.agents/generated/gemini/skills/decisions/SKILL.md +0 -143
  284. package/.agents/generated/gemini/skills/docker/SKILL.md +0 -144
  285. package/.agents/generated/gemini/skills/fastapi/SKILL.md +0 -209
  286. package/.agents/generated/gemini/skills/generators/SKILL.md +0 -142
  287. package/.agents/generated/gemini/skills/graphify/SKILL.md +0 -205
  288. package/.agents/generated/gemini/skills/impeccable-design/SKILL.md +0 -250
  289. package/.agents/generated/gemini/skills/interview-me/SKILL.md +0 -96
  290. package/.agents/generated/gemini/skills/microservices/SKILL.md +0 -227
  291. package/.agents/generated/gemini/skills/minimalist-design/SKILL.md +0 -114
  292. package/.agents/generated/gemini/skills/nestjs/SKILL.md +0 -204
  293. package/.agents/generated/gemini/skills/nextjs/SKILL.md +0 -298
  294. package/.agents/generated/gemini/skills/node/SKILL.md +0 -323
  295. package/.agents/generated/gemini/skills/performance/SKILL.md +0 -185
  296. package/.agents/generated/gemini/skills/react/SKILL.md +0 -332
  297. package/.agents/generated/gemini/skills/react-best-practices/SKILL.md +0 -152
  298. package/.agents/generated/gemini/skills/redesign-audit/SKILL.md +0 -118
  299. package/.agents/generated/gemini/skills/soft-design/SKILL.md +0 -109
  300. package/.agents/generated/gemini/skills/state-management/SKILL.md +0 -129
  301. package/.agents/generated/gemini/skills/subagent-orchestrator/SKILL.md +0 -116
  302. package/.agents/generated/gemini/skills/system-design/SKILL.md +0 -631
  303. package/.agents/generated/gemini/skills/testing/SKILL.md +0 -166
  304. package/.agents/generated/gemini/skills/typescript/SKILL.md +0 -275
  305. package/.agents/generated/gemini/skills/ui-design/SKILL.md +0 -170
  306. package/.agents/generated/gemini/skills/ui-ux-pro/SKILL.md +0 -460
  307. package/.agents/generated/gemini/skills/ux-design/SKILL.md +0 -177
  308. package/.agents/generated/gemini/skills/vercel-optimize/SKILL.md +0 -82
  309. package/.agents/generated/gemini/skills/web-accessibility/SKILL.md +0 -300
package/.agents/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- # ContextOS — AI Project Operating System
1
+ # ContextOS — Deterministic context compiler and policy engine for AI coding agents.
2
2
 
3
3
  You are working inside a project managed by **ContextOS**. This file is the **single source of truth** for how you must behave, think, and which skills to activate for every task.
4
4
 
@@ -1,28 +1,28 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { AGENTS_MD_PATH, collectSkillDirectories, extractYamlField, stripFrontmatter, readMeaningfulMarkdown } = require('../shared.js');
4
-
5
- // Aider config goes to project root
6
- const CONF_FILE = path.join(process.cwd(), '.aider.conf.yml');
7
- const CONVENTIONS_FILE = path.join(process.cwd(), 'CONVENTIONS.md');
8
-
9
1
  /**
10
- * Aider adapter — export.js
11
- *
12
- * Aider uses two complementary files:
13
- * 1. `.aider.conf.yml` — config file that points Aider to conventions
14
- * 2. `CONVENTIONS.md` — flat Markdown with all skills compiled in
15
- *
16
- * The config tells Aider to load CONVENTIONS.md via `read:` directive and
17
- * pre-loads it as a read-only context file on every session.
18
- *
19
- * Format spec: https://aider.chat/docs/config/aider_conf.html
2
+ * .agents/adapters/aider/export.js
3
+ * ContextOS Aider Pure Adapter (.aider.conf.yml & CONVENTIONS.md)
20
4
  */
21
5
 
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const { AGENTS_MD_PATH, collectSkillDirectories, extractYamlField, stripFrontmatter } = require('../shared.js');
9
+ const { registerAdapter, applyArtifacts, createProvenanceHeader } = require('../pure-compiler.js');
10
+
11
+ const GENERATOR_ID = 'aider@2';
12
+
13
+ function describe() {
14
+ return {
15
+ name: 'aider',
16
+ version: '2.0.0',
17
+ description: 'Compiles configuration and conventions for Aider (.aider.conf.yml and CONVENTIONS.md)',
18
+ targetPattern: '{.aider.conf.yml,CONVENTIONS.md}',
19
+ };
20
+ }
21
+
22
22
  function buildSkillSection(skillDir) {
23
- const skillName = path.basename(skillDir);
24
- const skillMdPath = path.join(skillDir, 'SKILL.md');
25
- const yamlPath = path.join(skillDir, 'skill.yaml');
23
+ const skillName = path.basename(skillDir);
24
+ const skillMdPath = path.join(skillDir, 'SKILL.md');
25
+ const yamlPath = path.join(skillDir, 'skill.yaml');
26
26
 
27
27
  let title = skillName;
28
28
  let description = '';
@@ -47,93 +47,111 @@ function buildSkillSection(skillDir) {
47
47
  return `\n## Skill: ${title}\n${descLine}${skillRef}`;
48
48
  }
49
49
 
50
- function generateAiderConf() {
51
- const conf = `# .aider.conf.yml
52
- # Auto-generated by: node .agents/ctx.js export aider
53
- # Source: .agents/core/skills/ · Do not edit manually.
54
-
55
- # Load project conventions as a read-only context file on every session
56
- read:
57
- - CONVENTIONS.md
58
-
59
- # Recommended model settings (override as needed)
60
- # model: gpt-4o
61
- # editor-model: gpt-4o-mini
62
-
63
- # Auto-commit after every accepted change
64
- auto-commits: true
65
-
66
- # Show diffs in git format
67
- pretty: true
68
- `;
69
- return conf;
70
- }
71
-
72
- function run() {
73
- console.log('Starting Aider adapter export...');
74
-
75
- // ── 1. Write .aider.conf.yml ─────────────────────────────────────────────────
76
- fs.writeFileSync(CONF_FILE, generateAiderConf());
77
- console.log(`Generated .aider.conf.yml → ${CONF_FILE}`);
78
-
79
- // ── 2. Build CONVENTIONS.md ──────────────────────────────────────────────────
80
- const sections = [];
81
-
82
- sections.push(
83
- `# CONVENTIONS.md — ContextOS Project Conventions\n\n` +
84
- `> Auto-generated by: node .agents/ctx.js export aider\n` +
85
- `> Source: .agents/core/skills/ · Do not edit manually.\n\n` +
86
- `Aider loads this file as read-only context on every session.\n` +
87
- `To keep your context window lean, load specific skill files on-demand using \`/read <path>\`.\n`
50
+ function render(context) {
51
+ const projectRoot = context?.projectRoot || '.';
52
+ const agentsMdPath = fs.existsSync(path.join(projectRoot, '.agents', 'AGENTS.md'))
53
+ ? path.join(projectRoot, '.agents', 'AGENTS.md')
54
+ : AGENTS_MD_PATH;
55
+
56
+ const yamlProv = createProvenanceHeader({
57
+ generator: GENERATOR_ID,
58
+ sourceGraphHash: context?.sourceGraphHash,
59
+ profileId: context?.profileId,
60
+ profileHash: context?.profileHash,
61
+ }, 'yaml');
62
+
63
+ const mdProv = createProvenanceHeader({
64
+ generator: GENERATOR_ID,
65
+ sourceGraphHash: context?.sourceGraphHash,
66
+ profileId: context?.profileId,
67
+ profileHash: context?.profileHash,
68
+ }, 'markdown');
69
+
70
+ // 1. .aider.conf.yml
71
+ const aiderConfContent = [
72
+ yamlProv,
73
+ '# Load project conventions as a read-only context file on every session',
74
+ 'read:',
75
+ ' - CONVENTIONS.md',
76
+ '',
77
+ '# Auto commit edits with standard git format',
78
+ 'auto-commits: true',
79
+ 'dirty-commits: true',
80
+ '',
81
+ ].join('\n');
82
+
83
+ // 2. CONVENTIONS.md
84
+ const convSections = [];
85
+ convSections.push(
86
+ mdProv +
87
+ `# ContextOS — Project Conventions for Aider\n\n` +
88
+ `> **Core law: Do not read everything. Read only what the current task requires.**\n\n`
88
89
  );
89
90
 
90
- // Project rules with Step 0
91
- sections.push(
92
- `\n---\n\n## Project Rules\n\n` +
93
- `### Step 0 — Identify Before Acting\n\n` +
94
- `Before writing a single line of code or plan, state:\n` +
95
- `\`\`\`\n1. WHAT DOMAIN? → Frontend / Backend / Architecture / Full-Stack / DevOps\n2. WHAT PHASE? → Define / Plan / Build / Verify / Review / Ship\n3. WHAT ROLE? → Declare specialist role for this phase\n\`\`\`\n` +
96
- `> **Anti-Spam Invariant**: Declare this strictly once at the start of a task or phase. Never repeat before intermediate tool calls or step updates.\n\n` +
97
- `### Non-Negotiable Rules\n\n` +
98
- `- **Zero-Assumption Investigation**: Never guess file paths or signatures. Inspect before modifying.\n` +
99
- `- **Zero-Placeholder Production Code**: Never emit lazy stubs, \`// TODO\`, or partial code.\n` +
100
- `- **Mandatory Proof-of-Work Verification**: Always run tests and validators before claiming completion.\n` +
101
- `- **Surgical Blast Radius**: Modify only files strictly within scope.\n` +
102
- `- **Fast-Track Exception**: Routine maintenance, git commands, version bumps, typo fixes, and diagnostics skip spec/plan ceremonies.\n`
103
- );
91
+ if (fs.existsSync(agentsMdPath)) {
92
+ const agentsMd = fs.readFileSync(agentsMdPath, 'utf8');
93
+ convSections.push(`## Core Operational Rules\n\n${agentsMd}\n\n---\n`);
94
+ }
104
95
 
105
- // Skills Router Table
106
- sections.push('\n---\n\n## Skill Router\n\n');
107
- sections.push('Read the corresponding skill file only when the task matches the trigger:\n\n');
108
- sections.push('| Trigger / Domain | Skill | On-Demand Command |\n');
109
- sections.push('| --- | --- | --- |\n');
96
+ convSections.push(`\n## Available Specialist Skills\n\n` +
97
+ `Skills are loaded on demand. Use \`/read .agents/skills/<skill>/SKILL.md\` when needed.\n\n` +
98
+ `### Skill Index\n`);
110
99
 
111
- const skills = collectSkillDirectories();
100
+ const skills = collectSkillDirectories(context?.profile);
112
101
  for (const skill of skills) {
113
- const skillName = path.basename(skill);
114
- const yamlPath = path.join(skill, 'skill.yaml');
115
- let tags = skillName;
116
- if (fs.existsSync(yamlPath)) {
117
- const yaml = fs.readFileSync(yamlPath, 'utf8');
118
- const rawTags = extractYamlField(yaml, 'tags');
119
- if (rawTags) tags = rawTags.replace(/[\[\]]/g, '');
120
- }
121
- sections.push(`| \`${tags}\` | **${skillName}** | \`/read .agents/core/skills/${skillName}/SKILL.md\` |\n`);
102
+ const section = buildSkillSection(skill);
103
+ if (section) convSections.push(section);
122
104
  }
123
105
 
124
- // Skills
125
- sections.push('\n---\n\n# Skills\n');
126
- let count = 0;
127
- for (const skill of skills) {
128
- const section = buildSkillSection(skill);
129
- if (section) {
130
- sections.push(section);
131
- count++;
106
+ return [
107
+ {
108
+ path: '.aider.conf.yml',
109
+ content: aiderConfContent.replace(/\r\n/g, '\n'),
110
+ mediaType: 'application/yaml',
111
+ kind: 'generated-adapter',
112
+ generator: GENERATOR_ID,
113
+ sourceSkillIds: [],
114
+ inputsHash: context?.sourceGraphHash || 'none',
115
+ },
116
+ {
117
+ path: 'CONVENTIONS.md',
118
+ content: convSections.join('\n').replace(/\r\n/g, '\n'),
119
+ mediaType: 'text/markdown',
120
+ kind: 'generated-adapter',
121
+ generator: GENERATOR_ID,
122
+ sourceSkillIds: skills.map(s => path.basename(s)),
123
+ inputsHash: context?.sourceGraphHash || 'none',
124
+ },
125
+ ];
126
+ }
127
+
128
+ function validate(artifacts) {
129
+ const diagnostics = [];
130
+ for (const art of artifacts) {
131
+ if (!art.content || art.content.length === 0) {
132
+ diagnostics.push({ path: art.path, message: 'Empty artifact content' });
132
133
  }
133
134
  }
135
+ return diagnostics;
136
+ }
134
137
 
135
- fs.writeFileSync(CONVENTIONS_FILE, sections.join('\n'));
136
- console.log(`Generated CONVENTIONS.md (${count} skills) → ${CONVENTIONS_FILE}`);
138
+ function run(options = {}) {
139
+ const { loadCompilerContext } = require('../pure-compiler.js');
140
+ const projectRoot = options.projectRoot || '.';
141
+ const context = loadCompilerContext(projectRoot, options);
142
+ const artifacts = render(context);
143
+ const result = applyArtifacts(projectRoot, artifacts, { command: 'export aider', context });
144
+ console.log(`✓ Aider export complete: ${result.appliedCount} files applied (tx: ${result.txId})`);
145
+ return result;
137
146
  }
138
147
 
139
- module.exports = { run };
148
+ const adapter = {
149
+ describe,
150
+ render,
151
+ validate,
152
+ run,
153
+ };
154
+
155
+ registerAdapter('aider', adapter);
156
+
157
+ module.exports = adapter;
@@ -1,55 +1,97 @@
1
+ /**
2
+ * .agents/adapters/claude/export.js
3
+ * ContextOS Claude Code Pure Adapter
4
+ */
5
+
1
6
  const fs = require('fs');
2
7
  const path = require('path');
3
- const { collectSkillDirectories, resetDirectory, readMeaningfulMarkdown } = require('../shared.js');
8
+ const { collectSkillDirectories, readMeaningfulMarkdown } = require('../shared.js');
9
+ const { registerAdapter, applyArtifacts } = require('../pure-compiler.js');
4
10
 
5
- const GENERATED_SKILLS_PATH = path.join(__dirname, '..', '..', 'generated', 'claude', 'skills');
11
+ const GENERATOR_ID = 'claude@2';
6
12
 
7
- /**
8
- * Claude Code skill format:
9
- * - Plain Markdown, no YAML frontmatter required
10
- * - First line is the skill name as an H1 comment
11
- * - Content is preserved as-is (Claude reads raw Markdown well)
12
- */
13
- function generateClaudeSkill(skillDir) {
13
+ function describe() {
14
+ return {
15
+ name: 'claude',
16
+ version: '2.0.0',
17
+ description: 'Compiles clean markdown skills for Claude Code CLI',
18
+ targetPattern: '.agents/generated/claude/skills/**/SKILL.md',
19
+ };
20
+ }
21
+
22
+ function renderClaudeSkill(skillDir, context) {
14
23
  const skillName = path.basename(skillDir);
15
24
  const existingSkillMdPath = path.join(skillDir, 'SKILL.md');
16
- const outputDir = path.join(GENERATED_SKILLS_PATH, skillName);
17
25
 
18
26
  if (!fs.existsSync(existingSkillMdPath)) {
19
- console.log(`Skipping ${skillName} (no SKILL.md)`);
20
- return;
27
+ return null;
21
28
  }
22
29
 
23
30
  let content = fs.readFileSync(existingSkillMdPath, 'utf8');
24
-
31
+
25
32
  const examples = readMeaningfulMarkdown(path.join(skillDir, 'EXAMPLES.md'));
26
33
  if (examples) {
27
34
  content += '\n\n' + examples;
28
35
  }
29
-
36
+
30
37
  const troubleshooting = readMeaningfulMarkdown(path.join(skillDir, 'TROUBLESHOOTING.md'));
31
38
  if (troubleshooting) {
32
39
  content += '\n\n' + troubleshooting;
33
40
  }
34
41
 
35
- // Strip YAML frontmatter if present (Claude doesn't need it)
42
+ // Strip YAML frontmatter
36
43
  content = content.replace(/^---[\s\S]*?---\r?\n/, '');
37
44
 
38
- // Write the cleaned Markdown
39
- fs.mkdirSync(outputDir, { recursive: true });
40
- fs.writeFileSync(path.join(outputDir, 'SKILL.md'), content.trimStart());
41
- console.log(`Generated SKILL.md for ${skillName} (claude)`);
45
+ return {
46
+ path: `.agents/generated/claude/skills/${skillName}/SKILL.md`,
47
+ content: content.trimStart().replace(/\r\n/g, '\n'),
48
+ mediaType: 'text/markdown',
49
+ kind: 'generated-adapter',
50
+ generator: GENERATOR_ID,
51
+ sourceSkillIds: [skillName],
52
+ inputsHash: context?.sourceGraphHash || 'none',
53
+ };
42
54
  }
43
55
 
44
- function run() {
45
- console.log('Starting Claude adapter export...');
46
- resetDirectory(GENERATED_SKILLS_PATH);
56
+ function render(context) {
57
+ const skills = collectSkillDirectories(context?.profile);
58
+ const artifacts = [];
47
59
 
48
- const skills = collectSkillDirectories();
49
60
  for (const skill of skills) {
50
- generateClaudeSkill(skill);
61
+ const art = renderClaudeSkill(skill, context);
62
+ if (art) artifacts.push(art);
51
63
  }
52
- console.log('Export complete. Skills are in generated/claude/skills');
64
+
65
+ return artifacts;
66
+ }
67
+
68
+ function validate(artifacts) {
69
+ const diagnostics = [];
70
+ for (const art of artifacts) {
71
+ if (!art.content || art.content.length === 0) {
72
+ diagnostics.push({ path: art.path, message: 'Empty artifact content' });
73
+ }
74
+ }
75
+ return diagnostics;
53
76
  }
54
77
 
55
- module.exports = { run };
78
+ function run(options = {}) {
79
+ const { loadCompilerContext } = require('../pure-compiler.js');
80
+ const projectRoot = options.projectRoot || '.';
81
+ const context = loadCompilerContext(projectRoot, options);
82
+ const artifacts = render(context);
83
+ const result = applyArtifacts(projectRoot, artifacts, { command: 'export claude', context });
84
+ console.log(`✓ Claude export complete: ${result.appliedCount} files applied (tx: ${result.txId})`);
85
+ return result;
86
+ }
87
+
88
+ const adapter = {
89
+ describe,
90
+ render,
91
+ validate,
92
+ run,
93
+ };
94
+
95
+ registerAdapter('claude', adapter);
96
+
97
+ module.exports = adapter;
@@ -1,24 +1,28 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { AGENTS_MD_PATH, collectSkillDirectories, extractYamlField, stripFrontmatter, readMeaningfulMarkdown } = require('../shared.js');
4
-
5
- // GitHub Copilot reads from .github/copilot-instructions.md
6
- const OUTPUT_FILE = path.join(process.cwd(), '.github', 'copilot-instructions.md');
7
-
8
1
  /**
9
- * GitHub Copilot adapter — export.js
10
- *
11
- * Copilot reads `.github/copilot-instructions.md` as a plain Markdown file.
12
- * We compile AGENTS.md + all skills into one document with clear section
13
- * headings so Copilot can reference them contextually.
14
- *
15
- * Format spec: https://docs.github.com/en/copilot/customizing-copilot/adding-repository-instructions
2
+ * .agents/adapters/copilot/export.js
3
+ * ContextOS GitHub Copilot Pure Adapter (.github/copilot-instructions.md)
16
4
  */
17
5
 
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const { collectSkillDirectories, extractYamlField, stripFrontmatter } = require('../shared.js');
9
+ const { registerAdapter, applyArtifacts, createProvenanceHeader } = require('../pure-compiler.js');
10
+
11
+ const GENERATOR_ID = 'copilot@2';
12
+
13
+ function describe() {
14
+ return {
15
+ name: 'copilot',
16
+ version: '2.0.0',
17
+ description: 'Compiles instructions for GitHub Copilot (.github/copilot-instructions.md)',
18
+ targetPattern: '.github/copilot-instructions.md',
19
+ };
20
+ }
21
+
18
22
  function buildSkillSection(skillDir) {
19
- const skillName = path.basename(skillDir);
20
- const skillMdPath = path.join(skillDir, 'SKILL.md');
21
- const yamlPath = path.join(skillDir, 'skill.yaml');
23
+ const skillName = path.basename(skillDir);
24
+ const skillMdPath = path.join(skillDir, 'SKILL.md');
25
+ const yamlPath = path.join(skillDir, 'skill.yaml');
22
26
 
23
27
  let title = skillName;
24
28
  let description = '';
@@ -43,40 +47,39 @@ function buildSkillSection(skillDir) {
43
47
  return `\n### ${title}\n${descLine}${skillRef}`;
44
48
  }
45
49
 
46
- function run() {
47
- console.log('Starting GitHub Copilot adapter export...');
48
-
50
+ function render(context) {
49
51
  const lines = [];
50
52
 
51
- // ── Header ───────────────────────────────────────────────────────────────────
53
+ const prov = createProvenanceHeader({
54
+ generator: GENERATOR_ID,
55
+ sourceGraphHash: context?.sourceGraphHash,
56
+ profileId: context?.profileId,
57
+ profileHash: context?.profileHash,
58
+ });
59
+
52
60
  lines.push(
53
- `# GitHub Copilot Instructions — ContextOS\n`,
54
- `<!-- Auto-generated by: node .agents/ctx.js export copilot -->\n`,
55
- `<!-- Source: .agents/core/skills/ · Do not edit manually. -->\n\n`
61
+ prov +
62
+ `# GitHub Copilot Instructions — ContextOS\n\n` +
63
+ `## Project Rules\n\n` +
64
+ `### Step 0 — Identify Before Acting\n\n` +
65
+ `Before writing a single line of code or plan, state:\n` +
66
+ `\`\`\`\n1. WHAT DOMAIN? → Frontend / Backend / Architecture / Full-Stack / DevOps\n2. WHAT PHASE? → Define / Plan / Build / Verify / Review / Ship\n3. WHAT ROLE? → Declare specialist role for this phase\n\`\`\`\n\n` +
67
+ `> **Anti-Spam Invariant**: Declare this strictly once at the start of a task or phase. Never repeat before intermediate tool calls or step updates.\n\n` +
68
+ `### Non-Negotiable Rules\n\n` +
69
+ `- **Zero-Assumption Investigation**: Never guess file paths or signatures. Inspect before modifying.\n` +
70
+ `- **Zero-Placeholder Production Code**: Never emit lazy stubs, \`// TODO\`, or partial code.\n` +
71
+ `- **Mandatory Proof-of-Work Verification**: Always run tests and validators before claiming completion.\n` +
72
+ `- **Surgical Blast Radius**: Modify only files strictly within scope.\n` +
73
+ `- **Fast-Track Exception**: Routine maintenance, git commands, version bumps, typo fixes, and diagnostics skip spec/plan ceremonies.\n\n` +
74
+ `---\n\n` +
75
+ `## Skills Library\n\n` +
76
+ `ContextOS uses on-demand progressive disclosure. Read the relevant \`SKILL.md\` file only when your task matches the trigger.\n\n` +
77
+ `### Skill Routing Table\n\n` +
78
+ `| Trigger / Domain | Skill | Path |\n` +
79
+ `| --- | --- | --- |\n`
56
80
  );
57
81
 
58
- // ── Project rules & Step 0 ───────────────────────────────────────────────────
59
- lines.push(`## Project Rules\n\n`);
60
- lines.push(`### Step 0 — Identify Before Acting\n\n`);
61
- lines.push(`Before writing a single line of code or plan, state:\n`);
62
- lines.push(`\`\`\`\n1. WHAT DOMAIN? → Frontend / Backend / Architecture / Full-Stack / DevOps\n2. WHAT PHASE? → Define / Plan / Build / Verify / Review / Ship\n3. WHAT ROLE? → Declare specialist role for this phase\n\`\`\`\n`);
63
- lines.push(`> **Anti-Spam Invariant**: Declare this strictly once at the start of a task or phase. Never repeat before intermediate tool calls or step updates.\n\n`);
64
- lines.push(`### Non-Negotiable Rules\n\n`);
65
- lines.push(`- **Zero-Assumption Investigation**: Never guess file paths or signatures. Inspect before modifying.\n`);
66
- lines.push(`- **Zero-Placeholder Production Code**: Never emit lazy stubs, \`// TODO\`, or partial code.\n`);
67
- lines.push(`- **Mandatory Proof-of-Work Verification**: Always run tests and validators before claiming completion.\n`);
68
- lines.push(`- **Surgical Blast Radius**: Modify only files strictly within scope.\n`);
69
- lines.push(`- **Fast-Track Exception**: Routine maintenance, git commands, version bumps, typo fixes, and diagnostics skip spec/plan ceremonies.\n\n`);
70
- lines.push(`---\n`);
71
-
72
- // ── Skills ───────────────────────────────────────────────────────────────────
73
- lines.push(`\n## Skills Library\n\n`);
74
- lines.push(`ContextOS uses on-demand progressive disclosure. Read the relevant \`SKILL.md\` file only when your task matches the trigger.\n\n`);
75
- lines.push(`### Skill Routing Table\n\n`);
76
- lines.push(`| Trigger / Domain | Skill | Path |\n`);
77
- lines.push(`| --- | --- | --- |\n`);
78
-
79
- const skills = collectSkillDirectories();
82
+ const skills = collectSkillDirectories(context?.profile);
80
83
  for (const skill of skills) {
81
84
  const skillName = path.basename(skill);
82
85
  const yamlPath = path.join(skill, 'skill.yaml');
@@ -91,19 +94,53 @@ function run() {
91
94
  }
92
95
  lines.push(`\n---\n`);
93
96
 
94
- let count = 0;
95
97
  for (const skill of skills) {
96
98
  const section = buildSkillSection(skill);
97
99
  if (section) {
98
100
  lines.push(section);
99
- count++;
100
101
  }
101
102
  }
102
103
 
103
- // ── Write ────────────────────────────────────────────────────────────────────
104
- fs.mkdirSync(path.dirname(OUTPUT_FILE), { recursive: true });
105
- fs.writeFileSync(OUTPUT_FILE, lines.join(''));
106
- console.log(`Generated .github/copilot-instructions.md (${count} skills) → ${OUTPUT_FILE}`);
104
+ return [
105
+ {
106
+ path: '.github/copilot-instructions.md',
107
+ content: lines.join('').replace(/\r\n/g, '\n'),
108
+ mediaType: 'text/markdown',
109
+ kind: 'generated-adapter',
110
+ generator: GENERATOR_ID,
111
+ sourceSkillIds: skills.map(s => path.basename(s)),
112
+ inputsHash: context?.sourceGraphHash || 'none',
113
+ },
114
+ ];
115
+ }
116
+
117
+ function validate(artifacts) {
118
+ const diagnostics = [];
119
+ for (const art of artifacts) {
120
+ if (!art.content || art.content.length === 0) {
121
+ diagnostics.push({ path: art.path, message: 'Empty artifact content' });
122
+ }
123
+ }
124
+ return diagnostics;
107
125
  }
108
126
 
109
- module.exports = { run };
127
+ function run(options = {}) {
128
+ const { loadCompilerContext } = require('../pure-compiler.js');
129
+ const projectRoot = options.projectRoot || '.';
130
+ const context = loadCompilerContext(projectRoot, options);
131
+ const artifacts = render(context);
132
+ const result = applyArtifacts(projectRoot, artifacts, { command: 'export copilot', context });
133
+ console.log(`✓ Copilot export complete: ${result.appliedCount} files applied (tx: ${result.txId})`);
134
+ return result;
135
+ }
136
+
137
+ const adapter = {
138
+ describe,
139
+ render,
140
+ validate,
141
+ run,
142
+ };
143
+
144
+ registerAdapter('copilot', adapter);
145
+
146
+ module.exports = adapter;