Restructure bin/ so the project reads at the comprehension floor

This commit is contained in:
2026-10-09 14:12:16 +02:00
parent 2157f5927d
commit b1913ed65d
46 changed files with 484 additions and 400 deletions
+12
View File
@@ -0,0 +1,12 @@
import pathlib
import typing
def project_archive(checkout_root: str, home: pathlib.Path, env: typing.Mapping[str, str]) -> pathlib.Path:
archive = pathlib.Path(env["LOOP_CLAUDE_TRANSCRIPTS"]).expanduser() if env.get("LOOP_CLAUDE_TRANSCRIPTS") else home / ".claude" / "loop-claude-transcripts"
return archive / project_key(checkout_root, home)
def project_key(checkout_root: str, home: pathlib.Path) -> str:
"""The checkout's path relative to ~/code, or to / outside it."""
return checkout_root.removeprefix(f"{home / 'code'}/").lstrip("/")