This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 69debed11ce [tools] add doris-img-gen skill for blog (#4079)
69debed11ce is described below

commit 69debed11cefa1be2fa74c6ff8d26d83524a5c56
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Thu Aug 20 17:39:20 2026 +0800

    [tools] add doris-img-gen skill for blog (#4079)
    
    Co-authored-by: morningman <[email protected]>
---
 doc-tools/skills/doris-img-gen/SKILL.md            | 110 +++++++++++++++++++++
 doc-tools/skills/doris-img-gen/agents/openai.yaml  |   5 +
 .../skills/doris-img-gen/assets/meet-d-crew.jpg    | Bin 0 -> 164870 bytes
 .../doris-img-gen/references/visual-style.md       |  48 +++++++++
 .../skills/doris-img-gen/scripts/select_mascot.py  |  52 ++++++++++
 5 files changed, 215 insertions(+)

diff --git a/doc-tools/skills/doris-img-gen/SKILL.md 
b/doc-tools/skills/doris-img-gen/SKILL.md
new file mode 100644
index 00000000000..401811e1795
--- /dev/null
+++ b/doc-tools/skills/doris-img-gen/SKILL.md
@@ -0,0 +1,110 @@
+---
+name: doris-img-gen
+description: Create Apache Doris article illustrations in the Doris hand-drawn 
whiteboard style, using a randomly selected Pip, Dori, or Flux mascot only when 
a task, guide, operator, diagnosis, or anthropomorphic narrative benefits from 
a character. Use when the user invokes $doris-img-gen or asks for a Doris 
technical article illustration, concept visual, infographic, architecture 
diagram, process diagram, or mascot-assisted explanatory graphic.
+---
+
+# Doris Article Illustration Generator
+
+Create technically clear, visually consistent illustrations for Apache Doris 
articles. Treat the text after `$doris-img-gen` as the primary content brief.
+
+## Prepare
+
+1. Read `references/visual-style.md` completely before generating an image.
+2. Extract the requested concepts, relationships, sequence, labels, and layout 
constraints. Preserve them; do not invent technical facts, metrics, components, 
or product claims.
+3. If the request refers to an article, section, or local draft, read the 
relevant passage before composing the illustration.
+4. Keep all in-image wording in English by default. Use the user's exact 
quoted labels when supplied. Keep labels short and render each label exactly 
once.
+
+## Decide Whether to Use a Mascot
+
+Apply the **semantic-role test**: include a mascot only when it performs a 
meaningful action that can be stated as a verb in the image.
+
+Include one mascot when the scene needs:
+
+- an operator starting or running a task;
+- an investigator searching, observing, comparing, or diagnosing;
+- a guide teaching or walking readers through a process;
+- a central actor already present in the requested narrative;
+- a human-like moment that makes an abstract idea easier to understand.
+
+Omit the mascot when the image is primarily:
+
+- architecture, topology, data flow, or component relationships;
+- a chart, table, query plan, dashboard, or factual comparison;
+- a compact process whose clarity would be reduced by a character;
+- a scene where the mascot would be decorative rather than explanatory.
+
+Never add a mascot only to fill space. Use one mascot by default. Use more 
than one only when interaction among roles is itself part of the requested 
content.
+
+An explicit user request for a character always overrides random selection.
+
+Treat the character roles as personality and prop hints, not fixed assignment 
rules:
+
+- **Pip — The Query Runner:** purple triangular character; can run, launch, 
point, inspect, or guide.
+- **Dori — The Core Engine:** cyan capsule character; can compute, operate, 
inspect, compare, or guide.
+- **Flux — The Data Explorer:** mint-green diagonal capsule character; can 
search, investigate, connect, inspect, or guide.
+
+### Randomize Mascot Selection
+
+After applying the semantic-role test, count only the images that need a 
mascot and do not already have a user-specified character. Randomize those 
slots by running the bundled selector once from the skill directory:
+
+```bash
+python3 scripts/select_mascot.py --count <number-of-unspecified-mascot-slots>
+```
+
+Assign the returned names to the mascot-bearing images in output order. For a 
single image, omit `--count` or pass `--count 1`.
+
+The selector creates a fresh system-random order on every invocation. In a 
batch, it uses every character once before reshuffling and avoids the same 
character on adjacent slots. Use its output exactly: do not replace or rerun a 
valid result because another mascot seems more suitable for the scene. Do not 
run the selector for images that fail the semantic-role test.
+
+Inspect `assets/meet-d-crew.jpg` with an image-viewing tool whenever a mascot 
will appear. Use it as the identity reference and preserve the selected 
character's silhouette, body color, face, and simple black limbs. Translate the 
character into the illustration style instead of copying the reference card 
layout or its surrounding text.
+
+## Compose the Image Prompt
+
+Build a structured prompt with these fields:
+
+```text
+Use case: infographic-diagram
+Asset type: Apache Doris technical article illustration
+Primary request: <content and relationships from the user's brief>
+Scene/backdrop: <only what is needed to explain the content>
+Subject: <main concepts, icons, arrows, and the mascot's action if included>
+Style/medium: <the canonical style from references/visual-style.md>
+Composition/framing: landscape 1200 x 630 with a clear reading order and 
generous margins
+Text (verbatim): <exact English labels, or "No text">
+Color palette: <the canonical palette from references/visual-style.md>
+Constraints: technically faithful; readable labels; consistent icon scale; 
clear arrow direction; no extra text; no watermark; no photorealism; no 3D
+Avoid: decorative clutter; dense paragraphs; tiny labels; unrelated logos; 
mascot use without a semantic role
+```
+
+If using the D-Crew reference, add:
+
+```text
+Input images: Image N is the D-Crew identity reference. Use only the selected 
mascot; do not reproduce the reference poster, logo lockup, cards, headings, or 
descriptive copy.
+Character consistency: preserve the selected mascot's recognizable geometry, 
color, face, and limbs; render it with the same hand-drawn marker linework as 
the rest of the illustration.
+```
+
+If the user also supplies a composition reference, identify each input image 
by number and role. Preserve the composition's information architecture without 
copying irrelevant artifacts.
+
+## Generate and Review
+
+1. Use the built-in image-generation tool by default.
+2. For a new image without a mascot or other supplied image reference, omit 
all reference-image parameters.
+3. When using a local mascot or composition reference, pass the required local 
files through `referenced_image_paths` and describe each image's role 
explicitly.
+4. Save the final image in the user's project or requested destination as a 
PNG with a descriptive filename.
+5. Inspect the result at full resolution. Verify:
+   - all requested concepts and relationships are present;
+   - arrow directions and process order are correct;
+   - every label is English, legible, and spelled correctly;
+   - no unrequested wording appears;
+   - the mascot decision adds meaning, and the chosen character follows the 
random rotation or the user's explicit request;
+   - the image follows the canonical palette, background, linework, and 
dimensions.
+6. If any verification fails, refine the smallest necessary area and inspect 
again.
+
+## Invocation Examples
+
+```text
+$doris-img-gen Show a query diagnosis loop with the exact labels "Hypothesis", 
"Evidence", "Observation", and "Elimination". A data investigator reviews 
profile, plan, chart, and checklist evidence.
+```
+
+```text
+$doris-img-gen Draw a left-to-right Doris data flow from client to FE to BE to 
object storage. Use no mascot and no text beyond the component labels.
+```
diff --git a/doc-tools/skills/doris-img-gen/agents/openai.yaml 
b/doc-tools/skills/doris-img-gen/agents/openai.yaml
new file mode 100644
index 00000000000..c7a00da9cbd
--- /dev/null
+++ b/doc-tools/skills/doris-img-gen/agents/openai.yaml
@@ -0,0 +1,5 @@
+interface:
+  display_name: "Doris Image Generator"
+  short_description: "Create Doris article illustrations with optional mascot 
use"
+  default_prompt: "Use $doris-img-gen to create a Doris article illustration 
from this content brief."
+  brand_color: "#1C6FF0"
diff --git a/doc-tools/skills/doris-img-gen/assets/meet-d-crew.jpg 
b/doc-tools/skills/doris-img-gen/assets/meet-d-crew.jpg
new file mode 100644
index 00000000000..f0fd922040e
Binary files /dev/null and 
b/doc-tools/skills/doris-img-gen/assets/meet-d-crew.jpg differ
diff --git a/doc-tools/skills/doris-img-gen/references/visual-style.md 
b/doc-tools/skills/doris-img-gen/references/visual-style.md
new file mode 100644
index 00000000000..cc1402b7942
--- /dev/null
+++ b/doc-tools/skills/doris-img-gen/references/visual-style.md
@@ -0,0 +1,48 @@
+# Doris Article Illustration Visual Style
+
+## Canonical Style
+
+Use a hand-drawn whiteboard sketch style for technical illustration: clean 
line work with slightly imperfect strokes and a marker-pen feel. Use thin black 
outlines, minimal shading, flat hand-drawn icons, and clean sans-serif labels. 
Keep the result friendly and editorial rather than childish.
+
+Do not use photorealism, 3D rendering, glossy materials, cinematic lighting, 
heavy shadows, gradients, stock-photo elements, or decorative textures.
+
+## Palette
+
+- Primary blue: `#1C6FF0` — main arrows, key outlines, important labels.
+- Sky blue: `#6FA8F5` — secondary fills and supporting details.
+- Soft orange: `#FF8A3D` — sparse accents, warnings, questions, or focal 
highlights.
+- Warm beige: `#FDF8F0` — full-canvas background.
+- Near-black: thin outlines and simple character limbs only.
+
+Use the primary blue as the visual backbone. Apply orange sparingly so it 
signals meaning instead of becoming decoration.
+
+## Canvas and Composition
+
+- Default canvas: landscape `1200 x 630` pixels.
+- Keep generous outer margins and visible separation between concepts.
+- Prefer one clear reading order: left to right, top to bottom, or one 
unambiguous loop.
+- Keep arrows thick enough to scan quickly and make every arrowhead explicit.
+- Use flat icons with a consistent level of detail and visual weight.
+- Use short English labels close to the objects they identify.
+- Avoid paragraphs inside the image. Prefer five or fewer words per label 
unless the user explicitly requires more.
+
+## D-Crew Identity Guide
+
+The canonical identity reference is `../assets/meet-d-crew.jpg`.
+
+- **Pip:** purple right-pointing triangular body, white circular eyes, small 
black smile, simple black stick arms and legs.
+- **Dori:** cyan-blue upright rounded capsule body, white circular eyes, small 
black smile, simple black stick arms and legs.
+- **Flux:** mint-green diagonal rounded capsule or leaf-like body, white 
circular eyes, simple black mouth, black stick arms and legs; often suited to a 
magnifying glass or exploration gesture.
+
+When translating a mascot into the whiteboard style:
+
+- preserve the body silhouette and dominant color;
+- preserve the simple face and black limbs;
+- redraw outlines with the same slightly imperfect marker strokes as the 
diagram;
+- allow a prop or pose only when it explains the role;
+- do not add costumes, hair, hats, complex clothing, or a robot body;
+- do not reproduce the Apache Doris logo, the “Meet the D-Crew” poster, 
character cards, or reference-image text unless explicitly requested.
+
+## Quality Bar
+
+The illustration should remain understandable when viewed at article width. 
Information hierarchy comes from spacing, arrows, scale, and restrained 
color—not from visual effects. Every element must either communicate a concept, 
show a relationship, identify a component, or support the selected mascot's 
explanatory action.
diff --git a/doc-tools/skills/doris-img-gen/scripts/select_mascot.py 
b/doc-tools/skills/doris-img-gen/scripts/select_mascot.py
new file mode 100644
index 00000000000..622277279ec
--- /dev/null
+++ b/doc-tools/skills/doris-img-gen/scripts/select_mascot.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+"""Randomly select D-Crew mascots for one image or an illustration batch."""
+
+from __future__ import annotations
+
+import argparse
+import secrets
+
+
+MASCOTS = ["Pip", "Dori", "Flux"]
+
+
+def positive_int(value: str) -> int:
+    count = int(value)
+    if count < 1:
+        raise argparse.ArgumentTypeError("count must be at least 1")
+    return count
+
+
+def select_mascots(count: int) -> list[str]:
+    rng = secrets.SystemRandom()
+    selected: list[str] = []
+
+    while len(selected) < count:
+        cycle = MASCOTS.copy()
+        rng.shuffle(cycle)
+
+        if selected and cycle[0] == selected[-1]:
+            cycle[0], cycle[1] = cycle[1], cycle[0]
+
+        selected.extend(cycle)
+
+    return selected[:count]
+
+
+def main() -> None:
+    parser = argparse.ArgumentParser(
+        description="Select Pip, Dori, and Flux in randomized, balanced 
cycles."
+    )
+    parser.add_argument(
+        "--count",
+        type=positive_int,
+        default=1,
+        help="number of mascot-bearing image slots to fill (default: 1)",
+    )
+    args = parser.parse_args()
+
+    print("\n".join(select_mascots(args.count)))
+
+
+if __name__ == "__main__":
+    main()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to