patterns: expose composition helpers, add approve/aggregate hooks, ad…#5
Conversation
…d from-scratch pattern example The prebuilt patterns stay fork-friendly, but the pieces they are built from are now public API: merge_reviews, review_cycle, verify_and_judge, ask_with_valid_citations, render_evidence, mean_score_verdict and smaller_diff. ensemble(approve=...) swaps the per-review approval convention; judge_panel(aggregate=...) swaps the ballot aggregation, as its docstring already promised. examples/quorum_ensemble.py shows the anatomy of writing a pattern from scratch (majority quorum instead of unanimity — the case the kwargs deliberately don't cover).
🪙 100% AI-authored · 10 files · prompt 46/100
Important 🎯 Goal: Generalize patterns.py: expose private helpers, add approve/aggregate kwargs, add from-scratch pattern example
💬 The ask
📍 What shipped
Note 🪴 Prompt maturity: 46/100 · developing · 1 prompt scored (100% of AI commits) 📊 heuristic breakdown
Readability (display-only): Flesch 57 · FK grade 9.8 · Gunning Fog 13.2 Offline classical-NLP score — no LLM. Higher = more specific, bounded, and grounded prompting. Tip ✅ Security scan cleanNo credentials leaked in this branch's diff. h5i scanned every added line against the secret rule pack and found nothing to rotate. Note Duplicate-code scan clean — no copy-paste blocks introduced. 🧠 Reasoning by file — 235 nodes across 5 lanes, latest 24 only%%{init: {"flowchart": {"nodeSpacing": 42, "rankSpacing": 48, "diagramPadding": 14}, "themeVariables": {"fontSize": "18px"}} }%%
flowchart TB
subgraph lane_0["📄 src/h5i/orchestra/patterns.py · 12 ops"]
direction LR
n_lane_0_0["EDIT × 12"]:::a
end
subgraph lane_1["📄 tests/test_patterns.py · 3 ops"]
direction LR
n_lane_1_0["READ"]:::o
n_lane_1_1["EDIT × 2"]:::a
n_lane_1_0 --> n_lane_1_1
end
subgraph lane_2["📄 src/h5i/orchestra/_conductor.py · 2 ops"]
direction LR
n_lane_2_0["READ × 2"]:::o
end
subgraph lane_3["📄 src/h5i/orchestra/__init__.py · 1 op"]
direction LR
n_lane_3_0["READ"]:::o
end
subgraph lane_4["🗂 Other · 6 nodes"]
direction LR
n_lane_4_0["READ · read src/h5i/orchestra/policy.py"]:::o
n_lane_4_1["READ · read examples/custom_control_flow.py"]:::o
n_lane_4_2["READ · read examples/review_escalation.py"]:::o
n_lane_4_3["READ · read h5i-python-sdk-layout.md"]:::o
n_lane_4_4["READ · read tests/test_examples.py"]:::o
n_lane_4_5["EDIT · wrote examples/quorum_ensemble.py"]:::a
n_lane_4_0 --> n_lane_4_1
n_lane_4_1 --> n_lane_4_2
n_lane_4_2 --> n_lane_4_3
n_lane_4_3 --> n_lane_4_4
n_lane_4_4 --> n_lane_4_5
end
classDef o fill:#dbeafe,stroke:#1e3a8a,color:#0b1c4a;
classDef t fill:#fef3c7,stroke:#92400e,color:#3f2d05;
classDef a fill:#dcfce7,stroke:#166534,color:#0a2e16;
classDef n fill:#ede9fe,stroke:#5b21b6,color:#221251;
classDef m fill:#e5e7eb,stroke:#374151,color:#0b0f17;
📜 Per-commit provenance
|
…d from-scratch pattern example
The prebuilt patterns stay fork-friendly, but the pieces they are built from are now public API: merge_reviews, review_cycle, verify_and_judge, ask_with_valid_citations, render_evidence, mean_score_verdict and smaller_diff. ensemble(approve=...) swaps the per-review approval convention; judge_panel(aggregate=...) swaps the ballot aggregation, as its docstring already promised. examples/quorum_ensemble.py shows the anatomy of writing a pattern from scratch (majority quorum instead of unanimity — the case the kwargs deliberately don't cover).