aw-spec-cli 0.1.3 → 0.1.5

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 (230) hide show
  1. package/README.md +291 -0
  2. package/assets/.agents/agent.json +28 -0
  3. package/assets/.agents/skills/aw-spec-orch/SKILL.md +56 -0
  4. package/assets/.agents/skills/aw-spec-orch-demo/SKILL.md +59 -0
  5. package/assets/.aw-spec/DESIGN-FORMAT.md +151 -0
  6. package/assets/.aw-spec/ORCH-DIALECT.md +156 -0
  7. package/assets/.aw-spec/RULE-PARTITION.md +126 -0
  8. package/assets/.aw-spec/extensions/agent-context/extension.yml +12 -9
  9. package/assets/.aw-spec/extensions.yml +12 -19
  10. package/assets/.aw-spec/integrations/aw-spec.manifest.json +1 -9
  11. package/assets/.aw-spec/interpreter/run-skill.py +1158 -0
  12. package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +94 -0
  13. package/assets/.aw-spec/orchestrator/README.md +300 -0
  14. package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +74 -0
  15. package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +74 -0
  16. package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +105 -0
  17. package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +79 -0
  18. package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +81 -0
  19. package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +75 -0
  20. package/assets/.aw-spec/orchestrator/orchestrator.py +1721 -0
  21. package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +40 -0
  22. package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +59 -0
  23. package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +97 -0
  24. package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +61 -0
  25. package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
  26. package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
  27. package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
  28. package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
  29. package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +160 -0
  30. package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +244 -0
  31. package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +775 -0
  32. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +248 -0
  33. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +261 -0
  34. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +425 -0
  35. package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +188 -0
  36. package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +474 -0
  37. package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
  38. package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +284 -0
  39. package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +103 -0
  40. package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
  41. package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
  42. package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
  43. package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +382 -0
  44. package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +246 -0
  45. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +231 -0
  46. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +258 -0
  47. package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +236 -0
  48. package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +949 -0
  49. package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
  50. package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +177 -0
  51. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +79 -0
  52. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
  53. package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +412 -0
  54. package/assets/.aw-spec/scripts/bash/aw-inventory.sh +14 -0
  55. package/assets/.aw-spec/scripts/bash/aw-parity.sh +13 -0
  56. package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +13 -0
  57. package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +1899 -0
  58. package/assets/.aw-spec/scripts/bash/aw-xref.sh +15 -0
  59. package/assets/.aw-spec/scripts/bash/common.sh +11 -60
  60. package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +14 -0
  61. package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +13 -0
  62. package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +13 -0
  63. package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +1563 -0
  64. package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +15 -0
  65. package/assets/.aw-spec/scripts/python/aw-inventory.py +683 -0
  66. package/assets/.aw-spec/scripts/python/aw-parity.py +380 -0
  67. package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +312 -0
  68. package/assets/.aw-spec/scripts/python/aw-xref.py +1330 -0
  69. package/assets/.aw-spec/scripts/python/validate_okf.py +349 -0
  70. package/assets/.aw-spec/templates/constitution-domain-template.md +75 -0
  71. package/assets/.aw-spec/templates/constitution-technical-template.md +70 -0
  72. package/assets/.aw-spec/templates/delta-design-template.md +69 -0
  73. package/assets/.aw-spec/templates/delta-spec-template.md +60 -0
  74. package/assets/.aw-spec/templates/design-template.md +383 -0
  75. package/assets/.aw-spec/templates/okf-concept-template.md +103 -0
  76. package/assets/.aw-spec/templates/parity-manifest-template.json +49 -0
  77. package/assets/.aw-spec/templates/source-map-template.md +85 -0
  78. package/assets/.aw-spec/templates/spec-template.md +192 -71
  79. package/assets/.claude/agent.json +27 -0
  80. package/assets/.claude/skills/aw-spec-orch/SKILL.md +55 -0
  81. package/assets/.claude/skills/aw-spec-orch-demo/SKILL.md +59 -0
  82. package/assets/.kilocode/agent.json +28 -0
  83. package/assets/.kilocode/workflows/aw-spec-orch-demo.md +59 -0
  84. package/assets/.kilocode/workflows/aw-spec-orch.md +55 -0
  85. package/assets/docs/architecture/clean-architecture.md +1 -1
  86. package/assets/docs/architecture/cqrs.md +1 -1
  87. package/assets/docs/architecture/eventing.md +1 -1
  88. package/assets/docs/architecture/folder-structure.md +1 -1
  89. package/assets/docs/architecture/modular-monolith.md +1 -1
  90. package/assets/docs/architecture/persistence.md +1 -1
  91. package/assets/docs/architecture/testing.md +1 -1
  92. package/assets/docs/architecture/vertical-slices.md +1 -1
  93. package/assets/docs/components/Email/README.md +1 -1
  94. package/assets/docs/components/Jobs/README.md +1 -1
  95. package/assets/docs/components/QrGenerator/README.md +1 -1
  96. package/assets/docs/components/README.md +1 -1
  97. package/assets/docs/domain/domain-driven-design.md +1 -1
  98. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +1 -1
  99. package/assets/docs/domainspecs/healthcare/auditing.domain.md +86 -18
  100. package/assets/docs/domainspecs/healthcare/authorization.domain.md +1 -1
  101. package/assets/docs/domainspecs/healthcare/clinical-terms.md +1 -1
  102. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +1 -1
  103. package/assets/docs/domainspecs/healthcare/comandrulemap.md +58 -124
  104. package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +119 -0
  105. package/assets/docs/domainspecs/healthcare/consent.md +1 -1
  106. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +1 -1
  107. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +1 -1
  108. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +1 -1
  109. package/assets/docs/domainspecs/healthcare/dicom.md +1 -1
  110. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +1 -1
  111. package/assets/docs/domainspecs/healthcare/eventing.domain.md +1 -1
  112. package/assets/docs/domainspecs/healthcare/fhir.md +1 -1
  113. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +1 -1
  114. package/assets/docs/domainspecs/healthcare/hipaa.md +1 -1
  115. package/assets/docs/domainspecs/healthcare/hl7.md +1 -1
  116. package/assets/docs/domainspecs/healthcare/integration-terms.md +1 -1
  117. package/assets/docs/domainspecs/healthcare/persistence.domain.md +1 -1
  118. package/assets/docs/domainspecs/healthcare/terminology.md +1 -1
  119. package/assets/docs/domainspecs/healthcare/testing.domain.md +1 -1
  120. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +1 -1
  121. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +1 -1
  122. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +1 -1
  123. package/assets/docs/domainspecs/pharma/atc.md +1 -1
  124. package/assets/docs/domainspecs/pharma/auditing.domain.md +80 -16
  125. package/assets/docs/domainspecs/pharma/authorization.domain.md +1 -1
  126. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +1 -1
  127. package/assets/docs/domainspecs/pharma/comandrulemap.md +64 -142
  128. package/assets/docs/domainspecs/pharma/commandtechrulemap.md +119 -0
  129. package/assets/docs/domainspecs/pharma/cqrs.domain.md +1 -1
  130. package/assets/docs/domainspecs/pharma/data-classification.domain.md +1 -1
  131. package/assets/docs/domainspecs/pharma/data-provenance.md +1 -1
  132. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +1 -1
  133. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +1 -1
  134. package/assets/docs/domainspecs/pharma/eventing.domain.md +1 -1
  135. package/assets/docs/domainspecs/pharma/fhir.md +1 -1
  136. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +1 -1
  137. package/assets/docs/domainspecs/pharma/hl7.md +1 -1
  138. package/assets/docs/domainspecs/pharma/idmp.md +1 -1
  139. package/assets/docs/domainspecs/pharma/integration-terms.md +1 -1
  140. package/assets/docs/domainspecs/pharma/ndc.md +1 -1
  141. package/assets/docs/domainspecs/pharma/persistence.domain.md +1 -1
  142. package/assets/docs/domainspecs/pharma/pharma-terms.md +1 -1
  143. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +1 -1
  144. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +1 -1
  145. package/assets/docs/domainspecs/pharma/terminology.md +1 -1
  146. package/assets/docs/domainspecs/pharma/testing.domain.md +1 -1
  147. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +1 -1
  148. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +1 -1
  149. package/assets/docs/governance/api-versioning.md +1 -1
  150. package/assets/docs/governance/coding-standards.md +1 -1
  151. package/assets/docs/governance/dependency-policy.md +1 -1
  152. package/assets/docs/requirement-spec.txt +13 -1
  153. package/assets/docs/security/auditing.md +54 -11
  154. package/assets/docs/security/authorization.md +1 -1
  155. package/assets/docs/security/data-classification.md +1 -1
  156. package/assets/docs/security/zero-trust.md +1 -1
  157. package/dist/commands/update.d.ts +3 -0
  158. package/dist/commands/update.d.ts.map +1 -0
  159. package/dist/commands/update.js +142 -0
  160. package/dist/commands/update.js.map +1 -0
  161. package/dist/utils/manifest.d.ts +31 -0
  162. package/dist/utils/manifest.d.ts.map +1 -0
  163. package/dist/utils/manifest.js +91 -0
  164. package/dist/utils/manifest.js.map +1 -0
  165. package/dist/utils/paths.js +2 -2
  166. package/dist/utils/paths.js.map +1 -1
  167. package/dist/utils/update-engine.d.ts +52 -0
  168. package/dist/utils/update-engine.d.ts.map +1 -0
  169. package/dist/utils/update-engine.js +203 -0
  170. package/dist/utils/update-engine.js.map +1 -0
  171. package/package.json +1 -1
  172. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
  173. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  174. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
  175. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
  176. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
  177. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
  178. package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
  179. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
  180. package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
  181. package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  182. package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
  183. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
  184. package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
  185. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
  186. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  187. package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
  188. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
  189. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
  190. package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
  191. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
  192. package/assets/.aw-spec/templates/checklist-template.md +0 -40
  193. package/assets/.aw-spec/templates/constitution-template.md +0 -57
  194. package/assets/.aw-spec/templates/plan-template.md +0 -113
  195. package/assets/.aw-spec/templates/tasks-template.md +0 -252
  196. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
  197. package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
  198. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
  199. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  200. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
  201. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
  202. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
  203. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
  204. package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
  205. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
  206. package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
  207. package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  208. package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
  209. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
  210. package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
  211. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
  212. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  213. package/assets/.kilocode/rules/specify-rules.md +0 -4
  214. package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
  215. package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
  216. package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
  217. package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
  218. package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
  219. package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
  220. package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
  221. package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
  222. package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
  223. package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
  224. package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
  225. package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
  226. package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
  227. package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
  228. package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
  229. package/assets/docs/command.txt +0 -295
  230. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAY,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,eAAe,EAAc,MAAM,2BAA2B,CAAC;AAEzF,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAI/D,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,WAAW;CACb,CAAC;AAEX,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4EAA4E,CAAC;KACzF,QAAQ,CAAC,aAAa,EAAE,+CAA+C,EAAE,GAAG,CAAC;KAC7E,MAAM,CAAC,qBAAqB,EAAE,uFAAuF,CAAC;KACtH,MAAM,CAAC,WAAW,EAAE,8DAA8D,CAAC;KACnF,MAAM,CAAC,WAAW,EAAE,mDAAmD,CAAC;KACxE,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,O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C"}
@@ -0,0 +1,31 @@
1
+ export interface Manifest {
2
+ version: string;
3
+ files: Record<string, string>;
4
+ updatedAt: string;
5
+ }
6
+ export interface ManifestOptions {
7
+ manifestPath: string;
8
+ }
9
+ /**
10
+ * Compute SHA256 hash of a file
11
+ */
12
+ export declare function computeFileHash(filePath: string): Promise<string>;
13
+ /**
14
+ * Read manifest from disk, returns null if not found
15
+ */
16
+ export declare function readManifest(manifestPath: string): Promise<Manifest | null>;
17
+ /**
18
+ * Write manifest to disk
19
+ */
20
+ export declare function writeManifest(manifestPath: string, manifest: Manifest): Promise<void>;
21
+ /**
22
+ * Create a new manifest from a source directory
23
+ * Walks the directory and computes hashes for all files
24
+ */
25
+ export declare function createManifest(sourceRoot: string, targetRoot: string, version: string): Promise<Manifest>;
26
+ /**
27
+ * Update manifest with new hashes from target directory
28
+ * Used after successful update to record new state
29
+ */
30
+ export declare function updateManifest(manifestPath: string, targetRoot: string, version: string): Promise<Manifest>;
31
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/utils/manifest.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKvE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAUjF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3F;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,QAAQ,CAAC,CAyBnB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,QAAQ,CAAC,CA4BnB"}
@@ -0,0 +1,91 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import { createHash } from 'crypto';
4
+ /**
5
+ * Compute SHA256 hash of a file
6
+ */
7
+ export async function computeFileHash(filePath) {
8
+ const content = await fs.readFile(filePath);
9
+ const hash = createHash('sha256');
10
+ hash.update(content);
11
+ return hash.digest('hex');
12
+ }
13
+ /**
14
+ * Read manifest from disk, returns null if not found
15
+ */
16
+ export async function readManifest(manifestPath) {
17
+ if (!(await fs.pathExists(manifestPath))) {
18
+ return null;
19
+ }
20
+ try {
21
+ const manifest = await fs.readJSON(manifestPath);
22
+ return manifest;
23
+ }
24
+ catch {
25
+ return null;
26
+ }
27
+ }
28
+ /**
29
+ * Write manifest to disk
30
+ */
31
+ export async function writeManifest(manifestPath, manifest) {
32
+ await fs.ensureDir(path.dirname(manifestPath));
33
+ await fs.writeJSON(manifestPath, manifest, { spaces: 2 });
34
+ }
35
+ /**
36
+ * Create a new manifest from a source directory
37
+ * Walks the directory and computes hashes for all files
38
+ */
39
+ export async function createManifest(sourceRoot, targetRoot, version) {
40
+ const files = {};
41
+ async function walk(dir, baseSource) {
42
+ const entries = await fs.readdir(dir, { withFileTypes: true });
43
+ for (const entry of entries) {
44
+ const fullPath = path.join(dir, entry.name);
45
+ const relPath = path.relative(baseSource, fullPath);
46
+ if (entry.isDirectory()) {
47
+ await walk(fullPath, baseSource);
48
+ }
49
+ else if (entry.isFile()) {
50
+ const hash = await computeFileHash(fullPath);
51
+ files[relPath] = hash;
52
+ }
53
+ }
54
+ }
55
+ await walk(sourceRoot, sourceRoot);
56
+ return {
57
+ version,
58
+ files,
59
+ updatedAt: new Date().toISOString(),
60
+ };
61
+ }
62
+ /**
63
+ * Update manifest with new hashes from target directory
64
+ * Used after successful update to record new state
65
+ */
66
+ export async function updateManifest(manifestPath, targetRoot, version) {
67
+ const files = {};
68
+ async function walk(dir, baseTarget) {
69
+ const entries = await fs.readdir(dir, { withFileTypes: true });
70
+ for (const entry of entries) {
71
+ const fullPath = path.join(dir, entry.name);
72
+ const relPath = path.relative(baseTarget, fullPath);
73
+ if (entry.isDirectory()) {
74
+ await walk(fullPath, baseTarget);
75
+ }
76
+ else if (entry.isFile()) {
77
+ const hash = await computeFileHash(fullPath);
78
+ files[relPath] = hash;
79
+ }
80
+ }
81
+ }
82
+ await walk(targetRoot, targetRoot);
83
+ const manifest = {
84
+ version,
85
+ files,
86
+ updatedAt: new Date().toISOString(),
87
+ };
88
+ await writeManifest(manifestPath, manifest);
89
+ return manifest;
90
+ }
91
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/utils/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAYpC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,QAAgB;IACpD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY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AEnC,MAAM,QAAQ,GAAa;QACzB,OAAO;QACP,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;IAEF,MAAM,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -14,7 +14,7 @@ export async function resolveAssetsPath() {
14
14
  return distAssets;
15
15
  }
16
16
  // Development mode: use the source AppWeaver.Spec repo
17
- const sourceRepo = path.resolve(__dirname, '../../../AppWeaver.Spec');
17
+ const sourceRepo = path.resolve(__dirname, '../../../AppWeaver.Spec.Orchestration');
18
18
  if (await fs.pathExists(sourceRepo)) {
19
19
  return sourceRepo;
20
20
  }
@@ -31,6 +31,6 @@ export async function resolveAssetsPath() {
31
31
  * Get the source AppWeaver.Spec repository path (for bundling script)
32
32
  */
33
33
  export function getSourceRepoPath() {
34
- return path.resolve(__dirname, '../../AppWeaver.Spec');
34
+ return path.resolve(__dirname, '../../AppWeaver.Spec.Orchestration');
35
35
  }
36
36
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,oEAAoE;IACpE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC3D,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,OAAO,UAAU,CAAC;I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OAAO,UAAU,CAAC;IACpB,CAAC;IAED,uDAAuD;IACvD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uCAAuC,CAAC,CAAC;IACpF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,2CAA2C;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,0CAA0C;QAC1C,UAAU,UAAU,KAAK,UAAU,KAAK,SAAS,EAAE,CACpD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oCAAoC,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,52 @@
1
+ export type Disposition = 'update' | 'preserve' | 'skip' | 'remove' | 'add';
2
+ export interface FileDisposition {
3
+ relPath: string;
4
+ disposition: Disposition;
5
+ reason: string;
6
+ manifestHash?: string;
7
+ currentHash?: string;
8
+ sourceHash?: string;
9
+ }
10
+ export interface UpdatePlan {
11
+ files: FileDisposition[];
12
+ summary: {
13
+ update: number;
14
+ preserve: number;
15
+ skip: number;
16
+ remove: number;
17
+ add: number;
18
+ };
19
+ }
20
+ /**
21
+ * Compare three states and determine disposition for a single file
22
+ *
23
+ * Three-way comparison logic:
24
+ * - manifestHash: hash from original manifest (what we installed)
25
+ * - currentHash: hash of file currently on disk (user's version)
26
+ * - sourceHash: hash of file in new source (registry version)
27
+ *
28
+ * Cases:
29
+ * 1. All three same → no-op (not in plan)
30
+ * 2. manifest === current !== source → UPDATE (upstream changed, user didn't touch)
31
+ * 3. manifest !== current === source → PRESERVE (user changed, upstream same - but this is weird)
32
+ * 4. manifest === source !== current → PRESERVE (user changed, upstream didn't)
33
+ * 5. All three different → SKIP (conflict - both changed)
34
+ * 6. manifest exists, current missing, source exists → UPDATE (user deleted, restore from source)
35
+ * 7. manifest exists, current exists, source missing → REMOVE (upstream deleted)
36
+ * 8. manifest missing, current exists, source exists → SKIP (file added by user, also in new source - conflict)
37
+ * 9. manifest missing, current exists, source missing → PRESERVE (user added, not in upstream)
38
+ * 10. manifest missing, current missing, source exists → ADD (new file in upstream)
39
+ */
40
+ export declare function computeDisposition(relPath: string, manifestHash: string | undefined, currentHash: string | undefined, sourceHash: string | undefined): FileDisposition;
41
+ /**
42
+ * Build update plan by comparing manifest, current target, and new source
43
+ */
44
+ export declare function buildUpdatePlan(manifest: Record<string, string>, targetRoot: string, sourceRoot: string): Promise<UpdatePlan>;
45
+ /**
46
+ * Apply update plan to target directory
47
+ */
48
+ export declare function applyUpdatePlan(plan: UpdatePlan, targetRoot: string, sourceRoot: string, options?: {
49
+ dryRun?: boolean;
50
+ onProgress?: (msg: string) => void;
51
+ }): Promise<void>;
52
+ //# sourceMappingURL=update-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-engine.d.ts","sourceRoot":"","sources":["../../src/utils/update-engine.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,eAAe,CAqEjB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,UAAU,CAAC,CAyFrB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAO,GACrE,OAAO,CAAC,IAAI,CAAC,CAkCf"}
@@ -0,0 +1,203 @@
1
+ import { computeFileHash } from './manifest.js';
2
+ import fs from 'fs-extra';
3
+ import path from 'path';
4
+ /**
5
+ * Compare three states and determine disposition for a single file
6
+ *
7
+ * Three-way comparison logic:
8
+ * - manifestHash: hash from original manifest (what we installed)
9
+ * - currentHash: hash of file currently on disk (user's version)
10
+ * - sourceHash: hash of file in new source (registry version)
11
+ *
12
+ * Cases:
13
+ * 1. All three same → no-op (not in plan)
14
+ * 2. manifest === current !== source → UPDATE (upstream changed, user didn't touch)
15
+ * 3. manifest !== current === source → PRESERVE (user changed, upstream same - but this is weird)
16
+ * 4. manifest === source !== current → PRESERVE (user changed, upstream didn't)
17
+ * 5. All three different → SKIP (conflict - both changed)
18
+ * 6. manifest exists, current missing, source exists → UPDATE (user deleted, restore from source)
19
+ * 7. manifest exists, current exists, source missing → REMOVE (upstream deleted)
20
+ * 8. manifest missing, current exists, source exists → SKIP (file added by user, also in new source - conflict)
21
+ * 9. manifest missing, current exists, source missing → PRESERVE (user added, not in upstream)
22
+ * 10. manifest missing, current missing, source exists → ADD (new file in upstream)
23
+ */
24
+ export function computeDisposition(relPath, manifestHash, currentHash, sourceHash) {
25
+ // Case: file exists in all three
26
+ if (manifestHash && currentHash && sourceHash) {
27
+ if (manifestHash === currentHash && currentHash === sourceHash) {
28
+ // All same - no change needed (caller should filter these out)
29
+ return { relPath, disposition: 'update', reason: 'No changes (all identical)', manifestHash, currentHash, sourceHash };
30
+ }
31
+ if (manifestHash === currentHash && manifestHash !== sourceHash) {
32
+ // User didn't touch, upstream changed
33
+ return { relPath, disposition: 'update', reason: 'Upstream changed, user unmodified', manifestHash, currentHash, sourceHash };
34
+ }
35
+ if (manifestHash !== currentHash && manifestHash === sourceHash) {
36
+ // User changed, upstream didn't
37
+ return { relPath, disposition: 'preserve', reason: 'User modified, upstream unchanged', manifestHash, currentHash, sourceHash };
38
+ }
39
+ if (manifestHash === sourceHash && currentHash !== sourceHash) {
40
+ // Same as above - user changed, upstream same
41
+ return { relPath, disposition: 'preserve', reason: 'User modified, upstream unchanged', manifestHash, currentHash, sourceHash };
42
+ }
43
+ if (manifestHash !== currentHash && currentHash === sourceHash) {
44
+ // User changed to match upstream (e.g. user anticipated change)
45
+ return { relPath, disposition: 'preserve', reason: 'User version matches upstream', manifestHash, currentHash, sourceHash };
46
+ }
47
+ // All three different
48
+ return { relPath, disposition: 'skip', reason: 'Conflict: both user and upstream modified', manifestHash, currentHash, sourceHash };
49
+ }
50
+ // Case: manifest exists, current missing (user deleted)
51
+ if (manifestHash && !currentHash && sourceHash) {
52
+ return { relPath, disposition: 'update', reason: 'User deleted, restoring from upstream', manifestHash, currentHash, sourceHash };
53
+ }
54
+ // Case: manifest exists, current exists, source missing (upstream deleted)
55
+ if (manifestHash && currentHash && !sourceHash) {
56
+ return { relPath, disposition: 'remove', reason: 'Upstream removed file', manifestHash, currentHash, sourceHash };
57
+ }
58
+ // Case: manifest missing, current exists, source exists (user added, also in new upstream)
59
+ if (!manifestHash && currentHash && sourceHash) {
60
+ if (currentHash === sourceHash) {
61
+ // User added same content as upstream - treat as add
62
+ return { relPath, disposition: 'add', reason: 'New file in upstream (matches user)', manifestHash, currentHash, sourceHash };
63
+ }
64
+ // Different content - conflict
65
+ return { relPath, disposition: 'skip', reason: 'Conflict: user added file, upstream also added different version', manifestHash, currentHash, sourceHash };
66
+ }
67
+ // Case: manifest missing, current exists, source missing (user added, not in upstream)
68
+ if (!manifestHash && currentHash && !sourceHash) {
69
+ return { relPath, disposition: 'preserve', reason: 'User added file, not in upstream', manifestHash, currentHash, sourceHash };
70
+ }
71
+ // Case: manifest missing, current missing, source exists (new file in upstream)
72
+ if (!manifestHash && !currentHash && sourceHash) {
73
+ return { relPath, disposition: 'add', reason: 'New file in upstream', manifestHash, currentHash, sourceHash };
74
+ }
75
+ // Case: manifest exists, current missing, source missing (file was in manifest but deleted everywhere)
76
+ if (manifestHash && !currentHash && !sourceHash) {
77
+ return { relPath, disposition: 'remove', reason: 'File removed from upstream', manifestHash, currentHash, sourceHash };
78
+ }
79
+ // Should not reach here
80
+ return { relPath, disposition: 'skip', reason: 'Unknown state', manifestHash, currentHash, sourceHash };
81
+ }
82
+ /**
83
+ * Build update plan by comparing manifest, current target, and new source
84
+ */
85
+ export async function buildUpdatePlan(manifest, targetRoot, sourceRoot) {
86
+ const files = [];
87
+ // Collect all unique relative paths from all three sources
88
+ const allPaths = new Set();
89
+ // From manifest
90
+ for (const relPath of Object.keys(manifest)) {
91
+ allPaths.add(relPath);
92
+ }
93
+ // From target (current)
94
+ async function walkTarget(dir, base) {
95
+ try {
96
+ const entries = await fs.readdir(dir, { withFileTypes: true });
97
+ for (const entry of entries) {
98
+ const fullPath = path.join(dir, entry.name);
99
+ const relPath = path.relative(base, fullPath);
100
+ if (entry.isDirectory()) {
101
+ await walkTarget(fullPath, base);
102
+ }
103
+ else if (entry.isFile()) {
104
+ allPaths.add(relPath);
105
+ }
106
+ }
107
+ }
108
+ catch {
109
+ // Directory might not exist
110
+ }
111
+ }
112
+ await walkTarget(targetRoot, targetRoot);
113
+ // From source (new)
114
+ async function walkSource(dir, base) {
115
+ try {
116
+ const entries = await fs.readdir(dir, { withFileTypes: true });
117
+ for (const entry of entries) {
118
+ const fullPath = path.join(dir, entry.name);
119
+ const relPath = path.relative(base, fullPath);
120
+ if (entry.isDirectory()) {
121
+ await walkSource(fullPath, base);
122
+ }
123
+ else if (entry.isFile()) {
124
+ allPaths.add(relPath);
125
+ }
126
+ }
127
+ }
128
+ catch {
129
+ // Directory might not exist
130
+ }
131
+ }
132
+ await walkSource(sourceRoot, sourceRoot);
133
+ // Compute disposition for each path
134
+ for (const relPath of allPaths) {
135
+ const manifestHash = manifest[relPath];
136
+ // Get current hash
137
+ let currentHash;
138
+ const currentPath = path.join(targetRoot, relPath);
139
+ if (await fs.pathExists(currentPath)) {
140
+ currentHash = await computeFileHash(currentPath);
141
+ }
142
+ // Get source hash
143
+ let sourceHash;
144
+ const sourcePath = path.join(sourceRoot, relPath);
145
+ if (await fs.pathExists(sourcePath)) {
146
+ sourceHash = await computeFileHash(sourcePath);
147
+ }
148
+ const disposition = computeDisposition(relPath, manifestHash, currentHash, sourceHash);
149
+ // Only include files that need action (not 'no-op')
150
+ if (disposition.disposition !== 'update' || disposition.reason !== 'No changes (all identical)') {
151
+ files.push(disposition);
152
+ }
153
+ }
154
+ // Sort for consistent output: update, add, preserve, skip, remove
155
+ const order = { update: 0, add: 1, preserve: 2, skip: 3, remove: 4 };
156
+ files.sort((a, b) => order[a.disposition] - order[b.disposition]);
157
+ // Build summary
158
+ const summary = {
159
+ update: files.filter(f => f.disposition === 'update').length,
160
+ preserve: files.filter(f => f.disposition === 'preserve').length,
161
+ skip: files.filter(f => f.disposition === 'skip').length,
162
+ remove: files.filter(f => f.disposition === 'remove').length,
163
+ add: files.filter(f => f.disposition === 'add').length,
164
+ };
165
+ return { files, summary };
166
+ }
167
+ /**
168
+ * Apply update plan to target directory
169
+ */
170
+ export async function applyUpdatePlan(plan, targetRoot, sourceRoot, options = {}) {
171
+ const { dryRun = false, onProgress = () => { } } = options;
172
+ for (const file of plan.files) {
173
+ const targetPath = path.join(targetRoot, file.relPath);
174
+ const sourcePath = path.join(sourceRoot, file.relPath);
175
+ switch (file.disposition) {
176
+ case 'update':
177
+ case 'add': {
178
+ onProgress(` ✓ ${file.relPath} (${file.disposition})`);
179
+ if (!dryRun) {
180
+ await fs.ensureDir(path.dirname(targetPath));
181
+ await fs.copy(sourcePath, targetPath, { overwrite: true });
182
+ }
183
+ break;
184
+ }
185
+ case 'remove': {
186
+ onProgress(` ✗ ${file.relPath} (remove)`);
187
+ if (!dryRun) {
188
+ await fs.remove(targetPath);
189
+ }
190
+ break;
191
+ }
192
+ case 'preserve': {
193
+ onProgress(` ⊘ ${file.relPath} (preserved - user modified)`);
194
+ break;
195
+ }
196
+ case 'skip': {
197
+ onProgress(` ⚠ ${file.relPath} (skipped - conflict: ${file.reason})`);
198
+ break;
199
+ }
200
+ }
201
+ }
202
+ }
203
+ //# sourceMappingURL=update-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-engine.js","sourceRoot":"","sources":["../../src/utils/update-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAwBxB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,YAAgC,EAChC,WAA+B,EAC/B,UAA8B;IAE9B,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ACxD,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC7C,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7D,CAAC;gBACD,MAAM;YACR,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,UAAU,CAAC,OAAO,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;gBAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC9B,CAAC;gBACD,MAAM;YACR,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,UAAU,CAAC,OAAO,IAAI,CAAC,OAAO,8BAA8B,CAAC,CAAC;gBAC9D,MAAM;YACR,CAAC;YACD,KAAK,MAAM,CAAC,CAAC,CAAC;gBACZ,UAAU,CAAC,OAAO,IAAI,CAAC,OAAO,yBAAyB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;gBACvE,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aw-spec-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "AppWeaver Spec-Driven Development CLI - scaffolds projects with vertical slices, DDD, CQRS, and agent skills",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,129 +0,0 @@
1
- ---
2
- name: "aw-spec-addcomponent"
3
- description: "Add an opt-in AppWeaver framework component to the project: pick a component from docs/components/, choose one or more implementations from its integration.md catalog, and wire the matching code in."
4
- argument-hint: "Optional component folder name to select directly (e.g. Email)"
5
- compatibility: "Requires aw-spec project structure with a docs/components/ directory whose subfolders each contain an integration.md runbook"
6
- metadata:
7
- author: "github-aw-spec"
8
- source: "local"
9
- user-invocable: true
10
- disable-model-invocation: false
11
- ---
12
-
13
-
14
- ## User Input
15
-
16
- ```text
17
- $ARGUMENTS
18
- ```
19
-
20
- The text the user typed after `/aw-spec-addcomponent` (if any) is an optional component folder name
21
- to select directly (e.g. `Email`). If it matches a folder under `docs/components/`, skip the
22
- component-selection prompt; otherwise fall through to interactive selection.
23
-
24
- ## Purpose
25
-
26
- Add an **opt-in AppWeaver framework component** (Email, Jobs, QrGenerator, …) to the current
27
- project. Each component lives in its own folder under `docs/components/` and ships two
28
- agent-readable files: `README.md` (the contract) and `integration.md` (an **ordered agent
29
- runbook**). This command discovers the available components, lets the developer pick **one**, then
30
- lets them pick **one or more implementations** from that component's catalog, and finally executes
31
- the component's own `integration.md` runbook to add the required code.
32
-
33
- This command is the entry point; the per-component `integration.md` is the authority on *what code
34
- to add*. Always defer to the selected component's runbook for the actual edits, package versions,
35
- registration scaffold, and verification steps — do not invent integration steps from memory.
36
-
37
- ## Outline
38
-
39
- 1. **Discover candidate components.** List the immediate **subdirectories** of `docs/components/`
40
- (directories only — ignore loose files such as `README.md`). This is the set of selectable
41
- components.
42
- - If `docs/components/` does not exist or has **no** subdirectories, report that no components
43
- are available, point the user at `docs/components/README.md` for the expected layout, and
44
- **stop** without changing anything.
45
- - A component folder is only valid if it contains an `integration.md`. Skip (and note) any
46
- subfolder missing one.
47
-
48
- 2. **Direct argument (optional).** If the user passed an argument:
49
- - If it exactly matches one of the discovered folder names, treat that as the chosen component
50
- and skip to step 4.
51
- - If it does not match any folder, note the mismatch, list the available names, and fall through
52
- to the interactive selection in step 3.
53
-
54
- 3. **Select the component (single-select).** Present the candidate components with the
55
- `AskUserQuestion` tool (single-select, `multiSelect: false`). Use each folder name as the option
56
- label and, if cheaply available, the one-line "Use when…" summary from
57
- `docs/components/README.md` as the option description.
58
- - If **more than 4** components exist, split across multiple `AskUserQuestion` questions/calls
59
- (≤4 options per question).
60
- - If **exactly one** component exists, ask a confirmation — *"Add component '<name>'?"* with
61
- options **"Add '<name>'"** and **"Cancel"**.
62
- - If the user cancels (or interactive questions cannot be asked and no valid argument was given),
63
- **stop** without changing anything.
64
-
65
- 4. **Load the component runbook.** Read `docs/components/<chosen>/integration.md` and, when it
66
- references it, `docs/components/<chosen>/README.md`. Locate the **"Implementation catalog
67
- (selection list)"** section — its table rows are the selectable implementations. Each row's
68
- `Key` is the implementation identifier; capture each Key plus its human description for the
69
- prompt.
70
- - If `integration.md` is missing or has no implementation catalog, report that the component is
71
- not integrable via this command and **stop**.
72
-
73
- 5. **Select implementation(s) (multi-select).** Present the catalog rows with `AskUserQuestion`,
74
- `multiSelect: true`. Use the `Key` as the option label and the row's "Implementation"/"Best for"
75
- text as the description.
76
- - If the catalog has a **single** row, tell the user it is the only available implementation and
77
- ask them to confirm it (do not invent others).
78
- - Honor any **grouping / selection rules** the component's `integration.md` states for reading
79
- the answer (e.g. Jobs: pick exactly one Group A store, optionally one Group B status store).
80
- If more rows exist than fit one prompt, split across multiple `AskUserQuestion` calls.
81
-
82
- 6. **Empty selection → exit cleanly.** If the user submits with **nothing selected** (or cancels
83
- the implementation prompt), do **not** modify the project. Report that no implementation was
84
- chosen, name the component, and tell them they can re-run `/aw-spec-addcomponent` any time. Then
85
- **stop**.
86
-
87
- 7. **Add the code (one or more selected).** Execute the chosen component's `integration.md` runbook
88
- **in order** for the selected implementation(s):
89
- - Resolve the **host/startup project** the runbook targets — the single project that owns
90
- `Program.cs` + the ASP.NET Core web SDK (`<App>.Service` for the Vertical Slice foundation,
91
- `<App>.API` for the Modular Monolith foundation, or another name in a future template). **Find it
92
- by locating `Program.cs`, not by assuming a fixed name.** These foundations have **no** separate
93
- `…Application` / `…Infrastructure` project — package references, registration, and
94
- `appsettings.json` all target this one project.
95
- - Apply the runbook's **"Common steps"** once.
96
- - Apply each selected implementation's **block** (package version in
97
- `Directory.Packages.props`, `PackageReference` without `Version=`, registration line, config).
98
- - Set `options.Provider` per the runbook (when multiple implementations are selected, follow the
99
- runbook's rule for choosing the default/active provider — ask a single-select follow-up if it
100
- requires one).
101
- - Honor the cross-cutting rules in `docs/components/README.md` (R0.1–R0.5, incl. R0.2a): versions
102
- only in `Directory.Packages.props`; register in the host/startup project resolved via `Program.cs`
103
- (R0.2 — its `Extensions/InfrastructureServiceRegistration.cs`/`AddInfrastructure` if present,
104
- else `Program.cs`); inject the abstraction; always set `options.Provider`; never commit secrets.
105
- - **Register in both startup paths when they exist (R0.2a).** If the host project splits
106
- registration into `AddInfrastructure` (`Extensions/InfrastructureServiceRegistration.cs`) **and**
107
- `AddAspireInfrastructure` (`Extensions/AspireInfrastructureExtensions.cs`) — the
108
- `if (isAspire) AddAspireInfrastructure(...) else AddInfrastructure(...)` switch in `Program.cs` —
109
- add the component's registration to **both** methods, not just `AddInfrastructure`. The block is
110
- the same in each, differing only in provider-specific calls (connection strings, `UseSqlite` vs
111
- `UseNpgsql`) that must match that method's existing provider. Registering in only one leaves the
112
- component missing whenever the app runs in the other mode.
113
- - Run any optional usage/feature-slice and schema steps only if the runbook calls for them or the
114
- user asks.
115
-
116
- 8. **Verify and report.** Run the component runbook's **Verification** checklist (at minimum
117
- `dotnet build`). Then report:
118
- - the component added and which implementation key(s) were wired,
119
- - the active provider,
120
- - the files changed,
121
- - any follow-ups the developer must do out-of-band (secrets, migrations, DDL).
122
-
123
- ## Done When
124
-
125
- - [ ] A component was chosen, or nothing was changed (no components available, or the user
126
- cancelled).
127
- - [ ] If implementations were selected, the component's `integration.md` runbook was executed for
128
- each, the project builds, and the changes were reported.
129
- - [ ] If **no** implementation was selected, the project was left untouched and the user was told so.
@@ -1,31 +0,0 @@
1
- ---
2
- name: aw-spec-agent-context-update
3
- description: Refresh the managed AW-Spec section in the coding agent context file
4
- compatibility: Requires aw-spec project structure with .aw-spec/ directory
5
- metadata:
6
- author: github-aw-spec
7
- source: agent-context:commands/aw-spec.agent-context.update.md
8
- ---
9
-
10
- # Update Coding Agent Context
11
-
12
- Refresh the managed AW-Spec section inside the active coding agent's context/instruction file (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`, `AGENTS.md`).
13
-
14
- ## Behavior
15
-
16
- The script reads the agent-context extension config at
17
- `.aw-spec/extensions/agent-context/agent-context-config.yml` to discover:
18
-
19
- - `context_file` — the path of the coding agent context file to manage.
20
- - `context_markers.start` / `.end` — the delimiters surrounding the managed section. Defaults to `<!-- AW-SPEC START -->` and `<!-- AW-SPEC END -->` when the field is missing.
21
-
22
- It then creates, replaces, or appends the managed block so that the section points at the most recent plan path when one can be discovered (`specs/<feature>/plan.md`).
23
-
24
- If `context_file` is empty or the file cannot be located, the command reports nothing to do and exits successfully.
25
-
26
- ## Execution
27
-
28
- - **Bash**: `.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh [plan_path]`
29
- - **PowerShell**: `.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 [plan_path]`
30
-
31
- When `plan_path` is omitted, the script auto-detects the most recently modified `specs/*/plan.md`.