@ngockhoale/ukit 2.7.0 → 2.7.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.
- package/CHANGELOG.md +42 -0
- package/README.md +1 -3
- package/manifests/hostCapabilities.yaml +0 -10
- package/manifests/instructionRules.yaml +0 -16
- package/manifests/platform.full.yaml +2 -16
- package/package.json +3 -5
- package/scripts/perf/audit-perf.mjs +4 -4
- package/scripts/perf/perf-findings.json +420 -0
- package/src/cli/adapters.js +10 -13
- package/src/cli/commands/doctor.js +15 -7
- package/src/cli/index.js +2 -2
- package/src/core/ompConfigMerge.js +36 -7
- package/src/core/opencodeSteer.js +37 -0
- package/src/core/projectImportant.js +14 -8
- package/src/core/runInstallPipeline.js +10 -0
- package/src/core/runtimeConfig.js +41 -7
- package/src/core/status.js +6 -4
- package/src/manifest/selectItems.js +0 -1
- package/templates/.claude/agents/bug-debugger.md +1 -1
- package/templates/.claude/agents/feature-implementer.md +1 -1
- package/templates/.claude/agents/ukit-small-task-maintainer.md +2 -2
- package/templates/.claude/commands/ukit/handoff-create.md +5 -5
- package/templates/.claude/commands/ukit/handoff-fullstack.md +6 -6
- package/templates/.claude/commands/ukit/handoff-implement.md +3 -3
- package/templates/.claude/commands/ukit/handoff-review.md +3 -3
- package/templates/.claude/skills/update-status/SKILL.md +1 -1
- package/templates/.claude/ukit/index/route-task.mjs +7 -2
- package/templates/.codex/README.md +1 -1
- package/templates/.codex/settings.json +0 -1
- package/templates/.omp/README.md +11 -7
- package/templates/.omp/RULES.md +7 -6
- package/templates/.omp/agents/bug-debugger.md +2 -2
- package/templates/.omp/agents/code-reviewer.md +1 -1
- package/templates/.omp/agents/feature-implementer.md +2 -2
- package/templates/.omp/agents/handoff-planner.md +1 -1
- package/templates/.omp/agents/ukit-small-task-maintainer.md +4 -4
- package/templates/.omp/config.yml +10 -4
- package/templates/AGENTS.md +5 -14
- package/templates/CLAUDE.md +2 -4
- package/templates/adapter-presets/claude/settings.local.json +0 -1
- package/templates/docs/AI_HANDOFF/INDEX.md +1 -1
- package/templates/docs/AI_HANDOFF/RULES.md +2 -2
- package/templates/docs/PROJECT.md +1 -1
- package/templates/docs/UKIT_INTERNALS.md +2 -2
- package/templates/instructions/core.md +2 -4
- package/templates/instructions/layout.yaml +2 -4
- package/templates/instructions/overlays/agents.md +3 -10
- package/templates/instructions/overlays/omp-rules.md +7 -6
- package/templates/ukit/storage/config.json +7 -13
- package/templates/adapter-presets/opencode/opencode.template.json +0 -1
|
@@ -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/
|
|
11
|
+
- After install, normal work should feel natural inside **Claude/Codex/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
|
|
package/templates/.omp/README.md
CHANGED
|
@@ -26,19 +26,23 @@ whatever was there before, so local edits are never silently lost — they move,
|
|
|
26
26
|
|
|
27
27
|
## Model roles
|
|
28
28
|
|
|
29
|
-
`.omp/config.yml` defines
|
|
30
|
-
|
|
29
|
+
`.omp/config.yml` defines omp's native roles `smol` / `default` / `slow` / `vision` plus
|
|
30
|
+
back-compat aliases `lite` / `code` / `smart` that resolve to the same models. Agent frontmatter
|
|
31
|
+
references the native roles as `@smol` / `@default` / `@slow` / `@vision`, so retargeting a whole
|
|
32
|
+
tier is a one-line edit in one file — but remember the matching `lite`/`code`/`smart` alias is an
|
|
33
|
+
independent key: edit it too, or it keeps resolving to the old value.
|
|
31
34
|
|
|
32
35
|
| Role | Default model | Agents using it |
|
|
33
36
|
|------|---------------|-----------------|
|
|
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
|
+
| `smol` (alias `lite`) | `unic-lite` | `ukit-small-task-maintainer` |
|
|
38
|
+
| `default` (alias `code`) | `unic-code` | `feature-implementer`, `bug-debugger` |
|
|
39
|
+
| `slow` (alias `smart`) | `unic-smart` | `handoff-planner`, `code-reviewer` |
|
|
37
40
|
| `vision` | `unic-vision` | `ukit-vision-analyst` |
|
|
38
41
|
|
|
39
42
|
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
|
|
41
|
-
|
|
43
|
+
default. If this project does not run against UNIC, a maintainer swaps the three cost tiers
|
|
44
|
+
(`smol`/`default`/`slow` — and their `lite`/`code`/`smart` aliases) for the values in
|
|
45
|
+
`orchestration.modelTiers[*].claudeModel` in `.ukit/storage/config.json`.
|
|
42
46
|
|
|
43
47
|
`vision` is the exception and stays `unic-vision` either way: it is a *capability* lane, not a cost
|
|
44
48
|
tier. `unic-code` and `unic-smart` cannot read images on this gateway, so substituting one of them
|
package/templates/.omp/RULES.md
CHANGED
|
@@ -40,12 +40,12 @@ work really is, read the matching `SKILL.md` without being asked. Users never na
|
|
|
40
40
|
## 6. Delegate to bind a model tier
|
|
41
41
|
|
|
42
42
|
Your own model does not change mid-turn. A tier only applies when work is handed to a task-agent in
|
|
43
|
-
`.omp/agents/`, whose `model:` field (`@
|
|
43
|
+
`.omp/agents/`, whose `model:` field (`@smol` / `@default` / `@slow` / `@vision`) resolves through
|
|
44
44
|
`modelRoles` in `.omp/config.yml`.
|
|
45
45
|
|
|
46
|
-
- `tiny-fix` → `@
|
|
47
|
-
`@
|
|
48
|
-
- Images: `@vision` only. `@
|
|
46
|
+
- `tiny-fix` → `@smol` · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` →
|
|
47
|
+
`@default` · `review-release` → `@slow`
|
|
48
|
+
- Images: `@vision` only. `@default`/`@slow` cannot see images on the UNIC gateway and must never
|
|
49
49
|
guess at their contents — hand every image to `ukit-vision-analyst` first.
|
|
50
50
|
|
|
51
51
|
Doing everything inline is exactly what makes UKit look like it only has one model. Keep direct
|
|
@@ -73,5 +73,6 @@ last thing you emit is one short line naming what is unfinished and what you nee
|
|
|
73
73
|
a status — the user cannot distinguish it from a crash.
|
|
74
74
|
|
|
75
75
|
> Maintainer note, not a per-turn rule: `modelRoles` in `.omp/config.yml` ships UNIC gateway names.
|
|
76
|
-
> On a non-UNIC provider, edit only the three cost tiers — `
|
|
77
|
-
> which stays `unic-vision`
|
|
76
|
+
> On a non-UNIC provider, edit only the three cost tiers — `smol`, `default`, `slow` — never `vision`,
|
|
77
|
+
> which stays `unic-vision` (capability lane, not a cost tier). Old keys `lite`/`code`/`smart` remain
|
|
78
|
+
> as compat aliases — edit each alias alongside its tier (smol↔lite, default↔code, slow↔smart).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bug-debugger
|
|
3
3
|
description: "Debugging specialist for reproducible errors, failing tests, and unexpected behavior. Use proactively when investigation will involve noisy logs, stack traces, or a self-contained reproduce-trace-fix-verify loop. Do not use for trivial obvious fixes or broad architecture ideation."
|
|
4
|
-
model: "@
|
|
4
|
+
model: "@default"
|
|
5
5
|
tools: ["read","grep","glob","bash","edit","ast_edit"]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -49,7 +49,7 @@ Systematic debugging — understand before fixing.
|
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
STATUS: DONE | BLOCKED | PARTIAL
|
|
52
|
-
EXECUTOR_TOOL: [claude-code | kilo-code | codex |
|
|
52
|
+
EXECUTOR_TOOL: [claude-code | kilo-code | codex | other]
|
|
53
53
|
EXECUTOR_MODEL: [exact model name you are running as. "unknown" if you cannot tell.]
|
|
54
54
|
EXECUTOR_SUBAGENT: [subagent name within your host, if any, else "-"]
|
|
55
55
|
SUMMARY: [1-2 sentences — root cause and fix]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-reviewer
|
|
3
3
|
description: "Independent reviewer for handoff Phase 3, for spec/plan documents, and for non-blocking sidecar diff review of daily-flow edits. For code (default): use after executor reports STATUS: DONE on a handoff task, MUST run with a model different from the executor (configured in .ukit/storage/config.json → handoff.reviewer.model, default unic-smart), produces a verdict: APPROVED | APPROVED-WITH-MINOR | CHANGES-REQUESTED | CRITICAL. For spec/plan documents (set REVIEW_TARGET_TYPE=spec or plan): reviews a docs/plans/*.md file for completeness/consistency/clarity/scope/YAGNI, produces Status: Approved | Issues Found. For sidecar diff review (set REVIEW_TARGET_TYPE=diff): reviews the current uncommitted git diff after a local-build/shared-edit task, runs in the background and never blocks the main task, produces STATUS: clean | issues-found."
|
|
4
|
-
model: "@
|
|
4
|
+
model: "@slow"
|
|
5
5
|
tools: ["read","grep","glob","bash"]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-implementer
|
|
3
3
|
description: "Implementation specialist for clear, self-contained coding tasks. Use proactively when the approach is clear and the work can be completed in a bounded pass with a concise summary. Do not use for trivial one-file tweaks or tightly coupled exploratory work."
|
|
4
|
-
model: "@
|
|
4
|
+
model: "@default"
|
|
5
5
|
tools: ["read","edit","write","ast_edit","grep","glob","bash"]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -71,7 +71,7 @@ and even then, report it, don't ask about it.
|
|
|
71
71
|
|
|
72
72
|
```
|
|
73
73
|
STATUS: DONE | BLOCKED | PARTIAL
|
|
74
|
-
EXECUTOR_TOOL: [claude-code | kilo-code | codex |
|
|
74
|
+
EXECUTOR_TOOL: [claude-code | kilo-code | codex | other]
|
|
75
75
|
EXECUTOR_MODEL: [exact model name you are running as — e.g. unic-code, claude-sonnet-4-5, gpt-5-mini. If you truly cannot tell, write "unknown" — reviewer treats unknown as suspicious and asks the human to confirm.]
|
|
76
76
|
EXECUTOR_SUBAGENT: [name of the subagent you are, if your host has multiple — e.g. "Kilo:code", "Claude:feature-implementer". Otherwise "-".]
|
|
77
77
|
SUMMARY: [1-2 sentences of what was implemented]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff-planner
|
|
3
3
|
description: "Handoff planning specialist for Phase 1+2. Use when creating a new handoff cycle: writes PLAN.md with full test plan, splits into TASK-xxx.md files with TDD-embedded test cases, and updates INDEX.md. Always use the strongest available model (Opus/unic-smart)."
|
|
4
|
-
model: "@
|
|
4
|
+
model: "@slow"
|
|
5
5
|
tools: ["read","edit","write","ast_edit","glob","bash"]
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ukit-small-task-maintainer
|
|
3
3
|
description: "Internal UKit maintenance subagent for low-risk, reversible UKit decisions. Use proactively when UKit needs to decide or perform safe cleanup such as pruning docs/TASKS.md, classifying queued work, choosing whether compact/summarization is appropriate, summarizing local docs/status, or maintaining small UKit runtime queues. Do not use for product implementation, security, release/publish, data-loss, architecture, or risky/shared code changes."
|
|
4
|
-
model: "@
|
|
4
|
+
model: "@smol"
|
|
5
5
|
tools: ["read","grep","glob","edit","write","ast_edit"]
|
|
6
6
|
blocking: false
|
|
7
7
|
---
|
|
@@ -11,7 +11,7 @@ You are UKit's internal small-task maintainer. You run as a sidecar/parallel/non
|
|
|
11
11
|
## Model Policy
|
|
12
12
|
|
|
13
13
|
- Use the model selected by `subagents.smallTaskModel` when the host supports model selection for this subagent.
|
|
14
|
-
- Default intended model: `unic-lite`.
|
|
14
|
+
- Default intended model: `unic-lite` (frontmatter `@smol` resolves to `unic-lite` via `.omp/config.yml` modelRoles).
|
|
15
15
|
- If the host cannot bind a model from config directly, still follow this role and report that the configured model is a hint.
|
|
16
16
|
- This lane must run separately from the user's main task model. It must never replace, pause, or slow down the main task.
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ You are UKit's internal small-task maintainer. You run as a sidecar/parallel/non
|
|
|
24
24
|
- Summarizing `docs/STATUS.md`, `docs/TASKS.md`, `docs/WORKLOG.md`, or memory snippets into compact handoff notes.
|
|
25
25
|
- Deciding fast vs slow lane, safe vs risky lane, whether a skill should be activated, and whether the current prompt has enough steps planned.
|
|
26
26
|
- Choosing compact-now vs compact-later and summarize-vs-keep-detail for UKit context hygiene.
|
|
27
|
-
- Keeping agent context compact without removing existing lanes: Claude PreCompact/reinject stays active
|
|
27
|
+
- Keeping agent context compact without removing existing lanes: Claude PreCompact/reinject stays active and Codex Desktop soft handoffs use `compact.codexContext.compactTarget` (default 150 lines; preferred 120-150; hard max 170) while preserving critical state.
|
|
28
28
|
- Small, reversible UKit runtime maintenance decisions.
|
|
29
29
|
|
|
30
30
|
## Never Use For
|
|
@@ -45,7 +45,7 @@ You are UKit's internal small-task maintainer. You run as a sidecar/parallel/non
|
|
|
45
45
|
5. If safe, make the smallest cleanup/summary/classification/routing decision.
|
|
46
46
|
6. Follow the CoDev priority order: output quality first, then safety, then speed, then token discipline. Spend tokens/steps when they protect correctness.
|
|
47
47
|
7. Use small step budgets: trivial = 1 step, simple = up to 2 steps, non-trivial = up to 4 planned steps before the main model reassesses.
|
|
48
|
-
8. For long sessions, preserve existing Claude
|
|
48
|
+
8. For long sessions, preserve existing Claude auto-compact behavior; for Codex Desktop, target a compact handoff of about 120-150 lines, never above 170 lines for this lane, not a full transcript replay.
|
|
49
49
|
9. Preserve user-owned content; do not delete unclear tasks.
|
|
50
50
|
10. Report exactly what changed or what decision was made.
|
|
51
51
|
|
|
@@ -2,17 +2,23 @@
|
|
|
2
2
|
# models may change during development; orchestration must not branch on vendor names.
|
|
3
3
|
# Do NOT substitute sonnet/opus/haiku here. See PLAN.md §3 D15.
|
|
4
4
|
#
|
|
5
|
-
# Non-UNIC omp provider? A maintainer edits the three cost tiers
|
|
6
|
-
# orchestration.modelTiers[*].claudeModel (.ukit/storage/config.json) —
|
|
7
|
-
# lite: claude-haiku-4-5, code: claude-sonnet-5, smart: claude-opus-5.
|
|
5
|
+
# Non-UNIC omp provider? A maintainer edits the three cost tiers — smol, default, slow —
|
|
6
|
+
# to the values in orchestration.modelTiers[*].claudeModel (.ukit/storage/config.json) —
|
|
7
|
+
# currently lite: claude-haiku-4-5, code: claude-sonnet-5, smart: claude-opus-5.
|
|
8
8
|
# `vision` STAYS unic-vision: its claudeModel is already unic-vision, because
|
|
9
9
|
# unic-code/unic-smart cannot read images on this gateway. claude-sonnet-5 is only
|
|
10
10
|
# modelTiers.vision.fallbackModel, used when unicMode is off — never a drop-in here.
|
|
11
11
|
modelRoles:
|
|
12
|
+
smol: unic-lite
|
|
13
|
+
default: unic-code
|
|
14
|
+
slow: unic-smart
|
|
15
|
+
vision: unic-vision
|
|
16
|
+
# Back-compat aliases — INDEPENDENT keys, not references. A maintainer overriding a
|
|
17
|
+
# cost tier above must edit the matching alias too (smol↔lite, default↔code,
|
|
18
|
+
# slow↔smart), or the alias keeps resolving to the old unic-* value.
|
|
12
19
|
lite: unic-lite
|
|
13
20
|
code: unic-code
|
|
14
21
|
smart: unic-smart
|
|
15
|
-
vision: unic-vision
|
|
16
22
|
|
|
17
23
|
tools:
|
|
18
24
|
# TASK-009 / SPEC FR-003: the unattended approval surface is pinned HERE —
|
package/templates/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
## Core Rule
|
|
5
5
|
<!-- RULES: CORE-01 CORE-02 -->
|
|
6
6
|
- Human-facing UKit workflow collapses to one remembered command: `ukit install`.
|
|
7
|
-
- After install, default to natural-language work inside **Claude Code / Codex /
|
|
7
|
+
- After install, default to natural-language work inside **Claude Code / Codex / omp**.
|
|
8
8
|
- **Quality first, then speed, then token discipline.**
|
|
9
9
|
- **Never stop after read-only steps** — implement/apply/fix requests continue to Edit/Write + verification in the same turn.
|
|
10
10
|
|
|
@@ -136,29 +136,20 @@ CHỈ kích hoạt khi task đi qua `docs/AI_HANDOFF/` (user nói "execute task
|
|
|
136
136
|
| code | `unic-code` | claude-sonnet | Normal coding, local fixes, shared edits, builds, debugging, impact mapping |
|
|
137
137
|
| smart | `unic-smart` | claude-opus | Release review/audit, escalated deep reasoning after repeated failure |
|
|
138
138
|
|
|
139
|
-
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@
|
|
139
|
+
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@smol`/`@default`/`@slow`/`@vision` in `.omp/agents/*.md` via `modelRoles`) — the main session model never changes mid-turn.
|
|
140
140
|
- Contract map: `tiny-fix` → lite · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` → code · `review-release` → smart. Escalation: same file/symbol failing `debugLoopThreshold` (default 2) times routes the next attempt one tier higher, capped at `smart`.
|
|
141
141
|
- `unic-vision` is a capability lane, not a cost tier — unverified vision must never guess image contents; route images to `ukit-vision-analyst`. Harness table: `docs/UKIT_INTERNALS.md`.
|
|
142
142
|
|
|
143
|
-
##
|
|
143
|
+
## Project Owner Instructions — Codex
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
At the start of every OpenCode session, before working on the first task:
|
|
147
|
-
1. Reuse matching route hints from `.claude/ukit/skill-router-state.json`; scan `.claude/skills/` (listing only) and read a SKILL.md only when a task triggers it.
|
|
148
|
-
2. For every non-trivial task, run `/ukit-route <task summary>` for skill + context hints **before** writing code; if it names a skill, read that SKILL.md — do not skip. When `router.enabled: true` in `.ukit/storage/config.json`, prefer router output over guessing; treat it as internal continuation — continue to edit/verify, don't stop.
|
|
149
|
-
|
|
150
|
-
## Project Owner Instructions — Codex and OpenCode
|
|
151
|
-
|
|
152
|
-
When running in Codex or OpenCode, read and follow the root
|
|
145
|
+
When running in Codex, read and follow the root
|
|
153
146
|
`PROJECT_IMPORTANT.md` before doing project work. It is the canonical
|
|
154
147
|
project-owner instruction source. Do not copy its contents into this file.
|
|
155
148
|
If it is missing or unreadable, state that limitation and continue with the
|
|
156
149
|
remaining project instructions.
|
|
157
|
-
<!--
|
|
150
|
+
<!-- RULE: OWN-01 -->
|
|
158
151
|
## Skills
|
|
159
152
|
- Canonical skills live in `.claude/skills/`; adapter mirrors may exist (`.codex/skills/` → symlink). **omp** reads `.claude/skills/` via its `claude` discovery provider.
|
|
160
|
-
- **OpenCode**: reads `AGENTS.md` at session start only — it does NOT auto-load skills; the model must explicitly read the triggered SKILL.md.
|
|
161
|
-
- `ukit-*` commands in `opencode.json` are internal helper entrypoints — never ask end users to run them.
|
|
162
153
|
|
|
163
154
|
## Project Snapshot
|
|
164
155
|
- Project: {{project.name}} | Root: {{project.root}}
|
package/templates/CLAUDE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
## Core Rule
|
|
5
5
|
<!-- RULES: CORE-01 CORE-02 -->
|
|
6
6
|
- Human-facing UKit workflow collapses to one remembered command: `ukit install`.
|
|
7
|
-
- After install, default to natural-language work inside **Claude Code / Codex /
|
|
7
|
+
- After install, default to natural-language work inside **Claude Code / Codex / omp**.
|
|
8
8
|
- **Quality first, then speed, then token discipline.**
|
|
9
9
|
- **Never stop after read-only steps** — implement/apply/fix requests continue to Edit/Write + verification in the same turn.
|
|
10
10
|
|
|
@@ -136,14 +136,12 @@ CHỈ kích hoạt khi task đi qua `docs/AI_HANDOFF/` (user nói "execute task
|
|
|
136
136
|
| code | `unic-code` | claude-sonnet | Normal coding, local fixes, shared edits, builds, debugging, impact mapping |
|
|
137
137
|
| smart | `unic-smart` | claude-opus | Release review/audit, escalated deep reasoning after repeated failure |
|
|
138
138
|
|
|
139
|
-
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@
|
|
139
|
+
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@smol`/`@default`/`@slow`/`@vision` in `.omp/agents/*.md` via `modelRoles`) — the main session model never changes mid-turn.
|
|
140
140
|
- Contract map: `tiny-fix` → lite · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` → code · `review-release` → smart. Escalation: same file/symbol failing `debugLoopThreshold` (default 2) times routes the next attempt one tier higher, capped at `smart`.
|
|
141
141
|
- `unic-vision` is a capability lane, not a cost tier — unverified vision must never guess image contents; route images to `ukit-vision-analyst`. Harness table: `docs/UKIT_INTERNALS.md`.
|
|
142
142
|
|
|
143
143
|
## Skills
|
|
144
144
|
- Canonical skills live in `.claude/skills/`; adapter mirrors may exist (`.codex/skills/` → symlink). **omp** reads `.claude/skills/` via its `claude` discovery provider.
|
|
145
|
-
- **OpenCode**: reads `AGENTS.md` at session start only — it does NOT auto-load skills; the model must explicitly read the triggered SKILL.md.
|
|
146
|
-
- `ukit-*` commands in `opencode.json` are internal helper entrypoints — never ask end users to run them.
|
|
147
145
|
|
|
148
146
|
## Project Snapshot
|
|
149
147
|
- Project: {{project.name}} | Root: {{project.root}}
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"WebFetch(domain:www.steveruiz.me)",
|
|
32
32
|
"WebFetch(domain:desktopcommander.com)",
|
|
33
33
|
"WebFetch(domain:gist.github.com)",
|
|
34
|
-
"WebFetch(domain:opencodedocs.com)",
|
|
35
34
|
"WebFetch(domain:zenn.dev)",
|
|
36
35
|
"WebFetch(domain:github.com)",
|
|
37
36
|
"WebFetch(domain:gist.githubusercontent.com)",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Status values (xem RULES.md §Status state machine):
|
|
5
5
|
ready | in_progress | pending_review | changes_requested | critical_block | approved | approved_minor | blocked | done
|
|
6
6
|
|
|
7
|
-
Owner = tool đang giữ task: claude-code | kilo-code | codex |
|
|
7
|
+
Owner = tool đang giữ task: claude-code | kilo-code | codex | -
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
| ID | Title | Priority | Size | Status | Owner | Reviewer | File |
|
|
@@ -92,12 +92,12 @@ Next: <bước kế tiếp chính xác>
|
|
|
92
92
|
|
|
93
93
|
## Handoff Flow (tool-agnostic, file-based state machine)
|
|
94
94
|
|
|
95
|
-
UKit handoff hoạt động qua **file state**. Anh tự chọn tool nào cho từng phase — Claude Code / Kilo Code / Codex /
|
|
95
|
+
UKit handoff hoạt động qua **file state**. Anh tự chọn tool nào cho từng phase — Claude Code / Kilo Code / Codex / tool mới sau này — đều được. UKit chỉ care về **role của model**, không care tool.
|
|
96
96
|
|
|
97
97
|
3 phase × 3 role model:
|
|
98
98
|
|
|
99
99
|
- **Plan** — model mạnh nhất anh có (reasoning model). Có thể chạy ở bất kỳ tool nào hỗ trợ planning tốt.
|
|
100
|
-
- **Execute** — model rẻ-mà-vẫn-thông-minh (code model). Có thể là subagent code của Kilo, hay
|
|
100
|
+
- **Execute** — model rẻ-mà-vẫn-thông-minh (code model). Có thể là subagent code của Kilo, hay feature-implementer của Claude Code.
|
|
101
101
|
- **Review** — **MODEL KHÁC executor** (reasoning model thường tốt hơn). Có thể là tool khác, hoặc cùng tool nhưng subagent khác model (ví dụ Kilo có subagent code và subagent review riêng).
|
|
102
102
|
|
|
103
103
|
Hai mô hình triển khai đều hợp lệ:
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
## Delivery Profile
|
|
38
38
|
|
|
39
39
|
- Primary workflow: natural-language AI tooling installed by UKit
|
|
40
|
-
- Shared adapters: Claude Code, OpenAI Codex,
|
|
40
|
+
- Shared adapters: Claude Code, OpenAI Codex, omp (Oh My Pi)
|
|
41
41
|
- Change policy: smallest correct change with clear verification
|
|
42
42
|
|
|
43
43
|
## Session Start Routine
|
|
@@ -8,7 +8,7 @@ natural language. None of it adds commands or user-facing surface.
|
|
|
8
8
|
## Long-Run Continuity — detail
|
|
9
9
|
|
|
10
10
|
The root contract carries the LAND/DEFER/DELEGATE summary. This section mirrors what UKit
|
|
11
|
-
hooks inject at runtime on Claude Code and omp; on harnesses without hooks (Codex
|
|
11
|
+
hooks inject at runtime on Claude Code and omp; on harnesses without hooks (Codex)
|
|
12
12
|
the root contract is the only carrier — keep both in sync with
|
|
13
13
|
`.claude/hooks/context-window-guard.sh`.
|
|
14
14
|
|
|
@@ -179,7 +179,7 @@ whose own definition binds that model.
|
|
|
179
179
|
| Harness | Agent definitions | How to launch one |
|
|
180
180
|
|---------|-------------------|-------------------|
|
|
181
181
|
| Claude Code | `.claude/agents/*.md` (`model:` frontmatter) | Agent tool, `subagent_type: "<name>"` |
|
|
182
|
-
| omp | `.omp/agents/*.md` (`model: "@
|
|
182
|
+
| omp | `.omp/agents/*.md` (`model: "@smol"` / `"@default"` / `"@slow"` / `"@vision"`, resolved through `modelRoles` in `.omp/config.yml`) | task-agent `<name>` |
|
|
183
183
|
|
|
184
184
|
When a task's contract maps to a tier other than the current session model, hand it to the
|
|
185
185
|
matching agent instead of doing it inline. Doing everything inline is exactly what makes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## Core Rule
|
|
2
2
|
<!-- RULES: CORE-01 CORE-02 -->
|
|
3
3
|
- Human-facing UKit workflow collapses to one remembered command: `ukit install`.
|
|
4
|
-
- After install, default to natural-language work inside **Claude Code / Codex /
|
|
4
|
+
- After install, default to natural-language work inside **Claude Code / Codex / omp**.
|
|
5
5
|
- **Quality first, then speed, then token discipline.**
|
|
6
6
|
- **Never stop after read-only steps** — implement/apply/fix requests continue to Edit/Write + verification in the same turn.
|
|
7
7
|
|
|
@@ -133,14 +133,12 @@ CHỈ kích hoạt khi task đi qua `docs/AI_HANDOFF/` (user nói "execute task
|
|
|
133
133
|
| code | `unic-code` | claude-sonnet | Normal coding, local fixes, shared edits, builds, debugging, impact mapping |
|
|
134
134
|
| smart | `unic-smart` | claude-opus | Release review/audit, escalated deep reasoning after repeated failure |
|
|
135
135
|
|
|
136
|
-
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@
|
|
136
|
+
- A tier takes effect only when work is handed to an agent whose definition binds that model (`model:` frontmatter in `.claude/agents/*.md`; `model:` `@smol`/`@default`/`@slow`/`@vision` in `.omp/agents/*.md` via `modelRoles`) — the main session model never changes mid-turn.
|
|
137
137
|
- Contract map: `tiny-fix` → lite · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` → code · `review-release` → smart. Escalation: same file/symbol failing `debugLoopThreshold` (default 2) times routes the next attempt one tier higher, capped at `smart`.
|
|
138
138
|
- `unic-vision` is a capability lane, not a cost tier — unverified vision must never guess image contents; route images to `ukit-vision-analyst`. Harness table: `docs/UKIT_INTERNALS.md`.
|
|
139
139
|
|
|
140
140
|
## Skills
|
|
141
141
|
- Canonical skills live in `.claude/skills/`; adapter mirrors may exist (`.codex/skills/` → symlink). **omp** reads `.claude/skills/` via its `claude` discovery provider.
|
|
142
|
-
- **OpenCode**: reads `AGENTS.md` at session start only — it does NOT auto-load skills; the model must explicitly read the triggered SKILL.md.
|
|
143
|
-
- `ukit-*` commands in `opencode.json` are internal helper entrypoints — never ask end users to run them.
|
|
144
142
|
|
|
145
143
|
## Project Snapshot
|
|
146
144
|
- Project: {{project.name}} | Root: {{project.root}}
|
|
@@ -62,8 +62,7 @@ outputs:
|
|
|
62
62
|
- { from: core, heading: Adaptive Autonomy }
|
|
63
63
|
- { from: core, heading: Unattended Completion Loop }
|
|
64
64
|
- { from: core, heading: 3-Tier Model Routing }
|
|
65
|
-
- { from: 'overlay:agents', heading:
|
|
66
|
-
- { from: 'overlay:agents', heading: Project Owner Instructions — Codex and OpenCode }
|
|
65
|
+
- { from: 'overlay:agents', heading: Project Owner Instructions — Codex }
|
|
67
66
|
- { from: core, heading: Skills }
|
|
68
67
|
- { from: core, heading: Project Snapshot }
|
|
69
68
|
- { from: core, heading: Working Rules }
|
|
@@ -137,8 +136,7 @@ outputs:
|
|
|
137
136
|
- { from: core, heading: Adaptive Autonomy }
|
|
138
137
|
- { from: core, heading: Unattended Completion Loop }
|
|
139
138
|
- { from: core, heading: 3-Tier Model Routing }
|
|
140
|
-
- { from: 'overlay:agents', heading:
|
|
141
|
-
- { from: 'overlay:agents', heading: Project Owner Instructions — Codex and OpenCode }
|
|
139
|
+
- { from: 'overlay:agents', heading: Project Owner Instructions — Codex }
|
|
142
140
|
- { from: core, heading: Skills }
|
|
143
141
|
- { from: core, heading: Project Snapshot }
|
|
144
142
|
- { from: core, heading: Working Rules }
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Project Owner Instructions — Codex
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
At the start of every OpenCode session, before working on the first task:
|
|
5
|
-
1. Reuse matching route hints from `.claude/ukit/skill-router-state.json`; scan `.claude/skills/` (listing only) and read a SKILL.md only when a task triggers it.
|
|
6
|
-
2. For every non-trivial task, run `/ukit-route <task summary>` for skill + context hints **before** writing code; if it names a skill, read that SKILL.md — do not skip. When `router.enabled: true` in `.ukit/storage/config.json`, prefer router output over guessing; treat it as internal continuation — continue to edit/verify, don't stop.
|
|
7
|
-
|
|
8
|
-
## Project Owner Instructions — Codex and OpenCode
|
|
9
|
-
|
|
10
|
-
When running in Codex or OpenCode, read and follow the root
|
|
3
|
+
When running in Codex, read and follow the root
|
|
11
4
|
`PROJECT_IMPORTANT.md` before doing project work. It is the canonical
|
|
12
5
|
project-owner instruction source. Do not copy its contents into this file.
|
|
13
6
|
If it is missing or unreadable, state that limitation and continue with the
|
|
14
7
|
remaining project instructions.
|
|
15
|
-
<!--
|
|
8
|
+
<!-- RULE: OWN-01 -->
|
|
@@ -37,12 +37,12 @@ work really is, read the matching `SKILL.md` without being asked. Users never na
|
|
|
37
37
|
## 6. Delegate to bind a model tier
|
|
38
38
|
|
|
39
39
|
Your own model does not change mid-turn. A tier only applies when work is handed to a task-agent in
|
|
40
|
-
`.omp/agents/`, whose `model:` field (`@
|
|
40
|
+
`.omp/agents/`, whose `model:` field (`@smol` / `@default` / `@slow` / `@vision`) resolves through
|
|
41
41
|
`modelRoles` in `.omp/config.yml`.
|
|
42
42
|
|
|
43
|
-
- `tiny-fix` → `@
|
|
44
|
-
`@
|
|
45
|
-
- Images: `@vision` only. `@
|
|
43
|
+
- `tiny-fix` → `@smol` · `local-fix`, `local-build`, `shared-edit`, `find-cause`, `map-impact` →
|
|
44
|
+
`@default` · `review-release` → `@slow`
|
|
45
|
+
- Images: `@vision` only. `@default`/`@slow` cannot see images on the UNIC gateway and must never
|
|
46
46
|
guess at their contents — hand every image to `ukit-vision-analyst` first.
|
|
47
47
|
|
|
48
48
|
Doing everything inline is exactly what makes UKit look like it only has one model. Keep direct
|
|
@@ -70,5 +70,6 @@ last thing you emit is one short line naming what is unfinished and what you nee
|
|
|
70
70
|
a status — the user cannot distinguish it from a crash.
|
|
71
71
|
|
|
72
72
|
> Maintainer note, not a per-turn rule: `modelRoles` in `.omp/config.yml` ships UNIC gateway names.
|
|
73
|
-
> On a non-UNIC provider, edit only the three cost tiers — `
|
|
74
|
-
> which stays `unic-vision`
|
|
73
|
+
> On a non-UNIC provider, edit only the three cost tiers — `smol`, `default`, `slow` — never `vision`,
|
|
74
|
+
> which stays `unic-vision` (capability lane, not a cost tier). Old keys `lite`/`code`/`smart` remain
|
|
75
|
+
> as compat aliases — edit each alias alongside its tier (smol↔lite, default↔code, slow↔smart).
|
|
@@ -53,11 +53,6 @@
|
|
|
53
53
|
"mode": "precompact-reinject",
|
|
54
54
|
"preserveExistingHooks": true
|
|
55
55
|
},
|
|
56
|
-
"opencode": {
|
|
57
|
-
"autoCompact": true,
|
|
58
|
-
"mode": "native-auto-prune",
|
|
59
|
-
"preserveExistingCompaction": true
|
|
60
|
-
},
|
|
61
56
|
"omp": {
|
|
62
57
|
"autoCompact": true,
|
|
63
58
|
"mode": "precompact-reinject",
|
|
@@ -147,19 +142,23 @@
|
|
|
147
142
|
"modelTiers": {
|
|
148
143
|
"lite": {
|
|
149
144
|
"claudeModel": "claude-haiku-4-5",
|
|
150
|
-
"genericModel": "unic-lite"
|
|
145
|
+
"genericModel": "unic-lite",
|
|
146
|
+
"ompRole": "smol"
|
|
151
147
|
},
|
|
152
148
|
"code": {
|
|
153
149
|
"claudeModel": "claude-sonnet-5",
|
|
154
|
-
"genericModel": "unic-code"
|
|
150
|
+
"genericModel": "unic-code",
|
|
151
|
+
"ompRole": "default"
|
|
155
152
|
},
|
|
156
153
|
"smart": {
|
|
157
154
|
"claudeModel": "claude-opus-5",
|
|
158
|
-
"genericModel": "unic-smart"
|
|
155
|
+
"genericModel": "unic-smart",
|
|
156
|
+
"ompRole": "slow"
|
|
159
157
|
},
|
|
160
158
|
"vision": {
|
|
161
159
|
"claudeModel": "unic-vision",
|
|
162
160
|
"genericModel": "unic-vision",
|
|
161
|
+
"ompRole": "vision",
|
|
163
162
|
"fallbackModel": "claude-sonnet-5",
|
|
164
163
|
"capabilityTier": true,
|
|
165
164
|
"note": "Capability tier, not a cost tier. Orthogonal to lite/code/smart — never insert into escalation.tierOrder. fallbackModel is used when unicMode is off."
|
|
@@ -506,11 +505,6 @@
|
|
|
506
505
|
"mode": "precompact-reinject nghĩa là Claude được bơm context quan trọng trước/sau compact.",
|
|
507
506
|
"preserveExistingHooks": "Nên giữ true để không gỡ PreCompact/reinject của Claude."
|
|
508
507
|
},
|
|
509
|
-
"opencode": {
|
|
510
|
-
"autoCompact": "Giữ compact lane của OpenCode bật.",
|
|
511
|
-
"mode": "native-auto-prune nghĩa là OpenCode dùng compaction.auto/prune native.",
|
|
512
|
-
"preserveExistingCompaction": "Nên giữ true để không gỡ compact native của OpenCode."
|
|
513
|
-
},
|
|
514
508
|
"omp": {
|
|
515
509
|
"autoCompact": "Giữ compact lane của omp (Oh My Pi) bật.",
|
|
516
510
|
"mode": "precompact-reinject nghĩa là UKit dùng hook session.compacting/session_before_compact của omp để bơm lại context quan trọng trước khi compact.",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"$schema":"https://opencode.ai/config.json","default_agent":"build","share":"disabled","compaction":{"auto":true,"prune":true,"reserved":10000},"watcher":{"ignore":[".git/**","node_modules/**",".cache/**",".ukit/**",".claude/ukit/permission-usage.json",".claude/ukit/permission-audit.log"]},"permission":{"doom_loop":"deny"},"command":{"ukit-route":{"description":"Internal shared UKit route. Run at the start of every non-trivial task to get skill and context hints before writing code.","agent":"build","template":"Run `node .claude/ukit/index/route-task.mjs \"<task>\" --adapter opencode`; reuse `.claude/ukit/skill-router-state.json`."},"ukit-context":{"description":"Internal UKit context.","agent":"build","template":"Run `node .claude/ukit/index/resolve-context.mjs \"<intent>\" [--target <file>]`."},"ukit-verify":{"description":"Internal UKit verify lane.","agent":"build","template":"Run `node .claude/ukit/index/verify-context.mjs \"<intent>\" [--target <file>]`."},"ukit-triage":{"description":"Internal UKit triage.","agent":"build","template":"Run `node .claude/ukit/index/triage.mjs \"<error>\"`."},"ukit-query":{"description":"Internal UKit query.","agent":"build","template":"Run `node .claude/ukit/index/query-index.mjs \"<error|symbol|path>\"`."},"ukit-index":{"description":"Internal UKit index.","agent":"build","template":"Run `node .claude/ukit/index/refresh-index.mjs` (fallback: `node .claude/ukit/index/build-index.mjs`)."},"ukit-handoff-status":{"description":"Handoff dashboard — show current cycle status (read-only).","agent":"build","template":"Read `docs/AI_HANDOFF/INDEX.md`, `docs/AI_HANDOFF/ACTIVE.md`, and `docs/AI_HANDOFF/PLAN.md`. Report: active cycle name, task table with status, any blockers. No writes."},"ukit-handoff-create":{"description":"Create a new handoff cycle — Phase 1+2: write PLAN.md + TASK-xxx.md files.","agent":"build","template":"Read `.claude/commands/ukit/create-handoff.md` for full instructions, then execute. Description: <what to build>"},"ukit-handoff-implement":{"description":"Execute handoff tasks — Phase 3: implement the next Ready task.","agent":"build","template":"Read `.claude/commands/ukit/implement-handoff.md` for full instructions, then execute. Task ID (optional): <TASK-xxx>"},"ukit-handoff-review":{"description":"Review handoff results — Phase 4: verify implementation and give verdict.","agent":"build","template":"Read `.claude/commands/ukit/review-handoff.md` for full instructions, then execute. Task ID (optional): <TASK-xxx>"},"ukit-handoff-clear":{"description":"Archive and reset the current handoff cycle.","agent":"build","template":"Read `.claude/commands/ukit/clear-handoff.md` for full instructions, then execute."}},"agent":{"build":{"description":"UKit build agent. Follow AGENTS.md. For every non-trivial task: run /ukit-route first, use index-first loop, activate matching skill, never claim done after read-only steps. Keep internal ukit-* helpers hidden; users only need ukit install.","permission":{"edit":"allow","task":"allow","skill":"allow","bash":{"*":"ask","pwd":"allow","ls":"allow","ls *":"allow","find *":"allow","rg *":"allow","grep *":"allow","cat *":"allow","sed *":"allow","head *":"allow","tail *":"allow","wc *":"allow","echo *":"allow","printf *":"allow","awk *":"allow","tr *":"allow","cut *":"allow","sort *":"allow","uniq *":"allow","diff *":"allow","jq *":"allow","stat *":"allow","file *":"allow","which *":"allow","date *":"allow","basename *":"allow","dirname *":"allow","realpath *":"allow","xargs *":"allow","mkdir *":"allow","touch *":"allow","cp *":"allow","vitest *":"allow","jest *":"allow","git status":"allow","git status *":"allow","git diff":"allow","git diff *":"allow","git log":"allow","git log *":"allow","git show *":"allow","git grep *":"allow","git rev-parse *":"allow","git branch *":"allow","git stash list":"allow","git ls-files *":"allow","git tag *":"allow","git add *":"allow","git checkout *":"allow","git switch *":"allow","git restore *":"allow","git mv *":"allow","mv *":"allow","node *":"allow","node .claude/ukit/index/*":"allow","node .claude/ukit/runtime/*":"allow","npx *":"allow","npm test":"allow","npm test *":"allow","{{runtime.packageManager}} test":"allow","{{runtime.packageManager}} test *":"allow","{{runtime.packageManager}} lint":"allow","{{runtime.packageManager}} lint *":"allow","{{runtime.packageManager}} typecheck":"allow","{{runtime.packageManager}} typecheck *":"allow","{{runtime.packageManager}} build":"allow","{{runtime.packageManager}} build *":"allow","npm run test":"allow","npm run test *":"allow","npm run lint":"allow","npm run lint *":"allow","npm run typecheck":"allow","npm run typecheck *":"allow","npm run build":"allow","npm run build *":"allow","pnpm test":"allow","pnpm test *":"allow","pnpm lint":"allow","pnpm lint *":"allow","pnpm typecheck":"allow","pnpm typecheck *":"allow","pnpm build":"allow","pnpm build *":"allow","pnpm run test":"allow","pnpm run test *":"allow","pnpm run lint":"allow","pnpm run lint *":"allow","pnpm run typecheck":"allow","pnpm run typecheck *":"allow","pnpm run build":"allow","pnpm run build *":"allow","bun test":"allow","bun test *":"allow","bun run test":"allow","bun run test *":"allow","bun run lint":"allow","bun run lint *":"allow","bun run typecheck":"allow","bun run typecheck *":"allow","bun run build":"allow","bun run build *":"allow","git commit":"allow","git commit *":"allow","git push":"allow","git push *":"allow","git clean":"deny","git clean *":"deny","git reset":"deny","git reset *":"deny","rm *":"deny"}}},"plan":{"permission":{"edit":"ask","bash":"ask"}}}}
|