{"schemaVersion":1,"id":"recommended.sm-quality-audit","version":"1.0.0","name":"Quality review plan workflow","description":"An editable production workflow using Quality review plan v1.0.0.","stages":[{"id":"main","blockId":"sm.quality-audit","version":"1.0.0","label":"Quality review plan"}],"connections":[],"packages":[{"manifest":{"schemaVersion":1,"sdkVersion":"0.1.0","id":"sm.quality-audit","version":"1.0.0","name":"Quality review plan","description":"Prepare a bounded visual quality review for exact saved asset versions before final export.","kind":"task","runtime":"javascript","entry":"src/run.js","license":"MIT","provenance":{"notice":"Original source (authorship declared by the packager)\nLicense: MIT\nChanges: Original implementation declared by the packager; no reused repository or dependency code.\nFiles: LICENSE, src/run.js, src/view.json\n\nMIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","portableSources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/run.js","src/view.json"],"evidence":["upstream/0/LICENSE","upstream/0/src/run.js","upstream/0/src/view.json"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}]},"inputs":{"assets":{"type":"asset[]","context":"assets","primary":true,"description":"One to sixteen saved image asset versions."}},"outputs":{"plan":{"type":"metadata","primary":true,"description":"Exact image.describe calls for review and receipt settlement."}},"permissions":{"project":["context.assets.read","asset.read"],"network":[],"filesystem":[],"secrets":[]},"ui":[],"platforms":{"phone":{"supported":true},"browser":{"supported":true},"desktop":{"supported":true}}},"code":"const assets=input.assets.filter(asset=>asset&&asset.kind==='image'&&typeof asset.assetId==='string'&&typeof asset.versionId==='string').slice(0,16);\nif(!assets.length)throw new Error('Select at least one saved image asset.');\nconst seen=[];\nfor(const asset of assets){const key=asset.assetId+':'+asset.versionId;if(seen.includes(key))throw new Error('Choose distinct image versions.');seen.push(key);}\nreturn {plan:{schemaVersion:1,operation:'multi-asset-quality',title:'Quality review for '+String(assets.length)+' image'+(assets.length===1?'':'s'),calls:assets.map((asset,index)=>({index,operation:'image.describe',asset:{kind:'image',assetId:asset.assetId,versionId:asset.versionId,url:asset.url},instruction:'Assess visible defects, legibility, continuity, composition, and production readiness. Return evidence, not a replacement asset.'}))}};\n","view":{"html":"<main><header><small>Preflight</small><h1>Quality review</h1><p>Check every selected image version before export.</p></header><section><h2 id=\"count\">No images selected</h2><p id=\"detail\">Add saved images to this Block to prepare the review.</p><button id=\"run\" type=\"button\">Prepare quality review</button><output id=\"status\" role=\"status\"></output></section></main>\n","css":"main{max-width:680px;margin:0 auto;padding:18px;color:var(--fg)}header,section{padding:18px;border:1px solid var(--border-tok);border-radius:var(--r-3);background:var(--bg-elev-1)}header{margin-bottom:14px}h1,h2{margin:4px 0 8px}p,small,output{color:var(--fg-muted)}button{margin-top:12px}output{display:block;min-height:24px;margin-top:12px}\n","javascript":"const count=document.getElementById('count'),detail=document.getElementById('detail'),button=document.getElementById('run'),status=document.getElementById('status');let assets=[];StillMade.onInput(values=>{assets=values.assets||[];count.textContent=String(assets.length)+' image version'+(assets.length===1?'':'s');detail.textContent=assets.length?'The review stays pinned to these exact saved versions.':'Add saved images to this Block to prepare the review.';button.disabled=!assets.length});button.addEventListener('click',async()=>{button.disabled=true;status.textContent='Preparing the review…';try{const result=await StillMade.run({assets});status.textContent=String(result.plan.calls.length)+' image checks are ready to run and retain.'}catch(error){status.textContent=error.message||'The review could not be prepared.'}finally{button.disabled=!assets.length}});\n"},"tests":[{"name":"one exact version","input":{"assets":[{"kind":"image","assetId":"asset-a","versionId":"v1","url":"/api/media/a"}]},"expected":{"plan":{"schemaVersion":1,"operation":"multi-asset-quality","title":"Quality review for 1 image","calls":[{"index":0,"operation":"image.describe","asset":{"kind":"image","assetId":"asset-a","versionId":"v1","url":"/api/media/a"},"instruction":"Assess visible defects, legibility, continuity, composition, and production readiness. Return evidence, not a replacement asset."}]}}},{"name":"two exact versions","input":{"assets":[{"kind":"image","assetId":"asset-a","versionId":"v1","url":"/api/media/a"},{"kind":"image","assetId":"asset-b","versionId":"v2","url":"/api/media/b"}]},"expected":{"plan":{"schemaVersion":1,"operation":"multi-asset-quality","title":"Quality review for 2 images","calls":[{"index":0,"operation":"image.describe","asset":{"kind":"image","assetId":"asset-a","versionId":"v1","url":"/api/media/a"},"instruction":"Assess visible defects, legibility, continuity, composition, and production readiness. Return evidence, not a replacement asset."},{"index":1,"operation":"image.describe","asset":{"kind":"image","assetId":"asset-b","versionId":"v2","url":"/api/media/b"},"instruction":"Assess visible defects, legibility, continuity, composition, and production readiness. Return evidence, not a replacement asset."}]}}}],"portable":{"format":"stillmade-block/1","dependencies":[],"sources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/run.js","src/view.json"],"evidence":["upstream/0/LICENSE","upstream/0/src/run.js","upstream/0/src/view.json"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}],"files":{"upstream/0/LICENSE":"MIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","upstream/0/src/run.js":"const assets=input.assets.filter(asset=>asset&&asset.kind==='image'&&typeof asset.assetId==='string'&&typeof asset.versionId==='string').slice(0,16);\nif(!assets.length)throw new Error('Select at least one saved image asset.');\nconst seen=[];\nfor(const asset of assets){const key=asset.assetId+':'+asset.versionId;if(seen.includes(key))throw new Error('Choose distinct image versions.');seen.push(key);}\nreturn {plan:{schemaVersion:1,operation:'multi-asset-quality',title:'Quality review for '+String(assets.length)+' image'+(assets.length===1?'':'s'),calls:assets.map((asset,index)=>({index,operation:'image.describe',asset:{kind:'image',assetId:asset.assetId,versionId:asset.versionId,url:asset.url},instruction:'Assess visible defects, legibility, continuity, composition, and production readiness. Return evidence, not a replacement asset.'}))}};\n","upstream/0/src/view.json":"{\n  \"html\": \"<main><header><small>Preflight</small><h1>Quality review</h1><p>Check every selected image version before export.</p></header><section><h2 id=\\\"count\\\">No images selected</h2><p id=\\\"detail\\\">Add saved images to this Block to prepare the review.</p><button id=\\\"run\\\" type=\\\"button\\\">Prepare quality review</button><output id=\\\"status\\\" role=\\\"status\\\"></output></section></main>\\n\",\n  \"css\": \"main{max-width:680px;margin:0 auto;padding:18px;color:var(--fg)}header,section{padding:18px;border:1px solid var(--border-tok);border-radius:var(--r-3);background:var(--bg-elev-1)}header{margin-bottom:14px}h1,h2{margin:4px 0 8px}p,small,output{color:var(--fg-muted)}button{margin-top:12px}output{display:block;min-height:24px;margin-top:12px}\\n\",\n  \"javascript\": \"const count=document.getElementById('count'),detail=document.getElementById('detail'),button=document.getElementById('run'),status=document.getElementById('status');let assets=[];StillMade.onInput(values=>{assets=values.assets||[];count.textContent=String(assets.length)+' image version'+(assets.length===1?'':'s');detail.textContent=assets.length?'The review stays pinned to these exact saved versions.':'Add saved images to this Block to prepare the review.';button.disabled=!assets.length});button.addEventListener('click',async()=>{button.disabled=true;status.textContent='Preparing the review…';try{const result=await StillMade.run({assets});status.textContent=String(result.plan.calls.length)+' image checks are ready to run and retain.'}catch(error){status.textContent=error.message||'The review could not be prepared.'}finally{button.disabled=!assets.length}});\\n\"\n}"},"lineage":{"parents":[],"changes":"Packaged original Block source for StillMade."}}}],"license":"MIT"}