Wiki · Workflow companion

Spec deviation during bid

AI detects a spec mismatch during a bid response — pack size, format, ingredient, or attribute drift between our spec and the bid's requirement. Per Mike's standing rule: submit price anyway with a vague note, log the deviation, and flag for post-award discussion.

Mixed · Some steps live, others stubbed
What this is

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.

When to use it

Trigger conditions

Heuristic

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.

Step-by-step what happens

The 2 beats

  1. 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.

    Writes bid_lines
    Time ~50ms
    Kind d1_write
    Status stub
  2. 02

    Post-award discussion flag

    A proposed_actions row stages with action_type=bid_post_award_discussion. If we win, this becomes a kickoff talking point.

    Writes proposed_actions
    Time ~50ms
    Kind stage_proposed_action
    Status real
Outcomes

What's different after the workflow runs

Bid line
Flagged
deviation_flagged=1
Submission note
Vague
per standing rule
Post-award flag
Staged
in proposed_actions
NS writes
None
no NS impact
Failure modes

What can go wrong and how to recover

No-op when deviation is trivial

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.

Deviation should have blocked submission

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.

Bid amendment resolves the deviation

Sometimes an amendment changes the bid spec to match ours. The deviation_flagged remains as historical context but no longer affects submission.

Related

Adjacent workflows + diagrams

For developers

Code paths + invariants

ConcernWhere
Workflow contractworkflow_definitions WHERE workflow_type='spec_deviation_flagged'
Standing rulefeedback_bid_spec_deviation_notes (memory)
Deviation fieldbid_lines.deviation_flagged + deviation_notes
Post-award markerproposed_actions.action_type='bid_post_award_discussion'
Reflexion tagspec_deviation
Risk level2
Expected duration~5 min
Triggerevent · sources=bid_response_workflow_step
// Standing rule: submit anyway, vague note const note = severity === 'minor' ? 'pack format may vary' : 'product configuration may vary; full spec on request'; await db.run( "UPDATE bid_lines SET deviation_flagged=1, deviation_notes=? WHERE id=?", [note, bid_line_id] );