Skip to content

Commit c091666

Browse files
committed
docs(ai): use defineAction in the ADR-0109 example (doc-authoring guard, ADR-0059)
`check-doc-authoring.mjs` fails any bare metadata literal in a doc code block — the new Action → skill example wrote `export const X: Action = {}`. Switched to `defineAction({ ... })` with its import, which is the pattern the guard exists to teach. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHjroNkLkajskKbJaidko4
1 parent 6587c07 commit c091666

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

content/docs/ai/agents.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,11 @@ permissions, validation and audit are identical whether a human clicks or the
130130
assistant calls:
131131

132132
```typescript
133+
import { defineAction } from '@objectstack/spec/ui';
134+
import { defineSkill } from '@objectstack/spec/ai';
135+
133136
// 1. The Action you already have — opt it in to AI.
134-
export const ConvertLeadAction: Action = {
137+
export const ConvertLeadAction = defineAction({
135138
name: 'convert_lead',
136139
label: 'Convert Lead',
137140
objectName: 'crm_lead',
@@ -141,7 +144,7 @@ export const ConvertLeadAction: Action = {
141144
exposed: true, // ADR-0011 — opt-in, default off
142145
description: 'Converts a qualified lead into an account, contact and opportunity.',
143146
},
144-
};
147+
});
145148

146149
// 2. The skill names its materialised tool. No defineTool anywhere.
147150
export const LeadQualificationSkill = defineSkill({

0 commit comments

Comments
 (0)