Skip to content

05 — Migrate turn and 分神化身 lifecycle #6

Description

@XMethues

Parent

#1

What to build

Migrate turn and subagent lifecycle activity to the normalized intake. Treat session end as the authoritative turn boundary and show subagent work without awarding cultivation twice.

Acceptance criteria

  • The documented pre-LLM hook starts a turn and the documented session-end hook is its authoritative end.
  • A post-LLM hook is not treated as the authoritative end of the turn.
  • Normal and interrupted session endings close the matching turn and are neutral in reward/penalty terms.
  • Subagent start and stop hooks track each subagent by identity and surface active work as 分神化身.
  • Delegation cultivation reward is applied exactly once through the parent delegation tool result, not again through subagent lifecycle events.
  • Display priority places direct tool activity above 分神化身, then recent outcome, then 推演, then 入定; 候旨 remains highest priority.
  • Parallel subagents and direct tools settle independently and cannot incorrectly force the aggregate state to idle.
  • Hook adapters tolerate additional Hermes keyword arguments.
  • Real-HTTP integration tests and fake hook-context tests cover normal, interrupted, parallel, and out-of-order lifecycles.

Blocked by

#4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions