From e5f17673b8ea431c3f907257dd63ef0805a6c7db Mon Sep 17 00:00:00 2001 From: Ariel Conti Date: Mon, 15 Jun 2026 14:37:35 +0000 Subject: [PATCH] chore(harness): add AGENTS.md baseline + Claude shim AGENTS.md is the cross-tool agent baseline (Codex, Cursor, generic runners): stack, commands, the four invariants (registry sync four-file rule, motion CSS-only, monochrome icons strokeWidth 1.5, audit gates), refreshed layout including .agents/skills/, docs/research.md, and .impeccable/design.json, a 'where to look first' routing table, and the after-you-change-X workflows. CLAUDE.md is rewritten as a thin Claude-Code-only shim: it imports AGENTS.md via @AGENTS.md and then adds Claude-specific tool defaults (Glob/Grep over shell, batched registry sync), project-local skills routing, sub-agent guidance, TodoWrite usage, and verify-before-done. PRODUCT.md drops the INTERACTIVE_SPEC.md reference (file was removed upstream) and points at AGENTS.md instead. README.md link block surfaces AGENTS.md as the primary agent entry point alongside CLAUDE.md, DESIGN.md, PRODUCT.md, and docs/research.md. --- AGENTS.md | 246 +++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 120 +++++++++++++------------- PRODUCT.md | 2 +- README.md | 8 +- 4 files changed, 316 insertions(+), 60 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..960d675 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,246 @@ +# AGENTS.md — Agentic Craft + +You are working on **Agentic Craft**, a reference site for designing agent +interfaces beyond chat. The site documents interaction patterns for orchestration, +tool use, approvals, memory, multi-agent coordination, and observability. The +shadcn-compatible registry is the distribution channel — consumers run +`npx shadcn@latest add bitcomplete/agentic-craft/` to install primitives. + +**The job whenever you edit this repo:** every demo is a teaching artifact, so +interaction quality (real state, real animation, accessible controls) is a +first-class feature, not an afterthought. The site teaches agent UX — looking +like an AI demo would forfeit the argument. + +The canonical research backing the patterns lives in `docs/research.md`. When +you build or modify a pattern page, that file is the source of truth for *what* +the pattern teaches. + +## Stack + +| Concern | Choice | +|------------------|--------| +| Framework | Next.js 16 App Router (`next: ^16.1.6`) | +| UI library | React 19 (`react: ^19.2.0`) | +| Styling | Tailwind CSS 4 (`tailwindcss: ^4.1.17`) | +| Component system | `@base-ui/react ^1.3.0` (NOT Radix) | +| Icons | `@hugeicons/react` + `@hugeicons/core-free-icons`; always monochrome, `strokeWidth={1.5}` | +| Fonts | PP Neue Montreal (sans), Signifier (serif) — local cuts in `app/fonts/` | +| Animations | Pure CSS keyframes in `src/index.css` or registry item `css` blocks; no motion library | +| Language | TypeScript strict; path alias `@/*` → `./src/*` | +| Package manager | npm only (`node >=20.9.0`) | +| Registry CLI | `shadcn` v4 | + +## Commands + +| Command | What it does | +|---------|--------------| +| `npm run dev` | Next.js dev server at `http://localhost:3000` | +| `npm run lint` | ESLint over the project | +| `npm run typecheck` | `tsc --noEmit` (strict) | +| `npm run format` | Prettier write over `**/*.{ts,tsx}` | +| `npm run format:check` | Prettier check | +| `npm run audit:ui` | `node scripts/audit-ui.mjs` (report only) | +| `npm test` | Vitest smoke tests in `tests/` | +| `npm run build` | Next.js production build | +| `npm run registry:build` | `shadcn build` — regenerates `public/r/` from `registry.json` | +| `npm run verify` | Full CI chain (lint → typecheck → format:check → audit-ui --fail → sync-registry --check → check-registry-deps → build → registry:build) | + +Before opening a PR, run `npm run verify`. If it fails, treat the failure as a +stop condition and fix the cause — do not bypass. + +## The four invariants + +These four rules are load-bearing for the project. Violating any of them ships +broken output. Treat each as a stop condition. + +### 1. Registry sync — the four-file commit rule + +UI primitives live in `src/components/ui/`. The registry copies them into +`registry/base-nova/ui/` via `node scripts/sync-registry.mjs`. Blocks live only +in `registry/base-nova/blocks/`. `registry.json` is the manifest. `public/r/` is +the committed build output. + +**Whenever you edit `src/components/ui/*`, you must:** + +1. Run `node scripts/sync-registry.mjs` — syncs into `registry/base-nova/ui/`. +2. Run `npm run registry:build` — regenerates `public/r/`. +3. Commit **all four** together: `src/components/ui/`, `registry/base-nova/ui/`, + `registry.json`, `public/r/`. + +CI runs `node scripts/sync-registry.mjs --check` and +`git diff --exit-code -- public/r registry.json`. Either drift fails the build. + +Every new registry item needs a smoke test in `tests/ui/` (primitives) or +`tests/blocks/` (blocks). + +**Never edit `registry/base-nova/ui/` directly.** Those are sync outputs. +**Never edit `public/r/` manually.** That is the build output. + +### 2. Motion policy — CSS keyframes only, no `