Skip to content

spec(ai): retire agent.lifecycle — phase-scoped instructions and tools are skills with triggerConditions, process orchestration is Flow (ruled on cloud#2569) #21320

Description

@objectstack-fleet

Ruling: the maintainer ruled D (retire) on objectstack-ai/cloud#2569, batch #267 item 5, answering 「其他同意」 to the director's recommendation in the live director chat. The ruling record is on that card, which closes not_planned. This card carries the spec half. Part of #20274. Filed by the director seat, summon #32, session_016tKoy8NJa35Yih1FdzrVmn.

Filing gate: ② a ruling's execution, filed by the seat that recorded it. Reader who acts: domain:spec (the holder of #20274).

Why retire, not enforce

  • ADR-0020 (Accepted, Implemented) already rejected the alternative:
    • Alternatives, verbatim: "Keep the full XState StateMachineSchema and build an interpreter. Rejected: orchestration is Flow's job (ADR-0019); a statechart engine beside Flow re-creates the two-engine problem ADR-0019 just removed."
    • Its implementation note 1 kept StateMachineSchema for agent.lifecycle only so as not to churn the agent surface ("a separate concern"). That is a deferral, not an endorsement.
  • Every enforcement design measured on cloud#2569 builds a subset statechart interpreter in cloud. The dev report is 5944143614. Option A makes a tool call the event; B has the model declare it, and needs an ADR-0064 §1 exception; C has the UI send it. Each would still refuse hierarchy, parallel regions, history, guards, actions and always one by one.
  • The mainstream capability is already served here. Generative-agent platforms scope a conversation phase as a topic or skill that carries its own instructions and tools, selected by the model or by a condition (Agentforce topics, Copilot Studio generative orchestration). In this platform that is a skill:
    • instructions and tools (ADR-0064);
    • triggerConditions, whose ledger row is live and whose reader is cloud packages/service-ai/src/skill-registry.ts.
    • Multi-step process orchestration is Flow (ADR-0019 / ADR-0020).
  • Readers: 0. No reader of agent.lifecycle exists in this repository or in cloud (cloud measured at 3aadd908 in 5944143614). Producers: 0 in examples/**, packages/** and cloud's built-in agents. Tenant agents are NOT MEASURED, and the retirement prescription covers them.

Scope

  1. Retire AgentSchema.lifecycle (packages/spec/src/ai/agent.zod.ts:197) through the spec-property-retirement playbook. That means:
    • a tombstone and an ADR-0087 entry;
    • a named refusal at authoring, whose prescription is:
      • phase-scoped instructions and tools go in skills (instructions, tools, triggerConditions);
      • multi-step process orchestration goes in Flow;
      • record-status transitions go in the state_machine validation rule (ADR-0020);
    • the generated baselines, docs and pins the playbook names.
  2. The ledger row packages/spec/liveness/agent.json lifecycle, read at 1371dc980c, follows the playbook's route.
  3. StateMachineSchema's remaining consumers, censused in the same PR: api/protocol.zod.ts, the automation/state-machine.zod.ts docblock (:25 names the agent lifecycle), and the migration and chart references.
    • If agent.lifecycle was its last authorable consumer, the schema goes the same way under the same playbook.
    • Otherwise the PR records why it stays. The docblock is corrected either way.
  4. ⛔ Not in scope: cloud. Nothing reads the key there, so no cloud change is owed.

Related

Dedupe

mcp__github__search_issues "retire agent.lifecycle StateMachineSchema agent conversation state machine" on objectstack: 2 hits, #3479 and #3433, both closed and about state_machine validation initialStates. Neither is this.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:specenhancementNew feature or requestpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions