lzwmt

dev-workflow

"A gated development workflow for AI coding agents: clarify -> spec + acceptance checklist -> spec review -> owner approval -> freeze -> restate-and-go -> independent review -> completion review -> acceptance -> owner-approved merge -> delivery report. Use when building a feature, fixing a delivered bug, or making a small change in any repository. Mandatory gates must not be skipped; scripts are checks, not the engine."

lzwmt 0 Updated 9h ago

Resources

11
GitHub

Install

npx skillscat add lzwmt/dev-workflow

Install via the SkillsCat registry.

SKILL.md

dev-workflow

The workflow is prompt-driven. The agent does the work with its native tools
(git, test runner, sub-agents). Two small scripts only keep it honest:
scripts/freeze-pkg.sh and scripts/checklist-lint.py.

Hard gates (never skip, in order)

  1. Spec review — After writing the spec + checklist (templates/spec.md,
    templates/checklist.md), have a different context review them
    adversarially (see adapters/reviewer/). Owner approval does not replace
    this review. The spec review covers exactly two things: the data
    contract
    (interfaces, fields, states, receipt semantics) and the
    acceptance matrix (every criterion falsifiable, anchors complete).
    Implementation detail is reviewed once, at completion review. The lint
    (scripts/checklist-lint.py --spec) enforces the matrix mechanically:
    every criterion carries a counterexample — a deliberately wrong
    variant — plus the assertion that the variant fails the criterion; and
    the evidence list is frozen with the spec (EVIDENCE.md, one entry
    per criterion: artifact kind + location). A criterion without a
    counterexample, or without a frozen evidence entry, does not ship.
  2. Owner approval — Present a one-page decision page
    (templates/decision.md): what changes for the user, scope, risks, cost.
    No issue, no code before approval. Record the approval verbatim.
  3. Freeze — Freeze the approved spec + checklist:
    scripts/freeze-pkg.sh <pkg-dir> SPEC.md CHECKLIST.md
    If a frozen file changes later, re-freeze and re-review the diff.
  4. Restate-and-go — The executor first writes a restatement: goal,
    files it will touch, files it will not touch, how each checklist item
    will be verified, and any conflict with the brief. No code until the
    coordinator confirms there is no material divergence. Every fix brief
    must declare whether a restatement is required ("restatement:
    required / not required") — a fix brief without the declaration is
    refused at dispatch. When a round declares no restatement, the
    restatement check is skipped for that round; and once the round's
    RESULT has landed, restatement follow-ups stop — a landed conclusion
    is never chased by a stale restatement check.
  5. Completion review — When implementation is done, a different context
    reviews the diff against the frozen checklist. Findings must quote the
    code they cite. Round caps are hard: spec review 1 round, completion
    review 2 rounds.
    The final-round brief must require the reviewer to
    attach a complete, executable fix plan if they still reject. Past the
    cap, the coordinator does not ask round by round: it packages status +
    gap list + the reviewer's fix plan into one owner decision. An owner
    may grant exception rounds — at most 2 per ticket, counted across
    both the spec and completion phases together
    . From the third
    exception request on, there is no further fix round: the only options
    are merge with a cut scope, close without merging, or park the ticket.
  6. Acceptance — Run every checklist item exactly as written and record
    command + exit code + evidence path in ACCEPT.md. Any FAIL stops the
    pipeline. Existence checks only count for file items; behaviour items
    need behavioural evidence. If a verify command cannot run because the
    runner or tool is missing, provision the project's own environment
    first (e.g. create the project venv and install dev dependencies) —
    never substitute a different way of running it and still call it PASS.
    If it still cannot run as written, the verdict for that item is
    partial, and a partial verdict blocks the merge.
  7. Owner-approved merge — Merge only after the owner confirms (or a
    batch the owner explicitly named as unattended, with review passed,
    acceptance passed, and an independent re-run passed). Push, deploy,
    data deletion, publishing, and spending always need a separate,
    explicit owner instruction.

Flow

clarify (ask only what is not already known, one decision page, not a
questionnaire) -> spec + checklist -> Gate 1 -> Gate 2 -> Gate 3 ->
create issue (adapters/tracker/, local markdown by default) ->
preflight (project's own checks must exit 0) -> brief
(templates/brief.md) -> Gate 4 -> implement in a git worktree ->
coordinator verifies from disk, not from the executor's report ->
Gate 5 -> Gate 6 -> Gate 7 -> delivery report (templates/delivery-report.md)

Review dispatch: binding and delivery

A review only counts when it is machine-bound to its dispatch and
actually delivered. Four binding tokens, any one of which binds a
report to the dispatch that ordered it: the ticket slug, a freeze
hash
from the package's FREEZE.md, the issue id, or the tip hash
(full hash, or a short hash of 7+ characters delimited by non-hex
characters). At dispatch time the coordinator extracts the issue id and
tip from the brief and registers them with the dispatch record, so the
binding never depends on how the reviewer happens to title the report.
A report that matches no token is not a delivered report, whatever its
content says.

Delivery is a two-stage guarantee, not a single hand-off:

  • Pickup — the reviewer has taken the job (dispatch record + thread
    activity within the grace window).
  • Landing — every expected report file has landed and passed the
    binding check. The dispatch guard keeps watching until landing or the
    delivery deadline; "accepted" is never reported as "delivered".

When an expected report is missing, the machinery escalates on its own:
a reviewer stuck waiting for input is unstuck once; a reviewer who never
started, or who is still stalled after the unstick, is re-dispatched
once for that reviewer only (the other reviewer's landed report is never
disturbed). A stall watcher periodically reads the reviewers' actual
thread states — working, idle, waiting-for-input — so a silent stall is
named with the reviewer and the state, not inferred from missing files.

Single review is the default. Two reviewers are used only when the
change touches data or backend contracts: data migration, persistent
storage shape, server-side contracts, delete/merge semantics. The
dispatch brief states the grading and its basis.

Bug-fix entry (delivered behaviour is broken)

triage (real bug / not a bug / need info / escalate to full flow) ->
assess (read-only, must produce a failing reproduction before any fix) ->
fix (file scope is closed; widening needs re-approval) ->
test (same-surface re-run, verdict: verified / partial / failed; only
verified may merge) -> retro (why it happened, which stage missed it,
same-pattern sweep). Templates in templates-optional/.

Micro-change channel (small, safe changes only)

All must hold: purely additive; single chain (one main file, or one
backend field + one frontend display); does not touch auth, billing,
payments, or deletion of existing data; existing tests/probes cover it;
roughly <= 30 lines. Then: checklist shrinks to 3 items, no restatement
wait, coordinator reviews the diff directly instead of queuing a review.
If the real diff exceeds the criteria, run the skipped gates afterwards.
Never shrink: coordinator's own verification, scripted merge record,
post-deploy probe.

Artefacts (fixed list — do not invent more)

Everything lives in docs/ unless the project already has a docs home:

  • SPEC.md, CHECKLIST.md — spec and acceptance checklist
  • EVIDENCE.md — the evidence list frozen with the spec (Gate 1)
  • SPEC-REVIEW.md — Gate 1 review report
  • DECISION.md — Gate 2 decision page + verbatim approval record
  • frozen/ — Gate 3 freeze package (FREEZE.md + frozen copies)
  • RESTATED.md, BRIEF.md — Gate 4 restatement and the brief
  • COMPLETION-REVIEW.md — Gate 5 review report
  • ACCEPT.md — Gate 6 per-item verdicts; quote raw command outputs
    inside it instead of scattering separate evidence files
  • RESULT.md, DELIVERY.md — result summary and delivery report

A commit cannot contain its own hash: record merge/commit hashes in
DELIVERY.md in a follow-up commit, or leave them for the coordinator to
fill in at merge time. Never rewrite history to insert a hash.

Rules that keep this honest

  • Verify from disk and from running the code, never from a report alone.
  • A command quoted in a brief must have been run once by the coordinator
    in the target repo, or cited from that repo's own docs.
  • Partial pass is a fail. Totals are computed, not rewritten.
  • Secrets never enter logs, commits, or reports.
  • Use the project's virtual environment / toolchain; never mutate the
    system environment.