Skip to content

Commit f318438

Browse files
committed
fix schema picoschema examples
1 parent 48e992c commit f318438

4 files changed

Lines changed: 42 additions & 24 deletions

File tree

content/5.concepts/6.schema-system.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ Keep a simple task list without a separate project management tool.
126126
```yaml
127127
schema:
128128
title: string, what needs to be done
129-
status(enum): [todo, in-progress, done], current state
130-
priority?(enum): [low, medium, high], how urgent
129+
status(enum, current state): [todo, in-progress, done]
130+
priority?(enum, how urgent): [low, medium, high]
131131
due_date?: string, target completion date
132132
belongs_to?: Project, related project
133-
blocked_by?(array): Task, dependencies
133+
blocked_by?(array, dependencies): Task
134134
```
135135
136136
**Then use it naturally:**
@@ -150,11 +150,11 @@ Capture decisions and action items so they don't get lost in a wall of text.
150150
```yaml
151151
schema:
152152
date: string, when the meeting happened
153-
attendees(array): string, who was there
153+
attendees(array, who was there): string
154154
summary?: string, brief overview
155-
decisions?(array): string, what was agreed on
156-
action_items?(array): string, follow-up tasks
157-
relates_to?(array): Project, projects discussed
155+
decisions?(array, what was agreed on): string
156+
action_items?(array, follow-up tasks): string
157+
relates_to?(array, projects discussed): Project
158158
```
159159
160160
**Then use it naturally:**
@@ -174,9 +174,9 @@ Organize what you're learning about a topic — articles, key takeaways, open qu
174174
schema:
175175
topic: string, what this research is about
176176
source?: string, where the information came from
177-
findings?(array): string, key takeaways
178-
questions?(array): string, open questions or things to explore
179-
relates_to?(array): Research, connected research notes
177+
findings?(array, key takeaways): string
178+
questions?(array, open questions or things to explore): string
179+
relates_to?(array, connected research notes): Research
180180
supports?: Hypothesis, hypothesis this evidence supports
181181
```
182182
@@ -198,9 +198,9 @@ schema:
198198
cuisine?: string, type of cuisine
199199
servings?: integer, how many it feeds
200200
prep_time?: string, how long to prepare
201-
ingredients(array): string, what you need
202-
steps(array): string, how to make it
203-
notes?(array): string, personal tweaks and observations
201+
ingredients(array, what you need): string
202+
steps(array, how to make it): string
203+
notes?(array, personal tweaks and observations): string
204204
inspired_by?: Recipe, adapted from another recipe
205205
```
206206
@@ -269,14 +269,21 @@ When a type name is capitalized (like `Organization`), it signals an entity refe
269269

270270
#### Descriptions
271271

272-
Add a description after a comma to document what the field means:
272+
Add a description after a comma to document what a plain field means:
273273

274274
```yaml
275275
name: string, full legal name
276276
role?: string, current job title or position
277277
works_at?: Organization, primary employer
278278
```
279279

280+
For fields with modifiers like `array`, `enum`, or `object`, put the description inside the parentheses after the modifier:
281+
282+
```yaml
283+
expertise?(array, areas of knowledge): string
284+
status?(enum, current relationship status): [active, inactive, alumni]
285+
```
286+
280287
#### Complete annotated example
281288

282289
```yaml
@@ -285,8 +292,8 @@ schema:
285292
role?: string, current job title
286293
email?: string, primary contact email
287294
works_at?: Organization, primary employer
288-
expertise?(array): string, areas of knowledge
289-
status?(enum): [active, inactive, alumni], current relationship status
295+
expertise?(array, areas of knowledge): string
296+
status?(enum, current relationship status): [active, inactive, alumni]
290297
contact_info?(object):
291298
phone?: string
292299
location?: string
@@ -315,7 +322,7 @@ schema:
315322
role?: string, job title
316323
email?: string, contact email
317324
works_at?: Organization, employer
318-
expertise?(array): string, areas of knowledge
325+
expertise?(array, areas of knowledge): string
319326
settings:
320327
validation: warn
321328
---
@@ -351,10 +358,10 @@ Useful for one-off structure or prototyping before committing to a reusable sche
351358
title: Team Standup 2026-02-10
352359
type: meeting
353360
schema:
354-
attendees(array): string, participants
355-
decisions?(array): string, outcomes
356-
blockers?(array): string, unresolved issues
357-
action_items?(array): string, follow-up tasks
361+
attendees(array, participants): string
362+
decisions?(array, outcomes): string
363+
blockers?(array, unresolved issues): string
364+
action_items?(array, follow-up tasks): string
358365
---
359366
```
360367

@@ -538,7 +545,7 @@ schema:
538545
role?: string, job title
539546
email?: string, contact email
540547
works_at?: Organization, employer
541-
expertise?(array): string, areas of knowledge
548+
expertise?(array, areas of knowledge): string
542549
settings:
543550
validation: warn
544551
frontmatter:

content/7.how-to/1.project-documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ schema:
6060
status: string, current decision status
6161
context: string, background and problem statement
6262
decision: string, what was decided
63-
consequences?(array): string, outcomes of the decision
63+
consequences?(array, outcomes of the decision): string
6464
supersedes?: ADR, previous decision this replaces
6565
settings:
6666
validation: warn

content/8.reference/3.ai-assistant-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ schema:
589589
name: string, full legal name
590590
role?: string, current job title
591591
works_at?: Organization, primary employer
592-
expertise?(array): string, areas of knowledge
592+
expertise?(array, areas of knowledge): string
593593
settings:
594594
validation: warn
595595
---

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)