diff --git a/.agent/SKILL_INVENTORY.md b/.agent/SKILL_INVENTORY.md index 9cfab4f..fcaff9c 100644 --- a/.agent/SKILL_INVENTORY.md +++ b/.agent/SKILL_INVENTORY.md @@ -40,7 +40,7 @@ commands or edit code/config as part of its procedure. | skill-authoring | Create and improve first-party skills with progressive disclosure and eval guidance | L2 | 2026-11-09 | | subagent-review | Review-only external CLI orchestration and structured lightweight decisions (`swarm_decide`) via MCP | L1 | 2026-10-25 | | systematic-debugging | Evidence-first root-cause debugging with reproduce/minimise/hypothesis/regression loop | L2 | 2026-07-14 | -| test-driven-development | Red-green-refactor workflow for behavior changes with practical test seams | L2 | 2026-11-28 | +| test-driven-development | Red-green-refactor workflow for behavior changes with practical test seams | L2 | 2026-11-29 | | rust-testing | Cargo/nextest unit tests beside modules | L2 | 2026-08-14 | | threat-modeling-agentic-tools | Threat-model MCP/tool abuse and injection | L1 | 2026-07-01 | | use-jev | Delegate pending decisions, blocked steps and triage items to Jev in one batched call; act on confident low-risk picks, hand back the rest | L2 | 2026-11-09 | @@ -51,8 +51,8 @@ commands or edit code/config as part of its procedure. | remote-build | Build on a paired build PC over SSH: resolve the host by hostname, pre-flight it (no other heavy build, RAM, disk, clean checkout fast-forwarded to the exact commit), start the build detached with a done-file, verify artifacts (commit, size, SHA-256, version), copy them into a same-commit checkout on each target with a hash read-back, and run each target's project install only after the user approves that PC. User-typed only | L2 | 2026-11-27 | | fix-it | Fix the one problem the latest report named: diagnose read-only, back up before overwriting, smallest reversible fix, verify what the user sees, report with an undo path. Triggered by /fix-it or "fix it" after a report | L2 | 2026-11-21 | | step-back | Recover the ticket's goal, criteria and scope, review the diff against them in both directions, re-plan via next-steps | L2 | 2026-11-19 | -| ship-pr | Take one PR from open to merged: fix CI failures at the root cause, wait for green on the exact head commit, merge, verify. User-typed only; `--no-ci` gates locally when CI exists but can't run; remedies for workflows that never ran and repository-setting failures | L2 | 2026-11-28 | -| merge-pr | Merge one PR without fixing anything: CI already green on the exact head commit; Actions could not start (billing, spending limit, minutes), with the workflow steps replayed locally; a mix of the two; or no CI at all, with the declared checks run locally. Merge pinned to the head commit. User-typed only | L2 | 2026-11-28 | +| ship-pr | Take one PR from open to merged: fix CI failures at the root cause, wait for green on the exact head commit, merge, verify. User-typed only; `--no-ci` gates locally when CI exists but can't run; remedies for workflows that never ran and repository-setting failures | L2 | 2026-11-29 | +| merge-pr | Merge one PR without fixing anything: CI already green on the exact head commit; Actions could not start (billing, spending limit, minutes), with the workflow steps replayed locally; a mix of the two; or no CI at all, with the declared checks run locally. Merge pinned to the head commit. User-typed only | L2 | 2026-11-29 | | validate-implementation | Per-AC Verified/Failed/Unknown verdicts with evidence (**compiled harness**) | L2 | 2026-07-19 | | verification-before-completion | Evidence-backed completion claims with fresh command proof (**compiled harness**) | L1 | 2026-11-04 | @@ -72,7 +72,7 @@ commands or edit code/config as part of its procedure. | lint-format-security | ruff, eslint, clippy, trivy, shellcheck (**compiled harness**) | L2 | 2026-08-14 | | mcp-code-intelligence | MCP tiers; fff, Graphify, Serena, Zoekt, embeddings | L2 | 2026-07-21 | | graphify-knowledge-graph | Query/refresh Graphify MCP or CLI for architecture paths and communities | L2 | 2026-07-21 | -| windows-agent-tooling | Native Windows agent workflows; CLI resolution, persistence and host-context diagnostics; launching CLIs as applications in scripts; PowerShell 5.1 module path | L2 | 2026-11-28 | +| windows-agent-tooling | Native Windows agent workflows; CLI resolution, persistence and host-context diagnostics; launching CLIs as applications in scripts; PowerShell 5.1 module path | L2 | 2026-11-29 | | wsl2-agent-tooling | WSL2 build/test/MCP workflows | L2 | 2026-07-03 | ### Consolidated reusable setup library diff --git a/.agents/skills/merge-pr/SKILL.md b/.agents/skills/merge-pr/SKILL.md index fb6b7c5..2416654 100644 --- a/.agents/skills/merge-pr/SKILL.md +++ b/.agents/skills/merge-pr/SKILL.md @@ -207,8 +207,17 @@ Immediately before merging, re-read the PR and confirm: - the runs for `` still show the case from step 2: all green, only the not-started cause, the same mix of passed and not-started runs, or, when CI never triggered or there is none, still none. -**Stacked PRs:** after the base PR merges, run `gh pr edit --base main`; unless the parent branch was -deleted, the child would merge into the merged branch and never reach `main`. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. Retarget even when the branch stays: otherwise the child merges into the merged branch and + never reaches the base. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. Use the merge method the repository's recent PRs used, pinned to the checked commit: diff --git a/.agents/skills/ship-pr/SKILL.md b/.agents/skills/ship-pr/SKILL.md index d9f9e57..8f14ae2 100644 --- a/.agents/skills/ship-pr/SKILL.md +++ b/.agents/skills/ship-pr/SKILL.md @@ -156,6 +156,17 @@ Merging is the last step. Immediately before it, re-read the PR and confirm all - the PR is mergeable with no conflicts, and no review has changed; - no new commits arrived. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. + Use the merge method the repository's recent PRs used, and pin the commit so nothing newer can slip in: ```bash diff --git a/.agents/skills/test-driven-development/SKILL.md b/.agents/skills/test-driven-development/SKILL.md index 600c76c..7da5cab 100644 --- a/.agents/skills/test-driven-development/SKILL.md +++ b/.agents/skills/test-driven-development/SKILL.md @@ -46,6 +46,12 @@ repo has no practical test seam. State the limitation and choose the closest ver writes, so broken code fails before it touches anything. Keep fixtures where a wrong path can't reach real state: temp folders often sit under the real home folder. Afterwards, check that the RED run left nothing outside the fixture. + For a guard, refusal or permission check, a refusal test passes just as well on an argument error. + Pair each refused call with the same call plus the override and assert it gets past the guard, then + run the refusal tests once with the guard disabled: they must fail because the action happened. + When the code has fallbacks (capture methods, retries, provider chains), a pass proves only the + branch that ran. Assert or log which branch ran, force each one you claim works, or say which ones + stayed unverified. 4. **GREEN — implement the minimum.** Write only enough production code to pass. Do not add unrequested options, abstractions, cleanup, or drive-by edits. If the test is hard to write, treat that as design feedback and improve the seam. @@ -114,6 +120,8 @@ Avoid tests that: - [ ] New behavior has a focused test. - [ ] The test failed for the intended reason before implementation. +- [ ] Guard or refusal tests also fail with the guard disabled, and the override path passes the guard. +- [ ] For code with fallbacks, each branch claimed as working was the one that ran in some test. - [ ] Production code is the minimal change needed to pass. - [ ] Targeted and relevant broader tests pass. - [ ] No test was weakened to fit the implementation. diff --git a/.agents/skills/windows-agent-tooling/SKILL.md b/.agents/skills/windows-agent-tooling/SKILL.md index 49e0b9a..6659154 100644 --- a/.agents/skills/windows-agent-tooling/SKILL.md +++ b/.agents/skills/windows-agent-tooling/SKILL.md @@ -75,6 +75,9 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws - In Git Bash, prefix `MSYS_NO_PATHCONV=1` when a non-Windows tool takes a Unix-style path that starts with `/`, since MSYS rewrites it into a Windows path (but see the next bullets: Git's own `-C` then needs `D:/...`). For example, `docker exec`/`docker run` with container paths (`-w /app`, `/data/...`) fails with "Cwd must be an absolute path". - Use the same prefix for `git show :`. MSYS can rewrite the argument into something like `origin\main;.agent\...`, and a pipeline can hide the failure behind a plausible result such as a `0` count. With the prefix set, write paths in that command as `D:/...`: MSYS no longer translates `/d/...`, so `git -C /d/...` fails. +- MSYS rewrites any argument that starts with `/`, including free text: ticket titles, acceptance criteria, commit + messages (`/ws` became `C:/Program Files/Git/ws` in a stored ticket). Pass such text through a file + (`--body-file`, `-F`), prefix `MSYS_NO_PATHCONV=1`, or don't start the argument with `/`. - From Git Bash, `powershell -NoProfile -Command "... $_ ..."` lets bash expand `$_` and other `$vars` inside the double quotes before PowerShell parses them, which causes parser errors. Use the harness PowerShell tool, single-quote the command (`-Command '...'`), or put it in a `.ps1` file and run it with `-File`. - **PowerShell 5.1 UTF-8 BOM on config edits:** Whenever generating a PowerShell snippet for a user to edit JSON, TOML, or YAML configs (where Windows' default terminal may be Windows PowerShell 5.1 rather than `pwsh` 7), back up the file first and write via `[IO.File]::WriteAllText($p, $text, [Text.UTF8Encoding]::new($false))` instead of `Set-Content -Encoding utf8` (which writes a UTF-8 BOM that breaks strict JSON loaders); verify by re-parsing with `ConvertFrom-Json`. - See [bounded-output-patterns.md](../cli-tools-overview/references/bounded-output-patterns.md). diff --git a/.claude/skills/merge-pr/SKILL.md b/.claude/skills/merge-pr/SKILL.md index fb6b7c5..2416654 100644 --- a/.claude/skills/merge-pr/SKILL.md +++ b/.claude/skills/merge-pr/SKILL.md @@ -207,8 +207,17 @@ Immediately before merging, re-read the PR and confirm: - the runs for `` still show the case from step 2: all green, only the not-started cause, the same mix of passed and not-started runs, or, when CI never triggered or there is none, still none. -**Stacked PRs:** after the base PR merges, run `gh pr edit --base main`; unless the parent branch was -deleted, the child would merge into the merged branch and never reach `main`. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. Retarget even when the branch stays: otherwise the child merges into the merged branch and + never reaches the base. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. Use the merge method the repository's recent PRs used, pinned to the checked commit: diff --git a/.claude/skills/ship-pr/SKILL.md b/.claude/skills/ship-pr/SKILL.md index d9f9e57..8f14ae2 100644 --- a/.claude/skills/ship-pr/SKILL.md +++ b/.claude/skills/ship-pr/SKILL.md @@ -156,6 +156,17 @@ Merging is the last step. Immediately before it, re-read the PR and confirm all - the PR is mergeable with no conflicts, and no review has changed; - no new commits arrived. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. + Use the merge method the repository's recent PRs used, and pin the commit so nothing newer can slip in: ```bash diff --git a/.claude/skills/test-driven-development/SKILL.md b/.claude/skills/test-driven-development/SKILL.md index 600c76c..7da5cab 100644 --- a/.claude/skills/test-driven-development/SKILL.md +++ b/.claude/skills/test-driven-development/SKILL.md @@ -46,6 +46,12 @@ repo has no practical test seam. State the limitation and choose the closest ver writes, so broken code fails before it touches anything. Keep fixtures where a wrong path can't reach real state: temp folders often sit under the real home folder. Afterwards, check that the RED run left nothing outside the fixture. + For a guard, refusal or permission check, a refusal test passes just as well on an argument error. + Pair each refused call with the same call plus the override and assert it gets past the guard, then + run the refusal tests once with the guard disabled: they must fail because the action happened. + When the code has fallbacks (capture methods, retries, provider chains), a pass proves only the + branch that ran. Assert or log which branch ran, force each one you claim works, or say which ones + stayed unverified. 4. **GREEN — implement the minimum.** Write only enough production code to pass. Do not add unrequested options, abstractions, cleanup, or drive-by edits. If the test is hard to write, treat that as design feedback and improve the seam. @@ -114,6 +120,8 @@ Avoid tests that: - [ ] New behavior has a focused test. - [ ] The test failed for the intended reason before implementation. +- [ ] Guard or refusal tests also fail with the guard disabled, and the override path passes the guard. +- [ ] For code with fallbacks, each branch claimed as working was the one that ran in some test. - [ ] Production code is the minimal change needed to pass. - [ ] Targeted and relevant broader tests pass. - [ ] No test was weakened to fit the implementation. diff --git a/.claude/skills/windows-agent-tooling/SKILL.md b/.claude/skills/windows-agent-tooling/SKILL.md index 49e0b9a..6659154 100644 --- a/.claude/skills/windows-agent-tooling/SKILL.md +++ b/.claude/skills/windows-agent-tooling/SKILL.md @@ -75,6 +75,9 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws - In Git Bash, prefix `MSYS_NO_PATHCONV=1` when a non-Windows tool takes a Unix-style path that starts with `/`, since MSYS rewrites it into a Windows path (but see the next bullets: Git's own `-C` then needs `D:/...`). For example, `docker exec`/`docker run` with container paths (`-w /app`, `/data/...`) fails with "Cwd must be an absolute path". - Use the same prefix for `git show :`. MSYS can rewrite the argument into something like `origin\main;.agent\...`, and a pipeline can hide the failure behind a plausible result such as a `0` count. With the prefix set, write paths in that command as `D:/...`: MSYS no longer translates `/d/...`, so `git -C /d/...` fails. +- MSYS rewrites any argument that starts with `/`, including free text: ticket titles, acceptance criteria, commit + messages (`/ws` became `C:/Program Files/Git/ws` in a stored ticket). Pass such text through a file + (`--body-file`, `-F`), prefix `MSYS_NO_PATHCONV=1`, or don't start the argument with `/`. - From Git Bash, `powershell -NoProfile -Command "... $_ ..."` lets bash expand `$_` and other `$vars` inside the double quotes before PowerShell parses them, which causes parser errors. Use the harness PowerShell tool, single-quote the command (`-Command '...'`), or put it in a `.ps1` file and run it with `-File`. - **PowerShell 5.1 UTF-8 BOM on config edits:** Whenever generating a PowerShell snippet for a user to edit JSON, TOML, or YAML configs (where Windows' default terminal may be Windows PowerShell 5.1 rather than `pwsh` 7), back up the file first and write via `[IO.File]::WriteAllText($p, $text, [Text.UTF8Encoding]::new($false))` instead of `Set-Content -Encoding utf8` (which writes a UTF-8 BOM that breaks strict JSON loaders); verify by re-parsing with `ConvertFrom-Json`. - See [bounded-output-patterns.md](../cli-tools-overview/references/bounded-output-patterns.md). diff --git a/.cursor/skills/merge-pr/SKILL.md b/.cursor/skills/merge-pr/SKILL.md index fb6b7c5..2416654 100644 --- a/.cursor/skills/merge-pr/SKILL.md +++ b/.cursor/skills/merge-pr/SKILL.md @@ -207,8 +207,17 @@ Immediately before merging, re-read the PR and confirm: - the runs for `` still show the case from step 2: all green, only the not-started cause, the same mix of passed and not-started runs, or, when CI never triggered or there is none, still none. -**Stacked PRs:** after the base PR merges, run `gh pr edit --base main`; unless the parent branch was -deleted, the child would merge into the merged branch and never reach `main`. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. Retarget even when the branch stays: otherwise the child merges into the merged branch and + never reaches the base. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. Use the merge method the repository's recent PRs used, pinned to the checked commit: diff --git a/.cursor/skills/ship-pr/SKILL.md b/.cursor/skills/ship-pr/SKILL.md index d9f9e57..8f14ae2 100644 --- a/.cursor/skills/ship-pr/SKILL.md +++ b/.cursor/skills/ship-pr/SKILL.md @@ -156,6 +156,17 @@ Merging is the last step. Immediately before it, re-read the PR and confirm all - the PR is mergeable with no conflicts, and no review has changed; - no new commits arrived. +**Stacked PRs.** Before merging, list open PRs whose base is this PR's head branch: +`gh pr list --base --state open`. If there are any: + +- Merge without `--delete-branch`. Deleting the branch a child PR is based on closes that child; it + does not retarget it. Retarget each child with `gh pr edit --base `, then delete the + branch. +- After a squash merge, each child conflicts with the base: git no longer sees the parent's commits + as shared. Merge the base into the child, check that the result's tree equals the reviewed head + (`git diff ` is empty when the base holds exactly the parent's tree), and + gate the new head again. Prefer merge commits for a stack when the repository allows them. + Use the merge method the repository's recent PRs used, and pin the commit so nothing newer can slip in: ```bash diff --git a/.cursor/skills/test-driven-development/SKILL.md b/.cursor/skills/test-driven-development/SKILL.md index 600c76c..7da5cab 100644 --- a/.cursor/skills/test-driven-development/SKILL.md +++ b/.cursor/skills/test-driven-development/SKILL.md @@ -46,6 +46,12 @@ repo has no practical test seam. State the limitation and choose the closest ver writes, so broken code fails before it touches anything. Keep fixtures where a wrong path can't reach real state: temp folders often sit under the real home folder. Afterwards, check that the RED run left nothing outside the fixture. + For a guard, refusal or permission check, a refusal test passes just as well on an argument error. + Pair each refused call with the same call plus the override and assert it gets past the guard, then + run the refusal tests once with the guard disabled: they must fail because the action happened. + When the code has fallbacks (capture methods, retries, provider chains), a pass proves only the + branch that ran. Assert or log which branch ran, force each one you claim works, or say which ones + stayed unverified. 4. **GREEN — implement the minimum.** Write only enough production code to pass. Do not add unrequested options, abstractions, cleanup, or drive-by edits. If the test is hard to write, treat that as design feedback and improve the seam. @@ -114,6 +120,8 @@ Avoid tests that: - [ ] New behavior has a focused test. - [ ] The test failed for the intended reason before implementation. +- [ ] Guard or refusal tests also fail with the guard disabled, and the override path passes the guard. +- [ ] For code with fallbacks, each branch claimed as working was the one that ran in some test. - [ ] Production code is the minimal change needed to pass. - [ ] Targeted and relevant broader tests pass. - [ ] No test was weakened to fit the implementation. diff --git a/.cursor/skills/windows-agent-tooling/SKILL.md b/.cursor/skills/windows-agent-tooling/SKILL.md index 49e0b9a..6659154 100644 --- a/.cursor/skills/windows-agent-tooling/SKILL.md +++ b/.cursor/skills/windows-agent-tooling/SKILL.md @@ -75,6 +75,9 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws - In Git Bash, prefix `MSYS_NO_PATHCONV=1` when a non-Windows tool takes a Unix-style path that starts with `/`, since MSYS rewrites it into a Windows path (but see the next bullets: Git's own `-C` then needs `D:/...`). For example, `docker exec`/`docker run` with container paths (`-w /app`, `/data/...`) fails with "Cwd must be an absolute path". - Use the same prefix for `git show :`. MSYS can rewrite the argument into something like `origin\main;.agent\...`, and a pipeline can hide the failure behind a plausible result such as a `0` count. With the prefix set, write paths in that command as `D:/...`: MSYS no longer translates `/d/...`, so `git -C /d/...` fails. +- MSYS rewrites any argument that starts with `/`, including free text: ticket titles, acceptance criteria, commit + messages (`/ws` became `C:/Program Files/Git/ws` in a stored ticket). Pass such text through a file + (`--body-file`, `-F`), prefix `MSYS_NO_PATHCONV=1`, or don't start the argument with `/`. - From Git Bash, `powershell -NoProfile -Command "... $_ ..."` lets bash expand `$_` and other `$vars` inside the double quotes before PowerShell parses them, which causes parser errors. Use the harness PowerShell tool, single-quote the command (`-Command '...'`), or put it in a `.ps1` file and run it with `-File`. - **PowerShell 5.1 UTF-8 BOM on config edits:** Whenever generating a PowerShell snippet for a user to edit JSON, TOML, or YAML configs (where Windows' default terminal may be Windows PowerShell 5.1 rather than `pwsh` 7), back up the file first and write via `[IO.File]::WriteAllText($p, $text, [Text.UTF8Encoding]::new($false))` instead of `Set-Content -Encoding utf8` (which writes a UTF-8 BOM that breaks strict JSON loaders); verify by re-parsing with `ConvertFrom-Json`. - See [bounded-output-patterns.md](../cli-tools-overview/references/bounded-output-patterns.md).