You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both kinds are first-class: members of MetadataTypeSchema, bound to schemas in BUILTIN_METADATA_TYPE_SCHEMAS, and authorable as defineStack({ jobs, emailTemplates }).
job — references/system/job.mdx (182 lines) is the only page. automation/index.mdx mentions it in exactly one bullet ("Scheduled jobs run on setInterval or cron via the job service, alongside schedule-type flows") and gives it no Card and no page. The stack describe string is 'Background / Scheduled Jobs (run by IJobService on cron/interval/once schedules)'.
email_template — references/system/email-template.mdx (95 lines) publishes the shape. kernel/runtime-services/email-service.mdx documents services.email and sendTemplate({ template, locale }) — i.e. how to send. Nothing documents how to author a template, how locale resolves, or how a flow's notify node reaches one. Grep for emailTemplates across the hand-written docs returns zero hits.
File surface
content/docs/automation/jobs.mdx — new
content/docs/automation/email-templates.mdx — new
content/docs/automation/index.mdx — edit ("The building blocks" bullet + a Card each)
content/docs/automation/meta.json — two added entries
⛔ Nothing outside content/docs/automation/. In particular do not edit kernel/runtime-services/email-service.mdx — cross-link it instead; that file is the service contract and belongs to a different surface.
PM ruling on placement
Both pages go in automation/. job clearly belongs beside flows and hooks. email_template is System Protocol by schema module, but its reader arrives from an automation need ("my flow should email someone"), and automation/ is where that reader is. If while writing you find a concrete reason this misleads, say so in the report and place it anyway — do not re-shelve on your own.
What to write
jobs.mdx
Read JobSchema (packages/spec/src/system/job.zod.ts) and the IJobService contract, and write from them:
what a job is and how it differs from a schedule-type flow — this distinction is the reason the page exists, so lead with it and make it decidable, not descriptive;
the schedule forms the schema actually accepts (cron / interval / once) with real examples;
how the handler is bound and what runs it;
cluster semantics — kernel/cluster.mdx already says something about which node fires a scheduled job; cross-link rather than restate, and verify what it says still holds;
failure, retry and observability, to whatever depth the schema and service actually support. If a facet is not supported, say nothing rather than implying it.
Do not touch packages/spec/**. If a schema property looks dead or contradicts the service, report it — that is a domain:spec finding, not something to document around.
Do not document capabilities the runtime does not implement. An undocumented gap is a smaller problem than a documented fiction.
Gates (derived at dispatch time via node scripts/pm/dispatch-gates.mjs, not recalled)
check:doc-anchors, check:docs-audit-scope, check:docs-redirects, check:published-readme-links, check:role-word, check:cross-package-test-inputs, and the spec liveness set (check:empty-state, check:liveness, check:strictness-ledger, check:variant-docs). Re-derive against your actual diff.
Acceptance
A developer who needs a nightly job, or an outbound templated email, lands on a page from the Automation sidebar and can author one without opening packages/spec.
Every code sample validates against the real schema.
Part of #10206
The gap
Both kinds are first-class: members of
MetadataTypeSchema, bound to schemas inBUILTIN_METADATA_TYPE_SCHEMAS, and authorable asdefineStack({ jobs, emailTemplates }).job—references/system/job.mdx(182 lines) is the only page.automation/index.mdxmentions it in exactly one bullet ("Scheduled jobs run onsetIntervalor cron via the job service, alongsideschedule-type flows") and gives it no Card and no page. The stack describe string is'Background / Scheduled Jobs (run by IJobService on cron/interval/once schedules)'.email_template—references/system/email-template.mdx(95 lines) publishes the shape.kernel/runtime-services/email-service.mdxdocumentsservices.emailandsendTemplate({ template, locale })— i.e. how to send. Nothing documents how to author a template, howlocaleresolves, or how a flow's notify node reaches one. Grep foremailTemplatesacross the hand-written docs returns zero hits.File surface
content/docs/automation/jobs.mdx— newcontent/docs/automation/email-templates.mdx— newcontent/docs/automation/index.mdx— edit ("The building blocks" bullet + a Card each)content/docs/automation/meta.json— two added entries⛔ Nothing outside
content/docs/automation/. In particular do not editkernel/runtime-services/email-service.mdx— cross-link it instead; that file is the service contract and belongs to a different surface.PM ruling on placement
Both pages go in
automation/.jobclearly belongs beside flows and hooks.email_templateis System Protocol by schema module, but its reader arrives from an automation need ("my flow should email someone"), andautomation/is where that reader is. If while writing you find a concrete reason this misleads, say so in the report and place it anyway — do not re-shelve on your own.What to write
jobs.mdxRead
JobSchema(packages/spec/src/system/job.zod.ts) and theIJobServicecontract, and write from them:schedule-type flow — this distinction is the reason the page exists, so lead with it and make it decidable, not descriptive;kernel/cluster.mdxalready says something about which node fires a scheduled job; cross-link rather than restate, and verify what it says still holds;email-templates.mdxRead
EmailTemplateDefinitionSchema(packages/spec/src/system/email-template.zod.ts):sendTemplate({ template, locale })picks a variant, and how that interacts with thetranslationkind if it does;services.email;EmailTemplateDefinitionSchema, not the legacyEmailTemplateSchema, which was demoted and then removed. Consumers historically wired the wrong one. Make sure every example you write is valid against the canonical schema.⛔ Non-goals
packages/spec/**. If a schema property looks dead or contradicts the service, report it — that is adomain:specfinding, not something to document around.Gates (derived at dispatch time via
node scripts/pm/dispatch-gates.mjs, not recalled)check:doc-anchors,check:docs-audit-scope,check:docs-redirects,check:published-readme-links,check:role-word,check:cross-package-test-inputs, and the spec liveness set (check:empty-state,check:liveness,check:strictness-ledger,check:variant-docs). Re-derive against your actual diff.Acceptance
packages/spec.