Repository navigation
Commit 3d848df
docs(getting-started): align Build with Claude Code with the scaffolder output and the formula skill (#29088)
<!-- claude-projects-attribution: {"github_login":"marchtian"} -->
_Requested by **田騏** · [project
thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSi9paTx1Lu8ENYwwssthfK3h)_
Fixes #28960
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:官网「Build with Claude Code」页三处与实际对齐:脚手架输出示例去掉安装成功时不会出现的 `npm
install`,并写明它只在跳过或装失败时出现;技能那句删掉「九个」这个手写数字,改为点名另外三个技能;Resolve 按钮的
`visible` 条件去掉 `has()` 和那段过时注释,与项目里装好的 formula 技能说法一致。
- **为什么改**:这是官网 AI-first 的入门路径,新手和他们的 coding agent
照着做。页面与脚手架真实输出不符、与同一项目里的 formula 技能互相矛盾,agent 读到两种相反说法只能猜。
- **风险与回滚**:低。只改一份文档页,无代码、无发布包;回滚即撤销本 PR。注意:quick-start 页仍教「行动作要加
`has()` 守卫」,与本页新说法相左,已交席位裁定,不在本 PR。
- **先看**:`content/docs/getting-started/build-with-claude-code.mdx` 的
Resolve 动作 `visible` 一处(约 175–177 行,风险最高);其次第 71–91 行的脚手架输出块;最后第 402–405
行技能那句。
- **两分钟验证**:`npm create objectstack@latest demo`,装依赖成功后看 Next steps,预期只有
`cd demo`、`npm run dev`、`npm run validate` 三条命令,没有 `npm install`。
- **需要你做的**:无,席位落地。
## What changes
One file, `content/docs/getting-started/build-with-claude-code.mdx`.
Each statement is read from source at `origin/main` `0be247ce8b`.
**1. The scaffold output block now matches what `create-objectstack`
prints.**
- `npm install` is gone from the success-path *Next steps*.
`packages/create-objectstack/src/index.ts` prints the install line only
under `if (!installed)`, which holds when `--skip-install` was passed or
the install threw. That condition is now stated under the block, as the
order asked, rather than the line being dropped silently.
- The same sentence says the scaffolder installs with pnpm, and names
`pnpm` in *Next steps*, when `pnpm --version` answers
(`detectPackageManager`,
`packages/create-objectstack/src/detect-package-manager.ts`).
- The skills step line reads `→ Installing AI skills for your coding
agent from @objectstack/skills@VERSION...`, as
`installSkillsFromPackage` prints it.
- The validate line keeps its continuation, `# (run after every metadata
edit — see AGENTS.md)`.
- The command padding and the `Namespace:` / `Template:` spacing now
follow `printKV` and the `labelWidth` computation.
- A second `…` marks the elided skills-CLI output and created-files
summary.
**2. The skills sentence drops its count and names the other three
skills.** "The bundle ships nine" becomes "one skill per metadata domain
(the table below names them), plus `objectstack-platform`,
`objectstack-upgrade` and `objectui`". This follows the count-sweep
rule: delete the number, keep the names. The catalog at head is
`skills/*/SKILL.md`, 11 directories, which
`packages/skills/scripts/sync-catalog.mjs` copies whole into
`@objectstack/skills`, and the scaffolder syncs all of them.
**3. The Resolve action's `visible` drops `has()` and its comment.** The
predicate is now `record.status != "resolved" && record.status !=
"closed"`, and its comment states the reason in the terms of the
`objectstack-formula` skill: "`has()` is NOT a null check" and
"`has(record.DECLARED_FIELD)` … uniformly `true`". `!=` against a null
`status` evaluates to a boolean instead of faulting
(`packages/lint/src/validate-null-guards.ts`: "Equality (`==` / `!=`) is
never flagged: CEL evaluates a heterogeneous equality cleanly"). The old
comment's premise, "a list projects only the columns it shows", no
longer holds for the list surfaces. `listViewPredicates` /
`collectPredicateFieldRefs`
(`ui/packages/core/src/utils/predicate-fields.ts`) add every column an
object action's `visible` / `disabled` reads to the list's `$select`,
and `ListView`, `ObjectGrid` and `RelatedList` consume them. The card's
reproduction step 4 measured the unguarded predicate end to end on
18.2.0.
No changeset: `content/docs/**` ships in no package's `files[]`
(`apps/docs` is `"private": true`), so this PR carries `skip-changeset`.
## Tests
No package source changed, so no package build or test is owed. The
derived docs gates ran locally on the final head (see Verification).
## Acceptance notes
- **The `has()` rule is still contradictory across the repo, outside
this file.** `content/docs/getting-started/quick-start.mdx` (lines
113–117) tells readers to guard row actions with `has()`, and links to
this page. `content/docs/protocol/objectui/concept.mdx` line 615,
`examples/app-crm/src/actions/convert-lead.action.ts` (pinned by
`examples/app-crm/test/action-predicate-sparse-face.test.ts`) and
`examples/app-showcase` use the idiom too.
`packages/objectql/src/declared-fields.ts` still calls the objectui
action `visible` binding sparse "by decision", and gives `has(record.x)
&& record.x != null` as its authoring guard. The formula skill states
every predicate's record is total. This PR aligns only this page with
the skill, as ordered. Which statement is canonical for the action face
is reported to the seat; this PR does not decide it.
- **The scaffolded `AGENTS.md` trigger table**
(`packages/create-objectstack/src/templates/AGENTS.md`) lists nine
skills and omits `objectstack-upgrade` and `objectui`. The page still
points readers at that table; this is reported, not changed.
## Verification
Head ``d7f8f6ed2c``. The gates come from `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (43 commands) and were each run with the
exit code captured before any pipe.
<details><summary>Derived gate readings</summary>
All 43 derived commands exit 0 on `d7f8f6ed2c`; `dispatch-gates --ran`
reconciles 43 derived, 43 run, 0 NOT-MEASURED (a derived zero: every
line carries its exit code).
Five of them first refused as PREREQUISITE NOT MET (exit 3, or exit 1
for `check:docs` on a missing generated schema) because nothing was
built in this worktree: `check:doc-formula-expressions`,
`check:doc-security-posture`, `check:docs`, `check:skill-examples` and
`check:docs-transcript-drift`. After `pnpm --filter
'@objectstack/lint...' build` and `pnpm --filter
'@objectstack/client-react...' build` (both under `os-verify-lock`,
VERDICT command-exit 0), all five exit 0. Notable passes:
`check:doc-formula-expressions` judged 25 record-scoped formula examples
across 548 files clean with `@objectstack/formula`;
`check:skill-examples` type-checked 280 prose examples.
```text
0 node scripts/check-adr-links.mjs
0 node scripts/check-adr-links.mjs --self-test
0 node scripts/check-closing-keyword-parity.mjs
0 node scripts/check-closing-keyword-parity.mjs --self-test
0 node scripts/check-comment-mask-corpus.mjs
0 node scripts/check-doc-route-spelling.mjs --advisory
0 node scripts/check-doc-route-spelling.mjs --self-test
0 node scripts/check-docs-section-name.mjs
0 node scripts/check-docs-section-name.mjs --self-test
0 node scripts/check-section-landing-index.mjs
0 node scripts/check-section-landing-index.mjs --self-test
0 node scripts/ci/plan-test-core-shards.mjs --self-test
0 pnpm --filter @objectstack/lint run check:doc-formula-expressions
0 pnpm --filter @objectstack/lint run check:doc-security-posture
0 pnpm --filter @objectstack/spec run check:docs
0 pnpm --filter @objectstack/spec run check:empty-state
0 pnpm --filter @objectstack/spec run check:liveness
0 pnpm --filter @objectstack/spec run check:skill-examples
0 pnpm --filter @objectstack/spec run check:strictness-ledger
0 pnpm --filter @objectstack/spec run check:variant-docs
0 pnpm --filter @objectstack/spec run check:yaml-examples
0 pnpm check:ci-filter-parity
0 pnpm check:closed-ceremony-text
0 pnpm check:corpus-claim-drift
0 pnpm check:cross-package-test-inputs
0 pnpm check:doc-anchors
0 pnpm check:doc-authoring
0 pnpm check:doc-frontmatter
0 pnpm check:docs-audit-scope
0 pnpm check:docs-redirects
0 pnpm check:docs-single-h1
0 pnpm check:docs-spec-enumerations
0 pnpm check:docs-transcript-drift
0 pnpm check:driver-memory-census
0 pnpm check:gitlink-declared
0 pnpm check:nul-bytes
0 pnpm check:published-readme-links
0 pnpm check:react-page-adapter-contract
0 pnpm check:refd-timer-probe
0 pnpm check:role-word
0 pnpm check:skill-identifier-liveness
0 pnpm check:vendor-version-stamps
0 pnpm check:watch-hint-literal
```
NOT MEASURED locally, left to CI: the `Build Docs` job and the
type-check lanes, which `dispatch-gates` names as having no local
invocation.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0a46a26 commit 3d848df
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | | - | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
397 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
| |||
0 commit comments