Skip to content

feat(catalogs): add experimental v1.0 decision layout grammar and basic catalog patterns - #4153

Closed
gspencergoog wants to merge 5 commits into
mainfrom
feat/decision-catalogs
Closed

gspencergoog wants to merge 5 commits into
mainfrom
feat/decision-catalogs

Conversation

@gspencergoog

@gspencergoog gspencergoog commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the experimental layout grammar (catalogs/decision/v1/) and Basic Catalog v1.0 recipes (catalogs/basic/v1/patterns.json) for the decision inference format. Both schemas and data files use unpublished schema identifiers under https://a2ui.org/specification/inference_formats/experimental/decision/v1/, carry grammarVersion fields, and mark themselves as experimental, non-normative Python assets.

Reviewer Focus

  • catalogs/decision/v1/archetype_definition.json and catalogs/decision/v1/archetypes.json: inspect Stage 1 (job) and Stage 2 (anatomy, salience, instance) questions and thresholds. The collection block's icon slot accepts only icon-typed pointers, so domain enums (dietary tags, statuses) route to badge or meta instead of rendering as icon names.
  • catalogs/decision/v1/pattern_definition.json: inspect the experimental $id namespace (https://a2ui.org/specification/inference_formats/experimental/decision/v1/), the single catalogId header, grammarVersion, $event slot resolution ($slot, $default), $actionContext rules, and the $format directive (formatDirective: a slot plus optional kind and template) that lets a recipe ask the expander for formatCurrency, formatNumber, or formatString when the catalog declares them.
  • catalogs/basic/v1/patterns.json: check the Basic Catalog v1.0 recipes, $if guards on item_img and prose_body, $format on headline, facts, steps, and collection item_meta, and $actionContext bindings on collection items.

Changes

  • Add catalogs/decision/v1/archetype_definition.json and catalogs/decision/v1/archetypes.json defining layout families (inform, choose, input, act, settings), archetypes, slots, and thresholds, with $id / $schema under https://a2ui.org/specification/inference_formats/experimental/decision/v1/.
  • Add catalogs/decision/v1/pattern_definition.json defining the JSON Schema for catalog pattern files, pinned to one v1.0 catalogId and grammarVersion: "1", including the $format directive.
  • Add catalogs/basic/v1/patterns.json mapping decision blocks (headline, facts, collection, form, actions, groups, prose, steps) to Basic Catalog v1.0 components. prose renders a heading without a body (so a section heading can stand alone), and headline_value uses $format with a ### {value} template because Basic Text.variant has no heading levels.
  • Add catalogs/decision/README.md and update catalogs/README.md to document the directory layout and experimental status.

Impact & Risks

  • Purely additive under catalogs/. Existing v0.8, v0.9, v0.9.1, and v1.0 protocol schemas and Basic Catalog component definitions are unchanged.
  • Schema $id URLs live under the experimental namespace and are unpublished identifiers only.
  • Pattern recipes target A2UI v1.0 (https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json). Pre-1.0 catalogs are out of scope for the decision format.

Testing

  • Check catalogs/decision/v1/archetypes.json against catalogs/decision/v1/archetype_definition.json with Draft 2020-12 JSON Schema validation.
  • Check catalogs/basic/v1/patterns.json against catalogs/decision/v1/pattern_definition.json and check that every referenced component exists in catalogs/basic/v1/catalog.json.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Docs Site Preview Removed

The preview for PR #4153 has been cleaned up because the pull request is closed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the experimental decision layout grammar and catalog patterns, adding schemas, archetypes, and documentation under catalogs/decision/v1/, alongside the basic catalog's pattern implementation in catalogs/basic/v1/patterns.json. Feedback on the changes highlights a critical schema validation issue in patterns.json where @call is incorrectly written as call in a condition check. Additionally, it is recommended to consistently implement the checks block across all input field variants in patterns.json to enforce the required constraint uniformly.

Comment thread catalogs/basic/v1/patterns.json Resolved
Comment thread catalogs/basic/v1/patterns.json Resolved
github-actions Bot added a commit that referenced this pull request Nov 11, 2026
github-actions Bot added a commit that referenced this pull request Nov 12, 2026
@gspencergoog
gspencergoog force-pushed the feat/decision-catalogs branch from 68590c4 to 7577cf4 Compare November 13, 2026 22:50
github-actions Bot added a commit that referenced this pull request Nov 13, 2026
github-actions Bot added a commit that referenced this pull request Nov 16, 2026
github-actions Bot added a commit that referenced this pull request Nov 16, 2026
@gspencergoog
gspencergoog marked this pull request as ready for review November 16, 2026 21:59
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
@gspencergoog
gspencergoog added this pull request to stack #4287 November 18, 2026 17:45
gspencergoog added a commit that referenced this pull request Nov 18, 2026
…ic catalog patterns

Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-catalogs).

PR: #4153
@gspencergoog
gspencergoog force-pushed the feat/decision-catalogs branch from ccf0f9a to 437e44b Compare November 18, 2026 17:48
gspencergoog added a commit that referenced this pull request Nov 18, 2026
…ic catalog patterns

Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-catalogs).

PR: #4153
@gspencergoog
gspencergoog force-pushed the feat/decision-catalogs branch from 437e44b to 4ca38f3 Compare November 18, 2026 20:43
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
github-actions Bot added a commit that referenced this pull request Nov 19, 2026
…ic catalog patterns

Squashed from the stacked branch history (backup: refs/backups/pre-squash-20261118/feat/decision-catalogs).

PR: #4153
…namespace

Move the decision archetype and pattern JSON Schema $id and $schema URLs from https://a2ui.org/specification/v1_0/decision/ to https://a2ui.org/specification/inference_formats/experimental/decision/v1/ so the experimental schemas stay outside the normative v1.0 specification namespace.

Signed-off-by: Greg Spencer <gspencer@google.com>
…tion schema

- Allow {$action: <slot>} in eventDirective via oneOf and remove stale $switch text in pattern_definition.json.
- Guard unbound optional slots in Basic v1 patterns.json (compose.draft, collection rows picture, headline.label, filters search, and form ChoicePicker options).
- Document the $format directive in catalogs/decision/README.md.

Signed-off-by: Greg Spencer <gspencer@google.com>
- Remove unimplemented duration kind from formatDirective schema and catalogs/decision/README.md.

- Restore $if: query guard on filters_search in Basic v1 patterns.json.

Signed-off-by: Greg Spencer <gspencer@google.com>
@gspencergoog
gspencergoog force-pushed the feat/decision-catalogs branch from dc3680c to 40944f5 Compare November 24, 2026 18:01
github-actions Bot added a commit that referenced this pull request Nov 24, 2026
github-actions Bot added a commit that referenced this pull request Nov 24, 2026
@gspencergoog
gspencergoog marked this pull request as draft November 30, 2026 23:51
@gspencergoog

Copy link
Copy Markdown
Collaborator Author

Superseded by #4513 (re-stacked onto #4471-#4496 in stack #4501).

🤖 Agent-generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant