@jeiemgi/cckit 0.12.0 → 0.13.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 (548) hide show
  1. package/.claude-plugin/plugin.json +4 -2
  2. package/AGENTS.md +17 -237
  3. package/README.md +27 -27
  4. package/SECURITY.md +4 -4
  5. package/bin/PROMPTS.md +12 -0
  6. package/bin/cckit +86 -86
  7. package/cckit.config.json +1 -1
  8. package/kit/PROMPTS.md +14 -0
  9. package/{commands → kit/commands}/kit-doctor.md +3 -4
  10. package/{commands → kit/commands}/kit-export-project.md +1 -1
  11. package/{commands → kit/commands}/kit-init.md +8 -20
  12. package/{commands → kit/commands}/kit-routines.md +1 -1
  13. package/{commands → kit/commands}/kit-update.md +3 -3
  14. package/kit/completions/cckit.bash +9 -0
  15. package/{databases → kit/databases}/supabase.json +1 -1
  16. package/{integrations → kit/integrations}/integration.schema.json +3 -3
  17. package/kit/interview/global.json +54 -0
  18. package/kit/interview/project.json +133 -0
  19. package/kit/modules/qa.json +63 -0
  20. package/kit/modules/software.json +48 -0
  21. package/{profiles → kit/profiles}/automation.json +1 -3
  22. package/{profiles → kit/profiles}/content.json +0 -2
  23. package/{profiles → kit/profiles}/marketing.json +0 -2
  24. package/{profiles → kit/profiles}/minimal.json +1 -3
  25. package/{profiles → kit/profiles}/research.json +1 -3
  26. package/{profiles → kit/profiles}/software.json +0 -2
  27. package/kit/routines/catalogue.json +84 -0
  28. package/{skills → kit/skills}/kit-add/SKILL.md +3 -3
  29. package/{skills → kit/skills}/kit-annotate/SKILL.md +2 -4
  30. package/{skills → kit/skills}/kit-autopilot/SKILL.md +6 -6
  31. package/{skills → kit/skills}/kit-cleanup/SKILL.md +2 -2
  32. package/{skills → kit/skills}/kit-contribute/SKILL.md +8 -12
  33. package/{skills → kit/skills}/kit-customize/SKILL.md +5 -8
  34. package/{skills → kit/skills}/kit-dev/SKILL.md +1 -1
  35. package/{skills → kit/skills}/kit-digest/SKILL.md +3 -3
  36. package/{skills → kit/skills}/kit-effort-close/SKILL.md +4 -4
  37. package/{skills → kit/skills}/kit-effort-new/SKILL.md +6 -6
  38. package/{skills → kit/skills}/kit-effort-start/SKILL.md +3 -3
  39. package/{skills → kit/skills}/kit-gc/SKILL.md +3 -3
  40. package/{skills → kit/skills}/kit-page/SKILL.md +1 -1
  41. package/{skills → kit/skills}/kit-status/SKILL.md +1 -1
  42. package/{skills → kit/skills}/kit-task-close/SKILL.md +5 -5
  43. package/{skills → kit/skills}/kit-task-new/SKILL.md +5 -5
  44. package/{skills → kit/skills}/kit-task-pr/SKILL.md +5 -5
  45. package/{skills → kit/skills}/kit-task-pr-merge/SKILL.md +7 -7
  46. package/{skills → kit/skills}/kit-task-start/SKILL.md +1 -1
  47. package/{skills → kit/skills}/kit-task-sync/SKILL.md +3 -3
  48. package/{skills → kit/skills}/kit-ux-audit/SKILL.md +16 -35
  49. package/{skills → kit/skills}/kit-ux-audit/references/graph-model.md +7 -26
  50. package/{skills → kit/skills}/kit-ux-audit/references/report.md +2 -3
  51. package/{skills → kit/skills}/routing.yaml +1 -1
  52. package/kit/statusline/kit-statusline.sh +82 -0
  53. package/{templates → kit/templates}/agents/analyst.md +0 -11
  54. package/{templates → kit/templates}/agents/auto-dev.md +0 -13
  55. package/{templates → kit/templates}/agents/backend.md +0 -11
  56. package/{templates → kit/templates}/agents/designer.md +0 -11
  57. package/{templates → kit/templates}/agents/devops.md +0 -11
  58. package/{templates → kit/templates}/agents/editor.md +0 -11
  59. package/{templates → kit/templates}/agents/frontend.md +0 -11
  60. package/{templates → kit/templates}/agents/generalist.md +0 -11
  61. package/{templates → kit/templates}/agents/local-delegate.md +0 -13
  62. package/{templates → kit/templates}/agents/n8n.md +0 -11
  63. package/{templates → kit/templates}/agents/pm.md +0 -11
  64. package/{templates → kit/templates}/agents/qa.md +0 -11
  65. package/{templates → kit/templates}/agents/researcher.md +0 -11
  66. package/{templates → kit/templates}/agents/security.md +0 -11
  67. package/{templates → kit/templates}/agents/tech-lead.md +0 -11
  68. package/{templates → kit/templates}/agents/ux.md +3 -14
  69. package/{templates → kit/templates}/instructions.md.tmpl +1 -18
  70. package/{templates → kit/templates}/kit.config.json.tmpl +0 -6
  71. package/{templates → kit/templates}/rules/branch-naming.md +3 -2
  72. package/{templates → kit/templates}/rules/merge-safety.md +3 -2
  73. package/{templates → kit/templates}/rules/react-annotate.md +0 -8
  74. package/kit.config.schema.json +11 -11
  75. package/lib/PROMPTS.md +14 -0
  76. package/{scripts/lib → lib/core}/adapter-select-test.sh +7 -7
  77. package/{scripts → lib/core}/advisor-test.sh +3 -3
  78. package/{scripts/lib → lib/core}/agent-def-test.sh +1 -1
  79. package/{scripts/lib → lib/core}/agent-def.sh +2 -2
  80. package/{scripts/lib → lib/core}/agent-launch-test.sh +3 -3
  81. package/{scripts/lib → lib/core}/agent-profile-test.sh +2 -2
  82. package/{scripts/lib → lib/core}/agent-resolve-test.sh +2 -2
  83. package/{scripts/lib → lib/core}/agent-resolve.sh +2 -2
  84. package/{scripts → lib/core}/agent-skills-external.txt +3 -3
  85. package/{scripts → lib/core}/agent-skills-lint-test.sh +17 -17
  86. package/lib/core/agent-skills-lint.sh +115 -0
  87. package/{scripts → lib/core}/agent-template-lint-test.sh +7 -7
  88. package/lib/core/agent-template-lint.sh +58 -0
  89. package/{scripts/lib → lib/core}/board-view-test.sh +3 -3
  90. package/lib/core/board-view.sh +97 -0
  91. package/{scripts/lib → lib/core}/branch-owner-test.sh +3 -3
  92. package/lib/core/branch-owner.sh +201 -0
  93. package/lib/core/check.sh +125 -0
  94. package/{scripts/lib → lib/core}/codex-hooks-test.sh +3 -3
  95. package/{scripts → lib/core}/commitlint-test.sh +6 -6
  96. package/lib/core/commitlint.sh +54 -0
  97. package/{scripts/config-path-test.sh → lib/core/config-path-scan-test.sh} +2 -2
  98. package/{scripts/lib → lib/core}/config-path-test.sh +3 -3
  99. package/lib/core/config-path.sh +30 -0
  100. package/{scripts → lib/core}/content-skills-test.sh +16 -16
  101. package/{scripts → lib/core}/docs-marketing-words-test.sh +2 -2
  102. package/{scripts → lib/core}/docs-record-tables-test.sh +2 -2
  103. package/{scripts/lib → lib/core}/effort-metrics-test.sh +6 -6
  104. package/lib/core/effort-metrics.sh +591 -0
  105. package/{scripts/lib → lib/core}/effort-slug-test.sh +4 -4
  106. package/{scripts/lib → lib/core}/effort-slug.sh +3 -3
  107. package/lib/core/effort.sh +339 -0
  108. package/{scripts/lib → lib/core}/errors-header-test.sh +19 -9
  109. package/lib/core/errors-header.exempt +49 -0
  110. package/{scripts → lib/core}/exec-targets-test.sh +3 -3
  111. package/lib/core/feature-map.sh +76 -0
  112. package/{scripts → lib/core}/force-push-fence-test.sh +8 -8
  113. package/lib/core/force-push-fence.sh +51 -0
  114. package/{scripts → lib/core}/forge-fence-test.sh +13 -13
  115. package/{scripts → lib/core}/forge-fence.sh +14 -14
  116. package/{scripts → lib/core}/forge-report-test.sh +5 -5
  117. package/{scripts → lib/core}/forge-report.sh +18 -14
  118. package/{scripts/lib → lib/core}/git-core-test.sh +5 -5
  119. package/{scripts/lib → lib/core}/git-remote-test.sh +3 -3
  120. package/{scripts → lib/core}/guard-raw-git-ops-test.sh +4 -4
  121. package/{scripts → lib/core}/hook-adapter-test.sh +5 -5
  122. package/{scripts/lib → lib/core}/hook-refresh-test.sh +5 -5
  123. package/{scripts → lib/core}/instruction-budget-baseline.txt +1 -1
  124. package/lib/core/instruction-budget-lint.sh +238 -0
  125. package/{scripts/lib → lib/core}/integration-install-test.sh +12 -12
  126. package/lib/core/integration-install.sh +257 -0
  127. package/{scripts/lib → lib/core}/integrations-test.sh +38 -45
  128. package/lib/core/integrations.sh +244 -0
  129. package/{scripts/lib → lib/core}/kinds-test.sh +5 -5
  130. package/lib/core/kinds.sh +66 -0
  131. package/{scripts/lib → lib/core}/kit-cli-test.sh +1 -1
  132. package/{scripts/lib → lib/core}/kit-cli.sh +1 -1
  133. package/{scripts/lib → lib/core}/kit-config-resolve.sh +2 -2
  134. package/{scripts/lib → lib/core}/kit-config-test.sh +11 -11
  135. package/lib/core/kit-config.sh +164 -0
  136. package/{scripts/lib → lib/core}/kit-engine-test.sh +1 -1
  137. package/lib/core/kit-events.sh +72 -0
  138. package/lib/core/kit-local.sh +87 -0
  139. package/{scripts/lib → lib/core}/kit-manifest.sh +1 -1
  140. package/{scripts/lib → lib/core}/kit-mode-test.sh +1 -1
  141. package/{scripts/lib → lib/core}/kit-mode.sh +3 -3
  142. package/{scripts/lib → lib/core}/kit-operate.sh +1 -1
  143. package/{scripts/lib → lib/core}/kit-profile-test.sh +1 -1
  144. package/{scripts/lib → lib/core}/kit-profile.sh +2 -2
  145. package/{scripts/lib → lib/core}/kit-state-test.sh +1 -1
  146. package/lib/core/knowledge-lint.sh +106 -0
  147. package/lib/core/layout-fence-test.sh +35 -0
  148. package/lib/core/layout-fence.allow +15 -0
  149. package/lib/core/layout-fence.baseline +4 -0
  150. package/lib/core/layout-fence.sh +50 -0
  151. package/{scripts → lib/core}/leak-fence-test.sh +10 -10
  152. package/{scripts/lib → lib/core}/leak-fence.sh +1 -1
  153. package/{scripts → lib/core}/loose-issues-test.sh +8 -8
  154. package/{scripts → lib/core}/loose-issues.baseline +1 -1
  155. package/{scripts/lib → lib/core}/loose-issues.sh +2 -2
  156. package/{scripts → lib/core}/marketing-walkthrough-test.sh +7 -7
  157. package/{scripts/lib → lib/core}/naming-test.sh +2 -2
  158. package/{scripts/lib → lib/core}/naming-verbs-test.sh +8 -8
  159. package/lib/core/naming.sh +172 -0
  160. package/{scripts/lib → lib/core}/orchestration-runtime-test.sh +4 -4
  161. package/{scripts → lib/core}/portable-test.sh +10 -6
  162. package/{scripts/lib → lib/core}/pr-evidence-test.sh +5 -5
  163. package/lib/core/pr-evidence.sh +361 -0
  164. package/{scripts/lib → lib/core}/qa-lane-test.sh +7 -7
  165. package/{scripts/lib → lib/core}/qa-lane.sh +3 -3
  166. package/{scripts/lib → lib/core}/qa-lanes-test.sh +5 -5
  167. package/lib/core/react-detect.sh +79 -0
  168. package/{scripts/lib → lib/core}/render-test.sh +1 -1
  169. package/lib/core/resident-context-test.sh +42 -0
  170. package/lib/core/resident-context.baseline +1 -0
  171. package/lib/core/resident-context.sh +56 -0
  172. package/lib/core/review-lint-baseline.txt +28 -0
  173. package/lib/core/review-lint.sh +266 -0
  174. package/{scripts → lib/core}/review-rules.conf +1 -1
  175. package/{scripts/lib → lib/core}/review-stage-test.sh +2 -2
  176. package/{scripts/lib → lib/core}/role-identity-test.sh +3 -3
  177. package/lib/core/role-identity.sh +71 -0
  178. package/{scripts → lib/core}/rule-recipes-test.sh +5 -5
  179. package/lib/core/secret-guard.sh +116 -0
  180. package/{scripts → lib/core}/self-install-test.sh +15 -16
  181. package/{scripts/lib → lib/core}/session-registry-test.sh +1 -1
  182. package/lib/core/session-registry.sh +233 -0
  183. package/{scripts → lib/core}/skill-frontmatter-baseline.txt +1 -1
  184. package/lib/core/skill-frontmatter-lint.sh +189 -0
  185. package/{scripts/lib → lib/core}/spec-lint-test.sh +1 -1
  186. package/lib/core/spec-lint.sh +95 -0
  187. package/{scripts/lib → lib/core}/stage-receipt-test.sh +4 -4
  188. package/{scripts/lib → lib/core}/stage-receipt.sh +3 -3
  189. package/{scripts → lib/core}/terms-check-test.sh +6 -6
  190. package/lib/core/terms-check.sh +244 -0
  191. package/{scripts/lib → lib/core}/test-env-test.sh +2 -2
  192. package/{scripts/lib → lib/core}/test-env.sh +1 -1
  193. package/{scripts → lib/core}/test-runner-test.sh +11 -11
  194. package/{scripts → lib/core}/test.sh +12 -12
  195. package/{scripts → lib/core}/update-path-test.sh +3 -3
  196. package/{scripts → lib/core}/verbs-gen.sh +9 -9
  197. package/{scripts → lib/core}/verbs-help-test.sh +4 -4
  198. package/{scripts → lib/core}/verbs-ratchet-test.sh +18 -18
  199. package/{scripts → lib/core}/verbs-ratchet.sh +8 -8
  200. package/{scripts → lib/core}/verbs-test.sh +19 -19
  201. package/lib/core/verbs.baseline +5 -0
  202. package/{scripts/lib → lib/core}/verbs.sh +2 -2
  203. package/{scripts/lib → lib/core}/verbs.tsv +5 -5
  204. package/{scripts/lib → lib/core}/version-bump-test.sh +29 -8
  205. package/{scripts/lib → lib/core}/version-bump.sh +15 -2
  206. package/{scripts/lib → lib/core}/wave-result-test.sh +2 -2
  207. package/{scripts/lib → lib/core}/wave-result.sh +1 -1
  208. package/{scripts/lib → lib/core}/worker-brief-test.sh +3 -3
  209. package/{scripts/lib → lib/core}/worktree-bootstrap-test.sh +1 -1
  210. package/{scripts/lib → lib/core}/worktree-issue-test.sh +2 -2
  211. package/lib/core/worktree-issue.sh +172 -0
  212. package/{scripts/lib → lib/core}/worktree-ports-test.sh +1 -1
  213. package/{scripts/lib → lib/core}/worktree-start-test.sh +2 -2
  214. package/lib/core/worktree-start.sh +790 -0
  215. package/{scripts/lib → lib/core}/zsh-safety-test.sh +11 -11
  216. package/{scripts/lib → lib/forge}/forge-test.sh +4 -4
  217. package/{scripts/lib → lib/forge}/forge.sh +1 -1
  218. package/{scripts/lib → lib/forge}/gh-board-add-test.sh +3 -3
  219. package/lib/forge/gh-log.sh +59 -0
  220. package/{scripts/lib → lib/forge}/gh-project-test.sh +18 -17
  221. package/lib/forge/gh-project.sh +379 -0
  222. package/{scripts/lib → lib/forge}/gh-rest-test.sh +5 -5
  223. package/{scripts/lib → lib/forge}/gh-rest.sh +1 -1
  224. package/{scripts/lib → lib/forge}/init-github.sh +18 -8
  225. package/lib/verbs/PROMPTS.md +146 -0
  226. package/lib/verbs/annotate-setup.sh +149 -0
  227. package/{scripts → lib/verbs}/autopilot-run-test.sh +9 -9
  228. package/{scripts → lib/verbs}/autopilot-run.sh +9 -9
  229. package/{scripts → lib/verbs}/autopilot-test.sh +7 -6
  230. package/{scripts → lib/verbs}/autopilot.sh +3 -3
  231. package/{scripts/lib → lib/verbs}/captain-test.sh +1 -1
  232. package/{scripts/lib → lib/verbs}/captain.sh +7 -7
  233. package/lib/verbs/capture-project-ids.sh +99 -0
  234. package/{scripts/lib → lib/verbs}/content-kinds-gc-test.sh +7 -7
  235. package/{scripts/lib → lib/verbs}/contribute-root-test.sh +4 -4
  236. package/{scripts/lib → lib/verbs}/contribute-root.sh +1 -1
  237. package/{scripts → lib/verbs}/contribute.sh +8 -8
  238. package/{scripts → lib/verbs}/copilot-loop-test.sh +4 -4
  239. package/{scripts/lib → lib/verbs}/copilot-test.sh +11 -10
  240. package/{scripts/lib → lib/verbs}/copilot.sh +7 -7
  241. package/{scripts → lib/verbs}/database-supabase-test.sh +6 -6
  242. package/{scripts/lib → lib/verbs}/effort-close-subs-test.sh +6 -6
  243. package/{scripts/lib → lib/verbs}/effort-dispatch-test.sh +3 -3
  244. package/{scripts/lib → lib/verbs}/effort-flows-test.sh +5 -5
  245. package/{scripts/lib → lib/verbs}/effort-ops-test.sh +13 -13
  246. package/lib/verbs/effort-ops.sh +1571 -0
  247. package/{scripts/lib → lib/verbs}/effort-parity-test.sh +10 -10
  248. package/{scripts/lib → lib/verbs}/effort-plan-test.sh +7 -7
  249. package/lib/verbs/effort-plan.sh +289 -0
  250. package/{scripts/lib → lib/verbs}/effort-review-test.sh +5 -5
  251. package/{scripts/lib → lib/verbs}/effort-review.sh +2 -2
  252. package/{scripts/lib → lib/verbs}/grill-record-test.sh +1 -1
  253. package/lib/verbs/grill-record.sh +88 -0
  254. package/{scripts/lib → lib/verbs}/handoff.sh +2 -2
  255. package/{scripts → lib/verbs}/init-content-test.sh +14 -14
  256. package/{scripts/lib → lib/verbs}/init-guide.sh +6 -6
  257. package/{scripts → lib/verbs}/init-guided-test.sh +9 -9
  258. package/{scripts → lib/verbs}/init-recipes-test.sh +7 -7
  259. package/{scripts → lib/verbs}/init-upgrade-test.sh +9 -10
  260. package/lib/verbs/init.sh +1598 -0
  261. package/{scripts → lib/verbs}/install-test.sh +5 -5
  262. package/lib/verbs/install.sh +31 -0
  263. package/{scripts → lib/verbs}/integrations-check-test.sh +9 -9
  264. package/lib/verbs/integrations-check.sh +157 -0
  265. package/{scripts → lib/verbs}/kit-add-test.sh +8 -8
  266. package/lib/verbs/kit-add.sh +415 -0
  267. package/{scripts → lib/verbs}/kit-adopt-test.sh +4 -4
  268. package/{scripts → lib/verbs}/kit-adopt.sh +6 -6
  269. package/{scripts/lib → lib/verbs}/kit-brief-test.sh +15 -15
  270. package/{scripts/lib → lib/verbs}/kit-brief.sh +12 -12
  271. package/lib/verbs/kit-bump-version.sh +79 -0
  272. package/lib/verbs/kit-digest.sh +126 -0
  273. package/{scripts → lib/verbs}/kit-doctor-test.sh +52 -32
  274. package/lib/verbs/kit-doctor.sh +991 -0
  275. package/{scripts → lib/verbs}/kit-export-project-test.sh +4 -4
  276. package/lib/verbs/kit-export-project.sh +245 -0
  277. package/{scripts → lib/verbs}/kit-export-training-test.sh +3 -3
  278. package/lib/verbs/kit-export-training.sh +175 -0
  279. package/{scripts/lib → lib/verbs}/kit-gc-test.sh +5 -5
  280. package/lib/verbs/kit-gc.sh +804 -0
  281. package/{scripts/lib → lib/verbs}/kit-hotfix.sh +3 -3
  282. package/{scripts/lib → lib/verbs}/kit-interview-test.sh +2 -2
  283. package/lib/verbs/kit-interview.sh +319 -0
  284. package/{scripts/lib → lib/verbs}/kit-lib-test.sh +1 -1
  285. package/{scripts/lib → lib/verbs}/kit-lib.sh +3 -3
  286. package/{scripts → lib/verbs}/kit-migrate-test.sh +4 -4
  287. package/{scripts → lib/verbs}/kit-migrate.sh +5 -5
  288. package/{scripts/lib → lib/verbs}/kit-msg-test.sh +2 -2
  289. package/{scripts/lib → lib/verbs}/kit-msg.sh +2 -2
  290. package/{scripts → lib/verbs}/kit-onboard-test.sh +2 -3
  291. package/lib/verbs/kit-onboard.sh +69 -0
  292. package/{scripts → lib/verbs}/kit-promote-test.sh +4 -4
  293. package/{scripts → lib/verbs}/kit-promote.sh +4 -4
  294. package/{scripts → lib/verbs}/kit-remove-test.sh +4 -4
  295. package/{scripts → lib/verbs}/kit-remove.sh +5 -5
  296. package/lib/verbs/kit-routines.sh +322 -0
  297. package/lib/verbs/kit-self-update.sh +55 -0
  298. package/{scripts/lib → lib/verbs}/kit-status-test.sh +2 -2
  299. package/lib/verbs/kit-status.sh +650 -0
  300. package/{scripts/lib → lib/verbs}/kit-task-ops-test.sh +8 -2
  301. package/lib/verbs/kit-task-ops.sh +793 -0
  302. package/{scripts → lib/verbs}/kit-version-check-test.sh +3 -3
  303. package/lib/verbs/kit-version-check.sh +121 -0
  304. package/{scripts → lib/verbs}/kit-wire-test.sh +6 -6
  305. package/{scripts → lib/verbs}/kit-wire.sh +8 -8
  306. package/{scripts/lib → lib/verbs}/kto-hotfix-test.sh +3 -3
  307. package/{scripts/lib → lib/verbs}/kto-task-close-test.sh +2 -2
  308. package/{scripts/lib → lib/verbs}/kto-task-new-test.sh +2 -2
  309. package/{scripts/lib → lib/verbs}/kto-task-pr-merge-test.sh +2 -2
  310. package/{scripts/lib → lib/verbs}/kto-task-pr-test.sh +3 -3
  311. package/{scripts/lib → lib/verbs}/light-task-run-test.sh +4 -4
  312. package/{scripts/lib → lib/verbs}/light-task-test.sh +9 -9
  313. package/{scripts/lib → lib/verbs}/light-task.sh +11 -11
  314. package/{scripts/lib → lib/verbs}/next-test.sh +2 -2
  315. package/{scripts/lib → lib/verbs}/next.sh +4 -4
  316. package/{scripts → lib/verbs}/night-grant-test.sh +4 -4
  317. package/lib/verbs/night-grant.sh +454 -0
  318. package/{scripts → lib/verbs}/night-run-test.sh +3 -3
  319. package/{scripts → lib/verbs}/night-run.mjs +2 -2
  320. package/{scripts → lib/verbs}/orchestrate-test.sh +5 -5
  321. package/{scripts → lib/verbs}/orchestrate.sh +15 -15
  322. package/{scripts/lib → lib/verbs}/plan-machine-test.sh +1 -1
  323. package/{scripts/lib → lib/verbs}/plan-machine.sh +4 -4
  324. package/{scripts/lib → lib/verbs}/plan-next-test.sh +1 -1
  325. package/lib/verbs/plan-next.sh +213 -0
  326. package/{scripts → lib/verbs}/publish.sh +10 -10
  327. package/{scripts/lib → lib/verbs}/review-page-test.sh +4 -4
  328. package/lib/verbs/review-page.sh +375 -0
  329. package/lib/verbs/setup-labels.sh +96 -0
  330. package/lib/verbs/setup-milestones.sh +34 -0
  331. package/{scripts → lib/verbs}/showcase.sh +2 -2
  332. package/{scripts/lib → lib/verbs}/sprint-test.sh +5 -5
  333. package/{scripts/lib → lib/verbs}/sprint.sh +2 -2
  334. package/{scripts → lib/verbs}/status-test.sh +7 -7
  335. package/{scripts → lib/verbs}/status.sh +12 -12
  336. package/{scripts → lib/verbs}/task-sync-test.sh +6 -6
  337. package/lib/verbs/task-sync.sh +462 -0
  338. package/{scripts/lib → lib/verbs}/upgrade-report-test.sh +4 -4
  339. package/lib/verbs/ux-a11y-scan.sh +96 -0
  340. package/lib/verbs/ux-ds-audit.sh +146 -0
  341. package/lib/verbs/ux-graph-scan.sh +188 -0
  342. package/{scripts → lib/verbs}/wave-worker.sh +2 -2
  343. package/lib/verbs/web-install.sh +22 -0
  344. package/package.json +3 -10
  345. package/scripts/PROMPTS.md +13 -0
  346. package/scripts/agent-skills-lint.sh +12 -113
  347. package/scripts/agent-template-lint.sh +12 -56
  348. package/scripts/annotate-setup.sh +11 -151
  349. package/scripts/benchmark/checkpoint-test.sh +1 -1
  350. package/scripts/benchmark/checkpoint.sh +1 -1
  351. package/scripts/benchmark/gate.sh +2 -2
  352. package/scripts/benchmark/lib/bench-common.sh +1 -1
  353. package/scripts/capture-project-ids.sh +12 -86
  354. package/scripts/check.sh +12 -112
  355. package/scripts/force-push-fence.sh +12 -49
  356. package/scripts/init.sh +13 -1637
  357. package/scripts/install.sh +12 -29
  358. package/scripts/instruction-budget-lint.sh +13 -218
  359. package/scripts/integrations-check.sh +12 -155
  360. package/scripts/kit-add.sh +12 -413
  361. package/scripts/kit-bump-version.sh +13 -78
  362. package/scripts/kit-digest.sh +13 -125
  363. package/scripts/kit-doctor.sh +13 -1065
  364. package/scripts/kit-export-project.sh +12 -243
  365. package/scripts/kit-export-training.sh +12 -173
  366. package/scripts/kit-onboard.sh +12 -67
  367. package/scripts/kit-routines.sh +12 -320
  368. package/scripts/kit-self-update.sh +12 -53
  369. package/scripts/kit-version-check.sh +12 -106
  370. package/scripts/knowledge-lint.sh +13 -98
  371. package/scripts/lib/board-view.sh +13 -96
  372. package/scripts/lib/branch-owner.sh +12 -199
  373. package/scripts/lib/commitlint.sh +12 -52
  374. package/scripts/lib/config-path.sh +13 -29
  375. package/scripts/lib/effort-metrics.sh +12 -589
  376. package/scripts/lib/effort-ops.sh +13 -1570
  377. package/scripts/lib/effort-plan.sh +12 -287
  378. package/scripts/lib/effort.sh +13 -338
  379. package/scripts/lib/gh-log.sh +14 -59
  380. package/scripts/lib/gh-project.sh +13 -376
  381. package/scripts/lib/grill-record.sh +13 -87
  382. package/scripts/lib/integration-install.sh +12 -255
  383. package/scripts/lib/integrations.sh +12 -242
  384. package/scripts/lib/kinds.sh +13 -65
  385. package/scripts/lib/kit-config.sh +12 -165
  386. package/scripts/lib/kit-events.sh +13 -71
  387. package/scripts/lib/kit-gc.sh +12 -802
  388. package/scripts/lib/kit-interview.sh +11 -316
  389. package/scripts/lib/kit-local.sh +12 -85
  390. package/scripts/lib/kit-status.sh +12 -648
  391. package/scripts/lib/kit-task-ops.sh +13 -789
  392. package/scripts/lib/naming.sh +12 -170
  393. package/scripts/lib/plan-next.sh +13 -212
  394. package/scripts/lib/pr-evidence.sh +12 -359
  395. package/scripts/lib/react-detect.sh +12 -77
  396. package/scripts/lib/review-page.sh +11 -372
  397. package/scripts/lib/role-identity.sh +13 -70
  398. package/scripts/lib/secret-guard.sh +12 -114
  399. package/scripts/lib/session-registry.sh +13 -232
  400. package/scripts/lib/spec-lint.sh +13 -94
  401. package/scripts/lib/worktree-issue.sh +12 -170
  402. package/scripts/lib/worktree-start.sh +13 -789
  403. package/scripts/night-grant.sh +12 -452
  404. package/scripts/review-lint.sh +13 -258
  405. package/scripts/setup-labels.sh +11 -82
  406. package/scripts/setup-milestones.sh +12 -21
  407. package/scripts/skill-frontmatter-lint.sh +13 -181
  408. package/scripts/task-sync.sh +13 -450
  409. package/scripts/terms-check.sh +13 -241
  410. package/scripts/ux-a11y-scan.sh +13 -95
  411. package/scripts/ux-ds-audit.sh +12 -144
  412. package/scripts/ux-graph-scan.sh +12 -186
  413. package/scripts/web-install.sh +16 -20
  414. package/docs/kit-annotate/01-explainer.html +0 -225
  415. package/docs/kit-annotate/02-implementation-plan.html +0 -196
  416. package/docs/media/.onboarding-capture.cast +0 -5
  417. package/docs/media/README.md +0 -43
  418. package/docs/media/build-demo.sh +0 -63
  419. package/docs/media/build-kit-init.sh +0 -51
  420. package/docs/media/build-onboarding.sh +0 -51
  421. package/docs/media/kit-dry-run.cast +0 -107
  422. package/docs/media/kit-dry-run.gif +0 -0
  423. package/docs/media/kit-init.cast +0 -56
  424. package/docs/media/kit-init.gif +0 -0
  425. package/docs/media/kit-onboarding.cast +0 -148
  426. package/docs/media/kit-onboarding.gif +0 -0
  427. package/integrations/mempalace.json +0 -28
  428. package/scripts/review-lint-baseline.txt +0 -28
  429. package/scripts/verbs.baseline +0 -5
  430. package/templates/hooks/mempal_followup.sh.tmpl +0 -97
  431. package/templates/hooks/mempal_precompact.sh.tmpl +0 -4
  432. package/templates/hooks/mempal_save.sh.tmpl +0 -4
  433. package/templates/hooks/mempal_session_start.sh.tmpl +0 -42
  434. package/templates/rules/mempalace.md +0 -111
  435. /package/{commands → kit/commands}/kit-docs.md +0 -0
  436. /package/{commands → kit/commands}/kit-export-training.md +0 -0
  437. /package/{databases → kit/databases}/supabase/guide.html +0 -0
  438. /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/client.ts +0 -0
  439. /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/server.ts +0 -0
  440. /package/{githooks → kit/githooks}/pre-commit +0 -0
  441. /package/{integrations → kit/integrations}/emil-design-eng.json +0 -0
  442. /package/{integrations → kit/integrations}/graft.json +0 -0
  443. /package/{integrations → kit/integrations}/impeccable.json +0 -0
  444. /package/{integrations → kit/integrations}/lavish.json +0 -0
  445. /package/{integrations → kit/integrations}/mlx-lm.json +0 -0
  446. /package/{integrations → kit/integrations}/web-design-guidelines.json +0 -0
  447. /package/{recipes → kit/recipes}/nextjs-shadcn.json +0 -0
  448. /package/{skills → kit/skills}/kit-advisor/SKILL.md +0 -0
  449. /package/{skills → kit/skills}/kit-advisor/references/close.md +0 -0
  450. /package/{skills → kit/skills}/kit-advisor/references/grill.md +0 -0
  451. /package/{skills → kit/skills}/kit-advisor/references/orchestrate.md +0 -0
  452. /package/{skills → kit/skills}/kit-advisor/references/plan.md +0 -0
  453. /package/{skills → kit/skills}/kit-advisor/references/review.md +0 -0
  454. /package/{skills → kit/skills}/kit-advisor/references/step-report.md +0 -0
  455. /package/{skills → kit/skills}/kit-docs-writer/SKILL.md +0 -0
  456. /package/{skills → kit/skills}/kit-effort-pr/SKILL.md +0 -0
  457. /package/{skills → kit/skills}/kit-next/SKILL.md +0 -0
  458. /package/{skills → kit/skills}/kit-onboard/SKILL.md +0 -0
  459. /package/{skills → kit/skills}/kit-plan-next/SKILL.md +0 -0
  460. /package/{skills → kit/skills}/kit-security-sweep/SKILL.md +0 -0
  461. /package/{skills → kit/skills}/kit-ship/SKILL.md +0 -0
  462. /package/{skills → kit/skills}/kit-task-pr-auto/SKILL.md +0 -0
  463. /package/{skills → kit/skills}/kit-ux-audit/references/a11y.md +0 -0
  464. /package/{skills → kit/skills}/kit-ux-audit/references/consistency.md +0 -0
  465. /package/{skills → kit/skills}/kit-ux-audit/references/heuristics.md +0 -0
  466. /package/{templates → kit/templates}/benchmarks/SCHEMA.md +0 -0
  467. /package/{templates → kit/templates}/benchmarks/abstain.jsonl +0 -0
  468. /package/{templates → kit/templates}/benchmarks/adversarial.jsonl +0 -0
  469. /package/{templates → kit/templates}/benchmarks/benchmark.config.json +0 -0
  470. /package/{templates → kit/templates}/benchmarks/quality.jsonl +0 -0
  471. /package/{templates → kit/templates}/benchmarks/retrieval.jsonl +0 -0
  472. /package/{templates → kit/templates}/codex/hooks.json.tmpl +0 -0
  473. /package/{templates → kit/templates}/hooks/guard-base-branch-commit.sh.tmpl +0 -0
  474. /package/{templates → kit/templates}/hooks/guard-raw-git-ops.sh.tmpl +0 -0
  475. /package/{templates → kit/templates}/hooks/kit-local-status.sh.tmpl +0 -0
  476. /package/{templates → kit/templates}/hooks/kit-mail-check.sh.tmpl +0 -0
  477. /package/{templates → kit/templates}/hooks/kit_version_check.sh.tmpl +0 -0
  478. /package/{templates → kit/templates}/hooks/prepush_gate.sh.tmpl +0 -0
  479. /package/{templates → kit/templates}/hooks/repo-hygiene.sh.tmpl +0 -0
  480. /package/{templates → kit/templates}/knowledge-INDEX.md.tmpl +0 -0
  481. /package/{templates → kit/templates}/lib/kit-sigil.sh.tmpl +0 -0
  482. /package/{templates → kit/templates}/rules/authoring.md +0 -0
  483. /package/{templates → kit/templates}/rules/code-retrieval.md +0 -0
  484. /package/{templates → kit/templates}/rules/communication-style.md +0 -0
  485. /package/{templates → kit/templates}/rules/delegation-brief.md +0 -0
  486. /package/{templates → kit/templates}/rules/design-routing.md +0 -0
  487. /package/{templates → kit/templates}/rules/effort-model.md +0 -0
  488. /package/{templates → kit/templates}/rules/gate-and-review.md +0 -0
  489. /package/{templates → kit/templates}/rules/issue-lifecycle.md +0 -0
  490. /package/{templates → kit/templates}/rules/knowledge-base.md +0 -0
  491. /package/{templates → kit/templates}/rules/naming-and-ids.md +0 -0
  492. /package/{templates → kit/templates}/rules/plain-language.md +0 -0
  493. /package/{templates → kit/templates}/rules/plan-next.md +0 -0
  494. /package/{templates → kit/templates}/rules/plan-output-format.md +0 -0
  495. /package/{templates → kit/templates}/rules/review-pages.md +0 -0
  496. /package/{templates → kit/templates}/rules/risk-tiered-review.md +0 -0
  497. /package/{templates → kit/templates}/rules/shared-checkout.md +0 -0
  498. /package/{templates → kit/templates}/rules/skill-gaps.md +0 -0
  499. /package/{templates → kit/templates}/rules/task-management.md +0 -0
  500. /package/{templates → kit/templates}/settings/settings.json.tmpl +0 -0
  501. /package/{templates → kit/templates}/settings/settings.local.json.tmpl +0 -0
  502. /package/{templates → kit/templates}/skills/NAMESPACED +0 -0
  503. /package/{templates → kit/templates}/skills/brand-voice/SKILL.md +0 -0
  504. /package/{templates → kit/templates}/skills/brand-voice/references/voice-template.md +0 -0
  505. /package/{templates → kit/templates}/skills/campaign/SKILL.md +0 -0
  506. /package/{templates → kit/templates}/skills/campaign/references/plan-template.md +0 -0
  507. /package/{templates → kit/templates}/skills/concrete/SKILL.md +0 -0
  508. /package/{templates → kit/templates}/skills/copywriting/SKILL.md +0 -0
  509. /package/{templates → kit/templates}/skills/copywriting/references/copy-frameworks.md +0 -0
  510. /package/{templates → kit/templates}/skills/copywriting/references/natural-transitions.md +0 -0
  511. /package/{templates → kit/templates}/skills/feature-build-refine/SKILL.md +0 -0
  512. /package/{templates → kit/templates}/skills/karpathy-guidelines/SKILL.md +0 -0
  513. /package/{templates → kit/templates}/skills/morning-briefing/SKILL.md +0 -0
  514. /package/{templates → kit/templates}/skills/page-design/SKILL.md +0 -0
  515. /package/{templates → kit/templates}/skills/page-design/add.json +0 -0
  516. /package/{templates → kit/templates}/skills/page-design/references/design-file-template.md +0 -0
  517. /package/{templates → kit/templates}/skills/page-design/references/generic-page-patterns.md +0 -0
  518. /package/{templates → kit/templates}/skills/page-design/references/minimum-rules.md +0 -0
  519. /package/{templates → kit/templates}/skills/speckit/SKILL.md +0 -0
  520. /package/{templates → kit/templates}/skills/supabase-patterns/SKILL.md +0 -0
  521. /package/{scripts/lib → lib/core}/adapter-select.sh +0 -0
  522. /package/{scripts/lib → lib/core}/agent-launch.sh +0 -0
  523. /package/{scripts/lib → lib/core}/agent-profile.sh +0 -0
  524. /package/{scripts/lib → lib/core}/cckit-output.sh +0 -0
  525. /package/{scripts/lib → lib/core}/codex-hooks.sh +0 -0
  526. /package/{scripts → lib/core}/force-push-fence.baseline +0 -0
  527. /package/{scripts → lib/core}/forge-fence.baseline +0 -0
  528. /package/{scripts/lib → lib/core}/git-remote.sh +0 -0
  529. /package/{scripts/lib → lib/core}/hook-refresh.sh +0 -0
  530. /package/{scripts → lib/core}/instruction-budget-lint-test.sh +0 -0
  531. /package/{scripts/lib → lib/core}/kit-state.sh +0 -0
  532. /package/{scripts/lib → lib/core}/orchestration-runtime.sh +0 -0
  533. /package/{scripts/lib → lib/core}/project-scan.sh +0 -0
  534. /package/{scripts/lib → lib/core}/render.sh +0 -0
  535. /package/{scripts → lib/core}/review-lint-test.sh +0 -0
  536. /package/{scripts/lib → lib/core}/review-stage.sh +0 -0
  537. /package/{scripts → lib/core}/skill-frontmatter-lint-test.sh +0 -0
  538. /package/{scripts/lib → lib/core}/task-source-file.sh +0 -0
  539. /package/{scripts/lib → lib/core}/task-source.sh +0 -0
  540. /package/{scripts/lib → lib/core}/toon.sh +0 -0
  541. /package/{scripts/lib → lib/core}/ui.sh +0 -0
  542. /package/{scripts/lib → lib/core}/worker-brief.sh +0 -0
  543. /package/{scripts/lib → lib/forge}/forge-github.sh +0 -0
  544. /package/{scripts/lib → lib/forge}/forge-none.sh +0 -0
  545. /package/{scripts/lib → lib/forge}/test-forge-shim.sh +0 -0
  546. /package/{scripts → lib/verbs}/debug.sh +0 -0
  547. /package/{scripts → lib/verbs}/night-run.test.mjs +0 -0
  548. /package/{scripts/lib → lib/verbs}/upgrade-report.sh +0 -0
@@ -13,7 +13,7 @@
13
13
  # CLAUDE_CODE_REMOTE) in this shell
14
14
  # test_env_unset_args print `-u NAME` pairs for env(1), one per line (the runner uses these)
15
15
  #
16
- # scripts/test.sh scrubs the same set before it runs each test; this covers a test run directly.
16
+ # lib/core/test.sh scrubs the same set before it runs each test; this covers a test run directly.
17
17
  # errors: pure — no side effects beyond unsetting variables in the current shell
18
18
  # bash 3.2 + zsh compatible.
19
19
 
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env bash
2
- # test-runner-test.sh — scripts/test.sh runs files in parallel and still reports correctly (#455).
2
+ # test-runner-test.sh — lib/core/test.sh runs files in parallel and still reports correctly (#455).
3
3
  #
4
- # Copies the runner and scripts/lib/test-env.sh into a throwaway tree with fixture `*-test.sh`
4
+ # Copies the runner and lib/core/test-env.sh into a throwaway tree with fixture `*-test.sh`
5
5
  # files, then asserts on the copy's exit code and output:
6
6
  # - a failing file fails the run, and its output is printed whole, in one block
7
7
  # - two files really run at the same time under -j 2 (each waits for the other's marker file)
8
8
  # - a file marked `# test-runner: serial` is held back and run after the parallel phase
9
9
  # - --serial, a path pattern, and a bad job count behave as the header of test.sh says
10
10
  # - every test is sealed from KIT_* variables and runs with commit signing off
11
- # Run: bash scripts/test-runner-test.sh
11
+ # Run: bash lib/core/test-runner-test.sh
12
12
  # errors: strict — a test runner: rc 1 on any failed assertion
13
13
  set -u
14
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
14
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
15
15
  fail=0
16
16
  t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
17
17
  has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> '[$2]' lacks '[$3]'"; fail=1 ;; esac; }
@@ -21,19 +21,19 @@ tmp="$(cd "$(mktemp -d)" && pwd -P)"; trap 'rm -rf "$tmp"' EXIT
21
21
  # The caller's own runner settings must not steer the copy under test.
22
22
  unset TEST_JOBS TEST_TIMINGS TEST_RUN_DIR
23
23
  # shellcheck source=/dev/null
24
- . "$ROOT/scripts/lib/test-env.sh" && test_env_seal
24
+ . "$ROOT/lib/core/test-env.sh" && test_env_seal
25
25
 
26
26
  # fixture <name> — a fresh tree holding the runner; echoes its path.
27
27
  fixture() {
28
28
  local d="$tmp/$1"
29
- mkdir -p "$d/scripts/lib" "$d/bin" "$d/shared"
30
- cp "$ROOT/scripts/test.sh" "$d/scripts/test.sh"
31
- cp "$ROOT/scripts/lib/test-env.sh" "$d/scripts/lib/test-env.sh"
29
+ mkdir -p "$d/scripts/lib" "$d/lib/core" "$d/bin" "$d/shared"
30
+ cp "$ROOT/lib/core/test.sh" "$d/lib/core/test.sh"
31
+ cp "$ROOT/lib/core/test-env.sh" "$d/lib/core/test-env.sh"
32
32
  printf '%s' "$d"
33
33
  }
34
34
  run() { # run <fixture dir> [runner args…] -> OUT (stdout+stderr), RC
35
35
  local d="$1"; shift
36
- OUT="$(bash "$d/scripts/test.sh" "$@" 2>&1)"; RC=$?
36
+ OUT="$(bash "$d/lib/core/test.sh" "$@" 2>&1)"; RC=$?
37
37
  }
38
38
 
39
39
  # ── 1. pass, fail, and a failing file's output in one block ────────────────────────────────────
@@ -145,13 +145,13 @@ fi
145
145
  exit "$rc"
146
146
  EOF
147
147
  OUT="$(KIT_CONFIG=/elsewhere KEEP_ME=1 GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=test.kept GIT_CONFIG_VALUE_0=yes \
148
- bash "$F/scripts/test.sh" 2>&1)"; RC=$?
148
+ bash "$F/lib/core/test.sh" 2>&1)"; RC=$?
149
149
  t "a test is sealed, unsigned, and keeps the rest of its environment" "$RC" "0"
150
150
  [ "$RC" -eq 0 ] || printf '%s\n' "$OUT"
151
151
  has "the runner reports what it sealed" "$OUT" "sealed 1 inherited"
152
152
 
153
153
  # ── 5. the result directory is removed ─────────────────────────────────────────────────────────
154
- left="$(TMPDIR="$tmp/td" bash -c 'mkdir -p "$TMPDIR" && bash "$0/scripts/test.sh" >/dev/null 2>&1; ls "$TMPDIR" | wc -l' "$F" | tr -d ' ')"
154
+ left="$(TMPDIR="$tmp/td" bash -c 'mkdir -p "$TMPDIR" && bash "$0/lib/core/test.sh" >/dev/null 2>&1; ls "$TMPDIR" | wc -l' "$F" | tr -d ' ')"
155
155
  t "the runner leaves nothing in TMPDIR" "$left" "0"
156
156
 
157
157
  [ "$fail" -eq 0 ] && echo "test-runner: all passed" || echo "test-runner: FAILURES"
@@ -4,11 +4,11 @@
4
4
  # lines). Exits non-zero if any test fails. bash 3.2 compatible (no mapfile/associative arrays,
5
5
  # no `wait -n`).
6
6
  #
7
- # scripts/test.sh run every discovered test, several files at a time
8
- # scripts/test.sh <pattern> run only tests whose path matches <pattern> (grep -E)
9
- # scripts/test.sh -j <N> run at most N files at once (also: --jobs N, TEST_JOBS=N)
10
- # scripts/test.sh --serial one file at a time, in sorted order (same as -j 1)
11
- # scripts/test.sh --timings print wall seconds per file, slowest first (also: TEST_TIMINGS=1)
7
+ # lib/core/test.sh run every discovered test, several files at a time
8
+ # lib/core/test.sh <pattern> run only tests whose path matches <pattern> (grep -E)
9
+ # lib/core/test.sh -j <N> run at most N files at once (also: --jobs N, TEST_JOBS=N)
10
+ # lib/core/test.sh --serial one file at a time, in sorted order (same as -j 1)
11
+ # lib/core/test.sh --timings print wall seconds per file, slowest first (also: TEST_TIMINGS=1)
12
12
  #
13
13
  # Parallelism (#455). Test files are independent: each builds its fixtures under its own `mktemp -d`
14
14
  # and none binds a fixed port, so files run N at a time. N defaults to the CPU count, capped at 8.
@@ -20,9 +20,9 @@
20
20
  # output is captured to its own file, so the output of a failing test is printed whole, after the
21
21
  # run, in sorted order — never interleaved with another file's.
22
22
  #
23
- # Folded into scripts/check.sh and run in CI (.github/workflows/test.yml).
23
+ # Folded into lib/core/check.sh and run in CI (.github/workflows/test.yml).
24
24
  set -uo pipefail
25
- cd "$(cd "$(dirname "$0")/.." && pwd)"
25
+ cd "$(cd "$(dirname "$0")/../.." && pwd)"
26
26
 
27
27
  note() { printf '%s\n' "$*" >&2; }
28
28
 
@@ -36,7 +36,7 @@ if [ "${1:-}" = "--run-one" ]; then
36
36
  # set KIT_CONFIG, exports KIT_*/CCKIT_*/EFFORT_* that would point a test at the developer's
37
37
  # project instead of its own fixture. Each test still sets whatever it needs itself.
38
38
  # shellcheck source=/dev/null
39
- . scripts/lib/test-env.sh
39
+ . lib/core/test-env.sh
40
40
  seal=(-u TEST_RUN_DIR)
41
41
  while IFS= read -r a; do [ -n "$a" ] && seal+=("$a"); done < <(test_env_unset_args)
42
42
  # Fixture commits are never signed (#455). A developer whose global git config sets
@@ -96,7 +96,7 @@ while IFS= read -r f; do
96
96
  else
97
97
  par+=("$f")
98
98
  fi
99
- done < <(find bin scripts -type f -name '*-test.sh' 2>/dev/null | sort)
99
+ done < <(find bin scripts lib -type f -name '*-test.sh' 2>/dev/null | sort)
100
100
 
101
101
  if [ "${#tests[@]}" -eq 0 ]; then
102
102
  note "test: no *-test.sh found${PATTERN:+ matching '$PATTERN'}"
@@ -104,7 +104,7 @@ if [ "${#tests[@]}" -eq 0 ]; then
104
104
  fi
105
105
 
106
106
  # shellcheck source=/dev/null
107
- . scripts/lib/test-env.sh
107
+ . lib/core/test-env.sh
108
108
  sealed="$(test_env_unset_args | grep -c -- '^-u$')"
109
109
 
110
110
  RUN_DIR="$(mktemp -d "${TMPDIR:-/tmp}/cckit-test.XXXXXX")" || { note "test: mktemp failed"; exit 1; }
@@ -122,11 +122,11 @@ began=$SECONDS
122
122
  i=0; list=""
123
123
  for t in ${par[@]+"${par[@]}"}; do list="$list$i $t"$'\n'; i=$((i+1)); done
124
124
  if [ -n "$list" ]; then
125
- printf '%s' "$list" | xargs -P "$JOBS" -n 2 bash scripts/test.sh --run-one
125
+ printf '%s' "$list" | xargs -P "$JOBS" -n 2 bash lib/core/test.sh --run-one
126
126
  fi
127
127
  if [ "${#ser[@]}" -gt 0 ]; then
128
128
  note "==> ${#ser[@]} file(s) marked serial, run alone"
129
- for t in "${ser[@]}"; do bash scripts/test.sh --run-one "$i" "$t"; i=$((i+1)); done
129
+ for t in "${ser[@]}"; do bash lib/core/test.sh --run-one "$i" "$t"; i=$((i+1)); done
130
130
  fi
131
131
  took=$((SECONDS - began))
132
132
 
@@ -23,12 +23,12 @@
23
23
  # command on the docs page is one this file runs.
24
24
  #
25
25
  # Network-free: the upgrade path skips the doctor preflight; every value gh would be asked for is in
26
- # the fixture config. Everything lives under one mktemp dir. Run: bash scripts/update-path-test.sh
26
+ # the fixture config. Everything lives under one mktemp dir. Run: bash lib/core/update-path-test.sh
27
27
  # errors: strict — a test runner: rc 1 on any failed assertion
28
28
  set -u
29
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
29
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
30
30
  # shellcheck source=/dev/null
31
- . "$ROOT/scripts/lib/test-env.sh" && test_env_seal
31
+ . "$ROOT/lib/core/test-env.sh" && test_env_seal
32
32
  CCKIT="$ROOT/bin/cckit"
33
33
  PAGE="$ROOT/docs-site/src/content/docs/getting-started/update.mdx"
34
34
  fail=0
@@ -2,14 +2,14 @@
2
2
  # verbs-gen.sh — write or check the CLI reference page's generated block (#555). The block sits
3
3
  # between the `verbs:begin` and `verbs:end` comment markers of
4
4
  # docs-site/src/content/docs/cli-reference.mdx and is produced by verbs_reference_md from
5
- # scripts/lib/verbs.tsv, the one source for every verb.
5
+ # lib/core/verbs.tsv, the one source for every verb.
6
6
  #
7
- # scripts/verbs-gen.sh rewrite the block from the table
8
- # scripts/verbs-gen.sh --check rc 0 when the block matches the table, 1 (and a diff) when not
9
- # scripts/verbs-gen.sh --root <dir> act on another checkout
7
+ # lib/core/verbs-gen.sh rewrite the block from the table
8
+ # lib/core/verbs-gen.sh --check rc 0 when the block matches the table, 1 (and a diff) when not
9
+ # lib/core/verbs-gen.sh --root <dir> act on another checkout
10
10
  # errors: strict — set -e; a page without both markers exits 1
11
11
  set -euo pipefail
12
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
12
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
13
13
  mode="write"
14
14
  while [ $# -gt 0 ]; do
15
15
  case "$1" in
@@ -20,9 +20,9 @@ while [ $# -gt 0 ]; do
20
20
  esac
21
21
  done
22
22
  page="$ROOT/docs-site/src/content/docs/cli-reference.mdx"
23
- VERBS_FILE="$ROOT/scripts/lib/verbs.tsv"; export VERBS_FILE
23
+ VERBS_FILE="$ROOT/lib/core/verbs.tsv"; export VERBS_FILE
24
24
  # shellcheck source=/dev/null
25
- source "$ROOT/scripts/lib/verbs.sh"
25
+ source "$ROOT/lib/core/verbs.sh"
26
26
  grep -q '{/\* verbs:begin' "$page" && grep -q '{/\* verbs:end' "$page" \
27
27
  || { echo "verbs-gen: $page lacks the verbs:begin / verbs:end markers" >&2; exit 1; }
28
28
 
@@ -34,8 +34,8 @@ awk -v blk="$tmp/block" '
34
34
  !skip { print }' "$page" > "$tmp/page"
35
35
 
36
36
  if [ "$mode" = check ]; then
37
- if cmp -s "$page" "$tmp/page"; then echo "ok verbs-gen: the CLI reference block matches scripts/lib/verbs.tsv"; exit 0; fi
38
- echo "verbs-gen: the CLI reference block drifted from scripts/lib/verbs.tsv (run: bash scripts/verbs-gen.sh)" >&2
37
+ if cmp -s "$page" "$tmp/page"; then echo "ok verbs-gen: the CLI reference block matches lib/core/verbs.tsv"; exit 0; fi
38
+ echo "verbs-gen: the CLI reference block drifted from lib/core/verbs.tsv (run: bash lib/core/verbs-gen.sh)" >&2
39
39
  diff "$page" "$tmp/page" >&2 || true
40
40
  exit 1
41
41
  fi
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env bash
2
2
  # shellcheck shell=bash
3
3
  # verbs-help-test.sh — #556: every verb has help. `cckit <verb> --help` is answered by the dispatcher
4
- # from scripts/lib/verbs.tsv before the verb runs, so it exits 0, starts with the verb's usage, names
4
+ # from lib/core/verbs.tsv before the verb runs, so it exits 0, starts with the verb's usage, names
5
5
  # its question and its prompt, and never reaches a parser that rejects --help. Runs every verb in a
6
6
  # throwaway git repo with a stub `gh` that refuses everything, then checks the repo is untouched.
7
7
  # No network, no port.
8
- # Run: bash scripts/verbs-help-test.sh
8
+ # Run: bash lib/core/verbs-help-test.sh
9
9
  # errors: strict — a test runner: rc 1 on any failed assertion
10
10
  set -u
11
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
11
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
12
12
  fail=0
13
13
  t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
14
14
  CCKIT="$ROOT/bin/cckit"
15
15
  # shellcheck source=/dev/null
16
- source "$ROOT/scripts/lib/verbs.sh"
16
+ source "$ROOT/lib/core/verbs.sh"
17
17
  tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
18
18
  mkdir -p "$tmp/stub" "$tmp/repo" "$tmp/home"
19
19
  printf '#!/bin/sh\necho "gh $*" >> "%s/gh.log"\nexit 1\n' "$tmp" > "$tmp/stub/gh"; chmod +x "$tmp/stub/gh"
@@ -1,49 +1,49 @@
1
1
  #!/usr/bin/env bash
2
2
  # shellcheck shell=bash
3
3
  # verbs-ratchet-test.sh — #557: renames by ratchet. The top-level verb count may only go down
4
- # (scripts/verbs-ratchet.sh against scripts/verbs.baseline), and an old name still works: it prints a
4
+ # (lib/core/verbs-ratchet.sh against lib/core/verbs.baseline), and an old name still works: it prints a
5
5
  # one-line notice and runs the verb it was renamed to. Fixture tables check the ratchet; the real
6
6
  # dispatcher checks the alias path. No network, no port.
7
- # Run: bash scripts/verbs-ratchet-test.sh
7
+ # Run: bash lib/core/verbs-ratchet-test.sh
8
8
  # errors: strict — a test runner: rc 1 on any failed assertion
9
9
  set -u
10
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
10
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
11
11
  fail=0
12
12
  t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
13
13
  has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> missing '$3'"; fail=1 ;; esac; }
14
14
  CCKIT="$ROOT/bin/cckit"
15
15
  # shellcheck source=/dev/null
16
- source "$ROOT/scripts/lib/verbs.sh"
16
+ source "$ROOT/lib/core/verbs.sh"
17
17
  tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
18
18
 
19
19
  # ── 1. the ratchet on the real table ──────────────────────────────────────────────────────────
20
- out="$(bash "$ROOT/scripts/verbs-ratchet.sh" 2>&1)"; rc=$?
20
+ out="$(bash "$ROOT/lib/core/verbs-ratchet.sh" 2>&1)"; rc=$?
21
21
  t "the real table holds the baseline" "$rc" "0"
22
- t "the baseline is the table's verb count" "$(awk '!/^#/ && NF { print $1; exit }' "$ROOT/scripts/verbs.baseline")" "$(verbs_count)"
22
+ t "the baseline is the table's verb count" "$(awk '!/^#/ && NF { print $1; exit }' "$ROOT/lib/core/verbs.baseline")" "$(verbs_count)"
23
23
  has "the ratchet says it only goes down" "$out" "it may only go down"
24
24
 
25
25
  # ── 2. the ratchet on fixtures ────────────────────────────────────────────────────────────────
26
- mkdir -p "$tmp/fx/scripts/lib"
27
- cp "$ROOT/scripts/verbs-ratchet.sh" "$tmp/fx/scripts/"
28
- cp "$ROOT/scripts/lib/verbs.sh" "$tmp/fx/scripts/lib/"
26
+ mkdir -p "$tmp/fx/lib/core"
27
+ cp "$ROOT/lib/core/verbs-ratchet.sh" "$tmp/fx/lib/core/"
28
+ cp "$ROOT/lib/core/verbs.sh" "$tmp/fx/lib/core/"
29
29
  row() { printf '%s\tverb\t-\tg\tgit\t-\tno\tQ?\tP.\tcckit %s\n' "$1" "$1"; }
30
- { printf 'g\tgroup\t-\t-\t-\t-\t-\tWhat?\t-\t-\n'; row one; row two; } > "$tmp/fx/scripts/lib/verbs.tsv"
31
- ratchet() { bash "$tmp/fx/scripts/verbs-ratchet.sh" --root "$tmp/fx" 2>&1; }
30
+ { printf 'g\tgroup\t-\t-\t-\t-\t-\tWhat?\t-\t-\n'; row one; row two; } > "$tmp/fx/lib/core/verbs.tsv"
31
+ ratchet() { bash "$tmp/fx/lib/core/verbs-ratchet.sh" --root "$tmp/fx" 2>&1; }
32
32
 
33
- printf '# c\n2\n' > "$tmp/fx/scripts/verbs.baseline"
33
+ printf '# c\n2\n' > "$tmp/fx/lib/core/verbs.baseline"
34
34
  ratchet >/dev/null; t "fixture: count equal to the baseline passes" "$?" "0"
35
- row three >> "$tmp/fx/scripts/lib/verbs.tsv"
35
+ row three >> "$tmp/fx/lib/core/verbs.tsv"
36
36
  out="$(ratchet)"; rc=$?
37
37
  t "fixture: a new top-level verb fails" "$rc" "1"
38
38
  has "fixture: the refusal says where a new verb goes" "$out" "goes under an existing one"
39
- printf '# c\n4\n' > "$tmp/fx/scripts/verbs.baseline"
39
+ printf '# c\n4\n' > "$tmp/fx/lib/core/verbs.baseline"
40
40
  out="$(ratchet)"; rc=$?
41
41
  t "fixture: a count below the baseline fails until the baseline drops" "$rc" "1"
42
- has "fixture: the refusal names the number to write" "$out" "Lower scripts/verbs.baseline to 3"
43
- printf 'old\talias\tone\t-\tgit\t-\t-\t-\t-\t-\n' >> "$tmp/fx/scripts/lib/verbs.tsv"
44
- printf '3\n' > "$tmp/fx/scripts/verbs.baseline"
42
+ has "fixture: the refusal names the number to write" "$out" "Lower lib/core/verbs.baseline to 3"
43
+ printf 'old\talias\tone\t-\tgit\t-\t-\t-\t-\t-\n' >> "$tmp/fx/lib/core/verbs.tsv"
44
+ printf '3\n' > "$tmp/fx/lib/core/verbs.baseline"
45
45
  ratchet >/dev/null; t "fixture: an alias row does not count" "$?" "0"
46
- printf '# no number\n' > "$tmp/fx/scripts/verbs.baseline"
46
+ printf '# no number\n' > "$tmp/fx/lib/core/verbs.baseline"
47
47
  ratchet >/dev/null; t "fixture: a baseline with no number is rc 2" "$?" "2"
48
48
 
49
49
  # ── 3. the alias readers ──────────────────────────────────────────────────────────────────────
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env bash
2
2
  # verbs-ratchet.sh — the top-level verb count may only go down (#557).
3
3
  #
4
- # Counts the `verb` rows of scripts/lib/verbs.tsv (old names, `alias` rows, do not count) and
5
- # compares the count with the number in scripts/verbs.baseline:
4
+ # Counts the `verb` rows of lib/core/verbs.tsv (old names, `alias` rows, do not count) and
5
+ # compares the count with the number in lib/core/verbs.baseline:
6
6
  # more than the baseline FAIL — a new top-level verb; add it as a subcommand of one that exists
7
7
  # fewer than the baseline FAIL — lower the baseline to the new count in the same change
8
8
  # equal ok
9
9
  # A rename is the alias path: the old name becomes an `alias` row and keeps working, so a rename
10
10
  # never changes the count. The ratchet only moves down.
11
11
  #
12
- # Usage: bash scripts/verbs-ratchet.sh [--root <dir>]
12
+ # Usage: bash lib/core/verbs-ratchet.sh [--root <dir>]
13
13
  # errors: strict — a gate: rc 1 on drift, rc 2 on a missing or malformed baseline
14
14
  set -u
15
- root="$(cd "$(dirname "$0")/.." && pwd)"
15
+ root="$(cd "$(dirname "$0")/../.." && pwd)"
16
16
  [ "${1:-}" = "--root" ] && root="$2"
17
- baseline_file="$root/scripts/verbs.baseline"
17
+ baseline_file="$root/lib/core/verbs.baseline"
18
18
  # shellcheck source=/dev/null
19
- source "$root/scripts/lib/verbs.sh"
20
- export VERBS_FILE="$root/scripts/lib/verbs.tsv"
19
+ source "$root/lib/core/verbs.sh"
20
+ export VERBS_FILE="$root/lib/core/verbs.tsv"
21
21
 
22
22
  base="$(awk '!/^#/ && NF { print $1; exit }' "$baseline_file" 2>/dev/null)"
23
23
  case "$base" in ''|*[!0-9]*) echo "x verbs ratchet: no number in $baseline_file" >&2; exit 2 ;; esac
@@ -28,7 +28,7 @@ if [ "$now" -gt "$base" ]; then
28
28
  exit 1
29
29
  fi
30
30
  if [ "$now" -lt "$base" ]; then
31
- echo "x verbs ratchet: $now top-level verbs, below the baseline of $base. Lower scripts/verbs.baseline to $now in this change." >&2
31
+ echo "x verbs ratchet: $now top-level verbs, below the baseline of $base. Lower lib/core/verbs.baseline to $now in this change." >&2
32
32
  exit 1
33
33
  fi
34
34
  echo "ok verbs ratchet: $now top-level verbs (baseline $base; it may only go down)"
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env bash
2
2
  # shellcheck shell=bash
3
- # verbs-test.sh — #555: scripts/lib/verbs.tsv is the one source for every cckit verb, and nothing that
3
+ # verbs-test.sh — #555: lib/core/verbs.tsv is the one source for every cckit verb, and nothing that
4
4
  # lists verbs drifts from it. Checks the table's shape, then compares it with the dispatcher's case
5
5
  # labels, `cckit help`, `cckit commands` (human, --llm, --json), the completions, the generated block
6
- # of the CLI reference page, skills/routing.yaml and scripts/forge-report.sh --verbs. A fixture table
7
- # checks the readers in scripts/lib/verbs.sh. No network, no port.
8
- # Run: bash scripts/verbs-test.sh
6
+ # of the CLI reference page, skills/routing.yaml and lib/core/forge-report.sh --verbs. A fixture table
7
+ # checks the readers in lib/core/verbs.sh. No network, no port.
8
+ # Run: bash lib/core/verbs-test.sh
9
9
  # errors: strict — a test runner: rc 1 on any failed assertion
10
10
  set -u
11
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
11
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
12
12
  fail=0
13
13
  t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
14
14
  has() { case "$2" in *"$3"*) echo "ok: $1" ;; *) echo "FAIL: $1 -> missing '$3'"; fail=1 ;; esac; }
15
- TSV="$ROOT/scripts/lib/verbs.tsv"
15
+ TSV="$ROOT/lib/core/verbs.tsv"
16
16
  CCKIT="$ROOT/bin/cckit"
17
17
  command -v jq >/dev/null 2>&1 || { echo "verbs-test: jq required" >&2; exit 1; }
18
18
  # shellcheck source=/dev/null
19
- source "$ROOT/scripts/lib/verbs.sh"
19
+ source "$ROOT/lib/core/verbs.sh"
20
20
  tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
21
21
 
22
22
  # ── 1. the table's shape ─────────────────────────────────────────────────────────────────────────
@@ -71,33 +71,33 @@ t "commands --json: a multi-line usage is an array" "$(jq -r '.[] | select(.name
71
71
  has "the completions read cckit commands" "$("$CCKIT" completions bash)" 'cckit commands'
72
72
 
73
73
  # ── 4. the CLI reference page ───────────────────────────────────────────────────────────────────
74
- out="$(bash "$ROOT/scripts/verbs-gen.sh" --check 2>&1)"; rc=$?
74
+ out="$(bash "$ROOT/lib/core/verbs-gen.sh" --check 2>&1)"; rc=$?
75
75
  t "the CLI reference block matches the table" "$rc" "0"
76
76
  [ "$rc" -eq 0 ] || printf '%s\n' "$out" | sed -n 1,20p
77
77
  page="$ROOT/docs-site/src/content/docs/cli-reference.mdx"
78
78
  missing=""; for v in $(verbs_names verb); do grep -qE "\`cckit $v( |\`)" "$page" || missing="$missing $v"; done
79
79
  t "the CLI reference names every verb" "$missing" ""
80
80
  # The check sees drift: a fixture table with one more verb no longer matches the page.
81
- mkdir -p "$tmp/fx/scripts/lib" "$tmp/fx/docs-site/src/content/docs"
82
- cp "$ROOT/scripts/verbs-gen.sh" "$tmp/fx/scripts/"
83
- cp "$ROOT/scripts/lib/verbs.sh" "$tmp/fx/scripts/lib/"
81
+ mkdir -p "$tmp/fx/lib/core" "$tmp/fx/docs-site/src/content/docs"
82
+ cp "$ROOT/lib/core/verbs-gen.sh" "$tmp/fx/lib/core/"
83
+ cp "$ROOT/lib/core/verbs.sh" "$tmp/fx/lib/core/"
84
84
  cp "$page" "$tmp/fx/docs-site/src/content/docs/"
85
- { cat "$TSV"; printf 'zzz\tverb\t-\tcatalog\tgit\t-\tno\tA new question?\tA new prompt.\tcckit zzz\n'; } > "$tmp/fx/scripts/lib/verbs.tsv"
86
- bash "$tmp/fx/scripts/verbs-gen.sh" --check >/dev/null 2>&1; t "a verb added to the table fails the page check" "$?" "1"
87
- bash "$tmp/fx/scripts/verbs-gen.sh" >/dev/null 2>&1
88
- bash "$tmp/fx/scripts/verbs-gen.sh" --check >/dev/null 2>&1; t "regenerating the page clears it" "$?" "0"
85
+ { cat "$TSV"; printf 'zzz\tverb\t-\tcatalog\tgit\t-\tno\tA new question?\tA new prompt.\tcckit zzz\n'; } > "$tmp/fx/lib/core/verbs.tsv"
86
+ bash "$tmp/fx/lib/core/verbs-gen.sh" --check >/dev/null 2>&1; t "a verb added to the table fails the page check" "$?" "1"
87
+ bash "$tmp/fx/lib/core/verbs-gen.sh" >/dev/null 2>&1
88
+ bash "$tmp/fx/lib/core/verbs-gen.sh" --check >/dev/null 2>&1; t "regenerating the page clears it" "$?" "0"
89
89
  has "the regenerated page carries the new verb" "$(cat "$tmp/fx/docs-site/src/content/docs/cli-reference.mdx")" '| `cckit zzz` | A new question? |'
90
90
 
91
91
  # ── 5. skills/routing.yaml ──────────────────────────────────────────────────────────────────────
92
- routed=" $(grep -E '^[[:space:]]+skill:' "$ROOT/skills/routing.yaml" | awk '{print $2}' | sort -u | tr '\n' ' ') "
92
+ routed=" $(grep -E '^[[:space:]]+skill:' "$ROOT/kit/skills/routing.yaml" | awk '{print $2}' | sort -u | tr '\n' ' ') "
93
93
  bad=""; for s in $(verbs_rows | awk -F'\t' '$6 != "-" && $2 != "group" { print $6 }' | sort -u); do
94
- [ -f "$ROOT/skills/$s/SKILL.md" ] || bad="$bad $s(no-skill)"
94
+ [ -f "$ROOT/kit/skills/$s/SKILL.md" ] || bad="$bad $s(no-skill)"
95
95
  case "$routed" in *" $s "*) ;; *) bad="$bad $s(not-routed)" ;; esac
96
96
  done
97
97
  t "every skill the table names exists and is routed in skills/routing.yaml" "$bad" ""
98
98
 
99
- # ── 6. needs matches scripts/forge-report.sh --verbs ────────────────────────────────────────────
100
- report="$(bash "$ROOT/scripts/forge-report.sh" --verbs | awk 'NR > 1 { print $1 "\t" $2 }')"
99
+ # ── 6. needs matches lib/core/forge-report.sh --verbs ────────────────────────────────────────────
100
+ report="$(bash "$ROOT/lib/core/forge-report.sh" --verbs | awk 'NR > 1 { print $1 "\t" $2 }')"
101
101
  bad=""
102
102
  while IFS=$'\t' read -r v yn; do
103
103
  [ -n "$v" ] || continue
@@ -0,0 +1,5 @@
1
+ # verbs.baseline — the top-level verb count lib/core/verbs-ratchet.sh holds the line at (#557).
2
+ # The number of `verb` rows in lib/core/verbs.tsv may only go down. A rename keeps the old name
3
+ # as an `alias` row, which does not count. When a verb is retired or folded under another, lower
4
+ # this number in the same change; the gate fails until you do.
5
+ 38
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # verbs.sh — read scripts/lib/verbs.tsv, the one source for every cckit verb (#555): the grouped
2
+ # verbs.sh — read lib/core/verbs.tsv, the one source for every cckit verb (#555): the grouped
3
3
  # `cckit help`, the entry `cckit <verb> --help` prints, the `cckit commands` catalog and the alias
4
4
  # path. Every reader of the verb list goes through these functions, so the file format lives here.
5
5
  #
@@ -7,7 +7,7 @@
7
7
  # verbs_rows the data rows, tab-separated, comments and blanks dropped
8
8
  # verbs_get <name> <col> one field of the non-group row named <name> (col 1-10); rc 1 if none
9
9
  # verbs_names [kinds…] names of the rows of those kinds (default: verb default alias)
10
- # verbs_count the number of `verb` rows (the ratchet in scripts/verbs.baseline)
10
+ # verbs_count the number of `verb` rows (the ratchet in lib/core/verbs.baseline)
11
11
  # verbs_help the grouped help: one line per verb under each group's question
12
12
  # verbs_entry <name> usage, question, prompt, needs and skill of one verb; rc 1 if none
13
13
  # verbs_alias_target <name> the verb an old name runs, with any words after it; rc 1 when not an alias
@@ -1,21 +1,21 @@
1
- # scripts/lib/verbs.tsv — the ONE source for every cckit verb (#555).
1
+ # lib/core/verbs.tsv — the ONE source for every cckit verb (#555).
2
2
  #
3
- # Read by bin/cckit (help, `<verb> --help`, `commands`, the alias path), by scripts/lib/verbs.sh and
3
+ # Read by bin/cckit (help, `<verb> --help`, `commands`, the alias path), by lib/core/verbs.sh and
4
4
  # by scripts/verbs-check.sh, which fails on drift between this file and the dispatcher's case labels,
5
- # the CLI reference page, skills/routing.yaml and scripts/forge-report.sh.
5
+ # the CLI reference page, skills/routing.yaml and lib/core/forge-report.sh.
6
6
  #
7
7
  # Format: tab-separated, one row per line, exactly 10 fields; `#` lines and blank lines are skipped.
8
8
  # 1 name the word typed after `cckit`
9
9
  # 2 kind group a heading of `cckit help`; name = group id, question = the heading
10
10
  # verb a top-level verb; the count of these rows is the ratchet in
11
- # scripts/verbs.baseline (it may only go down)
11
+ # lib/core/verbs.baseline (it may only go down)
12
12
  # default what bare `cckit` runs; never typed
13
13
  # alias an old name; the dispatcher prints a one-line notice and runs <target>
14
14
  # 3 target alias: the verb it runs, optionally followed by words (`agent lib`) · every other kind: -
15
15
  # 4 group the group id the verb is listed under in `cckit help` (- for group and alias rows)
16
16
  # 5 needs git runs on git alone
17
17
  # forge reads or writes the forge (GitHub) when one is configured
18
- # (scripts/forge-report.sh --verbs is the measurement; verbs-check compares)
18
+ # (lib/core/forge-report.sh --verbs is the measurement; verbs-check compares)
19
19
  # 6 skill the skill under skills/ that drives the verb, or -
20
20
  # 7 ownhelp yes: after the entry, `cckit <verb> --help` also prints the verb's own help
21
21
  # 8 question the question the verb answers, in the reader's words
@@ -5,7 +5,7 @@
5
5
  # only cckit.config.json.kitVersion, shipping releases whose .claude-plugin/plugin.json and
6
6
  # package.json lagged behind. Guards: (1) vb_write stamps all four files, (2) publish.sh calls the
7
7
  # shared bumper (no second implementation), (3) the repo's four version files currently agree.
8
- # Run: bash scripts/lib/version-bump-test.sh
8
+ # Run: bash lib/core/version-bump-test.sh
9
9
  # errors: strict — a test runner: rc 1 on any failed assertion
10
10
  set -u
11
11
  ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
@@ -15,13 +15,13 @@ command -v jq >/dev/null 2>&1 || { echo "version-bump-test: jq required" >&2; ex
15
15
 
16
16
  # (1) vb_write stamps every surface — exercised against a throwaway copy of the four files.
17
17
  tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
18
- mkdir -p "$tmp/.claude-plugin" "$tmp/docs-site" "$tmp/scripts/lib"
18
+ mkdir -p "$tmp/.claude-plugin" "$tmp/docs-site" "$tmp/lib/core"
19
19
  echo '{"kitVersion":"0.0.1"}' > "$tmp/cckit.config.json"
20
20
  echo '{"version":"0.0.1"}' > "$tmp/.claude-plugin/plugin.json"
21
21
  echo '{"version":"0.0.1"}' > "$tmp/package.json"
22
22
  echo '{"version":"0.0.1"}' > "$tmp/docs-site/package.json"
23
- cp "$ROOT/scripts/lib/version-bump.sh" "$tmp/scripts/lib/version-bump.sh"
24
- (cd "$tmp" && bash scripts/lib/version-bump.sh --write 9.9.9 >/dev/null 2>&1)
23
+ cp "$ROOT/lib/core/version-bump.sh" "$tmp/lib/core/version-bump.sh"
24
+ (cd "$tmp" && bash lib/core/version-bump.sh --write 9.9.9 >/dev/null 2>&1)
25
25
  t "vb_write stamps cckit.config.json" "$(jq -r .kitVersion "$tmp/cckit.config.json")" "9.9.9"
26
26
  t "vb_write stamps plugin.json" "$(jq -r .version "$tmp/.claude-plugin/plugin.json")" "9.9.9"
27
27
  t "vb_write stamps package.json" "$(jq -r .version "$tmp/package.json")" "9.9.9"
@@ -29,9 +29,9 @@ t "vb_write stamps docs-site/package.json" "$(jq -r .version "$tmp/docs-site/pa
29
29
 
30
30
  # (2) publish.sh delegates to the shared bumper — a reintroduced inline kitVersion jq is the drift.
31
31
  t "publish.sh calls version-bump.sh --write" \
32
- "$(grep -c 'version-bump.sh. --write' "$ROOT/scripts/publish.sh")" "1"
32
+ "$(grep -c 'version-bump.sh. --write' "$ROOT/lib/verbs/publish.sh")" "1"
33
33
  t "publish.sh has no inline kitVersion bump" \
34
- "$(grep -c 'kitVersion=' "$ROOT/scripts/publish.sh")" "0"
34
+ "$(grep -c 'kitVersion=' "$ROOT/lib/verbs/publish.sh")" "0"
35
35
 
36
36
  # (3) the repo's four version surfaces agree RIGHT NOW (catches a drifted release after the fact).
37
37
  v="$(jq -r .kitVersion "$ROOT/cckit.config.json")"
@@ -43,17 +43,38 @@ t "docs-site/package.json matches kitVersion ($v)" "$(jq -r .version "$ROOT/docs
43
43
  # at 1.x it bumps the major. Driven end to end through the script, not through its functions.
44
44
  vb_fixture_next() { # <tag> <subject> -> what --next prints
45
45
  local r; r="$(mktemp -d)"
46
- mkdir -p "$r/scripts/lib"; cp "$ROOT/scripts/lib/version-bump.sh" "$r/scripts/lib/"
46
+ mkdir -p "$r/lib/core"; cp "$ROOT/lib/core/version-bump.sh" "$r/lib/core/"
47
47
  git -C "$r" init -q; git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "chore: seed"
48
48
  git -C "$r" -c tag.gpgsign=false -c commit.gpgsign=false tag "v$1"
49
49
  git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "$2"
50
- (cd "$r" && bash scripts/lib/version-bump.sh --next); rm -rf "$r"
50
+ (cd "$r" && bash lib/core/version-bump.sh --next); rm -rf "$r"
51
51
  }
52
52
  t "fix at 0.10.0 -> 0.10.1" "$(vb_fixture_next 0.10.0 "fix: a")" "0.10.1"
53
53
  t "feat at 0.10.0 -> 0.11.0" "$(vb_fixture_next 0.10.0 "feat: a")" "0.11.0"
54
54
  t "feat! at 0.10.0 -> 0.11.0" "$(vb_fixture_next 0.10.0 "feat!: a")" "0.11.0"
55
55
  t "feat! at 1.2.3 -> 2.0.0" "$(vb_fixture_next 1.2.3 "feat!: a")" "2.0.0"
56
56
 
57
+ # (4b) #625: a `Release-As: x.y.z` footer overrides the computed version, as in release-please;
58
+ # with several footers in the range the highest wins. Each extra argument is one more commit.
59
+ vb_fixture_next_many() { # <tag> <message>... -> what --next prints
60
+ local r m; r="$(mktemp -d)"
61
+ mkdir -p "$r/lib/core"; cp "$ROOT/lib/core/version-bump.sh" "$r/lib/core/"
62
+ git -C "$r" init -q; git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "chore: seed"
63
+ git -C "$r" -c tag.gpgsign=false -c commit.gpgsign=false tag "v$1"; shift
64
+ for m in "$@"; do git -C "$r" -c user.name=t -c user.email=t@t -c commit.gpgsign=false commit -q --allow-empty -m "$m"; done
65
+ (cd "$r" && bash lib/core/version-bump.sh --next); rm -rf "$r"
66
+ }
67
+ t "Release-As footer at 0.12.0 -> 0.13.0" \
68
+ "$(vb_fixture_next_many 0.12.0 "fix: a" $'chore: release 0.13.0\n\nRelease-As: 0.13.0')" "0.13.0"
69
+ t "highest of two Release-As footers wins" \
70
+ "$(vb_fixture_next_many 0.12.0 $'chore: r\n\nRelease-As: 0.14.0' $'chore: r\n\nRelease-As: 0.13.5')" "0.14.0"
71
+ t "Release-As on a chore-only range still releases" \
72
+ "$(vb_fixture_next_many 0.12.0 $'chore: r\n\nRelease-As: 0.13.0')" "0.13.0"
73
+ t "Release-As in a subject is not a footer" \
74
+ "$(vb_fixture_next_many 0.12.0 "fix: mention Release-As: 9.9.9")" "0.12.1"
75
+ t "no footer keeps the computed bump" \
76
+ "$(vb_fixture_next_many 0.12.0 "fix: a" "docs: b")" "0.12.1"
77
+
57
78
  # (5) the script and release-please agree: the config says bump-minor-pre-major, so a drift either
58
79
  # way (config flag dropped, or the script going back to major below 1.0) fails here.
59
80
  t "release-please-config.json has bump-minor-pre-major: true" \
@@ -13,6 +13,8 @@
13
13
  # `feat:` -> minor; `fix|perf|refactor|revert:` -> patch; non-functional types
14
14
  # (`docs|chore|style|test|ci|build`) and anything else -> none (no release).
15
15
  # no commits -> none (no release).
16
+ # A `Release-As: x.y.z` footer in the range overrides the computed version, as release-please
17
+ # does; with several, the highest wins. `--next` and `--emit`'s `next=` print it.
16
18
  # errors: strict — set -e; a bad manifest or missing tag propagates
17
19
  set -euo pipefail
18
20
  ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
@@ -30,6 +32,12 @@ vb_level() {
30
32
  echo none
31
33
  }
32
34
 
35
+ vb_release_as() { # <range> -> the highest `Release-As: x.y.z` footer version, or nothing
36
+ git -C "$ROOT" log --format='%b' "$1" 2>/dev/null \
37
+ | sed -nE 's/^[Rr][Ee][Ll][Ee][Aa][Ss][Ee]-[Aa][Ss]:[[:space:]]*v?([0-9]+\.[0-9]+\.[0-9]+)[[:space:]]*$/\1/p' \
38
+ | sort -t. -k1,1n -k2,2n -k3,3n | tail -n 1
39
+ }
40
+
33
41
  vb_next() {
34
42
  local cur="${1:-0.0.0}" level="$2" M m p rest
35
43
  M="${cur%%.*}"; rest="${cur#*.}"; m="${rest%%.*}"; p="${rest#*.}"
@@ -54,9 +62,14 @@ vb_write() {
54
62
 
55
63
  _range() { local cur; cur="$(vb_current)"; if [ -n "$cur" ]; then echo "v$cur..HEAD"; else echo "HEAD"; fi; }
56
64
 
65
+ _next() { # the Release-As footer if the range has one, else the computed bump
66
+ local ra; ra="$(vb_release_as "$(_range)")"
67
+ if [ -n "$ra" ]; then echo "$ra"; else vb_next "$(vb_current)" "$(vb_level "$(_range)")"; fi
68
+ }
69
+
57
70
  case "${1:-}" in
58
- --next) vb_next "$(vb_current)" "$(vb_level "$(_range)")" ;;
59
- --emit) printf 'bump=%s\n' "$(vb_level "$(_range)")"; printf 'next=%s\n' "$(vb_next "$(vb_current)" "$(vb_level "$(_range)")")" ;;
71
+ --next) _next ;;
72
+ --emit) printf 'bump=%s\n' "$(vb_level "$(_range)")"; printf 'next=%s\n' "$(_next)" ;;
60
73
  --write) vb_write "${2:?usage: --write <version>}" ;;
61
74
  *) echo "usage: version-bump.sh --next | --emit | --write <version>" >&2; exit 2 ;;
62
75
  esac
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # wave-result-test.sh — self-test for wave-result.sh under bash AND zsh, plus the wave-worker.sh
3
3
  # wrapper that writes the records (E257.6, #263). Hermetic: KIT_STATE_DIR points at a temp dir.
4
- # Run: bash scripts/lib/wave-result-test.sh
4
+ # Run: bash lib/core/wave-result-test.sh
5
5
  # errors: strict — a test runner: rc 1 on any failed assertion
6
6
 
7
7
  dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
@@ -12,7 +12,7 @@ if [ -n "${WR_TEST_INNER:-}" ]; then
12
12
  . "$dir/wave-result.sh"
13
13
  fail=0
14
14
  t() { if [ "$2" = "$3" ]; then :; else echo "FAIL($WR_TEST_INNER): $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
15
- worker="$dir/../wave-worker.sh"
15
+ worker="$dir/../verbs/wave-worker.sh"
16
16
 
17
17
  # ── the three terminal values come from the exit status alone ───────────────────────────
18
18
  t "rc 0 is success" "$(wr_classify_rc 0)" "success"