Expand description
AI Intent Definition
An Intent is the entry point of every AI-assisted workflow — it
captures the raw user request (prompt) and the AI’s structured
interpretation of that request (content). The Intent is the first
object created (step ① → ②) and the last one completed (step ⑩) in
the end-to-end flow described in mod.rs.
§Position in Lifecycle
① User input (natural-language request)
│
▼
② Intent (Draft) ← prompt recorded, content = None
│ AI analysis
▼
Intent (Active) ← content filled, plan linked
│
├──▶ ContextPipeline ← seeded with IntentAnalysis frame
│
▼
③ Plan (derived from content)
│
▼
④–⑨ Task → Run → PatchSet → Evidence → Decision
│
▼
⑩ Intent (Completed) ← commit recorded§Conversational Refinement
Intent₀ ("Add pagination")
▲
│ parent
Intent₁ ("Also add cursor-based pagination")
▲
│ parent
Intent₂ ("Use opaque cursors, not offsets")Each follow-up Intent links to its predecessor via parent,
forming a singly-linked list from newest to oldest. This
preserves the full conversational history without mutating
earlier Intents.
§Status Transitions
Draft ──▶ Active ──▶ Completed
│ │
└──────────┴──▶ CancelledStatus changes are append-only: each transition pushes a
StatusEntry onto the statuses vector. The current status
is always the last entry. This design preserves the full
transition history with timestamps and optional reasons.
§Purpose
- Traceability: Links the original human request to all downstream artifacts (Plan, Tasks, Runs, PatchSets). Reviewers can trace any code change back to the Intent that motivated it.
- Reproducibility: Stores both the verbatim prompt and the AI’s interpretation, allowing re-analysis with different models or parameters.
- Conversational Context: The
parentchain captures iterative refinement, so the agent can understand how the user’s request evolved over multiple exchanges. - Completion Tracking: The
commitfield closes the loop by recording which git commit satisfied the Intent.
Structs§
- Intent
- The entry point of every AI-assisted workflow.
- Status
Entry - A single entry in the Intent’s status history.
Enums§
- Intent
Status - Status of an Intent through its lifecycle.