agentleFS
willdadywilldady/platypus/.agents/skills/form-conventions/SKILL.md

form-conventions

Skill114 starsChanged 2 months agoMITView on GitHub

Post-save conventions for Platypus frontend forms — where a save lands the user, and what the submit button is called. Use when adding or changing a form in apps/frontend, its submit button, or what happens after it saves.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the shape off apps/frontend/app.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Form Conventions

Where a save lands

One rule covers every form: a save returns the user to the entity's home, and only leaves the page when the form has no home to return to. Which of the two applies falls out of the entity's shape in the route tree:

ShapeThe form is…On saveExamples
Collection memberthe entity's page, reached from a listgo to listAgents, Blueprints, Skills, Triggers, MCP, Providers, Webhooks, Workspace Context
Entity sub-pagea settings/ child of a page the entity ownsstayBoards, Dashboards
Singletonone per Workspace/Org/account, so there is no liststaySandbox, Organization, Workspace
Dialog or inlinenot a page at allstayMembers, Invitations, Global Context, everything in Chat

Read the shape off apps/frontend/app. settings/agents/[agentId] renders the agent edit form — an agent has no detail page, so leaving the form means returning to settings/agents. A board does have a page, and its form lives at boards/[boardId]/settings, so saving keeps you there.

Staying means mutate() (or router.refresh()) plus a toast. Never router.push to the page you are already on.

Creating always navigates — to the new entity where it has a page of its own, otherwise to the list it now belongs to.

Deleting always navigates away from whatever it destroyed, whatever the shape: to the list for a collection member, to the parent otherwise.

A list is wherever the list actually renders, not a route that looks like one. Triggers navigate to the Workspace home because that is where the trigger list lives; there is no triggers/ page.

What the button says

The label names the outcome, so it follows from the destination:

CaseLabel
Create, page-level formSave
Edit that navigates to the listUpdate
Edit saved in placeSave
Adding to a surface you stay onAdd

Update is reserved for the edit-then-leave case — it is the word for a save you are about to be carried away from. Add covers the in-place additions: Add column, Add card, Add widget.

Let the form heading name the entity and keep the button to the bare verb (Save, not Create board). Prefer the bare verb over Save changes too. A loading state keeps the same verb as the button it replaces, with the repo's ASCII ellipsis: Saving... under Save, Updating... under Update.

Unlike the destination rule, this one is ahead of the code. Most forms today label on {id ? "Update" : "Save"} alone, so a stay-in-place edit can still read Update (Sandbox, Organization, Workspace, Dashboard settings); #793 brings the existing buttons into line. Write new buttons to the rule above, and leave the stragglers to that issue.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.