mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 17:09:13 -10:00
Merge origin/main (7719d348ca) into the 0.10.2 candidate
origin/main adds only maintainer docs and skills (AGENTS.md, docs/skills/*). No code changes, no conflicts with the candidate.
This commit is contained in:
commit
222848b92d
6 files changed
+72
-54
No files matched your search
@@ -48,7 +48,7 @@ base prompt". Two more corollaries earned here:
|
||||
- Before adding a module named `model_*`, `*_config`, `provider_*`, or
|
||||
anything that "bridges", "mirrors", or "stages" an existing thing, grep
|
||||
for the existing thing and edit it. A new layer must name the predecessor
|
||||
it replaces in the module doc; otherwise edit the original.
|
||||
it replaces in its commit message; otherwise edit the original.
|
||||
- Prefer the simplest implementation that preserves observable contracts. A
|
||||
rewrite is acceptable when justified by product intent and observed behavior,
|
||||
not as a shortcut around understanding existing code.
|
||||
@@ -62,6 +62,11 @@ base prompt". Two more corollaries earned here:
|
||||
A fresh worktree is for conflicting, dirty, stale, or independent lanes
|
||||
(see `cw-land`), not for parallel agents on the same lane. Local commit
|
||||
permission never implies push, merge, tag, release, or deploy permission.
|
||||
- **Maintainers do not open PR branches** (founder, 2026-10-08: more PRs means
|
||||
more CI and slower work). Verified slices land directly on `main` and are
|
||||
pushed: run the focused gate, put the real counts in the commit message,
|
||||
fetch and rebase onto `origin/main` and retry on rejection. Never force-push
|
||||
or rewrite a shared ref. Contributor PRs still merge as PRs.
|
||||
- When the task is local-only, stay fully offline: no browsing, GitHub or remote
|
||||
Git operations, downloads, dependency installation, provider calls, or
|
||||
source/diff transmission. Record the missing external receipt and keep working
|
||||
@@ -145,7 +150,7 @@ casually it reads as taking the work even when credit is preserved.
|
||||
|
||||
- The model-facing subagent tool is `agent`; `agent_open`/`agent_eval`/
|
||||
`agent_close`/`delegate_to_agent` are removed surfaces. If the shape must
|
||||
move, move the code and add the guard test that judges the new shape.
|
||||
move, move the code and its existing guard test with it.
|
||||
- `BASE_PROMPT` in `crates/tui/src/prompts/text.rs` is the sole base prompt
|
||||
by convention. Same rule: move the code, not the prose, if that changes.
|
||||
- There is exactly one turn loop: `Engine::run_turn` in
|
||||
@@ -178,18 +183,17 @@ casually it reads as taking the work even when credit is preserved.
|
||||
- Product intent and observed runtime behavior outrank a test's preferred
|
||||
implementation shape. Fix the product; do not contort production code to
|
||||
preserve a brittle assertion.
|
||||
- Code first, then tests. Write the implementation and prove it runs, then add
|
||||
or adjust tests to cover what was actually built. Never write tests first and
|
||||
never practice TDD here — this overrides any skill or default that mandates
|
||||
it, including superpowers `test-driven-development`. Tests stay the gate
|
||||
before a push; they are not the design driver. An existing test that only
|
||||
encodes old behavior is evidence, not a veto: change it with the code rather
|
||||
than bending the code to keep it green. This does not relax the rule under
|
||||
"Claiming a test passed" — a regression test written *after* the fix still
|
||||
has to be shown failing without it.
|
||||
- Tests are selective evidence, not the specification. Do not add tests by
|
||||
default. Add or retain one when it cheaply protects a high-risk behavior such
|
||||
as safety, data integrity, protocol compatibility, or a reproduced regression.
|
||||
- **No new tests and no new code comments unless explicitly asked**
|
||||
(founder, 2026-10-08). Do not write new unit or integration tests unless the
|
||||
user explicitly instructs it for that task; prove a change by running it and
|
||||
the existing checks. Never write tests first and never practice TDD — this
|
||||
overrides any skill or default that mandates it, including superpowers
|
||||
`test-driven-development`. Existing tests stay the gate before a push: when
|
||||
a change makes one wrong, update or delete it in the same slice rather than
|
||||
bending the code to keep it green. When a regression test is requested, the
|
||||
rule under "Claiming a test passed" still applies. Do not add new code
|
||||
comments; the reasoning goes in the commit message, and an existing comment
|
||||
the change makes false is fixed or removed.
|
||||
- Rewrite or remove tests that duplicate coverage, freeze internals, overspecify
|
||||
copy or layout, preserve obsolete behavior, or cost more than the risk they
|
||||
cover. Never weaken real safety or data-integrity behavior merely to make a
|
||||
|
||||
+14
-3
@@ -14,6 +14,17 @@ To activate:
|
||||
`/skills`, or bundle into `crates/tui/assets/skills/` + register in
|
||||
`crates/tui/src/skills/system.rs` to ship it.
|
||||
|
||||
Skills: gh-file-issue, gh-compile-issues, gh-assign-issues, gh-find-prs,
|
||||
gh-treasure-hunt, gh-close-issues, gh-credit-harvest, codew-release-qa-sweep,
|
||||
contributor-onboarding, feedback.
|
||||
The maintainer loop, in order — each skill links the next:
|
||||
|
||||
| Stage | Skill | Use it for |
|
||||
| --- | --- | --- |
|
||||
| 1 | [cw-orient](cw-orient/SKILL.md) | Live checkout, branch, dirt and version truth before editing |
|
||||
| 2 | [cw-slice](cw-slice/SKILL.md) | Find the existing owner, bound one slice, fix the evidence bar |
|
||||
| 3 | [cw-gates](cw-gates/SKILL.md) | The focused-to-broad verification ladder and CI budget checks |
|
||||
| 4 | [cw-dogfood](cw-dogfood/SKILL.md) | Stamped build, atomic install, real-product QA |
|
||||
| 5 | [cw-land](cw-land/SKILL.md) | Commits, PRs, contributor credit, merging under a gate |
|
||||
| 6 | [cw-handoff](cw-handoff/SKILL.md) | A paste-ready continuation grounded in live state |
|
||||
|
||||
GitHub stewardship and release: gh-file-issue, gh-compile-issues,
|
||||
gh-assign-issues, gh-find-prs, gh-treasure-hunt, gh-close-issues,
|
||||
gh-credit-harvest, codew-release-qa-sweep, contributor-onboarding, feedback.
|
||||
@@ -70,7 +70,7 @@ python3 scripts/check-persistence-backlog-budget.py
|
||||
python3 scripts/check-provider-registry.py # provider registry drift
|
||||
python3 scripts/check-command-crate-boundaries.py # command-contract boundary
|
||||
python3 scripts/check-command-migration-manifest.py
|
||||
python3 scripts/check-tui-locale-parity.py # touched crates/tui/locales/
|
||||
python3 scripts/check-tui-locale-parity.py # touched crates/localization/locales/
|
||||
sh scripts/check-tui-product-vocabulary.sh
|
||||
python3 scripts/check-readme-translations.py # touched README*.md
|
||||
./scripts/release/check-versions.sh # touched a version anywhere
|
||||
@@ -104,14 +104,13 @@ cd web && npm ci && npm test && npm run check
|
||||
|
||||
## Claiming a test passed
|
||||
|
||||
- Quote the real `test result: N passed; M failed` line, and confirm `N > 0`
|
||||
**for the tests that cover your change**. `cargo test <filter>` exits 0 having
|
||||
run zero tests when the filter matches nothing; an exit code alone has already
|
||||
been mistaken for a pass here.
|
||||
- Prefer proving a regression test fails without the fix. A test that passes
|
||||
either way pins the implementation, not the defect.
|
||||
- Audit any hand-rolled scorer before trusting its score: quote the counts it
|
||||
actually evaluated, not the verdict line alone.
|
||||
`AGENTS.md` ("Claiming a test passed") owns the rules: quote the real count
|
||||
line with `N > 0` for the tests that cover the change, prefer a regression
|
||||
test that fails without the fix, and audit hand-rolled scorers. Two additions
|
||||
for gate runs:
|
||||
|
||||
- Check the count **per filter group**. A green run where one required filter
|
||||
matched zero tests is a miss, not a pass.
|
||||
- A focused rerun of a failing test distinguishes flake from regression in
|
||||
seconds. Do that before calling anything a flake, and root-cause anything that
|
||||
fails outside a known-flaky name — check for unisolated config-path reads or
|
||||
|
||||
@@ -17,7 +17,7 @@ Stage 5 of the loop: [cw-orient](../cw-orient/SKILL.md) →
|
||||
|
||||
## When to use
|
||||
|
||||
- The change is verified and needs to become a commit, branch, or PR.
|
||||
- The change is verified and needs to become a commit on `main`.
|
||||
- You are landing someone else's PR, harvesting a contributor's work, or
|
||||
resolving a conflict caused by `main` moving.
|
||||
- You are about to merge something behind a required gate.
|
||||
@@ -25,16 +25,20 @@ Stage 5 of the loop: [cw-orient](../cw-orient/SKILL.md) →
|
||||
## Workflow
|
||||
|
||||
1. **Choose the landing shape.**
|
||||
- **Direct to `main`** is permitted for a small coherent change when this
|
||||
checkout is current, clean, and owns the affected files. Local commit
|
||||
permission never implies push, merge, tag, release, or deploy permission.
|
||||
- **A worktree** is the right safety boundary for conflicting, dirty, stale,
|
||||
or independent work — and for anything that would otherwise fight the dirt
|
||||
you found in [cw-orient](../cw-orient/SKILL.md).
|
||||
- **An integration branch** — `integration/<topic>-<pr>-<date>` — is the
|
||||
normal path for anything with conflicts or several moving PRs. It is
|
||||
cheaper than rebasing onto a `main` that keeps moving, and it leaves the
|
||||
contributor's branch untouched.
|
||||
- **The checkout that already exists** is the default. Direct to `main` is
|
||||
permitted for a small coherent change when that checkout is current and
|
||||
owns the affected files; when several agents share it, partition by file,
|
||||
stage only your paths, and retry a commit that fails on `index.lock`.
|
||||
Local commit permission never implies push, merge, tag, release, or
|
||||
deploy permission.
|
||||
- **No maintainer PR branches** (`AGENTS.md`): verified slices land on
|
||||
`main` directly and hosted CI runs there. PRs are for contributors.
|
||||
- **A worktree** is for a lane that genuinely conflicts with the dirt you
|
||||
found in [cw-orient](../cw-orient/SKILL.md), or an experiment you may
|
||||
throw away — not for parallel agents on the same lane.
|
||||
- **An integration branch** (`integration/<topic>-<pr>-<date>`) is for
|
||||
resolving a contributor PR that conflicts with a moving `main` when you
|
||||
cannot push to their fork. It leaves their branch untouched.
|
||||
|
||||
2. **Commit narrow and build-green.** One coherent change per commit; the tree
|
||||
builds at every commit. Put the real verification in the message — actual
|
||||
@@ -91,10 +95,10 @@ Stage 5 of the loop: [cw-orient](../cw-orient/SKILL.md) →
|
||||
the artifact must literally say PASS, the review thread outranks the check
|
||||
rollup, and ambiguity blocks the merge — never the reverse.
|
||||
|
||||
7. **Clean up your own lane.** When a worktree's branch lands on `main`, remove
|
||||
the worktree (`git worktree remove <path>`). `scripts/worktree-gc.sh`
|
||||
lists lanes by merged/dirty state; `--remove-merged --yes` prunes the
|
||||
merged-and-clean ones. Worktree sprawl was a 560 GB problem here once.
|
||||
7. **Clean up your own lane.** When a worktree you created lands on `main`,
|
||||
remove it (`git worktree remove <path>`) and delete its merged branch.
|
||||
Leave other writers' worktrees alone; `git worktree list` shows them.
|
||||
Worktree sprawl was a 560 GB problem here once.
|
||||
|
||||
## Red flags / don't
|
||||
|
||||
|
||||
@@ -38,8 +38,9 @@ This is stage 1 of the loop: **orient → [cw-slice](../cw-slice/SKILL.md) →
|
||||
git worktree list
|
||||
git branch --sort=-committerdate --format='%(committerdate:short) %(refname:short)' | head -20
|
||||
```
|
||||
If the work you were asked to do already has a worktree, use it. Do not
|
||||
start a second copy of the same lane.
|
||||
If the work you were asked to do already has a checkout or worktree, use
|
||||
it. Do not start a second copy of the same lane, and do not create a
|
||||
worktree just because another agent is in this one — partition by file.
|
||||
|
||||
3. **Read the dirt before you touch it.** Modified files you did not write
|
||||
belong to someone else — another agent, another lane, an in-flight slice:
|
||||
@@ -48,8 +49,8 @@ This is stage 1 of the loop: **orient → [cw-slice](../cw-slice/SKILL.md) →
|
||||
git diff --stat
|
||||
```
|
||||
Preserve them. Leave them unstaged, and do not `git checkout --` or stash
|
||||
another writer's work to get a clean tree. If your change genuinely conflicts
|
||||
with the dirt, work in a fresh worktree instead.
|
||||
another writer's work to get a clean tree. Only if your change genuinely
|
||||
conflicts with that dirt is a fresh worktree warranted ([cw-land](../cw-land/SKILL.md)).
|
||||
|
||||
4. **Fix which guidance applies.** The nearest scoped `AGENTS.md` wins over the
|
||||
root one, and it is where the per-area rules actually live:
|
||||
|
||||
@@ -39,7 +39,7 @@ Stage 2 of the loop: [cw-orient](../cw-orient/SKILL.md) → **slice** →
|
||||
grep -rln 'model_\|_config\|provider_' crates/*/src --include='*.rs' | head -30
|
||||
```
|
||||
Search behavior and symbols, not just filenames. If you find an owner, edit
|
||||
it. If you are still adding a new layer, its module doc must name the
|
||||
it. If you are still adding a new layer, its commit message must name the
|
||||
predecessor it replaces — otherwise you are editing the wrong file.
|
||||
|
||||
3. **Check the contracts you are about to walk into.** One of these is
|
||||
@@ -66,7 +66,7 @@ Stage 2 of the loop: [cw-orient](../cw-orient/SKILL.md) → **slice** →
|
||||
4. **Read the scoped guidance for the files you will touch.** `crates/tui/AGENTS.md`
|
||||
owns the UI contracts (one owner per fact, `codewhale_palette::grammar` semantics, typed
|
||||
state enums, toast routing, `tr(locale, MessageId::...)` for user prose).
|
||||
`crates/tui/locales/AGENTS.md` owns string changes. `web/AGENTS.md` owns the
|
||||
`crates/localization/locales/AGENTS.md` owns string changes. `web/AGENTS.md` owns the
|
||||
site. `docs/MOTION_CONTRACT.md` owns motion. Design law lives in
|
||||
`docs/design/`, not in a prototype file someone left in a sibling directory.
|
||||
|
||||
@@ -83,21 +83,20 @@ Stage 2 of the loop: [cw-orient](../cw-orient/SKILL.md) → **slice** →
|
||||
- whether it is cross-cutting enough to need the full sweep in
|
||||
[cw-gates](../cw-gates/SKILL.md).
|
||||
|
||||
7. **Write the implementation first.** Code first, then tests (see `AGENTS.md`
|
||||
— this repo does not practice TDD). Build it, prove it runs, then add or
|
||||
adjust tests to cover what you actually built.
|
||||
7. **Write the implementation, then prove it runs.** No new tests or code
|
||||
comments unless explicitly asked (`AGENTS.md`); update or delete existing
|
||||
tests the change makes wrong.
|
||||
|
||||
## Red flags / don't
|
||||
|
||||
- Don't add a module that "bridges", "mirrors", "stages", or "wraps" something
|
||||
that already exists without naming that thing in the module doc.
|
||||
that already exists without naming that thing in the commit message.
|
||||
- Don't fork a singleton (turn loop, base prompt, delegation axis,
|
||||
lifecycle system) without moving its guard test and consumers with it.
|
||||
The repo has one of each on purpose; a silent second one is the failure
|
||||
mode, not the refactor.
|
||||
- Don't write tests first. Don't add tests by default either — add one when it
|
||||
cheaply protects safety, data integrity, protocol compatibility, or a
|
||||
reproduced regression.
|
||||
- Don't write new tests unless explicitly asked, and never first. Don't add
|
||||
new code comments.
|
||||
- Don't contort production code to keep a brittle assertion green. A test that
|
||||
only encodes old behavior is evidence, not a veto: change it with the code.
|
||||
- Don't cut trust-boundary validation, data-loss handling, security, or
|
||||
|
||||
Reference in new issue
Block a user