Demos / Form copilot · Plinth
Add a new employee
An HR admin screen with six sections and a dozen rules. Tell the copilot about the new hire and it fills the form field by field, catches a salary outside its pay band, explains it, and leaves Save to you.
What it shows
- Page tools as the only way in:
set_field,focus_sectionandcheck_formeach check their arguments and return the field’s validation result, so the agent learns at once that $132,000 is above the band - Situational awareness of the form itself, sent with every turn: the current section, what is filled, which required fields are empty, every current problem and the completion percent
- A function of literal pay bands by level and location, with the default pay schedule and the benefits rule, that the agent reads before it proposes a fix
- Validation on the page: required fields, formats, a weekday start date, the salary inside its band and benefits from the first of the next month; Save stays disabled until all of it passes
- Fields the agent sets flash once, on the
set_fieldcall itself, and keep a “Filled by copilot” tag until the admin edits them
Files
- demos/plinth/demo.json
- demos/plinth/functions/plinth-pay-bands.json
- demos/plinth/prompt/policy-rules.md
- demos/plinth/prompt/background.md
- src/demos/admin-form/index.tsx
- src/demos/admin-form/pageTools.ts
- src/demos/admin-form/form.ts
- src/demos/admin-form/data.ts
- src/content/demos/admin-form.ts
- src/content/demos/admin-form.md