Repository navigation
docs(skills): ui router names action files by the registry suffix - #35300
Conversation
The Actions row's In column said src/actions/*.actions.ts; the action type registry declares **/*.action.ts and `os generate action` writes NAME.action.ts. Name that first and *.actions.ts second (a barrel import loads either). Paid by one same-file restatement cut in Trap 3; the token-ratchet row follows the file down 2279 -> 2272. Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35300 (Fixes #35284), rules face. Read: the diff ① Derived judgmentsEach claim was read in the code at the head, not taken from the PR body.
② Semver level
③ Boundary flags
④ Design judgment
Findings
Accepted deviation recorded: the PR-body footer form (③). Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 维护者速读
席位核对 — ACCEPT · repo:objectstack#5 · head
|
Requested by Bill · project thread
Fixes #35284
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-ui技能路由表里 Actions 一行的文件位置,从src/actions/*.actions.ts改为src/actions/*.action.ts,*.actions.ts;同文件 Trap 3 删掉一处重复的对象清单作为付账。os generate action写出的都是单数NAME.action.ts,AI 按旧的复数路径找文件会漏掉生成的 action,还可能在旁边再建一个重复的。skills/objectstack-ui/SKILL.md第 84 行(路由表 Actions 行)与第 65 行(Trap 3 的删减);再看scripts/check-skills-token-ratchet.mjs中该文件的天花板行。node scripts/check-skills-token-ratchet.mjs,应看到skills/objectstack-ui/SKILL.md is 2272 tokens (ceiling 2272; headroom 0)。skills/**属于 Tier H 受管面,需要你批准或亲手合并;席位做契约审核后落地。What changes
The Actions row of the
objectstack-uirouting table (skills/objectstack-ui/SKILL.md, In column) saidsrc/actions/*.actions.ts. It now says`src/actions/*.action.ts`, `*.actions.ts`: the registry suffix first, and the plural one second because it loads too.What the code says, read on
origin/main01889892:filePatterns: ['**/*.action.ts', '**/*.action.yml'](packages/spec/src/kernel/metadata-plugin.zod.ts:969).os generate actionusesdefaultDir: 'src/actions'(packages/cli/src/commands/generate.ts:473) and takes the file name from the registry (generate.ts:1993-1996,metadataFileName(type, toSnakeCase(name))).packages/cli/src/utils/metadata-file-name.ts:13-28,115-118reads the first**/*.INFIX.tspattern and writesNAME.INFIX.ts, which isNAME.action.tshere. The generator then adds a re-export line for that file to the directory's barrel (generate.ts:2018-2048,barrelExportLine).MetadataPlugin._loadFromFileSystem(packages/metadata/src/plugin.ts:1676) runs only on the eager path that has no artifact source.metadata-file-name.ts:42-77records that both non-testMetadataPluginconstruction sites pass an artifact source, so nothing in this tree gets its actions from that glob. Actions load through the barrel thatobjectstack.config.tsimports intodefineStack({ actions }):examples/app-crm/objectstack.config.ts:11,88,examples/app-showcase/objectstack.config.ts:27,217,examples/app-todo/objectstack.config.ts:12,69.*.actions.tsaccepted too? Yes, through the barrel.examples/app-todo/src/actions/index.tsre-exports./task.actions, and that app loads it. Some hand-written docs also teach the plural (content/docs/ui/actions.mdx:39,content/docs/getting-started/examples.mdx:512). That is why the cell names both: First checks 2 tells the agent to read the project's own files by these globs, and a project can hold either spelling. The registry and generator suffix comes first, so it is the one a new file gets.Other
*.actions.tsmentions underskills/andui/skills/: none.git grepover both trees finds only the cell changed here.skills/objectstack-ui/rules/actions.md(edited on the i18n branch) names no action file suffix and is not touched.Payment (ruling record 6513306068, letter B; the standing ruling, verbatim: 「A:先削重复,余额按实测提高」). The cell grows by 15 bytes. One restatement is cut from the same file to pay for it: Trap 3 ended "Read Dashboards before writing any widget, dataset or chart." That list repeats the trap's own subjects, which the routing table's dashboards row already sends to the same rule file, so the pointer now reads "Read Dashboards first." (−41 bytes). The file shrinks overall, so there is no remainder and no raise. The ceiling row comes down to the measurement: 9133 bytes (9113 priced) to 9107 (9087 priced), 2279 to 2272 tokens. I did not use the two served sections (
### List Views,## Actions):packages/qa/scenarioskeeps a verbatim copy of the List Views section.Changeset:
.changeset/35284-ui-router-action-suffix.md,@objectstack/skillspatch.Tests
Text-only change. No tested behaviour changed, so there is no ablation.
Skills readings (lines are the measure; token convention
ceil(bytes / 4)):01889892)402e7b861)skills/objectstack-ui/SKILL.mdlinesskills/objectstack-ui/SKILL.mdbytes / priced tokensskills/*/SKILL.mdlines (sum)Acceptance notes
filePatterns) has no measured consumer in this tree (metadata-file-name.ts:79-89records that as a disposition). The singular suffix therefore matters for consistency with the generator and registry, not for discovery. A plural file that no barrel imports does not load, and neither does a singular one.*.actions.ts(content/docs/ui/actions.mdx:39,content/docs/getting-started/examples.mdx:88,110,512,content/docs/getting-started/build-with-claude-code.mdx:160), and so doesexamples/app-todo. The suffix is accepted, so these are not defects. They are outside this card's surface (skills/,ui/skills/) and noted only.Verification
Local gate set derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat head402e7b861: 67 families, reconciled with--ranas 63 run with exit 0 and 4 NOT MEASURED (exit 3, prerequisite: a full workspace build). Those four arecheck:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closureandcheck:sourcemap-no-sources-content. They read builtdist/across all packages, and this diff touches no package source; that narrowing is declared and CI runs them. The full gate farm and check-runs are CI's.Skill gates (head 402e7b8)
Run reconciliation
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7