Skip to content

Commit c23f905

Browse files
committed
🔨 add wait skill and ai writing guard
1 parent e0c9840 commit c23f905

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

scripts/check_ai_writing.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@
55

66
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
77
EM_DASH = chr(0x2014)
8-
SKIP_DIRS = {
8+
ROOT_SKIP_DIRS = {
99
".git",
1010
".venv",
1111
".uv_cache",
1212
".uv-cache",
1313
".uv_tools",
1414
".uv-tools",
1515
".cache",
16-
".pytest_cache",
17-
"__pycache__",
1816
"node_modules",
1917
".next",
2018
}
19+
RECURSIVE_SKIP_DIRS = {"__pycache__", ".pytest_cache"}
20+
SKIP_PATH_PREFIXES = {
21+
("docs", ".next"),
22+
("docs", "node_modules"),
23+
}
2124
SKIP_SUFFIXES = {
2225
".png",
2326
".jpg",
@@ -52,7 +55,13 @@ def iter_text_files(root: pathlib.Path) -> Iterable[pathlib.Path]:
5255
if not path.is_file():
5356
continue
5457
rel = path.relative_to(root)
55-
if any(part in SKIP_DIRS for part in rel.parts):
58+
rel_parts = rel.parts
59+
if rel_parts and rel_parts[0] in ROOT_SKIP_DIRS:
60+
continue
61+
if any(rel_parts[: len(prefix)] == prefix for prefix in SKIP_PATH_PREFIXES):
62+
continue
63+
dir_parts = rel_parts[:-1]
64+
if any(part in RECURSIVE_SKIP_DIRS for part in dir_parts):
5665
continue
5766
if path.suffix.lower() in SKIP_SUFFIXES:
5867
continue

0 commit comments

Comments
 (0)