Read and write the plan, AGENTS.md, the records and the changelog at the paths a project's config names #519

Merged
lilleman merged 14 commits from item-344 into main 2026-11-13 01:55:30 +01:00
Showing only changes of commit 2d8b4bb8da - Show all commits
+3 -1
View File
@@ -1,3 +1,4 @@
import functools
import hashlib
import pathlib
import subprocess
@@ -5,6 +6,7 @@ import sys
from rule_hook.rules import Breach
from failure import Failure
from git_cli.git_repo import git
from rule_hook.git import guarded_git
from project_config.main import located
from release_plan import plan_file
@@ -22,7 +24,7 @@ def todo_breaches(directory: str, own: pathlib.Path = OWN) -> list[Breach]:
top = guarded_git(directory, "rev-parse", "--show-toplevel")
if isinstance(top, Failure):
return []
config = located(top, pathlib.Path.home())
config = located(top, pathlib.Path.home(), functools.partial(git, guarded=True))
if isinstance(config, Failure):
# A checkout with a todo.md and no config is one whose config is still to write.
return [Breach("todo-rank-check", config.reason, top)] if (pathlib.Path(top) / "todo.md").is_file() else []