maket
AGENTS.md19 starsChanged 2 months agoMITView on GitHub
Visual design tool for Codex: compose HTML/CSS documents with live preview, manage assets and brand chartes, export PDF, and prepare Gmail drafts. The MCP server uses Streamable HTTP at POST /mcp. Node >=22. The server must already be running before Codex connects; the human normally owns that process, so do not start a second development server.
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Treat the current checkout and executable contracts as the source of truth.
- Distinctive: line 8
Keep one coherent contract per change.
- Distinctive: line 10
Test user-visible workflows at their public boundary.
- Distinctive: line 61
After draft creation, persist the Gmail review URL and role on the body document and mirror them onto every attached document.
- Distinctive: line 67
Before any push, ask one independent agent for a read-only review.
- Very specific: line 68
Use gh for GitHub issues, pull requests, checks, and merges, not the GitHub app integration.
- Distinctive: line 69
No push or PR without explicit user approval.
- Very specific: line 71
After the merge is confirmed, close the delivery cycle: preserve any local work, switch back to main, fetch the remote, and fast-forward …
- Distinctive: line 78
If there are no findings, say so explicitly and state what was tested and what remains unverified.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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.
Files
Maket
Visual design tool for Codex: compose HTML/CSS documents with live preview, manage assets and brand chartes, export PDF, and prepare Gmail drafts. The MCP server uses Streamable HTTP at POST /mcp.
Working contract
- Treat the current checkout and executable contracts as the source of truth. Inspect before changing; preserve unrelated work and persistent data.
- Keep one coherent contract per change. Complete migrations in the same diff: update every entry point, remove the obsolete path, and do not add deprecation shims.
- Persistence types contain persistent state only. Transient state belongs in a dedicated service;
packages/server/src/services/pending.tsis the reference pattern. - Test user-visible workflows at their public boundary. Keep lower-level tests only when they protect a distinct validation, security, wire-format, or deterministic domain contract.
Commands and quality gates
npm run dev # server --watch + Vite HMR; normal development path
npm run dev:watch # server --watch + Vite build --watch into public/
npm run quality # lint + smell review + typecheck + tests + version alignment
npm run lint:fix # Biome autofixNode >=22. The server must already be running before Codex connects; the human normally owns that process, so do not start a second development server.
npm run qualityis the required local gate before review and again after addressing findings.- The pre-commit hook runs staged Biome fixes, typecheck, and tests in parallel. It is a commit guard, not a substitute for
quality. - Tests are co-located (
foo.ts+foo.test.ts). Database tests usecreateSQLiteStore(":memory:"); never use the filesystem. - Coverage configuration lives in
packages/server/vitest.config.tsandpackages/client/vitest.config.ts. - Run commands that require npm registry access, global installation, loopback listeners, or Chromium outside the sandbox from the outset. In particular, request escalation directly for
npm install,npm install -g,npm run test:package, package-install smoke tests,npm run quality, andmaket start/maket doctor; do not first retry these known-incompatible commands inside the sandbox. Use an isolated writable cache such asnpm_config_cache=/private/tmp/maket-npm-cacheinstead of the user npm cache when it contains root-owned files.
Architecture boundaries
- Server composition and DI →
packages/server/src/bootstrap.ts - Public MCP surface →
manifest.json,packages/server/src/tools/,packages/server/src/core/activity-contract.ts - Public HTTP surface →
packages/server/src/routes/and its mount order inroutes/index.ts - WS wire contract and shared formats →
packages/shared/src/ - Client state boundary → Zustand store and WS handlers under
packages/client/src/
Server and dependency injection
- Services, tool packs, and HTTP routes are factories registered in
bootstrap.ts. Concrete factories are wired there; consumers depend on injected interfaces by destructured parameter name. - Declare the public interface above
createFoo, and keep private state in the factory closure. A private class is acceptable only as a focused implementation detail or typed error; it must not become a singleton or bypass DI. - Awilix uses PROXY injection: every destructured
depsname triggers a lookup. Put optional test overrides in a separateoptsargument, as inLayoutServiceandPdfService. bootstrap.tsregisters the container itself for composition code such ascreateMcpRouter→mountTools; do not resolve it ad hoc elsewhere.- Services mutate state and emit on the bus. WS broadcasts, toasts, and other propagation live in listeners in
packages/server/index.ts; services never callwsRegistry.broadcastdirectly.
Public entry points
- Cross-cutting guards must cover MCP tools, WS handlers, and bulk UI flows. Apply the same rule to lock checks and to user-controlled CSS escaping (
escapeCssValue+stripStyleClose). - MCP tools return
text(t, { isError?, next? })frompackages/server/src/tools/_helpers.ts; never hand-build the content envelope. - Renaming or adding a tool requires one coherent update to its tool declaration,
ACTIVITY_POLICIES,manifest.json.tools[], and references underplugin/Codex/. Boot checks the executable contracts; plugin references still require manual verification.
Client state
- Zustand is the client source of truth. Server state arrives through WS; HTTP is reserved for binaries such as assets and
.maketbundles. - The pending queue is the optimistic boundary: enqueue with
addPending, settle throughack_messages, and do not pre-apply edits to the store. - Activity toasts and edit-mode resets are server-authored. Keep destructive flows reversible or explicit; do not use
window.promptorwindow.confirm.
Product safety
- Gmail is draft-only. Never call
users.messages.sendorusers.drafts.send; the user reviews and sends in Gmail. - Request
gmail.composeby default andgmail.readonlyonly forconnect with_read=true. Guard reads withgmailClient.grants().readand return the reconnect action throughnextwhen absent. - After draft creation, persist the Gmail review URL and role on the body document and mirror them onto every attached document.
Delivery workflow
- One feature = one issue = one branch. Start from
origin/main; never stack unrelated work on an existing feature branch. - Implement the complete change, add relevant public-boundary coverage, and run
npm run quality. - Before any push, ask one independent agent for a read-only review. Address every actionable finding, rerun the gate, then ask the same reviewer to review the updated diff. Push only when that second pass reports no remaining finding.
- Use
ghfor GitHub issues, pull requests, checks, and merges, not the GitHub app integration. - No push or PR without explicit user approval. Use Conventional Commits and let the PR close its issue.
- Merge only with green CI. Internal-only changes need no version bump; runtime releases use
npm run version:bump X.Y.Z, keep every workspace version aligned, update the changelog, and tagvX.Y.Z. - After the merge is confirmed, close the delivery cycle: preserve any local work, switch back to
main, fetch the remote, and fast-forwardmaintoorigin/main. Do not leave the checkout on the merged feature branch.
Review rules
- Lead with concrete findings: defect or risk, affected public behavior, and exact location. Do not request churn for formatting already enforced by tooling.
- Judge coverage by observable boundaries such as MCP, HTTP, WS, bundle export/import, or the installable artifact. Internal-only tests do not prove those contracts; remove them when integration coverage makes them genuinely redundant.
- For migrations and cross-cutting behavior, verify every entry point and reject parallel legacy paths, duplicate orchestration, or silent contract drift.
- If there are no findings, say so explicitly and state what was tested and what remains unverified.
Operational references
.maketbundle format →packages/server/src/lib/maket-format.ts- Pending queue →
packages/server/src/services/pending.ts - Environment and data paths →
packages/server/src/services/config.ts - Charte and layout rules →
packages/server/src/lib/charte-check.ts,packages/server/src/services/layout.ts - Codex plugin surface →
plugin/Codex/ - Workspace scaffolding →
make bootstrap DIR=... PORT=...andMakefile - Stale TypeScript build state after cross-package changes → remove
packages/*/tsconfig.tsbuildinfo, then runnpx tsc -b - Client preview mismatch →
npm run devserves Vite HMR on:5173;dev:watchwrites the production-like client used by the server preview.
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
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.

