Skip to content

patterns: expose composition helpers, add approve/aggregate hooks, ad…#5

Merged
Koukyosyumei merged 1 commit into
mainfrom
improve-gen
Jul 15, 2026
Merged

patterns: expose composition helpers, add approve/aggregate hooks, ad…#5
Koukyosyumei merged 1 commit into
mainfrom
improve-gen

Conversation

@Koukyosyumei

Copy link
Copy Markdown
Contributor

…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).

…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).
@Koukyosyumei

Copy link
Copy Markdown
Contributor Author

🪙 100% AI-authored · 10 files · prompt 46/100

1 AI commit

Important

🎯 Goal: Generalize patterns.py: expose private helpers, add approve/aggregate kwargs, add from-scratch pattern example

1 / 1101 : 1.7
AI commitsfiles touchedREAD : EDIT

💬 The ask

"Do you think the current SDK is well generalized framework that allows users to define various strategies? For example, while this library has patterns, i guess it's important to let users define their own pattern easily. Sure, let's do …"

📍 What shipped

  • ✓ patterns: expose composition helpers, add approve/aggregate hooks, add from-scratch pattern example

Note

🪴 Prompt maturity: 46/100 · developing · 1 prompt scored (100% of AI commits)
🔧 Recurring weak spots: no acceptance criteria, weak context.
Heuristic signal of prompt craft — not a developer rating.

📊 heuristic breakdown
Dimension Signal
Objective (core) ███████░░░ 0.69
Grounding (core) █████░░░░░ 0.51
Direction / acceptance (core) ░░░░░░░░░░ 0.00
Context ███░░░░░░░ 0.25
Examples ███░░░░░░░ 0.30
Structure ██░░░░░░░░ 0.17
Lexical diversity █████████░ 0.92
Clarity (readability band) ██████████ 1.00
Length adequacy ██████████ 1.00
Evidence attached (bonus) ░░░░░░░░░░ 0.00

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 clean

No 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;
Loading

📜 Per-commit provenance

7fbf899f patterns: expose composition helpers, add approve/aggregate hooks, add from-scratch pattern example

  • promptDo you think the current SDK is well generalized framework that allows users to define various strategies? For example, while this library has patterns, i guess it's important to let users define their own pattern easily. Sure, let's do "expose the private helpers, add predica…
    • 🪴 prompt maturity 34/100 developing — no acceptance criteria, weak context
  • model claude-fable-5 · agent claude-code

Generated by h5i · re-run h5i share pr post to refresh.

@Koukyosyumei
Koukyosyumei merged commit e10962b into main Jul 15, 2026
13 of 14 checks passed
@Koukyosyumei
Koukyosyumei deleted the improve-gen branch July 15, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant