Files
TheLadder/tools/story-to-pack/probe/aesop/claude/groups_src.py
T
JesseMarkowitzandClaude Opus 5.5 3a4758172d story-to-pack: add the corpora and the catalogue v2/v3
Fourteen corpora split and classified: aesop, bierce, chekhov, holmes,
keefe, lawson, lorimer, maupassant, nobody, plaintales, poe, torchy,
wallingford and winesburg, each with its splitter and the hand-written
groups and pages; catalogue v2 and v3; and the shared splitters
gutenberg_chunks.py, se_split.py and se_build.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rwKTmug58sEsJ72AuWsEi
2026-10-07 06:05:51 -04:00

229 lines
18 KiB
Python

"""Hand-built reference grouping of the Aesop predicaments (Claude-written, no inference of any kind).
One fable is one story and one scene, so a group's member count is also its story count.
Recurrence rule, scaled to the corpus: with 313 fables a group needs at least 13 members
(max(3, 4% of 313) = 13). Groups of 5-12 are allowed but are marked SMALL below and reported
separately. Each fable is in at most one group; fables that fit no recurring situation stay
unassigned.
Options follow DESIGN.md: 3-5 per group, each marked by where it came from --
'archetype' a fixed, setting-free option
'scene:N' what someone in fable N actually did (or refused to do)
'filled' written to fill a gap the fables leave
`moves` names spine paths and a direction only (+ / - / risk / set). No magnitudes: the model never
chooses a number. Skill labels proposed for this corpus: wit (seeing through a trick, and turning it),
prudence (looking before you leap, knowing your limits, keeping what you have).
"""
G = [
# ---- the powerful and the weak ---------------------------------------------------------------------
dict(id='G01', name='A friendly approach from someone who would gain by your fall',
predicament='Someone whose nature is to prey on people like you comes friendly, praising, inviting or offering peace, and what they propose would put you in reach.',
actor='person with something to lose', wants='to keep it', counterpart='a known predator acting friendly',
members=[30, 36, 63, 64, 73, 92, 96, 144, 172, 192, 204, 207, 215, 219, 221, 225],
options=[
('Keep your distance and decline politely.', 'scene:36', {'prudence':'+', 'relationships.predator':'-'}),
('Accept the invitation and go in.', 'scene:221', {'relationships.predator':'+', 'standing':'risk'}),
('Say out loud what they are really after.', 'scene:225', {'wit':'+', 'relationships.predator':'-'}),
('Send them round to someone who can deal with them.', 'scene:215', {'wit':'+', 'relationships.predator':'-', 'flags.turned_the_tables':'set'}),
('Rise to the praise and show them what you can do.', 'scene:96', {'money':'-', 'standing':'-'})]),
dict(id='G02', name='At the mercy of someone who has already decided',
predicament='Someone who holds your fate has caught you and is looking for a reason, and you have one chance to talk your way out.',
actor='person caught', wants='to be let go', counterpart='the one who has them',
members=[1, 5, 26, 39, 43, 55, 131, 135, 147, 197, 211, 217, 248, 292],
options=[
('Answer every charge with the facts.', 'scene:1', {'standing':'risk', 'relationships.captor':'-'}),
('Show them the one thing you do that nobody else can.', 'scene:135', {'standing':'+', 'relationships.captor':'+'}),
('Tell them you belong to the side they spare.', 'scene:5', {'wit':'+', 'flags.two_faced':'set'}),
('Ask for one small favour that puts them off guard.', 'scene:217', {'wit':'+', 'relationships.captor':'-'}),
('Offer to hand over your own people instead.', 'scene:292', {'relationships.colleagues':'-', 'standing':'-', 'flags.informer':'set'})]),
dict(id='G03', name='Trading one hardship for another',
predicament='Your present lot is hard, and you could change master, protector or post, though the new one may be worse.',
actor='person with a hard lot', wants='something better', counterpart='the master or post on offer',
members=[47, 53, 76, 79, 109, 115, 125, 136, 177, 178, 189, 199, 228, 291],
options=[
('Ask for a new master.', 'scene:125', {'relationships.boss':'-', 'standing':'risk'}),
('Bring in a strong protector.', 'scene:79', {'relationships.protector':'+', 'standing':'risk'}),
('Keep the harm you know.', 'scene:53', {'prudence':'+'}),
('Go back to your plain, safe post.', 'scene:228', {'prudence':'+', 'money':'-'}),
('Sell up and stake it all on the change.', 'scene:109', {'money':'risk', 'flags.staked_all':'set'})]),
dict(id='G04', name='Envying another\'s gift',
predicament='You envy a colleague\'s gift or standing so much that you are tempted to copy them, or ask for what they have.',
actor='person with plainer gifts', wants='what the admired one has', counterpart='the admired colleague',
members=[2, 29, 31, 52, 68, 98, 134, 170, 180, 186, 209, 258, 265, 268, 282, 287, 297],
options=[
('Copy what they do.', 'scene:265', {'standing':'risk', 'relationships.admired':'-'}),
('Ask those above for what they have.', 'scene:297', {'relationships.boss':'-', 'standing':'-'}),
('Stick to what you are good at.', 'scene:209', {'prudence':'+'}),
('Look at what their position costs them.', 'scene:287', {'prudence':'+', 'relationships.admired':'+'}),
('Learn the craft properly before you try it.', 'filled', {'money':'-', 'wit':'+'})]),
dict(id='G05', name='Passing for more than you are',
predicament='You are passing for braver, grander or more skilled than you are, and the moment that would test it has come.',
actor='pretender', wants='to keep the credit', counterpart='whoever might test them',
members=[40, 42, 65, 138, 148, 160, 187, 198, 200, 201, 234, 251, 270, 302],
options=[
('Keep up the pretence and say nothing.', 'scene:200', {'standing':'risk'}),
('Confess before you are tested.', 'scene:234', {'standing':'-', 'relationships.examiner':'+'}),
('Laugh with them when it slips.', 'scene:160', {'standing':'+', 'relationships.companions':'+'}),
('Double the claim.', 'scene:198', {'standing':'risk', 'flags.liar':'set'}),
('Back out quietly.', 'scene:138', {'standing':'-'})]),
dict(id='G06', name='Riding high',
predicament='Things are going your way, and you are tempted to show it, crow about it, or take on someone bigger.',
actor='person on top for now', wants='to be seen on top', counterpart='rivals and onlookers',
members=[27, 57, 71, 108, 110, 117, 126, 141, 194, 245, 255, 264, 290],
options=[
('Crow about it where everyone can see.', 'scene:71', {'standing':'risk', 'relationships.rival':'-'}),
('Press on and take on someone bigger.', 'scene:110', {'standing':'risk', 'flags.overreached':'set'}),
('Keep quiet and go on shining.', 'scene:141', {'prudence':'+', 'standing':'+'}),
('Ask an old hand what your mark really means.', 'scene:57', {'relationships.mentor':'+', 'prudence':'+'})]),
dict(id='G07', name='Sneered at by someone showier',
predicament='A showier or better-placed colleague sneers at your plainness or your load, and you must decide how to answer.',
actor='plain worker', wants='respect', counterpart='a showier colleague',
members=[7, 11, 22, 24, 70, 88, 155, 163, 167, 223, 226, 253, 310],
options=[
('Answer with what you can do that they cannot.', 'scene:167', {'wit':'+', 'standing':'+', 'relationships.rival':'-'}),
('Hold your peace and wait.', 'scene:223', {'prudence':'+', 'relationships.rival':'-'}),
('Challenge them to a test.', 'scene:11', {'standing':'risk', 'relationships.rival':'-'}),
('Ignore them and heed only the one in charge.', 'scene:226', {'relationships.boss':'+'}),
('Try to outshine them on their terms.', 'filled', {'money':'-', 'standing':'risk'})]),
# ---- help, greed, partners -------------------------------------------------------------------------
dict(id='G08', name='Help asked in need',
predicament='Someone in trouble asks for help, or you need it yourself, and nobody can tell how the help will be repaid.',
actor='person asked for help', wants='to do right without being bitten', counterpart='someone in need',
members=[0, 10, 23, 51, 132, 154, 190, 193, 208, 230, 261, 286, 295, 296],
options=[
('Help, though they can give nothing back now.', 'scene:0', {'relationships.helped':'+', 'money':'-'}),
('Refuse: they should have looked ahead.', 'scene:10', {'relationships.asker':'-', 'money':'+'}),
('Take them in and nurse them.', 'scene:23', {'relationships.helped':'+', 'standing':'risk'}),
('Refuse to lift any of their load.', 'scene:51', {'relationships.partner':'-', 'money':'risk'}),
('Stick with those who already serve you without promises.', 'scene:230', {'prudence':'+', 'relationships.staff':'+'})]),
dict(id='G09', name='Wanting more than you hold',
predicament='You already have something good, and a chance to grab more, squeeze more or stay longer is tempting you.',
actor='person with something in hand', wants='more', counterpart='the bigger prize',
members=[15, 21, 46, 95, 113, 137, 139, 151, 156, 168, 179, 213, 279],
options=[
('Keep what you hold.', 'scene:137', {'money':'+', 'prudence':'+'}),
('Drop it and chase the bigger prize.', 'scene:156', {'money':'risk'}),
('Squeeze the steady source for more.', 'scene:168', {'money':'risk', 'flags.killed_the_goose':'set'}),
('Take half and get free.', 'scene:46', {'prudence':'+', 'money':'-'}),
('Stay and enjoy it a while longer.', 'scene:279', {'money':'+', 'standing':'risk'})]),
dict(id='G10', name='Your side divided',
predicament='You and a rival, or the people on your own side, are quarrelling, and someone else stands to profit from it.',
actor='member of a divided side', wants='to win the quarrel, or end it', counterpart='the rival, and whoever is waiting',
members=[4, 25, 48, 75, 80, 105, 124, 152, 165, 166, 171, 185, 224, 236, 246],
options=[
('Make peace with the rival before others profit.', 'scene:105', {'relationships.rival':'+'}),
('Show them together they cannot be broken.', 'scene:4', {'relationships.team':'+', 'standing':'+'}),
('Fight it out to the end.', 'scene:152', {'relationships.rival':'-', 'money':'-'}),
('Stop supplying the part you resent.', 'scene:75', {'relationships.team':'-', 'money':'-'}),
('Keep switching to whichever side is winning.', 'scene:246', {'wit':'+', 'relationships.team':'-', 'flags.turncoat':'set'})]),
dict(id='G11', name='A partner you may not be able to count on',
predicament='You are joined, or about to be joined, to a partner or ally, and you cannot be sure they will stand by you.',
actor='person choosing a partner', wants='someone to rely on', counterpart='a doubtful partner',
members=[12, 20, 37, 58, 60, 82, 90, 102, 120, 127, 181, 182, 184, 254, 256, 277, 284, 299],
options=[
('Ask for a surety before you join.', 'scene:277', {'prudence':'+', 'relationships.partner':'-'}),
('Decline: their ways would undo yours.', 'scene:12', {'prudence':'+', 'relationships.partner':'-'}),
('Save yourself and leave the partner to it.', 'scene:37', {'relationships.partner':'-', 'flags.deserted':'set'}),
('Bind yourself to them.', 'scene:90', {'relationships.partner':'+', 'standing':'risk'}),
('Hold them to their own words.', 'scene:120', {'wit':'+', 'relationships.partner':'-'})]),
dict(id='G12', name='Rushing in without looking',
predicament='Something you want is right in front of you, or you are intent on a target, and you have not looked at the danger.',
actor='eager person', wants='what is in front of them', counterpart='the danger they have not seen',
members=[13, 18, 32, 62, 99, 107, 140, 150, 216, 222, 247, 289, 308],
options=[
('Go for it now before it is gone.', 'scene:32', {'money':'risk', 'standing':'risk'}),
('Ask how you get out before going in.', 'scene:140', {'prudence':'+'}),
('Keep your eyes on your target.', 'scene:222', {'money':'+', 'standing':'risk'}),
('Wait for a surer sign before you act.', 'filled', {'prudence':'+', 'money':'-'})]),
dict(id='G13', name='Pointing at others\' faults',
predicament='Faults are being pointed out, by you or at you, and the one pointing shares the fault or gains by the blame.',
actor='critic or criticised', wants='to be in the right', counterpart='the other party',
members=[9, 28, 38, 84, 111, 116, 122, 153, 173, 188, 239, 257, 260, 306],
options=[
('Ask them to show you how.', 'scene:84', {'wit':'+', 'relationships.critic':'-'}),
('Point out that they do the same.', 'scene:122', {'wit':'+', 'relationships.critic':'-', 'standing':'+'}),
('Ask what they gain by the advice.', 'scene:38', {'wit':'+', 'relationships.adviser':'-'}),
('Find fault with everyone.', 'scene:257', {'standing':'-', 'relationships.colleagues':'-'}),
('Look at your own faults first.', 'filled', {'prudence':'+', 'relationships.colleagues':'+'})]),
dict(id='G14', name='Liberties between the weak and the strong',
predicament='Someone powerful is down, caged or out of reach, or someone small is needling you, and a blow could be struck.',
actor='weak or strong party', wants='to strike, or to be left alone', counterpart='the other party',
members=[49, 66, 77, 121, 145, 159, 175, 206, 232, 238, 252, 285, 298, 303, 305],
options=[
('Taunt them while they cannot reach you.', 'scene:66', {'standing':'+', 'relationships.powerful':'-'}),
('Pursue them however long it takes.', 'scene:303', {'relationships.powerful':'-', 'flags.revenge':'set', 'standing':'risk'}),
('Help them while they are down.', 'scene:298', {'relationships.powerful':'+', 'money':'-'}),
('Kick them now that they are down.', 'scene:232', {'relationships.powerful':'-', 'standing':'-'}),
('Let a small insult pass.', 'filled', {'prudence':'+'})]),
dict(id='G15', name='A hard lot',
predicament='You are stuck, worn down or beaten, and it is tempting to despair, complain, or wait for someone to rescue you.',
actor='person in hard times', wants='a way through', counterpart='their own circumstances',
members=[16, 61, 72, 87, 133, 157, 169, 191, 195, 227, 267, 273, 288, 301],
options=[
('Put your own shoulder to it.', 'scene:16', {'prudence':'+', 'money':'+'}),
('Try something nobody has tried.', 'scene:191', {'wit':'+', 'money':'+'}),
('Say you never wanted it anyway.', 'scene:195', {'standing':'+'}),
('Call on your backer.', 'scene:273', {'relationships.patron':'risk'}),
('Give it up entirely.', 'scene:87', {'standing':'-', 'flags.gave_up':'set'})]),
dict(id='G16', name='Worked hard, badly repaid',
predicament='You carry the load for the one you serve, and they take you for granted, work you into the ground or skim what you need.',
actor='worker', wants='fair treatment', counterpart='the one they serve',
members=[34, 45, 50, 74, 100, 118, 119, 142, 161, 196, 271, 283, 312],
options=[
('Carry on in silence.', 'scene:34', {'relationships.boss':'+', 'standing':'-'}),
('Tell them plainly what they are doing to you.', 'scene:50', {'relationships.boss':'risk', 'standing':'+'}),
('Remind them what you were.', 'scene:119', {'relationships.boss':'risk'}),
('Leave before you are next.', 'scene:118', {'prudence':'+', 'money':'-', 'relationships.boss':'-'}),
('Stop being so useful.', 'filled', {'money':'-', 'relationships.boss':'-'})]),
# ---- SMALL groups (5-12 fables): below the 13-fable recurrence rule, reported separately ----------
dict(id='G17', name='Letting a known predator inside', small=True, # SMALL: 6 fables
predicament='Someone with a predator\'s instincts is about to be let inside, or trained, or left in charge, and you know what they are.',
actor='keeper', wants='to use them safely', counterpart='a known predator',
members=[83, 129, 164, 210, 233, 281],
options=[
('Speak up before they are let in.', 'scene:164', {'relationships.boss':'risk', 'standing':'+'}),
('Trust them after long good behaviour.', 'scene:210', {'relationships.newcomer':'+', 'money':'risk'}),
('Let them go and cut your losses.', 'scene:129', {'money':'-', 'prudence':'+'}),
('Train them to your uses.', 'scene:83', {'money':'+', 'relationships.newcomer':'risk'})]),
dict(id='G18', name='The lion\'s share', small=True, # SMALL: 6 fables
predicament='You did the work alongside someone far stronger, and now the proceeds are being divided on their terms.',
actor='junior partner', wants='a fair share', counterpart='a far stronger partner',
members=[3, 101, 130, 158, 274, 309],
options=[
('Divide it fairly.', 'scene:158', {'relationships.partner':'-', 'standing':'risk'}),
('Leave yourself almost nothing.', 'scene:158', {'money':'-', 'relationships.partner':'+'}),
('Go it alone next time.', 'scene:274', {'money':'risk', 'relationships.partner':'-'}),
('Ask for what you were promised.', 'scene:3', {'relationships.partner':'-', 'standing':'risk'})]),
dict(id='G19', name='A bad record when you need trust', small=True, # SMALL: 5 fables
predicament='You need people to believe you or help you now, and your record gives them every reason not to.',
actor='person with a past', wants='to be believed', counterpart='those who remember',
members=[54, 104, 229, 235, 243],
options=[
('Raise the alarm anyway.', 'scene:54', {'standing':'-'}),
('Make a new promise to a new patron.', 'scene:243', {'relationships.patron':'-'}),
('Do a good turn to mend your name.', 'scene:235', {'relationships.neighbour':'risk'}),
('Earn trust in good times, before you need it.', 'filled', {'relationships.allies':'+'})]),
dict(id='G20', name='A warning before the trouble', small=True, # SMALL: 6 fables
predicament='Trouble is coming but not yet here, and you must decide whether to prepare, warn others, or take the threat seriously.',
actor='person with warning', wants='to be ready', counterpart='the trouble coming',
members=[35, 112, 174, 214, 241, 249],
options=[
('Prepare now while it is quiet.', 'scene:112', {'prudence':'+', 'money':'-'}),
('Warn the others though they laugh.', 'scene:249', {'standing':'-', 'relationships.team':'-'}),
('Wait until they mean it.', 'scene:214', {'prudence':'+'}),
('Put it off until next time.', 'scene:241', {'money':'+', 'prudence':'-'})]),
]
# Protagonist's power in the situation each predicament describes, for stage assignment (DESIGN.md
# "Stages"). One fable is one scene, so this is per fable. 'high' means the "you" of the predicament
# holds power over the others in it, 'middle' that they deal as a peer, 'low' that they are at
# someone's mercy or under their orders.
HIGH = {0, 4, 17, 33, 49, 69, 73, 84, 85, 86, 89, 126, 137, 152, 153, 156, 162, 173, 175, 183, 202,
203, 213, 220, 229, 230, 231, 257, 261, 269, 271, 277, 278, 288, 293, 305, 312}
MIDDLE = {2, 6, 7, 10, 12, 14, 15, 21, 22, 23, 24, 25, 27, 28, 30, 31, 37, 38, 40, 42, 44, 46, 48, 51,
58, 59, 60, 61, 62, 65, 67, 71, 78, 83, 91, 93, 95, 96, 97, 102, 103, 105, 108, 111, 112, 114,
116, 120, 123, 124, 129, 132, 138, 139, 140, 141, 143, 148, 149, 150, 151, 154, 155, 159,
160, 163, 165, 167, 168, 171, 174, 179, 180, 182, 184, 185, 186, 188, 190, 192, 194, 199,
201, 209, 210, 212, 219, 222, 224, 225, 227, 233, 235, 236, 239, 242, 244, 245, 249, 250,
251, 252, 256, 260, 262, 263, 270, 272, 281, 282, 289, 290, 296, 297, 298, 299, 302, 304, 310}
STANDING = {i: 'high' if i in HIGH else 'middle' if i in MIDDLE else 'low' for i in range(313)}