Skip to content

Commit be3476f

Browse files
lessuselesslessuseless
authored andcommitted
Update docs to match 'ctx' parameter reduction
1 parent 3f2435d commit be3476f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Exactly five. No others.
2323
| `p-schema(id, fields)` | schema dict |
2424
| `p-checkpoint(id, after-step, assertion, on-fail)` | checkpoint dict |
2525
| `p-chat-mode(id, turns, state, prompt)` | chat-mode dict |
26-
| `p-prompt(id, version, role, context, constraints, steps, inputs, schema, checkpoints?)` | prompt dict |
26+
| `p-prompt(id, version, role, ctx, constraints, steps, inputs, schema, checkpoints?)` | prompt dict |
2727

2828
All constructors return plain Typst dictionaries. No rendering occurs at construction time.
2929

@@ -67,7 +67,7 @@ All renderers are pure functions. Same input always produces byte-identical outp
6767
id: "reply-to-ticket",
6868
version: "1.0.0",
6969
role: "You are a customer support agent.",
70-
context: ctx,
70+
ctx: ctx,
7171
constraints: ("Keep responses under 150 words.",),
7272
steps: ("Read the ticket.", "Draft a reply.", "Check tone."),
7373
inputs: ((name: "ticket", type: "string", description: "Raw ticket text."),),
@@ -121,7 +121,7 @@ Carries no runtime semantics. Structural declaration only.
121121
| id | string | yes |
122122
| version | string | yes |
123123
| role | string | yes |
124-
| context | context dict | yes |
124+
| ctx | context dict | yes |
125125
| constraints | array of string | yes, non-empty |
126126
| steps | array of string | yes, non-empty |
127127
| inputs | array of `(name, type, description)` | yes, non-empty |
@@ -140,7 +140,7 @@ Checkpoints are sorted at construction by `(after-step ASC, id ASC)`. Declaratio
140140
141141
## Role
142142
143-
## Context: {context.id}
143+
## Context: {ctx.id}
144144
145145
## Constraints
146146

src/primitives.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
// id: string — unique identifier
135135
// version: string — semver recommended, not enforced
136136
// role: string — system role declaration
137-
// context: context dictionary
137+
// ctx: context dictionary
138138
// constraints: array of string — non-empty, rendered as ordered list
139139
// steps: array of string — non-empty, rendered as ordered list, order preserved
140140
// inputs: array of (name: string, type: string, description: string) — non-empty

0 commit comments

Comments
 (0)