Files

7.2 KiB

How work is done

The cycle of a task, the templates it is written in, the ledgers where whatever a task doesn't resolve is recorded, and what an agent may do. Labels are in labels.md; the owner's rules, in AGENTS.md §1.


1. The cycle of a task

  1. Take. One task at a time, and only if it has status/ready and agent-ok; never a human-only one. Read the Done when criteria before starting. The label moves to status/in-progress.
  2. Read. AGENTS.md, the issue and the documents its Context field names. If something is missing to understand the task, note it in the issue; don't explore the whole tree.
  3. Do. In the component the area/* label names. If the task belongs to a line of work with a working branch (for example feature/model-proto), on that branch, in each repo it touches; if it's part of a composite, on the composite's branch (created with its first task if it doesn't exist yet); if it's standalone, on its own branch. All of them come off dev (rule 10). Commits in this repo cite their issue; commits, pull requests and code in the deliverable tree don't (rule 12). Each test documents why it exists (rule 11; testing.md). Targeted tests (rule 7; commands in testing.md). The rules in AGENTS.md §1 apply without exception.
  4. Record. Whatever isn't resolved inside the task goes to its ledger (§3) and is cited in the issue. The task doesn't grow to resolve it.
  5. Close. Check the criteria one by one. A comment on the issue says what was done, with the evidence (command and result), the ledger ids recorded, and the commits and pull requests that resolve it (the deliverable tree doesn't point back, rule 12). The label moves to status/needs-review. Commits go on the branch and only when asked (rule 1); pushing the branch needs permission every time. When every task of a composite is in status/needs-review, the composite moves to status/needs-review and a person opens the pull request from its branch into dev in Gitea (rule 10); merging closes the composite and its tasks.

2. Tasks and composites

Task: what one session finishes. One component (area/*), criteria checked with targeted tests, no owner decision inside. Whatever doesn't fit in one session is not a task: it's a composite.

Composite: an issue grouping tasks that are merged together, because separately they would leave dev half-done. It has its own branch; its tasks commit to it; it's merged once. In Gitea, the composite lists its tasks and depends on each one (issue dependencies), and each task says which composite it's part of. A standalone task has its own branch and its own merge.

Working branch: a long-lived branch for a line of work that spans several issues and repos (for example feature/model-proto, for the models prototype). It has the same name in every repo it touches, collects the tasks of that line one commit at a time, and is merged into dev after each completed task; work then continues on it.

Whatever needs an owner decision or approval (rules 3, 4 and 7, clinical rules) goes in a separate human-only issue, which the tasks that need it depend on.

Each plan has its plans/<plan>/tasks.md with its composites and tasks in these forms. Once posted to Gitea, the issue is the source of the status and tasks.md keeps its number.

Task:

## <Phase>. <Title>
Goal: <one line>
Description: <prose: what is done and what isn't>. Done when: <checkable criteria>.
Context: <documents to read: plan and section, decisions DA-n, findings I-DBT-n>
Depends on: <tasks>
Approval: <rule of AGENTS.md §1 that needs approval, or "none">
Labels: type/… priority/… area/… status/… model/… review/… size/… agent-ok|human-only
Part of: <composite, or "standalone">

Composite:

## <Phase>. <Title>
Goal: <one line: what is in `dev` after the merge>
Description: <why these tasks are merged together>. Done when: <criteria for the whole>.
Tasks: <list, in order; each one fits in one session>
Branch: <type>/<issue>-<slug>
Depends on: <composites, tasks or decisions>
Labels: type/… priority/… area/… status/…
  • Done when says how it's checked, not how it's done.
  • A task is size/s or size/m; if it doesn't fit in one session, it becomes a composite of smaller tasks.
  • Whatever the task doesn't decide (a clinical rule, a parameter) isn't filled in with assumptions: it goes in as an explicit parameter with no default and is recorded in blockers.md.

3. Ledgers

In docs/ledgers/. Each entry has an id cited from the issue, the commits and the documentation. An entry isn't rewritten: its resolution is appended.

Ids are numbered per plan: the plan's code goes between the ledger letter and the number, and each plan counts from 1 in each ledger (I-DBT-1, I-DBT-2, I-AW-1…). The code comes from the plan the task belongs to:

Code Plan
DBT plans/dbt-and-models/ (orchestration, models and dbt replica)
AW plans/agent-workflow/
GEN anything that doesn't belong to a plan

A new plan picks a short code and adds it to this table. Decisions keep DA-n: each plan already has its own decisions.md.

Ledger What for Format
findings.md (I-<PLAN>-n) something went wrong or was surprising ### I-<PLAN>-n. Title — severity · status; What happens, Evidence, Consequence, Proposal, Decides, Decision
assumptions.md (S-<PLAN>-n) something was decided without a rule, to move on **S-<PLAN>-n. What was assumed.** + why, what it affects and how to revert it
grooming.md (G-<PLAN>-n) a proposal that needs review before becoming a task ## G-<PLAN>-n. Title; Where, What happens, What it conflicts with, Proposal, Evidence, Found in
blockers.md (B-<PLAN>-n) a decision that belongs to someone else ## B-<PLAN>-n. Title; What conflicts and where, Decides, Affects, Provisional value
open-items.md known open items, not yet classified list; each item can become an issue, a finding or a grooming entry

Severity: high (changes a result, exposes data or blocks a line of work), medium (forces a detour or a decision), low (tidiness or documentation).

Mapping to labels: a grooming entry is an issue in status/needs-spec; a blocker, an issue in status/blocked.

Decisions taken live in their plan's decisions.md (DA-n), with arguments, implications and alternatives. A resolved blocker becomes a decision and cites it.


4. What an agent may do

  • Always: read the tree and Gitea.
  • On its own, only on issues labelled review/none: move the status/* label (to status/in-progress when taking it, to status/needs-review when closing it).
  • With explicit permission for that action: move status/* on any other issue (review/light, review/required, review/domain-expert), comment, change other labels, create issues, commit, push branches.
  • Only when the owner asks for that specific one: open a pull request.
  • Never: approve or merge pull requests; take a human-only task.