Repository navigation
Commit e0b8c2c
docs(skills): teach os deploy, the managed-package dev loop, in the platform skill (#31019)
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67xBr4PNiYAvCJMKBx5JSNzPr)_
Fixes #30968
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:`objectstack-platform` skill 现在教 `os
deploy`:`references/operations.md` 的「Environments &
deploy」表新增一行(何时用:在组织的开发环境上看到改动;入口 `os deploy` / `npm run deploy` / `os
dev` 里按 `d`;如何选环境;`--no-wait`、`--wait-timeout`);表下一段讲 `os deploy` 退出码 1
的三种读法(写入前拒绝、环境自身构建失败、等待超时)及下一步。`SKILL.md` 的 Part 3 指针点名 `os deploy`。新增
eval 17。
- **为什么改**:PR #30933 已合入 `os deploy`,但 skill 里 0 处提到它,助手会继续教「先 `os
package publish` 再手动安装」。
- **风险与回滚**:只改 skill 文本、一条 eval 和 `operations.md` 一行 token
天花板(+179,按裁决实测抬高);回滚即 revert,无运行时影响。
- **先看**:`skills/objectstack-platform/references/operations.md` 的 `os
deploy` 行和其下的 exit 1 段落,对照 `packages/cli/src/commands/deploy.ts` 与
`utils/install-target.ts`。
- **两分钟验证**:`node scripts/check-skills-token-ratchet.mjs`,预期 exit
0,两文件读数为 6011/6011 与 3287/3287。
- **需要你做的**:`skills/**` 属 Tier H,需要 `os-zhuang` 或 `hotlong` 批准。
## What changes
Every flag, entry point and message the skill names was read from the
landed CLI at `69e133ea0` (PR #30933, `780c6c34`), not from the card:
| Taught | Source |
|:--|:--|
| `os deploy` builds, publishes `<manifest.version>-dev.<timestamp>`,
installs, waits until served | `packages/cli/src/commands/deploy.ts`
header and steps 1–6; `utils/dev-version.ts` |
| `npm run deploy` |
`packages/create-objectstack/src/templates/blank/package.json:13` and
`packages/cli/src/commands/init.ts:851` (`"deploy": "objectstack
deploy"`) |
| `d` in `os dev` | `packages/cli/src/utils/dev-deploy-key.ts`
(`deployKeyHint`: "Press d to deploy this app…") |
| Environment: `--env <id>`, else the one `os environments switch`
recorded, else the organization's only one | `utils/install-target.ts`
`resolveInstallTarget` (flag → active → the only installable row) |
| Kept across `os cloud login` | `commands/cloud/login.ts`
`mergeCloudLogin` (same control plane and account) |
| `--no-wait`, `--wait-timeout <seconds>` (600) | `deploy.ts` flags
`wait` (`allowNo`) and `wait-timeout` (default 600) |
| A refusal before any write publishes nothing (not logged in, no /
several / unreadable environments, local build, non-semver
`manifest.version`) | `deploy.ts` steps 1–4 ("write nothing anywhere")
and their `printError` lines |
| With no environment at all, create one in the ObjectOS Cloud console |
`install-target.ts` refusal for zero candidates ("Create one in the
ObjectOS Cloud console, then run this again.") |
| `could not build …: <reason>`, keeps serving the previous build |
`reportVerdict` case `failed` |
| `Timed out after …`; install recorded; a failing build reads as
pending for minutes; `--wait-timeout` or the ObjectOS Cloud console |
`reportVerdict` case `timeout` |
`skills/objectstack-platform/evals/config-plugins-ops.json` gains case
17: "I edited an object in my app locally. How do I see my change on my
ObjectOS Cloud environment?" expects `os deploy`; its `must_contain` is
`os deploy` alone (what any correct answer carries, and in its own
`expected_output`); `must_not_contain`: `os push` (the name PR #30933
rejected). No existing eval in the skill teaches the old
publish-then-install loop (`grep -n -i "deploy\|package publish"
skills/objectstack-platform/evals/`).
## Token budget
Readings from `node scripts/check-skills-token-ratchet.mjs`:
| File | Before (`69e133ea0`) | After | Ceiling before → after |
|:--|--:|--:|:--|
| `skills/objectstack-platform/SKILL.md` | 5998 | 6011 | 6011 → 6011
(unchanged; the pointer fits the 13 headroom) |
| `skills/objectstack-platform/references/operations.md` | 3108 | 3287 |
3108 → 3287 |
| bundle total (whole shipped tree, eval included) | 228186 | 228660 | —
|
The order measured `operations.md` at 3116/3119; on `69e133ea0` it reads
3108/3108 (headroom 0), reported to the seat before editing.
Deleted in `operations.md` first (restatement, each with its surviving
home in the same file):
1. The `os dev` row's "The seeded admin is promoted to **platform
admin**, so Setup/Studio work on first login." Home: Common ops
pitfalls, "Login works but **Setup / Studio missing**" (auto-granted to
the first registered human; "`--seed-admin`/`--fresh` does this").
2. The `os validate` row's "the `os build` gates, no artifact emitted".
Home: Verify your work, the code block (`os validate … — no artifact`;
`os build # the same three gates, plus emits dist/objectstack.json`),
which the row still links.
3. "Both run the same gates:" before the numbered gate list. Home: the
line above it, `os build # the same three gates …`.
4. The Docker / Kubernetes row's "refuses to start unless
`OS_DATABASE_URL`, `OS_AUTH_SECRET` and `OS_SECRET_KEY` are set" (review
S5). Home: Common ops pitfalls, "The official image exits at start
naming `OS_DATABASE_URL` / `OS_AUTH_SECRET` / `OS_SECRET_KEY`". The row
keeps the image name, "at runtime, never baked in" and the
SQLite-on-a-volume line.
Review round 1 (contract review PASS at `965b2d64`, comment 6691650241):
S1 eval `must_contain` trimmed to `os deploy`; S4 the `os package
publish` row keeps main's "versioned package" (it publishes whatever
`manifest.version` or `--version` says); S5 deletion 4 above saved 12
tokens, which S3 spent exactly (the zero-environment remedy), so the
measurement stays 3287 and the row is unchanged. S2 (the post-write
cases: another install replaced it, an unreadable installation, a
publish that reported no install) does not fit inside that saving and is
left out; the skill teaches the three cases the card names.
The remainder, +179 measured, raises only the `operations.md` row,
pinned at the measurement, under the standing ruling quoted in
`scripts/check-skills-token-ratchet.mjs` (ruling record 6513306068 on
#27847), maintainer ruling 2026-10-27, tap A, verbatim:
「A:先削重复,余额按实测提高」.
## Review tier
`dispatch-gates` mandates the contract-review tier for `skills/**`
(clause ①); waived by the maintainer's standing order in this project
(2026-11-03). The seat runs the contract review.
## Gates
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `2586f5ac` (5 paths vs merge base
`69e133ea0`): **65 commands**, each run under `timeout 900` with
`NODE_OPTIONS=--max-old-space-size=8192` after a full `pnpm build`
(119/119 tasks), exit code captured before any pipe → **65 × exit 0**
(the first round at `965b2d64` was also 65 × exit 0). `--ran`
reconciliation: `65 derived famil(ies) accounted for — 65 run, 0
NOT-MEASURED`. `node scripts/check-commit-card-trailers.mjs --range
origin/main..HEAD` → exit 0 before each push. `origin/main` is now
`33bc8ae5f`; since the branch point it touches `skills/objectstack-ai`,
`objectstack-api` and `objectstack-data` but no `objectstack-platform`
file and not `scripts/check-skills-token-ratchet.mjs`, and `git
merge-tree` merges it cleanly, so the per-file readings above stand (the
bundle total is this branch's own tree).
<details><summary>Ran list</summary>
```
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:skill-docs :: exit 0
pnpm --filter @objectstack/spec run check:skill-refs :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-top-level-keys :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0
```
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01J8VVAnbXbG1XBtvCznvwYJ
<!-- signed: domain:skills#3 · huangyiirene ·
session_01J8VVAj7CvjkGXvgXzd6RZ7 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 769adff commit e0b8c2c
5 files changed
Lines changed: 43 additions & 7 deletions
File tree
- .changeset
- scripts
- skills/objectstack-platform
- evals
- references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1055 | 1066 | | |
1056 | 1067 | | |
1057 | 1068 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
290 | 304 | | |
291 | 305 | | |
292 | 306 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
0 commit comments