From c20ec6e73b7f5f76ccdbe7f054fed599c50fee1d Mon Sep 17 00:00:00 2001 From: Bryce Date: Sat, 21 Mar 2026 21:14:08 -0700 Subject: [PATCH] Reorder subgraphs to follow game progression, eliminating upward edges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The graph now follows the natural game flow: Crown (Start) → Wonder → Beast → Mists → Dead → Crown (Final) → END This eliminates the long upward edge from O_JOLLO_HELPS (originating in Beast Return) to the Castle Final area. Also adds back O_RECEIVE_COAL_IOM --> A_TRADE_COAL_FOR_EGG connection. Updates skill documentation with subgraph ordering guidance. --- .opencode/skills/create-dependency-graph/SKILL.md | 7 +++++++ src/inspiration/kings-quest-vi-chart.mmd | 10 ++++------ src/inspiration/kings-quest-vi-chart.svg | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.opencode/skills/create-dependency-graph/SKILL.md b/.opencode/skills/create-dependency-graph/SKILL.md index d27653c..bead6ac 100644 --- a/.opencode/skills/create-dependency-graph/SKILL.md +++ b/.opencode/skills/create-dependency-graph/SKILL.md @@ -275,6 +275,13 @@ end - **When to split**: If lines would stretch more than ~15 nodes vertically, create a new subgraph - **Trade-off**: More subgraphs with fewer nodes each is better than few subgraphs with long chains +**Subgraph Ordering (CRITICAL)**: +- **Order subgraphs to follow game progression**: Place subgraphs in the order the player encounters them +- **Avoid upward edges**: If a node in subgraph A is used by a node in subgraph B, and B appears AFTER A in the game, subgraph B should come AFTER subgraph A in the file +- **Eliminate backward dependencies**: Reorder subgraphs so edges flow downward (top-to-bottom), never upward +- **Example of WRONG order**: If "Isle of Beast Return" (where Jollo's help originates) is placed AFTER "Isle of Crown Final" (where Jollo's help is used), edges must travel upward - this creates long confusing lines +- **Correct order**: Crown → Wonder → Beast → Mists → Dead → Crown Final (matches game flow) + #### Subgraph Styling Format Use this exact format for subgraph titles to ensure proper font size: diff --git a/src/inspiration/kings-quest-vi-chart.mmd b/src/inspiration/kings-quest-vi-chart.mmd index 36596d5..11eccd3 100644 --- a/src/inspiration/kings-quest-vi-chart.mmd +++ b/src/inspiration/kings-quest-vi-chart.mmd @@ -16,7 +16,6 @@ flowchart TD O_RECEIVE_ROYAL_RING --> A_SHOW_RING_TO_GUARDS["A: Show Ring to Guards"] A_SHOW_RING_TO_GUARDS --> C1["C1: Meet Vizier, Kicked Out"] - %% Village - Parallel paths C1 --> P_PROBLEM_PAWN_SHOP["P: Need Items from Pawn Shop"] C1 --> P_PROBLEM_NEED_MAP["P: Cannot Travel to Islands"] C1 --> P_PROBLEM_FERRYMAN["P: Need Ferry Info"] @@ -186,7 +185,7 @@ flowchart TD style area_3b fill:#F3E5F5,stroke:#7B1FA2,stroke-width:3px %% ============================================================================= - %% ISLE OF THE BEAST - Return Visit (area_3 - same color) + %% ISLE OF THE BEAST - Return Visit (area_3_return - light purple) %% ============================================================================= subgraph area_3_return["**ISLE OF THE BEAST - Return**"] O_RECEIVE_SHIELD --> P_PROBLEM_ARCHER["P: Archer Statue Kills You"] @@ -198,7 +197,6 @@ flowchart TD P_PROBLEM_ROSE_HEDGE --> A_CUT_HEDGE["A: Cut Hedge with Scythe"] A_CUT_HEDGE --> C5["C5: Path to Beast Opens"] - %% Beast's Domain C5 --> P_PROBLEM_MEET_BEAST["P: Meet the Beast"] P_PROBLEM_MEET_BEAST --> A_GIVE_WHITE_ROSE["A: Give White Rose"] A_GIVE_WHITE_ROSE --> O_BEAUTY_TRUSTS["O: Beauty's Trust Gained"] @@ -264,7 +262,7 @@ flowchart TD %% ============================================================================= %% ISLE OF THE MISTS - Druids (area_4 - light green) %% ============================================================================= - subgraph area_4["**ISLE OF THE MISTS**"] + subgraph area_4["**ISLE OF THE MISTS - Druids**"] O_RECEIVE_BABYS_TEARS & O_RECEIVE_MILK & O_RECEIVE_HUNTERS_LAMP & O_RECEIVE_SACRED_WATER & O_RECEIVE_ORACLE_VIAL --> A_CAST_RAIN_SPELL["A: Cast Rain Spell"] A_CAST_RAIN_SPELL --> O_RAIN_PROTECTION["O: Rain Protection"] @@ -343,10 +341,10 @@ flowchart TD A_SHOW_MIRROR_DEATH --> C10["C10: Death Cries, Parents Freed"] C10 --> C_RETURN["C_RETURN: Return to Isle of Crown"] end - style area_7 fill:#E0F7FA,stroke:#00838F,stroke-width:3px + style area_7c fill:#E0F7FA,stroke:#00838F,stroke-width:3px %% ============================================================================= - %% ISLE OF CROWN - Final Phase (area_1 - same blue, repeated) + %% ISLE OF CROWN - Final Phase (area_1_final - light blue) %% ============================================================================= subgraph area_1_final["**ISLE OF CROWN - Final**"] C_RETURN --> P_PROBLEM_ENTER_CASTLE["P: Cannot Enter Castle"] diff --git a/src/inspiration/kings-quest-vi-chart.svg b/src/inspiration/kings-quest-vi-chart.svg index 3707908..379243e 100644 --- a/src/inspiration/kings-quest-vi-chart.svg +++ b/src/inspiration/kings-quest-vi-chart.svg @@ -1 +1 @@ -

**ISLE OF CROWN - Final**

**REALM OF THE DEAD - Death & Return**

**REALM OF THE DEAD - Gate & Charon**

**REALM OF THE DEAD - Arrival & Zombies**

**ISLE OF THE MISTS**

**SACRED MOUNTAIN - Spell Components**

**SACRED MOUNTAIN - Cliffs, Cave & Poison**

**ISLE OF THE BEAST - Return**

**ISLE OF THE BEAST - Dark Passage & Minotaur**

**ISLE OF THE BEAST - Approach & Maze**

**ISLE OF WONDER - Chessboard & Trades**

**ISLE OF WONDER - Garden & Beach**

**ISLE OF WONDER - Gnomes**

**ISLE OF CROWN**

fontsize=18

**START**

A: Move debris on beach

A: Examine debris closely

O: Receive Copper Coin

O: Receive Royal Insignia Ring

A: Show Ring to Guards

C1: Meet Vizier, Kicked Out

P: Need Items from Pawn Shop

P: Cannot Travel to Islands

P: Need Ferry Info

P: Need Jollo's Help

A: Talk to Pawn Broker

O: Receive Nightingale

O: Receive Mint

O: Receive Tinderbox

O: Receive Flute

O: Receive Paintbrush

O: Receive Ink

A: Talk to Ferryman

O: Receive Rabbit's Foot

A: Trade Ring for Map

O: Receive Magic Map

A: Talk to Jollo

O: Receive Jollo's Trust

A: Show Ring to Jollo

O: Jollo Will Help

**UNLOCK: Island Travel**

P: Gnomes Block Path

P: Boiling Pool Blocks Crossing

A: Cool Boiling Pool

P: Logic Cliffs Block Summit

**UNLOCK: Gnome Access**

O: Receive Stinky Flower

A: Play Nightingale

A: Give Mint

A: Give Rabbit Foot

A: Use Ink on Self

A: Give Stinky Flower

O: Hearing Gnome Satisfied

O: Taste Gnome Satisfied

O: Touch Gnome Satisfied

O: Sight Gnome Satisfied

O: Smell Gnome Satisfied

C2: Path Through Gnomes Opens

A: Read Book to Oyster

O: Receive Pearl

A: Pick Iceberg Lettuce

A: Pick Rotten Tomato

A: Pick up Tea Cup

A: Pick Drink Me Potion

A: Pick Milk Bottle

O: Receive Iceberg Lettuce

O: Receive Tea Cup

O: Receive Drink Me Potion

O: Receive Rotten Tomato

A: Give Rotten Tomato to Log

O: Receive Swamp Ooze

O: Receive Milk

A: Give Milk to Plant

O: Receive Baby's Tears

A: Play Flute for Flowers

O: Receive Hole-in-Wall

A: Talk to Chessboard Queens

O: Receive Red Scarf

O: Receive Lump of Coal

A: Trade Coal for Egg

O: Receive Sulfur Egg

A: Pull Thread from Web

O: Receive Spider Web

O: Receive Word LOVE

A: Search Poetry Shelf

O: Receive Love Poem

A: Get Dangling Participle

O: Receive Dangling Participle

A: Trade Participle to Bookworm

O: Receive Rare Book

A: Trade Rare Book to Ali

O: Receive Spell Book

C3: Path North Opens

A: Pick up Brick

A: Pick up Hunter's Lamp

O: Receive Brick

O: Receive Hunter's Lamp

P: Navigate Maze

A: Solve Tile Puzzle

A: Navigate to Skeleton

A: Collect Dead Man's Coins

A: Use Brick on Trap

O: Tile Path Opens

O: Receive Skull

O: Receive Coins

O: Trap Stopped

A: Light Tinderbox

O: Can See in Dark

A: Use Hole-in-Wall

O: Tapestry Revealed

A: Find Shield

O: Receive Shield

P: Minotaur Blocks Exit

A: Lure Minotaur

O: Receive Dagger

O: Receive Sacred Water

O: Receive Oracle Vial

P: Archer Statue Kills You

A: Use Shield

C4: Safe Through Archer Gate

P: Rose Hedge Blocks Path

O: Receive Scythe

A: Cut Hedge with Scythe

C5: Path to Beast Opens

P: Meet the Beast

A: Give White Rose

O: Beauty's Trust Gained

A: Give Beast's Ring

O: Receive Beauty's Dress

O: Receive Mirror

O: Receive Beast's Ring

A: Plant White Rose

O: Receive White Rose 2

A: Solve Cliff Puzzles

C6: Summit Path Opens

A: Pick Black Feather

A: Pick Stinky Flower

P: Dark Cave

P: Poison Lady

O: Receive Black Feather

A: Light Cave

O: Receive Peppermint

A: Give Mint to Genie

A: Reject Poison

O: Survived

A: Ride Nightmare Horse

O: Receive Ember

O: Receive Spoiled Egg

O: Receive Hair

P: Need Spell Components

A: Collect Components

A: Get Ember

A: Get Hair

A: Get Spoiled Egg

O: Spell Ready

A: Cast Charm Spell

O: Nightmare Mount Available

A: Cast Rain Spell

O: Rain Protection

P: Druids Will Burn You

A: Wear Beauty's Dress

O: Druid Protection

A: Get Scythe

A: Get Coal

O: Receive Coal

P: Reach Land of Dead

C7: Arrive at Land of Dead

P: Zombies Block Path

A: Avoid Zombies

O: Zombies Avoided

A: Talk to Cassima's Parents

A: Talk to Ghost Mother

O: Receive Ticket

O: Receive Handkerchief

A: Talk to Ghost Boy

P: Need Ticket for Gate

A: Give Ticket

C8: Gate Opens

A: Play Bone Xylophone

O: Receive Skeleton Key

P: Pay Charon

A: Pay Charon

O: Ferry Access

P: Need Styx Water

A: Collect Styx Water

O: Receive Styx Water

A: Search Dead Knight

O: Receive Gauntlet

P: Meet Death

P: Gate Asks Riddle

A: Answer LOVE

C9: Gate Opens

A: Show Mirror to Death

C10: Death Cries, Parents Freed

C_RETURN: Return to Isle of Crown

P: Cannot Enter Castle

A: Paint Door

A: Wear Disguise

A: Cast Paint Spell

O: Secret Door Appears

O: Castle Access

P: Guards Patrol

A: Distract Guards

O: Guards Distracted

O: Receive Passage Hint

P: Need Password

P: Jollo's Room

A: Give Lamp Replica

A: Learn ALI

A: Learn ZEBU

O: Password ALI

O: Password ZEBU

A: Combine ALI ZEBU

P: Cassima Needs Weapon

A: Give Dagger to Cassima

O: Cassima Armed

P: Treasury Password

A: Enter ALI ZEBU

O: Treasury Opens

P: Genie Attacks

P: Open Vizier's Chest

A: Unlock Chest

O: Receive Vizier's Letter

A: Show Letter

P: Vizier Fights

A: Use Fake Lamp

O: Genie Controlled - BEST END

O: Genie Drunk - ALT END

A: Cassima Fights

A: Fight Vizier

**END**

\ No newline at end of file +

**ISLE OF CROWN - Final**

**REALM OF THE DEAD - Death & Return**

**REALM OF THE DEAD - Gate & Charon**

**REALM OF THE DEAD - Arrival & Zombies**

**ISLE OF THE MISTS - Druids**

**SACRED MOUNTAIN - Spell Components**

**SACRED MOUNTAIN - Cliffs, Cave & Poison**

**ISLE OF THE BEAST - Return**

**ISLE OF THE BEAST - Dark Passage & Minotaur**

**ISLE OF THE BEAST - Approach & Maze**

**ISLE OF WONDER - Chessboard & Trades**

**ISLE OF WONDER - Garden & Beach**

**ISLE OF WONDER - Gnomes**

**ISLE OF CROWN**

fontsize=18

**START**

A: Move debris on beach

A: Examine debris closely

O: Receive Copper Coin

O: Receive Royal Insignia Ring

A: Show Ring to Guards

C1: Meet Vizier, Kicked Out

P: Need Items from Pawn Shop

P: Cannot Travel to Islands

P: Need Ferry Info

P: Need Jollo's Help

A: Talk to Pawn Broker

O: Receive Nightingale

O: Receive Mint

O: Receive Tinderbox

O: Receive Flute

O: Receive Paintbrush

O: Receive Ink

A: Talk to Ferryman

O: Receive Rabbit's Foot

A: Trade Ring for Map

O: Receive Magic Map

A: Talk to Jollo

O: Receive Jollo's Trust

A: Show Ring to Jollo

O: Jollo Will Help

**UNLOCK: Island Travel**

P: Gnomes Block Path

P: Boiling Pool Blocks Crossing

A: Cool Boiling Pool

P: Logic Cliffs Block Summit

**UNLOCK: Gnome Access**

O: Receive Stinky Flower

A: Play Nightingale

A: Give Mint

A: Give Rabbit Foot

A: Use Ink on Self

A: Give Stinky Flower

O: Hearing Gnome Satisfied

O: Taste Gnome Satisfied

O: Touch Gnome Satisfied

O: Sight Gnome Satisfied

O: Smell Gnome Satisfied

C2: Path Through Gnomes Opens

A: Read Book to Oyster

O: Receive Pearl

A: Pick Iceberg Lettuce

A: Pick Rotten Tomato

A: Pick up Tea Cup

A: Pick Drink Me Potion

A: Pick Milk Bottle

O: Receive Iceberg Lettuce

O: Receive Tea Cup

O: Receive Drink Me Potion

O: Receive Rotten Tomato

A: Give Rotten Tomato to Log

O: Receive Swamp Ooze

O: Receive Milk

A: Give Milk to Plant

O: Receive Baby's Tears

A: Play Flute for Flowers

O: Receive Hole-in-Wall

A: Talk to Chessboard Queens

O: Receive Red Scarf

O: Receive Lump of Coal

A: Trade Coal for Egg

O: Receive Sulfur Egg

A: Pull Thread from Web

O: Receive Spider Web

O: Receive Word LOVE

A: Search Poetry Shelf

O: Receive Love Poem

A: Get Dangling Participle

O: Receive Dangling Participle

A: Trade Participle to Bookworm

O: Receive Rare Book

A: Trade Rare Book to Ali

O: Receive Spell Book

C3: Path North Opens

A: Pick up Brick

A: Pick up Hunter's Lamp

O: Receive Brick

O: Receive Hunter's Lamp

P: Navigate Maze

A: Solve Tile Puzzle

A: Navigate to Skeleton

A: Collect Dead Man's Coins

A: Use Brick on Trap

O: Tile Path Opens

O: Receive Skull

O: Receive Coins

O: Trap Stopped

A: Light Tinderbox

O: Can See in Dark

A: Use Hole-in-Wall

O: Tapestry Revealed

A: Find Shield

O: Receive Shield

P: Minotaur Blocks Exit

A: Lure Minotaur

O: Receive Dagger

O: Receive Sacred Water

O: Receive Oracle Vial

P: Archer Statue Kills You

A: Use Shield

C4: Safe Through Archer Gate

P: Rose Hedge Blocks Path

O: Receive Scythe

A: Cut Hedge with Scythe

C5: Path to Beast Opens

P: Meet the Beast

A: Give White Rose

O: Beauty's Trust Gained

A: Give Beast's Ring

O: Receive Beauty's Dress

O: Receive Mirror

O: Receive Beast's Ring

A: Plant White Rose

O: Receive White Rose 2

A: Solve Cliff Puzzles

C6: Summit Path Opens

A: Pick Black Feather

A: Pick Stinky Flower

P: Dark Cave

P: Poison Lady

O: Receive Black Feather

A: Light Cave

O: Receive Peppermint

A: Give Mint to Genie

A: Reject Poison

O: Survived

A: Ride Nightmare Horse

O: Receive Ember

O: Receive Spoiled Egg

O: Receive Hair

P: Need Spell Components

A: Collect Components

A: Get Ember

A: Get Hair

A: Get Spoiled Egg

O: Spell Ready

A: Cast Charm Spell

O: Nightmare Mount Available

A: Cast Rain Spell

O: Rain Protection

P: Druids Will Burn You

A: Wear Beauty's Dress

O: Druid Protection

A: Get Scythe

A: Get Coal

O: Receive Coal

P: Reach Land of Dead

C7: Arrive at Land of Dead

P: Zombies Block Path

A: Avoid Zombies

O: Zombies Avoided

A: Talk to Cassima's Parents

A: Talk to Ghost Mother

O: Receive Ticket

O: Receive Handkerchief

A: Talk to Ghost Boy

P: Need Ticket for Gate

A: Give Ticket

C8: Gate Opens

A: Play Bone Xylophone

O: Receive Skeleton Key

P: Pay Charon

A: Pay Charon

O: Ferry Access

P: Need Styx Water

A: Collect Styx Water

O: Receive Styx Water

A: Search Dead Knight

O: Receive Gauntlet

P: Meet Death

P: Gate Asks Riddle

A: Answer LOVE

C9: Gate Opens

A: Show Mirror to Death

C10: Death Cries, Parents Freed

C_RETURN: Return to Isle of Crown

P: Cannot Enter Castle

A: Paint Door

A: Wear Disguise

A: Cast Paint Spell

O: Secret Door Appears

O: Castle Access

P: Guards Patrol

A: Distract Guards

O: Guards Distracted

O: Receive Passage Hint

P: Need Password

P: Jollo's Room

A: Give Lamp Replica

A: Learn ALI

A: Learn ZEBU

O: Password ALI

O: Password ZEBU

A: Combine ALI ZEBU

P: Cassima Needs Weapon

A: Give Dagger to Cassima

O: Cassima Armed

P: Treasury Password

A: Enter ALI ZEBU

O: Treasury Opens

P: Genie Attacks

P: Open Vizier's Chest

A: Unlock Chest

O: Receive Vizier's Letter

A: Show Letter

P: Vizier Fights

A: Use Fake Lamp

O: Genie Controlled - BEST END

O: Genie Drunk - ALT END

A: Cassima Fights

A: Fight Vizier

**END**

\ No newline at end of file