Skip to main content

Module object

Module object 

Source
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

  1. User input — the user provides a natural-language request.

  2. Intent — captures the raw prompt and the AI’s structured interpretation. Status transitions from Draft (prompt only) to Active (analysis complete). Supports conversational refinement via parent chain.

  3. Plan — a sequence of PlanSteps derived from the Intent. References a ContextPipeline and 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 via previous.

  4. Task — a unit of work with title, constraints, and acceptance criteria. May link back to its originating Intent. Accumulates Runs in runs (chronological execution history).

  5. Run — a single execution attempt of a Task. Records the baseline commit, the Plan version being executed (snapshot reference), and the host environment. A Provenance (1:1) captures the LLM configuration and token usage.

  6. 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 via io_footprint.

  7. PatchSet — a candidate diff generated by the agent. Contains the diff artifact, file-level touched summary, and rationale. Starts as Proposed; transitions to Applied or Rejected. Ordering is by position in Run.patchsets.

  8. Evidence — output of a validation tool (test, lint, build) run against a PatchSet. One per tool invocation. Carries exit_code, summary, and report_artifacts. Feeds into the Decision.

  9. 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). Records rationale and result_commit_sha.

  10. Intent completed — the orchestrator records the final git commit in Intent.commit and transitions status to Completed.

§Object Relationship Summary

FromFieldToCardinality
IntentparentIntent0..1
IntentplanPlan0..1
PlanpreviousPlan0..1
PlanpipelineContextPipeline0..1
PlanSteptaskTask0..1
TaskparentTask0..1
TaskintentIntent0..1
TaskrunsRun0..N
TaskdependenciesTask0..N
RuntaskTask1
RunplanPlan0..1
RunsnapshotContextSnapshot0..1
RunpatchsetsPatchSet0..N
PatchSetrunRun1
Evidencerun_idRun1
Evidencepatchset_idPatchSet0..1
Decisionrun_idRun1
Decisionchosen_patchset_idPatchSet0..1
Provenancerun_idRun1
ToolInvocationrun_idRun1

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§

ObjectTrait
The Object Trait Defines the common interface for all Git object types, including blobs, trees, commits, and tags.