strategii: diagramele puse in capitole
36 din 37 de diagrame substituite in .md. substituie.py accepta acum si cheia cu slug inclus (unii agenti au scris mp2_exemplu, altii exemplu) si marcajul indentat. A ramas mdsrt_aplus: agentul a raportat OK fara sa scrie niciun fisier — exact capcana din CLAUDE.md, un raport de agent nu e dovada. Relansat separat. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ThN7ixZrowca8aTGrK1MUJ
This commit is contained in:
@@ -15,7 +15,7 @@ from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent.parent
|
||||
CAPITOLE = sorted((ROOT / "strategii").glob("0[1-8]_*.md"))
|
||||
MARCAJ = re.compile(r"^<!-- DIAGRAMA: ([a-z0-9_]+) -->$", re.M)
|
||||
MARCAJ = re.compile(r"^[ \t]*<!-- DIAGRAMA: ([a-z0-9_]+) -->[ \t]*$", re.M)
|
||||
|
||||
|
||||
def slug(cale: Path) -> str:
|
||||
@@ -32,7 +32,11 @@ def main() -> int:
|
||||
|
||||
def inlocuieste(m: re.Match) -> str:
|
||||
nonlocal puse, lipsa
|
||||
svg = ROOT / "gen" / "strategii" / f"{s}_{m.group(1)}.svg"
|
||||
# unii agenți au pus slug-ul în cheie (mp2_exemplu), alții nu (exemplu)
|
||||
gen = ROOT / "gen" / "strategii"
|
||||
svg = next((c for c in (gen / f"{s}_{m.group(1)}.svg",
|
||||
gen / f"{m.group(1)}.svg") if c.exists()),
|
||||
gen / f"{s}_{m.group(1)}.svg")
|
||||
if not svg.exists():
|
||||
lipsa += 1
|
||||
print(f"LIPSĂ {cap.name}: {svg.name}")
|
||||
|
||||
Reference in New Issue
Block a user