This is the canonical repository guide for coding agents. Tool-specific files should point here instead of restating these rules.
| Path | Purpose |
|---|---|
catalog.json |
Machine-readable index of every runnable recipe, including paths, entrypoints, integrations, and supported commands. |
examples/<task>/ |
Self-contained TypeScript programs that call the Notion API and run locally with Node.js. |
workers/templates/<integration>-<capability>/ |
Self-contained Notion Worker syncs, agent tools, and webhooks. |
skills/ |
Reusable instructions and evaluations for AI-assisted Notion workflows. |
docs/ |
Longer developer guides that are not standalone runnable projects. |
scripts/ |
Repository-wide installation, validation, and maintenance commands. |
Do not infer a recipe's category from a path segment that no longer exists.
examples/ and workers/templates/ are flat collections; kind in
catalog.json is the authoritative classification.
Apps are a private alpha. Do not add, advertise, or modify Apps unless the task explicitly calls for private-alpha Apps work; follow the guidance local to the selected App when it does.
-
Translate the request into an outcome, integration, and recipe kind.
-
Search
catalog.jsonbefore scanning the tree. For example:jq '.recipes[] | select(.integrations | index("linear"))' catalog.json jq '.recipes[] | select(.kind == "worker-tool") | {id, summary, path}' catalog.json
-
Read the selected recipe's README,
package.json, and listed entrypoints. -
Check nearby recipes only when they demonstrate a pattern the selected project does not cover.
Prefer the narrowest working recipe. For example, adapt linear-sync for a new
Linear field; do not start from a generic Worker if the integration already has
an implemented sync.
Recipes are independent projects. Run commands from the recipe directory and
install dependencies there. Never assume every project uses npm start or has
the same environment variables.
- Use the commands declared for the recipe in
catalog.json. - Read its README before creating
.envor configuring an external service. - Copy the provided environment template when present. Never commit
.env, tokens, service credentials, or generated Worker state. - Prefer offline checks before commands that call live APIs, mutate a Notion workspace, or deploy a Worker.
- State clearly when a live check was not run because credentials or external access were unavailable.
For Workers, Node.js 22 and npm 10.9.2 or newer are required. Authenticate and
deploy only when the user asks for a live deployment. Treat generated
workers.json files as local state unless a tracked fixture explicitly says
otherwise.
- Preserve the recipe's standalone install and run flow.
- Keep the change inside one recipe unless shared documentation or repository tooling genuinely needs to change.
- Follow the existing registration and data-flow patterns in
src/index.tsor the listed entrypoint. - Document new prerequisites, environment variables, external permissions, expected output, and extension points.
- Update or add offline tests for transforms, pagination, validation, signature handling, or query safety before relying on a live integration test.
- If behavior, entrypoints, integrations, or commands change, update the
matching
catalog.jsonentry in the same change.
Worker-specific safety rules:
- Sync records need deterministic keys and pagination that cannot silently skip records. Document replace versus incremental behavior.
- Agent-facing query tools must enforce read-only access, bound result sizes, and explain the real security boundary; a prompt instruction is not one.
- Webhooks must authenticate deliveries and defend against replay where the provider supports timestamps or delivery IDs.
- Use the Notion client supplied by the Worker context when the platform owns authentication. Do not introduce a Notion token unnecessarily.
Choose one project root:
examples/<task-name>/for a local Notion API/SDK program.workers/templates/<integration>-<capability>/for a deployed Worker. Put the integration first so related projects sort together, such aszendesk-syncandzendesk-webhook.
Every new recipe must include:
- A unique package name and a
package.jsonwith accurate scripts and engine requirements. - A README covering the outcome, when to use it, prerequisites, setup, exact run or deploy commands, expected result, code map, extension points, and verification.
- A clear TypeScript entrypoint and
tsconfig.json. .env.examplewhen configuration is required, containing names and safe placeholders only.- Deterministic offline checks for meaningful logic. New Workers should expose
build,check, andtestscripts. - One complete
catalog.jsonentry and links from the appropriate landing page and root README.
Do not add placeholder projects or catalog entries. Add a recipe only when its code, setup instructions, and checks are runnable.
Use proportional validation and report exactly what ran.
For an API example:
cd examples/<task>
npm install
npx tsc --noEmit
# Run the catalog's `run` command only when its required configuration is safe.For a Worker:
cd workers/templates/<integration>-<capability>
npm install
npm run check
npm test
npm run buildRun only scripts that exist in that project's package.json. Then, from the
repository root, install the repository tooling and run:
npm install
npm run verify:allBefore finishing, confirm that:
- Documentation links and commands use the current flat paths.
catalog.jsonmatches every package-backed direct child ofexamples/andworkers/templates/, with no placeholder entries.- No secrets, build output, dependency directories, or local Worker state were added.
- A recipe README still describes the behavior implemented by its entrypoint.
For documentation-only changes, validate links and run the root Markdown and
format checks. For skill changes, read skills/README.md
and the relevant skill collection guide first; update evaluations when behavior
changes. Do not treat a skill as a runnable cookbook recipe or add it to
catalog.json.