@bbcsoftwarefactory/cli 1.1.2 → 1.1.4
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/dist/bbc-install.d.ts +2 -1
- package/dist/bbc-install.js +93 -28
- package/dist/bbc.js +4 -1
- package/dist/bundle/commands/daily/SKILL.md +112 -0
- package/dist/bundle/commands/daily/adapters/command.md +17 -0
- package/dist/bundle/commands/daily/adapters/gemini.toml +17 -0
- package/dist/bundle/commands/issue-clean-and-close/SKILL.md +85 -0
- package/dist/bundle/commands/issue-clean-and-close/adapters/command.md +17 -0
- package/dist/bundle/commands/issue-clean-and-close/adapters/gemini.toml +17 -0
- package/dist/bundle/commands/issue-clean-and-close/references/policy.md +87 -0
- package/dist/bundle/commands/recap/SKILL.md +84 -0
- package/dist/bundle/commands/recap/adapters/command.md +17 -0
- package/dist/bundle/commands/recap/adapters/gemini.toml +17 -0
- package/dist/bundle/installer/clients.json +103 -0
- package/dist/bundle/skills/code-quality-gate/SKILL.md +58 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-bigo.md +31 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-earlyreturn.md +73 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-typesafe.md +32 -0
- package/dist/bundle/skills/code-quality-gate/references/output-schema.yml +40 -0
- package/dist/bundle/skills/delivery-coordinator/SKILL.md +80 -0
- package/dist/bundle/skills/delivery-coordinator/references/hud-output.md +55 -0
- package/dist/bundle/skills/delivery-coordinator/references/intake.md +86 -0
- package/dist/bundle/skills/delivery-coordinator/references/issue-claim.md +143 -0
- package/dist/bundle/skills/delivery-coordinator/references/issue-dedup.md +38 -0
- package/dist/bundle/skills/delivery-coordinator/references/sleuth-regression-exercise.md +60 -0
- package/dist/bundle/skills/delivery-coordinator/references/visual-reference.md +45 -0
- package/dist/bundle/skills/delivery-coordinator/references/worktree-isolation.md +19 -0
- package/dist/bundle/skills/documentation-steward/SKILL.md +43 -0
- package/dist/bundle/skills/documentation-steward/references/discovery.md +17 -0
- package/dist/bundle/skills/documentation-steward/references/handoff.md +15 -0
- package/dist/bundle/skills/greptile-review-loop/SKILL.md +56 -0
- package/dist/bundle/skills/greptile-review-loop/references/review-protocol.md +37 -0
- package/dist/bundle/skills/issue-reviewer/SKILL.md +84 -0
- package/dist/bundle/skills/issue-reviewer/references/review-format.md +100 -0
- package/dist/bundle/skills/issue-reviewer/references/triage.md +105 -0
- package/dist/bundle/skills/question-gate/SKILL.md +64 -0
- package/dist/bundle/skills/question-gate/references/client-hooks.md +111 -0
- package/dist/bundle/skills/question-gate/references/diagram-routing.md +58 -0
- package/dist/bundle/skills/question-gate/tests/fixtures/question-corpus.json +481 -0
- package/dist/bundle/skills/regression-testing/SKILL.md +49 -0
- package/dist/bundle/skills/regression-testing/references/evidence-record.md +35 -0
- package/dist/bundle/skills/requirements-spec/SKILL.md +59 -0
- package/dist/bundle/skills/risk-scout/SKILL.md +53 -0
- package/dist/bundle/skills/risk-scout/references/risk-matrix.md +49 -0
- package/dist/bundle/skills/skill-clean-architecture/SKILL.md +53 -0
- package/dist/bundle/skills/skill-clean-architecture/references/layer-rules.md +22 -0
- package/dist/bundle/skills/skill-clean-architecture/references/source-headers.md +30 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/bad-utf8.js +1 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/edge-crlf.ts +6 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/edge-mixed.ts +15 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/empty.js +0 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/no-newline.js +1 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo.expected.yml +95 -0
- package/dist/bundle/skills/tool-depot/SKILL.md +47 -0
- package/dist/bundle/skills/tool-depot/references/checkout.md +29 -0
- package/dist/bundle/skills/tool-depot/references/loki-read.md +41 -0
- package/dist/bundle/skills/tool-depot/references/readonly-access.md +84 -0
- package/dist/bundle/skills/tool-depot/references/tool-catalog.json +47 -0
- package/dist/bundle/skills/tool-depot/scripts/loki-runtime-logs.py +305 -0
- package/dist/bundle/skills/tool-depot/tests/loki-runtime-logs.test.sh +101 -0
- package/dist/bundle/skills/watcher-observability/SKILL.md +72 -0
- package/dist/bundle/skills/watcher-observability/references/batch-protocol.md +44 -0
- package/dist/bundle/skills/watcher-observability/references/configuration.md +31 -0
- package/dist/bundle/skills/watcher-observability/references/error-scan.md +102 -0
- package/dist/bundle/skills/watcher-observability/references/live-protocol.md +49 -0
- package/dist/bundle/skills/watcher-observability/references/server-account.md +72 -0
- package/dist/bundle/skills/watcher-observability/server/watcher-gate.sh +51 -0
- package/dist/bundle/skills/watcher-observability/tests/watcher-gate.test.sh +113 -0
- package/dist/bundle/skills/watcher-observability/watcher.json +1 -0
- package/dist/bundle/skills/workflow-auditor/SKILL.md +53 -0
- package/dist/bundle/skills/workflow-auditor/references/audit-protocol.md +49 -0
- package/dist/bundle/skills/workflow-auditor/references/ledger.md +122 -0
- package/package.json +3 -3
package/dist/bbc-install.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare const bbcInstallUsage = "bbc bbc-install <doctor|detect|install|verify|uninstall> [options]";
|
|
1
|
+
export declare const bbcInstallUsage = "bbc bbc-install <doctor|detect|install|verify|uninstall|auto> [options]";
|
|
2
|
+
export declare const bbcAutoUsage = "bbc auto [--force] [--global] [--project <dir>] [--client <ids>|all-detected] [--dry-run]";
|
|
2
3
|
export declare function bbcInstall(argv: readonly string[]): number;
|
package/dist/bbc-install.js
CHANGED
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
* GOAL: Install, verify, and cleanly uninstall the skill/command collection across supported coding agents.
|
|
8
8
|
*/
|
|
9
9
|
import { createHash } from 'node:crypto';
|
|
10
|
-
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync, } from 'node:fs';
|
|
10
|
+
import { copyFileSync, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync, } from 'node:fs';
|
|
11
11
|
import { homedir } from 'node:os';
|
|
12
12
|
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { runExecutable, splitCommandWords, whichCommand } from "./wave4/process.js";
|
|
15
|
-
export const bbcInstallUsage = 'bbc bbc-install <doctor|detect|install|verify|uninstall> [options]';
|
|
15
|
+
export const bbcInstallUsage = 'bbc bbc-install <doctor|detect|install|verify|uninstall|auto> [options]';
|
|
16
|
+
export const bbcAutoUsage = 'bbc auto [--force] [--global] [--project <dir>] [--client <ids>|all-detected] [--dry-run]';
|
|
16
17
|
const DEFAULT_SOURCE = fileURLToPath(new URL('../../..', import.meta.url));
|
|
18
|
+
const DEFAULT_BUNDLE = fileURLToPath(new URL('./bundle', import.meta.url));
|
|
17
19
|
const STATE_DIR = '.bbc-install';
|
|
18
20
|
const GATE = 'question-gate';
|
|
19
21
|
const HOOK_MARK = 'triage-question';
|
|
@@ -92,24 +94,57 @@ function expandHomePath(raw) {
|
|
|
92
94
|
return join(home, raw.slice(2));
|
|
93
95
|
return raw;
|
|
94
96
|
}
|
|
97
|
+
function hasLocalCheckout(dir) {
|
|
98
|
+
return existsSync(join(dir, 'skills')) && existsSync(join(dir, 'installer', 'clients.json'));
|
|
99
|
+
}
|
|
95
100
|
class InstallTarget {
|
|
96
101
|
home;
|
|
97
102
|
scope;
|
|
98
103
|
root;
|
|
99
104
|
source;
|
|
105
|
+
bundled;
|
|
100
106
|
cliRunner;
|
|
101
107
|
constructor(args) {
|
|
102
108
|
this.home = args.home ? resolve(expandHomePath(args.home)) : resolve(process.env.HOME || homedir());
|
|
103
109
|
this.scope = args.globalScope ? 'global' : 'project';
|
|
104
110
|
const projectDir = resolve(args.project || process.cwd());
|
|
105
111
|
this.root = this.scope === 'global' ? this.home : projectDir;
|
|
106
|
-
|
|
112
|
+
if (args.source) {
|
|
113
|
+
this.source = resolve(args.source);
|
|
114
|
+
this.bundled = false;
|
|
115
|
+
}
|
|
116
|
+
else if (hasLocalCheckout(DEFAULT_SOURCE)) {
|
|
117
|
+
this.source = resolve(DEFAULT_SOURCE);
|
|
118
|
+
this.bundled = false;
|
|
119
|
+
}
|
|
120
|
+
else if (hasLocalCheckout(DEFAULT_BUNDLE)) {
|
|
121
|
+
this.source = resolve(DEFAULT_BUNDLE);
|
|
122
|
+
this.bundled = true;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.source = resolve(DEFAULT_SOURCE);
|
|
126
|
+
this.bundled = false;
|
|
127
|
+
}
|
|
107
128
|
this.cliRunner = args.cliRunner || DEFAULT_CLI;
|
|
108
129
|
}
|
|
109
130
|
rel(targetPath) {
|
|
110
131
|
return toPosix(relative(this.root, targetPath));
|
|
111
132
|
}
|
|
112
133
|
}
|
|
134
|
+
function pathStatOrNull(filePath) {
|
|
135
|
+
try {
|
|
136
|
+
const info = lstatSync(filePath);
|
|
137
|
+
if (info.isSymbolicLink())
|
|
138
|
+
return { isDirectory: false, isSymlink: true };
|
|
139
|
+
return { isDirectory: info.isDirectory(), isSymlink: false };
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function isLegacyHookEntry(entry) {
|
|
146
|
+
return JSON.stringify(entry).includes('triage-question.py');
|
|
147
|
+
}
|
|
113
148
|
function isPlainObject(value) {
|
|
114
149
|
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
115
150
|
}
|
|
@@ -118,11 +153,18 @@ function isSubPath(parent, candidate) {
|
|
|
118
153
|
return candidate.startsWith(prefix);
|
|
119
154
|
}
|
|
120
155
|
function loadClients(sourceRoot) {
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
156
|
+
const candidates = [
|
|
157
|
+
join(sourceRoot, 'installer', 'clients.json'),
|
|
158
|
+
join(DEFAULT_BUNDLE, 'installer', 'clients.json'),
|
|
159
|
+
join(DEFAULT_SOURCE, 'installer', 'clients.json'),
|
|
160
|
+
];
|
|
161
|
+
for (const filePath of candidates) {
|
|
162
|
+
if (existsSync(filePath)) {
|
|
163
|
+
const parsed = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
164
|
+
return parsed.clients;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
throw new UsageError('clients.json catalog not found; pass --source <clone of this collection>');
|
|
126
168
|
}
|
|
127
169
|
function discoverBundles(source) {
|
|
128
170
|
const found = new Map();
|
|
@@ -468,12 +510,19 @@ function planCopy(target, plan, manifest, force, src, rel, clientId, kind) {
|
|
|
468
510
|
owned: record !== undefined,
|
|
469
511
|
mode: 'create',
|
|
470
512
|
};
|
|
471
|
-
|
|
513
|
+
const existing = pathStatOrNull(dst);
|
|
514
|
+
if (existing === null) {
|
|
472
515
|
action.mode = 'create';
|
|
473
516
|
}
|
|
474
|
-
else if (
|
|
475
|
-
|
|
476
|
-
|
|
517
|
+
else if (existing.isDirectory !== (kind === 'dir')) {
|
|
518
|
+
if (force) {
|
|
519
|
+
action.mode = 'replace';
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
plan.conflicts.push(`${rel} exists but is not a ${kind === 'dir' ? 'folder' : 'file'}. Review it, then rerun with --force ` +
|
|
523
|
+
`(the current copy is backed up under ${STATE_DIR}/backups/)`);
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
477
526
|
}
|
|
478
527
|
else {
|
|
479
528
|
const current = treeDigest(dst);
|
|
@@ -509,7 +558,7 @@ function hookEntries(doc, event) {
|
|
|
509
558
|
return [];
|
|
510
559
|
return Array.isArray(eventList) ? eventList : null;
|
|
511
560
|
}
|
|
512
|
-
function planHook(target, plan, manifest, client) {
|
|
561
|
+
function planHook(target, plan, manifest, client, force) {
|
|
513
562
|
const spec = client.hook;
|
|
514
563
|
const rel = spec.file[target.scope];
|
|
515
564
|
const filePath = join(target.root, rel);
|
|
@@ -528,6 +577,7 @@ function planHook(target, plan, manifest, client) {
|
|
|
528
577
|
return;
|
|
529
578
|
}
|
|
530
579
|
const present = entries.some((entry) => JSON.stringify(entry).includes(HOOK_MARK));
|
|
580
|
+
const upgradeLegacy = present && force && entries.some(isLegacyHookEntry);
|
|
531
581
|
plan.add(rel, {
|
|
532
582
|
type: 'hook',
|
|
533
583
|
path: rel,
|
|
@@ -535,7 +585,7 @@ function planHook(target, plan, manifest, client) {
|
|
|
535
585
|
root: spec.root,
|
|
536
586
|
entry: fillCommandTemplate(spec.entry, hookCommand(target, client)),
|
|
537
587
|
clients: [client.id],
|
|
538
|
-
mode: present ? 'present' : 'add',
|
|
588
|
+
mode: upgradeLegacy ? 'replace' : present ? 'present' : 'add',
|
|
539
589
|
created: !existsSync(filePath),
|
|
540
590
|
owned: findEntry(manifest, 'hook', rel) !== undefined,
|
|
541
591
|
});
|
|
@@ -585,7 +635,7 @@ function buildInstallPlan(target, clients, names, found, manifest, force) {
|
|
|
585
635
|
}
|
|
586
636
|
}
|
|
587
637
|
if (names.includes(GATE) && client.hook) {
|
|
588
|
-
planHook(target, plan, manifest, client);
|
|
638
|
+
planHook(target, plan, manifest, client, force);
|
|
589
639
|
}
|
|
590
640
|
if (names.includes(GATE) && client.agents_md && target.scope === 'project') {
|
|
591
641
|
planAgents(target, plan, manifest, client);
|
|
@@ -678,7 +728,8 @@ function applyHook(target, manifest, backups, action) {
|
|
|
678
728
|
const hooksObj = isPlainObject(doc.hooks) ? doc.hooks : {};
|
|
679
729
|
doc.hooks = hooksObj;
|
|
680
730
|
const eventName = action.event;
|
|
681
|
-
const
|
|
731
|
+
const existingList = Array.isArray(hooksObj[eventName]) ? hooksObj[eventName] : [];
|
|
732
|
+
const list = action.mode === 'replace' ? existingList.filter((entry) => !isLegacyHookEntry(entry)) : existingList;
|
|
682
733
|
list.push(action.entry);
|
|
683
734
|
hooksObj[eventName] = list;
|
|
684
735
|
writeJsonAtomic(filePath, doc);
|
|
@@ -741,7 +792,8 @@ function finishInstall(args, target, plan, report, code) {
|
|
|
741
792
|
}
|
|
742
793
|
const scope = target.scope === 'global' ? '--global' : `--project "${toPosix(target.root)}"`;
|
|
743
794
|
const clientIds = Array.isArray(report.clients) ? report.clients.join(',') : '';
|
|
744
|
-
|
|
795
|
+
const verifyCmd = target.bundled ? `${target.cliRunner} bbc-install` : 'bbc-install';
|
|
796
|
+
process.stdout.write(`${MARK.ok} installed. Check it with: ${verifyCmd} verify --client ${clientIds} ${scope}\n`);
|
|
745
797
|
return code;
|
|
746
798
|
}
|
|
747
799
|
function runInstall(args) {
|
|
@@ -902,12 +954,12 @@ function checkTriage(target, skillsDir, out) {
|
|
|
902
954
|
if (!existsSync(join(target.root, skillsDir, GATE, 'SKILL.md')))
|
|
903
955
|
return;
|
|
904
956
|
const sourceCli = join(target.source, 'packages', 'cli', 'src', 'bbc.ts');
|
|
905
|
-
const
|
|
957
|
+
const selfCliJs = fileURLToPath(new URL('./bbc.js', import.meta.url));
|
|
958
|
+
const selfCliTs = fileURLToPath(new URL('./bbc.ts', import.meta.url));
|
|
959
|
+
const selfCli = existsSync(selfCliJs) ? selfCliJs : existsSync(selfCliTs) ? selfCliTs : null;
|
|
906
960
|
const localCli = existsSync(sourceCli) && existsSync(join(target.source, 'node_modules'))
|
|
907
961
|
? sourceCli
|
|
908
|
-
:
|
|
909
|
-
? selfCli
|
|
910
|
-
: null;
|
|
962
|
+
: selfCli;
|
|
911
963
|
const argv = localCli
|
|
912
964
|
? [process.execPath, localCli, 'triage-question', '--question', TRIAGE_PROBE]
|
|
913
965
|
: ['bbc', 'triage-question', '--question', TRIAGE_PROBE];
|
|
@@ -1143,7 +1195,17 @@ function runUninstall(args) {
|
|
|
1143
1195
|
}
|
|
1144
1196
|
return failed ? 1 : 0;
|
|
1145
1197
|
}
|
|
1146
|
-
|
|
1198
|
+
function runAuto(args) {
|
|
1199
|
+
const doctorCode = runDoctor({ ...args, action: 'doctor' });
|
|
1200
|
+
if (doctorCode !== 0)
|
|
1201
|
+
return doctorCode;
|
|
1202
|
+
const client = args.client ?? 'all-detected';
|
|
1203
|
+
const installCode = runInstall({ ...args, action: 'install', client });
|
|
1204
|
+
if (installCode !== 0 || args.dryRun)
|
|
1205
|
+
return installCode;
|
|
1206
|
+
return runVerify({ ...args, action: 'verify', client });
|
|
1207
|
+
}
|
|
1208
|
+
const HELP_TEXT = 'usage: bbc bbc-install [-h] {doctor,detect,install,verify,uninstall,auto} ...\n\n' +
|
|
1147
1209
|
'Install this collection into coding agents.\n';
|
|
1148
1210
|
function parseInstallArgs(argv) {
|
|
1149
1211
|
if (argv.includes('--help') || argv.includes('-h')) {
|
|
@@ -1154,15 +1216,16 @@ function parseInstallArgs(argv) {
|
|
|
1154
1216
|
rawAction !== 'detect' &&
|
|
1155
1217
|
rawAction !== 'install' &&
|
|
1156
1218
|
rawAction !== 'verify' &&
|
|
1157
|
-
rawAction !== 'uninstall'
|
|
1158
|
-
|
|
1219
|
+
rawAction !== 'uninstall' &&
|
|
1220
|
+
rawAction !== 'auto') {
|
|
1221
|
+
throw new UsageError(rawAction ? `invalid choice: '${rawAction}' (choose from doctor, detect, install, verify, uninstall, auto)` : 'missing subcommand');
|
|
1159
1222
|
}
|
|
1160
|
-
const allowedFlags = new Set(['--home', '--project', '--source', '--json']);
|
|
1161
|
-
const allowedBools = new Set(['--json']);
|
|
1223
|
+
const allowedFlags = new Set(['--home', '--project', '--source', ...(rawAction === 'auto' ? [] : ['--json'])]);
|
|
1224
|
+
const allowedBools = new Set(rawAction === 'auto' ? [] : ['--json']);
|
|
1162
1225
|
if (rawAction === 'doctor') {
|
|
1163
1226
|
allowedFlags.add('--cli');
|
|
1164
1227
|
}
|
|
1165
|
-
else if (rawAction === 'install' || rawAction === 'verify' || rawAction === 'uninstall') {
|
|
1228
|
+
else if (rawAction === 'install' || rawAction === 'verify' || rawAction === 'uninstall' || rawAction === 'auto') {
|
|
1166
1229
|
allowedFlags.add('--client');
|
|
1167
1230
|
allowedFlags.add('--global');
|
|
1168
1231
|
allowedBools.add('--global');
|
|
@@ -1176,7 +1239,7 @@ function parseInstallArgs(argv) {
|
|
|
1176
1239
|
allowedBools.add('--dry-run');
|
|
1177
1240
|
allowedBools.add('--force');
|
|
1178
1241
|
}
|
|
1179
|
-
if (rawAction === 'install') {
|
|
1242
|
+
if (rawAction === 'install' || rawAction === 'auto') {
|
|
1180
1243
|
allowedFlags.add('--cli');
|
|
1181
1244
|
}
|
|
1182
1245
|
}
|
|
@@ -1236,6 +1299,8 @@ export function bbcInstall(argv) {
|
|
|
1236
1299
|
return runInstall(args);
|
|
1237
1300
|
if (args.action === 'verify')
|
|
1238
1301
|
return runVerify(args);
|
|
1302
|
+
if (args.action === 'auto')
|
|
1303
|
+
return runAuto(args);
|
|
1239
1304
|
return runUninstall(args);
|
|
1240
1305
|
}
|
|
1241
1306
|
catch (error) {
|
package/dist/bbc.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* GOAL: Translate command-line arguments into process output and exit status.
|
|
9
9
|
*/
|
|
10
10
|
import { auditLedger, auditLedgerUsage } from "./audit-ledger.js";
|
|
11
|
-
import { bbcInstall, bbcInstallUsage } from "./bbc-install.js";
|
|
11
|
+
import { bbcAutoUsage, bbcInstall, bbcInstallUsage } from "./bbc-install.js";
|
|
12
12
|
import { checkIssueClaim, checkIssueClaimUsage } from "./check-issue-claim.js";
|
|
13
13
|
import { checkWorktreeGuard, checkWorktreeGuardUsage } from "./check-worktree-guard.js";
|
|
14
14
|
import { classifyChangeLane, classifyChangeLaneUsage } from "./classify-change-lane.js";
|
|
@@ -66,6 +66,7 @@ async function main([command, ...args]) {
|
|
|
66
66
|
` ${sweepGithubUsage}\n` +
|
|
67
67
|
` ${recapUsage}\n` +
|
|
68
68
|
` ${bbcInstallUsage}\n` +
|
|
69
|
+
` ${bbcAutoUsage}\n` +
|
|
69
70
|
` ${listZedCommandsUsage}\n` +
|
|
70
71
|
` ${exportPublicUsage}\n`);
|
|
71
72
|
return 0;
|
|
@@ -114,6 +115,8 @@ async function main([command, ...args]) {
|
|
|
114
115
|
return recap(args);
|
|
115
116
|
if (command === 'bbc-install')
|
|
116
117
|
return bbcInstall(args);
|
|
118
|
+
if (command === 'auto' || command === '--auto')
|
|
119
|
+
return bbcInstall(['auto', ...args]);
|
|
117
120
|
if (command === 'list-zed-commands')
|
|
118
121
|
return listZedCommands(args);
|
|
119
122
|
if (command === 'export-public')
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: daily
|
|
3
|
+
description: "Trigger: /daily, daily, refresh, qué tenemos para hoy, dónde quedamos, revisar issues y PRs, seguimiento de backlog. Daily refresh: fetch origin, see where we left off, triage open GitHub issues, and audit open PRs for CI checks and merge conflicts."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
metadata:
|
|
7
|
+
author: bbc-skill-internals
|
|
8
|
+
version: "1.4"
|
|
9
|
+
pre_hook: "gh auth status && git fetch origin --prune; tool-depot (github-read / github-write)"
|
|
10
|
+
post_hook: "question-gate (bbc triage-question) + Quest-Tree HUD"
|
|
11
|
+
post_install: "npx --full-depth; copy adapters/gemini.toml + /commands reload (Gemini); server restart (Zed ACP)"
|
|
12
|
+
adapters: "adapters/command.md, adapters/gemini.toml"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Activation Contract
|
|
16
|
+
|
|
17
|
+
Run only when a person explicitly invokes `/daily` (or asks to run `daily` as a refresh/standup check). It audits issues and PRs, **drafts** follow-up comments, and posts only the comments the person approves at the closing `🟡 BOSS GATE`.
|
|
18
|
+
|
|
19
|
+
Optional arguments:
|
|
20
|
+
- `--dry-run`: Audit and render the daily HUD report without drafting or posting any GitHub comments.
|
|
21
|
+
- `#<number>` (or `<number>`): Prioritize or filter the issue/PR triage to that specific number.
|
|
22
|
+
|
|
23
|
+
Granted authority upon explicit `/daily` invocation:
|
|
24
|
+
- `A1` (Read-only repo & GitHub): `git remote`, `git fetch`, read-only code search, and GitHub reads through `gh api` (REST) under Tool Depot `github-read` (`read-approved-issue-or-pr`, `read-pr-review-and-checks`). Use REST, not `gh issue` / `gh pr`: those subcommands use GraphQL, which some hosts (for example Claude Code cloud sessions) refuse. Never edit files or switch branches in the main checkout.
|
|
25
|
+
- `A2` (Issue follow-up comments): Draft at most 1 useful comment per open issue, with an anti-duplicate guard when the latest comment is already a recent `daily` check with no new human or PR activity. Invoking `/daily` does **not** authorize posting: the Tool Depot catalog requires authorization for the exact target. List every draft (issue number + text) in the `🟡 BOSS GATE` and post only the approved ones, each as `github-write` / `comment-approved-issue` recorded in the delivery ledger when one exists, and each following the [visual reference rule](../../skills/delivery-coordinator/references/visual-reference.md) (an image, or a `🟡 GAP visual` line).
|
|
26
|
+
|
|
27
|
+
## Hard Rules
|
|
28
|
+
|
|
29
|
+
- Never close or edit issues (`gh issue close`, `gh issue edit`), never push or merge PRs, and never modify files in the main checkout without explicit human approval at the closing `🟡 BOSS GATE`.
|
|
30
|
+
- If `tool-depot`, `issue-reviewer`, `question-gate`, or `delivery-coordinator` are present in the active project or user skills directory, follow their contracts; never assume unverified companions or hardcode user-specific machine paths.
|
|
31
|
+
- Check `gh auth status` first. If `gh` is missing or unauthenticated, stop and report the blocker.
|
|
32
|
+
- Match each issue comment to the issue's language (`es` / `en` / `pt`), and match the final chat HUD to the user's language.
|
|
33
|
+
- Never guess the contents of unreadable attachments or claim an issue is resolved without verified evidence (merged PR + commit on `origin/<default-branch>` + code verification).
|
|
34
|
+
|
|
35
|
+
## Decision Gates
|
|
36
|
+
|
|
37
|
+
| Situation | Action |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `--dry-run` passed | Run all read-only checks and render HUD; draft and post no comments |
|
|
40
|
+
| Issue has image/file attachments and `@bbcsoftwarefactory/cli` (`fetch-issue-attachments`) is available | Download and visually inspect attachments before classifying the issue |
|
|
41
|
+
| Issue is already fixed (merged PR + commit on `origin/<default-branch>` + verified in code) | Draft a comment with PR link, merge commit, and verified code location (unless `--dry-run`); queue it and the close candidate in `🟡 BOSS GATE` |
|
|
42
|
+
| Issue is open and latest comment is already an unchanged `daily` (or legacy `allio`) follow-up | Skip commenting (`⚪ Sin cambios` / `unchanged`) to avoid duplicate noise |
|
|
43
|
+
| Issue is open and unresolved (pending / in-progress PR / blocked) | Draft 1 concrete follow-up comment (unless `--dry-run`) stating observed state, what was checked, and next recommended step; queue it in `🟡 BOSS GATE` |
|
|
44
|
+
| Claim status `duplicate-work` (`CL11`: several open PRs for one issue) | `🔴 Duplicate work`: list the PRs and their authors; queue in `🟡 BOSS GATE` for the Tech Lead to keep one. Never close a PR. |
|
|
45
|
+
| Claim status `stale-claim` (`CL12`) or `orphan-claim` (`CL6`) | `🟡 Stale claim`: draft 1 comment asking the holder whether the work continues (unless `--dry-run`); queue it and a release proposal in `🟡 BOSS GATE`. Never unassign anyone. |
|
|
46
|
+
| PR `mergeable` is `null` (GitHub still computing) | Wait 2–3 seconds and re-query `gh api repos/<owner>/<repo>/pulls/<pr>` once |
|
|
47
|
+
| PR has conflicts (`CONFLICTING` / `DIRTY`) | Diagnose exact conflicting files without touching main checkout (`git merge-tree --write-tree` or temporary detached worktree), report files, and offer resolution in `🟡 BOSS GATE` |
|
|
48
|
+
|
|
49
|
+
## Execution Steps
|
|
50
|
+
|
|
51
|
+
1. **Identify repo and fetch origin**
|
|
52
|
+
- Run `git rev-parse --show-toplevel`, `git remote -v`, and `git ls-remote --symref origin HEAD` to detect `<owner>/<repo>` and `<default-branch>`.
|
|
53
|
+
- Verify `gh auth status`, then run `git fetch origin --prune`.
|
|
54
|
+
|
|
55
|
+
2. **Audit open issues**
|
|
56
|
+
- Run `gh api "repos/<owner>/<repo>/issues?state=open&per_page=50" --jq '[.[] | select(.pull_request == null)]'` (the endpoint also returns PRs; the filter drops them). Filter by `#<n>` if provided. If empty, record `🟢 0 open issues` and continue to step 3.
|
|
57
|
+
- For each open issue:
|
|
58
|
+
- Read body and comments via `gh api -H "Accept: application/vnd.github.full+json" repos/<owner>/<repo>/issues/<n>` and `gh api repos/<owner>/<repo>/issues/<n>/comments`.
|
|
59
|
+
- If attachments exist and `issue-reviewer` is available, run `npx -y @bbcsoftwarefactory/cli fetch-issue-attachments --repo <owner/repo> --issue <n>` and inspect them before judging status.
|
|
60
|
+
- Cross-check related PRs (`gh api -X GET search/issues -f q='repo:<owner>/<repo> is:pr <terms>'`), commits on `origin/<default-branch>` (`git log origin/<default-branch> --oneline -n 50 --grep="..."`), and current code (`rg` / file read).
|
|
61
|
+
- Classify as resolved (Case A) or pending/in-progress/blocked (Case B) and apply the Decision Gates above.
|
|
62
|
+
- Check who holds it with the [claim rules](../../skills/delivery-coordinator/references/issue-claim.md), when `delivery-coordinator` is installed: save the issue (`gh api repos/<owner>/<repo>/issues/<n>`), and once per run the open PRs (`gh api --paginate --slurp "repos/<owner>/<repo>/pulls?state=open&per_page=100"`) and claim branches (`git ls-remote --heads origin "feat/*"`), then run `npx -y @bbcsoftwarefactory/cli check-issue-claim --phase status --issue-json <issue> --pulls-json <pulls> --branches <branches> --repo <owner>/<repo>`. Report `claimed` with the holder, and apply the claim rows above for `duplicate-work`, `stale-claim`, or `orphan-claim`.
|
|
63
|
+
|
|
64
|
+
3. **Audit open PRs (CI checks & conflicts)**
|
|
65
|
+
- Run `gh api "repos/<owner>/<repo>/pulls?state=open&per_page=50"`.
|
|
66
|
+
- For each open PR, run `gh api repos/<owner>/<repo>/pulls/<pr>` (`mergeable`, `mergeable_state`, `draft`, `head.sha`, `base.ref`), `gh api "repos/<owner>/<repo>/commits/<head.sha>/check-runs?per_page=100"` (`name`, `status`, `conclusion`), and `gh api repos/<owner>/<repo>/pulls/<pr>/reviews` for the review state.
|
|
67
|
+
- Classify each PR:
|
|
68
|
+
- `🟢 Green`: `mergeable: true` / `mergeable_state: clean`, every check run `conclusion: success` (or `skipped`/`neutral`), not draft (note if a review is still required or if duplicate/stacked PRs exist).
|
|
69
|
+
- `🟡 Pending / Draft`: a check run with `status` other than `completed`, or `draft: true`.
|
|
70
|
+
- `🔴 Failing CI`: list failed check names and observable causes/links.
|
|
71
|
+
- `🔴 Conflicts` (`mergeable: false` / `mergeable_state: dirty`): fetch `pull/<pr>/head:refs/remotes/origin/pr/<pr>` and run `git merge-tree --write-tree origin/<base.ref> refs/remotes/origin/pr/<pr>` (or use a temporary detached worktree to run `git merge --no-commit --no-ff`, list `git diff --name-only --diff-filter=U`, abort, and remove the temporary worktree).
|
|
72
|
+
|
|
73
|
+
4. **Gate & report**
|
|
74
|
+
- If `question-gate` (`bbc triage-question`) is installed and any human decision remains (comment drafts to post, conflicted PRs, resolved issues ready to close, or green PRs ready to merge), validate the closing prompt before replying.
|
|
75
|
+
- List each comment draft in the `🟡 BOSS GATE` as `#<n>: <first line of the draft>`, so the person approves exact targets (all, some by number, or none).
|
|
76
|
+
|
|
77
|
+
5. **Post approved comments** (only after the person answers the gate)
|
|
78
|
+
- For each approved issue, request `github-write` / `comment-approved-issue` from Tool Depot for that exact issue, then post with `gh api -X POST repos/<owner>/<repo>/issues/<n>/comments -F body=@<draft-file>`. Record the request and the use, with its `visual`, in the delivery ledger when one exists.
|
|
79
|
+
- Never post a draft that was not approved, and never widen an approval to issues that were not listed.
|
|
80
|
+
|
|
81
|
+
## Output Contract
|
|
82
|
+
|
|
83
|
+
Render a compact **Quest-Tree HUD** matching the user's language (`es` / `en` / `pt`):
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
🎮 DAILY ─ <owner>/<repo> (base: <default-branch> · <short-sha>)
|
|
87
|
+
│ 🔄 Fetch: 🟢 origin updated
|
|
88
|
+
│
|
|
89
|
+
├── 📋 Open issues (<total>)
|
|
90
|
+
│ ├── #<n> <title> ············ 🟢 Resolved → PR #<pr> (comment drafted)
|
|
91
|
+
│ ├── #<m> <title> ············ 🟡 Pending → Follow-up drafted
|
|
92
|
+
│ ├── #<c> <title> ············ 🔴 Duplicate work → PR #<a> @<x> · PR #<b> @<y>
|
|
93
|
+
│ ├── #<s> <title> ············ 🟡 Stale claim → @<holder>, 9 days idle
|
|
94
|
+
│ └── #<k> <title> ············ ⚪ Unchanged (duplicate skipped)
|
|
95
|
+
│
|
|
96
|
+
└── 🔀 Open PRs (<total>)
|
|
97
|
+
├── #<p> <title> ············ 🟢 Green (checks OK · ready/review)
|
|
98
|
+
├── #<q> <title> ············ 🔴 Failing checks (<check name>)
|
|
99
|
+
└── #<r> <title> ············ 🔴 Conflict vs <base> (<files>)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If any action requires human approval (posting comment drafts, resolving conflicts + pushing, closing verified resolved issues, or merging green PRs), close with a single `🟡 BOSS GATE` offering `[A]` / `[B]`; otherwise close with `🏁 STAGE CLEAR`. After approved comments are posted, report them as `commented` in a short follow-up.
|
|
103
|
+
|
|
104
|
+
When several open issues already have a merged PR, or `needs-info` without an answer, point to [`/issue-clean-and-close`](../issue-clean-and-close/SKILL.md) for the bulk cleanup instead of drafting one comment each. Do not draft a comment that repeats an `<!-- issue-sweeper:… -->` comment newer than the issue's last activity.
|
|
105
|
+
|
|
106
|
+
## References
|
|
107
|
+
|
|
108
|
+
- [Issue cleanup (`/issue-clean-and-close`)](../issue-clean-and-close/SKILL.md)
|
|
109
|
+
- [Install guide for Cursor, Zed, Claude Code, Claude, and Gemini](../../INSTALLATION.md)
|
|
110
|
+
- [Question Gate](../../skills/question-gate/SKILL.md)
|
|
111
|
+
- [Issue Reviewer](../../skills/issue-reviewer/SKILL.md)
|
|
112
|
+
- [Tool Depot catalog](../../skills/tool-depot/references/tool-catalog.json)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Daily refresh: fetch origin, see where we left off, triage open GitHub issues, and audit open PRs for CI checks and conflicts (/daily)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /daily
|
|
6
|
+
|
|
7
|
+
Read and execute `SKILL.md` from the first existing path (single source of truth; do not duplicate or summarize its steps here):
|
|
8
|
+
|
|
9
|
+
1. `.cursor/skills/daily/SKILL.md`
|
|
10
|
+
2. `.claude/skills/daily/SKILL.md`
|
|
11
|
+
3. `.agents/skills/daily/SKILL.md`
|
|
12
|
+
4. `~/.cursor/skills/daily/SKILL.md`
|
|
13
|
+
5. `~/.claude/skills/daily/SKILL.md`
|
|
14
|
+
6. `~/.agents/skills/daily/SKILL.md`
|
|
15
|
+
7. `commands/daily/SKILL.md`
|
|
16
|
+
|
|
17
|
+
Optional argument: `--dry-run` (read-only audit without posting GitHub comments) or an issue/PR number (`/daily #51`).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description = "Daily refresh: fetch origin, triage open GitHub issues, and audit open PRs for CI checks and conflicts (/daily)."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Execute the `/daily` command workflow from its single source of truth `SKILL.md`.
|
|
5
|
+
|
|
6
|
+
First, locate and read `SKILL.md` from the first existing path:
|
|
7
|
+
1. `.gemini/skills/daily/SKILL.md`
|
|
8
|
+
2. `.agents/skills/daily/SKILL.md`
|
|
9
|
+
3. `~/.gemini/skills/daily/SKILL.md`
|
|
10
|
+
4. `~/.agents/skills/daily/SKILL.md`
|
|
11
|
+
5. `commands/daily/SKILL.md`
|
|
12
|
+
|
|
13
|
+
If none of those files exists, stop and ask the user to install `commands/daily` into `.gemini/skills/daily/` (or `~/.gemini/skills/daily/`) following `INSTALLATION.md`.
|
|
14
|
+
|
|
15
|
+
Otherwise, follow `SKILL.md` exactly without skipping steps.
|
|
16
|
+
Optional arguments passed by the user: {{args}}
|
|
17
|
+
"""
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-clean-and-close
|
|
3
|
+
description: "Trigger: /issue-clean-and-close, limpiar issues, cerrar issues resueltas, issues abiertas con PR fusionado, backlog sin trazabilidad. Review every open issue of the current repository, propose closing only what a merged PR or an unanswered needs-info settles, label and ping the rest, and apply only the plan the person approves."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
license: Apache-2.0
|
|
6
|
+
compatibility: Requires Node.js 22.18+ (`@bbcsoftwarefactory/cli`), git, and an authenticated gh CLI with GraphQL access for `sweep` and `sweep-github`; `sweep-issues` runs offline.
|
|
7
|
+
metadata:
|
|
8
|
+
author: bbc-skill-internals
|
|
9
|
+
version: "1.0"
|
|
10
|
+
pre_hook: "gh auth status; tool-depot (github-read / github-write)"
|
|
11
|
+
post_hook: "question-gate (bbc triage-question) + Quest-Tree HUD"
|
|
12
|
+
post_install: "npx --full-depth; copy adapters/gemini.toml + /commands reload (Gemini); server restart (Zed ACP)"
|
|
13
|
+
adapters: "adapters/command.md, adapters/gemini.toml"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Activation Contract
|
|
17
|
+
|
|
18
|
+
Run only when a person explicitly invokes `/issue-clean-and-close` in a repository checkout. It reviews every open issue of that repository (the `origin` remote on github.com), shows a plan, and writes to GitHub only what the person approves at the closing `🟡 BOSS GATE`.
|
|
19
|
+
|
|
20
|
+
Optional arguments:
|
|
21
|
+
- `--dry-run`: plan and render the HUD; write nothing.
|
|
22
|
+
- `--repo <owner/repo>`: review another repository instead of the current checkout's `origin`.
|
|
23
|
+
|
|
24
|
+
Granted authority upon explicit invocation:
|
|
25
|
+
- `A1` (read): `sweep plan` under Tool Depot `github-read` / `read-issues-for-cleanup`: the authenticated login, the optional `.github/issue-sweeper.json` on the default branch, and the open issues with one paginated GraphQL query.
|
|
26
|
+
- `A2` (write, only after the gate): `sweep apply` of the exact plan file under `github-write` / `clean-approved-issues`. Invoking the command is **not** approval to write.
|
|
27
|
+
|
|
28
|
+
## Hard Rules
|
|
29
|
+
|
|
30
|
+
- Close only what the [policy](references/policy.md) settles: a merged PR that declares closing the issue (`SW1`), or `needs-info` unanswered by its author for 14 days (`SW3`). Everything else is a label or a ping, never a close. Never close because an issue is old.
|
|
31
|
+
- Apply only the plan file shown at the gate, all of it or the issue numbers the person lists (`--only`). A plan older than 60 minutes is refused: plan again and show the new one.
|
|
32
|
+
- Never touch exempt issues (`security`, `frozen`, `pinned`, `P0`, `P1`), never unassign, never create labels, never edit an issue title or body other than the command's own report issue.
|
|
33
|
+
- Never copy issue or PR text into comments; the scripts write fixed text with numbers, links, dates, and logins.
|
|
34
|
+
- Check `gh auth status` first. If `gh` is missing or unauthenticated, stop and report the blocker.
|
|
35
|
+
- Match the HUD to the user's language; the comments use the policy's `language` (`es` by default).
|
|
36
|
+
|
|
37
|
+
## Execution Steps
|
|
38
|
+
|
|
39
|
+
1. **Plan** (read-only)
|
|
40
|
+
- Run `npx -y @bbcsoftwarefactory/cli sweep plan` from the repository root (add `--repo <owner/repo>` if given).
|
|
41
|
+
- On `unusable`, report its `reason` and stop. A missing `.github/issue-sweeper.json` is not an error: the defaults apply (`config: defaults`).
|
|
42
|
+
|
|
43
|
+
2. **Render the plan** as the HUD below, from the `plan` output: every action with its issue link, rule, and steps; the issues deferred by the per-run cap; report-only issues (`SW4` duplicate work, `SW8` exempt); gaps (missing labels, incomplete timelines); and the metrics.
|
|
44
|
+
- If `actions` is empty, close with `🏁 STAGE CLEAR` (nothing to apply).
|
|
45
|
+
- With `--dry-run`, stop after the HUD.
|
|
46
|
+
|
|
47
|
+
3. **Gate**: validate the closing prompt with `question-gate` (`bbc triage-question`) when installed, then ask one `🟡 BOSS GATE ─ Code Owner / Issue cleanup`:
|
|
48
|
+
- `[A]` apply the whole plan (each issue's comment, close, or label, plus the report issue);
|
|
49
|
+
- `[B]` apply only the issue numbers the person lists;
|
|
50
|
+
- `[C]` apply nothing.
|
|
51
|
+
|
|
52
|
+
4. **Apply** (only after `[A]` or `[B]`)
|
|
53
|
+
- Run `npx -y @bbcsoftwarefactory/cli sweep apply --plan <plan> [--only <n,m>]` with the `plan` path from step 1. Record the request and the use in the delivery ledger when one exists.
|
|
54
|
+
- If it reports a stale plan, go back to step 1 and show the new plan at a new gate; never widen an approval to a plan the person has not seen.
|
|
55
|
+
- Report what was applied and any `errors` (a failed comment means that issue was not closed).
|
|
56
|
+
|
|
57
|
+
## Output Contract
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
🧹 ISSUE CLEAN ─ <owner>/<repo> (open: <n> · with PR: <p> · merged but open: <m>)
|
|
61
|
+
│
|
|
62
|
+
├── ✅ Close (<k>)
|
|
63
|
+
│ ├── #<n> <url> ··· SW1 → comment + close (completed) · PR #<pr>
|
|
64
|
+
│ └── #<n> <url> ··· SW3 → comment + close (not planned) · needs-info <d> days
|
|
65
|
+
├── 🏷️ Label / ping (<k>)
|
|
66
|
+
│ ├── #<n> ··· SW2 → needs-close-review + ping @<assignees>
|
|
67
|
+
│ ├── #<n> ··· SW5 → ping @<holder> (stale claim)
|
|
68
|
+
│ └── #<n> ··· SW6 → stale (+ comment) · SW7 → remove stale
|
|
69
|
+
├── ⏸️ Deferred by the cap: #<n>, #<m>
|
|
70
|
+
├── 👀 Report only: #<n> SW4 duplicate work · #<m> SW8 exempt
|
|
71
|
+
└── ⚠️ Gaps: missing label `stale` · incomplete #<n>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Then the `🟡 BOSS GATE` with `[A]` / `[B]` / `[C]`, or `🏁 STAGE CLEAR`. After applying, report each issue as `closed`, `labeled`, or `commented`, and the report issue link.
|
|
75
|
+
|
|
76
|
+
## Evidence
|
|
77
|
+
|
|
78
|
+
Every `plan` and `apply` keeps its evidence in `~/.issue-clean-and-close/<owner>__<repo>/`: the policy file used, the snapshot, each plan in `plans/` (last 30), `report.md`, and one JSON line per step in `runs.log`. Every comment carries `<!-- issue-sweeper:<rule> -->`, so a later run does not repeat it.
|
|
79
|
+
|
|
80
|
+
## References
|
|
81
|
+
|
|
82
|
+
- [Policy and rules SW1–SW8](references/policy.md)
|
|
83
|
+
- [Daily refresh](../daily/SKILL.md)
|
|
84
|
+
- [Question Gate](../../skills/question-gate/SKILL.md)
|
|
85
|
+
- [Tool Depot catalog](../../skills/tool-depot/references/tool-catalog.json)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review every open issue of this repository, close only what a merged PR or an unanswered needs-info settles, label and ping the rest, after your approval (/issue-clean-and-close)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /issue-clean-and-close
|
|
6
|
+
|
|
7
|
+
Read and execute `SKILL.md` from the first existing path (single source of truth; do not duplicate or summarize its steps here):
|
|
8
|
+
|
|
9
|
+
1. `.cursor/skills/issue-clean-and-close/SKILL.md`
|
|
10
|
+
2. `.claude/skills/issue-clean-and-close/SKILL.md`
|
|
11
|
+
3. `.agents/skills/issue-clean-and-close/SKILL.md`
|
|
12
|
+
4. `~/.cursor/skills/issue-clean-and-close/SKILL.md`
|
|
13
|
+
5. `~/.claude/skills/issue-clean-and-close/SKILL.md`
|
|
14
|
+
6. `~/.agents/skills/issue-clean-and-close/SKILL.md`
|
|
15
|
+
7. `commands/issue-clean-and-close/SKILL.md`
|
|
16
|
+
|
|
17
|
+
Optional arguments: `--dry-run` (plan only, write nothing) or `--repo <owner/repo>`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description = "Review every open issue of this repository, close only what the evidence settles, label and ping the rest, after your approval (/issue-clean-and-close)."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Execute the `/issue-clean-and-close` command workflow from its single source of truth `SKILL.md`.
|
|
5
|
+
|
|
6
|
+
First, locate and read `SKILL.md` from the first existing path:
|
|
7
|
+
1. `.gemini/skills/issue-clean-and-close/SKILL.md`
|
|
8
|
+
2. `.agents/skills/issue-clean-and-close/SKILL.md`
|
|
9
|
+
3. `~/.gemini/skills/issue-clean-and-close/SKILL.md`
|
|
10
|
+
4. `~/.agents/skills/issue-clean-and-close/SKILL.md`
|
|
11
|
+
5. `commands/issue-clean-and-close/SKILL.md`
|
|
12
|
+
|
|
13
|
+
If none of those files exists, stop and ask the user to install `commands/issue-clean-and-close` into `.gemini/skills/issue-clean-and-close/` (or `~/.gemini/skills/issue-clean-and-close/`) following `INSTALLATION.md`.
|
|
14
|
+
|
|
15
|
+
Otherwise, follow `SKILL.md` exactly without skipping steps.
|
|
16
|
+
Optional arguments passed by the user: {{args}}
|
|
17
|
+
"""
|