feat: Python porting workspace with reference data and parity audit

This commit is contained in:
Sisyphus
2026-04-01 20:36:06 +09:00
parent ca5fb61d42
commit 44d75cccdb
99 changed files with 4890 additions and 0 deletions

22
src/history.py Normal file
View File

@@ -0,0 +1,22 @@
from __future__ import annotations
from dataclasses import dataclass, field
@dataclass(frozen=True)
class HistoryEvent:
title: str
detail: str
@dataclass
class HistoryLog:
events: list[HistoryEvent] = field(default_factory=list)
def add(self, title: str, detail: str) -> None:
self.events.append(HistoryEvent(title=title, detail=detail))
def as_markdown(self) -> str:
lines = ['# Session History', '']
lines.extend(f'- {event.title}: {event.detail}' for event in self.events)
return '\n'.join(lines)