Skip to main content

State Machine

The SPECS document lifecycle is modeled as a state machine with 9 states and 16 transitions. Each document (ticket) moves through these states from creation to final approval — or is rejected, put on hold, or sent back for revisions along the way.

States

KeyLabelIconDescription
createdCreatedThe ticket has just been created and is waiting to be initialized.
draftDraftThe document is being written or edited.
pending_reviewPending ReviewThe author has submitted a review request; waiting for the Manager to start.
in_reviewIn Review👁The Manager is reviewing the document.
approvedApprovedThe document has been approved and published.
rejectedRejectedThe Manager has rejected the document; the author needs to revise it.
on_holdOn HoldThe Manager has paused processing; progress is not continuing for now.
changeChange RequestedThe Manager has requested specific changes to an approved or in-review document.
deletedDeleted🗑The ticket has been hard-deleted — it cannot be recovered.

End-to-End Pipeline

The document lifecycle integrates with downstream systems:

Key integration points

  • approve event — when the Manager approves the document, a businessUpdated event is published to the message broker, which then syncs the approved content into the Knowledge Base (4 document types are indexed).
  • AI Agent reads from KB — the AI Agent in the execution phase reads the Knowledge Base to generate a plan.
  • Task Dispatcher — distributes work to 4 specialized sub-agents (Architecture, Business, Technical, Testing).

Legend

  • Executor action — an action initiated by the document author (Task Executor).
  • Manager action — an action initiated by the reviewer/lead (Task Manager).
  • Rollback — a reverse transition (for example: cancel-review, track-back).
  • System flow — an automated / event-driven flow to downstream systems.