@codyswann/lisa 7.1.5 → 8.0.1

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 (661) hide show
  1. package/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
  2. package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
  3. package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
  5. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
  6. package/dist/cli/admit-cmd.d.ts.map +1 -1
  7. package/dist/cli/admit-cmd.js +16 -10
  8. package/dist/cli/admit-cmd.js.map +1 -1
  9. package/dist/cli/apply.d.ts.map +1 -1
  10. package/dist/cli/apply.js +2 -2
  11. package/dist/cli/apply.js.map +1 -1
  12. package/dist/cli/check-cmd.d.ts.map +1 -1
  13. package/dist/cli/check-cmd.js +8 -4
  14. package/dist/cli/check-cmd.js.map +1 -1
  15. package/dist/cli/doctor-coderabbit.js +2 -2
  16. package/dist/cli/doctor-coderabbit.js.map +1 -1
  17. package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
  18. package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
  19. package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
  20. package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
  21. package/dist/cli/doctor-readiness.js +2 -2
  22. package/dist/cli/doctor-readiness.js.map +1 -1
  23. package/dist/cli/doctor-worker-journey.js +2 -2
  24. package/dist/cli/doctor-worker-journey.js.map +1 -1
  25. package/dist/cli/doctor.d.ts.map +1 -1
  26. package/dist/cli/doctor.js +7 -4
  27. package/dist/cli/doctor.js.map +1 -1
  28. package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
  29. package/dist/cli/file-upstream-cmd.js +20 -25
  30. package/dist/cli/file-upstream-cmd.js.map +1 -1
  31. package/dist/cli/gh-cli.d.ts +2 -2
  32. package/dist/cli/gh-cli.d.ts.map +1 -1
  33. package/dist/cli/gh-cli.js +13 -6
  34. package/dist/cli/gh-cli.js.map +1 -1
  35. package/dist/cli/health-cmd.d.ts.map +1 -1
  36. package/dist/cli/health-cmd.js +7 -19
  37. package/dist/cli/health-cmd.js.map +1 -1
  38. package/dist/cli/lisa-test-run-jest-merge.js +5 -5
  39. package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
  40. package/dist/cli/lisa-test-run.js +8 -4
  41. package/dist/cli/lisa-test-run.js.map +1 -1
  42. package/dist/cli/pr-landing.js +2 -2
  43. package/dist/cli/pr-landing.js.map +1 -1
  44. package/dist/cli/update-check.d.ts.map +1 -1
  45. package/dist/cli/update-check.js +7 -4
  46. package/dist/cli/update-check.js.map +1 -1
  47. package/dist/cli/update-cmd.d.ts.map +1 -1
  48. package/dist/cli/update-cmd.js +7 -4
  49. package/dist/cli/update-cmd.js.map +1 -1
  50. package/dist/cli/worktree-ownership.d.ts.map +1 -1
  51. package/dist/cli/worktree-ownership.js +3 -3
  52. package/dist/cli/worktree-ownership.js.map +1 -1
  53. package/dist/codex/hooks-catalog.d.ts +151 -0
  54. package/dist/codex/hooks-catalog.d.ts.map +1 -0
  55. package/dist/codex/hooks-catalog.js +315 -0
  56. package/dist/codex/hooks-catalog.js.map +1 -0
  57. package/dist/codex/hooks-compatibility.d.ts +14 -0
  58. package/dist/codex/hooks-compatibility.d.ts.map +1 -0
  59. package/dist/codex/hooks-compatibility.js +196 -0
  60. package/dist/codex/hooks-compatibility.js.map +1 -0
  61. package/dist/codex/hooks-installer.d.ts +2 -49
  62. package/dist/codex/hooks-installer.d.ts.map +1 -1
  63. package/dist/codex/hooks-installer.js +5 -546
  64. package/dist/codex/hooks-installer.js.map +1 -1
  65. package/dist/codex/hooks-source-links.d.ts +11 -0
  66. package/dist/codex/hooks-source-links.d.ts.map +1 -0
  67. package/dist/codex/hooks-source-links.js +74 -0
  68. package/dist/codex/hooks-source-links.js.map +1 -0
  69. package/dist/codex/scripts/block-migration-edits.sh +2 -2
  70. package/dist/codex/scripts/block-suppress-directives.sh +3 -3
  71. package/dist/codex/scripts/format-on-edit.sh +2 -2
  72. package/dist/codex/scripts/lint-on-edit.sh +2 -2
  73. package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
  74. package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
  75. package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
  76. package/dist/configs/coverage-scope.d.ts +0 -23
  77. package/dist/configs/coverage-scope.d.ts.map +1 -1
  78. package/dist/configs/coverage-scope.js +2 -3
  79. package/dist/configs/coverage-scope.js.map +1 -1
  80. package/dist/configs/eslint/base.d.ts +2 -113
  81. package/dist/configs/eslint/base.d.ts.map +1 -1
  82. package/dist/configs/eslint/base.js +2 -165
  83. package/dist/configs/eslint/base.js.map +1 -1
  84. package/dist/configs/eslint/cdk.d.ts.map +1 -1
  85. package/dist/configs/eslint/cdk.js +82 -66
  86. package/dist/configs/eslint/cdk.js.map +1 -1
  87. package/dist/configs/eslint/expo-overrides.d.ts +103 -0
  88. package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
  89. package/dist/configs/eslint/expo-overrides.js +187 -0
  90. package/dist/configs/eslint/expo-overrides.js.map +1 -0
  91. package/dist/configs/eslint/expo.d.ts +2 -7
  92. package/dist/configs/eslint/expo.d.ts.map +1 -1
  93. package/dist/configs/eslint/expo.js +186 -258
  94. package/dist/configs/eslint/expo.js.map +1 -1
  95. package/dist/configs/eslint/nestjs.d.ts.map +1 -1
  96. package/dist/configs/eslint/nestjs.js +86 -70
  97. package/dist/configs/eslint/nestjs.js.map +1 -1
  98. package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
  99. package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
  100. package/dist/configs/eslint/process-environment-bans.js +50 -0
  101. package/dist/configs/eslint/process-environment-bans.js.map +1 -0
  102. package/dist/configs/eslint/shared-rules.d.ts +130 -0
  103. package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
  104. package/dist/configs/eslint/shared-rules.js +233 -0
  105. package/dist/configs/eslint/shared-rules.js.map +1 -0
  106. package/dist/configs/eslint/typescript.d.ts.map +1 -1
  107. package/dist/configs/eslint/typescript.js +2 -4
  108. package/dist/configs/eslint/typescript.js.map +1 -1
  109. package/dist/configs/vitest/base.d.ts +2 -2
  110. package/dist/configs/vitest/base.d.ts.map +1 -1
  111. package/dist/configs/vitest/base.js +5 -5
  112. package/dist/configs/vitest/base.js.map +1 -1
  113. package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
  114. package/dist/configs/vitest/coverage-reports-directory.js +3 -2
  115. package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
  116. package/dist/configs/vitest/refusal-announcement.js +2 -2
  117. package/dist/configs/vitest/refusal-announcement.js.map +1 -1
  118. package/dist/core/admission-lock.js +2 -3
  119. package/dist/core/admission-lock.js.map +1 -1
  120. package/dist/core/admission-state.d.ts.map +1 -1
  121. package/dist/core/admission-state.js +11 -5
  122. package/dist/core/admission-state.js.map +1 -1
  123. package/dist/core/admission.d.ts.map +1 -1
  124. package/dist/core/admission.js +2 -2
  125. package/dist/core/admission.js.map +1 -1
  126. package/dist/core/bootstrap-environment.d.ts.map +1 -1
  127. package/dist/core/bootstrap-environment.js +8 -5
  128. package/dist/core/bootstrap-environment.js.map +1 -1
  129. package/dist/core/downstream-names.d.ts.map +1 -1
  130. package/dist/core/downstream-names.js +48 -47
  131. package/dist/core/downstream-names.js.map +1 -1
  132. package/dist/core/effectiveness-store.d.ts.map +1 -1
  133. package/dist/core/effectiveness-store.js +3 -5
  134. package/dist/core/effectiveness-store.js.map +1 -1
  135. package/dist/core/gate-declaration-drift.d.ts.map +1 -1
  136. package/dist/core/gate-declaration-drift.js +46 -27
  137. package/dist/core/gate-declaration-drift.js.map +1 -1
  138. package/dist/core/kane-cli-process.d.ts.map +1 -1
  139. package/dist/core/kane-cli-process.js +46 -33
  140. package/dist/core/kane-cli-process.js.map +1 -1
  141. package/dist/core/kane-cli.d.ts.map +1 -1
  142. package/dist/core/kane-cli.js +3 -4
  143. package/dist/core/kane-cli.js.map +1 -1
  144. package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
  145. package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
  146. package/dist/core/lisa-agent-emit-extra.js +231 -0
  147. package/dist/core/lisa-agent-emit-extra.js.map +1 -0
  148. package/dist/core/lisa-agent-emit.d.ts +79 -0
  149. package/dist/core/lisa-agent-emit.d.ts.map +1 -0
  150. package/dist/core/lisa-agent-emit.js +224 -0
  151. package/dist/core/lisa-agent-emit.js.map +1 -0
  152. package/dist/core/lisa-deletions.d.ts +116 -0
  153. package/dist/core/lisa-deletions.d.ts.map +1 -0
  154. package/dist/core/lisa-deletions.js +316 -0
  155. package/dist/core/lisa-deletions.js.map +1 -0
  156. package/dist/core/lisa-file-results.d.ts +58 -0
  157. package/dist/core/lisa-file-results.d.ts.map +1 -0
  158. package/dist/core/lisa-file-results.js +173 -0
  159. package/dist/core/lisa-file-results.js.map +1 -0
  160. package/dist/core/lisa-maintenance.d.ts +139 -0
  161. package/dist/core/lisa-maintenance.d.ts.map +1 -0
  162. package/dist/core/lisa-maintenance.js +324 -0
  163. package/dist/core/lisa-maintenance.js.map +1 -0
  164. package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
  165. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  166. package/dist/core/lisa-owned-hash-ledger.js +44 -6036
  167. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  168. package/dist/core/lisa-owned-hash-ledger.json +6021 -0
  169. package/dist/core/lisa-plugin-sync.d.ts +96 -0
  170. package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
  171. package/dist/core/lisa-plugin-sync.js +216 -0
  172. package/dist/core/lisa-plugin-sync.js.map +1 -0
  173. package/dist/core/lisa-plugins.d.ts +42 -0
  174. package/dist/core/lisa-plugins.d.ts.map +1 -0
  175. package/dist/core/lisa-plugins.js +155 -0
  176. package/dist/core/lisa-plugins.js.map +1 -0
  177. package/dist/core/lisa-state.d.ts +202 -0
  178. package/dist/core/lisa-state.d.ts.map +1 -0
  179. package/dist/core/lisa-state.js +205 -0
  180. package/dist/core/lisa-state.js.map +1 -0
  181. package/dist/core/lisa-summary-stats.d.ts +74 -0
  182. package/dist/core/lisa-summary-stats.d.ts.map +1 -0
  183. package/dist/core/lisa-summary-stats.js +189 -0
  184. package/dist/core/lisa-summary-stats.js.map +1 -0
  185. package/dist/core/lisa-summary.d.ts +34 -0
  186. package/dist/core/lisa-summary.d.ts.map +1 -0
  187. package/dist/core/lisa-summary.js +144 -0
  188. package/dist/core/lisa-summary.js.map +1 -0
  189. package/dist/core/lisa-templates.d.ts +98 -0
  190. package/dist/core/lisa-templates.d.ts.map +1 -0
  191. package/dist/core/lisa-templates.js +251 -0
  192. package/dist/core/lisa-templates.js.map +1 -0
  193. package/dist/core/lisa.d.ts +14 -903
  194. package/dist/core/lisa.d.ts.map +1 -1
  195. package/dist/core/lisa.js +30 -2275
  196. package/dist/core/lisa.js.map +1 -1
  197. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  198. package/dist/core/plugin-command.d.ts.map +1 -1
  199. package/dist/core/plugin-command.js +117 -61
  200. package/dist/core/plugin-command.js.map +1 -1
  201. package/dist/core/template-ownership.d.ts.map +1 -1
  202. package/dist/core/template-ownership.js +0 -1
  203. package/dist/core/template-ownership.js.map +1 -1
  204. package/dist/core/upstream-attribution-body.d.ts +4 -11
  205. package/dist/core/upstream-attribution-body.d.ts.map +1 -1
  206. package/dist/core/upstream-attribution-body.js +61 -373
  207. package/dist/core/upstream-attribution-body.js.map +1 -1
  208. package/dist/core/upstream-attribution-fields.d.ts +40 -0
  209. package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
  210. package/dist/core/upstream-attribution-fields.js +167 -0
  211. package/dist/core/upstream-attribution-fields.js.map +1 -0
  212. package/dist/core/upstream-attribution-files.d.ts +15 -0
  213. package/dist/core/upstream-attribution-files.d.ts.map +1 -0
  214. package/dist/core/upstream-attribution-files.js +156 -0
  215. package/dist/core/upstream-attribution-files.js.map +1 -0
  216. package/dist/core/upstream-attribution-guards.d.ts +80 -0
  217. package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
  218. package/dist/core/upstream-attribution-guards.js +284 -0
  219. package/dist/core/upstream-attribution-guards.js.map +1 -0
  220. package/dist/core/upstream-evidence-manifest.d.ts +1 -1
  221. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  222. package/dist/core/upstream-evidence-manifest.js +67 -30435
  223. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  224. package/dist/core/upstream-evidence-manifest.json +30520 -0
  225. package/dist/health/agentic-contract.d.ts +94 -0
  226. package/dist/health/agentic-contract.d.ts.map +1 -0
  227. package/dist/health/agentic-contract.js +2 -0
  228. package/dist/health/agentic-contract.js.map +1 -0
  229. package/dist/health/agentic-evidence.d.ts +16 -0
  230. package/dist/health/agentic-evidence.d.ts.map +1 -0
  231. package/dist/health/agentic-evidence.js +213 -0
  232. package/dist/health/agentic-evidence.js.map +1 -0
  233. package/dist/health/agentic.d.ts +11 -74
  234. package/dist/health/agentic.d.ts.map +1 -1
  235. package/dist/health/agentic.js +42 -216
  236. package/dist/health/agentic.js.map +1 -1
  237. package/dist/health/deadline.d.ts +4 -1
  238. package/dist/health/deadline.d.ts.map +1 -1
  239. package/dist/health/deadline.js +4 -3
  240. package/dist/health/deadline.js.map +1 -1
  241. package/dist/health/deterministic-inputs.d.ts.map +1 -1
  242. package/dist/health/deterministic-inputs.js +3 -11
  243. package/dist/health/deterministic-inputs.js.map +1 -1
  244. package/dist/health/deterministic-probes.d.ts +52 -0
  245. package/dist/health/deterministic-probes.d.ts.map +1 -0
  246. package/dist/health/deterministic-probes.js +142 -0
  247. package/dist/health/deterministic-probes.js.map +1 -0
  248. package/dist/health/deterministic.d.ts +2 -25
  249. package/dist/health/deterministic.d.ts.map +1 -1
  250. package/dist/health/deterministic.js +14 -106
  251. package/dist/health/deterministic.js.map +1 -1
  252. package/dist/health/finding-utils.d.ts +4 -3
  253. package/dist/health/finding-utils.d.ts.map +1 -1
  254. package/dist/health/finding-utils.js +4 -4
  255. package/dist/health/finding-utils.js.map +1 -1
  256. package/dist/health/governance-probes.d.ts +29 -24
  257. package/dist/health/governance-probes.d.ts.map +1 -1
  258. package/dist/health/governance-probes.js +29 -25
  259. package/dist/health/governance-probes.js.map +1 -1
  260. package/dist/health/hook-inspection.d.ts +4 -3
  261. package/dist/health/hook-inspection.d.ts.map +1 -1
  262. package/dist/health/hook-inspection.js +17 -11
  263. package/dist/health/hook-inspection.js.map +1 -1
  264. package/dist/health/plugin-inspection.d.ts +6 -4
  265. package/dist/health/plugin-inspection.d.ts.map +1 -1
  266. package/dist/health/plugin-inspection.js +10 -9
  267. package/dist/health/plugin-inspection.js.map +1 -1
  268. package/dist/health/prepare.js +24 -8
  269. package/dist/health/prepare.js.map +1 -1
  270. package/dist/health/project-probes.d.ts +14 -7
  271. package/dist/health/project-probes.d.ts.map +1 -1
  272. package/dist/health/project-probes.js +14 -9
  273. package/dist/health/project-probes.js.map +1 -1
  274. package/dist/health/ruleset-compare.d.ts +30 -0
  275. package/dist/health/ruleset-compare.d.ts.map +1 -0
  276. package/dist/health/ruleset-compare.js +143 -0
  277. package/dist/health/ruleset-compare.js.map +1 -0
  278. package/dist/health/ruleset-config-checks.d.ts +66 -0
  279. package/dist/health/ruleset-config-checks.d.ts.map +1 -0
  280. package/dist/health/ruleset-config-checks.js +190 -0
  281. package/dist/health/ruleset-config-checks.js.map +1 -0
  282. package/dist/health/ruleset-expected.d.ts +39 -0
  283. package/dist/health/ruleset-expected.d.ts.map +1 -0
  284. package/dist/health/ruleset-expected.js +181 -0
  285. package/dist/health/ruleset-expected.js.map +1 -0
  286. package/dist/health/ruleset-gh.d.ts +85 -0
  287. package/dist/health/ruleset-gh.d.ts.map +1 -0
  288. package/dist/health/ruleset-gh.js +177 -0
  289. package/dist/health/ruleset-gh.js.map +1 -0
  290. package/dist/health/ruleset-inspection.d.ts +13 -117
  291. package/dist/health/ruleset-inspection.d.ts.map +1 -1
  292. package/dist/health/ruleset-inspection.js +8 -738
  293. package/dist/health/ruleset-inspection.js.map +1 -1
  294. package/dist/health/ruleset-normalize.d.ts +32 -0
  295. package/dist/health/ruleset-normalize.d.ts.map +1 -0
  296. package/dist/health/ruleset-normalize.js +160 -0
  297. package/dist/health/ruleset-normalize.js.map +1 -0
  298. package/dist/health/template-compose.d.ts +9 -0
  299. package/dist/health/template-compose.d.ts.map +1 -0
  300. package/dist/health/template-compose.js +105 -0
  301. package/dist/health/template-compose.js.map +1 -0
  302. package/dist/health/template-inspection.d.ts +5 -52
  303. package/dist/health/template-inspection.d.ts.map +1 -1
  304. package/dist/health/template-inspection.js +13 -435
  305. package/dist/health/template-inspection.js.map +1 -1
  306. package/dist/health/template-plan.d.ts +33 -0
  307. package/dist/health/template-plan.d.ts.map +1 -0
  308. package/dist/health/template-plan.js +154 -0
  309. package/dist/health/template-plan.js.map +1 -0
  310. package/dist/health/template-shape.d.ts +19 -0
  311. package/dist/health/template-shape.d.ts.map +1 -0
  312. package/dist/health/template-shape.js +122 -0
  313. package/dist/health/template-shape.js.map +1 -0
  314. package/dist/health/workflow-excerpt.d.ts +15 -0
  315. package/dist/health/workflow-excerpt.d.ts.map +1 -0
  316. package/dist/health/workflow-excerpt.js +88 -0
  317. package/dist/health/workflow-excerpt.js.map +1 -0
  318. package/dist/health/workflow-inputs-inspection.d.ts +16 -0
  319. package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
  320. package/dist/health/workflow-inputs-inspection.js +116 -0
  321. package/dist/health/workflow-inputs-inspection.js.map +1 -0
  322. package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
  323. package/dist/standards/capture.d.ts.map +1 -1
  324. package/dist/standards/capture.js +73 -25
  325. package/dist/standards/capture.js.map +1 -1
  326. package/dist/standards/contract.d.ts.map +1 -1
  327. package/dist/standards/contract.js +26 -9
  328. package/dist/standards/contract.js.map +1 -1
  329. package/dist/standards/git-state.d.ts.map +1 -1
  330. package/dist/standards/git-state.js +2 -2
  331. package/dist/standards/git-state.js.map +1 -1
  332. package/dist/standards/registry-checks.d.ts +34 -0
  333. package/dist/standards/registry-checks.d.ts.map +1 -0
  334. package/dist/standards/registry-checks.js +137 -0
  335. package/dist/standards/registry-checks.js.map +1 -0
  336. package/dist/standards/registry.d.ts +3 -13
  337. package/dist/standards/registry.d.ts.map +1 -1
  338. package/dist/standards/registry.js +105 -194
  339. package/dist/standards/registry.js.map +1 -1
  340. package/dist/standards/storage.js +8 -10
  341. package/dist/standards/storage.js.map +1 -1
  342. package/dist/strategies/deduplicate-arrays.d.ts +18 -0
  343. package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
  344. package/dist/strategies/deduplicate-arrays.js +25 -0
  345. package/dist/strategies/deduplicate-arrays.js.map +1 -0
  346. package/dist/strategies/package-lisa-detect.d.ts +10 -0
  347. package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
  348. package/dist/strategies/package-lisa-detect.js +178 -0
  349. package/dist/strategies/package-lisa-detect.js.map +1 -0
  350. package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
  351. package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
  352. package/dist/strategies/package-lisa-direct-floors.js +37 -0
  353. package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
  354. package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
  355. package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
  356. package/dist/strategies/package-lisa-host-pins.js +254 -0
  357. package/dist/strategies/package-lisa-host-pins.js.map +1 -0
  358. package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
  359. package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
  360. package/dist/strategies/package-lisa-manifest-guards.js +234 -0
  361. package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
  362. package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
  363. package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
  364. package/dist/strategies/package-lisa-pin-alignment.js +106 -0
  365. package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
  366. package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
  367. package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
  368. package/dist/strategies/package-lisa-script-notes.js +145 -0
  369. package/dist/strategies/package-lisa-script-notes.js.map +1 -0
  370. package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
  371. package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
  372. package/dist/strategies/package-lisa-template-apply.js +216 -0
  373. package/dist/strategies/package-lisa-template-apply.js.map +1 -0
  374. package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
  375. package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
  376. package/dist/strategies/package-lisa-template-merge.js +202 -0
  377. package/dist/strategies/package-lisa-template-merge.js.map +1 -0
  378. package/dist/strategies/package-lisa-types.d.ts +5 -0
  379. package/dist/strategies/package-lisa-types.d.ts.map +1 -1
  380. package/dist/strategies/package-lisa.d.ts +1 -195
  381. package/dist/strategies/package-lisa.d.ts.map +1 -1
  382. package/dist/strategies/package-lisa.js +27 -1333
  383. package/dist/strategies/package-lisa.js.map +1 -1
  384. package/dist/strategies/tagged-merge-sections.d.ts +68 -0
  385. package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
  386. package/dist/strategies/tagged-merge-sections.js +113 -0
  387. package/dist/strategies/tagged-merge-sections.js.map +1 -0
  388. package/dist/strategies/tagged-merge.d.ts +1 -90
  389. package/dist/strategies/tagged-merge.d.ts.map +1 -1
  390. package/dist/strategies/tagged-merge.js +19 -190
  391. package/dist/strategies/tagged-merge.js.map +1 -1
  392. package/dist/utils/bounded-stream.d.ts +30 -0
  393. package/dist/utils/bounded-stream.d.ts.map +1 -0
  394. package/dist/utils/bounded-stream.js +63 -0
  395. package/dist/utils/bounded-stream.js.map +1 -0
  396. package/dist/utils/fibonacci.d.ts +3 -3
  397. package/dist/utils/fibonacci.d.ts.map +1 -1
  398. package/dist/utils/fibonacci.js +48 -10
  399. package/dist/utils/fibonacci.js.map +1 -1
  400. package/dist/utils/memo.d.ts +25 -0
  401. package/dist/utils/memo.d.ts.map +1 -0
  402. package/dist/utils/memo.js +32 -0
  403. package/dist/utils/memo.js.map +1 -0
  404. package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
  405. package/dist/utils/postinstall-trampoline.js +3 -20
  406. package/dist/utils/postinstall-trampoline.js.map +1 -1
  407. package/dist/utils/process-environment.d.ts +42 -0
  408. package/dist/utils/process-environment.d.ts.map +1 -0
  409. package/dist/utils/process-environment.js +52 -0
  410. package/dist/utils/process-environment.js.map +1 -0
  411. package/dist/utils/resolve-executable.d.ts +89 -0
  412. package/dist/utils/resolve-executable.d.ts.map +1 -0
  413. package/dist/utils/resolve-executable.js +224 -0
  414. package/dist/utils/resolve-executable.js.map +1 -0
  415. package/dist/utils/shell-command-line.d.ts +9 -0
  416. package/dist/utils/shell-command-line.d.ts.map +1 -0
  417. package/dist/utils/shell-command-line.js +43 -0
  418. package/dist/utils/shell-command-line.js.map +1 -0
  419. package/dist/utils/usage-accounting-totals.d.ts +19 -0
  420. package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
  421. package/dist/utils/usage-accounting-totals.js +145 -0
  422. package/dist/utils/usage-accounting-totals.js.map +1 -0
  423. package/dist/utils/usage-accounting.d.ts +2 -14
  424. package/dist/utils/usage-accounting.d.ts.map +1 -1
  425. package/dist/utils/usage-accounting.js +2 -169
  426. package/dist/utils/usage-accounting.js.map +1 -1
  427. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
  428. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
  429. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
  430. package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
  431. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
  432. package/expo/copy-overwrite/jest.setup.ts +11 -10
  433. package/expo/create-only/scripts/zap-baseline.sh +6 -18
  434. package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
  435. package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
  436. package/package.json +5 -5
  437. package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
  438. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  439. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  440. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  441. package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
  442. package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
  443. package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
  444. package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
  445. package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
  446. package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
  447. package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
  448. package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  449. package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
  450. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
  451. package/plugins/lisa-agy/plugin.json +1 -1
  452. package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
  453. package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  454. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  455. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  456. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  457. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  458. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  459. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  460. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  461. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  462. package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +201 -20
  463. package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
  464. package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
  465. package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
  466. package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  467. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  468. package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
  469. package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
  470. package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
  471. package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
  472. package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  473. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  474. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  475. package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
  476. package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
  477. package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
  478. package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
  479. package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  480. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  481. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  482. package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
  483. package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
  484. package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
  485. package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
  486. package/plugins/lisa-expo-agy/plugin.json +1 -1
  487. package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
  488. package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
  489. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  490. package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
  491. package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
  492. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  493. package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
  494. package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
  495. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  496. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  497. package/plugins/lisa-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
  498. package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
  499. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  500. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  501. package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
  502. package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +1 -1
  503. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  504. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  505. package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +196 -11
  506. package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
  507. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  508. package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
  509. package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +1 -1
  510. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  511. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  512. package/plugins/lisa-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
  513. package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +1 -1
  514. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  515. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  516. package/plugins/lisa-nestjs/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
  517. package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  518. package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
  519. package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
  520. package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
  521. package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  522. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  523. package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
  524. package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  525. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  526. package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
  527. package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
  528. package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
  529. package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  530. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  531. package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
  532. package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
  533. package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
  534. package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  535. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  536. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  537. package/plugins/lisa-nestjs-devin/hooks/block-migration-edits.sh +1 -1
  538. package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
  539. package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
  540. package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  541. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  542. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  543. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  544. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  545. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  546. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  547. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  548. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  549. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  550. package/plugins/lisa-rails/hooks/lisa-edit-gate.sh +19 -15
  551. package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
  552. package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
  553. package/plugins/lisa-rails-agy/plugin.json +1 -1
  554. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  555. package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
  556. package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
  557. package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
  558. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  559. package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
  560. package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
  561. package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
  562. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  563. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  564. package/plugins/lisa-rails-devin/hooks/lisa-edit-gate.sh +19 -15
  565. package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
  566. package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
  567. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  568. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  569. package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
  570. package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
  571. package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
  572. package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
  573. package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
  574. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  575. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  576. package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
  577. package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
  578. package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
  579. package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
  580. package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
  581. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  582. package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
  583. package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
  584. package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
  585. package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
  586. package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
  587. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  588. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  589. package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +2 -2
  590. package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
  591. package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
  592. package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
  593. package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
  594. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  595. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  596. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  597. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  598. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  599. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  600. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  601. package/plugins/src/base/hooks/block-managed-file-edits.sh +201 -20
  602. package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
  603. package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
  604. package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
  605. package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
  606. package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
  607. package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
  608. package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  609. package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
  610. package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
  611. package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
  612. package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
  613. package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
  614. package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
  615. package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
  616. package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  617. package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
  618. package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
  619. package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
  620. package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
  621. package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
  622. package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
  623. package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
  624. package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
  625. package/scripts/build-plugins.sh +1 -1
  626. package/scripts/check-derived-artifacts.mjs +2 -2
  627. package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
  628. package/scripts/check-orphan-test-processes.mjs +0 -1
  629. package/scripts/check-self-dependency-pin.mjs +0 -2
  630. package/scripts/claude-remote-setup.sh +12 -7
  631. package/scripts/cleanup-amplify-branches.sh +0 -1
  632. package/scripts/generate-export-surface.mjs +131 -61
  633. package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
  634. package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
  635. package/scripts/github-status-check.sh +5 -25
  636. package/scripts/install-claude-plugins.sh +10 -8
  637. package/scripts/lib/merge-generated-json.mjs +274 -0
  638. package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
  639. package/scripts/lib/upstream-public-commits.mjs +35 -18
  640. package/scripts/lisa-commit-and-pr-local.sh +1 -1
  641. package/scripts/lisa-enforcement-fallback.sh +31 -32
  642. package/scripts/lisa-github-environments.sh +5 -1
  643. package/scripts/lisa-github-repo-settings.sh +5 -1
  644. package/scripts/lisa-github-repo-setup.sh +1 -2
  645. package/scripts/lisa-github-rulesets.sh +8 -8
  646. package/scripts/lisa-remote-env/session-start.sh +18 -5
  647. package/scripts/lisa-rollback-release.mjs +0 -2
  648. package/scripts/lisa-update-local.sh +1 -1
  649. package/scripts/merge-generated-artifact.mjs +18 -6
  650. package/scripts/raise-self-dependency-pin.mjs +0 -2
  651. package/scripts/run-artifact-checks.mjs +1 -1
  652. package/scripts/verify-packed-learnings-contract.mjs +36 -3
  653. package/scripts/verify-self-pin-raise.mjs +0 -2
  654. package/typescript/copy-contents/.husky/commit-msg +8 -2
  655. package/typescript/copy-contents/.husky/post-checkout +2 -0
  656. package/typescript/copy-contents/.husky/post-merge +2 -0
  657. package/typescript/copy-contents/.husky/pre-commit +10 -3
  658. package/typescript/copy-contents/.husky/pre-push +29 -16
  659. package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
  660. package/typescript/create-only/.husky/pre-push.local +2 -0
  661. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
@@ -1,184 +1,18 @@
1
- import type { IPrompter } from "../cli/prompts.js";
2
- import { DetectorRegistry } from "../detection/index.js";
3
- import type { ILogger } from "../logging/index.js";
4
- import { MigrationRegistry } from "../migrations/index.js";
5
- import { StrategyRegistry } from "../strategies/index.js";
6
- import type { IBackupService } from "../transaction/index.js";
7
- import type { LisaConfig, LisaResult } from "./config.js";
8
- import type { IGitService } from "./git-service.js";
9
- /**
10
- * Dependencies for Lisa operations
11
- */
12
- export interface LisaDependencies {
13
- readonly logger: ILogger;
14
- readonly prompter: IPrompter;
15
- readonly backupService: IBackupService;
16
- readonly detectorRegistry: DetectorRegistry;
17
- readonly strategyRegistry: StrategyRegistry;
18
- readonly gitService: IGitService;
19
- readonly migrationRegistry: MigrationRegistry;
20
- }
1
+ import type { LisaResult } from "./config.js";
2
+ import { LisaMaintenance } from "./lisa-maintenance.js";
3
+ export type { LisaDependencies } from "./lisa-state.js";
21
4
  /**
22
5
  * Main Lisa orchestrator
23
6
  */
24
- export declare class Lisa {
25
- private readonly config;
26
- private readonly deps;
27
- private counters;
28
- /**
29
- * Managed files this apply found out of date but could not update.
30
- *
31
- * Named so the summary can list them: a count alone tells an operator that
32
- * something did not land without telling them what, which is most of the way
33
- * back to the silence this exists to end.
34
- */
35
- private readonly stalePaths;
36
- /**
37
- * Lisa-owned artifacts this apply deliberately did not replace, each with the
38
- * reason spelled out for whoever reads the output.
39
- *
40
- * Full sentences rather than paths, because this is the one outcome an
41
- * operator cannot act on from the filename: "we left yours alone because it
42
- * defends something ours does not" is the entire message.
43
- */
44
- private readonly hostAheadNotes;
45
- /**
46
- * Templates this apply declined to write because they would have outranked
47
- * configuration the project already maintains, each with the reason.
48
- *
49
- * Full sentences for the same reason as {@link hostAheadNotes}: the filename
50
- * alone cannot convey it. The absent file is the *correct* outcome here, so
51
- * without the sentence an operator has nothing to distinguish "Lisa
52
- * deliberately stood down" from "the template never arrived".
53
- */
54
- private readonly shadowedNotes;
55
- /**
56
- * Every path this apply removed, and every workflow it refused to remove, as
57
- * operator-readable lines.
58
- *
59
- * Announced unconditionally — including the removals Lisa is entitled to
60
- * make. A destructive step nobody can see is half the defect in
61
- * CodySwannGT/lisa#3656: the deletions were correct-looking code doing exactly
62
- * what a manifest told them to, and the reason it cost a consumer three
63
- * workflows is that no human ever had the chance to disagree.
64
- *
65
- * Deliberately wider than the ownership gate. The gate is scoped to
66
- * `.github/workflows/` because a workflow's absence produces no signal
67
- * anywhere, but the manifests declare 255 paths and 213 of them are not
68
- * workflows — `.claude` trees, root-level `eslint-plugin-*` directories,
69
- * jest/vitest/tsconfig files — every one removed recursively by destination
70
- * path with the content never consulted. Announcing costs nothing and can
71
- * break no legitimate deletion, so there is no reason for those 213 to keep
72
- * going silently while this class of defect is being fixed.
73
- */
74
- private readonly deletionNotices;
75
- /**
76
- * Repo-relative paths this apply actually removed, workflow or not.
77
- *
78
- * The console copy of this list is the one an operator is meant to read, and
79
- * the one they demonstrably cannot. Two mechanisms guarantee it: a package
80
- * manager hides postinstall stdout, and the reconciliation trampoline is
81
- * spawned detached with `stdio: "ignore"` (`utils/postinstall-trampoline`) so
82
- * anything it writes is not merely easy to miss but PROVABLY unobservable.
83
- * An announcement that only exists on stdout is therefore not an
84
- * announcement. Persisting the list into the apply receipt is what survives
85
- * both, and follows `stale_paths` (#3033), added for the same reason.
86
- */
87
- private readonly deletedPaths;
88
- private detectedTypes;
89
- private ignorePatterns;
90
- /**
91
- * Paths marked for deletion by any detected project type's deletions.json.
92
- * Used to skip creating files that would just be deleted moments later (e.g.,
93
- * CDK inherits jest.* files from typescript but its own deletions.json removes
94
- * them — without this gate, Lisa creates then immediately deletes the files,
95
- * causing ENOENT races for any concurrent linter/file-watcher).
96
- */
97
- private pendingDeletions;
98
- /**
99
- * Maps each relative path shipped by any type's `create-only/` tree to the
100
- * single type that "owns" it (most-specific wins). Computed once before
101
- * strategies run; consulted while processing `create-only` to suppress
102
- * parent-type sources for paths that a child type also ships.
103
- *
104
- * Motivating case: CDK projects detect as both `typescript` and `cdk`.
105
- * Both ship `.github/workflows/ci.yml` under their `create-only/` trees.
106
- * Without this map, typescript's bun-mode ci.yml runs first and creates
107
- * the file; cdk's npm-mode + determine_environment ci.yml then sees the
108
- * file already exists and is silently skipped — producing a CDK project
109
- * wired to use bun, which fails immediately in CI because CDK projects
110
- * have `engines.bun = "please-use-npm"` and only a `package-lock.json`.
111
- */
112
- private createOnlyOwnership;
113
- /**
114
- * Maps each relative path shipped by any type's `copy-overwrite/` tree to the
115
- * single type that "owns" it (most-specific wins). Computed once before
116
- * strategies run; consulted while processing `copy-overwrite` to suppress
117
- * parent-type sources for paths that a child type also ships.
118
- *
119
- * Why this exists — crash safety: `copy-overwrite` always overwrites, so the
120
- * per-type outer loop in `processConfigurations` naturally lets the child win
121
- * by writing the parent's version first and then overwriting it. But that
122
- * leaves a window in which the destination holds the parent (typescript)
123
- * version of an overlapping path (e.g. `tsconfig.json`, `eslint.config.ts`)
124
- * before the child (expo/cdk/nestjs) phase overwrites it. If the process is
125
- * killed in that window — which is exactly what bun's lifecycle-script
126
- * handling did during postinstall — the project is left with TypeScript
127
- * configs clobbering the child stack's (Expo getting the typescript
128
- * `include` glob in tsconfig.json instead of its own).
129
- * That was the bug fixed by removing the postinstall apply in #318.
130
- *
131
- * Resolving ownership up front and writing each path exactly once (by its
132
- * most-specific type) eliminates the intermediate write entirely: a kill at
133
- * any point leaves either the pre-existing file or the correct final file,
134
- * never the parent-clobbered intermediate. This is the symmetric counterpart
135
- * to `createOnlyOwnership` (which exists for the opposite reason — create-only
136
- * skips existing files, so without help the parent would win).
137
- */
138
- private copyOverwriteOwnership;
139
- /** Destination selected by the host project's projectRulesFile setting. */
140
- private projectLearningsFile;
141
- /** Whether the canonical all/create-only learnings source is registered. */
142
- private projectLearningsTemplateRegistered;
143
- /**
144
- * True when a populated legacy ledger exists and the new `.lisa/` destination
145
- * does not yet — the create-only strategy must NOT seed an empty ledger over
146
- * it, or the pending relocation would collide (both-exist no-clobber) and
147
- * strand the real entries at the raw-injected legacy path.
148
- */
149
- private suppressLearningsSeedForRelocation;
150
- private readonly separator;
151
- private readonly lisaignoreSuffix;
152
- /**
153
- * True when the destination is the Lisa source repo itself. A self-apply
154
- * skips deletions, template application, and postinstall injection while
155
- * still applying package.lisa.json dependency governance. See {@link isLisaSourceRepo}.
156
- */
157
- private selfApply;
158
- /**
159
- * Initialize Lisa orchestrator
160
- * @param config - Configuration for the apply operation
161
- * @param deps - Injected service dependencies
162
- */
163
- constructor(config: LisaConfig, deps: LisaDependencies);
164
- /**
165
- * Postinstall applies are intentionally narrow: they refresh governance
166
- * templates that must track dependency updates, but they must not regenerate
167
- * project-scoped agent surfaces. Agent trees are large, committed outputs and
168
- * are updated through an explicit `lisa apply` or cross-pollinate run. A
169
- * self-apply against the Lisa source repo also skips emit — those agent
170
- * surfaces are built from `plugins/src`, not regenerated by apply.
171
- * @returns True when the current apply should avoid agent-surface writes.
172
- */
173
- private shouldSkipAgentEmitDuringPostinstall;
7
+ export declare class Lisa extends LisaMaintenance {
174
8
  /**
175
9
  * Initialize services
176
10
  */
177
- private initServices;
11
+ protected initServices(): Promise<void>;
178
12
  /**
179
13
  * Detect and confirm project types
180
14
  */
181
- private detectTypes;
15
+ protected detectTypes(): Promise<void>;
182
16
  /**
183
17
  * Detect whether this apply targets the Lisa source repo itself and, if so,
184
18
  * announce the narrowed behavior. A self-apply skips deletions, template
@@ -186,763 +20,40 @@ export declare class Lisa {
186
20
  * dependency governance so Lisa's own deps track the floors it forces
187
21
  * downstream. See {@link isLisaSourceRepo}.
188
22
  */
189
- private detectSelfApply;
190
- /**
191
- * Process all configurations
192
- */
193
- private processConfigurations;
194
- /**
195
- * Pre-compute the set of paths marked for deletion across "all" and every
196
- * detected project type. This runs before strategy processing so the copy
197
- * strategies can skip creating files that are about to be deleted anyway.
198
- *
199
- * Motivating case: CDK inherits typescript/create-only, which ships
200
- * `jest.thresholds.json`. CDK's own `deletions.json` then removes it.
201
- * Without this gate, Lisa would create it and delete it in the same apply,
202
- * which causes ENOENT errors for any concurrent file-watcher/linter that
203
- * observed the briefly-existing file.
204
- *
205
- * The `keep` list in a deletions.json (e.g., expo keeps
206
- * `zap-baseline-expo.yml`) is honored — paths in `keep` are not treated as
207
- * pending-deletions, so they will still be created by upstream strategies.
208
- * @returns Promise that resolves once pending deletions have been collected
209
- */
210
- private loadPendingDeletions;
211
- /**
212
- * Resolve the host-owned learnings destination before template ownership is
213
- * computed. The canonical source stays at its stable package path while its
214
- * destination follows the configured project-rules directory.
215
- */
216
- private loadProjectLearningsFile;
217
- /**
218
- * Warn when `humanGate` or `dependencies.humanSignOff` holds a value outside
219
- * its closed vocabulary. The value is treated as its default rather than
220
- * failing the apply (see `project-config-dependencies` and
221
- * `project-config-human-gate`), so this warning is the only
222
- * place the CLI says the project did not get the setting it typed.
223
- */
224
- private reportInvalidDependencySettings;
225
- /**
226
- * Pre-compute, for every relative path shipped by any type's `create-only/`
227
- * directory, which single type "owns" it. The owner is the most-specific
228
- * detected type — i.e., the last entry in [all, ...detectedTypes] (already
229
- * canonically ordered parent-before-child by `expandAndOrderTypes`).
230
- *
231
- * Why this is needed: the `create-only` strategy intentionally does nothing
232
- * when the destination file already exists. Combined with the per-type
233
- * outer loop in `processConfigurations`, that means the *first* type to
234
- * ship a `create-only/<path>` creates the file and every later type's
235
- * version is silently skipped. For paths that overlap between a parent
236
- * stack (typescript) and a child stack (cdk/expo/nestjs/npm-package), this
237
- * lets the parent win — the exact opposite of the rest of Lisa's
238
- * "child overrides parent" semantics. See `copy-overwrite` for comparison:
239
- * because it always overwrites, the per-type ordering naturally lets
240
- * children win. `create-only` needs explicit help.
241
- *
242
- * The fix: the orchestrator pre-computes this ownership map and, while
243
- * processing `create-only`, skips any source whose owning type isn't the
244
- * current one. The result is that exactly one source wins per path — the
245
- * most-specific detected type.
246
- * @returns Promise that resolves once ownership has been resolved
247
- */
248
- private loadCreateOnlyOwnership;
249
- /**
250
- * Pre-compute, for every relative path shipped by any type's `copy-overwrite/`
251
- * directory, which single type "owns" it — the most-specific detected type
252
- * (last entry in [all, ...detectedTypes], already ordered parent-before-child).
253
- *
254
- * Consumed by `shouldProcessFile` to skip non-owning sources so each path is
255
- * written exactly once, by its winning stack. See the `copyOverwriteOwnership`
256
- * field doc for the crash-safety rationale (eliminating the parent-then-child
257
- * overwrite window that left half-applied configs when the process was killed
258
- * mid-apply during postinstall — the bug behind #318).
259
- * @returns Promise that resolves once ownership has been resolved
260
- */
261
- private loadCopyOverwriteOwnership;
262
- /**
263
- * Read the set of paths a single type's deletions.json will delete,
264
- * filtered by the type's `keep` list. Returns an empty array when the file
265
- * is missing or malformed — a bad file cannot block strategy processing;
266
- * any validation errors are surfaced later by processDeletions itself.
267
- * @param type - Project type (e.g., "all", "cdk", "typescript")
268
- * @returns Array of relative paths marked for deletion
269
- */
270
- private readPendingDeletionsForType;
271
- /**
272
- * Process deletions from deletions.json files
273
- */
274
- private processDeletions;
275
- /**
276
- * Process a single deletions.json file
277
- * @param deletionsPath - Path to the deletions.json file
278
- */
279
- private processDeletionsFile;
280
- /**
281
- * Process a single deletion path
282
- * @param relativePath - Relative path to delete
283
- * @param forcedReason - Why this removal overrides the workflow ownership gate, when it does
284
- * @param shipped - Digests of every version Lisa shipped, when the manifest retires this path only while unmodified
285
- */
286
- private processSingleDeletion;
287
- /**
288
- * Apply the ownership proof a deletion needs, then delete.
289
- *
290
- * A path the manifest retires only while unmodified is proved by its bytes
291
- * (`mayRetireUnmodified`); every other path keeps the workflow ownership
292
- * gate. A `force` reason outranks both, as it always has.
293
- * @param targetPath - Absolute path to remove
294
- * @param relativePath - Repo-relative path, as the manifest spelled it
295
- * @param forcedReason - Why this removal overrides the ownership gate, when it does
296
- * @param shipped - Digests of every version Lisa shipped, when retired only while unmodified
297
- */
298
- private deleteIfOwned;
299
- /**
300
- * Decide whether a path the manifest retires only while unmodified may go.
301
- *
302
- * The proof is the file's own bytes: a copy equal to a version Lisa shipped
303
- * holds nothing of the consumer's, whatever ownership header it carries —
304
- * see `core/retire-unmodified`. That proof stands in for the workflow
305
- * ownership gate, which would otherwise refuse every create-only seed. It
306
- * does not stand in for "nothing calls it", so a path the consumer's own
307
- * scripts or workflows still name is kept too.
308
- *
309
- * Every refusal is recorded as a notice, because a retired file left in
310
- * place is the consumer's to remove and they can only do that if told.
311
- * @param targetPath - Absolute path of the file on disk
312
- * @param relativePath - Repo-relative path the manifest named
313
- * @param shipped - Digests of every version Lisa shipped at this path
314
- * @returns Whether the deletion may proceed
315
- */
316
- private mayRetireUnmodified;
317
- /**
318
- * Remove a path every guard has cleared, and say so.
319
- *
320
- * The announcement is not incidental to the removal — under
321
- * CodySwannGT/lisa#3656 it is half the fix, so it is emitted on the same
322
- * statement path that does the deleting and cannot be skipped while the
323
- * removal still happens.
324
- * @param targetPath - Absolute path to remove
325
- * @param relativePath - Repo-relative path, as the manifest spelled it
326
- * @param forcedReason - Why this removal overrode the ownership gate, when it did
327
- */
328
- private performDeletion;
329
- /**
330
- * Decide whether a `.github/workflows/` deletion target is Lisa's to remove.
331
- *
332
- * A deletions manifest names paths, never bytes, so on its own it cannot tell
333
- * a retired Lisa workflow from an unrelated file a consumer authored at the
334
- * same path. The file's own ownership header can, and every workflow Lisa
335
- * ships carries one — see `core/workflow-deletion-ownership` for why that
336
- * header is the signal and the hash ledger is not.
337
- *
338
- * Unreadable is treated as unattributable rather than as an error: a
339
- * directory, a permissions failure, or bytes that are not text all mean Lisa
340
- * has no proof, and the safe response to no proof is to leave it alone.
341
- *
342
- * A manifest may override the gate per path by giving a reason in its
343
- * `force` map. That exists because two workflow removals already shipped on
344
- * owner rulings against files that were actively harmful (#3590, #3599), and
345
- * those have to reach an edited copy too. The override does not buy silence:
346
- * a forced removal is announced with its reason attached, which is more than
347
- * the unforced path used to manage.
348
- * @param targetPath - Absolute path of the file on disk
349
- * @param relativePath - Repo-relative path the manifest named
350
- * @param forcedReason - Why this removal overrides the gate, when it does
351
- * @returns Whether the deletion may proceed
352
- */
353
- private mayDeleteWorkflow;
354
- /**
355
- * Invoke pre-strategy migration hooks so migrations can snapshot project state
356
- * before strategies overwrite or delete managed files.
357
- */
358
- private runMigrationsBeforeStrategies;
359
- /**
360
- * Run all applicable migrations against the destination project
361
- */
362
- private processMigrations;
363
- /**
364
- * Update migration counters from aggregated migration results
365
- * @param results - Migration results to aggregate into counters
366
- */
367
- private updateMigrationCounters;
368
- /**
369
- * Register plugins from merged settings.json with Claude Code at project scope
370
- */
371
- private registerPlugins;
372
- /**
373
- * Distinguish a missing optional CLI from a failed or timed-out real probe.
374
- * @param error - Probe failure
375
- */
376
- private reportPluginProbeFailure;
377
- /**
378
- * Install each plugin and refresh the Lisa marketplace cache.
379
- *
380
- * Version-gated (perf): `claude plugin marketplace update` is a network git
381
- * pull of the Lisa repo and every `claude plugin install` spawns the Claude
382
- * CLI (seconds each); re-running all of it on every apply made a single
383
- * `bun add` cost minutes across the repeated apply passes. A full sync
384
- * (marketplace refresh + install every plugin) still runs whenever the
385
- * installed Lisa version differs from the `.claude/.lisa-plugins-synced`
386
- * marker; between version changes only plugins missing for this project are
387
- * installed, so the self-heal property (a removed plugin comes back on the
388
- * next install) survives at the cost of one `claude plugin list` call.
389
- * @param execAsync - Promisified exec function for running shell commands
390
- * @param enabledPlugins - Plugin identifiers from enabledPlugins (e.g. "lisa@lisa")
391
- */
392
- private installPluginsAndUpdateMarketplace;
393
- /**
394
- * Drop enabled `<name>@lisa` keys the Lisa marketplace cannot supply, with
395
- * one warning each. A skip never counts against the sync, so a retired key
396
- * such as `typescript@lisa` no longer fails every apply (#4645). An
397
- * unreadable manifest skips nothing.
398
- * @param enabledPlugins - Plugin identifiers from enabledPlugins
399
- * @returns The identifiers worth attempting, in order
400
- */
401
- private withoutUnavailableLisaPlugins;
402
- /**
403
- * Record only a completed sync, keeping failures eligible for a later retry.
404
- * @param version - Current Lisa version
405
- * @param fullSync - Whether a version change required every plugin
406
- * @param completed - Whether all required commands succeeded
407
- */
408
- private recordPluginSyncOutcome;
409
- /** Remove only this project's marker so incomplete incremental syncs retry. */
410
- private invalidatePluginSyncMarker;
411
- /**
412
- * Decide whether this apply needs a full plugin sync and which plugins to
413
- * install.
414
- *
415
- * Linked worktrees inherit the primary checkout's sync state: the marker is
416
- * gitignored (it records this machine's `~/.claude` plugin state), so a
417
- * fresh agent worktree is always marker-less and would otherwise pay the
418
- * full sync — marketplace pulls plus a Claude CLI spawn per plugin — on
419
- * every ticket. When the primary checkout is already synced for this Lisa
420
- * version, the worktree has nothing left to do: the marketplace cache is
421
- * machine-global and per-worktree plugin registration is handled by the
422
- * coding agent's own startup (Claude Code auto-installs the committed
423
- * `enabledPlugins` for a new projectPath; Codex uses the project-local
424
- * `.codex-plugin` pointer instead of Claude project-scope registrations).
425
- * The #320 defense (refresh marketplace whenever installs happened) holds:
426
- * the skip path performs no installs.
427
- * @param execAsync - Promisified exec function for running shell commands
428
- * @param plugins - Plugin identifiers from enabledPlugins
429
- * @returns Sync plan: fullSync (version changed), plugins to install, the
430
- * current Lisa version, and whether destDir is a linked worktree
431
- */
432
- private computePluginSyncPlan;
433
- /**
434
- * Refresh the cached Lisa marketplace via the Claude CLI.
435
- * @param execAsync - Promisified exec function for running shell commands
436
- * @param announce - Whether to log the outcome (silent for the pre-install
437
- * best-effort refresh)
438
- * @returns Whether the refresh command succeeded
439
- */
440
- private updateLisaMarketplace;
441
- /**
442
- * Install a single plugin at project scope via the Claude CLI.
443
- * @param execAsync - Promisified exec function for running shell commands
444
- * @param plugin - Plugin identifier (already validated)
445
- * @returns Whether the install command succeeded
446
- */
447
- private installPlugin;
23
+ protected detectSelfApply(): Promise<void>;
448
24
  /**
449
- * Exec options shared by all Claude CLI plugin commands.
450
- * @returns Options object with the project cwd and registration budget
451
- */
452
- private pluginExecOptions;
453
- /**
454
- * Absolute path of the plugin sync marker recording the last fully-synced
455
- * Lisa version for this project. Shared with install-claude-plugins.sh.
456
- * @returns Marker path under the project's .claude directory
457
- */
458
- private pluginSyncMarkerPath;
459
- /**
460
- * Absolute path of the host project's package.json.
461
- * @returns package.json path under the destination directory
462
- */
463
- private hostPackageJsonPath;
464
- /**
465
- * Read the plugin ids already installed for this project via
466
- * `claude plugin list --json`.
467
- * @param execAsync - Promisified exec function for running shell commands
468
- * @returns Set of installed plugin ids, or null when the list cannot be
469
- * obtained (older CLI, parse failure) so callers fall back to installing
470
- * everything — the pre-existing behavior
25
+ * Validate destination directory exists and is a directory
471
26
  */
472
- private readInstalledPluginIds;
27
+ protected validateDestination(): Promise<void>;
473
28
  /**
474
- * Record the Lisa version whose plugin set was last fully synced.
475
- *
476
- * Writes through `node:fs/promises`. `writeFile` is one of the `graceful-fs`
477
- * passthroughs Node's ESM loader does not expose on the `fs-extra` namespace,
478
- * so `fse.writeFile(...)` was `undefined` in the shipped `dist/` and threw a
479
- * `TypeError` into the catch below (#2487) — the marker was never written, and
480
- * the version gate it feeds never once took effect.
481
- *
482
- * Failure stays non-fatal, but is no longer silent. The catch now reports the
483
- * real error: a recovery path that says nothing cannot be distinguished from
484
- * one that never ran, which is precisely how this went unnoticed. The wording
485
- * matches the sibling best-effort plugin steps above.
486
- * @param version - Lisa package version to record
487
- * @returns Promise that resolves when the marker is written (best-effort)
29
+ * Check for uncommitted git changes and prompt user if dirty
488
30
  */
489
- private writePluginSyncMarker;
31
+ protected validateGitState(): Promise<void>;
490
32
  /**
491
33
  * Finalize operation
492
34
  * @returns Promise that resolves when finalization is complete
493
35
  */
494
- private finalize;
495
- /**
496
- * Install Rails wrappers through their manager after a real apply.
497
- * Failure is reported without turning a usable agent checkout into a blocked
498
- * startup; doctor and health independently report its actual installation.
499
- * @returns Once the bounded installation attempt has settled
500
- */
501
- private installRailsGitHooks;
36
+ protected finalize(): Promise<void>;
502
37
  /**
503
38
  * Create success result
504
39
  * @returns Success result with operation counters and detected types
505
40
  */
506
- private getSuccessResult;
41
+ protected getSuccessResult(): LisaResult;
507
42
  /**
508
43
  * Handle apply error and rollback
509
44
  * @param error Error that occurred during apply
510
45
  * @returns Error result
511
46
  */
512
- private handleApplyError;
47
+ protected handleApplyError(error: unknown): Promise<LisaResult>;
513
48
  /**
514
49
  * Apply Lisa configurations to the destination project
515
50
  * @returns Result of the apply operation
516
51
  */
517
52
  apply(): Promise<LisaResult>;
518
- /**
519
- * Sync lockfiles to package.json in-process when the postinstall trampoline
520
- * will not run.
521
- *
522
- * The trampoline only fires when Lisa is invoked as a package-manager
523
- * lifecycle script (postinstall, prepare, etc.). When users invoke Lisa
524
- * manually after `npm install -D @codyswann/lisa@latest` — the recommended
525
- * flow on plain-npm projects, where Lisa's postinstall is not auto-run —
526
- * the trampoline never schedules and any package.json changes Lisa just
527
- * made (e.g., adding `oxlint-tsgolint` via package.lisa.json merge) leave
528
- * package-lock.json out of sync. The next `npm ci` in CI then fails with
529
- * "lockfile out of sync".
530
- *
531
- * This method closes that gap by running the same lockfile-regeneration
532
- * commands the trampoline child would have run, but synchronously in the
533
- * current process. We skip when the trampoline IS scheduled (it will
534
- * regenerate on its own after the parent PM exits) and when running as the
535
- * trampoline child itself (the trampoline has its own regen step at the end).
536
- * @param prePackageJsonHash - Hash of package.json captured before apply ran (null if file did not exist)
537
- */
538
- private reconcileLockfilesInProcess;
539
- /**
540
- * Emit Codex-targeted artifacts (agents, hooks, settings) when the host
541
- * project's harness includes Codex (`codex` or `fleet`). No-op for `claude`
542
- * (default).
543
- *
544
- * Lisa writes the complete Codex surface and a filtered repository
545
- * marketplace into the host. No user-wide plugin activation participates.
546
- * Ownership is tracked via `.codex/.lisa-managed.json` so updates remove
547
- * stale stack artifacts without touching host customizations.
548
- */
549
- private processCodexEmit;
550
- /**
551
- * Emit Claude-Code-targeted artifacts when the harness includes Claude.
552
- *
553
- * Claude's primary distribution is the GitHub marketplace; the per-project
554
- * artifacts Lisa writes are the canonical `AGENTS.md` and a thin `CLAUDE.md`
555
- * that `@AGENTS.md`-imports it (Claude Code doesn't read AGENTS.md natively).
556
- * Both are create-only and host-owned from creation onward. Skipped in dry-run
557
- * mode and on harness modes that don't include Claude.
558
- */
559
- private processClaudeEmit;
560
- /**
561
- * Emit Antigravity-targeted artifacts when the harness includes agy.
562
- *
563
- * Runtime probes of agy 1.0.3 (ticket-1054) established how agy consumes each
564
- * surface, so each is delivered the way agy actually reads it:
565
- * 1. `agy plugin install` Lisa's variant from `plugins/lisa-agy/` (when agy
566
- * is on PATH). This installs the variant into
567
- * `~/.gemini/config/plugins/<variant>/`.
568
- * 2. Hooks → PLUGIN-BUNDLED. agy loads a plugin's hooks from a `hooks.json`
569
- * at the installed plugin ROOT, so the hooks config + agy-protocol script
570
- * are emitted into the variant at BUILD time by
571
- * generate-agy-plugin-artifacts.mjs and ride along with the plugin
572
- * install above — nothing is written here. Only `block-no-verify`
573
- * (PreToolUse) maps; SessionStart hooks aren't supported by agy.
574
- * 3. MCP → USER-GLOBAL. agy ignores plugin-bundled MCP and only auto-loads
575
- * `~/.gemini/config/mcp_config.json`, so `installAgyMcpConfig` writes
576
- * there (servers collected from the built plugin `.mcp.json` files via
577
- * `collectLisaMcpServers`, translated to agy's `serverUrl` shape,
578
- * tagged-merge preserving host entries). Cross-project caveat: the most
579
- * recent `lisa apply` carrying MCP wins globally.
580
- * 4. Instruction file → the canonical create-only `AGENTS.md` (the same file
581
- * every other agent reads), plus a bounded project-learnings bridge
582
- * reconciled by `processInstructionFilesMigration`. Lisa does not bake
583
- * eager rule bodies into AGENTS.md: a giant generated file is not worth
584
- * carrying just to polyfill agy's headless (`-p`) mode, where SessionStart
585
- * hooks don't fire. In interactive mode it still receives Lisa's plugin
586
- * (skills/agents/MCP) above.
587
- */
588
- private processAgyEmit;
589
- /**
590
- * Wire the official SonarQube MCP into each harness agent via the vendor's
591
- * `sonar integrate <agent>`.
592
- *
593
- * Hard-gated inside {@link installSonarIntegrations}: a no-op unless the project
594
- * opted in (`verification.sonar.enabled`) AND the `sonar` CLI is on PATH, so it
595
- * never touches a project that only wants the CI SonarCloud gate. Kiro and
596
- * Gemini are never wired — they are not Lisa-supported agents. Only the
597
- * apply-time emit agents with a vendor integrate path are wired here (claude,
598
- * codex, copilot, antigravity). Cursor (consumed natively, no apply-time emit)
599
- * and OpenCode (no vendor integrate path) are wired by `/lisa:setup:sonar`.
600
- */
601
- private processSonarIntegration;
602
- /**
603
- * Per-agent stack variant directory names for the detected project types
604
- * that have a built variant. Filters by on-disk existence so a detected type
605
- * without a stack plugin (e.g. `npm-package`) is naturally skipped.
606
- * @param pluginRoot - Absolute path to the `plugins/` directory.
607
- * @param agent - Per-agent variant suffix (`agy` | `copilot` | `cursor`).
608
- * @returns Variant directory names like `lisa-typescript-agy`.
609
- */
610
- private perAgentStackVariants;
611
- /**
612
- * Emit GitHub-Copilot-targeted artifacts when the harness includes copilot.
613
- *
614
- * Three per-project actions:
615
- * 1. `copilot plugin install lisa@CodySwannGT/lisa` (with local-path
616
- * fallback when the marketplace path fails — currently does, pending
617
- * the marketplace.json pluginRoot fix gated on Wave 2 spec step 8).
618
- * 2. Ensure the canonical `AGENTS.md` exists (Copilot reads it natively).
619
- * 3. Create-only write of `.github/copilot-instructions.md`.
620
- */
621
- private processCopilotEmit;
622
- /**
623
- * Emit Devin-CLI-targeted artifacts when the harness includes devin.
624
- *
625
- * Three per-project actions (CodySwannGT/lisa#4427):
626
- * 1. `devin plugins install --local -y` Lisa's `lisa-devin` variant plus the
627
- * matching stack variants, when `devin` is on PATH.
628
- * 2. Reconcile `.devin/hooks.v1.json` with the repository enforcement
629
- * fallback, which keeps the guards firing when the plugin is missing,
630
- * disabled, or untrusted — and which is written whether or not `devin`
631
- * is on this machine, because the clone travels to machines that have it.
632
- * 3. Ensure the canonical `AGENTS.md` exists (Devin reads it natively).
633
- *
634
- * Documented gaps: Devin CLI has no native scheduler, so Lisa's recurring
635
- * loops are triggered manually or through `scheduler: "github-actions"`; and
636
- * Sonar has no Devin integrate path, so `processSonarIntegration` skips it.
637
- */
638
- private processDevinEmit;
639
- /**
640
- * Install the four manifest-tracked OpenCode artifact sets and persist the
641
- * ownership manifest.
642
- *
643
- * All three vendoring installers (skills, agents, commands) are gated on
644
- * `detectedTypes`, matching the hooks installer below and the Codex overlay.
645
- * OpenCode is the surface where Lisa copies its catalogue verbatim into the
646
- * host repo, so an ungated emit would put Expo/React skills and Phaser
647
- * game-design agents in front of a model working an unrelated stack (#3437).
648
- *
649
- * Each installer scopes its own stale cleanup to its `lisa-` namespace, so
650
- * handing the full previous manifest to all four is safe.
651
- * @returns The four install results, for logging and stale accounting.
652
- */
653
- private installOpencodeManagedArtifacts;
654
- /**
655
- * Emit OpenCode-targeted artifacts when the harness includes OpenCode.
656
- *
657
- * OpenCode reads the open Agent Skills format, native agents
658
- * (`.opencode/agents/`), native commands (`.opencode/commands/`), and
659
- * `AGENTS.md` natively (opencode.ai/docs/skills, /docs/agents, /docs/commands,
660
- * /docs/rules), so Lisa needs no transformed plugin variant. It writes:
661
- * - skills (bundled + command-derived) into `.opencode/skills/lisa/`,
662
- * - agents (Markdown, `lisa-` prefixed) into `.opencode/agents/`,
663
- * - commands (Markdown, `lisa-` prefixed) into `.opencode/commands/`,
664
- * and ensures the canonical `AGENTS.md` exists. Ownership of skills/agents/
665
- * commands is tracked via `.opencode/.lisa-managed.json` so updates clean up
666
- * stale artifacts without touching host customizations. Skipped in dry-run
667
- * mode and on harness modes that don't include OpenCode.
668
- */
669
- private processOpencodeEmit;
670
- /**
671
- * Relocate a legacy `.claude/rules/PROJECT_LEARNINGS.md` ledger to the new
672
- * cold `.lisa/PROJECT_LEARNINGS.md` BEFORE the create-only strategy would
673
- * seed an empty ledger at the new path — otherwise both would exist and the
674
- * real entries would be stranded at the legacy location.
675
- *
676
- * Runs even on the postinstall/bootstrap skip path: that guard exists to
677
- * suppress agent-surface EMISSIONS, but moving machine-managed state under
678
- * `.lisa/` is not an agent emission and is safe headless. Skipping it there
679
- * was the exact defect that stranded populated legacy ledgers on the fleet
680
- * upgrade path (create-only still seeds an empty `.lisa/` ledger, so every
681
- * later run then hits the both-exist no-clobber warning). Only dry-run is
682
- * exempt. Idempotent; logs one line on a move and one warning when both exist.
683
- */
684
- private processLearningsRelocation;
685
- /**
686
- * Reconcile the project's agent instruction files onto Lisa's canonical
687
- * pattern after the per-harness emits run.
688
- *
689
- * The per-agent emits write `AGENTS.md` / `CLAUDE.md` create-only, so they
690
- * can't repair files that already exist from older Lisa versions. This step
691
- * runs the same non-destructive migration `lisa doctor` uses — stripping the
692
- * legacy agy baked-rules block from an existing `AGENTS.md` and adding the
693
- * `@AGENTS.md` import to an existing `CLAUDE.md`. Without it, updating an
694
- * existing project would create a canonical `AGENTS.md` that its stale
695
- * `CLAUDE.md` never imports.
696
- *
697
- * Harness-aware: a `CLAUDE.md` pointer is only *created* when the harness
698
- * includes Claude, so a codex/cursor/copilot/agy-only project never gets a
699
- * stray `CLAUDE.md`. An existing host-authored `CLAUDE.md` still gets the
700
- * import regardless. Skipped in dry-run mode.
701
- */
702
- private processInstructionFilesMigration;
703
- /**
704
- * Repoint `sonar integrate`-generated hook shims at Lisa's Sonar wrapper.
705
- *
706
- * CodySwannGT/lisa#4502. The vendor shim calls `sonar hook <event>` directly,
707
- * so an unauthenticated CLI blocks every prompt; the wrapper Lisa ships
708
- * resolves `SONARQUBE_CLI_TOKEN` and degrades that case to a warning. Only
709
- * shims at documented locations whose body is recognisably the vendor's are
710
- * rewritten, and only when the wrapper is present; comment-only edits to such
711
- * a shim are not preserved. Deliberately NOT gated on
712
- * `verification.sonar.enabled` or the CLI being on PATH: a shim committed
713
- * earlier still runs whenever a developer has the CLI installed.
714
- *
715
- * Skipped in dry-run mode, and for postinstall-safe and self-apply runs —
716
- * consistent with `processSonarIntegration`, which those runs also skip, so
717
- * agent surfaces are only touched by a full apply; the next full apply
718
- * repoints. A shim that cannot be rewritten, or that calls `sonar hook` in a
719
- * shape Lisa does not recognise, is reported as a warning and the apply
720
- * continues. Each shim is backed up before it is replaced, so a failure in
721
- * a later apply step restores it along with everything else.
722
- */
723
- private processSonarShimRepoint;
724
- /**
725
- * Schedule a reconciliation re-run when Lisa is invoked as a package-manager
726
- * lifecycle script. Works around the fact that `bun add` (and similar
727
- * package-manager mutations) cache package.json in memory at the start of
728
- * the command and rewrite it at the end, clobbering any changes made by
729
- * postinstall scripts.
730
- *
731
- * The trampoline is always fully detached so the package manager can exit
732
- * normally; the child then detects the exit and re-runs Lisa. See
733
- * utils/postinstall-trampoline.ts for details.
734
- *
735
- * Skipped when this apply did not mutate package.json: the trampoline exists
736
- * solely to redo package.json changes that the parent package manager's
737
- * end-of-command rewrite clobbers (#383). With no mutation there is nothing
738
- * to clobber — the rewrite restores identical content — and scheduling a
739
- * detached re-apply (plus its lockfile regen) is pure waste. File-based
740
- * template writes are not clobbered and need no reconciliation.
741
- * @param prePackageJsonHash - Hash of package.json captured before apply mutated anything (null if the file did not exist)
742
- * @returns Promise that resolves immediately after the detached child is spawned
743
- */
744
- private schedulePostinstallReconciliation;
745
53
  /**
746
54
  * Validate compatibility without applying changes
747
55
  * @returns Result of the validate operation
748
56
  */
749
57
  validate(): Promise<LisaResult>;
750
- /**
751
- * Process all files for a given project type
752
- * @param type Project type to process
753
- */
754
- private processProjectType;
755
- /**
756
- * Process all files in a directory with the given strategy
757
- * @param srcDir Source directory
758
- * @param strategy Strategy to apply
759
- * @param strategy.name Strategy name
760
- * @param strategy.apply Apply function
761
- * @param currentType Project type (e.g. "all", "typescript", "cdk") supplying these files
762
- */
763
- private processDirectory;
764
- /**
765
- * Map the stable canonical learnings source to the project's configured
766
- * sibling path. No other template source is redirected.
767
- * @param sourceRelativePath - Path relative to the strategy source directory
768
- * @param strategyName - Strategy delivering the source file
769
- * @param currentType - Project type that owns the source directory
770
- * @returns Destination path relative to the host project
771
- */
772
- private resolveTemplateDestination;
773
- /**
774
- * Decide whether a candidate source file should be passed to its strategy.
775
- * Centralizes three independent skip rules that all need to short-circuit
776
- * before a strategy ever sees the file:
777
- *
778
- * 1. `.lisaignore` patterns from the destination project
779
- * 2. Pending deletions from any detected type's `deletions.json`
780
- * (avoids the create-then-delete ENOENT race)
781
- * 3. Create-only ownership conflicts (parent stack ships a path that a
782
- * child stack also ships under create-only — child wins)
783
- * 4. Cross-strategy ownership conflicts (a child stack ships a create-only
784
- * path that a parent stack ships under copy-overwrite — child wins before
785
- * the parent can overwrite a host-owned or soon-to-be-created child file)
786
- * 5. Copy-overwrite ownership conflicts (parent and child both ship a path
787
- * under copy-overwrite — only the most-specific stack writes it, so there
788
- * is no parent-then-child overwrite window; see copyOverwriteOwnership)
789
- * @param relativePath - Path relative to the strategy's source directory
790
- * @param strategyName - Name of the strategy that would apply the file
791
- * @param currentType - Project type currently being processed
792
- * @returns True if the strategy should apply the file, false to skip
793
- */
794
- private shouldProcessFile;
795
- /**
796
- * Emit a "would skip"/"skipped" log line in a single place so all the skip
797
- * branches in `shouldProcessFile` stay symmetric.
798
- * @param dryReason - Reason text for dry-run mode
799
- * @param relativePath - Path being skipped
800
- * @param applyMessage - Message to log when not in dry-run mode
801
- */
802
- private logSkip;
803
- /**
804
- * Handle overwrite prompt for conflicting files
805
- * @param relativePath Relative path of the file
806
- * @param sourcePath Source file path
807
- * @param destPath Destination file path
808
- * @returns True if user approves overwrite
809
- */
810
- private handleOverwritePrompt;
811
- /**
812
- * Show diff between two files
813
- * @param sourcePath Source file path
814
- * @param destPath Destination file path
815
- */
816
- private showDiff;
817
- /**
818
- * Update counters based on operation result
819
- * @param result Operation result to count
820
- */
821
- private updateCounters;
822
- /**
823
- * Log a message using appropriate logger method
824
- * @param dryMsg Message for dry run mode
825
- * @param successMsg Message for success mode
826
- */
827
- private logMessage;
828
- /**
829
- * Log operation result
830
- * @param result Result to log
831
- */
832
- private logResult;
833
- /**
834
- * Log an optional operation note.
835
- * @param result Operation result that may carry an operator-readable note
836
- */
837
- private logNote;
838
- /**
839
- * Validate destination directory exists and is a directory
840
- */
841
- private validateDestination;
842
- /**
843
- * Check for uncommitted git changes and prompt user if dirty
844
- */
845
- private validateGitState;
846
- /**
847
- * Print header banner
848
- */
849
- private printHeader;
850
- /**
851
- * Print summary header with mode
852
- */
853
- private printSummaryHeader;
854
- /**
855
- * Print a single stat line with color
856
- * @param label - Stat label
857
- * @param value - Stat value
858
- * @param color - Color function from picocolors
859
- * @param suffix - Optional suffix after the count
860
- */
861
- private printStatLine;
862
- /**
863
- * Print summary statistics for validate mode
864
- */
865
- private printValidateStats;
866
- /**
867
- * Print summary statistics for dry-run mode
868
- */
869
- private printDryRunStats;
870
- /**
871
- * Print summary statistics for apply mode
872
- */
873
- private printApplyStats;
874
- /**
875
- * Name the out-of-date managed files and say how to update them.
876
- *
877
- * A bare count is not enough to act on. An operator taking an upgrade needs
878
- * to see WHICH managed files the release changed and did not deliver —
879
- * particularly the enforcement guards, where the gap is a security control
880
- * that stayed on its old version while the release notes said otherwise.
881
- */
882
- private printStaleDetail;
883
- /**
884
- * Report Lisa-owned artifacts this apply chose not to replace.
885
- *
886
- * Reported as good news, not as a warning about the project: keeping a guard
887
- * that is stronger than Lisa's is the correct outcome, and phrasing it as a
888
- * problem would push an operator to "fix" it by discarding their own
889
- * hardening — the exact loss the check exists to prevent.
890
- */
891
- private printHostAheadDetail;
892
- /**
893
- * Name every template this apply declined to write to avoid outranking the
894
- * project's own configuration.
895
- *
896
- * Reported as good news for the same reason as {@link printHostAheadDetail}:
897
- * the project's config surviving is the correct outcome. But it is stated at
898
- * all because the *absence* of a file is invisible — a template that never
899
- * arrives looks identical to one that was never shipped, and this is the only
900
- * moment anything can say which happened (CodySwannGT/lisa#3501).
901
- */
902
- private printShadowedDetail;
903
- /**
904
- * Name every path this apply removed, and every workflow it declined to.
905
- *
906
- * Deliberately unconditional on the removals, and deliberately wider than the
907
- * ownership gate. Lisa is entitled to retire its own artifacts, and it still
908
- * says so out loud, because the cost of an unannounced removal is not
909
- * proportional to whether it was justified: a workflow that no longer exists
910
- * cannot fail, so its absence produces no red check anywhere and reads
911
- * exactly like a healthy repo (CodySwannGT/lisa#3656). The same is true, more
912
- * quietly, of a deleted `.claude/skills/<name>` directory or a root-level
913
- * `eslint-plugin-*` tree. Reviewing the upgrade diff has to be enough to
914
- * notice, and that only works if the install told somebody.
915
- */
916
- private printDeletionDetail;
917
- /**
918
- * Print summary statistics
919
- */
920
- private printSummaryStats;
921
- /**
922
- * Print project types
923
- */
924
- private printProjectTypes;
925
- /**
926
- * Print validation result
927
- */
928
- private printValidationResult;
929
- /**
930
- * Print summary
931
- */
932
- private printSummary;
933
- /**
934
- * Read a file's contents, returning null if the file does not exist or cannot be read.
935
- * Used for optional file checks that should not interrupt the main flow on failure.
936
- * @param filePath - Absolute path to the file to read
937
- * @returns File contents as a string, or null if unavailable
938
- */
939
- private tryReadFile;
940
- /**
941
- * Print migration notices when the project's ci.yml or deploy.yml still reference
942
- * local quality/release workflows instead of the canonical Lisa repo versions.
943
- * Printed after the update summary so users see it as a post-update action item.
944
- * @param projectDir - The destination project directory to inspect
945
- */
946
- private printMigrationNotices;
947
58
  }
948
59
  //# sourceMappingURL=lisa.d.ts.map