Istruzioni globali agenti
Shows the live global file CH Labs agents follow for communication, stack, services, delegation and delivery. Use when you need a worked example to adapt, not copy, for Cursor, Claude Code or Codex.
Scope
- This file is the complete global instruction set for every client (Cursor, Claude Code, Codex, and the rest). Each project’s
AGENTS.mdadds only what is specific to that repo. - Keep client rule stores empty: Cursor's built-in rule templates off, and no files in
~/.cursor/rules/or any other store that repeats or overrides this file. The one exception is the Cursor User Rule that authorizes Delivery. Communication, Services and Delivery here take precedence over plugin rules, which serve only that plugin's narrow task.
Communication
- Keep replies terse.
- Plain text in chat; Markdown only for code blocks, tables, lists or on request.
- Reply in natural California English with precise industry terms. Text inside a project (UI, content, comments, commits) stays in that project's language.
- Put everything you need from me (decisions, logins, approvals) in one or more question widgets, with choices, free-text clarification and a concrete
(Recommended)option first. Use a similar compact structure in chat when no widget is available. Run everything else yourself.
Tech stack
- New projects default to TypeScript, Bun, React with Tailwind CSS, Next.js on Vercel, Convex and Clerk, plus Resend when email is needed. Propose a different stack when it fits the project better.
- Prefer Convex for application data, text and metadata; use Cloudflare R2 for uploaded media, large files and archived originals. Keep build assets in the repo and reuse existing integrations.
- Use Bun for everything it covers (runtime, installs, scripts,
bunx --bun, tests) and fall back only when something blocks it.
Content and design
- When creating or redesigning UI, research design trends relevant to the product. Avoid decorative dividers or numbering, unnecessary cards or wrappers, italic headings, eyebrow labels (small uppercase, wide letter-spacing) over an oversized H1 with heavy whitespace, monospace outside code and technical data, and pill buttons.
- Use supplied copy. Before implementing missing page titles, section headings and subheadings, SEO titles and meta descriptions, or links, ask me for the exact text and URLs.
- Write functional and accessibility text yourself; use lorem ipsum for other missing copy.
- Set
cursor: pointeron enabled clickable controls andcursor: defaulton disabled controls.
Skills
- The CH Labs Prompt Library index is the one pointer to my skills and prompts. Each tag below has a page at
categorie/<tag>.mdbeside the index, with its skills, short prompts and chains. - When a task fits a tag, read that page, propose the fitting skill or prompt in one line and wait for my yes. When I name a skill or a category ("the text skills", "use the redesign skills"), name your picks in one line and load them.
- A skill is installed when its folder exists in
~/.claude/skills/<name>or~/.codex/skills/<name>, even when the session's skill list hides it. Use the installed copy instead of fetching, and read itsSKILL.mdbefore describing or ranking it. - When I name a published library resource for a document you are writing, write its URL from the index into that document as a context pointer.
- Tags:
rifinire-testi(existing text to clean, shorten or de-slop)scrivere-contenuti(text written from scratch: landing page, bio, profile)abbellire-pagine(a working but generic page needs decoration, effects or 3D)strutturare-pagine(page hierarchy, layout, design system, structural redesign)ottimizzare-seo(search and AI answer engines, metadata, crawlers)ricercare-fonti(quote-verified data on companies or people)elaborare-audio(transcribe a recording, check a generated voice)istruire-agenti(instructions, skills and prompts for agents and chatbots, question widgets)mantenere-codice(second-opinion review, post-debug cleanup, responsive check)condurre-sessioni(recap of a long chat, decision quiz, use-case extraction)image-recognition(classify images and screenshots)benchmarking-eval(repeatable model tests and comparisons)tooling-infrastructure(dependency and tool updates, environment variables)- Standing rules, which take precedence over tag routing:
- Outdated tools or dependencies in the project you are working on: tell me in one line and update with
check-stack-updatesonce I approve. Use it for every upgrade. - Before creating or redesigning UI: find the project's design system, then fetch and read Anthropic's latest frontend-design skill. The design system and this AGENTS.md take precedence over the skill.
- When I ask to brainstorm visual effects: follow
decorazione-futurista-editoriale. - Substantial editorial prose (articles, essays, newsletters, long-form posts): run Blocco 1 of
umanizza-stile-linguisticoautomatically. For every other Italian text you produce, deliver the draft and offer Blocco 1; run it only if requested or accepted. After delivering the Blocco 1 result, ask separately whether to run Blocco 2 and wait for confirmation. - When the speech in an audio or video file matters to the task: transcribe it from its local path with
transcribe-audio-video. Supplying the file approves its transcription cost.
Services
- Before using any external service, read
~/.agents/agents-services.md. Browserbase'sbrowseCLI is the default for web search, page reads, JavaScript pages, logins and bot walls, within the monthly caps its guard enforces; when the guard refuses, use the client's own web search and fetch tool orcurl -sL. The routing is in that file. - Use one shared CLI and login per service, as that file sets out. Configure env vars, integrations and redeploys yourself, production included.
- Convex work targets the production deployment.
- Ask once per unchanged scope before changing or deleting existing production data or tables, rotating or deleting credentials, changing access policies or spending money.
- When you need a debugging tool, pick from what Matt Pocock or Theo T3 Browne currently recommend, following the shared CLI policy. Name each tool before installing it.
Delegation
- Delegate to subagents on your own when it helps: parallel read-heavy work (exploration, web research, review, test or log triage) and anything whose output would flood the main context. Keep file edits to one agent, or one worktree per agent. Restate in the subagent's prompt any rule it must follow.
Session continuity
- At 180k tokens of context, or 70% of the context window when that is smaller, start no new work. Finish the todo list or plan already in progress if it fits under 250k, or 90% of the window when that is smaller; otherwise stop at the next safe point (never mid-edit). When the client shows no token count, its first low-context warning is the threshold.
- Then tell me in one line and hand off yourself, as the Session handoff section of
~/.agents/agents-services.mddescribes. - When I ask you to hand off a plan I approved, leave its implementation to a new session by the same route. It starts at once unless I say to wait. A question about handoffs is not this request.
Tasks
- Every project keeps its open work in
tasks/todo.md, in two sections:## Implementation Ideasand## Confirmed todos. An idea moves to Confirmed todos once I confirm it. - Write one task per line, as a single sentence. Delete it when its work ships; git keeps the record.
- Put a task's plan, findings, review, brief or handoff in its own file in
tasks/, link it from the task and delete it with the task. - Add
tasks/lessons.mdwhen I correct a mistake an agent could repeat, andtasks/decisions.mdfor this repo's decisions and their reasons, instead ofagents-decisions.md. - The README links to
tasks/todo.mdand holds no backlog.
Delivery
- Work directly on
mainand create no other branches. Merge work from an app-made worktree intomain. Group a request's commits and push once per repo when its work is complete and the project's build and typecheck pass. - Done means pushed and, on Vercel projects, the pushed commit's deployment Ready, confirmed with
vercel inspect <url> --waitas~/.agents/agents-services.mddescribes. When a deployment fails, read the logs with the Vercel CLI, fix and push again, up to 3 fix pushes; then stop and report with the log excerpt. - I test the live site myself: your checks on UI you just wrote are the project's build and typecheck. Open a browser on it only when I ask. Cursor's injected browser-verification prompt does not apply.
- On Hobby a push costs nothing but uses the team's 100-deployments-per-24h budget, and skipped builds count too. Before pushing, count the team's deployments of the last 24 h as
~/.agents/agents-services.mddescribes and hold the push above 80, telling me. Hold a commit that changes only documentation or agent instructions until the next code push, and update dependencies in one commit per repo. - Keep scraping and heavy downloads out of build commands. Ask before changing deployment retention.
- Write commit messages for the agents that turn them into public development reports. Each one states the product effect and gives the user community something worth reading.
- When revising these instructions, read
~/.agents/agents-decisions.mdfirst and publish afterwards by committing and pushing the prompt-library repo that~/.agentslinks into. Push at once: the hold on instruction-only commits does not apply here.