feat(#58): L3 dormant trigger guard -- DORMANT-TRIGGERS.yaml + checker + orchestrator hook

P5-1 docs/architecture/DORMANT-TRIGGERS.yaml -- 5 entries (IMP-16/17/18/19 active + IMP-20 followup-linked #55).
P5-2 scripts/check_dormant_triggers.py -- standalone, reads registry, scans tree + diff, writes .orchestrator/dormant_alerts.json, exit 0 always.
P5-3 orchestrator.py -- _check_dormant_triggers() helper + Stage 4->5 informational alert branch (skips audit-only, never blocks).
P5-4 tests/orchestrator_unit/test_dormant_triggers.py -- 30 cases (yaml schema, registry contents, checker matching, false-positive guards, manual-evidence skip, orchestrator branch, audit bypass, governance ref).
P5-5 PROJECT-INTENT-AND-GOVERNANCE.md -- single anti-patterns row referencing the L3 registry as binding contract surface.

Tests: pytest -q tests = 337 passed (baseline 307 + 30 new).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 09:43:14 +09:00
parent 8c1e56366b
commit 134f52d3d3
5 changed files with 887 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
# Dormant trigger registry (L3 layer — machine-readable).
#
# Purpose :
# Closed-but-binding dormant backlog rows ("documented:dormant" /
# "documented (deferred)") carry implicit "trigger-on-X" contracts.
# L1 (human memory) + L2 (periodic INTEGRATION-AUDIT) are fragile / late.
# This file is the single source of truth that scripts/check_dormant_triggers.py
# reads to flag activation candidates on every orchestrator run.
#
# Schema (per entry) :
# - issue : int # closed Gitea issue id (the dormant axis)
# - title : string
# - doc : string # repo-relative path to the dormant reference doc
# - doc_evidence_lines : string # "start-end" line range citing the activation-gate text
# - status : enum # documented:dormant | documented:deferred | documented:no-runtime | followup-linked
# - followup_issue : int|null # set when an open issue already tracks the watch (then no checker watch needed)
# - trigger
# description : string
# file_patterns : [glob] # working-tree paths checked against changed files
# content_patterns : [regex] # python re patterns matched against changed-file contents
# manual_evidence_required : bool # true → checker skips (human-only gate; e.g. User GO, sign-off, runtime regression analysis)
# - on_trigger
# action : enum # create_runtime_issue | reactivate_dormant | manual_review | note_only
# template : string # suggested follow-up issue title (if action ≠ note_only)
#
# Guardrails :
# - Checker is informational only (exit 0 always; orchestrator never blocks Stage 5 on alerts).
# - manual_evidence_required: true entries do NOT auto-fire — they are noted for human review.
# - followup_issue is set: the registry entry is note-only; no checker watch (the open issue tracks the axis).
# - Out of scope for this registry : IMP-07 (documented:no-runtime — policy decline, reactivation = policy reopen, not a code trigger).
- issue: 16
title: "IMP-16 U2 wiring (Phase Q U1 → Phase Z runtime)"
doc: docs/architecture/IMP-16-U2-WIRING-DESIGN.md
doc_evidence_lines: "21-25"
status: documented:dormant
followup_issue: null
trigger:
description: >-
IMP-07 reverse-path actually lands runtime — a non-test module under src/
introduces the reverse-path adapter (html_to_slide_mdx / edited_html_to_mdx /
reverse_path). At that point IMP-16 U2 wiring (Step 1/2/14 surface use)
becomes a live integration axis, not a paper design.
file_patterns:
- "src/**/*.py"
content_patterns:
- "html_to_slide_mdx"
- "edited_html_to_mdx"
- "reverse_path"
manual_evidence_required: false
on_trigger:
action: create_runtime_issue
template: "[IMP-16][P5][WIRING] Activate U2 reverse-path wiring against new IMP-07 adapter"
- issue: 17
title: "IMP-17 AI repair fallback carve-out"
doc: docs/architecture/IMP-17-CARVE-OUT.md
doc_evidence_lines: "25-31"
status: documented:dormant
followup_issue: null
trigger:
description: >-
3-condition AND gate: (1) explicit User GO for axis activation,
(2) B4 frame_selection evidence integration complete (Step 9 evidence trace
stabilised), (3) IMP-04 (catalog expansion to 32 frames) + IMP-05 (V4
rank-2/3 fallback) live. All three required before the carve-out exits
design-only state.
file_patterns: []
content_patterns: []
manual_evidence_required: true
on_trigger:
action: manual_review
template: "[IMP-17][P5][CARVE-OUT] Activate ai_adaptation_required fallback (3-cond gate cleared)"
- issue: 18
title: "IMP-18 SVG coordinate pipeline gap report"
doc: docs/architecture/IMP-18-SVG-GAP-REPORT.md
doc_evidence_lines: "38-43"
status: documented:dormant
followup_issue: null
trigger:
description: >-
An SVG-bearing partial lands under templates/phase_z2/ (families or frames)
AND the partial declares slots consuming items[*].cx/cy/r + outer_r +
viewbox_* (the prepare_venn_data return contract). IMP-04 frame_partials
registration is the natural upstream.
file_patterns:
- "templates/phase_z2/families/*.html"
- "templates/phase_z2/frames/*.html"
content_patterns:
- "<svg"
- "viewBox"
manual_evidence_required: false
on_trigger:
action: create_runtime_issue
template: "[IMP-18][P5][SVG] Activate SVG coordinate pipeline for new partial"
- issue: 19
title: "IMP-19 zone ratio reference (Phase O role-container pattern)"
doc: docs/architecture/IMP-19-ZONE-RATIO-REFERENCE.md
doc_evidence_lines: "83-90"
status: documented:dormant
followup_issue: null
trigger:
description: >-
Phase Z Step 8 solver (min_height_first + content_weight) produces a
verifiable regression that the Phase O role-container pattern would have
handled correctly, AND the IMP-09 owner confirms the case is not
addressable inside the Phase Z solver (visual_hints.min_height_px /
content_weight.score adjustments insufficient). Requires failing-case MDX
+ frame_contract trace + observed vs expected geometry.
file_patterns: []
content_patterns: []
manual_evidence_required: true
on_trigger:
action: manual_review
template: "[IMP-19][P5][ZONE-RATIO] Re-activate Phase O role-container pattern (IMP-09 sign-off attached)"
- issue: 20
title: "IMP-20 frame contract validation reference"
doc: docs/architecture/IMP-20-FRAME-CONTRACT-VALIDATION-REFERENCE.md
doc_evidence_lines: "85-91"
status: followup-linked
followup_issue: 55
trigger:
description: >-
§A5 3-cond AND gate (Step 10 partial frame-contract emit insufficient +
evidence + IMP-04 sign-off). Watch surface already owned by open issue
#55 — no checker watch installed here to avoid double-tracking.
file_patterns: []
content_patterns: []
manual_evidence_required: true
on_trigger:
action: note_only
template: "Tracked under open issue #55 — no new watch needed."

View File

@@ -157,6 +157,7 @@ Q~Y 검토 결과를 22-step 의 어느 step 에 어떤 부품을 가져올지
| "이슈 본문은 참고일뿐" | 본문의 (관련 step, source, scope, guardrails) 가 binding anchor |
| "Phase R / R' / Q 의 path 로 돌아가도 됨" | 회귀 금지선 4 항목 (INSIGHT-MAP §0) 절대 위반 X |
| "destination 외 추가 기능도 욕심내자" | 22-step + AI frame generation 까지가 목표. 그 이상은 별도 결정 |
| "문서에 박힌 dormant 항목은 자동 실행 안 됨" | L3 registry [`DORMANT-TRIGGERS.yaml`](DORMANT-TRIGGERS.yaml) + `scripts/check_dormant_triggers.py` 가 orchestrator Stage 4→5 transition 에서 informational alert 로 발화 (closed 이슈 #16/#17/#18/#19/#20 의 trigger-on-X contract) |
---