_move and _apply write the project file first and remove or commit the
store copy second, so a reader that never waits must read the store copy
first: it then either sees the lines there or the project file is already
complete. Reading the project file first could miss both (fault 6).
Adds a deterministic test that runs a whole move between the two reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lead's own join node no longer blocks the end of turn; worker nodes
ready and undispatched still block. The lead may be waiting on its own
background job.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Research brief asks for provider and efficiency columns (published allowance with URL and
5h/week/month request windows), at most one row per provider per class, most efficient first,
and is marked as a sisi chore; ASK sends it to a hard-class worker with web search.
research_record refuses missing provider/efficiency and duplicate provider+class rows.
The wheel weights each worker by its plan's share left (sisi's own delegations against the
table's request windows, floored at 0.05); sisi models prints estimated plan use.
research_days 7 -> 3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- List every canonical problem (number, name, one cause) in organize_brief and ask for optional `## same problems` lines `N = M`.
- Record validated aliases into `rules/problems.json` with the organize commit, skipping unknown numbers, cycles, and bad lines with messages while still recording the rest of the organize; include `rules/problems.json` in `rules.revert()`.
- Resolve cited numbers, names, misses, 2nd-miss faults, drop lookups, and per-rule recurrence notes through the alias map while preserving existing problem numbers; show merged names under their canonical problem in `sisi retro`.
- Add tests with 3 real duplicate pairs from the blind set (watched failing on main first), update `test_the_product_stays_small` (2481 -> 2530, +49), and add CLAUDE.md guards to all touched test classes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Content-word overlap (stemmed, filler dropped), threshold 0.3 picked on
12 labelled real pairs (11/12) with 12/12 held out. The retro always
records as given; the suggestion is one line, never a refusal. The
report listing annotates the top lookalike pair. Product 2426->2454 lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- move prefers an exact whole-line match over a strict prefix,
otherwise refuses listing the candidates; a leading '- ' on the
prefix and extra spaces are accepted by collapsing whitespace.
- organize says plainly when identical lines from two levels become
one copy, or now sit at two levels, instead of printing move-back
commands that would lose one copy; those lines are excluded from
the printed back commands.
- move to canon is final: it is recorded as such, revert says so
plainly, and refusal messages name the exact command to run.
- A failed store git commit in _apply restores every file (store
files and last-project.json included) so the store is clean, and
both move and organize refuse naming the exact command to rerun.
- Tests: seven new reproducers (each watched failing on main), one
updated commit-failure test whose organize half asserted the old
leave-it-dirty behavior, size budget 2426 -> 2444.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A change that moves rules between levels (sisi rules move, or an organize
that moves lines across levels) prints the exact reverse command when it
succeeds, and revert after it changes nothing and prints the same command.
Revert keeps undoing learn, retro and single-level organize. The multi-file
undo record and its restore loop are gone.
Fixes the five findings of the fix review: a store with no .git starts its
history with the rules as they are (no undo goes past them); revert reads the
undo record even when its bytes did not change; a trailing slash in SISI_DATA
is still the store; organize takes the user lock and refuses a linked
drops.jsonl. Also: rules usage names canon; a non-UTF-8 file is named.
Product code 2427 -> 2426 lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validate source and target before any write; write project files then one store
commit carrying every project file's undo record, rolling all back on a failed
write. Queued core rules load as user rules until moved to canon. Organize
records user-only work outside git so the level audit runs there. Fixes the
ten findings of the strict-placement review, each with an acceptance test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Multiply each worker's wheel weight by a normalized Laplace quality
factor over its last 10 good/bad verdicts, ((good+1)/(n+2))/((n+1)/(n+2))
= (good+1)/(n+1), ignoring out and extend. Workers with no bad runs keep
their full weight (factor 1.0); workers with all bad runs floor at 1/11
so they remain pickable and picks are never refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each retro record carries rules: a 12-hex sha256 of the loaded core rulebook plus the project's rules, its char count and its rule-line count, so work before and after a rule change can be compared.
Known: tests/test_core.py test_the_product_stays_small now fails (2293 lines vs the 2283 budget; this adds 10 lines).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The setup commit started a detached git gc that pruned the tripwires test's fake .git/worktrees folders later under load (7 of 16 runs failed with four loops at once; 0 of 40 after).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The new organize test rebuilt the rulebook in-process with the real home folder and re-pointed ~/.claude/CLAUDE.md at a deleted temp store.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>