Answer architecture round 1: 4 🔴, 5 🟡 (0 misread); one-way plan packages with a plan core and an Atlassian client, one parse and print of an item's cells, a pure chunk-start decision, a settings table, one plan read and one standing per pick, one config load in chunk-pr, notifier backends in notifier, and the bin regroup filed as item 392

This commit is contained in:
2026-11-16 14:47:46 +01:00
parent 3f7d85c48e
commit f58250d0ce
103 changed files with 1299 additions and 1044 deletions
+22
View File
@@ -0,0 +1,22 @@
"""The tracked files and folders an item's text names, each as a backticked span such as `bin/rank_todo.py` or `bin/`."""
import re
def named_paths(text: str, tracked: list[str]) -> list[tuple[str, int]]:
"""Each backticked span in text, in order and once, that names a tracked file or folder, with how many of the tracked files it holds: 1 for a file."""
held = ((span, sum(holds(span, path) for path in tracked)) for span in spans(text))
return [(span, count) for span, count in held if count]
def named_files(text: str, tracked: list[str]) -> list[str]:
"""Each tracked file that a backticked span in text names, either the file itself or a folder holding it, once, in tracked's order."""
named = spans(text)
return [path for path in tracked if any(holds(span, path) for span in named)]
def spans(text: str) -> list[str]:
return list(dict.fromkeys(span.removesuffix("/") for span in re.findall(r"`([^`\s]+)`", text)))
def holds(span: str, path: str) -> bool:
return path == span or path.startswith(f"{span}/")