docs(spec): mark PromptTemplate.system/.user [EXPERIMENTAL — not enforced] - #16548
Conversation
…rced] Under the #15954 ruling (decision batch #56, option B) the template-typed pair is marked, not retired. Both .describe() strings on PromptTemplateSchema now carry the repo's existing [EXPERIMENTAL — not enforced] prefix and state that no runtime renders or executes the template today. The model site is ai/agent.zod.ts (four uses of the identical prefix); the card named ai/knowledge-source.zod.ts, which carries no such marking at all (zero hits for the bare token EXPERIMENTAL, positive control lit). Prose only. .user remains required and .system remains optional — the schema shape is untouched. The ADR-0058 D7 ledger row `template-prompt` records the marking for both positions it covers, and the generated reference page is regenerated with the repo's own tooling. Claude-Session: https://claude.ai/code/session_01T6HeZvT9wdSJD1ZxJb5Eno Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 130 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0ecd938b2e8d1ef4e61c8cf61bde929b726269e4 && git checkout 0ecd938b2e8d1ef4e61c8cf61bde929b726269e4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d1c86a745a42b15e0cfc2e61884a6672dfef3706 f6ddb40574fbbbd0eb9d0232c8d3562eb96b2204 && git checkout -B drift-repro d1c86a745a42b15e0cfc2e61884a6672dfef3706 && git merge --no-ff f6ddb40574fbbbd0eb9d0232c8d3562eb96b2204
node scripts/docs-audit/affected-docs.mjs --json d1c86a745a42b15e0cfc2e61884a6672dfef3706 |
Why this PR has been sitting
|
Pull request was converted to draft
…s runtime string `check:doc-authoring`'s cross-package prose-id leg reds on a tracker id inside a non-test string under packages/: the ledger `note` is runtime prose that reaches authors, operators and generated surfaces, none of whom can resolve one. The ruling id and its decision-batch number now live in an adjacent `//` comment — the gate's own prescribed remedy; ADR-0049 stays in the string as a customer-resolvable reference. No baseline entry: that file is maintainer-only and shrink-only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T6HeZvT9wdSJD1ZxJb5Eno
Repaired and armed —
|
Fixes #16321
Clause-②: no— prose only. No accept-set change, no new or narrowed authorable key, no matrix declaration. Every value that parsed before parses now, and every value refused before is refused identically.The ruling
Under the #15954 ruling (director seat, decision batch #56, option B) the template-typed pair is marked, not retired.
What changed
1.
packages/spec/src/ai/model-registry.zod.ts(lines 121-122). Both.describe()strings onPromptTemplateSchemanow carry the marking and state that no runtime renders or executes the template today:2. D7 ledger (
packages/qa/dogfood/test/expression-conformance.ledger.ts). Thetemplate-promptrow records the marking for both positions it covers.3. Generated reference page regenerated with the repo's own tooling —
pnpm --filter @objectstack/spec check:generated --fix, which proved exactly one artifact stale and regenerated only that one. No generated artifact was hand-edited.4. Changeset —
patchon@objectstack/spec, citing the ruling.The schema shape is untouched
.userremains required (no.optional()) and.systemkeeps the.optional()it already had. The generated page still rendersuseras required. Optionalising or retiring a required key is parse-breaking and is deliberately left to its own card.The card names a model site that does not exist
The card says to copy the form
ai/knowledge-source.zod.tsuses forKnowledgeRefreshPolicy.cron. That file carries no such marking. Re-measured independently at13c08356abc61f13acd5db0932f99d482c134588:git grep -c "EXPERIMENTAL" 13c08356ab -- packages/spec/src/ai/knowledge-source.zod.ts— exit 1, zero hits.git cat-file -esucceeds), so the zero is about content, not absence.packages/spec/srcreturns hits in 24 files. The token is a single bare word that cannot wrap across lines.The real precedent, and the site I adopted. Eleven declarations across
packages/spec/srccarry one uniform prefix. I tookpackages/spec/src/ai/agent.zod.tsas the model — sameai/directory, four uses, and named by no in-flight claim. Exact spelling adopted, character for character:followed by the original description sentence, then a sentence naming what does not happen at runtime — e.g.
agent.zod.ts:197reads'[EXPERIMENTAL — not enforced] State machine defining the agent conversation flow and constraints. Parsed but no runtime consumer yet.'ai/tool.zod.tsuses the identical spelling and was read only, never edited — PR #16531 holds that file.Why the marking is true
PromptTemplateSchemahas no consumer outsidepackages/spec. Measured on this branch: the only matches outside that package are a changeset, two generated docs pages, and the D7 ledger row itself. Nothing interpolates the holes; nothing checks the declaredvariablesagainst them.Verification
Clause-② gates, confirmed green and proven live. Both were run with no rebuild between the mutation and the gate, because a rebuild regenerates the gate's own baseline and returns a falsely green leg.
PromptTemplateSchema (const)fromapi-surface/ai.jsonpublic API changed: 0 breaking (removed/narrowed), 1 added.public API surface + factory signatures unchanged ✓ai/PromptTemplate:userfromauthorable-surface/ai.jsonauthorable-surface/ is out of date (1 key(s) not recorded). + ai/PromptTemplate:userauthorable-defaults/ verified against upstream 13c08356abc6 — 1211 default(s) unchangedEach mutation leg carried an on-disk landing proof (anchored token count before and after) and each restore leg was proven by an empty
git diff HEADplus agit hash-objectmatch against the HEAD blob. The script restores under atrapon EXIT INT TERM with absolute paths. The working tree is clean afterwards.A first attempt at leg A1 was a genuine no-op and is reported rather than quietly retried: the anchor
PromptTemplateSchemadoes not appear as a list element — the element isPromptTemplateSchema (const). The landing proof caught it (count before=0, after=0), the script aborted the leg as void, and the anchor was corrected before re-running. No green was banked from the void leg.Test and gate runs (all at commit
9b3cb7461c):pnpm --filter @objectstack/spec test— 484 files, 13149 tests passedpnpm --filter @objectstack/spec typecheck— exit 0pnpm --filter @objectstack/dogfood exec vitest run test/expression-conformance.test.ts— 4 passed (the D7 ledger and its ratchet)pnpm --filter @objectstack/spec check:generated— all 15 generated artifacts up to datepnpm check:nul-bytes,check:empty-changeset,check:changeset-no-major,check:adr-0087-registration,check:changeset-fixed,check:spec-changes,check:meta-url-spelling— all exit 0The last three (
check:changeset-fixed,check:spec-changes,check:meta-url-spelling) were run specifically becausedispatch-gates.mjsflagged their rosters as living in directories my paths touch, where silence is evidence in neither direction.Generated-artifact footprint, measured — 4 files, only 1 of them visible to
git status:content/docs/references/ai/model-registry.mdxpackages/spec/json-schema/(ai/ModelRegistry.json,ai/PromptTemplate.json,objectstack.json)Counting only what
git statusreports would undercount the regeneration by the wholejson-schema/directory. Verified by content grep, not by a snapshot diff — the snapshot was taken after the build had already written that tree, so a diff alone would have reported a false zero.Base
Branched from the literal sha
13c08356abc61f13acd5db0932f99d482c134588, and every proof above is anchored to it.origin/mainhas moved since; the branch is deliberately not merged forward so the anchoring holds, and the merge queue rebuilds against currentmainat land time.Left as draft, not enqueued — that call is the PM's.
Generated by Claude Code
Generated by Claude Code