greedyfrog-method
Skill4 starsChanged 21 days agoMITView on GitHub
BitWonka's greedyfrog process, reconstructed so we can repeat it. Use when redesigning a reversible traversal or inversion (ecdsa.fail Euclid / GCD walk) so the state carries its own reverse decisions instead of a history stack, when building, porting or moving greedyfrog rows (825 / 815 / 849 trees, cap-dependent family), or when asked how greedyfrog was invented.
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accepted-proof-exact-retuneSkill
- arxiv-portable-researchSkill
- auto-autoresearch-pipelineSkill
- beachhead-ratchetSkill
- bounded-commuting-foldSkill
- burn-the-house-downSkill
- calibrated-static-cost-proxySkill
- circuit-edit-integration-safetySkill
- colab-laneSkill
- computer-algebra-oraclesSkill
- constraint-construction-searchSkill
- cross-model-review-gateSkill
- deepseek-pressure-testSkill
- ecdsafail-fastevalSkill
- ecdsafail-lowq-playbookSkill
- ecdsafail-oracle-loopSkill
- ecdsafail-pareto-ratchetSkill
- ecdsafail-scratch-dietSkill
- elicit-researchSkill
- evaluator-scoring-surface-auditSkill
- exact-evaluator-replicaSkill
- exact-hold-passSkill
- exact-postpass-stackSkill
- exact-search-engineeringSkill
- fast-lean-proof-loopSkill
- fit-probe-and-spliceSkill
- gpu-affine-table-synthesisSkill
- hard-problem-contractSkill
- hold-demand-ledgerSkill
- hosted-carry-lendingSkill
- inert-op-screen-to-structural-ruleSkill
- invariant-chartSkill
- jev-second-perspectiveSkill
- lambda-exchange-deskSkill
- leader-rebase-stackSkill
- lean-arklib-proofsSkill
- lean-finite-certificate-splittingSkill
- lever-switches-and-break-controlsSkill
- mission-commandSkill
- nasqret-playbookSkill
- paged-walk-descentSkill
- peak-lifetime-ledgerSkill
- pinned-table-stackingSkill
- pip-disciplineSkill
- portable-source-assertionsSkill
- proximity-prize-campaignSkill
- proximity-prize-frontier-archaeologySkill
- quantum-affine-lookup-synthesisSkill
- quantum-borrowed-wire-counterexampleSkill
- quantum-dense-qromSkill
- quantum-dirty-borrowingSkill
- quantum-divstep-reconstructionSkill
- quantum-encoded-arithmeticSkill
- quantum-graded-divider-placementSkill
- quantum-guarded-permutation-auditSkill
- quantum-mbundo-lifetimesSkill
- quantum-record-miningSkill
- quantum-replay-arithmeticSkill
- quantum-residue-scan-ambiguitySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Design forward and reverse rules together: Search for an invariant, monotone quantity or cofactor that identifies the previous operation.
- Very specific: line 56
Price the error budget explicitly: Every emitter shortcut gets a predicate in the predictor (his G1 act_const shortcut was not added to the …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gumpifrosch (greedyfrog-method)
Greedyfrog (BitWonka, ecdsa.fail, 27-28 Oct 2026) replaced froghop-one's inversion traversal inside an unchanged point-add shell: 903 slots plus a quantum quotient stack became 254 uniform slots and no stack. First row 825 x 6,107,471; same-width refinement 825 x 5,485,974 (-10.2 %). The leading word of the method is self-describing state: pick the forward step and the register layout together so that the state after a step already contains the instruction for undoing it. Fast forward step without that = you still pay for history; stackless reverse without a fast step = you still pay for alignment. Greedyfrog has both halves.
The mechanism, concretely: state (A, tA), (B, tB) with invariant A*tB + B*tA = p, start (p, x', 0, 1). Each step
keeps A and B top-aligned, subtracts the largest power-of-two multiple of B that fits (e = bl(A) - bl(B),
d = [(B << e) > A], A -= B << (e-d), tA += tB << (e-d)), renormalises, swaps if 0 < A < B. Within one Euclid
level tA = t0 + Q*tB, so the last applied digit is lowest_set_bit(floor(tA / tB)): the growing cofactors encode
the history. The inverse reads 28-bit cofactor windows, runs up to 21 non-restoring division rows and finds the last
set row. Inputs are reflected (x' = min(dx, p - dx)) to kill the first-quotient-1 ambiguity (75 % shot failure
without it). Classical X-measurement records remain for phase repair only.
Steps (each ends on its output; do not start the next without it)
- Freeze the baseline and the component boundary. Rebuild the parent row from its commit with an empty
environment until its
ops.binsha256 matches the note; find the active dispatcher for the component you will replace. Output: byte-exact baseline stream + the interface the new component must satisfy. - Cost the structure, not the constants. Split the component's cost into useful arithmetic, alignment / routing, stored decisions, inverse cleanup, peak workspace. Output: a one-sentence bottleneck with a measurable prediction ("~900 alignment slots and the quotient stack dominate width and Toffoli").
- Design forward and reverse rules together. Search for an invariant, monotone quantity or cofactor that identifies the previous operation; choose a layout that makes the forward step local and the reverse decision cheap; enumerate ambiguity cases now. Output: recurrence + invariant + decoder + preconditions, checked by an unwindowed integer script exhaustively on small primes (e.g. all inputs mod 101 and mod 65,537) and on a few thousand random secp256k1 inputs, zero assertion failures.
- Keep two executable models. An integer model (
Spec) and a physical lane model (Lanes: markers, wrap-around, control bits), compared after every step. Output: a per-step equality test passing on >= 200 walks, able to name the first divergent step. - Census the walk before fixing the schedule. Per-slot active fraction, operand lengths, rotations, row counts and tails from 200,000 walks (fit), then a fresh corpus (test). Derive windows and per-slot row budgets from the census; keep generator version, seed and margins. Output: a committed envelope file + a categorised fresh-input failure estimator (greedyfrog: 70 failing divisions / 200,000 walks -> about 6.3 failing shots per 9,024).
- Build the smallest checkable cell. One forward slot against the lane model, then forward/inverse round trip with zero phase and clean scratch, then borrowed lanes randomised and restored. Output: cell tests that catch a deliberately wrong forward mutant (a round trip alone hides a wrong forward function).
- Integrate through the shell interface and replay concrete failures. Run the trusted evaluator; replay every failing shot's exact inputs through the model (his first full build failed shot 7806: too few division rows in one slot; fixed for ~180k Toffoli). Output: each failure classified as recurrence bug, implementation mismatch, or window exit.
- Profile the binding phase. Per-section live high-water marks and Toffoli; cut width where it binds (greedyfrog 815: inverse decode on idle passenger lanes via borrowed-lane ANDs). Output: a before/after section table with the new peak.
- Parameterise by the cap. Clean pools where room exists, borrowed lanes or recomputation where it does not, carry pools only while used. Output: one emitter that builds at >= 3 caps (his G3 / G4 are one-line cap changes of G2: 849, 815, 825).
- Price the error budget explicitly. Every emitter shortcut gets a predicate in the predictor (his G1
act_constshortcut was not added to the predictor: the gap to avoid). Output: a fixed-input A/B against the parent where the shots that fail outside the predicted set number zero. - Prescreen nonces on the exact stream, then bind the real evaluator. Finalise the gate list first; the
scanner hashes the prefix once and varies the 48-bit identity tail (96 X ops). Output: first clean value in scan
order, trusted
eval_circuitall 9,024 OK, an independent twin build with the same sha256. - Write the note as mechanism + limits. Invariant, layout, census provenance, profile, constants, results at several caps, what is not proven. Output: a note another worker can reproduce from, >= 5,200 bytes, in our own words (never paste inherited notice blocks).
Working on greedyfrog trees
Sources (Layr-Labs/ecdsafail-challenge; all five are validator snapshots with the same parent 2120d8a2; code
lineage is SnehalRaj's shell ab98dd15 / commit 38bf9d65, a +3,265 / -11 line delta ignoring line endings):
| row | Q x T | commit | ops.bin sha256 (note) |
G0 39ef23e2 | 825 x 6,107,471 | 7e5e7712 | 26a667bf...b516b6 |
G1 ec1e870b | 815 x 6,792,761 | 4cd9e8da | f7a8573b...50cd41 |
G2 954016db | 849 x 4,918,479 | 7e0933a1 | 9778ab2b...fc86d5 |
G3 73799fca | 815 x 6,360,721 | 2885dc51 | 968ff62c...43b5b2 |
G4 1d06c635 | 825 x 5,485,974 | a5f1fa59 | 4b00ddad...250006 |
Fetch with git fetch origin <commit> in a challenge checkout. New files: greedyfrog.rs, greedyfrog_model.rs,
greedyfrog_diag.rs (predictor + nonce scanner, test-only), greedyfrog_data/env.txt, pointadd_greedyfrog.rs.
Entry points (tests live in --bin build_circuit; the expensive bodies return early unless their variable is set,
so a green cargo test ... greedyfrog_ does not prove they ran):
| purpose | command / setting |
| gate-level suite (13 tests, ~1 s) | cargo test --release --bin build_circuit greedyfrog_ |
| whole traversal | GREEDYFROG_TRAV=1 + greedyfrog_traversal_gate_level |
| section profile | GREEDYFROG_PROF=1 (+ GREEDYFROG_SLOTS) |
| G2-family caps in tests | GREEDYFROG_TEST_CAP=583 / 593 / 617 for shell caps 815 / 825 / 849 (232 below) |
| fresh failure rate | GREEDYFROG_DIAG_N=200000 + greedyfrog_diag_rate |
| replay the emitted packet | GREEDYFROG_DIAG_OPS=<ops.bin> + greedyfrog_diag_shots |
| nonce scan | GREEDYFROG_SCAN_OPS=<ops.bin>, GREEDYFROG_SCAN_START/MAX/WANT + greedyfrog_nonce_scan |
Measured on his trees (our own scout lane, 28 Oct 2026):
- 815 = rings 2 x 258 + passenger 256 + LA, LB 2 x 9 + reflection 1 (791 base) + 24 slot scratch; binders: late inverse sweep / rows undo 815, cofactor ladder 814, value ladder and swap decode 813, shell products 777 + c0 + k + pool >= 34 = 813.
- Gotchas: upstream files are CRLF (patch tools turn them LF: harmless, mention it);
FH_CKonly prints;greedyfrog_env.txtis a test output, not read by the build; the default model test decodes with (32, 22), the circuit with (28, 21); A/B phase-only one-sided shots appear in both directions because measurement words follow each circuit's own measurement count.
What the evidence does not show
The private chronology, prompts, Python prototypes (greedyfrog1.py, greedyfrog2.py, prefilter-shadow/
predict_fast.rs are named in comments, not published), the human / model split, and any use of loop-engine or
fasteval for this design. State these as unknown; resemblance to Stein, plus-minus or Brent-Kung is ours, not his.
Sources not bundled
The forensic report behind this skill (timeline, diffs per refinement, citations, nonce table) is a campaign record and is not part of this copy. The commits and notes it cites are public: see "Sources" above.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

