Skip to content

Commit bae4088

Browse files
os-litantclaude
andauthored
skills(api): optimization flight — RestApiEndpointSchema example and other packages' anchors cut, the apiMethods rule stated once, http.server mount / error ledger / OCC taught (net −1,676 tokens) (#14448)
* skills(api): cut other packages' anchors and the dead RestApiEndpointSchema example; teach http.server mount, the ADR-0112 code ledger and OCC Optimization flight over skills/objectstack-api/SKILL.md (audit record posted on the card). Shrink-only, additions paid by deletions in the same file. DELETE / MERGE / REWRITE API-E-01 the leading os:check example taught RestApiEndpointSchema: 0 consumers repo-wide, no plugin-rest-api package, and RestApiPluginConfig has no `endpoints` key. The one live fact (auth is the flat public + permissions pair) folded into the auth section. API-C-01 datasources + driver table -> objectstack-data rules/datasources.md and objectstack-platform "Driver Selection Guide" (both carry more than this file did, including the Turso Cloud/EE caveat). API-C-02 inter-service communication -> objectstack-platform rules/service-registry.md. Removes the `declare const kernel` block that type-checked against a fabricated host shape. API-C-03 Security Layers table named no authorable key -> one boundary line. API-D-01 health/readiness response bodies -> one line (F-05, A-03). API-D-02 Handler Status table, neutralised by its own callout. API-D-03 Best Practices 1 and 4 (duplicate / no key, no gate). API-D-04 Pitfalls 1, 2, 4 (FLS has no authorable spelling; the page sizes match no platform constant; rate limiting is stated at D6). API-D-05 the carve-out why-prose; the rule stays. API-B-01 third rendering of "no nested auth block". API-B-02 second gate invocation (and the `objectstack validate` spelling, API-G-01) -> Verify your work states it once. API-B-03 the apiMethods primitives/derived rule, stated 3x -> once. The `## API Methods (Operations)` heading and all six ApiMethod members stay: it is a registered exhaustive section (binding `api-methods` in scripts/check-skill-identifier-liveness.mjs). API-B-05 preamble restating the frontmatter. API-F-04 environment-scoped routes / projectResolution, 0 usages (G-03). API-F-05 ServiceInfo, a response shape with 0 usages -> one line. API-F-06 the two declared-but-unenforced realtime notes (filed separately). API-A-01 "When to Use This Skill" -> Skill Boundaries table, matching the objectstack-data / objectstack-query form. API-A-02 frontmatter drops the "versioning" promise: versioning.zod.ts has zero consumers outside a pin test. API-A-03 the description forbids the client seat; the body taught it. ADD (funded) API-F-01 the http.server code-mount example, the only code-route pattern the repo ships. Left UNMARKED: `ctx` is @objectstack/core's PluginContext and the skills os:check surface resolves @objectstack/spec only, so a marker would need a locally declared stand-in -- the same thing API-C-02 was deleted for. Measured correction to the audit: ctx.getService is SYNCHRONOUS and throws (0 awaited call sites in packages/plugins, 112 sync). API-F-02 the ADR-0112 two-tier error-code ledger and the downstream envelopeViolations + makeApiErrorSchema composition. API-F-03 OCC stated with its real spellings: If-Match header or expectedVersion body field, body wins, 409 CONCURRENT_UPDATE. 6311 -> 4635 tokens (ceiling 6319, unchanged); 607 -> 429 lines. Part of #14304 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * docs(skills): regenerate skills index after the objectstack-api frontmatter edit Generator output only: `pnpm --filter @objectstack/spec gen:skill-docs` writes both files from the SKILL.md frontmatter, and `check:skill-docs` fails without this. The only change is API-A-02 dropping "versioning" from the description. Part of #14304 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * chore(gates): ratchet the role-word baseline down after API-C-03 `check:role-word` red on this branch with the ratchet-DOWN remedy: the file's one baselined occurrence of the reserved word was the Security Layers row `| **RBAC** | Object | Role-based access control (profile -> permissions) |`, deleted by API-C-03. The gate names `--update` as the author's own path when a baselined file goes clean, so the entry is dropped rather than left as budget a later edit could spend silently. Baseline 43 -> 42 files; the objectstack-api row is gone, no other row moves. Part of #14304 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a9b2be0 commit bae4088

4 files changed

Lines changed: 113 additions & 293 deletions

File tree

content/docs/ai/skills-reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ObjectStack ships **11 skills** — one per authoring domain, plus process skill
4949
| 4 | [UI](#ui) | `ui` | `skills/objectstack-ui/` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
5050
| 5 | [Automation](#automation) | `automation` | `skills/objectstack-automation/` | Design ObjectStack automation — Flows (visual logic), Triggers, Approvals, state machines, scheduled jobs, and webhooks. |
5151
| 6 | [AI](#ai) | `ai` | `skills/objectstack-ai/` | Design ObjectStack AI skills, tools, knowledge sources, conversations, model registry entries, and MCP integrations. |
52-
| 7 | [API](#api) | `api` | `skills/objectstack-api/` | Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |
52+
| 7 | [API](#api) | `api` | `skills/objectstack-api/` | Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch contracts. |
5353
| 8 | [i18n](#i18n) | `i18n` | `skills/objectstack-i18n/` | Author ObjectStack translation bundles — object/field labels, view text, app navigation strings, automation messages — and configure locale fallback, coverage reporting, and the per-locale source layout. |
5454
| 9 | [Formula](#formula) | `expression` | `skills/objectstack-formula/` | Author CEL expressions used across ObjectStack — formula fields, field conditional rules (`visibleWhen`, `readonlyWhen`, `requiredWhen`), validation / sharing / visibility predicates, flow conditions, and dynamic seed values. |
5555
| 10 | [PM Dispatch](#pm-dispatch) | `process` | `skills/objectstack-pm-dispatch/` | Run a project-manager dispatch loop over a GitHub backlog: triage and queue ready issues, claim each one, dispatch it to a parallel developer agent that returns a structured JSON report, review the results against GitHub, and drive accepted pull requests to landing — escalating to the maintainer only what genuinely needs a human decision. Ships the developer-agent operating template the loop injects into every dispatch (no custom agent types required). |
@@ -145,7 +145,7 @@ Do not use for general LLM prompting questions unrelated to ObjectStack metadata
145145

146146
**Domain** `api` · **Path** `skills/objectstack-api/`
147147

148-
Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts.
148+
Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch contracts.
149149

150150
Use when the user is adding `*.endpoint.ts`, configuring auth providers, defining custom routes, or extending the REST generator.
151151

scripts/role-word-baseline.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"content/docs/releases/v17.mdx": 2,
3535
"content/docs/ui/forms.mdx": 3,
3636
"skills/objectstack-ai/SKILL.md": 5,
37-
"skills/objectstack-api/SKILL.md": 1,
3837
"skills/objectstack-automation/SKILL.md": 1,
3938
"skills/objectstack-data/SKILL.md": 2,
4039
"skills/objectstack-data/rules/relationships.md": 1,

skills/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ apps too).
3535
| [UI](./objectstack-ui/SKILL.md) | `ui` | Author ObjectStack UI metadata — Views (list/form/kanban/calendar/gantt), Apps (navigation), Pages (structured plus the HTML and React source-authoring tiers, ADR-0080/0081), Dashboards, Reports, Charts, Actions, and package Docs (`src/docs/*.md`). |
3636
| [Automation](./objectstack-automation/SKILL.md) | `automation` | Design ObjectStack automation — Flows (visual logic), Triggers, Approvals, state machines, scheduled jobs, and webhooks. |
3737
| [AI](./objectstack-ai/SKILL.md) | `ai` | Design ObjectStack AI skills, tools, knowledge sources, conversations, model registry entries, and MCP integrations. |
38-
| [API](./objectstack-api/SKILL.md) | `api` | Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch/versioning contracts. |
38+
| [API](./objectstack-api/SKILL.md) | `api` | Design the server-side API surface that an ObjectStack runtime exposes — REST endpoints, auth providers, realtime channels, error envelopes, batch contracts. |
3939
| [i18n](./objectstack-i18n/SKILL.md) | `i18n` | Author ObjectStack translation bundles — object/field labels, view text, app navigation strings, automation messages — and configure locale fallback, coverage reporting, and the per-locale source layout. |
4040
| [Formula](./objectstack-formula/SKILL.md) | `expression` | Author CEL expressions used across ObjectStack — formula fields, field conditional rules (`visibleWhen`, `readonlyWhen`, `requiredWhen`), validation / sharing / visibility predicates, flow conditions, and dynamic seed values. |
4141
| [PM Dispatch](./objectstack-pm-dispatch/SKILL.md) | `process` | Run a project-manager dispatch loop over a GitHub backlog: triage and queue ready issues, claim each one, dispatch it to a parallel developer agent that returns a structured JSON report, review the results against GitHub, and drive accepted pull requests to landing — escalating to the maintainer only what genuinely needs a human decision. Ships the developer-agent operating template the loop injects into every dispatch (no custom agent types required). |

0 commit comments

Comments
 (0)