@caddis/cli 0.4.97 → 0.4.98
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/repo_hygiene.py +134 -20
- 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_gate.py +18 -1
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
- package/bundles/antigravity-plugin/scripts/caddis_handoff.py +235 -0
- package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +23 -12
- package/bundles/antigravity-plugin/scripts/caddis_review.py +12 -0
- package/bundles/antigravity-plugin/scripts/caddis_tidy.py +152 -51
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +136 -17
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +60 -1
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +60 -1
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +60 -2
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +6 -0
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +80 -15
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +6 -0
- package/bundles/antigravity-plugin/skills/park/SKILL.md +7 -2
- package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +1 -0
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +1 -0
- package/bundles/manifest.json +2 -2
- package/dist/cli.js +71 -14
- package/dist/export/assets/export-B3cUoxL1.js +150 -0
- package/dist/export/assets/export-DQss44R1.css +1 -0
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/Activity-CvEIJlnE.js +6 -0
- package/dist/ui/assets/{Guide-D-lZVEKf.js → Guide-BxS9L55s.js} +1 -1
- package/dist/ui/assets/Guide-DTd261-c.css +1 -0
- package/dist/ui/assets/RoadmapTab-CqlWs7dJ.js +31 -0
- package/dist/ui/assets/index-9pdDzLVp.css +1 -0
- package/dist/ui/assets/index-DSxeWPax.js +231 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/export/assets/export-B5Lzo-9e.css +0 -1
- package/dist/export/assets/export-PF4z_ff4.js +0 -150
- package/dist/ui/assets/Activity-DN1XBfsH.js +0 -6
- package/dist/ui/assets/Guide-D-Zy4cUT.css +0 -1
- package/dist/ui/assets/RoadmapTab-tqQd2sYq.js +0 -31
- package/dist/ui/assets/index-CWslZIzV.js +0 -231
- package/dist/ui/assets/index-CwgRPpjT.css +0 -1
- package/dist/ui/assets/time-D00tu2ZP.js +0 -1
|
@@ -97,6 +97,7 @@ hands back here.
|
|
|
97
97
|
Run `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" review-tier --range <base>...HEAD` and review by its tier (rule 3).
|
|
98
98
|
`<base>` is `origin/<default branch>` (on the default branch itself, the commit before this change). Tier 0 or 1-small: no model review. Tier 1: one `/caddis:cross-review`. Tier 2: one `/caddis:cross-review` by one other vendor (two only when the owner asks). No `TIER:` line means tier 2.
|
|
99
99
|
<!-- /shared:cross-review-trigger -->
|
|
100
|
+
When `review-tier` prints `AREA: security-analyst`, also dispatch `security-analyst` on the diff. `ui-design-reviewer` never runs per PR.
|
|
100
101
|
|
|
101
102
|
## Step 4 — Rebase-safe currency
|
|
102
103
|
|
|
@@ -126,6 +126,7 @@ source checkout; skip this step if the script is missing or the repo has no `.ca
|
|
|
126
126
|
Run `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" review-tier --range <base>...HEAD` and review by its tier (rule 3).
|
|
127
127
|
`<base>` is `origin/<default branch>` (on the default branch itself, the commit before this change). Tier 0 or 1-small: no model review. Tier 1: one `/caddis:cross-review`. Tier 2: one `/caddis:cross-review` by one other vendor (two only when the owner asks). No `TIER:` line means tier 2.
|
|
128
128
|
<!-- /shared:cross-review-trigger -->
|
|
129
|
+
When `review-tier` prints `AREA: security-analyst`, also dispatch `security-analyst` on the diff. `ui-design-reviewer` never runs per PR.
|
|
129
130
|
|
|
130
131
|
> **Why this is mechanical and not "consider a review here".** a fleet app shipped four
|
|
131
132
|
> production releases in one day — sixteen fixes across SQL, caches, refresh jobs and React — and
|
package/bundles/manifest.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -7056,10 +7056,20 @@ function createCollectorSource(opts) {
|
|
|
7056
7056
|
let running = null;
|
|
7057
7057
|
let knownUnsupported = false;
|
|
7058
7058
|
let prsFileUnsupported = false;
|
|
7059
|
+
let doneKnownUnsupported = false;
|
|
7059
7060
|
const fail2 = (message3) => {
|
|
7060
7061
|
lastError = message3;
|
|
7061
7062
|
lastRunOk = false;
|
|
7062
7063
|
};
|
|
7064
|
+
const withDone = (entry, old) => {
|
|
7065
|
+
const plans = entry.plans;
|
|
7066
|
+
const done = plans?.done;
|
|
7067
|
+
if (!plans || !done || typeof done !== "object" || done.unchanged !== true) return entry;
|
|
7068
|
+
const oldDone = old?.error === void 0 ? old?.plans?.done : void 0;
|
|
7069
|
+
const reuse = oldDone && typeof done.tree === "string" && oldDone.tree === done.tree && Array.isArray(oldDone.plans);
|
|
7070
|
+
if (reuse) return { ...entry, plans: { ...plans, done: oldDone } };
|
|
7071
|
+
return { ...entry, fingerprint: void 0, plans: { ...plans, done: { error: "done plans not cached" } } };
|
|
7072
|
+
};
|
|
7063
7073
|
const ingest = (parsed, wanted) => {
|
|
7064
7074
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return fail2("collector output is not a JSON object");
|
|
7065
7075
|
const out = parsed;
|
|
@@ -7085,7 +7095,7 @@ function createCollectorSource(opts) {
|
|
|
7085
7095
|
if (!old || old.error !== void 0) cache2.set(entry.path, entry);
|
|
7086
7096
|
continue;
|
|
7087
7097
|
}
|
|
7088
|
-
if (!old || old.error !== void 0 || old.fingerprint !== entry.fingerprint) cache2.set(entry.path, entry);
|
|
7098
|
+
if (!old || old.error !== void 0 || old.fingerprint !== entry.fingerprint) cache2.set(entry.path, withDone(entry, old));
|
|
7089
7099
|
}
|
|
7090
7100
|
const keepOrError = (next, old) => {
|
|
7091
7101
|
if (!next || typeof next !== "object") return old;
|
|
@@ -7111,6 +7121,10 @@ function createCollectorSource(opts) {
|
|
|
7111
7121
|
}
|
|
7112
7122
|
const script = opts.scriptPath ?? defaultScriptPath();
|
|
7113
7123
|
const known = [...cache2.values()].filter((r2) => !knownUnsupported && r2.error === void 0 && typeof r2.fingerprint === "string" && repos.includes(r2.path)).map((r2) => `${r2.path}=${r2.fingerprint}`);
|
|
7124
|
+
const doneKnown = [...cache2.values()].filter((r2) => !knownUnsupported && !doneKnownUnsupported && r2.error === void 0 && repos.includes(r2.path)).flatMap((r2) => {
|
|
7125
|
+
const tree = r2.plans?.done?.tree;
|
|
7126
|
+
return typeof tree === "string" && tree ? [`${r2.path}=${tree}`] : [];
|
|
7127
|
+
});
|
|
7114
7128
|
let prsFlag = [];
|
|
7115
7129
|
if (opts.prs && opts.prsFile && repos.length > 0 && !prsFileUnsupported) {
|
|
7116
7130
|
try {
|
|
@@ -7120,19 +7134,33 @@ function createCollectorSource(opts) {
|
|
|
7120
7134
|
} catch {
|
|
7121
7135
|
}
|
|
7122
7136
|
}
|
|
7123
|
-
const
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7137
|
+
const build = () => repos.length ? [
|
|
7138
|
+
...pre,
|
|
7139
|
+
script,
|
|
7140
|
+
"--repos",
|
|
7141
|
+
...repos,
|
|
7142
|
+
...known.length ? ["--known", ...known] : [],
|
|
7143
|
+
...doneKnown.length ? ["--done-known", ...doneKnown] : [],
|
|
7144
|
+
...prsFlag,
|
|
7145
|
+
"--json"
|
|
7146
|
+
] : [...pre, script, "--repos", path17.join(os5.tmpdir(), "caddis-hub-no-repos"), "--only", "spend,guide", "--json"];
|
|
7147
|
+
let result = await spawn2(cmd, build(), { timeoutMs: RUN_TIMEOUT_MS2 });
|
|
7148
|
+
for (let attempt = 0; attempt < 3 && !result.ok; attempt += 1) {
|
|
7149
|
+
if (prsFlag.length && /unrecognized arguments:.*--prs-file/.test(result.stderr)) {
|
|
7150
|
+
prsFileUnsupported = true;
|
|
7151
|
+
prsFlag = [];
|
|
7152
|
+
log("caddis hub: the collector script does not know --prs-file (old plugin); branch progress is off. Update the plugin.");
|
|
7153
|
+
} else if (result.code === 2 && known.length && repos.length && /unrecognized arguments:.*--known/.test(result.stderr)) {
|
|
7154
|
+
knownUnsupported = true;
|
|
7155
|
+
known.length = 0;
|
|
7156
|
+
doneKnown.length = 0;
|
|
7157
|
+
log("caddis hub: the collector script does not know --known (old plugin); sending full runs. Update the plugin.");
|
|
7158
|
+
} else if (result.code === 2 && doneKnown.length && /unrecognized arguments:.*--done-known/.test(result.stderr)) {
|
|
7159
|
+
doneKnownUnsupported = true;
|
|
7160
|
+
doneKnown.length = 0;
|
|
7161
|
+
log("caddis hub: the collector script does not know --done-known (old plugin); done plans are sent in full. Update the plugin.");
|
|
7162
|
+
} else break;
|
|
7163
|
+
result = await spawn2(cmd, build(), { timeoutMs: RUN_TIMEOUT_MS2 });
|
|
7136
7164
|
}
|
|
7137
7165
|
if (result.timedOut) return fail2(`collector timed out after ${RUN_TIMEOUT_MS2 / 1e3} s`);
|
|
7138
7166
|
if (!result.ok) {
|
|
@@ -9250,6 +9278,16 @@ function plan(raw) {
|
|
|
9250
9278
|
overlay: planOverlay(p2.overlay)
|
|
9251
9279
|
};
|
|
9252
9280
|
}
|
|
9281
|
+
function dateText(v2) {
|
|
9282
|
+
if (typeof v2 !== "number" || !Number.isInteger(v2) || v2 < 0) return null;
|
|
9283
|
+
const d3 = new Date(v2 * 1e3);
|
|
9284
|
+
return Number.isNaN(d3.getTime()) ? null : d3.toISOString().slice(0, 10);
|
|
9285
|
+
}
|
|
9286
|
+
function donePlan(raw) {
|
|
9287
|
+
const p2 = rec3(raw);
|
|
9288
|
+
if (p2.error !== void 0 || !safePlanPath(str5(p2.path))) return null;
|
|
9289
|
+
return { path: str5(p2.path), title: str5(p2.title), closed_at: dateText(p2.closed_at), phases: int(p2.phases), pr: posInt(p2.pr) ? p2.pr : null };
|
|
9290
|
+
}
|
|
9253
9291
|
function planOverlay(raw) {
|
|
9254
9292
|
const o2 = rec3(raw);
|
|
9255
9293
|
if (!posInt(o2.pr)) return null;
|
|
@@ -9287,6 +9325,7 @@ function exportData(collect, opts) {
|
|
|
9287
9325
|
commit,
|
|
9288
9326
|
roadmaps: arr2(slot.roadmaps).map(roadmap),
|
|
9289
9327
|
plans: arr2(rec3(repo.plans).plans).map(plan).filter((p2) => p2 !== null),
|
|
9328
|
+
done_plans: arr2(rec3(rec3(repo.plans).done).plans).map(donePlan).filter((p2) => p2 !== null),
|
|
9290
9329
|
overlay: repoOverlay(rec3(repo.plans).overlay)
|
|
9291
9330
|
};
|
|
9292
9331
|
}
|
|
@@ -9398,6 +9437,15 @@ function scanUrls(file, text2, opts, hits) {
|
|
|
9398
9437
|
hits.push({ file, offset: m2.index ?? 0, rule: "url-not-allowed" });
|
|
9399
9438
|
}
|
|
9400
9439
|
}
|
|
9440
|
+
function isPrivateText(text2, deny) {
|
|
9441
|
+
if (PRIVATE_NAMES.some((name) => text2.includes(name))) return true;
|
|
9442
|
+
if (PATTERNS.some(({ re }) => new RegExp(re.source, re.flags.replace("g", "")).test(text2))) return true;
|
|
9443
|
+
return deny.some((value) => {
|
|
9444
|
+
if (value === "") return false;
|
|
9445
|
+
const re = isNumeric(value) ? new RegExp(`(?<![0-9])${escapeRe(value)}(?![0-9])`, "i") : new RegExp(escapeRe(value), "i");
|
|
9446
|
+
return re.test(text2);
|
|
9447
|
+
});
|
|
9448
|
+
}
|
|
9401
9449
|
function scanExport(dir, opts) {
|
|
9402
9450
|
const hits = [];
|
|
9403
9451
|
for (const file of walk(dir)) {
|
|
@@ -9723,6 +9771,14 @@ async function hubExport(args, deps = {}) {
|
|
|
9723
9771
|
if (data.overlay?.state === "on") out(`[OVERLAY] on: ${data.overlay.count} plan(s) from PR branches`);
|
|
9724
9772
|
else if (data.overlay?.state === "off") out(`[OVERLAY] off: ${data.overlay.reason ?? "unknown"}`);
|
|
9725
9773
|
let deny = derivedDeny(first.value, machine);
|
|
9774
|
+
const dropPrivateDone = (page) => {
|
|
9775
|
+
const rows = page.done_plans ?? [];
|
|
9776
|
+
const kept = rows.filter((p2) => !isPrivateText(p2.path, deny) && !isPrivateText(p2.title, deny));
|
|
9777
|
+
if (kept.length === rows.length) return;
|
|
9778
|
+
page.done_plans = kept;
|
|
9779
|
+
out(`[DONE] ${rows.length - kept.length} done plan(s) left out: private words in the name`);
|
|
9780
|
+
};
|
|
9781
|
+
dropPrivateDone(data);
|
|
9726
9782
|
const scanOpts = () => ({
|
|
9727
9783
|
deny,
|
|
9728
9784
|
github: args.github ?? null,
|
|
@@ -9753,6 +9809,7 @@ async function hubExport(args, deps = {}) {
|
|
|
9753
9809
|
mainOnly.overlay = { state: "off", reason: "privacy hit in branch content", count: 0 };
|
|
9754
9810
|
deny = [.../* @__PURE__ */ new Set([...deny, ...derivedDeny(second.value, machine)])];
|
|
9755
9811
|
data = mainOnly;
|
|
9812
|
+
dropPrivateDone(data);
|
|
9756
9813
|
build(data);
|
|
9757
9814
|
hits = scanExport(staging, scanOpts());
|
|
9758
9815
|
}
|