fix(discovery): complete authorized plans and verify audible delivery

This commit is contained in:
zhouzheng
2026-10-14 02:12:47 +08:00
parent ccd7601cb2
commit 7318ce7f57
4 changed files with 10 additions and 8 deletions
@@ -1,4 +1,4 @@
export const DELIVERABLE_SKILL_CATALOG_VERSION = '2.1.7';
export const DELIVERABLE_SKILL_CATALOG_VERSION = '2.1.8';
/** Main deliverable catalog. Describes outputs; never a machine-plan admission gate. */
export const DELIVERABLE_SKILL_IDS = [
@@ -30,7 +30,7 @@ export const DELIVERABLE_SKILLS: readonly DeliverableSkillDefinition[] = [
{ id: 'webgl', title: 'WebGL', description: 'GPU, shaders, and interactive 3D delivered as real-time HTML.', version: '3.1.1', routes: [{ id: 'webgl-html', kind: 'interactive', extensions: ['html'] }] },
{ id: 'live-artifact', title: 'Live Artifact', description: 'Views that refresh from local JSON or connected data, including task lists and dashboards; register the actual source, then refresh the same artifact without rebuilding its template.', version: '3.1.4', routes: [{ id: 'live-artifact', kind: 'live', extensions: ['html'] }] },
{ id: 'video', title: 'Video', description: 'Playable video files; deliver MP4 after media generation or declared animation rendering completes.', version: '3.1.3', routes: [{ id: 'media-video', kind: 'video', extensions: ['mp4'] }] },
{ id: 'audio', title: 'Audio', description: 'Narration, music, and sound effects delivered as actual audio files through media interfaces.', version: '3.1.1', routes: [{ id: 'media-audio', kind: 'audio', extensions: ['mp3', 'wav', 'm4a', 'ogg'] }] },
{ id: 'audio', title: 'Audio', description: 'Narration, music, and sound effects delivered as actual audio files through media interfaces.', version: '3.1.2', routes: [{ id: 'media-audio', kind: 'audio', extensions: ['mp3', 'wav', 'm4a', 'ogg'] }] },
];
export function renderDeliverableSkillCatalog(skillRoot: string): string {
@@ -1,10 +1,12 @@
# OD Next Audio Task Profile v3.1.1
# OD Next Audio Task Profile v3.1.2
Deliver actual playable audio with route=media-audio and kind=audio; a script or prose is not audio. Resolve narration/music/sound-effect intent, language, duration, character or voice requirements, and output format first.
Use `"$OD_NODE_BIN" "$OD_BIN" media --help` and generate --help to confirm available models, audio-kind, and parameters. Do not guess model or voice IDs. Execute media generate --project "$OD_PROJECT_ID" --surface audio --model <available-model> --prompt <user-request> --output <planned-file>, supplying required parameters from tool help. Existing media permissions, configuration, and quotas still apply. Do not bypass services, request credentials, or print credentials.
If a taskId is returned, continue with media wait <taskId> --since <nextSince> until actual completion. Report failures and gaps while preserving other successful deliverables; silence is not a substitute for requested narration or music. Report completion only after tool success and the audio file exists. Do not invent playback checks or quality scores. Editing one specified audio file does not authorize remaking other deliverables.
If a taskId is returned, continue with media wait <taskId> --since <nextSince> until actual completion. A failed generation leaves that audio undelivered. Report the failure while preserving other successful deliverables; do not silently switch providers or substitute an ad-hoc synthesized file for a failed service. Use an alternative only when it is explicitly available or authorized for this run. An explicit request for locally synthesized audio may use local tools without a generation provider.
Before reporting completion, verify the actual audio file rather than just a task status, filename, successful encoder exit, or container duration. With available media tools, decode the file and check that it contains non-silent samples when the user requested audible speech, music, or sound effects. All-zero decoded samples are not a completed chime even if the MP3 has the right duration. An explicitly requested silent test file is the exception. If verification is unavailable or fails, state the gap instead of claiming the requested sound was delivered. This is a minimum delivery check, not aesthetic scoring or repeated optimization. Do not invent playback checks. Editing one specified audio file does not authorize remaking other deliverables.
During planning, query registered models with `"$OD_NODE_BIN" "$OD_BIN" media models --json`. Select an actual model ID matching the surface from the catalog and retain that choice internally. Use the same model in production; do not silently switch providers.
@@ -1,4 +1,4 @@
# OD Next Deliverable Discovery Task Profile v3.1.6
# OD Next Deliverable Discovery Task Profile v3.1.7
Select the main deliverable(s) from the current Query and applicable existing context, then read the corresponding production Skills. These are task-level selection rules: do not assume the user wants a prototype or require a new read on every turn. Reassess each turn for added or changed deliverables; a previous chat-only turn does not mean any production Skill has been read.
@@ -34,7 +34,7 @@ Choose the smallest set of production Skills that covers the independently reque
## OD Next integration
- Follow general orchestration when deciding whether to plan first. Make small edits directly; Discovery alone does not add a planning step. New or multiple deliverables require a completed planning turn before the host continues production. "Just do it" or "do not ask me" authorizes the work, not bypassing the host's two-turn flow.
- When planning is required, describe the goal, each deliverable, design direction, necessary steps, and actual dependencies in ordinary prose; no machine JSON is required. After completing the plan with user authorization to produce, use only the production-ready marker supplied by the host for this turn.
- When planning is required, describe the goal, each deliverable, design direction, necessary steps, and actual dependencies in ordinary prose; no machine JSON is required. A request to create the deliverables already authorizes production unless the user limits this turn to planning, discussion, or clarification. Once that plan is ready and no essential input is missing, end with the exact production-ready marker supplied by the host for this turn. This also applies to multiple outputs and template-based work: do not stop at the plan or wait for another confirmation merely because more than one Skill was selected. The host starts production after the planning turn ends; do not create the outputs in the planning turn itself.
- Production continuation reuses the previous plan and loaded rules. Complete requested deliverables in dependency order; multiple deliverables do not require parallel work or subagents.
- At completion, name the files actually generated, registered entry points, and remaining gaps. Preserve successful deliverables when another item fails; do not claim everything is complete.
- Necessary generation, waiting, rendering, and registration are production steps. A tool taskId, source code, or successful queue submission does not replace a finished media file or actual registration. Do not automatically add quality scoring or repeated optimization after production.
@@ -101,7 +101,7 @@
{
"taskType": "discovery",
"path": "./assets/task-profiles/discovery.md",
"version": "3.1.6",
"version": "3.1.7",
"rollout": "active",
"projectKinds": [
"generic"
@@ -145,7 +145,7 @@
},
{
"path": "./assets/task-profiles/audio.md",
"version": "3.1.1"
"version": "3.1.2"
},
{
"path": "./assets/task-profiles/prototype/device-frames/iphone.html",