Skip to content

fix(cola-avatar-pack): prompt stability, bg detection, color & tagline quality#25

Merged
0xFANGO merged 5 commits intomainfrom
fix/avatar-pack-improvements
Apr 13, 2026
Merged

fix(cola-avatar-pack): prompt stability, bg detection, color & tagline quality#25
0xFANGO merged 5 commits intomainfrom
fix/avatar-pack-improvements

Conversation

@latentflux42
Copy link
Copy Markdown
Contributor

Summary

Addresses P0/P1 issues in the Cola Avatar Pack: prompt randomness (#8), cat overrepresentation (#1), opaque backgrounds (#3), and tagline homogeneity (#4).

Prompt stability (#8)

  • Slot micro-templates with fixed sentence structure for base_prompt
  • Prompt validation step (Phase 2.6): no Chinese, 65-95 words, no repeated adjectives
  • Prompt freeze (Phase 2.7): avatar.json is source of truth, Phase 5+ reads verbatim
  • schema_version upgraded to 2 with observability fields (species, species_rationale, palette_summary, outfit_summary, detail_summary)

Background fix (#3)

  • transparent backgroundplain solid white background in prompt
  • Expanded negative_prompt with checkerboard, transparency grid, gradient, paper texture
  • New check_background() with 5-step decision tree (fail-safe default)
  • New --check-bg CLI mode with structured JSON output
  • Phase 5.5 rewritten to use script detection instead of LLM visual check
  • Two-tier _is_bg_remnant() thresholds (bright/mid/dark)
  • Border flood-fill supplement (Stage A.5)

Species diversity (#1)

  • Cat removed from 活泼 and 毒舌 pools, replaced with 柴犬 and 蜥蜴
  • Non-cat priority rule with 3 explicit exceptions (cat name, existing setting, user request)

Color quality

  • Brightened WUXING_COLORS primary and light values across all 5 elements
  • Profile card description text lightened from rgb(90,90,90) to rgb(110,110,115)
  • Added desaturated colors, muted palette, washed-out colors to negative prompt

Tagline quality (#4)

  • Phase 2.4 rewritten: tagline must bind to character-specific anchors
  • Anchor priority model (high: unique_detail/name_origin/outfit; mid: species/speech_habit; low: abstract labels)
  • Phase 2.4.1 tagline validation via keyword substring matching
  • Good/bad examples updated to demonstrate anchor-bound vs generic taglines

Terminology

  • All Chinese-facing "profile card" replaced with "自画像卡"

Test plan

  • --check-bg tested with 6 background types (white/transparent/checkerboard/gradient/gray/paper)
  • remove_background two-tier thresholds verified (dark outlines preserved, bright bg removed)
  • GIF pipeline: all 4 emotions generate correctly
  • Profile card: 5 wuxing × 3 rarity combinations render correctly
  • Meme stickers: all 3 types + both locales
  • save_base_image outputs 3 files (original, 128px, 256px)
  • CLI arg validation: --check-bg standalone mode, missing args error, missing file error
  • GENERATE.md consistency: no stale terminology, correct section ordering, schema_version=2

🤖 Generated with Claude Code

latentflux42 and others added 5 commits April 9, 2026 19:48
…ity, sprite sheet spike

Batch 1 — GENERATE.md prompt layer:
- Cat demotion: remove cats from 活泼/毒舌 pools, add non-cat priority rule with 3 exceptions
- Slot micro-templates with fixed sentence structure for base_prompt
- Switch from transparent background to plain solid white background
- Expand negative_prompt with checkerboard, transparency grid, gradient, paper texture
- Add Phase 2.6 prompt validation (no Chinese, 65-95 words, no repeats)
- Add Phase 2.7 prompt freeze (avatar.json is source of truth for Phase 5+)
- Upgrade avatar.json to schema_version 2 with observability fields
- Rewrite Phase 5.5 to use --check-bg script instead of LLM visual check
- Add differentiated failure strategy (core input stops, single item skips)
- Update Phase 7 to only send files present in avatar.json

Batch 2 — process_avatar.py background detection:
- Two-tier _is_bg_remnant thresholds (bright/mid/dark)
- Border flood-fill supplement (Stage A.5) between existing fill and Stage B
- New check_background() with 5-step decision tree (fail-safe default)
- New --check-bg CLI mode with JSON output

Batch 3 spike — sprite_sheet_spike.py:
- Standalone script for Banana-inspired v1 validation
- Splits 1x4 sprite sheet, validates frames, assembles ping-pong GIF
- Imports from process_avatar.py, no code duplication

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(color batch 1)

- Brighten WUXING_COLORS primary and light values across all 5 elements
  (wood, fire, metal, water, earth) to reduce dark/muted card appearance
- Lighten profile card description text from rgb(90,90,90) to rgb(110,110,115)
- Add "desaturated colors, muted palette, washed-out colors" to negative_prompt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Redefine Phase 2.4 goal: tagline must be character-specific, not generic
- Add anchor priority model (high: unique_detail/name_origin/outfit;
  mid: species/speech_habit; low: abstract personality labels)
- Rewrite tagline prompt to require at least 1 character-specific anchor
- Expand Character info inputs to include species, unique_detail,
  outfit_summary, name_origin, speech_habit
- Add Phase 2.4.1 tagline validation: substring match against anchor
  keywords with pass/fail_generic/fail_line2_redundant outcomes
- Update good/bad examples to demonstrate anchor-bound vs generic taglines

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…facing text

Replace all descriptive uses of "profile card" with "自画像卡" in
GENERATE.md and SKILL.md to prevent Cola from mixing English terms
into Chinese conversations with users.

Kept unchanged:
- English locale prompt (line 266) still says "profile card"
- Code identifiers: profile_card.png, --profile-only, "profile_card" JSON keys
- SKILL.md description has both: "profile card (自画像卡)"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone spike script not referenced by any skill flow.
Kept locally for Batch 3 validation but should not ship in PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@0xFANGO 0xFANGO merged commit c55099c into main Apr 13, 2026
1 check passed
@0xFANGO 0xFANGO deleted the fix/avatar-pack-improvements branch April 13, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants