Skip to content

Commit 1c14214

Browse files
claude[bot]claude
andauthored
fix(spec): reconcile the api and platform skill indexes with what their bodies teach (#15424)
* fix(spec): reconcile the api and platform skill indexes with what their bodies teach `SKILL_MAP['objectstack-api']` advertised `api/rest-server.zod.ts`, which the skill's authored markdown never teaches: nothing there names the file, `RestServerConfig` or any of its sub-configs, or the words "rest server", while every other core entry is reachable from the body by at least one exported name. An index entry is a POINTER, so that row sent an agent into `node_modules` for a lesson that does not exist. The schema keeps existing and stays importable. The other direction, same rule: `SKILL_MAP['objectstack-platform']` had no pointer to `stack.zod.ts`, the file declaring the body's main subject — it teaches `defineStack()` and names `ObjectStackDefinitionSchema`, `ObjectStackDefinition`, `ObjectStackDefinitionInput` and `ObjectStack` in its own prose. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox * fix(spec): constrain the platform skill index to the closure its body teaches `objectstack-platform` declared no `TRANSITIVE_ALLOWLIST`, so its index published the whole import closure of its core entries — 73 transitive pointers once `stack.zod.ts` joined the map. Most of them are shapes the SKILL.md never teaches, and two are shapes the platform retired from its surface, so the catalogue routed an authoring agent at lessons the body cannot give. Declare the list, populated by one mechanical rule and nothing else: a closure member stays only if `skills/objectstack-platform/SKILL.md` names one of that module's exported names, as an exact word-bounded identifier. Five of the 73 survive. The retired shapes fall out by the rule, not by hand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e13ede8 commit 1c14214

4 files changed

Lines changed: 26 additions & 27 deletions

File tree

‎packages/spec/scripts/build-skill-references.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ const SKILL_MAP: Record<string, string[]> = {
125125
'api/endpoint.zod.ts',
126126
'api/auth.zod.ts',
127127
'api/realtime.zod.ts',
128-
'api/rest-server.zod.ts',
128+
// `api/rest-server.zod.ts` left this list: the SKILL.md never teaches it.
129+
// Nothing in the skill's authored markdown names the file, `RestServerConfig`
130+
// or any of its sub-configs, or the words "rest server", while every other
131+
// core entry here is reachable from the body by at least one exported name.
132+
// An index entry is a POINTER, and pointing at a schema the body cannot help
133+
// with sends an agent into `node_modules` for a lesson that does not exist.
134+
// The schema keeps existing and stays importable; only the false promise goes.
129135
'api/websocket.zod.ts',
130136
'api/errors.zod.ts',
131137
'api/batch.zod.ts',
@@ -169,6 +175,12 @@ const SKILL_MAP: Record<string, string[]> = {
169175
],
170176
'objectstack-platform': [
171177
// project setup (was objectstack-quickstart)
178+
// The body's main subject: it teaches `defineStack()` and names
179+
// `ObjectStackDefinitionSchema`, `ObjectStackDefinition`,
180+
// `ObjectStackDefinitionInput` and `ObjectStack` in its own prose, while the
181+
// catalog had no pointer to the file that declares them. Taught, never
182+
// advertised -- the other direction of the same rule.
183+
'stack.zod.ts',
172184
'kernel/manifest.zod.ts',
173185
'data/datasource.zod.ts',
174186
'data/seed.zod.ts',

‎packages/spec/scripts/lib/skill-map-guards.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,15 @@ export function checkSingleOwner(map: SkillCoreMap, shared: Record<string, strin
231231
* whose face someone has actually read should carry one.
232232
*/
233233
export const TRANSITIVE_ALLOWLIST: Record<string, readonly string[]> = {
234+
// Kept iff `skills/objectstack-platform/SKILL.md` names one of the module's
235+
// exported names, as an exact word-bounded identifier.
236+
'objectstack-platform': [
237+
'data/field.zod.ts',
238+
'data/hook.zod.ts',
239+
'data/object.zod.ts',
240+
'security/rls.zod.ts',
241+
'ui/app.zod.ts',
242+
],
234243
// Everything else the closure reaches here is `strictObject()`'s error-message
235244
// machinery and what that drags behind it -- the Unified Query DSL among them,
236245
// a different skill's whole subject, shipped into every i18n session with an

‎skills/objectstack-api/references/_index.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ from `node_modules` — there is no local copy in the skill bundle.
1414
- `node_modules/@objectstack/spec/src/api/endpoint.zod.ts` — Exports: ApiMappingSchema, ApiEndpointSchema, ApiEndpoint
1515
- `node_modules/@objectstack/spec/src/api/errors.zod.ts` — Standardized Error Codes Protocol
1616
- `node_modules/@objectstack/spec/src/api/realtime.zod.ts` — Exports: TransportProtocol, RealtimeEventType, SubscriptionEventSchema, SubscriptionSchema, RealtimePresenceSchema
17-
- `node_modules/@objectstack/spec/src/api/rest-server.zod.ts` — REST API Server Protocol
1817
- `node_modules/@objectstack/spec/src/api/versioning.zod.ts` — API Versioning Protocol
1918
- `node_modules/@objectstack/spec/src/api/websocket.zod.ts` — WebSocket Event Protocol
2019

‎skills/objectstack-platform/references/_index.md‎

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,15 @@ from `node_modules` — there is no local copy in the skill bundle.
1818
- `node_modules/@objectstack/spec/src/kernel/plugin-loading.zod.ts` — Plugin Loading Protocol
1919
- `node_modules/@objectstack/spec/src/kernel/plugin.zod.ts` — Exports: PluginContextSchema, PluginSchema
2020
- `node_modules/@objectstack/spec/src/kernel/service-registry.zod.ts` — Service Registry Protocol
21+
- `node_modules/@objectstack/spec/src/stack.zod.ts` — Exports: DatasourceMappingRuleSchema, ArtifactPackageEntrySchema, AssembledPackageBodySchema, ArtifactPackageSchema, ObjectStackDefinitionSchema
2122

2223
## Transitive dependencies
2324

24-
- `node_modules/@objectstack/spec/src/api/errors.zod.ts` — Standardized Error Codes Protocol
25-
- `node_modules/@objectstack/spec/src/data/driver/common.zod.ts` — Shared building blocks for the per-driver `datasource.config` shapes.
26-
- `node_modules/@objectstack/spec/src/data/driver/config-registry.zod.ts` — The driver-id → `datasource.config` shape registry.
27-
- `node_modules/@objectstack/spec/src/data/driver/memory.zod.ts` — Memory Driver Configuration Schema
28-
- `node_modules/@objectstack/spec/src/data/driver/mongo.zod.ts` — MongoDB Standard Driver Protocol
29-
- `node_modules/@objectstack/spec/src/data/driver/mysql.zod.ts` — MySQL / MariaDB driver configuration — the `config` slot of a `datasource`
30-
- `node_modules/@objectstack/spec/src/data/driver/postgres.zod.ts` — PostgreSQL driver configuration — the `config` slot of a `datasource` whose
31-
- `node_modules/@objectstack/spec/src/data/driver/sqlite.zod.ts` — SQLite driver configuration — the `config` slot of a `datasource` whose
32-
- `node_modules/@objectstack/spec/src/data/driver/turso.zod.ts` — Turso / libSQL Driver Protocol.
33-
- `node_modules/@objectstack/spec/src/data/field-value.zod.ts` — Field runtime VALUE-shape contract (ADR-0104 D1).
3425
- `node_modules/@objectstack/spec/src/data/field.zod.ts` — Exports: FieldType, SelectOptionSchema, LocationCoordinatesSchema, CurrencyConfigSchema, CurrencyValueSchema
35-
- `node_modules/@objectstack/spec/src/data/filter.zod.ts` — Unified Query DSL Specification
36-
- `node_modules/@objectstack/spec/src/data/hook-body.zod.ts` — Exports: HookBodyCapability, ExpressionBodySchema, ScriptBodySchema, HookBodySchema
37-
- `node_modules/@objectstack/spec/src/kernel/cluster.zod.ts` — Cluster Protocol
38-
- `node_modules/@objectstack/spec/src/kernel/metadata-loader.zod.ts` — Metadata Manager Configuration
39-
- `node_modules/@objectstack/spec/src/kernel/metadata-protection.zod.ts` — Metadata Protection Model — Phase 1 (ADR-0010)
40-
- `node_modules/@objectstack/spec/src/shared/expression.zod.ts` — Expression Protocol
41-
- `node_modules/@objectstack/spec/src/shared/identifiers.zod.ts` — Exports: SystemIdentifierSchema, SnakeCaseIdentifierSchema, MetadataItemNameSchema
42-
- `node_modules/@objectstack/spec/src/shared/metadata-types.zod.ts` — Exports: MetadataFormatSchema, BaseMetadataRecordSchema
43-
- `node_modules/@objectstack/spec/src/shared/protection.zod.ts` — Package-level metadata protection (ADR-0010 §3.7 — Phase 4.3)
44-
- `node_modules/@objectstack/spec/src/shared/suggestions.zod.ts` — "Did you mean?" Suggestion Utilities
45-
- `node_modules/@objectstack/spec/src/shared/value-domain.zod.ts` — Standard value domains: one closed vocabulary and one membership predicate for settings and fields.
46-
- `node_modules/@objectstack/spec/src/system/tenant.zod.ts` — Tenant Schema (Multi-Tenant Architecture)
47-
- `node_modules/@objectstack/spec/src/ui/action-params.zod.ts` — The action DISPATCH contract: what the platform validates on the way in, and
48-
- `node_modules/@objectstack/spec/src/ui/action.zod.ts` — Exports: ActionParamSchema, ActionType, ActionLocationSchema, ActionAiSchema, ActionSchema
26+
- `node_modules/@objectstack/spec/src/data/hook.zod.ts` — Exports: HookEvent, HookSchema, HookContextSchema
27+
- `node_modules/@objectstack/spec/src/data/object.zod.ts` — Exports: ApiMethod, ApiOperationSchema, ObjectCapabilities, IndexSchema, TenancyConfigSchema
28+
- `node_modules/@objectstack/spec/src/security/rls.zod.ts` — Row-Level Security (RLS) Protocol
4929
- `node_modules/@objectstack/spec/src/ui/app.zod.ts` — Exports: ObjectNavItemSchema, DashboardNavItemSchema, PageNavItemSchema, UrlNavItemSchema, ReportNavItemSchema
50-
- `node_modules/@objectstack/spec/src/ui/i18n.zod.ts` — Display-label and ARIA-label primitives shared by every `ui/` shape.
5130

5231
## How to read these
5332

0 commit comments

Comments
 (0)