Developers: Migrating from EventBus to LaneRouter + PAOMBus/UXBus¶
FCC v1.4.2 introduced a dual-bus event architecture: a PAOM
(orchestration) lane and a UX (live-view) lane, dispatched by a
LaneRouter. The legacy single EventBus still works but a
DeprecationWarning now points at the new API. These five prompts
walk a developer through a clean migration.
Personas Used¶
| Persona ID | Full Name | Role |
|---|---|---|
| tr | Technical Reviewer | Gates the migration PRs |
| sre | Site Reliability Engineer | Observability wiring |
| arch | Enterprise Architect | Lane-classification sign-off |
Prompt 1: Inventory Subscribers¶
Personas: tr
Prompt¶
tr, produce a migration inventory for our codebase. For every
site that instantiates EventBus or calls bus.subscribe(), list
the file, line, event types consumed, and the most likely target
lane (paom / ux / both) based on the event_lane_map.yaml table.
Deliverable: a Markdown table with at least 10 entries, sorted
by file path.
Expected Output¶
- Subscriber inventory
- Suggested lane per row
- Sort: file then line
Prompt 2: Shim Layer¶
Personas: tr, arch
Prompt¶
Draft a compatibility shim so existing call sites keep working
during the migration. The shim should:
1. Instantiate PAOMBus, UXBus, and LaneRouter once per process.
2. Expose a `get_legacy_bus()` that routes publishes through
LaneRouter.
3. Log a DeprecationWarning on first legacy use per call site.
Keep the shim under 60 lines.
Expected Output¶
- Shim module body
- DeprecationWarning wiring
- Per-site dedupe logic
Prompt 3: Per-Subscriber Migration¶
Personas: tr
Prompt¶
Migrate a single real subscriber from the inventory. Show the
before-and-after diff. Assert the new subscriber registers only
on its target lane (paom XOR ux, or both) and does not subscribe
to the sibling lane.
Expected Output¶
- Before/after diff
- Lane-subscription assertion
- Test case demonstrating isolation
Prompt 4: Observability Hook-Up¶
Personas: sre
Prompt¶
sre, wire bootstrap_otel("paom") and bootstrap_otel("ux") so each
lane exports to a distinct OpenTelemetry service name. Confirm
that PAOM spans do not leak into the UX service and vice versa.
Expected Output¶
- Bootstrap snippet
- Per-lane service name
- Verification command
Prompt 5: Gate the Legacy Surface¶
Personas: arch
Prompt¶
Propose a 2-release sunset schedule. v1.4.x keeps the legacy
surface warning-only; v1.5.0 promotes the warning to an error
behind a feature flag; v1.6.0 deletes the shim. Name the ADR
file that captures this decision.
Expected Output¶
- 3-phase schedule
- Feature-flag name
- ADR filename proposal
See Also¶
- Notebook 40 — Dual-bus trace walker
src/fcc/messaging/lanes.pysrc/fcc/data/messaging/event_lane_map.yamldocs/tutorials/sample-prompts/architects-lane-classification.md