@bompus/house-rules 0.11.0 → 0.14.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/CODE_OF_CONDUCT.md +83 -0
- package/README.md +102 -63
- package/compose.mjs +8 -2
- package/composition.mjs +11 -3
- package/config-view.mjs +18 -3
- package/config.mjs +74 -13
- package/docs/assets/overview.png +0 -0
- package/docs/configuration.md +85 -9
- package/package.json +4 -2
- package/rules/core.md +118 -209
- package/rules/modifiers/backlog-outline.md +25 -0
- package/rules/modifiers/backlog-visual.md +16 -0
- package/rules/modifiers/coded-offers.md +47 -17
- package/rules/modifiers/cross-session-relay.md +23 -0
- package/rules/modifiers/low-quota-handoff.md +4 -3
- package/rules/modifiers/model-default-questions.md +33 -0
- package/rules/modifiers/multi-agent.md +6 -2
- package/rules/modifiers/no-attribution.md +7 -1
- package/rules/modifiers/periodic-updates.md +25 -0
- package/rules/modifiers/plan-files.md +35 -3
- package/rules/modifiers/release-batching.md +4 -2
- package/rules/modifiers/shared-host-load.md +13 -42
- package/rules/modifiers/squash-landing.md +1 -1
- package/rules/modifiers/upstream-contributions.md +45 -0
- package/rules/modifiers/web-image-formats.md +35 -0
- package/rules/references/backlog-view.md +154 -0
- package/rules/references/landing.md +14 -14
- package/rules/references/multi-agent.md +6 -2
- package/rules/references/release-batching.md +37 -4
- package/rules/references/squash-landing.md +10 -4
- package/rules/references/thread-visuals.md +45 -0
- package/setup.mjs +87 -17
- package/skills/hr-agent-guidance-audit/SKILL.md +10 -5
- package/skills/hr-agent-guidance-audit/references/prune-workflow.md +72 -0
- package/skills/hr-agent-guidance-audit/references/records-and-lessons.md +1 -1
- package/skills/hr-agent-guidance-audit/references/retirement-verdicts.md +49 -0
- package/skills/hr-agent-guidance-refresh/SKILL.md +25 -57
- package/skills/hr-agent-guidance-refresh/references/verification.md +1 -1
- package/skills/hr-audit-choices/SKILL.md +1 -1
- package/skills/hr-benchmarking/SKILL.md +122 -159
- package/skills/hr-benchmarking/references/javascript.md +113 -0
- package/skills/hr-benchmarking/references/tools.md +62 -57
- package/skills/hr-better-accessibility/SKILL.md +1 -1
- package/skills/hr-better-accessibility/screen-readers.md +1 -0
- package/skills/hr-code-review/SKILL.md +19 -3
- package/skills/hr-code-review/agents/openai.yaml +1 -1
- package/skills/hr-code-review/references/acp-client.md +43 -0
- package/skills/{hr-change-impact/SKILL.md → hr-code-review/references/impact.md} +2 -12
- package/skills/hr-code-review/references/panel-adjudication.md +58 -0
- package/skills/hr-code-review/references/panel-plan.md +61 -0
- package/skills/hr-code-review/references/panel-recommendations.json +105 -0
- package/skills/hr-code-review/references/panel-recommendations.md +46 -0
- package/skills/hr-code-review/references/panel-setup.md +54 -0
- package/skills/hr-code-review/references/reviewer-role.md +31 -0
- package/skills/hr-code-review/scripts/acp-panel-client.mjs +299 -0
- package/skills/hr-code-review/scripts/check-receipts.mjs +263 -0
- package/skills/hr-code-review/scripts/panel-plan.mjs +69 -0
- package/skills/hr-code-review/scripts/panel-preferences.mjs +220 -0
- package/skills/hr-design-exploration/SKILL.md +24 -1
- package/skills/hr-design-exploration/agents/openai.yaml +2 -2
- package/skills/hr-diagnosing-bugs/SKILL.md +2 -2
- package/skills/hr-diagnosing-bugs/references/reporting.md +29 -4
- package/skills/hr-diagnosing-bugs/scripts/check-pr-offer.mjs +47 -0
- package/skills/hr-explain-code/SKILL.md +1 -1
- package/skills/hr-extract-shared-steps/SKILL.md +1 -1
- package/skills/hr-forgotten-work-audit/SKILL.md +130 -0
- package/skills/hr-forgotten-work-audit/references/brief-template.md +56 -0
- package/skills/hr-forgotten-work-audit/references/result-format.md +46 -0
- package/skills/hr-handoff/LICENSE +21 -0
- package/skills/hr-handoff/NOTICE.md +29 -0
- package/skills/hr-handoff/SKILL.md +24 -1
- package/skills/hr-handoff/references/reconciliation.md +25 -6
- package/skills/hr-handoff/references/successor-thread.md +76 -0
- package/skills/hr-handoff/scripts/check-reconciliation.mjs +48 -6
- package/skills/hr-house-rules-setup/SKILL.md +22 -8
- package/skills/hr-lean-plan/SKILL.md +4 -0
- package/skills/hr-maintainability-review/SKILL.md +14 -4
- package/skills/hr-maintainability-review/agents/openai.yaml +1 -1
- package/skills/hr-manual-qa/SKILL.md +1 -1
- package/skills/hr-ordering-tests/SKILL.md +1 -1
- package/skills/hr-plain-prose/SKILL.md +7 -4
- package/skills/hr-pr-followup/SKILL.md +6 -3
- package/skills/hr-pr-followup/references/review-helpers.md +40 -7
- package/skills/hr-pr-followup/scripts/check-landing.py +204 -0
- package/skills/hr-pr-followup/scripts/check-pr-review.ts +19 -8
- package/skills/hr-pr-followup/scripts/merge-pr.sh +100 -0
- package/skills/hr-pr-followup/scripts/verify-landed.sh +184 -0
- package/skills/hr-read-reddit/SKILL.md +1 -1
- package/skills/hr-research-shared-links/SKILL.md +103 -0
- package/skills/hr-sqlite/SKILL.md +174 -0
- package/skills/hr-sqlite/agents/openai.yaml +2 -0
- package/skills/hr-sqlite/references/evidence.md +94 -0
- package/skills/hr-sqlite/references/tool-decisions.md +39 -0
- package/skills/hr-sqlite/scripts/inspect-sqlite.py +245 -0
- package/skills/hr-stock-ui-audit/SKILL.md +1 -1
- package/skills/hr-test-audit/LICENSE +21 -0
- package/skills/hr-test-audit/NOTICE.md +67 -0
- package/skills/hr-usage-report/SKILL.md +90 -0
- package/skills/hr-usage-report/agents/openai.yaml +2 -0
- package/skills/hr-usage-report/assets/example-report.json +125 -0
- package/skills/hr-usage-report/assets/report-template.html +377 -0
- package/skills/hr-usage-report/scripts/render-report.ts +86 -0
- package/skills/hr-usage-report/scripts/usage-by-model.ts +499 -0
- package/skills/hr-what-next/SKILL.md +100 -10
- package/skills/hr-what-next/references/reporting.md +13 -22
- package/skills/hr-what-next/scripts/check-open-work.mjs +711 -0
- package/skills/hr-writing-pr/SKILL.md +29 -14
- package/skills/hr-writing-pr/scripts/benefit-chart.py +200 -0
- package/docs/npm-release.md +0 -45
- package/rules/modifiers/swarmail.md +0 -12
- package/skills/hr-benchmarking/references/priority-findings-20261006.md +0 -115
- package/skills/hr-change-impact/agents/openai.yaml +0 -5
|
@@ -16,10 +16,16 @@ When a review bot reviews pull requests, merge only after its check finishes
|
|
|
16
16
|
and each finding is fixed or answered with a reason, threads resolved. Read
|
|
17
17
|
the review body too: findings outside the diff arrive there, not as threads.
|
|
18
18
|
|
|
19
|
+
Let an enabled automatic review start; do not comment to request one. When none
|
|
20
|
+
starts, check the integration's status instead of tagging the bot again. A bot's
|
|
21
|
+
config file in the repository does not show that it is enabled, and an existing
|
|
22
|
+
check on the head must report completion before you merge (for CodeRabbit, a
|
|
23
|
+
successful status whose description starts with "Review completed").
|
|
24
|
+
|
|
19
25
|
During integration, never switch, reset or remove the session's own checkout: no
|
|
20
26
|
`checkout` or `switch` to another ref, no `reset` or branch force-move, and no
|
|
21
27
|
`worktree remove` on it. Updating the default branch it has checked out
|
|
22
|
-
(`merge --squash`, `merge --ff-only
|
|
28
|
+
(`merge --squash`, or `merge --ff-only` to the fetched remote head after a remote merge)
|
|
23
29
|
under the fast-forward conditions in § Landing is expected; report other paths
|
|
24
30
|
to their owners.
|
|
25
31
|
|
|
@@ -33,9 +39,9 @@ Fetch first, then:
|
|
|
33
39
|
has the base checked out, detach at the fetched base (`git switch --detach
|
|
34
40
|
<remote>/<base>`) and create or switch to a branch before any further
|
|
35
41
|
commits.
|
|
36
|
-
- When an app manages the checkout, leave it
|
|
37
|
-
|
|
38
|
-
- When the tree is dirty or ownership is in doubt,
|
|
42
|
+
- When an app manages the checkout, leave it for the app to retire. Report it;
|
|
43
|
+
it is not a blocker.
|
|
44
|
+
- When the tree is dirty or ownership is in doubt, stop: record the
|
|
39
45
|
merged commit, the checkout path and the owner wherever you track the task.
|
|
40
46
|
|
|
41
47
|
After each landing, update the task list and any active handoff with the
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
## Visuals in issues, discussions and comments
|
|
2
|
+
|
|
3
|
+
Use an image, chart or diagram only to show a spatial interface state, compare
|
|
4
|
+
before and after, show a trend across multiple measurements, or explain a flow
|
|
5
|
+
with branches. Otherwise use text, a table or a short code block. Most comments
|
|
6
|
+
are text. The exception is a qualified measured result. It lies outside its declared
|
|
7
|
+
variation criterion and the outputs are identical. An
|
|
8
|
+
issue, discussion or pull request that reports one opens with a headline chart
|
|
9
|
+
of it, so a reader sees the benefit before reading the body. A result with
|
|
10
|
+
one row that moved by less than 10% stays text and a table.
|
|
11
|
+
Draw it with the `hr-writing-pr` skill's `scripts/benefit-chart.py` when that skill
|
|
12
|
+
is installed, or with any charting tool. A comment that only adds data to an
|
|
13
|
+
existing thread stays text and a table.
|
|
14
|
+
|
|
15
|
+
Keep the exact numbers, steps or states in text beside the visual, and give the
|
|
16
|
+
image alt text, so a reader who cannot see it loses nothing. Many readers of an
|
|
17
|
+
issue or pull request are agents that cannot parse an image. Every value, label
|
|
18
|
+
and caveat in the visual also appears as body text, such as a table, a list or a
|
|
19
|
+
described state. The alt text says what the image shows, not only that it is a
|
|
20
|
+
chart. Label a mockup as an
|
|
21
|
+
illustration. Preview a chart or diagram design you have not used before with the
|
|
22
|
+
user before posting it.
|
|
23
|
+
|
|
24
|
+
The destination is usually public. Before posting, check the capture for private
|
|
25
|
+
paths, private project or repository names, local usernames, tokens and other
|
|
26
|
+
credentials, and follow any capture rule the repository or your host rules
|
|
27
|
+
state, such as a required theme.
|
|
28
|
+
|
|
29
|
+
Attach the file through the project host's supported route. On GitHub,
|
|
30
|
+
`gh issue create`, `gh issue edit`, `gh issue comment` and `gh pr comment`
|
|
31
|
+
accept `--attach '<file>#<alt text>'` in recent `gh` versions (check
|
|
32
|
+
`gh <command> --help`). In a browser form (the route for an issue form), use
|
|
33
|
+
the form's upload field when it renders. When it does not, add the file through
|
|
34
|
+
a text field's attach control and replace the default alt text `Image` that the
|
|
35
|
+
upload inserts. Do not commit the image to the repository or use a
|
|
36
|
+
third-party image host.
|
|
37
|
+
|
|
38
|
+
Where the CLI has no attach route (`gh discussion` has
|
|
39
|
+
no `--attach` flag) or refuses the upload, such as for lack of write access to
|
|
40
|
+
the repository, use a browser signed in to the user's GitHub account: the page's
|
|
41
|
+
upload field takes the file where `--attach` does not. Hand the user the exact
|
|
42
|
+
text and the file only when the host has no such browser or the upload fails
|
|
43
|
+
there, and do not post another way.
|
|
44
|
+
|
|
45
|
+
Posting to an external project still needs the user's direction.
|
package/setup.mjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// Numbered selection flow. Only the existing revision-checked config writer saves.
|
|
2
2
|
import { createInterface } from "node:readline";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
|
-
import {
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
5
7
|
import { parseArgs, stripVTControlCharacters } from "node:util";
|
|
6
8
|
import { configurationPath, modifierList } from "./composition.mjs";
|
|
7
9
|
import {
|
|
8
10
|
changeSelection,
|
|
11
|
+
QUESTION_MODIFIERS,
|
|
12
|
+
QUESTION_PRESETS,
|
|
9
13
|
configCommand,
|
|
10
14
|
readConfiguration,
|
|
11
15
|
selectionChanges,
|
|
@@ -19,7 +23,7 @@ const HELP = `Choose guidance with numbered prompts:
|
|
|
19
23
|
house-rules setup [--config PATH] --json
|
|
20
24
|
|
|
21
25
|
toggle N [N ...] or toggle NAME changes the listed choices.
|
|
22
|
-
questions plain|coded|cards chooses
|
|
26
|
+
questions default|plain|coded|cards chooses how questions are asked.
|
|
23
27
|
search TEXT, clear search, show selected, show all, help N
|
|
24
28
|
next, back, save (on Review), refresh (after a stale revision), cancel
|
|
25
29
|
|
|
@@ -34,6 +38,46 @@ const quote = (value) =>
|
|
|
34
38
|
? `'${value.replaceAll("'", "''")}'`
|
|
35
39
|
: `'${value.replaceAll("'", "'\\''")}'`;
|
|
36
40
|
|
|
41
|
+
// How this copy runs and how to apply a saved selection: the npm package has a
|
|
42
|
+
// `house-rules` command, a checkout from the installer is updated by running the installer again.
|
|
43
|
+
const entry = fileURLToPath(new URL("./compose.mjs", import.meta.url));
|
|
44
|
+
const parts = entry.split(/[\\/]/).map((part) => part.toLowerCase());
|
|
45
|
+
const packaged = parts.some(
|
|
46
|
+
(part, index) =>
|
|
47
|
+
part === "node_modules" && parts[index + 1] === "@bompus" && parts[index + 2] === "house-rules",
|
|
48
|
+
);
|
|
49
|
+
const cliCommand = () =>
|
|
50
|
+
packaged
|
|
51
|
+
? "house-rules"
|
|
52
|
+
: `${process.platform === "win32" ? "& " : ""}${quote(process.execPath)} ${quote(entry)}`;
|
|
53
|
+
|
|
54
|
+
const installerPath = () =>
|
|
55
|
+
join(dirname(entry), process.platform === "win32" ? "install.ps1" : "install.sh");
|
|
56
|
+
// The installer composes <config dir>/house-rules.json only.
|
|
57
|
+
const usesInstaller = (configPath) =>
|
|
58
|
+
!packaged && existsSync(installerPath()) && basename(configPath) === "house-rules.json";
|
|
59
|
+
|
|
60
|
+
function recomposeCommand(configPath) {
|
|
61
|
+
const configDir = dirname(configPath);
|
|
62
|
+
const checkout = dirname(entry);
|
|
63
|
+
const windows = process.platform === "win32";
|
|
64
|
+
const installer = installerPath();
|
|
65
|
+
if (!usesInstaller(configPath))
|
|
66
|
+
return `${cliCommand()} --config ${quote(configPath)} --out ${quote(join(configDir, "rules.md"))}`;
|
|
67
|
+
// The installer reads these variables, so a copy or config outside the defaults must name them.
|
|
68
|
+
const home = homedir();
|
|
69
|
+
const data =
|
|
70
|
+
process.env.XDG_DATA_HOME ?? (windows ? process.env.LOCALAPPDATA : join(home, ".local/share"));
|
|
71
|
+
const config = process.env.XDG_CONFIG_HOME ?? join(home, ".config");
|
|
72
|
+
const env = [
|
|
73
|
+
["HOUSE_RULES_DIR", checkout, join(data ?? "", "house-rules")],
|
|
74
|
+
["HOUSE_RULES_CONFIG_DIR", configDir, join(config, "house-rules")],
|
|
75
|
+
].filter(([, actual, normal]) => resolve(actual) !== resolve(normal));
|
|
76
|
+
return windows
|
|
77
|
+
? `${env.map(([name, value]) => `$env:${name}=${quote(value)}; `).join("")}& ${quote(installer)}`
|
|
78
|
+
: `${env.map(([name, value]) => `${name}=${quote(value)} `).join("")}sh ${quote(installer)}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
37
81
|
export async function setupCommand(argv) {
|
|
38
82
|
let values;
|
|
39
83
|
try {
|
|
@@ -100,6 +144,10 @@ export async function setupCommand(argv) {
|
|
|
100
144
|
!projection.modifiers.includes("coded-offers")
|
|
101
145
|
)
|
|
102
146
|
projection.modifiers.push("coded-offers");
|
|
147
|
+
if (projection.modifiers.includes("model-default-questions"))
|
|
148
|
+
projection.modifiers = projection.modifiers.filter(
|
|
149
|
+
(name) => !["coded-offers", "question-cards"].includes(name),
|
|
150
|
+
);
|
|
103
151
|
return selectionReport(projection, snapshot.path);
|
|
104
152
|
};
|
|
105
153
|
let baseline = catalog(); // Malformed layers, composition or legacy names still stop setup.
|
|
@@ -108,7 +156,7 @@ export async function setupCommand(argv) {
|
|
|
108
156
|
const report = current.report ?? baseline;
|
|
109
157
|
const unavailable = (snapshot.config.modifiers ?? []).filter((name) => !known.has(name));
|
|
110
158
|
const modifiers = [
|
|
111
|
-
...report.modifiers.filter((m) => !
|
|
159
|
+
...report.modifiers.filter((m) => !QUESTION_MODIFIERS.includes(m.name)),
|
|
112
160
|
...unavailable.map((name) => ({
|
|
113
161
|
name,
|
|
114
162
|
enabled: true,
|
|
@@ -147,7 +195,7 @@ export async function setupCommand(argv) {
|
|
|
147
195
|
console.log(command);
|
|
148
196
|
};
|
|
149
197
|
const show = () => {
|
|
150
|
-
print(`Choose guidance / ${["
|
|
198
|
+
print(`Choose guidance / ${["Optional rules", "Skills", "Review"][stage]}`);
|
|
151
199
|
print(`Config: ${snapshot.path}`);
|
|
152
200
|
const current = draft();
|
|
153
201
|
if (current.error) print(`Selection needs repair: ${current.error.message}`);
|
|
@@ -172,7 +220,7 @@ export async function setupCommand(argv) {
|
|
|
172
220
|
"Reproduce with the existing config command (POSIX shell on Unix, PowerShell on Windows):",
|
|
173
221
|
);
|
|
174
222
|
printCommand(
|
|
175
|
-
|
|
223
|
+
`${cliCommand()} config set --config ${quote(snapshot.path)} ${flags.join(" ")} --apply --expect ${quote(snapshot.revision)}`,
|
|
176
224
|
);
|
|
177
225
|
print("Review personal rule overrides. Setup does not interpret or edit their prose.");
|
|
178
226
|
print(
|
|
@@ -181,18 +229,23 @@ export async function setupCommand(argv) {
|
|
|
181
229
|
print("save / back / cancel");
|
|
182
230
|
return;
|
|
183
231
|
}
|
|
184
|
-
print("Core rules: always on.
|
|
232
|
+
print("Core rules: always on. Optional rules are opt-in; skill selection follows your config.");
|
|
185
233
|
if (stage === 1) {
|
|
186
234
|
const skills = rows().filter((row) => row.kind === "skill");
|
|
187
235
|
print(
|
|
188
236
|
`${skills.filter((row) => row.enabled).length} of ${skills.length} available skills selected.`,
|
|
189
237
|
);
|
|
190
238
|
}
|
|
191
|
-
print(
|
|
239
|
+
print(
|
|
240
|
+
`Question format: ${questions ?? baseline.questions}. Use questions default|plain|coded|cards.`,
|
|
241
|
+
);
|
|
242
|
+
const kind = stage === 0 ? "modifier" : "skill";
|
|
243
|
+
// With nothing selected yet, the selected-only view would be empty, so list every choice.
|
|
244
|
+
const nothingSelected = !rows().some((row) => row.kind === kind && row.enabled);
|
|
192
245
|
const visible = rows().filter(
|
|
193
246
|
(row) =>
|
|
194
|
-
row.kind ===
|
|
195
|
-
(!selectedOnly || row.enabled) &&
|
|
247
|
+
row.kind === kind &&
|
|
248
|
+
(!selectedOnly || nothingSelected || row.enabled) &&
|
|
196
249
|
`${row.name} ${row.description}`.toLowerCase().includes(query.toLowerCase()),
|
|
197
250
|
);
|
|
198
251
|
for (const row of visible) {
|
|
@@ -203,7 +256,9 @@ export async function setupCommand(argv) {
|
|
|
203
256
|
}
|
|
204
257
|
if (!visible.length)
|
|
205
258
|
print(`No matches for ${JSON.stringify(query)}. Use clear search or show all.`);
|
|
206
|
-
if (selectedOnly)
|
|
259
|
+
if (selectedOnly && nothingSelected)
|
|
260
|
+
print("Nothing is selected yet, so every choice is listed. Use toggle N to select.");
|
|
261
|
+
else if (selectedOnly)
|
|
207
262
|
print("Showing current selections. Search for relevant additions or use show all.");
|
|
208
263
|
if (baseline.unavailable.length)
|
|
209
264
|
print(`Retained unavailable exclusions: ${baseline.unavailable.join(", ")}`);
|
|
@@ -268,8 +323,8 @@ export async function setupCommand(argv) {
|
|
|
268
323
|
selectedOnly = false;
|
|
269
324
|
} else if (command.startsWith("questions ")) {
|
|
270
325
|
const preset = command.slice(10);
|
|
271
|
-
if (!
|
|
272
|
-
throw new Error("Choose questions plain|coded|cards.");
|
|
326
|
+
if (!QUESTION_PRESETS.includes(preset))
|
|
327
|
+
throw new Error("Choose questions default|plain|coded|cards.");
|
|
273
328
|
questions = preset;
|
|
274
329
|
} else if (command.startsWith("toggle ") || command.startsWith("help ")) {
|
|
275
330
|
const help = command.startsWith("help ");
|
|
@@ -306,6 +361,19 @@ export async function setupCommand(argv) {
|
|
|
306
361
|
} else {
|
|
307
362
|
const enabled = !(intent.get(`${row.kind}:${row.name}`)?.enabled ?? row.enabled);
|
|
308
363
|
intent.set(`${row.kind}:${row.name}`, { kind: row.kind, name: row.name, enabled });
|
|
364
|
+
// A rule that expects a skill would otherwise warn on every compose.
|
|
365
|
+
for (const need of enabled ? (row.requires ?? "").split(",") : []) {
|
|
366
|
+
const skill = available.find((r) => r.kind === "skill" && r.name === need.trim());
|
|
367
|
+
// A skill listed in the same command keeps the toggle the user typed.
|
|
368
|
+
if (!skill || chosen.includes(skill)) continue;
|
|
369
|
+
if (intent.get(`skill:${skill.name}`)?.enabled ?? skill.enabled) continue;
|
|
370
|
+
intent.set(`skill:${skill.name}`, {
|
|
371
|
+
kind: "skill",
|
|
372
|
+
name: skill.name,
|
|
373
|
+
enabled: true,
|
|
374
|
+
});
|
|
375
|
+
print(`Also selected the ${skill.name} skill, which ${row.name} expects.`);
|
|
376
|
+
}
|
|
309
377
|
}
|
|
310
378
|
}
|
|
311
379
|
} else if (command === "refresh") {
|
|
@@ -353,11 +421,13 @@ export async function setupCommand(argv) {
|
|
|
353
421
|
}
|
|
354
422
|
print(`Selections saved: ${saved.path}`);
|
|
355
423
|
print(
|
|
356
|
-
"Output was not regenerated and hosts were not connected by setup.
|
|
357
|
-
);
|
|
358
|
-
printCommand(
|
|
359
|
-
`house-rules --config ${quote(saved.path)} --out ${quote(join(dirname(saved.path), "rules.md"))}`,
|
|
424
|
+
"Output was not regenerated and hosts were not connected by setup. To apply the selections, run:",
|
|
360
425
|
);
|
|
426
|
+
printCommand(recomposeCommand(saved.path));
|
|
427
|
+
if (!usesInstaller(saved.path))
|
|
428
|
+
print(
|
|
429
|
+
"This rebuilds the rules only; add --skills-out with a new or empty directory to rebuild the skills too.",
|
|
430
|
+
);
|
|
361
431
|
return;
|
|
362
432
|
} else
|
|
363
433
|
throw new Error(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hr-agent-guidance-audit
|
|
3
|
-
description: Audit and simplify agent-facing rules, skills and linked
|
|
3
|
+
description: Audit and simplify agent-facing rules, skills and linked docs within the requested repository scope. Use for guidance cleanup, skill description accuracy, token/clarity audits, contradictions and duplication across instructions, or deciding which skills, docs and scripts to retire or merge.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent guidance audit
|
|
@@ -55,7 +55,12 @@ Verify effects before changing:
|
|
|
55
55
|
for drift risk, not savings.
|
|
56
56
|
|
|
57
57
|
When reviewing research records, staged lessons or guidance overrides, read
|
|
58
|
-
[the record-maintenance method](references/records-and-lessons.md).
|
|
58
|
+
[the record-maintenance method](references/records-and-lessons.md). When
|
|
59
|
+
deciding what to retire or merge, or triaging a usage report, read
|
|
60
|
+
[the verdict method](references/retirement-verdicts.md). To shrink always-loaded
|
|
61
|
+
guidance by measurement (size it, migrate, condense, test each rule with and
|
|
62
|
+
without it, recommend opt-ins), follow
|
|
63
|
+
[the pruning workflow](references/prune-workflow.md). For selected
|
|
59
64
|
loading or behavior verification, locate the `hr-agent-guidance-refresh` bundle
|
|
60
65
|
and read its `references/verification.md`; keep unavailable evidence unverified.
|
|
61
66
|
|
|
@@ -76,9 +81,9 @@ settles it or the resolution would loosen a prohibition or safety rule.
|
|
|
76
81
|
## Verify and report
|
|
77
82
|
|
|
78
83
|
Check links, invocation metadata and affected installer behavior. Run required
|
|
79
|
-
checks and verify installed bytes where
|
|
80
|
-
runtime loading from file equality alone. Follow the repository's
|
|
81
|
-
and cleanup boundary.
|
|
84
|
+
checks and verify installed bytes where installing the files is in scope; do
|
|
85
|
+
not claim runtime loading from file equality alone. Follow the repository's
|
|
86
|
+
integration and cleanup boundary.
|
|
82
87
|
|
|
83
88
|
Report what was removed or simplified, why it was safe, checks performed and
|
|
84
89
|
remaining limits. Give each finding its `file:line`, quoted evidence, problem
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Pruning workflow for rules, skills and docs
|
|
2
|
+
|
|
3
|
+
Use this when the goal is a smaller, clearer set of always-loaded guidance, not
|
|
4
|
+
only a read-through. Each step produces a list you can act on; skip a step the
|
|
5
|
+
request does not need.
|
|
6
|
+
|
|
7
|
+
1. **Size it.** List every file the agent loads (composed rules, skill
|
|
8
|
+
descriptions, linked docs) with its byte count, largest first. The always-on
|
|
9
|
+
rules and the skill catalog are the costly part; a reference loaded on demand
|
|
10
|
+
is cheap. Record the totals so the end result can be compared.
|
|
11
|
+
2. **Find what belongs elsewhere.** For each doc, script and agent definition
|
|
12
|
+
outside the portable rules repository, ask whether another project could use
|
|
13
|
+
it unchanged. Where the repository owns the file and the task covers the move,
|
|
14
|
+
move it into the shared repository and leave a pointer in the old place;
|
|
15
|
+
otherwise report it as a candidate without editing. Keep host mechanics,
|
|
16
|
+
personal choices and measurement data where they are.
|
|
17
|
+
3. **Condense and clarify.** Cut repeated sentences, filler and wording tuned
|
|
18
|
+
for older models. Prefer positive wording ("do X") to prohibitions and plain
|
|
19
|
+
absolutes ("always", "never") where the rule really is absolute. Keep every
|
|
20
|
+
requirement a test or another file names. Measure each edit as
|
|
21
|
+
before/after bytes; if the total barely moves, say so rather than cutting
|
|
22
|
+
reasons.
|
|
23
|
+
4. **Screen for unnecessary rules.** A rule earns its place only if the
|
|
24
|
+
model does worse without it. In the house-rules checkout,
|
|
25
|
+
`evals/end-of-reply/run.mjs --screen` runs each scenario twice, with the rules
|
|
26
|
+
and with the one rule named in the scenario's `without:` pattern removed:
|
|
27
|
+
- Write a scenario for the rule: `expect: reply`, a transcript where the rule
|
|
28
|
+
decides the outcome, and `requiredPattern` or `forbiddenPattern` for the
|
|
29
|
+
right and wrong reply. Add `without:` as a regular expression matching the
|
|
30
|
+
rule's exact text once. Add `allowRead: true` unless the scenario is about
|
|
31
|
+
the first call itself: a model that reads a file before answering is
|
|
32
|
+
otherwise graded on the read.
|
|
33
|
+
- Test the models you use, at the effort you use: Claude Opus 5.5 and
|
|
34
|
+
Sonnet 5.5, GPT-6.1 Sol, SWE-2 and Muse Spark 1.3 Contributor. Grok 4.7 is
|
|
35
|
+
optional: it took about three times as long as the others for the same
|
|
36
|
+
runs. One wrapper per agent is in `evals/end-of-reply/models/`; its README
|
|
37
|
+
section has the commands.
|
|
38
|
+
- Check for rule leaks first. Every one of these agents loads your own rules
|
|
39
|
+
by default, so probe each wrapper (the README gives the question) and
|
|
40
|
+
confirm none of your own rule files appear; a few known extras (Devin's own
|
|
41
|
+
global `AGENTS.md`, OpenCode's installed-skill list) are listed in the
|
|
42
|
+
README. A leak makes the "without" arm obey the rule anyway.
|
|
43
|
+
- Use `--runs 4` or more. This pass/fail screening is a deliberate exception
|
|
44
|
+
to the 3-runs-per-arm default for performance claims in `hr-benchmarking`,
|
|
45
|
+
because a count of passes needs more runs than a timing range does. Four
|
|
46
|
+
runs separate a rule only when the arms differ by 4 and 0; a smaller gap
|
|
47
|
+
needs 9 runs per arm before you act on it (8 of 9 against 3 of 9 gave
|
|
48
|
+
p = 0.05).
|
|
49
|
+
- Read the output: "rule helps" keeps the rule; "no difference" on all
|
|
50
|
+
models makes it a removal candidate; "fails with the rule" means fix the
|
|
51
|
+
scenario first, because it tests nothing. A scenario that fails in both
|
|
52
|
+
arms on most models (the pattern is too narrow, or the transcript lacks
|
|
53
|
+
what the rule needs) discriminates nothing; rewrite it and confirm that
|
|
54
|
+
it passes clearly more often with the rule than without before using its result.
|
|
55
|
+
- A harness that grades only the first reply penalizes models that read
|
|
56
|
+
before answering, whatever the rules say. Use `allowRead`, and compare a
|
|
57
|
+
model's failures with its replies before blaming the rule.
|
|
58
|
+
- A removal candidate is a recommendation, not a deletion. Confirm with
|
|
59
|
+
more runs, and offer the user the choice; moving the rule to an opt-in
|
|
60
|
+
modifier is the middle option.
|
|
61
|
+
5. **Check against vendor guidance.** Read the current prompting guides of the
|
|
62
|
+
model vendors you target. Treat them as evidence: remove emphasis and steering
|
|
63
|
+
the guides now call unneeded only where the change keeps every domain
|
|
64
|
+
safeguard and explicit user choice, and keep what they recommend.
|
|
65
|
+
6. **Recommend opt-ins.** A rule that matters only for some users or setups
|
|
66
|
+
belongs in a modifier that is off by default. List each candidate with who
|
|
67
|
+
needs it.
|
|
68
|
+
7. **Land and adopt.** Run the full test suite and the end-of-reply eval with
|
|
69
|
+
the final composed rules, before and after, on each model. Land through the
|
|
70
|
+
repository's path, then adopt the new revision wherever it is pinned and
|
|
71
|
+
install the result. Report the size totals from step 1, the screening table,
|
|
72
|
+
and what you left alone.
|
|
@@ -46,7 +46,7 @@ or role owner; guidance points there. Distinguish explicit user preferences,
|
|
|
46
46
|
temporary workarounds and model-performance choices. An adopted framework or
|
|
47
47
|
runtime dependency needs the same record.
|
|
48
48
|
|
|
49
|
-
Recheck affected overrides during upgrades,
|
|
49
|
+
Recheck affected overrides during upgrades, reinstalls, guidance audits or
|
|
50
50
|
model re-evaluation. Reopen model routing when aliases, effort levels, plan
|
|
51
51
|
limits or observed quality/usage change. Compare current official documentation
|
|
52
52
|
and effective runtime behavior. Record coverage; an installation drift check
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Retirement and merge verdicts
|
|
2
|
+
|
|
3
|
+
Use this method when an audit asks which skills, guidance files, docs or
|
|
4
|
+
scripts are still needed, or when a scheduled usage report lists candidates.
|
|
5
|
+
|
|
6
|
+
## Inventory
|
|
7
|
+
|
|
8
|
+
Cover skills, rule files, agent-facing docs, and the scripts, scheduled jobs
|
|
9
|
+
and services that support them. A script counts as unused only when nothing
|
|
10
|
+
outside its own tests and itself calls, schedules or documents it.
|
|
11
|
+
|
|
12
|
+
Usage evidence is optional and only supporting. When session transcripts are
|
|
13
|
+
available, count a use only when the skill or file was invoked or loaded for
|
|
14
|
+
real work. Exclude sessions that only list, edit, audit or install it, and
|
|
15
|
+
give anything added recently a grace period before low use counts against it.
|
|
16
|
+
Low use alone never justifies retirement: rare skills can guard rare,
|
|
17
|
+
expensive situations.
|
|
18
|
+
|
|
19
|
+
## Verdicts
|
|
20
|
+
|
|
21
|
+
Give each candidate exactly one verdict, with its evidence:
|
|
22
|
+
|
|
23
|
+
- **Exact duplicate**: name the other copy and which one owns it.
|
|
24
|
+
- **Near duplicate**: name the skill to merge into and list what the
|
|
25
|
+
retired side contributes that the survivor lacks. Carry those ideas over
|
|
26
|
+
in your own words, respecting the source's license.
|
|
27
|
+
- **Covered by X**: quote the line or section of X that does the same job.
|
|
28
|
+
If you cannot quote it, the verdict is not "covered".
|
|
29
|
+
- **Not applicable**: say to whom it does not apply and why.
|
|
30
|
+
- **Keep**: name the concrete situation it serves.
|
|
31
|
+
|
|
32
|
+
Verify every "covered by", provenance or history claim against the source
|
|
33
|
+
before stating it. A plausible guess about why something exists is not
|
|
34
|
+
evidence.
|
|
35
|
+
|
|
36
|
+
## Shared source and local installs
|
|
37
|
+
|
|
38
|
+
When the guidance ships to other people, give two verdicts: whether the
|
|
39
|
+
shared source should keep it, and whether this installation should. Do not
|
|
40
|
+
assume readers of shared guidance have the same optional tools, indexes or
|
|
41
|
+
services as the auditing host. A skill made redundant here by a local tool
|
|
42
|
+
can still be the only option for everyone else.
|
|
43
|
+
|
|
44
|
+
## Report
|
|
45
|
+
|
|
46
|
+
Group candidates by verdict. For merges, name the surviving skill, the
|
|
47
|
+
carried-over ideas and the callers, tests and installer lists that must
|
|
48
|
+
change. For retirements, name what replaces each item. Offer retirements and
|
|
49
|
+
merges for the user's selection; do not delete on usage evidence alone.
|
|
@@ -1,68 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hr-agent-guidance-refresh
|
|
3
|
-
description: "
|
|
3
|
+
description: "Reread the agent guidance a session loaded (instruction files, skills and subagent definitions) and report what changed since. Use for reload requests, session start or resume, or a signal that guidance was updated."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent guidance refresh
|
|
7
7
|
|
|
8
|
-
Injected rules and skill catalogs can retain an earlier snapshot.
|
|
9
|
-
|
|
10
|
-
This skill reads guidance and checks supported discovery; it does not authorize
|
|
8
|
+
Injected rules and skill catalogs can retain an earlier snapshot. This skill
|
|
9
|
+
rereads guidance and checks supported discovery; it does not authorize
|
|
11
10
|
installation, configuration changes, model calls, new probes or provider restarts.
|
|
12
|
-
A pushed-source notice remains pending until the affected component is deployed.
|
|
13
11
|
|
|
14
|
-
1. At start
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
definitions through their local indexes and necessary references. Inspect
|
|
36
|
-
changed configuration through supported redacted summaries, never secret
|
|
37
|
-
values. Verify affected script or tool versions and the actual catalog,
|
|
38
|
-
configuration or callable interfaces the session would use next. Reading a
|
|
39
|
-
script does not run or deploy it. Recheck assumptions invalidated by changes.
|
|
40
|
-
Use supported context, catalog or tool refresh only when its capability and
|
|
41
|
-
authorization are established. A reread does not prove injected context,
|
|
42
|
-
effective subagent definitions, process configuration or tool discovery changed.
|
|
43
|
-
Record unsupported or failed paths. If a restart, reinstall or reload is needed,
|
|
44
|
-
report the component and required action as a blocker; do not perform it without
|
|
45
|
-
existing authorization.
|
|
46
|
-
5. Record each component's source and deployed targets, affected paths, refresh
|
|
47
|
-
action and observed effective identity. Keep these results separate
|
|
48
|
-
from installed-byte checks, catalog discovery, delivery acknowledgements and
|
|
49
|
-
behavior tests. Mark components current only for the evidence obtained;
|
|
50
|
-
keep pending, held, unsupported and offline states explicit. Disconnected
|
|
51
|
-
sessions compare targets on resume. Update the pending target without
|
|
52
|
-
repeating its notice; report blockers when action is needed. Never treat an
|
|
53
|
-
acknowledgement as proof of loaded context.
|
|
12
|
+
1. At start or resume, and at the next affected-action boundary after an update
|
|
13
|
+
signal, list what the session inherits or uses. That is the repository
|
|
14
|
+
instruction root, the rules, docs and skills it names with their resources,
|
|
15
|
+
any subagent definitions, and the configuration, supporting scripts and tools
|
|
16
|
+
it relies on. Compare them with this session's last refresh record. If no
|
|
17
|
+
record exists, read the applicable guidance and establish that baseline.
|
|
18
|
+
2. Finish the active operation before refreshing. When an evaluation fixes its
|
|
19
|
+
guidance or tools, hold the update until that context is released and leave
|
|
20
|
+
its inputs unchanged.
|
|
21
|
+
3. Reread changed instructions, affected skill resources and subagent definitions
|
|
22
|
+
through their indexes and the references they need. Inspect changed
|
|
23
|
+
configuration through redacted summaries, never secret values, and check the
|
|
24
|
+
versions or interfaces of the scripts and tools the session will use next.
|
|
25
|
+
Recheck assumptions the changes invalidate. A reread does not prove that
|
|
26
|
+
injected context, effective subagent definitions or tool discovery changed.
|
|
27
|
+
Use a context or catalog refresh only when the host supports it and you are
|
|
28
|
+
authorized. If a restart, reinstall or reload is needed, report the component
|
|
29
|
+
and the action as a blocker; do not perform it without existing authorization.
|
|
30
|
+
4. Record what you reread, the identity you observed for each component and
|
|
31
|
+
what stays unverified. Report changed behavior or a blocker when it needs
|
|
32
|
+
attention; an unchanged check stays quiet.
|
|
54
33
|
|
|
55
34
|
When guidance verification is selected, read
|
|
56
35
|
[the verification method](references/verification.md) for evidence layers,
|
|
57
|
-
answer
|
|
58
|
-
|
|
59
|
-
For an explicit source-update request, follow the owning checkout's adoption
|
|
60
|
-
procedure and authorization before changing files. Upstream/source drift alone
|
|
61
|
-
is not a newer deployed target. Report changed behavior or a blocker when it
|
|
62
|
-
needs attention; an unchanged check stays quiet.
|
|
63
|
-
|
|
64
|
-
When the host supplies Swarmail updates, follow the connected product
|
|
65
|
-
instructions and `swarmail updates --help`. If those instructions are hidden
|
|
66
|
-
or omit needed detail, locate the owning checkout's `docs/updates.md` at the
|
|
67
|
-
installed or approved revision. Keep unsupported details unverified. Other
|
|
68
|
-
hosts may supply a different qualified update signal.
|
|
36
|
+
behavior checks that do not reveal the expected answer, and scoped adoption checks.
|
|
@@ -39,7 +39,7 @@ a probe pass.
|
|
|
39
39
|
Follow the owning source's supported pin, generator and scoped installer when
|
|
40
40
|
adoption is selected. Preserve account settings, exclusions, invocation policy,
|
|
41
41
|
local patches and repository safeguards. Check destinations and repeat the
|
|
42
|
-
scoped
|
|
42
|
+
scoped install to verify it writes nothing further. Do not infer approval or
|
|
43
43
|
active-context loading from byte equality or an upstream commit.
|
|
44
44
|
|
|
45
45
|
Record each layer's result separately. Unsupported refresh paths remain
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hr-audit-choices
|
|
3
|
-
description: "Audit the decisions an implementing agent made
|
|
3
|
+
description: "Audit the decisions an implementing agent made for the user, not its diff: trace the work into a choices ledger with a verdict per choice, changing no code. Use when asked which choices or assumptions went into implemented work, before landing delegated or AI-implemented work the user wants reviewed by decision, or when a fix may be shaped to one failing case."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Audit choices
|