agent-concepts 0.0.0-stage → 0.4.1
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/LICENSE +21 -0
- package/README.md +773 -2
- package/concepts/bc-brainstorming/body/SKILL.md +43 -0
- package/concepts/bc-code-review/body/SKILL.md +120 -0
- package/concepts/bc-codebase-design/body/SKILL.md +54 -0
- package/concepts/bc-codebase-docs/body/SKILL.md +150 -0
- package/concepts/bc-council-audit-security/body/SKILL.md +72 -0
- package/concepts/bc-council-chain/body/SKILL.md +71 -0
- package/concepts/bc-council-challenge-plan/body/SKILL.md +78 -0
- package/concepts/bc-council-find-bugs/body/SKILL.md +70 -0
- package/concepts/bc-council-improve-architecture/body/SKILL.md +52 -0
- package/concepts/bc-council-mode/body/SKILL.md +56 -0
- package/concepts/bc-council-mode/body/examples/agents/README.md +11 -0
- package/concepts/bc-council-mode/body/examples/agents/council-change.md +14 -0
- package/concepts/bc-council-mode/body/examples/agents/council-compat.md +14 -0
- package/concepts/bc-council-mode/body/examples/agents/council-risk.md +14 -0
- package/concepts/bc-council-mode/body/references/pass-contracts.md +133 -0
- package/concepts/bc-delegate-investigation/body/SKILL.md +119 -0
- package/concepts/bc-delegate-investigation/body/examples/pi-settings-snippet.json +8 -0
- package/concepts/bc-delegate-investigation/body/pi.md +170 -0
- package/concepts/bc-design/body/SKILL.md +49 -0
- package/concepts/bc-design/body/design-framework.md +39 -0
- package/concepts/bc-design/body/existing-app.md +9 -0
- package/concepts/bc-design/body/new-work.md +22 -0
- package/concepts/bc-design/body/principles.md +34 -0
- package/concepts/bc-design/body/surfaces.md +13 -0
- package/concepts/bc-diagnosing-bugs/body/SKILL.md +83 -0
- package/concepts/bc-dispatching-parallel-agents/body/SKILL.md +63 -0
- package/concepts/bc-domain-modeling/body/SKILL.md +40 -0
- package/concepts/bc-executing-plans/body/SKILL.md +50 -0
- package/concepts/bc-explain-visually/body/SKILL.md +167 -0
- package/concepts/bc-find-bugs/body/SKILL.md +90 -0
- package/concepts/bc-finishing-development-branch/body/SKILL.md +73 -0
- package/concepts/bc-grilling/body/SKILL.md +22 -0
- package/concepts/bc-handoff/body/SKILL.md +104 -0
- package/concepts/bc-handoff/body/pickup.md +107 -0
- package/concepts/bc-handoff/body/writing.md +217 -0
- package/concepts/bc-improve-codebase-architecture/body/SKILL.md +101 -0
- package/concepts/bc-json-canvas/body/SKILL.md +40 -0
- package/concepts/bc-json-canvas/body/references/EXAMPLES.md +71 -0
- package/concepts/bc-json-canvas/body/references/SPEC.md +55 -0
- package/concepts/bc-json-canvas/body/references/VALIDATION.md +26 -0
- package/concepts/bc-minimal-solution-ladder/body/SKILL.md +120 -0
- package/concepts/bc-obsidian-bases/body/SKILL.md +59 -0
- package/concepts/bc-obsidian-bases/body/references/EXAMPLES.md +80 -0
- package/concepts/bc-obsidian-bases/body/references/FUNCTIONS.md +49 -0
- package/concepts/bc-obsidian-bases/body/references/SYNTAX.md +82 -0
- package/concepts/bc-obsidian-bases/body/references/TROUBLESHOOTING.md +41 -0
- package/concepts/bc-obsidian-markdown/body/SKILL.md +47 -0
- package/concepts/bc-obsidian-markdown/body/references/CALLOUTS.md +40 -0
- package/concepts/bc-obsidian-markdown/body/references/EMBEDS.md +35 -0
- package/concepts/bc-obsidian-markdown/body/references/PROPERTIES.md +37 -0
- package/concepts/bc-optimize-code/body/SKILL.md +41 -0
- package/concepts/bc-performance-guardrails/body/SKILL.md +53 -0
- package/concepts/bc-performance-guardrails/body/measuring.md +29 -0
- package/concepts/bc-performance-guardrails/body/targets.md +20 -0
- package/concepts/bc-pipeline-to-done/body/SKILL.md +205 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-auditor.md +19 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-reviewer.md +19 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-worker.md +19 -0
- package/concepts/bc-pipeline-to-done/body/execute-issue.md +71 -0
- package/concepts/bc-pipeline-to-done/body/recovery-bundle.md +79 -0
- package/concepts/bc-pipeline-to-done/body/review-contract.md +105 -0
- package/concepts/bc-pipeline-to-done/body/roles.md +13 -0
- package/concepts/bc-pipeline-to-done/body/scripts/publish-check.py +172 -0
- package/concepts/bc-pipeline-to-done/body/source-issues.md +86 -0
- package/concepts/bc-pipeline-to-done/body/source-work-items.md +76 -0
- package/concepts/bc-plain-language/body/SKILL.md +134 -0
- package/concepts/bc-plan-slicing/body/SKILL.md +56 -0
- package/concepts/bc-plan-to-pipeline/body/SKILL.md +89 -0
- package/concepts/bc-prd-drafting/body/SKILL.md +43 -0
- package/concepts/bc-prompting-agents/body/SKILL.md +278 -0
- package/concepts/bc-prototype/body/SKILL.md +40 -0
- package/concepts/bc-qmd/body/SKILL.md +64 -0
- package/concepts/bc-research/body/SKILL.md +26 -0
- package/concepts/bc-security-audit/body/AI-AND-LLM.md +25 -0
- package/concepts/bc-security-audit/body/ATTACK-CLASSES.md +35 -0
- package/concepts/bc-security-audit/body/DESKTOP-MOBILE-AND-LOCAL-IPC.md +28 -0
- package/concepts/bc-security-audit/body/RECONNAISSANCE.md +49 -0
- package/concepts/bc-security-audit/body/SKILL.md +117 -0
- package/concepts/bc-security-audit/body/SUPPLY-CHAIN-AND-RELEASE.md +28 -0
- package/concepts/bc-security-audit/body/VALIDATION-AND-REPORTING.md +124 -0
- package/concepts/bc-security-audit/body/WEB-PROTOCOL-AND-AUTH.md +27 -0
- package/concepts/bc-security-audit/body/validate_audit.py +151 -0
- package/concepts/bc-self-improve/body/SKILL.md +104 -0
- package/concepts/bc-seo/body/CITATIONS.md +23 -0
- package/concepts/bc-seo/body/IMAGE-SEO.md +350 -0
- package/concepts/bc-seo/body/SKILL.md +453 -0
- package/concepts/bc-setup-project/body/SKILL.md +252 -0
- package/concepts/bc-setup-project/body/scaffold.py +2751 -0
- package/concepts/bc-setup-project/body/starter-items.md +157 -0
- package/concepts/bc-setup-project/body/work-data.md +114 -0
- package/concepts/bc-setup-project/body/work_index.py +626 -0
- package/concepts/bc-setup-project/body/work_spent.py +220 -0
- package/concepts/bc-subagent-driven-development/body/SKILL.md +61 -0
- package/concepts/bc-tdd/body/SKILL.md +184 -0
- package/concepts/bc-tdd/body/formal.md +77 -0
- package/concepts/bc-tdd/body/mocking.md +49 -0
- package/concepts/bc-tdd/body/properties.md +59 -0
- package/concepts/bc-tdd/body/refactoring.md +12 -0
- package/concepts/bc-tdd/body/scripts/confirm-red.py +136 -0
- package/concepts/bc-tdd/body/tests.md +59 -0
- package/concepts/bc-teach/body/GLOSSARY-FORMAT.md +36 -0
- package/concepts/bc-teach/body/LEARNING-RECORD-FORMAT.md +60 -0
- package/concepts/bc-teach/body/MISSION-FORMAT.md +34 -0
- package/concepts/bc-teach/body/RESOURCES-FORMAT.md +53 -0
- package/concepts/bc-teach/body/REVIEW-FORMAT.md +48 -0
- package/concepts/bc-teach/body/SKILL.md +281 -0
- package/concepts/bc-teach/body/WIKI-FORMAT.md +58 -0
- package/concepts/bc-teach/body/scripts/due.py +65 -0
- package/concepts/bc-to-spec/body/SKILL.md +21 -0
- package/concepts/bc-to-tickets/body/SKILL.md +21 -0
- package/concepts/bc-triage/body/AGENT-BRIEF.md +38 -0
- package/concepts/bc-triage/body/OUT-OF-SCOPE.md +51 -0
- package/concepts/bc-triage/body/SKILL.md +81 -0
- package/concepts/bc-unslop/body/SKILL.md +269 -0
- package/concepts/bc-using-git-worktrees/body/SKILL.md +91 -0
- package/concepts/bc-wiki-maintain/body/SKILL.md +361 -0
- package/concepts/bc-wiki-maintain/body/runner/README.md +552 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.service +24 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.timer +15 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.service +29 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.timer +16 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.service +28 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.timer +12 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-notify@.service +15 -0
- package/concepts/bc-wiki-maintain/body/runner/notify-failure.sh +92 -0
- package/concepts/bc-wiki-maintain/body/runner/run-lint.sh +69 -0
- package/concepts/bc-wiki-maintain/body/runner/run-promotion-all.sh +103 -0
- package/concepts/bc-wiki-maintain/body/runner/run-promotion.sh +270 -0
- package/concepts/bc-wiki-maintain/body/wiki_lint.py +958 -0
- package/concepts/bc-wiki-maintain/body/wiki_search.py +206 -0
- package/concepts/bc-work-sync/body/PLAN.md +46 -0
- package/concepts/bc-work-sync/body/SKILL.md +71 -0
- package/concepts/bc-writing-plans/body/SKILL.md +79 -0
- package/package.json +130 -4
- package/packages/agent-kernel-pi/AGENT-KERNEL.md +109 -0
- package/packages/agent-kernel-pi/index.js +8 -0
- package/packages/agent-kernel-pi/package.json +12 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Pi mechanics for bc-delegate-investigation
|
|
2
|
+
|
|
3
|
+
Concrete syntax for the `subagent` tool from the `pi-subagents` extension. The contract in `SKILL.md` is harness-neutral; this file is not. In Pi, if `subagent` is missing, stop Pi dispatch and tell the user to install `pi-subagents` and restart Pi. In other harnesses, keep the four rules and use their equivalent primitives for durable output and retained runs.
|
|
4
|
+
|
|
5
|
+
## Run directory
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
${XDG_STATE_HOME:-$HOME/.local/state}/bc-swarm/<YYYY-MM-DD>-<slug>/
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`mkdir -p` it **before** dispatch. A child cannot write to a directory that does not exist, and it discovers this at the end of its run, which is the worst possible moment. The manifest goes at `manifest.md` in that root. Why not `/tmp`: a reboot clears it mid-run, taking the manifest, logs and worktree with it; the state directory survives reboots and stays on this machine. Old run folders are removed automatically after 7 days (where the machine runs a cleanup job; check its agent instructions), so do not clean them by hand, and promote anything needed longer out of the run folder.
|
|
12
|
+
|
|
13
|
+
## Fan-out
|
|
14
|
+
|
|
15
|
+
Run the project's or machine's storage health check, if one exists (check the project's and machine's agent instructions and docs), before multi-worker launch or managed worktree creation; stop/report on critical or unknown health, or if an existing check cannot run. If no storage health check is configured, skip it and note that in one line in the report. Why: harness-managed isolation still allocates storage.
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
subagent({
|
|
19
|
+
async: true,
|
|
20
|
+
options: { script: `
|
|
21
|
+
const OUT = "<run dir, absolute>/"; // e.g. the expanded ~/.local/state/bc-swarm/2026-08-18-dsh-recon/
|
|
22
|
+
return await runs.all([
|
|
23
|
+
{ key: "notes", agent: "scout", output: OUT + "notes.md", task: "..." },
|
|
24
|
+
{ key: "docs", agent: "scout", output: OUT + "docs.md", task: "..." },
|
|
25
|
+
]);
|
|
26
|
+
` },
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The script goes in `options.script`; do not also pass `workflow: true` (the tool rejects the pair: "options.script replaces workflow"). `workflow: true` on its own is the other form: it runs one fenced `js workflow` block written in the same reply. There is no top-level `workflowScript` parameter.
|
|
31
|
+
|
|
32
|
+
`output` is per child and must be distinct. The path is injected into the child as an authoritative override, so the child does not need to be told the path twice in its task text — but it does need to be told to *append as it goes*.
|
|
33
|
+
|
|
34
|
+
Pick roles by authority, not convenience: `scout` for bounded recon, `researcher` for external facts, `reviewer` for independent critique, `oracle` for hard judgment. Fan-out of `scout` children is the common shape. To give read-only roles a default tool-call budget (soft nudge, then a hard stop on reads), set `subagents.agentOverrides` in Pi's `settings.json`; [examples/pi-settings-snippet.json](examples/pi-settings-snippet.json) shows the values this skill was tuned with (scout 100/110, reviewer 45/50).
|
|
35
|
+
|
|
36
|
+
Before sending a `reviewer` to check a worktree worker's commit, write `git diff <baseCommit> <tip>` to a file in the run directory and give the reviewer that path. Why: the reviewer role has no shell, and once the worker's worktree is cleaned up the commit exists only as git objects it cannot read (2026-11-21: a reviewer stopped and asked for the diff).
|
|
37
|
+
|
|
38
|
+
For ordinary dispatch, omit both `model` and child `thinking` when the selected role's configured route is correct. Child `thinking` is not a routing control: current child execution ignores it. If an explicit override is needed, preserve the full effective model value, including its thinking suffix, for example:
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
{ key: "notes", agent: "scout", model: "openai-codex/gpt-5.6-luna:max", output: OUT + "notes.md", task: "..." }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Never copy or pass the bare `openai-codex/gpt-5.6-luna` registry id when the configured route is `:max`: the 2026-08-25 matrix showed that shape running at scout frontmatter low. Every probe in that matrix used `scout`; worker and reviewer fallback behavior was not tested. The nickname `model: "luna"` is not a registry id and fails closed (`Unknown subagent model 'luna'`). Chat and the manifest keep the routing name (`Luna max`) as effective-route metadata; they do not require those fields in the child object.
|
|
45
|
+
|
|
46
|
+
A child `thinking` field or a bare model belongs only in a deliberate reproduction probe for this behavior, not in an ordinary swarm launch.
|
|
47
|
+
|
|
48
|
+
Children do not inherit the swarm kernel, so the swarm-mode parent must copy the own-line `Commit:`/`Branch:` requirement into every worktree worker task. Keep the scoped worker bullet from `SKILL.md` in that packet; recon tasks do not need it.
|
|
49
|
+
|
|
50
|
+
## Failure modes observed on this machine
|
|
51
|
+
|
|
52
|
+
**Children silently share one default output path.** Omitting `output` makes every child resolve to the same configured default (`<cwd>/context.md`), and the workflow aborts with `Workflow children 'notes' and 'docs' resolve output to the same path`. Always set `output` explicitly per child. This one fails cheaply — under 100ms — but it aborts the entire fan-out before any child runs.
|
|
53
|
+
|
|
54
|
+
**A blocking fan-out loses everything at once.** 2026-08-18: five `scout` children launched with `async:false`. The Herdr pane hosting the session died and had to be reopened; the parent and all five foreground children went with it. `coredumpctl` showed no dump and `systemd-oomd` logged no kill — no segfault, no memory exhaustion, the host container simply vanished. Afterwards `children.list` retained nothing, no artifact had been written, and the tool result returned `[no tool result recorded]`. Total recoverable output: zero, from five children. This is the evidence behind rule 2.
|
|
55
|
+
|
|
56
|
+
**A broad scout dies at context compaction.** 2026-09-26: three `scout` children (Luna max, default 100/110 tool budget) were each asked to evaluate a whole external repository, one of them 292 skills. All three failed with `This operation was aborted` at a context peak of 174–176k tokens, each with one `compaction_start` event in `events.jsonl` and no later progress; resuming one failed at once with `Cannot submit a prompt while compaction is in progress`. The tool budget never fired — 75–82 calls. What survived was whatever each child had already appended to its artifact: one empty template and two partial reports holding two usable candidates each. Four narrower replacements (one surface each, `toolBudget` 30–50, told to skim with `head`/`rg` rather than read whole files) all finished. Size a scout's scope to fit well under one context window, because the tool budget does not bound tokens; do not resume a child that died at compaction — relaunch the missing part narrowly and keep the partial artifact.
|
|
57
|
+
|
|
58
|
+
**Worktree isolation refuses a dirty checkout, including someone else's dirt.** `worktree: true` fails before any child runs with `worktree isolation requires a clean git working tree` when the child's `cwd` has any uncommitted or untracked file — also one left by another live session in the same repository. Do not commit, stash or delete that session's files to make the launch pass. Instead create a base worktree for the track (`git worktree add -b <int-branch> <run-dir>/wt-<key> <base>`) and give it as the child's `cwd`; the managed worktree is then cut from that clean checkout, and the parent integrates the child's commits into the integration branch, then onto the main branch. Remove the base worktree and branch after integration proof. Seen twice in one session (2026-11-21, 2026-11-22).
|
|
59
|
+
|
|
60
|
+
**A long command inside a worktree worker dies with the worker.** 2026-11-27: two `worker` children each ran a stranger end-to-end script of about 30 minutes in their managed worktrees and hit the child timeout (`Subagent timed out after 1800000ms`). A timed-out worker's worktree is removed, which pulls the directory out from under a script still running there; the parent had to resume one child and grade the other run itself. Run any command expected to take more than about 20 minutes from the parent's own checkout, detached, with a completion wake (see Waiting), and give a worker only the bounded part: preparing the change before, or grading the evidence and fixing after.
|
|
61
|
+
|
|
62
|
+
## Worktree lifecycle (pi-subagents 0.56.0)
|
|
63
|
+
|
|
64
|
+
A successful managed-worktree handoff captures the child diff as a patch and records
|
|
65
|
+
it in the runtime handoff JSON, then removes the temporary worktree and its
|
|
66
|
+
`pi-parallel-*` branch. Preserved worktrees or branches are exceptions: cleanup
|
|
67
|
+
refused because the child was dirty/divergent, capture was missing, or a retained
|
|
68
|
+
child still needs its managed CWD. Do not infer retention from a successful
|
|
69
|
+
handoff, and do not treat a cleaned worktree as resumable.
|
|
70
|
+
|
|
71
|
+
After parent integration, record the ancestry/patch-equivalence proof in the manifest. If the harness already removed the worktree, record that there is nothing to remove; otherwise apply safe cleanup (`bc-using-git-worktrees`) only to clean inactive owned state. Why: patch capture is not integration proof, and preserved exceptions may hold useful work.
|
|
72
|
+
|
|
73
|
+
## Recovery, in order
|
|
74
|
+
|
|
75
|
+
Use the recorded paths and identity; do not guess from temporary-directory names. A prompt naming an interrupted, failed, empty, missing, or reaped run is recovery even when it says redo or relaunch. Before naming a replacement track, execute this order. Never stash, delete, move, or overwrite prior-run evidence merely to make a replacement launchable.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
# 1. What was dispatched.
|
|
79
|
+
cat "$RUN_DIR/manifest.md"
|
|
80
|
+
|
|
81
|
+
# 2. Which declared artifacts exist and contain records.
|
|
82
|
+
find "$RUN_DIR" -maxdepth 3 -type f -print | sort
|
|
83
|
+
# Read each artifact path from the manifest; inspect its own-line Commit:/Branch: records.
|
|
84
|
+
|
|
85
|
+
# 3. Ask Pi for retained output, artifactPaths, and the handoff path.
|
|
86
|
+
# Run this as a subagent tool call, not as a filesystem guess:
|
|
87
|
+
# subagent({ action: "children.list" })
|
|
88
|
+
|
|
89
|
+
# 4. Worktree tracks only: use the exact child entry from the handoff JSON.
|
|
90
|
+
# Bind CHILD, EXPECTED_BRANCH, BASE, and PATCH from that entry and manifest;
|
|
91
|
+
# do not infer any of them from a temporary-directory name.
|
|
92
|
+
# Require all of these before treating the patch as recovery:
|
|
93
|
+
# - this exact child; patch.branch and Branch: equal EXPECTED_BRANCH
|
|
94
|
+
# - nonempty file (`test -s "$PATCH"`)
|
|
95
|
+
# - patch.changed == true
|
|
96
|
+
# - no patch.error or capture error
|
|
97
|
+
# - handoff baseCommit == the expected BASE, which is a commit
|
|
98
|
+
# An empty, error, mismatched, or wrong-base patch is not recovery.
|
|
99
|
+
# Inspect it, then require the check before mutation:
|
|
100
|
+
git -C "$REPO" apply --check "$PATCH"
|
|
101
|
+
# Only after that succeeds:
|
|
102
|
+
git -C "$REPO" apply "$PATCH"
|
|
103
|
+
# Verify the resulting diff/tree before any commit or report.
|
|
104
|
+
|
|
105
|
+
# 5. If there is no usable patch, inspect only the LAST complete own-line
|
|
106
|
+
# Commit:/Branch: pair. Earlier records are untrusted evidence, not
|
|
107
|
+
# candidates. Bind TIP and RECORDED_BRANCH from that pair and
|
|
108
|
+
# EXPECTED_BRANCH/BASE from the exact child handoff; a none/none pair is
|
|
109
|
+
# only the no-commit case and cannot authorize integration.
|
|
110
|
+
printf '%s\n' "$TIP" | grep -Eq '^[0-9a-f]{40}$'
|
|
111
|
+
test "$RECORDED_BRANCH" = "$EXPECTED_BRANCH"
|
|
112
|
+
# Full format is not enough: Git must resolve the candidate as a commit.
|
|
113
|
+
test "$(git -C "$REPO" cat-file -t "$TIP")" = commit
|
|
114
|
+
git -C "$REPO" rev-parse --verify "${TIP}^{commit}"
|
|
115
|
+
# Successful cleanup may remove the expected local branch. If its ref
|
|
116
|
+
# remains, it must resolve to exactly the candidate tip; absence is allowed:
|
|
117
|
+
if git -C "$REPO" show-ref --verify --quiet "refs/heads/$EXPECTED_BRANCH"; then
|
|
118
|
+
test "$(git -C "$REPO" rev-parse --verify "refs/heads/$EXPECTED_BRANCH^{commit}")" = "$TIP"
|
|
119
|
+
fi
|
|
120
|
+
# Validate the handoff's expected base and inspect the complete linear range,
|
|
121
|
+
# not only TIP, before integration:
|
|
122
|
+
git -C "$REPO" rev-parse --verify "${BASE}^{commit}"
|
|
123
|
+
git -C "$REPO" rev-list --parents --reverse "$BASE..$TIP"
|
|
124
|
+
# Require one ordered parent chain rooted at BASE; stop on non-linear or
|
|
125
|
+
# ambiguous history. Inspect the candidate's resulting tree/diff:
|
|
126
|
+
git -C "$REPO" diff --stat "$BASE" "$TIP"
|
|
127
|
+
git -C "$REPO" diff "$BASE" "$TIP"
|
|
128
|
+
# If this succeeds, TIP is already integrated:
|
|
129
|
+
git -C "$REPO" merge-base --is-ancestor "$TIP" HEAD
|
|
130
|
+
# If HEAD == BASE, use only:
|
|
131
|
+
git -C "$REPO" merge --ff-only "$TIP"
|
|
132
|
+
# Otherwise require parent HEAD to be an advance from the same BASE:
|
|
133
|
+
git -C "$REPO" merge-base --is-ancestor "$BASE" HEAD
|
|
134
|
+
# Inspect the ordered BASE..TIP list and cherry-pick each commit in that
|
|
135
|
+
# order. Stop on conflict; never guess or cherry-pick TIP alone. Verify the
|
|
136
|
+
# resulting diff/tree.
|
|
137
|
+
|
|
138
|
+
# 6. Only when the handoff says cleanup was refused, inspect preserved state.
|
|
139
|
+
git -C "$REPO" worktree list
|
|
140
|
+
git -C "$REPO" branch --list "$EXPECTED_BRANCH"
|
|
141
|
+
# No patch plus no SHA does not license relaunch while this preserved state exists.
|
|
142
|
+
|
|
143
|
+
# 7. Last resort: only after TIP passed the full-SHA and commit checks above,
|
|
144
|
+
# exact-match that SHA. Never browse or select dangling objects:
|
|
145
|
+
git -C "$REPO" fsck --no-reflogs --lost-found | awk -v sha="$TIP" '$NF == sha'
|
|
146
|
+
|
|
147
|
+
# 8. Only now re-dispatch a track that has no usable artifact, valid handoff
|
|
148
|
+
# patch, recorded Git object, or preserved worktree/ref.
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`$PATCH`, `$TIP`, `$BASE`, `$RECORDED_BRANCH`, and `$EXPECTED_BRANCH` above come
|
|
152
|
+
from the exact artifact and runtime handoff; they are not values inferred from a
|
|
153
|
+
guessed `/tmp` name. A worktree artifact without valid own-line
|
|
154
|
+
`Commit:`/`Branch:` records is not a usable deliverable (`none`/`none` is valid
|
|
155
|
+
when no commit was made). A retained run can supply artifact and handoff paths,
|
|
156
|
+
but cannot reopen a worktree whose cleanup already removed it. The `git fsck`
|
|
157
|
+
line is valid only as an exact match against the already validated recorded SHA,
|
|
158
|
+
never as a way to browse or choose among dangling commits.
|
|
159
|
+
|
|
160
|
+
`/tmp/pi-subagent-*` directories are launch receipts only. They hold the child's
|
|
161
|
+
system prompt rather than its findings; listing them can confirm that a dispatch
|
|
162
|
+
happened but cannot recover a result.
|
|
163
|
+
|
|
164
|
+
Re-dispatch only the tracks with no usable artifact, valid handoff patch, recorded
|
|
165
|
+
Git object, or preserved worktree/ref.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## Waiting
|
|
169
|
+
|
|
170
|
+
Async fan-out should return control to the user and let the session wake on completion. Use `subagent_wait({ all: true })` only when the current turn genuinely must have the results before it ends — a run-to-completion request, or a headless run. Do not block a turn on a large fan-out merely to make it look synchronous; blocking is what rule 2 exists to prevent. On the first turn a completed worktree result is in front of the parent, apply its validated handoff patch or integrate its validated full commit range before any other dispatch; completion wake is not a reason to wait on the launch turn.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-design
|
|
3
|
+
description: >-
|
|
4
|
+
Use when creating, changing or reviewing anything a user sees or operates, on any surface (web page, extension, desktop, mobile, terminal UI or CLI). That includes layout and styling, but also wording (labels, help text, error and status messages), commands and flags, keyboard and focus, interaction states, accessibility and motion. Use it when a change needs a colour, size, control or message pattern the project lacks; when recording or checking a design decision so the project stays consistent; and when judging whether such a change is ready to ship. Skip when nothing user-facing changes; explanation diagrams go to bc-explain-visually.
|
|
5
|
+
---
|
|
6
|
+
# UI design
|
|
7
|
+
|
|
8
|
+
Design is everything a user sees or operates: look, wording, commands, keyboard, states, accessibility and motion, kept consistent across the project. Make it understandable and operable before polishing it. Scale the work to the change: one control in an established application needs the existing system and a capture, not a new art direction.
|
|
9
|
+
|
|
10
|
+
## Frame and design
|
|
11
|
+
|
|
12
|
+
Identify the surface and host, users, task, input modes, states, constraints and existing visual system. Preserve user references and established patterns. For an existing app read [existing-app.md](existing-app.md); for a new visual system read [new-work.md](new-work.md). Consult [surfaces.md](surfaces.md) for platform conventions and capture. When adding or restyling a control, or recording a design decision, read [design-framework.md](design-framework.md). Apply the ranked checks and evidence in [principles.md](principles.md) as relevant:
|
|
13
|
+
|
|
14
|
+
- Make actions discoverable, show status and results, prevent errors and support recovery.
|
|
15
|
+
- Support keyboard operation, visible focus, semantic names, contrast and distinctions beyond color.
|
|
16
|
+
- Group related things; give importance, alignment and typography a clear hierarchy.
|
|
17
|
+
- Fit targets to input, choices and density to the task, and layout to available space and settings.
|
|
18
|
+
- Design interaction states, use purposeful motion with reduced-motion support, and keep patterns and tokens consistent.
|
|
19
|
+
|
|
20
|
+
## Capture rule
|
|
21
|
+
|
|
22
|
+
A visible change or review is not done until the report lists capture paths and a written critique **for each image** against every numbered screenshot checklist item below. Critique the whole captured surface, including pre-existing defects outside the change; report them even if left unfixed. Mark inapplicable items as such. Inspect at full resolution and use 1:1 crops before calling a detail a defect: downscaling can invent defects. Write each round’s critique beside its captures before editing for the next round, not only in the final report, so interruptions leave evidence. Follow the naming and retention scheme in [surfaces.md](surfaces.md).
|
|
23
|
+
|
|
24
|
+
A small change needs at least one capture after the change. A redesign or work starting with a “looks bad” complaint needs a baseline plus at least two subsequent rounds; start from the owner’s screenshot when provided. Never overwrite the owner’s screenshot: copy it as the baseline round, and if asked to overwrite it, write a separate final file and keep the round files. Capture every surface the changed part, token or selector reaches, with its neighbours, not only the surface you worked on (a shared selector once changed a surface nobody captured), in the relevant host, size and states; use the relevant recipe in [surfaces.md](surfaces.md). Fix located material defects and recapture rather than trusting code or narration.
|
|
25
|
+
|
|
26
|
+
If capture is impossible, say why and report the work **visually unverified**, never visually verified. Screenshots do not prove keyboard handling, focus order, ARIA or behavior: check those separately using the non-visual checks in [principles.md](principles.md) and report what was and wasn't checked. A model score is never a ship criterion.
|
|
27
|
+
|
|
28
|
+
When delegating any visible change, copy the capture rule and screenshot checklist into the worker’s task text, along with the owner’s screenshot if there is one.
|
|
29
|
+
|
|
30
|
+
When a dedicated UI-designer agent is available, it can run the loop on presentation-only scope and report behavior bugs rather than fix them; the orchestrator opens the final images. For redesigns, when delegation is available and authorized, a fresh independent reviewer sees the brief, checklist and captures, not the designer's reasoning, and returns located defects, no score. Without one, self-critique against the checklist and state that no independent review was done; never call self-critique independent.
|
|
31
|
+
|
|
32
|
+
## Screenshot checklist
|
|
33
|
+
|
|
34
|
+
For each image, check the applicable items; capture focus and other states separately when needed.
|
|
35
|
+
|
|
36
|
+
1. Nothing is unintentionally clipped, cut off or overflowing at the captured size; deliberately scrollable content stays reachable.
|
|
37
|
+
2. No label or key wraps mid-phrase; a short label or key wrapping when its row has room is a defect wherever the break falls. Keys and short tokens stay on one line.
|
|
38
|
+
3. One primary action stands out; secondary actions are grouped, quieter and look like controls, not loose text.
|
|
39
|
+
4. Spacing follows the theme scale; controls align with neighbouring fields.
|
|
40
|
+
5. Type, colour and contrast match the existing theme; inspect each supported theme separately.
|
|
41
|
+
6. No unstyled native controls appear anywhere on the captured surface. A request to use a native control covers that control only; other unstyled controls are still defects to report.
|
|
42
|
+
7. Focus is visible in the focus-state capture.
|
|
43
|
+
8. Overlays are anchored, do not shift layout and are not clipped by their container.
|
|
44
|
+
|
|
45
|
+
## Report
|
|
46
|
+
|
|
47
|
+
In a non-interactive run, when no one can answer a question, take the recommended option, record the assumption in the report and continue rather than stopping.
|
|
48
|
+
|
|
49
|
+
List each image path, surface/host, dimensions and state, then its written checklist critique and any fixes or remaining defects. State separate interaction/accessibility checks and results, unverified items, and whether visual verification was possible. Give the user enough evidence to inspect the result independently.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Design framework
|
|
2
|
+
|
|
3
|
+
Use this when adding or restyling a control, or recording a design decision, in a project people use (GUI, TUI or CLI). Design here is everything a user sees or operates: look, interaction, keyboard and mouse, wording, information architecture, states, accessibility and motion. The goal is that short-lived agents build consistently without the owner re-deciding the same things.
|
|
4
|
+
|
|
5
|
+
## Start from the project's design README
|
|
6
|
+
|
|
7
|
+
Read the project's `docs/design/README.md` first; it lists the project's design pages and checks. If it is missing, copy the `DESIGN_README` text from `bc-setup-project`'s `body/scaffold.py` into `docs/design/README.md` in its own commit; do not run the scaffold just for this. Without `bc-setup-project`, write the sections Current truth vs decision log, Where a rule lives, Before adding or restyling a control, Pages, and Checks. Each project grows its own pages; there is no fixed page list.
|
|
8
|
+
|
|
9
|
+
## Name the part you reuse
|
|
10
|
+
|
|
11
|
+
Before adding or restyling any control, name the existing part you are reusing for that kind of control. This is the concrete form of "reuse them" in [existing-app.md](existing-app.md). If there is none, it is a new kind: follow [Decide once, in one place](#decide-once-in-one-place). Why: past drift came from building a second part beside one that already existed, not from misreading a rule.
|
|
12
|
+
|
|
13
|
+
## Where a rule lives
|
|
14
|
+
|
|
15
|
+
If two people could disagree about it, it is prose on a design page stating the current choice, whoever made it. If they could only differ by mistake, it is shared code or a design token. If it can be broken unnoticed and found by text search, it is a check. If it shows only on screen (alignment, matching neighbours), it is the screenshot review in [SKILL.md](SKILL.md#screenshot-checklist). Group tokens by role, not by value ([principles.md](principles.md) #17). Where a component takes a size or variant, prefer a type union (for example `type IconSize = 'sm' | 'md'`) over a check.
|
|
16
|
+
|
|
17
|
+
## Decide once, in one place
|
|
18
|
+
|
|
19
|
+
When the change needs something the project does not have yet (a colour, size, spacing, icon, wording pattern or new control kind), do not ask. Pick the closest fit to the existing look, define it once (a token in the project's token or theme file, or a shared part), and use it only from there, never as a literal value in the component. Record it on a design page, marked as the agent's choice the owner may change, and list it as one FYI line in the report. Why: the goal is consistency, not sign-off; a choice made in one place is one edit to change, while scattered literals need a thousand.
|
|
20
|
+
|
|
21
|
+
Ask the owner only when the change would contradict a recorded decision or design-page line, or remove or rename something users already rely on, or would fall under any stricter ask-case the project lists on its design README. Then put numbered pictures in `owner-notes/<item>/` (or the project's untracked notes folder) with a README of one line per picture; the owner replies like `1a 2a ok`. Show the control beside its neighbours in every supported theme; a text-only question needs no pictures. Copy only the pictures the owner must choose between into `owner-notes/<item>/`; working captures stay where [surfaces.md](surfaces.md) puts them. In a non-interactive run, follow the Report section of [SKILL.md](SKILL.md#report).
|
|
22
|
+
|
|
23
|
+
## Write path
|
|
24
|
+
|
|
25
|
+
Log an owner decision in the project's decision log when it is made. Record an agent choice on its design page. Either way, the design-page line lands in the same commit as the code that makes it true, and the plan names that step. Why: a line written at decision time describes behaviour that does not exist yet. A reviewer treats a page line that no longer matches the code as a finding.
|
|
26
|
+
|
|
27
|
+
## Keep pages small
|
|
28
|
+
|
|
29
|
+
Pages state current behaviour only: one fact per line, no history. Link decisions by number instead of copying their text. Split a page by question once it grows past about 200 lines, and add each page to the README's Pages list.
|
|
30
|
+
|
|
31
|
+
## Add a check when a control kind is first named
|
|
32
|
+
|
|
33
|
+
When a page first names a control kind and its forbidden alternatives, add a text-search check in the project's own test runner; no shared checker tool. Each rule's failure message names the part to use and the design-page line. An exception is a `design-allow <rule>: <reason>` comment on the line. Existing violations go in a per-file baseline that may only fall, so adding the check early costs nothing. List the check under Checks in the README.
|
|
34
|
+
|
|
35
|
+
If `~/.config/agent-concepts/overlays/bc-design.md` exists, read it: it may name a worked example of a project check. It never changes behaviour, and the project's own instructions take precedence.
|
|
36
|
+
|
|
37
|
+
## Capture scope
|
|
38
|
+
|
|
39
|
+
The capture scope is in the [capture rule](SKILL.md#capture-rule); capture rules and naming are in [surfaces.md](surfaces.md).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Existing application
|
|
2
|
+
|
|
3
|
+
Learn the existing theme, tokens, components and interaction patterns first; reuse them instead of imposing a new palette, typeface or signature. Match all supported themes and states, including focus and disabled. Sweep the whole captured surface for unstyled native elements that escaped the system, without replacing accessible native behavior needlessly.
|
|
4
|
+
|
|
5
|
+
One primary action per surface; group quieter secondary actions as controls, not loose text. Icons must say what they do; keep visible labels short and give controls full accessible names. Labels name what users control; errors explain and direct recovery; empty states invite the next action. A label wrapping at a supported size is a defect: shorten it or change the layout.
|
|
6
|
+
|
|
7
|
+
Render structured data as aligned grids where comparison matters. Keep keys and indivisible tokens non-breaking where possible, but allow long values to wrap or overflow deliberately so narrow hosts remain usable. Choose overlay or in-flow placement according to the container and host: an overlay can obscure or clip content, while in-flow expansion can change a host-sized popup. Test the actual container and resulting states.
|
|
8
|
+
|
|
9
|
+
Cover empty, loading, success, error, disabled, hover and focus as applicable; preserve input and provide recovery on errors. A screenshot of one state cannot establish the others.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# New work: direction before decoration
|
|
2
|
+
|
|
3
|
+
Frame the subject, audience, task and surface before choosing a style. Before building, write a proportional thesis and token plan to `captures/new-work.md` in the working directory, beside the captures, so it survives an interrupted run:
|
|
4
|
+
|
|
5
|
+
- **Visual thesis:** mood, material and energy.
|
|
6
|
+
- **Content plan:** section sequence and each section’s job.
|
|
7
|
+
- **Interaction thesis:** meaningful motion ideas suited to the surface.
|
|
8
|
+
- **Tokens:** 4–6 named colours, type roles, spacing, surfaces and focus; name a signature element and layout concept.
|
|
9
|
+
|
|
10
|
+
Critique against the task and references: would another designer arrive at the same place? Revise generic choices and say what changed and why. A signature must serve the subject, not be a novelty pasted onto every screen. Use the project's stack rather than imposing a framework.
|
|
11
|
+
|
|
12
|
+
Reject unconsidered attractors: cream (~#F4F1EA) + high-contrast serif + terracotta; near-black + acid accent; broadsheet hairlines; purple on white; default font stacks (Inter/Roboto/Arial/system); generic SaaS card grids. These are not forbidden when the subject specifically justifies them; generic “premium” or “craft” is not such a justification. Avoid dark-mode bias and use semantic color roles rather than a preset palette.
|
|
13
|
+
|
|
14
|
+
## Choose the right surface
|
|
15
|
+
|
|
16
|
+
- **Landing page:** make the brand and one visual anchor clear in the first screen. Give the hero a focused budget: brand, one headline, supporting line, primary action and dominant image as appropriate. No hero cards or stat/pill soup by default. Full bleed suits some briefs, not all; avoid busy image behind text. Each section explains, proves, deepens or converts rather than repeating itself. Header plus hero should fit the initial viewport at common sizes: subtract fixed header height from a 100svh hero (e.g. `calc(100svh - header-height)`) or overlay it.
|
|
17
|
+
- **Product/dashboard:** put working data, filters and actions first. Use utility copy and task-appropriate density, not a marketing hero; use cards when they serve interaction or grouping, not as the default layout. If removing a card’s border, shadow, background and radius does not hurt interaction or understanding, remove the card treatment. Scanning only headings, labels and numbers, can an operator understand the page? Rewrite any sentence that could appear in a homepage hero or ad.
|
|
18
|
+
- **Other surfaces:** follow host and task conventions, with no assumption that a marketing composition fits a popup, terminal or native application.
|
|
19
|
+
|
|
20
|
+
Images should do narrative work; use appropriate real-looking, in-context imagery when the subject calls for it, with readable crops. If generating images, explore options and select deliberately; don't hotlink without permission. Motion should clarify change or establish atmosphere, not satisfy a quota; honor reduced motion. Use concise product language, not design commentary or filler. Limit typefaces and accents when more would dilute hierarchy, but let the brief and existing system decide.
|
|
21
|
+
|
|
22
|
+
Inspect the render: is the purpose immediately recognizable, the primary action apparent, each section useful, and every decorative device justified? Would hierarchy survive without shadows? Test behavior separately.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Ranked UI principles and checks
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Ranked by priority: understandable and operable first, then visual organization and polish. Checks do not imply that a screenshot proves usability; WCAG is a web standard and its CSS-pixel values are not universal terminal/native units. Evidence labels distinguish standards, established perceptual/experimental models, and practitioner convention.
|
|
5
|
+
|
|
6
|
+
Principles 2, 3, 4, 12, 15 and 16 need non-visual interaction checks; other checks such as contrast, hitboxes and text-spacing overrides also require measurement or exercise beyond a screenshot.
|
|
7
|
+
|
|
8
|
+
## Priority principles
|
|
9
|
+
|
|
10
|
+
1. **Make actions discoverable.** Why: a signifier communicates an action; the affordance is the possibility of acting, not the cue itself (Norman, practitioner theory). Check: identify every primary action in a screenshot; verify label/control shape and that keyboard activation works. [Norman](https://jnd.org/signifiers-not-affordances/).
|
|
11
|
+
2. **Show system status and result.** Why: prompt feedback reduces uncertainty about what happened (usability heuristic, not a guaranteed quantitative effect). Check: invoke save, submit, and a long operation; observe progress/result and accessible announcement. [Nielsen](https://www.nngroup.com/articles/ten-usability-heuristics/).
|
|
12
|
+
3. **Prevent and recover from mistakes.** Why: error prevention, understandable diagnosis, undo/cancel, and actionable recovery reduce costly dead ends (heuristic). Check: provoke invalid input and a failure; check field-specific messages, retained input, and available recovery. [Nielsen](https://www.nngroup.com/articles/ten-usability-heuristics/).
|
|
13
|
+
4. **Ensure keyboard operation and visible focus.** Why: people use different input and perception modes (WCAG standard). Check: tab through all controls, operate them, check focus visible and not obscured; inspect semantic names. [WCAG 2.2](https://www.w3.org/TR/WCAG22/#keyboard-accessible), [focus visible](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html), [GNOME accessibility](https://developer.gnome.org/hig/guidelines/accessibility.html).
|
|
14
|
+
5. **Make content and state distinguishable without color alone.** Why: color perception varies and information may be monochrome (WCAG standard). Check: inspect grayscale and add text, shape, icon or pattern to error/success/selection; check color pairs in both themes. [WCAG use of color](https://www.w3.org/TR/WCAG22/#use-of-color).
|
|
15
|
+
6. **Maintain contrast for text and necessary UI boundaries.** Why: insufficient luminance contrast impedes perception (WCAG standard). Check: measure computed foreground/background: normal text ≥4.5:1, large ≥3:1, required component/state and graphical information ≥3:1 against adjacent colors, subject to exceptions; test actual composed colors in both themes. These are WCAG AA web criteria, not a claim of universal conformance. [Text](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html), [non-text](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html).
|
|
16
|
+
7. **Group related things, separate unrelated things.** Why: Gestalt proximity and common region bias grouping; similarity implies relationship, continuity draws the eye along aligned paths, and figure/ground distinguishes content from background (perceptual principles; exact effects vary with context). Check: make within-group gaps smaller than between-group gaps; related controls share visual treatment; containers do not accidentally group unrelated controls; follow alignment and foreground separation in a screenshot. [NN/g visual design](https://www.nngroup.com/articles/principles-visual-design/), [proximity](https://www.nngroup.com/articles/gestalt-proximity/), [common region](https://www.nngroup.com/articles/common-region/), [similarity](https://www.nngroup.com/articles/gestalt-similarity/).
|
|
17
|
+
8. **Make importance visible through hierarchy.** Why: contrast in size, weight, position, and color differentiates levels of importance (practitioner principle grounded in visual perception). Check: name in a screenshot the task, primary action, section headings and secondary details at a glance; check competing items do not have identical emphasis. [NN/g](https://www.nngroup.com/articles/principles-visual-design/).
|
|
18
|
+
9. **Use consistent alignment and relationships.** Why: aligned edges and recurring spatial relationships help organize the page (practitioner guidance). Check: overlay vertical/horizontal guides, check labels and controls share deliberate anchors, and flag unexplained one-off gaps; allow exceptions for content. [Fluent layout](https://fluent2.microsoft.design/layout).
|
|
19
|
+
10. **Use legible typography with a small hierarchy.** Why: size, weight and measure distinguish structures while readable letterforms and spacing support reading (standards and practitioner convention). Check: inspect body type at intended viewing size, distinguish heading levels without depending solely on color, and apply WCAG text-spacing overrides without clipping; 1.5 line-height is an override requirement, not a mandatory default. [W3C text spacing](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html), [GNOME typography](https://developer.gnome.org/hig/guidelines/typography.html).
|
|
20
|
+
11. **Size and locate targets for the input method.** Why: Fitts's law experimentally models aimed movement time as a function of target width and distance, not visual button area alone. Check: inspect real hitboxes, spacing and frequent-action reach; on web meet WCAG AA 24×24 CSS px or a specified exception, including its spacing test. Native touch recommendations can be larger; TUI keyboard focus is a different interaction. [Laws of UX](https://lawsofux.com/fittss-law/), [WCAG target size](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html).
|
|
21
|
+
12. **Make choices manageable without hiding essential work.** Why: Hick–Hyman experiments connect choice reaction time with stimulus uncertainty in simple controlled tasks; this is not proof that fewer visible menu entries always improve a complex workflow. Check: list choices at the decision point; group or progressively disclose rarely used ones without adding steps to the common path. [HCI limitations](https://perso.telecom-paristech.fr/rioul/publis/202001liugoririoulbeaudouinlafonguiard.pdf), [Laws of UX](https://lawsofux.com/hicks-law/).
|
|
22
|
+
13. **Honor task and information density.** Why: irrelevant visual elements compete with useful information, but labels, ticks and grouping may enable interpretation (practitioner heuristic with mixed empirical support). Check: remove decorative elements while preserving labels, scales, grouping and task-critical data needed for interpretation and comparison. Dense dashboards and terminals can need compact layouts; sparse whitespace is not always better. Tufte's data-ink is a question, not a universal mandate to minimize every pixel. [Graph experiment](https://journals.sagepub.com/doi/10.1177/001872089403600405), [Nielsen minimalist design](https://www.nngroup.com/articles/ten-usability-heuristics/).
|
|
23
|
+
14. **Adapt layout to available space and user settings.** Why: a fixed composition fails when window, zoom, orientation or text size changes (platform guidance and WCAG standard). Check: inspect narrow and wide windows, zoom/large text and overflow; web reflow at 320 CSS px applies with exceptions such as content requiring two-dimensional layout. Terminal: test widths and heights in cells. [WCAG reflow](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html), [GNOME](https://developer.gnome.org/hig/guidelines/adaptive.html), [Android](https://developer.android.com/design/ui/mobile/guides/layout-and-content/adapt-layout).
|
|
24
|
+
15. **Design every interaction state.** Why: users need to understand what can happen, what is happening and what happened (Nielsen heuristic; interaction-state guidance). Check: exercise actual empty, loading, success, error, disabled, focus and hover states; focus and instructions must not depend on hover, and disabled actions should have a discoverable reason when needed. [Nielsen](https://www.nngroup.com/articles/ten-usability-heuristics/), [WCAG keyboard](https://www.w3.org/TR/WCAG22/#keyboard).
|
|
25
|
+
16. **Use motion only when useful, and support reduced motion.** Why: motion can explain change but can trigger vestibular symptoms (standards and platform guidance). Check: exercise with reduced-motion preference on; nonessential interaction-triggered motion can be disabled under WCAG 2.3.3 AAA, and state change remains understandable without animation. [W3C](https://www.w3.org/WAI/WCAG22/Understanding/animation-from-interactions.html), [Windows motion](https://learn.microsoft.com/en-us/windows/apps/design/motion/).
|
|
26
|
+
17. **Use consistent interaction patterns and semantic design tokens.** Why: consistency supports recognition; shared named roles make theme and style changes coherent (heuristic and practitioner engineering convention). Check: compare equivalent controls and inspect tokens for surface, text, action, status, spacing, type and focus across light/dark themes; tokens do not prove adequate contrast. [Nielsen](https://www.nngroup.com/articles/ten-usability-heuristics/), [Fluent tokens](https://fluent2.microsoft.design/design-tokens).
|
|
27
|
+
|
|
28
|
+
## Useful conventions, not universal laws
|
|
29
|
+
|
|
30
|
+
18. **Use a spacing scale and grid as defaults, not a straitjacket.** Why: a limited vocabulary helps consistency and alignment (practitioner convention; no universal base unit). Check: audit repeated gaps against project tokens; allow documented optical/content exceptions. Fluent uses a 4-pixel base, not a rule for terminals or all platforms. [Fluent layout](https://fluent2.microsoft.design/layout).
|
|
31
|
+
19. **Choose a type scale and reading measure appropriate to the task.** Why: recurring sizes communicate levels and constrained measure can support comfortable long-form reading (practitioner convention; no single optimal measure). Check: inspect consistent type roles; verify long paragraphs are not excessively wide and text survives resizing; for web the separate WCAG AAA visual-presentation criterion specifies 80 characters, 40 for CJK, among other conditions. Relative line height need not be identical across type sizes. [W3C](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html), [Refactoring UI](https://refactoringui.com/previews/line-height-is-proportional).
|
|
32
|
+
20. **Restrict color roles, not creative identity.** Why: a small set of semantic roles supports predictable distinctions (practitioner convention); no evidence establishes one mandatory palette or a universal number of colors. Check: identify purpose of each recurring color and verify each role pair in both themes. [Fluent tokens](https://fluent2.microsoft.design/design-tokens), [WCAG color](https://www.w3.org/TR/WCAG22/#use-of-color).
|
|
33
|
+
21. **Honor the host platform.** Why: familiar conventions reduce relearning, but platform specifics differ (heuristic and platform convention). Check: compare navigation, menus, shortcuts, focus and accessibility to the relevant host; don't impose touch patterns on a keyboard-first terminal. [GNOME](https://developer.gnome.org/hig/guidelines/adaptive.html), [Windows](https://learn.microsoft.com/en-us/windows/apps/design/design-principles), [Android](https://developer.android.com/design/ui/mobile/guides/layout-and-content/adapt-layout), [Apple HIG](https://developer.apple.com/design/human-interface-guidelines/) (not verified).
|
|
34
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Surfaces and capture
|
|
2
|
+
|
|
3
|
+
Record host, dimensions, scale and state for each capture; inspect full-resolution originals and check each image’s pixel dimensions match the stated size before critiquing it. Select sizes from the actual supported context, not arbitrary fixed breakpoints. Capture tools are examples, not prerequisites.
|
|
4
|
+
|
|
5
|
+
Keep captures and critique files in `captures/` inside the working directory. Name captures `round-0-baseline-<surface>-<state>-<w>x<h>.png`, then `round-1-<surface>-<state>-<w>x<h>.png`, `round-2-...`, and so on; use the appropriate extension for text captures. Give repeated captures in the same round a unique sequence suffix and never overwrite an existing file. Write each round’s per-image checklist critique in `captures/round-<n>-critique.md` as the round is captured; preserve earlier critiques too. Pictures the owner must choose between are copied to `owner-notes/<item>/` ([design-framework.md](design-framework.md)); working rounds stay here.
|
|
6
|
+
|
|
7
|
+
- **Web:** use a headless browser to capture named wide and narrow viewport sizes, relevant zoom, themes and states. Prefer modern platform features such as anchor positioning and popover where appropriate to the supported browsers; for current platform patterns (popover, dialog, anchor positioning, focus, animation, forms), look them up in [Modern Web Guidance](https://github.com/GoogleChrome/modern-web-guidance): `DISABLE_TELEMETRY=1 npx -y modern-web-guidance@1.0.1 search "<task>"`, then `retrieve <id>` and read the file it saves. Check each pattern against the browsers the project supports; it informs the build and does not override this skill. Check responsive overflow and interaction separately.
|
|
8
|
+
- **Host-sized surfaces:** extension popups, side panels and embedded webviews must be captured in the real host at its actual size. A page viewport can hide host-controlled sizing, clipping and expansion bugs. For an extension, use a throwaway browser profile, load the extension from its build output, open it with the real shortcut, exercise the state, and capture the window geometry or region. Check popup widths 320, 360 and 400 px plus natural width; Chromium caps popups at 800×600. Check side panels around 400 px. Chromium sizes popups from content, so `max-width: 100vw` can be evaluated mid-sizing and clip even when a page viewport looks correct.
|
|
9
|
+
- **Desktop:** capture the actual app/window at stated geometry and scale. On Wayland, `grim` can capture a region using the window geometry supplied by the compositor; on macOS, `screencapture` can capture the window or a selected region. Include relevant theme and resize states.
|
|
10
|
+
- **Mobile:** capture the running emulator or simulator at stated device, orientation and text settings; exercise touch targets and relevant states separately.
|
|
11
|
+
- **Terminal UI:** state columns × rows and capture the actual terminal via screenshot or text capture. Inspect wrapping, alignment, focus and legibility at supported sizes; a text capture alone cannot establish color or visual rendering.
|
|
12
|
+
|
|
13
|
+
Use the host's accessibility and interaction conventions. CSS-pixel metrics in web standards are not universal native or terminal units. If the real host or a capture tool is unavailable, report the result visually unverified rather than substituting a misleading viewport.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-diagnosing-bugs
|
|
3
|
+
description: Diagnosis loop for hard bugs and performance regressions. Use when the user says diagnose/debug, reports broken/throwing/failing/slow behavior, or an issue is a bug without a tight repro.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Diagnosing Bugs
|
|
7
|
+
|
|
8
|
+
A discipline for hard bugs and performance regressions. It complements `bc-tdd`: first build a tight red-capable feedback loop for the bug, then fix and regression-test it.
|
|
9
|
+
|
|
10
|
+
Read the project's glossary and relevant decision records before editing so hypotheses use project vocabulary. Find each by its role (glossary, decisions, ideas) in the "Where things go" table in `.bc-agent/AGENTS.md`. Why: one table per project means a project that keeps something elsewhere changes one place. Without that table, use `glossary.md` (or `.bc-agent/project/overview.md` in a `bc-setup-project` vault) and the ADRs under `docs/adr/` (or `.bc-agent/decisions/`).
|
|
11
|
+
|
|
12
|
+
Run targeted tests, through the guarded test runner the project's or machine's instructions name (otherwise plain `pytest`, with `tmp_path` for test fixtures and cleanup even on failure; never custom `--basetemp`); make scratch folders with `mktemp -d`, never under `/tmp`; before a full suite, run the machine's storage health check if one exists and stop on critical or unknown health or if the configured check cannot run. If no storage health check is configured, skip it and note that in one line in the report. The `agent-kernel` concept's Storage safety section holds the temp-file and scratch-folder rules, when loaded. For Btrfs storage incidents use the machine's storage health check (or `btrfs filesystem usage`), not `df`. Why: free bytes alone cannot diagnose metadata starvation.
|
|
13
|
+
|
|
14
|
+
## Phase 1 — Build a feedback loop
|
|
15
|
+
|
|
16
|
+
This is the skill. If you have a tight pass/fail signal that catches **this exact bug**, the rest is mechanical. If you don't, staring at code only creates vibes.
|
|
17
|
+
|
|
18
|
+
Try, in roughly this order:
|
|
19
|
+
|
|
20
|
+
1. Failing test at the highest seam that reaches the bug.
|
|
21
|
+
2. Curl/HTTP script against a dev server.
|
|
22
|
+
3. CLI invocation with fixture input and expected output diff.
|
|
23
|
+
4. Headless browser script asserting DOM/console/network.
|
|
24
|
+
5. Replay a captured trace/log/payload.
|
|
25
|
+
6. Throwaway harness around the minimal subsystem.
|
|
26
|
+
7. Property/fuzz loop for intermittent wrong output.
|
|
27
|
+
8. `git bisect run` harness if the bug appeared between known states.
|
|
28
|
+
9. Differential loop: old vs new version/config.
|
|
29
|
+
10. HITL script only as a last resort.
|
|
30
|
+
|
|
31
|
+
Tighten the loop: faster, sharper, more deterministic. For flaky bugs, raise reproduction rate with repetition, stress, seeds, and narrowed timing windows.
|
|
32
|
+
|
|
33
|
+
**Gate:** name one command you have already run that is red-capable, deterministic/high-repro, fast enough, and agent-runnable. No command, no hypothesis phase.
|
|
34
|
+
|
|
35
|
+
**Pressure refusal (speculation).** User: "it's probably the cache, just fix that" (or any guessed root cause) **before** a red-capable loop exists → refuse to edit production code for that guess. Name/build the loop first; only then rank hypotheses. A plausible story is not evidence.
|
|
36
|
+
|
|
37
|
+
## Phase 2 — Reproduce and minimise
|
|
38
|
+
|
|
39
|
+
Run the loop and watch it go red. Confirm it matches the user's symptom, then shrink the repro one element at a time. Every remaining element should be load-bearing.
|
|
40
|
+
|
|
41
|
+
## Phase 3 — Hypothesise
|
|
42
|
+
|
|
43
|
+
Generate 3–5 ranked falsifiable hypotheses before testing any. Format each as:
|
|
44
|
+
|
|
45
|
+
> If `<cause>` is true, then `<probe/change>` will make `<prediction>` happen.
|
|
46
|
+
|
|
47
|
+
Show the ranked list to the user when they are available; proceed with your ranking if AFK **and** Phase 1's gate already holds.
|
|
48
|
+
|
|
49
|
+
## Phase 4 — Instrument
|
|
50
|
+
|
|
51
|
+
Probe one hypothesis at a time. Prefer debugger/REPL, then targeted logs at boundaries. Tag temporary logs with a unique `[DEBUG-xxxx]` prefix so cleanup is mechanical. For performance, measure/profile/bisect before fixing; don't log everything.
|
|
52
|
+
|
|
53
|
+
## Phase 5 — Fix + regression test
|
|
54
|
+
|
|
55
|
+
If a correct test seam exists, turn the minimised repro into a failing regression test **before** the fix, then fix and watch it pass. If no correct seam exists, document that finding — it is architecture debt. After the bug is fixed, recommend `/bc-improve-codebase-architecture` with the specific missing seam, and, when the project's table has an ideas role, add one line there naming the module, the missing seam and the bug. Why: the next architecture review reads observations from the ideas file, so a seam noted only in a chat reply is lost.
|
|
56
|
+
|
|
57
|
+
## Phase 6 — Cleanup + post-mortem
|
|
58
|
+
|
|
59
|
+
Before calling it done (hard gate — "done" claims without this are false):
|
|
60
|
+
|
|
61
|
+
- Original repro no longer reproduces.
|
|
62
|
+
- Regression test passes, or no-seam finding is documented.
|
|
63
|
+
- **All `[DEBUG-...]` instrumentation is removed**, verified by running `rg '\[DEBUG-'` (or equivalent) on the tree and getting **zero** hits in production/source files you touched. Leaving DEBUG markers committed is a fail even if the bug is fixed.
|
|
64
|
+
- Throwaway harnesses are deleted or clearly parked.
|
|
65
|
+
- Commit/issue comment states the winning hypothesis and validation.
|
|
66
|
+
|
|
67
|
+
**Pressure refusal (skip cleanup).** User: "add whatever logging you need" / "just ship the fix" / time pressure → still strip every `[DEBUG-...]` marker and prove it with `rg` before finishing. Temporary instrumentation is not optional cleanup.
|
|
68
|
+
|
|
69
|
+
## AFK adaptation inside `/bc-pipeline-to-done`
|
|
70
|
+
|
|
71
|
+
For bug issues, the issue's Agent Brief/acceptance criteria replaces the interactive user checkpoint.
|
|
72
|
+
|
|
73
|
+
**PARK gate (underspecified AFK bug).** If the issue is essentially a one-liner or lacks a repro (e.g. title/body is only "login broken" with no steps, expected/actual, environment, or failing command), **PARK / needs-info**. List the missing artifact(s): repro steps, expected vs actual, fixture/input, failing test command, logs, version. Do **not**:
|
|
74
|
+
|
|
75
|
+
- invent a plausible bug and "fix" it,
|
|
76
|
+
- expand a vague ticket into a speculative code change,
|
|
77
|
+
- treat "Resolve it" / "just fix login" as sufficient acceptance criteria.
|
|
78
|
+
|
|
79
|
+
No red-capable loop can be honest without a symptom to catch. Speculative green is a lie.
|
|
80
|
+
|
|
81
|
+
If a red-capable loop *can* be built from the issue + repo (clear AC, failing test path, or reliable repro), proceed through the phases as usual; still finish Phase 6 cleanup.
|
|
82
|
+
|
|
83
|
+
For glossary discovery in legacy projects, follow `bc-domain-modeling`’s legacy glossary rule.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-dispatching-parallel-agents
|
|
3
|
+
description: Use when there are two or more independent investigations, reviews, failures, or implementation-adjacent tasks that can proceed without shared state or sequential dependencies.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dispatching Parallel Agents
|
|
7
|
+
|
|
8
|
+
Dispatch one fresh agent per independent problem domain. Parallelism is useful only when the domains do not depend on each other and agents will not edit or rely on the same mutable state.
|
|
9
|
+
|
|
10
|
+
Before dispatch or worktree isolation, run the machine's storage health check if one exists, and stop and report on critical or unknown health or if the configured check cannot run. If no storage health check is configured, skip it and note that in one line in the report. Put in each packet: run pytest through the guarded test runner the project's or machine's instructions name (otherwise plain `pytest`, with `tmp_path` for test fixtures and cleanup even on failure; never custom `--basetemp`); make scratch folders with `mktemp -d`, never under `/tmp`; run targeted tests only, never the full suite or gate. After integrating, prove each worker's commits are in `HEAD` (ancestor or patch-equivalent) and record that proof before removing its worktree or branch. The `agent-kernel` concept's Storage safety (temp files, scratch folders) and Verification sections hold their rules, when loaded. Why: parallel checks multiply disk use.
|
|
11
|
+
|
|
12
|
+
## Use when
|
|
13
|
+
|
|
14
|
+
- Multiple test files or subsystems fail for apparently different reasons.
|
|
15
|
+
- Several independent reviews/research tasks are needed.
|
|
16
|
+
- Each task can be understood with a focused context packet.
|
|
17
|
+
- Agents can work without conflicting file edits or shared external state.
|
|
18
|
+
|
|
19
|
+
Do **not** use when failures are likely related, the whole system must be understood together, or the agents would touch overlapping files/resources.
|
|
20
|
+
|
|
21
|
+
## Pattern
|
|
22
|
+
|
|
23
|
+
1. Group work by independent domain.
|
|
24
|
+
2. Write one focused task per domain.
|
|
25
|
+
3. Provide self-contained context: files, errors, constraints, and expected output.
|
|
26
|
+
4. Run agents concurrently only if the harness supports safe isolation.
|
|
27
|
+
5. Read every result, inspect diffs if any, check conflicts, then run the combined verification yourself.
|
|
28
|
+
|
|
29
|
+
## Prompt packet
|
|
30
|
+
|
|
31
|
+
Each agent gets:
|
|
32
|
+
|
|
33
|
+
- Specific scope: one file, subsystem, issue, or question.
|
|
34
|
+
- Goal: what success means.
|
|
35
|
+
- Constraints: files not to touch, no broad refactors, no production changes if diagnostic-only.
|
|
36
|
+
- Evidence to inspect: error messages, paths, commands, relevant snippets.
|
|
37
|
+
- Output contract: root cause, changed files, tests run, residual risks.
|
|
38
|
+
|
|
39
|
+
Bad: “Fix all tests.”
|
|
40
|
+
Good: “Diagnose the three failures in `tests/abort.test.ts`; determine timing bug vs assertion drift; do not change unrelated tests; return root cause, patch summary, and verification command/output.”
|
|
41
|
+
|
|
42
|
+
## Homogeneous fan-out (many agents, one task shape)
|
|
43
|
+
|
|
44
|
+
When the split is N instances of the same task — port every file, fix every crate’s errors, update every call site — a packet defect multiplies by N. Two steps come before scaling:
|
|
45
|
+
|
|
46
|
+
1. **Serialize the shared decisions first.** Compile the pattern mappings, conventions, and edge-case policies into one compact guide that every worker receives, instead of letting each worker re-derive them divergently. Review the guide as rigorously as code — fresh reviewers, assume it has defects — because a mistake in it ships N times.
|
|
47
|
+
2. **Pilot, then scale.** Run 1–3 instances through the full loop (implement, review, integrate) and fix the packet and guide from what they reveal before dispatching the fleet. Prompt defects are cheapest to catch here; at fleet scale they become a cleanup workflow of their own.
|
|
48
|
+
|
|
49
|
+
## Parent responsibilities
|
|
50
|
+
|
|
51
|
+
Parallel agents do not make the combined result true. The parent must:
|
|
52
|
+
|
|
53
|
+
- Compare outputs for contradictions.
|
|
54
|
+
- Check whether two agents edited the same files or made incompatible assumptions.
|
|
55
|
+
- Run relevant full verification once for the integrated change, or inspect recorded results for that exact tree; reviewers reuse that evidence.
|
|
56
|
+
- Escalate if an agent reports uncertainty rather than papering it over.
|
|
57
|
+
|
|
58
|
+
## Red flags
|
|
59
|
+
|
|
60
|
+
- “These might share a cause, but parallelism is faster.” Investigate together first.
|
|
61
|
+
- “The agents said done.” Verify diffs and commands yourself.
|
|
62
|
+
- “One agent can handle the broad problem.” Then do not split.
|
|
63
|
+
- “They may edit the same files.” Use sequencing or worktrees instead. Shared mutable state fails within minutes at scale, not eventually — in Bun’s Rust-rewrite fleet, parallel agents ran `git stash`/`git reset` over each other’s work almost immediately. If full isolation is genuinely impractical (e.g. worktree disk cost), the fallback is restricting every worker to atomic, file-scoped, non-destructive commands — commit one file at a time; never `stash`, `reset`, or slow repo-wide scans — not hoping the agents coordinate.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-domain-modeling
|
|
3
|
+
description: Actively build and sharpen a project's domain model — challenge terms against the glossary, stress-test with edge cases, and update glossary.md and ADRs inline. Use when terminology is vague or a hard design decision needs recording.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Domain Modeling
|
|
7
|
+
|
|
8
|
+
Actively build and refine the project's domain model. This runs *during* design and grilling — it is not passive note-taking after the fact. A shared language is the payoff: consistent terms make variables, functions, and files self-consistent, make the codebase easier for an agent to navigate, and cut the tokens everyone spends decoding jargon.
|
|
9
|
+
|
|
10
|
+
## Challenge the language
|
|
11
|
+
When the user — or the code — uses a vague or conflicting term, surface the discrepancy *immediately* and propose one precise canonical name. If the glossary already defines a term one way and the user means another, stop and reconcile it rather than letting both meanings run.
|
|
12
|
+
|
|
13
|
+
## Stress-test with scenarios
|
|
14
|
+
Don't accept abstract relationships at face value. Invent concrete edge cases to probe concept boundaries until the meaning is forced to be precise.
|
|
15
|
+
|
|
16
|
+
## Cross-reference reality
|
|
17
|
+
When stated domain logic contradicts how the code actually behaves, flag the contradiction and resolve it — don't paper over it.
|
|
18
|
+
|
|
19
|
+
## Capture decisions immediately — don't batch
|
|
20
|
+
|
|
21
|
+
Vocabulary goes to the project's glossary role and decision records to its decisions role. Look both up in the "Where things go" table in the project's `.bc-agent/AGENTS.md`. Why: each project has one table, so a project that keeps either elsewhere changes one place. Without that table, the glossary is `glossary.md` at the repo root and decision records go under `docs/adr/`; in a `bc-setup-project` vault, follow the vault's own `.bc-agent/AGENTS.md` and, where its `references/teach-skill.md` adapter is valid, the Glossary section that adapter names, which `bc-teach` owns.
|
|
22
|
+
|
|
23
|
+
In a hybrid project with the table, the glossary is the shared root `glossary.md`, where `bc-teach` also adds the terms a learner needs. Add and sharpen project terms there, but ask before removing or redefining a term you did not add this session. Why: a learner term may look redundant to the project and still be one the owner is studying; one shared file keeps one vocabulary only if neither side silently overwrites the other.
|
|
24
|
+
|
|
25
|
+
- **The glossary** (default `glossary.md` at the repo root) is a **pure glossary**: canonical terms and their meanings, stripped of implementation detail, file paths, or specs. Update it the moment a term crystallizes, not at the end.
|
|
26
|
+
- **Multi-context systems:** put a `glossary-map.md` at the root pointing to a `glossary.md` inside each bounded context (e.g. `src/ordering/glossary.md`).
|
|
27
|
+
|
|
28
|
+
- **Legacy glossary:** when a repo has `CONTEXT.md` and no `glossary.md`, read `CONTEXT.md` as the glossary, put new terms there, and always propose renaming it to `glossary.md` in the user-facing reply (a proposal is not a question; required even when the user forbade questions). Do not rename until the user explicitly agrees to rename `CONTEXT.md`; saying the standard file is `glossary.md` is not agreement. Never keep both files: one vocabulary needs one authoritative home.
|
|
29
|
+
|
|
30
|
+
## ADRs — a deliberately high bar
|
|
31
|
+
Write an Architecture Decision Record in the decisions role only when **all three** hold:
|
|
32
|
+
1. the decision is costly to reverse,
|
|
33
|
+
2. it would puzzle a future reader without the rationale, and
|
|
34
|
+
3. real trade-offs shaped it.
|
|
35
|
+
|
|
36
|
+
Otherwise skip the ADR and keep moving — not every decision earns one, and a directory full of trivial ADRs is noise that hides the load-bearing ones.
|
|
37
|
+
|
|
38
|
+
When you *do* write one, record the genuine alternatives and why each lost. Why: the chosen answer is cheap to reconstruct from the code; what you gave up is not.
|
|
39
|
+
|
|
40
|
+
Never rewrite an accepted ADR into a different decision. Write a new one, mark the old `Superseded`, and cross-link both. Updating shipped facts (paths, names, defaults) in place is required, not forbidden. Why: a silent rewrite erases the old rationale, and a future reader cannot see what was rejected or why the reversal happened.
|