@ngockhoale/ukit 2.8.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 +8 -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
@@ -354,7 +354,7 @@ function buildRecoveryHintSummary(summary, rawPath, { tokensBefore = 0 } = {}) {
354
354
  }
355
355
 
356
356
  // --- tee/ cache bound (BUG-C21-07, FR-006) -----------------------------------
357
- // Mirror of the bound in templates/.claude/ukit/runtime/output-compression.mjs —
357
+ // Mirror of the bound in template_project/.claude/ukit/runtime/output-compression.mjs —
358
358
  // keep the two implementations identical. persistRawOutput wrote one preserved
359
359
  // file per compression and nothing ever deleted from tee/. Sweeps are SAMPLED
360
360
  // (~1/16 writes, UKIT_TEE_SWEEP_PROBABILITY to force/disable) and BOUNDED
package/src/core/paths.js CHANGED
@@ -6,7 +6,8 @@ export function buildPathConfig({ packageRoot, projectRoot }) {
6
6
  projectRoot,
7
7
  manifestPath: path.join(packageRoot, 'manifests', 'platform.full.yaml'),
8
8
  userManifestPath: path.join(packageRoot, 'manifests', 'platform.user.yaml'),
9
- templatesRoot: path.join(packageRoot, 'templates'),
9
+ templatesRoot: path.join(packageRoot, 'template_project'),
10
+ userTemplatesRoot: path.join(packageRoot, 'template_user'),
10
11
  ukitRoot: path.join(projectRoot, '.claude', 'ukit', '.ukit'),
11
12
  installMetaPath: path.join(projectRoot, '.claude', 'ukit', '.ukit', 'install.json'),
12
13
  backupRoot: path.join(projectRoot, '.claude', 'ukit', '.ukit', 'backups'),
@@ -274,16 +274,18 @@ async function runUserLayerPass({
274
274
  // project install — the whole pass is advisory.
275
275
  const userPaths = buildUserPaths({ homeDir });
276
276
  userLayer.userRoot = userPaths.userRoot;
277
- // pathConfig.userManifestPath is set by buildPathConfig; fall back to the
278
- // package layout (templatesRoot's sibling manifests/) for callers that build
279
- // pathConfig by hand (tests, embedded runners).
277
+ // pathConfig.userManifestPath / userTemplatesRoot are set by buildPathConfig;
278
+ // fall back to the package layout (templatesRoot's siblings manifests/ and
279
+ // template_user/) for callers that build pathConfig by hand.
280
280
  const userManifestPath = pathConfig.userManifestPath
281
281
  ?? path.join(pathConfig.templatesRoot, '..', 'manifests', 'platform.user.yaml');
282
+ const userTemplatesRoot = pathConfig.userTemplatesRoot
283
+ ?? path.join(pathConfig.templatesRoot, '..', 'template_user');
282
284
  const userManifest = await loadManifest(userManifestPath);
283
285
  const userPlan = await buildInstallPlan({
284
286
  manifest: userManifest,
285
287
  stackContext,
286
- templatesRoot: pathConfig.templatesRoot,
288
+ templatesRoot: userTemplatesRoot,
287
289
  variables,
288
290
  projectRoot: userPaths.userRoot,
289
291
  selectedAdapterItemIds,
@@ -259,6 +259,9 @@ export function buildDefaultRuntimeConfig(overrides = {}) {
259
259
  // key treats absence as "off"; stages promote off -> shadow -> canary -> default.
260
260
  routing: {
261
261
  routeSchema: { stage: 'off' },
262
+ rigor: { stage: 'off' },
263
+ fastPath: { stage: 'off' },
264
+ escalation: { stage: 'off' },
262
265
  },
263
266
  // SPEC-model-roles: role→tier map injected into delegating-lane route output.
264
267
  // Values are tier names or 'inherit-parent' — never raw provider model IDs.
@@ -537,12 +540,16 @@ export function validateRuntimeConfig(config) {
537
540
  errors.push('routing must be an object.');
538
541
  } else {
539
542
  const VALID_ROUTE_STAGES = new Set(['off', 'shadow', 'canary', 'default']);
540
- if (config.routing.routeSchema !== undefined) {
541
- if (!isPlainObject(config.routing.routeSchema)) {
542
- errors.push('routing.routeSchema must be an object.');
543
- } else if (config.routing.routeSchema.stage !== undefined
544
- && !VALID_ROUTE_STAGES.has(config.routing.routeSchema.stage)) {
545
- errors.push(`routing.routeSchema.stage must be one of: ${[...VALID_ROUTE_STAGES].join(', ')}.`);
543
+ for (const key of ['routeSchema', 'rigor', 'fastPath', 'escalation']) {
544
+ const stageKey = config.routing[key];
545
+ if (stageKey === undefined) {
546
+ continue;
547
+ }
548
+ if (!isPlainObject(stageKey)) {
549
+ errors.push(`routing.${key} must be an object.`);
550
+ } else if (stageKey.stage !== undefined
551
+ && !VALID_ROUTE_STAGES.has(stageKey.stage)) {
552
+ errors.push(`routing.${key}.stage must be one of: ${[...VALID_ROUTE_STAGES].join(', ')}.`);
546
553
  }
547
554
  }
548
555
  }
@@ -2,7 +2,7 @@
2
2
  * sensitiveValueScanner.js (TASK-036)
3
3
  *
4
4
  * Shared source-side extraction of the high-confidence secret *value* scanner
5
- * that lives in templates/.claude/hooks/sensitive-data-guard.sh. One semantic
5
+ * that lives in template_project/.claude/hooks/sensitive-data-guard.sh. One semantic
6
6
  * implementation is consumed by the runtime hook mirror (TASK-038/039) and the
7
7
  * PROJECT_IMPORTANT.md renderer (TASK-037).
8
8
  *
@@ -27,7 +27,7 @@
27
27
  // never crash.
28
28
  //
29
29
  // Parsing is deliberately markdown-light and dependency-free so the validator can be
30
- // duplicated byte-for-byte into the shipped CLI twin (templates/.claude/ukit/index/
30
+ // duplicated byte-for-byte into the shipped CLI twin (template_project/.claude/ukit/index/
31
31
  // task-budget-validator.mjs) without dragging `src/` into user installs.
32
32
 
33
33
  export const DEFAULT_CRITERIA = Object.freeze({
@@ -57,7 +57,7 @@ function execOmpConfigGet(projectRoot, ompPath) {
57
57
 
58
58
  async function readTemplateDenyMatches() {
59
59
  try {
60
- const text = await fs.readFile(path.join(PACKAGE_ROOT, 'templates', '.omp', 'config.yml'), 'utf8');
60
+ const text = await fs.readFile(path.join(PACKAGE_ROOT, 'template_project', '.omp', 'config.yml'), 'utf8');
61
61
  const parsed = parse(text.replace(TEMPLATE_PLACEHOLDER_PATTERN, '0'));
62
62
  const patterns = parsed?.bash?.patterns;
63
63
  if (!Array.isArray(patterns)) return [];
@@ -21,7 +21,7 @@ const INSTALLED_MARKERS = ['.ukit', '.claude', 'CLAUDE.md', 'AGENTS.md', '.codex
21
21
  // signal-ignoring child blocks indefinitely, SIGKILL returns ~immediately with
22
22
  // ETIMEDOUT. Direct-child kill only (no process-group tree kill): these are
23
23
  // short-lived CLI one-shots; the detached-group TERM→KILL posture stays in
24
- // templates/.claude/ukit/runtime/hook-process.mjs where hooks need it.
24
+ // template_project/.claude/ukit/runtime/hook-process.mjs where hooks need it.
25
25
  export const NPM_QUERY_TIMEOUT_MS = 15_000;
26
26
  export const NPM_INSTALL_TIMEOUT_MS = 10 * 60 * 1000;
27
27
  const KILL_ON_TIMEOUT = 'SIGKILL';
@@ -1910,7 +1910,7 @@ function areBugIndexSnapshotsEqual(previousSnapshot, nextSnapshot) {
1910
1910
  * fell back to the project root when NONE of them existed. Partial matches were
1911
1911
  * the trap: a repo with a top-level `tests/` but its code in `packages/` indexed
1912
1912
  * `tests/` and silently nothing else. UKit's own repo hit exactly that — `src`,
1913
- * `tests` and `manifests` all exist, so `templates/` (the entire shipped payload)
1913
+ * `tests` and `manifests` all exist, so `template_project/` (the entire shipped payload)
1914
1914
  * was never indexed, and three releases shipped features that were dead on
1915
1915
  * arrival because the index kept pointing at `src/` and the hand-maintained
1916
1916
  * `.claude/` dev mirror instead.
@@ -2115,7 +2115,7 @@ async function collectGitTrackedFiles(rootDir, discovery = null) {
2115
2115
  return false;
2116
2116
  }
2117
2117
  // Git already applied the project's own ignore rules, so dot-directories it
2118
- // still lists are deliberate (UKit's `templates/.claude/**` is force-added).
2118
+ // still lists are deliberate (UKit's `template_project/.claude/**` is force-added).
2119
2119
  // All that is left to defend against is a build directory someone committed.
2120
2120
  return !relativePath.split('/').some((segment) => EXCLUDED_DIR_NAMES.has(segment));
2121
2121
  });
@@ -24,11 +24,11 @@ const SHARED_IMPACT_PATTERNS = [
24
24
  label: 'shared-token-runtime',
25
25
  },
26
26
  {
27
- regex: /^templates\/\.claude\/hooks\//,
27
+ regex: /^template_project\/\.claude\/hooks\//,
28
28
  label: 'installed-hook-runtime',
29
29
  },
30
30
  {
31
- regex: /^templates\/\.claude\/ukit\//,
31
+ regex: /^template_project\/\.claude\/ukit\//,
32
32
  label: 'installed-helper-runtime',
33
33
  },
34
34
  {
@@ -36,7 +36,7 @@ const SHARED_IMPACT_PATTERNS = [
36
36
  label: 'install-manifest',
37
37
  },
38
38
  {
39
- regex: /^templates\//,
39
+ regex: /^template_project\//,
40
40
  label: 'published-template-surface',
41
41
  },
42
42
  ];
@@ -44,47 +44,47 @@ const SHARED_IMPACT_PATTERNS = [
44
44
  const MIRROR_PAIRS = [
45
45
  {
46
46
  source: 'src/index/buildIndex.js',
47
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
47
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
48
48
  reason: 'installed index-core mirror embeds source index behavior',
49
49
  },
50
50
  {
51
51
  source: 'src/index/queryIndex.js',
52
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
52
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
53
53
  reason: 'installed index-core mirror embeds source query behavior',
54
54
  },
55
55
  {
56
56
  source: 'src/index/resolveContext.js',
57
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
57
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
58
58
  reason: 'installed index-core mirror embeds context resolution behavior',
59
59
  },
60
60
  {
61
61
  source: 'src/index/verificationPlan.js',
62
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
62
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
63
63
  reason: 'installed index-core mirror embeds verification planning behavior',
64
64
  },
65
65
  {
66
66
  source: 'src/index/taskRouting.js',
67
- mirror: 'templates/.claude/ukit/index/route-task.mjs',
67
+ mirror: 'template_project/.claude/ukit/index/route-task.mjs',
68
68
  reason: 'installed route-task helper mirrors source task routing behavior',
69
69
  },
70
70
  {
71
71
  source: 'src/index/routeCatalog.js',
72
- mirror: 'templates/.claude/ukit/index/route-catalog.mjs',
72
+ mirror: 'template_project/.claude/ukit/index/route-catalog.mjs',
73
73
  reason: 'installed route catalog must match source route catalog',
74
74
  },
75
75
  {
76
76
  source: 'src/core/output/index.js',
77
- mirror: 'templates/.claude/ukit/runtime/output-compression.mjs',
77
+ mirror: 'template_project/.claude/ukit/runtime/output-compression.mjs',
78
78
  reason: 'source output compression runtime should stay aligned with installed hook runtime',
79
79
  },
80
80
  {
81
81
  source: 'src/core/token/index.js',
82
- mirror: 'templates/.claude/ukit/runtime/token-utils.mjs',
82
+ mirror: 'template_project/.claude/ukit/runtime/token-utils.mjs',
83
83
  reason: 'source token runtime should stay aligned with installed token utilities',
84
84
  },
85
85
  {
86
86
  source: 'src/core/compact/threshold.js',
87
- mirror: 'templates/.claude/ukit/runtime/compact-threshold.mjs',
87
+ mirror: 'template_project/.claude/ukit/runtime/compact-threshold.mjs',
88
88
  reason: 'source compact threshold runtime should stay aligned with installed compact threshold hook',
89
89
  },
90
90
  ];
@@ -18,7 +18,7 @@ import { resolvePlaybook } from '../core/userPlaybooks.js';
18
18
  // --- v3 route-side advisory blocks (docs/pstack/SPEC-playbook-todo.md, ------------------
19
19
  // SPEC-principle-index.md, SPEC-model-roles.md). All three are additive stdout text —
20
20
  // they never change mode selection. Static text is byte-stable for prompt-cache reuse.
21
- // Mirrored literally in templates/.claude/ukit/index/route-task.mjs (parity-locked by
21
+ // Mirrored literally in template_project/.claude/ukit/index/route-task.mjs (parity-locked by
22
22
  // tests/consistency/executionContractSync.test.js).
23
23
 
24
24
  // SPEC-playbook-todo §2.1: numbered step lists the model copies verbatim into its todo
@@ -155,6 +155,29 @@ export const ROUTE_INTENT_KINDS = new Set(['informational', 'delivery', 'mutatio
155
155
  export const ROUTE_MUTABILITIES = new Set(['read-only', 'mutating', 'mixed']);
156
156
  export const ROUTE_RIGOR_LEVELS = new Set(['R0', 'R1', 'R2', 'R3', 'R4']);
157
157
  export const ROUTE_MODEL_TIERS = new Set(['lite', 'code', 'smart']);
158
+ export const ROUTE_RISK_FLOORS = new Set(['none', 'high-risk']);
159
+ // SPEC §5 FR-003: fixed table order — codes are emitted and printed in this order.
160
+ // The first six raise the floor to 'high-risk'; the last two are informational only.
161
+ export const ROUTE_RISK_REASON_CODES = Object.freeze([
162
+ 'security-sensitive',
163
+ 'shared-impact',
164
+ 'public-contract',
165
+ 'schema-change',
166
+ 'destructive-action',
167
+ 'cross-engine',
168
+ 'established-precedent',
169
+ 'explicit-local-target',
170
+ ]);
171
+ const ROUTE_RISK_FLOOR_RAISING_CODES = new Set(ROUTE_RISK_REASON_CODES.slice(0, 6));
172
+ const ROUTE_RISK_ENGINES = ['claude code', 'codex', 'omp'];
173
+
174
+ // FR-004 (M01.3'): Fast Path eligibility vocabulary. The suppressed list is fixed
175
+ // text per SPEC — deliberately not configurable. Reasons are the informational
176
+ // risk codes (the last two ROUTE_RISK_REASON_CODES entries) present on the route.
177
+ const FAST_PATH_MODES = new Set(['tiny-fix', 'local-fix']);
178
+ const FAST_PATH_SUPPRESSED = Object.freeze(['design', 'smart', 'subagents', 'broad-verify']);
179
+ const FAST_PATH_REASON_CODES = new Set(ROUTE_RISK_REASON_CODES.slice(6));
180
+
158
181
  // 'informational' is a real router emission (no completion contract) even though it is
159
182
  // not part of the seven-lane EXECUTION_MODE_ORDER ladder.
160
183
  export const ROUTE_EXECUTION_MODES = [...EXECUTION_MODE_ORDER, 'informational'];
@@ -169,6 +192,132 @@ export function resolveRouteSchemaStage(config = null) {
169
192
  return ROUTE_SCHEMA_STAGES.has(stage) ? stage : 'off';
170
193
  }
171
194
 
195
+ // FR-002: generic stage resolver — every routing.<key>.stage shares the same
196
+ // absent/malformed → 'off' contract. resolveRouteSchemaStage stays as the
197
+ // routeSchema-specific spelling of this helper.
198
+ export function resolveRouteStage(config = null, key) {
199
+ const stage = config?.routing?.[key]?.stage;
200
+ return ROUTE_SCHEMA_STAGES.has(stage) ? stage : 'off';
201
+ }
202
+
203
+ // FR-003 (M01.2'): derive the additive riskFloor from hard signals. Codes are
204
+ // collected in ROUTE_RISK_REASON_CODES table order; the floor is 'high-risk' iff
205
+ // any of the first six (floor-raising) codes fired — informational codes never
206
+ // raise it. Detectors read the normalized signal text (same source the mode
207
+ // ladder uses) plus the raw target path and context preview.
208
+ export function deriveRiskFloor({
209
+ promptText = '',
210
+ commandText = '',
211
+ targetFile = null,
212
+ executionMode = null,
213
+ activeSkillIds = [],
214
+ contextPreview = null,
215
+ } = {}) {
216
+ const signalText = buildRouteSignalText(promptText, commandText);
217
+ const target = String(targetFile || '');
218
+ const skillIds = Array.isArray(activeSkillIds) ? activeSkillIds : [];
219
+ const codes = [];
220
+ if (
221
+ /\b(auth|security|token|permission|secret|credential|password|vulnerab|exploit|xss|injection)\b/i.test(signalText)
222
+ || skillIds.includes('discover-security')
223
+ ) {
224
+ codes.push('security-sensitive');
225
+ }
226
+ if (isSharedImpactFile(targetFile) || executionMode === 'shared-edit' || executionMode === 'map-impact') {
227
+ codes.push('shared-impact');
228
+ }
229
+ if (
230
+ /(^|\/)(package\.json|manifests\/|.*\.d\.ts$|(^|\/)api\/|openapi|swagger)/i.test(target)
231
+ || /\b(public api|breaking change|api contract|semver)\b/i.test(signalText)
232
+ ) {
233
+ codes.push('public-contract');
234
+ }
235
+ if (
236
+ /(^|\/)(migrations?|db|database|prisma|schema)/i.test(target)
237
+ || /\b(migration|migrate|schema|alter table|add column|drop column)\b/i.test(signalText)
238
+ ) {
239
+ codes.push('schema-change');
240
+ }
241
+ if (/\b(delete|drop|truncate|destroy|wipe|uninstall|rm -rf|purge)\b/i.test(signalText)) {
242
+ codes.push('destructive-action');
243
+ }
244
+ const engineHits = ROUTE_RISK_ENGINES.filter(
245
+ (name) => new RegExp(`\\b${name}\\b`, 'i').test(signalText),
246
+ ).length;
247
+ if (
248
+ /\bcross[- ]engine\b|\ball engines\b/i.test(signalText)
249
+ || engineHits >= 2
250
+ || /^template_project\/\.(claude|codex|omp)\//i.test(target)
251
+ ) {
252
+ codes.push('cross-engine');
253
+ }
254
+ if ((contextPreview?.analogFiles?.length ?? 0) > 0 || (contextPreview?.styleFiles?.length ?? 0) > 0) {
255
+ codes.push('established-precedent');
256
+ }
257
+ if (target && !isSharedImpactFile(targetFile)) {
258
+ codes.push('explicit-local-target');
259
+ }
260
+ return {
261
+ floor: codes.some((code) => ROUTE_RISK_FLOOR_RAISING_CODES.has(code)) ? 'high-risk' : 'none',
262
+ codes,
263
+ };
264
+ }
265
+
266
+ // Route-line segment (FR-003): on 'high-risk' only the floor-raising codes print;
267
+ // on 'none' the informational codes do. Empty list → no segment at all.
268
+ function formatRiskFloorSegment(riskFloor = null) {
269
+ if (!riskFloor) {
270
+ return null;
271
+ }
272
+ const printed = riskFloor.floor === 'high-risk'
273
+ ? riskFloor.codes.filter((code) => ROUTE_RISK_FLOOR_RAISING_CODES.has(code))
274
+ : riskFloor.codes;
275
+ return printed.length > 0 ? `risk=${riskFloor.floor}(${printed.join(',')})` : null;
276
+ }
277
+
278
+ // FR-004 (M01.3'): Fast Path eligibility predicate. Returns null when no riskFloor
279
+ // was supplied — eligibility must never be derived without the floor check, so a
280
+ // missing floor means "not computed", not "none". Eligible iff the lane is
281
+ // tiny-fix/local-fix, exactly one local target is known, the floor is 'none',
282
+ // a bounded verification path exists (targeted commands or the tiny-fix
283
+ // 'minimal-or-targeted' contract policy), and the target is not shared-impact.
284
+ export function deriveFastPath({
285
+ executionMode = null,
286
+ targetFile = null,
287
+ riskFloor = null,
288
+ verificationRecommendation = null,
289
+ contextPreview = null,
290
+ } = {}) {
291
+ if (!riskFloor) {
292
+ return null;
293
+ }
294
+ const reasons = (riskFloor.codes ?? []).filter((code) => FAST_PATH_REASON_CODES.has(code));
295
+ const hasLocalTarget = Boolean(targetFile) || contextPreview?.primaryTargets?.length === 1;
296
+ const hasBoundedVerification = (verificationRecommendation?.commands?.length ?? 0) > 0
297
+ || buildExecutionContract(executionMode)?.verificationPolicy === 'minimal-or-targeted';
298
+ const eligible = FAST_PATH_MODES.has(executionMode)
299
+ && hasLocalTarget
300
+ && riskFloor.floor === 'none'
301
+ && hasBoundedVerification
302
+ && !isSharedImpactFile(targetFile);
303
+ return {
304
+ eligible,
305
+ suppressed: eligible ? [...FAST_PATH_SUPPRESSED] : [],
306
+ reasons,
307
+ };
308
+ }
309
+
310
+ // Route-line segment (FR-004): emitted only for eligible routes — ineligible
311
+ // routes keep the routeSummary.fastPath field for telemetry but stay silent.
312
+ function formatFastPathSegment(fastPath = null) {
313
+ if (!fastPath?.eligible) {
314
+ return null;
315
+ }
316
+ const reasons = fastPath.reasons?.length ? ` (${fastPath.reasons.join(',')})` : '';
317
+ return `fastPath=on | suppress: ${FAST_PATH_SUPPRESSED.join(',')}${reasons}`;
318
+ }
319
+
320
+
172
321
 
173
322
  // A bare delivery command ("push this to git", "đẩy bộ này lên git") performs no
174
323
  // repository mutation the ledger could ever receipt. With no edit/review/debug/build
@@ -232,6 +381,7 @@ function buildResolvedRouteFields({
232
381
  executionMode = null,
233
382
  executionContract = null,
234
383
  completionState = null,
384
+ riskFloor = null,
235
385
  } = {}) {
236
386
  const signalText = buildRouteSignalText(routingContext.promptText, routingContext.commandText);
237
387
  const deliveryOnly = isDeliveryOnlyRequest({
@@ -254,13 +404,14 @@ function buildResolvedRouteFields({
254
404
  execution: {
255
405
  mode: executionMode,
256
406
  rigor: null,
407
+ riskFloor: riskFloor?.floor ?? null,
257
408
  phase: null,
258
409
  contractVersion: ROUTE_CONTRACT_VERSION,
259
410
  modelTier: executionContract?.modelTier ?? MODEL_TIER_BY_CONTRACT[executionMode] ?? null,
260
411
  },
261
412
  evidence: {
262
413
  observations: [],
263
- riskSignals: [],
414
+ riskSignals: riskFloor?.codes ?? [],
264
415
  activationReasons: [],
265
416
  suppressionReasons: [],
266
417
  completionRequirements: unique(completionState?.missingEvidence ?? []),
@@ -268,7 +419,13 @@ function buildResolvedRouteFields({
268
419
  ceremonyBudget: {
269
420
  policyVersion: ROUTE_CONTRACT_VERSION,
270
421
  rigor: null,
271
- limits: {},
422
+ limits: riskFloor
423
+ ? Object.fromEntries(
424
+ ['maxReadPasses', 'maxContextPulls', 'maxReadPassesBeforeReassess']
425
+ .filter((key) => typeof executionContract?.[key] === 'number')
426
+ .map((key) => [key, executionContract[key]]),
427
+ )
428
+ : {},
272
429
  consumed: {},
273
430
  exceptions: [],
274
431
  },
@@ -324,6 +481,9 @@ export function validateResolvedRoute(route = null) {
324
481
  if (route.execution.rigor !== null && !ROUTE_RIGOR_LEVELS.has(route.execution.rigor)) {
325
482
  errors.push(`execution.rigor must be null or one of: ${[...ROUTE_RIGOR_LEVELS].join(', ')}.`);
326
483
  }
484
+ if (route.execution.riskFloor !== null && !ROUTE_RISK_FLOORS.has(route.execution.riskFloor)) {
485
+ errors.push(`execution.riskFloor must be null or one of: ${[...ROUTE_RISK_FLOORS].join(', ')}.`);
486
+ }
327
487
  if (route.execution.contractVersion !== ROUTE_CONTRACT_VERSION) {
328
488
  errors.push(`execution.contractVersion must be ${ROUTE_CONTRACT_VERSION}.`);
329
489
  }
@@ -339,6 +499,12 @@ export function validateResolvedRoute(route = null) {
339
499
  errors.push(`evidence.${key} must be an array.`);
340
500
  }
341
501
  }
502
+ if (Array.isArray(route.evidence.riskSignals)
503
+ && route.evidence.riskSignals.some(
504
+ (code) => typeof code !== 'string' || !ROUTE_RISK_REASON_CODES.includes(code),
505
+ )) {
506
+ errors.push(`evidence.riskSignals entries must be one of: ${ROUTE_RISK_REASON_CODES.join(', ')}.`);
507
+ }
342
508
  }
343
509
  if (!isObject(route.ceremonyBudget)) {
344
510
  errors.push('ceremonyBudget must be an object.');
@@ -667,6 +833,42 @@ export function buildRouteSummary({
667
833
  nextActionType: nextAction?.type ?? null,
668
834
  completionState,
669
835
  });
836
+ // FR-003 (M01.2'): riskFloor is a top-level additive field emitted whenever ANY
837
+ // of rigor/fastPath/escalation stages is on — fastPath/escalation consumers read
838
+ // it even when routeSchema is off. All three off → absent, byte-identical route.
839
+ const riskStageOn = ['rigor', 'fastPath', 'escalation']
840
+ .some((key) => resolveRouteStage(runtimeConfig, key) !== 'off');
841
+ const riskFloor = riskStageOn
842
+ ? deriveRiskFloor({
843
+ promptText: routingContext.promptText,
844
+ commandText: routingContext.commandText,
845
+ targetFile: routingContext.targetFile ?? null,
846
+ executionMode,
847
+ activeSkillIds: activeSkills.map((entry) => entry.id),
848
+ contextPreview: contextRecommendation?.preview ?? null,
849
+ })
850
+ : null;
851
+ const riskSegment = formatRiskFloorSegment(riskFloor);
852
+ // FR-004 (M01.3'): fastPath is emitted whenever its own stage is on — the field
853
+ // is always set then (eligible or not) so telemetry/harness can read it; the
854
+ // route-line segment prints only for eligible routes.
855
+ const fastPathStage = resolveRouteStage(runtimeConfig, 'fastPath');
856
+ const fastPath = fastPathStage !== 'off'
857
+ ? {
858
+ eligible: false,
859
+ suppressed: [],
860
+ reasons: [],
861
+ ...deriveFastPath({
862
+ executionMode,
863
+ targetFile: routingContext.targetFile ?? null,
864
+ riskFloor,
865
+ verificationRecommendation,
866
+ contextPreview: contextRecommendation?.preview ?? null,
867
+ }),
868
+ stage: fastPathStage,
869
+ }
870
+ : null;
871
+ const fastPathSegment = formatFastPathSegment(fastPath);
670
872
  const resolvedRouteFields = routeSchemaStage !== 'off'
671
873
  ? buildResolvedRouteFields({
672
874
  routingContext,
@@ -674,6 +876,7 @@ export function buildRouteSummary({
674
876
  executionMode,
675
877
  executionContract,
676
878
  completionState,
879
+ riskFloor,
677
880
  })
678
881
  : null;
679
882
  const helperHint = compactHelperHint(
@@ -716,6 +919,8 @@ export function buildRouteSummary({
716
919
  formatCompactSegment('tests', relatedTests),
717
920
  formatCompactSegment('styles', styleFiles),
718
921
  editGuardHint ? `editGuard=${editGuardHint}` : null,
922
+ riskSegment,
923
+ fastPathSegment,
719
924
  delegationRecommendation?.hint ? `delegate=${delegationRecommendation.hint}` : null,
720
925
  policyMode ? `policy=${policyMode}` : null,
721
926
  workflowPolicyName ? `workflow=${workflowPolicyName}` : null,
@@ -737,6 +942,10 @@ export function buildRouteSummary({
737
942
  completionState,
738
943
  // M01.1 additive C01 groups — present only when routing.routeSchema.stage != "off".
739
944
  ...(resolvedRouteFields ?? {}),
945
+ // FR-003 additive top-level field — present only when a risk stage is on.
946
+ ...(riskFloor ? { riskFloor } : {}),
947
+ // FR-004 additive top-level field — present only when fastPath stage is on.
948
+ ...(fastPath ? { fastPath } : {}),
740
949
  continuationState,
741
950
  autonomyLevel,
742
951
  continuousExecution,
@@ -864,7 +1073,7 @@ function deriveExecutionScores({
864
1073
  // asking for an explanation, not a repository change. Routing it to an investigation or
865
1074
  // edit lane fabricates write/verification debt the completion gate then enforces against an
866
1075
  // answer turn. Kept byte-equivalent to the shipped copies in
867
- // templates/.claude/ukit/index/route-task.mjs and templates/.claude/hooks/skill-router.sh;
1076
+ // template_project/.claude/ukit/index/route-task.mjs and template_project/.claude/hooks/skill-router.sh;
868
1077
  // this is the canonical copy those are mirror-tested against. It deliberately ignores
869
1078
  // targetFile: an edit order phrased as a question is caught by implementWords below, while a
870
1079
  // pure targeted question ("how does X work?") is still just a question.
@@ -173,11 +173,11 @@ export function renderAll(layout, sourceTexts, varsByResolve = {}) {
173
173
  }
174
174
 
175
175
  const SOURCE_FILES = {
176
- core: 'templates/instructions/core.md',
177
- 'overlay:claude': 'templates/instructions/overlays/claude.md',
178
- 'overlay:agents': 'templates/instructions/overlays/agents.md',
179
- 'overlay:omp-rules': 'templates/instructions/overlays/omp-rules.md',
180
- 'overlay:repo': 'templates/instructions/overlays/repo.md',
176
+ core: 'template_project/instructions/core.md',
177
+ 'overlay:claude': 'template_project/instructions/overlays/claude.md',
178
+ 'overlay:agents': 'template_project/instructions/overlays/agents.md',
179
+ 'overlay:omp-rules': 'template_project/instructions/overlays/omp-rules.md',
180
+ 'overlay:repo': 'template_project/instructions/overlays/repo.md',
181
181
  };
182
182
 
183
183
  /**
@@ -187,10 +187,10 @@ const SOURCE_FILES = {
187
187
  export async function renderInstructionsFromDisk({ repoRoot, write = true } = {}) {
188
188
  const abs = (p) => path.join(repoRoot, p);
189
189
  const layout = YAML.parse(
190
- fs.readFileSync(abs('templates/instructions/layout.yaml'), 'utf8'),
190
+ fs.readFileSync(abs('template_project/instructions/layout.yaml'), 'utf8'),
191
191
  );
192
192
  const repoVars =
193
- YAML.parse(fs.readFileSync(abs('templates/instructions/repo-vars.yaml'), 'utf8')) || {};
193
+ YAML.parse(fs.readFileSync(abs('template_project/instructions/repo-vars.yaml'), 'utf8')) || {};
194
194
  const pkg = JSON.parse(fs.readFileSync(abs('package.json'), 'utf8'));
195
195
 
196
196
  const sourceTexts = {};
@@ -23,7 +23,7 @@ export async function initSkillAudit({ rootDir = process.cwd(), skillName } = {}
23
23
  const auditDir = getAuditDir(rootDir, skillName);
24
24
  await fs.mkdir(auditDir, { recursive: true });
25
25
 
26
- const templateSourceDir = path.join(rootDir, 'templates/.claude/skills/skill-quality');
26
+ const templateSourceDir = path.join(rootDir, 'template_project/.claude/skills/skill-quality');
27
27
  const copied = [];
28
28
  const skipped = [];
29
29
 
@@ -76,7 +76,7 @@ verification — link both files' `## Discussion` threads.
76
76
 
77
77
  ## Phase 0.5 — Write SPEC.md
78
78
 
79
- Write `docs/AI_HANDOFF/SPEC.md` from the template at `templates/docs/AI_HANDOFF/SPEC.md`
79
+ Write `docs/AI_HANDOFF/SPEC.md` from the template at `template_project/docs/AI_HANDOFF/SPEC.md`
80
80
  (15 sections). The spec is the contract executors implement against — concrete enough that
81
81
  nothing is guessed: exact paths, module and API names, schemas, validation rules,
82
82
  permissions, empty/error states, migration behavior, test expectations. Every section is
@@ -135,7 +135,7 @@ Use `_TEMPLATE.md` structure (from pre-read context or file).
135
135
  | Dependencies | `TASK-xxx` or `none` — wave order is inferred from this |
136
136
  | Test Cases | Type \| Test Name \| Expected — ≥1 happy + ≥2 edge cases of different kinds |
137
137
  | Test Files | Exact test file paths to create/modify |
138
- | Verification Commands | Runnable shell commands — MUST include the project's lint/typecheck command if one exists (see §5 rule above). Apply the "Test selection" resolution order from docs/AI_HANDOFF/RULES.md: `src/`/`scripts/` targets → the `tests` array in `.cache/index/tests-map.json`; `templates/.claude/**`/`.claude/**` targets → path convention (hooks → `tests/hooks/` + `tests/handoff/cycle*/`; manifest/settings → `tests/manifest/`; runtime `.mjs` mirrors → `tests/core/*Parity*` + `tests/index/`); if both resolve to fewer than one test file the task MUST fall back to `yarn test:release-core` — never the full suite by default, never an empty selection |
138
+ | Verification Commands | Runnable shell commands — MUST include the project's lint/typecheck command if one exists (see §5 rule above). Apply the "Test selection" resolution order from docs/AI_HANDOFF/RULES.md: `src/`/`scripts/` targets → the `tests` array in `.cache/index/tests-map.json`; `template_project/.claude/**`/`.claude/**` targets → path convention (hooks → `tests/hooks/` + `tests/handoff/cycle*/`; manifest/settings → `tests/manifest/`; runtime `.mjs` mirrors → `tests/core/*Parity*` + `tests/index/`); if both resolve to fewer than one test file the task MUST fall back to `yarn test:release-core` — never the full suite by default, never an empty selection |
139
139
  | Acceptance Criteria | Verifiable checklist |
140
140
 
141
141
  Missing any field → `needs_breakdown`. Never mark incomplete tasks `ready`.
@@ -70,7 +70,7 @@ The planner agent does the following (use Step 1 summary — do NOT re-read file
70
70
  ```
71
71
 
72
72
  3. Write `docs/AI_HANDOFF/SPEC.md` — the detailed implementation spec (BẮT BUỘC before tasks).
73
- Follow `docs/AI_HANDOFF/SPEC.md`'s template sections (or `templates/docs/AI_HANDOFF/SPEC.md`
73
+ Follow `docs/AI_HANDOFF/SPEC.md`'s template sections (or `template_project/docs/AI_HANDOFF/SPEC.md`
74
74
  on a fresh tree): problem/context, goals, non-goals, user journeys, functional requirements
75
75
  with Given/When/Then + error cases, fullstack scope (backend, schema/migrations, API
76
76
  contract, UI+state, integration, security, performance, observability, deploy/rollback),
@@ -222,7 +222,7 @@ The planner agent does the following (use P1 summary — do NOT re-read files):
222
222
  ```
223
223
 
224
224
  3. **Write `docs/AI_HANDOFF/SPEC.md`** — the detailed implementation spec, from
225
- `templates/docs/AI_HANDOFF/SPEC.md`'s section list (or RULES.md §Spec). It must be
225
+ `template_project/docs/AI_HANDOFF/SPEC.md`'s section list (or RULES.md §Spec). It must be
226
226
  concrete enough that an executor implements without guessing: exact paths, module and
227
227
  API names, schemas, validation rules, permissions, empty/error states, migration
228
228
  behavior, and test expectations — every applicable section filled, open questions
@@ -238,7 +238,7 @@ if (toolName === 'Write' || toolName === 'Edit') {
238
238
  const specText = await fsp.readFile(specPath, 'utf8');
239
239
  let templateText = null;
240
240
  try {
241
- templateText = await fsp.readFile(path.join(projectRoot, 'templates/docs/AI_HANDOFF/SPEC.md'), 'utf8');
241
+ templateText = await fsp.readFile(path.join(projectRoot, 'template_project/docs/AI_HANDOFF/SPEC.md'), 'utf8');
242
242
  } catch {}
243
243
  specOk = specText.length > 500 && specText !== templateText;
244
244
  } catch {}
@@ -2235,10 +2235,10 @@ setTimeout(() => process.exit(0), HOOK_DEADLINE_MS).unref();
2235
2235
  /^src\/index\//,
2236
2236
  /^src\/core\/(runInstallPipeline|applyPlan|buildPlan|diffPlan|metadata|migrateLegacy|uninstall|runtimeConfig|runtimePaths)\.js$/,
2237
2237
  /^src\/core\/(output|token|compact)\//,
2238
- /^templates\/\.claude\/hooks\//,
2239
- /^templates\/\.claude\/ukit\//,
2238
+ /^template_project\/\.claude\/hooks\//,
2239
+ /^template_project\/\.claude\/ukit\//,
2240
2240
  /^manifests\/platform\.full\.yaml$/,
2241
- /^templates\//,
2241
+ /^template_project\//,
2242
2242
  ];
2243
2243
 
2244
2244
  function isSharedImpactFile(filePath) {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: skill-quality
3
- description: Use when creating or editing a UKit template skill/agent (templates/.claude/skills or templates/.claude/agents), before shipping the change, to pressure-test compliance and trigger accuracy. Maintainer-only.
3
+ description: Use when creating or editing a UKit template skill/agent (template_project/.claude/skills or template_project/.claude/agents), before shipping the change, to pressure-test compliance and trigger accuracy. Maintainer-only.
4
4
  ---
5
5
 
6
6
  # Skill Quality