AI detects spec mismatch during bid response (pack/format/etc). Per Mike standing rule: submit price anyway with vague note; log deviation in bid_lines; flag for post-award discussion.
event["bid_response_workflow_step"]| name | required | type / hint |
|---|---|---|
bid_id | required | — |
item_code | required | — |
bid_line_id | required | — |
detected_deviation | required | — |
bid_linebid_linesSELECT * FROM bid_lines WHERE id=?
specspec_itemsSELECT * FROM spec_items WHERE item_code=?
Risk level 2 < 3 — no HITL gate. Fan-out runs immediately after preconditions pass.
log_deviation d1_write STUB["UPDATE bid_lines SET deviation_flagged=1, deviation_notes=? WHERE id=?"]src/lib/workflow_runner.ts (kind d1_write hits the placeholder branch at line ~340 and emits step status 'stub'). Documented intent only.post_award_followup stage_proposed_action REALbid_post_award_discussion| id | action | source |
|---|---|---|
runner_log_run | INSERT into workflow_run_log (run_id, workflow_type, status, started_at, completed_at, summary_json) | runner automatic |
runner_reflexion | INSERT into reflexion_log (tags=spec_deviation_flagged, run_id, narrative) | runner automatic (reflexion_enabled=1) |
log_run | INSERT workflow_runs | declared in contract |
reflexion | INSERT reflexion_log with tags=spec_deviation | declared in contract |
workflow_verify_results (pending — verify cron not yet wired)deviation_loggedSELECT deviation_flagged FROM bid_lines WHERE id=?
2linear1000false| system | table / resource | action | status | source |
|---|---|---|---|---|
| D1 | proposed_actions | INSERT (action_type=bid_post_award_discussion, entity_type=workflow_run) | REAL | fan-out #2 (post_award_followup) |
| D1 | workflow_run_log | INSERT (run summary) | REAL | runner automatic |
| D1 | reflexion_log | INSERT (tags=spec_deviation_flagged) | REAL | runner automatic |
| Event | workflow.completed (or workflow.failed) | fire | REAL | runner automatic |
| D1 | workflow_verify_results | INSERT pending × 1 | REAL | runner verify staging |
| D1 | unknown | write | STUB | fan-out #1 (log_deviation) |