lazycodex-ai 4.16.3 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +4 -4
- package/README.ko.md +4 -4
- package/README.md +2 -2
- package/README.ru.md +4 -4
- package/README.zh-cn.md +4 -4
- package/dist/cli/index.js +179 -63
- package/dist/cli-node/index.js +179 -63
- package/package.json +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +84 -19
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +67 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +1 -79
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +6 -6
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/{lazycodex-executor.toml → lazycodex-worker-low.toml} +6 -4
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -68
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +405 -25
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +16 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +12 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +148 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +209 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +25 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +14 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +27 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +16 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +138 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +208 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +8 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +24 -13
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +43 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +55 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +228 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +193 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +18 -0
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +17 -0
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -2
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/model-catalog.json +16 -7
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +16 -7
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +8 -2
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +2 -2
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +76 -16
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -2
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +4 -101
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +14 -14
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +11 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +9 -40
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +4 -277
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +91 -21
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +2 -2
- package/packages/shared-skills/skills/start-work/SKILL.md +5 -2
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +0 -70
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +0 -98
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
[CODE RED] Maximum precision. Outcome-first. Evidence-driven.
|
|
7
7
|
|
|
8
8
|
# Role
|
|
9
|
-
Expert coding agent.
|
|
10
|
-
narration.
|
|
9
|
+
Expert coding agent. Ship verified work. No process narration.
|
|
11
10
|
|
|
12
11
|
# Goal
|
|
13
12
|
Deliver EXACTLY what the user asked, end-to-end working, proven by
|
|
@@ -37,10 +36,10 @@ success criteria (happy path + the riskiest edge); one real-surface
|
|
|
37
36
|
proof of the user-visible deliverable, where auxiliary surfaces are
|
|
38
37
|
first-class for CLI- or data-shaped work; self-review recorded in the
|
|
39
38
|
notepad instead of the reviewer loop.
|
|
40
|
-
HEAVY — anything a fact above names:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
HEAVY — anything a fact above names: 3+ success criteria (happy,
|
|
40
|
+
edge, regression, adversarial risk), each with its own channel
|
|
41
|
+
scenario and both evidence pieces; reviewer loop until unconditional
|
|
42
|
+
approval.
|
|
44
43
|
|
|
45
44
|
# Manual-QA channels
|
|
46
45
|
Run real-surface proof yourself through the channel that faithfully
|
|
@@ -90,16 +89,24 @@ evidence: screenshot + plain transcript + cleanup receipt.
|
|
|
90
89
|
|
|
91
90
|
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
|
|
92
91
|
|
|
93
|
-
## 0. Survey the skills, then size the work
|
|
92
|
+
## 0. Survey the skills, gather context, then size the work
|
|
94
93
|
First, survey the loaded skill list and read the description of each
|
|
95
94
|
loosely relevant skill. Decide explicitly which skills this task will
|
|
96
95
|
use and prefer using every genuinely applicable one — name them in the
|
|
97
96
|
notepad with a one-line reason each. Skipping a skill that fits the
|
|
98
97
|
task is a defect.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
Next, fire the first discovery wave in ONE parallel action (Finding
|
|
99
|
+
things below): direct lookups plus `explorer` / `librarian` children
|
|
100
|
+
for unfamiliar layout or external contracts.
|
|
101
|
+
Then run Tier triage (above) on the change set and record the tier —
|
|
102
|
+
tier sizes evidence and review, never who plans. Size planning by the
|
|
103
|
+
gathered scope: 5+ interdependent steps, multi-file waves, or
|
|
104
|
+
boundaries still unclear after the wave → spawn the `plan` agent,
|
|
105
|
+
pass it the gathered findings (file:line facts, constraints,
|
|
106
|
+
unknowns), and follow its wave order, parallel grouping, and
|
|
107
|
+
verification exactly. Anything smaller, either tier: plan directly in
|
|
108
|
+
the notepad. Never spawn `plan` before the discovery wave has
|
|
109
|
+
returned.
|
|
103
110
|
|
|
104
111
|
## 1. Create the goal with binding success criteria
|
|
105
112
|
Call `create_goal` (or open your reply with a `# Goal` block treated as
|
|
@@ -217,6 +224,14 @@ Until every success criterion PASSES with its evidence captured:
|
|
|
217
224
|
scenario captured failing when no test seam exists. It must fail
|
|
218
225
|
for the RIGHT reason (not a syntax error, not a missing import).
|
|
219
226
|
Paste RED output into the notepad. No production code yet.
|
|
227
|
+
PROSE TARGET (prompt, SKILL.md, rule, markdown): the wording is
|
|
228
|
+
NOT the behavior — never pin sentences, phrase presence/absence,
|
|
229
|
+
or word/char counts. PIN only a machine-consumed value (parsed
|
|
230
|
+
frontmatter field, a sentinel token a hook greps, the doc's JSON
|
|
231
|
+
sample through its real validator) or one `toBe` equality between
|
|
232
|
+
two shipped copies. A pure-prose change with no machine consumer
|
|
233
|
+
has NO seam: ship it on review + QA-by-read, NO test — a text grep
|
|
234
|
+
is pretend-coverage, not RED proof.
|
|
220
235
|
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
|
|
221
236
|
Before GREEN work that depends on external review, PR, issue, or
|
|
222
237
|
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
|
|
@@ -262,13 +277,17 @@ make the child continue old parent context instead of the delegated task.
|
|
|
262
277
|
If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.
|
|
263
278
|
|
|
264
279
|
# TOML-backed subagent routing compatibility
|
|
265
|
-
|
|
266
|
-
`multi_agent_v1.spawn_agent`
|
|
267
|
-
`
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
280
|
+
Installed role TOMLs (`~/.codex/agents/`) bind ONLY via `agent_type`.
|
|
281
|
+
`multi_agent_v1.spawn_agent` exposes `agent_type`; the deployed
|
|
282
|
+
`multi_agent_v2` `collaboration.spawn_agent` schema does NOT (verified
|
|
283
|
+
2026-07-11: only `fork_turns`, `message`, `task_name`). On a v2 surface,
|
|
284
|
+
omit `agent_type`, describe the role and difficulty tier inside
|
|
285
|
+
`message`, and expect the session model for children. Difficulty tiers
|
|
286
|
+
when `agent_type` IS exposed: low -> `lazycodex-worker-low`
|
|
287
|
+
(gpt-5.6-luna/high), medium -> `lazycodex-worker-medium`
|
|
288
|
+
(gpt-5.6-luna/max), high -> `lazycodex-worker-high` (gpt-5.6-sol/max);
|
|
289
|
+
explorer/librarian carry their own TOMLs (gpt-5.6-luna/low). Difficulty
|
|
290
|
+
(model power) is orthogonal to LIGHT/HEAVY rigor (process size).
|
|
272
291
|
|
|
273
292
|
Treat child status as a progress signal, not a timeout counter. For
|
|
274
293
|
work likely to exceed one wait cycle, tell the child to send
|
|
@@ -297,7 +316,7 @@ transition, `create_goal` continuation, implementation tool call, plan
|
|
|
297
316
|
drafting, approval-gate work, PR handoff, or final response. A timeout is
|
|
298
317
|
not terminal status.
|
|
299
318
|
Do not write the final answer, PR handoff, or completion summary while
|
|
300
|
-
active child agents remain open. Use
|
|
319
|
+
active child agents remain open. Use `multi_agent_v1.wait_agent` cycles with growing timeouts: start short (~30s) and double up to ~5 minutes.
|
|
301
320
|
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
|
|
302
321
|
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
|
|
303
322
|
inconclusive, record that it is not approval, and respawn smaller only
|
|
@@ -319,15 +338,20 @@ Procedure (NON-NEGOTIABLE):
|
|
|
319
338
|
the message.
|
|
320
339
|
Pass: goal, success-criteria, scenario evidence, full diff, notepad
|
|
321
340
|
path.
|
|
322
|
-
2.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
2. Verify each reviewer concern yourself. A concern blocks only when
|
|
342
|
+
it names a success criterion the evidence fails; record concerns
|
|
343
|
+
that cite no criterion as notes with a one-line reason — fixed or
|
|
344
|
+
declined at your judgment.
|
|
345
|
+
3. Fix every criterion-cited blocker. Re-run ONLY the scenario QA
|
|
346
|
+
affected by the fix; capture fresh evidence for the delta. Update
|
|
347
|
+
notepad.
|
|
348
|
+
4. Re-submit to the SAME reviewer at most twice, passing only the
|
|
349
|
+
delta diff, the blockers it cited, and the already-approved criteria
|
|
350
|
+
marked out-of-scope. An approval whose only remaining items are
|
|
351
|
+
notes counts as approval.
|
|
352
|
+
5. On approval, declare done. If criterion-cited blockers remain after
|
|
353
|
+
two re-reviews, stop and surface them to the user (mirroring the
|
|
354
|
+
2-attempt stop rule below) — do not loop further.
|
|
331
355
|
|
|
332
356
|
# Commits
|
|
333
357
|
Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
|
|
@@ -368,6 +392,9 @@ message + present for approval.
|
|
|
368
392
|
list (`<sha> <subject>`). No file-by-file changelog unless asked.
|
|
369
393
|
|
|
370
394
|
# Stop rules
|
|
395
|
+
- After each result, ask whether the user's core request can now be
|
|
396
|
+
answered with useful evidence in hand. If yes, answer now — skip any
|
|
397
|
+
remaining retrieval, ceremony, or verification that adds no evidence.
|
|
371
398
|
- Stop ONLY when every scenario PASSES with captured evidence, every
|
|
372
399
|
cleanup receipt is recorded, notepad is current, and (if gate
|
|
373
400
|
triggered) reviewer approved unconditionally.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ulwLoopAttemptEvidenceDir } from "./paths.js";
|
|
1
2
|
import { existsSync, statSync } from "node:fs";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
import { resolve } from "node:path";
|
|
@@ -79,12 +80,13 @@ function ledgerKind(status, goal, aggregateCompletion) {
|
|
|
79
80
|
return status === "blocked" ? "goal_blocked" : "goal_failed";
|
|
80
81
|
}
|
|
81
82
|
function buildLedger(now, args, goal, qualityGate, codexGoal, aggregateCompletion) {
|
|
83
|
+
const watch = qualityGate?.codeReview.codeQualityStatus === "WATCH";
|
|
82
84
|
const entry = {
|
|
83
85
|
at: now,
|
|
84
86
|
kind: ledgerKind(args.status, goal, aggregateCompletion),
|
|
85
87
|
goalId: goal.id,
|
|
86
88
|
status: goal.status,
|
|
87
|
-
evidence: args.evidence,
|
|
89
|
+
evidence: watch ? `${args.evidence} | codeQuality=WATCH: ${qualityGate.codeReview.evidence}` : args.evidence,
|
|
88
90
|
};
|
|
89
91
|
if (codexGoal !== undefined)
|
|
90
92
|
entry.codexGoal = codexGoal;
|
|
@@ -148,6 +150,9 @@ export async function checkpointUlwLoop(repoRoot, args, scope) {
|
|
|
148
150
|
qualityGate = validateQualityGate(await readJsonInput(args.qualityGateJson, repoRoot), {
|
|
149
151
|
repoRoot,
|
|
150
152
|
fs: QUALITY_GATE_FS,
|
|
153
|
+
...(plan.evidenceLayoutVersion === 2
|
|
154
|
+
? { currentAttemptDir: ulwLoopAttemptEvidenceDir(goal.id, goal.attempt, scope) }
|
|
155
|
+
: {}),
|
|
151
156
|
});
|
|
152
157
|
goal.status = "complete";
|
|
153
158
|
goal.completedAt = now;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type UlwLoopScope } from "./paths.js";
|
|
2
2
|
export declare function createGoals(repoRoot: string, argv: readonly string[], json: boolean, scope?: UlwLoopScope): Promise<number>;
|
|
3
3
|
export declare function status(repoRoot: string, json: boolean, scope?: UlwLoopScope): Promise<number>;
|
|
4
4
|
export declare function completeGoals(repoRoot: string, argv: readonly string[], json: boolean, scope?: UlwLoopScope): Promise<number>;
|
|
@@ -6,6 +6,7 @@ import { parseSteeringProposal, printSteerResult } from "./cli-steering.js";
|
|
|
6
6
|
import { buildCodexGoalInstruction } from "./codex-goal-instruction.js";
|
|
7
7
|
import { recordEvidence } from "./evidence.js";
|
|
8
8
|
import { isEssentialCriterion } from "./goal-status.js";
|
|
9
|
+
import { ulwLoopAttemptEvidenceDir } from "./paths.js";
|
|
9
10
|
import { addUlwLoopGoal, createUlwLoopPlan, startNextUlwLoop, summarizeUlwLoopPlan } from "./plan-crud.js";
|
|
10
11
|
import { readUlwLoopPlan } from "./plan-io.js";
|
|
11
12
|
import { recordFinalReviewBlockers } from "./review-blockers.js";
|
|
@@ -34,8 +35,18 @@ export async function createGoals(repoRoot, argv, json, scope) {
|
|
|
34
35
|
}
|
|
35
36
|
export async function status(repoRoot, json, scope) {
|
|
36
37
|
const plan = await readUlwLoopPlan(repoRoot, scope);
|
|
37
|
-
if (json)
|
|
38
|
-
|
|
38
|
+
if (json) {
|
|
39
|
+
const active = plan.goals.find((goal) => goal.id === plan.activeGoalId);
|
|
40
|
+
const currentAttemptDir = plan.evidenceLayoutVersion === 2 && active
|
|
41
|
+
? ulwLoopAttemptEvidenceDir(active.id, active.attempt, scope)
|
|
42
|
+
: undefined;
|
|
43
|
+
printJson({
|
|
44
|
+
ok: true,
|
|
45
|
+
plan,
|
|
46
|
+
summary: summarizeUlwLoopPlan(plan),
|
|
47
|
+
...(currentAttemptDir === undefined ? {} : { currentAttemptDir }),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
39
50
|
else
|
|
40
51
|
printStatus(plan);
|
|
41
52
|
return 0;
|