Update README for Phase 2 classifier

Reflect the implemented two-axis classifier + handler, the 5.2% 'Other'
smoke-test result, and the phased build status (Phase 2 in review).
This commit is contained in:
Adam Moussa 2026-05-28 17:13:11 -04:00
parent eb724580e0
commit 0272db1716

View file

@ -37,7 +37,9 @@ Two CDK stacks:
**Always two-axis, never comment-only.** The legacy script's central flaw was
reading only the comment while ignoring `WO Status` + `Hold Reason`, which left
~17% in "Other". The two-axis model cuts that to ~9% before any AI.
~17% in "Other". The two-axis model cuts that to ~9% before any AI — and on the
real 347-row export the current implementation lands "Other" at **5.2%** (18
rows) with **18 mismatches** flagged.
- **Axis 1 — comment intent:** regex over the HTML-stripped `Last Comment`,
most-specific first (escalations → SIM ticket → vendor no-show → scheduling →
@ -52,6 +54,10 @@ reading only the comment while ignoring `WO Status` + `Hold Reason`, which left
The authoritative spec lives in [`CLAUDE.md`](./CLAUDE.md); the implementation is
in `lambdas/classifier/classify.py` (owned by the `classifier-engineer` agent).
The S3-triggered `lambdas/classifier/handler.py` parses each export, classifies
every non-blank-comment row, writes a per-WO Parquet snapshot to
`analytics/dt=YYYY-MM-DD/` (registering the Glue partition via awswrangler), and
emits a `summary.json` for the Phase 4 slack-post Lambda.
## Repository layout
@ -109,7 +115,7 @@ The export reaches S3 by **direct upload or a local drop-folder**, never SES/ema
`aws configure --profile apm-wo-drop`.
The classifier Lambda is S3-triggered on the `raw/` prefix regardless of path
(added in Phase 2 — uploads currently land in `raw/` and wait).
(any `.xlsx`/`.csv` landing under `raw/` invokes it).
## Deployment
@ -136,5 +142,14 @@ cdk deploy apm-wo-analysis-grafana # EC2, ALB, SG, Route53, datasource role
## Status
**Scaffold (Phase 0).** Build-out proceeds per [`docs/BUILD.md`](./docs/BUILD.md):
ingestion → classifier → Glue/Athena → Slack → Grafana → docs.
**Phase 2 — classifier (in review).** Build-out proceeds per
[`docs/BUILD.md`](./docs/BUILD.md): ingestion → classifier → Glue/Athena → Slack
→ Grafana → docs.
- **Phase 0** scaffold — merged-pending (PR #6).
- **Phase 1** ingestion (S3 bucket, drop-folder uploader, OIDC deploy role) —
deployed; PR #7 open.
- **Phase 2** classifier Lambda + Glue database + S3 `raw/` trigger — implemented
and `cdk synth`-green; PR #8 open (stacked on Phase 1, not yet deployed).
- **Phases 3–6** (Glue/Athena query layer, Slack, Grafana, final docs) — not
started.