Designing Gemini Spark Deliverable Workflows
Given a Drive folder link or file listing, produce a Workflow Specification Document with this exact shape:
1. MACRO INVENTORY (asset table + constraints + assumptions + verification)
2. MESO ARCHITECTURE (component extraction + repackaging rules + scaffolding)
3. MICRO OPERATIONS (atomic transforms + quality thresholds + checkpoints)
4. WORKFLOWS (3-5 named, executable, deterministic pipelines)
5. METHODOLOGICAL ASSUMPTIONS (explicit, numbered, falsifiable)
Do not start writing workflows before completing the Macro and Meso passes — workflows inherit their guardrails and vocabulary from those layers. If the folder contents are unknown/unspecified, request a listing first; do not fabricate an inventory.
Progress:
- [ ] Step 1: Inventory and classify all source assets (Macro)
- [ ] Step 2: Identify systemic constraints and end-user assumptions (Macro)
- [ ] Step 3: Define data requirements + verification method for coherence (Macro)
- [ ] Step 4: Define component extraction logic and repackaging rules (Meso)
- [ ] Step 5: Define scaffolding patterns and constraint mapping (Meso)
- [ ] Step 6: Specify atomic operations, synthesis rules, quality thresholds (Micro)
- [ ] Step 7: Design 3-5 named workflows with full I/O + decision trees
- [ ] Step 8: Add adversarial counter-argument per workflow
- [ ] Step 9: Add deterministic conflict-resolution rules
- [ ] Step 10: Compile final spec doc, list assumptions
Step 1-3: Macro Scale
Build an asset table:
| Asset ID | Type | State (raw/partial/derivative) | Format | Resolution/Quality | License status | Reuse viability |
|---|
Then declare, in prose, for the whole folder:
- Systemic constraints: e.g., "60% of images are <150dpi, unsuitable for print without upscale-and-flag"; "no license metadata present — assume internal-use-only unless stated"
- Assumptions (label each
A1, A2...): default output format, default quality bar (e.g., 300dpi print / 72dpi web), default delivery (single ZIP vs individual links) - Data requirements: what metadata must exist (title, date, owner, resolution, source) before an asset enters a workflow
- Verification method: a single checkable rule, e.g., "an asset is workflow-eligible iff it has ≥2 of {title, source, resolution ≥150dpi} — else route to Manual Review queue"
Step 4-5: Meso Scale
- Component extraction logic: name the extractable units per asset type (e.g., from a doc: headline, body, callout stat, table; from an image: subject crop, background, palette)
- Repackaging operations: name each consolidation pattern (e.g., "Merge: N images + 1 stat sheet → carousel"; "Split: 1 long doc → N one-pagers")
- Scaffolding patterns: describe the fixed template skeleton each output type uses (e.g., "Printable = Header block + Body grid (2-col) + Footer/attribution, fixed margins 0.5in")
- Constraint mapping: table of output type → required resolution/dimensions/file type
- Verification: state the repeatability check, e.g., "Running the same input set twice must yield byte-identical scaffolding and ≤2% variance in derived text length"
Step 6: Micro Scale
List atomic operations relevant to the asset mix, each with a threshold and a checkpoint:
| Operation | Applies to | Quality threshold | Checkpoint |
|---|---|---|---|
| Crop to aspect ratio | images | no subject loss >5% of bounding box | visual diff vs. original |
| Upscale | images <150dpi | max 2x, reject if SSIM <0.85 post-upscale | SSIM check |
| Colorspace convert (RGB→CMYK) | print outputs | delta-E <5 | spot-check swatch |
| Text extraction/reflow | docs | 0% data loss on structured fields (tables, headers) | diff extracted vs. source token count |
| Data-to-chart | datasets | chart must reflect ≥95% of source rows unless explicitly filtered | row-count assertion |
Step 7-8: Workflow Design
For each of 3-5 workflows, use this exact template:
WORKFLOW: [Name, e.g. "Data-to-Infographic"]
INPUT SPEC:
- Consumes: [asset types/IDs]
- Required format: [...]
- Preconditions: [must pass Macro verification method]
TRANSFORMATION SEQUENCE:
1. Extraction: [...]
2. Processing: [...]
3. Synthesis: [...]
4. Assembly: [...]
5. Output validation: [...]
DECISION TREE:
IF [condition] THEN [operation]
ELSE IF [condition] THEN [fallback]
ELSE [route to Manual Review / reject with reason code]
COMPONENT LOGIC:
[which pieces consolidate, in what order, what mashup rule applies when >1 valid combination exists]
OUTPUT SPEC:
- Format: [PDF/PNG/etc]
- Dimensions: [px or in, with dpi]
- Metadata: [title, source, generated-date, version tag]
- Delivery: [single file / ZIP / Drive folder mirror]
EXECUTION GUARDRAILS:
- Quality checks: [quantified, e.g. "reject if text overflow >0 lines"]
- Fallback rule: [what happens on failure — degrade gracefully, don't silently ship broken output]
- Post-processing minimization: [what must NOT require human touch-up]
ADVERSARIAL COUNTER-ARGUMENT:
Resistance: [why a content ops team would distrust/reject this]
Justification: [why it succeeds anyway — cite determinism, throughput, or consistency gains]
Step 9: Conflict Resolution
When multiple repackaging paths are valid for the same input, state a global precedence rule once, e.g.:
"If an asset qualifies for both Path A (infographic) and Path B (template fill), precedence goes to the path with the higher-fidelity source match (fewer synthesis steps), because fewer transformation hops reduce compounding error. Ties broken by declared user-facing deadline field; absent that, alphabetical workflow name."
State this explicitly — do not leave precedence implicit per-workflow.
Step 10: Assumptions
List all assumptions made (A1, A2, ...) in one place at the end, each falsifiable/checkable against the real folder once available.
Example 1:
Input: Folder with 40 stock photos (mixed resolution), 1 brand style guide PDF, 1 CSV of product specs.
Output: Three workflows — "Asset-Library-to-Curated-Collections" (photos → themed ZIP sets with contact sheet), "Data-to-Spec-Sheet-Printable" (CSV + style guide → branded PDF spec cards, one per row), "Document-to-Social-Asset-Set" (style guide extracts → logo/color/social templates). Each with decision tree gating on resolution ≥150dpi for print-bound outputs, else routed to web-only output at 72dpi with a LOW_RES_WEB_ONLY flag in metadata.
Example 2: Input: Folder with only a vague description, no actual file listing. Output: A request for the actual Drive listing (file names, types, counts) plus a placeholder Macro table with columns filled as "UNKNOWN — pending inventory," rather than inventing assets.
- Always separate what exists (Macro) from how it transforms (Meso) from exact operations (Micro) — do not blend them, downstream workflows cite these layers by name.
- Every quality gate must be a number or a boolean check, never "looks good" or "high quality."
- Every workflow must specify what happens on failure — no workflow should be able to silently emit a broken deliverable.
- Prefer fewer transformation hops when multiple paths are viable; state this precedence rule once globally, not per workflow.
- Metadata (source, date, version) is mandatory on every output — this is what makes rerun determinism auditable.
- Keep workflow count to 3-5; more dilutes precedence clarity and operator usability.
- Don't invent an asset inventory when the actual folder contents are unknown — request the listing.
- Don't write vague transformation steps ("enhance the image") — specify the operation, tool-equivalent, and threshold.
- Don't omit the adversarial counter-argument — it's required per workflow, not optional color.
- Don't let precedence be implicit or workflow-local when two paths can claim the same asset — resolve globally, once.
- Don't design workflows that require manual design/layout judgment calls at runtime — that defeats "minimal post-processing"; push judgment calls into upstream decision trees instead.