Apply explicit Project Match Signals and thread drift rules #7

Closed
opened 2026-06-14 10:21:21 +00:00 by liang · 1 comment
Owner

Parent

Parent PRD: #2

What to build

Add deterministic Project matching on top of archived Communications. Matching should write Communication Project Hints only from explicit Project Match Signals: confirmed links or prior correction, exact Project code, exact Project Identifier Variant, confirmed Thread Link, document metadata, and strong aliases where manually marked. Semantic similarity remains candidate-only, and unknown Projects enter Intake Flow rather than being auto-created.

Acceptance criteria

  • Exact Project code and Project Identifier Variant matches write auditable Communication Project Hints.
  • Weak Project Aliases never write hints by default, while manually marked strong aliases can write hints with rationale.
  • Thread Links prefer Bichon conversation ID, then email headers, then weak subject/participant/time fallback, and are downgraded when Thread Drift signals appear.
  • Unknown project codes do not auto-create Projects and instead produce the appropriate Intake path for later review.
  • Automated tests cover matching priority, multiple matches, weak versus strong aliases, thread inheritance, thread drift, and semantic-only candidate behavior.

Blocked by

## Parent Parent PRD: #2 ## What to build Add deterministic Project matching on top of archived Communications. Matching should write Communication Project Hints only from explicit Project Match Signals: confirmed links or prior correction, exact Project code, exact Project Identifier Variant, confirmed Thread Link, document metadata, and strong aliases where manually marked. Semantic similarity remains candidate-only, and unknown Projects enter Intake Flow rather than being auto-created. ## Acceptance criteria - [ ] Exact Project code and Project Identifier Variant matches write auditable Communication Project Hints. - [ ] Weak Project Aliases never write hints by default, while manually marked strong aliases can write hints with rationale. - [ ] Thread Links prefer Bichon conversation ID, then email headers, then weak subject/participant/time fallback, and are downgraded when Thread Drift signals appear. - [ ] Unknown project codes do not auto-create Projects and instead produce the appropriate Intake path for later review. - [ ] Automated tests cover matching priority, multiple matches, weak versus strong aliases, thread inheritance, thread drift, and semantic-only candidate behavior. ## Blocked by - #6
Author
Owner

Implemented issue #7.

Summary:

  • Added services.project_matching.match_archived_communication_to_project.
  • Writes Communication Project Hints only from exact Project codes, Project Identifier Variants, confirmed thread links, or strong aliases.
  • Leaves weak aliases as candidate-only and routes unknown codes/thread drift to Intake Items with Classification Decisions.

Verification: .venv/bin/pytest tests/test_project_matching.py -q -> passed.

Implemented issue #7. Summary: - Added `services.project_matching.match_archived_communication_to_project`. - Writes Communication Project Hints only from exact Project codes, Project Identifier Variants, confirmed thread links, or strong aliases. - Leaves weak aliases as candidate-only and routes unknown codes/thread drift to Intake Items with Classification Decisions. Verification: `.venv/bin/pytest tests/test_project_matching.py -q` -> passed.
liang closed this issue 2026-06-14 10:54:22 +00:00
Sign in to join this conversation.
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liang/sales-ai#7
No description provided.