Skip to content

INTENT-1: union slot sets for .intent files#56

Merged
JarbasAl merged 1 commit into
devfrom
spec/intent-union-slots-required
Jun 26, 2026
Merged

INTENT-1: union slot sets for .intent files#56
JarbasAl merged 1 commit into
devfrom
spec/intent-union-slots-required

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jun 2, 2026

Copy link
Copy Markdown
Member

This PR relaxes the strict slot-consistency rule for .intent files and introduces an optional required_slots mechanism for template intents.

Changes

OVOS-INTENT-1

  • §5.5 — narrowed to .dialog only. .intent files now allow templates with different slot sets (union semantics). The engine extracts only the slots declared by the template that best matches.
  • §6.2 — engine obligation updated: verify consistent slot sets only for .dialog; accept differing slot sets for .intent.

OVOS-INTENT-3

  • §5.1 — removes the slot-consistency obligation for template intents.
  • §5.3 (new)required_slots: an optional list of slot names the engine MUST extract for a match to be valid. When present, handlers MAY rely on those slots being populated. A required slot must be declared by at least one template; otherwise the definition is malformed.
  • §7.1 — handler guarantee updated: handlers MAY rely on required_slots; all other slots remain optional and must be defensively handled.
  • §5.4/§5.5 — renumbered from former §5.3 (Example) and §5.4 (Suppression).

OVOS-INTENT-4

  • §6.1 — adds required_slots as an optional array-of-strings field to the ovos.intent.register.template payload.
  • §6.2 — rewrites the slot-consistency rule: consuming plugins MUST accept template registrations with differing slot sets across templates.
  • §6.3 — replaces the "slot sets differ" malformed rule with a required_slots malformed rule: a required slot not declared by any template is malformed.

OVOS-PIPELINE-1

  • §6.2 — adds orchestrator MUST backstop for required_slots. After the denylist check, the orchestrator verifies the match's slot map contains every required slot; if absent, it treats the match as declined. Primary enforcement remains engine-side during match(); the orchestrator is a second line of defense.
  • §6.1 flow diagram — adds the required_slots backstop step.

appendix/patterns.md

  • §3.4 — new section with authoring patterns for union slot sets and required_slots, including practical examples (one intent with multiple phrasing shapes, guaranteeing a slot, optional phrasings, and the .dialog strictness distinction).

Design rationale

  • Why relax §5.5? Padatious-like engines already match per-template and extract per-template. The strict consistency rule forced authors to split phrasings into separate files when slot sets differed, even when those phrasings represented the same command. Union semantics make authoring more natural.
  • Why not a locale file for required_slots? required_slots contains technical slot identifiers, not localized natural-language data. It is intent metadata, not a translatable resource, so it belongs in the bus registration payload (consistent with handler binding, enable/disable state, and other non-locale metadata).
  • Why not keyword intents? Keyword intents already have required vocabularies (§4.2) that serve an analogous role. required_slots is the template-intent counterpart, mirroring how .blacklist is template-only.
  • Why orchestrator MUST backstop? The orchestrator and pipeline plugins are co-located in the utterance-handling process and consume the same bus broadcasts. The orchestrator already actively gatekeeps with blacklisted_skills / blacklisted_intents; required_slots backstop is the same shape. This gives handlers the strongest guarantee regardless of engine bugs.

Cross-references updated

  • INTENT-4 §5.4 cross-reference to INTENT-3 §5.5 (suppression) corrected.
  • README spec index table unchanged (specs remain Draft, no version bump).

Companion design record: #57

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@JarbasAl, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 38 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d7c8168-308d-4338-b7d4-89bccb93c77f

📥 Commits

Reviewing files that changed from the base of the PR and between b7e16b9 and 71667bd.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • intent-1.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spec/intent-union-slots-required

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JarbasAl

Copy link
Copy Markdown
Member Author

Merge-ready (MERGEABLE, 0 commits behind dev). Fix applied: §5.4 (Suppression/.blacklist) in INTENT-3 was a duplicate heading — renumbered to §5.5 to match the cross-references that already used §5.5. All internal §-references across INTENT-3 and INTENT-4 are consistent. Version headers left at v2/v1/v1 per the Draft-freeze policy (commit 1fe29fc). Note: after #55 merges, GLOSSARY.md in this branch will need ovos-intent-*.md links updated to the short names.

JarbasAl added a commit that referenced this pull request Jun 22, 2026
…p version

§11 adds session-scoped registration. Make the spec internally consistent:
- §8.1 keyed intent replacement by a 4-element tuple missing 'method',
  contradicting the §11.1/§12 quintuple. State it as the quintuple
  (session_id, skill_id, intent_name, lang, method) for intents; entities
  keep the quadruple (no method axis).
- Unify the session-id reference to context.session.session_id (was the
  bracket form in §8.1/§11.1; §12 already used the dot form).
- Bump the spec header Version 1 -> 2 and reorder the CHANGELOG block
  newest-first as ### 2 (was a duplicate ### 1).

Note: #56 also bumps INTENT-4; whichever lands second renumbers to v3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JarbasAl added a commit that referenced this pull request Jun 22, 2026
…isten field

Consolidates the PIPELINE-1 companion edits previously bundled into the
union-slots (#56), FALLBACK-1 (#39), COMMON-QUERY-1 (#40) and AUDIO-1 (#38)
feature PRs into a single one-file change to ovos-pipeline-1.md.

- §6.1/§6.2 — orchestrator backstop for required_slots (INTENT-3 §5.3):
  the orchestrator treats a Match as declined if any required slot is
  absent. Second line of defense behind engine-side enforcement.
- §7.3 — reserve intent_names "fallback" (FALLBACK-1 §6.3) and
  "common_query" (COMMON-QUERY-1 §3). COMMON-QUERY-1 asserted the
  reservation but never registered the row; this closes that gap.
- §9.6 — add the OPTIONAL listen field to ovos.utterance.speak; the
  output-side behaviour is owned by AUDIO-1.

All additions are backwards-compatible. PIPELINE-1 is already V2 (its
namespaced topics replace the pre-spec names); these refinements do not
change the class, so the Version stays 2. Adds the missing PIPELINE-1
CHANGELOG section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JarbasAl JarbasAl changed the title INTENT-1 v3 / INTENT-3 v2 / INTENT-4 v2: union slot sets + optional required_slots INTENT-1: union slot sets for .intent files Jun 22, 2026
@JarbasAl JarbasAl force-pushed the spec/intent-union-slots-required branch 3 times, most recently from fa8c97a to 4430976 Compare June 23, 2026 05:21
@JarbasAl JarbasAl force-pushed the spec/intent-union-slots-required branch from 4430976 to 71667bd Compare June 26, 2026 20:06
@JarbasAl JarbasAl marked this pull request as ready for review June 26, 2026 20:55
@JarbasAl JarbasAl merged commit 8a04c6e into dev Jun 26, 2026
1 check was pending
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