@ngockhoale/ukit 2.1.5 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +7 -4
  3. package/manifests/platform.full.yaml +121 -24
  4. package/package.json +4 -3
  5. package/src/cli/adapters.js +47 -21
  6. package/src/cli/index.js +2 -2
  7. package/src/core/applyPlan.js +5 -2
  8. package/src/core/ensureGitignore.js +2 -0
  9. package/src/core/runInstallPipeline.js +19 -0
  10. package/src/core/runtimeConfig.js +6 -1
  11. package/src/core/status.js +3 -1
  12. package/src/core/uninstall.js +16 -0
  13. package/src/index/routeCatalog.js +1 -1
  14. package/src/manifest/selectItems.js +11 -5
  15. package/templates/.claude/commands/ukit/handoff-clear.md +1 -1
  16. package/templates/.claude/commands/ukit/handoff-create.md +10 -8
  17. package/templates/.claude/commands/ukit/handoff-fullstack.md +22 -18
  18. package/templates/.claude/commands/ukit/handoff-implement.md +6 -4
  19. package/templates/.claude/commands/ukit/handoff-review.md +5 -3
  20. package/templates/.claude/commands/ukit/handoff-status.md +1 -1
  21. package/templates/.claude/ukit/index/route-catalog.mjs +1 -1
  22. package/templates/.claude/ukit/index/unic-gateway.mjs +43 -7
  23. package/templates/.codex/README.md +1 -1
  24. package/templates/.gitignore +2 -0
  25. package/templates/.omp/AGENTS.md +9 -0
  26. package/templates/.omp/README.md +96 -0
  27. package/templates/.omp/RULES.md +62 -0
  28. package/templates/.omp/agents/bug-debugger.md +85 -0
  29. package/templates/.omp/agents/code-reviewer.md +197 -0
  30. package/templates/.omp/agents/feature-implementer.md +123 -0
  31. package/templates/.omp/agents/handoff-planner.md +210 -0
  32. package/templates/.omp/agents/ukit-small-task-maintainer.md +72 -0
  33. package/templates/.omp/agents/ukit-vision-analyst.md +100 -0
  34. package/templates/.omp/config.yml +90 -0
  35. package/templates/.omp/hooks/pre/ukit-bridge.js +368 -0
  36. package/templates/AGENTS.md +132 -64
  37. package/templates/CLAUDE.md +59 -21
  38. package/templates/docs/PROJECT.md +1 -1
  39. package/templates/ukit/storage/config.json +10 -0
  40. package/templates/adapter-presets/antigravity/README.md +0 -22
  41. package/templates/adapter-presets/antigravity/rules.md +0 -49
@@ -1,11 +1,13 @@
1
1
  # /ukit:handoff-create — Phase 1 + 2: Plan
2
2
 
3
3
  **Role: PLANNER**
4
- **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
4
+ **Tool: any** (Claude Code / Codex / omp / Kilo / OpenCode — your choice)
5
5
  **Model split:**
6
6
  - Read/understand → lite model (haiku · unic-lite · cheapest available)
7
7
  - Write plan + tasks → strong model (Opus · unic-smart · strongest available)
8
8
 
9
+ > **omp model tiers:** the tiers above map to `.omp/config.yml`'s `modelRoles`, referenced from agent frontmatter as `@lite` / `@code` / `@smart`.
10
+
9
11
  ## Problem / feature
10
12
  $ARGUMENTS
11
13
 
@@ -20,7 +22,7 @@ Planning is the **only** place in the handoff pipeline where asking the human is
20
22
  it is where every ambiguity must be burned off. Whatever is left unresolved here becomes a
21
23
  guess during implementation, where nobody is available to correct it.
22
24
 
23
- **Ask once, up front, batched.** Before Step 1, if `$ARGUMENTS` leaves a choice that changes
25
+ **Ask once, up front, batched.** Before Step 1, if the **Problem / feature** section above leaves a choice that changes
24
26
  *what gets built* — not how — collect every such question into a **single** `AskUserQuestion`
25
27
  call (max 4 questions, each with a `(Recommended)` first option). Then close the window.
26
28
 
@@ -39,7 +41,7 @@ After the batched call, run Steps 1–2.5 to completion without further question
39
41
 
40
42
  ## Step 1 — Read context (lite model)
41
43
 
42
- **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"`. Do NOT read these files yourself in the current session — this step is contracted to the lite tier (haiku/unic-lite), which only the spawned agent's frontmatter model guarantees. Ask the agent to:
44
+ **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`). Do NOT read these files yourself in the current session — this step is contracted to the lite tier (haiku/unic-lite), which only the spawned agent's frontmatter model guarantees. Ask the agent to:
43
45
 
44
46
  1. Read `docs/AI_HANDOFF/INDEX.md` → current tasks + statuses (or "empty")
45
47
  2. Read `docs/AI_HANDOFF/ACTIVE.md` → active cycle info (or "no active cycle")
@@ -47,13 +49,13 @@ After the batched call, run Steps 1–2.5 to completion without further question
47
49
  4. Read `docs/AI_HANDOFF/tasks/_TEMPLATE.md` → task file structure
48
50
  5. Return a compact summary. Do NOT write anything yet.
49
51
 
50
- > Other tools without subagent support: manually switch to the lite model, run the steps above yourself, keep the summary in context.
52
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the lite model, run the steps above yourself, keep the summary in context.
51
53
 
52
54
  ---
53
55
 
54
56
  ## Step 2 — Write plan + tasks (strong model)
55
57
 
56
- **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "handoff-planner"`, passing it the Step 1 summary and the problem/feature description. Do NOT write PLAN.md or task files yourself in the current session — this step is contracted to the strong tier (opus/unic-smart), which only the spawned agent's frontmatter model guarantees.
58
+ **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "handoff-planner"` (omp: the `task` tool with `agent: "handoff-planner"`), passing it the Step 1 summary and the problem/feature description. Do NOT write PLAN.md or task files yourself in the current session — this step is contracted to the strong tier (opus/unic-smart), which only the spawned agent's frontmatter model guarantees.
57
59
 
58
60
  The planner agent does the following (use Step 1 summary — do NOT re-read files):
59
61
 
@@ -104,7 +106,7 @@ The planner agent does the following (use Step 1 summary — do NOT re-read file
104
106
 
105
107
  7. Report: task IDs, dependency graph, any `needs_breakdown` + reason
106
108
 
107
- > Other tools without subagent support: manually switch to the strong model, execute steps 1–7 above yourself.
109
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the strong model, execute steps 1–7 above yourself.
108
110
 
109
111
  ---
110
112
 
@@ -119,13 +121,13 @@ The planner agent does the following (use Step 1 summary — do NOT re-read file
119
121
  Two independent strong-model passes shape the plan before any code is written — that gate is
120
122
  intact. What it no longer does is hand a stalled plan back and wait.
121
123
 
122
- **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "code-reviewer"`, passing `REVIEW_TARGET_TYPE=plan` and the path to `docs/AI_HANDOFF/PLAN.md`. This MUST be a separate agent invocation from Step 2's `handoff-planner` call (fresh context) — same-session self-review defeats the purpose of an independent gate.
124
+ **Claude Code — MANDATORY, do this before anything else:** call the Agent tool with `subagent_type: "code-reviewer"` (omp: the `task` tool with `agent: "code-reviewer"`), passing `REVIEW_TARGET_TYPE=plan` and the path to `docs/AI_HANDOFF/PLAN.md`. This MUST be a separate agent invocation from Step 2's `handoff-planner` call (fresh context) — same-session self-review defeats the purpose of an independent gate.
123
125
 
124
126
  1. Reviewer reads `PLAN.md` only (no diff, no task files, no executor report), checks Completeness / Consistency / Clarity / Scope / YAGNI — see `.claude/agents/code-reviewer.md` → Spec/Plan Review — and appends its verdict to PLAN.md's `## Plan Review Log` (new round entry, prior rounds kept).
125
127
  2. `Issues Found` → route back to Step 2: planner revises `PLAN.md` and the affected `TASK-xxx.md` files to address every finding, then re-submit for another Step 2.5 review (this becomes the next round). Do NOT commit or hand off to executor on `Issues Found`.
126
128
  3. `Approved` → append `PLAN_REVIEW: Approved by <reviewer model>` to PLAN.md's `## Planner Report` footer, then proceed.
127
129
 
128
- > Other tools without subagent support: manually switch to the strong model in a **separate** chat/session from Step 2, paste PLAN.md, review using the Spec/Plan Review checklist in `.claude/agents/code-reviewer.md`.
130
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the strong model in a **separate** chat/session from Step 2, paste PLAN.md, review using the Spec/Plan Review checklist in `.claude/agents/code-reviewer.md`.
129
131
 
130
132
  ---
131
133
 
@@ -1,7 +1,7 @@
1
1
  # /ukit:handoff-fullstack — Full Pipeline: Plan → Implement → Review
2
2
 
3
3
  **Role: ORCHESTRATOR**
4
- **Tool: any** (Claude Code / Codex / Kilo / OpenCode — your choice)
4
+ **Tool: any** (Claude Code / Codex / omp / Kilo / OpenCode — your choice)
5
5
 
6
6
  ## Model Split
7
7
 
@@ -12,23 +12,27 @@
12
12
  | Planning + Review (reasoning, design, verification) | opus · unic-smart · strongest available |
13
13
 
14
14
  > Claude Code: spawn `ukit-small-task-maintainer` (haiku) for light steps; spawn `handoff-planner` (opus) for planning; spawn `feature-implementer` (sonnet) agents for implementation; spawn `code-reviewer` (opus) per task for review.
15
+ >
16
+ > omp: same four agents, launched with the `task` tool (`agent: "<name>"`). They live in `.omp/agents/` and bind their tier through `model: "@lite"` / `"@code"` / `"@smart"`, resolved via `modelRoles` in `.omp/config.yml` — you do not pass a model name.
17
+
18
+ > **omp model tiers:** the tiers above map to `.omp/config.yml`'s `modelRoles`, referenced from agent frontmatter as `@lite` / `@code` / `@smart`.
15
19
 
16
20
  ---
17
21
 
18
22
  ## Problem / feature
19
23
  $ARGUMENTS
20
24
 
21
- > **If `$ARGUMENTS` is empty:** Do NOT proceed. Ask the user: "What problem or feature would you like to tackle in this handoff cycle? Please describe it in one or more sentences." Wait for the answer before running any phase.
25
+ > **If the **Problem / feature** section above is empty:** Do NOT proceed. Ask the user: "What problem or feature would you like to tackle in this handoff cycle? Please describe it in one or more sentences." Wait for the answer before running any phase.
22
26
 
23
27
  ---
24
28
 
25
29
  ## Autonomy Contract — read before anything else
26
30
 
27
31
  This command is a **one-shot pipeline**. The human is not watching. Treat every phase below
28
- as unattended: they may walk away after submitting `$ARGUMENTS` and come back to a finished
32
+ as unattended: they may walk away after submitting the request and come back to a finished
29
33
  result.
30
34
 
31
- **The single question window is P0, before any file is written.** If `$ARGUMENTS` leaves a
35
+ **The single question window is P0, before any file is written.** If the **Problem / feature** section above leaves a
32
36
  choice that would change what gets built — not how it gets built — batch every such question
33
37
  into **one** `AskUserQuestion` call (max 4 questions, each with a `(Recommended)` first
34
38
  option) and resolve them all at once. Record the answers in `PLAN.md` §1.
@@ -60,7 +64,7 @@ numbered step completes:
60
64
 
61
65
  ```
62
66
  Command: handoff-fullstack
63
- Goal: <one sentence from $ARGUMENTS>
67
+ Goal: <one sentence from the **Problem / feature** section above>
64
68
  Base: <BASE branch>
65
69
  Phase: <P1|P2|P2.5|P3|I1|I2|I3|I4|R1|R2|R3|R4|R5|done>
66
70
  Cursor: wave <N> batch <M> — <what just finished>
@@ -78,7 +82,7 @@ continue. Read the cursor, then jump straight to `Next:` and carry on. Tasks alr
78
82
  or `pending_review` are skipped; only `ready`, `in_progress`, `changes_requested` and
79
83
  `blocked` tasks are picked up.
80
84
 
81
- Only when `RUN.md` is absent or `Phase: done` does `$ARGUMENTS` start a fresh cycle.
85
+ Only when `RUN.md` is absent or `Phase: done` does a new request start a fresh cycle.
82
86
 
83
87
  ---
84
88
 
@@ -86,7 +90,7 @@ Only when `RUN.md` is absent or `Phase: done` does `$ARGUMENTS` start a fresh cy
86
90
 
87
91
  ### P1 — Read context (lite model)
88
92
 
89
- **Claude Code — MANDATORY, do this before anything else in P1:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"`. Do NOT read these files yourself in the current session — this step is contracted to the lite tier (haiku/unic-lite), which only the spawned agent's frontmatter model guarantees. Ask it to return a compact summary of:
93
+ **Claude Code — MANDATORY, do this before anything else in P1:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`). Do NOT read these files yourself in the current session — this step is contracted to the lite tier (haiku/unic-lite), which only the spawned agent's frontmatter model guarantees. Ask it to return a compact summary of:
90
94
 
91
95
  1. `docs/AI_HANDOFF/INDEX.md` — current tasks + statuses (or "empty / no tasks")
92
96
  2. `docs/AI_HANDOFF/ACTIVE.md` — active cycle info (or "no active cycle")
@@ -95,11 +99,11 @@ Only when `RUN.md` is absent or `Phase: done` does `$ARGUMENTS` start a fresh cy
95
99
 
96
100
  Return a compact summary. Do NOT write any files yet.
97
101
 
98
- > Other tools without subagent support: manually switch to the lite model and run P1 yourself.
102
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the lite model and run P1 yourself.
99
103
 
100
104
  ### P2 — Write PLAN.md + task files (strong model)
101
105
 
102
- **Claude Code — MANDATORY, do this before anything else in P2:** call the Agent tool with `subagent_type: "handoff-planner"`, passing it the P1 summary and `$ARGUMENTS`. Do NOT write PLAN.md or task files yourself in the current session — this step is contracted to the strong tier (opus/unic-smart), which only the spawned agent's frontmatter model guarantees.
106
+ **Claude Code — MANDATORY, do this before anything else in P2:** call the Agent tool with `subagent_type: "handoff-planner"` (omp: the `task` tool with `agent: "handoff-planner"`), passing it the P1 summary and the **Problem / feature** section above. Do NOT write PLAN.md or task files yourself in the current session — this step is contracted to the strong tier (opus/unic-smart), which only the spawned agent's frontmatter model guarantees.
103
107
 
104
108
  The planner agent does the following (use P1 summary — do NOT re-read files):
105
109
 
@@ -160,24 +164,24 @@ The planner agent does the following (use P1 summary — do NOT re-read files):
160
164
  The gate still does its job — two independent opus passes shape the plan before a line of code
161
165
  is written. What it no longer does is hand a stalled plan back to a human who isn't there.
162
166
 
163
- **Claude Code — MANDATORY, do this before anything else in P2.5:** call the Agent tool with `subagent_type: "code-reviewer"`, passing `REVIEW_TARGET_TYPE=plan` and the path to `docs/AI_HANDOFF/PLAN.md`. This MUST be a separate agent invocation from P2's `handoff-planner` call (fresh context) — same-session self-review defeats the purpose of an independent gate.
167
+ **Claude Code — MANDATORY, do this before anything else in P2.5:** call the Agent tool with `subagent_type: "code-reviewer"` (omp: the `task` tool with `agent: "code-reviewer"`), passing `REVIEW_TARGET_TYPE=plan` and the path to `docs/AI_HANDOFF/PLAN.md`. This MUST be a separate agent invocation from P2's `handoff-planner` call (fresh context) — same-session self-review defeats the purpose of an independent gate.
164
168
 
165
169
  1. Reviewer reads `PLAN.md` only (no diff, no task files, no executor report), checks Completeness / Consistency / Clarity / Scope / YAGNI — see `.claude/agents/code-reviewer.md` → Spec/Plan Review — and appends its verdict to PLAN.md's `## Plan Review Log` (new round entry, prior rounds kept).
166
170
  2. `Issues Found` → route back to P2: `handoff-planner` revises `PLAN.md` and the affected `TASK-xxx.md` files to address every finding, then re-submit for one more P2.5 review round — subject to the loop cap above.
167
171
  3. `Approved` → append `PLAN_REVIEW: Approved by <reviewer model>` to PLAN.md's `## Planner Report` footer, then proceed to P3.
168
172
 
169
- > Other tools without subagent support: manually switch to the strong model in a **separate** chat/session from P2, paste PLAN.md, review using the Spec/Plan Review checklist in `.claude/agents/code-reviewer.md`.
173
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the strong model in a **separate** chat/session from P2, paste PLAN.md, review using the Spec/Plan Review checklist in `.claude/agents/code-reviewer.md`.
170
174
 
171
175
  ### P3 — Commit the plan (lite model)
172
176
 
173
- **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` for this commit step (lite tier — haiku/unic-lite). Run:
177
+ **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`) for this commit step (lite tier — haiku/unic-lite). Run:
174
178
  ```bash
175
179
  git add docs/AI_HANDOFF/ && git commit -m "handoff: plan — <goal>"
176
180
  ```
177
181
 
178
182
  Replace `<goal>` with the one-sentence goal from ACTIVE.md. This locks the plan in git before any implementation begins.
179
183
 
180
- > Other tools without subagent support: manually switch to the lite model for P2/P3.
184
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the lite model for P2/P3.
181
185
 
182
186
  ---
183
187
 
@@ -185,7 +189,7 @@ Replace `<goal>` with the one-sentence goal from ACTIVE.md. This locks the plan
185
189
 
186
190
  ### I1 — Setup + verify (lite model)
187
191
 
188
- **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` for I1. Ask it to read:
192
+ **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`) for I1. Ask it to read:
189
193
  - `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>`
190
194
  - `docs/AI_HANDOFF/INDEX.md` → collect all `ready` tasks
191
195
 
@@ -234,7 +238,7 @@ leaves worktrees behind. Batching only ever narrows a wave, never reorders acros
234
238
 
235
239
  ### I3 — Execute wave by wave (code model agents)
236
240
 
237
- **Claude Code — MANDATORY, do this before anything else in I3:** for each wave, call the Agent tool once per task **in the current batch** (in parallel, at most `handoff.maxParallelAgents`), each with `subagent_type: "feature-implementer"`. Do NOT implement the tasks yourself in the current session — this step is contracted to the code tier (sonnet/unic-code), which only the spawned agent's frontmatter model guarantees.
241
+ **Claude Code — MANDATORY, do this before anything else in I3:** for each wave, call the Agent tool once per task **in the current batch** (in parallel, at most `handoff.maxParallelAgents`), each with `subagent_type: "feature-implementer"` (omp: the `task` tool with `agent: "feature-implementer"`, likewise invoked once per task in the batch, not once per wave). Do NOT implement the tasks yourself in the current session — this step is contracted to the code tier (sonnet/unic-code), which only the spawned agent's frontmatter model guarantees.
238
242
 
239
243
  For each wave:
240
244
 
@@ -356,7 +360,7 @@ logs used to cost. That difference is what makes a multi-wave cycle finish in on
356
360
 
357
361
  ### I4 — Consolidate + update INDEX (lite model)
358
362
 
359
- **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` for I4. After all waves complete, ask it to:
363
+ **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`) for I4. After all waves complete, ask it to:
360
364
 
361
365
  1. Update `docs/AI_HANDOFF/INDEX.md`:
362
366
  - PASS tasks → `pending_review`
@@ -376,7 +380,7 @@ logs used to cost. That difference is what makes a multi-wave cycle finish in on
376
380
 
377
381
  ### R1 — Setup (lite model)
378
382
 
379
- **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` for the R1 reads. Ask it to read:
383
+ **Claude Code — MANDATORY:** call the Agent tool with `subagent_type: "ukit-small-task-maintainer"` (omp: the `task` tool with `agent: "ukit-small-task-maintainer"`) for the R1 reads. Ask it to read:
380
384
  - `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>`
381
385
  - `docs/AI_HANDOFF/INDEX.md` → collect `pending_review` tasks
382
386
 
@@ -400,7 +404,7 @@ If that diff is empty → implement was not completed. Do not stop: re-enter Pha
400
404
 
401
405
  **Batch the review set — mandatory.** Read `handoff.maxParallelAgents` from `.ukit/storage/config.json`. If more `pending_review` tasks exist than that, split into consecutive batches of at most that many; finish one batch's verdicts (R2–R4, appended to each task file) before starting the next.
402
406
 
403
- **Claude Code — MANDATORY, do this before anything else in R2–R4:** for each batch, call the Agent tool once per `pending_review` task **in parallel** (at most `handoff.maxParallelAgents`), each with `subagent_type: "code-reviewer"`. Reviewer agents only read the diff and append a verdict to their own task file — no worktree, no shared write target — so running them in parallel carries none of Phase 3's file-conflict risk. Do NOT review the diff yourself in the current session — this step is contracted to the strong tier (opus/unic-smart) and MUST differ from the executor's model, which only the spawned agent's frontmatter model guarantees.
407
+ **Claude Code — MANDATORY, do this before anything else in R2–R4:** for each batch, call the Agent tool once per `pending_review` task **in parallel** (at most `handoff.maxParallelAgents`), each with `subagent_type: "code-reviewer"` (omp: the `task` tool with `agent: "code-reviewer"`, likewise invoked once per task in the batch, not once per wave). Reviewer agents only read the diff and append a verdict to their own task file — no worktree, no shared write target — so running them in parallel carries none of Phase 3's file-conflict risk. Do NOT review the diff yourself in the current session — this step is contracted to the strong tier (opus/unic-smart) and MUST differ from the executor's model, which only the spawned agent's frontmatter model guarantees.
404
408
 
405
409
  The spawned reviewer agent reads `EXECUTOR_MODEL` from each task file `## Executor Report`:
406
410
 
@@ -1,9 +1,11 @@
1
1
  # /ukit:handoff-implement — Phase 3: Execute
2
2
 
3
3
  **Role: EXECUTOR (orchestrated)**
4
- **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
4
+ **Tool: any** (Claude Code / Codex / omp / Kilo / OpenCode — your choice)
5
5
  **Model: code model** (Sonnet · unic-code · cheap-smart)
6
6
 
7
+ > **omp model tiers:** the tiers above map to `.omp/config.yml`'s `modelRoles`, referenced from agent frontmatter as `@lite` / `@code` / `@smart`.
8
+
7
9
  ## Target (optional)
8
10
  $ARGUMENTS
9
11
  _Empty = all `ready` tasks. Or: "TASK-001" for a specific task._
@@ -56,7 +58,7 @@ If this file already exists with `Phase:` not `done` when the command starts, th
56
58
  ## Step 1 — Setup
57
59
 
58
60
  Read `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>`.
59
- Read `docs/AI_HANDOFF/INDEX.md` → collect `ready` tasks (or specific task from $ARGUMENTS).
61
+ Read `docs/AI_HANDOFF/INDEX.md` → collect `ready` tasks (or the specific task named in the request above).
60
62
  If there are no `ready` tasks, check for `changes_requested`/`blocked` ones and run those
61
63
  instead. Only if nothing is actionable → report and stop.
62
64
 
@@ -117,7 +119,7 @@ git worktree add -b handoff/task-xxx .worktrees/task-xxx $BASE
117
119
 
118
120
  ### 3b — Run tasks in parallel (one agent/session per task)
119
121
 
120
- **Claude Code — MANDATORY, do this before anything else in this wave:** call the Agent tool once per task **in the current batch** (in parallel, at most `handoff.maxParallelAgents`), each with `subagent_type: "feature-implementer"`. Do NOT implement the tasks yourself in the current session — this step is contracted to the code tier (sonnet/unic-code), which only the spawned agent's frontmatter model guarantees.
122
+ **Claude Code — MANDATORY, do this before anything else in this wave:** call the Agent tool once per task **in the current batch** (in parallel, at most `handoff.maxParallelAgents`), each with `subagent_type: "feature-implementer"` (omp: the `task` tool with `agent: "feature-implementer"`, likewise invoked once per task in the batch, not once per wave). Do NOT implement the tasks yourself in the current session — this step is contracted to the code tier (sonnet/unic-code), which only the spawned agent's frontmatter model guarantees.
121
123
 
122
124
  Each spawned agent works independently in its own worktree — **NO git commit, NO git add**:
123
125
 
@@ -161,7 +163,7 @@ disk in the task file, which is where the reviewer reads them from. Pasting them
161
163
  second time is what blows up the orchestrator's context window and kills the run mid-wave.
162
164
  ```
163
165
 
164
- > Other tools without subagent support: open each task in a separate session with the code model.
166
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** open each task in a separate session with the code model.
165
167
 
166
168
  ### 3c — Orchestrator: copy changes to main + IMMEDIATELY delete worktree
167
169
 
@@ -1,9 +1,11 @@
1
1
  # /ukit:handoff-review — Phase 4: Review
2
2
 
3
3
  **Role: REVIEWER**
4
- **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
4
+ **Tool: any** (Claude Code / Codex / omp / Kilo / OpenCode — your choice)
5
5
  **Model: strong model, MUST differ from executor** (Opus · unic-smart · strongest available)
6
6
 
7
+ > **omp model tiers:** the tiers above map to `.omp/config.yml`'s `modelRoles`, referenced from agent frontmatter as `@lite` / `@code` / `@smart`.
8
+
7
9
  ## Target (optional)
8
10
  $ARGUMENTS
9
11
  _Empty = all `pending_review` tasks. Or: "TASK-001" for a specific task._
@@ -52,7 +54,7 @@ If that diff is empty → handoff-implement was not completed. Report which task
52
54
 
53
55
  **Batch the review set — mandatory.** Read `handoff.maxParallelAgents` from `.ukit/storage/config.json`. If more `pending_review` tasks exist than that, split into consecutive batches of at most that many; finish one batch's verdicts (2a–2d, appended to each task file) before starting the next.
54
56
 
55
- **Claude Code — MANDATORY, do this before anything else:** for each batch, call the Agent tool once per `pending_review` task **in parallel** (at most `handoff.maxParallelAgents`), each with `subagent_type: "code-reviewer"`. Reviewer agents only read the diff and append a verdict to their own task file — no worktree, no shared write target — so running them in parallel carries none of Phase 3's file-conflict risk. Do NOT review the diff yourself in the current session — this step is contracted to the strong tier (opus/unic-smart) and MUST differ from the executor's model, which only the spawned agent's frontmatter model guarantees. Pass each agent: the task file path, the executor's report, and the diff.
57
+ **Claude Code — MANDATORY, do this before anything else:** for each batch, call the Agent tool once per `pending_review` task **in parallel** (at most `handoff.maxParallelAgents`), each with `subagent_type: "code-reviewer"` (omp: the `task` tool with `agent: "code-reviewer"`, likewise invoked once per task in the batch, not once per wave). Reviewer agents only read the diff and append a verdict to their own task file — no worktree, no shared write target — so running them in parallel carries none of Phase 3's file-conflict risk. Do NOT review the diff yourself in the current session — this step is contracted to the strong tier (opus/unic-smart) and MUST differ from the executor's model, which only the spawned agent's frontmatter model guarantees. Pass each agent: the task file path, the executor's report, and the diff.
56
58
 
57
59
  The spawned reviewer agent performs 2a–2d below per task:
58
60
 
@@ -186,4 +188,4 @@ This is the only place this command may ask for a compaction. All state lives in
186
188
  `INDEX.md` and `RUN.md`, so a compacted or fresh session resumes with nothing lost.
187
189
 
188
190
  > Orchestrator (this session) handles Step 1, 2e, and 3 directly — those are not delegated.
189
- > Other tools without subagent support: manually switch to the strong model, run 2a–2d per task (one session at a time).
191
+ > **For the human operator, on a tool with no agent support (Codex, OpenCode) — not an instruction to the model:** manually switch to the strong model, run 2a–2d per task (one session at a time).
@@ -45,5 +45,5 @@ Next action:
45
45
  no active cycle → /ukit:handoff-create <description>
46
46
  ```
47
47
 
48
- > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with the above prompt.
48
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with the above prompt. omp: the `task` tool with `agent: "ukit-small-task-maintainer"`.
49
49
  > Other tools: use lite model, run the reads above, format the report.
@@ -256,7 +256,7 @@ export const ROUTE_CATALOG = [
256
256
  signals: [
257
257
  { type: 'prompt', regex: /\b(stale|refresh|cleanup|reinstall|maintenance|workspace drift|index freshness|out of date)\b/i, score: 4 },
258
258
  { type: 'command', regex: /\bukit install\b|\brefresh-index\.mjs\b|\bbuild-index\.mjs\b/i, score: 3 },
259
- { type: 'file', regex: /\.claude\/|\.codex\/|\.antigravity\//i, score: 1 },
259
+ { type: 'file', regex: /\.claude\/|\.codex\/|\.antigravity\/|\.omp\//i, score: 1 },
260
260
  ],
261
261
  },
262
262
  {
@@ -14,13 +14,29 @@
14
14
  * 2. project .claude/settings.json -> env.ANTHROPIC_BASE_URL -> 'claude-settings'
15
15
  * 3. ~/.claude/settings.json -> env.ANTHROPIC_BASE_URL -> 'claude-settings'
16
16
  *
17
- * Cross-tool configs are NOT probed. This module is only ever invoked from Claude Code hooks
18
- * (vision-router.sh, vision-gate.sh, route-task.mjs) to gate what THIS session does — a Codex
19
- * `config.toml` `base_url`, a Kilo `secrets.json` endpoint, or an `OPENAI_BASE_URL` env var
20
- * describe a completely different tool's outbound endpoint and say nothing about where Claude
21
- * Code itself is sending requests. Treating them as evidence produced permanent false positives
22
- * (any machine with Codex/Kilo pointed at the UNIC gateway would report `unicMode: true` for
23
- * every plain Claude Code session, deadlocking Edit/Write on any image-mentioning turn).
17
+ * omp needs no probe of its own: verified against omp v17.4.2, it reads `ANTHROPIC_BASE_URL`
18
+ * for the anthropic provider, so probe 1 covers an omp session for the same reason it covers a
19
+ * Claude Code one. See the note above the probe list below for the two guessed omp probes this
20
+ * replaced, and why they could never have fired.
21
+ *
22
+ * Every probe here is scoped to what changes the CALLING
23
+ * runtime's OWN outbound endpoint — same rule that already governs probes 1-3. Cross-tool
24
+ * configs are NOT probed. This module is only ever invoked from Claude Code / omp hooks
25
+ * (vision-router.sh, vision-gate.sh, route-task.mjs, and the omp bridge) to gate what THIS
26
+ * session does — a Codex `config.toml` `base_url`, a Kilo `secrets.json` endpoint, or an
27
+ * `OPENAI_BASE_URL` env var describe a completely different tool's outbound endpoint and say
28
+ * nothing about where Claude Code or omp itself is sending requests. Treating them as evidence
29
+ * produced permanent false positives (any machine with Codex/Kilo pointed at the UNIC gateway
30
+ * would report `unicMode: true` for every plain Claude Code session, deadlocking Edit/Write on
31
+ * any image-mentioning turn).
32
+ *
33
+ * Fail-safe direction (do not re-flip this): `unicMode` keeps BINARY semantics on every runtime
34
+ * — `unicMode = sources.length > 0`, default `false`. Inconclusive detection never resolves to
35
+ * `true`. The "assume UNIC when ambiguous" fail-safe some tools want belongs ONLY to the static
36
+ * `modelRoles` values TASK-003 writes unconditionally into `templates/.omp/config.yml`
37
+ * (`@vision: unic-vision`, no probe involved) — never to this module's boolean, because this
38
+ * module is shared by every runtime and flipping its default would make Codex/Kilo/OPENAI_BASE_URL
39
+ * sessions with zero omp/Claude signal start false-positively reporting UNIC mode.
24
40
  *
25
41
  * Contract: this module must NEVER throw and must NEVER exit non-zero, in any case (missing files,
26
42
  * malformed JSON, unreadable paths, etc. all degrade to a clean "no hit").
@@ -38,6 +54,24 @@ import { fileURLToPath } from 'node:url';
38
54
  const UNIC_TOKEN = 'unicjsc.com';
39
55
  const VISION_MODEL_ALIAS = 'unic-vision';
40
56
 
57
+ // RESOLVED 2026-08-22 against a real omp v17.4.2 install -- both omp-specific probes that
58
+ // shipped in 2.2.1 were guesses, and both were wrong:
59
+ //
60
+ // * `OMP_BASE_URL` does not exist in omp. Its bundled provider resolver reads
61
+ // `ANTHROPIC_BASE_URL` for the anthropic provider, falling back to
62
+ // "https://api.anthropic.com" -- i.e. the exact variable probe 1 already reads.
63
+ // * `.omp/config.yml` has no `baseUrl` key at any level. `omp config get baseUrl` answers
64
+ // "Unknown setting", and omp's settings schema declares none.
65
+ //
66
+ // So omp needs no probe of its own: an omp session pointed at the UNIC gateway is detected by
67
+ // probe 1, on the same variable and for the same reason as a Claude Code session. That is what
68
+ // makes the rule stated in CLAUDE.md/AGENTS.md ("routing is decided ONLY by ANTHROPIC_BASE_URL")
69
+ // literally true on omp rather than an approximation of it. Both dead probes are removed rather
70
+ // than left in place returning a permanent false -- a probe that can never fire is worse than no
71
+ // probe, because it reads as coverage. Custom per-model `baseUrl` values do exist in omp, but
72
+ // they live in its models config, not in `.omp/config.yml`; if that ever needs probing it is a
73
+ // new probe against a verified path, not a revival of these.
74
+
41
75
  function safeReadFile(filePath) {
42
76
  try {
43
77
  return fs.readFileSync(filePath, 'utf8');
@@ -84,6 +118,8 @@ function probeClaudeSettings(filePath) {
84
118
  return typeof value === 'string' && value.includes(UNIC_TOKEN);
85
119
  }
86
120
 
121
+ // Narrow anchored regex probe (no YAML parsing) for the omp config file's `baseUrl` key. A
122
+ // missing file, unreadable path, or malformed YAML all degrade to "no hit" -- never throws.
87
123
  /**
88
124
  * Checks whether the Codex model catalog exists and, if so, whether it lists `unic-vision`.
89
125
  * A missing/unreadable/malformed catalog is never an error — it degrades to "unknown" and the
@@ -8,7 +8,7 @@ Auto-generated by UKit for OpenAI Codex.
8
8
  ## Core UKit Rule
9
9
 
10
10
  - Human-facing workflow should optimize for one remembered command: `ukit install`.
11
- - After install, normal work should feel natural inside **Claude/Codex/OpenCode** (and Antigravity when installed).
11
+ - After install, normal work should feel natural inside **Claude/Codex/OpenCode/omp**.
12
12
  - **Quality first, then speed, then token discipline**: do not waste reads, logs, or repeated helper output.
13
13
  - **Never stop after read-only steps.** For implement/apply/fix requests, continue to actual Edit/Write and verification in the same turn.
14
14
 
@@ -46,9 +46,11 @@ Thumbs.db
46
46
  .claude/ukit/permission-usage.json
47
47
  .claude/ukit/permission-audit.log
48
48
  .cache/
49
+ # legacy: Antigravity adapter removed in v2.2.0; leftovers must stay ignored
49
50
  .antigravity/
50
51
  .claude/
51
52
  .codex/
53
+ .omp/
52
54
  .ukit/
53
55
  opencode.json
54
56
  AGENTS.md
@@ -0,0 +1,9 @@
1
+ # .omp/AGENTS.md — thin import, not a copy
2
+
3
+ This file exists only so omp's native `.omp/AGENTS.md` provider (priority 100) does not shadow the
4
+ project-root `AGENTS.md` (agents-md provider, priority 10) with duplicated content. omp resolves `@`
5
+ imports relative to this file's own directory, so the single import line below pulls in the real,
6
+ single-source-of-truth project instructions from the repo root. Do not inline root `AGENTS.md`'s body
7
+ here — that would make root `AGENTS.md` stop loading on omp and let the two drift silently.
8
+
9
+ @../AGENTS.md
@@ -0,0 +1,96 @@
1
+ # omp (Oh My Pi) adapter — {{project.name}}
2
+
3
+ UKit installs this workspace so that [omp](https://omp.sh) gets the same guardrails, agents and
4
+ context that Claude Code gets — without a second copy of the logic to keep in sync.
5
+
6
+ Stack: {{project.stack}} · package manager: `{{runtime.packageManager}}`
7
+
8
+ ## What `ukit install` puts here
9
+
10
+ Eleven files, all managed by UKit. Re-running `ukit install` overwrites them and keeps a backup of
11
+ whatever was there before, so local edits are never silently lost — they move, they do not vanish.
12
+
13
+ | Path | What it is |
14
+ |------|------------|
15
+ | `.omp/AGENTS.md` | Thin context entry point. Imports the root `AGENTS.md` (`@../AGENTS.md`) rather than duplicating it. |
16
+ | `.omp/RULES.md` | Sticky hard rules that must survive compaction. |
17
+ | `.omp/config.yml` | Model roles, tool approval policy, dangerous-command patterns, memory and compact settings. |
18
+ | `.omp/README.md` | This file. |
19
+ | `.omp/hooks/pre/ukit-bridge.js` | Translates omp events into Claude Code hook payloads and runs the real `.claude/hooks/*.sh` scripts. |
20
+ | `.omp/agents/bug-debugger.md` | Debugging lane. |
21
+ | `.omp/agents/code-reviewer.md` | Independent review lane. |
22
+ | `.omp/agents/feature-implementer.md` | Implementation lane. |
23
+ | `.omp/agents/handoff-planner.md` | Handoff planning lane. |
24
+ | `.omp/agents/ukit-small-task-maintainer.md` | Low-risk chores lane. |
25
+ | `.omp/agents/ukit-vision-analyst.md` | The only lane allowed to interpret images. |
26
+
27
+ ## Model roles
28
+
29
+ `.omp/config.yml` defines four roles. Agent frontmatter references them as `@lite` / `@code` /
30
+ `@smart` / `@vision`, so retargeting a whole tier is a one-line edit in one file.
31
+
32
+ | Role | Default model | Agents using it |
33
+ |------|---------------|-----------------|
34
+ | `lite` | `unic-lite` | `ukit-small-task-maintainer` |
35
+ | `code` | `unic-code` | `feature-implementer`, `bug-debugger` |
36
+ | `smart` | `unic-smart` | `handoff-planner`, `code-reviewer` |
37
+ | `vision` | `unic-vision` | `ukit-vision-analyst` |
38
+
39
+ These are **literal model names on the UNIC gateway, not aliases**, and they ship as the installed
40
+ default. If this project does not run against UNIC, a maintainer swaps the three cost tiers for the
41
+ values in `orchestration.modelTiers[*].claudeModel` in `.ukit/storage/config.json`.
42
+
43
+ `vision` is the exception and stays `unic-vision` either way: it is a *capability* lane, not a cost
44
+ tier. `unic-code` and `unic-smart` cannot read images on this gateway, so substituting one of them
45
+ would not downgrade image analysis — it would silently produce guesses.
46
+
47
+ ## The six agents are shared with Claude Code
48
+
49
+ The agent names here are verbatim the same as the ones under `.claude/agents/`, so the same
50
+ instruction ("hand this to the code reviewer") routes to the same role on either runtime.
51
+
52
+ What differs is only the frontmatter contract: omp reads task agents from `.omp/agents/` and
53
+ deliberately skips `.claude/agents/*.md`, and its model field takes a `@role` reference instead of a
54
+ model id. The prompt bodies are ported, not rewritten.
55
+
56
+ ## The hook bridge
57
+
58
+ `.omp/hooks/pre/ukit-bridge.js` does not reimplement any guardrail. It maps an omp event to the
59
+ matching Claude Code hook payload and executes the existing shell script under `.claude/hooks/`.
60
+ One source of truth, two runtimes — fix a hook once and both runtimes get the fix.
61
+
62
+ Two things worth knowing:
63
+
64
+ **Tool names are mapped explicitly, never guessed.** omp's write surface is `edit`, `write` *and*
65
+ `ast_edit`; all three map to the `Edit` group, or `ast_edit` would slip past `protect-files.sh` and
66
+ `vision-gate.sh`. `eval` maps to `Bash` so it still hits `block-dangerous.sh`. Anything not in the
67
+ table maps to nothing and runs zero scripts — it never falls back to `Bash` or `Edit`.
68
+
69
+ **Failure direction is per-script, transcribed from each script's own header — not a blanket rule.**
70
+
71
+ - *Fail closed* (a crash or non-zero exit blocks the action): `protect-files.sh`,
72
+ `stale-spec-guard.sh`, `handoff-model-guard.sh`, `vision-gate.sh`, `context-hardcap-gate.sh`,
73
+ `block-dangerous.sh`, `verification-guard.sh`. These are gates; a broken gate must not open.
74
+ - *Fail open* (a crash logs a warning and the action proceeds): the advisory scripts —
75
+ routing, backups, output compression, context reinjection, pressure reset, handoff resume.
76
+ These improve a session; none of them should be able to halt one.
77
+
78
+ ## Why there is no `.omp/skills/` or `.omp/commands/`
79
+
80
+ Their absence is deliberate, not an oversight — and if you "fix" it, a test will fail on purpose.
81
+
82
+ omp discovers capabilities from several providers in priority order, and its `claude` provider
83
+ already reads `.claude/skills/` and `.claude/commands/` directly. A copy or symlink under `.omp/`
84
+ would register at higher (native) priority, win deduplication, and give you a second location to
85
+ keep in sync for exactly zero new capability.
86
+
87
+ `.omp/agents/` is the one case that *must* be real files, because omp explicitly does not read
88
+ `.claude/agents/*.md`.
89
+
90
+ ## Installing / removing
91
+
92
+ ```bash
93
+ ukit install --tools=omp # or --tools=oh-my-pi
94
+ ukit install # installs every adapter, omp included
95
+ ukit uninstall # removes the paths listed above
96
+ ```
@@ -0,0 +1,62 @@
1
+ # .omp/RULES.md — sticky always-apply rules
2
+
3
+ omp re-attaches this file near every turn from its native location (`.omp/RULES.md` only, never a
4
+ copy elsewhere). It carries the always-apply subset of root `AGENTS.md` that must survive even when
5
+ nothing else is loaded. Keep this short: every line here is a per-turn tax.
6
+
7
+ ## 1. Classify first, then act
8
+
9
+ - **Trivial** (typo, rename, flag, obvious config) — act directly. No doc reads, no index, no agents.
10
+ - **Simple** (1-2 files, existing pattern) — act directly, pull the smallest useful context.
11
+ - **Non-trivial / risky** (auth, migration, shared runtime, data-loss, flaky) — index-first, then
12
+ activate the matching skill, then verify.
13
+
14
+ Pick the lane before the first tool call. Skipping this is what turns a direct chat into a
15
+ scattershot one.
16
+
17
+ ## 2. Execution Contract
18
+
19
+ For implement/apply/fix requests, continue until the actual edit is made or a real blocker is found.
20
+ Do not stop after a read-only inspection step (read/grep/glob/search).
21
+
22
+ ## 3. No "done" after read-only
23
+
24
+ Never say "done", "applied", or "fixed" after a read-only step. Completion wording requires concrete
25
+ edit/write evidence in the current turn, plus verification when the change is risky.
26
+
27
+ ## 4. Index-first loop
28
+
29
+ Check `.cache/index/` freshness first. Then run
30
+ `node .claude/ukit/index/query-index.mjs "<error|symbol|path>"` and open only the top 1-3 suspect
31
+ files before widening further. These node scripts work unchanged under omp.
32
+
33
+ ## 5. Auto-activate skills
34
+
35
+ Skills live in `.claude/skills/` and omp reads them through its `claude` discovery provider — no
36
+ mirror under `.omp/`. On any non-trivial task, and again after the first tool calls reveal what the
37
+ work really is, read the matching `SKILL.md` without being asked. Users never name skills.
38
+
39
+ ## 6. Delegate to bind a model tier
40
+
41
+ Your own model does not change mid-turn. A tier only applies when work is handed to a task-agent in
42
+ `.omp/agents/`, whose `model:` field (`@lite` / `@code` / `@smart` / `@vision`) resolves through
43
+ `modelRoles` in `.omp/config.yml`.
44
+
45
+ - `tiny-fix` → `@lite` · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` →
46
+ `@code` · `review-release` → `@smart`
47
+ - Images: `@vision` only. `@code`/`@smart` cannot see images on the UNIC gateway and must never
48
+ guess at their contents — hand every image to `ukit-vision-analyst` first.
49
+
50
+ Doing everything inline is exactly what makes UKit look like it only has one model. Keep direct
51
+ execution for trivial/simple work; delegate when the tier differs or when a noisy lane would other-
52
+ wise flood this context.
53
+
54
+ ## 7. Safe Patch
55
+
56
+ Prefer unique current-file anchors over line numbers or stale pasted blocks. Never silently merge a
57
+ stale spec — re-read current source and confirm before applying. Preserve existing BOM and line
58
+ endings.
59
+
60
+ > Maintainer note, not a per-turn rule: `modelRoles` in `.omp/config.yml` ships UNIC gateway names.
61
+ > On a non-UNIC provider, edit only the three cost tiers — `lite`, `code`, `smart` — never `vision`,
62
+ > which stays `unic-vision` because it is a capability lane, not a cost tier.