From dab69a7894012848d27ac0c4061bf8fc97bb5d09 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 04:57:39 +0000 Subject: [PATCH 1/6] docs(skills): the objectstack-project entry file becomes a router The entry goes from 11,987 to 8,998 bytes (214 lines to 182) and keeps its numbered sections under the same headings. This skill has no hand-written reference file, so nothing moved: the per-command check lists, the rest of the bootStack handle and the schema-change table are cut behind a pointer (the published CLI page, the README the verify package ships, the data skill's field-types rule), in-entry restatements are cut once, and the changeset lists the conventions and examples that left with no other home. Frontmatter is byte-identical. The ratchet row follows the file down, pinned at the measurement: 2990 -> 2243. No row rises and none is added. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude --- .changeset/34770-project-skill-router.md | 22 +++ scripts/check-skills-token-ratchet.mjs | 21 ++- skills/objectstack-project/SKILL.md | 208 ++++++++++------------- 3 files changed, 130 insertions(+), 121 deletions(-) create mode 100644 .changeset/34770-project-skill-router.md diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md new file mode 100644 index 00000000000..41cc84f97b5 --- /dev/null +++ b/.changeset/34770-project-skill-router.md @@ -0,0 +1,22 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the objectstack-project entry file becomes a router + +Clause-②: no +Metadata-protocol: none + +`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 182). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. + +**What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. + +**What left, and what answers it now.** + +- The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli and `npx os --help`. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. +- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). +- Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands. +- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so). The objectstack-ask row is cut too: answering a question from the app's records is not a change to the project. +- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a warning (label case, an unresolved navigation target), of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". + +**Anchors.** No section anchor left `SKILL.md`: the title and every section heading are unchanged. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 16a3b73ca8e..f493ad2d353 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2916,7 +2916,26 @@ export const CEILINGS = new Map([ // pinned AT the measurement. Raise path: the standing ruling (2026-10-27, // verbatim and untranslated) 「A:先削重复,余额按实测提高」, recognised per // ruling record 6513306068. - ['skills/objectstack-project/SKILL.md', 2990], + // 2990 -> 2243 (#34770): the entry becomes a router. It keeps the three questions asked + // before any work (app or platform, own use or product, does the platform ship it), what is + // written at each stage, the four checks with what each platform command covers, one + // `bootStack` test, the platform-gap rules, the customer changeset and release rules, the + // bump steps, the backfill rules and the list of which skill teaches which kind of change. + // This skill has no hand-authored reference file (its one reference, the platform catalog, + // is generator-owned), so nothing MOVED: the rest is CUT. Behind a pointer: the per-command + // check lists (the published CLI page; `npx os --help`), the rest of the + // `bootStack` handle (the README `@objectstack/verify` ships), the schema-change table + // (objectstack-data `rules/field-types.md`). Restated inside the entry or by its own + // frontmatter: the stage-table rows that only named a later section, the sweep step's + // parentheticals, two routing rows. With no other home, each a convention, an example or a + // rationale and none a trap: the requirement-file template, the stale-bot note, the vitest + // set-up sentence, the `os explain` caveat. No row rises and no row is added. The file is + // 11987 bytes (11960 priced) -> 8998 (8971 priced) -> 2243 tokens, pinned AT the + // measurement; the sum of all ceilings falls by the same 747. + // Authority: the ruling of record that orders the entry file down to router size, decision + // record #34691 S3 = A. + // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8971 / 4) + ['skills/objectstack-project/SKILL.md', 2243], ]); /** diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index d07d33a9897..def115a5975 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -20,23 +20,24 @@ metadata: # Running an ObjectStack metadata-app project -The domain skills teach how to write metadata. This one teaches how a change -moves through the project. +Where the installed `@objectstack/cli` differs from the `compatibility` line, +the installed command is right (`npx os --help`). ## 0 · Three questions before any work **1. App or platform?** Could someone who has only the metadata, and knows nothing of this business, have written the change? -| Answer | Where it goes | -|:--|:--| -| No: it encodes this business's judgement (a discount ceiling, who approves what, how a case is routed) | the app | -| Yes: it only asks whether the metadata is consistent (references resolve, labels are translated, a write round-trips) | the platform: check the table in §2 before writing anything | -| Platform behaviour is missing or wrong, and the app pays for it | the platform, and a **gap** until it ships (§3) | +- No, it encodes this business's judgement (a discount ceiling, who approves + what): the app. +- Yes, it only asks whether the metadata is consistent (references resolve, a + write round-trips): the platform; read §2 first. +- Platform behaviour is missing or wrong: a platform **gap** until it ships + (§3). -**2. Own use or product?** Ask the owner once: is the app used by its own team, -or installed and upgraded by customers? Record the answer as one line in the -project's `AGENTS.md` (`Project kind: own use` or `Project kind: product`). +**2. Own use or product?** Ask the owner once whether the app is used by its +own team or installed and upgraded by customers, and record it as one line in +the project's `AGENTS.md`: `Project kind: own use` or `Project kind: product`. Steps marked ★ apply only to a product. Default to own use, and keep it light: a one-person app changing a label needs @@ -47,168 +48,135 @@ record, a design note or a changeset. read [the platform catalog](./references/platform-catalog.md); use what it lists. Absent, and a second app would copy it: file a platform card at `objectstack-ai/objectstack`, and build the app's own meanwhile, marked -`// PLATFORM-CANDIDATE: `. Not §3: a defect is never worked around; a -missing capability may be built and marked. +`// PLATFORM-CANDIDATE: `. A defect is different: never worked around (§3). Building through MCP with no repository: only §0 and §3 apply. ## 1 · What to write at each stage -| Stage | Own use | ★ Product adds | -|:--|:--|:--| -| Requirement | Feature: who asked, their words, one acceptance sentence ("A user can …"), on the issue. Bug: steps, expected, actual. | A file in `docs/requirements/` for a feature customers will see (template below) | -| Design | On the issue. A short note only when the change spans two packages or adds an object; it covers the checklist below | The note always answers "installed data" and "upgrade steps" | -| Issue | One issue, one PR | | -| Build | Change `src/` only. A Studio change stays in that environment's database and never ships (the project's `AGENTS.md`) | | -| Test | §2 | | -| Acceptance | The PR says which path was walked and as which user; the locale or device when it matters | | -| User docs | The same PR updates the docs a user reads (package docs: objectstack-ui) | | -| Release | | A changeset written for the customer (§4) | -| Upgrade | §5 | The release note lists the customer's steps | - -Design checklist: objects and fields touched · who may read and edit them · -which automation fires · which screens change · translations · -★ what happens to data already installed · ★ the steps an upgrading customer takes. - -★ Requirement template, created the first time one is needed: -```markdown -# REQ-NNNN -- Asked by: <who> · Their words: "<quote>" -- A user can: <one acceptance sentence> -- Out of scope: <what this does not do> -- Status: proposed | accepted | shipped in <version> -``` +- **Requirement**, on the issue. Feature: who asked, their words, one + acceptance sentence ("A user can …"). Bug: steps, expected, actual. ★ A + feature customers will see also gets a file in `docs/requirements/`. +- **Design**, on the issue; a short note only when the change spans two + packages or adds an object: objects and fields touched, who may read and + edit them, automation, screens, translations, ★ data already installed, + ★ the customer's upgrade steps. +- **Build**: one issue, one PR. Change `src/` only: a Studio change stays in + that environment's database and never ships. +- **Acceptance**: the PR says which path was walked and as which user, and + updates the docs a user reads. ## 2 · Testing: what the app pins, what the platform checks -The platform checks consistency. The app tests its own business facts. Run all -four before calling a change done; a scaffolded project's CI runs them (an -older scaffold may lack the `pnpm test` step: add it). Add vitest, the `test` -script and `@objectstack/verify` (for `bootStack`) where missing. -Only errors fail `validate` and `lint`; a warning, such as label case or an -unresolved navigation target, passes. `--strict` on either makes warnings fail: -use it instead of re-checking them in a test. +Run all four before calling a change done, and in CI: ```bash pnpm validate && pnpm lint && pnpm typecheck && pnpm test ``` -What the platform checks at 18.x: - -| Tool | Checks | -|:--|:--| -| `os validate` (the same rules `os build` runs) | Protocol schema; CEL expressions and their `record.<field>` paths; references between metadata (fields, objects, views, actions, picklists, capabilities, approvers); dashboard widget bindings and dataset members; view, form and page shape; flow trigger readiness and undeclared flow cycles; sharing and row-level security enforceability; seed rows against state machines; package docs; a provider for every required capability | -| `os lint` | The shared author-time rules again, plus its own: naming and label style, hook bodies that stop lowering to metadata-only bodies, and translation coverage (a missing non-source locale is an error only with `--i18n-strict`) | -| `os verify` | Boots the app and writes over REST: every field type round-trips. `--rls`: a user who cannot read a record cannot write it. Also opt-in: `--reference-shapes`, `--delete-behaviors`, `--unique-scopes`, `--parent-write-reach`, `--dashboard-windows`, `--multi-tenant`. `os validate`'s capability findings: advisory here (`--json`: `capabilities`) | -| `pnpm typecheck` | Types against `@objectstack/spec` | - -⛔ `os verify` is not one of the four and not in the scaffold's CI: run -`npx os verify --rls` before a release, or as a CI step. -`npx os explain` lists only the rules that carry an explanation, not every -check. - -What the app tests, with `bootStack` from `@objectstack/verify` on the real -engine (the scaffold's `note.test.ts` is the shape): the numbers in its rules, -who approves which amount, what a flow writes, what an action does, and who sees -which records **as this business intends** (`--rls` proves -consistency, not intent). +Only errors fail `validate` and `lint`: a warning passes. `--strict` on either +fails warnings too; use it instead of re-checking them in a test. + +What the platform checks (in full: https://objectstack.ai/docs/deployment/cli): + +- `os validate`, the rules `os build` runs: the protocol schema, CEL + expressions and their `record.<field>` paths, references between metadata, + widget bindings, view, form and page shape, and flows, sharing rules and + seed rows that cannot work as declared. `os lint` adds naming, label and + translation-coverage style. +- `os verify` boots the app and writes over REST: every field type + round-trips, and with `--rls` a user who cannot read a record cannot write + it. ⛔ It is not one of the four, nor in the scaffold's CI: run + `npx os verify --rls` before a release, or as a CI step. + +⛔ Do not hand-write one of those checks ("every view names real fields"). +Asked to write one, run the command that already checks it and show its output +instead. A consistency check the platform does **not** make is a gap (§3): +until the rule ships, the app may carry the test, marked +`// PLATFORM-GAP: <link>`. When it lands, inject the same defect, confirm the +platform command fails on it, then replace the test with +`// RETIRED: <rule id>, checked by os <command>`. + +The app tests its own business facts, with `bootStack` from +`@objectstack/verify` on the real engine: the numbers in its rules, who +approves what, what a flow or an action does, and who sees which records +**as this business intends** (`--rls` proves consistency, not intent). +`stack.flows.run`, `stack.actions.run`, `stack.seed` and `stack.rows` are in +the package's README. ```ts -const stack = await bootStack(config); // the default export of objectstack.config.ts -const admin = await stack.signIn(); // the seeded admin; signUp(email) is a plain member +const stack = await bootStack(config); // objectstack.config.ts's default export +const admin = await stack.signIn(); // the seeded admin; signUp(email): a plain member await expect( stack.hooks.run('crm_quote', 'insert', { name: 'Q-1', discount: 0.35 }, { as: admin }), ).rejects.toMatchObject({ code: 'VALIDATION_FAILED' }); await stack.stop(); ``` -The handle also has `stack.flows.run` (boot with `{ automation: true }` unless -the app requires `automation`), `stack.actions.run`, `stack.seed` and -`stack.rows` (read as a user); the README in `node_modules/@objectstack/verify` -documents each. A plugin's own tests use `LiteKernel` (objectstack-platform). - -⛔ Do not hand-write a check the table lists, such as "every reference -resolves" or "every view names real fields". Asked to write one, run the -command that already checks it and show its output instead. - -A consistency check the table does **not** list is a platform gap (§3). Until it -ships, the app may carry the test, marked `// PLATFORM-GAP: <issue link>`. When -the platform rule lands, retire it: inject the same defect, confirm the platform -command fails on it, then replace the test with a one-line -`// RETIRED: <rule id>, checked by os lint` (or validate, or verify). - ## 3 · Platform gaps - ⛔ Never work around a platform defect in the app: no duplicate route, no hook that patches the engine's answer, no hand-rolled permission check, no - metadata reshaped to dodge a bug. A workaround outlives the fix. + metadata reshaped to dodge a bug. - File it at `objectstack-ai/objectstack`: the platform version, the smallest metadata that shows it, expected and actual. - Mark the app's issue blocked (a `blocked` label and a `Blocked by: <link>` - line) and keep its priority. If a stale bot runs, exempt that label. + line) and keep its priority. - It unblocks when the fix is in a version the app can install, not when the upstream PR merges: `npm view @objectstack/<package> version`, then its `CHANGELOG.md`. - Relief for customers before the fix ships: the owner decides, on the issue. ## 4 · ★ Describing a change for customers -- Set up changesets once (`pnpm add -D @changesets/cli && pnpm changeset init`); - every PR that changes what ships adds one (`pnpm changeset`). -- Write it for the customer's administrator: what they can do now, in their - words. No issue numbers, no internal names. -- A breaking change (a field, object, view, permission or behaviour removed, - renamed or changed in meaning) is `major` and states: FROM → TO, the minimum - `@objectstack/*` version, and the administrator's steps in order, a backfill - (§5) first. -- To release: `pnpm changeset version` writes `CHANGELOG.md`, the notes - customers read, and bumps `package.json`. Set `manifest.version` in - `objectstack.config.ts` to match by hand: `os package publish` ships that - one. Then `os build` and `os package publish` (objectstack-platform). +- Every PR that changes what ships adds a changeset (`pnpm changeset`), written + for the customer's administrator: what they can do now, in their words. No + issue numbers, no internal names. +- A breaking change (anything removed, renamed or changed in meaning) is + `major` and states: FROM → TO, the minimum `@objectstack/*` version, and the + administrator's steps in order, a backfill (§5) first. +- To release: `pnpm changeset version` writes `CHANGELOG.md` and bumps + `package.json`. Set `manifest.version` in `objectstack.config.ts` to match + by hand: `os package publish` ships that one. Then `os build` and + `os package publish` (objectstack-platform). ## 5 · Bumping the platform, and customer data on upgrade Bump: 1. Move every `@objectstack/*` package to one version, `@objectstack/skills` included, then re-sync the skills and commit them: - `npx skills@1.7.2 experimental_sync --agent claude-code --copy -y` (name your - own runtime after `--agent`). + `npx skills@1.7.2 experimental_sync --agent claude-code --copy -y` + (`--agent`: your runtime). 2. Read each package's `CHANGELOG.md` between the versions for breaking entries. Crossing a protocol major: objectstack-upgrade. 3. Run the four checks. A new rule that reports existing metadata is fixed in the metadata, ⛔ never silenced. -4. Sweep the blocked issues (unblock each whose fix is now installed), the - `PLATFORM-GAP` tests (retire each one the platform now checks, §2) and the - `PLATFORM-CANDIDATE` markers (replace each the catalog now lists, §0). +4. Sweep what the bump may have settled: the blocked issues (§3), the + `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (replace + each the catalog now lists). Data already installed: -- Added objects, fields and indexes apply on boot. A rename carries - `renamedFrom`. A type change, a drop or a relaxed `NOT NULL` takes - `os migrate plan` then `os migrate apply` (`--allow-destructive` for a drop). - Detail: objectstack-data `rules/field-types.md` § Changing a field that has data. +- Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`, + `--allow-destructive` for a drop): objectstack-data `rules/field-types.md` + § Changing a field that has data. - Removing a field or object, or changing what its value means, puts the old values out of reach once the new metadata is installed. Copy them first with a backfill script in `scripts/`: - run it on each deployment while still on the old release; - - REST API only, no import from `src/`, so it works on any installed metadata; - - report by default, write only with `--apply`; - - touch only rows that need it; a second run reports zero; + - REST API only, no import from `src/`; + - report by default, write only with `--apply`; touch only rows that need + it, so a second run reports zero; - sign in as an administrator named on the command line; the password or token comes from the environment or a prompt, never an argument. -- ★ The release note names the script and when to run it. ## 6 · Where each kind of change is taught -| Change | Skill | -|:--|:--| -| Objects, fields, validations, hooks, permissions, seed data | objectstack-data | -| Queries, filters, aggregation | objectstack-query | -| Views, apps, dashboards, reports, actions, pages, package docs | objectstack-ui | -| Flows, triggers, approvals, jobs, webhooks | objectstack-automation | -| Agents, tools, knowledge, the MCP server | objectstack-ai | -| CEL formulas and predicates | objectstack-formula | -| Translations | objectstack-i18n | -| REST endpoints, auth, realtime | objectstack-api | -| Project setup, plugins and their tests, the CLI, deployment | objectstack-platform | -| Crossing a protocol major | objectstack-upgrade | -| Answering a question from the app's records | objectstack-ask | -| Rendering the metadata in React | objectui | +- objectstack-data: objects, fields, validations, hooks, permissions, seed data +- objectstack-query: queries, filters, aggregation +- objectstack-ui: views, apps, dashboards, reports, actions, pages, package docs +- objectstack-automation: flows, triggers, approvals, jobs, webhooks +- objectstack-ai: agents, tools, knowledge, the MCP server +- objectstack-formula: CEL formulas and predicates +- objectstack-i18n: translations +- objectstack-api: REST endpoints, auth, realtime +- objectstack-platform: project setup, plugins and their tests, the CLI, deployment +- objectui: rendering the metadata in React From f40780d5bf028c8470d05a7a24d15949e0f146e2 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Tue, 1 Dec 2026 05:07:26 +0000 Subject: [PATCH 2/6] docs(skills): put back what the eval round showed the project entry lost The after round on the first cut read the bootStack case at 0 of 3 where main's text reads 1 of 3: every answer described the test without naming `stack.hooks.run`, which main's prose names beside `stack.flows.run`. The entry now says what each of the two does, and `os lint` has its own bullet again. Paid inside the entry: the design list is shorter, "or as a CI step" and the objectui routing row are cut; the changeset lists each. The file is 9000 bytes, 184 lines; the ratchet row is re-pinned at the measurement, 2244. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude <noreply@anthropic.com> --- .changeset/34770-project-skill-router.md | 8 ++++---- scripts/check-skills-token-ratchet.mjs | 18 ++++++++++-------- skills/objectstack-project/SKILL.md | 18 ++++++++++-------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md index 41cc84f97b5..009b1370c63 100644 --- a/.changeset/34770-project-skill-router.md +++ b/.changeset/34770-project-skill-router.md @@ -7,16 +7,16 @@ docs(skills): the objectstack-project entry file becomes a router Clause-②: no Metadata-protocol: none -`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 182). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. +`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 184). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. **What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. **What left, and what answers it now.** - The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli and `npx os <command> --help`. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. -- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). +- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry keeps what `stack.hooks.run` and `stack.flows.run` each do. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). - Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands. -- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so). The objectstack-ask row is cut too: answering a question from the app's records is not a change to the project. -- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a warning (label case, an unresolved navigation target), of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". +- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. +- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a warning (label case, an unresolved navigation target), of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". **Anchors.** No section anchor left `SKILL.md`: the title and every section heading are unchanged. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index f493ad2d353..0c355705024 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2916,7 +2916,7 @@ export const CEILINGS = new Map([ // pinned AT the measurement. Raise path: the standing ruling (2026-10-27, // verbatim and untranslated) 「A:先削重复,余额按实测提高」, recognised per // ruling record 6513306068. - // 2990 -> 2243 (#34770): the entry becomes a router. It keeps the three questions asked + // 2990 -> 2244 (#34770): the entry becomes a router. It keeps the three questions asked // before any work (app or platform, own use or product, does the platform ship it), what is // written at each stage, the four checks with what each platform command covers, one // `bootStack` test, the platform-gap rules, the customer changeset and release rules, the @@ -2927,15 +2927,17 @@ export const CEILINGS = new Map([ // `bootStack` handle (the README `@objectstack/verify` ships), the schema-change table // (objectstack-data `rules/field-types.md`). Restated inside the entry or by its own // frontmatter: the stage-table rows that only named a later section, the sweep step's - // parentheticals, two routing rows. With no other home, each a convention, an example or a - // rationale and none a trap: the requirement-file template, the stale-bot note, the vitest - // set-up sentence, the `os explain` caveat. No row rises and no row is added. The file is - // 11987 bytes (11960 priced) -> 8998 (8971 priced) -> 2243 tokens, pinned AT the - // measurement; the sum of all ceilings falls by the same 747. + // parentheticals, the objectstack-upgrade routing row. With no other home, each a convention, + // an example or a rationale and none a trap: the requirement-file template, the stale-bot + // note, the vitest set-up sentence, the `os explain` caveat; and the two routing rows for + // work outside the metadata project (objectstack-ask, objectui), which each skill's own + // description still routes. No row rises and no row is added. The file is + // 11987 bytes (11960 priced) -> 9000 (8973 priced) -> 2244 tokens, pinned AT the + // measurement; the sum of all ceilings falls by the same 746. // Authority: the ruling of record that orders the entry file down to router size, decision // record #34691 S3 = A. - // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8971 / 4) - ['skills/objectstack-project/SKILL.md', 2243], + // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8973 / 4) + ['skills/objectstack-project/SKILL.md', 2244], ]); /** diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index def115a5975..9e3ac16f11f 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -58,9 +58,9 @@ Building through MCP with no repository: only §0 and §3 apply. acceptance sentence ("A user can …"). Bug: steps, expected, actual. ★ A feature customers will see also gets a file in `docs/requirements/`. - **Design**, on the issue; a short note only when the change spans two - packages or adds an object: objects and fields touched, who may read and - edit them, automation, screens, translations, ★ data already installed, - ★ the customer's upgrade steps. + packages or adds an object: objects and fields, access, automation, + screens, translations, ★ data already installed, ★ the customer's upgrade + steps. - **Build**: one issue, one PR. Change `src/` only: a Studio change stays in that environment's database and never ships. - **Acceptance**: the PR says which path was walked and as which user, and @@ -82,12 +82,13 @@ What the platform checks (in full: https://objectstack.ai/docs/deployment/cli): - `os validate`, the rules `os build` runs: the protocol schema, CEL expressions and their `record.<field>` paths, references between metadata, widget bindings, view, form and page shape, and flows, sharing rules and - seed rows that cannot work as declared. `os lint` adds naming, label and + seed rows that cannot work as declared. +- `os lint`: the shared rules again, plus naming, label and translation-coverage style. - `os verify` boots the app and writes over REST: every field type round-trips, and with `--rls` a user who cannot read a record cannot write it. ⛔ It is not one of the four, nor in the scaffold's CI: run - `npx os verify --rls` before a release, or as a CI step. + `npx os verify --rls` before a release. ⛔ Do not hand-write one of those checks ("every view names real fields"). Asked to write one, run the command that already checks it and show its output @@ -101,8 +102,6 @@ The app tests its own business facts, with `bootStack` from `@objectstack/verify` on the real engine: the numbers in its rules, who approves what, what a flow or an action does, and who sees which records **as this business intends** (`--rls` proves consistency, not intent). -`stack.flows.run`, `stack.actions.run`, `stack.seed` and `stack.rows` are in -the package's README. ```ts const stack = await bootStack(config); // objectstack.config.ts's default export @@ -113,6 +112,10 @@ await expect( await stack.stop(); ``` +`stack.hooks.run` is one real write as that user, `stack.flows.run` one flow +run; `stack.actions.run`, `stack.seed` and `stack.rows` are in the package's +README. + ## 3 · Platform gaps - ⛔ Never work around a platform defect in the app: no duplicate route, no hook @@ -179,4 +182,3 @@ Data already installed: - objectstack-i18n: translations - objectstack-api: REST endpoints, auth, realtime - objectstack-platform: project setup, plugins and their tests, the CLI, deployment -- objectui: rendering the metadata in React From 6ebcaafffb7112f3ef458e20dedabb9eea15be43 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Tue, 1 Dec 2026 05:15:41 +0000 Subject: [PATCH 3/6] docs(skills): the project entry names the two warnings that pass again The second after round read the "write a reference test" case at 1 of 3 where main's text reads 3 of 3. Main's answers reach `validate --strict` and `lint --strict` through the sentence that names label case and an unresolved navigation target as warnings that pass; the first cut had dropped those two examples as examples. An unresolved page, report or dashboard target is a warning (`nav-target-unresolved`), so the example is a fact that passes the check and fails later: it is back, with "author-time" on the `os lint` line. Paid inside the entry by two restatements: the sweep step's last parenthetical (the catalog question says it) and the objectstack-platform pointer after `os package publish` (the routing list says it). The file is 8999 bytes, 184 lines; the ratchet row is re-pinned at the measurement, 2243. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude <noreply@anthropic.com> --- .changeset/34770-project-skill-router.md | 6 +++--- scripts/check-skills-token-ratchet.mjs | 10 +++++----- skills/objectstack-project/SKILL.md | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md index 009b1370c63..2a45e4d67b4 100644 --- a/.changeset/34770-project-skill-router.md +++ b/.changeset/34770-project-skill-router.md @@ -9,14 +9,14 @@ Metadata-protocol: none `skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 184). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. -**What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. +**What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning (label case, an unresolved navigation target) passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. **What left, and what answers it now.** - The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli and `npx os <command> --help`. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. - The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry keeps what `stack.hooks.run` and `stack.flows.run` each do. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). - Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands. -- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. -- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a warning (label case, an unresolved navigation target), of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". +- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so); that `os package publish` is taught by objectstack-platform (its routing row lists the CLI and deployment). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. +- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". **Anchors.** No section anchor left `SKILL.md`: the title and every section heading are unchanged. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 0c355705024..4ecf35f14dc 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2916,7 +2916,7 @@ export const CEILINGS = new Map([ // pinned AT the measurement. Raise path: the standing ruling (2026-10-27, // verbatim and untranslated) 「A:先削重复,余额按实测提高」, recognised per // ruling record 6513306068. - // 2990 -> 2244 (#34770): the entry becomes a router. It keeps the three questions asked + // 2990 -> 2243 (#34770): the entry becomes a router. It keeps the three questions asked // before any work (app or platform, own use or product, does the platform ship it), what is // written at each stage, the four checks with what each platform command covers, one // `bootStack` test, the platform-gap rules, the customer changeset and release rules, the @@ -2932,12 +2932,12 @@ export const CEILINGS = new Map([ // note, the vitest set-up sentence, the `os explain` caveat; and the two routing rows for // work outside the metadata project (objectstack-ask, objectui), which each skill's own // description still routes. No row rises and no row is added. The file is - // 11987 bytes (11960 priced) -> 9000 (8973 priced) -> 2244 tokens, pinned AT the - // measurement; the sum of all ceilings falls by the same 746. + // 11987 bytes (11960 priced) -> 8999 (8972 priced) -> 2243 tokens, pinned AT the + // measurement; the sum of all ceilings falls by the same 747. // Authority: the ruling of record that orders the entry file down to router size, decision // record #34691 S3 = A. - // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8973 / 4) - ['skills/objectstack-project/SKILL.md', 2244], + // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8972 / 4) + ['skills/objectstack-project/SKILL.md', 2243], ]); /** diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index 9e3ac16f11f..66473779fa7 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -36,7 +36,7 @@ nothing of this business, have written the change? (§3). **2. Own use or product?** Ask the owner once whether the app is used by its -own team or installed and upgraded by customers, and record it as one line in +own team or installed and upgraded by customers, and record it as a line in the project's `AGENTS.md`: `Project kind: own use` or `Project kind: product`. Steps marked ★ apply only to a product. @@ -74,8 +74,9 @@ Run all four before calling a change done, and in CI: pnpm validate && pnpm lint && pnpm typecheck && pnpm test ``` -Only errors fail `validate` and `lint`: a warning passes. `--strict` on either -fails warnings too; use it instead of re-checking them in a test. +Only errors fail `validate` and `lint`: a warning (label case, an unresolved +navigation target) passes. `--strict` on either fails warnings too; use it +instead of re-checking them in a test. What the platform checks (in full: https://objectstack.ai/docs/deployment/cli): @@ -83,7 +84,7 @@ What the platform checks (in full: https://objectstack.ai/docs/deployment/cli): expressions and their `record.<field>` paths, references between metadata, widget bindings, view, form and page shape, and flows, sharing rules and seed rows that cannot work as declared. -- `os lint`: the shared rules again, plus naming, label and +- `os lint`: the shared author-time rules again, plus naming, label and translation-coverage style. - `os verify` boots the app and writes over REST: every field type round-trips, and with `--rls` a user who cannot read a record cannot write @@ -140,7 +141,7 @@ README. - To release: `pnpm changeset version` writes `CHANGELOG.md` and bumps `package.json`. Set `manifest.version` in `objectstack.config.ts` to match by hand: `os package publish` ships that one. Then `os build` and - `os package publish` (objectstack-platform). + `os package publish`. ## 5 · Bumping the platform, and customer data on upgrade @@ -154,8 +155,7 @@ Bump: 3. Run the four checks. A new rule that reports existing metadata is fixed in the metadata, ⛔ never silenced. 4. Sweep what the bump may have settled: the blocked issues (§3), the - `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (replace - each the catalog now lists). + `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (§0). Data already installed: - Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`, From 9474093d5aaa34531e2650b4d502fa8214137d64 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Tue, 1 Dec 2026 05:26:14 +0000 Subject: [PATCH 4/6] docs(skills): the project entry says which call tests which kind of fact The third after round read the bootStack case at 0 of 3. Two things were behind it. Main's set-up sentence (add vitest, a `test` script and `@objectstack/verify` where missing) was cut as a convention, and without it the answers named the package on 5 of 9 runs where main's text names it on every run: it is back. And the handle calls sat in a sentence after the code block; they now sit beside the facts each one tests (`stack.hooks.run` for a rule's numbers, `stack.flows.run` and `stack.actions.run` for a flow or an action, `stack.rows` for who sees which records). Paid inside the entry: `--allow-destructive` is behind the objectstack-data pointer the same bullet names, and "no issue numbers, no internal names" is said by "in their words" in the same bullet. The file is 8995 bytes, 183 lines; the ratchet row is re-pinned at the measurement, 2242. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude <noreply@anthropic.com> --- .changeset/34770-project-skill-router.md | 10 +++++----- scripts/check-skills-token-ratchet.mjs | 12 ++++++------ skills/objectstack-project/SKILL.md | 23 +++++++++++------------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md index 2a45e4d67b4..3c5774581a8 100644 --- a/.changeset/34770-project-skill-router.md +++ b/.changeset/34770-project-skill-router.md @@ -7,16 +7,16 @@ docs(skills): the objectstack-project entry file becomes a router Clause-②: no Metadata-protocol: none -`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 184). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. +`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 183). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. **What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning (label case, an unresolved navigation target) passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. **What left, and what answers it now.** - The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli and `npx os <command> --help`. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. -- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry keeps what `stack.hooks.run` and `stack.flows.run` each do. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). -- Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands. -- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so); that `os package publish` is taught by objectstack-platform (its routing row lists the CLI and deployment). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. -- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "add vitest, the `test` script and `@objectstack/verify` where missing" and "an older scaffold may lack the `pnpm test` step" (the entry now says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". +- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry now says which call tests which kind of fact (`stack.hooks.run`, `stack.flows.run`, `stack.actions.run`, `stack.rows`). A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). +- Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands; `--allow-destructive` is taught there, for a drop and for a tightening. +- Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so); that `os package publish` is taught by objectstack-platform (its routing row lists the CLI and deployment); "no issue numbers, no internal names" in a customer changeset (the same bullet says it is written for the customer's administrator, in their words). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. +- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "an older scaffold may lack the `pnpm test` step" (the entry says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". **Anchors.** No section anchor left `SKILL.md`: the title and every section heading are unchanged. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 4ecf35f14dc..71cd1807d36 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2916,7 +2916,7 @@ export const CEILINGS = new Map([ // pinned AT the measurement. Raise path: the standing ruling (2026-10-27, // verbatim and untranslated) 「A:先削重复,余额按实测提高」, recognised per // ruling record 6513306068. - // 2990 -> 2243 (#34770): the entry becomes a router. It keeps the three questions asked + // 2990 -> 2242 (#34770): the entry becomes a router. It keeps the three questions asked // before any work (app or platform, own use or product, does the platform ship it), what is // written at each stage, the four checks with what each platform command covers, one // `bootStack` test, the platform-gap rules, the customer changeset and release rules, the @@ -2929,15 +2929,15 @@ export const CEILINGS = new Map([ // frontmatter: the stage-table rows that only named a later section, the sweep step's // parentheticals, the objectstack-upgrade routing row. With no other home, each a convention, // an example or a rationale and none a trap: the requirement-file template, the stale-bot - // note, the vitest set-up sentence, the `os explain` caveat; and the two routing rows for + // note, the changesets set-up command, the `os explain` caveat; and the two routing rows for // work outside the metadata project (objectstack-ask, objectui), which each skill's own // description still routes. No row rises and no row is added. The file is - // 11987 bytes (11960 priced) -> 8999 (8972 priced) -> 2243 tokens, pinned AT the - // measurement; the sum of all ceilings falls by the same 747. + // 11987 bytes (11960 priced) -> 8995 (8968 priced) -> 2242 tokens, pinned AT the + // measurement; the sum of all ceilings falls by the same 748. // Authority: the ruling of record that orders the entry file down to router size, decision // record #34691 S3 = A. - // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8972 / 4) - ['skills/objectstack-project/SKILL.md', 2243], + // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8968 / 4) + ['skills/objectstack-project/SKILL.md', 2242], ]); /** diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index 66473779fa7..2ded6f9e844 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -36,7 +36,7 @@ nothing of this business, have written the change? (§3). **2. Own use or product?** Ask the owner once whether the app is used by its -own team or installed and upgraded by customers, and record it as a line in +own team or installed and upgraded by customers, and record it as one line in the project's `AGENTS.md`: `Project kind: own use` or `Project kind: product`. Steps marked ★ apply only to a product. @@ -100,9 +100,12 @@ platform command fails on it, then replace the test with `// RETIRED: <rule id>, checked by os <command>`. The app tests its own business facts, with `bootStack` from -`@objectstack/verify` on the real engine: the numbers in its rules, who -approves what, what a flow or an action does, and who sees which records -**as this business intends** (`--rls` proves consistency, not intent). +`@objectstack/verify` on the real engine: the numbers in its rules +(`stack.hooks.run`: one real write as a user), who approves what and what a +flow or an action does (`stack.flows.run`, `stack.actions.run`), and who sees +which records **as this business intends** (`stack.rows`; `--rls` proves +consistency, not intent). Add vitest, a `test` script and +`@objectstack/verify` where missing. ```ts const stack = await bootStack(config); // objectstack.config.ts's default export @@ -113,9 +116,7 @@ await expect( await stack.stop(); ``` -`stack.hooks.run` is one real write as that user, `stack.flows.run` one flow -run; `stack.actions.run`, `stack.seed` and `stack.rows` are in the package's -README. +`stack.seed` and each option are in the package's README. ## 3 · Platform gaps @@ -133,8 +134,7 @@ README. ## 4 · ★ Describing a change for customers - Every PR that changes what ships adds a changeset (`pnpm changeset`), written - for the customer's administrator: what they can do now, in their words. No - issue numbers, no internal names. + for the customer's administrator: what they can do now, in their words. - A breaking change (anything removed, renamed or changed in meaning) is `major` and states: FROM → TO, the minimum `@objectstack/*` version, and the administrator's steps in order, a backfill (§5) first. @@ -158,9 +158,8 @@ Bump: `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (§0). Data already installed: -- Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`, - `--allow-destructive` for a drop): objectstack-data `rules/field-types.md` - § Changing a field that has data. +- Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`): + objectstack-data `rules/field-types.md` § Changing a field that has data. - Removing a field or object, or changing what its value means, puts the old values out of reach once the new metadata is installed. Copy them first with a backfill script in `scripts/`: From 06f27f0f35b259c6e52ffd491b554c201ef3d132 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Tue, 1 Dec 2026 05:32:40 +0000 Subject: [PATCH 5/6] docs(skills): the project entry keeps the destructive flag beside the drop The fourth after round read the "remove a field from a product" case at 0 of 3 where main's text reads 2 of 3: with `--allow-destructive` for a drop moved behind the objectstack-data pointer, no answer named `os migrate` for the column. The cue is back in the entry. Paid inside the entry: the `--help` parenthetical on the version line. The file is 9000 bytes, 184 lines; the ratchet row is re-pinned at the measurement, 2244. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude <noreply@anthropic.com> --- .changeset/34770-project-skill-router.md | 6 +++--- scripts/check-skills-token-ratchet.mjs | 12 ++++++------ skills/objectstack-project/SKILL.md | 9 +++++---- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md index 3c5774581a8..13626ce7640 100644 --- a/.changeset/34770-project-skill-router.md +++ b/.changeset/34770-project-skill-router.md @@ -7,15 +7,15 @@ docs(skills): the objectstack-project entry file becomes a router Clause-②: no Metadata-protocol: none -`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 183). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. +`skills/objectstack-project/SKILL.md` goes from 12.0 KB to 9.0 KB (214 lines to 184). It keeps its numbered sections under the same headings: the three questions asked before any work (app or platform, own use or product, does the platform ship it), what is written at each stage, the four checks with what each platform command covers and one `bootStack` test, the platform-gap rules, the customer changeset and release rules, the bump steps with the backfill rules, and the list of which skill teaches which kind of change. No rule's teaching changes. This skill has no hand-written reference file (its one reference, the platform catalog, is generated), so no text moved: what left the entry was cut, and this entry says what now answers it. **What the entry keeps.** Every ⛔ of the old entry: an own-use app is not asked for a requirement record, a design note or a changeset; `os verify` is not one of the four checks and not in the scaffold's CI; a check the platform makes is not hand-written; a platform defect is never worked around in the app; a new rule that reports existing metadata is never silenced. Beside them, the facts that pass every check and go wrong later: only errors fail `validate` and `lint`, so a warning (label case, an unresolved navigation target) passes without `--strict`; `--rls` proves consistency, not what the business intends; a Studio change stays in that environment's database and never ships; a blocked issue unblocks when the fix is in an installable version, not when the upstream change merges; `manifest.version` is set by hand because `os package publish` ships that one; the skills are re-synced with `--copy` after a bump; removing a field puts its values out of reach once the new metadata is installed, so the backfill runs first, on the old release. One sentence is new: where the installed `@objectstack/cli` differs from the `compatibility` line, the installed command is right. **What left, and what answers it now.** -- The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli and `npx os <command> --help`. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. +- The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. - The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry now says which call tests which kind of fact (`stack.hooks.run`, `stack.flows.run`, `stack.actions.run`, `stack.rows`). A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). -- Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands; `--allow-destructive` is taught there, for a drop and for a tightening. +- Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands and `--allow-destructive` for a drop. - Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so); that `os package publish` is taught by objectstack-platform (its routing row lists the CLI and deployment); "no issue numbers, no internal names" in a customer changeset (the same bullet says it is written for the customer's administrator, in their words). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. - Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "an older scaffold may lack the `pnpm test` step" (the entry says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 71cd1807d36..8cf082bdea8 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2916,14 +2916,14 @@ export const CEILINGS = new Map([ // pinned AT the measurement. Raise path: the standing ruling (2026-10-27, // verbatim and untranslated) 「A:先削重复,余额按实测提高」, recognised per // ruling record 6513306068. - // 2990 -> 2242 (#34770): the entry becomes a router. It keeps the three questions asked + // 2990 -> 2244 (#34770): the entry becomes a router. It keeps the three questions asked // before any work (app or platform, own use or product, does the platform ship it), what is // written at each stage, the four checks with what each platform command covers, one // `bootStack` test, the platform-gap rules, the customer changeset and release rules, the // bump steps, the backfill rules and the list of which skill teaches which kind of change. // This skill has no hand-authored reference file (its one reference, the platform catalog, // is generator-owned), so nothing MOVED: the rest is CUT. Behind a pointer: the per-command - // check lists (the published CLI page; `npx os <command> --help`), the rest of the + // check lists (the published CLI page), the rest of the // `bootStack` handle (the README `@objectstack/verify` ships), the schema-change table // (objectstack-data `rules/field-types.md`). Restated inside the entry or by its own // frontmatter: the stage-table rows that only named a later section, the sweep step's @@ -2932,12 +2932,12 @@ export const CEILINGS = new Map([ // note, the changesets set-up command, the `os explain` caveat; and the two routing rows for // work outside the metadata project (objectstack-ask, objectui), which each skill's own // description still routes. No row rises and no row is added. The file is - // 11987 bytes (11960 priced) -> 8995 (8968 priced) -> 2242 tokens, pinned AT the - // measurement; the sum of all ceilings falls by the same 748. + // 11987 bytes (11960 priced) -> 9000 (8973 priced) -> 2244 tokens, pinned AT the + // measurement; the sum of all ceilings falls by the same 746. // Authority: the ruling of record that orders the entry file down to router size, decision // record #34691 S3 = A. - // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8968 / 4) - ['skills/objectstack-project/SKILL.md', 2242], + // ceil(($(wc -c < skills/objectstack-project/SKILL.md) - 27) / 4) == ceil(8973 / 4) + ['skills/objectstack-project/SKILL.md', 2244], ]); /** diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index 2ded6f9e844..f67a767c14b 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -21,7 +21,7 @@ metadata: # Running an ObjectStack metadata-app project Where the installed `@objectstack/cli` differs from the `compatibility` line, -the installed command is right (`npx os <command> --help`). +the installed command is right. ## 0 · Three questions before any work @@ -105,7 +105,7 @@ The app tests its own business facts, with `bootStack` from flow or an action does (`stack.flows.run`, `stack.actions.run`), and who sees which records **as this business intends** (`stack.rows`; `--rls` proves consistency, not intent). Add vitest, a `test` script and -`@objectstack/verify` where missing. +`@objectstack/verify` if missing. ```ts const stack = await bootStack(config); // objectstack.config.ts's default export @@ -158,8 +158,9 @@ Bump: `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (§0). Data already installed: -- Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`): - objectstack-data `rules/field-types.md` § Changing a field that has data. +- Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`, + `--allow-destructive` for a drop): objectstack-data `rules/field-types.md` + § Changing a field that has data. - Removing a field or object, or changing what its value means, puts the old values out of reach once the new metadata is installed. Copy them first with a backfill script in `scripts/`: From d4b240c007793424bbf5741ad5503117169cf445 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Tue, 1 Dec 2026 07:43:41 +0000 Subject: [PATCH 6/6] docs(skills): the project entry says stack.rows reads as a user only with `as` Contract review of 06f27f0f, should-fix S1: the entry named `stack.rows` as the call that tests who sees which records and no longer said the read is made as a user. `rows` takes its caller from `as` and otherwise reads as the system, past sharing and row-level security, so a visibility test written without it passes or fails for the wrong reason. The entry says so at `stack.rows`; the changeset no longer leaves that to the README. Paid inside the entry with wording that carries no fact; the file stays 9000 bytes and the ratchet row does not move. Nit N2: the changeset now lists the design note's "always answers" line among the cuts. Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS Co-authored-by: Claude <noreply@anthropic.com> --- .changeset/34770-project-skill-router.md | 4 ++-- skills/objectstack-project/SKILL.md | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.changeset/34770-project-skill-router.md b/.changeset/34770-project-skill-router.md index 13626ce7640..08a5b7f4d41 100644 --- a/.changeset/34770-project-skill-router.md +++ b/.changeset/34770-project-skill-router.md @@ -14,9 +14,9 @@ Metadata-protocol: none **What left, and what answers it now.** - The per-command check lists, now behind https://objectstack.ai/docs/deployment/cli. `os validate` keeps its rule families in one sentence; the kinds of reference it resolves, dataset members, package docs and the capability-provider check are on that page. `os lint` keeps "naming, label and translation-coverage style"; `--i18n-strict` is there too, and its rule on hook bodies that stop lowering is no longer listed (the rule reports itself when it fires). `os verify` keeps the round-trip and `--rls`; its other opt-in proofs and the advisory reading of `os validate`'s capability findings are there too. The `pnpm typecheck` row said only what the command's name says. -- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation`, and that `rows` reads as a user, are in the README that `@objectstack/verify` ships, which the entry names; the entry now says which call tests which kind of fact (`stack.hooks.run`, `stack.flows.run`, `stack.actions.run`, `stack.rows`). A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). +- The rest of the `bootStack` handle: that `flows.run` needs `{ automation: true }` unless the app requires `automation` is in the README that `@objectstack/verify` ships, which the entry names. The entry now says which call tests which kind of fact (`stack.hooks.run`, `stack.flows.run`, `stack.actions.run`, `stack.rows`), and keeps inline that `stack.rows` reads as a user only when the call passes `as`: without it the read is the system's, past sharing and row-level security. A plugin's `LiteKernel` tests are no longer named; the routing list sends a plugin's tests to objectstack-platform. The pointer to the scaffold's starter test is cut (the old entry called it `note.test.ts`; the template's file is `starter.test.ts`). - Which schema changes apply on boot and which take `renamedFrom` or `os migrate`: objectstack-data `rules/field-types.md` § Changing a field that has data, which the entry names with the two commands and `--allow-destructive` for a drop. - Restated inside the entry, so cut once: the stage rows that only named a later section (Test, Release, Upgrade); the sentence that the release note names the backfill script (the breaking-change bullet orders the administrator's steps, a backfill first); what each item of the bump's sweep step does (§3, §2 and the catalog question say it); the opening sentence that the domain skills teach the metadata, and the objectstack-upgrade row of the routing list (the frontmatter description and bump step 2 say both); that package docs are objectstack-ui's (its routing row says so); that `os package publish` is taught by objectstack-platform (its routing row lists the CLI and deployment); "no issue numbers, no internal names" in a customer changeset (the same bullet says it is written for the customer's administrator, in their words). The objectstack-ask and objectui rows are cut too: answering a question from the app's records and rendering the metadata in React are not changes to the metadata project, and each of those skills is still found by its own description. -- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; "if a stale bot runs, exempt that label"; "an older scaffold may lack the `pnpm test` step" (the entry says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". +- Cut with no other home. Each is a convention, an example or a reason, and none passes a check and fails later: the requirement-file template (`# REQ-NNNN`, asked by, their words, a user can, out of scope, status) and that it is created the first time one is needed; "the locale or device when it matters" in the acceptance line; that a product's design note "always answers" installed data and upgrade steps (the two are starred items of the design list, and the breaking-change and backfill rules require both); "if a stale bot runs, exempt that label"; "an older scaffold may lack the `pnpm test` step" (the entry says to run the four in CI); that `npx os explain` lists only the rules that carry an explanation; that `os verify` can also run as a CI step (the entry says to run it before a release); the changesets set-up command; that a Studio change's rule is in the project's `AGENTS.md`; the examples of a breaking change (a field, object, view, permission or behaviour), of a consistency question (labels are translated), of a hand-written check ("every reference resolves") and of a business judgement (how a case is routed); the qualifier "and the app pays for it" on a platform gap; "a workaround outlives the fix"; that a REST-only backfill "works on any installed metadata". **Anchors.** No section anchor left `SKILL.md`: the title and every section heading are unchanged. diff --git a/skills/objectstack-project/SKILL.md b/skills/objectstack-project/SKILL.md index f67a767c14b..74c04d0efe1 100644 --- a/skills/objectstack-project/SKILL.md +++ b/skills/objectstack-project/SKILL.md @@ -75,7 +75,7 @@ pnpm validate && pnpm lint && pnpm typecheck && pnpm test ``` Only errors fail `validate` and `lint`: a warning (label case, an unresolved -navigation target) passes. `--strict` on either fails warnings too; use it +navigation target) passes. `--strict` on either fails warnings; use it instead of re-checking them in a test. What the platform checks (in full: https://objectstack.ai/docs/deployment/cli): @@ -103,9 +103,9 @@ The app tests its own business facts, with `bootStack` from `@objectstack/verify` on the real engine: the numbers in its rules (`stack.hooks.run`: one real write as a user), who approves what and what a flow or an action does (`stack.flows.run`, `stack.actions.run`), and who sees -which records **as this business intends** (`stack.rows`; `--rls` proves -consistency, not intent). Add vitest, a `test` script and -`@objectstack/verify` if missing. +which records **as this business intends** (`stack.rows` with `as`: without +it the read is the system's; `--rls` proves consistency, not intent). Add +vitest, a `test` script and `@objectstack/verify` if missing. ```ts const stack = await bootStack(config); // objectstack.config.ts's default export @@ -116,7 +116,7 @@ await expect( await stack.stop(); ``` -`stack.seed` and each option are in the package's README. +`stack.seed` and each option: the package's README. ## 3 · Platform gaps @@ -129,7 +129,7 @@ await stack.stop(); line) and keep its priority. - It unblocks when the fix is in a version the app can install, not when the upstream PR merges: `npm view @objectstack/<package> version`, then its `CHANGELOG.md`. -- Relief for customers before the fix ships: the owner decides, on the issue. +- Customer relief before the fix ships: the owner decides, on the issue. ## 4 · ★ Describing a change for customers @@ -154,8 +154,8 @@ Bump: entries. Crossing a protocol major: objectstack-upgrade. 3. Run the four checks. A new rule that reports existing metadata is fixed in the metadata, ⛔ never silenced. -4. Sweep what the bump may have settled: the blocked issues (§3), the - `PLATFORM-GAP` tests (§2) and the `PLATFORM-CANDIDATE` markers (§0). +4. Sweep the blocked issues (§3), the `PLATFORM-GAP` tests (§2) and the + `PLATFORM-CANDIDATE` markers (§0). Data already installed: - Schema changes (`renamedFrom`; `os migrate plan` then `os migrate apply`,