Skip to content

Add KingKong builtin template (Hard mode, ~2.5× Sun difficulty) - #39

Merged
ppXD merged 1 commit into
mainfrom
feat/kingkong-template
May 19, 2026
Merged

ppXD merged 1 commit into
mainfrom
feat/kingkong-template

Conversation

@ppXD

@ppXD ppXD commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Third builtin pet template, targeting the difficulty slot above Sun. Visuals: 10 sprites that arc from a black-stone egg through young silverback to a cyborg titan with a glowing gold gauntlet (final form).

Template Difficulty Display order L99 cum
Unicorn Easy 1 37,950
Sun (Wukong) Medium 2 37,950
KingKong Hard 3 47,436

Difficulty design — ~2.5× Sun

The rule_mult clamp floor of 0.5 means usage rules can't go any lower than Sun. So the 2.5× delta comes from two compounding levers:

Activity rules (chat is silent, milestones halved)

Rule Sun KingKong Why
session_start 2 1 halved
user_prompt 1 0 chatting doesn't reward
assistant_stop 0 0 (unchanged)
tool_success 0 0 (unchanged)
task_completed 7 3 halved milestone
subagent_stop 5 2 halved milestone
pre_compact 1 0 eliminated

Net: only deliberate progress moves the meter (task done, subagent dispatched) plus AI token usage.

Level curve — 1.25× Sun

cum(L) = 200 + 188·(L-1) + 3·(L-1)²
  L1 = 200       (hatch — consistent across all builtins)
  L99 = 47,436   (Sun: 37,950 → ratio 1.250×)

Combined effect

Profile Sun XP/conv KingKong XP/conv Total time vs Sun
Light (5t/conv) 12 ~6 ~2.5×
Medium (10t/conv) 29 ~14 ~2.6×
Heavy (15t/conv) 44 ~21 ~2.5×

Hits the design target across all usage profiles, not just one.

Display ordering — new display_order field

Adds meta.display_order: Option<i32> to TemplateMeta. EggPicker.tsx sorts by:

  1. Source (builtin → community → custom)
  2. display_order (lower first; absent → +Infinity, falls to tail)
  3. Name alphabetically (tiebreaker)

So the picker now reads top-to-bottom: Unicorn → Sun → KingKong → [community/custom by name].

Visual + flavor

  • Labels: "Hard" (black/gold) + "Challenge" (gold/black)
  • Default pet name: KingKong
  • Species flavor: "Forged in obsidian, ascending in titanium."
  • Stage arc: obsidian egg → young primate → silverback → armoured stride → first circuits → cyborg legend

Coverage

  • builtin_dirs_exist smoke test extended to assert kingkong/ is bundled via include_dir!
  • New pick_template_kingkong_loads_and_creates_pet integration test pins end-to-end load + snapshot (matches the unicorn / sun canaries)
  • 310/310 lib tests pass; desktop bundle + tsc --noEmit clean

Test plan

  • Lib tests (310/310 stable)
  • Desktop bundle cargo check clean
  • tsc --noEmit clean
  • After merge: launch app, EggPicker shows Unicorn → Sun → KingKong in that order
  • Create a KingKong pet, verify no act-user-prompt events appear in xp_event (only task/subagent/session/usage)

🤖 Generated with Claude Code

New builtin pet template targeting the "much harder" slot above Sun.
The image set (10 sprites from black-stone egg through cyborg
legend) lives at templates/builtin/kingkong/stages/stage_*/sprite.png.

# Difficulty design — ~2.5× Sun, achieved through rules + curve

The rule_mult clamp floor of 0.5 means usage rules can't go any
lower than Sun's. So extra difficulty comes from two compounding
levers:

  1. Activity rules — most cut to zero, milestones halved:
       session_start    2 → 1
       user_prompt      1 → 0     ← chat doesn't reward
       assistant_stop   0 (unchanged from Sun)
       tool_success     0 (unchanged)
       task_completed   7 → 3     ← halved milestone
       subagent_stop    5 → 2     ← halved milestone
       pre_compact      1 → 0     ← eliminated
     Idle-chat dominance is gone; only deliberate progress moves
     the meter (tasks, subagents) plus AI token usage.

  2. Level curve — 1.25× Sun via formula
        cum(L) = 200 + 188·(L-1) + 3·(L-1)²
     L1 = 200 (hatch anchor, consistent across all templates)
     L99 = 47,436 (Sun: 37,950, ratio 1.250×)

Per-conv XP projection vs Sun (using PR #37 + #38 baselines):

  Profile       Sun XP/conv  KingKong XP/conv  Combined harder
  Light (5t)    12           ~6                ~2.5× total time
  Medium (10t)  29           ~14               ~2.6×
  Heavy (15t)   44           ~21               ~2.5×

Stage triggers identical to Unicorn/Sun (L0/1/7/15/25/40/55/72/86/99).

# Display ordering

Adds `display_order: Option<i32>` to TemplateMeta. Builtin ladder:

  unicorn   display_order=1   (Easy)
  sun       display_order=2   (Medium)
  kingkong  display_order=3   (Hard)

EggPicker.tsx sorts by source → display_order → name. Templates
without `display_order` (user-imported community ones) fall to the
tail and sort by name there.

# Visual + flavor

Labels: "Hard" (black/gold) + "Challenge" (gold/black) — gives the
row an immediately ominous chip pair vs Sun's warm Medium/Wukong.

Stage flavor reads as an evolution arc: obsidian egg → young
primate → silverback → armoured stride → first circuits → cyborg
legend. Default pet name "KingKong"; species flavor "Forged in
obsidian, ascending in titanium."

# Coverage

  - `builtin_dirs_exist` now asserts kingkong/ is bundled in
    include_dir!
  - new `pick_template_kingkong_loads_and_creates_pet` integration
    test pins end-to-end load + snapshot (matches the unicorn /
    sun canaries — every builtin gets its own load smoke test)
  - 310/310 lib tests pass; desktop bundle + tsc clean
@github-actions github-actions Bot added the feature Auto-applied by .github/workflows/auto-label.yml label May 19, 2026
@ppXD
ppXD merged commit 57b0092 into main May 19, 2026
4 checks passed
@ppXD
ppXD deleted the feat/kingkong-template branch May 19, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Auto-applied by .github/workflows/auto-label.yml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant