dodil/erp-method

erp/phase/signoff.md

Phase 3s · Sign off: the contract

A hard stop. Nothing in phase 4 starts without it. Produce one sign-off record per process (signoff/<module>/<process>.json) and its rows in ERP_<MODULE>.md. Back: dodil://erp/build.

What is signed is the BPMN, never prose. Each process their changes touch (e.g. HR's employee-onboarding AND freelancer-onboarding) is signed on its own: its diagram, its scenarios, its deviations. Signing a second process adds it beside the first (erp-platform v0.8.1+; before it, a second record replaced the first: lab, 2026-10-18).

Steps

  1. Generate the three from the final change list, per process (HR): uvx --from git+https://git.dodil.io/dodil/erp-platform.git@v0.9.13 erp-compose process --module hr --playbook <playbook> --calls config/hr.calls.yaml → processes/<playbook>.bpmn, scenarios.json, deviations.json and the short hash. No brick: … erp-compose bpmn --from ERP_<MODULE>.md --out processes/<module>.bpmn.
  2. Show it in the message itself, never "open it in bpmn.io" and never a summary in your words (lab, 2026-10-18): paste the step names in order with who does each, read from the file (grep -o 'Task_[a-z_]*" name="[^"]*"' processes/<playbook>.bpmn); every difference from the standard and every added or removed step, by name; every scenario that no longer walks, by id, and why; the short hash. The hash is the BPMN's, never one of ERP_<MODULE>.md or your notes. A wish the diagram cannot draw is listed as "not in this version" (a change request), never promised as code after the signature.
  3. Wait for their words. An approval is a message the customer typed naming the version, e.g. "I approve v1 (822e5d78)". "Looks good" to another question, or your summary, is not one.
  4. Record it, from the project folder, ONE command per process. It refuses a scenario that does not walk: first re-run step 1 with --accepted-broken SC-HR-09,SC-HR-29 (the ids they accepted by name; the hash does not change). scenarios.json is per run: generate, then record, one process at a time.
    uvx --from git+https://git.dodil.io/dodil/erp-platform.git@v0.9.13 erp-compose signoff record \
        --module hr --playbook employee-onboarding --calls config/hr.calls.yaml \
        --bpmn processes/employee-onboarding.bpmn \
        --scenarios processes/scenarios.json --deviations processes/deviations.json \
        --approver "Jane Doe, Managing Director" --file ERP_HR.md
    
    It writes signoff/hr/employee-onboarding.json (hash, scenarios, accepted deviations, approver, signed_at, numbered version), a copy of the BPMN, and the Processes, Scenarios and Deviations rows of ERP_HR.md for every signed process. --calls lets the gate regenerate it later. It refuses a foundation deviation (what a brick keeps cannot be signed away: change the process back). A later version of the same process needs --reason "CR-<n>: …". No brick: … signoff record --module <m> --from ERP_<MODULE>.md --approver "<name, role>". Then a Decisions line quoting their words; Status: "Design: signed off <date> by <name>".
  5. Check it holds, now and after every build step: … erp-compose signoff verify --all (every signed process of every module; regenerated from what each was signed from). SIGNED exits 0. A mismatch exits 1 and names the change by stable id, e.g. ~ task Task_send_contract [step send_contract] / lane: Lane_hr → Lane_it. A change after sign-off is erp-compose change propose and a new signature (dodil://erp/phase/change).

Done when

  • signoff/<module>/<process>.json exists for every process the changes touch, written by erp-compose signoff record.
  • erp-compose signoff verify --all exits 0.
  • The approval (their words) names the hash; scenarios and deviations are in ERP_<MODULE>.md.

Next: dodil://erp/phase/build