@bompus/house-rules 0.0.0-stage → 0.11.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/CONTRIBUTING.md +54 -0
- package/LICENSE +21 -0
- package/README.md +347 -2
- package/THIRD_PARTY_NOTICES.md +188 -0
- package/compose.mjs +119 -0
- package/composition.mjs +353 -0
- package/config-view.mjs +194 -0
- package/config.mjs +320 -0
- package/docs/assets/banner-dark.png +0 -0
- package/docs/assets/banner-light.png +0 -0
- package/docs/assets/overview.png +0 -0
- package/docs/configuration.md +193 -0
- package/docs/npm-release.md +45 -0
- package/docs/skill-names.md +50 -0
- package/examples/person/house-rules.json +15 -0
- package/examples/person/rules/10-tooling.md +8 -0
- package/examples/person/rules/20-reporting.md +9 -0
- package/examples/project/AGENTS.md +18 -0
- package/package.json +40 -4
- package/rule-references.mjs +91 -0
- package/rules/core.md +431 -0
- package/rules/modifiers/coded-offers.md +40 -0
- package/rules/modifiers/effort-estimates.md +41 -0
- package/rules/modifiers/land-when-done.md +12 -0
- package/rules/modifiers/low-quota-handoff.md +19 -0
- package/rules/modifiers/multi-agent.md +34 -0
- package/rules/modifiers/no-attribution.md +10 -0
- package/rules/modifiers/plan-files.md +50 -0
- package/rules/modifiers/question-cards.md +48 -0
- package/rules/modifiers/release-batching.md +13 -0
- package/rules/modifiers/scratch-on-disk.md +15 -0
- package/rules/modifiers/shared-host-load.md +48 -0
- package/rules/modifiers/solo-operator.md +13 -0
- package/rules/modifiers/squash-landing.md +22 -0
- package/rules/modifiers/swarmail.md +12 -0
- package/rules/references/github-actions.md +45 -0
- package/rules/references/landing.md +39 -0
- package/rules/references/multi-agent.md +47 -0
- package/rules/references/release-batching.md +43 -0
- package/rules/references/squash-landing.md +44 -0
- package/setup.mjs +375 -0
- package/skills/hr-agent-guidance-audit/LICENSE +21 -0
- package/skills/hr-agent-guidance-audit/SKILL.md +86 -0
- package/skills/hr-agent-guidance-audit/agents/openai.yaml +2 -0
- package/skills/hr-agent-guidance-audit/references/records-and-lessons.md +60 -0
- package/skills/hr-agent-guidance-refresh/LICENSE +21 -0
- package/skills/hr-agent-guidance-refresh/SKILL.md +68 -0
- package/skills/hr-agent-guidance-refresh/agents/openai.yaml +2 -0
- package/skills/hr-agent-guidance-refresh/references/verification.md +47 -0
- package/skills/hr-api-exposure-check/SKILL.md +159 -0
- package/skills/hr-api-exposure-check/agents/openai.yaml +3 -0
- package/skills/hr-audit-choices/SKILL.md +67 -0
- package/skills/hr-audit-choices/agents/openai.yaml +2 -0
- package/skills/hr-benchmarking/NOTICE.md +36 -0
- package/skills/hr-benchmarking/SKILL.md +316 -0
- package/skills/hr-benchmarking/agents/openai.yaml +2 -0
- package/skills/hr-benchmarking/references/javascript.md +17 -0
- package/skills/hr-benchmarking/references/priority-findings-20261006.md +115 -0
- package/skills/hr-benchmarking/references/tools.md +160 -0
- package/skills/hr-benchmarking/scripts/process-attribution.ps1 +20 -0
- package/skills/hr-benchmarking/scripts/process-attribution.py +107 -0
- package/skills/hr-better-accessibility/LICENSE +22 -0
- package/skills/hr-better-accessibility/NOTICE.md +46 -0
- package/skills/hr-better-accessibility/SKILL.md +119 -0
- package/skills/hr-better-accessibility/agents/openai.yaml +3 -0
- package/skills/hr-better-accessibility/focus-and-keyboard.md +130 -0
- package/skills/hr-better-accessibility/forms.md +82 -0
- package/skills/hr-better-accessibility/hit-areas.md +98 -0
- package/skills/hr-better-accessibility/motion-and-zoom.md +81 -0
- package/skills/hr-better-accessibility/screen-readers.md +101 -0
- package/skills/hr-better-accessibility/semantics-and-aria.md +84 -0
- package/skills/hr-better-colors/LICENSE +21 -0
- package/skills/hr-better-colors/NOTICE.md +37 -0
- package/skills/hr-better-colors/SKILL.md +114 -0
- package/skills/hr-better-colors/agents/openai.yaml +3 -0
- package/skills/hr-better-colors/color-formats.md +90 -0
- package/skills/hr-better-colors/color-usage.md +140 -0
- package/skills/hr-better-colors/contrast.md +80 -0
- package/skills/hr-better-colors/palette-generation.md +104 -0
- package/skills/hr-better-colors/palette-structure.md +76 -0
- package/skills/hr-better-colors/token-naming.md +97 -0
- package/skills/hr-better-layout/LICENSE +22 -0
- package/skills/hr-better-layout/NOTICE.md +48 -0
- package/skills/hr-better-layout/SKILL.md +92 -0
- package/skills/hr-better-layout/agents/openai.yaml +3 -0
- package/skills/hr-better-layout/grouping-and-alignment.md +144 -0
- package/skills/hr-better-layout/spacing-and-adaptivity.md +215 -0
- package/skills/hr-better-typography/LICENSE +22 -0
- package/skills/hr-better-typography/NOTICE.md +46 -0
- package/skills/hr-better-typography/SKILL.md +172 -0
- package/skills/hr-better-typography/agents/openai.yaml +3 -0
- package/skills/hr-better-typography/choosing-fonts.md +69 -0
- package/skills/hr-better-typography/css-cheat-sheet.md +65 -0
- package/skills/hr-better-typography/details-and-accessibility.md +119 -0
- package/skills/hr-better-typography/spacing-and-sizing.md +131 -0
- package/skills/hr-better-typography/variable-fonts-and-opentype.md +105 -0
- package/skills/hr-better-typography/wrapping-and-punctuation.md +57 -0
- package/skills/hr-better-writing/LICENSE +22 -0
- package/skills/hr-better-writing/NOTICE.md +46 -0
- package/skills/hr-better-writing/SKILL.md +122 -0
- package/skills/hr-better-writing/agents/openai.yaml +3 -0
- package/skills/hr-change-impact/SKILL.md +113 -0
- package/skills/hr-change-impact/agents/openai.yaml +5 -0
- package/skills/hr-code-review/LICENSE +21 -0
- package/skills/hr-code-review/NOTICE.md +26 -0
- package/skills/hr-code-review/SKILL.md +147 -0
- package/skills/hr-code-review/agents/openai.yaml +3 -0
- package/skills/hr-code-review/references/evidence.md +57 -0
- package/skills/hr-design-exploration/SKILL.md +82 -0
- package/skills/hr-design-exploration/agents/openai.yaml +4 -0
- package/skills/hr-diagnosing-bugs/NOTICE.md +45 -0
- package/skills/hr-diagnosing-bugs/SKILL.md +108 -0
- package/skills/hr-diagnosing-bugs/agents/openai.yaml +3 -0
- package/skills/hr-diagnosing-bugs/references/reporting.md +72 -0
- package/skills/hr-explain-code/NOTICE.md +37 -0
- package/skills/hr-explain-code/SKILL.md +110 -0
- package/skills/hr-explain-code/agents/openai.yaml +5 -0
- package/skills/hr-explain-code/references/helper-brief.md +39 -0
- package/skills/hr-extract-shared-steps/SKILL.md +134 -0
- package/skills/hr-extract-shared-steps/agents/openai.yaml +3 -0
- package/skills/hr-handoff/SKILL.md +91 -0
- package/skills/hr-handoff/agents/openai.yaml +5 -0
- package/skills/hr-handoff/assets/ledger.example.json +10 -0
- package/skills/hr-handoff/assets/receipt.example.json +76 -0
- package/skills/hr-handoff/assets/source.example.json +20 -0
- package/skills/hr-handoff/references/reconciliation.md +105 -0
- package/skills/hr-handoff/scripts/check-reconciliation.mjs +282 -0
- package/skills/hr-house-rules-setup/SKILL.md +100 -0
- package/skills/hr-house-rules-setup/agents/openai.yaml +5 -0
- package/skills/hr-issue-tracker-setup/SKILL.md +49 -0
- package/skills/hr-issue-tracker-setup/agents/openai.yaml +5 -0
- package/skills/hr-lean-plan/SKILL.md +142 -0
- package/skills/hr-lean-plan/agents/openai.yaml +5 -0
- package/skills/hr-maintainability-review/SKILL.md +176 -0
- package/skills/hr-maintainability-review/agents/openai.yaml +5 -0
- package/skills/hr-manual-qa/NOTICE.md +36 -0
- package/skills/hr-manual-qa/SKILL.md +37 -0
- package/skills/hr-manual-qa/agents/openai.yaml +3 -0
- package/skills/hr-navigation-retro/LICENSE +21 -0
- package/skills/hr-navigation-retro/NOTICE.md +5 -0
- package/skills/hr-navigation-retro/SKILL.md +86 -0
- package/skills/hr-navigation-retro/agents/openai.yaml +4 -0
- package/skills/hr-navigation-retro/references/inputs.md +67 -0
- package/skills/hr-navigation-retro/scripts/retro.py +552 -0
- package/skills/hr-navigation-retro/scripts/transcripts.py +205 -0
- package/skills/hr-ordering-tests/SKILL.md +51 -0
- package/skills/hr-ordering-tests/agents/openai.yaml +2 -0
- package/skills/hr-plain-prose/SKILL.md +261 -0
- package/skills/hr-plain-prose/agents/openai.yaml +3 -0
- package/skills/hr-plain-prose/scripts/check.mjs +331 -0
- package/skills/hr-pr-followup/LICENSE +21 -0
- package/skills/hr-pr-followup/NOTICE.md +9 -0
- package/skills/hr-pr-followup/SKILL.md +71 -0
- package/skills/hr-pr-followup/agents/openai.yaml +2 -0
- package/skills/hr-pr-followup/references/review-helpers.md +90 -0
- package/skills/hr-pr-followup/scripts/check-pr-review.ts +510 -0
- package/skills/hr-pr-followup/scripts/resolve-pr-thread.ts +219 -0
- package/skills/hr-progress-report/SKILL.md +49 -0
- package/skills/hr-progress-report/agents/openai.yaml +5 -0
- package/skills/hr-read-reddit/SKILL.md +44 -0
- package/skills/hr-read-reddit/agents/openai.yaml +2 -0
- package/skills/hr-read-reddit/scripts/reddit.ts +252 -0
- package/skills/hr-read-x-links/SKILL.md +42 -0
- package/skills/hr-read-x-links/agents/openai.yaml +2 -0
- package/skills/hr-read-x-links/scripts/x-post.ts +264 -0
- package/skills/hr-split-to-prs/LICENSE +21 -0
- package/skills/hr-split-to-prs/NOTICE.md +9 -0
- package/skills/hr-split-to-prs/SKILL.md +61 -0
- package/skills/hr-split-to-prs/agents/openai.yaml +2 -0
- package/skills/hr-stock-ui-audit/SKILL.md +132 -0
- package/skills/hr-stock-ui-audit/agents/openai.yaml +3 -0
- package/skills/hr-stock-ui-audit/scripts/scan.mjs +619 -0
- package/skills/hr-tdd/LICENSE +21 -0
- package/skills/hr-tdd/NOTICE.md +10 -0
- package/skills/hr-tdd/SKILL.md +40 -0
- package/skills/hr-tdd/agents/openai.yaml +3 -0
- package/skills/hr-tdd/mocking.md +39 -0
- package/skills/hr-tdd/tests.md +77 -0
- package/skills/hr-test-audit/SKILL.md +146 -0
- package/skills/hr-test-audit/agents/openai.yaml +3 -0
- package/skills/hr-test-audit/scripts/floor-guard.ts +137 -0
- package/skills/hr-what-next/SKILL.md +61 -0
- package/skills/hr-what-next/agents/openai.yaml +4 -0
- package/skills/hr-what-next/references/reporting.md +68 -0
- package/skills/hr-writing-for-agents/NOTICE.md +46 -0
- package/skills/hr-writing-for-agents/SKILL-MECHANICS.md +83 -0
- package/skills/hr-writing-for-agents/SKILL.md +108 -0
- package/skills/hr-writing-for-agents/agents/openai.yaml +3 -0
- package/skills/hr-writing-pr/NOTICE.md +48 -0
- package/skills/hr-writing-pr/SKILL.md +104 -0
- package/skills/hr-writing-pr/agents/openai.yaml +2 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Skill mechanics
|
|
2
|
+
|
|
3
|
+
The skill-specific branch of [`hr-writing-for-agents`](SKILL.md): frontmatter, invocation choice, testing a description or output, and router skills. The main skill owns writing guidance.
|
|
4
|
+
|
|
5
|
+
## Invocation
|
|
6
|
+
|
|
7
|
+
Choose whether the host may select the skill implicitly or whether the user must request it. Keep a concise description that states its scope.
|
|
8
|
+
|
|
9
|
+
Configure invocation through the host's supported mechanism. [Codex documents](https://learn.chatgpt.com/docs/build-skills#optional-metadata) `policy.allow_implicit_invocation` in `agents/openai.yaml`; setting it to `false` prevents implicit invocation while explicit invocation remains available. Use `disable-model-invocation` only for a host whose documentation supports it.
|
|
10
|
+
|
|
11
|
+
When a user invokes a skill with arguments, Claude Code substitutes `$0`, `$1`, … and `$ARGUMENTS` anywhere in the skill text, so a price written as `$0.01` renders as the first argument followed by `.01`. Write amounts as `0.01 USD` in skill files.
|
|
12
|
+
|
|
13
|
+
Make each runnable block in a skill self-contained. Hosts differ on whether a variable, `cd` or sourced function survives from one tool call to the next, so a later block that needs a value says where to get it rather than relying on an earlier block's shell. Branches between blocks read better as numbered steps than as shell conditionals.
|
|
14
|
+
|
|
15
|
+
Do not assume an invocation setting hides metadata, prevents reading a referenced file, or has the same effect across hosts. Invocation policy alone does not establish context-token savings.
|
|
16
|
+
|
|
17
|
+
## Testing a description
|
|
18
|
+
|
|
19
|
+
A description is a context pointer, so judge a rewrite by whether it fires on
|
|
20
|
+
the right requests, not by how it reads. Compare the current and the new
|
|
21
|
+
wording on the same prompts: requests that should trigger the skill, taken
|
|
22
|
+
from real use where possible, plus near-misses that belong to a neighbouring
|
|
23
|
+
skill. Run each prompt at least three times per wording; one run is noise.
|
|
24
|
+
Keep the rewrite only when it fires more without firing on the near-misses,
|
|
25
|
+
then add the missed prompts as a trigger eval.
|
|
26
|
+
|
|
27
|
+
Test in an isolated copy of the skill catalog, never by editing installed
|
|
28
|
+
skill files, which every live session on the host reads. With Claude Code,
|
|
29
|
+
copy the skills into a scratch plugin, edit the copy, and read the first
|
|
30
|
+
`Skill` call from each run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
claude -p "<prompt>" --setting-sources project --plugin-dir <catalog-copy> \
|
|
34
|
+
--max-turns 2 --output-format stream-json --verbose
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`--setting-sources project` hides the user-level skills, so only the copy
|
|
38
|
+
loads. Run the repository's skill tests on the new frontmatter before
|
|
39
|
+
trusting a result: Claude Code accepts an unquoted description containing
|
|
40
|
+
`: `, but a strict YAML parser rejects it, so quote such descriptions.
|
|
41
|
+
Prompts lifted from old sessions often fire nothing without their
|
|
42
|
+
conversation; count that as a limit of the test set, not of the wording.
|
|
43
|
+
|
|
44
|
+
## Testing output
|
|
45
|
+
|
|
46
|
+
A trigger eval shows that the skill fires; an output case shows that it does
|
|
47
|
+
its job. Give each case a prompt that carries the whole input (a diff, a
|
|
48
|
+
scenario), so a run needs no repository.
|
|
49
|
+
|
|
50
|
+
- The runner sees only the prompt, in a fresh session. A separate judge grades
|
|
51
|
+
the reply against a bar: the outcome a good reply reaches and the smells that
|
|
52
|
+
fail it. Name a specific item only when missing it is the failure; a full
|
|
53
|
+
answer key tests conformance, not the skill's judgment.
|
|
54
|
+
- Run each case with and without the skill, at least three times per arm, and
|
|
55
|
+
read the delta, not the with-skill score. When the no-skill arm passes too,
|
|
56
|
+
the case cannot measure the skill: read both arms' replies, then raise the
|
|
57
|
+
bar to what the skill promises beyond a plain answer.
|
|
58
|
+
- Before editing the skill over a miss, decide whether the skill failed or the
|
|
59
|
+
bar asked for something the skill should not do. Fix the bar in the second
|
|
60
|
+
case.
|
|
61
|
+
- After an edit, re-run every case for that skill, since a fix can regress a
|
|
62
|
+
passing one.
|
|
63
|
+
- To compare wordings of one instruction, run five or more fresh samples per
|
|
64
|
+
wording plus a no-guidance control. If the control does not show the
|
|
65
|
+
failure, there is nothing to fix. Read the spread as well as the average: a
|
|
66
|
+
wording that gives the same result every run beats a noisier one with a
|
|
67
|
+
similar mean.
|
|
68
|
+
|
|
69
|
+
When your host has a skill-eval runner (Claude Code's `claude plugin eval`,
|
|
70
|
+
for example), run the cases under it: it supplies the fresh runner, a grader
|
|
71
|
+
and the no-skill arm. Check its help for how it selects several cases at once:
|
|
72
|
+
Claude Code's `--case` takes one glob and a repeated flag keeps only the last,
|
|
73
|
+
so select several cases by a shared name prefix (`--case 'audit-*'`), and the
|
|
74
|
+
replies land in the run's `aggregate-result.json`. Its results cover that
|
|
75
|
+
host's skill selection only; other hosts need their own runs.
|
|
76
|
+
|
|
77
|
+
## Splitting by invocation
|
|
78
|
+
|
|
79
|
+
Split off a skill when it handles a distinct task the user or another workflow needs to select independently. Define its trigger and invocation policy for the supported hosts. Keep shared reference in a plain file when several workflows need it.
|
|
80
|
+
|
|
81
|
+
## Router skills
|
|
82
|
+
|
|
83
|
+
A router names related skills and when to use them. State whether it suggests a skill to the user or invokes it under the active host's policy. Referencing a file and implicitly selecting a skill are separate operations; follow the host's rules for each.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hr-writing-for-agents
|
|
3
|
+
description: "How to write any document an agent reads: skills, AGENTS.md, CLAUDE.md, rules and the docs they point to (wording, structure, triggers, pruning). Use when drafting or revising that text in any repository."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Reference for writing any document an agent consumes: a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable, since the agent takes the same _process_ every run rather than producing the same output.
|
|
7
|
+
|
|
8
|
+
When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, testing a description or a skill's output, and router skills.
|
|
9
|
+
|
|
10
|
+
## Source ownership and adaptations
|
|
11
|
+
|
|
12
|
+
Choose the owning source within the selected scope. Keep portable shared guidance
|
|
13
|
+
with its shared owner, host settings and personal selections with their host,
|
|
14
|
+
and product commands, contracts and safeguards with their product. For mixed
|
|
15
|
+
content, split only the portions the user authorized. An ownership lookup does
|
|
16
|
+
not authorize edits, installation or publication.
|
|
17
|
+
|
|
18
|
+
Reusable third-party guidance may be contributed upstream or published as a
|
|
19
|
+
clearly identified adaptation within the selected scope. Check its licence before
|
|
20
|
+
copying or adapting it. Preserve required notices and source provenance, including
|
|
21
|
+
the revision when known. A vendor label identifies its source; assess permitted
|
|
22
|
+
adaptations rather than excluding them by that label alone. For house-rules
|
|
23
|
+
contributions, locate its checkout and follow `CONTRIBUTING.md` for notice placement.
|
|
24
|
+
Put pure credit in distributed notices; retain instruction references that help
|
|
25
|
+
the task. Standalone bundles must carry their required notices.
|
|
26
|
+
|
|
27
|
+
## Context pointers
|
|
28
|
+
|
|
29
|
+
Use local files for operational pointers to available guidance. In a skill,
|
|
30
|
+
bundle the target or name its path from a located checkout; source-relative
|
|
31
|
+
paths outside the installed skill can break. The local-reference check is
|
|
32
|
+
`guidance-links.mjs` in the located house-rules checkout. Its README describes
|
|
33
|
+
the gate, repository mappings and justified remote-reference annotations.
|
|
34
|
+
|
|
35
|
+
A **context pointer** is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in `AGENTS.md` naming a doc is the same object. The pointer's _wording_, not its target, decides when the agent reaches the material, and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
|
|
36
|
+
|
|
37
|
+
A pointer does two jobs: state what the material is, and list the **branches** that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
|
|
38
|
+
|
|
39
|
+
- **Front-load the leading word**: the pointer is where it does its triggering work.
|
|
40
|
+
- **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only distinct branches.
|
|
41
|
+
- **Cut identity the body already carries.**
|
|
42
|
+
|
|
43
|
+
## The two loads
|
|
44
|
+
|
|
45
|
+
Every document and pointer you add spends one of two budgets:
|
|
46
|
+
|
|
47
|
+
- **Context load** is the cost of always-loaded material on the agent's window: an `AGENTS.md` line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
|
|
48
|
+
- **Cognitive load** is the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise: it is the price of human agency; spend it where human judgement matters, remove it where it does not.
|
|
49
|
+
|
|
50
|
+
Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
|
|
51
|
+
|
|
52
|
+
## Information hierarchy
|
|
53
|
+
|
|
54
|
+
A document is built from two content types: **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand). The two mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
|
|
55
|
+
|
|
56
|
+
1. **In-file step** is the primary tier: what the agent does, in order.
|
|
57
|
+
2. **In-file reference** is consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung), which is a fine arrangement, not a smell.
|
|
58
|
+
3. **Disclosed reference** is pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
|
|
59
|
+
|
|
60
|
+
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
|
|
61
|
+
|
|
62
|
+
**Progressive disclosure** is the move down the ladder (out of the main file and behind a pointer) so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip: a variance lever, not just a legibility one.
|
|
63
|
+
|
|
64
|
+
**Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent. Grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
|
|
65
|
+
|
|
66
|
+
**Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
|
|
67
|
+
|
|
68
|
+
## Steps and completion criteria
|
|
69
|
+
|
|
70
|
+
Every step ends on a **completion criterion**, the condition that tells the agent the work is done. Two properties make it a lever:
|
|
71
|
+
|
|
72
|
+
- **Clarity**: can the agent tell done from not-done? A vague bound ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead (the **post-completion steps**) supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence. Hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
|
|
73
|
+
- **Demand**: how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** (the digging the agent does within the work, latent in the wording rather than written as its own step), and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.
|
|
74
|
+
|
|
75
|
+
The strongest criteria are both checkable and exhaustive.
|
|
76
|
+
|
|
77
|
+
## When to split
|
|
78
|
+
|
|
79
|
+
Splitting one document into two spends one of the two loads, so split only when the cut earns it:
|
|
80
|
+
|
|
81
|
+
- **By sequence**: split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
|
|
82
|
+
- **By invocation**, skill-specific: see [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md).
|
|
83
|
+
|
|
84
|
+
## Leading words
|
|
85
|
+
|
|
86
|
+
Reuse established domain terms when their meaning is clear to the intended reader. Keep explicit criteria where a shorter label would hide a constraint. Do not invent shorthand merely to reduce token count. Judge wording by whether it produces the intended behavior, not by its intensity.
|
|
87
|
+
|
|
88
|
+
State the desired behavior clearly. Retain explicit prohibitions when they define a real boundary, and pair them with the permitted behavior when that helps the reader act.
|
|
89
|
+
|
|
90
|
+
Choose the instruction's form from the failure it fixes:
|
|
91
|
+
|
|
92
|
+
| Observed failure | Form that fixes it | Form that backfires |
|
|
93
|
+
| -------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------- |
|
|
94
|
+
| Knows the rule, skips it under pressure | An explicit prohibition that names the workaround | Soft guidance ("prefer", "consider") |
|
|
95
|
+
| Complies, but the output has the wrong shape | A recipe: the output's parts, in order | A list of "don't" items, which the agent negotiates with |
|
|
96
|
+
| Leaves out a required element | A required slot in the template it fills in | A prose reminder near the template |
|
|
97
|
+
| Behavior depends on a condition | A conditional on something the agent can observe | An unconditional rule with exemption clauses |
|
|
98
|
+
|
|
99
|
+
Exemption and nuance clauses leak: "don't X unless it matters" reopens the decision, and "this limit doesn't apply to code blocks" still suppresses code blocks. Express a real exception as its own conditional, or restructure so the rule cannot reach the exempt part.
|
|
100
|
+
|
|
101
|
+
## Pruning
|
|
102
|
+
|
|
103
|
+
- Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** (the same meaning in more than one place) costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank.
|
|
104
|
+
- The **environment** is a source of truth too (`package.json` scripts, config files, the directory layout, `--help` output), and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
|
|
105
|
+
- A rule a **check** can enforce (a type, a lint rule, a test, a CI gate) lives in that check. An agent under pressure skips a prose rule but cannot pass a failing check. The document keeps only what the check cannot say: why the rule exists, where it deliberately does not apply, and the check's name, so an agent that trips it knows what to do instead. When you write a mechanical rule (a pattern a search could find, such as raw colour values outside the token file) and no check exists, add one in the same change, or state that the rule is unchecked.
|
|
106
|
+
- Document a **component beside the component**: its build, flags, layout, measurements and troubleshooting go in its directory's README or its header comment, with at most a one-line pointer from shared guidance. A shared file is read for many tasks; component detail there taxes every reader for a lookup only one task needs, and it drifts because nobody editing the component sees it.
|
|
107
|
+
- Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live. Rewrite durable guidance in place; keep incident history in the repository's tracker or archive rather than appending it to operational rules. An example goes stale the same way when it records the fix you applied: have it teach the failure and the tell that exposed it, and let the agent derive the fix from the current code.
|
|
108
|
+
- If an instruction adds no useful behavior, remove it. If behavior is missing, state the observable requirement or completion condition rather than adding stronger emphasis. Treat claims about wording effects as hypotheses unless supported by task evidence.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Source notices
|
|
2
|
+
|
|
3
|
+
This notice accompanies the hr-writing-pr bundle when copied on its own.
|
|
4
|
+
|
|
5
|
+
## sickn33/antigravity-awesome-skills
|
|
6
|
+
|
|
7
|
+
Source: https://github.com/sickn33/antigravity-awesome-skills (compared at revision `7bb0ab4`)
|
|
8
|
+
|
|
9
|
+
- `skills/hr-writing-pr/SKILL.md`: selected ideas from
|
|
10
|
+
`skills/git-pr-workflows-pr-enhance/`.
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Antigravity User
|
|
13
|
+
|
|
14
|
+
## humanlayer/skills
|
|
15
|
+
|
|
16
|
+
Source: https://github.com/humanlayer/skills (compared at revision `bba9d13ab34f0a87f1cc33df4dd196372393ddfc`)
|
|
17
|
+
|
|
18
|
+
- `skills/hr-explain-code/SKILL.md` and `skills/hr-writing-pr/SKILL.md`: compact
|
|
19
|
+
visual explanation and focused structural-diff guidance adapted from
|
|
20
|
+
`plugins/show-me/skills/show-me/SKILL.md`.
|
|
21
|
+
|
|
22
|
+
Copyright (c) 2026 HumanLayer
|
|
23
|
+
|
|
24
|
+
Selected ideas also come from [Luke Parker's writing-pr post](https://x.com/LukeParkerDev/status/2096769160021979571).
|
|
25
|
+
|
|
26
|
+
## house-rules and MIT permission notice
|
|
27
|
+
|
|
28
|
+
MIT License
|
|
29
|
+
|
|
30
|
+
Copyright (c) 2026 Aaron Queen
|
|
31
|
+
|
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
33
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
34
|
+
in the Software without restriction, including without limitation the rights
|
|
35
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
36
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
37
|
+
furnished to do so, subject to the following conditions:
|
|
38
|
+
|
|
39
|
+
The above copyright notice and this permission notice shall be included in all
|
|
40
|
+
copies or substantial portions of the Software.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
44
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
45
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
46
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
47
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
48
|
+
SOFTWARE.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hr-writing-pr
|
|
3
|
+
description: Write or revise pull request titles and bodies from the final diff, with concrete behavior and relevant proof. Use when preparing a PR or improving its description.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Writing pull requests
|
|
7
|
+
|
|
8
|
+
Give a reviewer who has not seen the conversation enough context to understand the change and assess its evidence. Follow the target repository's PR template and contribution rules. This skill governs writing; existing rules govern commits, publication, and review gates.
|
|
9
|
+
|
|
10
|
+
## Fix scope
|
|
11
|
+
|
|
12
|
+
For fixes intended for pull requests in any repository, try the simplest
|
|
13
|
+
adequate change first. Keep the diff focused and easy to review, with the fewest
|
|
14
|
+
changed lines and files that solve the problem while preserving correctness,
|
|
15
|
+
readability and required tests. Leave unrelated refactors and speculative
|
|
16
|
+
abstractions out. When performance requires a larger change, show measurements
|
|
17
|
+
explaining why the simpler approach is insufficient and what the added
|
|
18
|
+
complexity achieves.
|
|
19
|
+
|
|
20
|
+
## Material changes to an existing PR
|
|
21
|
+
|
|
22
|
+
When an existing PR needs major or material changes, replace it with a new
|
|
23
|
+
PR in any repository. Compare the proposed revision with the published PR.
|
|
24
|
+
A revision is major or material if it changes the scope, fix approach or
|
|
25
|
+
promised behavior.
|
|
26
|
+
Corrections within that scope and approach that preserve the promised behavior
|
|
27
|
+
are routine. Carry forward relevant evidence and unresolved review findings,
|
|
28
|
+
and link the old and new PRs both ways. Publish and verify the replacement
|
|
29
|
+
before closing the old PR as superseded. Recheck its final diff and required
|
|
30
|
+
checks; prior PR review approvals and CI results do not cover the new submission.
|
|
31
|
+
Routine corrections that leave the PR materially unchanged stay in place.
|
|
32
|
+
|
|
33
|
+
## Read before writing
|
|
34
|
+
|
|
35
|
+
Before creating a PR, apply the submission search in your loaded agent guidance's "Repository work" section.
|
|
36
|
+
If that section is unavailable, locate the local house-rules checkout and read
|
|
37
|
+
`rules/core.md` there. Report an unavailable local source before submitting.
|
|
38
|
+
|
|
39
|
+
Inspect the actual diff against the intended target branch, the linked issue or request, and available validation results. For an existing PR, confirm its current base and head. Commit messages can provide context; the final diff determines what the PR claims.
|
|
40
|
+
|
|
41
|
+
Resolve mismatches between the description and the implementation before calling the description complete. If evidence is unavailable, state the specific gap rather than inventing a result.
|
|
42
|
+
|
|
43
|
+
## Title and body
|
|
44
|
+
|
|
45
|
+
Write a title naming the resulting behavior or fixed failure. Use the repository's title convention when it has one. Check the title's type and scope against the diff's dominant change. A `docs:` title on a diff that adds an executable installer misfiles the squash commit. When no PR template exists, the title convention is the only template; default to Conventional Commits `type(scope):` unless the repository's recent history uses another style. Flag a mixed diff as a possible split into separate PRs (the `hr-split-to-prs` skill, where installed) instead of stretching the title to cover it.
|
|
46
|
+
|
|
47
|
+
Lead the body with the concrete problem and resulting behavior. A small change may need only a paragraph and a validation sentence. Expand only where the reviewer needs more context:
|
|
48
|
+
|
|
49
|
+
- **Bug fix:** trigger, previous behavior, corrected behavior, and regression proof.
|
|
50
|
+
- **Feature:** observable capability, a small usage example, and supported limits.
|
|
51
|
+
- **Refactor:** motivation, the structural change, and evidence that required behavior is preserved.
|
|
52
|
+
|
|
53
|
+
Explain implementation details only when they clarify a decision or help assess correctness. Include compatibility, dependency, migration, or documentation implications when the diff creates them. When the change has a hard-to-reverse surface (host-level effects such as `sudo install-deps`, migrations, destructive actions), say so in one sentence; never a fixed risk section, and nothing on purely additive changes. Identify a useful review starting point for a complex change, using `path:line` anchors for load-bearing claims.
|
|
54
|
+
|
|
55
|
+
Describe the final combined change. Leave out intermediate attempts, commit reshuffling, conversational history, and file inventories already visible in the diff. Write for the reviewer in plain language: no unexplained jargon, and no narrative about how the change was produced. Review panels, models consulted, harnesses, and agent process never appear in titles, bodies, or PR comments; that detail lives in plan files and session records. For routine clarifications, update the title and body. Material scope changes follow the replacement rule above.
|
|
56
|
+
|
|
57
|
+
## Evidence that earns its space
|
|
58
|
+
|
|
59
|
+
Report relevant checks and their actual outcomes, including material failures and unverified behavior. Name the tests or commands run and their scope; a suite-wide pass count alone is not evidence for the changed behavior. When generated files dominate the diff, give the authored line count alongside the headline number so the size does not mislead review. Distinguish newly introduced failures from established baseline failures only when a comparison supports that claim. Keep detailed logs in a linked artifact when the short result is sufficient.
|
|
60
|
+
|
|
61
|
+
Use a small code example when it makes behavior concrete. For visual changes, use comparable before/after images when available. When the change replaces an existing procedure, state the prior and new procedure in one line each. For measured performance claims, follow the installed `hr-benchmarking` skill's
|
|
62
|
+
"Report and decide" guidance for benefit columns, variability and claim limits.
|
|
63
|
+
When that skill is unavailable, identify the baseline and candidate, workload,
|
|
64
|
+
repetitions and variability, and show before/after metrics with percent or times
|
|
65
|
+
benefit. Keep material limitations beside the results.
|
|
66
|
+
|
|
67
|
+
For reproduction examples, apply the direct-command and material-condition
|
|
68
|
+
guidance in the installed `hr-diagnosing-bugs` skill's `references/reporting.md`.
|
|
69
|
+
When that skill is unavailable, show commands that reproduce the symptom and
|
|
70
|
+
omit incidental scheduling, resource-control and observer wrappers. Keep exact
|
|
71
|
+
executed commands and material conditions in the measurement record. Disclose
|
|
72
|
+
material conditions beside performance results. Retain any control required to
|
|
73
|
+
reproduce the defect and explain its purpose.
|
|
74
|
+
|
|
75
|
+
When the existing shape is familiar, use a focused diff of calls, components
|
|
76
|
+
or files to show the change. Use a diagram when it explains relationships more
|
|
77
|
+
clearly than prose. Show the whole relevant block when omitted context would
|
|
78
|
+
hide ownership, order or a guard. Keep verification and uncertainty beside
|
|
79
|
+
the view; brevity does not remove required evidence.
|
|
80
|
+
|
|
81
|
+
Put the measured result table after the change summary and before lengthy
|
|
82
|
+
verification details, within the repository's required template. Explain the
|
|
83
|
+
result without repeating the table's numbers. Keep the relevant checks and
|
|
84
|
+
outcomes visible; collapse long commands or supporting detail when useful.
|
|
85
|
+
Required scope or approval sections stay, with only the justification and links
|
|
86
|
+
the reviewer needs.
|
|
87
|
+
|
|
88
|
+
For qualified measured performance changes outside the declared no-clear-change
|
|
89
|
+
band, prefer a compact chart alongside the exact result table when it makes
|
|
90
|
+
comparisons easier to scan. Skip charts
|
|
91
|
+
that add no information, such as a single small change. Preview a proposed
|
|
92
|
+
visual with the user before publishing a new visual style. Use labeled units,
|
|
93
|
+
zero-based bar axes, readable contrast and meaningful precision. Show the
|
|
94
|
+
workload and material limits beside it; a synthetic benchmark is not a
|
|
95
|
+
production or UI speedup. Keep the table or equivalent text accessible, and
|
|
96
|
+
attach PR-only graphics without committing them to the product repository.
|
|
97
|
+
|
|
98
|
+
Scale structure to the change. Omit empty optional sections, placeholder text, guessed risk scores or review times, and coverage percentages that were not measured. Complete a required checklist with this PR's specifics rather than omitting it, and mark non-applicable items N/A with a reason. Preserve required template sections and mark unavailable evidence honestly.
|
|
99
|
+
|
|
100
|
+
## Completion check
|
|
101
|
+
|
|
102
|
+
Every factual claim must be supported by inspected code, the originating request, or observed results. The opening explains what changes and why; the remaining text helps review it. Deliver the title and body in the form requested. Apply them to a remote PR only within the user's authorized scope. When the user's rules turn attribution off, include no `Made with` or other host attribution. After `gh pr create` or `gh pr edit`, reread the published body and strip any footer a harness appended.
|
|
103
|
+
|
|
104
|
+
Relevant validation stays in the description; extensive templates and review automation are outside this skill.
|