claudecode-omc 5.6.8 → 5.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/.local/settings/settings.json +8 -0
  2. package/.local/skills/prompt-optimizer/SKILL.md +262 -19
  3. package/.omc-curation/ecc-selection.json +80 -0
  4. package/.omc-curation/governance.json +116 -0
  5. package/.omc-curation/sources.lock.json +30 -0
  6. package/README.md +78 -4
  7. package/bundled/manifest.json +6 -5
  8. package/bundled/upstream/anthropic-skills/.omc-source/bundle.json +18 -0
  9. package/bundled/upstream/anthropic-skills/.omc-source/provenance.json +399 -0
  10. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +18 -17
  11. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
  12. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +4 -4
  13. package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +2 -2
  14. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
  15. package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +2 -2
  16. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
  17. package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +2 -2
  18. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
  19. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
  20. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
  21. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
  22. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
  23. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +3 -3
  24. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
  25. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +2 -2
  26. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +5 -5
  27. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +3 -1
  28. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +10 -4
  29. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +19 -1
  30. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +6 -2
  31. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +1 -1
  32. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +3 -3
  33. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +3 -2
  34. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  35. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +10 -4
  36. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +113 -13
  37. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +14 -11
  38. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +2 -2
  39. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +4 -4
  40. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
  41. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
  42. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
  43. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
  44. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
  45. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +3 -3
  46. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -1
  47. package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +108 -24
  48. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +3 -3
  49. package/bundled/upstream/ecc/.omc-source/provenance.json +563 -0
  50. package/bundled/upstream/ecc/agents/marketing-agent.md +159 -0
  51. package/bundled/upstream/ecc/agents/react-build-resolver.md +215 -0
  52. package/bundled/upstream/ecc/agents/react-reviewer.md +167 -0
  53. package/bundled/upstream/ecc/agents/typescript-reviewer.md +3 -0
  54. package/bundled/upstream/ecc/commands/harness-audit.md +17 -10
  55. package/bundled/upstream/ecc/commands/marketing-campaign.md +129 -0
  56. package/bundled/upstream/ecc/commands/react-build.md +187 -0
  57. package/bundled/upstream/ecc/commands/react-review.md +170 -0
  58. package/bundled/upstream/ecc/commands/react-test.md +265 -0
  59. package/bundled/upstream/ecc/skills/benchmark-optimization-loop/SKILL.md +69 -0
  60. package/bundled/upstream/ecc/skills/blender-motion-state-inspection/SKILL.md +164 -0
  61. package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +9 -1
  62. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +31 -9
  63. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +38 -4
  64. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +319 -12
  65. package/bundled/upstream/ecc/skills/data-throughput-accelerator/SKILL.md +72 -0
  66. package/bundled/upstream/ecc/skills/dynamic-workflow-mode/SKILL.md +123 -0
  67. package/bundled/upstream/ecc/skills/frontend-a11y/SKILL.md +446 -0
  68. package/bundled/upstream/ecc/skills/ito-basket-compare/SKILL.md +63 -0
  69. package/bundled/upstream/ecc/skills/ito-data-atlas-agent/SKILL.md +63 -0
  70. package/bundled/upstream/ecc/skills/ito-market-intelligence/SKILL.md +60 -0
  71. package/bundled/upstream/ecc/skills/ito-trade-planner/SKILL.md +67 -0
  72. package/bundled/upstream/ecc/skills/latency-critical-systems/SKILL.md +73 -0
  73. package/bundled/upstream/ecc/skills/marketing-campaign/SKILL.md +113 -0
  74. package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +13 -0
  75. package/bundled/upstream/ecc/skills/parallel-execution-optimizer/SKILL.md +72 -0
  76. package/bundled/upstream/ecc/skills/prediction-market-oracle-research/SKILL.md +63 -0
  77. package/bundled/upstream/ecc/skills/prediction-market-risk-review/SKILL.md +60 -0
  78. package/bundled/upstream/ecc/skills/react-patterns/SKILL.md +341 -0
  79. package/bundled/upstream/ecc/skills/react-performance/SKILL.md +574 -0
  80. package/bundled/upstream/ecc/skills/react-testing/SKILL.md +423 -0
  81. package/bundled/upstream/ecc/skills/recsys-pipeline-architect/SKILL.md +114 -0
  82. package/bundled/upstream/ecc/skills/recursive-decision-ledger/SKILL.md +79 -0
  83. package/bundled/upstream/ecc/skills/social-publisher/SKILL.md +115 -0
  84. package/bundled/upstream/ecc/skills/team-agent-orchestration/SKILL.md +110 -0
  85. package/bundled/upstream/ecc/skills/uncloud/SKILL.md +343 -0
  86. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +99 -0
  87. package/bundled/upstream/impeccable/.omc-source/bundle.json +20 -0
  88. package/bundled/upstream/impeccable/.omc-source/provenance.json +105 -0
  89. package/bundled/upstream/impeccable/agents/impeccable-manual-edit-applier.md +97 -0
  90. package/bundled/upstream/impeccable/skills/impeccable/SKILL.md +168 -0
  91. package/bundled/upstream/impeccable/skills/impeccable/reference/adapt.md +311 -0
  92. package/bundled/upstream/impeccable/skills/impeccable/reference/animate.md +201 -0
  93. package/bundled/upstream/impeccable/skills/impeccable/reference/audit.md +133 -0
  94. package/bundled/upstream/impeccable/skills/impeccable/reference/bolder.md +113 -0
  95. package/bundled/upstream/impeccable/skills/impeccable/reference/brand.md +108 -0
  96. package/bundled/upstream/impeccable/skills/impeccable/reference/clarify.md +288 -0
  97. package/bundled/upstream/impeccable/skills/impeccable/reference/codex.md +105 -0
  98. package/bundled/upstream/impeccable/skills/impeccable/reference/colorize.md +257 -0
  99. package/bundled/upstream/impeccable/skills/impeccable/reference/craft.md +123 -0
  100. package/bundled/upstream/impeccable/skills/impeccable/reference/critique.md +767 -0
  101. package/bundled/upstream/impeccable/skills/impeccable/reference/delight.md +302 -0
  102. package/bundled/upstream/impeccable/skills/impeccable/reference/distill.md +111 -0
  103. package/bundled/upstream/impeccable/skills/impeccable/reference/document.md +429 -0
  104. package/bundled/upstream/impeccable/skills/impeccable/reference/extract.md +69 -0
  105. package/bundled/upstream/impeccable/skills/impeccable/reference/harden.md +347 -0
  106. package/bundled/upstream/impeccable/skills/impeccable/reference/hooks.md +88 -0
  107. package/bundled/upstream/impeccable/skills/impeccable/reference/init.md +172 -0
  108. package/bundled/upstream/impeccable/skills/impeccable/reference/interaction-design.md +189 -0
  109. package/bundled/upstream/impeccable/skills/impeccable/reference/layout.md +161 -0
  110. package/bundled/upstream/impeccable/skills/impeccable/reference/live.md +718 -0
  111. package/bundled/upstream/impeccable/skills/impeccable/reference/onboard.md +234 -0
  112. package/bundled/upstream/impeccable/skills/impeccable/reference/optimize.md +258 -0
  113. package/bundled/upstream/impeccable/skills/impeccable/reference/overdrive.md +130 -0
  114. package/bundled/upstream/impeccable/skills/impeccable/reference/polish.md +241 -0
  115. package/bundled/upstream/impeccable/skills/impeccable/reference/product.md +60 -0
  116. package/bundled/upstream/impeccable/skills/impeccable/reference/quieter.md +99 -0
  117. package/bundled/upstream/impeccable/skills/impeccable/reference/shape.md +165 -0
  118. package/bundled/upstream/impeccable/skills/impeccable/reference/typeset.md +279 -0
  119. package/bundled/upstream/impeccable/skills/impeccable/scripts/command-metadata.json +94 -0
  120. package/bundled/upstream/impeccable/skills/impeccable/scripts/context-signals.mjs +225 -0
  121. package/bundled/upstream/impeccable/skills/impeccable/scripts/context.mjs +280 -0
  122. package/bundled/upstream/impeccable/skills/impeccable/scripts/critique-storage.mjs +242 -0
  123. package/bundled/upstream/impeccable/skills/impeccable/scripts/detect-csp.mjs +198 -0
  124. package/bundled/upstream/impeccable/skills/impeccable/scripts/detect.mjs +21 -0
  125. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/browser/injected/index.mjs +1735 -0
  126. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/cli/main.mjs +244 -0
  127. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +4907 -0
  128. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns.mjs +43 -0
  129. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +252 -0
  130. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +552 -0
  131. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1013 -0
  132. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +208 -0
  133. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
  134. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/findings.mjs +12 -0
  135. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
  136. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
  137. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/registry/antipatterns.mjs +419 -0
  138. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/rules/checks.mjs +2671 -0
  139. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
  140. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
  141. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
  142. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-admin.mjs +574 -0
  143. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-before-edit.mjs +473 -0
  144. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-lib.mjs +1286 -0
  145. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook.mjs +61 -0
  146. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/design-parser.mjs +835 -0
  147. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/impeccable-paths.mjs +126 -0
  148. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/is-generated.mjs +69 -0
  149. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/browser-script-parts.mjs +49 -0
  150. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/completion.mjs +19 -0
  151. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/event-validation.mjs +137 -0
  152. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/insert-ui.mjs +458 -0
  153. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-apply.mjs +939 -0
  154. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-edit-routes.mjs +357 -0
  155. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
  156. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/session-store.mjs +289 -0
  157. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/svelte-component.mjs +826 -0
  158. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/sveltekit-adapter.mjs +274 -0
  159. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/ui-core.mjs +180 -0
  160. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/vocabulary.mjs +36 -0
  161. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-accept.mjs +812 -0
  162. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser-dom.js +146 -0
  163. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser-session.js +123 -0
  164. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser.js +11086 -0
  165. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
  166. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-complete.mjs +75 -0
  167. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
  168. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
  169. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-inject.mjs +583 -0
  170. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-insert.mjs +272 -0
  171. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
  172. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-poll.mjs +379 -0
  173. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-resume.mjs +94 -0
  174. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-server.mjs +1134 -0
  175. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-status.mjs +61 -0
  176. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-wrap.mjs +894 -0
  177. package/bundled/upstream/impeccable/skills/impeccable/scripts/live.mjs +246 -0
  178. package/bundled/upstream/impeccable/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  179. package/bundled/upstream/impeccable/skills/impeccable/scripts/palette.mjs +633 -0
  180. package/bundled/upstream/impeccable/skills/impeccable/scripts/pin.mjs +214 -0
  181. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +2 -1
  182. package/bundled/upstream/oh-my-claudecode/.omc-source/provenance.json +116 -0
  183. package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +7 -0
  184. package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +1 -0
  185. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +39 -5
  186. package/bundled/upstream/oh-my-claudecode/skills/hud/SKILL.md +1 -0
  187. package/bundled/upstream/oh-my-claudecode/skills/local-build-reminder/SKILL.md +78 -0
  188. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +1 -1
  189. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/SKILL.md +26 -10
  190. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +3 -3
  191. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +6 -4
  192. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +1 -1
  193. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +2 -2
  194. package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +6 -6
  195. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +44 -32
  196. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +45 -21
  197. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +1 -1
  198. package/bundled/upstream/oh-my-claudecode/skills/self-improve/SKILL.md +7 -0
  199. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/resolve-paths.mjs +39 -15
  200. package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +132 -90
  201. package/bundled/upstream/oh-my-claudecode/skills/ultragoal/SKILL.md +93 -0
  202. package/bundled/upstream/oh-my-claudecode/skills/ultraqa/SKILL.md +28 -13
  203. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +7 -0
  204. package/bundled/upstream/superpowers/.omc-source/bundle.json +2 -1
  205. package/bundled/upstream/superpowers/.omc-source/provenance.json +63 -0
  206. package/package.json +2 -1
  207. package/src/catalog/source-catalog.js +10 -4
  208. package/src/cli/index.js +4 -0
  209. package/src/cli/plan.js +14 -2
  210. package/src/cli/setup.js +52 -13
  211. package/src/cli/skill.js +1 -1
  212. package/src/cli/source.js +271 -14
  213. package/src/config/sources.js +82 -1
  214. package/src/merge/content-patch.js +88 -0
  215. package/templates/merge-config.json +1 -8
  216. package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +0 -54
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: ultragoal
3
+ description: Durable multi-goal workflow that persists plan/ledger artifacts under .omc/ultragoal and prints Claude /goal handoff text for the active session
4
+ argument-hint: "<brief or subcommand>"
5
+ level: 3
6
+ ---
7
+
8
+ <Purpose>
9
+ Ultragoal breaks a brief into an ordered set of goals, records start/checkpoint/blocker/failure events in a durable append-only ledger, and tells the active Claude agent how to drive the Claude Code `/goal` slash command alongside the plan. It does not — and cannot — mutate Claude `/goal` state from the shell; it persists durable repo state and prints a model-facing handoff that the active agent must act on in-session.
10
+ </Purpose>
11
+
12
+ <Use_When>
13
+ - The user wants a durable, repo-native way to track an ultragoal across multiple Claude sessions or worktrees
14
+ - The work is large enough to warrant multiple ordered "stories" with attempt counts and per-story evidence
15
+ - The user wants the final completion gated behind ai-slop-cleaner + verification + $code-review
16
+ - The user wants the active Claude `/goal` directive coordinated with the ledger so that a session restart does not lose progress
17
+ </Use_When>
18
+
19
+ <Do_Not_Use_When>
20
+ - The task is a single small change — use direct delegation or `ralph` instead
21
+ - The user wants the assistant to literally invoke `/goal` itself from the shell — that is not possible; `omc ultragoal` only writes artifacts and prints handoff text
22
+ - The user wants a planning-only artifact with no execution loop — use `plan` instead
23
+ </Do_Not_Use_When>
24
+
25
+ <Why_This_Exists>
26
+ Claude Code `/goal` is a session-scoped Stop hook: it blocks the session from stopping until a condition holds, and auto-clears on success. That is a great single-session execution primitive, but it loses state across sessions and does not by itself enforce a final review gate. `omc ultragoal` adds a durable plan, ledger, and gating layer so a long multi-step initiative can survive session restarts, fresh worktrees, and review iterations while still leveraging Claude `/goal` to keep the active agent focused.
27
+ </Why_This_Exists>
28
+
29
+ <How_To_Use>
30
+
31
+ 1. Create a plan from a brief:
32
+ ```
33
+ omc ultragoal create-goals --brief-file plan.md
34
+ ```
35
+ Or with explicit stories:
36
+ ```
37
+ omc ultragoal create-goals --brief "ship the migration" \
38
+ --goal "Schema::Add new columns" \
39
+ --goal "Backfill::Backfill rows in batches" \
40
+ --goal "Cutover::Drop old columns and switch reads"
41
+ ```
42
+ The default mode is `aggregate` (one Claude `/goal` covers the run).
43
+ Pass `--claude-goal-mode per-story` if you want each story to have its own `/goal`.
44
+
45
+ **Multi-repo workspaces / parallel sessions:** when several Claude sessions
46
+ in the same workspace need to run `/ultragoal` concurrently, pass either
47
+ `--plan-id <stable-id>` or `--auto-plan-id` so the plan is written to
48
+ `.omc/ultragoal/plans/{planId}/` instead of the shared single-plan path.
49
+ Without that flag, two sessions creating goals would clobber each other.
50
+ `--auto-plan-id` derives `{epochMs}-{slug}` from the brief title. Then thread
51
+ the same `--plan-id <id>` through every subsequent subcommand in that session.
52
+ Use `omc ultragoal list-plans` to enumerate available planIds when needed.
53
+
54
+ 2. Start (or resume) the next story:
55
+ ```
56
+ omc ultragoal complete-goals
57
+ ```
58
+ This prints a model-facing handoff. The active Claude agent must read it and:
59
+ - Confirm/Set the active `/goal` condition in this session.
60
+ - Work the story.
61
+ - When the story is complete (and for the final story, after the full quality gate), share back a snapshot of the active `/goal` state and call `checkpoint`.
62
+
63
+ 3. Checkpoint a story:
64
+ ```
65
+ omc ultragoal checkpoint --goal-id G001-... --status complete \
66
+ --evidence "tests/files/PR evidence" \
67
+ --claude-goal-json '{"goal":{"objective":"...","status":"active"}}'
68
+ ```
69
+ For the final story, also pass `--quality-gate-json` containing
70
+ `aiSlopCleaner`, `verification`, and `codeReview` evidence (all clean).
71
+
72
+ 4. If the final review is not clean, do NOT mark complete. Record blockers:
73
+ ```
74
+ omc ultragoal record-review-blockers --goal-id G00X-... \
75
+ --title "Resolve final code-review blockers" \
76
+ --objective "Fix the listed review findings and rerun final gates" \
77
+ --evidence "<the review findings>" \
78
+ --claude-goal-json '{"goal":{"objective":"...","status":"active"}}'
79
+ ```
80
+ This appends a new blocker story and keeps the Claude `/goal` active.
81
+
82
+ 5. Inspect state at any time:
83
+ ```
84
+ omc ultragoal status
85
+ ```
86
+
87
+ </How_To_Use>
88
+
89
+ <Important_Limitations>
90
+ - The shell cannot invoke or mutate Claude Code `/goal` state. `omc ultragoal` only persists durable artifacts and prints instructions that the active Claude agent reads and acts on in-session.
91
+ - Snapshots passed via `--claude-goal-json` are model-supplied proof of the active `/goal` state; OMC validates them for textual consistency with the plan's expected objective and ledger event, but it cannot independently observe Claude `/goal` state.
92
+ - If the Claude `/goal` slash command is renamed or restructured, only the handoff wording needs to change; the reconciliation logic is name-agnostic.
93
+ </Important_Limitations>
@@ -15,17 +15,21 @@ You are now in **ULTRAQA** mode - an autonomous QA cycling workflow that runs un
15
15
 
16
16
  **Cycle**: qa-tester → architect verification → fix → repeat
17
17
 
18
+ ## Relationship to `/goal`, Ralph, Team, and Ultragoal
19
+
20
+ UltraQA owns repeated quality-gate cycling only. Use the deterministic conflict policies `refuse`, `adopt_existing`, and `artifact_only` rather than non-deterministic warning handling. Use it after the target behavior is known and the remaining question is whether tests, build, lint, typecheck, or another explicit QA condition passes. If Claude Code `/goal` is active, UltraQA may produce visible command evidence for that goal, but must not describe the `/goal` evaluator as independently running commands or reading files. If Ralph or Team is active, UltraQA is a verification/fix sub-loop under that authority rather than a competing session loop. If no active loop is safe, record QA expectations and evidence in artifact-only Ultragoal notes instead of claiming automatic execution.
21
+
18
22
  ## Goal Parsing
19
23
 
20
24
  Parse the goal from arguments. Supported formats:
21
25
 
22
- | Invocation | Goal Type | What to Check |
23
- |------------|-----------|---------------|
24
- | `/oh-my-claudecode:ultraqa --tests` | tests | All test suites pass |
25
- | `/oh-my-claudecode:ultraqa --build` | build | Build succeeds with exit 0 |
26
- | `/oh-my-claudecode:ultraqa --lint` | lint | No lint errors |
27
- | `/oh-my-claudecode:ultraqa --typecheck` | typecheck | No TypeScript errors |
28
- | `/oh-my-claudecode:ultraqa --custom "pattern"` | custom | Custom success pattern in output |
26
+ | Invocation | Goal Type | What to Check |
27
+ | ---------------------------------------------- | --------- | -------------------------------- |
28
+ | `/oh-my-claudecode:ultraqa --tests` | tests | All test suites pass |
29
+ | `/oh-my-claudecode:ultraqa --build` | build | Build succeeds with exit 0 |
30
+ | `/oh-my-claudecode:ultraqa --lint` | lint | No lint errors |
31
+ | `/oh-my-claudecode:ultraqa --typecheck` | typecheck | No TypeScript errors |
32
+ | `/oh-my-claudecode:ultraqa --custom "pattern"` | custom | Custom success pattern in output |
29
33
 
30
34
  If no structured goal provided, interpret the argument as a custom goal.
31
35
 
@@ -52,6 +56,7 @@ If no structured goal provided, interpret the argument as a custom goal.
52
56
  - **NO** → Continue to step 3
53
57
 
54
58
  3. **ARCHITECT DIAGNOSIS**: Spawn architect to analyze failure
59
+
55
60
  ```
56
61
  Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="DIAGNOSE FAILURE:
57
62
  Goal: [goal type]
@@ -60,6 +65,7 @@ If no structured goal provided, interpret the argument as a custom goal.
60
65
  ```
61
66
 
62
67
  4. **FIX ISSUES**: Apply architect's recommendations
68
+
63
69
  ```
64
70
  Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="FIX:
65
71
  Issue: [architect diagnosis]
@@ -71,16 +77,17 @@ If no structured goal provided, interpret the argument as a custom goal.
71
77
 
72
78
  ## Exit Conditions
73
79
 
74
- | Condition | Action |
75
- |-----------|--------|
76
- | **Goal Met** | Exit with success: "ULTRAQA COMPLETE: Goal met after N cycles" |
77
- | **Cycle 5 Reached** | Exit with diagnosis: "ULTRAQA STOPPED: Max cycles. Diagnosis: ..." |
78
- | **Same Failure 3x** | Exit early: "ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..." |
79
- | **Environment Error** | Exit: "ULTRAQA ERROR: [tmux/port/dependency issue]" |
80
+ | Condition | Action |
81
+ | --------------------- | ----------------------------------------------------------------------------- |
82
+ | **Goal Met** | Exit with success: "ULTRAQA COMPLETE: Goal met after N cycles" |
83
+ | **Cycle 5 Reached** | Exit with diagnosis: "ULTRAQA STOPPED: Max cycles. Diagnosis: ..." |
84
+ | **Same Failure 3x** | Exit early: "ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..." |
85
+ | **Environment Error** | Exit: "ULTRAQA ERROR: [tmux/port/dependency issue]" |
80
86
 
81
87
  ## Observability
82
88
 
83
89
  Output progress each cycle:
90
+
84
91
  ```
85
92
  [ULTRAQA Cycle 1/5] Running tests...
86
93
  [ULTRAQA Cycle 1/5] FAILED - 3 tests failing
@@ -94,6 +101,7 @@ Output progress each cycle:
94
101
  ## State Tracking
95
102
 
96
103
  Track state in `.omc/ultraqa-state.json`:
104
+
97
105
  ```json
98
106
  {
99
107
  "active": true,
@@ -132,6 +140,13 @@ rm -f .omc/state/ultraqa-state.json
132
140
 
133
141
  This ensures clean state for future sessions. Stale state files with `active: false` should not be left behind.
134
142
 
143
+ ## Parallel session caveats
144
+
145
+ - **Multi-repo workspace anchor:** drop a `.omc-workspace` marker at the parent directory so multiple sessions across sub-repos share one `.omc/`. Resolution order: `OMC_STATE_DIR > .omc-workspace > git > cwd`. See `docs/REFERENCE.md`.
146
+ - **Session id source:** OMC_SESSION_ID env var wins in CLI contexts; hook payload data.session_id wins in hook contexts.
147
+ - **Plan id (when applicable):** UltraQA state is session-scoped. Mutual-exclusion with ralph applies only within the same session.
148
+ - **Parallel verdict:** supported (session-scoped state)
149
+
135
150
  ---
136
151
 
137
152
  Begin ULTRAQA cycling now. Parse the goal and start cycle 1.
@@ -125,6 +125,13 @@ Why bad: Opus is expensive overkill for a trivial fix. Use executor with Haiku i
125
125
  - [ ] No new errors introduced
126
126
  </Final_Checklist>
127
127
 
128
+ ## Parallel session caveats
129
+
130
+ - **Multi-repo workspace anchor:** drop a `.omc-workspace` marker at the parent directory so multiple sessions across sub-repos share one `.omc/`. Resolution order: `OMC_STATE_DIR > .omc-workspace > git > cwd`. See `docs/REFERENCE.md`.
131
+ - **Session id source:** OMC_SESSION_ID env var wins in CLI contexts; hook payload data.session_id wins in hook contexts.
132
+ - **Plan id (when applicable):** Ultrawork has no persistent state; two concurrent runs are independent by design. No plan-id needed.
133
+ - **Parallel verdict:** supported (stateless component)
134
+
128
135
  <Advanced>
129
136
  ## Relationship to Other Modes
130
137
 
@@ -1,8 +1,9 @@
1
1
  {
2
- "syncedAt": "2026-05-15T05:55:34.311Z",
2
+ "syncedAt": "2026-06-05T07:53:35.433Z",
3
3
  "sourceName": "superpowers",
4
4
  "remote": "https://github.com/obra/superpowers.git",
5
5
  "ref": "main",
6
+ "commit": "6fd4507659784c351abbd2bc264c7162cfd386dc",
6
7
  "kind": "content-repo",
7
8
  "harnesses": [
8
9
  "claude"
@@ -0,0 +1,63 @@
1
+ {
2
+ "syncedAt": "2026-06-05T07:53:35.433Z",
3
+ "sourceName": "superpowers",
4
+ "remote": "https://github.com/obra/superpowers.git",
5
+ "ref": "main",
6
+ "commit": "6fd4507659784c351abbd2bc264c7162cfd386dc",
7
+ "artifacts": {
8
+ "skills": {
9
+ "brainstorming/scripts/frame-template.html": "sha256:fb22ba9d47f3b83b",
10
+ "brainstorming/scripts/helper.js": "sha256:e763d82f32b4ebb3",
11
+ "brainstorming/scripts/server.cjs": "sha256:ea81185f581897c6",
12
+ "brainstorming/scripts/start-server.sh": "sha256:3442a54b5ee55116",
13
+ "brainstorming/scripts/stop-server.sh": "sha256:f65b7634a27343ea",
14
+ "brainstorming/SKILL.md": "sha256:bba47904a7f6bbee",
15
+ "brainstorming/spec-document-reviewer-prompt.md": "sha256:12cb5ed58aef41b8",
16
+ "brainstorming/visual-companion.md": "sha256:a2bc6fc47d0df1df",
17
+ "dispatching-parallel-agents/SKILL.md": "sha256:76806091c7f923ba",
18
+ "executing-plans/SKILL.md": "sha256:e2102f1163143393",
19
+ "finishing-a-development-branch/SKILL.md": "sha256:5c8d4b59aedb14c9",
20
+ "receiving-code-review/SKILL.md": "sha256:c9382e92b8f32363",
21
+ "requesting-code-review/code-reviewer.md": "sha256:595d91d05d5ecba5",
22
+ "requesting-code-review/SKILL.md": "sha256:5a3a44a3667800e2",
23
+ "subagent-driven-development/code-quality-reviewer-prompt.md": "sha256:2eeb3bf63fccfbee",
24
+ "subagent-driven-development/implementer-prompt.md": "sha256:a416193f881e5a71",
25
+ "subagent-driven-development/SKILL.md": "sha256:905a2b9be59b734d",
26
+ "subagent-driven-development/spec-reviewer-prompt.md": "sha256:631980e472eec539",
27
+ "systematic-debugging/condition-based-waiting-example.ts": "sha256:40ae5ebe497fdf31",
28
+ "systematic-debugging/condition-based-waiting.md": "sha256:e89fec8400d6cd50",
29
+ "systematic-debugging/CREATION-LOG.md": "sha256:c24733a5b1821bd6",
30
+ "systematic-debugging/defense-in-depth.md": "sha256:1e175fb86fc357e5",
31
+ "systematic-debugging/find-polluter.sh": "sha256:6462747eae9b175a",
32
+ "systematic-debugging/root-cause-tracing.md": "sha256:6b0622269e098ca1",
33
+ "systematic-debugging/SKILL.md": "sha256:4999cb851360485e",
34
+ "systematic-debugging/test-academic.md": "sha256:fe2ba480d78ac0d6",
35
+ "systematic-debugging/test-pressure-1.md": "sha256:0b6a915db0054577",
36
+ "systematic-debugging/test-pressure-2.md": "sha256:b2030aeffba07050",
37
+ "systematic-debugging/test-pressure-3.md": "sha256:96b50a52e2c7989c",
38
+ "test-driven-development/SKILL.md": "sha256:7dee67b4af6bdccc",
39
+ "test-driven-development/testing-anti-patterns.md": "sha256:bde453bc258f0654",
40
+ "using-git-worktrees/SKILL.md": "sha256:085a45ee3de432bd",
41
+ "using-superpowers/references/codex-tools.md": "sha256:37e06103a352516d",
42
+ "using-superpowers/references/copilot-tools.md": "sha256:9fb400a432d31494",
43
+ "using-superpowers/references/gemini-tools.md": "sha256:a66092fb2dd2c69b",
44
+ "using-superpowers/SKILL.md": "sha256:316e29381219adf0",
45
+ "verification-before-completion/SKILL.md": "sha256:ea52d15aabaf72bc",
46
+ "writing-plans/plan-document-reviewer-prompt.md": "sha256:6fce2aa83c637156",
47
+ "writing-plans/SKILL.md": "sha256:4fd4627d2c023678",
48
+ "writing-skills/anthropic-best-practices.md": "sha256:20914c2fda31670c",
49
+ "writing-skills/examples/CLAUDE_MD_TESTING.md": "sha256:0b379a3415e185d3",
50
+ "writing-skills/graphviz-conventions.dot": "sha256:e2890a593c91370e",
51
+ "writing-skills/persuasion-principles.md": "sha256:c3c84f572a51dd8b",
52
+ "writing-skills/render-graphs.js": "sha256:ccda971a87bb185f",
53
+ "writing-skills/SKILL.md": "sha256:38ba648975ae6ba5",
54
+ "writing-skills/testing-skills-with-subagents.md": "sha256:c711346852c911b2"
55
+ },
56
+ "hooks": {
57
+ "hooks-cursor.json": "sha256:53d8ceb3ff5d8bb1",
58
+ "hooks.json": "sha256:01616c57b96cc234",
59
+ "run-hook.cmd": "sha256:d3d9c6199678dab2",
60
+ "session-start": "sha256:4dff45d935243af2"
61
+ }
62
+ }
63
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudecode-omc",
3
- "version": "5.6.8",
3
+ "version": "5.11.0",
4
4
  "description": "Claude Code harness — best-practice skills, agents, hooks, and configs from multiple sources",
5
5
  "bin": {
6
6
  "omc-manage": "bin/omc-manage.js"
@@ -9,6 +9,7 @@
9
9
  "bin",
10
10
  "src",
11
11
  ".local",
12
+ ".omc-curation",
12
13
  "bundled",
13
14
  "scripts",
14
15
  "templates",
@@ -162,7 +162,8 @@ function listManifestFiles(sourceName, sourceConfig, root) {
162
162
  });
163
163
  }
164
164
 
165
- async function buildSourceCatalog(sourceName, root = getProjectRoot()) {
165
+ async function buildSourceCatalog(sourceName, root = getProjectRoot(), options = {}) {
166
+ const { ignoreAllowlist = false } = options;
166
167
  const config = readConfig();
167
168
  const sourceConfig = config.sources[sourceName];
168
169
  if (!sourceConfig) {
@@ -177,9 +178,14 @@ async function buildSourceCatalog(sourceName, root = getProjectRoot()) {
177
178
  const artifactPath = getSourceArtifactDir(sourceName, artifactType, root);
178
179
  const present = fs.existsSync(artifactPath);
179
180
  const loader = getArtifactLoader(artifactType);
180
- const loadedItems = (present && loader)
181
- ? filterItemsByAllowlist(sourceConfig, artifactType, loader(artifactPath, sourceName))
182
- : [];
181
+ // When re-curating (plan apply with a selection file), ignore the current
182
+ // allowlist so itemNames exposes the full available universe — otherwise the
183
+ // catalog pre-filters to already-allowed names and new selections can never
184
+ // be validated/added (chicken-and-egg).
185
+ const rawItems = (present && loader) ? loader(artifactPath, sourceName) : [];
186
+ const loadedItems = ignoreAllowlist
187
+ ? rawItems
188
+ : filterItemsByAllowlist(sourceConfig, artifactType, rawItems);
183
189
  upsertSurface(surfaces, {
184
190
  name: artifactType,
185
191
  harness: 'claude',
package/src/cli/index.js CHANGED
@@ -20,6 +20,9 @@ function showHelp() {
20
20
  console.log(' Install merged artifacts (skills, agents, hooks, commands, etc.)');
21
21
  console.log(' doctor Health checks for all artifact types');
22
22
  console.log(' source list|add|remove|sync|status — manage sources');
23
+ console.log(' sync [<name>] [--frozen] — update sources (--frozen: to locked commits)');
24
+ console.log(' lock [<name>] — pin sources to their synced commit');
25
+ console.log(' drift [<name>] [--json] — detect edits vs recorded provenance');
23
26
  console.log(' inspect <name> — inspect source bundle/catalog');
24
27
  console.log(' plan install <source> [--profile <name>] — build install plan');
25
28
  console.log(' apply <source> [--profile <name>] — materialize plan into source activation');
@@ -103,6 +106,7 @@ async function main(argv) {
103
106
  else if (arg === '--profile' && args[i + 1]) flags.profile = args[++i];
104
107
  else if (arg.startsWith('--profile=')) flags.profile = arg.split('=')[1];
105
108
  else if (arg === '--json') flags.json = true;
109
+ else if (arg === '--frozen') flags.frozen = true;
106
110
  else if (arg === '--apply') flags.apply = true;
107
111
  else if (arg === '--threshold' && args[i + 1]) flags.threshold = args[++i];
108
112
  else if (arg.startsWith('--threshold=')) flags.threshold = arg.split('=')[1];
package/src/cli/plan.js CHANGED
@@ -135,9 +135,21 @@ async function plan(args, flags = {}) {
135
135
 
136
136
  const root = getProjectRoot();
137
137
  const profile = flags.profile || 'claude-runtime';
138
- const catalog = await buildSourceCatalog(sourceName, root);
138
+ // Resolve the curation source of truth: an explicit --selection-file wins,
139
+ // otherwise auto-discover the in-repo .omc-curation/<source>-selection.json
140
+ // so `plan apply <source>` applies the committed curation with no flags.
141
+ let selectionFile = flags.selectionFile;
142
+ if (!selectionFile) {
143
+ const defaultSelection = path.join(root, '.omc-curation', `${sourceName}-selection.json`);
144
+ if (fs.existsSync(defaultSelection)) {
145
+ selectionFile = defaultSelection;
146
+ console.log(`Using curation: ${path.relative(root, defaultSelection)}`);
147
+ }
148
+ }
149
+ // Re-curating: load the full available universe so new selections validate.
150
+ const catalog = await buildSourceCatalog(sourceName, root, { ignoreAllowlist: Boolean(selectionFile) });
139
151
  const planResult = buildInstallPlan(catalog, profile);
140
- const selectionData = flags.selectionFile ? await readSelectionFile(flags.selectionFile) : {};
152
+ const selectionData = selectionFile ? await readSelectionFile(selectionFile) : {};
141
153
  const allowlist = extractAllowlistFromSelection(planResult, selectionData);
142
154
  const currentSource = readConfig().sources[sourceName] || {};
143
155
  const activation = {
package/src/cli/setup.js CHANGED
@@ -4,13 +4,14 @@ const fsp = require('fs/promises');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
6
  const { getProjectRoot, getScopedInstallTarget, getMergeConfigPath } = require('../config/paths');
7
- const { readConfig, filterItemsByAllowlist } = require('../config/sources');
7
+ const { readConfig, filterItemsByAllowlist, loadGovernance } = require('../config/sources');
8
8
  const { getArtifactTypeNames, ARTIFACT_TYPES } = require('../config/artifact-types');
9
9
  const { detectConflicts, resolveConflicts, applyResolutions } = require('../merge/base-merger');
10
10
  const { loadHooksConfig, mergeHooksConfigs, hasHookLib } = require('../merge/hook-merger');
11
11
  const { loadClaudeMd, mergeIntoExisting, assembleSections } = require('../merge/claude-md-merger');
12
12
  const { loadSettingsFragment, mergeSettingsFragments } = require('../merge/settings-merger');
13
13
  const { collectSourceDirsForType, getArtifactLoader } = require('../merge/artifact-source-loader');
14
+ const { applyContentPatch } = require('../merge/content-patch');
14
15
 
15
16
  const OMC_VERSION_PATH = path.join(os.homedir(), '.claude', '.omc-version.json');
16
17
  const OMC_CONFIG_PATH = path.join(os.homedir(), '.claude', '.omc-config.json');
@@ -231,11 +232,12 @@ async function installNameBasedArtifacts(artifactType, sources, mergeConfig, ins
231
232
  const excludeList = (mergeConfig.exclude && mergeConfig.exclude[artifactType]) || [];
232
233
  if (excludeList.length > 0) {
233
234
  const excludeSet = new Set(excludeList);
234
- const before = merged.length;
235
+ // Names actually present and removed — so the count and the listed names
236
+ // always agree (exclude entries absent from the catalog aren't reported).
237
+ const removedNames = merged.filter(item => excludeSet.has(item.name)).map(item => item.name);
235
238
  merged = merged.filter(item => !excludeSet.has(item.name));
236
- const excluded = before - merged.length;
237
- if (excluded > 0) {
238
- console.log(` excluded ${excluded} items: ${excludeList.filter(n => merged.every(m => m.name !== n)).join(', ')}`);
239
+ if (removedNames.length > 0) {
240
+ console.log(` excluded ${removedNames.length} items: ${removedNames.join(', ')}`);
239
241
  }
240
242
  }
241
243
 
@@ -256,19 +258,49 @@ async function installNameBasedArtifacts(artifactType, sources, mergeConfig, ins
256
258
 
257
259
  await fsp.mkdir(installTarget, { recursive: true });
258
260
  let fileCount = 0;
261
+ let patchedCount = 0;
262
+
263
+ // Content patches: governance.json sources.<name>.patches["<type>/<artifact>"]
264
+ // are applied to the winning artifact's content as it is written.
265
+ const govSources = loadGovernance().sources || {};
266
+ const patchFor = (item) => {
267
+ const patches = (govSources[item.sourceName] || {}).patches;
268
+ return patches ? patches[`${artifactType}/${item.name}`] : undefined;
269
+ };
259
270
 
260
271
  for (const item of merged) {
272
+ const dest = path.join(installTarget, getManagedPathForItem(artifactType, item));
273
+ const patch = patchFor(item);
274
+
275
+ // (dry-run already returned above; this loop only runs for real installs)
261
276
  if (artifactType === 'skills' || item.isDirectory) {
262
- const dest = path.join(installTarget, getManagedPathForItem(artifactType, item));
263
277
  fileCount += await copyDirectory(item.path, dest, flags);
278
+ // A skill patch targets its entry file (SKILL.md) inside the copied dir.
279
+ if (patch) {
280
+ const skillFile = path.join(dest, 'SKILL.md');
281
+ if (fs.existsSync(skillFile)) {
282
+ const { content, warnings } = applyContentPatch(fs.readFileSync(skillFile, 'utf8'), patch);
283
+ await fsp.writeFile(skillFile, content, 'utf8');
284
+ patchedCount += 1;
285
+ for (const w of warnings) console.log(` patch warn (${item.name}): ${w}`);
286
+ }
287
+ }
264
288
  } else {
265
- const dest = path.join(installTarget, getManagedPathForItem(artifactType, item));
266
289
  await fsp.mkdir(path.dirname(dest), { recursive: true });
267
- await fsp.copyFile(item.path, dest);
290
+ if (patch) {
291
+ const { content, warnings } = applyContentPatch(fs.readFileSync(item.path, 'utf8'), patch);
292
+ await fsp.writeFile(dest, content, 'utf8');
293
+ patchedCount += 1;
294
+ for (const w of warnings) console.log(` patch warn (${item.name}): ${w}`);
295
+ } else {
296
+ await fsp.copyFile(item.path, dest);
297
+ }
268
298
  fileCount += 1;
269
299
  }
270
300
  }
271
301
 
302
+ if (patchedCount > 0) console.log(` patched ${patchedCount} item(s) from governance`);
303
+
272
304
  return {
273
305
  count: fileCount,
274
306
  total: merged.length,
@@ -413,11 +445,18 @@ async function setup(args, flags = {}) {
413
445
  if (typeFilter) console.log(`Types: ${typeFilter.join(', ')}`);
414
446
  console.log('');
415
447
 
416
- // Load merge config
417
- const mergeConfigPath = getMergeConfigPath(root);
418
- let mergeConfig = { preferences: {} };
419
- if (fs.existsSync(mergeConfigPath)) {
420
- try { mergeConfig = JSON.parse(fs.readFileSync(mergeConfigPath, 'utf8')); } catch {}
448
+ // Conflict policy: unified governance.json is authoritative; fall back to the
449
+ // legacy templates/merge-config.json when governance declares no conflict block.
450
+ const governanceConflict = loadGovernance().conflict;
451
+ let mergeConfig;
452
+ if (governanceConflict && typeof governanceConflict === 'object') {
453
+ mergeConfig = { preferences: {}, ...governanceConflict };
454
+ } else {
455
+ const mergeConfigPath = getMergeConfigPath(root);
456
+ mergeConfig = { preferences: {} };
457
+ if (fs.existsSync(mergeConfigPath)) {
458
+ try { mergeConfig = JSON.parse(fs.readFileSync(mergeConfigPath, 'utf8')); } catch {}
459
+ }
421
460
  }
422
461
 
423
462
  const allTypes = getArtifactTypeNames().filter(type => type !== 'claude-md');
package/src/cli/skill.js CHANGED
@@ -192,7 +192,7 @@ async function recommend(args, flags) {
192
192
 
193
193
  // Load existing config
194
194
  const configPath = getMergeConfigPath(root);
195
- let config = { merge_strategy: 'version-priority', auto_merge: true, allow_namespacing: false, sources: [], preferences: {} };
195
+ let config = { preferences: {} };
196
196
  if (fs.existsSync(configPath)) {
197
197
  try { config = JSON.parse(fs.readFileSync(configPath, 'utf8')); } catch {}
198
198
  }