@ngockhoale/ukit 3.0.0 → 3.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 (439) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/manifests/documentation.yaml +64 -64
  3. package/manifests/hostCapabilities.yaml +1 -1
  4. package/manifests/instructionRules.yaml +55 -55
  5. package/manifests/platform.full.yaml +4 -4
  6. package/manifests/platform.user.yaml +4 -4
  7. package/package.json +8 -7
  8. package/scripts/bench/v3-ceremony.mjs +214 -0
  9. package/scripts/install/sync-installed-mirror.mjs +3 -3
  10. package/scripts/perf/audit-perf.mjs +9 -9
  11. package/scripts/perf/perf-findings.json +4 -4
  12. package/scripts/perf/perf-measure.md +20 -20
  13. package/src/core/buildPlan.js +3 -3
  14. package/src/core/compact/contextBudget.js +2 -2
  15. package/src/core/compact/threshold.js +3 -3
  16. package/src/core/docContracts.js +17 -17
  17. package/src/core/ensureGitignore.js +1 -1
  18. package/src/core/executionContracts.js +2 -2
  19. package/src/core/fileOps.js +3 -3
  20. package/src/core/gatewayProbe.js +2 -2
  21. package/src/core/gatewayResilienceEnv.js +2 -2
  22. package/src/core/output/index.js +1 -1
  23. package/src/core/paths.js +2 -1
  24. package/src/core/runInstallPipeline.js +6 -4
  25. package/src/core/runtimeConfig.js +13 -6
  26. package/src/core/sensitiveValueScanner.js +1 -1
  27. package/src/core/taskBudgetValidator.js +1 -1
  28. package/src/core/unattendedDoctor.js +1 -1
  29. package/src/core/update.js +1 -1
  30. package/src/index/buildIndex.js +2 -2
  31. package/src/index/impactCatalog.js +12 -12
  32. package/src/index/taskRouting.js +213 -4
  33. package/src/render/instructionRenderer.js +7 -7
  34. package/src/skill/auditSkill.js +1 -1
  35. package/{templates → template_project}/.claude/agents/handoff-planner.md +2 -2
  36. package/{templates → template_project}/.claude/commands/ukit/handoff-create.md +1 -1
  37. package/{templates → template_project}/.claude/commands/ukit/handoff-fullstack.md +1 -1
  38. package/{templates → template_project}/.claude/hooks/handoff-model-guard.sh +1 -1
  39. package/{templates → template_project}/.claude/hooks/skill-router.sh +3 -3
  40. package/{templates → template_project}/.claude/skills/skill-quality/SKILL.md +1 -1
  41. package/{templates → template_project}/.claude/skills/skill-quality/pressure-scenario-template.md +1 -1
  42. package/{templates → template_project}/.claude/ukit/index/lib/index-core.mjs +12 -12
  43. package/{templates → template_project}/.claude/ukit/index/route-task.mjs +319 -11
  44. package/{templates → template_project}/.claude/ukit/index/unic-gateway.mjs +1 -1
  45. package/{templates → template_project}/.claude/ukit/runtime/execution-ledger.mjs +11 -5
  46. package/{templates → template_project}/.claude/ukit/runtime/safe-patch-core.mjs +3 -3
  47. package/{templates → template_project}/.claude/ukit/runtime/sensitive-value-scanner.mjs +1 -1
  48. package/{templates → template_project}/.claude/ukit/runtime/task-watchdog.mjs +1 -1
  49. package/{templates → template_project}/.gitignore +2 -2
  50. package/{templates → template_project}/.omp/RULES.md +1 -1
  51. package/{templates → template_project}/.omp/agents/handoff-planner.md +2 -2
  52. package/{templates → template_project}/.omp/config.yml +3 -3
  53. package/{templates → template_project}/AGENTS.md +2 -2
  54. package/{templates → template_project}/CLAUDE.md +2 -2
  55. package/{templates → template_project}/docs/AI_HANDOFF/RULES.md +1 -1
  56. package/{templates → template_project}/docs/UKIT_INTERNALS.md +3 -3
  57. package/{templates → template_project}/instructions/core.md +1 -1
  58. package/{templates → template_project}/instructions/layout.yaml +8 -8
  59. package/{templates → template_project}/instructions/overlays/claude.md +1 -1
  60. package/{templates → template_project}/instructions/overlays/repo.md +1 -1
  61. package/{templates → template_project}/ukit/storage/config.json +4 -1
  62. package/template_project/ukit/storage/memory/projects/.gitkeep +2 -0
  63. package/templates/ukit/storage/memory/projects/.gitkeep +0 -2
  64. /package/{templates → template_project}/.claude/agents/bug-debugger.md +0 -0
  65. /package/{templates → template_project}/.claude/agents/code-reviewer.md +0 -0
  66. /package/{templates → template_project}/.claude/agents/feature-implementer.md +0 -0
  67. /package/{templates → template_project}/.claude/agents/ukit-small-task-maintainer.md +0 -0
  68. /package/{templates → template_project}/.claude/agents/ukit-vision-analyst.md +0 -0
  69. /package/{templates → template_project}/.claude/commands/ukit/handoff-clear.md +0 -0
  70. /package/{templates → template_project}/.claude/commands/ukit/handoff-implement.md +0 -0
  71. /package/{templates → template_project}/.claude/commands/ukit/handoff-review.md +0 -0
  72. /package/{templates → template_project}/.claude/commands/ukit/handoff-status.md +0 -0
  73. /package/{templates → template_project}/.claude/config/providers.md +0 -0
  74. /package/{templates → template_project}/.claude/hooks/auto-allow-bash.sh +0 -0
  75. /package/{templates → template_project}/.claude/hooks/auto-prune-bash.sh +0 -0
  76. /package/{templates → template_project}/.claude/hooks/block-dangerous.mjs +0 -0
  77. /package/{templates → template_project}/.claude/hooks/block-dangerous.sh +0 -0
  78. /package/{templates → template_project}/.claude/hooks/completion-gate.sh +0 -0
  79. /package/{templates → template_project}/.claude/hooks/compress-output.sh +0 -0
  80. /package/{templates → template_project}/.claude/hooks/context-hardcap-gate.sh +0 -0
  81. /package/{templates → template_project}/.claude/hooks/context-window-guard.sh +0 -0
  82. /package/{templates → template_project}/.claude/hooks/handoff-resume.sh +0 -0
  83. /package/{templates → template_project}/.claude/hooks/post-edit-verify.sh +0 -0
  84. /package/{templates → template_project}/.claude/hooks/pre-edit-backup.sh +0 -0
  85. /package/{templates → template_project}/.claude/hooks/project-important.sh +0 -0
  86. /package/{templates → template_project}/.claude/hooks/protect-files.sh +0 -0
  87. /package/{templates → template_project}/.claude/hooks/record-execution.mjs +0 -0
  88. /package/{templates → template_project}/.claude/hooks/record-execution.sh +0 -0
  89. /package/{templates → template_project}/.claude/hooks/reinject-context.sh +0 -0
  90. /package/{templates → template_project}/.claude/hooks/reset-compact-pressure.sh +0 -0
  91. /package/{templates → template_project}/.claude/hooks/sensitive-data-guard.mjs +0 -0
  92. /package/{templates → template_project}/.claude/hooks/sensitive-data-guard.sh +0 -0
  93. /package/{templates → template_project}/.claude/hooks/session-episode.sh +0 -0
  94. /package/{templates → template_project}/.claude/hooks/session-start.md +0 -0
  95. /package/{templates → template_project}/.claude/hooks/stale-spec-guard.sh +0 -0
  96. /package/{templates → template_project}/.claude/hooks/task-watchdog.sh +0 -0
  97. /package/{templates → template_project}/.claude/hooks/verification-guard.sh +0 -0
  98. /package/{templates → template_project}/.claude/hooks/vision-router.sh +0 -0
  99. /package/{templates → template_project}/.claude/settings.json +0 -0
  100. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -0
  101. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -0
  102. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -0
  103. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -0
  104. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -0
  105. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -0
  106. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -0
  107. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -0
  108. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -0
  109. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -0
  110. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -0
  111. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -0
  112. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -0
  113. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -0
  114. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -0
  115. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -0
  116. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -0
  117. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -0
  118. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -0
  119. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -0
  120. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -0
  121. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -0
  122. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -0
  123. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -0
  124. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -0
  125. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -0
  126. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -0
  127. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -0
  128. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -0
  129. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -0
  130. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -0
  131. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/mce/mc.xsd +0 -0
  132. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2010.xsd +0 -0
  133. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2012.xsd +0 -0
  134. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2018.xsd +0 -0
  135. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-cex-2018.xsd +0 -0
  136. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-cid-2016.xsd +0 -0
  137. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -0
  138. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-symex-2015.xsd +0 -0
  139. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/pack.py +0 -0
  140. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/unpack.py +0 -0
  141. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validate.py +0 -0
  142. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/__init__.py +0 -0
  143. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/base.py +0 -0
  144. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/docx.py +0 -0
  145. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/pptx.py +0 -0
  146. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/redlining.py +0 -0
  147. /package/{templates → template_project}/.claude/skills/backend-api/SKILL.md +0 -0
  148. /package/{templates → template_project}/.claude/skills/canvas-design/LICENSE.txt +0 -0
  149. /package/{templates → template_project}/.claude/skills/canvas-design/SKILL.md +0 -0
  150. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  151. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -0
  152. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  153. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  154. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  155. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  156. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -0
  157. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  158. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  159. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  160. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  161. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -0
  162. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  163. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  164. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  165. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  166. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -0
  167. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  168. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -0
  169. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  170. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  171. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -0
  172. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  173. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  174. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -0
  175. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  176. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -0
  177. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  178. /package/{templates → template_project}/.claude/skills/canvas-design/philosophy-examples.md +0 -0
  179. /package/{templates → template_project}/.claude/skills/code-review/SKILL.md +0 -0
  180. /package/{templates → template_project}/.claude/skills/debugging-toolkit/SKILL.md +0 -0
  181. /package/{templates → template_project}/.claude/skills/debugging-toolkit/reference-tables.md +0 -0
  182. /package/{templates → template_project}/.claude/skills/delivery/SKILL.md +0 -0
  183. /package/{templates → template_project}/.claude/skills/discover-security/SKILL.md +0 -0
  184. /package/{templates → template_project}/.claude/skills/docker-packaging/SKILL.md +0 -0
  185. /package/{templates → template_project}/.claude/skills/docs-manager/SKILL.md +0 -0
  186. /package/{templates → template_project}/.claude/skills/docs-manager/conventions-and-examples.md +0 -0
  187. /package/{templates → template_project}/.claude/skills/docs-manager/init-project-docs.sh +0 -0
  188. /package/{templates → template_project}/.claude/skills/docs-manager/templates/README.md.template +0 -0
  189. /package/{templates → template_project}/.claude/skills/docs-manager/templates/agent-roles.md.template +0 -0
  190. /package/{templates → template_project}/.claude/skills/docs-manager/templates/coding-conventions.md.template +0 -0
  191. /package/{templates → template_project}/.claude/skills/docs-manager/templates/memory.md.template +0 -0
  192. /package/{templates → template_project}/.claude/skills/docs-manager/templates/onboarding.md.template +0 -0
  193. /package/{templates → template_project}/.claude/skills/docs-manager/templates/project.md.template +0 -0
  194. /package/{templates → template_project}/.claude/skills/docs-quality/SKILL.md +0 -0
  195. /package/{templates → template_project}/.claude/skills/docx/LICENSE.txt +0 -0
  196. /package/{templates → template_project}/.claude/skills/docx/SKILL.md +0 -0
  197. /package/{templates → template_project}/.claude/skills/docx/docx-js.md +0 -0
  198. /package/{templates → template_project}/.claude/skills/docx/ooxml.md +0 -0
  199. /package/{templates → template_project}/.claude/skills/docx/redlining-reference.md +0 -0
  200. /package/{templates → template_project}/.claude/skills/docx/scripts/__init__.py +0 -0
  201. /package/{templates → template_project}/.claude/skills/docx/scripts/document.py +0 -0
  202. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/comments.xml +0 -0
  203. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsExtended.xml +0 -0
  204. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsExtensible.xml +0 -0
  205. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsIds.xml +0 -0
  206. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/people.xml +0 -0
  207. /package/{templates → template_project}/.claude/skills/docx/scripts/utilities.py +0 -0
  208. /package/{templates → template_project}/.claude/skills/duraone/SKILL.md +0 -0
  209. /package/{templates → template_project}/.claude/skills/duraone/references/backend.md +0 -0
  210. /package/{templates → template_project}/.claude/skills/duraone/references/frontend.md +0 -0
  211. /package/{templates → template_project}/.claude/skills/duraone/references/sql.md +0 -0
  212. /package/{templates → template_project}/.claude/skills/duraone/references/workflow.md +0 -0
  213. /package/{templates → template_project}/.claude/skills/executing-plans/SKILL.md +0 -0
  214. /package/{templates → template_project}/.claude/skills/file-organizer/SKILL.md +0 -0
  215. /package/{templates → template_project}/.claude/skills/file-organizer/examples-and-practices.md +0 -0
  216. /package/{templates → template_project}/.claude/skills/frontend/SKILL.md +0 -0
  217. /package/{templates → template_project}/.claude/skills/frontend-design/LICENSE.txt +0 -0
  218. /package/{templates → template_project}/.claude/skills/frontend-design/SKILL.md +0 -0
  219. /package/{templates → template_project}/.claude/skills/frontend-vue/SKILL.md +0 -0
  220. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Box.vue +0 -0
  221. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Button.vue +0 -0
  222. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/ButtonBar.vue +0 -0
  223. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/ButtonFloat.vue +0 -0
  224. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/CheckButton.vue +0 -0
  225. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Checkbox.vue +0 -0
  226. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Datetime.vue +0 -0
  227. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Dropdownlist.vue +0 -0
  228. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Input.vue +0 -0
  229. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Label.vue +0 -0
  230. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Master/BoxColumn.vue +0 -0
  231. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Confirm.vue +0 -0
  232. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Info.vue +0 -0
  233. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/ModalInfo.vue +0 -0
  234. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Reject.vue +0 -0
  235. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Tag.vue +0 -0
  236. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Upload.vue +0 -0
  237. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/Dropdownlist.vue +0 -0
  238. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/PagingBar.vue +0 -0
  239. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/UploadImage.vue +0 -0
  240. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/AG.vue +0 -0
  241. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/AntTable.vue +0 -0
  242. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/CustomDropdownEditor.vue +0 -0
  243. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/CustomDropdownEditorEnable.vue +0 -0
  244. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/HtmlTable.vue +0 -0
  245. /package/{templates → template_project}/.claude/skills/frontend-vue/components/PDFViewer.vue +0 -0
  246. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Panel/FormView.vue +0 -0
  247. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Footer.vue +0 -0
  248. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Header.vue +0 -0
  249. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Sidebar.vue +0 -0
  250. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Template.vue +0 -0
  251. /package/{templates → template_project}/.claude/skills/frontend-vue/components/View/Form.vue +0 -0
  252. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/indexDBStore.js +0 -0
  253. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/masterApi.js +0 -0
  254. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/state.js +0 -0
  255. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useRequest.js +0 -0
  256. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useSession.js +0 -0
  257. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useTranslation.js +0 -0
  258. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useWebSocket.js +0 -0
  259. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/userObj.js +0 -0
  260. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/utils.js +0 -0
  261. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/composables-example.vue +0 -0
  262. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/form-example.vue +0 -0
  263. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/grid-example.vue +0 -0
  264. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/masterdata-example/[id].vue +0 -0
  265. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/masterdata-example/index.vue +0 -0
  266. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/popup-example.vue +0 -0
  267. /package/{templates → template_project}/.claude/skills/next-step/SKILL.md +0 -0
  268. /package/{templates → template_project}/.claude/skills/pdf/LICENSE.txt +0 -0
  269. /package/{templates → template_project}/.claude/skills/pdf/SKILL.md +0 -0
  270. /package/{templates → template_project}/.claude/skills/pdf/forms.md +0 -0
  271. /package/{templates → template_project}/.claude/skills/pdf/reference.md +0 -0
  272. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_bounding_boxes.py +0 -0
  273. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_bounding_boxes_test.py +0 -0
  274. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_fillable_fields.py +0 -0
  275. /package/{templates → template_project}/.claude/skills/pdf/scripts/convert_pdf_to_images.py +0 -0
  276. /package/{templates → template_project}/.claude/skills/pdf/scripts/create_validation_image.py +0 -0
  277. /package/{templates → template_project}/.claude/skills/pdf/scripts/extract_form_field_info.py +0 -0
  278. /package/{templates → template_project}/.claude/skills/pdf/scripts/fill_fillable_fields.py +0 -0
  279. /package/{templates → template_project}/.claude/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -0
  280. /package/{templates → template_project}/.claude/skills/pdf-processing/SKILL.md +0 -0
  281. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/FORMS.md +0 -0
  282. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/OCR.md +0 -0
  283. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/SKILL.md +0 -0
  284. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/TABLES.md +0 -0
  285. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/scripts/analyze_form.py +0 -0
  286. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/workflows-and-troubleshooting.md +0 -0
  287. /package/{templates → template_project}/.claude/skills/postgres/SKILL.md +0 -0
  288. /package/{templates → template_project}/.claude/skills/postgres/reference/fn_get_examples.sql +0 -0
  289. /package/{templates → template_project}/.claude/skills/postgres/reference/fn_rpt_examples.sql +0 -0
  290. /package/{templates → template_project}/.claude/skills/postgres/reference/utility_functions.sql +0 -0
  291. /package/{templates → template_project}/.claude/skills/pptx/LICENSE.txt +0 -0
  292. /package/{templates → template_project}/.claude/skills/pptx/SKILL.md +0 -0
  293. /package/{templates → template_project}/.claude/skills/pptx/design-references.md +0 -0
  294. /package/{templates → template_project}/.claude/skills/pptx/html2pptx.md +0 -0
  295. /package/{templates → template_project}/.claude/skills/pptx/ooxml.md +0 -0
  296. /package/{templates → template_project}/.claude/skills/pptx/scripts/html2pptx.js +0 -0
  297. /package/{templates → template_project}/.claude/skills/pptx/scripts/inventory.py +0 -0
  298. /package/{templates → template_project}/.claude/skills/pptx/scripts/rearrange.py +0 -0
  299. /package/{templates → template_project}/.claude/skills/pptx/scripts/replace.py +0 -0
  300. /package/{templates → template_project}/.claude/skills/pptx/scripts/thumbnail.py +0 -0
  301. /package/{templates → template_project}/.claude/skills/pptx/template-replacement-reference.md +0 -0
  302. /package/{templates → template_project}/.claude/skills/pptx/utilities.md +0 -0
  303. /package/{templates → template_project}/.claude/skills/principle-attack-the-premise/SKILL.md +0 -0
  304. /package/{templates → template_project}/.claude/skills/principle-boundary-discipline/SKILL.md +0 -0
  305. /package/{templates → template_project}/.claude/skills/principle-encode-lessons-in-structure/SKILL.md +0 -0
  306. /package/{templates → template_project}/.claude/skills/principle-fix-root-causes/SKILL.md +0 -0
  307. /package/{templates → template_project}/.claude/skills/principle-foundational-thinking/SKILL.md +0 -0
  308. /package/{templates → template_project}/.claude/skills/principle-guard-the-context-window/SKILL.md +0 -0
  309. /package/{templates → template_project}/.claude/skills/principle-laziness-protocol/SKILL.md +0 -0
  310. /package/{templates → template_project}/.claude/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +0 -0
  311. /package/{templates → template_project}/.claude/skills/principle-minimize-reader-load/SKILL.md +0 -0
  312. /package/{templates → template_project}/.claude/skills/principle-model-the-domain/SKILL.md +0 -0
  313. /package/{templates → template_project}/.claude/skills/principle-never-block-on-the-human/SKILL.md +0 -0
  314. /package/{templates → template_project}/.claude/skills/principle-prove-it-works/SKILL.md +0 -0
  315. /package/{templates → template_project}/.claude/skills/principle-sequence-verifiable-units/SKILL.md +0 -0
  316. /package/{templates → template_project}/.claude/skills/principle-subtract-before-you-add/SKILL.md +0 -0
  317. /package/{templates → template_project}/.claude/skills/principle-test-behavior-not-implementation/SKILL.md +0 -0
  318. /package/{templates → template_project}/.claude/skills/project-learning/SKILL.md +0 -0
  319. /package/{templates → template_project}/.claude/skills/repo-maintenance/SKILL.md +0 -0
  320. /package/{templates → template_project}/.claude/skills/research/EXAMPLES.md +0 -0
  321. /package/{templates → template_project}/.claude/skills/research/REFERENCE.md +0 -0
  322. /package/{templates → template_project}/.claude/skills/research/SKILL.md +0 -0
  323. /package/{templates → template_project}/.claude/skills/root-cause-tracing/SKILL.md +0 -0
  324. /package/{templates → template_project}/.claude/skills/root-cause-tracing/diagrams.md +0 -0
  325. /package/{templates → template_project}/.claude/skills/root-cause-tracing/find-polluter.sh +0 -0
  326. /package/{templates → template_project}/.claude/skills/sharing-skills/SKILL.md +0 -0
  327. /package/{templates → template_project}/.claude/skills/sharing-skills/complete-example.md +0 -0
  328. /package/{templates → template_project}/.claude/skills/skill-quality/rationalization-table-template.md +0 -0
  329. /package/{templates → template_project}/.claude/skills/skill-quality/trigger-accuracy-template.md +0 -0
  330. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/SKILL.md +0 -0
  331. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/advanced-techniques.md +0 -0
  332. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/core-concepts.md +0 -0
  333. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/query-patterns.md +0 -0
  334. /package/{templates → template_project}/.claude/skills/subagent-driven-development/SKILL.md +0 -0
  335. /package/{templates → template_project}/.claude/skills/subagent-driven-development/example-workflow.md +0 -0
  336. /package/{templates → template_project}/.claude/skills/systematic-debugging/CREATION-LOG.md +0 -0
  337. /package/{templates → template_project}/.claude/skills/systematic-debugging/SKILL.md +0 -0
  338. /package/{templates → template_project}/.claude/skills/systematic-debugging/reference-tables.md +0 -0
  339. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-academic.md +0 -0
  340. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-1.md +0 -0
  341. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-2.md +0 -0
  342. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-3.md +0 -0
  343. /package/{templates → template_project}/.claude/skills/test-driven-development/SKILL.md +0 -0
  344. /package/{templates → template_project}/.claude/skills/test-driven-development/reference-tables.md +0 -0
  345. /package/{templates → template_project}/.claude/skills/testing-anti-patterns/SKILL.md +0 -0
  346. /package/{templates → template_project}/.claude/skills/testing-anti-patterns/reference-tables.md +0 -0
  347. /package/{templates → template_project}/.claude/skills/testing-quality/SKILL.md +0 -0
  348. /package/{templates → template_project}/.claude/skills/update-status/SKILL.md +0 -0
  349. /package/{templates → template_project}/.claude/skills/verification-before-completion/SKILL.md +0 -0
  350. /package/{templates → template_project}/.claude/skills/verification-before-completion/key-patterns.md +0 -0
  351. /package/{templates → template_project}/.claude/skills/webapp-testing/LICENSE.txt +0 -0
  352. /package/{templates → template_project}/.claude/skills/webapp-testing/SKILL.md +0 -0
  353. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/console_logging.py +0 -0
  354. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/element_discovery.py +0 -0
  355. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/static_html_automation.py +0 -0
  356. /package/{templates → template_project}/.claude/skills/webapp-testing/scripts/with_server.py +0 -0
  357. /package/{templates → template_project}/.claude/ukit/index/anchor-search.mjs +0 -0
  358. /package/{templates → template_project}/.claude/ukit/index/build-index.mjs +0 -0
  359. /package/{templates → template_project}/.claude/ukit/index/cache-utils.mjs +0 -0
  360. /package/{templates → template_project}/.claude/ukit/index/extract-image.mjs +0 -0
  361. /package/{templates → template_project}/.claude/ukit/index/impact-context.mjs +0 -0
  362. /package/{templates → template_project}/.claude/ukit/index/post-edit-verify.mjs +0 -0
  363. /package/{templates → template_project}/.claude/ukit/index/pre-edit-backup.mjs +0 -0
  364. /package/{templates → template_project}/.claude/ukit/index/provision-worktree.mjs +0 -0
  365. /package/{templates → template_project}/.claude/ukit/index/query-index.mjs +0 -0
  366. /package/{templates → template_project}/.claude/ukit/index/refresh-index.mjs +0 -0
  367. /package/{templates → template_project}/.claude/ukit/index/reset-auto-permissions.mjs +0 -0
  368. /package/{templates → template_project}/.claude/ukit/index/resolve-context.mjs +0 -0
  369. /package/{templates → template_project}/.claude/ukit/index/route-catalog.mjs +0 -0
  370. /package/{templates → template_project}/.claude/ukit/index/safe-patch.mjs +0 -0
  371. /package/{templates → template_project}/.claude/ukit/index/stale-spec-check.mjs +0 -0
  372. /package/{templates → template_project}/.claude/ukit/index/task-budget-validator.mjs +0 -0
  373. /package/{templates → template_project}/.claude/ukit/index/triage.mjs +0 -0
  374. /package/{templates → template_project}/.claude/ukit/index/verify-context.mjs +0 -0
  375. /package/{templates → template_project}/.claude/ukit/runtime/async-lock.mjs +0 -0
  376. /package/{templates → template_project}/.claude/ukit/runtime/compact-threshold.mjs +0 -0
  377. /package/{templates → template_project}/.claude/ukit/runtime/context-capacity.mjs +0 -0
  378. /package/{templates → template_project}/.claude/ukit/runtime/hook-chain-budget.mjs +0 -0
  379. /package/{templates → template_project}/.claude/ukit/runtime/hook-chain-runner.mjs +0 -0
  380. /package/{templates → template_project}/.claude/ukit/runtime/hook-field-salvage.mjs +0 -0
  381. /package/{templates → template_project}/.claude/ukit/runtime/hook-input.mjs +0 -0
  382. /package/{templates → template_project}/.claude/ukit/runtime/hook-input.sh +0 -0
  383. /package/{templates → template_project}/.claude/ukit/runtime/hook-payload-store.mjs +0 -0
  384. /package/{templates → template_project}/.claude/ukit/runtime/hook-process.mjs +0 -0
  385. /package/{templates → template_project}/.claude/ukit/runtime/hook-telemetry.mjs +0 -0
  386. /package/{templates → template_project}/.claude/ukit/runtime/hook-telemetry.sh +0 -0
  387. /package/{templates → template_project}/.claude/ukit/runtime/output-compression.mjs +0 -0
  388. /package/{templates → template_project}/.claude/ukit/runtime/project-important.mjs +0 -0
  389. /package/{templates → template_project}/.claude/ukit/runtime/reinject-context.mjs +0 -0
  390. /package/{templates → template_project}/.claude/ukit/runtime/stop-coordinator.mjs +0 -0
  391. /package/{templates → template_project}/.claude/ukit/runtime/text-profile.mjs +0 -0
  392. /package/{templates → template_project}/.claude/ukit/runtime/token-utils.mjs +0 -0
  393. /package/{templates → template_project}/.claude/ukit/runtime/transcript-tail.mjs +0 -0
  394. /package/{templates → template_project}/.claude/ukit/skill-router-state.json +0 -0
  395. /package/{templates → template_project}/.codex/README.md +0 -0
  396. /package/{templates → template_project}/.codex/settings.json +0 -0
  397. /package/{templates → template_project}/.omp/AGENTS.md +0 -0
  398. /package/{templates → template_project}/.omp/README.md +0 -0
  399. /package/{templates → template_project}/.omp/agents/bug-debugger.md +0 -0
  400. /package/{templates → template_project}/.omp/agents/code-reviewer.md +0 -0
  401. /package/{templates → template_project}/.omp/agents/feature-implementer.md +0 -0
  402. /package/{templates → template_project}/.omp/agents/ukit-small-task-maintainer.md +0 -0
  403. /package/{templates → template_project}/.omp/agents/ukit-vision-analyst.md +0 -0
  404. /package/{templates → template_project}/.omp/hooks/pre/ukit-bridge.js +0 -0
  405. /package/{templates → template_project}/.ukit/storage/cache/hook-latency/unknown.jsonl +0 -0
  406. /package/{templates → template_project}/PROJECT_IMPORTANT.md +0 -0
  407. /package/{templates → template_project}/adapter-presets/claude/settings.local.json +0 -0
  408. /package/{templates → template_project}/adapter-presets/codex/settings.local.json +0 -0
  409. /package/{templates → template_project}/docs/AI_HANDOFF/ACTIVE.md +0 -0
  410. /package/{templates → template_project}/docs/AI_HANDOFF/HISTORY.md +0 -0
  411. /package/{templates → template_project}/docs/AI_HANDOFF/INDEX.md +0 -0
  412. /package/{templates → template_project}/docs/AI_HANDOFF/PLAN.md +0 -0
  413. /package/{templates → template_project}/docs/AI_HANDOFF/SPEC.md +0 -0
  414. /package/{templates → template_project}/docs/AI_HANDOFF/archive/.gitkeep +0 -0
  415. /package/{templates → template_project}/docs/AI_HANDOFF/tasks/.gitkeep +0 -0
  416. /package/{templates → template_project}/docs/AI_HANDOFF/tasks/_TEMPLATE.md +0 -0
  417. /package/{templates → template_project}/docs/BUGFIX.md +0 -0
  418. /package/{templates → template_project}/docs/BUG_INDEX.md +0 -0
  419. /package/{templates → template_project}/docs/BUG_METRICS.md +0 -0
  420. /package/{templates → template_project}/docs/BUG_TEMPLATE.md +0 -0
  421. /package/{templates → template_project}/docs/CODE_MAP.md +0 -0
  422. /package/{templates → template_project}/docs/MEMORY.md +0 -0
  423. /package/{templates → template_project}/docs/PROJECT.md +0 -0
  424. /package/{templates → template_project}/docs/PROMPT_CACHING.md +0 -0
  425. /package/{templates → template_project}/docs/WORKLOG.md +0 -0
  426. /package/{templates → template_project}/instructions/overlays/agents.md +0 -0
  427. /package/{templates → template_project}/instructions/overlays/omp-rules.md +0 -0
  428. /package/{templates → template_project}/instructions/repo-vars.yaml +0 -0
  429. /package/{templates → template_project}/ukit/README.md +0 -0
  430. /package/{templates → template_project}/ukit/storage/cache/compact-history.json +0 -0
  431. /package/{templates → template_project}/ukit/storage/cache/compact-pressure.json +0 -0
  432. /package/{templates → template_project}/ukit/storage/cache/output-history.json +0 -0
  433. /package/{templates → template_project}/ukit/storage/cache/prompt-cache.json +0 -0
  434. /package/{templates → template_project}/ukit/storage/memory/sessions/.gitkeep +0 -0
  435. /package/{templates → template_project}/ukit/storage/memory/user.json +0 -0
  436. /package/{templates/user → template_user}/README.md +0 -0
  437. /package/{templates/user → template_user}/playbooks/bug-fix.md +0 -0
  438. /package/{templates/user → template_user}/playbooks/issue-implementation.md +0 -0
  439. /package/{templates/user → template_user}/storage/config.json +0 -0
@@ -0,0 +1,214 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * v3-ceremony.mjs — planned-ceremony delta harness (SPEC FR-008, M05.1').
4
+ *
5
+ * Seeds a fixture project (same shape as seedOrchestrationLadderFixtureProject /
6
+ * the corpus test seeder), runs every V3_ROUTE_CORPUS case through
7
+ * deriveTaskRoute twice — routing.fastPath.stage 'off' vs 'shadow' (rigor stays
8
+ * 'shadow' in both so riskFloor is emitted on both sides) — and prints a report
9
+ * of the planned-ceremony surface: skills, helper commands, advisory blocks,
10
+ * suppressed ceremony, elapsedMs.
11
+ *
12
+ * This is a measurement tool, not a gate: it always exits 0. A zero delta is a
13
+ * finding, not a failure.
14
+ *
15
+ * Usage:
16
+ * node scripts/bench/v3-ceremony.mjs [--tsv]
17
+ */
18
+
19
+ import fs from 'node:fs/promises';
20
+ import path from 'node:path';
21
+ import os from 'node:os';
22
+ import { fileURLToPath } from 'node:url';
23
+
24
+ import { buildCodeIndex } from '../../src/index/buildIndex.js';
25
+ import { deriveTaskRoute } from '../../src/index/taskRouting.js';
26
+ import { V3_ROUTE_CORPUS } from '../../tests/fixtures/v3RouteCorpus.js';
27
+
28
+ const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
29
+
30
+ // fastPath off vs on; rigor stays 'shadow' in both runs so riskFloor is emitted
31
+ // and the only moving part is the Fast Path stage itself.
32
+ const CONFIG_OFF = { routing: { rigor: { stage: 'shadow' }, fastPath: { stage: 'off' } } };
33
+ const CONFIG_ON = { routing: { rigor: { stage: 'shadow' }, fastPath: { stage: 'shadow' } } };
34
+
35
+ async function createFixtureFile(rootDir, relativePath, contents = 'export default true;\n') {
36
+ const absolutePath = path.join(rootDir, relativePath);
37
+ await fs.mkdir(path.dirname(absolutePath), { recursive: true });
38
+ await fs.writeFile(absolutePath, contents, 'utf8');
39
+ }
40
+
41
+ // Same seeded project shape as the corpus test — the ladder fixture plus the
42
+ // db/migrations tree the schema-change cases target.
43
+ async function seedFixtureProject(rootDir) {
44
+ await fs.mkdir(path.join(rootDir, '.claude', 'skills'), { recursive: true });
45
+ await fs.writeFile(
46
+ path.join(rootDir, 'package.json'),
47
+ JSON.stringify({
48
+ packageManager: 'yarn@1.22.22',
49
+ scripts: {
50
+ test: 'vitest',
51
+ lint: 'eslint .',
52
+ typecheck: 'tsc --noEmit',
53
+ },
54
+ }, null, 2),
55
+ 'utf8',
56
+ );
57
+
58
+ await createFixtureFile(rootDir, 'src/core/fileOps.js', 'export function writeFileAtomic(input) { return input; }\n');
59
+ await createFixtureFile(rootDir, 'src/core/applyPlan.js', 'export function applyPlan(plan) { return plan; }\n');
60
+ await createFixtureFile(rootDir, 'src/pages/AdminHome.js', 'export function AdminHome() { return true; }\n');
61
+ await createFixtureFile(rootDir, 'src/api/auth/login.js', 'export async function login() { return { ok: true }; }\n');
62
+ await createFixtureFile(rootDir, 'src/db/migrations/001_init.sql', 'CREATE TABLE sessions (id text);\n');
63
+ await createFixtureFile(rootDir, 'src/db/migrations/002_drop_sessions.sql', 'DROP TABLE sessions;\n');
64
+ await createFixtureFile(rootDir, '.claude/hooks/skill-router.sh', '#!/bin/bash\necho skill-router\n');
65
+ await createFixtureFile(rootDir, 'template_project/.claude/ukit/runtime/reinject-context.mjs', 'export function reinject() { return true; }\n');
66
+ await createFixtureFile(rootDir, 'template_project/.claude/ukit/index/route-task.mjs', 'export function routeTask() { return true; }\n');
67
+ await createFixtureFile(rootDir, 'template_project/ukit/storage/config.json', '{ "version": "1.4.2" }\n');
68
+
69
+ await buildCodeIndex({ rootDir });
70
+ }
71
+
72
+ // The planned-ceremony surface of one route: which skills were activated, which
73
+ // helper commands were planned, which advisory blocks were emitted, and what
74
+ // Fast Path suppressed.
75
+ function measureRoute(route) {
76
+ const summary = route?.routeSummary ?? {};
77
+ const helperCommands = [
78
+ ...(summary.primaryCommands ?? []),
79
+ ...(summary.fallbackCommands ?? []),
80
+ summary.helperHint,
81
+ summary.nextActionCommand,
82
+ ].filter(Boolean);
83
+ const advisoryBlocks = [
84
+ summary.workflowPolicy ? 'workflowPolicy' : null,
85
+ summary.principleIndex ? 'principleIndex' : null,
86
+ summary.modelRolesBlock ? 'modelRolesBlock' : null,
87
+ ].filter(Boolean);
88
+ return {
89
+ executionMode: summary.executionMode ?? route?.routingContext?.executionMode ?? null,
90
+ riskFloor: summary.riskFloor?.floor ?? null,
91
+ skills: (route?.activeSkills ?? []).map((entry) => entry.id),
92
+ helperCommands: [...new Set(helperCommands)],
93
+ advisoryBlocks,
94
+ eligible: summary.fastPath?.eligible ?? null,
95
+ suppressed: summary.fastPath?.suppressed ?? [],
96
+ };
97
+ }
98
+
99
+ async function measureCase(rootDir, entry, runtimeConfig) {
100
+ const started = performance.now();
101
+ const route = await deriveTaskRoute({
102
+ rootDir,
103
+ promptText: entry.prompt,
104
+ commandText: entry.commandText ?? '',
105
+ targetFile: entry.targetFile,
106
+ commandNamespace: '.codex',
107
+ runtimeConfig,
108
+ });
109
+ return { ...measureRoute(route), elapsedMs: Math.round(performance.now() - started) };
110
+ }
111
+
112
+ async function runCase(rootDir, entry) {
113
+ const row = { name: entry.name, lang: entry.lang, targetFile: entry.targetFile ?? null };
114
+ try {
115
+ row.fastPathOff = await measureCase(rootDir, entry, CONFIG_OFF);
116
+ } catch (error) {
117
+ row.fastPathOff = { error: error?.message ?? String(error) };
118
+ }
119
+ try {
120
+ row.fastPathOn = await measureCase(rootDir, entry, CONFIG_ON);
121
+ } catch (error) {
122
+ row.fastPathOn = { error: error?.message ?? String(error) };
123
+ }
124
+ if (row.fastPathOff.error || row.fastPathOn.error) {
125
+ row.error = row.fastPathOff.error ?? row.fastPathOn.error;
126
+ }
127
+ return row;
128
+ }
129
+
130
+ function sumMetric(cases, side, metric) {
131
+ return cases.reduce((total, entry) => total + (entry[side]?.[metric]?.length ?? 0), 0);
132
+ }
133
+
134
+ function buildSummary(cases) {
135
+ const totals = {};
136
+ for (const side of ['fastPathOff', 'fastPathOn']) {
137
+ totals[side] = {
138
+ skills: sumMetric(cases, side, 'skills'),
139
+ helperCommands: sumMetric(cases, side, 'helperCommands'),
140
+ advisoryBlocks: sumMetric(cases, side, 'advisoryBlocks'),
141
+ suppressed: sumMetric(cases, side, 'suppressed'),
142
+ elapsedMs: cases.reduce((total, entry) => total + (entry[side]?.elapsedMs ?? 0), 0),
143
+ };
144
+ }
145
+ const fastPathEligibleCount = cases.filter((entry) => entry.fastPathOn?.eligible === true).length;
146
+ return {
147
+ caseCount: cases.length,
148
+ fastPathOff: totals.fastPathOff,
149
+ fastPathOn: totals.fastPathOn,
150
+ delta: {
151
+ skills: totals.fastPathOn.skills - totals.fastPathOff.skills,
152
+ helperCommands: totals.fastPathOn.helperCommands - totals.fastPathOff.helperCommands,
153
+ advisoryBlocks: totals.fastPathOn.advisoryBlocks - totals.fastPathOff.advisoryBlocks,
154
+ suppressed: totals.fastPathOn.suppressed - totals.fastPathOff.suppressed,
155
+ elapsedMs: totals.fastPathOn.elapsedMs - totals.fastPathOff.elapsedMs,
156
+ fastPathEligibleCount,
157
+ },
158
+ };
159
+ }
160
+
161
+ function renderTsv(report) {
162
+ const header = [
163
+ 'name', 'mode', 'riskFloor', 'eligible',
164
+ 'off.skills', 'off.helpers', 'off.advisory', 'off.suppressed', 'off.ms',
165
+ 'on.skills', 'on.helpers', 'on.advisory', 'on.suppressed', 'on.ms',
166
+ ];
167
+ const cell = (value) => String(value ?? '').replaceAll('\t', ' ');
168
+ const rows = report.cases.map((entry) => {
169
+ const off = entry.fastPathOff ?? {};
170
+ const on = entry.fastPathOn ?? {};
171
+ return [
172
+ entry.name,
173
+ on.executionMode ?? off.executionMode,
174
+ on.riskFloor ?? off.riskFloor,
175
+ on.eligible,
176
+ off.skills?.length, off.helperCommands?.length, off.advisoryBlocks?.length, off.suppressed?.length, off.elapsedMs,
177
+ on.skills?.length, on.helperCommands?.length, on.advisoryBlocks?.length, on.suppressed?.length, on.elapsedMs,
178
+ ].map(cell).join('\t');
179
+ });
180
+ const d = report.summary.delta;
181
+ rows.push([
182
+ 'SUMMARY', `${report.summary.caseCount} cases`, '', `eligible=${d.fastPathEligibleCount}`,
183
+ report.summary.fastPathOff.skills, report.summary.fastPathOff.helperCommands,
184
+ report.summary.fastPathOff.advisoryBlocks, report.summary.fastPathOff.suppressed,
185
+ report.summary.fastPathOff.elapsedMs,
186
+ report.summary.fastPathOn.skills, report.summary.fastPathOn.helperCommands,
187
+ report.summary.fastPathOn.advisoryBlocks, report.summary.fastPathOn.suppressed,
188
+ report.summary.fastPathOn.elapsedMs,
189
+ ].map(cell).join('\t'));
190
+ return [header.join('\t'), ...rows].join('\n');
191
+ }
192
+
193
+ async function main() {
194
+ const tsv = process.argv.slice(2).includes('--tsv');
195
+ const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'ukit-v3-ceremony-'));
196
+ try {
197
+ await seedFixtureProject(tmpDir);
198
+ const cases = [];
199
+ for (const entry of V3_ROUTE_CORPUS) {
200
+ cases.push(await runCase(tmpDir, entry));
201
+ }
202
+ const report = { cases, summary: buildSummary(cases) };
203
+ console.log(tsv ? renderTsv(report) : JSON.stringify(report, null, 2));
204
+ } finally {
205
+ await fs.rm(tmpDir, { recursive: true, force: true });
206
+ }
207
+ }
208
+
209
+ // Measurement tool, not a gate: even a catastrophic failure reports and exits 0.
210
+ try {
211
+ await main();
212
+ } catch (error) {
213
+ console.log(JSON.stringify({ cases: [], summary: null, fatal: error?.message ?? String(error) }));
214
+ }
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // C5 (docs/AI_REPORT/archive/2026-09-20-CORRECTNESS.md §C5) — scoped mirror sync/check.
3
3
  //
4
- // The installed `.claude/` + `.omp/` mirror is a *rendered* copy of `templates/.claude`
5
- // + `templates/.omp`, and hand-copying it drifted three separate ways this cycle:
4
+ // The installed `.claude/` + `.omp/` mirror is a *rendered* copy of `template_project/.claude`
5
+ // + `template_project/.omp`, and hand-copying it drifted three separate ways this cycle:
6
6
  // a template change never re-copied, a raw copy that kept its literal `{{token}}`
7
7
  // because nobody rendered it, and `settings.json`'s two gateway-injected env keys,
8
8
  // which make whole-file byte identity impossible by construction. Parallel lanes
@@ -26,7 +26,7 @@
26
26
  // user-owned, not template-derived. They are excluded from drift AND from apply —
27
27
  // a hands-off file must never read as drift, and this tool is not an installer.
28
28
  // * Mirror-only detection is limited to the target directories of *selected,
29
- // non-link* manifest items — directories UKit owns wholesale from `templates/`.
29
+ // non-link* manifest items — directories UKit owns wholesale from `template_project/`.
30
30
  // A blanket walk of `.claude/` reports ~226 false positives, because pack-gated
31
31
  // skill libraries (e.g. `.claude/skills/frontend-vue/**` on a `core`-only project)
32
32
  // are present in the mirror but intentionally outside the current plan. Those
@@ -57,10 +57,10 @@ const HOTSPOT_P50_MS = 50;
57
57
  // telemetry `node --finish` child armed by hook-telemetry.sh.
58
58
  const PROCESSES_PER_HOOK_ROW = 3;
59
59
 
60
- const HOOKS_SUBPATH = ['templates', '.claude', 'hooks'];
60
+ const HOOKS_SUBPATH = ['template_project', '.claude', 'hooks'];
61
61
  const CHAIN_RUNNER_LABEL = 'hook-chain-runner';
62
62
  // The ONE append API every hook writes through — the subject of the O5 benchmark.
63
- const TELEMETRY_MODULE_SUBPATH = ['templates', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs'];
63
+ const TELEMETRY_MODULE_SUBPATH = ['template_project', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs'];
64
64
 
65
65
  // Index/router helpers a prompt or an edit pays a cold start for (SPEC §2.5).
66
66
  const ROUTER_HELPERS = [
@@ -383,7 +383,7 @@ function loadSettings(root, override) {
383
383
  const candidates = override
384
384
  ? [override]
385
385
  : [
386
- path.join(root, 'templates', '.claude', 'settings.json'),
386
+ path.join(root, 'template_project', '.claude', 'settings.json'),
387
387
  path.join(root, '.claude', 'settings.json'),
388
388
  ];
389
389
  for (const candidate of candidates) {
@@ -438,7 +438,7 @@ function scratchRoot(label) {
438
438
 
439
439
  function benchmarkFloor(root, iterations) {
440
440
  const env = { ...process.env, CLAUDE_PROJECT_DIR: root };
441
- const telemetryTwin = path.join(root, 'templates', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs');
441
+ const telemetryTwin = path.join(root, 'template_project', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs');
442
442
  const scratch = scratchRoot('floor');
443
443
  try {
444
444
  return {
@@ -464,7 +464,7 @@ function benchmarkFloor(root, iterations) {
464
464
  /** The telemetry writer a tree ships, preferring the template (like hooksDir). */
465
465
  function telemetryModulePath(root) {
466
466
  const candidates = [
467
- path.join(root, 'templates', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs'),
467
+ path.join(root, 'template_project', '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs'),
468
468
  path.join(root, '.claude', 'ukit', 'runtime', 'hook-telemetry.mjs'),
469
469
  ];
470
470
  return candidates.find((candidate) => fs.existsSync(candidate)) || null;
@@ -554,9 +554,9 @@ function recentHotPathAdditions(root, sinceDays) {
554
554
  '--name-only',
555
555
  '--diff-filter=A',
556
556
  '--',
557
- 'templates/.claude/hooks',
558
- 'templates/.claude/ukit/runtime',
559
- 'templates/.claude/ukit/index',
557
+ 'template_project/.claude/hooks',
558
+ 'template_project/.claude/ukit/runtime',
559
+ 'template_project/.claude/ukit/index',
560
560
  '.claude/hooks',
561
561
  '.claude/ukit/runtime',
562
562
  ],
@@ -763,7 +763,7 @@ function buildFindings(context) {
763
763
  id: 'c29-c32-hot-path-additions',
764
764
  area: `recent hot-path additions — ${addedFiles.length} files across ${additions.length} commits`,
765
765
  evidence: 'git-log',
766
- evidenceDetail: `git log --since=${context.sinceDays} days ago --diff-filter=A -- templates/.claude/hooks templates/.claude/ukit/runtime templates/.claude/ukit/index: ${addedFiles.slice(0, 12).join(', ')}${addedFiles.length > 12 ? `, +${addedFiles.length - 12} more` : ''}`,
766
+ evidenceDetail: `git log --since=${context.sinceDays} days ago --diff-filter=A -- template_project/.claude/hooks template_project/.claude/ukit/runtime template_project/.claude/ukit/index: ${addedFiles.slice(0, 12).join(', ')}${addedFiles.length > 12 ? `, +${addedFiles.length - 12} more` : ''}`,
767
767
  p50ms: null,
768
768
  p95ms: null,
769
769
  totalMs: null,
@@ -9,8 +9,8 @@
9
9
  "rows": 62854,
10
10
  "files": 120
11
11
  },
12
- "settings": "/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/templates/.claude/settings.json",
13
- "hooksDir": "/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/templates/.claude/hooks",
12
+ "settings": "/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/template_project/.claude/settings.json",
13
+ "hooksDir": "/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/template_project/.claude/hooks",
14
14
  "benchmarkIterations": 2,
15
15
  "gitLogWindowDays": 14
16
16
  },
@@ -279,7 +279,7 @@
279
279
  "id": "c29-c32-hot-path-additions",
280
280
  "area": "recent hot-path additions — 24 files across 18 commits",
281
281
  "evidence": "git-log",
282
- "evidenceDetail": "git log --since=14 days ago --diff-filter=A -- templates/.claude/hooks templates/.claude/ukit/runtime templates/.claude/ukit/index: templates/.claude/hooks/block-dangerous.mjs, templates/.claude/hooks/record-execution.mjs, templates/.claude/hooks/sensitive-data-guard.mjs, templates/.claude/ukit/runtime/hook-field-salvage.mjs, templates/.claude/hooks/session-episode.sh, templates/.claude/hooks/project-important.sh, templates/.claude/hooks/project-important.sh, templates/.claude/ukit/runtime/project-important.mjs, templates/.claude/ukit/runtime/sensitive-value-scanner.mjs, templates/.claude/ukit/runtime/hook-chain-budget.mjs, templates/.claude/ukit/runtime/stop-coordinator.mjs, templates/.claude/ukit/runtime/hook-payload-store.mjs, +12 more",
282
+ "evidenceDetail": "git log --since=14 days ago --diff-filter=A -- template_project/.claude/hooks template_project/.claude/ukit/runtime template_project/.claude/ukit/index: template_project/.claude/hooks/block-dangerous.mjs, template_project/.claude/hooks/record-execution.mjs, template_project/.claude/hooks/sensitive-data-guard.mjs, template_project/.claude/ukit/runtime/hook-field-salvage.mjs, template_project/.claude/hooks/session-episode.sh, template_project/.claude/hooks/project-important.sh, template_project/.claude/hooks/project-important.sh, template_project/.claude/ukit/runtime/project-important.mjs, template_project/.claude/ukit/runtime/sensitive-value-scanner.mjs, template_project/.claude/ukit/runtime/hook-chain-budget.mjs, template_project/.claude/ukit/runtime/stop-coordinator.mjs, template_project/.claude/ukit/runtime/hook-payload-store.mjs, +12 more",
283
283
  "p50ms": null,
284
284
  "p95ms": null,
285
285
  "totalMs": null,
@@ -318,7 +318,7 @@
318
318
  "id": "telemetry-append-overhead",
319
319
  "area": "telemetry append overhead — appendTelemetryRow, in-process against a throwaway project root",
320
320
  "evidence": "micro-benchmark",
321
- "evidenceDetail": "appendTelemetryRow over 2 iterations against a temp project root (the audited telemetry dir is never written): p50 0.407ms, p95 0.407ms, max 0.407ms, total 0.464ms; writer templates/.claude/ukit/runtime/hook-telemetry.mjs",
321
+ "evidenceDetail": "appendTelemetryRow over 2 iterations against a temp project root (the audited telemetry dir is never written): p50 0.407ms, p95 0.407ms, max 0.407ms, total 0.464ms; writer template_project/.claude/ukit/runtime/hook-telemetry.mjs",
322
322
  "p50ms": 0.407125,
323
323
  "p95ms": 0.407125,
324
324
  "totalMs": 0.464083,
@@ -17,7 +17,7 @@ node scripts/perf/diff-perf-findings.mjs <earlier-snapshot>.json scripts/perf/pe
17
17
  node --test tests/handoff/c33/perfFindings.test.js
18
18
 
19
19
  - root: `/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit`
20
- - settings.json: `/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/templates/.claude/settings.json`
20
+ - settings.json: `/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/template_project/.claude/settings.json`
21
21
  - hooks resolved from: `NOT FOUND`
22
22
  - telemetry: `/Volumes/KHOA_EXTENAL/WORKING_PROJECT/WORKING/UKit/.ukit/storage/cache/hook-latency` — 62854 rows in 120 files
23
23
  - snapshot provenance: generatedAt `2026-09-20T23:07:33.744Z`, telemetryRows: 62854, telemetryFiles: 120 — hooks append continuously, so a report is a point-in-time view, not a stable dataset
@@ -39,7 +39,7 @@ A hook row = wrapper bash + node runtime + advisory telemetry child = **3 proces
39
39
  |---|---|---|---|---|
40
40
  | `appendTelemetryRow` → throwaway temp root | 2 | 0.407 | 0.407 | 0.407 |
41
41
 
42
- Writer: `templates/.claude/ukit/runtime/hook-telemetry.mjs`. Measured against a temp project root, so auditing a tree never adds rows to the dataset it is counting.
42
+ Writer: `template_project/.claude/ukit/runtime/hook-telemetry.mjs`. Measured against a temp project root, so auditing a tree never adds rows to the dataset it is counting.
43
43
 
44
44
  ## 4. Per-hook standalone re-run (`/bin/bash <script>` with `{}` on stdin, ms)
45
45
  | hook | p50 | p95 | max |
@@ -210,24 +210,24 @@ split or never staged stdin: it is excluded, never counted as a 0ms stage.
210
210
 
211
211
  | commit | date | subject | files added |
212
212
  |---|---|---|---|
213
- | `c0443e73` | 2026-09-20 | handoff: wave 2 — TASK-003 (block-dangerous.mjs port) + TASK-004 (record-execution.mjs + ledger emitter) + manifest module entries | `templates/.claude/hooks/block-dangerous.mjs`, `templates/.claude/hooks/record-execution.mjs` |
214
- | `79f747b6` | 2026-09-20 | handoff: wave 1 — TASK-001 (runner .mjs module-steps) + TASK-002 (sensitive-data-guard port + field-salvage) | `templates/.claude/hooks/sensitive-data-guard.mjs`, `templates/.claude/ukit/runtime/hook-field-salvage.mjs` |
215
- | `6b339905` | 2026-09-20 | handoff: wave 3 — TASK-231, TASK-232 | `templates/.claude/hooks/session-episode.sh` |
216
- | `4903ee62` | 2026-09-18 | handoff: restore wave-4a files removed by stale worktree diff | `templates/.claude/hooks/project-important.sh` |
217
- | `2b367850` | 2026-09-18 | handoff: wave 4a — TASK-041 (sessionstart wiring, hook template+manifest) | `templates/.claude/hooks/project-important.sh` |
218
- | `5ffefb09` | 2026-09-18 | handoff: wave 3 — TASK-038 | `templates/.claude/ukit/runtime/project-important.mjs`, `templates/.claude/ukit/runtime/sensitive-value-scanner.mjs` |
219
- | `ebb846b8` | 2026-09-17 | handoff: R4.5 fix round 1 — TASK-018, TASK-023 | `templates/.claude/ukit/runtime/hook-chain-budget.mjs` |
220
- | `c9da9734` | 2026-09-17 | handoff: wave 6 — TASK-025 copy-back (Stop coordinator) | `templates/.claude/ukit/runtime/stop-coordinator.mjs` |
221
- | `a1361afd` | 2026-09-17 | handoff: wave 5 — TASK-031 copy-back | `templates/.claude/ukit/runtime/hook-payload-store.mjs` |
222
- | `66787f98` | 2026-09-17 | handoff: wave 5 — TASK-019 copy-back | `templates/.claude/ukit/runtime/hook-telemetry.mjs`, `templates/.claude/ukit/runtime/hook-telemetry.sh` |
223
- | `3afc88e6` | 2026-09-17 | handoff: wave 5 — TASK-029 copy-back (context capacity negotiation) | `templates/.claude/ukit/runtime/context-capacity.mjs` |
224
- | `6f224875` | 2026-09-17 | handoff: wave 3 — TASK-028 copy-back | `templates/.claude/ukit/runtime/async-lock.mjs` |
225
- | `e4b647a3` | 2026-09-17 | handoff: wave 3 — TASK-016 copy-back | `templates/.claude/ukit/runtime/hook-process.mjs` |
226
- | `7aa89361` | 2026-09-17 | handoff: wave 2 — TASK-015, TASK-017 | `templates/.claude/ukit/runtime/transcript-tail.mjs` |
227
- | `2652bbff` | 2026-09-17 | milestone: TASK-014 bounded stdin transport (H01) | `templates/.claude/ukit/runtime/hook-input.mjs`, `templates/.claude/ukit/runtime/hook-input.sh` |
228
- | `6b40da83` | 2026-09-12 | handoff: wave 1 batch 2 — TASK-016 wall-clock watchdog hook (hardPolicy=split) | `templates/.claude/hooks/task-watchdog.sh`, `templates/.claude/ukit/runtime/task-watchdog.mjs` |
229
- | `0fc81692` | 2026-09-12 | handoff: wave 1 fix — anchor runtime-dir ignores, track lost TASK-014 CLI twin | `templates/.claude/ukit/index/task-budget-validator.mjs` |
230
- | `cfc3b7f1` | 2026-09-08 | 2.3.0 — fail-closed sensitive-data gate; contract tables unified to executionContracts.js; tierLane wiring; evidence + vision hardening | `templates/.claude/hooks/sensitive-data-guard.sh` |
213
+ | `c0443e73` | 2026-09-20 | handoff: wave 2 — TASK-003 (block-dangerous.mjs port) + TASK-004 (record-execution.mjs + ledger emitter) + manifest module entries | `template_project/.claude/hooks/block-dangerous.mjs`, `template_project/.claude/hooks/record-execution.mjs` |
214
+ | `79f747b6` | 2026-09-20 | handoff: wave 1 — TASK-001 (runner .mjs module-steps) + TASK-002 (sensitive-data-guard port + field-salvage) | `template_project/.claude/hooks/sensitive-data-guard.mjs`, `template_project/.claude/ukit/runtime/hook-field-salvage.mjs` |
215
+ | `6b339905` | 2026-09-20 | handoff: wave 3 — TASK-231, TASK-232 | `template_project/.claude/hooks/session-episode.sh` |
216
+ | `4903ee62` | 2026-09-18 | handoff: restore wave-4a files removed by stale worktree diff | `template_project/.claude/hooks/project-important.sh` |
217
+ | `2b367850` | 2026-09-18 | handoff: wave 4a — TASK-041 (sessionstart wiring, hook template+manifest) | `template_project/.claude/hooks/project-important.sh` |
218
+ | `5ffefb09` | 2026-09-18 | handoff: wave 3 — TASK-038 | `template_project/.claude/ukit/runtime/project-important.mjs`, `template_project/.claude/ukit/runtime/sensitive-value-scanner.mjs` |
219
+ | `ebb846b8` | 2026-09-17 | handoff: R4.5 fix round 1 — TASK-018, TASK-023 | `template_project/.claude/ukit/runtime/hook-chain-budget.mjs` |
220
+ | `c9da9734` | 2026-09-17 | handoff: wave 6 — TASK-025 copy-back (Stop coordinator) | `template_project/.claude/ukit/runtime/stop-coordinator.mjs` |
221
+ | `a1361afd` | 2026-09-17 | handoff: wave 5 — TASK-031 copy-back | `template_project/.claude/ukit/runtime/hook-payload-store.mjs` |
222
+ | `66787f98` | 2026-09-17 | handoff: wave 5 — TASK-019 copy-back | `template_project/.claude/ukit/runtime/hook-telemetry.mjs`, `template_project/.claude/ukit/runtime/hook-telemetry.sh` |
223
+ | `3afc88e6` | 2026-09-17 | handoff: wave 5 — TASK-029 copy-back (context capacity negotiation) | `template_project/.claude/ukit/runtime/context-capacity.mjs` |
224
+ | `6f224875` | 2026-09-17 | handoff: wave 3 — TASK-028 copy-back | `template_project/.claude/ukit/runtime/async-lock.mjs` |
225
+ | `e4b647a3` | 2026-09-17 | handoff: wave 3 — TASK-016 copy-back | `template_project/.claude/ukit/runtime/hook-process.mjs` |
226
+ | `7aa89361` | 2026-09-17 | handoff: wave 2 — TASK-015, TASK-017 | `template_project/.claude/ukit/runtime/transcript-tail.mjs` |
227
+ | `2652bbff` | 2026-09-17 | milestone: TASK-014 bounded stdin transport (H01) | `template_project/.claude/ukit/runtime/hook-input.mjs`, `template_project/.claude/ukit/runtime/hook-input.sh` |
228
+ | `6b40da83` | 2026-09-12 | handoff: wave 1 batch 2 — TASK-016 wall-clock watchdog hook (hardPolicy=split) | `template_project/.claude/hooks/task-watchdog.sh`, `template_project/.claude/ukit/runtime/task-watchdog.mjs` |
229
+ | `0fc81692` | 2026-09-12 | handoff: wave 1 fix — anchor runtime-dir ignores, track lost TASK-014 CLI twin | `template_project/.claude/ukit/index/task-budget-validator.mjs` |
230
+ | `cfc3b7f1` | 2026-09-08 | 2.3.0 — fail-closed sensitive-data gate; contract tables unified to executionContracts.js; tierLane wiring; evidence + vision hardening | `template_project/.claude/hooks/sensitive-data-guard.sh` |
231
231
 
232
232
  ## 13. Findings emitted
233
233
 
@@ -75,8 +75,8 @@ async function isSelfInstall({ templatesRoot, projectRoot }) {
75
75
  }
76
76
 
77
77
  // In the UKit source repo, docs/ holds canonical sources that deliberately diverge from the
78
- // shipped copies under templates/ (docs/PROMPT_CACHING.md is the full ruleset while
79
- // templates/docs/ ships a distilled version). The refresh-on-update strategy would silently
78
+ // shipped copies under template_project/ (docs/PROMPT_CACHING.md is the full ruleset while
79
+ // template_project/docs/ ships a distilled version). The refresh-on-update strategy would silently
80
80
  // clobber those canonical files, so downgrade docs overwrites to skip: seed a missing doc, but
81
81
  // never overwrite one that already exists.
82
82
  async function downgradeSelfInstallDocOverwrites(planEntries, { templatesRoot, projectRoot }) {
@@ -267,7 +267,7 @@ export async function buildInstallPlan({
267
267
  });
268
268
  }
269
269
 
270
- // Auto-discover files in templates/ not covered by manifest
270
+ // Auto-discover files in template_project/ not covered by manifest
271
271
  if (manifest.autoDiscoverTemplates === true) {
272
272
  const allTemplateFiles = await walkDirectory(templatesRoot);
273
273
 
@@ -6,8 +6,8 @@ import { fileURLToPath } from 'node:url';
6
6
  // code-side defaults, CLAUDE_CODE_AUTO_COMPACT_WINDOW in .claude/settings.json, and
7
7
  // compaction.thresholdTokens in .omp/config.yml — is read or derived from here, so retuning
8
8
  // UKit for a different model context window is a three-number edit in
9
- // templates/ukit/storage/config.json and nothing else.
10
- const SHIPPED_CONFIG_URL = new URL('../../../templates/ukit/storage/config.json', import.meta.url);
9
+ // template_project/ukit/storage/config.json and nothing else.
10
+ const SHIPPED_CONFIG_URL = new URL('../../../template_project/ukit/storage/config.json', import.meta.url);
11
11
 
12
12
  // Only reachable if the package ships without its own templates. Deliberately conservative:
13
13
  // a 200k model survives these, a 1M model merely compacts earlier than it had to.
@@ -4,8 +4,8 @@ import { readJsonIfExists, writeJson, withFileLock } from '../fileOps.js';
4
4
  import {
5
5
  readContextCapacityRecord,
6
6
  SOFT_TO_CAP_RATIO,
7
- } from '../../../templates/.claude/ukit/runtime/compact-threshold.mjs';
8
- import { resolveContextCapTokens } from '../../../templates/.claude/ukit/runtime/context-capacity.mjs';
7
+ } from '../../../template_project/.claude/ukit/runtime/compact-threshold.mjs';
8
+ import { resolveContextCapTokens } from '../../../template_project/.claude/ukit/runtime/context-capacity.mjs';
9
9
  import { buildRuntimePaths } from '../runtimePaths.js';
10
10
  import { buildCompactMachineKey, compressLine, estimateTokenCount } from '../token/index.js';
11
11
  import { compactContextBlock } from './index.js';
@@ -605,7 +605,7 @@ export function resolveThresholdCompactBudget({
605
605
  // advisories), and a brand-new session must not inherit a sibling's totals. The newest
606
606
  // record's flat fields stay projected at the document's top level so readers that predate
607
607
  // this shape (raw JSON readers) still see a coherent state.
608
- // Mirrors templates/.claude/ukit/runtime/compact-threshold.mjs — keep in lockstep.
608
+ // Mirrors template_project/.claude/ukit/runtime/compact-threshold.mjs — keep in lockstep.
609
609
  const PRESSURE_SESSIONS_MAX = 8;
610
610
 
611
611
  function normalizeSessionId(value) {
@@ -47,21 +47,21 @@ const STALE_VERSION_ALLOWLIST = {
47
47
  'same interpolated runtime.nodeVersion — environment fact, not a UKit release pin',
48
48
  'docs/WORKLOG_ARCHIVE.md':
49
49
  'worklog history records past versions as release facts — immutable historical prose',
50
- 'templates/.gitignore':
50
+ 'template_project/.gitignore':
51
51
  'comment records the release that removed a legacy adapter — historical fact',
52
- 'templates/.claude/agents/code-reviewer.md':
52
+ 'template_project/.claude/agents/code-reviewer.md':
53
53
  'rubric row quotes the literal "v1.5.5+ contract" reviewer refusal wording — contractual string',
54
- 'templates/.omp/agents/code-reviewer.md':
54
+ 'template_project/.omp/agents/code-reviewer.md':
55
55
  'omp mirror of the same reviewer rubric row — contractual string',
56
- 'templates/.claude/ukit/index/unic-gateway.mjs':
56
+ 'template_project/.claude/ukit/index/unic-gateway.mjs':
57
57
  'code comments record the omp version gateway detection was verified against — evidence',
58
- 'templates/.omp/hooks/pre/ukit-bridge.js':
58
+ 'template_project/.omp/hooks/pre/ukit-bridge.js':
59
59
  'code comments record omp versions verified during source reads — evidence',
60
- 'templates/.omp/config.yml':
60
+ 'template_project/.omp/config.yml':
61
61
  'comment records the omp version the config keys were verified against — evidence',
62
62
  };
63
63
 
64
- // Files covered by stale-version + render-vars beyond `templates/` generated
64
+ // Files covered by stale-version + render-vars beyond `template_project/` generated
65
65
  // surfaces: the repo-rendered root instructions (registry class is `canonical`
66
66
  // because they are also the project-owner file) and derived mirrors.
67
67
  const RENDERED_EXTRA_TARGETS = ['CLAUDE.md', 'AGENTS.md'];
@@ -240,10 +240,10 @@ async function checkLinks(rootDir, registry) {
240
240
  const resolved = path.normalize(path.join(path.dirname(rel), target));
241
241
  let ok = await existsPath(path.join(rootDir, resolved));
242
242
  // Tolerances: (a) root-relative links (docs write `docs/x.md` from repo
243
- // root), (b) runtime surfaces shipped under templates/ (`.omp/...` in
244
- // source repo lives at templates/.omp/...).
243
+ // root), (b) runtime surfaces shipped under template_project/ (`.omp/...` in
244
+ // source repo lives at template_project/.omp/...).
245
245
  if (!ok) ok = await existsPath(path.join(rootDir, target));
246
- if (!ok) ok = await existsPath(path.join(rootDir, 'templates', target));
246
+ if (!ok) ok = await existsPath(path.join(rootDir, 'template_project', target));
247
247
  if (!ok) broken.push(`${rel}:${i + 1} → ${target}`);
248
248
  }
249
249
  }
@@ -271,10 +271,10 @@ async function checkStaleVersion(rootDir, registry) {
271
271
  return makeCheck(id, label, 'error', { skipped: true, detail: 'package.json version unreadable' });
272
272
  }
273
273
  // Scanned set mirrors staleVersionProse: any-extension files under
274
- // canonical/generated templates/ entries + the rendered root instructions.
274
+ // canonical/generated template_project/ entries + the rendered root instructions.
275
275
  const files = new Set(RENDERED_EXTRA_TARGETS);
276
276
  for (const e of registry.entries) {
277
- if (typeof e.path !== 'string' || !e.path.startsWith('templates/')) continue;
277
+ if (typeof e.path !== 'string' || !e.path.startsWith('template_project/')) continue;
278
278
  if (!['canonical', 'generated'].includes(e.class)) continue;
279
279
  if (e.path.endsWith('/')) {
280
280
  for (const f of await walkFiles(rootDir, e.path.slice(0, -1))) files.add(f);
@@ -307,11 +307,11 @@ async function checkRenderVars(rootDir, registry) {
307
307
  const id = 'render-vars';
308
308
  const label = 'no unresolved {{var}} placeholders in rendered targets';
309
309
  // Rendered surfaces: repo outputs (CLAUDE.md/AGENTS.md) + derived mirrors.
310
- // templates/ generated files legitimately keep {{var}} for install-time
310
+ // template_project/ generated files legitimately keep {{var}} for install-time
311
311
  // interpolation, so they are out of scope.
312
312
  const targets = new Set(RENDERED_EXTRA_TARGETS);
313
313
  for (const e of registry.entries) {
314
- if (typeof e.path !== 'string' || e.class !== 'derived' || e.path.startsWith('templates/')) continue;
314
+ if (typeof e.path !== 'string' || e.class !== 'derived' || e.path.startsWith('template_project/')) continue;
315
315
  // Only .md doc surfaces are render targets — scripts/components/templates
316
316
  // inside derived dirs legitimately use {{ }} as their own placeholders.
317
317
  if (e.path.endsWith('/')) {
@@ -353,7 +353,7 @@ async function checkCommands(rootDir, registry) {
353
353
  const name = m[1];
354
354
  const inRepo = await existsPath(path.join(rootDir, '.claude/commands/ukit', name));
355
355
  const inTemplates = await existsPath(
356
- path.join(rootDir, 'templates/.claude/commands/ukit', name),
356
+ path.join(rootDir, 'template_project/.claude/commands/ukit', name),
357
357
  );
358
358
  if (!inRepo && !inTemplates) missing.push(`${rel}: .claude/commands/ukit/${name}`);
359
359
  }
@@ -579,11 +579,11 @@ async function checkRegistry(rootDir, registry, fileExists) {
579
579
  }
580
580
 
581
581
  async function checkTemplates(rootDir) {
582
- const id = 'templates';
582
+ const id = 'template_project';
583
583
  const label = '_TEMPLATE.md copies declare the Executor Report header fields (FR-013)';
584
584
  const copies = [
585
585
  'docs/AI_HANDOFF/tasks/_TEMPLATE.md',
586
- 'templates/docs/AI_HANDOFF/tasks/_TEMPLATE.md',
586
+ 'template_project/docs/AI_HANDOFF/tasks/_TEMPLATE.md',
587
587
  ];
588
588
  const foundAny = await Promise.all(
589
589
  copies.map((rel) => existsPath(path.join(rootDir, rel))),
@@ -4,7 +4,7 @@ import { writeFileAtomic } from './fileOps.js';
4
4
 
5
5
  // Root-anchored (leading `/`) so the block only ignores project-root entries.
6
6
  // Unanchored dir entries (`.claude/`) match same-named dirs at ANY depth and
7
- // hid templates/.claude from git — the C12 trap `ukit install` kept re-adding.
7
+ // hid template_project/.claude from git — the C12 trap `ukit install` kept re-adding.
8
8
  // Entries with an inner slash (`.claude/ukit/...`) are already root-anchored
9
9
  // by gitignore semantics.
10
10
  const UKIT_ENTRIES = [
@@ -4,8 +4,8 @@
4
4
  // this file:
5
5
  // - src/index/taskRouting.js (in-process routing: contracts + risk profiles + mode order)
6
6
  // - src/core/runtimeConfig.js (config defaults: contracts minus runtime-only keys)
7
- // - templates/ukit/storage/config.json (literal mirror of the config defaults)
8
- // - templates/.claude/ukit/index/route-task.mjs (shipped standalone CLI: contracts + tiers)
7
+ // - template_project/ukit/storage/config.json (literal mirror of the config defaults)
8
+ // - template_project/.claude/ukit/index/route-task.mjs (shipped standalone CLI: contracts + tiers)
9
9
  //
10
10
  // route-task.mjs runs inside target projects and cannot import from src/, so it keeps a
11
11
  // literal copy — tests/consistency/executionContractSync.test.js locks that copy to these
@@ -2,9 +2,9 @@ import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
 
4
4
  // The shipped runtime carries the single lock implementation; src and the
5
- // installed package always ship templates/ together (package.json files list),
5
+ // installed package always ship template_project/ together (package.json files list),
6
6
  // so the protocol twin delegates instead of keeping a driftable copy.
7
- import { journalDroppedLockMutation, withAsyncLock, withTransientFsRetry } from '../../templates/.claude/ukit/runtime/async-lock.mjs';
7
+ import { journalDroppedLockMutation, withAsyncLock, withTransientFsRetry } from '../../template_project/.claude/ukit/runtime/async-lock.mjs';
8
8
 
9
9
  export async function pathExists(targetPath) {
10
10
  try {
@@ -185,7 +185,7 @@ const LOCK_MAX_WAIT_MS = 5_000;
185
185
  * flows in one process (parallel subagents). The lock is a directory created next
186
186
  * to the target file: `mkdir` is atomic, so exactly one caller can create it.
187
187
  *
188
- * The entire lock protocol lives in templates/.claude/ukit/runtime/async-lock.mjs
188
+ * The entire lock protocol lives in template_project/.claude/ukit/runtime/async-lock.mjs
189
189
  * (TASK-004 fix round 1): owner stamping (pid + token + pstart), recycled-pid
190
190
  * detection via recordedProcessGone, claim+quarantine stale reclaim, and verified
191
191
  * release exist exactly once there — this function and the token-utils.mjs twin
@@ -10,7 +10,7 @@
10
10
  * error envelope slip through and kill the user's turn.
11
11
  *
12
12
  * Self-contained and hermetic: `fetchImpl` is injectable. `resolveGatewayBaseUrl` mirrors the
13
- * 3-tier probe order from templates/.claude/ukit/index/unic-gateway.mjs (env → project
13
+ * 3-tier probe order from template_project/.claude/ukit/index/unic-gateway.mjs (env → project
14
14
  * .claude/settings.json → home ~/.claude/settings.json) but is intentionally duplicated
15
15
  * here per PLAN.md §3 (cross-task coupling is the cheaper-than-it-looks debt — see plan).
16
16
  *
@@ -65,7 +65,7 @@ function readSettingsBaseUrl(filePath) {
65
65
 
66
66
  /**
67
67
  * Detects the current custom-gateway base URL using the same 3-tier probe order as
68
- * `templates/.claude/ukit/index/unic-gateway.mjs` (generalized — fires on any non-empty
68
+ * `template_project/.claude/ukit/index/unic-gateway.mjs` (generalized — fires on any non-empty
69
69
  * value, not only the UNIC token):
70
70
  * 1. env.ANTHROPIC_BASE_URL
71
71
  * 2. <projectRoot>/.claude/settings.json -> env.ANTHROPIC_BASE_URL
@@ -24,7 +24,7 @@ import path from 'node:path';
24
24
  // defaults on the next install instead of being mistaken for user intent. Re-running
25
25
  // `ukit install` is a no-op once the keys are in place.
26
26
  //
27
- // Probe order mirrors `templates/.claude/ukit/index/unic-gateway.mjs` (env → project
27
+ // Probe order mirrors `template_project/.claude/ukit/index/unic-gateway.mjs` (env → project
28
28
  // `.claude/settings.json` env → home `~/.claude/settings.json` env) but generalizes to ANY
29
29
  // non-empty `ANTHROPIC_BASE_URL`, not only `unicjsc.com`. The runtime template stays
30
30
  // scoped to UNIC because that's the lane-routing signal; here we only care that the user
@@ -82,7 +82,7 @@ function readBaseUrlFromSettingsFileSync(settingsPath) {
82
82
 
83
83
  /**
84
84
  * Detect whether ANY non-empty ANTHROPIC_BASE_URL is in scope, mirroring the probe order of
85
- * `templates/.claude/ukit/index/unic-gateway.mjs` but generalized. Probe order is strictly
85
+ * `template_project/.claude/ukit/index/unic-gateway.mjs` but generalized. Probe order is strictly
86
86
  * env → project `.claude/settings.json` → home `~/.claude/settings.json`; first non-empty
87
87
  * hit wins, and the returned `source` tells the caller which one matched.
88
88
  *