Name each file of the setup as the setup's, and a config's as setup:<path>
CI / tests (pull_request) Successful in 4m42s

This commit is contained in:
2026-12-04 04:23:17 +01:00
parent eff57c1dfd
commit 6dd2787e7b
41 changed files with 220 additions and 156 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ import typing
from failure import Failure
from text_files.file_writes import replace_file
# What the home links to in the clone: the instruction files Claude Code reads from its home.
LINKED = ("CLAUDE.md", "agents", "rules", "skills")
# What the home links to in the clone: the instruction files Claude Code reads from its home, and the two folders those files name beside them. So a claude opens every file of the setup in its own home: the setup's CLAUDE.md → "Vocabulary", "setup".
LINKED = ("CLAUDE.md", "agents", "bin", "principles", "rules", "skills")
# Stands for the clone's folder in the clone's settings.json. Every value that holds it is a shell command, such as a hook's.
CLONE = "{clone}"
# The file in the home that names the clone and the commit the home was built from.
+3 -3
View File
@@ -25,7 +25,7 @@ class Home(unittest.TestCase):
self.temp = pathlib.Path(tempfile.mkdtemp())
self.addCleanup(subprocess.run, ["rm", "-rf", str(self.temp)])
self.clone = self.temp / "the clone"
for folder in ("agents", "rules", "skills"):
for folder in ("agents", "bin", "principles", "rules", "skills"):
(self.clone / folder).mkdir(parents=True)
(self.clone / "CLAUDE.md").write_text("# The setup's rules\n", encoding="utf-8")
(self.clone / "settings.json").write_text(json.dumps(SETTINGS), encoding="utf-8")
@@ -49,10 +49,10 @@ class Home(unittest.TestCase):
read: dict[str, object] = json.loads((self.home / "settings.json").read_text(encoding="utf-8"))
return read
def test_a_new_home_links_the_clones_instruction_files(self) -> None:
def test_a_new_home_links_each_folder_of_the_setup_that_an_instruction_file_names(self) -> None:
self.assertIsNone(self.unready())
for name in ("CLAUDE.md", "agents", "rules", "skills"):
for name in ("CLAUDE.md", "agents", "bin", "principles", "rules", "skills"):
self.assertTrue((self.home / name).is_symlink(), name)
self.assertEqual((self.home / name).resolve(), (self.clone / name).resolve())
self.assertEqual((self.home / "CLAUDE.md").read_text(encoding="utf-8"), "# The setup's rules\n")