Skip to content

v0.6.0

Choose a tag to compare

@ztxtech ztxtech released this 16 Jun 02:57

v0.6.0 — Serial-Loop Scheduling + Critic Dispatch Fix

Minor release. Two architectural changes plus a critical bug fix.

What changed

1. Serial-loop scheduling model (replaces parallel fan-out).

The dispatch model is now an explicit state machine instead of the old
"aggressive parallel fan-out" pattern. The main chain is single-line:
requirements-analyst -> information-collector -> coder, with
ts-critic reviewing BEFORE and AFTER every worker, and c-critic
as the final gate.

  • New module src/scheduling/state-machine.ts holds the legal dispatch
    edges, per-worker pre/post-review progress, a reportback parser, and a
    Mermaid state diagram for system-prompt injection.
  • Three enforcement hooks in tool.execute.before:
    • G1 — dispatch edge check. Flags any dispatch not on a legal
      edge from the current phase. Worker first-dispatch also requires a
      prior ts-critic pre-review.
    • G2 — main-agent work-guard. Soft-warns (trace + toast, no
      throw) when the main agent edits project source or runs
      code-modifying bash. Emergency self-fix exception preserved.
    • G3 — reportback parser. Extracts next_call and
      unresolved_issues from worker free-text output. Stored in
      governance state and re-injected on every subsequent round so the
      main agent cannot drop them.
  • R5 escalation: if a pending next_call is ignored for >= 2 rounds,
    G1 upgrades from soft-warn to hard throw to force compliance.
  • Parallelism is now scoped to INSIDE a single worker (e.g. coder
    runs 3 method families concurrently). Cross-worker fan-out is
    explicitly disallowed.

2. aion_critic_dispatch was a no-op — fixed.

The aion_critic_dispatch tool was advertised as "the ONLY sanctioned
way to call a critic" but its execute() only wrote a trace event and
returned a JSON instruction payload. It never actually dispatched the
critic subagent. The main agent would call it, see a success return,
write "dispatched DISP-xxx, in flight" to progress.md, and then idle —
thinking the critic was running when nothing was happening.

Observed in trace during demo run 2026-06-15:

17:53:13 critic.review          (aion_critic_dispatch called)
17:53:26-33 main agent writes progress + decisions
17:53:39 session.idle           (NO reportback.received, NO critic.verdict)

Fix:

  • Tool description now explicitly says "DOES NOT dispatch the critic".
  • Return payload includes status=PAYLOAD_READY_NOT_DISPATCHED and a
    next_action_required field telling the main agent to call
    task(subagent_type=<critic>, ...) in the SAME turn.
  • All phase hints (session-idle.ts, system-transform.ts,
    aion/default.md) updated with the explicit two-step flow:
    1. aion_critic_dispatch(...) to prepare payload.
    2. task(subagent_type=<critic>, ...) to ACTUALLY RUN it.

3. i18n cleanup — removed all Chinese from source and tests.

Per AGENTS.md requirement: all prompts and source code must be in
English. LLMs can read Chinese user input fine — hardcoded Chinese
keywords in the source are unnecessary and violate the constraint.
Removed Chinese keywords from intent.ts, chat-message.ts, and the
matching test files. 49 keyword strings / test cases replaced with
English equivalents that cover the same semantic space.

4. Tooling.

  • scripts/dev-install.sh: removed hardcoded user-specific path from
    the printed instructions; added AION_PROJECT_DIR env var support
    for a ready-to-paste workflow command.
  • .gitignore: added AGENTS.md (local personal-preference doc).

Upgrade

curl -fsSL https://raw.githubusercontent.com/ztxtech/aion/dev/scripts/install.sh | bash -s -- --force

Full diff

  • src/scheduling/state-machine.ts — new state machine module
  • src/hooks/tool-guard.ts — G1/G2/G3 hooks
  • src/hooks/system-transform.ts — Mermaid injection, R4/R5 signals
  • src/hooks/session-idle.ts — phase hints rewritten for serial model
  • src/tools/critic.ts — fix aion_critic_dispatch no-op
  • src/prompts/agent-prompts/aion/default.md — serial rules
  • src/prompts/governance.ts — Serial-Loop Scheduling section, next_call mandatory
  • src/prompts/rules.ts — top-priority command 5/6 rewritten
  • src/create-managers.ts — pendingNextCall + escalation state
  • src/hooks/intent.ts, src/hooks/chat-message.ts — Chinese removal
  • scripts/dev-install.sh — generalized path
  • .gitignore — AGENTS.md
  • package.json — version 0.5.3 -> 0.6.0
  • Tests: +39 new (scheduling + G1/G2/G3 hook integration)