@ngockhoale/ukit 3.0.0 → 3.0.2

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 (445) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/manifests/documentation.yaml +75 -64
  3. package/manifests/engineConformance.yaml +32 -0
  4. package/manifests/hostCapabilities.yaml +2 -2
  5. package/manifests/instructionRules.yaml +55 -55
  6. package/manifests/platform.full.yaml +30 -4
  7. package/manifests/platform.user.yaml +4 -4
  8. package/package.json +8 -7
  9. package/scripts/bench/v3-ceremony.mjs +214 -0
  10. package/scripts/install/sync-installed-mirror.mjs +3 -3
  11. package/scripts/perf/audit-perf.mjs +9 -9
  12. package/scripts/perf/perf-findings.json +4 -4
  13. package/scripts/perf/perf-measure.md +20 -20
  14. package/src/cli/commands/doctor.js +38 -2
  15. package/src/core/buildPlan.js +3 -3
  16. package/src/core/compact/contextBudget.js +2 -2
  17. package/src/core/compact/threshold.js +3 -3
  18. package/src/core/docContracts.js +17 -17
  19. package/src/core/ensureGitignore.js +1 -1
  20. package/src/core/executionContracts.js +42 -2
  21. package/src/core/fileOps.js +3 -3
  22. package/src/core/gatewayProbe.js +2 -2
  23. package/src/core/gatewayResilienceEnv.js +2 -2
  24. package/src/core/handoffDocValidator.js +152 -0
  25. package/src/core/output/index.js +1 -1
  26. package/src/core/paths.js +2 -1
  27. package/src/core/reviewPanelAggregate.js +120 -0
  28. package/src/core/runInstallPipeline.js +6 -4
  29. package/src/core/runtimeConfig.js +13 -6
  30. package/src/core/sensitiveValueScanner.js +1 -1
  31. package/src/core/taskBudgetValidator.js +1 -1
  32. package/src/core/unattendedDoctor.js +1 -1
  33. package/src/core/update.js +1 -1
  34. package/src/index/buildIndex.js +2 -2
  35. package/src/index/impactCatalog.js +12 -12
  36. package/src/index/taskRouting.js +263 -5
  37. package/src/render/instructionRenderer.js +7 -7
  38. package/src/skill/auditSkill.js +1 -1
  39. package/{templates → template_project}/.claude/agents/code-reviewer.md +25 -0
  40. package/{templates → template_project}/.claude/agents/handoff-planner.md +17 -2
  41. package/{templates → template_project}/.claude/commands/ukit/handoff-create.md +1 -1
  42. package/{templates → template_project}/.claude/commands/ukit/handoff-fullstack.md +26 -6
  43. package/{templates → template_project}/.claude/commands/ukit/handoff-review.md +31 -6
  44. package/{templates → template_project}/.claude/hooks/handoff-model-guard.sh +1 -1
  45. package/{templates → template_project}/.claude/hooks/skill-router.sh +3 -3
  46. package/{templates → template_project}/.claude/skills/skill-quality/SKILL.md +1 -1
  47. package/{templates → template_project}/.claude/skills/skill-quality/pressure-scenario-template.md +1 -1
  48. package/template_project/.claude/ukit/index/handoff-doc-validator.mjs +193 -0
  49. package/{templates → template_project}/.claude/ukit/index/lib/index-core.mjs +12 -12
  50. package/template_project/.claude/ukit/index/review-panel-aggregate.mjs +174 -0
  51. package/{templates → template_project}/.claude/ukit/index/route-task.mjs +408 -12
  52. package/{templates → template_project}/.claude/ukit/index/unic-gateway.mjs +1 -1
  53. package/{templates → template_project}/.claude/ukit/runtime/execution-ledger.mjs +14 -5
  54. package/{templates → template_project}/.claude/ukit/runtime/safe-patch-core.mjs +3 -3
  55. package/{templates → template_project}/.claude/ukit/runtime/sensitive-value-scanner.mjs +1 -1
  56. package/{templates → template_project}/.claude/ukit/runtime/stop-coordinator.mjs +187 -8
  57. package/{templates → template_project}/.claude/ukit/runtime/task-watchdog.mjs +1 -1
  58. package/{templates → template_project}/.gitignore +2 -2
  59. package/{templates → template_project}/.omp/RULES.md +1 -1
  60. package/{templates → template_project}/.omp/agents/code-reviewer.md +27 -0
  61. package/{templates → template_project}/.omp/agents/handoff-planner.md +17 -2
  62. package/{templates → template_project}/.omp/config.yml +3 -3
  63. package/{templates → template_project}/AGENTS.md +2 -2
  64. package/{templates → template_project}/CLAUDE.md +2 -2
  65. package/{templates → template_project}/docs/AI_HANDOFF/RULES.md +1 -1
  66. package/{templates → template_project}/docs/UKIT_INTERNALS.md +3 -3
  67. package/{templates → template_project}/instructions/core.md +1 -1
  68. package/{templates → template_project}/instructions/layout.yaml +8 -8
  69. package/{templates → template_project}/instructions/overlays/claude.md +1 -1
  70. package/{templates → template_project}/instructions/overlays/repo.md +1 -1
  71. package/{templates → template_project}/ukit/storage/config.json +4 -1
  72. package/template_project/ukit/storage/memory/projects/.gitkeep +2 -0
  73. package/templates/ukit/storage/memory/projects/.gitkeep +0 -2
  74. /package/{templates → template_project}/.claude/agents/bug-debugger.md +0 -0
  75. /package/{templates → template_project}/.claude/agents/feature-implementer.md +0 -0
  76. /package/{templates → template_project}/.claude/agents/ukit-small-task-maintainer.md +0 -0
  77. /package/{templates → template_project}/.claude/agents/ukit-vision-analyst.md +0 -0
  78. /package/{templates → template_project}/.claude/commands/ukit/handoff-clear.md +0 -0
  79. /package/{templates → template_project}/.claude/commands/ukit/handoff-implement.md +0 -0
  80. /package/{templates → template_project}/.claude/commands/ukit/handoff-status.md +0 -0
  81. /package/{templates → template_project}/.claude/config/providers.md +0 -0
  82. /package/{templates → template_project}/.claude/hooks/auto-allow-bash.sh +0 -0
  83. /package/{templates → template_project}/.claude/hooks/auto-prune-bash.sh +0 -0
  84. /package/{templates → template_project}/.claude/hooks/block-dangerous.mjs +0 -0
  85. /package/{templates → template_project}/.claude/hooks/block-dangerous.sh +0 -0
  86. /package/{templates → template_project}/.claude/hooks/completion-gate.sh +0 -0
  87. /package/{templates → template_project}/.claude/hooks/compress-output.sh +0 -0
  88. /package/{templates → template_project}/.claude/hooks/context-hardcap-gate.sh +0 -0
  89. /package/{templates → template_project}/.claude/hooks/context-window-guard.sh +0 -0
  90. /package/{templates → template_project}/.claude/hooks/handoff-resume.sh +0 -0
  91. /package/{templates → template_project}/.claude/hooks/post-edit-verify.sh +0 -0
  92. /package/{templates → template_project}/.claude/hooks/pre-edit-backup.sh +0 -0
  93. /package/{templates → template_project}/.claude/hooks/project-important.sh +0 -0
  94. /package/{templates → template_project}/.claude/hooks/protect-files.sh +0 -0
  95. /package/{templates → template_project}/.claude/hooks/record-execution.mjs +0 -0
  96. /package/{templates → template_project}/.claude/hooks/record-execution.sh +0 -0
  97. /package/{templates → template_project}/.claude/hooks/reinject-context.sh +0 -0
  98. /package/{templates → template_project}/.claude/hooks/reset-compact-pressure.sh +0 -0
  99. /package/{templates → template_project}/.claude/hooks/sensitive-data-guard.mjs +0 -0
  100. /package/{templates → template_project}/.claude/hooks/sensitive-data-guard.sh +0 -0
  101. /package/{templates → template_project}/.claude/hooks/session-episode.sh +0 -0
  102. /package/{templates → template_project}/.claude/hooks/session-start.md +0 -0
  103. /package/{templates → template_project}/.claude/hooks/stale-spec-guard.sh +0 -0
  104. /package/{templates → template_project}/.claude/hooks/task-watchdog.sh +0 -0
  105. /package/{templates → template_project}/.claude/hooks/verification-guard.sh +0 -0
  106. /package/{templates → template_project}/.claude/hooks/vision-router.sh +0 -0
  107. /package/{templates → template_project}/.claude/settings.json +0 -0
  108. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -0
  109. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -0
  110. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -0
  111. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -0
  112. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -0
  113. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -0
  114. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -0
  115. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -0
  116. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -0
  117. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -0
  118. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -0
  119. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -0
  120. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -0
  121. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -0
  122. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -0
  123. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -0
  124. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -0
  125. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -0
  126. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -0
  127. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -0
  128. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -0
  129. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -0
  130. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -0
  131. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -0
  132. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -0
  133. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -0
  134. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -0
  135. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -0
  136. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -0
  137. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -0
  138. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -0
  139. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/mce/mc.xsd +0 -0
  140. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2010.xsd +0 -0
  141. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2012.xsd +0 -0
  142. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-2018.xsd +0 -0
  143. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-cex-2018.xsd +0 -0
  144. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-cid-2016.xsd +0 -0
  145. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -0
  146. /package/{templates → template_project}/.claude/skills/_shared/ooxml/schemas/microsoft/wml-symex-2015.xsd +0 -0
  147. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/pack.py +0 -0
  148. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/unpack.py +0 -0
  149. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validate.py +0 -0
  150. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/__init__.py +0 -0
  151. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/base.py +0 -0
  152. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/docx.py +0 -0
  153. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/pptx.py +0 -0
  154. /package/{templates → template_project}/.claude/skills/_shared/ooxml/scripts/validation/redlining.py +0 -0
  155. /package/{templates → template_project}/.claude/skills/backend-api/SKILL.md +0 -0
  156. /package/{templates → template_project}/.claude/skills/canvas-design/LICENSE.txt +0 -0
  157. /package/{templates → template_project}/.claude/skills/canvas-design/SKILL.md +0 -0
  158. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  159. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -0
  160. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  161. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  162. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  163. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  164. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -0
  165. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  166. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  167. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  168. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  169. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -0
  170. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  171. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  172. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  173. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  174. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -0
  175. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  176. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -0
  177. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  178. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  179. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -0
  180. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  181. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  182. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -0
  183. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  184. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -0
  185. /package/{templates → template_project}/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  186. /package/{templates → template_project}/.claude/skills/canvas-design/philosophy-examples.md +0 -0
  187. /package/{templates → template_project}/.claude/skills/code-review/SKILL.md +0 -0
  188. /package/{templates → template_project}/.claude/skills/debugging-toolkit/SKILL.md +0 -0
  189. /package/{templates → template_project}/.claude/skills/debugging-toolkit/reference-tables.md +0 -0
  190. /package/{templates → template_project}/.claude/skills/delivery/SKILL.md +0 -0
  191. /package/{templates → template_project}/.claude/skills/discover-security/SKILL.md +0 -0
  192. /package/{templates → template_project}/.claude/skills/docker-packaging/SKILL.md +0 -0
  193. /package/{templates → template_project}/.claude/skills/docs-manager/SKILL.md +0 -0
  194. /package/{templates → template_project}/.claude/skills/docs-manager/conventions-and-examples.md +0 -0
  195. /package/{templates → template_project}/.claude/skills/docs-manager/init-project-docs.sh +0 -0
  196. /package/{templates → template_project}/.claude/skills/docs-manager/templates/README.md.template +0 -0
  197. /package/{templates → template_project}/.claude/skills/docs-manager/templates/agent-roles.md.template +0 -0
  198. /package/{templates → template_project}/.claude/skills/docs-manager/templates/coding-conventions.md.template +0 -0
  199. /package/{templates → template_project}/.claude/skills/docs-manager/templates/memory.md.template +0 -0
  200. /package/{templates → template_project}/.claude/skills/docs-manager/templates/onboarding.md.template +0 -0
  201. /package/{templates → template_project}/.claude/skills/docs-manager/templates/project.md.template +0 -0
  202. /package/{templates → template_project}/.claude/skills/docs-quality/SKILL.md +0 -0
  203. /package/{templates → template_project}/.claude/skills/docx/LICENSE.txt +0 -0
  204. /package/{templates → template_project}/.claude/skills/docx/SKILL.md +0 -0
  205. /package/{templates → template_project}/.claude/skills/docx/docx-js.md +0 -0
  206. /package/{templates → template_project}/.claude/skills/docx/ooxml.md +0 -0
  207. /package/{templates → template_project}/.claude/skills/docx/redlining-reference.md +0 -0
  208. /package/{templates → template_project}/.claude/skills/docx/scripts/__init__.py +0 -0
  209. /package/{templates → template_project}/.claude/skills/docx/scripts/document.py +0 -0
  210. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/comments.xml +0 -0
  211. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsExtended.xml +0 -0
  212. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsExtensible.xml +0 -0
  213. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/commentsIds.xml +0 -0
  214. /package/{templates → template_project}/.claude/skills/docx/scripts/templates/people.xml +0 -0
  215. /package/{templates → template_project}/.claude/skills/docx/scripts/utilities.py +0 -0
  216. /package/{templates → template_project}/.claude/skills/duraone/SKILL.md +0 -0
  217. /package/{templates → template_project}/.claude/skills/duraone/references/backend.md +0 -0
  218. /package/{templates → template_project}/.claude/skills/duraone/references/frontend.md +0 -0
  219. /package/{templates → template_project}/.claude/skills/duraone/references/sql.md +0 -0
  220. /package/{templates → template_project}/.claude/skills/duraone/references/workflow.md +0 -0
  221. /package/{templates → template_project}/.claude/skills/executing-plans/SKILL.md +0 -0
  222. /package/{templates → template_project}/.claude/skills/file-organizer/SKILL.md +0 -0
  223. /package/{templates → template_project}/.claude/skills/file-organizer/examples-and-practices.md +0 -0
  224. /package/{templates → template_project}/.claude/skills/frontend/SKILL.md +0 -0
  225. /package/{templates → template_project}/.claude/skills/frontend-design/LICENSE.txt +0 -0
  226. /package/{templates → template_project}/.claude/skills/frontend-design/SKILL.md +0 -0
  227. /package/{templates → template_project}/.claude/skills/frontend-vue/SKILL.md +0 -0
  228. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Box.vue +0 -0
  229. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Button.vue +0 -0
  230. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/ButtonBar.vue +0 -0
  231. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/ButtonFloat.vue +0 -0
  232. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/CheckButton.vue +0 -0
  233. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Checkbox.vue +0 -0
  234. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Datetime.vue +0 -0
  235. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Dropdownlist.vue +0 -0
  236. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Input.vue +0 -0
  237. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Label.vue +0 -0
  238. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Master/BoxColumn.vue +0 -0
  239. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Confirm.vue +0 -0
  240. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Info.vue +0 -0
  241. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/ModalInfo.vue +0 -0
  242. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Popup/Reject.vue +0 -0
  243. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Tag.vue +0 -0
  244. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Control/Upload.vue +0 -0
  245. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/Dropdownlist.vue +0 -0
  246. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/PagingBar.vue +0 -0
  247. /package/{templates → template_project}/.claude/skills/frontend-vue/components/ControlMobile/UploadImage.vue +0 -0
  248. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/AG.vue +0 -0
  249. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/AntTable.vue +0 -0
  250. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/CustomDropdownEditor.vue +0 -0
  251. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/CustomDropdownEditorEnable.vue +0 -0
  252. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Grid/HtmlTable.vue +0 -0
  253. /package/{templates → template_project}/.claude/skills/frontend-vue/components/PDFViewer.vue +0 -0
  254. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Panel/FormView.vue +0 -0
  255. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Footer.vue +0 -0
  256. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Header.vue +0 -0
  257. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Partial/Sidebar.vue +0 -0
  258. /package/{templates → template_project}/.claude/skills/frontend-vue/components/Template.vue +0 -0
  259. /package/{templates → template_project}/.claude/skills/frontend-vue/components/View/Form.vue +0 -0
  260. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/indexDBStore.js +0 -0
  261. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/masterApi.js +0 -0
  262. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/state.js +0 -0
  263. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useRequest.js +0 -0
  264. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useSession.js +0 -0
  265. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useTranslation.js +0 -0
  266. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/useWebSocket.js +0 -0
  267. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/userObj.js +0 -0
  268. /package/{templates → template_project}/.claude/skills/frontend-vue/composables/utils.js +0 -0
  269. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/composables-example.vue +0 -0
  270. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/form-example.vue +0 -0
  271. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/grid-example.vue +0 -0
  272. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/masterdata-example/[id].vue +0 -0
  273. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/masterdata-example/index.vue +0 -0
  274. /package/{templates → template_project}/.claude/skills/frontend-vue/reference/popup-example.vue +0 -0
  275. /package/{templates → template_project}/.claude/skills/next-step/SKILL.md +0 -0
  276. /package/{templates → template_project}/.claude/skills/pdf/LICENSE.txt +0 -0
  277. /package/{templates → template_project}/.claude/skills/pdf/SKILL.md +0 -0
  278. /package/{templates → template_project}/.claude/skills/pdf/forms.md +0 -0
  279. /package/{templates → template_project}/.claude/skills/pdf/reference.md +0 -0
  280. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_bounding_boxes.py +0 -0
  281. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_bounding_boxes_test.py +0 -0
  282. /package/{templates → template_project}/.claude/skills/pdf/scripts/check_fillable_fields.py +0 -0
  283. /package/{templates → template_project}/.claude/skills/pdf/scripts/convert_pdf_to_images.py +0 -0
  284. /package/{templates → template_project}/.claude/skills/pdf/scripts/create_validation_image.py +0 -0
  285. /package/{templates → template_project}/.claude/skills/pdf/scripts/extract_form_field_info.py +0 -0
  286. /package/{templates → template_project}/.claude/skills/pdf/scripts/fill_fillable_fields.py +0 -0
  287. /package/{templates → template_project}/.claude/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -0
  288. /package/{templates → template_project}/.claude/skills/pdf-processing/SKILL.md +0 -0
  289. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/FORMS.md +0 -0
  290. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/OCR.md +0 -0
  291. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/SKILL.md +0 -0
  292. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/TABLES.md +0 -0
  293. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/scripts/analyze_form.py +0 -0
  294. /package/{templates → template_project}/.claude/skills/pdf-processing-pro/workflows-and-troubleshooting.md +0 -0
  295. /package/{templates → template_project}/.claude/skills/postgres/SKILL.md +0 -0
  296. /package/{templates → template_project}/.claude/skills/postgres/reference/fn_get_examples.sql +0 -0
  297. /package/{templates → template_project}/.claude/skills/postgres/reference/fn_rpt_examples.sql +0 -0
  298. /package/{templates → template_project}/.claude/skills/postgres/reference/utility_functions.sql +0 -0
  299. /package/{templates → template_project}/.claude/skills/pptx/LICENSE.txt +0 -0
  300. /package/{templates → template_project}/.claude/skills/pptx/SKILL.md +0 -0
  301. /package/{templates → template_project}/.claude/skills/pptx/design-references.md +0 -0
  302. /package/{templates → template_project}/.claude/skills/pptx/html2pptx.md +0 -0
  303. /package/{templates → template_project}/.claude/skills/pptx/ooxml.md +0 -0
  304. /package/{templates → template_project}/.claude/skills/pptx/scripts/html2pptx.js +0 -0
  305. /package/{templates → template_project}/.claude/skills/pptx/scripts/inventory.py +0 -0
  306. /package/{templates → template_project}/.claude/skills/pptx/scripts/rearrange.py +0 -0
  307. /package/{templates → template_project}/.claude/skills/pptx/scripts/replace.py +0 -0
  308. /package/{templates → template_project}/.claude/skills/pptx/scripts/thumbnail.py +0 -0
  309. /package/{templates → template_project}/.claude/skills/pptx/template-replacement-reference.md +0 -0
  310. /package/{templates → template_project}/.claude/skills/pptx/utilities.md +0 -0
  311. /package/{templates → template_project}/.claude/skills/principle-attack-the-premise/SKILL.md +0 -0
  312. /package/{templates → template_project}/.claude/skills/principle-boundary-discipline/SKILL.md +0 -0
  313. /package/{templates → template_project}/.claude/skills/principle-encode-lessons-in-structure/SKILL.md +0 -0
  314. /package/{templates → template_project}/.claude/skills/principle-fix-root-causes/SKILL.md +0 -0
  315. /package/{templates → template_project}/.claude/skills/principle-foundational-thinking/SKILL.md +0 -0
  316. /package/{templates → template_project}/.claude/skills/principle-guard-the-context-window/SKILL.md +0 -0
  317. /package/{templates → template_project}/.claude/skills/principle-laziness-protocol/SKILL.md +0 -0
  318. /package/{templates → template_project}/.claude/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +0 -0
  319. /package/{templates → template_project}/.claude/skills/principle-minimize-reader-load/SKILL.md +0 -0
  320. /package/{templates → template_project}/.claude/skills/principle-model-the-domain/SKILL.md +0 -0
  321. /package/{templates → template_project}/.claude/skills/principle-never-block-on-the-human/SKILL.md +0 -0
  322. /package/{templates → template_project}/.claude/skills/principle-prove-it-works/SKILL.md +0 -0
  323. /package/{templates → template_project}/.claude/skills/principle-sequence-verifiable-units/SKILL.md +0 -0
  324. /package/{templates → template_project}/.claude/skills/principle-subtract-before-you-add/SKILL.md +0 -0
  325. /package/{templates → template_project}/.claude/skills/principle-test-behavior-not-implementation/SKILL.md +0 -0
  326. /package/{templates → template_project}/.claude/skills/project-learning/SKILL.md +0 -0
  327. /package/{templates → template_project}/.claude/skills/repo-maintenance/SKILL.md +0 -0
  328. /package/{templates → template_project}/.claude/skills/research/EXAMPLES.md +0 -0
  329. /package/{templates → template_project}/.claude/skills/research/REFERENCE.md +0 -0
  330. /package/{templates → template_project}/.claude/skills/research/SKILL.md +0 -0
  331. /package/{templates → template_project}/.claude/skills/root-cause-tracing/SKILL.md +0 -0
  332. /package/{templates → template_project}/.claude/skills/root-cause-tracing/diagrams.md +0 -0
  333. /package/{templates → template_project}/.claude/skills/root-cause-tracing/find-polluter.sh +0 -0
  334. /package/{templates → template_project}/.claude/skills/sharing-skills/SKILL.md +0 -0
  335. /package/{templates → template_project}/.claude/skills/sharing-skills/complete-example.md +0 -0
  336. /package/{templates → template_project}/.claude/skills/skill-quality/rationalization-table-template.md +0 -0
  337. /package/{templates → template_project}/.claude/skills/skill-quality/trigger-accuracy-template.md +0 -0
  338. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/SKILL.md +0 -0
  339. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/advanced-techniques.md +0 -0
  340. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/core-concepts.md +0 -0
  341. /package/{templates → template_project}/.claude/skills/sql-optimization-patterns/references/query-patterns.md +0 -0
  342. /package/{templates → template_project}/.claude/skills/subagent-driven-development/SKILL.md +0 -0
  343. /package/{templates → template_project}/.claude/skills/subagent-driven-development/example-workflow.md +0 -0
  344. /package/{templates → template_project}/.claude/skills/systematic-debugging/CREATION-LOG.md +0 -0
  345. /package/{templates → template_project}/.claude/skills/systematic-debugging/SKILL.md +0 -0
  346. /package/{templates → template_project}/.claude/skills/systematic-debugging/reference-tables.md +0 -0
  347. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-academic.md +0 -0
  348. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-1.md +0 -0
  349. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-2.md +0 -0
  350. /package/{templates → template_project}/.claude/skills/systematic-debugging/test-pressure-3.md +0 -0
  351. /package/{templates → template_project}/.claude/skills/test-driven-development/SKILL.md +0 -0
  352. /package/{templates → template_project}/.claude/skills/test-driven-development/reference-tables.md +0 -0
  353. /package/{templates → template_project}/.claude/skills/testing-anti-patterns/SKILL.md +0 -0
  354. /package/{templates → template_project}/.claude/skills/testing-anti-patterns/reference-tables.md +0 -0
  355. /package/{templates → template_project}/.claude/skills/testing-quality/SKILL.md +0 -0
  356. /package/{templates → template_project}/.claude/skills/update-status/SKILL.md +0 -0
  357. /package/{templates → template_project}/.claude/skills/verification-before-completion/SKILL.md +0 -0
  358. /package/{templates → template_project}/.claude/skills/verification-before-completion/key-patterns.md +0 -0
  359. /package/{templates → template_project}/.claude/skills/webapp-testing/LICENSE.txt +0 -0
  360. /package/{templates → template_project}/.claude/skills/webapp-testing/SKILL.md +0 -0
  361. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/console_logging.py +0 -0
  362. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/element_discovery.py +0 -0
  363. /package/{templates → template_project}/.claude/skills/webapp-testing/examples/static_html_automation.py +0 -0
  364. /package/{templates → template_project}/.claude/skills/webapp-testing/scripts/with_server.py +0 -0
  365. /package/{templates → template_project}/.claude/ukit/index/anchor-search.mjs +0 -0
  366. /package/{templates → template_project}/.claude/ukit/index/build-index.mjs +0 -0
  367. /package/{templates → template_project}/.claude/ukit/index/cache-utils.mjs +0 -0
  368. /package/{templates → template_project}/.claude/ukit/index/extract-image.mjs +0 -0
  369. /package/{templates → template_project}/.claude/ukit/index/impact-context.mjs +0 -0
  370. /package/{templates → template_project}/.claude/ukit/index/post-edit-verify.mjs +0 -0
  371. /package/{templates → template_project}/.claude/ukit/index/pre-edit-backup.mjs +0 -0
  372. /package/{templates → template_project}/.claude/ukit/index/provision-worktree.mjs +0 -0
  373. /package/{templates → template_project}/.claude/ukit/index/query-index.mjs +0 -0
  374. /package/{templates → template_project}/.claude/ukit/index/refresh-index.mjs +0 -0
  375. /package/{templates → template_project}/.claude/ukit/index/reset-auto-permissions.mjs +0 -0
  376. /package/{templates → template_project}/.claude/ukit/index/resolve-context.mjs +0 -0
  377. /package/{templates → template_project}/.claude/ukit/index/route-catalog.mjs +0 -0
  378. /package/{templates → template_project}/.claude/ukit/index/safe-patch.mjs +0 -0
  379. /package/{templates → template_project}/.claude/ukit/index/stale-spec-check.mjs +0 -0
  380. /package/{templates → template_project}/.claude/ukit/index/task-budget-validator.mjs +0 -0
  381. /package/{templates → template_project}/.claude/ukit/index/triage.mjs +0 -0
  382. /package/{templates → template_project}/.claude/ukit/index/verify-context.mjs +0 -0
  383. /package/{templates → template_project}/.claude/ukit/runtime/async-lock.mjs +0 -0
  384. /package/{templates → template_project}/.claude/ukit/runtime/compact-threshold.mjs +0 -0
  385. /package/{templates → template_project}/.claude/ukit/runtime/context-capacity.mjs +0 -0
  386. /package/{templates → template_project}/.claude/ukit/runtime/hook-chain-budget.mjs +0 -0
  387. /package/{templates → template_project}/.claude/ukit/runtime/hook-chain-runner.mjs +0 -0
  388. /package/{templates → template_project}/.claude/ukit/runtime/hook-field-salvage.mjs +0 -0
  389. /package/{templates → template_project}/.claude/ukit/runtime/hook-input.mjs +0 -0
  390. /package/{templates → template_project}/.claude/ukit/runtime/hook-input.sh +0 -0
  391. /package/{templates → template_project}/.claude/ukit/runtime/hook-payload-store.mjs +0 -0
  392. /package/{templates → template_project}/.claude/ukit/runtime/hook-process.mjs +0 -0
  393. /package/{templates → template_project}/.claude/ukit/runtime/hook-telemetry.mjs +0 -0
  394. /package/{templates → template_project}/.claude/ukit/runtime/hook-telemetry.sh +0 -0
  395. /package/{templates → template_project}/.claude/ukit/runtime/output-compression.mjs +0 -0
  396. /package/{templates → template_project}/.claude/ukit/runtime/project-important.mjs +0 -0
  397. /package/{templates → template_project}/.claude/ukit/runtime/reinject-context.mjs +0 -0
  398. /package/{templates → template_project}/.claude/ukit/runtime/text-profile.mjs +0 -0
  399. /package/{templates → template_project}/.claude/ukit/runtime/token-utils.mjs +0 -0
  400. /package/{templates → template_project}/.claude/ukit/runtime/transcript-tail.mjs +0 -0
  401. /package/{templates → template_project}/.claude/ukit/skill-router-state.json +0 -0
  402. /package/{templates → template_project}/.codex/README.md +0 -0
  403. /package/{templates → template_project}/.codex/settings.json +0 -0
  404. /package/{templates → template_project}/.omp/AGENTS.md +0 -0
  405. /package/{templates → template_project}/.omp/README.md +0 -0
  406. /package/{templates → template_project}/.omp/agents/bug-debugger.md +0 -0
  407. /package/{templates → template_project}/.omp/agents/feature-implementer.md +0 -0
  408. /package/{templates → template_project}/.omp/agents/ukit-small-task-maintainer.md +0 -0
  409. /package/{templates → template_project}/.omp/agents/ukit-vision-analyst.md +0 -0
  410. /package/{templates → template_project}/.omp/hooks/pre/ukit-bridge.js +0 -0
  411. /package/{templates → template_project}/.ukit/storage/cache/hook-latency/unknown.jsonl +0 -0
  412. /package/{templates → template_project}/PROJECT_IMPORTANT.md +0 -0
  413. /package/{templates → template_project}/adapter-presets/claude/settings.local.json +0 -0
  414. /package/{templates → template_project}/adapter-presets/codex/settings.local.json +0 -0
  415. /package/{templates → template_project}/docs/AI_HANDOFF/ACTIVE.md +0 -0
  416. /package/{templates → template_project}/docs/AI_HANDOFF/HISTORY.md +0 -0
  417. /package/{templates → template_project}/docs/AI_HANDOFF/INDEX.md +0 -0
  418. /package/{templates → template_project}/docs/AI_HANDOFF/PLAN.md +0 -0
  419. /package/{templates → template_project}/docs/AI_HANDOFF/SPEC.md +0 -0
  420. /package/{templates → template_project}/docs/AI_HANDOFF/archive/.gitkeep +0 -0
  421. /package/{templates → template_project}/docs/AI_HANDOFF/tasks/.gitkeep +0 -0
  422. /package/{templates → template_project}/docs/AI_HANDOFF/tasks/_TEMPLATE.md +0 -0
  423. /package/{templates → template_project}/docs/BUGFIX.md +0 -0
  424. /package/{templates → template_project}/docs/BUG_INDEX.md +0 -0
  425. /package/{templates → template_project}/docs/BUG_METRICS.md +0 -0
  426. /package/{templates → template_project}/docs/BUG_TEMPLATE.md +0 -0
  427. /package/{templates → template_project}/docs/CODE_MAP.md +0 -0
  428. /package/{templates → template_project}/docs/MEMORY.md +0 -0
  429. /package/{templates → template_project}/docs/PROJECT.md +0 -0
  430. /package/{templates → template_project}/docs/PROMPT_CACHING.md +0 -0
  431. /package/{templates → template_project}/docs/WORKLOG.md +0 -0
  432. /package/{templates → template_project}/instructions/overlays/agents.md +0 -0
  433. /package/{templates → template_project}/instructions/overlays/omp-rules.md +0 -0
  434. /package/{templates → template_project}/instructions/repo-vars.yaml +0 -0
  435. /package/{templates → template_project}/ukit/README.md +0 -0
  436. /package/{templates → template_project}/ukit/storage/cache/compact-history.json +0 -0
  437. /package/{templates → template_project}/ukit/storage/cache/compact-pressure.json +0 -0
  438. /package/{templates → template_project}/ukit/storage/cache/output-history.json +0 -0
  439. /package/{templates → template_project}/ukit/storage/cache/prompt-cache.json +0 -0
  440. /package/{templates → template_project}/ukit/storage/memory/sessions/.gitkeep +0 -0
  441. /package/{templates → template_project}/ukit/storage/memory/user.json +0 -0
  442. /package/{templates/user → template_user}/README.md +0 -0
  443. /package/{templates/user → template_user}/playbooks/bug-fix.md +0 -0
  444. /package/{templates/user → template_user}/playbooks/issue-implementation.md +0 -0
  445. /package/{templates/user → template_user}/storage/config.json +0 -0
@@ -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
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Worked example — don't copy it here, read the original
12
12
 
13
- Rather than duplicating a worked scenario in this file, reuse the one already written and already run in this repo: `templates/.claude/skills/systematic-debugging/test-pressure-1.md` (economic + authority + time + sunk-cost pressure, A/B/C choice, passed against `systematic-debugging`). Open it directly, swap the skill name and domain details for the skill you're testing. See its sibling `CREATION-LOG.md` → "Bulletproofing Elements" for the language choices (ALWAYS/NEVER, explicit "even if faster") that made the original pass.
13
+ Rather than duplicating a worked scenario in this file, reuse the one already written and already run in this repo: `template_project/.claude/skills/systematic-debugging/test-pressure-1.md` (economic + authority + time + sunk-cost pressure, A/B/C choice, passed against `systematic-debugging`). Open it directly, swap the skill name and domain details for the skill you're testing. See its sibling `CREATION-LOG.md` → "Bulletproofing Elements" for the language choices (ALWAYS/NEVER, explicit "even if faster") that made the original pass.
14
14
 
15
15
  ## Producing your own scenario (when the worked example doesn't fit the skill's domain)
16
16
 
@@ -0,0 +1,193 @@
1
+ #!/usr/bin/env node
2
+ // handoff-doc-validator.mjs — TASK-004 / Cycle C50 (shipped CLI twin)
3
+ //
4
+ // Self-contained twin of src/core/handoffDocValidator.js for user installs (no `src/`).
5
+ // The logic below is a literal port — keep the two files behavior-identical when editing.
6
+ //
7
+ // REAL GATE — unlike task-budget-validator.mjs (advisory, always exit 0), this
8
+ // script exits 1 on any violation. Do not "fix" the exit code.
9
+ //
10
+ // Usage:
11
+ // node .claude/ukit/index/handoff-doc-validator.mjs <file.md> [file.md...]
12
+ //
13
+ // Kind detection per file: basename PLAN.md → 'plan'; TASK-*.md → 'task';
14
+ // otherwise content sniffing (`## §1` → plan, `## Goal` → task, else
15
+ // executor-report). Task files carrying `## Executor Report` are also checked
16
+ // against the report header contract.
17
+ //
18
+ // Output:
19
+ // `PASS <file>` when clean; one `FAIL <file>: <rule>` line per violation.
20
+ // Exit 0 when every file passes, 1 otherwise, 2 on usage/read errors.
21
+
22
+ import fs from 'node:fs';
23
+ import path from 'node:path';
24
+ import process from 'node:process';
25
+ import { pathToFileURL } from 'node:url';
26
+
27
+ const PLAN_SECTIONS = ['§1', '§2', '§3', '§4', '§5', '§6'];
28
+
29
+ const TASK_SECTIONS = [
30
+ 'Goal',
31
+ 'Target Files',
32
+ 'Test Cases',
33
+ 'Test Files',
34
+ 'Verification Commands',
35
+ 'Acceptance Criteria',
36
+ 'Dependencies',
37
+ 'Interfaces',
38
+ ];
39
+
40
+ const REPORT_FIELDS = ['EXECUTOR_TOOL', 'EXECUTOR_MODEL', 'EXECUTOR_SUBAGENT', 'RED_OUTPUT'];
41
+
42
+ // Section helpers. Any line starting with `## ` opens a section; the body runs
43
+ // until the next `## ` line or EOF. Returns [{ name, body, pos }] in file order.
44
+ function splitSections(markdown) {
45
+ const sections = [];
46
+ const lines = String(markdown).split('\n');
47
+ let current = null;
48
+ lines.forEach((line, idx) => {
49
+ const m = line.match(/^##\s+(.+?)\s*$/);
50
+ if (m) {
51
+ current = { name: m[1], body: '', pos: idx };
52
+ sections.push(current);
53
+ } else if (current) {
54
+ current.body += line + '\n';
55
+ }
56
+ });
57
+ return sections;
58
+ }
59
+
60
+ // Positions of `## §<n>` headings, keyed by the literal token ('§1'..'§6').
61
+ // A heading matches when its name starts with the token (`## §1 Intent`).
62
+ function planSectionPositions(sections) {
63
+ const positions = new Map();
64
+ for (const s of sections) {
65
+ for (const token of PLAN_SECTIONS) {
66
+ if (!positions.has(token) && s.name.startsWith(token)) positions.set(token, s.pos);
67
+ }
68
+ }
69
+ return positions;
70
+ }
71
+
72
+ function hasSection(sections, name) {
73
+ return sections.some((s) => s.name === name || s.name.startsWith(`${name} `) || s.name.startsWith(`${name}(`));
74
+ }
75
+
76
+ function getSection(sections, name) {
77
+ return sections.find((s) => s.name === name || s.name.startsWith(`${name} `) || s.name.startsWith(`${name}(`));
78
+ }
79
+
80
+ function validatePlan(markdown) {
81
+ const failures = [];
82
+ const sections = splitSections(markdown);
83
+ const positions = planSectionPositions(sections);
84
+
85
+ for (const token of PLAN_SECTIONS) {
86
+ if (!positions.has(token)) failures.push(`missing required section heading "## ${token}"`);
87
+ }
88
+
89
+ // Order check over the sections that exist: each must appear after the
90
+ // highest position seen so far.
91
+ let maxPos = -1;
92
+ for (const token of PLAN_SECTIONS) {
93
+ const pos = positions.get(token);
94
+ if (pos === undefined) continue;
95
+ if (pos < maxPos) {
96
+ failures.push(`section order violation: "## ${token}" appears after a later section`);
97
+ } else {
98
+ maxPos = pos;
99
+ }
100
+ }
101
+
102
+ const report = getSection(sections, 'Planner Report');
103
+ if (!report) {
104
+ failures.push('missing required section "## Planner Report"');
105
+ } else if (!/^PLANNER_MODEL\s*:/m.test(report.body)) {
106
+ failures.push('missing required field "PLANNER_MODEL:" inside "## Planner Report"');
107
+ }
108
+
109
+ return failures;
110
+ }
111
+
112
+ function validateExecutorReportFields(markdown, prefix) {
113
+ const failures = [];
114
+ for (const field of REPORT_FIELDS) {
115
+ if (!new RegExp(`^${field}\\s*:`, 'm').test(markdown)) {
116
+ failures.push(`${prefix}missing required field "${field}:"`);
117
+ }
118
+ }
119
+ return failures;
120
+ }
121
+
122
+ function validateTask(markdown) {
123
+ const failures = [];
124
+ const sections = splitSections(markdown);
125
+
126
+ for (const name of TASK_SECTIONS) {
127
+ if (!hasSection(sections, name)) failures.push(`missing required section "## ${name}"`);
128
+ }
129
+ if (!/^\s*-?\s*Status\s*:/m.test(markdown)) {
130
+ failures.push('missing required field "Status:"');
131
+ }
132
+
133
+ // A task file that already carries an Executor Report must satisfy the
134
+ // report header contract too (FR-007).
135
+ const report = getSection(sections, 'Executor Report');
136
+ if (report) {
137
+ failures.push(...validateExecutorReportFields(report.body, 'executor-report: '));
138
+ }
139
+
140
+ return failures;
141
+ }
142
+
143
+ export function validateHandoffDoc(markdown, kind) {
144
+ const text = String(markdown ?? '');
145
+ let failures;
146
+ if (kind === 'plan') failures = validatePlan(text);
147
+ else if (kind === 'task') failures = validateTask(text);
148
+ else if (kind === 'executor-report') failures = validateExecutorReportFields(text, '');
149
+ else failures = [`unknown kind "${kind}" (expected plan|task|executor-report)`];
150
+ return { ok: failures.length === 0, failures };
151
+ }
152
+
153
+ // CLI-only helpers below (not part of the canonical module).
154
+
155
+ function detectKind(filePath, markdown) {
156
+ const base = path.basename(filePath);
157
+ if (/^PLAN\.md$/i.test(base)) return 'plan';
158
+ if (/^TASK-.*\.md$/i.test(base)) return 'task';
159
+ if (/^##\s+§1/m.test(markdown)) return 'plan';
160
+ if (/^##\s+Goal\b/m.test(markdown)) return 'task';
161
+ return 'executor-report';
162
+ }
163
+
164
+ function main() {
165
+ const files = process.argv.slice(2);
166
+ if (files.length === 0) {
167
+ console.error('usage: handoff-doc-validator.mjs <file.md> [file.md...]');
168
+ process.exit(2);
169
+ }
170
+ let failed = false;
171
+ for (const file of files) {
172
+ let markdown;
173
+ try {
174
+ markdown = fs.readFileSync(file, 'utf8');
175
+ } catch (err) {
176
+ console.log(`FAIL ${file}: unreadable (${err.message})`);
177
+ failed = true;
178
+ continue;
179
+ }
180
+ const { ok, failures } = validateHandoffDoc(markdown, detectKind(file, markdown));
181
+ if (ok) {
182
+ console.log(`PASS ${file}`);
183
+ } else {
184
+ failed = true;
185
+ for (const f of failures) console.log(`FAIL ${file}: ${f}`);
186
+ }
187
+ }
188
+ process.exit(failed ? 1 : 0);
189
+ }
190
+
191
+ if (process.argv[1] && pathToFileURL(process.argv[1]).href === import.meta.url) {
192
+ main();
193
+ }
@@ -4037,56 +4037,56 @@ const IMPACT_SHARED_PATTERNS = [
4037
4037
  label: 'shared-install-runtime',
4038
4038
  },
4039
4039
  { regex: /^src\/core\/(output|token|compact)\//, label: 'shared-token-runtime' },
4040
- { regex: /^templates\/\.claude\/hooks\//, label: 'installed-hook-runtime' },
4041
- { regex: /^templates\/\.claude\/ukit\//, label: 'installed-helper-runtime' },
4040
+ { regex: /^template_project\/\.claude\/hooks\//, label: 'installed-hook-runtime' },
4041
+ { regex: /^template_project\/\.claude\/ukit\//, label: 'installed-helper-runtime' },
4042
4042
  { regex: /^manifests\/platform\.full\.yaml$/, label: 'install-manifest' },
4043
- { regex: /^templates\//, label: 'published-template-surface' },
4043
+ { regex: /^template_project\//, label: 'published-template-surface' },
4044
4044
  ];
4045
4045
 
4046
4046
  const IMPACT_MIRROR_PAIRS = [
4047
4047
  {
4048
4048
  source: 'src/index/buildIndex.js',
4049
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
4049
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
4050
4050
  reason: 'installed index-core mirror embeds source index behavior',
4051
4051
  },
4052
4052
  {
4053
4053
  source: 'src/index/queryIndex.js',
4054
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
4054
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
4055
4055
  reason: 'installed index-core mirror embeds source query behavior',
4056
4056
  },
4057
4057
  {
4058
4058
  source: 'src/index/resolveContext.js',
4059
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
4059
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
4060
4060
  reason: 'installed index-core mirror embeds context resolution behavior',
4061
4061
  },
4062
4062
  {
4063
4063
  source: 'src/index/verificationPlan.js',
4064
- mirror: 'templates/.claude/ukit/index/lib/index-core.mjs',
4064
+ mirror: 'template_project/.claude/ukit/index/lib/index-core.mjs',
4065
4065
  reason: 'installed index-core mirror embeds verification planning behavior',
4066
4066
  },
4067
4067
  {
4068
4068
  source: 'src/index/taskRouting.js',
4069
- mirror: 'templates/.claude/ukit/index/route-task.mjs',
4069
+ mirror: 'template_project/.claude/ukit/index/route-task.mjs',
4070
4070
  reason: 'installed route-task helper mirrors source task routing behavior',
4071
4071
  },
4072
4072
  {
4073
4073
  source: 'src/index/routeCatalog.js',
4074
- mirror: 'templates/.claude/ukit/index/route-catalog.mjs',
4074
+ mirror: 'template_project/.claude/ukit/index/route-catalog.mjs',
4075
4075
  reason: 'installed route catalog must match source route catalog',
4076
4076
  },
4077
4077
  {
4078
4078
  source: 'src/core/output/index.js',
4079
- mirror: 'templates/.claude/ukit/runtime/output-compression.mjs',
4079
+ mirror: 'template_project/.claude/ukit/runtime/output-compression.mjs',
4080
4080
  reason: 'source output compression runtime should stay aligned with installed hook runtime',
4081
4081
  },
4082
4082
  {
4083
4083
  source: 'src/core/token/index.js',
4084
- mirror: 'templates/.claude/ukit/runtime/token-utils.mjs',
4084
+ mirror: 'template_project/.claude/ukit/runtime/token-utils.mjs',
4085
4085
  reason: 'source token runtime should stay aligned with installed token utilities',
4086
4086
  },
4087
4087
  {
4088
4088
  source: 'src/core/compact/threshold.js',
4089
- mirror: 'templates/.claude/ukit/runtime/compact-threshold.mjs',
4089
+ mirror: 'template_project/.claude/ukit/runtime/compact-threshold.mjs',
4090
4090
  reason: 'source compact threshold runtime should stay aligned with installed compact threshold hook',
4091
4091
  },
4092
4092
  ];
@@ -0,0 +1,174 @@
1
+ #!/usr/bin/env node
2
+ // review-panel-aggregate.mjs — TASK-004 / Cycle C50 (shipped CLI twin)
3
+ //
4
+ // Self-contained twin of src/core/reviewPanelAggregate.js for user installs (no `src/`).
5
+ // The logic below is a literal port — keep the two files behavior-identical when editing.
6
+ //
7
+ // ADVISORY — always exits 0. Aggregation output feeds the lead reviewer's
8
+ // AGREEMENT_MAP field and the orchestrator's INDEX status update; it must never
9
+ // break a pipeline.
10
+ //
11
+ // Usage:
12
+ // node .claude/ukit/index/review-panel-aggregate.mjs <TASK-xxx.md> [TASK-xxx.md...]
13
+ //
14
+ // Reads every `## Reviewer Verdict` block from the given task files, then prints:
15
+ // AGREEMENT_MAP: finding → member, member (one line per finding)
16
+ // HIGH_SIGNAL: finding → member, member (≥2 members or any critical)
17
+ // UNPARSED: <file>#verdict[<i>] (blocks with no VERDICT line)
18
+ // VERDICT: approved | approved_minor | changes_requested
19
+
20
+ import fs from 'node:fs';
21
+ import process from 'node:process';
22
+ import { pathToFileURL } from 'node:url';
23
+
24
+ const SEVERITIES = ['critical', 'important', 'minor'];
25
+
26
+ // Parse one `## Reviewer Verdict` block (format: code-reviewer.md §Output).
27
+ // Returns null when no recognizable VERDICT line exists — the block is then
28
+ // counted as absent and named in `unparsed`.
29
+ export function parseVerdictBlock(text) {
30
+ const src = String(text ?? '');
31
+ const verdictMatch = src.match(/^VERDICT\s*:\s*(APPROVED-WITH-MINOR|APPROVED|CHANGES-REQUESTED|CRITICAL)\s*$/im);
32
+ if (!verdictMatch) return null;
33
+
34
+ const memberMatch = src.match(/^PANEL_MEMBER\s*:\s*(\S+)\s*$/im);
35
+ const member = memberMatch && memberMatch[1] !== '-' ? memberMatch[1] : null;
36
+
37
+ const findings = { critical: [], important: [], minor: [] };
38
+ const findingsMatch = src.match(/^FINDINGS:\s*$/im);
39
+ if (findingsMatch) {
40
+ const rest = src.slice(findingsMatch.index + findingsMatch[0].length);
41
+ let severity = null;
42
+ for (const line of rest.split('\n')) {
43
+ if (/^\S/.test(line)) break; // next top-level field ends FINDINGS
44
+ const sev = line.match(/^\s{2}(critical|important|minor)\s*:/);
45
+ if (sev) {
46
+ severity = sev[1];
47
+ continue;
48
+ }
49
+ const item = line.match(/^\s{4}-\s+(.+?)\s*$/);
50
+ if (item && severity) {
51
+ const text2 = item[1];
52
+ if (text2 !== 'none' && text2 !== '-') findings[severity].push(text2);
53
+ }
54
+ }
55
+ }
56
+
57
+ return { member, verdict: verdictMatch[1].toUpperCase(), findings };
58
+ }
59
+
60
+ // Normalize a finding bullet for identity comparison: two members report the
61
+ // "identical finding" when the normalized text matches.
62
+ function normalizeFinding(text) {
63
+ return String(text).replace(/\s+/g, ' ').trim().toLowerCase();
64
+ }
65
+
66
+ export function aggregatePanelVerdicts(verdicts) {
67
+ const list = Array.isArray(verdicts) ? verdicts : [];
68
+ const parsed = [];
69
+ const unparsed = [];
70
+
71
+ list.forEach((block, i) => {
72
+ const p = parseVerdictBlock(block);
73
+ if (p) parsed.push({ ...p, label: p.member || `verdict[${i}]` });
74
+ else unparsed.push(`verdict[${i}]`);
75
+ });
76
+
77
+ // Agreement Map: finding → set of panel members reporting it.
78
+ const map = new Map(); // normalized → { finding, members:Set, critical:boolean }
79
+ for (const p of parsed) {
80
+ for (const sev of SEVERITIES) {
81
+ for (const f of p.findings[sev]) {
82
+ const key = normalizeFinding(f);
83
+ let entry = map.get(key);
84
+ if (!entry) {
85
+ entry = { finding: f, members: new Set(), critical: sev === 'critical' };
86
+ map.set(key, entry);
87
+ }
88
+ entry.members.add(p.label);
89
+ if (sev === 'critical') entry.critical = true;
90
+ }
91
+ }
92
+ }
93
+
94
+ const agreementMap = [...map.values()].map((e) => ({
95
+ finding: e.finding,
96
+ members: [...e.members],
97
+ }));
98
+ const highSignal = [...map.values()]
99
+ .filter((e) => e.members.size >= 2 || e.critical)
100
+ .map((e) => ({ finding: e.finding, members: [...e.members] }));
101
+
102
+ const approvals = parsed.filter((p) => p.verdict === 'APPROVED').length;
103
+ const changeRequests = parsed.filter((p) => p.verdict === 'CHANGES-REQUESTED').length;
104
+ const hasCritical =
105
+ parsed.some((p) => p.verdict === 'CRITICAL') || parsed.some((p) => p.findings.critical.length > 0);
106
+
107
+ let verdict;
108
+ if (hasCritical || changeRequests >= 2) verdict = 'changes_requested';
109
+ else if (approvals >= 2) verdict = 'approved';
110
+ else verdict = 'approved_minor';
111
+
112
+ return { agreementMap, verdict, highSignal, unparsed };
113
+ }
114
+
115
+ // CLI-only helpers below (not part of the canonical module).
116
+
117
+ // Extract every `## Reviewer Verdict` block from a task file. A block runs from
118
+ // its heading to the next `## ` heading or EOF.
119
+ function extractVerdictBlocks(markdown) {
120
+ const blocks = [];
121
+ const re = /^##\s+Reviewer Verdict\s*$/gm;
122
+ let m;
123
+ while ((m = re.exec(markdown)) !== null) {
124
+ const start = m.index;
125
+ const rest = markdown.slice(start + m[0].length);
126
+ const next = rest.search(/^##\s+/m);
127
+ blocks.push(next === -1 ? rest : rest.slice(0, next));
128
+ }
129
+ return blocks;
130
+ }
131
+
132
+ function main() {
133
+ const files = process.argv.slice(2);
134
+ if (files.length === 0) {
135
+ console.error('usage: review-panel-aggregate.mjs <TASK-xxx.md> [TASK-xxx.md...]');
136
+ process.exit(0); // advisory — never break a pipeline
137
+ }
138
+
139
+ const blocks = [];
140
+ const labels = [];
141
+ for (const file of files) {
142
+ let markdown;
143
+ try {
144
+ markdown = fs.readFileSync(file, 'utf8');
145
+ } catch (err) {
146
+ console.log(`UNPARSED: ${file} (unreadable: ${err.message})`);
147
+ continue;
148
+ }
149
+ for (const block of extractVerdictBlocks(markdown)) {
150
+ labels.push(file);
151
+ blocks.push(block);
152
+ }
153
+ }
154
+
155
+ const { agreementMap, verdict, highSignal, unparsed } = aggregatePanelVerdicts(blocks);
156
+
157
+ console.log('AGREEMENT_MAP:');
158
+ for (const e of agreementMap) console.log(` ${e.finding} → ${e.members.join(', ')}`);
159
+ if (agreementMap.length === 0) console.log(' (none)');
160
+ console.log('HIGH_SIGNAL:');
161
+ for (const e of highSignal) console.log(` ${e.finding} → ${e.members.join(', ')}`);
162
+ if (highSignal.length === 0) console.log(' (none)');
163
+ if (unparsed.length === 0) console.log('UNPARSED: (none)');
164
+ for (const u of unparsed) {
165
+ const idx = Number(u.slice('verdict['.length, -1));
166
+ console.log(`UNPARSED: ${labels[idx] ?? '?'}#${u}`);
167
+ }
168
+ console.log(`VERDICT: ${verdict}`);
169
+ process.exit(0);
170
+ }
171
+
172
+ if (process.argv[1] && pathToFileURL(process.argv[1]).href === import.meta.url) {
173
+ main();
174
+ }