polymath-society 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cli.js +24620 -22073
  2. package/dist/engine/chat-loops.js +8 -1
  3. package/dist/engine/exp-allfacets.js +8 -1
  4. package/dist/engine/exp-person.js +8 -1
  5. package/dist/engine/exp-pipeline.js +8 -1
  6. package/dist/engine/ingest-export.js +7 -6
  7. package/dist/engine/peak-demos.js +8 -1
  8. package/dist/engine/person-dimension-summary.js +8 -1
  9. package/dist/engine/person-facet-lines.js +8 -1
  10. package/dist/engine/person-headline.js +8 -1
  11. package/dist/engine/person-report.js +8 -1
  12. package/dist/engine/person-self-image.js +8 -1
  13. package/dist/engine/public-report.js +15 -7
  14. package/dist/engine/run-analysis.js +8 -1
  15. package/dist/engine/run-tagger.js +8 -1
  16. package/dist/index.js +19600 -17706
  17. package/dist/pipeline/FOCUS-EXAMPLES.md +127 -0
  18. package/dist/pipeline/FOCUS-RUBRIC.md +418 -0
  19. package/dist/pipeline/coding-agglomerate.js +947 -79
  20. package/dist/pipeline/coding-aggregate.js +443 -23
  21. package/dist/pipeline/coding-build.js +569 -97
  22. package/dist/pipeline/coding-coaching.js +651 -101
  23. package/dist/pipeline/coding-day-digest.js +417 -36
  24. package/dist/pipeline/coding-delegation.js +564 -68
  25. package/dist/pipeline/coding-expertise.js +477 -59
  26. package/dist/pipeline/coding-flow.js +424 -15
  27. package/dist/pipeline/coding-focus.js +507 -51
  28. package/dist/pipeline/coding-frontier-detail.js +465 -47
  29. package/dist/pipeline/coding-frontier.js +7 -6
  30. package/dist/pipeline/coding-gap-dist.js +424 -15
  31. package/dist/pipeline/coding-gap.js +679 -128
  32. package/dist/pipeline/coding-grade.js +469 -42
  33. package/dist/pipeline/coding-growth.js +17041 -0
  34. package/dist/pipeline/coding-nutshell.js +168 -151
  35. package/dist/pipeline/coding-projects.js +7 -6
  36. package/dist/pipeline/coding-walkthrough.js +461 -37
  37. package/dist/pipeline/coding-workbrief.js +16387 -0
  38. package/dist/web/app.js +2095 -1396
  39. package/dist/web/styles.css +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,127 @@
1
+ # FOCUS-EXAMPLES.md — few-shot examples for the focus judgment pass
2
+
3
+ These examples pin the REGISTER and STRUCTURE the rubric demands. Every example is
4
+ FICTIONAL — a made-up person, made-up features, made-up dates. Copy the shape, never the
5
+ content. (Law: an example carrying a real person's answer makes the rubric unvalidatable —
6
+ the model must find the person-specific instance on its own.)
7
+
8
+ ## Priority bullets — verdict register, merged, action-ending, ≤4 total
9
+
10
+ BAD (question, metric tuple, no action):
11
+ "Checkout flow · 9 days. 412 msgs across 9d at a 31% steering share — was the scope
12
+ declared upfront, or did each round define the next?"
13
+
14
+ GOOD (drag row merged with its ship-sooner, one bullet, plain speech, ends in an action):
15
+ "Checkout flow: usable by Mar 14, then 6 more days of polish with no outside eyes.
16
+ Most of that polish answered questions one real user would have settled in an
17
+ afternoon — ship the day-one version to two people before the next polish pass."
18
+
19
+ GOOD (missing row, said plainly, first position):
20
+ "Nothing in the window put the product in front of an outside person; the closest row
21
+ tests the delivery mechanism, not actual delivery. Book one external read this week."
22
+
23
+ GOOD (exoneration — this row does NOT appear in priority; one line in findings instead):
24
+ finding: "The search-indexer row looks low-flow only because each rebuild takes an
25
+ hour to verify; that is waiting, not drift, so it is not a problem to fix."
26
+
27
+ ## Flow-kinds and triggers — bullets, dark, each with its lever or fix
28
+
29
+ You're in flow state when:
30
+ - building a net-new feature you can see working the same sitting
31
+ - copy and layout work where the result is checkable by eye
32
+ - returning from a break straight into a hot thread (protect the first minutes back;
33
+ 5 of your 7 longest runs started there)
34
+
35
+ It never ignites in:
36
+ - long tuning loops with no ground truth to check against
37
+ - platform admin and credential work
38
+ - uninterpretable output you cannot tell worked (6×) — fix: the agent reports
39
+ verdict-first: one line saying what changed, whether it worked, how verified,
40
+ before any detail or code.
41
+
42
+ ## Leverage — keep column earns credit; recommendations are plain, no "an agent should own this" slop
43
+
44
+ keep what works:
45
+ - "Bounded refactors finished in one sitting — your reorg ran near-full flow start to
46
+ finish; single-sitting scope is where you stay locked in."
47
+ recommendations:
48
+ - "Schedule the nightly index rebuild and read a one-line result each morning instead
49
+ of watching it run (~2h/wk back)."
50
+
51
+ ## The four-part CLAUDE.md block — fixed structure, receipts in parentheses, under 25 lines
52
+
53
+ ## Flow rules, derived from 41 days of my own session logs, 2026-03-20
54
+
55
+ My flow profile
56
+ - My longest runs start mid-morning; I rarely type before 9:30.
57
+ - My flow dies when I have to ask what the output means (6 of my 11 longest runs).
58
+ - Silent waits on slow rebuilds pull me out.
59
+
60
+ What you should do
61
+ - Own terminal and console work end to end; never hand me steps.
62
+ - State your call and proceed; at most one truly blocking question, never a menu.
63
+
64
+ In every response
65
+ - Lead with the verdict: what changed, did it work, how you verified it.
66
+ - Restate my spec in one line before a build pass.
67
+
68
+ At the end of every response
69
+ - One line: what changed and how it was verified.
70
+ - The single next decision or a reviewable chunk, never a menu.
71
+ - Any threads still running, so I re-enter without asking.
72
+
73
+ ## Accountability bullets — second person, each earned by a receipt, concrete
74
+
75
+ - "Catches your late starts, since you first touch the keyboard around 9:40 most
76
+ days, and asks for the one thing before noon."
77
+ - "Flags when you have tuned the same component for days without putting it in
78
+ front of anyone new."
79
+ - "Reminds you at night to write tomorrow's first task — your record shows a declared
80
+ target is what starts your day."
81
+
82
+ ## Tone contrasts — the line between landing and slop
83
+
84
+ SLOP: "You seem like a productive person who values deep work!"
85
+ STANDARD: "In 41 sessions you built the grader. In 0 sessions anyone else saw its
86
+ output. The gap is the finding — book the outside read."
87
+
88
+ SLOP: "Consider leveraging agentic automation to optimize your operational overhead."
89
+ STANDARD: "Schedule the admin sweep; stop letting it interrupt the 1pm block."
90
+
91
+ ## Taste — what lands and what reads as cringe (complete context, learned from live feedback)
92
+
93
+ The reader is sharp, impatient, and allergic to filler. These are hard rules, not vibes:
94
+
95
+ READS AS CRINGE — never ship:
96
+ - Metric tuples in prose: "412 msgs across 9d at a 31% steering share". The charts carry
97
+ the numbers; sentences carry meaning. One number per sentence, in parentheses, max.
98
+ - Questions fired at the reader in feedback sections ("was the scope declared upfront?").
99
+ State the inference. The reader argues with questions and acts on verdicts.
100
+ - Praise inside a faults section. "What to do differently" holding "you did this right"
101
+ destroys trust in the whole section. Credit lives ONLY in the keep list.
102
+ - Consultant-speak and role narration: "an agent should own this", "leverage automation",
103
+ "optimize your workflow". Say the action itself: "schedule the sweep".
104
+ - Wordy prose blocks where bullets belong. If a reader wouldn't read it, don't write it.
105
+ - Feature names longer than 2-3 words; gerund-phrase names ("Setting up end-to-end
106
+ testing for app distribution" → "E2E testing").
107
+ - The same workstream mentioned twice in one section — merge or cut.
108
+ - Em dashes in generated copy (reads as AI slop), literal asterisks for bold, grey text
109
+ on key content, generic horoscope praise ("you value deep work!"), hedging, filler.
110
+ - A truth repeated. Said once, it lands; twice, it lectures.
111
+ - Unearned bullets: any line without a receipt behind it dilutes the lines that have one.
112
+ - Banal causes: "admin work keeps you out of flow" — of course it does; nobody needs a
113
+ dashboard for that. A negative finding ships only if it is non-obvious (the 3pm thread
114
+ drain, the nothing-queued starvation), never if the reader would say "obviously".
115
+
116
+ LANDS — ship this:
117
+ - A bold one-line verdict that frames the section instantly ("You should be in flow
118
+ state much longer"), then the benchmark that makes it concrete.
119
+ - Short dark bullets a reader scans in ten seconds; headings OUTSIDE cards; one-word
120
+ group headers; real visual division.
121
+ - Benefit-first framing for artifacts ("A gift...") — what it does for the reader,
122
+ then the thing.
123
+ - Specificity that makes the reader think "it actually saw that": the exact habit, the
124
+ exact day, the exact phrase they use. Specific enough to be slightly embarrassing.
125
+ - Contrast pairs: "41 sessions building the grader; 0 sessions where anyone saw its
126
+ output." The gap is the finding.
127
+ - Every insight ends with an action. Insight without a next action is entertainment.
@@ -0,0 +1,418 @@
1
+ # FOCUS-RUBRIC.md — causal flow analysis + priority feedback for the coding report
2
+
3
+ You are analyzing ONE person's coding-session record. You receive DETERMINISTIC artifacts
4
+ (computed by code, trustworthy): a day×half-hour map of steering / nudging / silent time,
5
+ steering-run boundaries with the person's next messages, per-workstream steering shares,
6
+ a workstream×day matrix, gap/start statistics. Your job is the JUDGMENT layer only —
7
+ the deterministic numbers are already right; never recompute or contradict them.
8
+
9
+ Same law as every rubric in this repo: GENERAL principles, generic illustrations. Never
10
+ hardcode a specific person's case; every claim you output must carry a receipt (date,
11
+ number, or short quote) drawn from the artifacts you were given.
12
+
13
+ ## Definitions (fixed upstream — do not reinterpret)
14
+ - FLOW (a.k.a. steering): a 30-min cell where the person drove TWO OR MORE threads AND
15
+ composed ≥15% of it (words ÷ 40wpm typed, ÷ 130wpm dictated, gap-capped). Juggling is
16
+ flow; driving one thread is waiting on it. One clause; thresholds fitted from daily
17
+ labels, never a single introspection. This is what the person experiences as flow.
18
+ - NUDGING: typed activity outside steering runs — supervising threads, occasional checks.
19
+ Real work, different state. Never call it flow.
20
+ - SILENT: no typing inside the day's active span. Neutral label; the person annotates.
21
+
22
+ ## Part 1 — What kinds of work hold their flow (and what kinds don't)
23
+ From per-workstream steering shares, name 2-4 work KINDS (not project names) where this
24
+ person's steering concentrates, and 2-4 kinds where it never ignites. Derive the kind from
25
+ the workstreams' common properties, e.g.:
26
+ - fast-verifiable loops (UI with visual check, failing test → green) vs slow-verifiable
27
+ (a change whose test costs an expensive run) vs unverifiable (abstract tuning with no
28
+ ground truth);
29
+ - creating vs configuring vs administering;
30
+ - their own code vs integration/ops surfaces.
31
+ State each as "your steering concentrates in X (share%, receipts); it never ignites in Y".
32
+ If shares are flat across kinds, say so — do not invent a split.
33
+
34
+ ## Part 2 — Triggers INTO flow
35
+ For each steering run ≥40min, look at what immediately preceded its START (prior messages,
36
+ time of day, preceding state). Recurring precursors to test (report only those with ≥3
37
+ receipts):
38
+ - a concrete failure in hand (a bug with a reproduction, a failing check) — specificity
39
+ ignites;
40
+ - fresh harvest (returning to threads left running) at day start;
41
+ - a visible/verifiable target (screenshot, demo, deadline artifact);
42
+ - an external input (feedback that names something specific);
43
+ - a particular time-of-day block (the person's own peak hours);
44
+ - the SECOND THREAD opening — flow cannot start single-threaded under this definition,
45
+ so look at what precedes second-thread moments (a queued task, a scheduled run
46
+ finishing, a deliberate fan-out) and name it as the ignition lever it is.
47
+ Output: "flow tends to start when …" with counts. These are the person's ignition keys —
48
+ phrase them as usable levers ("start the day by X — it ignited N of your M longest runs").
49
+
50
+ ## Part 3 — Triggers OUT of flow
51
+ For each steering-run END, classify the killer from the boundary messages. Canonical cause
52
+ classes (extend if the data shows a new one, with receipts):
53
+ (a) uninterpretable output — the person cannot tell what the result means or whether it
54
+ worked ("how do I read this", silence after a wall of output). Remedy pairing:
55
+ verdict-first reporting AND, when the result is inherently hard to judge from text,
56
+ the agent renders it — a small HTML view, a chart, a before/after — so evaluation
57
+ is a glance, not a decode;
58
+ (b) bounced decision — the agent asks the person to decide something it should have
59
+ decided or verified itself;
60
+ (c) manual ops interruption — console clicking, credential dances, copy-paste chores;
61
+ (d) natural completion — the thing shipped; person stops or switches cleanly (NOT a
62
+ failure — count separately);
63
+ (e) biological dip / meal hours — recurring clock positions;
64
+ (f) new-front opening — they abandon a hot thread to start something new;
65
+ (g) thread collapse — the parallel set drained to one (agents finished, attention
66
+ narrowed to a single session): under the juggling definition this ends flow by
67
+ itself, and its remedy is distinct — queue the next thread BEFORE the set drains,
68
+ so a finishing agent hands off instead of stranding;
69
+ (h) error wall — the run ends on bad news that demands a mode switch: a failing build,
70
+ a stack trace, a broken deploy (distinct from (a): the output IS clear, it's just
71
+ bad). Remedy: the agent debugs to a diagnosis before handing back, so the person
72
+ re-enters at "here's the cause and my fix", not at the raw wreckage;
73
+ (i) limit / quota hit — a usage wall or rate limit forces the stop mid-stride.
74
+ Remedy: schedule heavy passes away from interactive hours and surface remaining
75
+ budget before long runs start, never mid-run;
76
+ (j) churn exhaustion — a burst of rapid corrections ("no", "wrong", "again") then
77
+ silence: the person rage-quit the thread. Remedy: an escape-hatch rule — after two
78
+ failed corrections the agent stops patching, restates the spec, and proposes a
79
+ reset, instead of inviting a third correction;
80
+ (k) context reset — compaction, a session restart, or having to re-explain state kills
81
+ momentum (boundary shows "continue where we left off" or the person re-stating
82
+ context). Remedy: the agent maintains a running state note so re-entry costs one
83
+ read, not a reconstruction;
84
+ (l) external wait — the next step depends on something outside the machine (a review,
85
+ an approval, a verification queue, another person). Remedy: park it with a tracked
86
+ reminder and pull the next queued thread immediately;
87
+ (m) scope shock — the boundary message discovers the task is much bigger than assumed
88
+ ("this needs a whole refactor"). Remedy: the agent sizes the work in its FIRST
89
+ response (files touched, order of effort) so the shock lands before the run starts,
90
+ not twenty minutes in;
91
+ (n) environment friction — the stop is tool breakage unrelated to the task: corrupted
92
+ build cache, port conflicts, login loops. Remedy: encode the known fix as a guard
93
+ or script the first time it happens; the second occurrence should be one command.
94
+ Rank the classes by count for THIS person and report EVERY class with ≥2 receipts
95
+ (typically 3-5, not just the top two — people get knocked out in several ways, and
96
+ naming only the biggest hides the others). Give each a concrete remedy phrased as a
97
+ system change (a config rule, a workflow default), not an exhortation — encoded rules
98
+ change behavior; advice does not.
99
+
100
+ ## Part 4 — Priority feedback (altitude)
101
+ Ground rules distilled from the standard startup/engineering canon — build-measure-learn
102
+ and "launch early enough to be embarrassed" (Ries; Y Combinator), WIP limits and flow
103
+ efficiency (kanban/DORA: limit work-in-progress, minimize lead time to external feedback),
104
+ and deep-work block protection (protect the person's measured peak hours for their scarcest
105
+ state). Apply them to the artifacts:
106
+ 1. Recover the person's DECLARED aim if the artifacts carry one (a stated test, launch,
107
+ or recipient). All priority judgments are relative to THEIR aim, never to a generic
108
+ startup script.
109
+ 2. Feature×day matrix shapes: name drag rows (one feature across most of the window —
110
+ was scope declared? was each iteration's verification expensive?), no-exit windows
111
+ (everything open, nothing closes — WIP without shipping pressure), and the missing row
112
+ (work the declared aim requires that appears on zero days — e.g. distribution for a
113
+ validation aim). The missing row is often the most important finding — but WHY it is
114
+ missing is a causal guess (copy contract law 9), so PHRASE IT AS A HUMBLE QUESTION,
115
+ self-contained and acknowledging any near-miss the matrix shows ("the closest we saw
116
+ was one friend read on 07-01 — did we miss a real external read, or is that still
117
+ ahead?"). It is shown to the person verbatim; it must end with a question mark.
118
+ Produce 2-5 ROW VERDICTS covering the window's biggest rows (by hours) — each names
119
+ the row, the causal observation the matrix shows, and the ACTION. The registers that
120
+ land: "this one row was most of what the period produced — it should have started
121
+ sooner in the plan"; "the slowdown here traces to X — next time do Y up front";
122
+ "planned earlier, this row's hours halve". Every verdict ends with a concrete action;
123
+ a verdict without an action is a caption, not feedback. Rows exonerated by rule 6
124
+ still never appear here. BREVITY CONTRACT: the whole priority section is at most 4
125
+ bullets a reader scans in ten seconds; ONE bullet per workstream (if ship-sooner and
126
+ a drag verdict concern the same row, merge them into one sentence pair); no share
127
+ percentages or minute counts in the text — the chart above already shows the numbers,
128
+ the bullets only say what to do differently.
129
+ ONE THEME PER SECTION: never say the same underlying finding two ways (e.g. "no
130
+ outside eyes" as a missing row AND as a ship-sooner AND as a meta note reads as one
131
+ verdict padded into three). Merge same-theme verdicts into ONE bullet and spend the
132
+ freed slots on DIFFERENT verdict types. The verdict-type palette:
133
+ - missing row (work the aim requires that never appears);
134
+ - ship-sooner (usable by X, then N days of unseen refinement);
135
+ - TIME BUDGET ("this feature took ~Nh across M days; comparable rows here finish in
136
+ ~Kh — the overrun traces to <cause>, next time <action>") — judge the budget from
137
+ the person's own comparable rows, never an external standard;
138
+ - SEQUENCING ("this could have waited until after <the declared milestone>; it
139
+ displaced <the thing the aim needed>") — only when a declared aim exists;
140
+ - meta-share (tooling/measurement outgrowing the work).
141
+ A good priority section mixes 3-4 DIFFERENT types from this palette.
142
+ 3. Ship-sooner probe: for the longest-running feature, estimate the first day a usable
143
+ version existed (first success receipt) and count refinement days after it with no
144
+ external eyes. State plainly what shipping on day-one-usable would have bought.
145
+ 4. Meta-work share: days spent on tooling/cost/measurement around the work vs the work.
146
+ Persistent double-digit share gets named.
147
+ 5. Deliver INFERENCES, not questions. State what the record shows and what it means,
148
+ plainly, like a sharp colleague: "The report compilation ate a third of your fortnight
149
+ while the thing it reports on barely moved" — never "what did Y buy X?". A question is
150
+ allowed ONLY when the logs genuinely cannot answer it, and at most one in the whole
151
+ output.
152
+ 6. CHECK THE MECHANICAL EXPLANATION FIRST — and let it FILTER, not decorate. Before
153
+ flagging a slow feature, low flow share, or long span, look for the boring cause
154
+ already in the artifacts: long session runtimes mean each verification pass is
155
+ inherently expensive (end-to-end tests, full pipeline runs) and low flow share there
156
+ is WAITING, not drift. If the check EXONERATES the row (mechanical cost, or a
157
+ deliberate choice), the row does NOT appear in the priority section at all — the
158
+ "should have done differently" list contains ONLY things actually done wrong, each
159
+ with its fix. Exonerations may appear once, briefly, in causalFindings as context.
160
+ A priority section that praises is a broken priority section. If, after filtering,
161
+ nothing was done wrong, output an empty dragRows and say so in one line — never pad.
162
+ Never ask about something the data answers.
163
+ 7. HUMAN-READABLE, always. Never emit metric tuples ("369 msgs across 7d at 35%
164
+ steering"). Translate: "you touched it every day for a week, but mostly you were
165
+ waiting on runs". At most one plain number per sentence, in parentheses, as evidence.
166
+ 8. No moralizing and no "you should have" scolding; state the inference and the fix.
167
+ A deliberate choice may exist; when the data suggests one (a consistent pattern, a
168
+ config), CREDIT it as deliberate rather than flagging it.
169
+
170
+ ## Part 4a — Leverage (KEEP / FOCUS / DELEGATE — separate from faults, never mixed in)
171
+ A whole leverage section was once deleted by its reader as "absolutely useless":
172
+ its items were true but inert (restated delegation candidates, hours-back guesses).
173
+ The bar for every item: the person can ACT on it this week and would FEEL the payoff
174
+ ("hand the render loop to a scheduled job and review the cut once" clears it; "this
175
+ is a delegation candidate" does not). Fewer items always beats filler.
176
+ The priority section holds faults only; this section holds the other three leverage reads.
177
+ - KEEP: 1-3 processes the record shows genuinely working (a guard that caught something,
178
+ a routine that correlates with the person's best days, a deliberate choice that pays).
179
+ Named so the person protects them. This is where earned credit lives — never in the
180
+ faults list.
181
+ - FOCUS: the one or two work kinds where this person's record is exceptional (highest
182
+ flow share AND visible output). State it as a claim: "this is where your hours
183
+ multiply; everything outside it is a delegation candidate."
184
+ - DELEGATE: 2-4 recurring activities an agent should own permanently, ranked by hours
185
+ recovered (from repetition receipts and manual-ops interruptions). Each with the
186
+ concrete handoff (a config line, a skill, a scheduled job).
187
+ Absence lens (apply across all parts): what NEVER appears in the record is a finding —
188
+ work types with zero receipts (no tests, no docs, no second human, no rest), provided
189
+ the absence is checkable and stated neutrally. Absence of evidence in ONE tool's logs is
190
+ not absence in the life (other tools, notes, and off-machine work exist); flag only
191
+ absences the person's own declared aim makes relevant.
192
+ Graveyard lens (longer windows): a workstream that appears on 3+ days then vanishes for
193
+ the rest of the window is a candidate abandonment — but verdict only after the mechanical
194
+ check (shipped/completed counts as closure, not abandonment).
195
+
196
+ ## Part 4b — The paste-ready config block (the mirror becomes a lever)
197
+ From the measured triggers, write a block the person can paste VERBATIM into their
198
+ CLAUDE.md so their agent's default behavior protects their flow automatically. Rules:
199
+ - Address the AGENT, imperative voice ("Never end a turn that changed behavior without…"),
200
+ never the person ("you should…").
201
+ - Every line must be EARNED by this person's receipts (≥3 occurrences, or a majority of
202
+ boundaries). A line without a measured basis is generic advice and dilutes the whole
203
+ block; omit it. Append the basis in a short parenthetical with the number
204
+ ("(8 of my 17 longest flow runs died on 'did it work?')").
205
+ - Convert trigger-OUT causes into prevention rules: uninterpretable output → verdict-first
206
+ reporting (what changed, did it work, how verified — one line before anything else);
207
+ bounced decisions → state your call and proceed, at most one truly blocking question;
208
+ manual-ops interruptions → the agent owns terminal/console work end to end.
209
+ - PLACE rules by visibility: the "In every response" / "At the end of every response"
210
+ sections carry the behaviors the person can SEE in a reply (verdict-first, render
211
+ hard-to-judge results as a small HTML view or chart, the single next task, threads
212
+ still running) — the UI quotes these lines verbatim as the pitch for the whole
213
+ setup, so each must paint a picture of a different reply. Workflow/ops rules the
214
+ person can't see in a single response ("own terminal work end to end") belong in
215
+ "What you should do", never in the response sections.
216
+ - SIGNAL → RULE TABLE (apply each ONLY when the person's own data crosses the receipts
217
+ bar; every rule cites its number):
218
+ · uninterpretable-output exits → verdict-first reporting AND "when a result is hard
219
+ to judge from text, render it (a small HTML view, chart, before/after)";
220
+ · threadDynamics.starved high → "queue my next task before the current agents
221
+ finish" (cite their starvation count);
222
+ · threadDynamics.peakCollapseHour concentrated → "treat <hour> as my admin hour;
223
+ schedule sweeps and slow runs there, my parallel set drains then anyway";
224
+ · threadDynamics.absorbed substantial → "when I narrow to one thread but keep
225
+ driving it hard, that is absorption, not a stall: do not prompt me to fan out";
226
+ · new-front exits → "park an incoming request with a tracked note and surface it as
227
+ the single next decision when the live thread lands";
228
+ · churn-exhaustion exits → "after two failed corrections on the same thing, stop
229
+ patching: restate my spec in one line and propose a reset".
230
+ These are the same conversions for every user; the DATA decides which fire and with
231
+ what numbers. A rule whose signal is absent from this person's record is OMITTED.
232
+ - CORRECTION-TAXONOMY → CONFIG SECTIONS (configSignals in the artifacts): what the
233
+ person repeatedly corrects is what they value; each class that crossed the bar
234
+ (≥3 occurrences on ≥3 days) earns its section in the generated block:
235
+ · "autonomy demanded" → autonomy rules ("run things yourself, never hand me steps;
236
+ act on unambiguous requests, then report") with the count cited;
237
+ · "conciseness demanded" / "style-slop corrected" → writing rules in THEIR terms
238
+ (whatever they actually correct: dashes, jargon, genericness, length);
239
+ · "accuracy demanded" → verification rules ("never state an unverified number;
240
+ say how each claim was checked");
241
+ · "visual evaluation asked" → reinforces the render-to-evaluate rule.
242
+ Classes absent from this person's record produce NO section — a person who never
243
+ corrects style gets no writing rules.
244
+ - ACTIONABILITY FILTER (applies after the table): a rule ships only if the AGENT
245
+ controls that behavior within a turn AND would have behaved differently without the
246
+ line. Two failure modes to catch:
247
+ · user-behavior insights dressed as agent rules ("queue your next task", "treat 3pm
248
+ as admin hour") — either REFRAME into the agent's actual lever (queue-before-drain
249
+ becomes "in the end-of-response block, always propose the specific next task to
250
+ start, so the queue never empties") or route them to the ACCOUNTABILITY PARTNER,
251
+ which is the right home for tell-the-person-in-the-morning insights;
252
+ · rules against behavior agents don't exhibit ("don't prompt me to fan out") — cut.
253
+ A short block of rules the agent will actually obey beats a long block of insights
254
+ it cannot act on.
255
+ - Convert trigger-IN levers into protection rules only where an agent can act: e.g. if
256
+ re-entry lands directly in steering, the agent leads with a two-line hottest-thread
257
+ state summary after any long gap; if long runs start in specific clock windows, keep
258
+ those windows execution-forward (no open-ended questions).
259
+ - If waits break this person's flow, add: during long executions, surface a reviewable
260
+ chunk or the next decision instead of going silent.
261
+ - STRUCTURE IS FIXED — four short subsections under one `##` heading that names the
262
+ derivation ("Flow rules, derived from N days of my own session logs, <date>"):
263
+ 1. "My flow profile" — 2-3 bullets: when this person's flow happens and what kills it,
264
+ each with its receipt in a short parenthetical. This is context the agent needs to
265
+ apply the rules with judgment, not decoration.
266
+ 2. "What you should do" — behavior rules (own the ops work, state your call and
267
+ proceed, parallelize, etc.), each earned by receipts.
268
+ 3. "In every response" — format rules for the response body (verdict first: what
269
+ changed, did it work, how verified; restate the spec in one line before a build
270
+ pass; plain language).
271
+ 4. "At the end of every response" — the closing block the agent ALWAYS appends, built
272
+ so the person can steer instantly instead of stalling on "did it work?": one line
273
+ each for what changed and how it was verified, the single next decision or
274
+ reviewable chunk, and any threads still running. Derive its exact fields from THIS
275
+ person's measured exit causes (e.g. if runs die on uninterpretable output, the
276
+ block leads with the verdict; if they die on bounced decisions, it carries exactly
277
+ one decision, never a menu).
278
+ Self-contained, plain language, no jargon, no em dashes, and SHORT — the whole block
279
+ under ~25 lines. It must make sense to an agent that has never seen the report.
280
+
281
+ ## Part 4c — The setup prompt (paste into Claude Code; it rebuilds the tooling)
282
+ Alongside the config block, write ONE self-contained prompt the person pastes into their
283
+ own Claude Code session. When run, it makes every change the analysis earned: the
284
+ CLAUDE.md flow rules AND a small set of custom skills that kill their measured
285
+ repetition/delegation items. Rules:
286
+ - SELF-CONTAINED: the prompt must carry everything the executing agent needs — the
287
+ person's measured findings (trigger counts, delegate items, rhythm windows) are quoted
288
+ INSIDE it as context. The executing agent has not seen the report.
289
+ - Any summary of what this setup DOES (in the prompt's own preamble or anywhere the
290
+ person reads before pasting) lists the visible response changes it produces —
291
+ "replies lead with the verdict", "hard-to-judge results arrive as a rendered view",
292
+ "every reply ends with the next task" — never installation meta ("appends rules to
293
+ your CLAUDE.md", "creates skills") and never invisible workflow claims.
294
+ - DERIVE, don't invent: one skill per DELEGATE item whose "how" an agent can own (a
295
+ scheduled audit, a run-watcher, a weekly review). 2-4 skills maximum, each named, each
296
+ with a 3-6 line behavior spec. No skill without a measured basis. Thread-dynamics
297
+ signals may also earn a skill (e.g. a queue-keeper that keeps N tasks staged when
298
+ starvation collapses are high) — same receipts bar.
299
+ - CLAUDE.md changes: include the Part 4b block verbatim in the prompt, with the
300
+ instruction to append it to the user-global CLAUDE.md (create if missing) — never
301
+ overwrite existing content.
302
+ - CONSENT PROTOCOL (from the source method, keep it): the executing agent must show
303
+ every change to an EXISTING file as a diff and wait for approval; new files need one
304
+ batch approval; nothing written before the person says go.
305
+ - VERIFY: the prompt ends by telling the agent to verify each skill is invocable and
306
+ report what was created in one line each.
307
+ - Format: plain imperative prose addressed to the executing agent, under ~40 lines,
308
+ no jargon, no em dashes.
309
+
310
+ ## Part 4d — The daily accountability partner (coding-only edition)
311
+ Produce a complete SKILL.md (installable in Claude Code) so an agent holds the person
312
+ accountable DAILY from their coding telemetry alone. This is the edition for users
313
+ without a chat/life corpus; when a chat report exists, its combined partner supersedes
314
+ this one. Design laws (identical to the chat edition):
315
+ - A PARTNER, not a status report; the instrument is the hard question, few words, one
316
+ nudge per day maximum. Accurate and kind. Never recite what they already know.
317
+ - COLLOQUIAL VOICE, non-negotiable: write like a sharp friend, never an analyst. Say
318
+ "You've been waking up around 11, every day" — never "your median first touch across
319
+ 56 measured days is 11:18". No day-counts, no metric names, no date codes (say "since
320
+ January", "back in March", never "Jan 22 → Jun 27, 2026"). The bullets say what it
321
+ WILL DO in plain future tense: "It will remind you every night to sleep early, track
322
+ when you start the next morning, and show you." A bullet that needs re-reading is a
323
+ failed bullet.
324
+
325
+ - MORNING, first message of the day, two beats: (1) yesterday's recap, 2-3 lines computed
326
+ fresh from focus.json/day-chart (in-flow time, the features touched, anything that
327
+ reached outside eyes); (2) the late-start check against their measured median and any
328
+ declared rule, then "What is the ONE thing today?". Yesterday shown, today asked.
329
+ - EVENING: their declared stop-time in their own words if one exists; have them write
330
+ tomorrow's first task before closing when re-entry is their measured ignition key.
331
+ - RESOLUTION ECHO: when the day's work touches a measured trigger-out cause (silent
332
+ runs, bounced decisions), quote the matching flow rule from their own record, once.
333
+ - Self-contained SKILL.md: frontmatter, their numbers/quotes inlined with dates,
334
+ instructions for reading fresh focus.json to compute today's and yesterday's facts,
335
+ daily schedule note plus "/accountability" on demand. Invent nothing.
336
+ Also produce 3-5 plain BULLETS. Every bullet STARTS with what the partner DOES
337
+ ("Catches your late starts…", "Reminds you every night…", "Shows you each morning…"),
338
+ then the plain colloquial reason in the person's own situation ("you've been starting
339
+ around 11 most days"). A bullet that is a finding instead of an action is wrong. At most
340
+ one number per bullet, no tildes, no ranges, no metric names.
341
+
342
+ ## COPY CONTRACT — every user-facing string, every section (validated on a real reader, 2026-07-10)
343
+
344
+ These rules came from watching a real user read a generated report and reject
345
+ section after section. They are GENERAL laws of what lands; apply them to every
346
+ string you write, for every user.
347
+
348
+ **Standing law: every piece of reader feedback on any report section gets
349
+ abstracted into a general rule HERE — the why behind the rejection, never the
350
+ instance — and the next generation must satisfy it cold. Outputs are never
351
+ hand-patched for one user.**
352
+
353
+ 1. **Bold verdict head, short tail.** Every bullet opens with a ≤5-word bolded
354
+ verdict, then at most one sentence of support. "**Afternoons leak in
355
+ drips.** 3+ exits between 12:00 and 17:00 on N days — one longer break
356
+ beats four short ones." A paragraph that buries its verdict gets skimmed
357
+ and rejected.
358
+ 2. **Counts and ratios are the punch — lead with them, then convert to a felt
359
+ unit.** "22× — threads drained with nothing queued" lands; "you frequently
360
+ drain threads" does not. Convert totals into units the reader feels: hours
361
+ a week → "N extra working days"; a share → "for every hour you worked, you
362
+ were gone N minutes."
363
+ 3. **Describe only what the reader can SEE change.** When listing what a
364
+ config/setup will do, name the visible response differences (verdict-first
365
+ replies, rendered HTML views, what every reply ends with), never workflow
366
+ claims ("owns terminal work") or meta descriptions ("your flow rules,
367
+ appended to CLAUDE.md") — the reader cannot verify those and skips them.
368
+ 4. **Never narrate what the chart already shows.** A summary line under a
369
+ visual earns its place only by naming a causal lever or a decision that is
370
+ NOT visible in the chart. "Your activity peaks at 3pm" under an
371
+ hour-of-day chart is deleted on sight.
372
+ 5. **≤4 bullets per section, one theme per section.** When receipts are
373
+ needed (a grid, per-day rows), collapse them behind a labeled expander and
374
+ lead with the verdicts. What mattered, what didn't, what should have
375
+ shipped earlier — that order.
376
+ 6. **Contrast pairs prove fixability.** The strongest motivator is the
377
+ reader's own best behavior: "your biggest day was also your lowest-break
378
+ day", "your five tightest days prove the ceiling". Prefer these over
379
+ external benchmarks wherever the data offers one.
380
+ 7. **State exclusions in the same breath as the grade.** If weekends, sleep,
381
+ or non-coding periods don't count against a number, say so inline
382
+ ("weekends are yours and are never counted here") — an unexplained strict
383
+ number reads as a bug, an explained one reads as fair.
384
+ 8. **One-line intros.** No section preamble longer than one sentence.
385
+ 9. **Verdicts for measurements, QUESTIONS for causal guesses.** A number the
386
+ logs prove ("22 collapses", "4h of breaks") is stated as a verdict. WHY a
387
+ feature dragged, why something didn't ship, what a gap was for — the logs
388
+ cannot know, so ask, humbly and specifically ("spread across 15 scattered
389
+ days — what kept it from one dedicated sitting?"). A wrong assertion about
390
+ motive makes the reader distrust the whole report; a good question makes
391
+ them answer it.
392
+
393
+ ## Part 5 — Output contract
394
+ Return STRICT JSON (no prose outside it):
395
+ {
396
+ "flowKinds": { "inFlow": [{"kind","sharePct","receipts":[..]}], "outOfFlow": [{"kind","sharePct","receipts":[..]}] },
397
+ "triggersIn": [{"trigger","count","lever"}],
398
+ "triggersOut": [{"cause","count","remedy"}],
399
+ "causalFindings": [{"finding","receipts":[..]}], // 3-6, each one sentence + receipts
400
+ "priority": {
401
+ "declaredAim": "quoted or 'none declared'",
402
+ "dragRows": [{"workstream","days","inference"}], // inference = plain-speech verdict + fix, receipts inline
403
+ "missingRow": "one self-contained QUESTION (ends with ?) or null",
404
+ "shipSooner": {"workstream","usableBy","refinementDaysAfter","verdict"} | null,
405
+ "metaShareNote": "one sentence or null"
406
+ },
407
+ "leverage": {
408
+ "keep": [{"what","why"}], // earned credit lives HERE, never in priority
409
+ "focusEdge": "one sentence naming where their hours multiply, or null",
410
+ "delegate": [{"what","hoursPerWeek","how"}]
411
+ },
412
+ "claudeMdSnippet": "the Part 4b markdown block as one string, or null if too few receipts",
413
+ "accountability": {"bullets":["…"],"skillMd":"the Part 4c SKILL.md as one string"},
414
+ "setupPrompt": "the Part 4c paste-into-Claude-Code prompt as one string, or null",
415
+ "tone": "every string self-contained, plain speech a non-engineer reads at a glance, verdicts not questions, at most one number per sentence, no jargon, no em dashes. Prefer the contrast-pair form where the data offers one: 'X sessions doing A; zero doing B' — the gap IS the finding. Describe patterns, never psychology: no diagnosing, no motives; the person decides what it means. Every item ends with a concrete next action; insight without a next action is entertainment."
416
+ }
417
+ Every array may be empty if the data is thin — an empty array with "insufficient data"
418
+ in causalFindings beats an invented pattern. Never fabricate a receipt.