@caddis/cli 0.4.92 → 0.4.94

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.
Files changed (99) hide show
  1. package/README.md +4 -0
  2. package/bundles/antigravity-plugin/agents/debug.md +2 -0
  3. package/bundles/antigravity-plugin/guard_agy.py +6 -2
  4. package/bundles/antigravity-plugin/plugin.json +1 -1
  5. package/bundles/antigravity-plugin/repo_freshness.py +71 -6
  6. package/bundles/antigravity-plugin/repo_hygiene.py +516 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  14. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  15. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  16. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  17. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  18. package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +1 -1
  19. package/bundles/antigravity-plugin/scripts/caddis_finished.py +537 -0
  20. package/bundles/antigravity-plugin/scripts/caddis_fleet.py +26 -9
  21. package/bundles/antigravity-plugin/scripts/caddis_guide.json +65 -12
  22. package/bundles/antigravity-plugin/scripts/caddis_own_cleanup.py +23 -248
  23. package/bundles/antigravity-plugin/scripts/caddis_preload_review.py +554 -0
  24. package/bundles/antigravity-plugin/scripts/caddis_repo_tidy.py +240 -0
  25. package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +9 -3
  26. package/bundles/antigravity-plugin/scripts/caddis_run.py +160 -0
  27. package/bundles/antigravity-plugin/scripts/caddis_spawn.py +17 -1
  28. package/bundles/antigravity-plugin/scripts/caddis_tidy.py +12 -0
  29. package/bundles/antigravity-plugin/scripts/caddis_upstream_check.py +108 -10
  30. package/bundles/antigravity-plugin/scripts/caddis_worktree_root.py +111 -2
  31. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +132 -11
  32. package/bundles/antigravity-plugin/skills/_registry.md +7 -5
  33. package/bundles/antigravity-plugin/skills/adopt-app/SKILL.md +2 -5
  34. package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +232 -40
  35. package/bundles/antigravity-plugin/skills/brainstorming/builder-check-prompt.md +25 -0
  36. package/bundles/antigravity-plugin/skills/cloud-phases/SKILL.md +1 -1
  37. package/bundles/antigravity-plugin/skills/dashboard-perf-sweep/SKILL.md +1 -1
  38. package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +1 -1
  39. package/bundles/antigravity-plugin/skills/explainer-doc/SKILL.md +1 -1
  40. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +7 -1
  41. package/bundles/antigravity-plugin/skills/fleet-close/SKILL.md +4 -1
  42. package/bundles/antigravity-plugin/skills/graph-email/SKILL.md +15 -0
  43. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +9 -2
  44. package/bundles/antigravity-plugin/skills/implement/SKILL.md +7 -0
  45. package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +1 -3
  46. package/bundles/antigravity-plugin/skills/port-to-github/SKILL.md +2 -5
  47. package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +1 -1
  48. package/bundles/antigravity-plugin/skills/preload-review/SKILL.md +69 -0
  49. package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +4 -0
  50. package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +6 -5
  51. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +1 -1
  52. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +1 -1
  53. package/bundles/antigravity-plugin/skills/spawn-session/SKILL.md +5 -0
  54. package/bundles/antigravity-plugin/skills/tdd/SKILL.md +2 -1
  55. package/bundles/antigravity-plugin/skills/tech-explainer/SKILL.md +2 -6
  56. package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +2 -0
  57. package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +19 -2
  58. package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +1 -1
  59. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  60. package/bundles/antigravity-plugin-extras/skills/_registry.md +3 -2
  61. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +1 -2
  62. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +1 -2
  63. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +1 -1
  64. package/bundles/antigravity-plugin-extras/skills/graph-email/SKILL.md +53 -0
  65. package/bundles/antigravity-plugin-extras/skills/graph-email/email.toml.example +44 -0
  66. package/bundles/antigravity-plugin-extras/skills/graph-email/scripts/send_email.py +432 -0
  67. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +2 -4
  68. package/bundles/antigravity-plugin-extras/skills/runner-move/SKILL.md +2 -4
  69. package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +1 -1
  70. package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +2 -5
  71. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +1 -1
  72. package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +1 -1
  73. package/bundles/codex/.codex/skills/devops/adopt-app/SKILL.md +2 -5
  74. package/bundles/codex/.codex/skills/devops/port-to-github/SKILL.md +2 -5
  75. package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +19 -2
  76. package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +1 -1
  77. package/bundles/codex/.codex/skills/docs/tech-explainer/SKILL.md +2 -6
  78. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +1 -1
  79. package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +1 -3
  80. package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +232 -40
  81. package/bundles/codex/.codex/skills/workflow/brainstorming/builder-check-prompt.md +25 -0
  82. package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +4 -0
  83. package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +6 -5
  84. package/bundles/manifest.json +3 -3
  85. package/dist/export/assets/export-CMtV-slT.css +1 -0
  86. package/dist/export/index.html +2 -2
  87. package/dist/ui/assets/{Activity-DZKPMOeV.js → Activity-BDjet2xd.js} +1 -1
  88. package/dist/ui/assets/Guide-Czn5sK0f.js +9 -0
  89. package/dist/ui/assets/Guide-D-Zy4cUT.css +1 -0
  90. package/dist/ui/assets/{RoadmapTab-DPsiSmIF.js → RoadmapTab-Bd8geyQx.js} +1 -1
  91. package/dist/ui/assets/index-Bd0Z4jR8.css +1 -0
  92. package/dist/ui/assets/{index-xl156OCN.js → index-CmngQ8Mk.js} +12 -12
  93. package/dist/ui/index.html +2 -2
  94. package/package.json +1 -1
  95. package/dist/export/assets/export-HxTgj3z2.css +0 -1
  96. package/dist/ui/assets/Guide-5ZFfL6sl.js +0 -9
  97. package/dist/ui/assets/Guide-Dnsb-TRd.css +0 -1
  98. package/dist/ui/assets/index-DGlNAmeA.css +0 -1
  99. /package/dist/export/assets/{export-B7BBDg5I.js → export-DtlDFN4L.js} +0 -0
@@ -1,33 +1,55 @@
1
1
  #!/usr/bin/env python3
2
2
  """caddis_upstream_check - say when an upstream skill that caddis borrowed ideas from has changed.
3
3
 
4
- Why: /caddis:feature-plan and /caddis:implement adapt ideas from obra/superpowers (writing-plans 7.0.0,
5
- subagent-driven-development 7.0.0, MIT). `.github/upstream-sources.json` records, per borrowed file, the
6
- upstream version and the sha256 of the file we read. This script compares that record with the copies
7
- installed in the Claude Code plugin cache (`~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/<path>`),
8
- so caddis does not fall behind upstream without anyone seeing it. /caddis:usage-review runs it.
4
+ Why: caddis owns the routing-critical skills and commands that it adapted from obra/superpowers
5
+ (writing-plans, subagent-driven-development, brainstorming, using-git-worktrees; MIT). The other superpowers
6
+ skills are used straight from the plugin. `.github/upstream-sources.json` records, per borrowed file, the upstream version and the
7
+ sha256 of the file we read. This script compares that record with upstream, so caddis does not fall
8
+ behind without anyone seeing it. /caddis:usage-review runs the local mode. The weekly workflow
9
+ `.github/workflows/upstream-drift.yml` runs `--remote` and opens one issue when anything drifts.
10
+
11
+ Two modes:
12
+ local (default) compare with the copies installed in the Claude Code plugin cache
13
+ (`~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/<path>`). It is blind
14
+ when the upstream plugin is turned off or not installed.
15
+ --remote ask GitHub instead: take the latest release tag of each `upstream` repo (the
16
+ newest tag when there is no release), fetch the file at that tag from
17
+ raw.githubusercontent.com and hash it. Needs the network. Set GITHUB_TOKEN to
18
+ avoid the anonymous API rate limit. Stdlib `urllib` only.
9
19
 
10
20
  One line per source:
11
21
  UP-TO-DATE <id> <version>
12
- DRIFT <id> recorded <v> installed <v'> (sha differs): review the upstream diff and port what fits, ...
13
- NOT-INSTALLED <id>
22
+ DRIFT <id> recorded <v> installed <new> (sha differs): review the upstream diff and port what fits, ...
23
+ DRIFT <id> recorded <v> upstream <tag> (sha differs): ... (--remote)
24
+ DRIFT <id> recorded <v> upstream <tag> (file not found at that tag): ... (--remote)
25
+ NOT-INSTALLED <id> (local only)
26
+ UNREACHABLE <id> <reason> (--remote: network or API error)
14
27
  `NO-SOURCES <path>` means there is no record (any repo other than the caddis source repo).
15
28
 
16
- Advisory only: the exit code is always 0. Stdlib only.
29
+ Advisory: the exit code is 0 unless `--fail-on-drift` is set and some line is DRIFT (then 1).
30
+ This script never copies upstream text. The caddis files are adapted, so a copy would undo the
31
+ adaptation: a human reads the diff and ports what fits.
17
32
 
18
33
  Usage:
19
34
  python caddis_upstream_check.py [--sources <json>] [--cache-root <dir>] [--json]
35
+ [--remote] [--fail-on-drift]
20
36
  """
21
37
  from __future__ import annotations
22
38
 
23
39
  import argparse
24
40
  import hashlib
25
41
  import json
42
+ import os
26
43
  import sys
44
+ import urllib.error
45
+ import urllib.request
27
46
  from pathlib import Path
28
47
 
29
48
  SOURCES_REL = Path(".github") / "upstream-sources.json"
30
49
  DRIFT_ADVICE = "review the upstream diff and port what fits, then update .github/upstream-sources.json"
50
+ API_ROOT = "https://api.github.com"
51
+ RAW_ROOT = "https://raw.githubusercontent.com"
52
+ TIMEOUT_SECONDS = 20
31
53
 
32
54
 
33
55
  def default_sources() -> Path:
@@ -78,11 +100,83 @@ def check_source(src: dict, cache_root: Path) -> dict:
78
100
  return row
79
101
 
80
102
 
103
+ # ---- remote mode ------------------------------------------------------------------------------------
104
+
105
+ class FetchError(Exception):
106
+ """A network or HTTP failure. `status` is the HTTP status code, or None for a network error."""
107
+
108
+ def __init__(self, message: str, status: int | None = None):
109
+ super().__init__(message)
110
+ self.status = status
111
+
112
+
113
+ def fetch(url: str, token: str | None = None) -> bytes:
114
+ """GET a URL and return the body. Raise FetchError on any failure. Tests replace this function."""
115
+ headers = {"User-Agent": "caddis-upstream-check", "Accept": "application/vnd.github+json"}
116
+ if token:
117
+ headers["Authorization"] = f"Bearer {token}"
118
+ try:
119
+ with urllib.request.urlopen(urllib.request.Request(url, headers=headers), timeout=TIMEOUT_SECONDS) as resp:
120
+ return resp.read()
121
+ except urllib.error.HTTPError as exc:
122
+ raise FetchError(f"HTTP {exc.code} for {url}", exc.code) from exc
123
+ except (urllib.error.URLError, OSError, ValueError) as exc:
124
+ raise FetchError(f"{exc} for {url}") from exc
125
+
126
+
127
+ def latest_tag(upstream: str, token: str | None = None) -> str | None:
128
+ """The latest release tag of `owner/repo`; when it has no release, the newest tag; else None."""
129
+ try:
130
+ release = json.loads(fetch(f"{API_ROOT}/repos/{upstream}/releases/latest", token))
131
+ if release.get("tag_name"):
132
+ return str(release["tag_name"])
133
+ except FetchError as exc:
134
+ if exc.status != 404:
135
+ raise
136
+ tags = json.loads(fetch(f"{API_ROOT}/repos/{upstream}/tags?per_page=100", token))
137
+ names = [str(tag["name"]) for tag in tags if isinstance(tag, dict) and tag.get("name")]
138
+ return max(names, key=lambda name: _version_key(name.lstrip("v"))) if names else None
139
+
140
+
141
+ def check_source_remote(src: dict, tags: dict[str, str | None], token: str | None = None) -> dict:
142
+ """Compare one record with the file at the latest upstream tag. `tags` caches one lookup per repo."""
143
+ sid, recorded, upstream = src["id"], src["version"], src["upstream"]
144
+ row = {"id": sid, "status": "UNREACHABLE", "recorded_version": recorded, "installed_version": None,
145
+ "upstream_tag": None, "line": ""}
146
+
147
+ def done(status: str, line: str) -> dict:
148
+ row.update(status=status, line=line)
149
+ return row
150
+
151
+ try:
152
+ if upstream not in tags:
153
+ tags[upstream] = latest_tag(upstream, token)
154
+ tag = tags[upstream]
155
+ if tag is None:
156
+ return done("UNREACHABLE", f"UNREACHABLE {sid} {upstream} has no releases and no tags")
157
+ row["upstream_tag"] = tag
158
+ try:
159
+ body = fetch(f"{RAW_ROOT}/{upstream}/{tag}/{src['path']}", token)
160
+ except FetchError as exc:
161
+ if exc.status == 404:
162
+ return done("DRIFT", f"DRIFT {sid} recorded {recorded} upstream {tag} "
163
+ f"(file not found at that tag): {DRIFT_ADVICE}")
164
+ raise
165
+ except (FetchError, ValueError, KeyError, TypeError) as exc:
166
+ return done("UNREACHABLE", f"UNREACHABLE {sid} {exc}")
167
+ if hashlib.sha256(body).hexdigest() == src["sha256"]:
168
+ return done("UP-TO-DATE", f"UP-TO-DATE {sid} {recorded}")
169
+ return done("DRIFT", f"DRIFT {sid} recorded {recorded} upstream {tag} (sha differs): {DRIFT_ADVICE}")
170
+
171
+
81
172
  def main(argv: list[str] | None = None) -> int:
82
173
  ap = argparse.ArgumentParser(description="Compare borrowed upstream skills with the installed copies.")
83
174
  ap.add_argument("--sources", type=Path, default=None, help="path to upstream-sources.json")
84
175
  ap.add_argument("--cache-root", type=Path, default=None, help="the Claude Code plugin cache folder")
85
176
  ap.add_argument("--json", action="store_true", help="print the rows as a JSON list")
177
+ ap.add_argument("--remote", action="store_true",
178
+ help="ask GitHub for the latest release of each upstream repo instead of reading the plugin cache")
179
+ ap.add_argument("--fail-on-drift", action="store_true", help="exit 1 when any source shows DRIFT")
86
180
  args = ap.parse_args(argv)
87
181
  sources = args.sources or default_sources()
88
182
  cache_root = args.cache_root or default_cache_root()
@@ -91,7 +185,11 @@ def main(argv: list[str] | None = None) -> int:
91
185
  return 0
92
186
  try:
93
187
  data = json.loads(sources.read_text(encoding="utf-8"))
94
- rows = [check_source(src, cache_root) for src in data.get("sources", [])]
188
+ if args.remote:
189
+ token, tags = os.environ.get("GITHUB_TOKEN") or None, {}
190
+ rows = [check_source_remote(src, tags, token) for src in data.get("sources", [])]
191
+ else:
192
+ rows = [check_source(src, cache_root) for src in data.get("sources", [])]
95
193
  except (OSError, ValueError, KeyError, TypeError) as exc:
96
194
  print(f"NO-SOURCES {sources} (unreadable: {exc})")
97
195
  return 0
@@ -100,7 +198,7 @@ def main(argv: list[str] | None = None) -> int:
100
198
  else:
101
199
  for row in rows:
102
200
  print(row["line"])
103
- return 0
201
+ return 1 if args.fail_on_drift and any(row["status"] == "DRIFT" for row in rows) else 0
104
202
 
105
203
 
106
204
  if __name__ == "__main__":
@@ -24,6 +24,10 @@ stays where it is: moving it breaks a venv, which keeps absolute paths.
24
24
  CLI: `python caddis_worktree_root.py [--repo PATH] [--root PATH] [--record --purpose TEXT] <short-name>` prints the path.
25
25
  Exit 2 on a bad name or a folder that is not in a git repo.
26
26
 
27
+ `python caddis_worktree_root.py --bootstrap [--repo PATH]` runs INSIDE a linked worktree and gives it its own
28
+ dependencies (uv sync, or venv + pip; npm ci per package-lock.json). The pre-push gate needs that `.venv`.
29
+ Exit 0 done, 1 a step failed or a tool is missing, 2 not a linked worktree.
30
+
27
31
  `--record` also appends the path to this session's created list (`caddis_created.py`, by="helper"), so `/handoff` can
28
32
  remove the worktree later. The helper creates nothing, so the path is recorded as INTENDED: run `git worktree add` on the
29
33
  path it printed. A session with no session id, or a record that cannot be written, only prints a warning on stderr: the
@@ -34,6 +38,7 @@ from __future__ import annotations
34
38
 
35
39
  import argparse
36
40
  import os
41
+ import shutil
37
42
  import subprocess
38
43
  import sys
39
44
  from pathlib import Path
@@ -89,21 +94,125 @@ def worktree_path(repo: Path | str, short_name: str, root: Path | str | None = N
89
94
  """The path for a NEW worktree of `repo`: `<root>/<main checkout folder name>/<short_name>`. Creates nothing.
90
95
  `short_name` is one plain folder name: ValueError for an empty name, `.`, `..`, or one with a path separator or a
91
96
  colon (a drive such as `C:foo` would replace the root on Windows)."""
92
- if (not short_name or short_name in (".", "..") or any(c in short_name for c in "/\:")
97
+ if (not short_name or short_name in (".", "..") or any(c in short_name for c in "/\\:")
93
98
  or short_name != short_name.strip()):
94
99
  raise ValueError(f"the short name must be one plain folder name, not {short_name!r}")
95
100
  main = main_checkout(repo) # one git call
96
101
  return (_explicit_root(root) or main.parent / FALLBACK_DIR) / main.name / short_name
97
102
 
98
103
 
104
+ # ---- bootstrap: give a fresh worktree its own dependencies ---------------------------------------------------------
105
+ # A worktree installs its dependencies fresh. It never links or borrows a venv or node_modules from another folder
106
+ # (the main checkout's venv belongs to a running dev service and is often behind). The pre-push gate uses only the
107
+ # worktree's own `.venv`, so this is the one command that makes a new worktree pass it.
108
+
109
+ NPM_FOLDERS = (".", "frontend") # folders checked for a package-lock.json
110
+
111
+
112
+ def is_linked_worktree(repo: Path) -> bool:
113
+ """True when `repo` is inside a linked worktree (its git dir is not the common dir)."""
114
+ git_dir = _git_out(repo, "rev-parse", "--absolute-git-dir")
115
+ common = _git_out(repo, "rev-parse", "--git-common-dir")
116
+ if not git_dir or not common:
117
+ return False
118
+ return os.path.normcase(os.path.normpath(git_dir)) != os.path.normcase(os.path.normpath(repo / common))
119
+
120
+
121
+ def venv_python(venv: Path) -> Path:
122
+ """The interpreter inside a venv folder (Windows `Scripts/`, POSIX `bin/`)."""
123
+ win = venv / "Scripts" / "python.exe"
124
+ return win if win.exists() or os.name == "nt" else venv / "bin" / "python"
125
+
126
+
127
+ def _declares_dev_extra(pyproject: Path) -> tuple[bool, bool]:
128
+ """(has a [project] table, declares a `dev` optional-dependency group)."""
129
+ try:
130
+ import tomllib
131
+ data = tomllib.loads(pyproject.read_text(encoding="utf-8"))
132
+ except Exception: # noqa: BLE001 - unreadable or invalid TOML: treat as "declares nothing"
133
+ return False, False
134
+ project = data.get("project")
135
+ if not isinstance(project, dict):
136
+ return False, False
137
+ return True, "dev" in (project.get("optional-dependencies") or {})
138
+
139
+
140
+ def plan_bootstrap(root: Path) -> list[tuple[Path, list[str]]]:
141
+ """The commands (cwd, argv) that bootstrap the worktree at `root`. Reads files only; runs nothing.
142
+
143
+ Python: `uv sync --frozen --all-extras` when `uv.lock` exists (pip would not honour the lock), else `python -m venv .venv`
144
+ then `pip install` of what the repo declares (`-e .[dev]` or `-e .`, then requirements.txt / requirements-dev.txt).
145
+ Node: `npm ci` in each of NPM_FOLDERS that has a `package-lock.json`."""
146
+ steps: list[tuple[Path, list[str]]] = []
147
+ pyproject = root / "pyproject.toml"
148
+ reqs = [f for f in ("requirements.txt", "requirements-dev.txt") if (root / f).is_file()]
149
+ if (root / "uv.lock").is_file():
150
+ steps.append((root, ["uv", "sync", "--frozen", "--all-extras"]))
151
+ elif pyproject.is_file() or reqs:
152
+ has_project, has_dev = _declares_dev_extra(pyproject) if pyproject.is_file() else (False, False)
153
+ if has_project or reqs: # a pyproject with only tool config declares nothing to install
154
+ venv = root / ".venv"
155
+ if not venv_python(venv).is_file(): # the folder alone is not enough: an interrupted `venv` leaves it empty
156
+ steps.append((root, [sys.executable, "-m", "venv", ".venv"]))
157
+ py = str(venv_python(venv))
158
+ if has_project:
159
+ steps.append((root, [py, "-m", "pip", "install", "-e", ".[dev]" if has_dev else "."]))
160
+ for f in reqs:
161
+ steps.append((root, [py, "-m", "pip", "install", "-r", f]))
162
+ for folder in NPM_FOLDERS:
163
+ d = root / folder
164
+ if (d / "package-lock.json").is_file():
165
+ steps.append((d, ["npm", "ci"]))
166
+ return steps
167
+
168
+
169
+ def bootstrap(repo: Path | str = ".", run=subprocess.run, which=shutil.which) -> int:
170
+ """Install the dependencies of the linked worktree that contains `repo`. Returns 0, 1 (a step failed or a tool is
171
+ missing) or 2 (not a linked worktree: this never touches a main checkout). `run` and `which` are test seams."""
172
+ repo = Path(repo).absolute()
173
+ top = _git_out(repo, "rev-parse", "--show-toplevel") if repo.is_dir() else None
174
+ if not top:
175
+ print(f"error: {repo} is not inside a git repository", file=sys.stderr)
176
+ return 2
177
+ root = Path(os.path.normpath(top))
178
+ if not is_linked_worktree(root):
179
+ print(f"error: {root} is a main checkout, not a linked worktree. Bootstrap only runs in a worktree "
180
+ "(it would change the checkout's own venv and node_modules).", file=sys.stderr)
181
+ return 2
182
+ steps = plan_bootstrap(root)
183
+ if not steps:
184
+ print(f"bootstrap: nothing to install in {root} (no pyproject.toml, requirements*.txt or package-lock.json)")
185
+ return 0
186
+ for cwd, argv in steps:
187
+ exe = which(argv[0]) if argv[0] in ("uv", "npm") else argv[0]
188
+ if exe is None:
189
+ hint = " (uv.lock needs uv; pip would ignore the lock)" if argv[0] == "uv" else ""
190
+ print(f"error: `{argv[0]}` not found on PATH{hint}", file=sys.stderr)
191
+ return 1
192
+ cmd = [exe, *argv[1:]]
193
+ print(f"bootstrap: ({cwd}) {' '.join(cmd)}", flush=True)
194
+ if run(cmd, cwd=cwd, check=False).returncode != 0:
195
+ print(f"error: step failed: {' '.join(cmd)}", file=sys.stderr)
196
+ return 1
197
+ print(f"bootstrap: done - {root} has its own dependencies")
198
+ return 0
199
+
200
+
99
201
  def main(argv: list[str] | None = None) -> int:
100
202
  ap = argparse.ArgumentParser(description="Print the path for a new git worktree (never under %TEMP%).")
101
- ap.add_argument("short_name", help="one folder name, e.g. fix-login")
203
+ ap.add_argument("short_name", nargs="?", help="one folder name, e.g. fix-login (not used with --bootstrap)")
204
+ ap.add_argument("--bootstrap", action="store_true",
205
+ help="instead of printing a path: install the dependencies of the worktree that contains --repo "
206
+ "(uv sync or venv + pip, and npm ci); exit 2 in a main checkout")
102
207
  ap.add_argument("--repo", default=".", help="any folder of the repo or of one of its worktrees (default: .)")
103
208
  ap.add_argument("--root", default=None, help=f"override the root (default: ${ENV_VAR}, then <repo parent>/.worktrees)")
104
209
  ap.add_argument("--record", action="store_true", help="also record the path in this session's created list")
105
210
  ap.add_argument("--purpose", default="", help="with --record: why the worktree is made")
106
211
  args = ap.parse_args(argv)
212
+ if args.bootstrap:
213
+ return bootstrap(args.repo)
214
+ if not args.short_name:
215
+ ap.error("a short name is required (or use --bootstrap)")
107
216
  try:
108
217
  path = worktree_path(args.repo, args.short_name, args.root)
109
218
  repo = main_checkout(args.repo) if args.record else None
@@ -613,8 +613,14 @@ if __name__ == "__main__":
613
613
  # that is a broken environment, not a project without linting — and a check that cannot
614
614
  # run must not report success. Tools the project never asked for are still skipped
615
615
  # silently, because those genuinely are not part of its standards.
616
+ # Bump when the hook text changes in a way an installed copy should pick up. install_git_hooks replaces a managed hook
617
+ # whose "caddis-pre-push-version" is lower (a hook with no marker counts as 0) and leaves a hook it does not manage alone.
618
+ PRE_PUSH_HOOK_VERSION = 2
619
+ _HOOK_SCRIPTS_PLACEHOLDER = "__CADDIS_SCRIPTS__"
620
+
616
621
  PRE_PUSH_HOOK = r"""#!/usr/bin/env sh
617
622
  # Managed by caddis setup-project-ai. Delete this file to opt out.
623
+ # caddis-pre-push-version: 2
618
624
  set -eu
619
625
  echo "[caddis] pre-push quality gate"
620
626
  fail=0
@@ -626,13 +632,25 @@ else
626
632
  GATE_RUN="./caddis_gate_step.py"
627
633
  fi
628
634
 
629
- # Prefer the project's virtualenv over PATH. Checked in venv-layout order for both
630
- # Windows (Scripts/) and POSIX (bin/) so the same hook works on either.
635
+ # Use the project's own virtualenv, never whatever is on PATH. Both layouts are checked (Windows Scripts/, POSIX bin/).
636
+ # A linked git WORKTREE uses ONLY its own .venv. The main checkout's venv is not an option: it belongs to a running
637
+ # dev service and is often many commits behind the worktree's pins (found 2026-11-03: rbac-kit 0.2.0 against a 0.3.1
638
+ # pin; the old lookup list also held a literal backslash-n typo). Every worktree installs its dependencies fresh.
639
+ HOOK_SCRIPTS_DIR="__CADDIS_SCRIPTS__"
631
640
  PY=""
641
+ IN_WORKTREE=0
642
+ if [ "$(git rev-parse --git-dir 2>/dev/null || echo .git)" != "$(git rev-parse --git-common-dir 2>/dev/null || echo .git)" ]; then
643
+ IN_WORKTREE=1
644
+ fi
632
645
  for cand in .venv/Scripts/python.exe .venv/bin/python venv/Scripts/python.exe venv/bin/python; do
633
646
  if [ -x "$cand" ]; then PY="$cand"; break; fi
634
647
  done
635
- if [ -z "$PY" ]; then PY=$(command -v python || command -v python3 || true); fi
648
+ if [ -z "$PY" ] && [ "$IN_WORKTREE" -eq 0 ]; then
649
+ PY=$(command -v python || command -v python3 || true)
650
+ if [ -n "$PY" ] && { [ -f "pyproject.toml" ] || [ -f "requirements.txt" ]; }; then
651
+ echo "[gate] WARNING: no .venv in this checkout - using the system Python ($PY). Its packages may differ from the project's pins." >&2
652
+ fi
653
+ fi
636
654
 
637
655
  # Runnable IN $PY - not merely present on PATH. This is the whole point: `command -v mypy`
638
656
  # answers a question about PATH, and the question we care about is about the environment
@@ -683,7 +701,16 @@ py_gate() {
683
701
  }
684
702
 
685
703
  if [ -f "pyproject.toml" ] || [ -f "requirements.txt" ]; then
686
- if [ -z "$PY" ]; then
704
+ if [ -z "$PY" ] && [ "$IN_WORKTREE" -eq 1 ]; then
705
+ echo "[gate] this git worktree has no .venv, and the gate will not borrow the main checkout's or the system Python." >&2
706
+ if [ -f "$HOOK_SCRIPTS_DIR/caddis_worktree_root.py" ]; then
707
+ echo " fix, in this worktree: python \"$HOOK_SCRIPTS_DIR/caddis_worktree_root.py\" --bootstrap" >&2
708
+ else
709
+ echo " fix, in this worktree: python \"<caddis scripts>/caddis_worktree_root.py\" --bootstrap (the scripts folder of the installed caddis plugin)" >&2
710
+ fi
711
+ echo "[caddis] push BLOCKED - 'git push --no-verify' overrides." >&2
712
+ exit 1
713
+ elif [ -z "$PY" ]; then
687
714
  echo "[gate] python project, but no interpreter found (.venv or PATH) - cannot verify" >&2
688
715
  fail=1
689
716
  else
@@ -770,8 +797,30 @@ echo "[caddis] gate passed - pushing."
770
797
  """
771
798
 
772
799
 
800
+ _HOOK_MARKER_RE = re.compile(r"Managed by (caddis|claudster)\b")
801
+ _HOOK_VERSION_RE = re.compile(r"^#\s*caddis-pre-push-version:\s*(\d+)", re.MULTILINE)
802
+
803
+
804
+ def render_pre_push_hook() -> str:
805
+ """The hook text to install: the template with this install's scripts folder filled in (forward slashes)."""
806
+ return PRE_PUSH_HOOK.replace(_HOOK_SCRIPTS_PLACEHOLDER, Path(__file__).resolve().parent.as_posix())
807
+
808
+
809
+ def _installed_hook_state(hook_text: str) -> tuple[bool, int]:
810
+ """(managed by caddis, its version). A managed hook with no version marker is version 0. A hook this tool did not
811
+ write is (False, 0): it is never replaced without --force."""
812
+ if not _HOOK_MARKER_RE.search(hook_text): # also recognises pre-rename ("claudster") hooks
813
+ return False, 0
814
+ m = _HOOK_VERSION_RE.search(hook_text)
815
+ return True, int(m.group(1)) if m else 0
816
+
817
+
773
818
  def install_git_hooks(target: Path, force: bool, dry: bool) -> list[str]:
774
- """Install the enforced pre-push quality gate into .git/hooks/pre-push."""
819
+ """Install the enforced pre-push quality gate into .git/hooks/pre-push.
820
+
821
+ An existing caddis-managed hook is replaced when its version is older than PRE_PUSH_HOOK_VERSION and kept when it is
822
+ current. A hook caddis did not write is left alone unless `force`. Git shares `.git/hooks` with every worktree of the
823
+ repo, so one install in the main checkout covers them all."""
775
824
  notes: list[str] = []
776
825
  git = target / ".git"
777
826
  if not git.exists():
@@ -781,13 +830,17 @@ def install_git_hooks(target: Path, force: bool, dry: bool) -> list[str]:
781
830
  hooks_dir = git / "hooks"
782
831
  dest = hooks_dir / "pre-push"
783
832
  step_dest = hooks_dir / "caddis_gate_step.py"
833
+ upgraded_from: int | None = None
784
834
  if dest.exists() and not force:
785
- _hook_txt = dest.read_text(encoding="utf-8", errors="ignore")
786
- managed = "caddis" in _hook_txt or "claudster" in _hook_txt # recognise pre-rename hooks too
787
- return [f"pre-push gate: exists ({'ours' if managed else 'yours — left intact, use --force to replace'}) — skipped"]
835
+ managed, version = _installed_hook_state(dest.read_text(encoding="utf-8", errors="ignore"))
836
+ if not managed:
837
+ return ["pre-push gate: exists (yours — left intact, use --force to replace) — skipped"]
838
+ if version >= PRE_PUSH_HOOK_VERSION:
839
+ return [f"pre-push gate: exists (ours) at version {version}, current — skipped"]
840
+ upgraded_from = version
788
841
  if not dry:
789
842
  hooks_dir.mkdir(parents=True, exist_ok=True)
790
- dest.write_text(PRE_PUSH_HOOK, encoding="utf-8", newline="\n")
843
+ dest.write_text(render_pre_push_hook(), encoding="utf-8", newline="\n")
791
844
  step_dest.write_text(GATE_STEP_PY, encoding="utf-8", newline="\n")
792
845
  try:
793
846
  import stat
@@ -795,7 +848,11 @@ def install_git_hooks(target: Path, force: bool, dry: bool) -> list[str]:
795
848
  step_dest.chmod(step_dest.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
796
849
  except Exception:
797
850
  pass
798
- notes.append("pre-push gate: installed .git/hooks/pre-push and caddis_gate_step.py (green-before-push enforced)")
851
+ if upgraded_from is not None:
852
+ notes.append(f"pre-push gate: upgraded .git/hooks/pre-push (version {upgraded_from} -> {PRE_PUSH_HOOK_VERSION}) "
853
+ "and caddis_gate_step.py (green-before-push enforced)")
854
+ else:
855
+ notes.append("pre-push gate: installed .git/hooks/pre-push and caddis_gate_step.py (green-before-push enforced)")
799
856
  return notes
800
857
 
801
858
 
@@ -1201,6 +1258,7 @@ agent-log.jsonl
1201
1258
  usage-log.jsonl.1
1202
1259
  agent-log.jsonl.1
1203
1260
  .last-usage-review
1261
+ .last-preload-review
1204
1262
  relay.md
1205
1263
  relay/
1206
1264
  session-state.md
@@ -1490,6 +1548,68 @@ def ensure_user_env(dry: bool, home: Path | None = None) -> list[str]:
1490
1548
  + ("" if not raw else " (previous version saved as settings.json.caddis-bak)")]
1491
1549
 
1492
1550
 
1551
+ # ── superpowers twins that caddis replaces ──────────────────────────────────────────────────
1552
+ # caddis owns the routing-critical skills: brainstorming, plans (/caddis:feature-plan), running plans
1553
+ # (/caddis:implement) and worktrees. The superpowers plugin ships skills with the same names; its
1554
+ # writing-plans and executing-plans skip the caddis model routing. A deny rule blocks such a skill
1555
+ # ("Skill execution blocked by permission rules") WITHOUT a prompt, so it keeps the zero-prompt setup
1556
+ # (an `ask` rule would prompt every time). Every other superpowers skill is used straight from the plugin.
1557
+ # inject_relay.py re-states this list to warn when a rule is missing; a test keeps the two equal.
1558
+ SUPERPOWERS_DENY = (
1559
+ "Skill(superpowers:brainstorming)",
1560
+ "Skill(superpowers:writing-plans)",
1561
+ "Skill(superpowers:executing-plans)",
1562
+ "Skill(superpowers:subagent-driven-development)",
1563
+ "Skill(superpowers:using-git-worktrees)",
1564
+ )
1565
+
1566
+
1567
+ def ensure_superpowers_deny(dry: bool, home: Path | None = None) -> str:
1568
+ """Add the SUPERPOWERS_DENY rules to the user's `permissions.deny`, additively and idempotently.
1569
+
1570
+ Other deny entries (and every other setting) are never removed or reordered. Same safety rules as
1571
+ ensure_user_env: a file that does not parse is never rewritten, a backup is kept
1572
+ (`settings.json.caddis-deny-bak`, its own name so it cannot overwrite another function's backup), the
1573
+ write is atomic, and `CADDIS_NO_SETTINGS_ENV` skips it. Known limit, as for ensure_user_env: a write by
1574
+ Claude Code between this read and the replace is lost."""
1575
+ if os.environ.get("CADDIS_NO_SETTINGS_ENV"):
1576
+ return "superpowers deny rules: skipped (CADDIS_NO_SETTINGS_ENV set)"
1577
+ path = _user_settings_path(home)
1578
+ if path.is_file():
1579
+ raw = path.read_text(encoding="utf-8", errors="ignore")
1580
+ try:
1581
+ data = json.loads(raw)
1582
+ except json.JSONDecodeError as exc:
1583
+ return (f"superpowers deny rules: {path} is NOT VALID JSON ({exc.msg}, line {exc.lineno}) — "
1584
+ "left untouched; fix it by hand.")
1585
+ if not isinstance(data, dict):
1586
+ return f"superpowers deny rules: {path} is not a JSON object — left untouched"
1587
+ else:
1588
+ raw, data = "", {}
1589
+ perms = data.get("permissions")
1590
+ if perms is None:
1591
+ perms = {}
1592
+ elif not isinstance(perms, dict):
1593
+ return f"superpowers deny rules: {path} has a non-object `permissions` — left untouched"
1594
+ deny = perms.get("deny")
1595
+ if deny is None:
1596
+ deny = []
1597
+ elif not isinstance(deny, list):
1598
+ return f"superpowers deny rules: {path} has a non-list `permissions.deny` — left untouched"
1599
+ missing = [rule for rule in SUPERPOWERS_DENY if rule not in deny]
1600
+ if not missing:
1601
+ return f"superpowers deny rules: all {len(SUPERPOWERS_DENY)} already in {path}"
1602
+ perms["deny"] = deny + missing
1603
+ data["permissions"] = perms
1604
+ if not dry:
1605
+ path.parent.mkdir(parents=True, exist_ok=True)
1606
+ if raw:
1607
+ path.with_suffix(".json.caddis-deny-bak").write_text(raw, encoding="utf-8")
1608
+ _atomic_write_json(path, data)
1609
+ verb = "would add" if dry else "added"
1610
+ return f"superpowers deny rules: {verb} {len(missing)} to permissions.deny in {path}"
1611
+
1612
+
1493
1613
  CLEANUP_PERIOD_KEY = "cleanupPeriodDays"
1494
1614
  CLEANUP_PERIOD_DAYS = 120
1495
1615
 
@@ -1534,7 +1654,7 @@ def scaffold_artifact_dir(target: Path, dry: bool) -> list[str]:
1534
1654
  """Create the harness-owned .caddis/ artifact tree + a default .gitignore + a config example.
1535
1655
 
1536
1656
  Committed subdirs: plans, handoffs, agent-docs, prd, kb, prompts, comms. Transient state
1537
- (reviews/*.html, usage-log.jsonl, .last-usage-review, relay*, session-state.md,
1657
+ (reviews/*.html, usage-log.jsonl, .last-usage-review, .last-preload-review, relay*, session-state.md,
1538
1658
  PROJECT-FACTS.md) is gitignored. .caddis/ is the default home for every working-artifact kind (Track A
1539
1659
  Phase A3) — kb/ and prompts/ round out plans/prd/agent-docs/reviews so nothing has to
1540
1660
  scatter to the repo root or .github/. Also drops a documented `config.toml.example`
@@ -1832,6 +1952,7 @@ def main() -> int:
1832
1952
  for line in ensure_user_env(args.dry_run):
1833
1953
  print(f" {line}")
1834
1954
  print(f" {ensure_cleanup_period(args.dry_run)}")
1955
+ print(f" {ensure_superpowers_deny(args.dry_run)}")
1835
1956
 
1836
1957
  print("-- doc-coverage discipline (DOC-MAP + page guide + checker)")
1837
1958
  for line in emit_doc_discipline(target, ident, args.force, args.dry_run):
@@ -16,7 +16,7 @@
16
16
  | Code Review | `code-review/` | Automated code review for quality, security, performance and best practices. Use when reviewing code changes, PRs, or doing code audits. |
17
17
  | Codebase Audit | `codebase-audit/` | Audit an unfamiliar codebase before architecture or implementation work. Use for a new codebase, pre-implementation audit, codebase review, technical due diligence or onboarding. Produces AUDIT-FINDINGS.md and QUESTIONS.md. |
18
18
  | Cross Review | `cross-review/` | Cross-vendor code review of the current diff — a second-vendor model (agy Argon by default; DeepSeek, GLM or any OpenAI-compatible endpoint) reviews your changes to catch bugs a same-vendor reviewer misses |
19
- | Dashboard Perf Sweep | `dashboard-perf-sweep/` | Re-measure dashboard/API endpoints for load-time regressions and decide by checklist if a slow one needs the rs-kit refresher, an index, keyset paging, gzip, or nothing. Use when the user says "sweep dashboard performance", "check if this app needs rs-kit", "re-measure the perf tracker", "is this endpoint a refresher candidate", or dashboard-performance-tracker.md is stale. Read-only. |
19
+ | Dashboard Perf Sweep | `dashboard-perf-sweep/` | Re-measure dashboard/API endpoints for load-time regressions. Use when the user says "sweep dashboard performance", "check if this app needs rs-kit", or "re-measure the perf tracker". |
20
20
  | Error Handling | `error-handling/` | Error handling for Python and TypeScript: error hierarchies, custom exceptions, result types, retries, circuit breakers, error boundaries, logging, user-facing messages. |
21
21
  | Fastapi Dev | `fastapi-dev/` | Build FastAPI backends with standard patterns, error handling, and testing |
22
22
  | Javascript Typescript | `javascript-typescript/` | JavaScript and TypeScript development with ES6+, Node.js, React, and modern web frameworks. Use for frontend, backend, or full-stack JavaScript/TypeScript projects. |
@@ -30,7 +30,7 @@
30
30
  | Skill | Path | When to Use |
31
31
  |-------|------|-------------|
32
32
  | Database Design | `database-design/` | Database schema design, migrations and query optimization for PostgreSQL, MySQL and NoSQL. |
33
- | Db Diagram | `db-diagram/` | Diagram a SQL artifact (stored proc, view, query, .sql file, table) as Mermaid or Excalidraw. Use when the user says "diagram this query/proc/view/schema", "explain this SQL visually", "draw the ER diagram", "show me the data flow of this stored proc", "/mermaid-db", or "/excalidraw-db". Read-only. |
33
+ | Db Diagram | `db-diagram/` | Diagram SQL artifacts (procs, views, queries, tables) as Mermaid or Excalidraw. Use when the user says "diagram this SQL", "draw the ER diagram", "/mermaid-db", or "/excalidraw-db". |
34
34
 
35
35
  ### Devops
36
36
 
@@ -40,6 +40,7 @@
40
40
  | Ci Cd Pipeline | `ci-cd-pipeline/` | CI/CD pipelines for GitHub Actions and Azure DevOps: build and deploy workflows, quality gates, environment promotion and release automation. |
41
41
  | Gh Cli | `gh-cli/` | GitHub CLI operations — issues, PRs, releases, and repo management |
42
42
  | Git Commit | `git-commit/` | Create well-structured conventional commit messages following Conventional Commits standard. Use when committing changes, preparing PRs, or generating changelogs. |
43
+ | Graph Email | `graph-email/` | Send a Markdown file as an email through Microsoft Graph or SMTP, as set in ~/.caddis/email.toml. Default recipient is the owner. |
43
44
  | Port To Github | `port-to-github/` | >- |
44
45
  | Safe Cleanup | `safe-cleanup/` | Use BEFORE deleting a directory tree, scratchpad or git worktree, or "tidying up" generated folders, especially on Windows, where deleting through a junction or symlink destroys its target; and to verify a venv or node_modules survived. |
45
46
  | Using Git Worktrees | `using-git-worktrees/` | Use when starting feature work that needs isolation from the current workspace, or before executing an implementation plan: creates an isolated git worktree safely. |
@@ -52,7 +53,7 @@
52
53
  | Code Documentation | `code-documentation/` | Write code documentation: API docs, README files, inline comments and developer guides. |
53
54
  | Confluence Hla | `confluence-hla/` | High-Level Architecture (HLA) documents in Simplified Technical English as Confluence Storage Format XHTML with PlantUML. Use for Confluence architecture docs or converting markdown architecture. |
54
55
  | Data Lineage | `data-lineage/` | Generate End-to-End Data Lineage and Telemetry Specification Markdown and Confluence XHTML for fleet observability. |
55
- | Explainer Doc | `explainer-doc/` | Hand-off doc for a team that did NOT do the investigation (vendor, contractor, another team) — the "stranger must follow it alone" case. Use when the user says "write a spec for the X team", "document this for someone outside the team", "explainer doc", "implementation spec for a vendor", or "hand this off to Y". Not for readers with full context. |
56
+ | Explainer Doc | `explainer-doc/` | Write a self-contained hand-off spec for an external team or vendor. Use when the user says "write a spec for the X team", "explainer doc", "spec for a vendor", or "hand this off to Y". |
56
57
  | Hld | `hld/` | Generate High-Level Design (HLD) Markdown documentation and Confluence XHTML with native PlantUML diagrams. |
57
58
  | Lld | `lld/` | Generate Lower-Level Design (LLD) Markdown documentation and Confluence XHTML with native PlantUML diagrams. |
58
59
  | Office Documents Official | `office-documents-official/` | Hint for Office and PDF file work. Use when the user asks to create, edit, read or convert a Word .docx, PDF, PowerPoint .pptx or Excel .xlsx file. caddis does not ship these skills; points to Anthropic's official document-skills plugin. |
@@ -71,7 +72,7 @@
71
72
  | React Best Practices | `react-best-practices/` | Modern React development guidelines covering hooks, component patterns, state management, performance optimization, and TypeScript integration. |
72
73
  | React Dev | `react-dev/` | Type-safe React 18-19 with TypeScript: components, generic components, hooks, events, Server Components, TanStack Router and React Router. Use when React TypeScript or React 19 is involved. |
73
74
  | Ui Review | `ui-review/` | Review a UI against design requirements, WCAG 2.2 AA and brand guidelines. Use when validating UI before release. |
74
- | Warm Editorial Ui | `warm-editorial-ui/` | Apply the "Warm Editorial Refinement" design system (warm cream/charcoal surfaces, Bahnschrift + Plus Jakarta Sans, layered shadows), the canonical template for new frontend builds. Use for apps, dashboards or UI in the abc-project style, or on "use our design system", "apply our template", "make it look like abc-project", "use the warm editorial style", "use our brand template", "add dark mode", or a new tool for XYZ Brand. |
75
+ | Warm Editorial Ui | `warm-editorial-ui/` | Apply the Warm Editorial Refinement design system. Use when the user says "use our design system", "warm editorial style", "apply our template", or "make it look like abc-project". |
75
76
 
76
77
  ### General
77
78
 
@@ -100,6 +101,7 @@
100
101
  | Park | `park/` | File a future-work item in the one backlog — .caddis/parking-lot/ — or list what is open |
101
102
  | Pr Merge | `pr-merge/` | End-to-end pull request and merge lane — push feature branch, open or update PR, monitor CI to green, merge to default branch, and clean up the feature branch. |
102
103
  | Prd | `prd/` | Capture requirements through structured discovery and write a PRD |
104
+ | Preload Review | `preload-review/` | Show what loads before the first prompt in every repo (rules, memory index, skills, MCP names) and list what to shorten |
103
105
  | Rca | `rca/` | Record a root cause in one step — .caddis/rca/<date>-<slug>.md — or close one with the fixing commit |
104
106
  | Review Pr | `review-pr/` | Review someone else's OPEN pull request end to end — what changed, what CI says, what is risky — then approve or request changes. Never approves on its own. |
105
107
  | Ship | `ship/` | Commit, push, and monitor the deploy pipeline (auto-detects Gitea, GitHub Actions, or local-only) |
@@ -135,7 +137,7 @@
135
137
  | Skill | Path | When to Use |
136
138
  |-------|------|-------------|
137
139
  | Best Practices | `best-practices/` | >- |
138
- | Brainstorming | `brainstorming/` | You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation. |
140
+ | Brainstorming | `brainstorming/` | Use before any creative work: new features, components or behavior changes, or planning anything new. Finds what the user wants first. |
139
141
  | Context Curator | `context-curator/` | Compress and prioritize codebase context before handing work to reasoning agents, minimizing token waste while preserving the required decision inputs. |
140
142
  | Preflight | `preflight/` | Plan-vs-codebase validation — verifies API contracts, type names, field accuracy, dependencies, and paths before implementation begins |
141
143
  | Roadmap | `roadmap/` | Track milestones across plans in .caddis/roadmaps/<slug>/: next batch, typed blockers, rollup. Every change is a docs PR via caddis_roadmap.py. |
@@ -1,11 +1,8 @@
1
1
  ---
2
2
  name: adopt-app
3
3
  description: >-
4
- Bring an app that was never scaffolded (POC, server folder, checkout with no remote) up to standard:
5
- inventory without running it, pass/gap/question verdicts, ordered plan. Use when the user says "this
6
- app was never set up properly", "adopt this POC", "onboard this app", "it just runs from a folder on
7
- the server", "what would it take to get this into CI", "nobody knows how this is deployed", or "it
8
- started as a prototype and now it is production".
4
+ Inventory an unscaffolded app or POC read-only and produce an adoption plan. Use when the user
5
+ says "adopt this POC", "onboard this app", "never set up properly", or "get this into CI".
9
6
  ---
10
7
 
11
8
  # adopt-app