lazycodex-ai 5.1.45 → 5.1.46

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 (236) hide show
  1. package/README.de.md +0 -5
  2. package/README.es.md +0 -5
  3. package/README.fr.md +0 -5
  4. package/README.it.md +0 -5
  5. package/README.ja.md +0 -5
  6. package/README.ko.md +0 -5
  7. package/README.md +4 -5
  8. package/README.pt-br.md +0 -5
  9. package/README.ru.md +0 -6
  10. package/README.zh-cn.md +0 -5
  11. package/dist/cli/index.js +76 -156
  12. package/dist/cli-node/index.js +76 -156
  13. package/package.json +1 -1
  14. package/packages/lsp-daemon/dist/cli.js +3 -3
  15. package/packages/lsp-daemon/dist/client.js +3 -3
  16. package/packages/lsp-daemon/dist/index.js +3 -3
  17. package/packages/lsp-tools-mcp/dist/cli.js +3 -3
  18. package/packages/lsp-tools-mcp/dist/mcp.js +3 -3
  19. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  20. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +22 -12
  21. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  22. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  23. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  24. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  25. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  26. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  28. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  29. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  30. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  31. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  33. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  35. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  37. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  38. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  39. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  41. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  43. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  44. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  45. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  46. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  47. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  48. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  49. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  50. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  51. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  52. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  53. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  54. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  55. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  56. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  57. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  58. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  59. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  60. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  61. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  63. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  65. package/packages/omo-codex/plugin/package-lock.json +12 -12
  66. package/packages/omo-codex/plugin/package.json +1 -1
  67. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -3
  68. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +0 -2
  69. package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +1 -1
  70. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  71. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +2 -2
  72. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +1 -1
  73. package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +14 -2
  74. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +36 -11
  75. package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +73 -13
  76. package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
  77. package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger.md +95 -0
  78. package/packages/omo-codex/plugin/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
  79. package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +21 -4
  80. package/packages/omo-codex/plugin/skills/ulw-research/references/report-visualization.md +2 -0
  81. package/packages/omo-codex/plugin/skills/ulw-research/references/unit-rules.md +157 -0
  82. package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
  83. package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +19 -5
  84. package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +27 -6
  85. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +191 -0
  86. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -0
  87. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +239 -0
  88. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +66 -0
  89. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-expr.mjs +108 -0
  90. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +194 -0
  91. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
  92. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
  93. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
  94. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +231 -0
  95. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-pairs.mjs +187 -0
  96. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
  97. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
  98. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
  99. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
  100. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
  101. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
  102. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
  103. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
  104. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
  105. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
  106. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +28 -8
  107. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +2 -2
  108. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +182 -0
  109. package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +193 -0
  110. package/packages/omo-codex/plugin/skills/ulw-research/scripts/meaning-check.mjs +196 -0
  111. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +6 -5
  112. package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +184 -0
  113. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +115 -0
  114. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-diff.mjs +31 -0
  115. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-project.mjs +125 -0
  116. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-rules.mjs +170 -0
  117. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
  118. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +15 -0
  119. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +140 -0
  120. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
  121. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
  122. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-errors.mjs +23 -0
  123. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
  124. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
  125. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-precision.mjs +44 -0
  126. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
  127. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules.mjs +173 -0
  128. package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +4 -4
  129. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +19 -0
  130. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +7 -3
  131. package/packages/omo-codex/scripts/install-dist/install-local.mjs +26 -16
  132. package/packages/shared-skills/skills/ast-grep/AGENTS.md +1 -1
  133. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
  134. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +2 -2
  135. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +1 -1
  136. package/packages/shared-skills/skills/ulw-research/AGENTS.md +14 -2
  137. package/packages/shared-skills/skills/ulw-research/SKILL.md +37 -12
  138. package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +73 -13
  139. package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
  140. package/packages/shared-skills/skills/ulw-research/references/fact-ledger.md +95 -0
  141. package/packages/shared-skills/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
  142. package/packages/shared-skills/skills/ulw-research/references/report-gates.md +21 -4
  143. package/packages/shared-skills/skills/ulw-research/references/report-visualization.md +2 -0
  144. package/packages/shared-skills/skills/ulw-research/references/unit-rules.md +157 -0
  145. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
  146. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +193 -0
  147. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +19 -5
  148. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +13 -2
  149. package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +27 -6
  150. package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +3 -0
  151. package/packages/shared-skills/skills/ulw-research/scripts/copy-returns.test.ts +183 -0
  152. package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +245 -0
  153. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +191 -0
  154. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -0
  155. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +239 -0
  156. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +66 -0
  157. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +375 -0
  158. package/packages/shared-skills/skills/ulw-research/scripts/fact-expr.mjs +108 -0
  159. package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +194 -0
  160. package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.test.ts +221 -0
  161. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +9 -2
  162. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
  163. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +18 -3
  164. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +160 -0
  165. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
  166. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
  167. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +2 -0
  168. package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +231 -0
  169. package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.test.ts +118 -0
  170. package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.mjs +187 -0
  171. package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.test.ts +167 -0
  172. package/packages/shared-skills/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
  173. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +409 -0
  174. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +388 -0
  175. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
  176. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.test.ts +81 -0
  177. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
  178. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
  179. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
  180. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.test.ts +117 -0
  181. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
  182. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
  183. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
  184. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.test.ts +58 -0
  185. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
  186. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +270 -0
  187. package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
  188. package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.test.ts +73 -0
  189. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +28 -8
  190. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +2 -2
  191. package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +182 -0
  192. package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +193 -0
  193. package/packages/shared-skills/skills/ulw-research/scripts/md-lite.test.ts +271 -0
  194. package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.mjs +196 -0
  195. package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.test.ts +228 -0
  196. package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +6 -5
  197. package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +184 -0
  198. package/packages/shared-skills/skills/ulw-research/scripts/placeholder.test.ts +77 -0
  199. package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +115 -0
  200. package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.test.ts +363 -0
  201. package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.mjs +31 -0
  202. package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.test.ts +168 -0
  203. package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +187 -0
  204. package/packages/shared-skills/skills/ulw-research/scripts/polish-project.mjs +125 -0
  205. package/packages/shared-skills/skills/ulw-research/scripts/polish-rules.mjs +170 -0
  206. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
  207. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +15 -0
  208. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +458 -2
  209. package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +140 -0
  210. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
  211. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +113 -0
  212. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/assets/share.csv +3 -0
  213. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/gen-legacy-dev.mjs +89 -0
  214. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-basic.json +223 -0
  215. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-legacy-dev.json +859 -0
  216. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-verify.json +420 -0
  217. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-bad.html +19 -0
  218. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-good.html +39 -0
  219. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/acronyms.json +3 -0
  220. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/meta.json +9 -0
  221. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/sentences.jsonl +7 -0
  222. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/text.txt +7 -0
  223. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4.html +19 -0
  224. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/acronyms.json +1 -0
  225. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/meta.json +9 -0
  226. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/sentences.jsonl +1 -0
  227. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/text.txt +1 -0
  228. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S9.txt +1 -0
  229. package/packages/shared-skills/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
  230. package/packages/shared-skills/skills/ulw-research/scripts/unit-errors.mjs +23 -0
  231. package/packages/shared-skills/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
  232. package/packages/shared-skills/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
  233. package/packages/shared-skills/skills/ulw-research/scripts/unit-precision.mjs +44 -0
  234. package/packages/shared-skills/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
  235. package/packages/shared-skills/skills/ulw-research/scripts/unit-rules.mjs +173 -0
  236. package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +4 -4
@@ -0,0 +1,173 @@
1
+ // The sole per-operation registry: guards, context, arithmetic, precision, audit and compatibility.
2
+ import { evaluate, leaves } from "./fact-expr.mjs"
3
+ import { add, div, mul, sub, toDecimal } from "./rational.mjs"
4
+ import { canonicalUnit, inputScale, isAffine, isCurrencyRate, isPercentish, refuse, RuleError, unitOver } from "./unit-algebra.mjs"
5
+ import { checkMetadata, nonEmpty, object, propagatedMetadata } from "./unit-metadata.mjs"
6
+ import { equalUnits, inferExpr, listed, minusUnit, notAffine, show } from "./unit-pairs.mjs"
7
+ import { display, terminates, toBig } from "./unit-precision.mjs"
8
+ import { convertShape, exprShape, noContext, repeatedOperand, rowShape, shapes, sumShape } from "./unit-rules-shapes.mjs"
9
+ import { convertFactor, dimensionOf } from "./units.mjs"
10
+ export { canonicalUnit, inferExpr, isAffine, RuleError }
11
+
12
+ const EXPR_HINT = "currencies never convert by table: add a dated rate row and use --op expr"
13
+ const compare = (a, b) => a.num * b.den - b.num * a.den
14
+ const SNAPSHOT = ["population", "snapshot_window"]
15
+ const ADDITIVE = [...SNAPSHOT, "accounting_basis"]
16
+ const pair = (a, b) => (spec) => [spec[a], spec[b]]
17
+ const listOf = (spec) => spec.operands
18
+ const generated = (exact, formula, factor = null) => ({ exact, formula, factor })
19
+ const idsOf = (rows) => rows.map((r) => r.fact_id)
20
+ const valuesOf = (rows) => rows.map((r) => toBig(r.exact))
21
+ const ordinary = {
22
+ kind: "derived", compatibility: "checked", context: () => null, shape: noContext,
23
+ precision: () => "sigfigs", render: (shown) => shown, metadataResult: propagatedMetadata,
24
+ }
25
+ const binary = { ...ordinary, arity: (n) => n === 2, arityText: "two operands" }
26
+
27
+ function sharedReference(rows, reference) {
28
+ if (nonEmpty(reference)) return
29
+ if (object(reference)) {
30
+ const named = rows.map((r) => reference[r.fact_id])
31
+ if (Object.keys(reference).length === rows.length && named.every(nonEmpty) && named.every((v) => v === named[0])) return
32
+ refuse("% operands name different references or missing/extra ids", undefined, "reference", "one denominator for exactly the operands")
33
+ }
34
+ refuse("summing % operands needs one shared reference (denominator): pass reference")
35
+ }
36
+
37
+ /** Registry rows own every operation-specific choice; consumers only dispatch through these rows. */
38
+ export const OPERATION_RULES = Object.freeze({
39
+ sum: Object.freeze({
40
+ ...ordinary, arity: (n) => n >= 2, arityText: "two or more operands", operandIds: listOf,
41
+ inputFields: ["operands", "disjoint", "reference"],
42
+ context: (s) => ({ disjoint: Object.hasOwn(s, "disjoint") ? s.disjoint : false, reference: Object.hasOwn(s, "reference") ? s.reference : null }),
43
+ metadata: ADDITIVE, precision: () => "places", shape: sumShape,
44
+ resultUnit(rows, units, context) {
45
+ notAffine("sum", rows, units)
46
+ const unit = equalUnits(rows, units)
47
+ if (unit === "%") {
48
+ if (context.disjoint !== true) refuse("summing % operands needs disjoint shares: pass disjoint")
49
+ sharedReference(rows, context.reference)
50
+ if (!nonEmpty(context.rationale)) refuse("summing % operands needs a rationale for the disjoint shares")
51
+ const values = valuesOf(rows)
52
+ if (values.some((r) => r.num < 0n || r.num > 100n * r.den) || compare(values.reduce(add), { num: 100n, den: 1n }) > 0n) refuse("disjoint shares must each be in [0, 100] and total <= 100", undefined, "share_total", "valid disjoint shares totaling at most 100%")
53
+ }
54
+ return unit
55
+ },
56
+ calculate: (rows) => generated(valuesOf(rows).reduce(add), idsOf(rows).join(" + ")),
57
+ malformed: shapes("no context", "% without disjoint", "% without reference", "% without rationale", "unequal units", "affine units", "closed context", "share total"),
58
+ }),
59
+ diff: Object.freeze({
60
+ ...binary, operandIds: listOf, metadata: ADDITIVE, precision: () => "places",
61
+ inputFields: ["operands"],
62
+ resultUnit: (rows, units) => minusUnit(units[0], units[1], `diff ${listed(rows, units)}`),
63
+ calculate: (rows) => generated(sub(...valuesOf(rows)), idsOf(rows).join(" - ")),
64
+ malformed: shapes("%p - % pair", "unit - other unit pair", "affine units", "stray context"),
65
+ }),
66
+ growth: Object.freeze({
67
+ ...binary, arityText: "two operands (from, to)", operandIds: pair("from", "to"), metadata: ["population", "accounting_basis"],
68
+ inputFields: ["from", "to"],
69
+ resultUnit(rows, units) {
70
+ const [from, to] = rows
71
+ notAffine("growth", rows, units)
72
+ equalUnits(rows, units)
73
+ if (!nonEmpty(from.entity) || from.entity !== to.entity) refuse(`growth needs one declared entity: ${from.entity} vs ${to.entity}`)
74
+ if (!nonEmpty(from.valid_at) || !nonEmpty(to.valid_at) || from.valid_at === to.valid_at) refuse(`growth needs two different valid_at periods: ${from.valid_at} vs ${to.valid_at}`)
75
+ if (toBig(from.exact).num <= 0n) refuse(`growth needs a positive starting value in ${from.fact_id}`)
76
+ return "%"
77
+ },
78
+ calculate(rows) { const [a, b] = valuesOf(rows); const [x, y] = idsOf(rows); return generated(mul(div(sub(b, a), a), 100n), `(${y} - ${x}) / ${x} * 100`) },
79
+ malformed: shapes("affine units", "unequal units", "entity mismatch", "one period", "from <= 0", "stray context"),
80
+ }),
81
+ share: Object.freeze({
82
+ ...binary, arityText: "two operands (part, whole)", operandIds: pair("part", "whole"), metadata: SNAPSHOT,
83
+ inputFields: ["part", "whole"],
84
+ resultUnit(rows, units) {
85
+ notAffine("share", rows, units)
86
+ equalUnits(rows, units)
87
+ const [part, whole] = valuesOf(rows)
88
+ if (whole.num <= 0n) refuse(`share needs a positive whole in ${rows[1].fact_id}`)
89
+ if (part.num < 0n || compare(part, whole) > 0n) refuse(`share needs 0 <= part <= whole: ${rows[0].fact_id} is outside [0, ${rows[1].fact_id}]`)
90
+ return "%"
91
+ },
92
+ calculate: (rows) => generated(mul(div(...valuesOf(rows)), 100n), `${idsOf(rows).join(" / ")} * 100`),
93
+ malformed: shapes("affine units", "unequal units", "whole <= 0", "part < 0", "part above whole", "stray context"),
94
+ }),
95
+ ratio: Object.freeze({
96
+ ...binary, arityText: "two operands (num, den)", operandIds: pair("num", "den"), metadata: SNAPSHOT,
97
+ inputFields: ["num", "den"],
98
+ resultUnit(rows, units) {
99
+ notAffine("ratio", rows, units)
100
+ if (toBig(rows[1].exact).num === 0n) refuse(`ratio denominator ${rows[1].fact_id} is zero`)
101
+ if (units[0] === units[1]) return null
102
+ if (units.some(isPercentish)) refuse(`a ratio over % or %p needs equal units: ${listed(rows, units)}; use expr`)
103
+ return unitOver(units[0], units[1])
104
+ },
105
+ calculate: (rows) => generated(div(...valuesOf(rows)), idsOf(rows).join(" / ")),
106
+ malformed: shapes("affine units", "divides by zero", "stray context"),
107
+ }),
108
+ convert: Object.freeze({
109
+ ...ordinary, kind: "converted", arity: (n) => n === 1, arityText: "one operand", operandIds: listOf, metadata: [],
110
+ inputFields: ["operands", "to"],
111
+ context: (s) => ({ target: canonicalUnit(s.to) }), shape: convertShape,
112
+ defaultUnit: (s) => s.to,
113
+ resultUnit(rows, units, context) {
114
+ if (!nonEmpty(context.target)) refuse("convert needs a target unit")
115
+ const [from] = units
116
+ const target = context.target
117
+ if (from === target) refuse(`${rows[0].fact_id} is already in ${target}`)
118
+ if ([from, target].some((u) => dimensionOf(u)?.startsWith("currency:"))) refuse(`${rows[0].fact_id} in ${show(from)} has no table conversion to ${target} (a currency)`, EXPR_HINT)
119
+ if (!convertFactor(from, target)) refuse(`${rows[0].fact_id} in ${show(from)} has no table conversion to ${target}`)
120
+ return target
121
+ },
122
+ calculate(rows, context) {
123
+ const row = rows[0]
124
+ const f = convertFactor(row.unit, context.target)
125
+ const scale = { num: f.num, den: f.den }
126
+ const text = terminates(scale) ? toDecimal(scale) : `${scale.num}/${scale.den}`
127
+ return generated(add(mul(toBig(row.exact), scale), f.offset ?? 0n), `${row.fact_id} * ${text}${f.offset ? ` + ${f.offset.num}/${f.offset.den}` : ""}`, terminates(scale) ? text : null)
128
+ },
129
+ render: (shown, rows) => `${shown} (${display(rows[0].value, rows[0].unit)})`,
130
+ malformed: shapes("no context", "empty target", "alias target", "currency target", "no factor to target", "closed context"),
131
+ }),
132
+ expr: Object.freeze({
133
+ ...ordinary, arity: (n) => n >= 1, arityText: "one or more operands", compatibility: "unchecked",
134
+ expression: true, operandIds: (s, ast) => Object.hasOwn(s, "operands") ? s.operands : leaves(ast).ids,
135
+ inputFields: ["formula", "operands"],
136
+ metadata: [], precision: (ast) => ast?.op === "+" || ast?.op === "-" ? "places" : "sigfigs",
137
+ resultUnit(rows, units, _context, ast) {
138
+ for (const r of rows) if (isCurrencyRate(r.unit) && !nonEmpty(r.valid_at)) refuse(`FX rate ${r.fact_id} needs a dated valid_at; date compatibility remains unchecked`, EXPR_HINT, "undated_rate", "a dated FX rate row")
139
+ const inferred = inferExpr(ast, new Map(rows.map((r, i) => [r.fact_id, units[i]])), new Map(rows.map((r) => [r.fact_id, r]))).unit
140
+ notAffine("expr", rows, units)
141
+ return inferred
142
+ },
143
+ calculate(rows, _context, ast, formula) {
144
+ const { units } = inferExpr(ast, new Map(rows.map((r) => [r.fact_id, r.unit])))
145
+ return generated(evaluate(ast, new Map(rows.map((r) => [r.fact_id, toBig(r.exact)])), units), formula.trim())
146
+ },
147
+ shape: (row) => noContext(row) ?? exprShape(row),
148
+ malformed: shapes("formula id mismatch", "parse error", "divides by zero", "uninferable unit", "affine sum", "stray context", "undated rate"),
149
+ }),
150
+ })
151
+
152
+ export function ruleOf(op) {
153
+ if (!Object.hasOwn(OPERATION_RULES, op)) refuse(`unknown operation ${String(op)}; use one of ${Object.keys(OPERATION_RULES).join(", ")}`, undefined, "operation", Object.keys(OPERATION_RULES))
154
+ return OPERATION_RULES[op]
155
+ }
156
+ export function operandUnit(row) {
157
+ if (canonicalUnit(row.unit) !== row.unit || inputScale(row.unit)) refuse(`${row.fact_id} unit must be canonical stored text`, undefined, "noncanonical_operand", { unit: canonicalUnit(row.unit) })
158
+ return row.unit
159
+ }
160
+ export function expectedUnit(op, rows, { ast = null, context = null } = {}) {
161
+ const rule = ruleOf(op)
162
+ const repeated = repeatedOperand(idsOf(rows))
163
+ if (repeated) refuse(repeated, undefined, "repeated_operand", "distinct operand ids")
164
+ if (!rule.arity(rows.length)) refuse(`${op} takes ${rule.arityText}, got ${rows.length}`, undefined, "arity", rule.arityText)
165
+ const units = rows.map(operandUnit)
166
+ checkMetadata(rows, rule.metadata)
167
+ return rule.resultUnit(rows, units, context ?? {}, ast)
168
+ }
169
+ export function renderPrecision(op, unit, ast = null) {
170
+ return unit === "%p" ? "places" : ruleOf(op).precision(ast)
171
+ }
172
+ export const unitMismatch = (op, rows, unit, expected) => `unit ${show(unit)} does not follow from ${op} over ${rows.map((r) => `${r.fact_id} ${r.unit ?? "null"}`).join(", ")}: expected unit ${show(expected)}`
173
+ export const malformed = (row) => rowShape(row, OPERATION_RULES)
@@ -10,10 +10,10 @@ import { div, fromDecimal, sub } from "./rational.mjs"
10
10
 
11
11
  /** [token, dimension, factor, reading, aliases, offset?]; the Korean reading is noted per row. */
12
12
  const TABLE = [
13
- ["mm", "length", "0.001", "open", ["millimeter", "millimeters", "\uBC00\uB9AC\uBBF8\uD130"]], // millimiteo
14
- ["cm", "length", "0.01", "open", ["centimeter", "centimeters", "\uC13C\uD2F0\uBBF8\uD130"]], // sentimiteo
13
+ ["mm", "length", "0.001", "open", ["millimeter", "millimeters", "millimetre", "millimetres", "\uBC00\uB9AC\uBBF8\uD130"]], // millimiteo
14
+ ["cm", "length", "0.01", "open", ["centimeter", "centimeters", "centimetre", "centimetres", "\uC13C\uD2F0\uBBF8\uD130"]], // sentimiteo
15
15
  ["m", "length", "1", "open", ["meter", "meters", "metre", "metres", "\uBBF8\uD130"]], // miteo
16
- ["km", "length", "1000", "open", ["kilometer", "kilometers", "\uD0AC\uB85C\uBBF8\uD130"]], // killomiteo
16
+ ["km", "length", "1000", "open", ["kilometer", "kilometers", "kilometre", "kilometres", "\uD0AC\uB85C\uBBF8\uD130"]], // killomiteo
17
17
  ["g", "mass", "1", "closed", ["gram", "grams", "\uADF8\uB7A8"]], // geuraem
18
18
  ["kg", "mass", "1000", "closed", ["kilogram", "kilograms", "\uD0AC\uB85C\uADF8\uB7A8"]], // killogeuraem
19
19
  ["t", "mass", "1000000", "closed", ["ton", "tons", "tonne", "tonnes", "\uD1A4"]], // ton
@@ -65,7 +65,7 @@ for (const [token, dimension, factor, reading, aliases, offset] of TABLE) {
65
65
  for (const alias of [token, ...aliases]) {
66
66
  const key = squash(alias)
67
67
  EXACT.set(key, entry)
68
- if (key.length > 1 && /^[A-Za-z]+$/.test(key) && !WORD.has(key.toLowerCase())) WORD.set(key.toLowerCase(), entry)
68
+ if (alias !== token && key.length > 2 && /^[a-z]+$/.test(key) && !WORD.has(key.toLowerCase())) WORD.set(key.toLowerCase(), entry)
69
69
  }
70
70
  }
71
71
 
@@ -16,6 +16,7 @@ import {
16
16
  ulwExecuteOriginalCompletion,
17
17
  ulwExecuteOriginalHardRule,
18
18
  } from "../scripts/sync-skills.mjs";
19
+ import { removeCodexSkillOverlays } from "./sync-skills-test-support.mjs";
19
20
 
20
21
  const frontmatter = "---\nname: fixture-sentinel\n---\n\n";
21
22
  const opencodeExample = "# SENTINEL_SECTION\ntask(SENTINEL_INPUT)\n";
@@ -177,3 +178,21 @@ test("#given the shared ulw-research skill #when the Codex overlay runs #then th
177
178
  // then
178
179
  assert.notEqual(actual, shared, "the ulw-research overlay anchor no longer matches the shared SKILL.md");
179
180
  });
181
+
182
+ test("#given the ulw-research delivery gates are renumbered #when the Codex overlay runs #then only the proofread gate is dropped", async () => {
183
+ // given
184
+ const shared = await readFile(join(sharedSkillsRoot, "ulw-research", "SKILL.md"), "utf8");
185
+ const renumbered = shared
186
+ .replace(/^(\d+)(\. \*\*Proofread gate:)/m, (_, numeral, rest) => `${Number(numeral) + 1}${rest}`)
187
+ .replace(/^(\d+)(\. \*\*Visual QA\.\*\*)/m, (_, numeral, rest) => `${Number(numeral) + 1}${rest}`);
188
+ assert.notEqual(renumbered, shared, "the renumbering fixture must change the delivery gates");
189
+
190
+ // when
191
+ const actual = applyCodexSkillOverlays("ulw-research", renumbered);
192
+
193
+ // then: generated Codex edition contract (no `task(category="writing")` gate; tool-based gates kept)
194
+ assert.doesNotMatch(actual, /\*\*Proofread gate:/);
195
+ assert.match(actual, /\*\*Fidelity gate\.\*\*/);
196
+ assert.match(actual, /inspect the pixels\.\n\n/);
197
+ assert.equal(removeCodexSkillOverlays("ulw-research", actual), renumbered);
198
+ });
@@ -158,12 +158,16 @@ prefixes when identity is needed.
158
158
  `;
159
159
  const reviewWorkCodexGatePattern = new RegExp(reviewWorkCodexGate.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
160
160
 
161
- const ulwResearchOriginalDeliveryGates = "Reading the source markup is not visual QA; inspect the pixels.\n4. **Proofread gate: `task(category=\"writing\", ...)`.** Hand the final text to a dedicated `writing` worker whose only job is language: grammar, spelling, punctuation, terminology consistency, and whether the prose reads NATIVELY in the report's own language. It proofreads only and never composes. It returns a defect list; fix every item and re-run the gate on the delta. Deliver only on a clean pass. This gate runs BEFORE the first delivery, not after the user finds the typo.";
162
- const ulwResearchCodexDeliveryGate = "Reading the source markup is not visual QA; inspect the pixels.";
161
+ const ulwResearchProofreadGate = "**Proofread gate: `task(category=\"writing\", ...)`.** Hand the final text to a dedicated `writing` worker whose only job is language: grammar, spelling, punctuation, terminology consistency, and whether the prose reads NATIVELY in the report's own language. It proofreads only and never composes. It returns a defect list; fix every item and re-run the gate on the delta. Deliver only on a clean pass. This gate runs BEFORE the first delivery, not after the user finds the typo.";
162
+ // The shared skill numbers the proofread gate right after the Visual QA item the Codex edition ends on.
163
+ const ulwResearchVisualQaItemPattern = /^(\d+)\. \*\*Visual QA\.\*\*[^\n]*inspect the pixels\.$/m;
163
164
 
164
165
  export function removeCodexSkillOverlays(skillName, content) {
165
166
  if (skillName === "ulw-research") {
166
- return content.replace(ulwResearchCodexDeliveryGate, ulwResearchOriginalDeliveryGates);
167
+ return content.replace(
168
+ ulwResearchVisualQaItemPattern,
169
+ (item, numeral) => `${item}\n${Number(numeral) + 1}. ${ulwResearchProofreadGate}`,
170
+ );
167
171
  }
168
172
  if (skillName === "ulw-execute") {
169
173
  return content
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // omo-codex-install:a13cf7e9a95d881bd59c4cfee5cc6277e0ded2733a57e61020e6786ef72839f4:5b4bab0a0600c1ff722c498ab18fcef7cf291fd3a13f074cb2d5ca4db8ecbec4
2
+ // omo-codex-install:1d099ec7e89e45d9a749b3119fafbd06726b589bba756c5a72ea56b563a2b9ea:0766ee449be1f634fa5ed2f988eb9b3473567708af6ab5bb8a716ce419ce101f
3
3
  var __esm = (fn, res, err) => () => {
4
4
  if (fn)
5
5
  try {
@@ -453,13 +453,13 @@ var init_event_id = __esm(() => {
453
453
  });
454
454
 
455
455
  // packages/telemetry-core/src/machine-id.ts
456
- import { createHash as createHash4 } from "node:crypto";
456
+ import { createHash as createHash5 } from "node:crypto";
457
457
  import os2 from "node:os";
458
458
  function getDefaultTelemetryOsProvider() {
459
459
  return os2;
460
460
  }
461
461
  function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
462
- return createHash4("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
462
+ return createHash5("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
463
463
  }
464
464
  var init_machine_id = () => {};
465
465
 
@@ -10123,7 +10123,7 @@ var package_default;
10123
10123
  var init_package = __esm(() => {
10124
10124
  package_default = {
10125
10125
  name: "@oh-my-opencode/omo-codex",
10126
- version: "5.1.45",
10126
+ version: "5.1.46",
10127
10127
  type: "module",
10128
10128
  private: true,
10129
10129
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -19616,6 +19616,7 @@ var OmoMemoryReflectionSchema = object({
19616
19616
  merge: _enum(["auto", "integration"]).default("auto"),
19617
19617
  category: string2().min(1).default("quick"),
19618
19618
  timeout_minutes: number2().int().positive().default(15),
19619
+ max_concurrent_runs: number2().int().positive().default(1),
19619
19620
  sandbox: _enum(["auto", "required", "off"]).default("auto")
19620
19621
  }).strict();
19621
19622
  var OmoMemorySyncSchema = object({
@@ -19687,6 +19688,7 @@ var OmoMemoryReflectionLayerSchema = object({
19687
19688
  merge: _enum(["auto", "integration"]).optional(),
19688
19689
  category: string2().min(1).optional(),
19689
19690
  timeout_minutes: number2().int().positive().optional(),
19691
+ max_concurrent_runs: number2().int().positive().optional(),
19690
19692
  sandbox: _enum(["auto", "required", "off"]).optional()
19691
19693
  }).strict();
19692
19694
  var OmoMemorySyncLayerSchema = object({
@@ -19751,7 +19753,7 @@ var OmoMemoryProjectionLayerSchema = object({
19751
19753
  var OmoMemoryAgentOverridesSchema = object({
19752
19754
  enabled: boolean2().optional(),
19753
19755
  agent: string2().min(1).optional(),
19754
- reflection: OmoMemoryReflectionLayerSchema.optional(),
19756
+ reflection: OmoMemoryReflectionLayerSchema.omit({ max_concurrent_runs: true }).optional(),
19755
19757
  nudge: OmoMemoryNudgeLayerSchema.optional(),
19756
19758
  facts: OmoMemoryFactsLayerSchema.optional(),
19757
19759
  dream: OmoMemoryDreamLayerSchema.optional(),
@@ -19776,6 +19778,7 @@ var OmoMemorySettingsSchema = object({
19776
19778
  merge: "auto",
19777
19779
  category: "quick",
19778
19780
  timeout_minutes: 15,
19781
+ max_concurrent_runs: 1,
19779
19782
  sandbox: "auto"
19780
19783
  }),
19781
19784
  nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
@@ -20119,9 +20122,6 @@ var OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
20119
20122
  timeoutMs: number2().int().positive().default(3000)
20120
20123
  }).strict();
20121
20124
 
20122
- // packages/omo-config-core/src/schema/dori.ts
20123
- var OmoDoriSectionSchema = record(string2(), unknown()).describe("Chat-surface dori settings, owned and validated by a separately installed dori package. omo accepts the key and never reads it.");
20124
-
20125
20125
  // packages/omo-config-core/src/schema/provenance.ts
20126
20126
  var OmoProvenanceSettingsSchema = object({
20127
20127
  workspaces: array(object({
@@ -20138,7 +20138,6 @@ var OmoExcludedModelsSchema = array(string2());
20138
20138
  var OmoTypedHarnessConfigSchema = object({
20139
20139
  provenance: OmoProvenanceSettingsSchema.optional(),
20140
20140
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20141
- dori: OmoDoriSectionSchema.optional(),
20142
20141
  categories: OmoCategoriesConfigSchema.optional(),
20143
20142
  agents: OmoAgentsConfigSchema.optional(),
20144
20143
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -20157,7 +20156,6 @@ var OmoTypedHarnessConfigSchema = object({
20157
20156
  var OmoConfigProfileSchema = object({
20158
20157
  provenance: OmoProvenanceSettingsSchema.optional(),
20159
20158
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20160
- dori: OmoDoriSectionSchema.optional(),
20161
20159
  categories: OmoCategoriesConfigSchema.optional(),
20162
20160
  agents: OmoAgentsConfigSchema.optional(),
20163
20161
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -20180,7 +20178,6 @@ var OmoConfigProfileSchema = object({
20180
20178
  var OmoConfigSchema = object({
20181
20179
  provenance: OmoProvenanceSettingsSchema.optional(),
20182
20180
  formatOnMutation: OmoFormatOnMutationSchema.optional(),
20183
- dori: OmoDoriSectionSchema.optional(),
20184
20181
  $schema: string2().optional(),
20185
20182
  categories: OmoCategoriesConfigSchema.optional(),
20186
20183
  agents: OmoAgentsConfigSchema.optional(),
@@ -20207,7 +20204,6 @@ var OmoConfigSchema = object({
20207
20204
  var OmoConfigLayerSchema = object({
20208
20205
  provenance: OmoProvenanceSettingsSchema.optional(),
20209
20206
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20210
- dori: OmoDoriSectionSchema.optional(),
20211
20207
  $schema: string2().optional(),
20212
20208
  categories: OmoCategoriesConfigSchema.optional(),
20213
20209
  agents: OmoAgentsConfigSchema.optional(),
@@ -21231,6 +21227,9 @@ function printParseErrorCode(code) {
21231
21227
  return "<unknown ParseErrorCode>";
21232
21228
  }
21233
21229
 
21230
+ // packages/omo-config-core/src/loader/layer-validation.ts
21231
+ import { createHash as createHash2 } from "node:crypto";
21232
+
21234
21233
  // packages/omo-config-core/src/loader/merge.ts
21235
21234
  var DANGEROUS_KEYS = new Set(["__proto__", "constructor", "prototype"]);
21236
21235
  function isUnsafeObjectKey(key) {
@@ -21404,6 +21403,14 @@ function unrecognizedKeyIssues(issues) {
21404
21403
  function isRecord9(value) {
21405
21404
  return typeof value === "object" && value !== null && !Array.isArray(value);
21406
21405
  }
21406
+ var RETIRED_SECTION_DIGESTS = new Set([
21407
+ "447f75a8ebdbdb79a57f0b8cebbfba183820cf54a8119ac01449b30499e5ef0e",
21408
+ "4ea5ee68fea05586106890ded5733820bb77d919cda27bc4b8139b7cd33b8889"
21409
+ ]);
21410
+ function isRetiredSection(key) {
21411
+ return RETIRED_SECTION_DIGESTS.has(createHash2("sha256").update(key.toLowerCase()).digest("hex"));
21412
+ }
21413
+ var HARNESS_BLOCKS = new Set(["[opencode]", "[native]", "[senpi]", "[codex]"]);
21407
21414
  function sanitizeUnsafeKeys(value, path = []) {
21408
21415
  if (Array.isArray(value)) {
21409
21416
  const issues = [];
@@ -21422,6 +21429,9 @@ function sanitizeUnsafeKeys(value, path = []) {
21422
21429
  }
21423
21430
  const sanitized = {};
21424
21431
  for (const [key, entry] of Object.entries(value)) {
21432
+ const isConfigContainer = path.length === 0 || path.length === 1 && HARNESS_BLOCKS.has(path[0] ?? "") || path.length === 2 && path[0] === "profiles" || path.length === 3 && path[0] === "profiles" && HARNESS_BLOCKS.has(path[2] ?? "");
21433
+ if (isConfigContainer && isRetiredSection(key))
21434
+ continue;
21425
21435
  if (isUnsafeObjectKey(key)) {
21426
21436
  issues.push({ keys: [key], path });
21427
21437
  continue;
@@ -22441,7 +22451,7 @@ function nodeErrorCode2(error) {
22441
22451
  }
22442
22452
 
22443
22453
  // packages/omo-codex/src/install/default-agent-role.ts
22444
- import { createHash as createHash2 } from "node:crypto";
22454
+ import { createHash as createHash3 } from "node:crypto";
22445
22455
  import { lstat as lstat9, readFile as readFile16, rm as rm10 } from "node:fs/promises";
22446
22456
  import { join as join23 } from "node:path";
22447
22457
  var REGISTRATION = { name: "default", configFile: "./agents/default.toml" };
@@ -22497,7 +22507,7 @@ async function readIfPresent(path) {
22497
22507
  }
22498
22508
  }
22499
22509
  function hash(content) {
22500
- return createHash2("sha256").update(content).digest("hex");
22510
+ return createHash3("sha256").update(content).digest("hex");
22501
22511
  }
22502
22512
 
22503
22513
  // packages/omo-codex/src/install/link-cached-plugin-agents.ts
@@ -23134,7 +23144,7 @@ function formatUnknownError(error) {
23134
23144
  }
23135
23145
 
23136
23146
  // packages/omo-codex/src/install/lsp-daemon-reaper.ts
23137
- import { createHash as createHash3 } from "node:crypto";
23147
+ import { createHash as createHash4 } from "node:crypto";
23138
23148
  import { lstat as lstat12, readFile as readFile22, readdir as readdir10, rm as rm12 } from "node:fs/promises";
23139
23149
  import { tmpdir } from "node:os";
23140
23150
  import { join as join28, posix as posix2 } from "node:path";
@@ -23412,7 +23422,7 @@ async function readRegularTrimmedFile(path) {
23412
23422
  return content.length > 0 ? content : null;
23413
23423
  }
23414
23424
  function shortDigest(value) {
23415
- return createHash3("sha256").update(value).digest("hex").slice(0, 16);
23425
+ return createHash4("sha256").update(value).digest("hex").slice(0, 16);
23416
23426
  }
23417
23427
  async function removeVersionDir(path) {
23418
23428
  await rm12(path, { recursive: true, force: true });
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## OVERVIEW
6
6
 
7
- Vendored skill teaching agents ast-grep (`sg`) structural search/rewrite, plus a stdlib-Python helper CLI that wraps the `sg` binary. Vendoring pin in `SOURCE`: upstream `code-yeongyu/ast-grep-skill @ 3148c69` (ast-grep 0.45.0), "vendored as a sync; do not fork-drift". Earned this file: own executable surface (749-LOC helper + installers + smoke tests) and a no-fork-drift upstream contract that has no analogue elsewhere in `shared-skills`.
7
+ Vendored skill teaching agents ast-grep (`sg`) structural search/rewrite, plus a stdlib-Python helper CLI that wraps the `sg` binary. Upstream pin in `SOURCE`: upstream `code-yeongyu/ast-grep-skill @ 3148c69` (ast-grep 0.45.0), "vendored as a sync; do not fork-drift". Earned this file: own executable surface (749-LOC helper + installers + smoke tests) and a no-fork-drift upstream contract that has no analogue elsewhere in `shared-skills`.
8
8
 
9
9
  ## STRUCTURE
10
10
 
@@ -5,5 +5,5 @@
5
5
  "index.js": "d67d3a847fe0bbc43e824feded48b280890d31879538309e671cd5f671133995",
6
6
  "page-bundle.js": "bfd51e8383cf47200d57387bbbed258bce5a3a3d00c38fc108034d2888e23f0c"
7
7
  },
8
- "stagedAtUtc": "2026-10-24T12:04:38.003Z"
8
+ "stagedAtUtc": "2026-10-25T01:02:39.752Z"
9
9
  }
@@ -215,7 +215,7 @@ operating guide for consulting the beui.dev animated-component registry during i
215
215
  and motion work, written from live endpoint verification; no beui.dev source code,
216
216
  documentation text, or component implementations are vendored. beui.dev names remain the
217
217
  property of their owner, and the guide instructs reading component source for mechanism
218
- extraction only, not vendoring it into references or projects.
218
+ extraction only, not copying it into references or projects.
219
219
 
220
220
  `frontend/references/design/ambience-skill.md` is a project-original, curl-only operating
221
221
  guide for consulting the react-bits (reactbits.dev) animated-component registry during hero
@@ -223,7 +223,7 @@ atmosphere, background, typographic-motion, and card-surface work, written from
223
223
  verification; no react-bits source code, documentation text, or component implementations are
224
224
  vendored. react-bits is distributed under MIT plus the Commons Clause, which permits use inside
225
225
  applications but forbids redistributing or porting the components themselves; the guide
226
- therefore instructs reading component source for mechanism extraction only and never vendoring
226
+ therefore instructs reading component source for mechanism extraction only and never copying
227
227
  it into references, design documents, or this repository. React Bits names remain the property
228
228
  of their owner.
229
229
 
@@ -15,7 +15,7 @@ we run on is a deliberate choice, not an accident of neglect.
15
15
  | Fact | Value |
16
16
  |---|---|
17
17
  | Upstream project | `https://github.com/fivetaku/insane-search` |
18
- | Vendoring commit | `a4e4ed797` (2026-06-21) `feat(ultimate-browsing): vendor insane-search engine (junk-excluded)` |
18
+ | Import commit | `a4e4ed797` (2026-06-21) `feat(ultimate-browsing): vendor insane-search engine (junk-excluded)` |
19
19
  | De-personalization | `4743199a5` (2026-06-21) |
20
20
  | Pinned upstream baseline | upstream state as of 2026-06-21, **pre-0.7.0** (0.7.0 is dated 2026-06-22) |
21
21
  | Re-vendors since | none — every later change here is ours |
@@ -14,6 +14,9 @@ ulw-research/
14
14
  │ ├── report-gates.md # one row per defect code: severity, integrity, what it detects, how to fix
15
15
  │ ├── report-visualization.md # which visual fits which finding, render commands (charts, Mermaid, PlotNeuralNet), quality bar, visual QA checklist
16
16
  │ ├── fact-ledger-grammar.md # the one definition of a valid fact ledger; its per-kind table is rendered from KIND_RULES
17
+ │ ├── fact-ledger.md # working guide to the ledger: files, row fields, locators, operations
18
+ │ ├── fidelity-claim-kinds.md # claim kinds a sentence can be marked with (data-claim-kind); its table is rendered from CLAIM_KINDS
19
+ │ ├── unit-rules.md # per-operation unit rules for derived facts; the reviewer's checklist for unit-rules.mjs
17
20
  │ └── latex-report.md
18
21
  └── scripts/
19
22
  ├── report-tools.mjs # CLI entry + dispatcher (COMMANDS, run, main)
@@ -30,15 +33,24 @@ ulw-research/
30
33
  ├── fact-ledger.mjs # fact ledger IO and writers (addRow, retractRow, supersedeRow, --view table)
31
34
  ├── fact-ledger-schema.mjs # ledger vocabulary, validateLedger, the status machine (transitionError) shared with the writers
32
35
  ├── fact-ledger-kinds.mjs # KIND_RULES: every per-kind column rule; drives the validator, renders the grammar table (--render-grammar)
36
+ ├── fact-derive.mjs / fact-recompute.mjs # script-computed derived rows and their tamper detector, both driven by unit-rules.mjs
37
+ ├── unit-rules.mjs # OPERATION_RULES: arity, context, guards, result unit, row shape, and malformed shapes per operation
38
+ ├── unit-pairs.mjs # typed operand-unit rules (equal, non-affine, +/- pairs) shared by operations and expr nodes
39
+ ├── unit-algebra.mjs / fact-expr.mjs # canonical unit text and composites; the expr parser and evaluator
40
+ ├── claim-kinds.mjs # CLAIM_KINDS: claim kind -> placeholder mark, accepted rows, defect, unmarked warning; renders its doc table (--render-doc)
33
41
  ├── claims-index.mjs # claim-graph.md index: the claim table plus the verified-claims digest
34
42
  ├── fidelity-state.mjs # per-sentence failure counts for the fidelity repair loop
43
+ ├── fact-commands.mjs # `fact add|quote|retract|export|fill|derive` (lazy-loaded by report-tools)
44
+ ├── fact-commands-verify.mjs # `fact verify` and the Markdown projection it checks
45
+ ├── fidelity-records.mjs # FIDELITY_RECORDS table + the delivery barrier of outcome verify/finish (fidelity_unresolved, edition_unverified)
46
+ ├── source-commands.mjs # `source snapshot`, `claims index`, snapshot readers
35
47
  ├── *.test.ts # co-located bun tests, one per module (unshipped)
36
48
  └── tests/fixtures/ # good/bad reports, boxes.json, reference docs (unshipped)
37
49
  ```
38
50
 
39
51
  ## SURFACE
40
52
 
41
- `node "$SKILL_DIR/scripts/report-tools.mjs" <command>`: `check`, `layout-probe`, `repair decide`, `outcome init`, `outcome set`, `outcome gate`, `outcome render`, `outcome state`, `outcome verify`, `outcome finish`, `outcome briefing`, `format-extract`, `--help --json`. Gates recorded by `outcome gate`, in order: `static`, `fidelity`, `layout`, `visual`, `proofread` (`fidelity` is recorded `not_run` until the fidelity verifier ships). Exit codes: `0` pass, `1` semantic failure (blockers, a failed verify, a blocked repair), `2` usage or IO. JSON on stdout, one summary line on stderr. Flags per command: `references/deliverable-phase.md` section 10.
53
+ `node "$SKILL_DIR/scripts/report-tools.mjs" <command>`: `check`, `layout-probe`, `repair decide`, `outcome init`, `outcome set`, `outcome gate`, `outcome render`, `outcome state`, `outcome verify`, `outcome finish`, `outcome briefing`, `format-extract`, `fact add`, `fact quote`, `fact retract`, `fact export`, `fact fill`, `fact verify`, `fact derive`, `source snapshot`, `claims index`, `--help --json`. Gates recorded by `outcome gate`, in order: `static`, `fidelity`, `layout`, `visual`, `proofread` (`fidelity` is `fact verify` on every reader-facing edition; HTML only in this stage). Exit codes: `0` pass, `1` semantic failure (blockers, a failed verify, a blocked repair), `2` usage or IO. JSON on stdout, one summary line on stderr. Flags per command: `references/deliverable-phase.md` section 10.
42
54
 
43
55
  ## CONVENTIONS
44
56
 
@@ -47,7 +59,7 @@ ulw-research/
47
59
  - The CLI never launches a browser. The layout probe is printed as one async expression; the orchestrator evaluates it through the browser skill's owned headless engine and passes the result back with `check --layout`.
48
60
  - Time is always injected (`--now`, `startedAt`); no module reads the clock inside a decision.
49
61
  - Tests are co-located given/when/then bun tests; CLI tests spawn `node` with bun removed from `PATH`. Fixtures live only under `scripts/tests/fixtures/`, are depersonalized, and never ship.
50
- - The senpi source dir (`packages/omo-senpi/skills/ulw-research/`) intentionally has no `scripts/`, `references/report-gates.md`, `references/deliverable-phase.md`, `references/report-visualization.md`, or `references/fact-ledger-grammar.md`: the senpi sync overlays them from here byte-for-byte (`sharedAssets` in `packages/omo-senpi/plugin/scripts/native-skill-sources.mjs`), and both editions' sync suites assert the shipped copies equal these sources.
62
+ - The senpi source dir (`packages/omo-senpi/skills/ulw-research/`) intentionally has no `scripts/`, `references/report-gates.md`, `references/deliverable-phase.md`, `references/report-visualization.md`, `references/fact-ledger-grammar.md`, `references/fidelity-claim-kinds.md`, `references/unit-rules.md`, or `references/fact-ledger.md`: the senpi sync overlays them from here byte-for-byte (`sharedAssets` in `packages/omo-senpi/plugin/scripts/native-skill-sources.mjs`), and both editions' sync suites assert the shipped copies equal these sources.
51
63
  - References and scripts carry no Hangul (Korean match strings are `\u` escapes) and never three consecutive newlines (the senpi sync normalizes those and would break byte equality).
52
64
 
53
65
  ## ANTI-PATTERNS