Skip to content

Commit 55ee844

Browse files
Summarize workflow design discussion
1 parent 6deb7d4 commit 55ee844

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,85 @@ contract, conflict handling, visual-design evidence, recorder, and learning
1111
boundary are documented in `docs/architecture.md`. Machine-readable node status
1212
and the required reviewer set live in `src/graph-definition.ts`.
1313

14+
## How we arrived at this architecture
15+
16+
This project grew out of a discussion about three overlapping ways of thinking
17+
about AI-assisted development. Harness engineering gives a coding agent its
18+
working environment: repository context, tools, skills, constraints, and a goal.
19+
The agent can think, act, inspect the result, and correct itself within a turn.
20+
Codex goal mode adds a durable outcome and verification criteria across that
21+
work, but it is not the same as an independent reviewer.
22+
23+
Loop engineering moves beyond a single human prompt and agent turn. We used the
24+
four-loop model in which the agent loop performs the work, the verification loop
25+
sends failed work back, the event-driven loop starts runs from GitHub events or
26+
schedules, and the hill-climbing loop improves the system from accumulated
27+
experience. These loops are nested rather than competing ideas:
28+
29+
```mermaid
30+
flowchart LR
31+
H["Hill-climbing loop"] --> E["Event-driven loop"]
32+
E --> V["Verification loop"]
33+
V --> A["Agent loop"]
34+
```
35+
36+
Graph engineering does not claim that these mechanisms are new. It foregrounds
37+
an aspect that can become hard to see when everything is called a loop: the
38+
topology connecting agents, deterministic checks, parallel reviewers, joins,
39+
repair routes, persisted state, side effects, and human decisions. The concise
40+
distinction for the webinar is: loop engineering focuses on repeated execution
41+
and feedback; graph engineering focuses attention on the relationships through
42+
which that work moves.
43+
44+
For this implementation, Codex is the write-capable software-development worker,
45+
while Mastra is the durable TypeScript orchestration layer around it. That
46+
separation lets the coding harness concentrate on implementation and lets the
47+
graph control triggers, correlation, retries, suspension, concurrency, and
48+
review routing. Mastra also fits the Angular meetup context better than making a
49+
Python-first orchestration framework the centre of the demonstration. OpenHands
50+
and Hermes were considered useful coding-agent or self-evolution references,
51+
but neither replaces the explicit orchestration graph needed here. Hermes's
52+
self-evolution work particularly influenced the separation between recording a
53+
run and later evaluating a proposed improvement.
54+
55+
The development graph begins with a GitHub issue or pull-request event. Before
56+
implementation, a readiness node verifies that the issue has enough information
57+
and meaningful acceptance criteria. It may ask a human for missing context or
58+
propose multiple child issues when the work contains independently deliverable
59+
outcomes. The system must not invent product decisions merely to keep moving.
60+
61+
One Codex worker then implements an accepted issue in an isolated worktree. Its
62+
inner self-correction answers whether its latest action worked; goal validation
63+
answers whether the overall requested outcome is complete. Deterministic checks
64+
then run repository-owned tests, builds, linting, type checks, and policies.
65+
Agent-written tests are useful implementation output, but they cannot alone be
66+
independent proof that the same agent understood the requirement correctly.
67+
Acceptance criteria, existing tests, externally defined checks, independent
68+
review, and human evaluation form that boundary.
69+
70+
After those checks, read-only specialist reviewers independently examine
71+
security, architecture, framework-specific practices, performance, tests,
72+
accessibility, code quality, likely bugs, and visual design. Visual design is a
73+
real rendered-output review: it needs baseline and candidate screenshots and
74+
application design references, not merely source-code inspection.
75+
76+
A manager node consolidates reviewer evidence rather than counting votes. It
77+
deduplicates findings, resolves compatible recommendations, and returns one
78+
bounded repair brief to implementation. If architecture and performance, for
79+
example, recommend genuinely incompatible choices and the acceptance criteria do
80+
not establish the priority, the manager suspends the run. A human then receives
81+
both arguments, their evidence and costs, and the precise decision required.
82+
83+
Finally, a recorder captures enough evidence to reconstruct what happened:
84+
inputs, attempts, commands, changed files, deterministic results, reviewer and
85+
manager decisions, human feedback, outcomes, and exact graph, prompt, skill,
86+
rubric, and model versions. Learning is deliberately a separate scheduled
87+
process. It reads new experiences after `lastAnalysedRunId`, distils recurring
88+
lessons, proposes versioned candidates, and replays the same cases against a
89+
frozen baseline. Regression and safety gates plus human approval are required
90+
before a candidate can affect future runs. The production graph never rewrites
91+
itself while it is running.
92+
1493
## Implemented control-plane slice
1594

1695
GitHub events are recorded in SQLite first and acknowledged quickly. A

0 commit comments

Comments
 (0)