From 404561832da90ae089fc9b67b165f5b5917e938c Mon Sep 17 00:00:00 2001 From: Diogo Esteves Date: Fri, 16 Oct 2026 07:21:13 +0100 Subject: [PATCH 1/2] feat(site): add /setup.md and a setup prompt, and jump to the findings on phones /setup.md is the recipe an agent follows to set onsystem up: look at the project, `init --yes` for the config and baseline, the plugin or MCP config for the agent it runs in, the GitHub Action, then `check .` and a report. Its configs and workflow come from docs/rollout.md and docs/required-check.md. llms.txt points to it, and the home page's first screen and step 2 of the quickstart give the prompt that sends an agent there: "Read https://onsystem.vercel.app/setup.md and set up onsystem in this project." Below lg, the playground's status in the editor bar becomes a "Jump to N findings" link to the findings, which on a 390x844 screen start at y=1,989, under a 1,355 px editor. --- docs/quickstart.md | 8 ++- site/app/page.tsx | 42 ++++++++++-- site/app/setup.md/route.ts | 8 +++ site/components/playground.tsx | 20 +++++- site/lib/llms.ts | 96 ++++++++++++++++++++++++++ site/test/first-screen.test.ts | 19 +++++ site/test/playground.test.ts | 40 ++++++++++- site/test/setup.test.ts | 122 +++++++++++++++++++++++++++++++++ test/setup-steps.test.ts | 86 +++++++++++++++++++++++ 9 files changed, 430 insertions(+), 11 deletions(-) create mode 100644 site/app/setup.md/route.ts create mode 100644 site/test/setup.test.ts create mode 100644 test/setup-steps.test.ts diff --git a/docs/quickstart.md b/docs/quickstart.md index c1ff558b..fdef5291 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -23,7 +23,13 @@ To keep what it found in a file you can edit, run `npx -y onsystem init`: it wri ## Hold your agent to it -Pick one: +Give your agent this prompt, and it does the rest of the setup itself: the config and the baseline, onsystem in the agent, and the CI check. [setup.md](https://onsystem.vercel.app/setup.md) has the steps it follows. + +```text title="Prompt for your agent" +Read https://onsystem.vercel.app/setup.md and set up onsystem in this project. +``` + +Or add it yourself. Pick one: - **Claude Code**: install the [plugin](plugin.md). Its hook checks every UI file Claude writes and hands the errors back before Claude moves on; it also brings the MCP server and a skill that has Claude look components up first. diff --git a/site/app/page.tsx b/site/app/page.tsx index 27678eca..239e72a3 100644 --- a/site/app/page.tsx +++ b/site/app/page.tsx @@ -15,6 +15,7 @@ import { InlineCode, Section, SubSection, TextLink } from '@/components/section' import { Tabs } from '@/components/tabs'; import { count } from '@/lib/benchmark'; import { benchmark, corpus, demo, readme, rules, tools } from '@/lib/data'; +import { SETUP_PROMPT } from '@/lib/llms'; import { pageMetadata } from '@/lib/metadata'; import { findingCard, HOME_CARD, TSC_RULES } from '@/lib/og'; import { highlight } from '@/lib/render-code'; @@ -148,13 +149,17 @@ function Hero() { .

- - Try it in the browser - - + {/* One row, so wide screens are no taller; it wraps on a phone. */} +
+ + Try it in the browser + + + +
@@ -230,6 +235,29 @@ function CheckCommand() { ); } +/** + * The prompt that has the visitor's agent set onsystem up from /setup.md. The label makes its + * text part of the copy button: a click on either copies the prompt, which the title shows. + */ +function AgentPrompt() { + return ( + // eslint-disable-next-line jsx-a11y/label-has-associated-control -- CopyButton is a