Repository navigation
docs(skills): type-check more objectstack-automation examples with os:check - #31791
Conversation
…:check Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
…unknown key is refused Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract-review-claim: session_01QsR2jULfPnqQFGcZUtKDFH · head 94881c6 · 2026-11-09T04:07Z The lane seat's isolated Fable reviewer runs the |
…ine, a pinned teaching site Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract reviewServed-tier: Inputs read: card #31112 body and all 16 comments (triage 6706617330, the slice 1 to 4 claims, reports and releases, the slice 5 claim 6731732071 and dev report 6731975880); PR #31791 body, file list and ① Derived judgments
② Semver level
③ Boundary flagsDev flags (report 6731975880 and the PR body's Acceptance notes), each answered:
④ Design judgmentEvery
Every cut in the PR body's cut list, judged under the lane ruling (a pointer the agent follows to reach content, that is a cross-reference to another file, section, row or repository, is not payable; only a restatement whose substance survives where the agent reads anyway is payable):
Findings:
No must-fix. The should-fix F1 earns a delta review of its fix. Implemented-by: VERDICT: FAIL |
… pay for the marks with restatement cuts Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract-review-claim: session_01QsR2jULfPnqQFGcZUtKDFH · head e90045b · 2026-11-09T04:31Z The lane seat's isolated Fable reviewer runs the |
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract reviewServed-tier: Delta round on the record for head 94881c6 (PR comment 6732120560: FAIL, should-fix F1, nits N1 and N2). Everything that record judged and this one does not restate is carried forward by reference to 6732120560; this record re-judges the delta Inputs read: card #31112 body and all 16 comments (triage 6706617330 through the slice 5 claim 6731732071 and dev report 6731975880; the seat's ruling on cuts 10, 11 and 13 and the dev's delta report are not on the card or the PR as comments and reach this record only through the review brief, which this record applies as the lane ruling); PR #31791 body (replaced for this head), file list and the net diff at e90045b; the check-runs on e90045b (two claim comments 6731986772 and 6732299929 and the record 6732120560 are the PR's only comments). The dispatch order and the seat's conclusions were not inputs. ① Derived judgments
② Semver level
③ Boundary flagsDev flags on this head (the PR body's Acceptance notes and Unmarked list; the delta report reaches this record through the brief), each answered:
④ Design judgmentEvery
Every cut in the PR body's cut list at this head (14 entries), judged under the lane ruling as the seat read it (a pointer the agent follows to reach content in another file, section, row or repository is not payable; a restatement whose substance survives where the agent reads anyway is payable, and a parenthesis whose target sits at the cut site is a restatement):
No cut in the list is a pointer; no pointer named in 6732120560 F1 or in the seat's order is still cut. The cut list is complete against the net diff: every removed or shortened sentence in the four files is one of the 14, and the only other prose change is the added fragment note. Findings:
No must-fix. No should-fix: F1 of 6732120560 is resolved on the tree (five pointers restored byte-identical to Implemented-by: VERDICT: PASS |
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH 维护者速读
席位核对Head-sha:
|
Requested by Steedos · project thread
Refs #31112 (slice 5 of a per-skill split: item 4, objectstack-automation; the card stays open)
Clause-②: no
Metadata-protocol: none
维护者速读
skills/objectstack-automation/references/state-machines-and-approvals.md(两处新标记与三处重复句删减);其次references/integration-recipes.md(配方 4、5 的标记与导入路径)。pnpm --filter @objectstack/spec check:skill-examples,预期最后一行为 343 段示例全部通过类型检查。What changes
skills/objectstack-automationhad 3 of its 19 fencedts/typescriptblocks undercheck:skill-examples(measured onmainf647430, all*.mdoutsideevals/,references/_index.mdexcluded as generator-owned). It now has 9. Each new mark is the os:check marker on the line above the fence plus one import line; three blocks also gain a wrapper on their existing first and last lines (const notify: FlowNode = {…};,const rule: StateMachineValidation = {…};,defineFlow({…});).SKILL.mdreferences/examples-flows.mdreferences/integration-recipes.mdreferences/state-machines-and-approvals.mdSkills bundle reading: the sum of every published
SKILL.mddoes not move (4601 → 4601 lines against currentmain; this skill'sSKILL.mdis 452 → 452).SKILL.md: thenotifynode is typedFlowNode(import type { FlowNode } from '@objectstack/spec/automation';).examples-flows.md: the time-relative sweep gainsimport { defineFlow } from '@objectstack/spec';anddefineFlow(…).state-machines-and-approvals.md: thestate_machinerule is typedStateMachineValidation(@objectstack/spec/data); the discount approval flow gainsimport { cel, defineFlow } from '@objectstack/spec';anddefineFlow(…).integration-recipes.md: recipe 4 importsdefineFlowand recipe 5 importsdefineConnector, both from@objectstack/spec(the root exports both;@objectstack/spec/integrationalso exportsdefineConnector).SKILL.md's trigger start node, andintegration-recipes.md's recipes 1 to 3. They compile with a wrapper (probed: 0 diagnostics), but the file has no room for the wrapper once every cross-reference stays. Each is byte-identical tomain.SKILL.md's twoscriptblocks are fenced inside a list item (indented 3 spaces), and the checker reads column-0 fences only.examples-flows.md's one-day-windowfilter:block,state-machines-and-approvals.md's send-back node/edge excerpt and its threeexpressionapprover literals, andintegration-recipes.md's recipe-6auth:alternatives.state-machines-and-approvals.mdsays so once in its intro. The other files have 2 to 4 tokens left and carry no note.Why
#31112 item 4 (ruling B of #22059): published examples are guarded by the opt-in type check. This slice brings objectstack-automation's self-contained examples under it.
Example fixes
None. Every marked block compiled as written once its import and wrapper were added.
Trims that paid the marks (each cut and where its rule survives)
No cross-reference is cut: every pointer to another file, section, row, skill or repository reads as on
main.SKILL.md: "— write them right the first time" cut from the Valid-but-silently-wrong intro. No rule.SKILL.md: "(see Inbound webhook triggers below)" → "(Inbound webhook triggers)". The section name stays.SKILL.md: "§ Time-relative triggers — scheduled per-record date sweep." → "§ Time-relative triggers.". The file-and-section pointer stays, and the tail survives in the Flow Typesschedulerow ("per-record date sweep viaconfig.timeRelative").SKILL.md: item 2's "Reference a field explicitly." cut. Survives in the ✅source: 'newRec.id'line directly below it.examples-flows.md: "(moved verbatim from SKILL.md)" cut from the title. No rule (item 2's stub kind).examples-flows.md: the sweep's// a sweep has no trigger user — elevate explicitlycomment cut. Survives on the first example'srunAs: 'system'line in the same file.state-machines-and-approvals.md: "(the shippedshowcase_dynamic_approvalflow in the showcase app is this shape)" cut. The shape is the complete marked block that follows it.state-machines-and-approvals.md: "(SKILL.md § Trigger Configuration)" cut from the approval flow's start-node comment. What it points at is the start node directly under the comment.state-machines-and-approvals.md: the// Decision branches: mutually-exclusive edgeconditionpredicates.comment cut. Survives in the same block's routing comment ("Guard every branch with a condition — see e4/e5 below") and in the e4/e5 conditions.state-machines-and-approvals.md: "(an unmarked cycleregisterFlowrejects)" cut from the lint blockquote. Survives in Three pieces item 2 ("an unmarked cycle is rejected").state-machines-and-approvals.md: "Resubmit is an explicit verb (POST /api/v1/approvals/requests/:id/resubmit), never a record-save." → "Resubmit is never a record-save.". The route survives in Three pieces item 1 ("ended only byPOST /api/v1/approvals/requests/:id/resubmit") and in § Recording a decision.integration-recipes.md: "(SKILL.md'sconnector_actionrow)" cut. The row's substance is restated at the cut site.integration-recipes.md: the import-path bullet "defineConnector:@objectstack/spec/integration;defineFlow:@objectstack/spec; both register indefineStack." → "defineConnectoranddefineFlowregister indefineStack.". The import paths now sit, checked, in recipes 4 and 5.integration-recipes.md: theauthbullet's "basic(usernamestays in metadata)" → "basic". Survives in recipe 5's marked block, which writesusernamebesidecredentialRef.Tests
check:skill-examples, before and after, the reverse check, and the pinned teaching site
mainf647430, run with--keep):✅ 337 prose examples type-check across 3 surface(s)..examples-build/tsconfig.jsonand asked for syntactic, then semantic, diagnostics: 10 of 10 clean, with a planted unknown key on aFlowNodeas the control (TS2353).maintouching noskills/objectstack-automation/**orpackages/specpath):pnpm --filter @objectstack/spec check:skill-examplesexited 0 with✅ 343 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them.nextkey on the notify node (SKILL.md:122, TS2353), a top-levelscheduleon the sweep flow (examples-flows.md:90, TS2353),initialStateforinitialStates(state-machines-and-approvals.md:26, TS2561),authentication: { token }forauthon the legacy-ERP connector (integration-recipes.md:149, TS2322). The checker exited 1 at exactly those four lines. Restored withgit checkout HEAD --;git diff HEADandgit status --porcelainwere empty after.ValidationRule. Its plantedinitialStatewas NOT reported, so the block is typed by its own member,StateMachineValidation.packages/rest/src/meta-state-route-doc-spelling.test.tspinsSKILL.md's state-introspection route line, which an earlier head had cut (CI Test Core 2/8 red). The line is restored verbatim. Red leg: the earlierSKILL.mdgives 2 failed / 6 passed. Green leg: 8/8 at b58f35e.Derived gate sweep (head e90045b)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 47 commands. 46 exited 0.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: needs every package's dist; CI runs it).dispatch-gates --ranexited 0: 47 derived, 46 run, 1 NOT-MEASURED, 0 unrun.Acceptance notes
check:skill-examplesis not in the derived gate list for askills/**diff, so it was run by hand.FlowNode'sconfigisRecord<string, unknown>in the spec, so theSKILL.mdmark checks the node envelope (id,type,label, sibling keys) and nothing insideconfig; a key typo inside a notifyconfigis still caught byNotifyConfigSchemaatos validate, not by this check. The same holds for node configs inside the three markeddefineFlowblocks.ConnectorSchema'sproviderConfigis alsoRecord<string, unknown>, so the recipe-5 mark checks the connector envelope and theauthvariant only, notspec.ValidationRuleunion type does not refuse an unknown key on astate_machineliteral (measured above), whileStateMachineValidationdoes; runtime parsing still refuses it. A TypeScript author typing a rule list asValidationRule[]gets no excess-key check.dispatch-gates --tiermandates Fable forskills/**, and the claim records the no-Fable-build exit; the contract review is the seat's, on the lane's isolated reviewer.Verification
pnpm --filter @objectstack/spec check:skill-examples(needs@objectstack/specand@objectstack/client-reactbuilt) prints 343 examples green;node scripts/check-skills-token-ratchet.mjsexits 0.Human Minimum
A governed approver reviews and approves (Tier H).
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jR7W3HHy6RgdAAYkFw