Skip to content

Commit ce34413

Browse files
committed
Document task graph pattern for agents
1 parent 57c7ccc commit ce34413

3 files changed

Lines changed: 167 additions & 20 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Andrej Karpathy's [LLM Wiki](https://www.mindstudio.ai/blog/andrej-karpathy-llm-
4646
- **Durable typed links.** One agent attaches a `decision` / `depends-on` / `output` / `supersedes` link; a later agent in a fresh context receives it via `ats context`. The handoff lives in the task app, not a chat log.
4747
- **Execution context.** `ats intent` captures outcome/why/done-when; `ats lifecycle` keeps stale context from steering current work; `ats security` scopes actions and audits allow/deny; `ats ledger` records what an agent did and whether the task advanced; `ats promote` turns exploration into a committed goal; `ats hierarchy evaluate` checks local work still supports its parent.
4848
- **Bounded events.** `ats events watch --json` emits deterministic `task.created/updated/completed/...` NDJSON, spooled `0600` with pending/ack recovery and stable dedup IDs. ATS only emits observations — a consumer still evaluates intent, validity, and security before acting.
49+
- **Task graph for agents.** Tasks become structured nodes with proof, writeback, review, lifecycle, and link edges instead of free-form memory text; see [`docs/task-graph-for-agents.md`](docs/task-graph-for-agents.md).
4950
- **Curated at write time.** Every item is hung on a "trunk" (a theme like `writing`, `client-work`) the moment it's captured, so retrieval has structure to grab.
5051

5152
Metadata lives in flat YAML frontmatter on the task body, typed links in `## Related`, consulted sources in `## References`. Writes are **add-only** — ATS never drops a row or link a human added. [`npm run prove:intent`](examples/intent-layer/) runs a deterministic synthetic proof of the full path.
@@ -181,6 +182,8 @@ Install the binary on `PATH` first (`npm i -g @reneza/ats-cli`), or use an absol
181182

182183
ATS holds the line where agent systems fail: **writes round-trip without lossy re-encoding, the store → `Task` mapping is contract-tested, and every result carries its provenance** (`sources`, `find --explain`). A publish-safety gate ([`check-no-pii.mjs`](scripts/check-no-pii.mjs)) fails the build if personal data could leak into a package. Full note: [`docs/state-integrity.md`](docs/state-integrity.md).
183184

185+
For the agent-side operating model, see [`docs/task-graph-for-agents.md`](docs/task-graph-for-agents.md): task text is the human projection, but the execution layer needs structured links, proof commands, review requirements, and writeback targets.
186+
184187
## Working on ATS
185188

186189
Contributions welcome — bug fixes and especially new adapters under `packages/adapter-*`.

docs/task-graph-for-agents.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Task Graphs For Agents
2+
3+
Most task systems are designed for humans: titles, notes, due dates, and
4+
checkboxes. That is useful, but it is not enough when agents execute work across
5+
projects, repositories, websites, and publishing surfaces.
6+
7+
For an agent, the task system is closer to a program graph. The important
8+
question is not only:
9+
10+
> What task should I do?
11+
12+
It is:
13+
14+
> What state may I change, what proof do I need, and which downstream system
15+
> depends on the result?
16+
17+
Graph-first systems such as Zerolang make this distinction explicit for code:
18+
the readable projection is useful for humans, but the checked structure is what
19+
the agent should query and patch. ATS applies the same idea to task execution.
20+
21+
## Task text is not enough
22+
23+
An agent should not treat the title and body as the whole source of truth. It
24+
needs structured handles:
25+
26+
- project
27+
- trunk
28+
- owner
29+
- route
30+
- adapter
31+
- due date
32+
- source task
33+
- target writeback
34+
- proof command
35+
- review requirement
36+
- completion policy
37+
- public-facing risk
38+
39+
If these fields exist only as prose, every agent has to infer them on every run.
40+
That creates drift and collisions: two agents can grab the same work, publish
41+
without review, or mark a task complete when the real finish line was approval.
42+
43+
## The graph model
44+
45+
In ATS, a task can be treated as a node with edges:
46+
47+
- this task belongs to this trunk
48+
- this task updates this repo
49+
- this task depends on this blocker
50+
- this task writes back to this target
51+
- this task has this proof command
52+
- this task needs this human review
53+
- this task supersedes this earlier decision
54+
55+
Once the structure is explicit, agents can do less guessing. They can query
56+
current state, update the narrow field they own, leave review artifacts, and
57+
produce readback proof after a write.
58+
59+
## Production-shaped agent work
60+
61+
The common failure mode is not that the model cannot write code or text. The
62+
failure mode is that the workflow around the model stays informal:
63+
64+
- no deterministic definition of done
65+
- no durable approval step
66+
- no business-specific regression tests
67+
- no audit trail
68+
- no separation between "agent finished work" and "human approved release"
69+
70+
ATS helps keep that workflow attached to the task spine:
71+
72+
- `ats intent` records outcome, why, and done-when.
73+
- `ats link` records typed relationships such as `depends-on`, `decision`, and
74+
`output`.
75+
- `ats lifecycle` prevents stale context from steering current work.
76+
- `ats ledger` records what an agent did and whether the task advanced.
77+
- `ats context` retrieves the graph around the work instead of relying on a
78+
chat transcript.
79+
80+
## Practical rule
81+
82+
Do not let the agent own the finish line. The agent may propose the change, but
83+
the task graph should say what proof is required, where the result is written,
84+
and whether a human review is still blocking completion.

package-lock.json

Lines changed: 80 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)