@ngockhoale/ukit 1.1.8 → 1.2.1

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.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: ukit-small-task-maintainer
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: inherit
5
+ color: cyan
6
+ tools: ["Read", "Grep", "Glob", "Edit", "Write"]
7
+ ---
8
+
9
+ You are UKit's internal small-task maintainer. You run as a sidecar/parallel/non-blocking lane for safe, reversible UKit orchestration chores so the end user can stay focused on product work and only remember `ukit install`. You must follow `docs/UKIT_CODEV_PRINCIPLES.md`: hide complexity, preserve output quality, and never trade correctness for speed or token savings.
10
+
11
+ ## Model Policy
12
+
13
+ - Use the model selected by `UKIT_SMALL_TASK_MODEL` when the host supports model selection for this subagent.
14
+ - Default intended model: `unic-lite`.
15
+ - If the host cannot bind a model from env directly, still follow this role and report that the configured model is a hint.
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
+
18
+ ## Use For
19
+
20
+ - Cleaning and deduplicating `docs/TASKS.md`.
21
+ - Pruning stale local AI queue/status noise.
22
+ - Classifying queued items by readiness/risk.
23
+ - Deciding whether compacting or summarizing context/docs is appropriate.
24
+ - Summarizing `docs/STATUS.md`, `docs/TASKS.md`, `docs/WORKLOG.md`, or memory snippets into compact handoff notes.
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
+ - 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, OpenCode native auto/prune compaction stays active, and Codex Desktop soft handoffs use `UKIT_CODEX_COMPACT_TARGET` (default 150 lines; preferred 120-150; hard max 170) while preserving critical state.
28
+ - Small, reversible UKit runtime maintenance decisions.
29
+
30
+ ## Never Use For
31
+
32
+ - Security/auth/permission/secrets work.
33
+ - Release, tag, publish, package ownership, or irreversible registry decisions.
34
+ - Data deletion beyond clearly safe local queue/doc cleanup.
35
+ - Architecture decisions, roadmap trade-offs, or deep product reasoning.
36
+ - Product code changes or risky/shared implementation edits.
37
+ - Any action where the consequence is not easy to inspect and undo.
38
+
39
+ ## Workflow
40
+
41
+ 1. Read the smallest relevant local state file first.
42
+ 2. Identify whether the requested action is safe and reversible.
43
+ 3. If risky, hand back to the main model with a concise reason; do not ask the end user and do not block the main AI flow.
44
+ 4. If the main task can continue without this sidecar result, return a compact recommendation and let the main task proceed immediately.
45
+ 5. If safe, make the smallest cleanup/summary/classification/routing decision.
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
+ 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/OpenCode 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
+ 9. Preserve user-owned content; do not delete unclear tasks.
50
+ 10. Report exactly what changed or what decision was made.
51
+
52
+ ## Output Format
53
+
54
+ ```
55
+ STATUS: DONE | SKIPPED | HAND_BACK
56
+ MODEL_HINT: UKIT_SMALL_TASK_MODEL=<value-or-default>
57
+ SUMMARY: [one sentence]
58
+ CHANGES:
59
+ - [file/area]: [what changed]
60
+ HAND_BACK_REASON: [only if HAND_BACK]
61
+ NEXT: [small follow-up or "none"]
62
+ ```
63
+
64
+ ## Guardrails
65
+
66
+ - Keep UKit invisible: never ask end users to remember this agent, model name, or config path.
67
+ - Never block AI decision-making; escalate to the main model instead of waiting for user input when risk exceeds this lane.
68
+ - Never block, replace, or slow the user's main task; this lane is a sidecar hint/maintenance worker only.
69
+ - Prefer no-op over destructive cleanup when uncertain.
70
+ - Do not invent product requirements.
71
+ - Never choose cheap/fast if it risks wrong context, weak verification, over-compaction, or lower answer quality.
72
+ - Do not widen reads beyond local UKit state unless the main model explicitly scoped the handoff.
@@ -61,7 +61,7 @@ Docs should **not** become:
61
61
 
62
62
  - update README / docs after code changes
63
63
  - fix source-vs-doc drift
64
- - improve `docs/PROJECT.md`, `docs/MEMORY.md`, `docs/STATUS.md`, `docs/WORKLOG.md`, `docs/CODE_MAP.md`
64
+ - improve `docs/PROJECT.md`, `docs/MEMORY.md`, `docs/STATUS.md`, `docs/TASKS.md`, `docs/WORKLOG.md`, `docs/CODE_MAP.md`
65
65
  - prepare durable handoff notes
66
66
  - tighten or remove stale setup instructions
67
67
  - document newly discovered module boundaries, dangerous areas, or bug patterns
@@ -105,6 +105,20 @@ Use for compact current state:
105
105
 
106
106
  Do **not** treat it as source truth or duplicate full session history here.
107
107
 
108
+ #### `docs/TASKS.md`
109
+ Use for:
110
+ - local AI task queue items the human or an AI may hand to another AI/agent later
111
+ - `Inbox` ideas that still need acceptance/verification details
112
+ - `Ready for AI` tasks that are specific enough to implement without scanning the whole repo
113
+
114
+ Default cleanup when reading/updating it:
115
+ - remove exact duplicates
116
+ - prune `Done Recently` to 10 compact lines
117
+ - move stale/vague/blocked tasks to `Deferred / Needs Human Review`
118
+ - only delete unfinished human-authored tasks when explicitly asked and clearly obsolete/duplicated
119
+
120
+ Do **not** treat it as a roadmap, project history, or source truth. It is local working state.
121
+
108
122
  #### `docs/WORKLOG.md`
109
123
  Use for session-level execution history:
110
124
  - what changed
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: next-step
3
- description: Use when the user asks what to do next, asks for project status, says continue/làm tiếp without a concrete target, or needs a lightweight session-start orientation from docs/STATUS.md. Do not use as the primary skill for concrete debug, implementation, review, or docs tasks.
3
+ description: Use when the user asks what to do next, asks for project status, says continue/làm tiếp without a concrete target, or needs a lightweight session-start orientation from docs/STATUS.md and optional docs/TASKS.md. Do not use as the primary skill for concrete debug, implementation, review, or docs tasks.
4
4
  ---
5
5
 
6
6
  # Next Step
@@ -21,8 +21,10 @@ It is **not** a replacement for concrete workflows. If the user names a bug, fea
21
21
  - End users should not need to know this skill name.
22
22
  - Do not ask users to run a `next-step` command. The human workflow remains `ukit install` + natural language.
23
23
  - `docs/STATUS.md` is orientation, not truth. Source code, tests, and the UKit index win.
24
+ - `docs/TASKS.md` is a local AI task queue, not a roadmap and not source truth.
24
25
  - Concrete task beats open-ended wording. Example: "I'm fixing login bug but unsure next step" is a debug approach question, not a global roadmap request.
25
26
  - Do not scan the whole repo unless `docs/STATUS.md` is missing/stale and the user still wants project-level direction.
27
+ - When reading `docs/TASKS.md`, perform only safe cleanup by default: remove exact duplicates, prune `Done Recently` to 10 lines, and move stale/vague items to `Deferred / Needs Human Review`; do not delete unfinished human-authored tasks unless explicitly asked and clearly obsolete/duplicated.
26
28
 
27
29
  ## Freshness Check
28
30
 
@@ -43,9 +45,10 @@ If stale or missing, downgrade confidence and verify with the smallest current t
43
45
 
44
46
  Read only what is needed:
45
47
  1. `docs/STATUS.md` (or existing root `STATUS.md` fallback)
46
- 2. `docs/CODE_MAP.md` only when navigation is needed
47
- 3. `docs/MEMORY.md` only when constraints/decisions affect the suggestion
48
- 4. routed index/tree summary only if status is stale, missing, or contradicted
48
+ 2. `docs/TASKS.md` only for queued-task prompts, “continue” with no active status, or when status points at queued work
49
+ 3. `docs/CODE_MAP.md` only when navigation is needed
50
+ 4. `docs/MEMORY.md` only when constraints/decisions affect the suggestion
51
+ 5. routed index/tree summary only if status/tasks are stale, missing, or contradicted
49
52
 
50
53
  ## Output Shape
51
54
 
@@ -60,6 +63,10 @@ Suggested next steps:
60
63
  1. Candidate — why now — likely files — verification — risk
61
64
  2. Candidate — why now — likely files — verification — risk
62
65
 
66
+ Queued tasks (if `docs/TASKS.md` was used):
67
+ - Ready: task title — acceptance — verification
68
+ - Deferred/blocked: compact note only if relevant
69
+
63
70
  Recommended: ...
64
71
  Why: ...
65
72
  First check: ...
@@ -68,7 +75,8 @@ First check: ...
68
75
  ## Intent Handling
69
76
 
70
77
  - `open-ended-status`: read status and suggest 1-3 candidates.
71
- - `continue-existing-work`: prefer Active Work / Current Debug Threads, then Next Candidates.
78
+ - `queued-task-selection`: read `docs/TASKS.md`, prefer `Ready for AI`, and suggest the best next task with acceptance/verification.
79
+ - `continue-existing-work`: prefer Active Work / Current Debug Threads, then `Ready for AI`, then Next Candidates.
72
80
  - `scoped-advice`: do not produce a global roadmap; hand off to the concrete skill and suggest the immediate approach only.
73
81
  - `debug-specific`, `implement-specific`, `review-specific`: do not use this skill as primary.
74
82
 
@@ -22,7 +22,8 @@ Do **not** run for trivial typo-only edits, pure Q&A, or exploration with no dur
22
22
  - End users should not need to know this skill name.
23
23
  - Do not ask users to run a `update-status` command. The human workflow remains `ukit install` + natural language.
24
24
  - Keep `docs/STATUS.md` compact. It is not `docs/WORKLOG.md` and not a raw session transcript.
25
- - Source code and tests are truth. If status conflicts with source, update status to match source or mark uncertainty.
25
+ - Keep `docs/TASKS.md` compact when the completed/active work is related to queued tasks; this queue is local working state and should stay gitignored.
26
+ - Source code and tests are truth. If status/tasks conflict with source, update the docs to match source or mark uncertainty.
26
27
  - Do not invent verification. Record only commands actually run and their outcome.
27
28
  - Preserve user edits and rewrite the smallest relevant section.
28
29
 
@@ -35,6 +36,7 @@ Before editing, ask internally:
35
36
  3. Was a root cause, decision, blocker, or next action confirmed?
36
37
  4. What verification ran?
37
38
  5. Will future sessions be faster if this is recorded?
39
+ 6. Did any `docs/TASKS.md` queued task become done, duplicate, stale, or blocked?
38
40
 
39
41
  If all answers are no, skip the update and mention that no status change was needed.
40
42
 
@@ -85,4 +87,16 @@ Avoid:
85
87
 
86
88
  ## Future Context Note
87
89
 
88
- Do not create task-scoped `CONTEXT.md` as part of v1.1.8 unless the project already has that convention. If detailed bug/feature context is needed, note it as a v1.2 candidate or link to an existing `docs/context/<slug>.md` file.
90
+ Do not create task-scoped `CONTEXT.md` by default unless the project already has that convention. If detailed bug/feature context is needed, note it as a v1.2 candidate or link to an existing `docs/context/<slug>.md` file.
91
+
92
+ ## TASKS.md Cleanup
93
+
94
+ When the session touched queued work or the user asks to clean/dọn tasks:
95
+
96
+ - Read `docs/TASKS.md` if it exists; do not create noisy task entries just to summarize the session.
97
+ - Auto-remove exact duplicate tasks.
98
+ - Auto-prune `Done Recently` to max 10 compact lines.
99
+ - Remove a task from active sections only after all are true: it is done, verification is recorded, and completion is summarized in `docs/WORKLOG.md` or `Done Recently`.
100
+ - Move stale, vague, or blocked tasks to `Deferred / Needs Human Review` instead of deleting uncertain human intent.
101
+ - Do not delete non-completed human-authored tasks unless the user explicitly asked for cleanup and the task is clearly obsolete or duplicated.
102
+ - Report the cleanup in one compact line: removed duplicates, moved deferred, pruned done, or no safe cleanup.
@@ -0,0 +1,17 @@
1
+ # UKit optional local runtime overrides.
2
+ # Copy to .claude/ukit/.env only if you need machine-local overrides.
3
+ # This is internal orchestration config; normal teammates still only need `ukit install`.
4
+
5
+ # Lightweight model for the internal UKit small-task maintainer subagent.
6
+ # Used for safe UKit decisions such as task cleanup, compact decisions,
7
+ # doc summarization, classification, auto-triage, and queue maintenance.
8
+ # It follows UKit CoDev principles: quality > speed > token savings.
9
+ # Risky/shared/security/release/data-loss/architecture work must keep the main model.
10
+ UKIT_SMALL_TASK_MODEL=unic-lite
11
+
12
+ # Codex Desktop soft auto-compact handoff budget.
13
+ # Target is compact handoff length (lines), not full app context tokens.
14
+ # 120-150 is preferred; 170 lines is the hard max for this lane.
15
+ UKIT_CODEX_AUTO_COMPACT=true
16
+ UKIT_CODEX_CONTEXT_BUDGET=60000
17
+ UKIT_CODEX_COMPACT_TARGET=150
@@ -223,8 +223,8 @@ export const ROUTE_CATALOG = [
223
223
  path: '.claude/skills/docs-quality/SKILL.md',
224
224
  order: 12,
225
225
  signals: [
226
- { type: 'prompt', regex: /\b(docs|documentation|readme|changelog|handoff|worklog|memory|code map|status\.md)\b/i, score: 4 },
227
- { type: 'file', regex: /\bdocs\/|readme\.md$|project\.md$|memory\.md$|status\.md$|worklog\.md$|code_map\.md$/i, score: 4 },
226
+ { type: 'prompt', regex: /\b(docs|documentation|readme|changelog|handoff|worklog|memory|code map|status\.md|tasks\.md|task queue|clean tasks|cleanup tasks|dọn tasks|dọn task)\b/i, score: 4 },
227
+ { type: 'file', regex: /\bdocs\/|readme\.md$|project\.md$|memory\.md$|status\.md$|tasks\.md$|worklog\.md$|code_map\.md$/i, score: 4 },
228
228
  ],
229
229
  },
230
230
  {
@@ -233,8 +233,8 @@ export const ROUTE_CATALOG = [
233
233
  order: 12.1,
234
234
  contextMode: 'standalone',
235
235
  signals: [
236
- { type: 'prompt', regex: /\b(what(?:'s| is)? next|next steps?|project status|current status|where are we|continue(?: from)?(?: last session)?|roadmap|status\.md)\b/i, score: 7 },
237
- { type: 'prompt', regex: /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project)\b/i, score: 7 },
236
+ { type: 'prompt', regex: /\b(what(?:'s| is)? next|next steps?|project status|current status|where are we|continue(?: from)?(?: last session)?|roadmap|status\.md|task queue|tasks\.md|next queued task|pick next task|work from tasks)\b/i, score: 7 },
237
+ { type: 'prompt', regex: /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project|task tiếp theo|việc tiếp theo trong tasks)\b/i, score: 7 },
238
238
  ],
239
239
  },
240
240
  {
@@ -745,10 +745,11 @@ function getSignalTexts(signalType, routeSignals = {}) {
745
745
  function deriveIntentMode({ promptText = '', commandText = '', targetFile = null } = {}) {
746
746
  const lower = buildNormalizedRouteSignalText(promptText, commandText);
747
747
  const raw = `${promptText ?? ''}\n${commandText ?? ''}`.toLowerCase();
748
- const docsSpecific = hasDocsSpecificTaskSignal(lower, raw, targetFile);
748
+ const taskQueueNext = hasTaskQueueNextSignal(lower, raw);
749
+ const docsSpecific = hasDocsSpecificTaskSignal(lower, raw, targetFile, { taskQueueNext });
749
750
  const statusUpdate = hasStatusUpdateSignal(lower, raw);
750
- const openEndedStatus = hasOpenEndedStatusSignal(lower, raw);
751
- const concreteTask = hasConcreteTaskSignal(lower, raw, targetFile);
751
+ const openEndedStatus = hasOpenEndedStatusSignal(lower, raw) || taskQueueNext;
752
+ const concreteTask = hasConcreteTaskSignal(lower, raw, targetFile, { taskQueueNext });
752
753
 
753
754
  if (docsSpecific) {
754
755
  return 'docs-specific';
@@ -790,13 +791,18 @@ function hasStatusUpdateSignal(lower, raw) {
790
791
  }
791
792
 
792
793
  function hasOpenEndedStatusSignal(lower, raw) {
793
- return /\b(what next|what is next|what's next|next step|next steps|project status|current status|where are we|continue|continue from last session|roadmap|status\.md)\b/.test(lower)
794
- || /\b(lam gi tiep|buoc tiep theo|tiep theo lam gi|lam tiep|dang o dau|trang thai project|tinh trang project)\b/.test(lower)
795
- || /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project)\b/.test(raw);
794
+ return /\b(what next|what is next|what's next|next step|next steps|project status|current status|where are we|continue|continue from last session|roadmap|status\.md|task queue|tasks\.md|next queued task|pick next task|work from tasks)\b/.test(lower)
795
+ || /\b(lam gi tiep|buoc tiep theo|tiep theo lam gi|lam tiep|dang o dau|trang thai project|tinh trang project|task tiep theo|viec tiep theo trong tasks)\b/.test(lower)
796
+ || /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project|task tiếp theo|việc tiếp theo trong tasks)\b/.test(raw);
796
797
  }
797
798
 
798
- function hasConcreteTaskSignal(lower, raw, targetFile) {
799
- if (targetFile && !isStatusFileTarget(targetFile)) {
799
+ function hasTaskQueueNextSignal(lower, raw) {
800
+ return /\b(task queue|tasks\.md|next queued task|pick next task|work from tasks|next task from tasks|ready for ai)\b/.test(lower)
801
+ || /\b(task tiếp theo|việc tiếp theo trong tasks|làm task trong tasks|lấy task tiếp theo)\b/.test(raw);
802
+ }
803
+
804
+ function hasConcreteTaskSignal(lower, raw, targetFile, { taskQueueNext = false } = {}) {
805
+ if (targetFile && !isStatusFileTarget(targetFile) && !(taskQueueNext && isTasksFileTarget(targetFile))) {
800
806
  return true;
801
807
  }
802
808
 
@@ -804,8 +810,13 @@ function hasConcreteTaskSignal(lower, raw, targetFile) {
804
810
  || /\b(sửa|fix|lỗi|bug|debug|implement|cài|thêm|review|kiểm tra|soát|đăng nhập)\b/.test(raw);
805
811
  }
806
812
 
807
- function hasDocsSpecificTaskSignal(lower, raw, targetFile) {
813
+ function hasDocsSpecificTaskSignal(lower, raw, targetFile, { taskQueueNext = false } = {}) {
808
814
  if (!targetFile || !isDocsTarget(targetFile)) {
815
+ return /\b(clean tasks|cleanup tasks|prune tasks|dedupe tasks|clear completed tasks|dọn tasks|dọn task)\b/.test(lower)
816
+ || /\b(dọn tasks|dọn task|dọn danh sách task|xóa task đã xong)\b/.test(raw);
817
+ }
818
+
819
+ if (taskQueueNext && isTasksFileTarget(targetFile) && !/\b(clean|cleanup|prune|dedupe|edit|template|wording|format|structure)\b/.test(lower)) {
809
820
  return false;
810
821
  }
811
822
 
@@ -847,6 +858,10 @@ function isStatusFileTarget(targetFile) {
847
858
  return /(?:^|\/)docs\/STATUS\.md$|(?:^|\/)STATUS\.md$/i.test(String(targetFile || ''));
848
859
  }
849
860
 
861
+ function isTasksFileTarget(targetFile) {
862
+ return /(?:^|\/)docs\/TASKS\.md$|(?:^|\/)TASKS\.md$/i.test(String(targetFile || ''));
863
+ }
864
+
850
865
  function isDocsTarget(targetFile) {
851
866
  const normalized = String(targetFile || '').replaceAll('\\', '/');
852
867
  return /(?:^|\/)docs\/.+\.md$|(?:^|\/)(?:README|CHANGELOG|AGENTS|CLAUDE|STATUS)\.md$/i.test(normalized);
@@ -1100,6 +1115,16 @@ function deriveDelegationRecommendation({
1100
1115
  const hasRelatedTests = (preview.relatedTests ?? []).length > 0;
1101
1116
  const when = contextRecommendation?.command ? 'after-context' : 'now';
1102
1117
 
1118
+ const smallTaskMaintenanceSignal = /\b(?:ukit|docs\/tasks\.md|tasks\.md|task queue|queued tasks?|compact(?:ion)?|summari[sz](?:e|ation)|doc(?:ument)? summary|cleanup|clean up|dọn rác|dọn dẹp|auto[- ]?triage|queue maintenance|small decision|ra quyết định)\b/.test(lower)
1119
+ && /\b(?:task|queue|compact(?:ion)?|summari[sz](?:e|ation)|doc(?:ument)?s?|cleanup|clean up|dọn rác|dọn dẹp|classif(?:y|ication)|triage|maintenance|small decision|ra quyết định)\b/.test(lower);
1120
+ if (smallTaskMaintenanceSignal) {
1121
+ return {
1122
+ hint: 'ukit-small-task-maintainer',
1123
+ when,
1124
+ reason: 'Low-risk UKit maintenance decisions should use the configured small-task model without blocking the main AI flow.',
1125
+ };
1126
+ }
1127
+
1103
1128
  if (routingContext.taskType === 'trivial') {
1104
1129
  return null;
1105
1130
  }
@@ -1189,6 +1214,7 @@ function buildRouteSummary({
1189
1214
  formatCompactSegment('targets', primaryTargets),
1190
1215
  formatCompactSegment('tests', relatedTests),
1191
1216
  formatCompactSegment('styles', styleFiles),
1217
+ delegationRecommendation?.hint ? `delegate=${delegationRecommendation.hint}` : null,
1192
1218
  policyMode ? `policy=${policyMode}` : null,
1193
1219
  ].filter(Boolean).join(' | ');
1194
1220
 
@@ -12,7 +12,7 @@ Auto-generated by UKit for OpenAI Codex.
12
12
  - Do not make end users memorize skill names, helper scripts, or routing internals unless they are debugging UKit itself.
13
13
  - **Treat helper commands as internal orchestration. Do not ask end users to run them.**
14
14
 
15
- ## UKit v1.1.8 Shared Runtime
15
+ ## UKit v1.2.1 Shared Runtime
16
16
 
17
17
  - Shared runtime state lives in `.ukit/storage/`.
18
18
  - Treat `.ukit/storage/config.json` as the source of compact, token-pipeline, router, memory, and validation toggles.
@@ -23,6 +23,7 @@ Auto-generated by UKit for OpenAI Codex.
23
23
  - Maintainers can inspect runtime state with `ukit status` and `ukit memory export`.
24
24
  - Reuse compact `previous-context` / `recent-output` route snapshots before replaying raw history.
25
25
  - Threshold-based compact pressure is internal orchestration; Codex users should not need to manage it manually.
26
+ - UKit keeps Claude PreCompact/reinject and OpenCode native auto/prune compaction intact. For Codex Desktop long sessions, UKit can use `UKIT_SMALL_TASK_MODEL` through `ukit-small-task-maintainer` to decide soft auto-compact handoffs. Default `UKIT_CODEX_COMPACT_TARGET=150` means about 150 compact handoff lines (120-150 preferred, hard max 170), not 150 app-context tokens.
26
27
 
27
28
  ## Speed / Reading Contract
28
29
 
@@ -30,6 +31,7 @@ Auto-generated by UKit for OpenAI Codex.
30
31
  - **Simple**: `docs/MEMORY.md` only.
31
32
  - **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
32
33
  - `docs/STATUS.md`: read for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
34
+ - `docs/TASKS.md`: read only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
33
35
  - Read `docs/WORKLOG.md` only when recent continuation/debug context matters.
34
36
  - Source is truth; if docs are stale, update docs and continue.
35
37
 
@@ -53,7 +55,7 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
53
55
  - Match from prompt wording plus tool/file evidence.
54
56
  - Use the smallest useful set, usually 1-2 skills.
55
57
  - If docs work is detected, prefer `.codex/skills/docs-quality/SKILL.md`.
56
- - For open-ended “what next?” / “continue” / project-status prompts, prefer `.codex/skills/next-step/SKILL.md` and show a status freshness cue.
58
+ - For open-ended “what next?” / “continue” / project-status / queued-task prompts, prefer `.codex/skills/next-step/SKILL.md` and show a status freshness cue when status is used.
57
59
  - For explicit handoff/wrap-up/status updates, prefer `.codex/skills/update-status/SKILL.md`.
58
60
  - Concrete debug/implementation/review prompts beat open-ended wording; do not let `next-step` replace the concrete workflow.
59
61
  - If routing is complex or ambiguous, prefer `node .codex/ukit/index/route-task.mjs "<prompt>" [--tool-command <cmd>] [--target <file>]`.
@@ -73,6 +75,7 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
73
75
 
74
76
  After significant work, update only what changed:
75
77
  - `docs/STATUS.md` — compact current state, blockers, verification, next candidates
78
+ - `docs/TASKS.md` — local AI task queue; remove duplicates/prune completed overflow safely, never delete unfinished human intent by default
76
79
  - `docs/WORKLOG.md`
77
80
  - `docs/MEMORY.md`
78
81
  - `docs/CODE_MAP.md`
@@ -33,9 +33,18 @@
33
33
  "maxAnalogFiles": 3,
34
34
  "maxSharedAbstractions": 2,
35
35
  "contextBudgetByTier": {
36
- "trivial": { "minFiles": 1, "maxFiles": 2 },
37
- "simple": { "minFiles": 2, "maxFiles": 5 },
38
- "non-trivial": { "minFiles": 4, "maxFiles": 8 }
36
+ "trivial": {
37
+ "minFiles": 1,
38
+ "maxFiles": 2
39
+ },
40
+ "simple": {
41
+ "minFiles": 2,
42
+ "maxFiles": 5
43
+ },
44
+ "non-trivial": {
45
+ "minFiles": 4,
46
+ "maxFiles": 8
47
+ }
39
48
  }
40
49
  },
41
50
  "skillRouter": {
@@ -137,6 +146,119 @@
137
146
  "askBeforeBroadVerificationWithoutRelatedTests": true,
138
147
  "preferCommandOrderFromVerificationPlan": true
139
148
  }
149
+ },
150
+ "smallTaskModel": {
151
+ "env": "UKIT_SMALL_TASK_MODEL",
152
+ "default": "unic-lite",
153
+ "agent": "ukit-small-task-maintainer",
154
+ "useFor": [
155
+ "task-cleanup",
156
+ "compact-decision",
157
+ "codex-context-budget",
158
+ "doc-summarization",
159
+ "classification",
160
+ "small-decision",
161
+ "auto-triage",
162
+ "queue-maintenance",
163
+ "workspace-maintenance"
164
+ ],
165
+ "keepMainModelFor": [
166
+ "security",
167
+ "risky-code-change",
168
+ "release",
169
+ "data-loss",
170
+ "architecture-decision",
171
+ "deep-reasoning"
172
+ ],
173
+ "internalOnly": true,
174
+ "decisionPolicy": {
175
+ "nonBlocking": true,
176
+ "endUserInvisible": true,
177
+ "handBackOnRisk": true,
178
+ "optimizeOrder": [
179
+ "quality",
180
+ "safety",
181
+ "speed",
182
+ "token-discipline"
183
+ ],
184
+ "decisions": [
185
+ "fast-vs-slow-lane",
186
+ "safe-vs-risky-lane",
187
+ "skill-routing-needed",
188
+ "step-budget-enough",
189
+ "compact-now-or-later",
190
+ "summarize-docs-or-keep-detail"
191
+ ],
192
+ "stepBudgets": {
193
+ "trivial": {
194
+ "maxSteps": 1,
195
+ "verification": "skip-unless-risky"
196
+ },
197
+ "simple": {
198
+ "maxSteps": 2,
199
+ "verification": "targeted-if-covered"
200
+ },
201
+ "nonTrivial": {
202
+ "maxSteps": 4,
203
+ "verification": "targeted-then-widen-on-risk"
204
+ }
205
+ },
206
+ "executionMode": "sidecar-parallel",
207
+ "mustNotBlockMainTask": true,
208
+ "maxSidecarWaitMs": 0
209
+ },
210
+ "codexContext": {
211
+ "autoCompact": true,
212
+ "budgetTokens": 60000,
213
+ "compactTarget": 150,
214
+ "compactTargetUnit": "lines",
215
+ "targetEnv": "UKIT_CODEX_COMPACT_TARGET",
216
+ "budgetEnv": "UKIT_CODEX_CONTEXT_BUDGET",
217
+ "autoCompactEnv": "UKIT_CODEX_AUTO_COMPACT",
218
+ "mode": "soft-handoff",
219
+ "preserve": [
220
+ "current-goal",
221
+ "non-negotiable-rules",
222
+ "active-files",
223
+ "decisions",
224
+ "unresolved-failures",
225
+ "verification-evidence",
226
+ "next-actions"
227
+ ],
228
+ "compactTargetRecommendedRange": [
229
+ 120,
230
+ 170
231
+ ],
232
+ "compactTargetMax": 170
233
+ },
234
+ "agentContext": {
235
+ "preserveClaudePreCompact": true,
236
+ "preserveOpenCodeCompaction": true,
237
+ "codexSoftHandoff": {
238
+ "autoCompact": true,
239
+ "budgetTokens": 60000,
240
+ "compactTarget": 150,
241
+ "compactTargetUnit": "lines",
242
+ "targetEnv": "UKIT_CODEX_COMPACT_TARGET",
243
+ "budgetEnv": "UKIT_CODEX_CONTEXT_BUDGET",
244
+ "autoCompactEnv": "UKIT_CODEX_AUTO_COMPACT",
245
+ "mode": "soft-handoff",
246
+ "preserve": [
247
+ "current-goal",
248
+ "non-negotiable-rules",
249
+ "active-files",
250
+ "decisions",
251
+ "unresolved-failures",
252
+ "verification-evidence",
253
+ "next-actions"
254
+ ],
255
+ "compactTargetRecommendedRange": [
256
+ 120,
257
+ 170
258
+ ],
259
+ "compactTargetMax": 170
260
+ }
261
+ }
140
262
  }
141
263
  },
142
264
  "execution": {
@@ -158,7 +280,7 @@
158
280
  "autoAllowInWorkspaceOnly": [
159
281
  "build",
160
282
  "format",
161
- "safe file writes"
283
+ "safe file writes"
162
284
  ]
163
285
  },
164
286
  "high": {
@@ -54,6 +54,8 @@ Thumbs.db
54
54
  opencode.json
55
55
  AGENTS.md
56
56
  CLAUDE.md
57
+ docs/STATUS.md
58
+ docs/TASKS.md
57
59
  .codex/settings.local.json
58
60
 
59
61
  # Keep tracked template hook sources under templates/.claude/hooks/
@@ -30,8 +30,8 @@
30
30
  - review / audit / diff / PR feedback → `.claude/skills/code-review/SKILL.md`
31
31
  - bug / error / crash / triage / failing path → `.claude/skills/debugging-toolkit/SKILL.md`
32
32
  - test / spec / coverage / fixture → `.claude/skills/testing-quality/SKILL.md`
33
- - docs / README / changelog / handoff / editing `docs/` → `.claude/skills/docs-quality/SKILL.md`
34
- - open-ended next step / project status / continue with no concrete target → `.claude/skills/next-step/SKILL.md`
33
+ - docs / README / changelog / handoff / editing `docs/` / cleaning `docs/TASKS.md` → `.claude/skills/docs-quality/SKILL.md`
34
+ - open-ended next step / project status / continue with no concrete target / choose queued task → `.claude/skills/next-step/SKILL.md`
35
35
  - explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
36
36
  - auth / security / token / permission / validation / risky shell-path-delete-db work → `.claude/skills/discover-security/SKILL.md`
37
37
  - stale workspace / reinstall / cleanup / maintenance → `.claude/skills/repo-maintenance/SKILL.md`
@@ -43,7 +43,7 @@
43
43
  - If a concrete verification lane is needed, prefer `node .claude/ukit/index/verify-context.mjs ...`.
44
44
  - These helper/index commands are internal orchestration. Run them yourself when needed; never turn them into required end-user workflow.
45
45
 
46
- ## UKit v1.1.8 Shared Runtime
46
+ ## UKit v1.2.1 Shared Runtime
47
47
 
48
48
  - Shared runtime state lives in `.ukit/storage/`.
49
49
  - Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
@@ -62,6 +62,7 @@
62
62
  - **Simple**: default to `docs/MEMORY.md` only; pull related files/tests with the resolver.
63
63
  - **Non-trivial**: read `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
64
64
  - `docs/STATUS.md`: read for open-ended status/continue prompts or meaningful continuation context; treat stale status as orientation only and verify against source/index.
65
+ - `docs/TASKS.md`: read only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
65
66
  - `docs/WORKLOG.md`: only recent, relevant entries for continuation/debugging.
66
67
  - Follow routed verification policy: targeted first when localized, widen in order for shared/risky scope, ask before blanket broad runs when no related-test evidence exists.
67
68
 
@@ -71,8 +72,17 @@
71
72
  - When the user asks “what next?”, “continue”, or “project đang ở đâu?” without a concrete target, use the `next-step` skill and show a freshness cue (fresh / possibly stale / stale / missing).
72
73
  - Concrete debug/implementation/review prompts beat open-ended wording; use the concrete skill first and only use status as background.
73
74
  - After meaningful work, use `update-status` to record state, verification, blockers, and next candidates; skip trivial/no-state-change tasks.
75
+ - `docs/TASKS.md` is a local AI task queue: prefer `Ready for AI` when asked to pick queued work, and clean duplicates/prune `Done Recently` safely when reading/updating it.
74
76
  - Detailed task context files such as `docs/context/<slug>.md` are a future extension, not required baseline workflow.
75
77
 
78
+
79
+ ## Small-Task Maintainer (internal)
80
+
81
+ - UKit may route low-risk internal decisions to the `ukit-small-task-maintainer` subagent using `UKIT_SMALL_TASK_MODEL` (default `unic-lite`).
82
+ - Use it for safe/reversible UKit chores: dọn `docs/TASKS.md`, queued-task classification, fast-vs-slow/safe-vs-risky lane decisions, skill-routing/step-budget hints, agent context-budget decisions, compact/summary decisions, docs/status summarization, auto-triage, queue maintenance, and small workspace cleanup.
83
+ - Run it as a sidecar/parallel lane only; do not block, replace, or slow the user task. Do not block the main AI flow: if the small-task lane sees security, risky/shared code, release/publish, data-loss, architecture, deep-reasoning risk, weak context, or quality risk, it hands back to the main model instead of asking the end user to decide.
84
+ - This is optional internal orchestration config from `.claude/ukit/.env` / `.ukit/storage/config.json`; never turn it into an end-user workflow. End users still only need `ukit install` and natural-language product work. Always preserve the CoDev priority: quality > safety > speed > token discipline. Keep Claude PreCompact/reinject and OpenCode native auto/prune compaction enabled. For Codex Desktop long sessions, `UKIT_CODEX_COMPACT_TARGET` defaults to 150 compact handoff lines (120-150 preferred, hard max 170), decided internally by the small-task maintainer.
85
+
76
86
  ## Subagent Policy (internal only)
77
87
 
78
88
  - Default to direct execution for trivial/simple work.
@@ -28,8 +28,8 @@
28
28
  - review / audit / diff → `.claude/skills/code-review/SKILL.md`
29
29
  - bug / error / crash / triage → `.claude/skills/debugging-toolkit/SKILL.md`
30
30
  - test / spec / coverage → `.claude/skills/testing-quality/SKILL.md`
31
- - docs / README / changelog / handoff / editing `docs/` → `.claude/skills/docs-quality/SKILL.md`
32
- - open-ended next step / project status / continue with no concrete target → `.claude/skills/next-step/SKILL.md`
31
+ - docs / README / changelog / handoff / editing `docs/` / cleaning `docs/TASKS.md` → `.claude/skills/docs-quality/SKILL.md`
32
+ - open-ended next step / project status / continue with no concrete target / choose queued task → `.claude/skills/next-step/SKILL.md`
33
33
  - explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
34
34
  - auth / security / token / permission / validation → `.claude/skills/discover-security/SKILL.md`
35
35
  - stale workspace / reinstall / cleanup → `.claude/skills/repo-maintenance/SKILL.md`
@@ -42,7 +42,7 @@
42
42
  - **Do not ask normal contributors to run internal helper commands**; run them yourself or tell them to rerun `ukit install`.
43
43
  - Do not ask normal contributors to memorize `ukit doctor`, `ukit diff`, `ukit uninstall`, or `ukit index ...` unless they explicitly need maintainer/debug help.
44
44
 
45
- ## UKit v1.1.8 Shared Runtime
45
+ ## UKit v1.2.1 Shared Runtime
46
46
 
47
47
  - Shared runtime state lives in `.ukit/storage/`.
48
48
  - Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
@@ -59,6 +59,7 @@
59
59
  - **Simple**: `docs/MEMORY.md` only, plus resolver-selected files/tests.
60
60
  - **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
61
61
  - `docs/STATUS.md`: use for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
62
+ - `docs/TASKS.md`: use only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
62
63
  - `docs/WORKLOG.md`: only recent relevant entries.
63
64
  - Follow routed verification policy: targeted first, widen only when risk/shared scope justifies it, ask before blanket broad runs.
64
65
 
@@ -69,6 +70,15 @@
69
70
  - For “what next?” / “continue” prompts without a concrete target, use `next-step` and show a freshness cue before relying on the status file.
70
71
  - For concrete debug/implementation/review prompts, keep the concrete workflow primary even if the user asks for an approach or next step.
71
72
  - After meaningful work, use `update-status`; skip trivial/no-state-change tasks and avoid transcript-style noise.
73
+ - `docs/TASKS.md` is a local AI task queue: prefer `Ready for AI` when asked to pick queued work, and clean duplicates/prune `Done Recently` safely when reading/updating it.
74
+
75
+
76
+ ## Small-Task Maintainer (internal)
77
+
78
+ - UKit may route low-risk internal decisions to the `ukit-small-task-maintainer` subagent using `UKIT_SMALL_TASK_MODEL` (default `unic-lite`).
79
+ - Use it for safe/reversible UKit chores: dọn `docs/TASKS.md`, queued-task classification, fast-vs-slow/safe-vs-risky lane decisions, skill-routing/step-budget hints, agent context-budget decisions, compact/summary decisions, docs/status summarization, auto-triage, queue maintenance, and small workspace cleanup.
80
+ - Run it as a sidecar/parallel lane only; do not block, replace, or slow the user task. Do not block the main AI flow: if the small-task lane sees security, risky/shared code, release/publish, data-loss, architecture, deep-reasoning risk, weak context, or quality risk, it hands back to the main model instead of asking the end user to decide.
81
+ - This is optional internal orchestration config from `.claude/ukit/.env` / `.ukit/storage/config.json`; never turn it into an end-user workflow. End users still only need `ukit install` and natural-language product work. Always preserve the CoDev priority: quality > safety > speed > token discipline. Keep Claude PreCompact/reinject and OpenCode native auto/prune compaction enabled. For Codex Desktop long sessions, `UKIT_CODEX_COMPACT_TARGET` defaults to 150 compact handoff lines (120-150 preferred, hard max 170), decided internally by the small-task maintainer.
72
82
 
73
83
  ## Selective Subagent Policy (internal only)
74
84
 
@@ -48,6 +48,7 @@ Complete these files before first serious use:
48
48
  - `docs/PROJECT.md`
49
49
  - `docs/MEMORY.md`
50
50
  - `docs/STATUS.md`
51
+ - `docs/TASKS.md`
51
52
  - `docs/WORKLOG.md`
52
53
 
53
54
  ### 4) Open your AI tool
@@ -98,6 +99,7 @@ Check that the docs baseline files exist and are filled in:
98
99
  - `docs/PROJECT.md`
99
100
  - `docs/MEMORY.md`
100
101
  - `docs/STATUS.md`
102
+ - `docs/TASKS.md`
101
103
  - `docs/WORKLOG.md`
102
104
 
103
105
  ---