# NAC3 -- Native Agent Contract **Version:** 2.3.0-alpha.1 (preview; payload-bearing actions land here) **Status:** v2.2.x stable + v2.3 preview **License:** Apache-2.0 **Editor:** Yujin (rpaforce.com) --- ## 0. Purpose NAC3 is a contract between web UIs and the agents that drive them. Agents include voice runners, LLM intermediaries, RPA bots, accessibility tools, and end-to-end test runners. The contract specifies: 1. **How elements are named** -- so an agent can ask "click the save button" and resolve it to a single DOM node. 2. **How verbs apply** -- so an agent can call `NAC.click(id)`, `NAC.fill(id, value)`, `NAC.tab(plugin, key)`, etc., without per-app glue. 3. **How completion is signalled** -- so an agent knows when a step finished, with a deterministic event family per role. 4. **How provenance is preserved** -- so a downstream system can tell a real user click from a synthesised one. NAC3 adds a thin layer on top of whatever framework you already render with. It does not replace ARIA, React, Vue, or your design system. --- ## 1. Roles Every agent-relevant DOM element carries `data-nac-role`. The canonical roles are: | Role | Meaning | Example | |------|---------|---------| | `plugin` | A self-contained UI module (a page, a panel, a widget collection). | `
` | | `section` | A landmark inside a plugin (header, body, footer, sidebar). | `
` | | `region` | A nameable area inside a section (a card cluster, a result list). | `
` | | `action` | A clickable widget that triggers a verb (button, link-as-button). | `