Serv8:Problem implements PM. It embeds closed incidents, clusters them by similarity to surface recurrence, promotes a cluster into a problem only on an explicit decision, and publishes known errors that triage applies automatically.
The same incident is fixed by hand dozens of times because nobody notices it is the same incident. Manual recurrence detection does not scale and is not done. Similarity clustering over incident text makes recurrence visible without a human reading the queue, and a known error database turns a recognised recurrence into a one-line workaround at triage.
graph TD
TKT["Serv8:Ticket (closed incidents)"] -->|"event"| EMB["embed via ai_infer"]
EMB --> VEC[("pgvector index")]
VEC --> CL["similarity cluster"]
CL -->|"threshold met"| CAND["problem candidate"]
CAND -->|"promotion decision"| PRB["problem"]
PRB --> KE["known error (draft)"]
KE -->|"publish decision"| PUB["published known error"]
PUB -->|"event"| TKT
TKT -->|"M2M lookup at triage"| VEC
IncidentEmbedding: one vector per incident, unique per incident so a re-close updates in place.Cluster: a working set with size and cohesion; a cluster is not a problem.Problem: a candidate or confirmed root-cause investigation.KnownError: symptom, workaround, state, vector embedding for lookup.
Why clustering is advisory. Automatic promotion would let a threshold fluctuation create phantom problems and pull a manager onto a non-issue. A cluster that needs one human decision is still an enormous saving over reading every ticket.
Why an agent may draft but not publish a known error. A wrong workaround applied automatically is worse than no workaround. Drafting is automatable; publishing is the accountability boundary.
Why pgvector rather than a separate vector store. The platform image already carries pgvector, and the vectors belong next to the records they describe. A separate store would add a consistency problem on every incident close.
- A cluster never becomes a problem without a decision.
- Only published known errors are matched.
- An agent drafts known errors; publishing requires the problem-manager role.
incident_idis unique in the embedding table.- Embedding dimension must match the registered model.
- A lookup returns at most one match above a threshold.
make build
make enroll- HNSW versus IVFFlat at the expected volume; scan freshness trade-off.
- Full re-embed procedure when the embedding model changes.
- Whether one known error may serve several problems.