@baselane/packs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/LICENSE +191 -0
  2. package/NOTICE +6 -0
  3. package/README.md +15 -0
  4. package/dist/ai-merge.d.ts +26 -0
  5. package/dist/ai-merge.js +165 -0
  6. package/dist/aliases.d.ts +7 -0
  7. package/dist/aliases.js +9 -0
  8. package/dist/compose-draft.d.ts +19 -0
  9. package/dist/compose-draft.js +170 -0
  10. package/dist/drift-detect.d.ts +8 -0
  11. package/dist/drift-detect.js +21 -0
  12. package/dist/index.d.ts +40 -0
  13. package/dist/index.js +21 -0
  14. package/dist/ingest.d.ts +25 -0
  15. package/dist/ingest.js +262 -0
  16. package/dist/load.d.ts +7 -0
  17. package/dist/load.js +29 -0
  18. package/dist/manifest.d.ts +71 -0
  19. package/dist/manifest.js +208 -0
  20. package/dist/materialize-harness.d.ts +15 -0
  21. package/dist/materialize-harness.js +48 -0
  22. package/dist/merge-region.d.ts +60 -0
  23. package/dist/merge-region.js +166 -0
  24. package/dist/overlap.d.ts +32 -0
  25. package/dist/overlap.js +49 -0
  26. package/dist/pack-from-fileset.d.ts +13 -0
  27. package/dist/pack-from-fileset.js +133 -0
  28. package/dist/render/adapters.d.ts +6 -0
  29. package/dist/render/adapters.js +43 -0
  30. package/dist/render/agents-md.d.ts +3 -0
  31. package/dist/render/agents-md.js +49 -0
  32. package/dist/render/bundle-union.d.ts +10 -0
  33. package/dist/render/bundle-union.js +87 -0
  34. package/dist/render/bundle.d.ts +3 -0
  35. package/dist/render/bundle.js +51 -0
  36. package/dist/render/capabilities.d.ts +19 -0
  37. package/dist/render/capabilities.js +86 -0
  38. package/dist/render/claude.d.ts +3 -0
  39. package/dist/render/claude.js +92 -0
  40. package/dist/render/design.d.ts +27 -0
  41. package/dist/render/design.js +443 -0
  42. package/dist/render/graph.d.ts +11 -0
  43. package/dist/render/graph.js +245 -0
  44. package/dist/render/memory.d.ts +35 -0
  45. package/dist/render/memory.js +353 -0
  46. package/dist/render/render-pack.d.ts +3 -0
  47. package/dist/render/render-pack.js +43 -0
  48. package/dist/render/repo-union.d.ts +14 -0
  49. package/dist/render/repo-union.js +94 -0
  50. package/dist/render/rollout-files.d.ts +18 -0
  51. package/dist/render/rollout-files.js +39 -0
  52. package/dist/render/system-map.d.ts +8 -0
  53. package/dist/render/system-map.js +73 -0
  54. package/dist/render/tasks.d.ts +32 -0
  55. package/dist/render/tasks.js +327 -0
  56. package/dist/render/wiki.d.ts +30 -0
  57. package/dist/render/wiki.js +288 -0
  58. package/dist/seed/graph-seed.d.ts +17 -0
  59. package/dist/seed/graph-seed.js +18 -0
  60. package/dist/seed/wiki-seed.d.ts +23 -0
  61. package/dist/seed/wiki-seed.js +133 -0
  62. package/dist/seed-skills.d.ts +18 -0
  63. package/dist/seed-skills.js +134 -0
  64. package/dist/types.d.ts +122 -0
  65. package/dist/types.js +1 -0
  66. package/dist/validate.d.ts +30 -0
  67. package/dist/validate.js +397 -0
  68. package/package.json +38 -0
  69. package/packs/database-review/pack.json +44 -0
  70. package/packs/database-review/rendered/.baselane/capabilities.json +10 -0
  71. package/packs/database-review/rendered/.baselane/system-map/README.md +18 -0
  72. package/packs/database-review/rendered/.claude/agents/database-reviewer.md +8 -0
  73. package/packs/database-review/rendered/.claude/commands/db-review.md +6 -0
  74. package/packs/database-review/rendered/.claude/commands/map.md +6 -0
  75. package/packs/database-review/rendered/.claude/settings.json +26 -0
  76. package/packs/database-review/rendered/.github/copilot-instructions.md +48 -0
  77. package/packs/database-review/rendered/AGENTS.md +66 -0
  78. package/packs/database-review/rendered/CLAUDE.md +9 -0
  79. package/packs/database-review/rendered/GEMINI.md +3 -0
  80. package/packs/disciplined-workflow/pack.json +63 -0
  81. package/packs/disciplined-workflow/rendered/.baselane/capabilities.json +10 -0
  82. package/packs/disciplined-workflow/rendered/.baselane/tasks/README.md +36 -0
  83. package/packs/disciplined-workflow/rendered/.claude/agents/plan-reviewer.md +8 -0
  84. package/packs/disciplined-workflow/rendered/.claude/agents/task-reviewer.md +8 -0
  85. package/packs/disciplined-workflow/rendered/.claude/commands/brainstorm.md +6 -0
  86. package/packs/disciplined-workflow/rendered/.claude/commands/execute-plan.md +6 -0
  87. package/packs/disciplined-workflow/rendered/.claude/commands/plan-work.md +6 -0
  88. package/packs/disciplined-workflow/rendered/.claude/commands/write-plan.md +6 -0
  89. package/packs/disciplined-workflow/rendered/.claude/settings.json +24 -0
  90. package/packs/disciplined-workflow/rendered/.github/copilot-instructions.md +24 -0
  91. package/packs/disciplined-workflow/rendered/AGENTS.md +43 -0
  92. package/packs/disciplined-workflow/rendered/CLAUDE.md +12 -0
  93. package/packs/disciplined-workflow/rendered/GEMINI.md +3 -0
  94. package/packs/frontend-design/pack.json +129 -0
  95. package/packs/frontend-design/rendered/.claude/skills/clone/SKILL.md +39 -0
  96. package/packs/frontend-design/rendered/.claude/skills/functional-ui/SKILL.md +78 -0
  97. package/packs/frontend-design/rendered/.claude/skills/gsap/SKILL.md +36 -0
  98. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-core.md +254 -0
  99. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-frameworks.md +266 -0
  100. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-performance.md +79 -0
  101. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-plugins.md +433 -0
  102. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-react.md +136 -0
  103. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-scrolltrigger.md +296 -0
  104. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-timeline.md +107 -0
  105. package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-utils.md +284 -0
  106. package/packs/frontend-design/rendered/.claude/skills/marketing-ui/SKILL.md +36 -0
  107. package/packs/frontend-design/rendered/.claude/skills/shadcn/SKILL.md +267 -0
  108. package/packs/frontend-design/rendered/.claude/skills/shadcn/base-vs-radix.md +306 -0
  109. package/packs/frontend-design/rendered/.claude/skills/shadcn/cli.md +290 -0
  110. package/packs/frontend-design/rendered/.claude/skills/shadcn/composition.md +195 -0
  111. package/packs/frontend-design/rendered/.claude/skills/shadcn/customization.md +209 -0
  112. package/packs/frontend-design/rendered/.claude/skills/shadcn/forms.md +192 -0
  113. package/packs/frontend-design/rendered/.claude/skills/shadcn/icons.md +101 -0
  114. package/packs/frontend-design/rendered/.claude/skills/shadcn/mcp.md +105 -0
  115. package/packs/frontend-design/rendered/.claude/skills/shadcn/registry.md +277 -0
  116. package/packs/frontend-design/rendered/.claude/skills/shadcn/styling.md +162 -0
  117. package/packs/frontend-design/rendered/.github/copilot-instructions.md +474 -0
  118. package/packs/frontend-design/rendered/AGENTS.md +33 -0
  119. package/packs/frontend-design/rendered/CLAUDE.md +10 -0
  120. package/packs/frontend-design/rendered/GEMINI.md +456 -0
  121. package/packs/frontend-taste/pack.json +43 -0
  122. package/packs/frontend-taste/rendered/.baselane/capabilities.json +16 -0
  123. package/packs/frontend-taste/rendered/.claude/agents/taste-reviewer.md +8 -0
  124. package/packs/frontend-taste/rendered/.claude/commands/design-review.md +6 -0
  125. package/packs/frontend-taste/rendered/.claude/settings.json +15 -0
  126. package/packs/frontend-taste/rendered/.github/copilot-instructions.md +51 -0
  127. package/packs/frontend-taste/rendered/AGENTS.md +68 -0
  128. package/packs/frontend-taste/rendered/CLAUDE.md +8 -0
  129. package/packs/frontend-taste/rendered/DESIGN.md +72 -0
  130. package/packs/frontend-taste/rendered/GEMINI.md +3 -0
  131. package/packs/go-rules/pack.json +38 -0
  132. package/packs/go-rules/rendered/.claude/agents/go-reviewer.md +8 -0
  133. package/packs/go-rules/rendered/.claude/commands/go-review.md +6 -0
  134. package/packs/go-rules/rendered/.claude/settings.json +15 -0
  135. package/packs/go-rules/rendered/.github/copilot-instructions.md +44 -0
  136. package/packs/go-rules/rendered/AGENTS.md +54 -0
  137. package/packs/go-rules/rendered/CLAUDE.md +8 -0
  138. package/packs/go-rules/rendered/GEMINI.md +3 -0
  139. package/packs/python-rules/pack.json +38 -0
  140. package/packs/python-rules/rendered/.claude/agents/python-reviewer.md +8 -0
  141. package/packs/python-rules/rendered/.claude/commands/python-review.md +6 -0
  142. package/packs/python-rules/rendered/.claude/settings.json +15 -0
  143. package/packs/python-rules/rendered/.github/copilot-instructions.md +43 -0
  144. package/packs/python-rules/rendered/AGENTS.md +53 -0
  145. package/packs/python-rules/rendered/CLAUDE.md +8 -0
  146. package/packs/python-rules/rendered/GEMINI.md +3 -0
  147. package/packs/second-brain/pack.json +36 -0
  148. package/packs/second-brain/rendered/.baselane/capabilities.json +25 -0
  149. package/packs/second-brain/rendered/.baselane/memory/README.md +34 -0
  150. package/packs/second-brain/rendered/.baselane/wiki/README.md +62 -0
  151. package/packs/second-brain/rendered/.claude/agents/librarian.md +14 -0
  152. package/packs/second-brain/rendered/.claude/commands/remember.md +6 -0
  153. package/packs/second-brain/rendered/.claude/commands/wiki.md +6 -0
  154. package/packs/second-brain/rendered/.claude/settings.json +35 -0
  155. package/packs/second-brain/rendered/.github/copilot-instructions.md +24 -0
  156. package/packs/second-brain/rendered/AGENTS.md +41 -0
  157. package/packs/second-brain/rendered/CLAUDE.md +9 -0
  158. package/packs/second-brain/rendered/GEMINI.md +3 -0
  159. package/packs/security-review/pack.json +72 -0
  160. package/packs/security-review/rendered/.claude/agents/security-reviewer.md +8 -0
  161. package/packs/security-review/rendered/.claude/commands/security-audit.md +6 -0
  162. package/packs/security-review/rendered/.claude/commands/security-scan.md +6 -0
  163. package/packs/security-review/rendered/.claude/settings.json +35 -0
  164. package/packs/security-review/rendered/.claude/skills/security-audit/SKILL.md +44 -0
  165. package/packs/security-review/rendered/.claude/skills/validate-at-boundaries/SKILL.md +41 -0
  166. package/packs/security-review/rendered/.github/copilot-instructions.md +137 -0
  167. package/packs/security-review/rendered/AGENTS.md +66 -0
  168. package/packs/security-review/rendered/CLAUDE.md +11 -0
  169. package/packs/security-review/rendered/GEMINI.md +90 -0
  170. package/packs/software-engineer-harness/pack.json +98 -0
  171. package/packs/software-engineer-harness/rendered/.baselane/capabilities.json +15 -0
  172. package/packs/software-engineer-harness/rendered/.baselane/system-map/README.md +18 -0
  173. package/packs/software-engineer-harness/rendered/.baselane/tasks/README.md +36 -0
  174. package/packs/software-engineer-harness/rendered/.claude/agents/architect.md +8 -0
  175. package/packs/software-engineer-harness/rendered/.claude/agents/checker.md +8 -0
  176. package/packs/software-engineer-harness/rendered/.claude/agents/code-reviewer.md +8 -0
  177. package/packs/software-engineer-harness/rendered/.claude/agents/code-simplifier.md +8 -0
  178. package/packs/software-engineer-harness/rendered/.claude/agents/planner.md +8 -0
  179. package/packs/software-engineer-harness/rendered/.claude/agents/reviewer.md +8 -0
  180. package/packs/software-engineer-harness/rendered/.claude/commands/build-and-check.md +6 -0
  181. package/packs/software-engineer-harness/rendered/.claude/commands/map.md +6 -0
  182. package/packs/software-engineer-harness/rendered/.claude/commands/plan-change.md +6 -0
  183. package/packs/software-engineer-harness/rendered/.claude/commands/plan-work.md +6 -0
  184. package/packs/software-engineer-harness/rendered/.claude/commands/review-change.md +6 -0
  185. package/packs/software-engineer-harness/rendered/.claude/commands/tdd-task.md +6 -0
  186. package/packs/software-engineer-harness/rendered/.claude/settings.json +35 -0
  187. package/packs/software-engineer-harness/rendered/.github/copilot-instructions.md +37 -0
  188. package/packs/software-engineer-harness/rendered/AGENTS.md +58 -0
  189. package/packs/software-engineer-harness/rendered/CLAUDE.md +18 -0
  190. package/packs/software-engineer-harness/rendered/GEMINI.md +3 -0
  191. package/packs/systematic-debugging/pack.json +44 -0
  192. package/packs/systematic-debugging/rendered/.claude/agents/debugger.md +8 -0
  193. package/packs/systematic-debugging/rendered/.claude/commands/debug.md +6 -0
  194. package/packs/systematic-debugging/rendered/.claude/commands/root-cause.md +6 -0
  195. package/packs/systematic-debugging/rendered/.claude/settings.json +15 -0
  196. package/packs/systematic-debugging/rendered/.github/copilot-instructions.md +20 -0
  197. package/packs/systematic-debugging/rendered/AGENTS.md +31 -0
  198. package/packs/systematic-debugging/rendered/CLAUDE.md +9 -0
  199. package/packs/systematic-debugging/rendered/GEMINI.md +3 -0
  200. package/packs/token-efficiency-harness/pack.json +49 -0
  201. package/packs/token-efficiency-harness/rendered/.baselane/capabilities.json +10 -0
  202. package/packs/token-efficiency-harness/rendered/.baselane/memory/README.md +34 -0
  203. package/packs/token-efficiency-harness/rendered/.claude/agents/scout.md +8 -0
  204. package/packs/token-efficiency-harness/rendered/.claude/commands/handoff.md +6 -0
  205. package/packs/token-efficiency-harness/rendered/.claude/commands/remember.md +6 -0
  206. package/packs/token-efficiency-harness/rendered/.claude/commands/usage-audit.md +6 -0
  207. package/packs/token-efficiency-harness/rendered/.claude/settings.json +26 -0
  208. package/packs/token-efficiency-harness/rendered/.github/copilot-instructions.md +26 -0
  209. package/packs/token-efficiency-harness/rendered/AGENTS.md +44 -0
  210. package/packs/token-efficiency-harness/rendered/CLAUDE.md +10 -0
  211. package/packs/token-efficiency-harness/rendered/GEMINI.md +3 -0
  212. package/packs/typescript-rules/pack.json +46 -0
  213. package/packs/typescript-rules/rendered/.claude/agents/typescript-reviewer.md +8 -0
  214. package/packs/typescript-rules/rendered/.claude/commands/typescript-review.md +6 -0
  215. package/packs/typescript-rules/rendered/.claude/settings.json +15 -0
  216. package/packs/typescript-rules/rendered/.claude/skills/immutable-updates/SKILL.md +46 -0
  217. package/packs/typescript-rules/rendered/.github/copilot-instructions.md +89 -0
  218. package/packs/typescript-rules/rendered/AGENTS.md +55 -0
  219. package/packs/typescript-rules/rendered/CLAUDE.md +9 -0
  220. package/packs/typescript-rules/rendered/GEMINI.md +51 -0
  221. package/skills/algorithmic-art/LICENSE +202 -0
  222. package/skills/algorithmic-art/LICENSE.txt +202 -0
  223. package/skills/algorithmic-art/SKILL.md +405 -0
  224. package/skills/algorithmic-art/templates/generator_template.js +223 -0
  225. package/skills/algorithmic-art/templates/viewer.html +599 -0
  226. package/skills/brainstorming/LICENSE +21 -0
  227. package/skills/brainstorming/SKILL.md +159 -0
  228. package/skills/brainstorming/scripts/frame-template.html +213 -0
  229. package/skills/brainstorming/scripts/helper.js +167 -0
  230. package/skills/brainstorming/scripts/server.cjs +723 -0
  231. package/skills/brainstorming/scripts/start-server.sh +209 -0
  232. package/skills/brainstorming/scripts/stop-server.sh +120 -0
  233. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  234. package/skills/brainstorming/visual-companion.md +291 -0
  235. package/skills/brand-guidelines/LICENSE +202 -0
  236. package/skills/brand-guidelines/LICENSE.txt +202 -0
  237. package/skills/brand-guidelines/SKILL.md +73 -0
  238. package/skills/canvas-design/LICENSE +202 -0
  239. package/skills/canvas-design/LICENSE.txt +202 -0
  240. package/skills/canvas-design/SKILL.md +130 -0
  241. package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  242. package/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  243. package/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  244. package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  245. package/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  246. package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  247. package/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  248. package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  249. package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  250. package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  251. package/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  252. package/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  253. package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  254. package/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  255. package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  256. package/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  257. package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  258. package/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  259. package/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  260. package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  261. package/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  262. package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  263. package/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  264. package/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  265. package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  266. package/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  267. package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  268. package/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  269. package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  270. package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  271. package/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  272. package/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  273. package/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  274. package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  275. package/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  276. package/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  277. package/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  278. package/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  279. package/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  280. package/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  281. package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  282. package/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  283. package/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  284. package/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  285. package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  286. package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  287. package/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  288. package/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  289. package/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  290. package/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  291. package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  292. package/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  293. package/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  294. package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  295. package/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  296. package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  297. package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  298. package/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  299. package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  300. package/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  301. package/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  302. package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  303. package/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  304. package/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  305. package/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  306. package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  307. package/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  308. package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  309. package/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  310. package/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  311. package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  312. package/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  313. package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  314. package/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  315. package/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  316. package/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  317. package/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  318. package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  319. package/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  320. package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  321. package/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  322. package/skills/dispatching-parallel-agents/LICENSE +21 -0
  323. package/skills/dispatching-parallel-agents/SKILL.md +185 -0
  324. package/skills/executing-plans/LICENSE +21 -0
  325. package/skills/executing-plans/SKILL.md +70 -0
  326. package/skills/finishing-a-development-branch/LICENSE +21 -0
  327. package/skills/finishing-a-development-branch/SKILL.md +241 -0
  328. package/skills/first-party/README.md +32 -0
  329. package/skills/first-party/append-only-jsonl-stores/SKILL.md +50 -0
  330. package/skills/first-party/golden-snapshot-discipline/SKILL.md +45 -0
  331. package/skills/first-party/immutable-updates/SKILL.md +46 -0
  332. package/skills/first-party/manifest.json +10 -0
  333. package/skills/first-party/ts-extension-imports/SKILL.md +49 -0
  334. package/skills/first-party/validate-at-boundaries/SKILL.md +41 -0
  335. package/skills/first-party/zero-dependency-discipline/SKILL.md +41 -0
  336. package/skills/frontend-design/LICENSE +177 -0
  337. package/skills/frontend-design/LICENSE.txt +177 -0
  338. package/skills/frontend-design/SKILL.md +55 -0
  339. package/skills/internal-comms/LICENSE +202 -0
  340. package/skills/internal-comms/LICENSE.txt +202 -0
  341. package/skills/internal-comms/SKILL.md +32 -0
  342. package/skills/internal-comms/examples/3p-updates.md +47 -0
  343. package/skills/internal-comms/examples/company-newsletter.md +65 -0
  344. package/skills/internal-comms/examples/faq-answers.md +30 -0
  345. package/skills/internal-comms/examples/general-comms.md +16 -0
  346. package/skills/mcp-builder/LICENSE +202 -0
  347. package/skills/mcp-builder/LICENSE.txt +202 -0
  348. package/skills/mcp-builder/SKILL.md +236 -0
  349. package/skills/mcp-builder/reference/evaluation.md +602 -0
  350. package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  351. package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  352. package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  353. package/skills/mcp-builder/scripts/connections.py +151 -0
  354. package/skills/mcp-builder/scripts/evaluation.py +373 -0
  355. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  356. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  357. package/skills/receiving-code-review/LICENSE +21 -0
  358. package/skills/receiving-code-review/SKILL.md +213 -0
  359. package/skills/requesting-code-review/LICENSE +21 -0
  360. package/skills/requesting-code-review/SKILL.md +103 -0
  361. package/skills/requesting-code-review/code-reviewer.md +172 -0
  362. package/skills/seed-manifest.json +185 -0
  363. package/skills/skill-creator/LICENSE +202 -0
  364. package/skills/skill-creator/LICENSE.txt +202 -0
  365. package/skills/skill-creator/SKILL.md +485 -0
  366. package/skills/skill-creator/agents/analyzer.md +274 -0
  367. package/skills/skill-creator/agents/comparator.md +202 -0
  368. package/skills/skill-creator/agents/grader.md +223 -0
  369. package/skills/skill-creator/assets/eval_review.html +146 -0
  370. package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  371. package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  372. package/skills/skill-creator/references/schemas.md +430 -0
  373. package/skills/skill-creator/scripts/__init__.py +0 -0
  374. package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  375. package/skills/skill-creator/scripts/generate_report.py +326 -0
  376. package/skills/skill-creator/scripts/improve_description.py +247 -0
  377. package/skills/skill-creator/scripts/package_skill.py +136 -0
  378. package/skills/skill-creator/scripts/quick_validate.py +103 -0
  379. package/skills/skill-creator/scripts/run_eval.py +310 -0
  380. package/skills/skill-creator/scripts/run_loop.py +328 -0
  381. package/skills/skill-creator/scripts/utils.py +47 -0
  382. package/skills/slack-gif-creator/LICENSE +202 -0
  383. package/skills/slack-gif-creator/LICENSE.txt +202 -0
  384. package/skills/slack-gif-creator/SKILL.md +254 -0
  385. package/skills/slack-gif-creator/core/easing.py +234 -0
  386. package/skills/slack-gif-creator/core/frame_composer.py +176 -0
  387. package/skills/slack-gif-creator/core/gif_builder.py +269 -0
  388. package/skills/slack-gif-creator/core/validators.py +136 -0
  389. package/skills/slack-gif-creator/requirements.txt +4 -0
  390. package/skills/subagent-driven-development/LICENSE +21 -0
  391. package/skills/subagent-driven-development/SKILL.md +418 -0
  392. package/skills/subagent-driven-development/implementer-prompt.md +139 -0
  393. package/skills/subagent-driven-development/scripts/review-package +44 -0
  394. package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
  395. package/skills/subagent-driven-development/scripts/task-brief +40 -0
  396. package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  397. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  398. package/skills/systematic-debugging/LICENSE +21 -0
  399. package/skills/systematic-debugging/SKILL.md +296 -0
  400. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  401. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  402. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  403. package/skills/systematic-debugging/find-polluter.sh +63 -0
  404. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  405. package/skills/systematic-debugging/test-academic.md +14 -0
  406. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  407. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  408. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  409. package/skills/test-driven-development/LICENSE +21 -0
  410. package/skills/test-driven-development/SKILL.md +371 -0
  411. package/skills/test-driven-development/testing-anti-patterns.md +299 -0
  412. package/skills/theme-factory/LICENSE +202 -0
  413. package/skills/theme-factory/LICENSE.txt +202 -0
  414. package/skills/theme-factory/SKILL.md +59 -0
  415. package/skills/theme-factory/theme-showcase.pdf +0 -0
  416. package/skills/theme-factory/themes/arctic-frost.md +19 -0
  417. package/skills/theme-factory/themes/botanical-garden.md +19 -0
  418. package/skills/theme-factory/themes/desert-rose.md +19 -0
  419. package/skills/theme-factory/themes/forest-canopy.md +19 -0
  420. package/skills/theme-factory/themes/golden-hour.md +19 -0
  421. package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  422. package/skills/theme-factory/themes/modern-minimalist.md +19 -0
  423. package/skills/theme-factory/themes/ocean-depths.md +19 -0
  424. package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  425. package/skills/theme-factory/themes/tech-innovation.md +19 -0
  426. package/skills/using-git-worktrees/LICENSE +21 -0
  427. package/skills/using-git-worktrees/SKILL.md +202 -0
  428. package/skills/using-superpowers/LICENSE +21 -0
  429. package/skills/using-superpowers/SKILL.md +62 -0
  430. package/skills/using-superpowers/references/antigravity-tools.md +23 -0
  431. package/skills/using-superpowers/references/codex-tools.md +39 -0
  432. package/skills/using-superpowers/references/pi-tools.md +16 -0
  433. package/skills/verification-before-completion/LICENSE +21 -0
  434. package/skills/verification-before-completion/SKILL.md +139 -0
  435. package/skills/web-artifacts-builder/LICENSE +202 -0
  436. package/skills/web-artifacts-builder/LICENSE.txt +202 -0
  437. package/skills/web-artifacts-builder/SKILL.md +74 -0
  438. package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
  439. package/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
  440. package/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  441. package/skills/webapp-testing/LICENSE +202 -0
  442. package/skills/webapp-testing/LICENSE.txt +202 -0
  443. package/skills/webapp-testing/SKILL.md +96 -0
  444. package/skills/webapp-testing/examples/console_logging.py +35 -0
  445. package/skills/webapp-testing/examples/element_discovery.py +40 -0
  446. package/skills/webapp-testing/examples/static_html_automation.py +33 -0
  447. package/skills/webapp-testing/scripts/with_server.py +106 -0
  448. package/skills/writing-plans/LICENSE +21 -0
  449. package/skills/writing-plans/SKILL.md +174 -0
  450. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
@@ -0,0 +1,40 @@
1
+ export type { WorkflowPack, PackAgent, PackCommand, PackHook, Capability, BlockProvenance, FileMap, PackScope, OnboardingStep } from "./types.ts";
2
+ export { validatePack, validateComponent, packScope, KNOWN_HOOK_EVENTS } from "./validate.ts";
3
+ export { validateSkill, skillLints, SKILL_NAME_MAX, SKILL_DESC_MAX, SKILL_BODY_MAX_LINES, SKILL_BODY_WARN_LINES } from "./validate.ts";
4
+ export type { SkillLint } from "./validate.ts";
5
+ export type { SkillBlock, SkillReference } from "./types.ts";
6
+ export { composeDraftPack } from "./compose-draft.ts";
7
+ export type { DraftPackInput, DraftPackResult } from "./compose-draft.ts";
8
+ export type { ComponentBlockType } from "./validate.ts";
9
+ export { renderPack } from "./render/render-pack.ts";
10
+ export { renderBundleFiles } from "./render/bundle.ts";
11
+ export { renderBundleUnion } from "./render/bundle-union.ts";
12
+ export type { BundleUnion } from "./render/bundle-union.ts";
13
+ export { renderRepoFileUnion } from "./render/repo-union.ts";
14
+ export type { RepoUnion } from "./render/repo-union.ts";
15
+ export { renderRolloutFiles } from "./render/rollout-files.ts";
16
+ export type { RolloutFiles } from "./render/rollout-files.ts";
17
+ export { builtinPacksDir, listBuiltinPacks, loadBuiltinPack } from "./load.ts";
18
+ export { PACK_ALIASES } from "./aliases.ts";
19
+ export { ENTRY_FILES, isEntryFile, mergeManagedRegion, stripManagedRegion, strippedManagedPackIds, extractManagedRegions } from "./merge-region.ts";
20
+ export type { ManagedRegion } from "./merge-region.ts";
21
+ export type { MergeInput, MergeResult, AiConfig } from "./ai-merge.ts";
22
+ export { aiMergeFile } from "./ai-merge.ts";
23
+ export { loadSeedSkills, seedSkillsDir, FIRST_PARTY_SOURCE } from "./seed-skills.ts";
24
+ export type { SeedSkill } from "./seed-skills.ts";
25
+ export { computeSkillOverlaps, normalizeName } from "./overlap.ts";
26
+ export type { SkillOverlap } from "./overlap.ts";
27
+ export { buildWikiSeed } from "./seed/wiki-seed.ts";
28
+ export type { WikiSeedOptions } from "./seed/wiki-seed.ts";
29
+ export { buildGraphSeed } from "./seed/graph-seed.ts";
30
+ export type { GraphSeedOptions } from "./seed/graph-seed.ts";
31
+ export { ingestHarness } from "./ingest.ts";
32
+ export type { IngestInput, IngestResult } from "./ingest.ts";
33
+ export { packFromFileset } from "./pack-from-fileset.ts";
34
+ export type { PackFromFilesetResult } from "./pack-from-fileset.ts";
35
+ export { validateManifest, buildManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, KNOWN_CAPABILITIES, type HarnessManifest, type CapabilityName, type CapabilityReceipt } from "./manifest.ts";
36
+ export { materializeHarness, sha256Hex } from "./materialize-harness.ts";
37
+ export type { MaterializeInput, MaterializeResult } from "./materialize-harness.ts";
38
+ export { detectPackDrift } from "./drift-detect.ts";
39
+ export type { DriftKind } from "./drift-detect.ts";
40
+ export type { VendoredEntry, ManagedRegionEntry, RegionReceipt, Resolution } from "./manifest.ts";
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ export { validatePack, validateComponent, packScope, KNOWN_HOOK_EVENTS } from "./validate.js";
2
+ export { validateSkill, skillLints, SKILL_NAME_MAX, SKILL_DESC_MAX, SKILL_BODY_MAX_LINES, SKILL_BODY_WARN_LINES } from "./validate.js";
3
+ export { composeDraftPack } from "./compose-draft.js";
4
+ export { renderPack } from "./render/render-pack.js";
5
+ export { renderBundleFiles } from "./render/bundle.js";
6
+ export { renderBundleUnion } from "./render/bundle-union.js";
7
+ export { renderRepoFileUnion } from "./render/repo-union.js";
8
+ export { renderRolloutFiles } from "./render/rollout-files.js";
9
+ export { builtinPacksDir, listBuiltinPacks, loadBuiltinPack } from "./load.js";
10
+ export { PACK_ALIASES } from "./aliases.js";
11
+ export { ENTRY_FILES, isEntryFile, mergeManagedRegion, stripManagedRegion, strippedManagedPackIds, extractManagedRegions } from "./merge-region.js";
12
+ export { aiMergeFile } from "./ai-merge.js";
13
+ export { loadSeedSkills, seedSkillsDir, FIRST_PARTY_SOURCE } from "./seed-skills.js";
14
+ export { computeSkillOverlaps, normalizeName } from "./overlap.js";
15
+ export { buildWikiSeed } from "./seed/wiki-seed.js";
16
+ export { buildGraphSeed } from "./seed/graph-seed.js";
17
+ export { ingestHarness } from "./ingest.js";
18
+ export { packFromFileset } from "./pack-from-fileset.js";
19
+ export { validateManifest, buildManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, KNOWN_CAPABILITIES } from "./manifest.js";
20
+ export { materializeHarness, sha256Hex } from "./materialize-harness.js";
21
+ export { detectPackDrift } from "./drift-detect.js";
@@ -0,0 +1,25 @@
1
+ import type { WorkflowPack } from "./types.ts";
2
+ /**
3
+ * ingest.ts — the INVERSE of render/render-pack.ts + render/claude.ts: read a repo's already-
4
+ * rendered harness files (AGENTS.md + .claude/{skills,agents,commands,settings.json}) back into
5
+ * a validatePack-passing WorkflowPack, so a team's own harness can flow through the same
6
+ * preview→apply funnel as a baselane-authored pack.
7
+ *
8
+ * Every part is optional — a repo may have only an AGENTS.md, or only a .claude/ dir, or both.
9
+ * Never throws for one bad file: each file is parsed/validated independently and a failure is
10
+ * caught and recorded in `skipped`, not propagated.
11
+ */
12
+ export interface IngestInput {
13
+ repoName: string;
14
+ listFiles(): Promise<string[]>;
15
+ readFile(path: string): Promise<string | null>;
16
+ }
17
+ export interface IngestResult {
18
+ pack: WorkflowPack;
19
+ sources: string[];
20
+ skipped: string[];
21
+ }
22
+ /** Reads an existing repo's rendered harness (AGENTS.md region + .claude/{skills,agents,commands,
23
+ * settings.json}) back into a validated WorkflowPack — the inverse of renderPack. Every part is
24
+ * optional; a single bad file is caught and recorded in `skipped`, never aborting the ingest. */
25
+ export declare function ingestHarness(input: IngestInput): Promise<IngestResult>;
package/dist/ingest.js ADDED
@@ -0,0 +1,262 @@
1
+ import { validateComponent, validatePack, validateSkill } from "./validate.js";
2
+ import { stripManagedRegion, strippedManagedPackIds } from "./merge-region.js";
3
+ const SKILL_MD_RE = /^\.claude\/skills\/([^/]+)\/SKILL\.md$/;
4
+ const AGENT_MD_RE = /^\.claude\/agents\/([^/]+)\.md$/;
5
+ const COMMAND_MD_RE = /^\.claude\/commands\/([^/]+)\.md$/;
6
+ const SETTINGS_JSON_PATH = ".claude/settings.json";
7
+ const AGENTS_MD_PATH = "AGENTS.md";
8
+ /** Lowercase slug (letters/digits/dashes) matching validate.ts's SLUG — used both for the pack id
9
+ * (from repoName) and for skill/agent/command names recovered from a filename or frontmatter. */
10
+ function slugify(value) {
11
+ const s = value
12
+ .toLowerCase()
13
+ .replace(/[^a-z0-9]+/g, "-")
14
+ .replace(/^-+|-+$/g, "");
15
+ return s.length > 0 ? s : "x";
16
+ }
17
+ /** Minimal single-line `key: value` frontmatter split — same shape import-skills.ts/import-
18
+ * bundle.ts already parse (the render templates in render/claude.ts only ever emit simple
19
+ * single-line frontmatter values, so this is sufficient to invert them). */
20
+ function parseFrontmatter(md) {
21
+ const m = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(md);
22
+ if (!m)
23
+ return { fm: {}, body: md };
24
+ const fm = {};
25
+ for (const raw of m[1].split("\n")) {
26
+ const kv = /^([a-zA-Z0-9_-]+):\s*(.*)$/.exec(raw.trim());
27
+ if (kv)
28
+ fm[kv[1]] = kv[2].replace(/^["']|["']$/g, "").trim();
29
+ }
30
+ return { fm, body: m[2] };
31
+ }
32
+ function placeholderMarkdown(repoName) {
33
+ return `# ${repoName}\n\nNo AGENTS.md was found in this repo; this pack was ingested from its .claude/ harness only.\n`;
34
+ }
35
+ /** Strips every baselane managed region present in `content` (there can be more than one pack's
36
+ * region in a single AGENTS.md), leaving the developer's own prose untouched — the read-side twin
37
+ * of mergeManagedRegion. */
38
+ function stripAllManagedRegions(content) {
39
+ let out = content;
40
+ for (const packId of strippedManagedPackIds(content))
41
+ out = stripManagedRegion(out, packId);
42
+ return out;
43
+ }
44
+ async function ingestContextMarkdown(input, files, sources, skipped) {
45
+ if (!files.includes(AGENTS_MD_PATH))
46
+ return placeholderMarkdown(input.repoName);
47
+ try {
48
+ const content = await input.readFile(AGENTS_MD_PATH);
49
+ if (content === null) {
50
+ skipped.push(AGENTS_MD_PATH);
51
+ return placeholderMarkdown(input.repoName);
52
+ }
53
+ const stripped = stripAllManagedRegions(content).trim();
54
+ sources.push(AGENTS_MD_PATH);
55
+ return stripped.length > 0 ? stripped : placeholderMarkdown(input.repoName);
56
+ }
57
+ catch {
58
+ skipped.push(AGENTS_MD_PATH);
59
+ return placeholderMarkdown(input.repoName);
60
+ }
61
+ }
62
+ async function ingestSkills(input, files, sources, skipped) {
63
+ const skills = [];
64
+ for (const path of files) {
65
+ const m = SKILL_MD_RE.exec(path);
66
+ if (!m)
67
+ continue;
68
+ const dirName = m[1];
69
+ try {
70
+ const content = await input.readFile(path);
71
+ if (content === null) {
72
+ skipped.push(path);
73
+ continue;
74
+ }
75
+ const { fm, body } = parseFrontmatter(content);
76
+ const name = slugify(fm.name || dirName);
77
+ // Sibling reference files: every other *.md directly under the same skill dir.
78
+ const refPrefix = `.claude/skills/${dirName}/`;
79
+ const references = [];
80
+ for (const refPath of files) {
81
+ if (refPath === path || !refPath.startsWith(refPrefix) || !refPath.endsWith(".md"))
82
+ continue;
83
+ if (refPath.slice(refPrefix.length).includes("/"))
84
+ continue; // one level deep only
85
+ try {
86
+ const refContent = await input.readFile(refPath);
87
+ if (refContent === null) {
88
+ skipped.push(refPath);
89
+ continue;
90
+ }
91
+ references.push({ name: slugify(refPath.slice(refPrefix.length).replace(/\.md$/, "")), body: refContent });
92
+ sources.push(refPath);
93
+ }
94
+ catch {
95
+ skipped.push(refPath);
96
+ }
97
+ }
98
+ const trimmedBody = body.trim();
99
+ const candidate = {
100
+ name,
101
+ description: (fm.description || `Imported skill ${name}.`).trim(),
102
+ body: (trimmedBody.length > 0 ? trimmedBody : `Imported skill ${name}.`) + "\n",
103
+ category: fm.category || "write",
104
+ ...(references.length > 0 ? { references } : {}),
105
+ };
106
+ skills.push(validateSkill(candidate));
107
+ sources.push(path);
108
+ }
109
+ catch {
110
+ skipped.push(path);
111
+ }
112
+ }
113
+ return skills;
114
+ }
115
+ async function ingestAgents(input, files, sources, skipped) {
116
+ const agents = [];
117
+ for (const path of files) {
118
+ const m = AGENT_MD_RE.exec(path);
119
+ if (!m)
120
+ continue;
121
+ const fileBase = m[1];
122
+ try {
123
+ const content = await input.readFile(path);
124
+ if (content === null) {
125
+ skipped.push(path);
126
+ continue;
127
+ }
128
+ const { fm, body } = parseFrontmatter(content);
129
+ const name = slugify(fm.name || fileBase);
130
+ const tools = fm.tools ? fm.tools.split(",").map((t) => t.trim()).filter(Boolean) : [];
131
+ const trimmedBody = body.trim();
132
+ const candidate = {
133
+ name,
134
+ description: (fm.description || `Imported agent ${name}.`).trim(),
135
+ tools,
136
+ model: fm.model || "sonnet",
137
+ prompt: trimmedBody.length > 0 ? trimmedBody : `Agent ${name}.`,
138
+ };
139
+ agents.push(validateComponent("agent", candidate));
140
+ sources.push(path);
141
+ }
142
+ catch {
143
+ skipped.push(path);
144
+ }
145
+ }
146
+ return agents;
147
+ }
148
+ async function ingestCommands(input, files, sources, skipped) {
149
+ const commands = [];
150
+ for (const path of files) {
151
+ const m = COMMAND_MD_RE.exec(path);
152
+ if (!m)
153
+ continue;
154
+ const fileBase = m[1];
155
+ try {
156
+ const content = await input.readFile(path);
157
+ if (content === null) {
158
+ skipped.push(path);
159
+ continue;
160
+ }
161
+ const { fm, body } = parseFrontmatter(content);
162
+ const name = slugify(fm.name || fileBase);
163
+ const trimmedBody = body.trim();
164
+ // PackCommand.prompt must be a single line (validate.ts's line()); a hand-edited command
165
+ // can have a multi-line body, so collapse it rather than fail the whole file.
166
+ const prompt = trimmedBody.length > 0 ? trimmedBody.replace(/\s*\n\s*/g, " ").trim() : `Run ${name}.`;
167
+ const candidate = {
168
+ name,
169
+ description: (fm.description || `Imported command ${name}.`).trim(),
170
+ argument_hint: (fm["argument-hint"] || "[arguments]").trim(),
171
+ prompt,
172
+ };
173
+ commands.push(validateComponent("command", candidate));
174
+ sources.push(path);
175
+ }
176
+ catch {
177
+ skipped.push(path);
178
+ }
179
+ }
180
+ return commands;
181
+ }
182
+ /** Inverts `command = echo ${JSON.stringify(message)}` (render/claude.ts's settingsJson) back into
183
+ * the original message. Returns null when `command` doesn't match that exact shape, so it's
184
+ * classified as a real run-command instead. */
185
+ function decodePrintReminder(command) {
186
+ if (!command.startsWith("echo "))
187
+ return null;
188
+ try {
189
+ const parsed = JSON.parse(command.slice("echo ".length));
190
+ return typeof parsed === "string" ? parsed : null;
191
+ }
192
+ catch {
193
+ return null;
194
+ }
195
+ }
196
+ async function ingestHooks(input, files, sources, skipped) {
197
+ const hooks = [];
198
+ if (!files.includes(SETTINGS_JSON_PATH))
199
+ return hooks;
200
+ try {
201
+ const content = await input.readFile(SETTINGS_JSON_PATH);
202
+ if (content === null) {
203
+ skipped.push(SETTINGS_JSON_PATH);
204
+ return hooks;
205
+ }
206
+ const parsed = JSON.parse(content);
207
+ for (const [event, entries] of Object.entries(parsed.hooks ?? {})) {
208
+ if (!Array.isArray(entries))
209
+ continue;
210
+ for (const entry of entries) {
211
+ const matcher = typeof entry.matcher === "string" ? entry.matcher : "";
212
+ for (const h of entry.hooks ?? []) {
213
+ if (typeof h.command !== "string" || h.command.length === 0)
214
+ continue;
215
+ const reminder = decodePrintReminder(h.command);
216
+ const suffix = matcher ? ` (${matcher})` : "";
217
+ const candidate = reminder !== null
218
+ ? { event, matcher, description: `Reminder on ${event}${suffix}.`, action: "print-reminder", message: reminder }
219
+ : { event, matcher, description: `Runs a command on ${event}${suffix}.`, action: "run-command", command: h.command };
220
+ try {
221
+ hooks.push(validateComponent("hook", candidate));
222
+ }
223
+ catch {
224
+ // One malformed hook entry doesn't sink the rest of settings.json.
225
+ }
226
+ }
227
+ }
228
+ }
229
+ sources.push(SETTINGS_JSON_PATH);
230
+ }
231
+ catch {
232
+ skipped.push(SETTINGS_JSON_PATH);
233
+ }
234
+ return hooks;
235
+ }
236
+ /** Reads an existing repo's rendered harness (AGENTS.md region + .claude/{skills,agents,commands,
237
+ * settings.json}) back into a validated WorkflowPack — the inverse of renderPack. Every part is
238
+ * optional; a single bad file is caught and recorded in `skipped`, never aborting the ingest. */
239
+ export async function ingestHarness(input) {
240
+ const files = await input.listFiles();
241
+ const sources = [];
242
+ const skipped = [];
243
+ const markdown = await ingestContextMarkdown(input, files, sources, skipped);
244
+ const skills = await ingestSkills(input, files, sources, skipped);
245
+ const agents = await ingestAgents(input, files, sources, skipped);
246
+ const commands = await ingestCommands(input, files, sources, skipped);
247
+ const hooks = await ingestHooks(input, files, sources, skipped);
248
+ const id = slugify(input.repoName);
249
+ const candidate = {
250
+ id,
251
+ version: "0.1.0",
252
+ title: `${input.repoName} — ingested harness`,
253
+ summary: `Ingested from ${input.repoName}'s existing AGENTS.md/.claude harness.`,
254
+ context: { markdown },
255
+ ...(skills.length > 0 ? { skills } : {}),
256
+ agents,
257
+ commands,
258
+ hooks,
259
+ };
260
+ const pack = validatePack(candidate);
261
+ return { pack, sources, skipped };
262
+ }
package/dist/load.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { WorkflowPack } from "./types.ts";
2
+ /** Absolute path of the packs/ directory shipped inside this package. */
3
+ export declare function builtinPacksDir(): string;
4
+ /** Sorted ids of every shipped pack (directories containing pack.json). */
5
+ export declare function listBuiltinPacks(): Promise<string[]>;
6
+ /** Load one shipped pack by id; resolves retired-id aliases, validates before returning. */
7
+ export declare function loadBuiltinPack(id: string): Promise<WorkflowPack>;
package/dist/load.js ADDED
@@ -0,0 +1,29 @@
1
+ import { readdir, readFile } from "node:fs/promises";
2
+ import { fileURLToPath } from "node:url";
3
+ import { join } from "node:path";
4
+ import { validatePack } from "./validate.js";
5
+ import { PACK_ALIASES } from "./aliases.js";
6
+ const SLUG = /^[a-z0-9][a-z0-9-]*$/;
7
+ /** Absolute path of the packs/ directory shipped inside this package. */
8
+ export function builtinPacksDir() {
9
+ return fileURLToPath(new URL("../packs", import.meta.url));
10
+ }
11
+ /** Sorted ids of every shipped pack (directories containing pack.json). */
12
+ export async function listBuiltinPacks() {
13
+ const entries = await readdir(builtinPacksDir(), { withFileTypes: true });
14
+ return entries
15
+ .filter((e) => e.isDirectory())
16
+ .map((e) => e.name)
17
+ .sort();
18
+ }
19
+ /** Load one shipped pack by id; resolves retired-id aliases, validates before returning. */
20
+ export async function loadBuiltinPack(id) {
21
+ if (!SLUG.test(id))
22
+ throw new Error(`unknown pack: ${id}`);
23
+ const target = PACK_ALIASES[id] ?? id;
24
+ if (!(await listBuiltinPacks()).includes(target)) {
25
+ throw new Error(`unknown pack: ${id}`);
26
+ }
27
+ const raw = await readFile(join(builtinPacksDir(), target, "pack.json"), "utf8");
28
+ return validatePack(JSON.parse(raw));
29
+ }
@@ -0,0 +1,71 @@
1
+ export interface VendoredEntry {
2
+ path: string;
3
+ sha256: string | null;
4
+ }
5
+ export interface RegionReceipt {
6
+ packId: string;
7
+ version: string;
8
+ sha256: string;
9
+ }
10
+ export interface ManagedRegionEntry {
11
+ path: string;
12
+ regions: RegionReceipt[];
13
+ }
14
+ export interface Resolution {
15
+ ref: string;
16
+ sha: string;
17
+ packId: string;
18
+ }
19
+ /** Capabilities a pack can declare as materialized (centrally computed, then distributed). */
20
+ export declare const KNOWN_CAPABILITIES: readonly ["system-map", "wiki", "graph"];
21
+ export type CapabilityName = (typeof KNOWN_CAPABILITIES)[number];
22
+ /** Receipt for one materialized capability: what it was generated from and what it wrote. */
23
+ export interface CapabilityReceipt {
24
+ sourceSha: string | null;
25
+ generatedTs: string;
26
+ paths: {
27
+ path: string;
28
+ sha256: string;
29
+ }[];
30
+ }
31
+ /** The per-target contract: what a repo/machine uses. Source of truth lives IN the target
32
+ * (committed root `harness.json`, beside package.json — npm's manifest-as-front-door convention).
33
+ * Machine manifest stays at `~/.baselane/harness.json`. Exact pins only in v1. */
34
+ export interface HarnessManifest {
35
+ version: 1;
36
+ registry: string | null;
37
+ target: {
38
+ kind: "repo" | "machine";
39
+ id: string;
40
+ };
41
+ packs: Record<string, string>;
42
+ capabilities: Record<string, unknown>;
43
+ materialized: {
44
+ vendored: VendoredEntry[];
45
+ managedRegions: ManagedRegionEntry[];
46
+ derivedCommitted: string[];
47
+ resolutions: Record<string, Resolution>;
48
+ capabilities: Record<string, CapabilityReceipt>;
49
+ };
50
+ }
51
+ export declare const MANIFEST_PATH = "harness.json";
52
+ /** Pre-2026-07-16 repo manifest location. `readManifestWithFallback` (packages/materialize)
53
+ * reads from here when the root manifest is absent; `install` migrates it forward. */
54
+ export declare const LEGACY_MANIFEST_PATH = ".baselane/harness.json";
55
+ /** Sole authority on what a HarnessManifest is (mirror of validatePack). Returns a NEW
56
+ * normalized object — absent registry → null, absent capabilities → {}, absent materialized
57
+ * lists → []. Throws with a reason on anything invalid. Never mutates `raw`. */
58
+ export declare function validateManifest(raw: unknown): HarnessManifest;
59
+ /** Builds the manifest an install writes. If a `receipt` is supplied (hashed vendored files,
60
+ * managed-region receipts, resolutions), it is used verbatim. Otherwise the receipt half is
61
+ * derived from the file paths the materializer produced — entry files become managedRegions,
62
+ * everything else vendored (sorted, deterministic), null hashes, no resolutions — this is the
63
+ * S1 behavior, kept unchanged for callers that don't pass a receipt (e.g. install-job.ts). */
64
+ export declare function buildManifest(input: {
65
+ target: HarnessManifest["target"];
66
+ packs: Record<string, string>;
67
+ registry?: string | null;
68
+ capabilities?: Record<string, unknown>;
69
+ materializedPaths?: string[];
70
+ receipt?: HarnessManifest["materialized"];
71
+ }): HarnessManifest;
@@ -0,0 +1,208 @@
1
+ // packages/packs/src/manifest.ts
2
+ import { isEntryFile } from "./merge-region.js";
3
+ /** Capabilities a pack can declare as materialized (centrally computed, then distributed). */
4
+ export const KNOWN_CAPABILITIES = ["system-map", "wiki", "graph"];
5
+ export const MANIFEST_PATH = "harness.json";
6
+ /** Pre-2026-07-16 repo manifest location. `readManifestWithFallback` (packages/materialize)
7
+ * reads from here when the root manifest is absent; `install` migrates it forward. */
8
+ export const LEGACY_MANIFEST_PATH = ".baselane/harness.json";
9
+ function fail(msg) {
10
+ throw new Error(`invalid manifest: ${msg}`);
11
+ }
12
+ function strList(v, label) {
13
+ if (v === undefined)
14
+ return [];
15
+ if (!Array.isArray(v) || !v.every((x) => typeof x === "string" && x.length > 0))
16
+ fail(`${label} must be a list of non-empty strings`);
17
+ return [...v];
18
+ }
19
+ function nonEmpty(v, label) {
20
+ if (typeof v !== "string" || v.length === 0)
21
+ fail(`${label} must be a non-empty string`);
22
+ return v;
23
+ }
24
+ /** Accepts the S1 legacy shape (string) and the v2 shape ({path, sha256}). */
25
+ function vendoredList(v) {
26
+ if (v === undefined)
27
+ return [];
28
+ if (!Array.isArray(v))
29
+ fail("materialized.vendored must be a list");
30
+ return v.map((e) => {
31
+ if (typeof e === "string") {
32
+ if (e.length === 0)
33
+ fail("materialized.vendored paths must be non-empty");
34
+ return { path: e, sha256: null };
35
+ }
36
+ if (e === null || typeof e !== "object")
37
+ fail("materialized.vendored entries must be strings or {path, sha256}");
38
+ const o = e;
39
+ const path = nonEmpty(o.path, "materialized.vendored path");
40
+ if (o.sha256 !== null && typeof o.sha256 !== "string")
41
+ fail("materialized.vendored sha256 must be a string or null");
42
+ return { path, sha256: o.sha256 ?? null };
43
+ });
44
+ }
45
+ /** Accepts the S1 legacy shape (string) and the v2 shape ({path, regions}). */
46
+ function managedRegionList(v) {
47
+ if (v === undefined)
48
+ return [];
49
+ if (!Array.isArray(v))
50
+ fail("materialized.managedRegions must be a list");
51
+ return v.map((e) => {
52
+ if (typeof e === "string") {
53
+ if (e.length === 0)
54
+ fail("materialized.managedRegions paths must be non-empty");
55
+ return { path: e, regions: [] };
56
+ }
57
+ if (e === null || typeof e !== "object")
58
+ fail("materialized.managedRegions entries must be strings or {path, regions}");
59
+ const o = e;
60
+ const path = nonEmpty(o.path, "materialized.managedRegions path");
61
+ const regionsRaw = o.regions === undefined ? [] : o.regions;
62
+ if (!Array.isArray(regionsRaw))
63
+ fail("materialized.managedRegions regions must be a list");
64
+ const regions = regionsRaw.map((r) => {
65
+ if (r === null || typeof r !== "object")
66
+ fail("materialized.managedRegions region must be an object");
67
+ const ro = r;
68
+ return {
69
+ packId: nonEmpty(ro.packId, "managedRegions region packId"),
70
+ version: nonEmpty(ro.version, "managedRegions region version"),
71
+ sha256: nonEmpty(ro.sha256, "managedRegions region sha256"),
72
+ };
73
+ });
74
+ return { path, regions };
75
+ });
76
+ }
77
+ function resolutionMap(v) {
78
+ if (v === undefined)
79
+ return {};
80
+ if (v === null || typeof v !== "object" || Array.isArray(v))
81
+ fail("materialized.resolutions must be an object");
82
+ const out = {};
83
+ for (const [name, raw] of Object.entries(v)) {
84
+ if (raw === null || typeof raw !== "object")
85
+ fail(`resolutions["${name}"] must be an object`);
86
+ const o = raw;
87
+ out[name] = {
88
+ ref: nonEmpty(o.ref, `resolutions["${name}"].ref`),
89
+ sha: nonEmpty(o.sha, `resolutions["${name}"].sha`),
90
+ packId: nonEmpty(o.packId, `resolutions["${name}"].packId`),
91
+ };
92
+ }
93
+ return out;
94
+ }
95
+ function capabilityReceiptMap(v) {
96
+ if (v === undefined)
97
+ return {};
98
+ if (v === null || typeof v !== "object" || Array.isArray(v))
99
+ fail("materialized.capabilities must be an object");
100
+ const out = {};
101
+ for (const [name, raw] of Object.entries(v)) {
102
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw))
103
+ fail(`materialized.capabilities["${name}"] must be an object`);
104
+ const o = raw;
105
+ if (o.sourceSha !== null && typeof o.sourceSha !== "string")
106
+ fail(`materialized.capabilities["${name}"].sourceSha must be a string or null`);
107
+ const generatedTs = nonEmpty(o.generatedTs, `materialized.capabilities["${name}"].generatedTs`);
108
+ if (!Array.isArray(o.paths))
109
+ fail(`materialized.capabilities["${name}"].paths must be a list`);
110
+ const paths = o.paths.map((p, i) => {
111
+ if (p === null || typeof p !== "object")
112
+ fail(`materialized.capabilities["${name}"].paths[${i}] must be an object`);
113
+ const po = p;
114
+ return {
115
+ path: nonEmpty(po.path, `materialized.capabilities["${name}"].paths[${i}].path`),
116
+ sha256: nonEmpty(po.sha256, `materialized.capabilities["${name}"].paths[${i}].sha256`),
117
+ };
118
+ });
119
+ out[name] = { sourceSha: o.sourceSha ?? null, generatedTs, paths };
120
+ }
121
+ return out;
122
+ }
123
+ /** Sole authority on what a HarnessManifest is (mirror of validatePack). Returns a NEW
124
+ * normalized object — absent registry → null, absent capabilities → {}, absent materialized
125
+ * lists → []. Throws with a reason on anything invalid. Never mutates `raw`. */
126
+ export function validateManifest(raw) {
127
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw))
128
+ fail("manifest must be an object");
129
+ const o = raw;
130
+ if (o.version !== 1)
131
+ fail(`unsupported version ${JSON.stringify(o.version)} (expected 1)`);
132
+ if (o.registry !== undefined && o.registry !== null && typeof o.registry !== "string")
133
+ fail("registry must be a string or null");
134
+ const t = o.target;
135
+ if (t === null || typeof t !== "object")
136
+ fail("target must be an object");
137
+ const target = t;
138
+ if (target.kind !== "repo" && target.kind !== "machine")
139
+ fail(`target.kind must be "repo" or "machine"`);
140
+ if (typeof target.id !== "string" || target.id.length === 0)
141
+ fail("target.id must be a non-empty string");
142
+ if (o.packs === null || typeof o.packs !== "object" || Array.isArray(o.packs))
143
+ fail("packs must be an object");
144
+ const packs = {};
145
+ for (const [name, pin] of Object.entries(o.packs)) {
146
+ if (name.length === 0)
147
+ fail("pack name must be non-empty");
148
+ if (typeof pin !== "string" || pin.length === 0)
149
+ fail(`pack "${name}" pin must be a non-empty string (exact pins only)`);
150
+ packs[name] = pin;
151
+ }
152
+ let capabilities = {};
153
+ if (o.capabilities !== undefined) {
154
+ if (o.capabilities === null || typeof o.capabilities !== "object" || Array.isArray(o.capabilities))
155
+ fail("capabilities must be an object");
156
+ try {
157
+ capabilities = structuredClone(o.capabilities);
158
+ }
159
+ catch {
160
+ fail("capabilities must be JSON-serializable");
161
+ }
162
+ }
163
+ let vendored = [], managedRegions = [], derivedCommitted = [];
164
+ let resolutions = {};
165
+ let materializedCapabilities = {};
166
+ if (o.materialized !== undefined) {
167
+ if (o.materialized === null || typeof o.materialized !== "object")
168
+ fail("materialized must be an object");
169
+ const m = o.materialized;
170
+ vendored = vendoredList(m.vendored);
171
+ managedRegions = managedRegionList(m.managedRegions);
172
+ derivedCommitted = strList(m.derivedCommitted, "materialized.derivedCommitted");
173
+ resolutions = resolutionMap(m.resolutions);
174
+ materializedCapabilities = capabilityReceiptMap(m.capabilities);
175
+ }
176
+ return {
177
+ version: 1,
178
+ registry: o.registry ?? null,
179
+ target: { kind: target.kind, id: target.id },
180
+ packs,
181
+ capabilities,
182
+ materialized: { vendored, managedRegions, derivedCommitted, resolutions, capabilities: materializedCapabilities },
183
+ };
184
+ }
185
+ /** Builds the manifest an install writes. If a `receipt` is supplied (hashed vendored files,
186
+ * managed-region receipts, resolutions), it is used verbatim. Otherwise the receipt half is
187
+ * derived from the file paths the materializer produced — entry files become managedRegions,
188
+ * everything else vendored (sorted, deterministic), null hashes, no resolutions — this is the
189
+ * S1 behavior, kept unchanged for callers that don't pass a receipt (e.g. install-job.ts). */
190
+ export function buildManifest(input) {
191
+ const paths = [...(input.materializedPaths ?? [])].sort((a, b) => a.localeCompare(b));
192
+ const materialized = input.receipt ??
193
+ {
194
+ vendored: paths.filter((p) => !isEntryFile(p)).map((p) => ({ path: p, sha256: null })),
195
+ managedRegions: paths.filter((p) => isEntryFile(p)).map((p) => ({ path: p, regions: [] })),
196
+ derivedCommitted: [],
197
+ resolutions: {},
198
+ capabilities: {},
199
+ };
200
+ return validateManifest({
201
+ version: 1,
202
+ registry: input.registry ?? null,
203
+ target: input.target,
204
+ packs: input.packs,
205
+ capabilities: input.capabilities ?? {},
206
+ materialized,
207
+ });
208
+ }