Skip to content

Commit fc2acf0

Browse files
committed
fix(spec): stop routing automation authors at the ADR-0020-retired state machine
The published `objectstack-automation` index pointed at `automation/state-machine.zod.ts`. ADR-0020 retired that shape AS A RECORD-LIFECYCLE DECLARATION -- the top-level `workflow` metadata type and `object.stateMachines` are both gone -- and a record's legal transitions are now a `state_machine` validation rule in `data/validation.zod.ts`, which was already the last entry of the same list. So the index did not merely over-promise: it pointed at something the platform deliberately removed from this package's surface. The file's one surviving door is `ai/agent.zod.ts`'s `lifecycle`, an objectstack-ai door, and that index reaches it transitively. The other direction, from the same audit: the two per-node-type `config` schemas the body teaches were in no package's list at all. Screen `fields` and the ADR-0031 loop/parallel/try_catch containers reach `automation/builtin-node-config.zod.ts`; `NotifyConfigSchema` and the `http` `timeoutMs` reach `automation/io-node-config.zod.ts`. An agent told to always read the source for exact field shapes had no route to either. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2oQebDDxYKfWZusyd8GXk
1 parent 3e9e2f6 commit fc2acf0

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,23 @@ const SKILL_MAP: Record<string, string[]> = {
128128
'automation/flow.zod.ts',
129129
'automation/time-relative-trigger.zod.ts',
130130
'automation/approval.zod.ts',
131-
'automation/state-machine.zod.ts',
131+
// `automation/state-machine.zod.ts` left this list: ADR-0020 retired that
132+
// shape AS A RECORD-LIFECYCLE DECLARATION (the top-level `workflow` type
133+
// and `object.stateMachines` are both gone), and a record's legal
134+
// transitions are now a `state_machine` VALIDATION RULE — `data/validation`
135+
// below, already the correct destination. The file's one surviving door is
136+
// `ai/agent.zod.ts`'s `lifecycle`, an objectstack-ai door, and that index
137+
// reaches it transitively. Advertising it here pointed automation authors
138+
// at a shape the platform deliberately removed from their surface.
132139
'automation/execution.zod.ts',
133140
'automation/webhook.zod.ts',
134141
'automation/node-executor.zod.ts',
142+
// The per-node-type `config` shapes the body teaches and the index did not
143+
// name: screen `fields` and the ADR-0031 loop/parallel/try_catch containers
144+
// reach `builtin-node-config`, `NotifyConfigSchema` and the `http`
145+
// `timeoutMs` reach `io-node-config`.
146+
'automation/builtin-node-config.zod.ts',
147+
'automation/io-node-config.zod.ts',
135148
'data/validation.zod.ts',
136149
],
137150
'objectstack-ui': [

skills/objectstack-automation/references/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ from `node_modules` — there is no local copy in the skill bundle.
1010
## Core schemas
1111

1212
- `node_modules/@objectstack/spec/src/automation/approval.zod.ts` — Exports: ApproverType, ApprovalDecision, ApprovalNodeApproverSchema, DecisionOutputDefSchema, ApprovalEscalationSchema
13+
- `node_modules/@objectstack/spec/src/automation/builtin-node-config.zod.ts` — Config contracts for the remaining flat builtins — the CRUD quartet
1314
- `node_modules/@objectstack/spec/src/automation/execution.zod.ts` — Automation Execution Protocol
1415
- `node_modules/@objectstack/spec/src/automation/flow.zod.ts` — Exports: FlowNodeAction, FlowVariableSchema, FlowNodeSchema, FlowEdgeSchema, FlowSchema
16+
- `node_modules/@objectstack/spec/src/automation/io-node-config.zod.ts` — Config contracts for the flat IO builtins — `notify` and `http` (#4045).
1517
- `node_modules/@objectstack/spec/src/automation/node-executor.zod.ts` — Node Executor Plugin Protocol — Wait Node Pause/Resume
16-
- `node_modules/@objectstack/spec/src/automation/state-machine.zod.ts` — XState-inspired State Machine Protocol — hierarchical states, guarded
1718
- `node_modules/@objectstack/spec/src/automation/time-relative-trigger.zod.ts` — Time-Relative Trigger Protocol
1819
- `node_modules/@objectstack/spec/src/automation/webhook.zod.ts` — Exports: WebhookTriggerType, WebhookSchema
1920
- `node_modules/@objectstack/spec/src/data/validation.zod.ts` — ObjectStack Validation Protocol

0 commit comments

Comments
 (0)