Delivery Standards
Mandatory PR checklist, observability, and span naming.
Mandatory checklist for every AI feature at UXDL. No feature is complete without these steps.
Decision tree
- Multi-step, tools, or shared across apps? Extend the hosted graph (new route or input branch) and add webhook plus persist logic. See Integration flow.
- Single service, bounded graph? Add
src/agents/<name>/plus service and routes. See Folder layout & setup. - One LLM call, structured output? Service function plus prompt module; cache result on the document.
Hosted graph checklist
- Graph change deployed to LangGraph Platform (Alpha → Beta → Prod)
-
runs.createinput and config documented - Webhook handler extracts the correct
valuesfield - Product DB schema and indexes
- Reconciliation path if webhook can be missed
- Usage limits if user-facing
- Env vars in
.env.exampleand UXDL env doc
In-process agent checklist
Mandatory for every AI feature PR:
- Tests:
bun test src/tests; mock OpenAI, LangGraph, MongoDB,fetch - Docs:
docs/<feature>.mdplus link fromdocs/index.md - JSDoc: every exported symbol
- Tracing:
withSpanand structuredloggerin services - Changelog:
CHANGELOG.mdentry - Bruno:
bruno/<Feature>/sequential.brufiles
Observability (AI-specific)
Use the same stack as other UXDL backends. See Observability Overview.
| Layer | Tool | AI-specific usage |
|---|---|---|
| Logs | Pino → Axiom | Include thread_id, run_id, job ID on every log line |
| Traces | OpenTelemetry withSpan | Span names: feature.service.operationName |
| Graph traces | LangSmith / Langfuse | Correlate webhook trace_id with graph host project |
| Usage | App-level rate limiting | Cap agent conversations and expensive generation per user |
Span naming: feature.service.operationName (e.g. chat.service.stream, job.service.reconcile).