Skip to content
MFFunmakerPublic

About

Laravel and DDD architecture stack for clean agentic coding

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LAD Stack

Laravel-and-DDD Stack: opinionated Laravel + DDD architecture guidance (guidance/LARAVEL_DDD_ARCHITECTURE.md), agent playbooks and lenses (guidance/), a JSON punch-list format (schema/), and a runner (lad) that works through queued punch lists with Claude Code, Codex, and the Antigravity CLI (agy, for the Gemini 4 models). Grok Build's driver comes later.

Repository layout

Path What it holds
guidance/ Agent entrypoint (ENTRYPOINT.md), LARAVEL_DDD_ARCHITECTURE.md, principles, playbooks, lenses, sieves, domains, model notes, and NOTICE.md.
runner/ The lad CLI runner, multi-vendor drivers, verifier, publication engine, profile definitions (runner/profiles.json), and local browser watch UI (runner/web/watch.html).
schema/ JSON Schemas for punch lists (punchlist.schema.json, punchlist.v2.schema.json), task results, findings, rules, endpoints, and audit benches.
templates/ Starter punch lists for pre-run plan reviews (punchlist-review.json) and holistic codebase audits (quality-audit.json).
scripts/ Guidance integrity checks (check-guidance.mjs), PHP context slicer (slice-php.php), and fixture generators for testing the runner.
brand/ LAD Stack logo, icons, and SVG generation source.
CHORES.md / DREAMS.md Maintainer engineering backlog (CHORES.md) and long-term design explorations (DREAMS.md).

Use

Requires Node 24 or later, and systemd user scopes for the resource caps.

npm install
npm run lad -- validate path/to/punch-list.json --repo path/to/repository
npm run lad -- show path/to/punch-list.json
npm run lad -- run a.json b.json --repo path/to/repository [--after merge|pause|hold]
npm run lad -- status --repo path/to/repository
npm run lad -- watch --repo path/to/repository [--port 4170]
npm run lad -- answer "Editors publish; authors only draft." --repo path/to/repository
npm run lad -- steer "Keep the old column; add the new one beside it." [--now] --repo path/to/repository
npm run lad -- set [--task <id>] --effort xhigh --repo path/to/repository
npm run lad -- stop --repo path/to/repository
npm run lad -- resume [--message "text"] --repo path/to/repository
npm run lad -- report [--run <id>] [--json] --repo path/to/repository
npm run lad -- profiles

validate exits 0 when the punch list is ready to run, 1 when it is invalid, and 2 when an open question blocks a task. Point a punch list's $schema at schema/punchlist.schema.json so your editor validates it and shows each field's meaning.

run exits 0 when the queue finishes, 2 when it waits for you (a question, a pause, or a held branch), and 1 when it fails or stops. It holds a branch, whatever its after setting, when the closing review leaves a critical finding open. Its state and the agents' transcripts are in ~/.local/state/ladstack/, outside the repository.

Watch a run in a browser

lad watch serves one page at http://localhost:4170 that shows the repository's latest run, and follows a newer run when it starts. The terminal output and lad status stay as they are; the page is a second view of the same files.

  • What it shows: each task with its state, model, effort (on a knob), and one tick for each turn; one lamp for each task in the top band; a chart of the task's actions by kind over time (reads, edits, commands, tests, commits, messages), one colour for each kind, as ridgelines, or as dots or hatched line-drawn blocks that count the actions in each time column (hold the pointer on a column for its counts); each action of the agent as it occurs; the notes the agent writes as it works, in the terminal and in a Notes tab; each check command with its duration and result; the tests rerun on the start commit, with the reason when a test stopped with an error; the findings; the result, with the decisions the agent made without you, its domain checks, its handoff, and the commits.
  • What it can do: answer a question, send a message to the agent, change the model and effort of a task, stop the run before its next turn, and continue a run that stopped. Each of these is also a command.
  • Merge a held branch: a held run shows "Merge into develop" in place of "Resume". It asks once more, with the branch's name and a choice to delete the branch after, then runs lad resume --merge [--delete-branch]: the runner merges with --no-ff and its own message, runs the done gate again when the base moved since the branch started, and continues the run. A merge that conflicts stops and changes nothing. To end a stopped run early, for example before a second audit pair that a follow-up doesn't need, lad resume --merge --skip-rest marks the tasks that have not started as skipped by you and merges the branch; it refuses while a task is part-way through.
  • Start a run: "Punch lists", below the notes ledger, lists the punch lists in punchListDirectory as ready (valid, and no run of the repository ran it), ran, or invalid, with why lad run refuses it. Choose a ready one, choose what happens after it (merge into develop, merge then pause, or hold the branch for your review), and start it, when no other run is in the way.
  • A start that can't happen: before the page starts a run, a review, or a plan, it makes every check that lad run makes, and it refuses with the same reasons. For example, it names the paths with changes that are not committed. A refused start changes nothing: no note is marked, and no punch list stays behind. The start buttons are off while a reason holds, and they say it. If a start fails after those checks, a notice at the top says that nothing ran, with what the runner wrote.
  • How it reads: it follows the system's light or dark theme, works with the keyboard alone and with a screen reader, and keeps still when the system asks for reduced motion. The activity list is a terminal that colors the parts of each line: the command, its subcommand, flags, strings, paths, operators, and exit codes. It keeps its place while you read earlier rows. Below it, "Show" narrows it to the agent's messages, the commands, or the checks, and a switch shows long commands in full or as their first three lines.
  • Subagents: when the agent of a task starts subagents, tabs show along the terminal's top edge: "Main agent", fixed, then one tab for each subagent, named by the description the agent gave it, in one row that scrolls sideways. A lamp shows how each one stands (Sneeze works, Kyuri finished, Tobiko failed, dark stopped). From four subagents on, a bank of lamps at the row's end shows all of them at once and opens a board of every subagent. A tab shows that agent's own activity in the terminal; the arrow keys, Home, and End move between the tabs, and a click on a "subagent started" row in the main list does the same. The runner tags each action of a subagent with the id of the call that started it. Only the Claude Code driver reads subagents for now; the Codex driver does not tell them apart.
  • How it looks: the palette is Mindful Palettes No. 193, on white paper and satin Forest plastic under one light from the top: recessed trays, raised chips for whatever is chosen, keys that press, and Sneeze only for what is live or asks for an action. A WebGL shader draws the sunrise behind the LAD Stack logo, on a screen in the top band's frame; its colors show the run's state, and it swells for a moment at each action of the agent. Without WebGL a CSS gradient stands in for it. The page's typefaces are in runner/web/fonts (Fraunces, Instrument Sans, JetBrains Mono, each under the SIL Open Font License), and lad watch serves them, so the page needs no network.
  • Its limits: it listens on this machine only. It accepts a change only from its own page: each change carries a token that the server made when it started. lad watch can stop at any time and a run is not affected: a run that the page continues gets its own systemd user scope, so it does not belong to the page's process or service.
  • A run that a process drives is never changed by another process. The page and the commands write a request to the run's inbox.jsonl, and the runner reads it within two seconds. The runner records its process in runner.pid.

Model, effort, and subagents

Each task runs with four settings: the main agent's profile, the main agent's effort, the profile whose model its subagents use, and the subagents' effort. lad profiles lists every value.

  • Where a setting comes from. For each setting, the first source that names it wins: the task in the punch list (profile, effort, subagents), then the options of lad run (--profile, --effort, --subagent-profile, --subagent-effort), then the punch list's defaults, then ladstack.json (defaultProfile, defaultEffort, subagents). With no effort named, a task uses its profile's own effort.
  • During a run. lad set and the page change a task that has not finished. A task that has started keeps its model, because its session belongs to one model; a new effort applies from its next turn. Without --task, lad set changes every task that has not started. A new model for every task leaves the tasks of the review tail (the closing review and the post-review, or the audits and the remediations) on their own models, because each must come from another vendor than the work it checks; name one with --task to change it.
  • What is refused. No effort is below high. An effort that the chosen model does not take is refused, and the message lists the efforts it takes. A change that gives the closing review or the first audit the vendor of a task that builds, the post-review the closing reviewer's vendor, a remediation its audit's vendor, or a second audit the first remediation's vendor, is refused.
  • Claude Code. The runner sets CLAUDE_CODE_EFFORT_LEVEL, so the main agent and every subagent use the task's effort; a subagent on another model otherwise uses that model's default, which can be below high. Claude Code has no separate effort for subagents. A subagent profile is set with CLAUDE_CODE_SUBAGENT_MODEL and CLAUDE_CODE_SUBAGENT_MODEL_FORCE, so every subagent uses that model.
  • Codex. The runner sets agents.default_subagent_model and agents.default_subagent_reasoning_effort. These are defaults: the main agent can name another value when it starts a subagent, so the task prompt tells it not to. The effort ultra sends xhigh to the model and tells it to delegate to subagents without being asked; at every other effort Codex starts a subagent only when its instructions ask for one.

Send a message to a running agent

lad steer "<text>" sends a message to the agent of the task that runs. lad answer is for a run that stopped with a question.

  • Claude Code receives the message while it works, when its running tool call ends. The runner keeps the session's input open for this.
  • Codex reads its input one time, so the message waits for the end of the turn. The runner then sends it in a new turn of the same session, before it checks the result.
  • --now stops the agent's turn and continues the session with the message. The command or edit that was running does not finish, and the agent is told so. Use it when the agent must not complete what it is doing.
  • A message for a run that no process drives waits in its task. lad resume sends it.
  • lad stop stops the run before its next turn. Ctrl-C in the terminal of lad run still stops it after the current turn.

ladstack.json

Each target repository has a ladstack.json at its root:

{
  "gate": ["lando gate"],
  "defaultProfile": "anthropic-opus-5.5",
  "wrapper": "lando",
  "writableRoots": ["~/.lando"],
  "base": "develop",
  "requirementTests": {
    "paths": ["tests"],
    "tag": "group\\([^)]*['\"]{id}['\"]",
    "run": "lando artisan test --compact {ids:--group=} --log-junit storage/logs/lad-junit.xml",
    "runOne": "lando artisan test --compact --filter={test} --log-junit storage/logs/lad-junit.xml",
    "report": "storage/logs/lad-junit.xml"
  },
  "frozen": ["phpunit.xml", "phpstan.neon", "pint.json"],
  "caps": { "memoryMax": "24G", "cpuQuota": "1600%" }
}
  • gate and defaultProfile are required. The profiles are in runner/profiles.json.

  • defaultEffort and subagents ({ "profile": "...", "effort": "..." }) are optional defaults for every task; see "Model, effort, and subagents".

  • requirementTests finds the tests tagged with each requirement a task covers, and runs them. Without it, covered requirements aren't traced to tests.

  • requirementTests.run names the covered IDs with one of three placeholders: {ids} (comma-separated), {idsPattern} (a regex alternation), or {ids:<prefix>}, which repeats the prefix once for each ID. PHPUnit 10 and later read --group once for each group, so a Pest or PHPUnit project needs {ids:--group=}.

  • requirementTests.report is a path, which git ignores, where run and runOne write a JUnit XML report. With it the runner can tell a test that fails by assertion from a test that stops with an error. runOne runs the one test with a given name; the runner uses it for the test of a finding that a review fixed.

  • frozen lists path patterns that no task may change: the files that configure the checks. ladstack.json is always frozen. A task changes a frozen path only when the punch list names the path in the task's unfreeze, and lad validate reports each such task.

  • wrapper is optional: set it to null (or omit it) to run commands directly on the host instead of through a container wrapper like lando.

  • writableRoots lists directories outside the repository that Codex's sandbox may write (for example, Lando writes ~/.lando on every command). The sandbox already reaches Docker when a container wrapper is used, so DCG, the branch, and the caps are the real guards, as they are for Claude Code.

  • ownerAnswers is the file where the owners answer domain questions, docs/owner-answers.md by default. When it exists, every prompt names it, and agents don't raise a question that it answers. Each prompt also lists the domain questions that the run's earlier tasks raised, so a later task doesn't raise one again.

  • punchListDirectory is where a punch list made from notes goes, docs/punchlists by default.

  • audits can override the commands run after a lockfile changes. They default to composer audit and npm audit --audit-level=critical through the wrapper.

  • The caps apply to each agent session and each check. Work a wrapper hands to Docker, such as Lando's containers, runs outside them.

  • risk is the application's risk bar. Every prompt gives it to the agent:

    "risk": {
      "deployment": "One web server, one PostgreSQL database, and one queue worker for a small internal app. It will not scale out.",
      "impossible": ["A second database, a read replica, or a second database connection inside one request", "A change of queue connection while the application runs"],
      "fix": { "critical": ["deliberate", "routine", "uncommon"], "high": ["deliberate", "routine", "uncommon"] },
      "person": { "critical": ["rare"], "high": ["rare"] }
    }
    • deployment says what the application runs on and who uses it. Agents judge likelihood at that scale.
    • impossible lists conditions that cannot occur. A defect that needs one of them is not a finding: no report, no note, no test.
    • fix lists the severities and likelihoods that agents fix in the run. person lists those that go to you to judge. Every other finding is recorded as a known limit. These defaults apply without risk.
    • A finding to judge or a known limit is not auto-fixed during an active run; it waits in the notes ledger under "To judge" or "Known limits" with what it affects and how it happens, in plain words. Unresolved rare Critical findings never stall feature work or trigger automatic remediation, and every unresolved Critical holds publication at the end on one grouped candidate-bound Accept/Fix screen (lad resume --merge --dispositions <file> or lad watch). For non-Critical findings, "Fix" sends it to the offered notes and "Not a bug for us" dismisses it with your reason (lad notes --status judge and lad notes promote <handle>).
    • A remediation gets only the findings to fix, and is skipped when there are none.
    • A punch list made from notes is a follow-up ("followUp": true), so one audit pair ends it, also when a task names a domain.

Before the first run on a machine

lad run refuses to launch a runtime that dcg doctor doesn't report guarded. dcg doctor doesn't check the Antigravity CLI (agy), so for agy the runner reads ~/.gemini/config/hooks.json and sends its run_command hook a git reset --hard, which the hook must refuse. That hook needs DCG 0.16.0 or later and the matcher run_command; dcg install --agy writes Bash, which never matches.

Registration isn't behavior, so also confirm once per runtime that DCG blocks a destructive command in a headless session, in a throwaway repository:

claude -p --permission-mode bypassPermissions "Run exactly this shell command once and report what it returned: git reset --hard HEAD"
codex exec -s workspace-write -c 'approval_policy="never"' "Run exactly this shell command once and report what it returned: git reset --hard HEAD"
echo "Run exactly this shell command once and report what it returned: git reset --hard HEAD" | agy --settings '{"toolPermission":"always-proceed","enableTerminalSandbox":false}'

Each must report BLOCKED by dcg.

Before a run: review the punch list

lad validate checks a punch list's structure. It can't judge whether each task fits one session, whether each outcome can be observed, or whether a task hides a product decision. So have a second vendor review the plan first:

  1. Copy templates/punchlist-review.json into the repository's punch lists, and give the copy its own id.
  2. Set the two paths marked TO-SET: the spec, and the punch list under review.
  3. Set its profile to a vendor that won't build the tasks, and run it like any other punch list.

It writes its verdict and findings to docs/audits/.

What the runner tells an agent, and when

  • At the start of a task, the prompt gives the punch-list header, the task, the checks the runner will run, and each earlier task's handoff. A handoff is what an agent wrote for the agents after it: its decisions, the names it introduced, and the work it left unfinished. Its summary is for you.
  • A review or an audit task gets no handoffs, so it judges the work from the code and not from what the builders wrote about it.
  • When the same kind of check fails in two rounds, the repair message tells the agent to read the attack-the-premise principle before another fix.
  • After an answer or a resume, the message tells the agent to read the task and its notes file again.

Proof on the start commit

A test that passes with and without a change shows nothing about the change. So the runner reruns some tests on the commit where the task started, with only the task's test files added, and they must fail there:

  • The tagged tests of a bug fix. For each requirement in the task's covers, at least one tagged test must fail. This is on for a BUG_FIX task, and for any task that sets proveFirst.
  • The test of each finding that a review marks fixed. The finding names the test in proofTest. The test must also pass at the task's last commit.

A test that passes on the start commit goes back to the agent as a failed check. A test that stops with an error, for example on a class that the change adds, is recorded and does not fail the check. For this check the runner moves the working copy to the start commit and back; it needs a clean tree, and it discards nothing.

Measuring a run

lad report builds a scorecard from a run's state and events, prints it, and saves it as scorecard.json beside the run's state. It covers:

  • each task's first pass, repair rounds, the kinds of check that failed, questions, and turns;
  • time: each task's agent turns and checks, without the time when nothing ran. Halts are listed on their own line: a wait for your answer, a stop, or a turn that ended without a result (as at a restart) until the run was resumed;
  • usage: the cost each runtime reported for each turn alone (Claude Code reports a resumed session's running total, so the session's previous total is subtracted), and, for a runtime that reports only tokens, an estimate at the list prices in runner/prices.json, marked as an estimate;
  • the findings of the reviews, audits, and hardening tasks, by severity, likelihood, and lens, each as it stands at the end: fixed, disputed, or open. An audit's finding stands as the remediation after it settled it;
  • the defects in fixes, and the defects found late. The runner reads git blame on the lines that each finding of a review or an audit names, and the fixed findings that its text names. A finding in lines that an earlier fix of the run changed, or that names that fix, is a defect of the fix, with the chain of fixes that each caused the next defect (A-1, then B-1, then C-1). A finding in older lines that an earlier review of the run checked, and that names no fix, is listed too: that review missed it, or a later change elsewhere made the lines wrong. Read the history to confirm each one;
  • the commits that no agent reviewed: the last fixes of the review tail, where your review of the branch starts;
  • the domain questions for you, each shown once with every task that raised it in the same words;
  • the playbook steps agents skipped, and why;
  • the guidance files agents read, and the files no task read in the last five runs;
  • the guidance files a result listed that no read or command in its session named;
  • the tests rerun on each task's start commit, and whether each one failed, stopped with an error, or passed;
  • the follow-ups agents noted outside their tasks' scope;
  • the requirements traced to passing tests.

A guidance file that no task reads for five runs has a trigger that doesn't fire, or it isn't needed. Fix the trigger or remove the file.

Check failures that keep recurring are candidates for a stronger check or a clearer rule. Recurring findings are candidates for an architecture test.

The scorecard counts what the runner saw, not whether the code is right. For a deeper holistic audit after a real queue:

  1. Copy templates/quality-audit.json into the repository's punch lists, and give the copy its own id.
  2. Set its profile to a vendor that didn't build the code.
  3. Run it like any other punch list.

It grades four areas — Architecture and DDD, Workflow correctness, Security, and Test proof — on an A–F scale and writes the report to docs/audits/. Its findings show up in lad report.

The fixture run

node scripts/make-runner-fixture.mjs <empty-directory> creates a tiny repository, and fixtures/runner/farewell.json runs against it: Claude Code builds a feature that covers two requirement IDs, and Codex reviews the branch.

The notes ledger

Agents write notes with lad note as they work. The ledger holds the notes of every run of a repository, and what happened to each one:

  • Offered: a note that its task moved out of its scope or left open, or a follow-up from the result of a task that kept no notes. Older runs join the ledger through their follow-ups.
  • Resolved: the closing review checks the run's offered notes and marks each one open or resolved, with evidence. A resolved note leaves the scorecard's follow-ups.
  • Dismissed, restored, planned: your decisions, from the watch page or from lad notes.

The watch page's "Notes ledger" entry, above the punch lists, shows the ledger. Check the notes that matter and choose "Make a punch list": the runner writes a planning punch list whose one task, in the NOTES_TO_PUNCHLIST mode, checks each note against the code and writes a punch list for the ones that still hold, in punchListDirectory (docs/punchlists by default). Its run starts when no other run is in the way, and ends held for your review.

Review relevance. Choose notes, or "Choose all shown", and "Review … for relevance", with the model profile (which sets the provider and the model), the effort, and the subagents' settings. A note reads "In review" only while that review's run works or starts. When the task is done, one row of the terminal gives the count of each verdict. The run's one task, in the NOTES_REVIEW mode, checks each note against the code and gives it a verdict, and changes no file:

  • Act on it (open): the note stays offered, with its severity, what to change, and where.
  • No action (no-action): an observation, a note about an agent's own session or tools, a choice that a decision settles, or a defect too small to report. The note is dismissed with that reason; restore it from the Dismissed list.
  • Outdated (resolved): already fixed, wrong, or a repeat of another note, which the evidence names.

A punch list whose every task is read-only runs on its base branch with no branch of its own, and ends done with nothing to merge.

npm run lad -- notes --repo <dir>                       # the offered notes, with their handles
npm run lad -- notes review --all --profile <id> --effort <level>   # writes the review punch list; lad run starts it
npm run lad -- notes dismiss <handle> --reason "..."    # restore brings one back
npm run lad -- notes plan <handle>... [--profile <id>]  # writes the planning punch list

The closing audit and the remediation

The recommended end of a punch list splits finding from fixing, because a reviewer that also fixes is often right about the defects and less often right in its fixes.

  • The audit. A CLOSING_AUDIT task with allowed: read-only, on openai-gpt-6.2-astra at xhigh, from a vendor that built no task. It audits the punch list's commits and changes no code. Its findings go to the remediation, and its policy questions to you; the run waits for the answers. The runner refuses a commit from it, and doesn't run the checks again, because the code is as the last task left it.
  • The brief. An AUDIT_BRIEF task with allowed: read-only, right before the first audit, on google-gemini-4-neon at xhigh or on another model from a vendor other than the audit's. It reads the finished code and writes the brief that the audit starts from. For each requirement, the brief gives the claim, each place where the code implements it or a test proves it, what the code branches on there, and each way the claim could be false, as a question that names code. It also gives the main story of the work, step by step, with explicit values. It judges nothing and lists no finding. The planning step can't write these questions, because the code does not exist yet. The runner sends back a brief that leaves a requirement out, names a path that does not exist, or asks no question. A punch list without the task is valid: the audit then starts from the manifest alone.
  • One document for the auditor. The first message of a closing audit is the playbook modes/CLOSING_AUDIT.md with this run's data in each of its four parts, so the auditor reads one brief and no rule is stated in two places. Part 1 is the mode and its limits: read-only, who reads the result, what is true (the punch list's requirements and decisions, and its authority) and what is only a claim to test (the code, every test, each agent's account, and the brief), and the application's risk bar. Part 2 is what is under audit: the commits, and a manifest that the runner builds, with each task's requirements and the files it changed. Part 3 is the checks, with the requirements to judge, the brief's questions, and the story to walk. Part 4 is the output and the rating rule in full. The punch list and the task follow as appendices.
  • A verdict for each requirement. A first audit returns requirementReview: for each requirement that a task delivers, met with the code as path:line and the test that proves it, broken with the finding's id, or unproven with what proof is missing, and in proves what the tests actually prove against what the requirement says. It returns walk: each step of the main story, with holds, breaks, or unproven and the code that handles it. The runner sends back a result that leaves out a requirement or a step. lad report lists the requirements that are not met, the met ones whose tests prove less than the requirement says, and the steps that do not hold.
  • The remediation. A REMEDIATION task with allowed: code, on google-gemini-4-neon or anthropic-opus-5.5 at xhigh, from a vendor other than the audit's. Its prompt gives the audit's findings and your answers. It writes a test for each finding, fixes each one that holds (after the SIBLING_PATHS sieve over what the fix changes), commits each fix on its own, and gives every finding a status in findingReview: fixed, disputed, or open. The runner sends back a result that leaves a finding without a status.
  • The second pair. A second audit, on Astra again, reviews only the remediation's commits, and a second remediation fixes what it finds. A different model than the first remediator is recommended, such as Opus after Neon, so that the second fixer doesn't repeat the first one's mistakes. The second pair is required when a task names a domain.
  • Coverage. A closing review, a post-review, and an audit list in coverage each file that the commits they review change, with the functions or rules they checked in it, what they checked them with, and the result. The runner sends back a result that leaves out a changed file, so a skipped file is visible.
  • Case tables. Each fix, and each audit of a fix, runs the CASE_TABLE sieve: it lists every combination of the inputs of a changed rule and tests each row. A fix that is tested only for the case of its finding most often breaks another case.
  • A defect in a fix. When an audit's finding is in lines that an earlier fix of the run changed, the remediation's prompt names that fix. When the chain has three or more findings, so the fixes broke the code again twice, the prompt tells the remediation not to patch the rule again: it writes the rule's full case table, tests each row, and changes the rule so that every row passes.
  • When a step is skipped. The runner skips a remediation whose audit found nothing, and a second audit when the remediation before it made no commit.
  • A critical finding that remains unresolved at publication — including a disputed or rare Critical — holds the candidate merge on one grouped candidate-bound Accept/Fix decision (lad resume --merge --dispositions <file> or lad watch).

The older ending, a REVIEW_AND_FIX task that a POST_REVIEW task may follow, is still accepted, and audit pairs may follow it: the first audit then checks the post-review's fixes, on a vendor other than the post-review's.

Adding tasks to a run. To check more before you merge a held branch, add tasks at the end of its punch list, commit the file, and run lad resume. A stopped run takes new tasks too, anywhere after the tasks that have started: for example, an audit brief before a closing audit that has not begun. Stop the run, add the task, commit the file on the run's branch, and run lad resume. It takes the new tasks only when every task of the run and every other field are unchanged and in the same order, and it validates the punch list again; any other change is refused, and nothing changes. The run then continues on its branch.

lad extend <punch-list.json> does the same with no change to the repository, and starts nothing. Give it a file with the new version of the punch list, anywhere on disk. The run takes that version as its own copy and reads the copy from then on; the file in the repository stays as it is. Use it when the punch list's folder is a frozen path: a new version committed on the run's branch is then a change inside a task's commits, and that task fails its checks. No process may drive the run: stop it first, run lad extend, then lad resume or the page's Resume button. A stop between two tasks leaves the next task as it was, with no start commit. A run keeps a copy of each punch list it runs; for a run started before that, lad resume finds the punch list as the run started in git, by the SHA-256 the run recorded.

The post-review

The closing review is the last task that writes code, so before the post-review nothing but the gate read its fixes. A POST_REVIEW task may follow it as the punch list's last task:

  • What it reviews. Only the closing review's commits. Its prompt gives their range, and the findings, choices, and questions the closing reviewer reported, as claims to test. It checks each fix with the SIBLING_PATHS sieve, the task's lenses, and the domain files the punch list's tasks name. It fixes what it confirms, and returns a new product rule as a question.
  • Who runs it. A vendor other than the closing reviewer's. The task names its profile; the planning playbook suggests google-gemini-4-neon at xhigh.
  • When it is required. lad validate refuses a punch list in which a task names a domain, such as TIME or MONEY, and no post-review follows the closing review.
  • When it is skipped. When the closing review made no commit, the runner marks the post-review done without a session, and the scorecard and the watch page show why.

Measuring the closing review

No scorecard shows how many defects a review misses. This fixture does: its branch holds five known defects, and its own tests pass with them in place.

node scripts/make-review-fixture.mjs <empty-directory>
npm run lad -- run fixtures/runner/guestbook-review.json --repo <that-directory>
npm run -s lad -- report --json --repo <that-directory> | node scripts/score-review-fixture.mjs

The last command prints how many of the five the review found, and the findings that match none of them. fixtures/review-recall/planted.json lists the five. The match is by file and by words in the finding's title, so confirm each match by reading it. Use a new directory for each run, and change the task's profile to measure another model.

The audit bench measures an audit on your own repository's history. A bench file (schema/bench.schema.json) lists commit ranges, each with the defects known to be in it: for example, defects that a later audit found in a fix, which the scorecard's "Defects in fixes, and defects found late" lists. lad bench runs one closing audit on each range, with the repository at the range's last commit, and reports which known defects the audit found, which it missed, and the other findings for you to judge. A finding matches a known defect when it names the same file and a line within three lines of the defect's range.

npm run lad -- bench <bench.json> --profile openai-gpt-6.2-astra --effort xhigh --repo <dir> [--case <id>]

The tree must be clean, and no run may be running, because the bench moves the repository to other commits and returns to the branch after each case. Each bench run has its own state folder under the repository's state, in bench/, so it is never the latest run and adds nothing to the notes ledger. The report is saved there too. Keep the bench file outside the repositories LAD Stack serves when it names a project's defects, and run it again after each change to a prompt or a model note. scripts/make-review-fixture.mjs also writes a neutral bench file, bench.json, with the guest book's five planted defects, and keeps it out of git.

Develop

npm run check   # type-check
npm test        # run the tests

About

Laravel and DDD architecture stack for clean agentic coding

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages