Skip to content

docs(skills): teach a handler hook's refusals, a code's reasons and params - #33775

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-3vm39u
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-3vm39u

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

domain:skills#1 · os-project-manager · session_01FEkQ5o9NG21PoQGHjYvjzM

Fixes #33658

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

Three files, no code.

skills/objectstack-data/references/data-hooks.md § Declared refusals (refusals)

  • The example's ASSET_NOT_IN_STOCK entry now declares params: ['due'] and a reasons entry on_loan whose sentence fills a due hole, and the body throws Object.assign(new Error(), { code: 'ASSET_NOT_IN_STOCK', reason: 'on_loan', params: { due: asset.due_date } }) before the existing code-only throw.
  • "Only a js body can declare one: a handler hook, inline TS included, is refused at save" is replaced: a js body or a handler (inline or named) can declare one; an expression body, or neither, is refused at save.
  • New bullets: reasons are snake_case, thrown as reason, and keep the code's wire code and status; params names what a hole may fill, and a hole over any other name, or any hole with no params, is refused.
  • The translation bullet names both keys, hooks.HOOK.refusals.CODE.message and hooks.HOOK.refusals.CODE.reasons.REASON.message, and says the thrown text (not "the body's own text") is unused.
  • The refusal bullet adds "a reason missing from a code's reasons".
  • The intro says "the hook throws the code" instead of "its body throws the code".

skills/objectstack-i18n/SKILL.md § Server-Composed User Text: the App-authored bullet names hooks.HOOK.refusals.CODE.reasons.REASON.message beside the code's key, and says a translation of a sentence whose entry declares params keeps its holes, filled by the runtime after it is picked.

.changeset/33658-skills-hook-refusal-reasons-params.md: '@objectstack/skills': patch (the catalog ships in @objectstack/skills).

Token ratchet payment (same file, restatements only). data-hooks.md was at 10004/10011; the new text cost about 150 tokens. Removed:

Removed Its home in the same file
"The deprecated handler takes an inline function or a registered function's name (Registration Methods)." the body vs handler table (inline) and Registration Methods 1 (string name via functions)
"So spell keys against the object's declared fields, and on an insert event read previous only against null ..." the paragraph above it (a typo'd key and a previous column on an insert fail the write) and the previous is null on insert bullet
"(A declarative condition does not hit this wall ...)" under Gotcha 1 § condition: "record here is the RECORD ... unlike ctx.input / ctx.result inside the body, which stay partial, see Gotcha 1"
"Register it like any hook, add it to defineStack({ hooks: [...] }) ..." after the copy-paste example Registration Methods 1 (defineStack({ hooks }), AppPlugin auto-binds)

No ceiling moved. i18n.sourceLocale teaching is untouched (#33635 holds it).

Why

PR #33641 (#33214, ruling 6879477573) made HookSchema and the runtime accept refusals on a handler hook, reasons under a code and declared params. The skills still taught the pre-#33641 rule, so an agent would keep a hand-written body for every rule, one sentence per code and no params.

Tests

No test file is committed (skills text only). Two one-time checks of the new example, both against main @ 12a0f09f built under the lock:

HookSchema.parse on the published example and six mutants (packages/spec dist)
example parse: true
hole over undeclared name: refused: refusals.ASSET_NOT_IN_STOCK.reasons.on_loan.message A hook refusal `message` binds only `due` ...
hole with no params: refused: refusals.ASSET_NOT_IN_STOCK.reasons.on_loan.message A hook refusal `message` whose entry declares no `params` is plain text ...
literal undeclared reason: refused: body.source `body.source` throws code 'ASSET_NOT_IN_STOCK' with reason 'lost' ...
inline handler + refusals: ACCEPTED
inline handler, undeclared reason: refused: handler `handler` throws code 'ASSET_NOT_IN_STOCK' with reason 'lost' ...
string handler + refusals: ACCEPTED
expression body + refusals: refused: refusals `refusals` is answered for a sandboxed `body` ...

The block was read out of the edited markdown file, not retyped. Each bullet's claim has a mutant above.

Real QuickJS run of the example's throw lines (scratch test beside hook-refusal-catalogue.test.ts, deleted after)

The body was bound through hookBodyRunnerFactory + QuickJSScriptRunner with the hook passed through HookSchema.parse; the one ctx.api read was swapped for an input value, every throw line kept as published. Tests 5 passed (5), exit 0.

ON_LOAN {"status":409,"body":{"error":"This asset is on loan until 2026-12-01.","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","object":"asset_checkout","userMessage":"This asset is on loan until 2026-12-01."}}
ZH {"status":409,"body":{"error":"该资产借出至 2026-12-01。","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","object":"asset_checkout","userMessage":"该资产借出至 2026-12-01。"}}
RETIRED {"status":409,"body":{"error":"Only an in-stock asset can be checked out.","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","object":"asset_checkout","userMessage":"Only an in-stock asset can be checked out."}}

Acceptance notes

Each taught rule, read from main @ 12a0f09f:

Taught Read from
a js body or a handler (inline or string) may declare refusals; expression body or neither refused at refusals packages/spec/src/data/hook.zod.ts refuseUndeclaredLiteralRefusalCode (answered = body === undefined ? hasHandler : language === 'js')
reasons snake_case, thrown as reason, keep the code's status and wire code HOOK_REFUSAL_REASON_PATTERN (hook-refusal-codes.ts); HookRefusalSchema reasons describe; runtime declaredAnswer
a hole only over a declared param; no params means no hole hookRefusalMessageRefusal (closedScopeTemplateRefusal with roots: params)
literal undeclared code or reason refused at save, else a 500 hookRefusalCodesThrownIn / hookRefusalReasonsThrownIn; runtime undeclaredHookRefusalReasonAtRun
reason key, and a translation keeps its holes hookRefusalMessageKey (system/i18n-resolver.ts); translation.zod.ts hooks docblock

Out of scope, noted for the seat (not filed): the objectstack-data eval hooks-security-seeds-datasources.json id 7 expected_output still ends "a catalogue on a hook without a js body is refused at save", which #33641 made false (a handler hook may declare one). Its assertions (must_contain, must_not_contain) are unaffected. carrier: the skills seat.

Verification

Readings on head 6072b2db:

  • Model tier (dispatch-gates --tier): MANDATORY contract-review tier, skills/** clause ①, no one-line exit. This branch was written at the default tier; the seat's in-seat at-tier contract review pays the mandated tier.
  • check-governed-merges.mjs --branch claude/project-thread-3vm39u: GOVERNED, skills/** ×2, landing tier H on a path list; low-risk skills arm NOT MEASURED there ("no reading of the pull request was handed in"). The arm is read with --pr on this PR.
  • Skills readings (lines; tokens = ceil(bytes/4)): data-hooks.md 892 to 893 lines, 10004 to 9990 tokens (ceiling 10011); objectstack-i18n/SKILL.md 522 to 524 lines, 5918 to 5971 tokens (ceiling 6333). Bundle, all 11 skills/*/SKILL.md: 4588 to 4590 lines, 59049 to 59102 tokens.
  • check-skill-line-ratchet.mjs: exit 0.
Derived gates: 48 derived, 47 exit 0, 1 NOT MEASURED, plus check:skill-examples

node scripts/pm/dispatch-gates.mjs --ran FILE: "48 derived famil(ies) accounted for, 47 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".

  • exit 0: check-adr-0087-registration (base, self-test), check-changeset-no-major, check-closing-keyword-parity (+ self-test), check-comment-mask-corpus, check-doc-route-spelling (advisory, self-test), check-dts-emitted self-test, check-empty-changeset (base, self-test), check-skills-token-ratchet (+ self-test), ci assert-turbo-remote-cache / plan-test-core-shards / prune-turbo-cache / snapshot-next self-tests, check-governed-queue-guard self-test, release-rehearsal-clone self-test, release-pending-publish self-test, lint check:doc-formula-expressions, spec check:skill-docs, spec check:skill-refs, check:agent-test-spelling, check:changeset-gate-self-tests, check:ci-filter-parity, check:closed-ceremony-text, check:corpus-claim-drift, check:cross-package-test-inputs, check:doc-authoring, check:driver-memory-census, check:dts-closure, check:gitlink-declared, check:lean-entry-closure, check:merge-driver, check:nul-bytes, check:pm-governed-merges, check:pm-skill-id-lint, check:published-files, check:refd-timer-probe, check:role-word, check:skill-compatibility, check:skill-frame-sync, check:skill-identifier-liveness, check:skill-links, check:sourcemap-no-sources-content, check:watch-hint-literal.
  • NOT MEASURED: pnpm check:dual-build-cjs-loads exit 3, reason: it reads every package's dist and asks for a full pnpm build; this diff touches no package, so CI's run is the reading.
  • Outside the derivation: pnpm --filter @objectstack/spec run check:skill-examples exit 0, "346 prose examples type-check across 3 surface(s)".

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5o9NG21PoQGHjYvjzM

…arams

The data-hooks reference's declared-refusals section now teaches what the
schema and runtime on main enforce: a handler hook may declare refusals, a
code may hold snake_case reasons thrown as { code, reason }, and params name
the only roots a {{ }} hole may fill. The i18n skill names the reason key.
Four same-file restatements pay for the new text.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5o9NG21PoQGHjYvjzM
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6072b2db95941ecbc5aaeb2271bfd79bd951b64b
Local-runs: none
Scope: skills/objectstack-data/references/data-hooks.md, skills/objectstack-i18n/SKILL.md + none

Read: card #33658 (body and its four comments, developer report 6893005866 included), PR #33775 (body, three-file list, net diff against main at merge-base 12a0f09f), the check-runs on the head. Code read on main, never reviewed: packages/spec/src/data/hook.zod.ts, packages/spec/src/data/hook-refusal-codes.ts, packages/runtime/src/sandbox/hook-refusal-catalogue.ts, packages/runtime/src/sandbox/quickjs-runner.ts (the refusal address reader), packages/spec/src/system/i18n-resolver.ts (hookRefusalMessageKey), packages/spec/src/system/translation.zod.ts (the hooks group). The diff holds no implementing file: two skill files and a changeset.

① Derived judgments

  • Accept-set: unchanged. No schema, no runtime, no gate file in the diff. Right.
  • Public surface: the published skills catalogue (@objectstack/skills) changes its teaching in two files; nothing else publishes. Right.
  • Tier: skills/** is a governed path, so this record is owed at CONTRACT_REVIEW_TIER; the developer drafted below it and says so. This record is the at-tier read. Right.
  • Landing arm: the developer reads the low-risk skills arm as Tier S with --pr. Not re-measured here (read-only); the seat's reading at landing governs.
  • Check-runs on the head, read twice: no failure and no cancelled run. Concluded success: Build Core, Check Changeset, Check PR Size, Dogfood Regression Gate, Governed Surface Queue Guard, Lint · PM dispatch-gates, the three scoped Lint jobs, PR-body guards, Test UI, filter, Auto Label. STILL RUNNING at the time of this record: Lint · ESLint, Lint · docs and code guards, Lint · repo and tooling gates, Lint · CI, release and engine gates, Type Check · workspace, · consumer gates, · debt ledger (· source gates and Live E2E UI were running on the first read), Test Core shards 1/8 and 2/8. The token ratchet, skill-links and skill-examples verdicts sit in the jobs still running, so they are NOT yet answered by CI; the developer's local exits (ratchet 9990 of 10011, check:skill-examples exit 0) are a report, not a gate verdict. The PASS below is on the contract; the seat lands only on a fully green head.

② Semver level

.changeset/33658-skills-hook-refusal-reasons-params.md bumps '@objectstack/skills': patch. Right: prose in the shipped catalogue, no API; 25 changesets on main use the same line for skills text. The Check Changeset run concluded success.

Clause-②: no — holds. The diff takes no capability away and declares nothing new; it brings the teaching up to what main already enforces.

③ Boundary flags

  • Developer deviation, model tier: answered by this record.
  • Developer deviation, pr_create without assignees: the seat's hand-over step; no contract effect.
  • Developer deviation, four deleted restatements: judged in ④, all four are restatements.
  • open_questions: empty.
  • Out-of-scope flag, eval skills/objectstack-data/evals/hooks-security-seeds-datasources.json id 7: confirmed. Its expected_output ends with a clause saying a catalogue on a hook without a js body is refused at save; refuseUndeclaredLiteralRefusalCode on main answers a handler hook, so the clause is false. Ruling: a FOLLOW-UP CARD, not a should-fix on this PR. Reasons: the clause went false at PR feat(spec,runtime): hook refusals on handler hooks, with declared reasons and params #33641, not here; the file is outside the card's Work list and the claim's file surface (stop on breach); the eval's assertions are mechanical and still agree with the skill at this head (must_contain language: 'js', must_not_contain handler:), because the skill still calls handler deprecated and prefers body, so the model answer for that prompt is unchanged. The one stale clause is reference prose. The seat files the card (domain:skills, one-clause fix) before or at ACCEPT; until then the skill and that sentence disagree and the skill is the one that is right.

④ Design judgment

skills/objectstack-data/references/data-hooks.md — holds. Each taught sentence against main:

  • "A js body or a handler (inline or named) can declare one; an expression body, or neither, is refused at save." answered = body === undefined ? hasHandler : language === 'js', with hasHandler true for a function or a non-empty string. An expression body beside a handler is refused too, which the sentence covers. No sentence left in the file, or in any other skill file at this head, still says only a sandboxed body may declare refusals (grep of skills/**; the one remaining place is the eval prose in ③).
  • "reasons (snake_case, thrown as reason) add sentences that keep the code's wire code and status." HOOK_REFUSAL_REASON_PATTERN; declaredAnswer returns the entry's status and the body and in-process paths both build the error with the code.
  • "params names what a {{ name }} hole may fill (thrown as params); a hole over any other name, or any hole with no params, is refused." hookRefusalMessageRefusal: no params, or an empty list, is the plain-text rule; otherwise closedScopeTemplateRefusal with roots: params, applied to the entry's message and to every reason's.
  • "Translated via hooks.HOOK.refusals.CODE.message (or ….CODE.reasons.REASON.message); the thrown text and status are unused." Spelled exactly as hookRefusalMessageKey builds both keys; the status is the entry's, default 400; the served sentence is the picked one.
  • "An undeclared code (or none), or a reason missing from a code's reasons, is refused: at save if thrown literally, else as a 500." hookRefusalCodesThrownIn / hookRefusalReasonsThrownIn at parse; undeclaredHookRefusalAtRun / undeclaredHookRefusalReasonAtRun as a sandbox fault.
  • "The wire code is the status's (default 400), with the hook's as declaredCode": unchanged and still true; a reason does not move it.
  • The example: parses under the shapes read (params due an identifier, reason on_loan snake_case, the hole over the one declared name, status 409 in 400 to 499). Its two-line reason throw is one throw statement to the save reader (the line break sits inside the bracket), names exactly one code, and on_loan is declared, so the save accepts it; the status comparand 'on_loan' sits outside any throw. The runtime reads reason and params off the thrown error (readRefusalAddress), picks the reason's translation, then fills due. The code-only throw under an entry with params is served the code's own sentence, which has no hole.
  • Ratchet payment: the four deleted passages carried nothing unique. (1) deprecated handler takes an inline function or a registered name: the body vs handler table and Registration Methods 1 (string-named handler through functions). (2) spell keys against declared fields, read previous only against null on insert: the paragraph directly above (a typo'd key or a column off previous on an insert fails the write) and the bullet that previous is null on insert. (3) the Gotcha 1 parenthesis on condition: the condition section says the same and points at Gotcha 1. (4) register it like any hook: Registration Methods 1 (defineStack({ hooks }), AppPlugin auto-binds). The word "deprecated" for handler survives in the file (intro, the table, Registration Methods 1).

Findings:

  • nit — "a reason missing from a code's reasons" is silent on a code that declares NO reasons: there a thrown reason is not read at all and the code's own sentence is served (declaredReason, and the reasons guard in refuseUndeclaredLiteralRefusalCode). The sentence is true as read for a code that has reasons; a reader who over-reads it only becomes more careful. Left as an accepted deviation (21 tokens of headroom).
  • nit — "at save if thrown literally" holds for a js body and an inline handler; a NAMED handler's source is not read by the save (refusalSourceOf returns nothing for a string), so its literal throw is met as the 500. The outcome named by "else as a 500" is right; only the save half does not reach that carrier. Accepted deviation.

skills/objectstack-i18n/SKILL.md — holds. The reason key is spelled as hookRefusalMessageKey(hook, code, reason) builds it and as the hooks group of translation.zod.ts nests it (refusals.CODE.reasons.REASON.message). "Under an entry declaring params, a translation keeps its {{ name }} holes; the runtime fills them after picking it": declaredRefusalMessage picks the translated sentence first and fills afterwards, and fills only when the entry declares params. The surrounding sentences (negotiated over the app's locales, declared sentence on a miss, no en floor) are unchanged and still true for a reason. The card asked for the key "next to the row"; the skill has no table row for it, the bullet is the one place the code key is named, and the reason key sits beside it. No finding.

No must-fix, no should-fix. Two nits, both accepted as written; one follow-up card owed by the seat (③, eval id 7).

Implemented-by: claude/project-thread-3vm39u
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T10:34Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet objectstack-fleet Bot mentioned this pull request Nov 15, 2026
3 tasks
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

席位核对

Verdict: ACCEPT, seat lands (low-risk skills arm, Tier S) · head 6072b2db95941ecbc5aaeb2271bfd79bd951b64b · card #33658 · report 6893005866 · at-tier contract review 6893056455 (PASS on this head, nits only; CONTRACT_REVIEW_TIER, served model verified by the seat; Ruling-ref for the in-seat review: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb option A; the arm under Leehom 「同意 把低风险的 Tier H 放权给座位」).

  • Shape: draft → main, Fixes #33658. skills/objectstack-data/references/data-hooks.md, skills/objectstack-i18n/SKILL.md, one changeset ('@objectstack/skills': patch). Clause-②: no; Metadata-protocol: none. check-governed-merges --pr 33775 from a fresh origin/main: low-risk skills arm, Tier S.
  • Teaching (against main after PR feat(spec,runtime): hook refusals on handler hooks, with declared reasons and params #33641): a js body or a handler may declare refusals; reasons under a code keep its wire code and status; a {{ }} hole only over a declared param; the i18n key exactly as hookRefusalMessageKey builds it. Ratchet paid by four same-file restatements whose homes remain.
  • Developer deviation accepted: drafted below the MANDATORY contract-review tier; the at-tier record above is the compensating read.
  • Gates: 48 derived, 47 exit 0, check:dual-build-cjs-loads NOT MEASURED locally (no package built; CI answers it). Check-runs on the head: 44 total, 28 success, 16 skipped, 0 other.
  • Follow-ups: the stale eval prose (id 7 of hooks-security-seeds-datasources.json) and the two nits on the one checklist card review follow-ups of PR #33775 #33778 (ruling B on pm/skills: one checklist card per reviewed PR for its review follow-ups, p3 copy nits into area loose-ends cards, and a dedupe step for retro reviews #33718).
  • Pre-landing check: ① same-head PASS 6893056455. ② check-runs as above. ③ K = 7 on the merge base; no commit on main since touches the PR's files; mergeable_state clean.
  • Landing: pr_ready + automerge_enable in the same relay round.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 10:45
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Seat note: re-post of record 6893056455 on the same head, adopted from the same reviewer transcript, with one wording change. The out-of-scope ruling sentence on eval id 7 now reads "not graded against this PR", so the queue guard's grade reader (#33604) can attribute it. The reviewer's judgment is unchanged.

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6072b2db95941ecbc5aaeb2271bfd79bd951b64b
Local-runs: none
Scope: skills/objectstack-data/references/data-hooks.md, skills/objectstack-i18n/SKILL.md + none

Read: card #33658 (body and its four comments, developer report 6893005866 included), PR #33775 (body, three-file list, net diff against main at merge-base 12a0f09f), the check-runs on the head. Code read on main, never reviewed: packages/spec/src/data/hook.zod.ts, packages/spec/src/data/hook-refusal-codes.ts, packages/runtime/src/sandbox/hook-refusal-catalogue.ts, packages/runtime/src/sandbox/quickjs-runner.ts (the refusal address reader), packages/spec/src/system/i18n-resolver.ts (hookRefusalMessageKey), packages/spec/src/system/translation.zod.ts (the hooks group). The diff holds no implementing file: two skill files and a changeset.

① Derived judgments

  • Accept-set: unchanged. No schema, no runtime, no gate file in the diff. Right.
  • Public surface: the published skills catalogue (@objectstack/skills) changes its teaching in two files; nothing else publishes. Right.
  • Tier: skills/** is a governed path, so this record is owed at CONTRACT_REVIEW_TIER; the developer drafted below it and says so. This record is the at-tier read. Right.
  • Landing arm: the developer reads the low-risk skills arm as Tier S with --pr. Not re-measured here (read-only); the seat's reading at landing governs.
  • Check-runs on the head, read twice: no failure and no cancelled run. Concluded success: Build Core, Check Changeset, Check PR Size, Dogfood Regression Gate, Governed Surface Queue Guard, Lint · PM dispatch-gates, the three scoped Lint jobs, PR-body guards, Test UI, filter, Auto Label. STILL RUNNING at the time of this record: Lint · ESLint, Lint · docs and code guards, Lint · repo and tooling gates, Lint · CI, release and engine gates, Type Check · workspace, · consumer gates, · debt ledger (· source gates and Live E2E UI were running on the first read), Test Core shards 1/8 and 2/8. The token ratchet, skill-links and skill-examples verdicts sit in the jobs still running, so they are NOT yet answered by CI; the developer's local exits (ratchet 9990 of 10011, check:skill-examples exit 0) are a report, not a gate verdict. The PASS below is on the contract; the seat lands only on a fully green head.

② Semver level

.changeset/33658-skills-hook-refusal-reasons-params.md bumps '@objectstack/skills': patch. Right: prose in the shipped catalogue, no API; 25 changesets on main use the same line for skills text. The Check Changeset run concluded success.

Clause-②: no — holds. The diff takes no capability away and declares nothing new; it brings the teaching up to what main already enforces.

③ Boundary flags

  • Developer deviation, model tier: answered by this record.
  • Developer deviation, pr_create without assignees: the seat's hand-over step; no contract effect.
  • Developer deviation, four deleted restatements: judged in ④, all four are restatements.
  • open_questions: empty.
  • Out-of-scope flag, eval skills/objectstack-data/evals/hooks-security-seeds-datasources.json id 7: confirmed. Its expected_output ends with a clause saying a catalogue on a hook without a js body is refused at save; refuseUndeclaredLiteralRefusalCode on main answers a handler hook, so the clause is false. Ruling: a FOLLOW-UP CARD, not graded against this PR. Reasons: the clause went false at PR feat(spec,runtime): hook refusals on handler hooks, with declared reasons and params #33641, not here; the file is outside the card's Work list and the claim's file surface (stop on breach); the eval's assertions are mechanical and still agree with the skill at this head (must_contain language: 'js', must_not_contain handler:), because the skill still calls handler deprecated and prefers body, so the model answer for that prompt is unchanged. The one stale clause is reference prose. The seat files the card (domain:skills, one-clause fix) before or at ACCEPT; until then the skill and that sentence disagree and the skill is the one that is right.

④ Design judgment

skills/objectstack-data/references/data-hooks.md — holds. Each taught sentence against main:

  • "A js body or a handler (inline or named) can declare one; an expression body, or neither, is refused at save." answered = body === undefined ? hasHandler : language === 'js', with hasHandler true for a function or a non-empty string. An expression body beside a handler is refused too, which the sentence covers. No sentence left in the file, or in any other skill file at this head, still says only a sandboxed body may declare refusals (grep of skills/**; the one remaining place is the eval prose in ③).
  • "reasons (snake_case, thrown as reason) add sentences that keep the code's wire code and status." HOOK_REFUSAL_REASON_PATTERN; declaredAnswer returns the entry's status and the body and in-process paths both build the error with the code.
  • "params names what a {{ name }} hole may fill (thrown as params); a hole over any other name, or any hole with no params, is refused." hookRefusalMessageRefusal: no params, or an empty list, is the plain-text rule; otherwise closedScopeTemplateRefusal with roots: params, applied to the entry's message and to every reason's.
  • "Translated via hooks.HOOK.refusals.CODE.message (or ….CODE.reasons.REASON.message); the thrown text and status are unused." Spelled exactly as hookRefusalMessageKey builds both keys; the status is the entry's, default 400; the served sentence is the picked one.
  • "An undeclared code (or none), or a reason missing from a code's reasons, is refused: at save if thrown literally, else as a 500." hookRefusalCodesThrownIn / hookRefusalReasonsThrownIn at parse; undeclaredHookRefusalAtRun / undeclaredHookRefusalReasonAtRun as a sandbox fault.
  • "The wire code is the status's (default 400), with the hook's as declaredCode": unchanged and still true; a reason does not move it.
  • The example: parses under the shapes read (params due an identifier, reason on_loan snake_case, the hole over the one declared name, status 409 in 400 to 499). Its two-line reason throw is one throw statement to the save reader (the line break sits inside the bracket), names exactly one code, and on_loan is declared, so the save accepts it; the status comparand 'on_loan' sits outside any throw. The runtime reads reason and params off the thrown error (readRefusalAddress), picks the reason's translation, then fills due. The code-only throw under an entry with params is served the code's own sentence, which has no hole.
  • Ratchet payment: the four deleted passages carried nothing unique. (1) deprecated handler takes an inline function or a registered name: the body vs handler table and Registration Methods 1 (string-named handler through functions). (2) spell keys against declared fields, read previous only against null on insert: the paragraph directly above (a typo'd key or a column off previous on an insert fails the write) and the bullet that previous is null on insert. (3) the Gotcha 1 parenthesis on condition: the condition section says the same and points at Gotcha 1. (4) register it like any hook: Registration Methods 1 (defineStack({ hooks }), AppPlugin auto-binds). The word "deprecated" for handler survives in the file (intro, the table, Registration Methods 1).

Findings:

  • nit — "a reason missing from a code's reasons" is silent on a code that declares NO reasons: there a thrown reason is not read at all and the code's own sentence is served (declaredReason, and the reasons guard in refuseUndeclaredLiteralRefusalCode). The sentence is true as read for a code that has reasons; a reader who over-reads it only becomes more careful. Left as an accepted deviation (21 tokens of headroom).
  • nit — "at save if thrown literally" holds for a js body and an inline handler; a NAMED handler's source is not read by the save (refusalSourceOf returns nothing for a string), so its literal throw is met as the 500. The outcome named by "else as a 500" is right; only the save half does not reach that carrier. Accepted deviation.

skills/objectstack-i18n/SKILL.md — holds. The reason key is spelled as hookRefusalMessageKey(hook, code, reason) builds it and as the hooks group of translation.zod.ts nests it (refusals.CODE.reasons.REASON.message). "Under an entry declaring params, a translation keeps its {{ name }} holes; the runtime fills them after picking it": declaredRefusalMessage picks the translated sentence first and fills afterwards, and fills only when the entry declares params. The surrounding sentences (negotiated over the app's locales, declared sentence on a miss, no en floor) are unchanged and still true for a reason. The card asked for the key "next to the row"; the skill has no table row for it, the bullet is the one place the code key is named, and the reason key sits beside it. No finding.

No must-fix, no should-fix. Two nits, both accepted as written; one follow-up card owed by the seat (③, eval id 7).

Implemented-by: claude/project-thread-3vm39u
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T11:36Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 6ec7b93 Nov 15, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-3vm39u branch November 15, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: the hooks and i18n skills do not teach a handler-authored hook's refusals, the per-code reasons, or params (#33214)

1 participant