Expand description
Object model definitions for Git blobs, trees, commits, tags, and supporting traits that let the pack/zlib layers create strongly typed values from raw bytes.
AI objects are also defined here, as they are a fundamental part of the system and need to be accessible across multiple modules without circular dependencies.
§AI Object End-to-End Flow
① User input
│
▼
② Intent (Draft → Active)
│
├──▶ ContextPipeline ← seeded with IntentAnalysis frame
│
▼
③ Plan (pipeline, fwindow, steps)
│
├─ PlanStep₀ (inline)
├─ PlanStep₁ ──task──▶ sub-Task (recursive)
└─ PlanStep₂ (inline)
│
▼
④ Task (Draft → Running)
│
▼
⑤ Run (Created → Patching → Validating → Completed/Failed)
│
├──▶ Provenance (1:1, LLM config + token usage)
├──▶ ContextSnapshot (optional, static context at start)
│
│ ┌─── agent execution loop ───┐
│ │ │
│ │ ⑥ ToolInvocation (1:N) │ ← action log
│ │ │ │
│ │ ▼ │
│ │ ⑦ PatchSet (Proposed) │ ← candidate diff
│ │ │ │
│ │ ▼ │
│ │ ⑧ Evidence (1:N) │ ← test/lint/build
│ │ │ │
│ │ ├─ pass ──────────────┘
│ │ └─ fail → new PatchSet (retry within Run)
│ └─────────────────────────────┘
│
▼
⑨ Decision (terminal verdict)
│
├─ Commit → apply PatchSet, record result_commit
├─ Retry → create new Run ⑤ for same Task
├─ Abandon → mark Task as Failed
├─ Checkpoint → save state, resume later
└─ Rollback → revert applied PatchSet
│
▼
⑩ Intent (Completed) ← commit recorded§Steps
-
User input — the user provides a natural-language request.
-
Intent— captures the raw prompt and the AI’s structured interpretation. Status transitions fromDraft(prompt only) toActive(analysis complete). Supports conversational refinement viaparentchain. -
Plan— a sequence ofPlanSteps derived from the Intent. References aContextPipelineand records the visible frame range (fwindow). Steps track consumed/produced frames by stable ID (iframes/oframes). A step may spawn a sub-Task for recursive decomposition. Plans form a revision chain viaprevious. -
Task— a unit of work with title, constraints, and acceptance criteria. May link back to its originating Intent. Accumulates Runs inruns(chronological execution history). -
Run— a single execution attempt of a Task. Records the baselinecommit, the Plan version being executed (snapshot reference), and the hostenvironment. AProvenance(1:1) captures the LLM configuration and token usage. -
ToolInvocation— the finest-grained record: one per tool call (read file, run command, etc.). Forms a chronological action log for the Run. Tracks file I/O viaio_footprint. -
PatchSet— a candidate diff generated by the agent. Contains the diffartifact, file-leveltouchedsummary, andrationale. Starts asProposed; transitions toAppliedorRejected. Ordering is by position inRun.patchsets. -
Evidence— output of a validation tool (test, lint, build) run against a PatchSet. One per tool invocation. Carriesexit_code,summary, andreport_artifacts. Feeds into the Decision. -
Decision— the terminal verdict of a Run. Selects a PatchSet to apply (Commit), retries the Task (Retry), gives up (Abandon), saves progress (Checkpoint), or reverts (Rollback). Recordsrationaleandresult_commit_sha. -
Intent completed — the orchestrator records the final git commit in
Intent.commitand transitions status toCompleted.
§Object Relationship Summary
| From | Field | To | Cardinality |
|---|---|---|---|
| Intent | parent | Intent | 0..1 |
| Intent | plan | Plan | 0..1 |
| Plan | previous | Plan | 0..1 |
| Plan | pipeline | ContextPipeline | 0..1 |
| PlanStep | task | Task | 0..1 |
| Task | parent | Task | 0..1 |
| Task | intent | Intent | 0..1 |
| Task | runs | Run | 0..N |
| Task | dependencies | Task | 0..N |
| Run | task | Task | 1 |
| Run | plan | Plan | 0..1 |
| Run | snapshot | ContextSnapshot | 0..1 |
| Run | patchsets | PatchSet | 0..N |
| PatchSet | run | Run | 1 |
| Evidence | run_id | Run | 1 |
| Evidence | patchset_id | PatchSet | 0..1 |
| Decision | run_id | Run | 1 |
| Decision | chosen_patchset_id | PatchSet | 0..1 |
| Provenance | run_id | Run | 1 |
| ToolInvocation | run_id | Run | 1 |
Modules§
- blob
- In Git, a blob (binary large object) is a type of Git object that stores the contents of a file. A blob object contains the binary data of a file, but does not contain any metadata such as the file name or permissions. The structure of a Git blob object is as follows:
- commit
- The Commit object is a data structure used to represent a specific version of a project’s files at a particular point in time. In Git, the commit object is a fundamental data structure that is used to track changes to a repository’s files over time. Whenever a developer makes changes to the files in a repository, they create a new commit object that records those changes.
- context
- AI Context Snapshot Definition
- decision
- AI Decision Definition
- evidence
- AI Evidence Definition
- integrity
- Hash implementation for AI process objects.
- intent
- AI Intent Definition
- note
- Git Note object implementation
- patchset
- AI PatchSet Definition
- pipeline
- Dynamic Context Pipeline
- plan
- AI Plan Definition
- provenance
- AI Provenance Definition
- run
- AI Run Definition
- signature
- In a Git commit, the author signature contains the name, email address, timestamp, and timezone of the person who authored the commit. This information is stored in a specific format, which consists of the following fields:
- tag
- In Git objects there are two types of tags: Lightweight tags and annotated tags.
- task
- AI Task Definition
- tool
- AI Tool Invocation Definition
- tree
- In Git, a tree object is used to represent the state of a directory at a specific point in time. It stores information about the files and directories within that directory, including their names, permissions, and the IDs of the objects that represent their contents.
- types
- Object type enumeration and AI Object Header Definition.
- utils
- Low-level helpers shared by object encode/decode routines: varint readers, type/size parsing, and thin zlib compression wrappers tuned for Git object formats.
Traits§
- Object
Trait - The Object Trait Defines the common interface for all Git object types, including blobs, trees, commits, and tags.