Skip to content

Commit a720c33

Browse files
committed
Round 87: Human Review helper DRY + GLOSSARY playbook repair
1 parent a72bf18 commit a720c33

14 files changed

Lines changed: 92 additions & 44 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Full library docs: [reflective-prompt-library/README.md](reflective-prompt-libra
2121
## Governance
2222

2323
- **Contributing:** [CONTRIBUTING.md](CONTRIBUTING.md) — quality gates, routing maintenance (R8–R12), `make all`
24-
- **Panel record:** [multi-agent-panel-consensus](reflective-prompt-library/plans/multi-agent-panel-consensus-2026-06-25.md) — six-lens Socratic consensus (Rounds 1–86)
24+
- **Panel record:** [multi-agent-panel-consensus](reflective-prompt-library/plans/multi-agent-panel-consensus-2026-06-25.md) — six-lens Socratic consensus (Rounds 1–87)
2525
- **Operator playbook:** [GLOSSARY.md](reflective-prompt-library/GLOSSARY.md) — Governance Maintenance Playbook
2626

2727
The repository contains:

reflective-prompt-library/GLOSSARY.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Curated top-of-cheatsheet summary of high-confusion routing traps (ROUTE-002 hol
337337

338338
## Governance Maintenance Playbook / 治理維護手冊
339339

340-
Ongoing upkeep after panel close (Rounds 1–86). Not agent instructions — operator checklist.
340+
Ongoing upkeep after panel close (Rounds 1–87). Not agent instructions — operator checklist.
341341

342342
**Operational test:** Before router tuning, add fresh ROUTE-002/003 holdout phrases; run `make all`; record decisions in `PROJECT_KNOWLEDGE.md` Decision Index when governance surface changes.
343343

@@ -357,4 +357,6 @@ Ongoing upkeep after panel close (Rounds 1–86). Not agent instructions — ope
357357
14. When editing `01-thinking/` Purpose preambles, keep `Primary workflow surfaces` aligned exactly with `SKILL_THINKING_SOURCES` via `test_thinking_lens_primary_surfaces_match_consumer_graph`; put escalations and adjacent workflow notes in Scope or Human Review, not on the primary line.
358358
15. When editing composable prompts (`02-engineering``06-repo`), keep `Primary workflow surface(s)` aligned with `*_SKILL_LINKS` in `test_prompt_cross_links.py`; use Supporting lens for cross-cutting lenses like `runtime-trust-boundary.md`; put escalate/pair notes in Scope.
359359
16. When editing `00-core/` prompts, keep `Primary workflow surface(s)` aligned with `CORE_SKILL_LINKS` in `test_prompt_cross_links.py`; put pair/escalation skills in Scope or Human Review, not on the primary line.
360-
17. When editing composable prompts (`00-core``06-repo`), keep `Primary workflow surface(s)` / Supporting-lens preamble lines and run `test_*_prompts_eval_harness.py` primary-surface guards.18. When adding or editing composable prompts (`02-engineering``06-repo`) with `## Human Review`, keep preamble escalation routed to `reflective-risk` and run Human Review guards in `test_*_prompts_eval_harness.py` (exact heading match via `prompt_eval_helpers.py`).
360+
17. When editing composable prompts (`00-core``06-repo`), keep `Primary workflow surface(s)` / Supporting-lens preamble lines and run `test_*_prompts_eval_harness.py` primary-surface guards.
361+
18. When adding or editing composable prompts (`02-engineering``06-repo`) with `## Human Review`, keep preamble escalation routed to `reflective-risk` and run Human Review guards in `test_*_prompts_eval_harness.py` (exact heading match via `prompt_eval_helpers.py`).
362+
19. When editing Human Review guards, use `prompt_eval_helpers.assert_human_review_preamble` in all `test_*_prompts_eval_harness.py` files (thinking lenses + composable categories).

reflective-prompt-library/PROJECT_KNOWLEDGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ deferred promotions are recurrence-gated — see [panel backlog](plans/multi-age
7373
## Decision Index
7474

7575
- 2026-06-25 Round 85 panel — composable prompt Primary workflow surface preamble guards (`test_*_prompts_eval_harness.py`) + Supporting-lens exemption → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
76+
- 2026-06-25 Round 87 panel — Human Review helper DRY + GLOSSARY playbook step repair → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
7677
- 2026-06-25 Round 86 panel — composable Human Review preamble guards + `reflective-risk` routing alignment → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
7778
- 2026-06-25 Round 84 panel — `00-core` Primary workflow surface parity + primary-line trim → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
7879
- 2026-06-25 Round 83 panel — composable prompt Primary workflow surface parity (`02-engineering``06-repo`) + supporting-lens exemption → [record](plans/multi-agent-panel-consensus-2026-06-25.md)

reflective-prompt-library/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Pick **Strictness L1–L6** first (`skills/reflective-dispatch/SKILL.md`, [GLOSS
3030

3131
## Governance Panel Record
3232

33-
Multi-agent Socratic consensus on project goals and the nine skills (Rounds 1–86, options A–FJ) is recorded in [plans/multi-agent-panel-consensus-2026-06-25.md](plans/multi-agent-panel-consensus-2026-06-25.md). Run `make all` before claiming routing or governance changes are verified.
33+
Multi-agent Socratic consensus on project goals and the nine skills (Rounds 1–87, options A–FO) is recorded in [plans/multi-agent-panel-consensus-2026-06-25.md](plans/multi-agent-panel-consensus-2026-06-25.md). Run `make all` before claiming routing or governance changes are verified.
3434

3535
## Directory Map
3636

reflective-prompt-library/plans/multi-agent-panel-consensus-2026-06-25.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,4 +2409,49 @@ User directive (repeat): review prompts, plans, skills, and Socratic/critical-th
24092409

24102410
**Resealed 2026-06-25** after **Round 86** (options FG–FJ). Composable prompts with `## Human Review` now have eval_harness preamble guards matching thinking-lens pattern (R81); full library contract parity closed (graph + primary surface + Human Review). Holdout expansion remains recurrence-gated maintenance.
24112411

2412+
---
2413+
2414+
## Round 87 — Human Review helper DRY + GLOSSARY playbook repair (2026-06-25)
2415+
2416+
**Options FK–FO** | Six-lens panel (Opus, Codex, Gemini, Composer, Sakana, GLM)
2417+
2418+
### Round 87 options
2419+
2420+
| ID | Proposal | Verdict |
2421+
| --- | --- | --- |
2422+
| FK | Fix GLOSSARY playbook step 17/18 newline merge + `test_maintenance_playbook_steps_on_separate_lines` | **Agree** |
2423+
| FL | DRY Human Review guards via `prompt_eval_helpers.assert_human_review_preamble` across all `test_*_prompts_eval_harness.py` | **Agree** |
2424+
| FM | GLOSSARY playbook step 19 + governance sync | **Agree** |
2425+
| FN | ROUTE holdout expansion | **Defer** |
2426+
| FO | Router / tenth skill / benchmark CI | **Reject** |
2427+
2428+
### Round 87 verdict table
2429+
2430+
| ID | Option | Verdict | Action |
2431+
| --- | --- | --- | --- |
2432+
| FK | Playbook repair | **Agree** | split merged steps; anti-drift pytest |
2433+
| FL | Shared HR helper | **Agree** | migrate thinking + composable harness files |
2434+
| FM | Playbook + docs | **Agree** | step 19; panel round 87 sync |
2435+
| FN | Holdout expansion | **Defer** | maintenance |
2436+
| FO | Router/tenth skill/benchmark CI | **Reject** | no change |
2437+
2438+
**All roles agree.**
2439+
2440+
## Implemented Changes (Round 87)
2441+
2442+
- `GLOSSARY.md`: repaired step 17/18 newline merge; playbook step 19 for shared Human Review helper
2443+
- `plans/tests/test_glossary_structure.py`: `test_maintenance_playbook_steps_on_separate_lines`
2444+
- `plans/tests/prompt_eval_helpers.py`: `assert_human_review_preamble`
2445+
- `plans/tests/test_{thinking,engineering,context,agent,domain,repo}_prompts_eval_harness.py`: use shared Human Review helper
2446+
- `QUALITY_GATES_SUMMARY.md`: shared HR helper note; panel Rounds 1–87; 550+ pytest floor
2447+
- `PROJECT_KNOWLEDGE.md`: Decision Index Round 87 entry
2448+
- `README.md`, `reflective-prompt-library/README.md`, `test_readme_governance.py`: panel round 87 sync
2449+
2450+
## Verification (Round 87)
2451+
2452+
- `make all`: pytest + ROUTE-001/002/003 100%
2453+
2454+
## Panel status (updated)
2455+
2456+
**Resealed 2026-06-25** after **Round 87** (options FK–FO). Human Review guards now share one helper across thinking lenses and composable prompts; GLOSSARY playbook formatting anti-drift closed. Holdout expansion remains recurrence-gated maintenance.
24122457

reflective-prompt-library/plans/tests/prompt_eval_helpers.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ def has_human_review_preamble(prompt_path: Path) -> bool:
1616

1717
def prompts_with_human_review(prompts: tuple[Path, ...]) -> tuple[Path, ...]:
1818
return tuple(p for p in prompts if has_human_review_preamble(p))
19+
20+
21+
def assert_human_review_preamble(prompt_path: Path) -> None:
22+
"""Human Review sections must live in preamble and route to reflective-risk."""
23+
preamble = prompt_preamble(prompt_path)
24+
assert has_human_review_preamble(prompt_path), (
25+
f"{prompt_path.name} missing ## Human Review preamble outside template block"
26+
)
27+
assert "reflective-risk" in preamble, (
28+
f"{prompt_path.name} Human Review should route to reflective-risk"
29+
)

reflective-prompt-library/plans/tests/test_agent_prompts_eval_harness.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sys.path.insert(0, str(Path(__file__).parent))
1010

1111
from eval_harness import EvalHarness # noqa: E402
12-
from prompt_eval_helpers import prompts_with_human_review # noqa: E402
12+
from prompt_eval_helpers import assert_human_review_preamble, prompts_with_human_review # noqa: E402
1313

1414
AGENT_DIR = Path(__file__).parent.parent.parent / "04-agent"
1515
REPO_ROOT = str(Path(__file__).parent.parent.parent.parent)
@@ -86,8 +86,4 @@ def test_agent_prompts_have_workflow_surface_preamble_line():
8686
)
8787
def test_agent_prompt_has_human_review_section(prompt_path: Path):
8888
"""Prompts with Human Review declare escalation outside zh-TW templates."""
89-
preamble = prompt_path.read_text(encoding="utf-8").split("```", 1)[0]
90-
assert "## Human Review" in preamble, f"{prompt_path.name} missing Human Review preamble"
91-
assert "reflective-risk" in preamble, (
92-
f"{prompt_path.name} Human Review should route to reflective-risk"
93-
)
89+
assert_human_review_preamble(prompt_path)

reflective-prompt-library/plans/tests/test_context_prompts_eval_harness.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sys.path.insert(0, str(Path(__file__).parent))
1010

1111
from eval_harness import EvalHarness # noqa: E402
12-
from prompt_eval_helpers import prompts_with_human_review # noqa: E402
12+
from prompt_eval_helpers import assert_human_review_preamble, prompts_with_human_review # noqa: E402
1313

1414
CONTEXT_DIR = Path(__file__).parent.parent.parent / "03-context"
1515
REPO_ROOT = str(Path(__file__).parent.parent.parent.parent)
@@ -79,8 +79,4 @@ def test_context_prompts_have_primary_workflow_surfaces_line():
7979
)
8080
def test_context_prompt_has_human_review_section(prompt_path: Path):
8181
"""Prompts with Human Review declare escalation outside zh-TW templates."""
82-
preamble = prompt_path.read_text(encoding="utf-8").split("```", 1)[0]
83-
assert "## Human Review" in preamble, f"{prompt_path.name} missing Human Review preamble"
84-
assert "reflective-risk" in preamble, (
85-
f"{prompt_path.name} Human Review should route to reflective-risk"
86-
)
82+
assert_human_review_preamble(prompt_path)

reflective-prompt-library/plans/tests/test_domain_prompts_eval_harness.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sys.path.insert(0, str(Path(__file__).parent))
1010

1111
from eval_harness import EvalHarness # noqa: E402
12-
from prompt_eval_helpers import prompts_with_human_review # noqa: E402
12+
from prompt_eval_helpers import assert_human_review_preamble, prompts_with_human_review # noqa: E402
1313

1414
DOMAIN_DIR = Path(__file__).parent.parent.parent / "05-domain"
1515
REPO_ROOT = str(Path(__file__).parent.parent.parent.parent)
@@ -80,8 +80,4 @@ def test_domain_prompts_have_primary_workflow_surfaces_line():
8080
)
8181
def test_domain_prompt_has_human_review_section(prompt_path: Path):
8282
"""Prompts with Human Review declare escalation outside zh-TW templates."""
83-
preamble = prompt_path.read_text(encoding="utf-8").split("```", 1)[0]
84-
assert "## Human Review" in preamble, f"{prompt_path.name} missing Human Review preamble"
85-
assert "reflective-risk" in preamble, (
86-
f"{prompt_path.name} Human Review should route to reflective-risk"
87-
)
83+
assert_human_review_preamble(prompt_path)

reflective-prompt-library/plans/tests/test_engineering_prompts_eval_harness.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sys.path.insert(0, str(Path(__file__).parent))
1010

1111
from eval_harness import EvalHarness # noqa: E402
12-
from prompt_eval_helpers import prompts_with_human_review # noqa: E402
12+
from prompt_eval_helpers import assert_human_review_preamble, prompts_with_human_review # noqa: E402
1313

1414
ENGINEERING_DIR = Path(__file__).parent.parent.parent / "02-engineering"
1515
REPO_ROOT = str(Path(__file__).parent.parent.parent.parent)
@@ -80,8 +80,4 @@ def test_engineering_prompts_have_primary_workflow_surfaces_line():
8080
)
8181
def test_engineering_prompt_has_human_review_section(prompt_path: Path):
8282
"""Prompts with Human Review declare escalation outside zh-TW templates."""
83-
preamble = prompt_path.read_text(encoding="utf-8").split("```", 1)[0]
84-
assert "## Human Review" in preamble, f"{prompt_path.name} missing Human Review preamble"
85-
assert "reflective-risk" in preamble, (
86-
f"{prompt_path.name} Human Review should route to reflective-risk"
87-
)
83+
assert_human_review_preamble(prompt_path)

0 commit comments

Comments
 (0)