Repository navigation
Commit afbd903
feat(skills): objectstack-project, a process skill for metadata-app projects (#35221)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8Na6HfgLSzUXJakidM4aJmV)_
Part of #35218 (the scaffold CI `pnpm test` step follows in its own PR;
see Scope change)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:新增对外发布的技能 `objectstack-project`(207 行,2901
token):元数据应用项目怎么跑——先问「应用还是平台」「自用还是产品」,各阶段写什么,应用自己测什么、`os validate` / `os
lint` / `os verify` 已经查了什么,平台缺陷不在应用里绕,给客户的变更说明,升平台版本与升级时的客户数据(回填脚本)。模板
AGENTS.md 用五行指向该技能替掉只列 9 个技能的手写表,加三行 PR 模板。
- **为什么改**:12 个技能只教怎么写元数据,没有一个教怎么跑一个元数据项目;平台技能教 `LiteKernel`、脚手架样板测试却用
`@objectstack/verify`,两边打架。范围按卡片 v1 和独立评审,分诊/分级附录留到以后。
- **风险与回滚**:只加文本和脚手架模板,不动运行时;脚手架 CI 不变。回滚即 revert。新技能每次客户会话多 2901
token,天花板行随本 PR 新增,是需要你批的定价动作。
- **先看**:`skills/objectstack-project/SKILL.md`(§0 两问与默认轻流程、§2 平台检查表、§5
回填写法);`packages/create-objectstack/src/templates/AGENTS.md`;`scripts/check-skills-token-ratchet.mjs`
末尾新行。
- **两分钟验证**:`node scripts/check-skills-token-ratchet.mjs`
末行全绿,`skills/objectstack-project/SKILL.md 2901 / 2901`;`pnpm --filter
create-objectstack exec vitest run` 通过。
- **需要你做的**:受管面(`skills/**`)Tier H,需 os-zhuang 在 GitHub 上 Approve。
## What changes
**A new published process skill, `skills/objectstack-project/`**
(`metadata.domain: process`, `SKILL.md` alone plus evals):
- §0 Two opening questions: app or platform (the platform's own deciding
question, generalised), and own use or product. Product-only steps are
marked ★; the light path is the default, and a one-person label change
is told explicitly not to grow a requirement record, design note or
changeset.
- §1 One stage × document table (requirement, design, issue, build,
test, acceptance, user docs, release, upgrade), a design checklist, and
a requirement template the skill creates the first time one is needed.
No empty files are scaffolded.
- §2 The test boundary. A table of what this version's `os validate`,
`os lint`, `os verify` and `tsc` check, read from
`packages/lint/src/authoring-rules.ts`,
`packages/cli/src/commands/{validate,lint,verify,explain}.ts` and
`packages/verify/README.md`; it says plainly that `os verify` runs
nowhere by default. The app pins business facts with `bootStack`; a
consistency check the table lacks is a platform gap, carried as a `//
PLATFORM-GAP:` test and retired only after the platform command fails on
the same injected defect.
- §3 Platform gaps: no workaround in the app, file upstream, block the
app issue (and exempt the label from stale bots), unblock only when the
fix is installable.
- §4 ★ Changesets written for the customer's administrator; a breaking
change states FROM → TO, the minimum `@objectstack/*` version and the
steps; `manifest.version` is what `os package publish` ships.
- §5 Bumping `@objectstack/*` together and re-syncing skills; data
already installed (`os migrate`, `renamedFrom`) and the backfill-script
rules (old release, REST only, report by default, `--apply`,
idempotent).
- §6 Pointers to the 12 other skills.
- Evals: `project-process.json` (platform defect, refuse a hand-written
reference-integrity test, business-fact test, dropping a field in a
product, pin bump, and the one-person counter-example) and
`triggers.json` (8 should / 6 near misses).
**Catalog wiring**: `DISPLAY` row in
`packages/spec/scripts/build-skill-docs.ts`; regenerated index in
`skills/README.md` and `content/docs/ai/skills-reference.mdx`; one
routing line in `skills/README.md`;
`objectstack-platform/references/operations.md` scopes `LiteKernel` to
plugin tests and points app tests here, and
`objectstack-data/references/data-hooks.md` routes an app's hook tests
here (both inside their files' headroom).
**Token ratchet**: an initial `CEILINGS` row for the new `SKILL.md`,
pinned at its measurement, zero headroom, on the same terms as the
`objectstack-ask` row.
**Scaffold** (`create-objectstack`): the template `AGENTS.md` replaces
its nine-row skill table with a pointer to this skill (Copilot and
Cursor read only `AGENTS.md`); a three-line
`.github/pull_request_template.md`.
Out of scope, per the card: the triage/grading appendix, a growth guide,
a docs-site guide, a tag-time changeset check, a reusable workflow; no
fleet machinery and no hotcrm-specific standard is published. Trimming
hotcrm's own `docs/PRIORITIES.md` to hotcrm-only content belongs to
hotcrm's rollout.
## Scope change
The card's scaffold item "CI runs `pnpm test`" is not in this PR. Added
to the blank template's `ci.yml`, it failed Test Core on 5df09d0:
`packages/cli/test/scaffold-ci-script-parity.test.ts` requires `os init
-t app` and `-t empty` to declare every script that workflow runs, and
`scaffold-test-script-passes.test.ts` requires every template declaring
`test` to ship a passing starter test (an empty suite must fail, so
`--passWithNoTests` is out). That needs starter tests in both
scaffolders, which is its own change; it follows on this branch after
this PR merges, and #35218 stays open for it. Until then the skill tells
a project to add the step to its own `ci.yml`.
## Contract review round 1 (comment 6987080580, head c363bb7)
PASS with six should-fixes and three nits, all addressed in ffab0f1:
`os init` projects have no `test` script yet (S1); only errors fail
`validate`/`lint`, `--strict` makes warnings fail (S2); `os explain`
lists explained rules only, an injected defect settles whether a check
exists (S3); backfill secrets come from the environment or a prompt
(S6); `data-hooks.md` re-pointed (S5). S4 (description vs trigger
negatives): the description and the scaffold `AGENTS.md` pointer now
name the decision the skill serves ("deciding where a change belongs or
what to write before building") instead of every feature start, so
adding a field or a view does not load 2900 tokens; the three negatives
stay. Delta review on the new head follows.
## Tests
- `create-objectstack`: full vitest run, 25 files / 381 tests pass.
- Skill gates, all green on the final tree: `check:skill-compatibility`,
`check:skill-links`, `check:skill-identifier-liveness`,
`check:skill-top-level-keys`, `check:skill-frame-sync`,
`check:role-word`, `check-skills-token-ratchet` (+ `--self-test`),
`check:skill-docs`, `check:skill-refs`, changeset gates.
- The gate families `scripts/pm/dispatch-gates.mjs` derives for this
file surface were run locally; results in Verification.
## Acceptance notes
- **Does a re-sync bring a newly added skill into an already-installed
app?** (the card's open item) Measured: a throwaway app depending on a
local copy of `@objectstack/skills` without this skill, synced with `npx
skills@1.7.2 experimental_sync --agent claude-code --copy -y` (12
skills), then moved to a copy with it and re-synced: `Synced 13 skills`,
`.claude/skills/objectstack-project` present, and `skills-lock.json`
names it.
- Model tier: `dispatch-gates.mjs` marks `skills/**` MANDATORY fable.
The skill text and evals were reviewed and revised by a fable-tier pass
against the source files named above before this PR opened.
## Token readings (published bundle)
| | before (main) | after |
|:--|--:|--:|
| `skills/objectstack-project/SKILL.md` | — | 2901 |
| `skills/objectstack-platform/references/operations.md` | 3388 | 3389
(ceiling 3394, unchanged) |
| `skills/objectstack-data/references/data-hooks.md` | 9996 | 10001
(ceiling 10011, unchanged) |
| ratcheted authored total | 191936 | 194843 |
| eval fixtures (not ratcheted) | 60854 | 63204 |
## Verification
Local runs:
- 54 of the 60 non-build gate families `dispatch-gates.mjs` derives:
exit 0 on 5df09d0.
- `check:role-word` reported one new reserved word in the skill;
reworded ("who sees which records") and green.
- Five families need built `dist/` trees
(`check:doc-formula-expressions`, `check:doc-security-posture`,
`check:docs`, `check:skill-examples`, `check:docs-transcript-drift`) and
stopped at their prerequisite (exit 3, not a finding); CI runs them on
this PR.
- After the scope change (c363bb7): token ratchet, `check:role-word`,
`check:skill-links`, `check:skill-compatibility`,
`check:skill-identifier-liveness` and `check:skill-docs` green;
`create-objectstack` 25 files / 381 tests pass. The blank template's
`ci.yml` and `template-ci-workflow.test.ts` are byte-identical to
`main`, so the cli scaffold parity pins see main's inputs.
- After the review fixes (ffab0f1): the same skill gates plus
`check:skill-top-level-keys`, `check:skill-frame-sync` and the ratchet
`--self-test` green; `create-objectstack` 25 files / 381 tests pass.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbWfVxrJ6N3xZaG1Eoe)_
<!-- signed: epic:#35205#2 · os-warren ·
session_01JQwxbWfVxrJ6N3xZaG1Eoe -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent cdb327f commit afbd903
13 files changed
Lines changed: 483 additions & 23 deletions
File tree
- .changeset
- content/docs
- ai
- getting-started
- packages
- create-objectstack/src/templates
- blank/.github
- spec/scripts
- scripts
- skills
- objectstack-data/references
- objectstack-platform/references
- objectstack-project
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
223 | 236 | | |
224 | 237 | | |
225 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
143 | 139 | | |
144 | 140 | | |
145 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1924 | 1924 | | |
1925 | 1925 | | |
1926 | 1926 | | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
1927 | 1945 | | |
1928 | 1946 | | |
1929 | 1947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | | - | |
| 888 | + | |
889 | 889 | | |
890 | 890 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
0 commit comments