feat(style-acq T12): /methodology — קטגוריות ביטויי-מעבר + אנטי-דפוסים
מרחיב את עורך-הפרופיל ב-/methodology עם 2 קטגוריות נוספות שהכותב (T15) והמדד (T7) צורכים — כך שהיו"ר עורכת אותן והעריכה זורמת לכתיבה: - app.py: _METHODOLOGY_DEFAULTS += transition_phrases (מקובץ לפי תוצאה) + anti_patterns (מ-lessons.ANTI_PATTERNS). דרך ה-CRUD הגנרי הקיים (appeal_type_rules). - block_writer (T15 loop): קורא overrides גם ל-transition_phrases + anti_patterns. - web-ui: GenericMethodologyPanel (עורך key→JSON) + 2 טאבים ב-/methodology. voice_invariants (doc) — נדחה (לא key-value). G11, INV-LRN4. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
web/app.py
15
web/app.py
@@ -3995,12 +3995,27 @@ from legal_mcp.services.lessons import (
|
||||
GOLDEN_RATIOS,
|
||||
DISCUSSION_RULES,
|
||||
CONTENT_CHECKLISTS,
|
||||
ANTI_PATTERNS,
|
||||
TRANSITION_PHRASES,
|
||||
)
|
||||
|
||||
|
||||
def _transition_phrases_by_bucket() -> dict[str, list[str]]:
|
||||
"""Group TRANSITION_PHRASES into editable buckets by outcome (None→universal)."""
|
||||
out: dict[str, list[str]] = {}
|
||||
for p in TRANSITION_PHRASES:
|
||||
bucket = p.get("outcome") or "universal"
|
||||
out.setdefault(bucket, []).append(p["phrase"])
|
||||
return out
|
||||
|
||||
|
||||
_METHODOLOGY_DEFAULTS: dict[str, dict] = {
|
||||
"golden_ratios": {k: {s: list(v) for s, v in sec.items()} for k, sec in GOLDEN_RATIOS.items()},
|
||||
"discussion_rules": dict(DISCUSSION_RULES),
|
||||
"content_checklists": dict(CONTENT_CHECKLISTS),
|
||||
# T12 — editable abstract-profile categories the writer (T15) + metric (T7) consume.
|
||||
"transition_phrases": _transition_phrases_by_bucket(),
|
||||
"anti_patterns": {ap["name"]: {"regex": ap["regex"], "note": ap["note"]} for ap in ANTI_PATTERNS},
|
||||
}
|
||||
|
||||
_VALID_CATEGORIES = set(_METHODOLOGY_DEFAULTS.keys())
|
||||
|
||||
Reference in New Issue
Block a user