Repository navigation
fix(cli): retire create, lint, test and studio, commands that could only fail; correct four residues to what the commands do (objectui#11500) - #11508
Conversation
… could only fail; correct four residues to what the commands do (objectui#11500) `create plugin NAME` resolved its generator one directory too high and never found it; `plugin` was `create`'s only type, so `create` goes whole and the docs name the package's own initializer, `npm create @object-ui/plugin NAME`. `lint` / `test` ran ESLint / Vitest in the temp app `dev` generates, which declares neither toolchain. `studio` launched this monorepo's console, not the local project. The built CLI now refuses all four as unknown commands. Residues, one correction each: `analyze` with no `dist/` exits non-zero instead of printing "Analysis complete"; `init NAME -t UNKNOWN` refuses the template before creating the directory; `doctor`'s help and docs stop promising a fix and a Node check it does not do; the docs stop saying `serve` lacks `--no-open`. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
…al (objectui#11500) `doc-version-claims` flags a version stated on a doc surface that nothing re-derives. The doctor line names the checks, not a major. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: PR objectui#11508 (card objectui#11500), judged against triage's ruling ① Derived judgments
Nothing in the diff is judged wrong; one wording residue (①.8) is named for the carrier. ② Semver level
③ Boundary flagsDev report Deviations
Out-of-scope findings
Check-runs on the head43 check-runs on Implemented-by: VERDICT: PASS Generated by Claude Code |
…command table (objectui#11511) (objectstack-ai#11585) Fixes objectstack-ai#11511 Clause-②: no ## What changed The CLI table under the `## CLI commands` heading of `skills/objectui/guides/project-setup.md` drops four rows. Their commands were retired under objectui#11500 (PR objectstack-ai#11508, landed as `37268aae9`, an ancestor of this branch's base), and the built CLI now refuses each as an unknown command, exits 1 and writes nothing, pinned by the `cli-bin.test.ts` describe block named "the retired create, lint, test and studio commands are refused". The dropped rows, quoted: - `| \`objectui studio\` | Visual UI editor |` - `| \`objectui lint\` | Lint generated app code (ESLint) |` - `| \`objectui test\` | Run app tests (Vitest) |` - `| \`objectui create plugin\` | Scaffold a new plugin |` One prose line follows the table, saying what `content/docs/utilities/cli.mdx` already teaches: "A plugin package is scaffolded by its own initializer, `npm create @object-ui/plugin NAME`, not by the CLI." (`NAME` is an uppercase placeholder word on purpose: GitHub strips tag-shaped fragments from a body, so no angle-bracket placeholder is written anywhere in this PR.) `lint` / `test` get no replacement row: the project's own ESLint / Vitest are not this CLI's business, and the card asks for none. `studio` has no published replacement. `.changeset/11511-project-setup-retired-cli-rows.md`, an empty-frontmatter changeset, declares the docs-only change — this repository's one-declaration form; no package is released. ## Readings **Grep pin (the card's own pin, carried in this PR).** The command, in the form printed here: `git grep "objectui studio\|objectui lint\|objectui test\|create plugin" origin/main -- skills/objectui/` - On the base `83e3f83`: 4 hits, every one of them in the CLI table of `project-setup.md`, and every one of them a row quoted above. No other guide under `skills/objectui/` names any of the four. - On this branch's head `5936490`: 0 hits (`git grep` exits 1). **The `objectui generate` row stays.** `packages/cli/src/cli.ts` still declares `.command('generate')` with `plugin` among its argument's types, and `packages/cli/src/commands/generate.ts` still dispatches `case 'plugin'` to `generatePlugin`, so the row's `(\`object\`, \`page\`, \`plugin\`)` is true on the base and is not touched. The commands the table now lists — `init`, `dev` (with `serve`, which `cli.ts` describes as its alias), `build`, `start`, `validate`, `check`, `generate`, `doctor`, `analyze` — are exactly the `.command(...)` set `cli.ts` declares. **Governed surface.** `node scripts/check-governed-queue-guard.mjs --test skills/objectui/guides/project-setup.md .changeset/11511-project-setup-retired-cli-rows.md` answers `⛔ GOVERNED — 1 of 2 path(s) are on a governed surface: skills/** x1 — the published skills catalog`, exit 3. This PR stays a draft until an APPROVED review by an authorized approver (`os-zhuang` / `hotlong`) is on it; the claiming seat lands it afterwards. Not flipped ready, no auto-merge armed. **Line readings (a `skills/**` diff owes two).** - `skills/objectui/guides/project-setup.md`, whole file: 350 lines before, 348 after (net −2: four rows dropped, one prose line plus its separating blank line added). - Bundle, every `.md` under `skills/objectui/` (16 files): 4813 lines before, 4811 after. `skills/objectui/SKILL.md` alone: 142 before and after, untouched. - Tokens: this repository declares no skills token ratchet; `pnpm check:skill-eval-tokens` is the eval-side oracle and is green below. ## Gates run locally (all on commit `5936490`) | Gate | Verdict | |---|---| | `pnpm check:skills-paths` | exit 0 — `OK (89/90 stated path(s) resolve across 20 guide file(s); 1 baselined)`, `skills/ — 29/29 resolve across 16 file(s)` | | `pnpm check:skill-eval-tokens` | exit 0 — `Red under the chosen oracle: 0 (0 beyond the baseline)`, `Every must_contain token is taught by its own skill bundle.` | | `pnpm exec turbo run build FILTER_ARGS --concurrency=2`, `FILTER_ARGS` being the 12 `--filter=` words `node scripts/check-skill-examples.mjs --build-filter` prints, under `os-verify-lock.sh` | exit 0 — `Tasks: 29 successful, 29 total`, 5m02s of shared-box seconds | | `node scripts/check-skill-examples.mjs --self-test` | exit 0 — `60 cases pass` | | `node scripts/check-skill-examples.mjs` | exit 0 — `Semantic phase: 18 of 18 ts fence(s) judged, 0 failed.`, `JSON phase: 70 fence(s) parsed, 0 failed.`, `Every marked skill example holds up against the built types.` | | `node scripts/check-new-cross-file-line-citations.mjs --base 83e3f83` | exit 0 — `VERDICT new-cross-file-line-citations: 0 new citation(s)` | | `node scripts/check-changeset-presence.mjs` | exit 0 — `No source or published contract of a released package changed in this range, so no changeset is owed.` (one is added anyway, as the declaration form) | | `pnpm changeset:check` | exit 0 — fixed group and no-major both green | | `pnpm check:changeset-claims` | exit 0 — `No pending changeset names a file this change touches.` | | `pnpm check:pending-changeset-literals` | exit 0 — `No test source names a pending changeset.` | | `pnpm exec vitest run scripts/__tests__/doc-version-claims.test.ts scripts/__tests__/check-skills-paths.test.ts scripts/__tests__/check-skill-eval-tokens.test.ts scripts/__tests__/check-shell-escape-residue.test.ts --maxWorkers=2`, from the repository root, under the lock | exit 0 — `Test Files 4 passed (4)`, `Tests 145 passed (145)` | | control-byte scan over both touched files (`grep -naP` with the C0, DEL class) | no hits | **Declared narrowings.** - `pnpm test` is narrowed from the full suite to the four files above. `doc-version-claims.test.ts` is the one test that names `project-setup.md` (`git grep -l "project-setup" -- '**/__tests__/**' '**/*.test.*'` answers only it); the other three are the scripts tests that read `skills/objectui`. The full suite is CI's run. - `pnpm lint` is narrowed to a measured zero, three pieces: ① the population is read from eslint's own config — `ESLint.calculateConfigForFile` returns undefined and `isPathIgnored` returns true for both diff paths; ② the file count — `lintFiles` over the two diff paths returns 2 results, both `File ignored because no matching configuration was supplied`, 0 errors, so 0 of the 2 diff paths are in the lint population; ③ invariance — the diff touches no eslint config and no file eslint matches, so no untouched file's verdict can move. The tree-wide `pnpm lint` is CI's run. - `pnpm type-check` is not owed: the diff is two markdown files, no TypeScript file and no manifest. - Deviation: `pnpm install` ran as `pnpm install --config.engine-strict=false`, because the container's Node v22.22.0 is below jsdom's engine floor. ## 维护者速读(草稿) ### 改了什么 `skills/objectui/guides/project-setup.md` 的 CLI 命令表删掉四行:`objectui studio`、`objectui lint`、`objectui test`、`objectui create plugin`。这四个命令已随 objectui#11500(PR objectstack-ai#11508)退役,CLI 现在把它们当未知命令拒绝、退出 1、什么都不写。表后加一句:插件包用它自己的初始化器 `npm create @object-ui/plugin NAME` 搭,不经 CLI。另加一个空 frontmatter 的 changeset,声明「纯文档、不发版」。 ### 为什么改 这份指南是发布给使用者的 `objectui` skill 的一部分,AI agent 搭项目时照它执行。表里教的命令 CLI 已经不认,照着做就是撞墙;其中 `create plugin` 有正确路径(`npm create @object-ui/plugin`),指南却指向了退役命令。NORTH-STAR 第 4 条把这类「教错」算作产品缺陷。 ### 风险与代价(含回滚) 只动两个 markdown 文件,不动代码、不发版,本地门禁全绿。`objectui generate` 行核对过仍为真(`generate.ts` 仍派发 `plugin`),没动;四个命令名在 `skills/objectui/**` 里 grep 已归零。回滚即 revert 这一个 squash commit。受管面(`skills/**`)⇒ 本 PR 停在 draft,等 `os-zhuang` / `hotlong` 的一条 APPROVED review,之后由认领席落地。 ### 席位意见 (留空) ### 你要做的 读一遍 diff(两个文件、净 −2 行),认可就在本 PR 上留一条 APPROVED review;翻 ready、入队由席位处理。不认可就在 PR 上写明要改的那句。 ## Acceptance notes - Nothing outside the card's file surface was changed: the one table, plus the changeset this repository requires. The grep pin found no second site. - The claim comment on the card read `origin/main` at `0a53c67`; by the time this branch was cut `origin/main` was `83e3f83` (three unrelated landings, none touching this file), so the branch is based on `83e3f83` and every reading above is against it. - Session: `session_01CB6W87z22K2yjUCDyVrJRk` (the PM seat's; this PR was implemented by its dispatched dev in subagent mode, so the branch is the identity). --- _Generated by [Claude Code](https://claude.ai/code/session_01CB6W87z22K2yjUCDyVrJRk)_ Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: os-zhuang <jack@objectstack.ai>
Fixes #11500
Clause-②: yes
What
Triage ruled (comment
5960445419) that four commands of the publishedobjectuibin retire, and that four noted residues ride in the same PR as one-line corrections, each to what the command does. This PR:create,lint,testandstudiofrompackages/cli/src/cli.ts, and deletescommands/create-plugin.ts,commands/lint.ts,commands/test.tsandcommands/studio.ts.pluginwas the only typecreateaccepted, socreategoes whole. Nothing else imported the four modules, and they read nothing underutils/, so no other code goes.SCAFFOLD_DEV_DEPENDENCIESnames neither ESLint nor Vitest, so it is untouched;doctor,servein the docs,analyzewithoutdist/,initwith an unknown template);content/docs/utilities/cli.mdxandpackages/cli/README.md, and names the plugin initializer incli.mdx;packages/cli/src/__tests__/cli-bin.test.ts, all run through the builtdist/cli.js;.changeset/11500-retire-cli-create-lint-test-studio.md(@object-ui/climinor, BREAKING banner, one FROM to TO line per retired command, one line per residue, a Clause-② line).No refusal code was needed. On the BASE build, commander already refuses any command the program does not declare:
objectui bogusexits 1 witherror: unknown command 'bogus'.Measured: BASE
fcdc8ec91build against the HEAD buildOne run per row, each in a fresh temp directory, on the built bin. Placeholders are spelled in capitals, because GitHub strips angle-bracket shapes from a saved body.
create plugin xCannot find moduleoncreate-plugin/dist/index.jsat the worktree ROOT (one directory too high); nothing writtenerror: unknown command 'create'; nothing writtenlinterror: unknown command 'lint'testerror: unknown command 'test'studioapps/consolethrough its owndistpath and started that app's Vite dev server;timeoutstopped it and nothing was left runningerror: unknown command 'studio'analyze, nodist/Error: No dist/ directory to analyze. Run objectui build first.on stderr, exit 1init app -t nopeUnknown template: nope, and an emptyapp/left behinddoctor --helpdoctorwrites nothing and prints no Node lineThe plugin initializer, measured before it was written
packages/create-plugin/package.jsonnames@object-ui/create-pluginwith one bin,create-plugin. It is notprivate, it is in the release'sfixedgroup, and npm answers17.6.0for it. The bin takes[plugin-name],-d, --descriptionand-a, --author. In a temp directory,npm create @object-ui/plugin probe-widgetinstalled@object-ui/create-plugin@17.6.0and rancreate-plugin probe-widget. Under a pseudo-terminal, taking each prompt's default, it wrotepackages/plugin-probe-widget/(8 files) and exited 0. Socli.mdxnow carries a short "Scaffolding a plugin" section withnpm create @object-ui/plugin my-awesome-widgetand a link to the Create Plugin page, which says where to run it. No dependency was added.Contract notes
The accept set narrows (Clause-② yes). The published
objectuibin refuses what it used to accept:objectui create plugin NAME(exit 1, generator not found) TO exit 1 witherror: unknown command 'create', nothing written. The replacement isnpm create @object-ui/plugin NAME.objectui lintandobjectui test(exit 1 on every run, a setup error reported as findings) TO the unknown-command error. The replacement is the project's own ESLint and Vitest.objectui studioTO the unknown-command error. There is no published replacement; contributors runpnpm --filter console devin the monorepo.objectui analyzewith nodist/exiting 0 TO exiting 1.There is no alias, no deprecation window and no silent accept.
Unchanged.
initwith a known template writes the same file map (pinned byte for byte by "writes exactly the file map buildInitFiles returns, byte for byte").analyzeover adist/prints the same report.doctor's checks and output are untouched; only its help line moves. No exported symbol of@object-ui/climoves:src/index.tsexportsserveandinit, andinit's signature is unchanged.validateandcheckare not edited. Draft PR objectui#11069 owns them. In the README, onlystudioandcreate plugin NAMEleave the heading that also namescheck,doctorandanalyze. Four untouched lines separate that hunk from objectui#11069'svalidatehunk. Incli.mdx, no hunk touches thevalidateorchecksections.Two edits beyond the sections, both naming retired commands: the README tagline and the
cli.mdxintro sentence each listed lint and test. Both now say scaffold, develop, build and validate, as the package's owndescriptionalready does.Pins
All in
cli-bin.test.ts, run through the builtdist/cli.js:SUBCOMMANDSlosescreate,lint,testandstudio.unknown command 'NAME', and the temp directory stays empty. The control isg page Probein the same directory, which writespages/probe.json. These runs emptyPATH. Run from inside a checkout, the BASEstudiostarted the console dev server. With noPATH, a retired command that came back fails at its first external tool (at BASE,/bin/sh: 1: pnpm: not found), and the stderr assertion still turns red.check --helppin does.init probe-app -t simplein the same directory, which writesprobe-app/app.json.serverow of the flag-contract table gains--no-open, a docs-alignment pin that is green at BASE by design. Thelintandtestrows go.Reverse verification
Predictions were written down before each leg. In each leg, the mutation is a
git checkout COMMIT -- PATH, proven on disk by blob hash. The CLI is then rebuilt, a marker is read fromdist/, andcli-bin.test.tsruns. An EXIT/INT/TERM trap restores from HEAD and proves the restore by blob hash, an emptygit diff HEADand an empty porcelain.cli.ts,analyze.ts,init.tsand the four deleted modules atfcdc8ec91, with the pins at HEADa20223743. Blobs on disk equalled BASE:004165f17300,63659c0b30c9,ad7bde24bfcc,e8438188bbc5,613605f90d07,48db26298d9a,5039e918e38e.dist/carried the studio marker and the old doctor text, twice each. Predicted 8 red. ObservedTests 8 failed | 40 passed (48): the enumeration pin, the four refusals, doctor, analyze and init. Theserverow stayed green, as predicted.studioalone: its module from BASE, and its import and command block re-inserted intocli.ts, each counted once on disk. Predicted 2 red. ObservedTests 2 failed | 46 passed (48): the enumeration pin and thestudiorefusal. The six other new pins read green here, which also showsdist/was rebuilt from this leg's sources.a20223743(blobsec9d879fdc20,fb81635c05cb,ab62a52b5efd; the four modules absent), and the CLI was rebuilt. The four BASE markers count 0 indist/, and HEAD's doctor text counts 2, as a positive control.Local gates, at HEAD
a20223743pnpm exec vitest runoverpackages/cli/src/__tests__/in full, plus every test that names a retired command,create-plugin,cli.mdxor the CLI README, plus thescripts/__tests__readers of the CLI tree:Test Files 39 passed (39),Tests 658 passed (658). The 14 files beyond the CLI suite:toc-anchor-parity.test.tsx,nested-page-children-11223.test.ts, bothcreate-pluginsuites, andspawned-build-vitest-env-8598,check-doc-snippet-emitted-census,doc-version-claims,package-files-exist,one-authority-per-exported-name-6273,check-published-tsconfig-tooling-exclude,body-dialect-census,body-dialect-producer-scanandcheck-test-path-roots. Four otherscripts/__tests__hits on the nameslintandtestare file stems and workflow job names, not the CLI.pnpm --filter @object-ui/cli type-checkexit 0 (itstsconfigincludessrc/**/*, and--listFileslistscli-bin.test.ts);pnpm --filter @object-ui/cli buildexit 0.docs:check-links"Links are valid across 17 scan roots." ·check:doc-fencesOK ·check:readme-exportsOK ·markdown-test-inputs.mjs --audit"115 candidate test files, all adjudicated" ·check:control-bytesOK ·check:new-line-citations"0 new citation(s)" ·check-changeset-presence.mjs"8 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)" ·changeset:check"No changeset declares amajorbump." ·check:changeset-claimsreport-only, see Acceptance notes ·check:pending-changeset-literals"No test source names a pending changeset." ·check:test-path-roots,check:unused-deps,check:phantom-deps,check:doc-types,check:doc-example-ids,check:shell-escape-residue,check:unreferenced-sourcesandcheck:vi-mock-specifiersOK ·check:doc-snippets"Every covered documentation snippet compiles against the built types." ·check:doc-examplesOK ·pnpm check"287 validated … 0 did not validate". The README and snippet gates ran after a scoped build of their package closure; before it they answered PRECONDITION NOT MET, which is not a verdict.packages/cli/src, the population CI'seslint srclints for this package: 47 files in the JSON output, equal to the 47 tracked.tsfiles there. 0 errors. 5 warnings, all in three files this diff does not touch. Type-aware linting is off (tseslint.configs.recommended, noprojectService), and no rule ineslint-rules/reads the disk, so the verdicts of untouched files cannot move.scripts/check-governed-queue-guard.mjs --testover the 11 paths: NOT GOVERNED.The full
pnpm testand the repo-wide lint are left to CI.Acceptance notes
skillslane.skills/objectui/guides/project-setup.md's CLI table still lists the retired commands. These rows are cited by content, because a line address in a body is the banned cross-file form:objectui studio/ "Visual UI editor"; carrier: seat → objectui#11503objectui lint/ "Lint generated app code (ESLint)"; carrier: seat → objectui#11503objectui test/ "Run app tests (Vitest)"; carrier: seat → objectui#11503objectui create plugin/ "Scaffold a new plugin"; carrier: seat → objectui#11503analyze: two lines become onethrow.doctor: one help line incli.tsand one sentence incli.mdx.serve: one docs line.init: one statement hoisted, which is one line added (const files = buildInitFiles(…)above themkdirSync) and the loop header collapsed from three lines to one, plus a corrected comment. The old comment's "Unknown templates still throw here, before the first write" was false, because the directory was created first.analyzeprints withoutdist/. Its two header lines still print on stdout before the error. The error is on stderr, and "Analysis complete" no longer prints.check:changeset-claimsflagged two pending changesets naming files this PR touches. Both were re-read, and both stay true.7658-toc-code-span-anchor-parity.mddescribes, in the past tense, headings its own change fixed.7694-chart-series-chart-type-alias-refusal.mdnamesobjectui validateincli.ts, which this PR does not touch.doctorexits 0 even with an error-level finding. At BASE, in an empty directory, it printedx package.json not foundandFound 2 issue(s)., and exited 0. Nothing documents its exit code.@object-ui/create-plugin@17.6.0, run with a non-TTY stdin, prints its second prompt and exits 0 with nothing written. objectui#8786's fix is onmainbut unreleased: the published bin contains noisTTYcheck. It ships with the next release.packages/plugin-markdown/src/toc-anchor-parity.test.tsx'sLIVE_SHAPESstill names theobjectui add COMPONENTheading as live, withwherenamingcli.mdxand the README. Since objectui#11496 that heading exists in neither file, and after this PR neither doesobjectui create plugin NAME. The test hard-codes the heading strings and reads no file, so it stays green; only itswhereis stale.Implemented by the dispatched
domain:uiseat 1 dev agent; PM sessionhttps://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37.Generated by Claude Code