Skip to content

COMMON-QUERY-1: common query pipeline plugin specification#40

Draft
JarbasAl wants to merge 1 commit into
devfrom
spec/common-query
Draft

COMMON-QUERY-1: common query pipeline plugin specification#40
JarbasAl wants to merge 1 commit into
devfrom
spec/common-query

Conversation

@JarbasAl

@JarbasAl JarbasAl commented May 28, 2026

Copy link
Copy Markdown
Member

Companion issue: #41

Summary

Defines the common query pipeline plugin — a scatter-gather matcher that identifies question-like utterances, broadcasts them to registered question-answering skills, collects responses within a timed window, selects the best answer by confidence, and dispatches the winning skill to speak it.

What the spec covers

  • §3 — Plugin role (pure-matcher; Match.skill_id is the winning skill, never the plugin's own pipeline_id)
  • §4 — Question gate: binary accept/reject pre-filter before broadcast
  • §5 — Scatter-gather cycle: ovos.common_query.question broadcast, timed collection window, early termination, searching extension protocol
  • §6 — Skill-side question protocol: response shape with confidence score and answer-type metadata
  • §7 — Dispatch and Match construction: <winning_skill_id>:common_query.question
  • §8 — Answer-type metadata (advisory COSC labels)
  • §9 — Discovery: ovos.common_query.ping / ovos.common_query.pong
  • §11 — Pipeline positioning (after deterministic intents, before persona and fallback)
  • §13 — Conformance

Key design decisions

  • common_query.question is a skill-owned intent name, not a reserved name — skills register it via INTENT-4 and receive dispatch normally
  • Session blacklisting applies: session.blacklisted_skills excludes skills from the scatter-gather pool
  • Discovery follows PIPELINE-1 §10 pattern

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5933bc9-6eb4-4984-98c6-e28719cc0a6b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces a complete specification for the OVOS common query pipeline plugin, a scatter-gather pure matcher that broadcasts questions to registered skills, collects responses, filters by confidence and denylists, and dispatches the highest-confidence skill result.

Changes

OVOS Common Query Plugin Specification

Layer / File(s) Summary
Specification foundation and core concept
README.md, common-query.md (lines 1–131)
Adds a OVOS-COMMON-QUERY-1 index entry to the architecture specification catalog and introduces the plugin's scatter-gather matcher role, normative scope, reserved intent behavior, and pure-matcher return contract.
Question gating and scatter-gather cycle
common-query.md (lines 134–315)
Specifies the question gate as a binary filter for factual questions, defines the broadcast topic and skill response formats (searching, decline, final), ordered filtering by confidence and denylists, timing and extension rules with an absolute maximum window, and early termination semantics.
Skill protocol and dispatch construction
common-query.md (lines 318–432)
Documents skill-side subscription obligations, required response emission patterns, Match construction fields (intent_name, language, utterance, session), dispatch topic shape, and optional answer-type metadata as advisory hints.
Discovery, pipeline positioning, and conformance
common-query.md (lines 434–626)
Specifies ping/pong discovery, how the plugin discovers and maintains the known-skills set, pipeline positioning and tier behavior relative to intent classification, summarizes bus surface topics and MUST/SHOULD conformance obligations for both the plugin and participating skills, and lists related specifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Possibly related PRs

  • OpenVoiceOS/architecture#14: Both PRs document the pipeline plugin contract and pattern; the referenced PR establishes the general pipeline-plugin architectural model while this PR specifies a concrete implementation (common query) conforming to that model.

Poem

🐰 A scatter of queries flies far and wide,
Skills respond with confidence as their guide,
The fairest answer wins the race,
Pure matching finds its rightful place. 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a specification for the COMMON-QUERY-1 common query pipeline plugin, which aligns with the 626 lines of documentation added.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spec/common-query

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@common-query.md`:
- Around line 512-525: The fenced code block showing the session.pipeline array
lacks a language tag and triggers MD040; update the block by adding an
appropriate language identifier (e.g., yaml) to the opening fence so the block
containing session.pipeline and entries like "stop_high", "converse",
"template_high", "keyword_high", "common_query", "template_medium",
"keyword_medium", "fallback_medium", and "fallback_low" is labeled (for example
```yaml) to satisfy markdown linting and CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d0b9398a-e73f-4b3d-a606-d9d661489915

📥 Commits

Reviewing files that changed from the base of the PR and between cec6c7d and 88ba4a5.

📒 Files selected for processing (2)
  • README.md
  • common-query.md

Comment thread common-query.md
Comment on lines +512 to +525
```
session.pipeline: [
"stop_high", # interrupt
"converse", # active-handler poll
"template_high", # registered intents (high)
"keyword_high", # registered intents (high)
"common_query", # scatter-gather question answering
"template_medium",
"keyword_medium",
...
"fallback_medium",
"fallback_low"
]
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language to the fenced code block to satisfy markdown linting.

Line 512 uses an unlabeled fenced block, which triggers MD040 and may fail docs CI.

Proposed fix
-```
+```yaml
 session.pipeline: [
   "stop_high",           # interrupt
   "converse",            # active-handler poll
   "template_high",       # registered intents (high)
   "keyword_high",        # registered intents (high)
   "common_query",        # scatter-gather question answering
   "template_medium",
   "keyword_medium",
   ...
   "fallback_medium",
   "fallback_low"
 ]
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 512-512: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @common-query.md around lines 512 - 525, The fenced code block showing the
session.pipeline array lacks a language tag and triggers MD040; update the block
by adding an appropriate language identifier (e.g., yaml) to the opening fence
so the block containing session.pipeline and entries like "stop_high",
"converse", "template_high", "keyword_high", "common_query", "template_medium",
"keyword_medium", "fallback_medium", and "fallback_low" is labeled (for example

@JarbasAl JarbasAl marked this pull request as draft May 28, 2026 02:17
@JarbasAl JarbasAl changed the title COMMON-QUERY-1: common query pipeline plugin specification OVOS-COMMON-QUERY-1: Common Query Pipeline Plugin Specification May 28, 2026
@JarbasAl

Copy link
Copy Markdown
Member Author

Merge-readiness: resolved.

Conflicts resolved (commit 2154c4d):

  • README.md spec table: PR branch had added COMMON-QUERY-1 row; dev added AUDIO-IN-1. Kept both. Added FALLBACK-1 and BRIDGE-1 rows to complete the in-review index.

No semantic flags. Cross-references in common-query.md use spec IDs only (OVOS-MSG-1, OVOS-PIPELINE-1, OVOS-SESSION-1/2) — all resolve on current dev.

CI: no workflow files in repo.

Note on #55: If either filename-rename PR merges first, the common-query.md filename reference in README will need updating to match whatever canonical name is chosen.

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 OVOS-COMMON-QUERY-1: Common Query Pipeline Plugin Specification COMMON-QUERY-1: common query pipeline plugin specification Jun 22, 2026
@JarbasAl JarbasAl force-pushed the spec/common-query branch 3 times, most recently from a95b7e9 to 5163c1a Compare June 22, 2026 18:31
@JarbasAl JarbasAl force-pushed the spec/common-query branch from 5163c1a to eafea4a Compare June 23, 2026 05:19
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