From a Design System Catalog to an AI-Planned Clinician Queue

I wanted to see whether an AI agent could use my existing Lung DS design system to plan a new screen. I gave it a problem from remote patient monitoring: build a clinician work queue for devices that have stopped reporting.

1. Give the agent a catalog

I set up a self-hosted n8n workflow with a Manual Trigger, GPT‑5.4 mini, and a read-only tool called lookup_lung_ds. The tool exposed six catalog entries with component names, repo paths, and notes on how each could be reused. The entries were approved for this synthetic test.

Successful n8n execution connecting a Manual Trigger, the clinician queue planning agent, GPT-5.4 mini, and the lookup_lung_ds tool.
The third execution succeeded in 15.18 seconds.

2. Run the brief and inspect the result

I asked the agent to propose components, describe the required screen states, and flag missing patterns. The third run succeeded in about 15 seconds. In the execution log, I verified that the agent requested the full catalog and received all six entries. The plan pointed to an existing clinical table demo for the layout and kept overdue reporting, intentional pauses, and clinical deterioration distinct.

Reviewing the plan also caught a small but meaningful copy issue. “No devices currently meet this queue’s criteria” describes an empty queue more accurately than “No patients.”

n8n agent output listing six Lung DS catalog entries with repository paths, adaptations, and limitations.
The plan identifies reusable components, demo references, and their limitations.

3. Turn the plan into a prototype

I handed the plan to Codex in VS Code and asked it to implement a new route using existing tokens, semantic table components, and synthetic data. The prototype includes clinic and status filters, timestamps with time zones, and loading, empty, and error previews. I verified that paused devices stayed out of the active queue. The route returned HTTP 200, and the build and lint checks for the changed files passed. Full-repo lint still reported existing errors in two demo files.

Lung DS synthetic device reporting queue with the reporting status filter open, five devices listed, and one paused device excluded.
The synthetic prototype separates reporting status from clinical status and excludes intentionally paused devices.

The handoff was manual. n8n produced a plan I could inspect, and Codex made the React changes. For the next run, I want the catalog to explicitly distinguish components the agent can import from demos it should use as visual references. That gives me a concrete way to test whether the agent understands how the design system is meant to be used.

Back to Writing