Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ code per language — **pinned by the shared corpus**, not generated. See

## Versioning

- `schema_version` is a property of the **document** (currently `3`). Each
- `schema_version` is a property of the **document** (currently `4`). Each
version gets its own `schema/flow.vN.schema.json` and its own frozen
`conformance/vN/` corpus. Growth is additive; an unsupported version is
rejected, never silently migrated.
Expand Down
7 changes: 7 additions & 0 deletions conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ of the outbound gate, which includes the base validation. These cases stay
out of the top-level `valid/`/`invalid/` buckets because a flow refused for
outbound — one with a `ring` step, say — is a perfectly good inbound flow.

`fill/` pins `fill` (flow variables): per case, `<case>.input.yaml` (a v4 flow
that passes `validate_outbound`), `<case>.values.json` (the caller's values),
and either `<case>.expected.yaml` (the filled flow, compared after canonical
serialization) or `<case>.expected.json` = `{"errors": [codes]}` (the exact
refusal). A filled flow is a `schema_version: 3` document: both suites also
check that it passes `validate_outbound` on its own and reads back as itself.

Every `<case>.yaml` has a sibling `<case>.expected.json`:

```json
Expand Down
10 changes: 10 additions & 0 deletions conformance/canonical/prompt-template.canonical.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version: 4
id: flow_template_canon
name: Voiced with defaults
variables:
name: { default: there }
entry: ask
nodes:
ask:
kind: hangup
prompt: { audio: vprompt_abc123, transcript: Hi there, template: "Hi {{name}}" }
4 changes: 4 additions & 0 deletions conformance/canonical/prompt-template.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "An audio prompt that keeps its `template` writes it after `transcript` (`audio`, `transcript`, `template`), the schema property order.",
"comments": 0
}
10 changes: 10 additions & 0 deletions conformance/canonical/prompt-template.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version: 4
name: Voiced with defaults
id: flow_template_canon
entry: ask
variables:
name: { default: there }
nodes:
ask:
kind: hangup
prompt: { template: "Hi {{name}}", transcript: Hi there, audio: vprompt_abc123 }
11 changes: 11 additions & 0 deletions conformance/canonical/variables.canonical.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
schema_version: 4
id: flow_vars_canon
name: Ask a question
variables:
question: { description: The question, default: Ready?, max_len: 300 }
note_to_self: { default: "" }
entry: ask
nodes:
ask:
kind: hangup
prompt: "{{question}}"
4 changes: 4 additions & 0 deletions conformance/canonical/variables.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "Top-level `variables` is written right after `note` and before `entry`, each variable in schema property order (`description`, `default`, `max_len`). A `max_len` equal to its default (200) is dropped; an empty `default` is a value, and it stays.",
"comments": 1
}
12 changes: 12 additions & 0 deletions conformance/canonical/variables.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Variables, written out of order and with defaults spelled out.
schema_version: 4
name: Ask a question
id: flow_vars_canon
entry: ask
variables:
question: { max_len: 300, default: Ready?, description: The question }
note_to_self: { max_len: 200, default: "" }
nodes:
ask:
kind: hangup
prompt: "{{question}}"
1 change: 1 addition & 0 deletions conformance/fill/all-options-dropped.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"errors":["menu_without_options"]}
16 changes: 16 additions & 0 deletions conformance/fill/all-options-dropped.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
schema_version: 4
id: flow_all_options_dropped
name: Every option optional
entry: ask
variables:
option1: { description: Answer for key 1, default: "", max_len: 80 }
option2: { description: Answer for key 2, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "Pick one.{{#option1}} Press 1 for {{option1}}.{{/option1}}{{#option2}} Press 2 for {{option2}}.{{/option2}}"
options: { "1": "{{option1}}", "2": "{{option2}}" }
exits: { "1": bye, "2": bye, no_input: bye, invalid: bye }
bye:
kind: hangup
prompt: Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/all-options-dropped.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 8 additions & 0 deletions conformance/fill/audio-kept.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version: 3
id: flow_audio
name: Audio template
entry: hi
nodes:
hi:
kind: hangup
prompt: { audio: vprompt_a }
10 changes: 10 additions & 0 deletions conformance/fill/audio-kept.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version: 4
id: flow_audio
name: Audio template
entry: hi
variables:
name: { default: there }
nodes:
hi:
kind: hangup
prompt: { audio: vprompt_a, template: "Hi {{name}}" }
1 change: 1 addition & 0 deletions conformance/fill/audio-kept.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 8 additions & 0 deletions conformance/fill/audio-text.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version: 3
id: flow_audio
name: Audio template
entry: hi
nodes:
hi:
kind: hangup
prompt: Hi Ann
10 changes: 10 additions & 0 deletions conformance/fill/audio-text.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version: 4
id: flow_audio
name: Audio template
entry: hi
variables:
name: { default: there }
nodes:
hi:
kind: hangup
prompt: { audio: vprompt_a, template: "Hi {{name}}" }
1 change: 1 addition & 0 deletions conformance/fill/audio-text.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Ann"}
18 changes: 18 additions & 0 deletions conformance/fill/blank-unicode.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema_version: 3
id: flow_ask_question
name: Ask a question
entry: ask
nodes:
ask:
kind: menu
prompt: "Claude has a question. Claude needs your input on screen. Press 1 for Yes. Press 2 for No. Press 9 to hear this again."
options: { "1": "Yes", "2": "No", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
25 changes: 25 additions & 0 deletions conformance/fill/blank-unicode.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
schema_version: 4
id: flow_ask_question
name: Ask a question
entry: ask
variables:
intro: { description: Who is asking, default: "Claude has a question." , max_len: 120 }
question: { description: The question, default: "Claude needs your input on screen.", max_len: 300 }
option1: { description: Answer for key 1, default: "Yes", max_len: 80 }
option2: { description: Answer for key 2, default: "No", max_len: 80 }
option3: { description: Answer for key 3, default: "", max_len: 80 }
option4: { description: Answer for key 4, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "{{intro}} {{question}} Press 1 for {{option1}}. Press 2 for {{option2}}.{{#option3}} Press 3 for {{option3}}.{{/option3}}{{#option4}} Press 4 for {{option4}}.{{/option4}} Press 9 to hear this again."
options: { "1": "{{option1}}", "2": "{{option2}}", "3": "{{option3}}", "4": "{{option4}}", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "3": thanks, "4": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/blank-unicode.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"question":"\ufeff \u0085\u00a0\u2003"}
18 changes: 18 additions & 0 deletions conformance/fill/defaults.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema_version: 3
id: flow_ask_question
name: Ask a question
entry: ask
nodes:
ask:
kind: menu
prompt: "Claude has a question. Claude needs your input on screen. Press 1 for Yes. Press 2 for No. Press 9 to hear this again."
options: { "1": "Yes", "2": "No", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
25 changes: 25 additions & 0 deletions conformance/fill/defaults.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
schema_version: 4
id: flow_ask_question
name: Ask a question
entry: ask
variables:
intro: { description: Who is asking, default: "Claude has a question." , max_len: 120 }
question: { description: The question, default: "Claude needs your input on screen.", max_len: 300 }
option1: { description: Answer for key 1, default: "Yes", max_len: 80 }
option2: { description: Answer for key 2, default: "No", max_len: 80 }
option3: { description: Answer for key 3, default: "", max_len: 80 }
option4: { description: Answer for key 4, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "{{intro}} {{question}} Press 1 for {{option1}}. Press 2 for {{option2}}.{{#option3}} Press 3 for {{option3}}.{{/option3}}{{#option4}} Press 4 for {{option4}}.{{/option4}} Press 9 to hear this again."
options: { "1": "{{option1}}", "2": "{{option2}}", "3": "{{option3}}", "4": "{{option4}}", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "3": thanks, "4": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/defaults.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 13 additions & 0 deletions conformance/fill/dropped-option-only-path.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
schema_version: 3
id: flow_dropped_path
name: An option with its own ending
entry: ask
nodes:
ask:
kind: menu
prompt: "Press 1 for yes. Press 2 for no."
options: { "1": "Yes", "2": "No" }
exits: { "1": thanks, "2": thanks, no_input: thanks, invalid: thanks }
thanks:
kind: hangup
prompt: Thanks. Goodbye.
18 changes: 18 additions & 0 deletions conformance/fill/dropped-option-only-path.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema_version: 4
id: flow_dropped_path
name: An option with its own ending
entry: ask
variables:
option3: { description: Answer for key 3, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "Press 1 for yes. Press 2 for no.{{#option3}} Press 3 for {{option3}}.{{/option3}}"
options: { "1": "Yes", "2": "No", "3": "{{option3}}" }
exits: { "1": thanks, "2": thanks, "3": only3, no_input: thanks, invalid: thanks }
only3:
kind: hangup
prompt: You picked the third answer. Goodbye.
thanks:
kind: hangup
prompt: Thanks. Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/dropped-option-only-path.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
18 changes: 18 additions & 0 deletions conformance/fill/option3.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema_version: 3
id: flow_ask_question
name: Ask a question
entry: ask
nodes:
ask:
kind: menu
prompt: "Claude has a question. Claude needs your input on screen. Press 1 for Yes. Press 2 for No. Press 3 for Both. Press 9 to hear this again."
options: { "1": "Yes", "2": "No", "3": Both, "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "3": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
25 changes: 25 additions & 0 deletions conformance/fill/option3.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
schema_version: 4
id: flow_ask_question
name: Ask a question
entry: ask
variables:
intro: { description: Who is asking, default: "Claude has a question." , max_len: 120 }
question: { description: The question, default: "Claude needs your input on screen.", max_len: 300 }
option1: { description: Answer for key 1, default: "Yes", max_len: 80 }
option2: { description: Answer for key 2, default: "No", max_len: 80 }
option3: { description: Answer for key 3, default: "", max_len: 80 }
option4: { description: Answer for key 4, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "{{intro}} {{question}} Press 1 for {{option1}}. Press 2 for {{option2}}.{{#option3}} Press 3 for {{option3}}.{{/option3}}{{#option4}} Press 4 for {{option4}}.{{/option4}} Press 9 to hear this again."
options: { "1": "{{option1}}", "2": "{{option2}}", "3": "{{option3}}", "4": "{{option4}}", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "3": thanks, "4": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/option3.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"option3":"Both"}
1 change: 1 addition & 0 deletions conformance/fill/prompt-too-long.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"errors":["prompt_too_long"]}
10 changes: 10 additions & 0 deletions conformance/fill/prompt-too-long.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version: 4
id: flow_prompt_too_long
name: A prompt that grows past the limit
entry: say
variables:
detail: { description: Read out five times, default: "", max_len: 500 }
nodes:
say:
kind: hangup
prompt: "{{detail}} {{detail}} {{detail}} {{detail}} {{detail}}"
1 change: 1 addition & 0 deletions conformance/fill/prompt-too-long.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"detail": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
1 change: 1 addition & 0 deletions conformance/fill/too-long.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"errors":["variable_too_long"]}
25 changes: 25 additions & 0 deletions conformance/fill/too-long.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
schema_version: 4
id: flow_ask_question
name: Ask a question
entry: ask
variables:
intro: { description: Who is asking, default: "Claude has a question." , max_len: 120 }
question: { description: The question, default: "Claude needs your input on screen.", max_len: 300 }
option1: { description: Answer for key 1, default: "Yes", max_len: 80 }
option2: { description: Answer for key 2, default: "No", max_len: 80 }
option3: { description: Answer for key 3, default: "", max_len: 80 }
option4: { description: Answer for key 4, default: "", max_len: 80 }
nodes:
ask:
kind: menu
prompt: "{{intro}} {{question}} Press 1 for {{option1}}. Press 2 for {{option2}}.{{#option3}} Press 3 for {{option3}}.{{/option3}}{{#option4}} Press 4 for {{option4}}.{{/option4}} Press 9 to hear this again."
options: { "1": "{{option1}}", "2": "{{option2}}", "3": "{{option3}}", "4": "{{option4}}", "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "3": thanks, "4": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
1 change: 1 addition & 0 deletions conformance/fill/too-long.values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"question": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
18 changes: 18 additions & 0 deletions conformance/fill/two-options.expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema_version: 3
id: flow_ask_question
name: Ask a question
entry: ask
nodes:
ask:
kind: menu
prompt: "Claude has a question. Which database? Press 1 for Postgres. Press 2 for SQLite. Press 9 to hear this again."
options: { "1": Postgres, "2": SQLite, "9": Repeat }
retries: 2
timeout_secs: 8
exits: { "1": thanks, "2": thanks, "9": ask, no_input: bye, invalid: bye }
thanks:
kind: hangup
prompt: Got it, thanks. Goodbye.
bye:
kind: hangup
prompt: No answer recorded. The question will wait on screen. Goodbye.
Loading
Loading