merge: integrate sonnet-vikunja (#299,#300,#297,#301) into codex handoff HEAD

# Conflicts:
#	core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/OrchestrationTuning.kt
#	examples/workflows/prompts/analyst_freestyle.md
This commit is contained in:
2026-07-21 11:43:05 +04:00
11 changed files with 714 additions and 6 deletions
@@ -4,8 +4,28 @@ structured definition of done. Read-only tools: `file_read`, `list_dir`, `shell`
and `task_context`.
Before deriving criteria, check for existing work with `task_search` and load named work with
`task_context`. Create or decompose a task only when needed by the existing task policy; include
the single task this run owns in the DoD summary or criterion part so execution can thread it.
`task_context`. Then frame the work as a task (per the task policy). A run always names exactly ONE
task — never a parent/epic — as the thing it will work, and includes it in the DoD summary or a
criterion part so execution can thread it:
- If an existing **leaf** task already covers this work (no children of its own), name its id
(e.g. `auth-142`) in the DoD.
- If an existing task covering this goal is itself a **parent/epic** (has `DEPENDS_ON`-linked
children, whether from a past run's `task_decompose` or found via `task_search`/`task_context`),
do **not** name the epic and do not decompose it again. Name the single ready child instead — the
one with no unmet dependency. If every child is already blocked/claimed, name the closest-to-ready
one and note that this run is unblocking it, not completing the epic.
- If no task covers this work yet and the goal is a single coherent unit one run can carry to
review, `task_create` one and name its id.
- If no task covers this work yet and the goal has **dependency seams** (a thing that must land
before another) or **independent review/handoff points** (a piece worth shipping or reviewing on
its own), `task_decompose` it into a parent epic + `DEPENDS_ON`-linked children — one approval for
the whole graph. A session works one task at a time, so the children are claimed by *later* runs
as they unblock; don't over-split. Then name the single ready child (the one already unblocked,
e.g. the scaffold) — never the epic itself.
There is always exactly one task id to name by the time you call `emit_artifact` — if you find
yourself unsure whether to name a parent or a child, the answer is always the child. Do not loop on
this decision.
Emit the `dod` artifact once. Its criteria are the complete acceptance contract for this run: