Skip to main content

Module devtask

Module devtask 

Source
Expand description

The executable development task: one issue or one milestone read as work to be done, with the origin of every value on the value.

§What this is, and what it is not

It is not a second project model. The canonical records under .ai/repo/project/ are the only declaration, crate::plan is the only derivation of status, waves, dependents and findings out of them, worktree::trace is the only derivation of the branches and commits that realised an issue, and scripts/github-sync is the only adapter that projects either onto GitHub. This module composes those three and adds nothing to them: every status it reports is the status plan.issues reports, and task::tests holds that equality as an assertion.

What it adds is the thing none of them could add on its own:

  1. One answer. A worker asking “what is this issue, and can I start it?” had to call plan.issues, trace.issue and a shell adapter, and join three shapes by hand. The join is a derivation like any other, so it belongs in the executable.
  2. Provenance on every field. The plan flattens a missing key to the empty string, because that is what the awk it is held to byte-equality with does. That is right for the plan and wrong for a reader deciding whether to trust a value: objective: "" and a record with no objective at all are the same string and different facts. Every field here carries a FieldProvenance — Explicit, Derived, Inferred or Unknown — and the constructors are the only way to build one, so a field cannot claim to be authored unless the record’s own metadata carried the key.
  3. Readiness as a derived vocabulary. readiness::TaskReadiness is a projection of the canonical status, never a replacement for it; it splits exactly the three distinctions the canonical vocabulary conflates and invents nothing else. See that module.

§The four kinds of fact, kept apart by the type

A development task mixes facts that answer to different owners, and conflating them is how a projection ends up overwriting what a person wrote. So they are four groups of one structure rather than one flat bag of keys:

groupownermay this executable write it
task::DevTaskDeclarationthe canonical record, authored by a personno; majordomus plan record writes
task::DevTaskPositionderived from the plan graph, stored nowherenothing to write
task::DevTaskExecutionlocal execution state: git refs, commits, sessionsnothing to write
task::DevTaskSynchronisationthe external projection on GitHubnever; the adapter owns it

Nothing here writes anything at all, which is what makes the last row safe: a user-authored GitHub value cannot be silently overwritten by a reader.

Re-exports§

pub use graph::CriticalBlocker;
pub use graph::MilestoneCounts;
pub use graph::MilestoneEdge;
pub use graph::MilestoneGraph;
pub use graph::MilestoneNode;
pub use graph::ParallelSet;
pub use graph::ScopeConflict;
pub use readiness::Blocker;
pub use readiness::BlockerKind;
pub use readiness::TaskReadiness;
pub use task::DevTask;
pub use task::DevTaskDeclaration;
pub use task::DevTaskDiagnostic;
pub use task::DevTaskExecution;
pub use task::DevTaskPosition;
pub use task::DevTaskSynchronisation;
pub use task::ReadinessVerdict;

Modules§

graph
The milestone as a typed dependency graph, with the partitions a work surface would otherwise compute for itself.
readiness
Task readiness: a derived projection of the canonical status, and not a second vocabulary for it.
task
One issue read as an executable development task.

Structs§

AttestationTally
How much of one answer was authored, and how much a machine worked out.
AttestedCount
A count with its provenance. Separate from AttestedText because a wave, a commit tally and an evidence count are numbers a caller does arithmetic on, and a number rendered as a string is a number every client has to parse back.
AttestedList
A list with its provenance. The distinction a bare Vec cannot make is the one that matters here: depends_on: [] in the record is an authored empty list, and a record with no depends_on key is unknown. Both are empty; only one is a statement.
AttestedText
One scalar with its provenance: the unit every field of a development task is made of.

Enums§

FieldProvenance
Where a value came from, and therefore how much weight a reader may put on it.