Add baoyu-skills package
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
---
|
||||
name: first-time-setup
|
||||
description: First-time setup flow for baoyu-infographic preferences
|
||||
---
|
||||
|
||||
# First-Time Setup
|
||||
|
||||
## Overview
|
||||
|
||||
When no EXTEND.md is found, guide the user through preference setup before generating any infographic. Saved preferences shift Step-3 recommendations and Step-4 defaults only — they never bypass Step 4 confirmation (see the `## Confirmation Policy` section in SKILL.md).
|
||||
|
||||
**⛔ BLOCKING OPERATION**: This setup MUST complete before ANY other workflow steps. Do NOT:
|
||||
- Ask about source content or topic
|
||||
- Ask about layout, style, or aspect
|
||||
- Begin Step 1.2 content analysis
|
||||
|
||||
ONLY ask the questions in this setup flow, save EXTEND.md, then continue to Step 1.2.
|
||||
|
||||
## Setup Flow
|
||||
|
||||
```
|
||||
No EXTEND.md found
|
||||
│
|
||||
▼
|
||||
┌─────────────────────┐
|
||||
│ AskUserQuestion │
|
||||
│ (all questions) │
|
||||
└─────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────┐
|
||||
│ Create EXTEND.md │
|
||||
└─────────────────────┘
|
||||
│
|
||||
▼
|
||||
Continue to Step 1.2
|
||||
```
|
||||
|
||||
## Questions
|
||||
|
||||
**Language**: Use the user's input language for question text. Do not always default to English.
|
||||
|
||||
Use a single `AskUserQuestion` with multiple questions (the runtime auto-adds an "Other" option):
|
||||
|
||||
### Question 1: Preferred Layout
|
||||
|
||||
```
|
||||
header: "Layout"
|
||||
question: "Default layout preference?"
|
||||
options:
|
||||
- label: "Auto-select (Recommended)"
|
||||
description: "Pick layout per content in Step 3"
|
||||
- label: "bento-grid"
|
||||
description: "Multiple topics, overview (general default)"
|
||||
- label: "linear-progression"
|
||||
description: "Timelines, processes, tutorials"
|
||||
- label: "dense-modules"
|
||||
description: "High-density modules, data-rich guides"
|
||||
```
|
||||
|
||||
### Question 2: Preferred Style
|
||||
|
||||
```
|
||||
header: "Style"
|
||||
question: "Default visual style preference?"
|
||||
options:
|
||||
- label: "Auto-select (Recommended)"
|
||||
description: "Pick style per tone in Step 3"
|
||||
- label: "craft-handmade"
|
||||
description: "Hand-drawn, paper craft (general default)"
|
||||
- label: "corporate-memphis"
|
||||
description: "Flat vector, vibrant"
|
||||
- label: "morandi-journal"
|
||||
description: "Hand-drawn doodle, warm Morandi tones"
|
||||
```
|
||||
|
||||
### Question 3: Preferred Aspect
|
||||
|
||||
```
|
||||
header: "Aspect"
|
||||
question: "Default aspect ratio?"
|
||||
options:
|
||||
- label: "Auto-select (Recommended)"
|
||||
description: "Pick per layout in Step 4"
|
||||
- label: "landscape"
|
||||
description: "16:9 (slides, blogs, web)"
|
||||
- label: "portrait"
|
||||
description: "9:16 (mobile, social, dense modules)"
|
||||
- label: "square"
|
||||
description: "1:1 (social, thumbnails)"
|
||||
```
|
||||
|
||||
### Question 4: Language
|
||||
|
||||
```
|
||||
header: "Language"
|
||||
question: "Output language for infographic text?"
|
||||
options:
|
||||
- label: "Auto-detect (Recommended)"
|
||||
description: "Match source content language"
|
||||
- label: "zh"
|
||||
description: "Chinese (中文)"
|
||||
- label: "en"
|
||||
description: "English"
|
||||
```
|
||||
|
||||
### Question 5: Save Location
|
||||
|
||||
```
|
||||
header: "Save"
|
||||
question: "Where to save preferences?"
|
||||
options:
|
||||
- label: "Project"
|
||||
description: ".baoyu-skills/ (this project only)"
|
||||
- label: "User"
|
||||
description: "~/.baoyu-skills/ (all projects)"
|
||||
```
|
||||
|
||||
## Save Locations
|
||||
|
||||
| Choice | Path | Scope |
|
||||
|--------|------|-------|
|
||||
| Project | `.baoyu-skills/baoyu-infographic/EXTEND.md` | Current project |
|
||||
| User | `~/.baoyu-skills/baoyu-infographic/EXTEND.md` | All projects |
|
||||
|
||||
XDG path (`${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-infographic/EXTEND.md`) is also recognized at read time but not offered as a save target during first-time setup.
|
||||
|
||||
## After Setup
|
||||
|
||||
1. Create the directory if needed
|
||||
2. Write EXTEND.md with frontmatter (see template below)
|
||||
3. Confirm: "Preferences saved to [path]"
|
||||
4. Continue to Step 1.2
|
||||
|
||||
## EXTEND.md Template
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: 1
|
||||
preferred_layout: [selected layout or null]
|
||||
preferred_style: [selected style or null]
|
||||
preferred_aspect: [landscape|portrait|square|null]
|
||||
language: [selected language or null]
|
||||
preferred_image_backend: auto
|
||||
custom_styles: []
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend: auto` is the baked-in default — first-time setup never asks about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when one is available, and falls back to installed backends like `baoyu-image-gen`.
|
||||
|
||||
## Modifying Preferences Later
|
||||
|
||||
See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change layout/style defaults, retrigger setup). Full schema: `references/config/preferences-schema.md`.
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
name: preferences-schema
|
||||
description: EXTEND.md YAML schema for baoyu-infographic user preferences
|
||||
---
|
||||
|
||||
# Preferences Schema
|
||||
|
||||
## Full Schema
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: 1
|
||||
|
||||
preferred_layout: null # any of the 21 layouts (see Layout Gallery in SKILL.md) or null
|
||||
preferred_style: null # any of the 21 styles (see Style Gallery in SKILL.md) or null
|
||||
preferred_aspect: null # landscape|portrait|square|null (custom W:H also accepted)
|
||||
|
||||
language: null # zh|en|ja|ko|null (null = auto-detect from source)
|
||||
|
||||
preferred_image_backend: auto # auto|ask|<backend-id>
|
||||
|
||||
custom_styles: # extra style definitions merged with the 21 built-ins
|
||||
- name: my-brand
|
||||
description: "Short description shown in Step 3 recommendations"
|
||||
prompt_fragment: "Style traits to inject into Step 5 prompt"
|
||||
---
|
||||
```
|
||||
|
||||
## Field Reference
|
||||
|
||||
| Field | Type | Default | Description |
|
||||
|-------|------|---------|-------------|
|
||||
| `version` | int | 1 | Schema version |
|
||||
| `preferred_layout` | string\|null | null | Pre-selected layout — surfaces as the top recommendation in Step 3 |
|
||||
| `preferred_style` | string\|null | null | Pre-selected style — surfaces as the top recommendation in Step 3 |
|
||||
| `preferred_aspect` | string\|null | null | Default aspect for Step 4 (named preset or W:H string) |
|
||||
| `language` | string\|null | null | Output language (null = auto-detect from source content) |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-image-gen`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. |
|
||||
| `custom_styles` | array | [] | Additional styles available alongside the 21 built-ins |
|
||||
|
||||
Backend resolution logic is documented in the `## Image Generation Tools` section of `SKILL.md`. This doc only defines the field.
|
||||
|
||||
All fields in this schema are defaults only — they shape Step-3 recommendations and Step-4 defaults but never bypass Step 4 confirmation (see the `## Confirmation Policy` section in SKILL.md).
|
||||
|
||||
Example backend ids:
|
||||
|
||||
| Value | Meaning |
|
||||
|-------|---------|
|
||||
| `codex-imagegen` | Codex built-in `imagegen` tool |
|
||||
| `baoyu-image-gen` | `baoyu-image-gen` skill / script backend |
|
||||
| `image_generate` | Generic runtime image tool such as Hermes |
|
||||
|
||||
## Layout Options
|
||||
|
||||
See the **Layout Gallery (21)** table in `SKILL.md` for the canonical list. Common picks:
|
||||
|
||||
| Value | Best For |
|
||||
|-------|----------|
|
||||
| `bento-grid` | General default — overview, multiple topics |
|
||||
| `linear-progression` | Timelines, processes, tutorials |
|
||||
| `dense-modules` | High-density modules, data-rich guides |
|
||||
| `hub-spoke` | Central concept with related items |
|
||||
| `dashboard` | Metrics, KPIs |
|
||||
|
||||
## Style Options
|
||||
|
||||
See the **Style Gallery (21)** table in `SKILL.md` for the canonical list. Common picks:
|
||||
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `craft-handmade` | Hand-drawn, paper craft (default) |
|
||||
| `corporate-memphis` | Flat vector, vibrant |
|
||||
| `morandi-journal` | Hand-drawn doodle, warm Morandi tones |
|
||||
| `pop-laboratory` | Blueprint grid, lab precision |
|
||||
| `retro-pop-grid` | 1970s retro pop art, Swiss grid |
|
||||
|
||||
## Aspect Options
|
||||
|
||||
| Value | Ratio | Notes |
|
||||
|-------|-------|-------|
|
||||
| `landscape` | 16:9 | Slides, blog headers, web banners |
|
||||
| `portrait` | 9:16 | Mobile, social, dense modules (default for `dense-modules`) |
|
||||
| `square` | 1:1 | Social posts, thumbnails |
|
||||
| Custom W:H | e.g. `3:4`, `4:3`, `2.35:1` | Pass through verbatim to the prompt |
|
||||
|
||||
## Custom Style Fields
|
||||
|
||||
| Field | Required | Description |
|
||||
|-------|----------|-------------|
|
||||
| `name` | Yes | Unique style identifier (kebab-case) |
|
||||
| `description` | Yes | One-line description shown in Step 3 recommendations |
|
||||
| `prompt_fragment` | Yes | Style traits appended into the Step 5 prompt body |
|
||||
|
||||
## Example: Minimal Preferences
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: 1
|
||||
preferred_layout: bento-grid
|
||||
preferred_style: craft-handmade
|
||||
language: zh
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend` is omitted above; absence is treated as `auto`.
|
||||
|
||||
## Example: Full Preferences
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: 1
|
||||
|
||||
preferred_layout: dense-modules
|
||||
preferred_style: morandi-journal
|
||||
preferred_aspect: portrait
|
||||
|
||||
language: zh
|
||||
|
||||
preferred_image_backend: codex-imagegen
|
||||
|
||||
custom_styles:
|
||||
- name: my-brand
|
||||
description: "Brand-aligned warm pastel infographic"
|
||||
prompt_fragment: "Use brand pastel palette (#F2C7B6, #B6D7E8, #C8E0B4); rounded rectangles; warm hand-drawn outlines; ample whitespace."
|
||||
---
|
||||
```
|
||||
Reference in New Issue
Block a user