Skip to content

Commit f9ff353

Browse files
committed
feat(cross-links): Round 71 thinking ↔ engineering link pass
Complete bidirectional cross-links between 01-thinking lenses and 02-engineering prompts; add thinking Prompt Sources to implement, spec-plan, and handoff-retro skills. Add test_prompt_cross_links.py anti-drift suite; record Round 71 panel consensus.
1 parent 94b2549 commit f9ff353

12 files changed

Lines changed: 157 additions & 7 deletions

File tree

reflective-prompt-library/02-engineering/implementation-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Suitable for Codex, Cursor, OpenCode, Claude Code, and other repo-aware coding a
44

55
## Purpose
66

7-
Repo-aware implementation with traceability. Primary workflow surface: `reflective-implement`; escalate to `reflective-risk` before trust-boundary or high-blast-radius changes.
7+
Repo-aware implementation with traceability. Primary workflow surface: `reflective-implement`; escalate to `reflective-risk` before trust-boundary or high-blast-radius changes. Pairs with `01-thinking/counterargument.md` for simpler alternatives before adding code.
88

99
## Scope
1010

reflective-prompt-library/02-engineering/local-feedback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use this when something fails.
44

55
## Purpose
66

7-
Structured LOCAL_FEEDBACK loop for failures during implementation. Primary workflow surface: `reflective-implement`; escalate to `reflective-review` when the failure implicates spec or test adequacy.
7+
Structured LOCAL_FEEDBACK loop for failures during implementation. Primary workflow surface: `reflective-implement`; escalate to `reflective-review` when the failure implicates spec or test adequacy. Pairs with `01-thinking/critical-thinking-check.md` for evidence and assumption audits.
88

99
## Scope
1010

reflective-prompt-library/02-engineering/task-slicer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use this to split a spec into independent, testable, reviewable tickets.
44

55
## Purpose
66

7-
Slice a spec into independently verifiable tickets. Primary workflow surface: `reflective-spec-plan`.
7+
Slice a spec into independently verifiable tickets. Primary workflow surface: `reflective-spec-plan`. Pairs with `01-thinking/why-what-how-done.md` for goal-to-ticket framing.
88

99
## Scope
1010

reflective-prompt-library/02-engineering/test-designer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use this to design tests before implementation and prevent fake or weak tests.
44

55
## Purpose
66

7-
Design tests from a spec without implementation. Primary workflow surface: `reflective-spec-plan` (Test Plan / acceptance coverage).
7+
Design tests from a spec without implementation. Primary workflow surface: `reflective-spec-plan` (Test Plan / acceptance coverage). Pairs with `01-thinking/falsifiability.md` for observable failure conditions.
88

99
## Scope
1010

reflective-prompt-library/02-engineering/usage-first.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use this to avoid specs that look good but are awkward in practice.
44

55
## Purpose
66

7-
Derive usage-driven spec fixes before implementation. Primary workflow surface: `reflective-spec-plan`; pair with `reflective-brief` when goals are still fuzzy.
7+
Derive usage-driven spec fixes before implementation. Primary workflow surface: `reflective-spec-plan`; pair with `reflective-brief` when goals are still fuzzy. Pairs with `01-thinking/socratic-reviewer.md` to clarify the real user problem.
88

99
## Scope
1010

reflective-prompt-library/PROJECT_KNOWLEDGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ deferred promotions are recurrence-gated — see [panel backlog](plans/multi-age
7575
> Pointers to the causal trail — plans, reflections, tests, commits. Detail is
7676
> not duplicated here; this is a map, not an archive.
7777
78+
- 2026-06-25 Round 71 panel — thinking ↔ engineering cross-links (`01-thinking/` in all 8 engineering prompts; thinking Prompt Sources on implement/spec-plan/handoff-retro) + `test_prompt_cross_links.py`[record](plans/multi-agent-panel-consensus-2026-06-25.md)
7879
- 2026-06-25 Round 70 panel — standardize `02-engineering/` prompt contracts (Purpose/Scope/Acceptance/Falsifiability) + eval_harness anti-drift → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
7980
- 2026-06-25 Round 69 panel — standardize `01-thinking/` prompt contracts (Purpose/Scope/Acceptance/Falsifiability) + eval_harness anti-drift → [record](plans/multi-agent-panel-consensus-2026-06-25.md)
8081
- 2026-06-25 Post-Round 68 holdout expansion — ROUTE-003 minimality trap + thin adversarial group refresh (15 groups / 53 phrases) → [QUALITY_GATES_SUMMARY.md](plans/QUALITY_GATES_SUMMARY.md)

reflective-prompt-library/plans/QUALITY_GATES_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ROUTE-002 measures unseen phrasing separately from ROUTE-001. Round 7 (2026-06-2
314314
2. **ROUTE-001/002/003 in CI** — 128 + 102 + 53 paraphrases at 100% consistency (seeded fixtures); `validate_route_fixture.py` gates minimum coverage
315315
3. **Governance validators** — links, lint, governance metadata, PROJECT_KNOWLEDGE, benchmark fixture, skill examples
316316
4. **Harness policy docs** — CONTRIBUTING, AGENTS, SKILL_INSTALLATION, maintenance playbook
317-
5. **Doc anti-drift**`test_routing_contract.py`, cheatsheet parity tests, `test_readme_governance.py`, `test_thinking_prompts_eval_harness.py`, `test_engineering_prompts_eval_harness.py` (220+ pytest anti-drift suite in CI)
317+
5. **Doc anti-drift**`test_routing_contract.py`, cheatsheet parity tests, `test_readme_governance.py`, `test_thinking_prompts_eval_harness.py`, `test_engineering_prompts_eval_harness.py`, `test_prompt_cross_links.py` (240+ pytest anti-drift suite in CI)
318318

319319
### Ongoing maintenance (not blockers)
320320

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

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,4 +1584,66 @@ Parallel scouts (PromptScout2, SkillPlanAuditor, SocraticLens) confirmed Round 6
15841584

15851585
## Panel status (updated)
15861586

1587-
**Resealed 2026-06-25** after **Round 70** (options DC–DE). Engineering-prompt contract pass complete; 00-core and 03–05 Purpose sweep remains recurrence-gated.
1587+
## Round 71 — Thinking ↔ engineering cross-link review (2026-06-25)
1588+
1589+
User directive (repeat): review prompts, plans, skills, and Socratic/critical-thinking lenses in parallel until all roles agree, then implement.
1590+
1591+
Parallel scouts (**SocraticLens**, **PromptScout2**, **SkillPlanAuditor**) after Round 70.
1592+
1593+
### DF: Complete thinking ↔ engineering cross-links?
1594+
1595+
| Lens | Position |
1596+
| --- | --- |
1597+
| Sakana | **Agree** — Socratic lenses must be discoverable from engineering prompts |
1598+
| Opus | **Agree** — bidirectional Prompt Sources closes the epistemic loop |
1599+
| Codex | **Agree** — anti-drift test with explicit mapping table |
1600+
| Gemini | **Agree** — low-cost doc pass; no router change |
1601+
| Composer | **Agree** — IDE users follow engineering prompts first |
1602+
| GLM | **Agree** — English canonical links; zh-TW bodies unchanged |
1603+
1604+
**Socratic Q:** What fails if we only link thinking → workflow (Round 69) but not engineering → thinking?
1605+
**Answer:** Hosts load engineering templates without reaching falsifiability / Socratic lenses.
1606+
1607+
**Consensus:** **Agree** — all 8 `02-engineering/` prompts name `01-thinking/` lenses; add thinking refs to `reflective-implement`, `reflective-spec-plan`, `reflective-handoff-retro` Prompt Sources; `test_prompt_cross_links.py` anti-drift.
1608+
1609+
### DG: 00-core Purpose sweep now?
1610+
1611+
| Lens | Position |
1612+
| --- | --- |
1613+
| All six | **Reject** — recurrence-gated; cross-link pass is bounded |
1614+
1615+
### DH: Skill frontmatter pytest suite (SkillPlanAuditor)?
1616+
1617+
| Lens | Position |
1618+
| --- | --- |
1619+
| Codex | **Defer**`validate_governance.py` already enforces context_load in `make validate` |
1620+
| Opus | **Defer** — mirror in pytest only after a governance regression |
1621+
1622+
**Consensus:** **Defer** — no duplicate validator tests this round.
1623+
1624+
### Round 71 verdict table
1625+
1626+
| ID | Option | Verdict | Action |
1627+
| --- | --- | --- | --- |
1628+
| DF | Thinking ↔ engineering cross-links | **Agree** | 8 engineering + 3 skills + pytest |
1629+
| DG | 00-core Purpose sweep | **Reject** | backlog |
1630+
| DH | Skill frontmatter pytest | **Defer** | recurrence-gated |
1631+
1632+
**All roles agree.**
1633+
1634+
## Implemented Changes (Round 71)
1635+
1636+
- `02-engineering/*.md`: `01-thinking/` lens links in Purpose for all 8 prompts
1637+
- `skills/reflective-implement`, `reflective-spec-plan`, `reflective-handoff-retro`: thinking Prompt Sources
1638+
- `plans/tests/test_prompt_cross_links.py`: explicit cross-link anti-drift
1639+
- `QUALITY_GATES_SUMMARY.md`: cross-link test mention; pytest floor 240+
1640+
- `PROJECT_KNOWLEDGE.md`: Decision Index Round 71 entry
1641+
1642+
## Verification (Round 71)
1643+
1644+
- `make all`: pytest + ROUTE-001/002/003 100%
1645+
1646+
## Panel status (updated)
1647+
1648+
**Resealed 2026-06-25** after **Round 71** (options DF–DH). Thinking ↔ engineering cross-link pass complete; 00-core Purpose sweep remains recurrence-gated.
1649+
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
"""Anti-drift: thinking lenses, engineering prompts, and workflow skills cross-link."""
2+
3+
from pathlib import Path
4+
5+
import pytest
6+
7+
LIBRARY_ROOT = Path(__file__).parent.parent.parent
8+
THINKING_DIR = LIBRARY_ROOT / "01-thinking"
9+
ENGINEERING_DIR = LIBRARY_ROOT / "02-engineering"
10+
SKILLS_DIR = LIBRARY_ROOT / "skills"
11+
12+
ENGINEERING_THINKING_LINKS: dict[str, tuple[str, ...]] = {
13+
"task-start.md": (
14+
"01-thinking/why-what-how-done.md",
15+
"01-thinking/falsifiability.md",
16+
),
17+
"spec-writer.md": ("01-thinking/falsifiability.md",),
18+
"code-reviewer.md": ("01-thinking/critical-thinking-check.md",),
19+
"implementation-agent.md": ("01-thinking/counterargument.md",),
20+
"test-designer.md": ("01-thinking/falsifiability.md",),
21+
"task-slicer.md": ("01-thinking/why-what-how-done.md",),
22+
"usage-first.md": ("01-thinking/socratic-reviewer.md",),
23+
"local-feedback.md": ("01-thinking/critical-thinking-check.md",),
24+
}
25+
26+
SKILL_THINKING_SOURCES: dict[str, tuple[str, ...]] = {
27+
"reflective-implement": (
28+
"01-thinking/counterargument.md",
29+
"01-thinking/critical-thinking-check.md",
30+
),
31+
"reflective-spec-plan": (
32+
"01-thinking/falsifiability.md",
33+
"01-thinking/why-what-how-done.md",
34+
),
35+
"reflective-handoff-retro": ("01-thinking/socratic-reviewer.md",),
36+
}
37+
38+
THINKING_PROMPTS = tuple(sorted(THINKING_DIR.glob("*.md")))
39+
ENGINEERING_PROMPTS = tuple(sorted(ENGINEERING_DIR.glob("*.md")))
40+
41+
42+
def _preamble(path: Path) -> str:
43+
return path.read_text(encoding="utf-8").split("```", 1)[0]
44+
45+
46+
def _prompt_sources_section(skill_path: Path) -> str:
47+
text = skill_path.read_text(encoding="utf-8")
48+
marker = "## Prompt Sources"
49+
assert marker in text, f"{skill_path.parent.name} missing {marker}"
50+
return text.split(marker, 1)[1].split("##", 1)[0]
51+
52+
53+
@pytest.mark.parametrize("prompt_name,thinking_refs", ENGINEERING_THINKING_LINKS.items())
54+
def test_engineering_prompt_links_thinking_lens(prompt_name: str, thinking_refs: tuple[str, ...]):
55+
path = ENGINEERING_DIR / prompt_name
56+
preamble = _preamble(path)
57+
for ref in thinking_refs:
58+
assert ref in preamble, f"{prompt_name} preamble should reference {ref}"
59+
60+
61+
def test_all_engineering_prompts_have_thinking_cross_link():
62+
assert set(ENGINEERING_THINKING_LINKS) == {p.name for p in ENGINEERING_PROMPTS}
63+
64+
65+
@pytest.mark.parametrize("skill_name,thinking_refs", SKILL_THINKING_SOURCES.items())
66+
def test_workflow_skill_lists_thinking_sources(skill_name: str, thinking_refs: tuple[str, ...]):
67+
skill_path = SKILLS_DIR / skill_name / "SKILL.md"
68+
section = _prompt_sources_section(skill_path)
69+
for ref in thinking_refs:
70+
assert ref in section, f"{skill_name} Prompt Sources should list {ref}"
71+
72+
73+
@pytest.mark.parametrize("prompt_path", THINKING_PROMPTS, ids=lambda p: p.name)
74+
def test_thinking_prompt_maps_to_workflow_skill(prompt_path: Path):
75+
preamble = _preamble(prompt_path)
76+
assert "reflective-" in preamble, f"{prompt_path.name} should map to a workflow skill"
77+
78+
79+
def test_thinking_lens_files_exist_for_engineering_links():
80+
linked = {ref for refs in ENGINEERING_THINKING_LINKS.values() for ref in refs}
81+
for ref in linked:
82+
assert (LIBRARY_ROOT / ref).is_file(), f"missing thinking lens file {ref}"

reflective-prompt-library/skills/reflective-handoff-retro/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Promotion rules:
135135

136136
- `03-context/context-handoff.md`
137137
- `04-agent/retro.md`
138+
- `01-thinking/socratic-reviewer.md`
138139
- `04-agent/memory-consolidation.md`
139140
- `04-agent/runtime-trust-boundary.md`
140141
- `06-repo/PROJECT_KNOWLEDGE.template.md`

0 commit comments

Comments
 (0)