@staff0rd/assist 0.902.0 → 0.904.0
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/README.md +1 -1
- package/claude/skills/review-ci/scripts/review.mjs +116 -116
- package/dist/commands/sessions/web/bundle.js +2 -2
- package/dist/index.js +36 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.904.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -879,6 +879,17 @@ var adviceFragmentNames = [
|
|
|
879
879
|
"verify"
|
|
880
880
|
];
|
|
881
881
|
|
|
882
|
+
// src/shared/defaultCriticalPaths.ts
|
|
883
|
+
var defaultCriticalPaths = [
|
|
884
|
+
"**/.github/workflows/**",
|
|
885
|
+
"**/.github/actions/**",
|
|
886
|
+
"**/package.json",
|
|
887
|
+
"**/Dockerfile",
|
|
888
|
+
"**/Dockerfile.*",
|
|
889
|
+
"**/*.Dockerfile",
|
|
890
|
+
"**/CLAUDE.md"
|
|
891
|
+
];
|
|
892
|
+
|
|
882
893
|
// src/shared/hotkeys/hotkeysSchema.ts
|
|
883
894
|
import { z } from "zod";
|
|
884
895
|
|
|
@@ -1163,7 +1174,7 @@ var assistConfigShape = {
|
|
|
1163
1174
|
review: z5.strictObject({
|
|
1164
1175
|
codexModel: z5.string().optional(),
|
|
1165
1176
|
highLevel: z5.strictObject({
|
|
1166
|
-
criticalPaths: z5.array(z5.string()).default(
|
|
1177
|
+
criticalPaths: z5.array(z5.string()).default(defaultCriticalPaths),
|
|
1167
1178
|
uiPaths: z5.array(z5.string()).default([]),
|
|
1168
1179
|
descriptionWordCap: z5.number().int().positive().default(300),
|
|
1169
1180
|
testPaths: z5.array(z5.string()).default(["**/*.{test,spec}.{ts,tsx,js,jsx}"]),
|
|
@@ -6217,7 +6228,7 @@ var reviewConfigHelp = [
|
|
|
6217
6228
|
{
|
|
6218
6229
|
key: "review.highLevel.criticalPaths",
|
|
6219
6230
|
setter: 'assist config set review.highLevel.criticalPaths "**/*.graphql,en-AU/translation.json"',
|
|
6220
|
-
note:
|
|
6231
|
+
note: `comma-separated globs whose full diffs the high-level review shows; a value replaces the default (${defaultCriticalPaths.join(",")})`
|
|
6221
6232
|
},
|
|
6222
6233
|
{
|
|
6223
6234
|
key: "review.highLevel.uiPaths",
|
|
@@ -35526,6 +35537,12 @@ async function configureConfigKeys(questions, options2 = {}) {
|
|
|
35526
35537
|
return { scope, target: result.target, written, skipped };
|
|
35527
35538
|
}
|
|
35528
35539
|
|
|
35540
|
+
// src/commands/config/isConfigKeySet.ts
|
|
35541
|
+
function isConfigKeySet(key, cwd = process.cwd()) {
|
|
35542
|
+
const layers = configEntryLayers(key, readRawConfigLayers(cwd), void 0);
|
|
35543
|
+
return Object.keys(layers).length > 0;
|
|
35544
|
+
}
|
|
35545
|
+
|
|
35529
35546
|
// src/commands/review/highLevel/highLevelConfigKeys.ts
|
|
35530
35547
|
var highLevelConfigKeys = {
|
|
35531
35548
|
criticalPaths: "review.highLevel.criticalPaths",
|
|
@@ -35540,7 +35557,10 @@ function buildHighLevelQuestions(current, proposed) {
|
|
|
35540
35557
|
{
|
|
35541
35558
|
key: highLevelConfigKeys.criticalPaths,
|
|
35542
35559
|
question: "Critical paths \u2014 comma-separated globs whose full diffs the review shows (blank to leave unset)",
|
|
35543
|
-
suggest:
|
|
35560
|
+
suggest: suggestCriticalPaths(
|
|
35561
|
+
current.criticalPaths,
|
|
35562
|
+
proposed.criticalPaths
|
|
35563
|
+
)
|
|
35544
35564
|
},
|
|
35545
35565
|
{
|
|
35546
35566
|
key: highLevelConfigKeys.uiPaths,
|
|
@@ -35559,6 +35579,10 @@ function buildHighLevelQuestions(current, proposed) {
|
|
|
35559
35579
|
}
|
|
35560
35580
|
];
|
|
35561
35581
|
}
|
|
35582
|
+
function suggestCriticalPaths(current, proposed) {
|
|
35583
|
+
if (current) return suggestGlobs(current, []);
|
|
35584
|
+
return [.../* @__PURE__ */ new Set([...defaultCriticalPaths, ...proposed])].join(",");
|
|
35585
|
+
}
|
|
35562
35586
|
function suggestGlobs(current, proposed) {
|
|
35563
35587
|
const globs = current.length > 0 ? current : proposed;
|
|
35564
35588
|
return globs.length > 0 ? globs.join(",") : void 0;
|
|
@@ -35597,6 +35621,7 @@ function buildGlobProposalPrompt(tree) {
|
|
|
35597
35621
|
"You are proposing configuration for a high-level PR review checklist in a repository.",
|
|
35598
35622
|
"",
|
|
35599
35623
|
"criticalPaths: globs matching files where a wrong line is expensive and an LLM reviewer cannot judge it \u2014 schema and API definitions, translation catalogues, database migrations, infrastructure and deployment definitions, dependency and permission manifests. Their full diffs are shown to the human reviewer, so keep the set small.",
|
|
35624
|
+
`These criticalPaths defaults are already included, so propose only this repository's own additions and never repeat them: ${defaultCriticalPaths.join(", ")}`,
|
|
35600
35625
|
"uiPaths: globs matching the files that render the user interface, so that touching one requires a screenshot or video on the PR. Exclude tests and stories.",
|
|
35601
35626
|
"",
|
|
35602
35627
|
"Below is every tracked directory in this repository with the extensions of the files in it. Propose globs that match this repository's own files \u2014 never generic guesses at files it does not have.",
|
|
@@ -35715,7 +35740,7 @@ var DEFAULT_COLLAPSED_PATHS = ["**/*.test.*", "**/generated/**"];
|
|
|
35715
35740
|
function resolveHighLevelConfig(config) {
|
|
35716
35741
|
const highLevel = config.review?.highLevel;
|
|
35717
35742
|
return {
|
|
35718
|
-
criticalPaths: highLevel?.criticalPaths ??
|
|
35743
|
+
criticalPaths: highLevel?.criticalPaths ?? defaultCriticalPaths,
|
|
35719
35744
|
uiPaths: highLevel?.uiPaths ?? [],
|
|
35720
35745
|
descriptionWordCap: highLevel?.descriptionWordCap ?? DEFAULT_DESCRIPTION_WORD_CAP,
|
|
35721
35746
|
testPaths: highLevel?.testPaths ?? DEFAULT_TEST_PATHS,
|
|
@@ -35728,8 +35753,12 @@ var NOTHING_PROPOSED2 = { criticalPaths: [], uiPaths: [] };
|
|
|
35728
35753
|
async function configureHighLevelReview(options2 = {}) {
|
|
35729
35754
|
const answers = parseConfigureAnswers(options2.answer ?? []);
|
|
35730
35755
|
const proposed = answersCoverEveryKey(answers) ? NOTHING_PROPOSED2 : proposeHighLevelGlobs();
|
|
35756
|
+
const current = resolveHighLevelConfig(loadConfig());
|
|
35731
35757
|
const questions = buildHighLevelQuestions(
|
|
35732
|
-
|
|
35758
|
+
{
|
|
35759
|
+
...current,
|
|
35760
|
+
criticalPaths: isConfigKeySet(highLevelConfigKeys.criticalPaths) ? current.criticalPaths : void 0
|
|
35761
|
+
},
|
|
35733
35762
|
proposed
|
|
35734
35763
|
);
|
|
35735
35764
|
const scope = asConfigKeyScope(options2.scope);
|
|
@@ -36887,7 +36916,7 @@ function formatDiff(diff3) {
|
|
|
36887
36916
|
function formatCriticalDiffs(diffs, criticalPaths) {
|
|
36888
36917
|
if (criticalPaths.length === 0)
|
|
36889
36918
|
return `${chalk237.bold.underline("Critical diffs")}
|
|
36890
|
-
${chalk237.dim("review.highLevel.criticalPaths is
|
|
36919
|
+
${chalk237.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
|
|
36891
36920
|
if (diffs.length === 0)
|
|
36892
36921
|
return `${chalk237.bold.underline("Critical diffs")}
|
|
36893
36922
|
${chalk237.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
|