@caddis/cli 0.4.86 → 0.4.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2413 -0
- package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +59 -2
- package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +5 -13
- package/bundles/antigravity-plugin/scripts/caddis_status.py +45 -0
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +154 -22
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +20 -1
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +20 -1
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +4 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +2 -1
- package/bundles/manifest.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/export/assets/export-CEtCs5rg.css +1 -0
- package/dist/export/assets/{export-DErZHj4B.js → export-v-kcNvPW.js} +30 -30
- package/dist/export/assets/mark-small-B1q4Vk3J.svg +8 -0
- package/dist/export/fonts/atkinson-500.21d6ef26.woff2 +0 -0
- package/dist/export/fonts/atkinson-600.ce9f3210.woff2 +0 -0
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/{Activity-CaqQ_HdD.js → Activity-C9TCizJV.js} +1 -1
- package/dist/ui/assets/{Guide-9PV1m0e9.js → Guide-6aEYW9oW.js} +1 -1
- package/dist/ui/assets/RoadmapTab-hUK2kzCW.js +31 -0
- package/dist/ui/assets/index-DE7v-v_o.css +1 -0
- package/dist/ui/assets/{index-Dotj3WfG.js → index-d44hkSAE.js} +39 -39
- package/dist/ui/assets/mark-small-B1q4Vk3J.svg +8 -0
- package/dist/ui/fonts/atkinson-500.21d6ef26.woff2 +0 -0
- package/dist/ui/fonts/atkinson-600.ce9f3210.woff2 +0 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/export/assets/export-C0_skoDL.css +0 -1
- package/dist/export/assets/mark-small-CwCIyjyC.svg +0 -8
- package/dist/ui/assets/RoadmapTab-CDm42wB2.js +0 -31
- package/dist/ui/assets/index-Cv4RVfyi.css +0 -1
- package/dist/ui/assets/mark-small-CwCIyjyC.svg +0 -8
|
@@ -52,8 +52,43 @@ def _roadmaps_json(root: Path) -> dict:
|
|
|
52
52
|
module.FETCH = saved
|
|
53
53
|
|
|
54
54
|
|
|
55
|
+
def _local_origin_branches(common: Path) -> list[str]:
|
|
56
|
+
"""Which of origin/main and origin/master exist, from the loose ref files and packed-refs (no subprocess)."""
|
|
57
|
+
try:
|
|
58
|
+
packed = (common / "packed-refs").read_text(encoding="utf-8")
|
|
59
|
+
except (OSError, UnicodeDecodeError):
|
|
60
|
+
packed = ""
|
|
61
|
+
packed_refs = {line.split(" ", 1)[1].strip() for line in packed.splitlines() if " refs/" in line}
|
|
62
|
+
return [name for name in ("main", "master")
|
|
63
|
+
if (common / "refs" / "remotes" / "origin" / name).is_file() or f"refs/remotes/origin/{name}" in packed_refs]
|
|
64
|
+
|
|
65
|
+
|
|
55
66
|
def _plans_json(root: Path) -> dict:
|
|
56
|
-
|
|
67
|
+
"""Plans from the origin ref the repo already has (R15: local git only), so a pushed Tracker edit shows with no
|
|
68
|
+
pull. A folder that is not a git checkout, or has no origin default branch, reads the working tree."""
|
|
69
|
+
branch = None
|
|
70
|
+
common = git_common_dir(Path(root))
|
|
71
|
+
if common is None:
|
|
72
|
+
return _sibling("caddis_todo").plans_json(root)
|
|
73
|
+
try: # origin/HEAD is a one-line file; reading it saves a git process per repo
|
|
74
|
+
head = (common / "refs" / "remotes" / "origin" / "HEAD").read_text(encoding="utf-8").strip()
|
|
75
|
+
except (OSError, UnicodeDecodeError):
|
|
76
|
+
head = ""
|
|
77
|
+
if head.startswith("ref: refs/remotes/origin/"):
|
|
78
|
+
branch = head[len("ref: refs/remotes/origin/"):]
|
|
79
|
+
elif len(found := _local_origin_branches(common)) == 1:
|
|
80
|
+
branch = found[0] # the same rule as caddis_roadmap.default_branch with FETCH off, read from the files
|
|
81
|
+
else:
|
|
82
|
+
roadmap = _sibling("caddis_roadmap")
|
|
83
|
+
saved = roadmap.FETCH
|
|
84
|
+
roadmap.FETCH = False
|
|
85
|
+
try:
|
|
86
|
+
branch = roadmap.default_branch(Path(root))
|
|
87
|
+
except roadmap.RoadmapError:
|
|
88
|
+
branch = None
|
|
89
|
+
finally:
|
|
90
|
+
roadmap.FETCH = saved
|
|
91
|
+
return _sibling("caddis_todo").plans_json(root, branch=branch)
|
|
57
92
|
|
|
58
93
|
|
|
59
94
|
def _relays_json(root: Path) -> dict:
|
|
@@ -64,8 +99,30 @@ def _spend_json() -> dict:
|
|
|
64
99
|
return _sibling("caddis_spend").spend_json(Path.home())
|
|
65
100
|
|
|
66
101
|
|
|
102
|
+
# An installed bundle has no source pool to scan: the export writes the guide data beside this script.
|
|
103
|
+
GUIDE_DATA = Path(__file__).resolve().parent / "caddis_guide.json"
|
|
104
|
+
|
|
105
|
+
|
|
67
106
|
def _guide_json() -> dict:
|
|
68
|
-
|
|
107
|
+
"""The guide data file of an install, else build_reference in a source checkout."""
|
|
108
|
+
try:
|
|
109
|
+
text = GUIDE_DATA.read_text(encoding="utf-8")
|
|
110
|
+
except FileNotFoundError:
|
|
111
|
+
text = None
|
|
112
|
+
if text is not None:
|
|
113
|
+
data = json.loads(text)
|
|
114
|
+
if not isinstance(data, dict):
|
|
115
|
+
raise ValueError(f"{GUIDE_DATA.name} is not a JSON object")
|
|
116
|
+
return data
|
|
117
|
+
try:
|
|
118
|
+
module = _sibling("build_reference")
|
|
119
|
+
except ModuleNotFoundError as exc:
|
|
120
|
+
if exc.name != "build_reference":
|
|
121
|
+
raise
|
|
122
|
+
raise RuntimeError(
|
|
123
|
+
f"the guide data is missing from this install: no {GUIDE_DATA.name} beside {Path(__file__).name}"
|
|
124
|
+
) from None
|
|
125
|
+
return module.guide_json()
|
|
69
126
|
|
|
70
127
|
|
|
71
128
|
_REPO_COLLECTORS = {"roadmaps": _roadmaps_json, "plans": _plans_json, "relays": _relays_json}
|
|
@@ -88,15 +88,17 @@ try:
|
|
|
88
88
|
import caddis_exit
|
|
89
89
|
import caddis_redact
|
|
90
90
|
import caddis_rows
|
|
91
|
+
import caddis_status
|
|
91
92
|
import caddis_worktree_safety
|
|
92
93
|
except ModuleNotFoundError as exc:
|
|
93
|
-
if exc.name not in {"caddis_exit", "caddis_redact", "caddis_rows", "caddis_worktree_safety"}:
|
|
94
|
+
if exc.name not in {"caddis_exit", "caddis_redact", "caddis_rows", "caddis_status", "caddis_worktree_safety"}:
|
|
94
95
|
raise
|
|
95
96
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
96
97
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "claude-harness" / "scripts"))
|
|
97
98
|
import caddis_exit
|
|
98
99
|
import caddis_redact
|
|
99
100
|
import caddis_rows
|
|
101
|
+
import caddis_status
|
|
100
102
|
import caddis_worktree_safety
|
|
101
103
|
|
|
102
104
|
# No child process opens a console window on Windows (this runs under hooks and status lines that
|
|
@@ -690,8 +692,7 @@ def parse_tracker(text: str) -> dict[int, str]:
|
|
|
690
692
|
|
|
691
693
|
|
|
692
694
|
def _is_done_status(cell: str) -> bool:
|
|
693
|
-
|
|
694
|
-
return value.lower().startswith("done") or value.startswith("✅")
|
|
695
|
+
return caddis_status.is_done(cell)
|
|
695
696
|
|
|
696
697
|
|
|
697
698
|
class PhaseIndex:
|
|
@@ -2246,16 +2247,7 @@ def phase_facts(plan_text: str | None) -> dict[int, dict]:
|
|
|
2246
2247
|
|
|
2247
2248
|
def tile_state(tracker_cell: str, state: str) -> str:
|
|
2248
2249
|
"""todo | in-progress | done | moved | blocked, from the Tracker cell (origin), falling back to status()."""
|
|
2249
|
-
|
|
2250
|
-
if cell.startswith("moved") or "moved" in cell.split(" - ", 1)[0]:
|
|
2251
|
-
return "moved"
|
|
2252
|
-
if cell.startswith(("done", "✅", "merged")):
|
|
2253
|
-
return "done"
|
|
2254
|
-
if cell.startswith(("blocked", "halt", "waiting")):
|
|
2255
|
-
return "blocked"
|
|
2256
|
-
if cell.startswith(("in progress", "in-progress", "active", "building", "built", "⏳")):
|
|
2257
|
-
return "in-progress"
|
|
2258
|
-
return "done" if state == "done" else "todo"
|
|
2250
|
+
return caddis_status.status_state(tracker_cell, "done" if state == "done" else "todo")
|
|
2259
2251
|
|
|
2260
2252
|
|
|
2261
2253
|
def build(root: Path, slug: str, roadmap_mod=None) -> dict:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""One vocabulary for a plan Tracker's Status cell, for every caller (todo, tidy, roadmap, runner, hub).
|
|
2
|
+
|
|
3
|
+
Owner decisions: "pending" anywhere is never done (2026-09-27); the check marks below count as done (2026-10-26).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import re
|
|
9
|
+
|
|
10
|
+
DONE_WORDS = ("done", "merged")
|
|
11
|
+
DONE_MARKS = ("✅", "☑", "✔", "✓")
|
|
12
|
+
OPEN_MARKS = ("☐",)
|
|
13
|
+
BLOCKED_WORDS = ("blocked", "halt", "waiting")
|
|
14
|
+
IN_PROGRESS_WORDS = ("in progress", "in-progress", "active", "building", "built", "⏳")
|
|
15
|
+
STATES = ("todo", "in-progress", "blocked", "done", "moved")
|
|
16
|
+
|
|
17
|
+
_DONE_WORD = re.compile(r"^(?:%s)\b" % "|".join(DONE_WORDS))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _clean(cell: str) -> str:
|
|
21
|
+
text = (cell or "").strip().strip("*").strip()
|
|
22
|
+
while text.startswith(OPEN_MARKS):
|
|
23
|
+
text = text[1:].lstrip()
|
|
24
|
+
return text.lower()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def status_state(cell: str, fallback: str = "todo") -> str:
|
|
28
|
+
"""todo | in-progress | blocked | done | moved. `fallback` when the cell names no state (empty, a bare open box,
|
|
29
|
+
"not started")."""
|
|
30
|
+
text = _clean(cell)
|
|
31
|
+
if "pending" in text:
|
|
32
|
+
return "in-progress"
|
|
33
|
+
if text.startswith("moved") or "moved" in text.split(" - ", 1)[0]:
|
|
34
|
+
return "moved"
|
|
35
|
+
if _DONE_WORD.match(text) or text.startswith(DONE_MARKS):
|
|
36
|
+
return "done"
|
|
37
|
+
if text.startswith(BLOCKED_WORDS):
|
|
38
|
+
return "blocked"
|
|
39
|
+
if text.startswith(IN_PROGRESS_WORDS):
|
|
40
|
+
return "in-progress"
|
|
41
|
+
return fallback
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def is_done(cell: str) -> bool:
|
|
45
|
+
return status_state(cell) == "done"
|
|
@@ -19,15 +19,18 @@ from pathlib import Path
|
|
|
19
19
|
try:
|
|
20
20
|
import caddis_exit
|
|
21
21
|
from caddis_frontmatter import parse, split_document
|
|
22
|
+
from caddis_status import is_done, status_state
|
|
22
23
|
from caddis_workstreams import _artifact, _name
|
|
23
24
|
except ModuleNotFoundError as exc:
|
|
24
|
-
if exc.name not in {"caddis_exit", "caddis_file_lock", "caddis_frontmatter", "
|
|
25
|
+
if exc.name not in {"caddis_exit", "caddis_file_lock", "caddis_frontmatter", "caddis_status",
|
|
26
|
+
"caddis_workstreams"}:
|
|
25
27
|
raise
|
|
26
28
|
# caddis_tidy imports caddis_file_lock after this module: these two folders stay on the path.
|
|
27
29
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
28
30
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "claude-harness" / "scripts"))
|
|
29
31
|
import caddis_exit
|
|
30
32
|
from caddis_frontmatter import parse, split_document
|
|
33
|
+
from caddis_status import is_done, status_state
|
|
31
34
|
from caddis_workstreams import _artifact, _name
|
|
32
35
|
|
|
33
36
|
|
|
@@ -56,13 +59,8 @@ def _resolves_path(root: Path, value: str) -> Path:
|
|
|
56
59
|
|
|
57
60
|
|
|
58
61
|
def _is_done(status: str) -> bool:
|
|
59
|
-
"""A Tracker status cell that means done
|
|
60
|
-
|
|
61
|
-
lowered = status.strip().lower()
|
|
62
|
-
first = lowered.split(" ", 1)[0] if lowered else ""
|
|
63
|
-
if "pending" in lowered:
|
|
64
|
-
return False
|
|
65
|
-
return first in {"done", "✅"} or first.startswith("✅")
|
|
62
|
+
"""A Tracker status cell that means done. The vocabulary lives in caddis_status; tidy and tests call this name."""
|
|
63
|
+
return is_done(status)
|
|
66
64
|
|
|
67
65
|
|
|
68
66
|
def _active_plan(root: Path, workstream: str | None) -> Path | None:
|
|
@@ -159,7 +157,8 @@ def tracker_table(text: str) -> tuple[list[str], list[str]] | None:
|
|
|
159
157
|
One reader, so caddis_tidy and any later caller never disagree about the same table.
|
|
160
158
|
"""
|
|
161
159
|
# A real heading line only: plan prose may mention "## Tracker" inline before the section.
|
|
162
|
-
|
|
160
|
+
# "## Tracker" or a numbered "## 12. Tracker" (hand-written plans number their sections).
|
|
161
|
+
heading = re.search(r"^##\s+(?:\d+[.)]?\s+)?Tracker\b.*$", text, re.M)
|
|
163
162
|
if heading is None:
|
|
164
163
|
return None
|
|
165
164
|
section = text[heading.end():].split("\n## ", 1)[0]
|
|
@@ -184,6 +183,10 @@ def _plan_files(root: Path) -> list[Path]:
|
|
|
184
183
|
|
|
185
184
|
|
|
186
185
|
def _plan_entry(root: Path, path: Path) -> dict:
|
|
186
|
+
return _plan_entry_text(path.relative_to(Path(root)).as_posix(), path.read_text(encoding="utf-8"))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def _plan_entry_text(rel: str, text: str) -> dict:
|
|
187
190
|
# caddis_tidy imports this module at load time, so this module imports it only here.
|
|
188
191
|
try:
|
|
189
192
|
import caddis_tidy
|
|
@@ -192,7 +195,6 @@ def _plan_entry(root: Path, path: Path) -> dict:
|
|
|
192
195
|
raise
|
|
193
196
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
194
197
|
import caddis_tidy
|
|
195
|
-
text = path.read_text(encoding="utf-8")
|
|
196
198
|
meta, body = split_document(text)
|
|
197
199
|
if text.lstrip("").startswith("---") and not meta:
|
|
198
200
|
raise ValueError("frontmatter is not closed or has no keys")
|
|
@@ -208,26 +210,156 @@ def _plan_entry(root: Path, path: Path) -> dict:
|
|
|
208
210
|
continue
|
|
209
211
|
cells = caddis_tidy._row_cells(line)
|
|
210
212
|
if cells:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
cell = cells[status_at] if len(cells) > status_at else ""
|
|
214
|
+
tracker.append({"phase": cells[0], "status": cell, "state": status_state(cell)})
|
|
215
|
+
return {"path": rel, "title": title,
|
|
213
216
|
"status": meta.get("status"), "feature": meta.get("feature"),
|
|
214
217
|
"tracker": tracker, "open_rows": sum(1 for row in tracker if not _is_done(row["status"]))}
|
|
215
218
|
|
|
216
219
|
|
|
217
|
-
|
|
218
|
-
"""
|
|
220
|
+
class _Batch:
|
|
221
|
+
"""One `git cat-file --batch` process, asked object by object (local git only, no network)."""
|
|
222
|
+
|
|
223
|
+
def __init__(self, root: Path):
|
|
224
|
+
self.proc = subprocess.Popen(["git", "-C", str(root), "cat-file", "--batch"], stdin=subprocess.PIPE,
|
|
225
|
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, creationflags=_NO_WINDOW)
|
|
226
|
+
|
|
227
|
+
def get(self, name: str) -> tuple[str, str, bytes] | None:
|
|
228
|
+
"""(oid, type, content) of `name`, or None when git says it is missing."""
|
|
229
|
+
assert self.proc.stdin is not None and self.proc.stdout is not None
|
|
230
|
+
self.proc.stdin.write(name.encode("utf-8") + b"\n")
|
|
231
|
+
self.proc.stdin.flush()
|
|
232
|
+
header = self.proc.stdout.readline().split()
|
|
233
|
+
if len(header) != 3:
|
|
234
|
+
return None # "<name> missing" (or ambiguous)
|
|
235
|
+
size = int(header[2])
|
|
236
|
+
content = self.proc.stdout.read(size + 1)[:size] # the content, then one newline
|
|
237
|
+
return header[0].decode("ascii"), header[1].decode("ascii"), content
|
|
238
|
+
|
|
239
|
+
def close(self) -> None:
|
|
240
|
+
if self.proc.stdin:
|
|
241
|
+
self.proc.stdin.close()
|
|
242
|
+
try:
|
|
243
|
+
self.proc.wait(timeout=10)
|
|
244
|
+
except subprocess.TimeoutExpired:
|
|
245
|
+
self.proc.kill()
|
|
246
|
+
self.proc.wait()
|
|
247
|
+
if self.proc.stdout:
|
|
248
|
+
self.proc.stdout.close()
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def _tree_blobs(tree: bytes, oid_len: int) -> list[tuple[str, str]]:
|
|
252
|
+
"""[(name, blob oid)] from a raw tree object: `<mode> <name>\\0<oid bytes>` repeated. Files only."""
|
|
253
|
+
out: list[tuple[str, str]] = []
|
|
254
|
+
at = 0
|
|
255
|
+
while at < len(tree):
|
|
256
|
+
space = tree.index(b" ", at)
|
|
257
|
+
nul = tree.index(b"\0", space)
|
|
258
|
+
mode, name = tree[at:space], tree[space + 1:nul].decode("utf-8", errors="replace")
|
|
259
|
+
oid = tree[nul + 1:nul + 1 + oid_len].hex()
|
|
260
|
+
at = nul + 1 + oid_len
|
|
261
|
+
if mode in (b"100644", b"100755"):
|
|
262
|
+
out.append((name, oid))
|
|
263
|
+
return out
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def _origin_plan_texts(root: Path, branch: str) -> list[tuple[str, str]] | None:
|
|
267
|
+
"""[(path, text)] of the plan files on origin/<branch>: `.caddis/plans/*.md`, else `.github/plans/*.md`, never
|
|
268
|
+
`done/`. One git process for the whole read. None when git cannot read the ref."""
|
|
269
|
+
try:
|
|
270
|
+
batch = _Batch(root)
|
|
271
|
+
except OSError:
|
|
272
|
+
return None
|
|
273
|
+
try:
|
|
274
|
+
if batch.get(f"refs/remotes/origin/{branch}") is None:
|
|
275
|
+
return None
|
|
276
|
+
for folder in (".caddis/plans", ".github/plans"):
|
|
277
|
+
tree = batch.get(f"refs/remotes/origin/{branch}:{folder}")
|
|
278
|
+
if tree is None or tree[1] != "tree":
|
|
279
|
+
continue
|
|
280
|
+
names = sorted((name, oid) for name, oid in _tree_blobs(tree[2], len(tree[0]) // 2) if name.endswith(".md"))
|
|
281
|
+
if not names:
|
|
282
|
+
continue
|
|
283
|
+
texts: list[tuple[str, str]] = []
|
|
284
|
+
for name, oid in names:
|
|
285
|
+
blob = batch.get(oid)
|
|
286
|
+
if blob is None:
|
|
287
|
+
return None
|
|
288
|
+
texts.append((f"{folder}/{name}", blob[2].decode("utf-8", errors="replace").replace("\r\n", "\n")))
|
|
289
|
+
return texts
|
|
290
|
+
return []
|
|
291
|
+
except (OSError, ValueError):
|
|
292
|
+
return None
|
|
293
|
+
finally:
|
|
294
|
+
batch.close()
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# How far back the hub looks for a plan's last change. An older plan gets no time and sorts last.
|
|
298
|
+
_CHANGED_SINCE = "400.days"
|
|
299
|
+
|
|
219
300
|
|
|
220
|
-
|
|
301
|
+
def _origin_plan_times(root: Path, branch: str, folder: str) -> dict[str, int]:
|
|
302
|
+
"""{path: commit time} of the last commit on origin/<branch> that touched each plan file in `folder`.
|
|
303
|
+
One local git process (no network). Empty when git fails: the time is a sort hint, never required."""
|
|
304
|
+
try:
|
|
305
|
+
out = subprocess.run(
|
|
306
|
+
["git", "-C", str(root), "-c", "core.quotepath=off", "log", f"--since={_CHANGED_SINCE}",
|
|
307
|
+
"--format=%x00%ct", "--name-only", f"refs/remotes/origin/{branch}", "--", folder],
|
|
308
|
+
capture_output=True, timeout=30, creationflags=_NO_WINDOW,
|
|
309
|
+
)
|
|
310
|
+
except (OSError, subprocess.SubprocessError):
|
|
311
|
+
return {}
|
|
312
|
+
if out.returncode != 0:
|
|
313
|
+
return {}
|
|
314
|
+
times: dict[str, int] = {}
|
|
315
|
+
for chunk in out.stdout.decode("utf-8", errors="replace").split("\x00")[1:]:
|
|
316
|
+
lines = chunk.strip().splitlines()
|
|
317
|
+
try:
|
|
318
|
+
when = int(lines[0])
|
|
319
|
+
except (ValueError, IndexError):
|
|
320
|
+
continue
|
|
321
|
+
for name in lines[1:]:
|
|
322
|
+
times.setdefault(name.strip(), when) # git log is newest first: the first time seen is the last change
|
|
323
|
+
return times
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _file_time(path: Path) -> int | None:
|
|
327
|
+
try:
|
|
328
|
+
return int(path.stat().st_mtime)
|
|
329
|
+
except OSError:
|
|
330
|
+
return None
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
def _entry_or_error(rel: str, read) -> dict:
|
|
334
|
+
try:
|
|
335
|
+
return read()
|
|
336
|
+
except Exception as exc: # one bad file must not hide the others
|
|
337
|
+
return {"path": rel, "error": (str(exc).splitlines() or [type(exc).__name__])[0]}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def plans_json(root: Path, branch: str | None = None) -> dict:
|
|
341
|
+
"""Every current plan as data: `{"schema": 1, "source": ..., "plans": [...]}`. Never prints, never exits.
|
|
342
|
+
|
|
343
|
+
With `branch`, read the plans from the local `origin/<branch>` ref (the hub: a pushed Tracker edit shows with
|
|
344
|
+
no pull); when git cannot read that ref, read the working tree. `source` names which one was read. A file that
|
|
345
|
+
does not parse gives `{"path", "error"}`; the other plans still come back.
|
|
221
346
|
"""
|
|
222
347
|
root = Path(root)
|
|
223
|
-
|
|
348
|
+
texts = _origin_plan_texts(root, branch) if branch else None
|
|
349
|
+
if texts is not None:
|
|
350
|
+
plans = [_entry_or_error(rel, lambda rel=rel, text=text: _plan_entry_text(rel, text)) for rel, text in texts]
|
|
351
|
+
times = _origin_plan_times(root, branch, texts[0][0].rsplit("/", 1)[0]) if texts else {}
|
|
352
|
+
for plan in plans:
|
|
353
|
+
if "error" not in plan:
|
|
354
|
+
plan["changed_at"] = times.get(plan["path"])
|
|
355
|
+
return {"schema": 1, "source": f"origin/{branch}", "plans": plans}
|
|
356
|
+
plans = []
|
|
224
357
|
for path in _plan_files(root):
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return {"schema": 1, "plans": plans}
|
|
358
|
+
plan = _entry_or_error(path.relative_to(root).as_posix(), lambda path=path: _plan_entry(root, path))
|
|
359
|
+
if "error" not in plan:
|
|
360
|
+
plan["changed_at"] = _file_time(path)
|
|
361
|
+
plans.append(plan)
|
|
362
|
+
return {"schema": 1, "source": "working-tree", "plans": plans}
|
|
231
363
|
|
|
232
364
|
|
|
233
365
|
def main(argv: list[str] | None = None) -> int:
|
|
@@ -331,12 +331,16 @@
|
|
|
331
331
|
"type": "object",
|
|
332
332
|
"required": [
|
|
333
333
|
"schema",
|
|
334
|
+
"source",
|
|
334
335
|
"plans"
|
|
335
336
|
],
|
|
336
337
|
"properties": {
|
|
337
338
|
"schema": {
|
|
338
339
|
"type": "integer"
|
|
339
340
|
},
|
|
341
|
+
"source": {
|
|
342
|
+
"type": "string"
|
|
343
|
+
},
|
|
340
344
|
"plans": {
|
|
341
345
|
"type": "array",
|
|
342
346
|
"items": {
|
|
@@ -379,7 +383,8 @@
|
|
|
379
383
|
"type": "object",
|
|
380
384
|
"required": [
|
|
381
385
|
"phase",
|
|
382
|
-
"status"
|
|
386
|
+
"status",
|
|
387
|
+
"state"
|
|
383
388
|
],
|
|
384
389
|
"properties": {
|
|
385
390
|
"phase": {
|
|
@@ -387,12 +392,26 @@
|
|
|
387
392
|
},
|
|
388
393
|
"status": {
|
|
389
394
|
"type": "string"
|
|
395
|
+
},
|
|
396
|
+
"state": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"enum": [
|
|
399
|
+
"todo",
|
|
400
|
+
"in-progress",
|
|
401
|
+
"blocked",
|
|
402
|
+
"done",
|
|
403
|
+
"moved"
|
|
404
|
+
]
|
|
390
405
|
}
|
|
391
406
|
}
|
|
392
407
|
}
|
|
393
408
|
},
|
|
394
409
|
"open_rows": {
|
|
395
410
|
"type": "integer"
|
|
411
|
+
},
|
|
412
|
+
"changed_at": {
|
|
413
|
+
"type": ["integer", "null"],
|
|
414
|
+
"description": "Unix time of the last change: the commit time on origin, or the file time in the working tree. null when unknown."
|
|
396
415
|
}
|
|
397
416
|
}
|
|
398
417
|
},
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"required": [
|
|
6
6
|
"schema",
|
|
7
|
+
"source",
|
|
7
8
|
"plans"
|
|
8
9
|
],
|
|
9
10
|
"properties": {
|
|
10
11
|
"schema": {
|
|
11
12
|
"type": "integer"
|
|
12
13
|
},
|
|
14
|
+
"source": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
13
17
|
"plans": {
|
|
14
18
|
"type": "array",
|
|
15
19
|
"items": {
|
|
@@ -52,7 +56,8 @@
|
|
|
52
56
|
"type": "object",
|
|
53
57
|
"required": [
|
|
54
58
|
"phase",
|
|
55
|
-
"status"
|
|
59
|
+
"status",
|
|
60
|
+
"state"
|
|
56
61
|
],
|
|
57
62
|
"properties": {
|
|
58
63
|
"phase": {
|
|
@@ -60,12 +65,26 @@
|
|
|
60
65
|
},
|
|
61
66
|
"status": {
|
|
62
67
|
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"state": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"todo",
|
|
73
|
+
"in-progress",
|
|
74
|
+
"blocked",
|
|
75
|
+
"done",
|
|
76
|
+
"moved"
|
|
77
|
+
]
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
},
|
|
67
82
|
"open_rows": {
|
|
68
83
|
"type": "integer"
|
|
84
|
+
},
|
|
85
|
+
"changed_at": {
|
|
86
|
+
"type": ["integer", "null"],
|
|
87
|
+
"description": "Unix time of the last change: the commit time on origin, or the file time in the working tree. null when unknown."
|
|
69
88
|
}
|
|
70
89
|
}
|
|
71
90
|
},
|
|
@@ -395,6 +395,10 @@ Three rules: one attempt, one review.
|
|
|
395
395
|
| 1 | M1 | mid | claude | not started | — | — | |
|
|
396
396
|
```
|
|
397
397
|
|
|
398
|
+
Status words (one vocabulary, `scripts/caddis_status.py`): done is `done`, `merged`, `✅`, `☑`, `✔` or `✓`;
|
|
399
|
+
`in progress`, `blocked` and `moved` name the other states; anything else (`not started`, `☐`) is to do. A cell
|
|
400
|
+
that says `pending` is never done.
|
|
401
|
+
|
|
398
402
|
## Plan quality gate — local-coder ready (MANDATORY)
|
|
399
403
|
The plan must be executable by a **low-capability local coder model** (the planner→coder handoff: a
|
|
400
404
|
strong model plans, a cheaper/local model implements). The plan carries the intelligence; the coder
|
|
@@ -241,7 +241,8 @@ row, visible to any later reader without anyone having to catch it live.
|
|
|
241
241
|
open `caddis-run codex -m gpt-6-astra` and ask it to follow this same subsection.
|
|
242
242
|
|
|
243
243
|
**2. Determine where to resume.** The `## Tracker` table is the resume signal. Start at the first phase whose
|
|
244
|
-
status is not `done
|
|
244
|
+
status is not done (`done`, `merged`, `✅`, `☑`, `✔`, `✓`; never a cell that says `pending`;
|
|
245
|
+
one vocabulary in `scripts/caddis_status.py`). If every phase is already done, verify the tests are green and go straight to the
|
|
245
246
|
report — do not redo completed work.
|
|
246
247
|
|
|
247
248
|
**3. Implement each remaining phase, TDD-first.** For each phase, in order:
|
package/bundles/manifest.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -8921,7 +8921,7 @@ function plan(raw) {
|
|
|
8921
8921
|
path: str4(p2.path),
|
|
8922
8922
|
title: str4(p2.title),
|
|
8923
8923
|
status: str4(p2.status),
|
|
8924
|
-
tracker: arr2(p2.tracker).map((t) => ({ phase: str4(rec3(t).phase), status: str4(rec3(t).status) })),
|
|
8924
|
+
tracker: arr2(p2.tracker).map((t) => ({ phase: str4(rec3(t).phase), status: str4(rec3(t).status), state: str4(rec3(t).state) })),
|
|
8925
8925
|
open_rows: int(p2.open_rows)
|
|
8926
8926
|
};
|
|
8927
8927
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:Atkinson Hyperlegible Next;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/atkinson-400.849ae6f0.woff2) format("woff2")}@font-face{font-family:Atkinson Hyperlegible Next;font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/atkinson-500.21d6ef26.woff2) format("woff2")}@font-face{font-family:Atkinson Hyperlegible Next;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/atkinson-600.ce9f3210.woff2) format("woff2")}@font-face{font-family:Atkinson Hyperlegible Next;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/atkinson-700.3a9cc18a.woff2) format("woff2")}@font-face{font-family:Maple Mono;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/maple-mono-400.071799fd.woff2) format("woff2")}@font-face{font-family:Maple Mono;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/maple-mono-700.1e17b237.woff2) format("woff2")}:root{--caddis-blue: #0d42fc;--caddis-cyan: #00cad5;--caddis-green: #91d202;--caddis-amber: #fdad01;--caddis-orange: #fc4e23;--caddis-violet: #8730fb;--caddis-bg-dark: #282a36;--caddis-bg-light: #f8f8f2}@media(prefers-reduced-motion:no-preference){.caddis-mark-build path{opacity:0;transform-box:fill-box;transform-origin:center;animation:caddis-piece-in .64s cubic-bezier(.2,.7,.2,1) forwards}.caddis-mark-build .p-blue{--from: -60px, -60px;animation-delay:0ms}.caddis-mark-build .p-purple{--from: -60px, 60px;animation-delay:90ms}.caddis-mark-build .p-cyan{--from: 60px, -60px;animation-delay:.18s}.caddis-mark-build .p-amber{--from: -40px, 60px;animation-delay:.27s}.caddis-mark-build .p-green{--from: 0px, 70px;animation-delay:.36s}.caddis-mark-build .p-orange{--from: 60px, 40px;animation-delay:.45s}}@keyframes caddis-piece-in{0%{opacity:0;transform:translate(var(--from, 0, 0)) scale(.85)}to{opacity:1;transform:none}}:root,[data-theme=dark]{color-scheme:dark;--bg-canvas: #191a23;--bg-lane: #21222c;--bg-card: #282a36;--bg-elevated: #343746;--border-dim: #363949;--border-bright: #4b4f65;--text-main: #f8f8f2;--text-sub: #c0c4d6;--text-dim: #9ca3c4;--purple: #bd93f9;--pink: #ff79c6;--green: #50fa7b;--yellow: #f1fa8c;--red: #ff5555;--cyan: #8be9fd;--orange: #ffb86c;--tone-yellow-bg: rgba(241, 250, 140, .08);--tone-yellow-bd: rgba(241, 250, 140, .42);--tone-red-bg: rgba(255, 85, 85, .09);--tone-red-bd: rgba(255, 85, 85, .45);--tone-pink-bg: rgba(255, 121, 198, .11);--tone-pink-bd: rgba(255, 121, 198, .45);--tone-cyan-bg: rgba(139, 233, 253, .09);--tone-cyan-bd: rgba(139, 233, 253, .36);--tone-green-bg: rgba(80, 250, 123, .09);--tone-green-bd: rgba(80, 250, 123, .36);--tone-purple-bg: rgba(189, 147, 249, .12);--tone-purple-bd: rgba(189, 147, 249, .42);--focus-ring: #bd93f9;--sidebar-w: 232px}[data-theme=light]{color-scheme:light;--bg-canvas: #f2f3f8;--bg-lane: #f9f9fc;--bg-card: #ffffff;--bg-elevated: #ebedf5;--border-dim: #dcdde8;--border-bright: #bfc2d4;--text-main: #1b1c26;--text-sub: #424659;--text-dim: #60667f;--purple: #6837e8;--pink: #cf2384;--green: #128038;--yellow: #8f6100;--red: #d12121;--cyan: #096b7d;--orange: #b85000;--tone-yellow-bg: rgba(217, 155, 8, .11);--tone-yellow-bd: rgba(168, 112, 0, .42);--tone-red-bg: rgba(209, 33, 33, .07);--tone-red-bd: rgba(209, 33, 33, .38);--tone-pink-bg: rgba(207, 35, 132, .08);--tone-pink-bd: rgba(207, 35, 132, .38);--tone-cyan-bg: rgba(9, 107, 125, .08);--tone-cyan-bd: rgba(9, 107, 125, .32);--tone-green-bg: rgba(18, 128, 56, .08);--tone-green-bd: rgba(18, 128, 56, .32);--tone-purple-bg: rgba(104, 55, 232, .09);--tone-purple-bd: rgba(104, 55, 232, .35);--focus-ring: #6837e8}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{min-height:100%;width:100%;max-width:100%;background:var(--bg-canvas);color:var(--text-main);font-family:Atkinson Hyperlegible Next,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;overflow-x:hidden}h1,h2,h3,h4,strong,b{font-weight:600}.mono,code{font-family:Maple Mono,ui-monospace,SFMono-Regular,Consolas,monospace;font-feature-settings:"zero" on;font-size:.92em}code.cmd{background:var(--bg-elevated);padding:1px 6px;border-radius:4px;color:var(--yellow);overflow-wrap:anywhere}button,a{font-family:inherit}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}@keyframes work-pulse{0%,to{opacity:1}50%{opacity:.35}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.pulse-dot{width:8px;height:8px;border-radius:50%;background:var(--cyan);display:inline-block;animation:work-pulse 2.2s ease-in-out infinite;flex-shrink:0}.app-shell{display:flex;min-height:100vh;width:100%;max-width:100%}.mobile-topbar{display:none;position:sticky;top:0;z-index:45;background:var(--bg-card);border-bottom:1px solid var(--border-dim);padding:10px 14px;align-items:center;justify-content:space-between;gap:10px}.menu-btn{display:inline-flex;align-items:center;gap:8px;background:var(--bg-elevated);border:1px solid var(--border-bright);color:var(--text-main);padding:6px 10px;border-radius:7px;font-size:14px;font-weight:500;cursor:pointer}.drawer-backdrop{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;z-index:49}.drawer-backdrop.open{display:block}.sidebar{width:var(--sidebar-w);background:var(--bg-card);border-right:1px solid var(--border-dim);position:fixed;top:0;bottom:0;left:0;z-index:50;display:flex;flex-direction:column;justify-content:space-between;transition:transform .2s ease;overflow-x:hidden;overflow-y:auto}.sidebar-top{padding:16px 12px;display:flex;flex-direction:column;gap:18px}.brand-row{display:flex;align-items:center;padding:0 6px}.brand-logo{display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;color:var(--text-main);min-width:0}.brand-mark{width:36px;height:36px;flex-shrink:0}.brand-stack{display:flex;flex-direction:column;gap:4px;min-width:0}.brand-wordmark{width:100px;height:20px}.brand-sub{font-size:12px;font-weight:400;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dim)}.nav-list{display:flex;flex-direction:column;gap:4px;list-style:none}.nav-section-label{font-size:13px;font-weight:500;color:var(--text-dim);padding:0 10px;margin-bottom:-10px}.nav-empty{padding:6px 10px;color:var(--text-dim);font-size:14px}.nav-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:8px;color:var(--text-sub);text-decoration:none;font-weight:500;font-size:15px;transition:background .12s ease,color .12s ease;min-width:0}.nav-link:hover{background:var(--bg-elevated);color:var(--text-main)}.nav-link.active{background:var(--tone-purple-bg);color:var(--purple);font-weight:600}.nav-link-left{display:flex;align-items:center;gap:10px;min-width:0}.nav-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.soon{font-size:11.5px;color:var(--text-dim);border:1px solid var(--border-dim);border-radius:99px;padding:0 7px}.inbox-badge{display:inline-flex;align-items:center;justify-content:center;padding:1px 8px;border-radius:99px;font-size:12px;font-weight:600;background:linear-gradient(135deg,var(--yellow),var(--red));color:#191a23;flex-shrink:0}.repo-dot{width:9px;height:9px;margin:0 4.5px;border-radius:50%;flex-shrink:0}.repo-dot.attention{background:var(--yellow);box-shadow:0 0 0 2px var(--tone-yellow-bg)}.repo-dot.blocked{background:var(--red);box-shadow:0 0 0 2px var(--tone-red-bg)}.repo-dot.ok{background:var(--green)}.repo-dot.idle{background:var(--text-dim)}.sidebar-footer{padding:14px 12px;border-top:1px solid var(--border-dim);display:flex;flex-direction:column;gap:12px;background:var(--bg-lane)}.footer-meta{font-size:13px;color:var(--text-sub);display:flex;flex-direction:column;gap:8px}.updated-line{display:flex;align-items:center;gap:7px;color:var(--text-dim);font-size:12.5px;line-height:1.35}.spend-box{display:flex;flex-direction:column;gap:5px}.spend-row{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:13px}.meter-track{width:100%;height:6px;background:var(--bg-elevated);border-radius:99px;overflow:hidden}.meter-fill{height:100%;background:var(--purple);border-radius:99px}.meter-fill.hot{background:var(--orange)}.versions{color:var(--text-dim);font-size:11.5px;overflow-wrap:anywhere}.theme-switch{display:flex;gap:4px;background:var(--bg-elevated);border-radius:8px;padding:3px}.theme-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:5px;background:transparent;border:0;border-radius:6px;color:var(--text-sub);padding:5px 4px;font-size:12.5px;cursor:pointer}.theme-btn.active{background:var(--bg-card);color:var(--purple);font-weight:600}.main-area{flex:1;margin-left:var(--sidebar-w);min-width:0;width:100%}.page-wrap{max-width:1420px;margin:0 auto;padding:28px 28px 48px;display:flex;flex-direction:column;gap:28px;min-width:0}.page-header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}.page-title{font-size:22px;font-weight:600;color:var(--text-main);display:flex;align-items:center;gap:10px}.page-subtitle{font-size:14px;color:var(--text-sub)}.notice{display:flex;flex-direction:column;gap:8px;background:var(--bg-card);border:1px solid var(--border-dim);border-radius:10px;padding:18px 20px;max-width:560px}.banners{display:flex;flex-direction:column;gap:8px}.banner{display:flex;align-items:flex-start;gap:10px;border-radius:8px;padding:10px 14px;font-size:14px;border:1px solid var(--tone-yellow-bd);background:var(--tone-yellow-bg)}.banner svg{flex-shrink:0;margin-top:2px}.banner.warn svg{color:var(--yellow)}.banner.bad{border-color:var(--tone-red-bd);background:var(--tone-red-bg)}.banner.bad svg{color:var(--red)}.kpi-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.kpi-tile{background:var(--bg-card);border:1px solid var(--border-dim);border-radius:10px;padding:13px 16px;display:flex;flex-direction:column;justify-content:space-between;gap:6px;text-decoration:none;color:var(--text-main);transition:border-color .15s ease;min-width:0}.kpi-tile:hover{border-color:var(--purple)}.kpi-tile.urgent{border-color:var(--tone-yellow-bd);background:var(--tone-yellow-bg)}.kpi-tile.danger{border-color:var(--tone-red-bd);background:var(--tone-red-bg)}.kpi-label{font-size:13.5px;color:var(--text-sub);font-weight:500;display:flex;align-items:center;gap:7px;min-width:0}.kpi-val{font-size:19px;font-weight:600;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.kpi-sub{font-size:13px;font-weight:400}@media(max-width:1100px){.kpi-strip{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.mobile-topbar{display:flex}.app-shell{flex-direction:column}.sidebar{width:250px;transform:translate(-100%);visibility:hidden}.sidebar.drawer-open{transform:translate(0);visibility:visible}.main-area{margin-left:0}.page-wrap{padding:16px 12px 36px;gap:20px}.kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}:root,[data-theme=dark]{--mk-accent: #00cad5;--mk-sel: #343746;--mk-bad: #ff7a7a;--mk-good: #91d202;--mk-warn: #fdad01;--mk-warn-bg: rgba(253, 173, 1, .1);--mk-warn-line: rgba(253, 173, 1, .45);--chip-waiting-bg: rgba(0, 202, 213, .16);--chip-waiting-fg: #5fe6ee;--chip-gate-bg: rgba(135, 48, 251, .22);--chip-gate-fg: #c9a7ff;--chip-bad-bg: rgba(255, 122, 122, .16);--chip-bad-fg: #ff9b9b;--chip-coord-bg: rgba(253, 173, 1, .16);--chip-coord-fg: #fdad01;--chip-done-bg: rgba(145, 210, 2, .16);--chip-done-fg: #a8e23a}[data-theme=light]{--mk-accent: #0d42fc;--mk-sel: #e8eefe;--mk-bad: #c0262d;--mk-good: #3d6b00;--mk-warn: #8a5a00;--mk-warn-bg: rgba(253, 173, 1, .14);--mk-warn-line: rgba(154, 101, 0, .45);--chip-waiting-bg: #dff7f8;--chip-waiting-fg: #006b72;--chip-gate-bg: #efe5ff;--chip-gate-fg: #5b1bb5;--chip-bad-bg: #fde4e4;--chip-bad-fg: #a11d24;--chip-coord-bg: #fff1cf;--chip-coord-fg: #7a5000;--chip-done-bg: #e9f6d2;--chip-done-fg: #3d6b00}.btn{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:8px;border:1px solid var(--border-bright);background:transparent;color:var(--text-main);font-size:14px;font-weight:500;cursor:pointer}.btn:hover:not(:disabled){background:var(--bg-elevated)}.btn:disabled{opacity:.55;cursor:not-allowed}.kpi-tile .kpi-num{font-size:30px;font-weight:600;line-height:1.1}.kpi-num.accent{color:var(--mk-accent)}.kpi-num.bad{color:var(--mk-bad)}.tone-good{color:var(--mk-good)}.tone-warn{color:var(--mk-warn)}.tone-bad{color:var(--mk-bad)}.tone-muted{color:var(--text-dim)}.kpi-tile.deploy .kpi-val{font-size:15px}.mailbox{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}.mailbox-folders{flex:1 1 180px;display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:12px;background:var(--bg-lane);border:1px solid var(--border-dim)}.folder-btn,.item-btn{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 10px;border:0;border-radius:8px;text-align:left;background:transparent;color:var(--text-main);font-size:15px;cursor:pointer}.folder-btn span:first-of-type{flex-grow:1}.folder-btn.sel,.item-btn.sel{background:var(--mk-sel)}.folder-btn:hover,.item-btn:hover{background:var(--bg-elevated)}.mailbox-list{flex:2 1 280px;min-width:0;display:flex;flex-direction:column;gap:4px;padding:8px;border-radius:12px;background:var(--bg-lane);border:1px solid var(--border-dim)}.item-btn{align-items:flex-start;padding:10px;min-height:56px}.unread-dot{width:9px;height:9px;margin-top:6px;border-radius:50%;flex-shrink:0;background:transparent}.unread-dot.on{background:var(--mk-accent)}.item-main{display:flex;flex-direction:column;gap:3px;min-width:0}.item-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;color:var(--text-dim)}.item-title{font-weight:400;overflow-wrap:anywhere}.chip{padding:1px 8px;border-radius:99px;font-size:12px;font-weight:600}.chip-waiting{background:var(--chip-waiting-bg);color:var(--chip-waiting-fg)}.chip-owner-gate{background:var(--chip-gate-bg);color:var(--chip-gate-fg)}.chip-blocked,.chip-blocked-merge{background:var(--chip-bad-bg);color:var(--chip-bad-fg)}.chip-coordinator,.chip-hub{background:var(--chip-coord-bg);color:var(--chip-coord-fg)}.chip-resolved{background:var(--chip-done-bg);color:var(--chip-done-fg)}.list-empty{padding:24px 12px;text-align:center;color:var(--text-sub)}.mailbox-detail{flex:3 1 320px;min-width:0;display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:12px;background:var(--bg-lane);border:1px solid var(--border-dim)}.mailbox-detail h2{font-size:20px;line-height:1.3;overflow-wrap:anywhere}.detail-block{display:flex;flex-direction:column;gap:4px}.detail-label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dim)}.detail-actions{display:flex;flex-wrap:wrap;gap:10px}.back-btn{display:none}.notify-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14px;color:var(--text-sub)}@media(max-width:720px){.mailbox{flex-direction:column;align-items:stretch}.mailbox.show-detail .mailbox-folders,.mailbox.show-detail .mailbox-list{display:none}.mailbox:not(.show-detail) .mailbox-detail{display:none}.mailbox-folders{flex-direction:row;flex-wrap:wrap}.folder-btn{width:auto;flex:1 1 140px}.back-btn{display:inline-flex;align-self:flex-start}}.lanes{display:flex;flex-direction:column;gap:14px}.lane{border-radius:12px;background:var(--bg-lane);border:1px solid var(--border-dim)}.lane.down .lane-body .card.grey>:not(.action-row),.lane.stopped .lane-body .card.grey>:not(.action-row){opacity:.55}.lane.stopped .lane-note{background:var(--mk-warn-bg);border-color:var(--mk-warn-line)}.lane-head{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 14px;border:0;background:transparent;color:var(--text-main);font-size:15px;text-align:left;cursor:pointer;border-radius:12px}.lane-head .chev{margin-left:auto;flex-shrink:0;color:var(--text-dim)}.lane-name{font-weight:400;font-family:Maple Mono,ui-monospace,monospace;font-size:14px}.lane-summary{color:var(--text-dim);font-size:13.5px;min-width:0;overflow-wrap:anywhere}.lane-body{padding:0 14px 14px;display:flex;flex-direction:column;gap:12px}.lane-note{padding:10px 12px;border-radius:8px;background:var(--bg-elevated);border:1px solid var(--border-dim);font-size:14px}.lane.down .lane-note{background:var(--mk-warn-bg);border-color:var(--mk-warn-line)}.lane-cols{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.lane-col{display:flex;flex-direction:column;gap:8px;min-width:0}.col-title{font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);font-weight:600}.card{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:8px;background:var(--bg-card);border:1px solid var(--border-dim);overflow-wrap:anywhere}.card-title{font-weight:500;font-size:14px}.card-sub{font-size:13px}.col-empty{font-size:13px;color:var(--text-dim)}@media(max-width:1100px){.lane-cols{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.lane-cols{grid-template-columns:minmax(0,1fr)}.lane-head{flex-wrap:wrap;padding:10px 14px}}.first-run{border:1px dashed var(--border, var(--mk-line, #6272a4));border-radius:10px;padding:16px;margin:0 0 16px;display:grid;gap:8px;justify-items:start}.first-run h2{margin:0;font-size:1.1rem}.first-run p{margin:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.first-run-reason{color:var(--text-dim);font-size:.85rem}.chip-stale{background:transparent;border:1px dashed currentColor;color:var(--text-dim)}.kpi-strip.stale .kpi-num,.kpi-strip.stale .kpi-val,.lanes.stale .lane-body{opacity:.55}.gh-fail{overflow-wrap:anywhere}.quota-low{color:var(--mk-warn, var(--text));font-size:.85rem;overflow-wrap:anywhere}.action-row{display:flex;flex-direction:column;gap:6px;min-width:0}.action-buttons{display:flex;flex-wrap:wrap;gap:8px}.action-row.compact .btn-act{min-height:30px;padding:0 10px;font-size:12.5px}.action-reason,.request-status{font-size:13px;overflow-wrap:anywhere}.action-reason{color:var(--text-dim)}.recommendation{padding:10px 12px;border-radius:8px;border:1px solid var(--border-dim);background:var(--bg-elevated);overflow-wrap:anywhere}.rec-approve{color:var(--mk-good)}.rec-hold{color:var(--mk-warn)}.rec-evidence{font-size:13.5px}.rec-note{font-size:12.5px;color:var(--text-dim)}.quota-line{font-size:.85rem;color:var(--text-dim);overflow-wrap:anywhere}.repo-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}.repo-tabs .folder-btn{width:auto;min-height:38px;padding:0 14px;border:1px solid var(--border-dim)}.flow{display:flex;flex-direction:column;gap:18px;min-width:0}.flow-status.stopped,.flow-status.down{background:var(--mk-warn-bg);border-color:var(--mk-warn-line)}.flow-section{display:flex;flex-direction:column;gap:8px;min-width:0}.flow-h{margin:0;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim)}.flow-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.flow-row{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border-radius:8px;background:var(--bg-card);border:1px solid var(--border-dim);overflow-wrap:anywhere;min-width:0}.flow-row.grey>:not(.action-row){opacity:.55}.flow-row-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}.flow-pos{color:var(--text-dim);font-size:13px}.flow-title{font-weight:600;font-size:14.5px}.flow-flags{display:flex;flex-wrap:wrap;gap:6px}.flow-flags .chip,.flow-row-head .chip{border:1px solid currentColor}.flow-why{font-size:13px;color:var(--text-sub)}.card .action-row{margin-top:4px}.repo-tabs a.folder-btn{text-decoration:none;display:inline-flex}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.rm{display:flex;flex-direction:column;gap:14px;min-width:0}.rm.stale .rm-detail,.rm.stale .rm-list-view{opacity:.6}.rm-title{margin:0;font-size:18px}.rm-detail{display:flex;flex-direction:column;gap:18px;min-width:0}.rm-crumbs{font-size:13px;color:var(--text-sub);overflow-wrap:anywhere}.rm-crumbs a{color:var(--mk-accent)}.rm-section{display:flex;flex-direction:column;gap:8px;min-width:0}.rm-waiting.has .flow-row{border-color:var(--tone-pink-bd);background:var(--tone-pink-bg)}.rm-searchbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.rm-search{display:flex;align-items:center;gap:8px;flex:1 1 240px;min-height:40px;padding:0 10px;border:1px solid var(--border-bright);border-radius:8px;background:var(--bg-card)}.rm-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--text-main);font:inherit;min-height:38px}.rm-search input:focus-visible{outline-offset:6px}.rm-match{font-size:13px;color:var(--text-sub)}.rm-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.rm-chip{padding:4px 10px;border:1px solid var(--border-dim);border-radius:8px;background:var(--bg-card);font-size:13px}.rm-sub{display:block;font-size:12px;color:var(--text-dim)}.rm-bar-wrap{display:flex;flex-direction:column;gap:2px}.rm-bar{height:8px;border-radius:99px;background:var(--bg-elevated);overflow:hidden}.rm-bar i{display:block;height:100%;background:var(--mk-good)}.rm-bar-text{font-size:12px;color:var(--text-dim)}.rm-chain{display:flex;flex-wrap:wrap;align-items:stretch;gap:6px}.rm-chain-item{display:inline-flex;align-items:center;gap:6px}.rm-node,.rm-rcard{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border:1px solid var(--border-dim);border-radius:9px;background:var(--bg-card);color:var(--text-main);font:inherit;text-align:left;text-decoration:none;cursor:pointer;min-width:0;overflow-wrap:anywhere}.rm-node:hover,.rm-rcard:hover{background:var(--bg-elevated)}.rm-node.tone-done,.rm-rcard.tone-done{border-left:4px solid var(--mk-good)}.rm-node.tone-prog,.rm-rcard.tone-prog{border-left:4px solid var(--mk-accent)}.rm-node.tone-wait,.rm-rcard.tone-wait{border-left:4px solid var(--chip-gate-fg)}.rm-node.tone-block,.rm-rcard.tone-block{border-left:4px solid var(--mk-warn)}.rm-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rm-rcard strong{font-weight:500}.rm-cols .rm-rcard{width:100%;margin-bottom:8px}.rm-cols.rm-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.rm-pcard{cursor:default}.rm-pcard:hover{background:var(--bg-card)}.rm-pcard.is-moved{opacity:.55}.rm-list-h{margin:0 0 6px;font-size:14px}.rm-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))}.rm-cards li{min-width:0}.rm-cards .rm-rcard{height:100%}.rm-dots{display:flex;flex-wrap:wrap;gap:4px}.rm-dot{font-size:11px;padding:0 6px;border-radius:99px;background:var(--bg-elevated);color:var(--text-sub)}.rm-dot.s-done{background:var(--chip-done-bg);color:var(--chip-done-fg)}.rm-dot.s-in-progress{background:var(--chip-waiting-bg);color:var(--chip-waiting-fg)}.rm-timeline-grid{display:flex;flex-direction:column;overflow-x:auto;border:1px solid var(--border-dim);border-radius:8px}.rm-timeline-grid>.rm-head-row,.rm-timeline-grid>.rm-row{display:grid;grid-template-columns:150px repeat(var(--rm-cols, 1),minmax(120px,1fr))}.rm-cell{padding:6px;border-top:1px solid var(--border-dim);border-left:1px dashed var(--border-dim);min-width:0}.rm-head{background:var(--bg-lane);font-weight:600;border-top:0}.rm-lane{font-weight:500;border-left:0;overflow-wrap:anywhere}.rm-gate-count,.rm-gate-note{display:inline-block;margin:2px 0;padding:1px 6px;font-size:11px;border:1px dashed var(--mk-warn);border-radius:6px;background:var(--mk-warn-bg);overflow-wrap:anywhere}.rm-tile{position:relative;display:flex;align-items:center;gap:5px;margin:0 0 4px;padding:3px 6px;font-size:12px;border:1px solid var(--border-bright);border-radius:6px;background:var(--bg-card);max-width:100%;overflow-wrap:anywhere}.rm-tile[data-state=done]{background:var(--chip-done-bg);color:var(--chip-done-fg)}.rm-tile[data-state=in-progress]{background:var(--chip-waiting-bg);color:var(--chip-waiting-fg)}.rm-tile[data-state=blocked]{background:var(--mk-warn-bg);border-color:var(--mk-warn-line)}.rm-tile[data-state=moved]{background:repeating-linear-gradient(135deg,var(--chip-done-bg) 0 5px,var(--bg-card) 5px 10px)}.rm-risk{width:7px;height:7px;margin-left:auto;border-radius:50%;background:var(--mk-bad);flex:none}.rm-timeline-list{display:none}@media(max-width:900px){.rm-timeline-grid{display:none}.rm-timeline-list{display:block}.rm-cols,.rm-cols.rm-cols-4{grid-template-columns:1fr}}.rm-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--text-dim)}.rm-ms{border:1px solid var(--border-dim);border-radius:10px;background:var(--bg-card);padding:8px 12px;margin-bottom:8px}.rm-ms>summary{cursor:pointer;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}.rm-ms[open]>.flow-list{margin-top:8px}.rm-plan{border:1px solid var(--border-dim);border-radius:10px;background:var(--bg-card);padding:12px 14px}.rm-plan[open]{gap:12px}.rm-plan-sum{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;list-style:none}.rm-plan-sum::-webkit-details-marker{display:none}.rm-plan-sum:before{content:"▸";color:var(--text-sub);transition:transform .15s ease}.rm-plan[open]>.rm-plan-sum:before{transform:rotate(90deg)}.rm-plan-title{font-weight:600;font-size:15.5px;min-width:0;overflow-wrap:anywhere}.rm-pkpis{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding-left:20px;font-size:13.5px;color:var(--text-sub)}.rm-pkpi-num{font-family:Maple Mono,ui-monospace,monospace;font-feature-settings:"zero" on;color:var(--text-main)}.rm-pkpi.tone-prog .rm-pkpi-num{color:var(--mk-accent)}.rm-pkpi.tone-block .rm-pkpi-num{color:var(--mk-warn)}.rm-pbar{display:inline-block;width:120px;height:6px;border-radius:3px;background:var(--border-dim);overflow:hidden}.rm-pbar>span{display:block;height:100%;background:var(--green)}.rm-pr{color:var(--mk-accent);font-size:13px}.rm-stage{font-size:12px;padding:1px 8px;border-radius:99px;background:var(--bg-elevated);color:var(--text-sub)}.rm-stage.tile-done{background:var(--chip-done-bg);color:var(--chip-done-fg)}.rm-stage.tile-in-progress{background:var(--chip-waiting-bg);color:var(--chip-waiting-fg)}.rm-stage.tile-blocked{background:var(--mk-warn-bg);color:var(--mk-warn)}.btn-act{min-height:32px;padding:0 10px;font-size:13px}.act-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.act-filters select{min-height:38px;padding:0 8px;border:1px solid var(--border-bright);border-radius:8px;background:var(--bg-card);color:var(--text-main);font:inherit;max-width:100%}.act-kinds{display:flex;flex-wrap:wrap;gap:6px}.act-kind{min-height:36px;padding:0 12px;border:1px solid var(--border-bright);border-radius:99px;background:transparent;color:var(--text-main);font:inherit;font-size:13px;cursor:pointer}.act-kind[aria-pressed=true]{background:var(--mk-sel);border-color:var(--mk-accent)}.act-time{font-size:12px;color:var(--text-dim)}.act-kindtag{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim)}.ex-table-wrap{overflow-x:auto}.ex-table{width:100%;border-collapse:collapse;font-size:14px}.ex-table th,.ex-table td{text-align:left;vertical-align:top;padding:8px 10px;border-bottom:1px solid var(--border-dim)}.ex-table th{color:var(--text-sub);font-weight:600}.ex-note{margin-top:24px}
|