Spec deviation during bid
Spec deviation is the canonical "let the buyer evaluate, don't self-disqualify" workflow. Per Mike's standing rule (memory: feedback_bid_spec_deviation_notes), the right move when our spec doesn't exactly match the bid spec is to submit the price anyway with a vague submission note, let the buyer evaluate, and queue the conversation for post-award.
The workflow exists to make that rule deterministic — when the AI detects a deviation during the bid response build, it doesn't halt; it logs and flags.
Risk level 2 (low). No NS writes, no customer-facing changes. The submission note is the only externally-visible artifact.
Trigger conditions
- A bid response workflow step detects a pack/format mismatch on a line.
- Spec audit comparing bid requirement against our spec_items finds a difference.
- Manual flag from Mike when reviewing the bid response pre-submission.
- A bid amendment changes the spec mid-bid and our line no longer matches exactly.
Severity classification (minor / material) drives the submission note tone. Minor (pack count off by 1) gets a one-liner. Material (different ingredient profile, different format) gets a more careful sentence — still vague, never self-disqualifying.
The 2 beats
-
01
Log deviation on bid_line
UPDATE
bid_lines SET deviation_flagged=1, deviation_notes=? WHERE id=?. The bid response render reads deviation_notes to construct the submission note. -
02
Post-award discussion flag
A
proposed_actionsrow stages withaction_type=bid_post_award_discussion. If we win, this becomes a kickoff talking point.
What's different after the workflow runs
- bid_lines row has deviation_flagged=1 + deviation_notes populated.
- A post-award discussion is queued in proposed_actions.
- The bid response render uses the vague submission note from deviation_notes.
- reflexion_log carries a
spec_deviationtagged row.
What can go wrong and how to recover
Sometimes the AI flags a non-deviation (e.g. trailing whitespace in pack size). The classifier marks it minor, the note is one word, post-award flag is informational only.
If a deviation is truly disqualifying (e.g. wrong allergen profile), the standing rule says still submit — but Mike should override and pull the line. Manual escalation path: POST /admin/bid_lines/?id/remove.
Sometimes an amendment changes the bid spec to match ours. The deviation_flagged remains as historical context but no longer affects submission.
Adjacent workflows + diagrams
Code paths + invariants
| Concern | Where |
|---|---|
| Workflow contract | workflow_definitions WHERE workflow_type='spec_deviation_flagged' |
| Standing rule | feedback_bid_spec_deviation_notes (memory) |
| Deviation field | bid_lines.deviation_flagged + deviation_notes |
| Post-award marker | proposed_actions.action_type='bid_post_award_discussion' |
| Reflexion tag | spec_deviation |
| Risk level | 2 |
| Expected duration | ~5 min |
| Trigger | event · sources=bid_response_workflow_step |