From bf61e777f399a3a913dfb7cd41a67e5b5fa163ed Mon Sep 17 00:00:00 2001 From: Aismit Das Date: Mon, 23 Mar 2026 16:17:16 -0400 Subject: [PATCH 1/3] Port Slides guidance to unified Google Drive refs --- .../skills/google-drive/agents/openai.yaml | 2 +- .../slides/chart-refresh-workflows.md | 55 ++++++++++++++++++ .../slides/deck-scope-verification.md | 29 ++++++++++ .../slides/sheets-chart-replacement.md | 56 +++++++++++++++++++ .../references/slides/visual-iteration.md | 12 ++++ .../references/slides/workflows.md | 37 +++++++++++- 6 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 plugins/google-drive/skills/google-drive/references/slides/chart-refresh-workflows.md create mode 100644 plugins/google-drive/skills/google-drive/references/slides/deck-scope-verification.md create mode 100644 plugins/google-drive/skills/google-drive/references/slides/sheets-chart-replacement.md diff --git a/plugins/google-drive/skills/google-drive/agents/openai.yaml b/plugins/google-drive/skills/google-drive/agents/openai.yaml index aad136aa..c941c7ca 100644 --- a/plugins/google-drive/skills/google-drive/agents/openai.yaml +++ b/plugins/google-drive/skills/google-drive/agents/openai.yaml @@ -2,4 +2,4 @@ interface: display_name: "Google Drive" short_description: "One entrypoint for Drive, Docs, Sheets, and Slides" brand_color: "#0F9D58" - default_prompt: "Use $google-drive to find the right Drive file, then summarize a Doc, update a Sheet, or edit a Slides deck through the unified Google Drive workflow." + default_prompt: "Use $google-drive to find the right Drive file, then summarize a Doc, update a Sheet, or edit a Slides deck through the unified Google Drive workflow, including refreshing linked charts or replacing static chart content from an existing connected source such as Google Sheets." diff --git a/plugins/google-drive/skills/google-drive/references/slides/chart-refresh-workflows.md b/plugins/google-drive/skills/google-drive/references/slides/chart-refresh-workflows.md new file mode 100644 index 00000000..306549a8 --- /dev/null +++ b/plugins/google-drive/skills/google-drive/references/slides/chart-refresh-workflows.md @@ -0,0 +1,55 @@ +# Chart Refresh And Replacement Workflows + +Use this guidance when the user asks to refresh, update, replace, or repair a chart in Google Slides. + +## 1. Read chart slides structurally, not text-only + +- Do not rely on `get_presentation_text` alone for chart workflows. Text-only deck reads can drop chart-only page elements and hide the object you need to act on. +- Start with `get_presentation` for deck-wide context and `get_slide` for the target slide before any write. +- Use `get_slide_thumbnail` when the request depends on whether the visual chart itself changed. + +## 2. Distinguish linked charts from static content + +- Look for a linked chart element first. The target slide may expose a chart-bearing page element with linked chart metadata such as a source workbook reference, chart ID, or source spreadsheet ID. +- If the slide has a linked chart, treat it as refreshable in place. +- If the slide only has an image, generic shape, or other static content and no linked chart metadata, do not pretend it can be refreshed in place. That is a chart replacement workflow, not a linked-chart refresh. + +## 3. Reuse existing source charts before creating new ones + +- If the user provided or implied a connected source, such as a Google Sheet, inspect that source for existing charts before creating any temporary charts. +- When the source already contains named or obviously matching charts, reuse those existing charts as the source graphics. +- Only create a new source chart when no suitable source chart exists or when the user explicitly asked for a new chart design. +- Do not turn a Slides static-content replacement task into a source-chart authoring task unless the missing source chart forces that extra step. + +## 4. For linked charts, stay in Slides and use raw batch updates + +- When the slide already contains a linked chart, use raw `batch_update` with the chart refresh request on the live chart object ID. +- Refresh the chart object first, then make any nearby title or annotation edits as separate text changes if needed. +- After the write, verify that the chart-bearing slide changed, not just the text around it. + +## 5. For shape placeholders, replace the placeholder with a chart graphic + +- If the slide contains an obvious chart placeholder shape, replace that placeholder with the chart graphic rather than leaving the placeholder underneath or beside the new chart. +- Preserve the intended chart-area footprint so the surrounding layout stays intact. +- If the user does not require persistent linking, prefer a non-linked chart insertion path when it keeps the visible result simpler. +- If the slide also contains helper text that only exists to label the placeholder area, remove or rewrite that text as part of the replacement so the slide no longer looks like a fixture. + +## 6. For static chart content, replace the image in place + +- If the chart area is static chart content, preserve the approximate position and size of the existing image. +- Replace the old chart image rather than stacking a second chart on top of it. +- If the image is clearly stale or explicitly marked as replaceable static content, do not report success until the old graphic is gone and the new one occupies the intended area. + +## 7. If no source chart exists, be explicit about the extra step + +- If the slide lacks a linked chart and the connected source lacks a suitable source chart, say that the source chart must be created or identified before the Slides replacement can be completed. +- If you create a new source chart because none existed, say so explicitly instead of describing the result as if the existing chart was merely refreshed. + +## 8. Verification standard + +- A chart refresh or replacement is only complete when the chart slide was re-read after the write and the visual result was checked with a thumbnail when the image itself matters. +- Do not claim success just because the write call succeeded or because adjacent chart labels changed. +- When thumbnail responses already include inline image content, inspect that directly instead of downloading the `contentUrl` just to look at the same slide. +- Verify both of these things before declaring success: + - the chart graphic itself now matches the intended source chart + - obsolete placeholder or instructional text is no longer visible unless the user asked to keep it diff --git a/plugins/google-drive/skills/google-drive/references/slides/deck-scope-verification.md b/plugins/google-drive/skills/google-drive/references/slides/deck-scope-verification.md new file mode 100644 index 00000000..e5d42ffe --- /dev/null +++ b/plugins/google-drive/skills/google-drive/references/slides/deck-scope-verification.md @@ -0,0 +1,29 @@ +# Deck Scope Verification + +Use this guidance whenever the task reads, edits, migrates, translates, or structurally updates more than one slide. + +## 1. Build the authoritative slide checklist first + +- Use `get_presentation` or `get_presentation_text` to capture every slide in scope in order before the first write. +- Record the ordered slide numbers, slide object IDs, and a short title or role for each slide. +- Do not infer coverage from object ID numbering. Google Slides IDs can skip values, and a missing numeric pattern does not mean the slide is absent. +- If a deck read is truncated or incomplete, re-read narrower spans until the full in-scope checklist is explicit. + +## 2. Edit in bounded spans + +- Work in one explicit slide or one small contiguous span at a time. +- State the first and last slide in the current span before writing. +- Do not start the next span until the current span has been verified. + +## 3. Verify every span before advancing + +- Re-read the edited slide or edited span immediately after the write. +- Confirm the intended change landed on the last slide in the span, not just the first one. This catches skipped middle or trailing slides. +- If a slide in scope is still unchanged, untranslated, unmigrated, or structurally stale, fix it before moving on. +- When the task depends on visual structure, pair the post-write read with thumbnails. + +## 4. Reconcile the deck before calling it done + +- Compare the final deck state against the checklist from step 1. +- Confirm that no slide in scope was skipped, duplicated, or left in a mixed old/new state. +- For transformed-copy workflows, confirm the source deck stayed unchanged and the copied deck contains the full requested coverage. diff --git a/plugins/google-drive/skills/google-drive/references/slides/sheets-chart-replacement.md b/plugins/google-drive/skills/google-drive/references/slides/sheets-chart-replacement.md new file mode 100644 index 00000000..25d25d8c --- /dev/null +++ b/plugins/google-drive/skills/google-drive/references/slides/sheets-chart-replacement.md @@ -0,0 +1,56 @@ +# Sheets Chart Replacement + +Use this reference when a Google Slides workflow needs to replace a screenshot, placeholder image, or stale chart graphic with a chart sourced from an existing Google Sheets workbook. + +## Use When + +- The user names both a spreadsheet and a presentation. +- The source chart already exists in Google Sheets and should be reused. +- The slide currently contains a screenshot, placeholder image, or other static chart content in the chart area. +- The user may also want a few narrow data edits before generating the refreshed chart graphic. + +## Workflow + +1. Ground both artifacts first. +- Search for the spreadsheet and presentation when the user gives titles instead of URLs. +- Read spreadsheet metadata to confirm the target chart titles and `chartId` values before writing. +- Read the presentation and target slides to capture slide numbers, titles, object IDs, and current chart-area elements. + +2. Keep spreadsheet edits narrow when they are part of the request. +- Prefer exact cell updates on existing rows instead of table rewrites. +- Avoid KPI, headline summary, or rollup cells unless the user explicitly asks to change them. +- Do not add rows, remove rows, or create temporary charts unless the named chart is missing. +- Read back the changed ranges before touching Slides. + +3. Capture the placeholder footprint from the live slide. +- Use `get_slide` to find the current screenshot, image, or placeholder object in the chart area. +- Reuse that element's size and transform as the starting footprint for the replacement chart. +- Use `get_slide_thumbnail` to check whether any separate instructional or placeholder text near the chart area also needs removal. + +4. Replace the placeholder with the existing Sheets chart. +- Prefer `createSheetsChart` with the existing `spreadsheetId` and `chartId` from the workbook. +- Use `linkingMode: NOT_LINKED_IMAGE` when the user only needs a refreshed graphic and does not need the slide to stay linked to Sheets. +- Use `linkingMode: LINKED` only when the user explicitly wants ongoing chart linkage. +- Delete the obsolete screenshot or placeholder image once the replacement target is grounded. +- Preserve slide order, titles, nearby copy, and unrelated page elements. + +5. Clean up chart-area residue. +- Remove separate placeholder or instructional text objects associated with the chart area when they are clearly obsolete. +- Do not delete slide titles, KPI summary content, or other non-chart text unless the user asked for that change. + +6. Verify slide by slide. +- After each replacement, fetch a fresh thumbnail and refreshed slide structure. +- Expect Google Slides to normalize inserted chart size or aspect slightly; judge success by approximate footprint and visual cleanliness, not exact raw transform equality. +- Confirm the new chart object exists and the old placeholder image is gone before moving on. + +7. Report exact outcomes. +- Exact spreadsheet ranges changed. +- Old and new values for each edited data cell. +- Slide numbers updated. +- Replacement success per chart. +- Whether any placeholder text remained. + +## Failure Policy + +- If the named chart is missing, then and only then consider creating a replacement chart. +- If the replacement introduces a layout problem, switch to the visual-iteration loop and adjust only the affected slide. diff --git a/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md b/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md index a61ff8c3..d84604db 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md +++ b/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md @@ -11,6 +11,7 @@ Prefer this reference over [google-slides](./workflows.md) when the request is p - The user wants to improve how an existing Google Slides deck looks, not just change its copy. - The request includes phrases like "fix this slide," "make this deck look better," "clean up formatting," "fix overflow," "fix spacing," "fix alignment," or "visual iteration." - The user shares a connected Google Slides deck or link and wants edits applied directly to that deck. +- The user wants to replace static chart screenshots or placeholder images with charts from a connected source, such as Google Sheets, while preserving the current slide footprint. ## Required Tooling @@ -35,6 +36,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Use `get_presentation` or `get_presentation_text` to identify slide order, titles, and object IDs. - Use `get_slide` on the target slide before the first write so you have the current element structure and IDs. - Before each additional write pass on that same slide, call `get_slide` again so the next `batch_update` uses fresh geometry and current element state rather than stale structure from the prior pass. +- For screenshot-to-chart swaps sourced from Google Sheets, read [sheets-chart-replacement](./sheets-chart-replacement.md) before the first write so the replace flow stays grounded in live chart IDs and placeholder geometry. 3. Start with a thumbnail. - Call `get_slide_thumbnail` first. @@ -67,6 +69,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Be aggressive enough to materially improve the slide in each pass. Do not make timid edits that technically move elements but leave the slide still looking broken. - Batch related fixes together when they affect the same slide structure, such as overflow plus alignment plus inconsistent spacing in one column or card set. - Prefer moving, resizing, reflowing, redistributing, or re-aligning existing elements over rewriting the slide. +- When the target element is a screenshot placeholder for a chart, treat delete-and-replace as the default move: preserve the existing footprint, insert the source chart, and remove obsolete chart-area text when it is clearly placeholder copy. - If multiple boxes or sections are part of a visible group, align their headers, icons, top text baselines, and body starting positions unless the stagger is clearly intentional. - Do not default to shrinking font size, tightening line spacing, or squishing elements closer together just to make the slide fit. - If content still does not fit cleanly after a reasonable structural pass, split the content across slides or escalate to [google-slides-template-surgery](./template-surgery.md) instead of repeatedly compressing the layout. @@ -131,6 +134,7 @@ Core rule: 1. Read the presentation first and make a slide inventory. - Note the title slide, section dividers, dense slides, image-heavy slides, and obvious outliers. - Keep that inventory lightweight. Do not present one giant deck-wide issue dump before editing. +- Keep an explicit ordered slide checklist for the requested scope, and do not infer coverage from object ID numbering or from which slides happened to stand out in the first scan. 2. Prioritize the slide order. - If the user asked for the whole deck, start with slide 1 in the requested scope, finish slide 1, then move to slide 2, then slide 3, and continue in order until the last slide in scope. @@ -147,6 +151,7 @@ Core rule: - Do at least 2 verified loops on that slide before advancing to the next one. - Do not say a slide needs no second pass until you have actually completed the second fresh review loop on that slide. - Between loops, re-read the current slide structure so follow-up writes use fresh state rather than stale element geometry. +- Mark the current slide done only after the final verification loop confirms it is the next expected slide in the checklist. If deck-wide work ever loses track of coverage, stop and reconcile against the checklist before continuing. - If the same formatting defect keeps recurring because of shared structure, escalate to [google-slides-template-surgery](./template-surgery.md) instead of hand-patching every slide forever. 4. Keep a global style memory. @@ -173,6 +178,7 @@ The Slides connector exposes raw `batch_update` requests. That means: - Always inspect the current slide before editing. - Keep the tool loop local to the current slide: one slide thumbnail in, one slide edit pass, one verification thumbnail out. - Use object IDs from the live slide state, not guessed IDs. +- When replacing a screenshot placeholder with a source chart, reuse the current image geometry as the starting insertion footprint instead of inventing a new layout. - Prefer reversible, geometric edits first: transform, size, alignment, deletion only when clearly safe. - If a text box is too dense, try resizing, redistributing, or reflowing the slide before shortening the text. - If the only apparent fix is to compress all the content tighter, stop and reconsider the layout pattern instead of blindly applying that edit. @@ -184,6 +190,11 @@ The Slides connector exposes raw `batch_update` requests. That means: - If the runtime lacks the Slides edit action, stop and say the deck can be diagnosed but not corrected from Codex. - If repeated passes do not improve the slide, stop and explain what remains subjective or structurally constrained. +## References + +- [deck-scope-verification](./deck-scope-verification.md) +- [sheets-chart-replacement](./sheets-chart-replacement.md) + ## Example Prompts - `Fix the alignment and overlap issues on slide 4 of this Google Slides deck through Google Drive.` @@ -191,3 +202,4 @@ The Slides connector exposes raw `batch_update` requests. That means: - `Import this PPTX into Google Slides, then polish each slide with thumbnail-based verification through Google Drive.` - `Make this existing Google Slides deck look better and fix the formatting issues through Google Drive.` - `Clean up spacing, overflow, and alignment in this shared Google Slides link through Google Drive.` +- `Replace the chart screenshots on slides 3-5 with the existing Google Sheets charts and keep the same approximate layout through Google Drive.` diff --git a/plugins/google-drive/skills/google-drive/references/slides/workflows.md b/plugins/google-drive/skills/google-drive/references/slides/workflows.md index 581f462c..425f045d 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/workflows.md +++ b/plugins/google-drive/skills/google-drive/references/slides/workflows.md @@ -2,9 +2,11 @@ ## Overview -Use this reference as the default entrypoint for Google Slides work. Stay here for deck search, summaries, general content edits, imports, and new presentation creation. If the user primarily wants to make an existing deck look better by fixing formatting, overflow, spacing, alignment, or visual polish, prefer [google-slides-visual-iteration](./visual-iteration.md). +Use this reference as the default entrypoint for Google Slides work. Stay here for deck search, summaries, general content edits, imports, native deck copies, and new presentation creation. If the user primarily wants to make an existing deck look better by fixing formatting, overflow, spacing, alignment, or visual polish, prefer [google-slides-visual-iteration](./visual-iteration.md). Use this base reference when the request spans multiple Google Slides workflows or when no more focused Slides reference is a better fit. +Keep chart refresh and chart replacement workflows here when the job is to update a chart area from a connected source, such as Google Sheets, without broader deck redesign. For slide-reading and summary tasks, combine structural deck reads with slide thumbnails when the slide contains charts, graphs, diagrams, screenshots, or other content that cannot be understood from text alone. +When the request is to replace screenshot placeholders or other static chart content with charts from an existing connected source, such as Google Sheets, stay in this reference unless the job is mainly visual cleanup. If the source is Google Sheets, read [sheets-chart-replacement](./sheets-chart-replacement.md). ## Specialized Skills @@ -21,6 +23,7 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - `get_slide` - `batch_update` - `create_presentation` for new decks +- `create_from_template` when the user wants a translated, branded, or otherwise transformed copy of an existing Google Slides deck - `import_presentation` when starting from a local `.ppt`, `.pptx`, or `.odp` - `get_slide_thumbnail` when visual verification matters @@ -28,11 +31,15 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: 1. Identify the target presentation. - If the user names a deck but does not provide a URL, search for it first. +- If the user wants a new deck that preserves the structure or layout of an existing Google Slides deck, create the working copy with `create_from_template` before editing so the output stays native to Google Slides. - If the user provides a local presentation file, tell the user you are importing it into native Google Slides first, then use [google-slides-import-presentation](./import-presentation.md). 2. Read before writing. - Use `get_presentation` or `get_presentation_text` to capture slide order, titles, and overall structure. +- When the request rewrites, translates, or updates multiple slides, follow [deck-scope-verification](./deck-scope-verification.md) before the first write so the full in-scope slide list is explicit. - Use `get_slide` before any slide-level write so object IDs and layout context come from the live deck. +- For chart refresh or chart replacement work, follow [chart-refresh-workflows](./chart-refresh-workflows.md). Do not rely on `get_presentation_text` alone for chart workflows because chart-only slide elements may be omitted from text-only reads. +- If the task is to swap screenshot placeholders or other static chart content for charts from an existing connected source, keep the source artifacts grounded before the first write. If the source is Google Sheets, also read [sheets-chart-replacement](./sheets-chart-replacement.md) so chart IDs, placeholder geometry, and write scope stay grounded. - For slide summaries or inspection, do not rely on text extraction alone when a slide contains charts, graphs, screenshots, diagrams, or image-heavy content. - Use `get_slide_thumbnail` alongside text/structure reads when visual evidence matters so the summary reflects both what the slide says and what the slide shows. - If the thumbnail response includes inline image content, base64 image data, or an image-bearing data wrapper, ingest that directly as slide image input. The response may also include `contentUrl` metadata, but if inline image data is present, inspect that directly instead of downloading the URL or relying only on metadata. @@ -56,9 +63,10 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - Preserve user control over substantive design choices. Apply a clean default look, but do not invent a heavy brand system or overly specific theme unless the user asks. 4. Route only when the job is narrower than general Slides work. -- Stay in this reference for deck summaries, slide-by-slide reviews, new presentation creation, small content edits, and isolated formatting fixes on specific slides. +- Stay in this reference for deck summaries, slide-by-slide reviews, new presentation creation, chart refresh or chart replacement from a connected chart source such as Google Sheets, small content edits, and isolated formatting fixes on specific slides. - Use [google-slides-import-presentation](./import-presentation.md) when the source is a local presentation file. - Use [google-slides-visual-iteration](./visual-iteration.md) when the user asks to fix a slide visually, clean up formatting, make a deck look better, or correct spacing, overlap, alignment, cropping, density, overflow, or other layout cleanup where the slide image matters. +- Stay in this reference when the request spans narrow source-data edits, such as Google Sheets edits, plus chart replacement in Slides, and route to visual iteration only when post-replacement layout cleanup is the primary job. - Use [google-slides-template-surgery](./template-surgery.md) when the repeated layout structure is broken. - Use [google-slides-template-migration](./template-migration.md) when content should move onto a company or team template deck. @@ -66,6 +74,19 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - Restate the target slide numbers, titles, or object IDs before making changes. - Prefer small `batch_update` requests over large speculative batches. - Send `batch_update` requests as structured request objects in the expected tool shape, not as JSON strings or stringified arrays. +- For chart refresh or chart replacement requests, inspect the live slide structure first and decide whether the slide contains a linked chart, a shape placeholder, or static chart content. +- If the slide already contains a linked chart and the user wants the existing chart updated in place, prefer a raw chart refresh request in `batch_update`, then verify with a thumbnail that the chart itself updated. +- If the slide contains a shape placeholder or static chart content and the user wants the chart graphic updated, treat that as a chart replacement workflow rather than a failed refresh. +- When a source workbook already contains matching charts, reuse those existing charts before creating temporary or new charts. Only create a new source chart when no suitable existing chart is available. +- For shape placeholders, replace the placeholder object with the chart graphic directly and preserve the intended chart-area footprint. +- For static chart content, preserve the existing chart footprint as closely as possible and replace the old graphic rather than layering a second chart on top. +- If the user does not require the result to stay linked to the source workbook, prefer a non-linked chart insertion path when it reduces extra link behavior without changing the visible result. +- Remove chart-area instructional text that becomes obsolete after replacement, such as text containing `PLACEHOLDER`, `INSERT`, or explicit directions to replace the static content, unless the user explicitly asks to keep it. +- After chart replacement, verify both that the chart rendered in the intended area and that obsolete placeholder or instructional text no longer remains on the slide. +- For deck-wide or multi-slide content edits such as translation, terminology normalization, or repeated copy updates, work in explicit slide spans and re-read the edited span before advancing. +- In multi-slide mode, confirm the last slide in the just-edited span actually changed before starting the next span. Do not assume coverage from object ID numbering or from a successful write response alone. +- Before calling a multi-slide edit done, reconcile the final deck against the original slide checklist so no slide in scope was skipped. +- When the user asked for a live Google Slides deck, keep the workflow native. Do not export to a downloadable file or ask for a local re-upload when `create_from_template`, `create_presentation`, or `import_presentation` can keep the work inside Google Slides. - If the task depends on how the slide looks, fetch a thumbnail before editing and verify again after the write. - If the task is to summarize, interpret, or sanity-check a visual slide, fetch a thumbnail and use it as evidence for charts, graphs, screenshots, diagrams, and other non-textual content rather than summarizing only the extracted text. - When fixing slide formatting, use a tight loop: take a thumbnail, identify visible spacing/alignment/cropping/regression issues, send a focused `batch_update`, then take another thumbnail to verify the result. @@ -87,6 +108,8 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - Reference slide numbers and titles when summarizing or planning edits. - For slide summaries that involve charts, graphs, or other visuals, distinguish clearly between what comes from extracted text and what comes from thumbnail-based visual understanding. +- For chart update requests, say explicitly whether the chart itself was refreshed, whether a placeholder or static chart content block was replaced from an existing source chart such as a Google Sheets chart, whether a new source chart had to be created first, or whether only surrounding text changed. +- Say whether any placeholder or instructional chart text remained after the update. - Distinguish clearly between a proposed plan and changes that were actually applied. - Say which presentation and slides were read or changed. - Call out any remaining issues that need a narrower workflow or human design judgment. @@ -95,10 +118,20 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - "Find the Q2 board deck and summarize the storyline slide by slide." - "Read slide 8 and summarize both the chart and the surrounding text." +- "Refresh the linked chart on slide 6 from its source workbook and verify the updated visual." +- "Replace the ARR, churn, and pipeline static chart content with charts from the metrics spreadsheet without leaving placeholder text behind." +- "Open this Google Sheet and Google Slides deck, make a few targeted chart-data edits, and replace the chart placeholder screenshots with the existing Sheets charts." - "Create a new Google Slides presentation from this outline." +- "Translate this deck into Japanese and save it as a new Google Slides deck without leaving Slides." - "Import this PPTX into Google Slides and then clean up the layout." - "Update slide 6 so the title and chart description match the latest numbers." ## Light Fallback If the presentation is missing or the Google Slides connector does not return deck data, say that Google Slides access may be unavailable, the wrong deck may be in scope, or the file may need to be imported first. + +## References + +- [deck-scope-verification](./deck-scope-verification.md) +- [chart-refresh-workflows](./chart-refresh-workflows.md) +- [sheets-chart-replacement](./sheets-chart-replacement.md) From 88cc0ecb19ae5fe6e5008e9dced6878d57dc6fb6 Mon Sep 17 00:00:00 2001 From: Aismit Das Date: Mon, 23 Mar 2026 16:25:10 -0400 Subject: [PATCH 2/3] Tighten Slides Q&A evidence scanning --- .../skills/google-drive/references/slides/workflows.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/google-drive/skills/google-drive/references/slides/workflows.md b/plugins/google-drive/skills/google-drive/references/slides/workflows.md index 425f045d..98dd4357 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/workflows.md +++ b/plugins/google-drive/skills/google-drive/references/slides/workflows.md @@ -38,10 +38,13 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - Use `get_presentation` or `get_presentation_text` to capture slide order, titles, and overall structure. - When the request rewrites, translates, or updates multiple slides, follow [deck-scope-verification](./deck-scope-verification.md) before the first write so the full in-scope slide list is explicit. - Use `get_slide` before any slide-level write so object IDs and layout context come from the live deck. +- For Q&A, evidence-finding, or "where in the deck is X?" requests, build an explicit candidate slide list first. Do not stop at the first keyword hit if the topic could appear across a section, in appendix evidence, or in both summary and detail slides. +- When answering a topic question such as churn, pipeline, or ARR, inspect every plausible slide in the relevant section before concluding that the answer lives on only one slide. - For chart refresh or chart replacement work, follow [chart-refresh-workflows](./chart-refresh-workflows.md). Do not rely on `get_presentation_text` alone for chart workflows because chart-only slide elements may be omitted from text-only reads. - If the task is to swap screenshot placeholders or other static chart content for charts from an existing connected source, keep the source artifacts grounded before the first write. If the source is Google Sheets, also read [sheets-chart-replacement](./sheets-chart-replacement.md) so chart IDs, placeholder geometry, and write scope stay grounded. - For slide summaries or inspection, do not rely on text extraction alone when a slide contains charts, graphs, screenshots, diagrams, or image-heavy content. - Use `get_slide_thumbnail` alongside text/structure reads when visual evidence matters so the summary reflects both what the slide says and what the slide shows. +- If a candidate slide has little useful extracted text but may still contain relevant evidence in a chart, screenshot, or diagram, inspect its thumbnail before ruling it out. - If the thumbnail response includes inline image content, base64 image data, or an image-bearing data wrapper, ingest that directly as slide image input. The response may also include `contentUrl` metadata, but if inline image data is present, inspect that directly instead of downloading the URL or relying only on metadata. - Treat the slide page size as a hard boundary for every shape, text box, image, and color band you create. @@ -108,6 +111,7 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - Reference slide numbers and titles when summarizing or planning edits. - For slide summaries that involve charts, graphs, or other visuals, distinguish clearly between what comes from extracted text and what comes from thumbnail-based visual understanding. +- For Q&A or evidence-location requests, say which slide range or candidate slides were inspected before giving the answer. Do not imply exhaustive coverage if you only checked one likely slide. - For chart update requests, say explicitly whether the chart itself was refreshed, whether a placeholder or static chart content block was replaced from an existing source chart such as a Google Sheets chart, whether a new source chart had to be created first, or whether only surrounding text changed. - Say whether any placeholder or instructional chart text remained after the update. - Distinguish clearly between a proposed plan and changes that were actually applied. @@ -118,6 +122,7 @@ Confirm the runtime exposes the relevant Google Slides actions before editing: - "Find the Q2 board deck and summarize the storyline slide by slide." - "Read slide 8 and summarize both the chart and the surrounding text." +- "Which slides in this deck discuss churn, and what does each one say?" - "Refresh the linked chart on slide 6 from its source workbook and verify the updated visual." - "Replace the ARR, churn, and pipeline static chart content with charts from the metrics spreadsheet without leaving placeholder text behind." - "Open this Google Sheet and Google Slides deck, make a few targeted chart-data edits, and replace the chart placeholder screenshots with the existing Sheets charts." From 412a1de1804f01b2bf063504be69eda7ab5dc84e Mon Sep 17 00:00:00 2001 From: Aismit Das Date: Mon, 23 Mar 2026 20:16:19 -0400 Subject: [PATCH 3/3] Add Slides non-text styling recipes --- .../references/slides/batch-update-recipes.md | 179 ++++++++++++++++++ .../references/slides/visual-iteration.md | 15 ++ 2 files changed, 194 insertions(+) diff --git a/plugins/google-drive/skills/google-drive/references/slides/batch-update-recipes.md b/plugins/google-drive/skills/google-drive/references/slides/batch-update-recipes.md index c6132522..90070c00 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/batch-update-recipes.md +++ b/plugins/google-drive/skills/google-drive/references/slides/batch-update-recipes.md @@ -6,6 +6,7 @@ Use these patterns as copy-and-fill templates. Do not invent raw `batch_update` - Each request object must set exactly one request type key. - Use live `objectId` values from `get_slide`. +- Classify the target as a text box, shape, line or connector, or image before choosing a request family. - Keep batches small. - Re-fetch a thumbnail after every batch. - Prefer exact field masks. Do not use guessed field names. @@ -104,6 +105,180 @@ Use this when a specific text box should be preserved structurally but its conte Use this for geometry adjustments when the object already exists and only its position or scale is wrong. +## Update a shape fill and border + +```json +[ + { + "updateShapeProperties": { + "objectId": "shape-card-1", + "shapeProperties": { + "shapeBackgroundFill": { + "solidFill": { + "color": { + "rgbColor": { + "red": 0.92, + "green": 0.97, + "blue": 0.92 + } + } + } + }, + "outline": { + "outlineFill": { + "solidFill": { + "color": { + "rgbColor": { + "red": 0.18, + "green": 0.62, + "blue": 0.25 + } + } + } + }, + "weight": { + "magnitude": 19050, + "unit": "EMU" + } + } + }, + "fields": "shapeBackgroundFill.solidFill.color,outline.outlineFill.solidFill.color,outline.weight" + } + } +] +``` + +Use this for accent bars, card fills, and border color or weight changes when the target is an existing shape. + +## Update a line or connector stroke + +```json +[ + { + "updateLineProperties": { + "objectId": "line-arrow-1", + "lineProperties": { + "lineFill": { + "solidFill": { + "color": { + "rgbColor": { + "red": 0.84, + "green": 0.18, + "blue": 0.16 + } + } + } + }, + "weight": { + "magnitude": 19050, + "unit": "EMU" + }, + "dashStyle": "SOLID", + "endArrow": "FILL_ARROW" + }, + "fields": "lineFill.solidFill.color,weight,dashStyle,endArrow" + } + } +] +``` + +Use this when the arrow or connector is a line object, not a filled shape. + +## Restyle an existing arrow shape + +```json +[ + { + "updateShapeProperties": { + "objectId": "shape-arrow-1", + "shapeProperties": { + "shapeBackgroundFill": { + "solidFill": { + "color": { + "rgbColor": { + "red": 0.20, + "green": 0.62, + "blue": 0.24 + } + } + } + }, + "outline": { + "propertyState": "NOT_RENDERED" + } + }, + "fields": "shapeBackgroundFill.solidFill.color,outline.propertyState" + } + } +] +``` + +Use this when the arrow is a filled shape object and only its color or outline treatment should change. + +## Delete and recreate a stale arrow or broken shape + +```json +[ + { + "deleteObject": { + "objectId": "shape-arrow-old" + } + }, + { + "createShape": { + "objectId": "shape-arrow-new", + "shapeType": "DOWN_ARROW", + "elementProperties": { + "pageObjectId": "slide-1", + "size": { + "width": { + "magnitude": 260000, + "unit": "EMU" + }, + "height": { + "magnitude": 260000, + "unit": "EMU" + } + }, + "transform": { + "scaleX": 1, + "scaleY": 1, + "translateX": 720000, + "translateY": 1320000, + "unit": "EMU", + "shearX": 0, + "shearY": 0 + } + } + } + }, + { + "updateShapeProperties": { + "objectId": "shape-arrow-new", + "shapeProperties": { + "shapeBackgroundFill": { + "solidFill": { + "color": { + "rgbColor": { + "red": 0.84, + "green": 0.18, + "blue": 0.16 + } + } + } + }, + "outline": { + "propertyState": "NOT_RENDERED" + } + }, + "fields": "shapeBackgroundFill.solidFill.color,outline.propertyState" + } + } +] +``` + +Use this when the existing arrow or decorative shape is the wrong type, badly malformed, or too brittle to patch safely in place. + ## Create a new rectangle placeholder ```json @@ -161,6 +336,10 @@ Use this immediately after `createShape` for text boxes. - Wrong request key count: one object containing both `insertText` and `deleteObject` - Guessed IDs instead of IDs from `get_slide` +- Updating the main headline value text and forgetting the smaller target or benchmark text box nearby +- Treating an arrow or accent bar as “uneditable” without first checking whether it is a shape or a line +- Using `updateShapeProperties` on a connector or `updateLineProperties` on a filled shape - Stringified JSON instead of structured objects - Giant batches mixing duplication, deletion, movement, and copy changes all at once +- Calling a visual edit complete because the text changed while the non-text styling stayed stale - Verifying only the API response and not the next thumbnail diff --git a/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md b/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md index d84604db..3c35b690 100644 --- a/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md +++ b/plugins/google-drive/skills/google-drive/references/slides/visual-iteration.md @@ -12,6 +12,7 @@ Prefer this reference over [google-slides](./workflows.md) when the request is p - The request includes phrases like "fix this slide," "make this deck look better," "clean up formatting," "fix overflow," "fix spacing," "fix alignment," or "visual iteration." - The user shares a connected Google Slides deck or link and wants edits applied directly to that deck. - The user wants to replace static chart screenshots or placeholder images with charts from a connected source, such as Google Sheets, while preserving the current slide footprint. +- The user wants to update non-text visual elements such as accent bars, arrow shapes, connector strokes, fills, or borders while keeping the slide layout intact. ## Required Tooling @@ -37,6 +38,8 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Use `get_slide` on the target slide before the first write so you have the current element structure and IDs. - Before each additional write pass on that same slide, call `get_slide` again so the next `batch_update` uses fresh geometry and current element state rather than stale structure from the prior pass. - For screenshot-to-chart swaps sourced from Google Sheets, read [sheets-chart-replacement](./sheets-chart-replacement.md) before the first write so the replace flow stays grounded in live chart IDs and placeholder geometry. +- For dashboards, scorecards, or metric grids, map the small benchmark or target text boxes separately from the main headline values. Do not assume the smaller target text is part of the same text object as the large value. +- Before declaring a visual element blocked, classify it as a shape, a line or connector, or an image. Then choose the matching raw request family from [batch-update-recipes](./batch-update-recipes.md). 3. Start with a thumbnail. - Call `get_slide_thumbnail` first. @@ -58,6 +61,7 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Look for overlapping text boxes, shapes, charts, and images. - Look for misaligned images, cards, icons, and text blocks. - Look for grouped boxes, cards, or sections whose header text, body starts, icons, or internal padding do not sit on the same visual plane. +- Look for stale accent-bar colors, arrow directions, border strokes, connector lines, or small benchmark text that lag behind the main headline text. - Look for inconsistent emphasis such as one label or bullet line being bolded differently from its siblings without intent. - Look for uneven alignment, broken grid structure, inconsistent spacing, off-center titles, awkward margins, and clipped elements. - Look for image distortion, poor crops, weak hierarchy, and slides that feel heavier on one side without intent. @@ -70,6 +74,10 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Batch related fixes together when they affect the same slide structure, such as overflow plus alignment plus inconsistent spacing in one column or card set. - Prefer moving, resizing, reflowing, redistributing, or re-aligning existing elements over rewriting the slide. - When the target element is a screenshot placeholder for a chart, treat delete-and-replace as the default move: preserve the existing footprint, insert the source chart, and remove obsolete chart-area text when it is clearly placeholder copy. +- For metric cards, summary strips, or scorecard rows, treat the main value, target value, delta text, arrow, and accent bar as one local edit cluster. Do not stop after changing only the visible headline text if nearby target text or non-text styling is now stale. +- Prefer `updateShapeProperties` for fills and borders on existing shapes, and `updateLineProperties` for connectors or line-based arrows that already exist. +- If an arrow direction is wrong because the existing element is the wrong shape type, or if a shape is too broken to patch safely, delete and recreate it in the same footprint rather than leaving stale visual state behind. +- Do not call a shape-style miss a hard API limitation until you have attempted the matching non-text request family or confirmed that the object is actually an image. - If multiple boxes or sections are part of a visible group, align their headers, icons, top text baselines, and body starting positions unless the stagger is clearly intentional. - Do not default to shrinking font size, tightening line spacing, or squishing elements closer together just to make the slide fit. - If content still does not fit cleanly after a reasonable structural pass, split the content across slides or escalate to [google-slides-template-surgery](./template-surgery.md) instead of repeatedly compressing the layout. @@ -80,6 +88,8 @@ If a dedicated visual-iteration tool exists in the runtime, use it. Otherwise, e - Call `get_slide_thumbnail` again after every batch update. - State which issues are now fixed, which issues remain, and whether the pass introduced any new regressions. - Confirm the targeted issue cluster is actually fixed before moving on. +- Verify that small target or benchmark text changed along with the main headline value when both were in scope. +- Verify that accent bars, arrow shapes, borders, and connector strokes changed visually, not just the text around them. - If a fix introduced a new collision, imbalance, or cramped layout, correct that next instead of blindly continuing. - After each verification thumbnail, do a fresh read of the current slide before the next write pass if more edits are needed. @@ -178,7 +188,10 @@ The Slides connector exposes raw `batch_update` requests. That means: - Always inspect the current slide before editing. - Keep the tool loop local to the current slide: one slide thumbnail in, one slide edit pass, one verification thumbnail out. - Use object IDs from the live slide state, not guessed IDs. +- Distinguish shape styling from line styling before writing. A colored arrow may be a filled shape, a line with arrowheads, or an image; the request family must match the element type. +- For fills and borders, start with `updateShapeProperties`. For connector or line strokes, start with `updateLineProperties`. - When replacing a screenshot placeholder with a source chart, reuse the current image geometry as the starting insertion footprint instead of inventing a new layout. +- If nearby text updated but the accent bar, arrow, or border stayed stale, treat the slide as incomplete rather than “mostly done.” - Prefer reversible, geometric edits first: transform, size, alignment, deletion only when clearly safe. - If a text box is too dense, try resizing, redistributing, or reflowing the slide before shortening the text. - If the only apparent fix is to compress all the content tighter, stop and reconsider the layout pattern instead of blindly applying that edit. @@ -193,6 +206,7 @@ The Slides connector exposes raw `batch_update` requests. That means: ## References - [deck-scope-verification](./deck-scope-verification.md) +- [batch-update-recipes](./batch-update-recipes.md) - [sheets-chart-replacement](./sheets-chart-replacement.md) ## Example Prompts @@ -203,3 +217,4 @@ The Slides connector exposes raw `batch_update` requests. That means: - `Make this existing Google Slides deck look better and fix the formatting issues through Google Drive.` - `Clean up spacing, overflow, and alignment in this shared Google Slides link through Google Drive.` - `Replace the chart screenshots on slides 3-5 with the existing Google Sheets charts and keep the same approximate layout through Google Drive.` +- `Update the KPI dashboard so the small target values, arrow colors, and accent bars match the source sheet without changing the layout.`