diff --git a/.agent/SKILL_INVENTORY.md b/.agent/SKILL_INVENTORY.md index 241a1ca..1ada84e 100644 --- a/.agent/SKILL_INVENTORY.md +++ b/.agent/SKILL_INVENTORY.md @@ -1,6 +1,6 @@ # Skill inventory — ${PROJECT_NAME} -**Last reviewed:** 2026-11-28. Companion to [SKILL_CHANGE_AST10_REVIEW.md](SKILL_CHANGE_AST10_REVIEW.md) +**Last reviewed:** 2026-11-29. Companion to [SKILL_CHANGE_AST10_REVIEW.md](SKILL_CHANGE_AST10_REVIEW.md) and [SKILL_COMPILATION.md](SKILL_COMPILATION.md). Update this file (new row or **Last reviewed** date) in the same PR as any skill change. diff --git a/.agents/skills/agent-setup/references/usage.md b/.agents/skills/agent-setup/references/usage.md index e9e13af..b69216b 100644 --- a/.agents/skills/agent-setup/references/usage.md +++ b/.agents/skills/agent-setup/references/usage.md @@ -24,12 +24,19 @@ Use the local receipt and subsequent plan as evidence; file installation alone d `plan` has no per-skill option. To take in one skill (for example after its PR merges), make the full plan, then keep only that skill's operations: -1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. +1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. When several checkouts or worktrees hold a ledger, use the one whose `targets/*.json` contains the skill's relative path (for example `.claude/skills//SKILL.md`). A ledger without the skill plans every copy as a conflict. 2. Write a copy of the plan that keeps only the operations whose `relative` path is under `//` for the four user skill trees (`.claude/skills`, `.agents/skills`, `.gemini/config/skills`, `.gemini/antigravity-cli/skills`). Update `summary` to match. 3. Have the user review that list, then `apply --input ` and `check --input `. This is safe because `apply` checks every operation it is given (library and installer hashes, the target root, the destination folder, the content hashes) without requiring the full list. Conflicts are skipped and recorded in the receipt. The ownership ledger merges, so other skills' entries stay. +**A conflict that isn't a local edit.** `apply` skips a copy with no ledger entry ("unmanaged or overlapping edit"), even when it equals an earlier library version. For each conflicting file in the skill's folder, `SKILL.md` and `references/` alike, compare it with that file's history (`git log -p -- .claude/skills//`), ignoring line endings. Note that the installer rewrites the frontmatter `name` for a renamed install. If every file matches a past version, it's a stale install, not the user's edit. Keep it in the ledger by going through `apply`: + +- Record it in `.agent/setup/library.json` in a reviewed PR, so `apply` adopts it with a backup, a receipt and a ledger entry. `SKILL.md` goes in `reviewed_global_adoptions`. Every other file (`references/`, scripts) goes in `reviewed_resource_adoptions`, one entry per installed path (`relative`, `sha256`, reason) in each tree that holds it. Or: +- with the user's approval, move the stale folder to a backup under `` (for example `/stale-backups/-/`); `apply` creates its own run folder later. The re-plan then reads `create`, and `apply` writes the files and records ownership. + +Writing the plan's content to the file by hand leaves it unmanaged, with no receipt or rollback, so the next library change to that skill conflicts again. Anything that matches no past version is the user's edit: leave it and report it. + ## Explicit MCP replacement Use this procedure when the user asks to replace one harness's MCP registrations with another's. The named harness is the source for that request, not a permanent default for future tasks. Replacement requires explicit user intent; ordinary synchronization stays additive. diff --git a/.agents/skills/merge-pr/SKILL.md b/.agents/skills/merge-pr/SKILL.md index 0bdefd6..55160a8 100644 --- a/.agents/skills/merge-pr/SKILL.md +++ b/.agents/skills/merge-pr/SKILL.md @@ -263,7 +263,9 @@ why the workflow stopped triggering) or, with no CI, that there is none to run. ## Never -Leave these for the user, with a paste-ready command where one helps: +Leave these for the user, with a paste-ready command where one helps. A paste-ready +`gh pr merge --match-head-commit` takes the full 40-character `headRefOid`; a short SHA is rejected +("Could not coerce value ... to GitObjectID"). - Merging when any CI job actually ran and failed, or while runs are still pending. - Merging past a review that isn't approved, or with admin rights to get past branch protection. diff --git a/.agents/skills/skill-authoring/SKILL.md b/.agents/skills/skill-authoring/SKILL.md index ebded80..d154f58 100644 --- a/.agents/skills/skill-authoring/SKILL.md +++ b/.agents/skills/skill-authoring/SKILL.md @@ -166,3 +166,7 @@ When improving an existing skill, compare against the previous version and look - [ ] `python scripts/ci/check_agent_frontmatter.py` passes - [ ] `.agent/SKILL_INVENTORY.md` updated for new or materially changed skills - [ ] AST10 review considerations documented in the PR summary for material changes +- [ ] PR can't merge because `docs/agent-asset-inventory.md` conflicts with another skill PR: merge + `origin/main` into the branch, take either side of that file, run + `python scripts/generate_agent_asset_inventory.py` and its `--check`, then push without force. It's + generated, so don't hand-merge it. diff --git a/.agents/skills/windows-agent-tooling/SKILL.md b/.agents/skills/windows-agent-tooling/SKILL.md index 0a61338..dea5df1 100644 --- a/.agents/skills/windows-agent-tooling/SKILL.md +++ b/.agents/skills/windows-agent-tooling/SKILL.md @@ -72,7 +72,7 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws ## Agent-Safe Patterns - Avoid mixing `D:\` and `/mnt/d/` in one workflow. -- In Git Bash, prefix `MSYS_NO_PATHCONV=1` to `docker exec`/`docker run` commands that pass container paths (`-w /app`, `/data/...`); otherwise MSYS rewrites them to Windows paths ("Cwd must be an absolute path"). +- 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. - 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`. diff --git a/.claude/skills/agent-setup/references/usage.md b/.claude/skills/agent-setup/references/usage.md index e9e13af..b69216b 100644 --- a/.claude/skills/agent-setup/references/usage.md +++ b/.claude/skills/agent-setup/references/usage.md @@ -24,12 +24,19 @@ Use the local receipt and subsequent plan as evidence; file installation alone d `plan` has no per-skill option. To take in one skill (for example after its PR merges), make the full plan, then keep only that skill's operations: -1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. +1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. When several checkouts or worktrees hold a ledger, use the one whose `targets/*.json` contains the skill's relative path (for example `.claude/skills//SKILL.md`). A ledger without the skill plans every copy as a conflict. 2. Write a copy of the plan that keeps only the operations whose `relative` path is under `//` for the four user skill trees (`.claude/skills`, `.agents/skills`, `.gemini/config/skills`, `.gemini/antigravity-cli/skills`). Update `summary` to match. 3. Have the user review that list, then `apply --input ` and `check --input `. This is safe because `apply` checks every operation it is given (library and installer hashes, the target root, the destination folder, the content hashes) without requiring the full list. Conflicts are skipped and recorded in the receipt. The ownership ledger merges, so other skills' entries stay. +**A conflict that isn't a local edit.** `apply` skips a copy with no ledger entry ("unmanaged or overlapping edit"), even when it equals an earlier library version. For each conflicting file in the skill's folder, `SKILL.md` and `references/` alike, compare it with that file's history (`git log -p -- .claude/skills//`), ignoring line endings. Note that the installer rewrites the frontmatter `name` for a renamed install. If every file matches a past version, it's a stale install, not the user's edit. Keep it in the ledger by going through `apply`: + +- Record it in `.agent/setup/library.json` in a reviewed PR, so `apply` adopts it with a backup, a receipt and a ledger entry. `SKILL.md` goes in `reviewed_global_adoptions`. Every other file (`references/`, scripts) goes in `reviewed_resource_adoptions`, one entry per installed path (`relative`, `sha256`, reason) in each tree that holds it. Or: +- with the user's approval, move the stale folder to a backup under `` (for example `/stale-backups/-/`); `apply` creates its own run folder later. The re-plan then reads `create`, and `apply` writes the files and records ownership. + +Writing the plan's content to the file by hand leaves it unmanaged, with no receipt or rollback, so the next library change to that skill conflicts again. Anything that matches no past version is the user's edit: leave it and report it. + ## Explicit MCP replacement Use this procedure when the user asks to replace one harness's MCP registrations with another's. The named harness is the source for that request, not a permanent default for future tasks. Replacement requires explicit user intent; ordinary synchronization stays additive. diff --git a/.claude/skills/merge-pr/SKILL.md b/.claude/skills/merge-pr/SKILL.md index 0bdefd6..55160a8 100644 --- a/.claude/skills/merge-pr/SKILL.md +++ b/.claude/skills/merge-pr/SKILL.md @@ -263,7 +263,9 @@ why the workflow stopped triggering) or, with no CI, that there is none to run. ## Never -Leave these for the user, with a paste-ready command where one helps: +Leave these for the user, with a paste-ready command where one helps. A paste-ready +`gh pr merge --match-head-commit` takes the full 40-character `headRefOid`; a short SHA is rejected +("Could not coerce value ... to GitObjectID"). - Merging when any CI job actually ran and failed, or while runs are still pending. - Merging past a review that isn't approved, or with admin rights to get past branch protection. diff --git a/.claude/skills/skill-authoring/SKILL.md b/.claude/skills/skill-authoring/SKILL.md index ebded80..d154f58 100644 --- a/.claude/skills/skill-authoring/SKILL.md +++ b/.claude/skills/skill-authoring/SKILL.md @@ -166,3 +166,7 @@ When improving an existing skill, compare against the previous version and look - [ ] `python scripts/ci/check_agent_frontmatter.py` passes - [ ] `.agent/SKILL_INVENTORY.md` updated for new or materially changed skills - [ ] AST10 review considerations documented in the PR summary for material changes +- [ ] PR can't merge because `docs/agent-asset-inventory.md` conflicts with another skill PR: merge + `origin/main` into the branch, take either side of that file, run + `python scripts/generate_agent_asset_inventory.py` and its `--check`, then push without force. It's + generated, so don't hand-merge it. diff --git a/.claude/skills/windows-agent-tooling/SKILL.md b/.claude/skills/windows-agent-tooling/SKILL.md index 0a61338..dea5df1 100644 --- a/.claude/skills/windows-agent-tooling/SKILL.md +++ b/.claude/skills/windows-agent-tooling/SKILL.md @@ -72,7 +72,7 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws ## Agent-Safe Patterns - Avoid mixing `D:\` and `/mnt/d/` in one workflow. -- In Git Bash, prefix `MSYS_NO_PATHCONV=1` to `docker exec`/`docker run` commands that pass container paths (`-w /app`, `/data/...`); otherwise MSYS rewrites them to Windows paths ("Cwd must be an absolute path"). +- 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. - 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`. diff --git a/.cursor/skills/agent-setup/references/usage.md b/.cursor/skills/agent-setup/references/usage.md index e9e13af..b69216b 100644 --- a/.cursor/skills/agent-setup/references/usage.md +++ b/.cursor/skills/agent-setup/references/usage.md @@ -24,12 +24,19 @@ Use the local receipt and subsequent plan as evidence; file installation alone d `plan` has no per-skill option. To take in one skill (for example after its PR merges), make the full plan, then keep only that skill's operations: -1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. +1. `plan --scope global --state --out /plan-full.json`. Use **the `--state` folder your earlier installs used**: the one holding `targets/*.json`, by default `.agent/local/setup` in the checkout that ran them. A scratch worktree has its own default and no ownership ledger, so its plan shows hundreds of unrelated creates and conflicts. When several checkouts or worktrees hold a ledger, use the one whose `targets/*.json` contains the skill's relative path (for example `.claude/skills//SKILL.md`). A ledger without the skill plans every copy as a conflict. 2. Write a copy of the plan that keeps only the operations whose `relative` path is under `//` for the four user skill trees (`.claude/skills`, `.agents/skills`, `.gemini/config/skills`, `.gemini/antigravity-cli/skills`). Update `summary` to match. 3. Have the user review that list, then `apply --input ` and `check --input `. This is safe because `apply` checks every operation it is given (library and installer hashes, the target root, the destination folder, the content hashes) without requiring the full list. Conflicts are skipped and recorded in the receipt. The ownership ledger merges, so other skills' entries stay. +**A conflict that isn't a local edit.** `apply` skips a copy with no ledger entry ("unmanaged or overlapping edit"), even when it equals an earlier library version. For each conflicting file in the skill's folder, `SKILL.md` and `references/` alike, compare it with that file's history (`git log -p -- .claude/skills//`), ignoring line endings. Note that the installer rewrites the frontmatter `name` for a renamed install. If every file matches a past version, it's a stale install, not the user's edit. Keep it in the ledger by going through `apply`: + +- Record it in `.agent/setup/library.json` in a reviewed PR, so `apply` adopts it with a backup, a receipt and a ledger entry. `SKILL.md` goes in `reviewed_global_adoptions`. Every other file (`references/`, scripts) goes in `reviewed_resource_adoptions`, one entry per installed path (`relative`, `sha256`, reason) in each tree that holds it. Or: +- with the user's approval, move the stale folder to a backup under `` (for example `/stale-backups/-/`); `apply` creates its own run folder later. The re-plan then reads `create`, and `apply` writes the files and records ownership. + +Writing the plan's content to the file by hand leaves it unmanaged, with no receipt or rollback, so the next library change to that skill conflicts again. Anything that matches no past version is the user's edit: leave it and report it. + ## Explicit MCP replacement Use this procedure when the user asks to replace one harness's MCP registrations with another's. The named harness is the source for that request, not a permanent default for future tasks. Replacement requires explicit user intent; ordinary synchronization stays additive. diff --git a/.cursor/skills/merge-pr/SKILL.md b/.cursor/skills/merge-pr/SKILL.md index 0bdefd6..55160a8 100644 --- a/.cursor/skills/merge-pr/SKILL.md +++ b/.cursor/skills/merge-pr/SKILL.md @@ -263,7 +263,9 @@ why the workflow stopped triggering) or, with no CI, that there is none to run. ## Never -Leave these for the user, with a paste-ready command where one helps: +Leave these for the user, with a paste-ready command where one helps. A paste-ready +`gh pr merge --match-head-commit` takes the full 40-character `headRefOid`; a short SHA is rejected +("Could not coerce value ... to GitObjectID"). - Merging when any CI job actually ran and failed, or while runs are still pending. - Merging past a review that isn't approved, or with admin rights to get past branch protection. diff --git a/.cursor/skills/skill-authoring/SKILL.md b/.cursor/skills/skill-authoring/SKILL.md index ebded80..d154f58 100644 --- a/.cursor/skills/skill-authoring/SKILL.md +++ b/.cursor/skills/skill-authoring/SKILL.md @@ -166,3 +166,7 @@ When improving an existing skill, compare against the previous version and look - [ ] `python scripts/ci/check_agent_frontmatter.py` passes - [ ] `.agent/SKILL_INVENTORY.md` updated for new or materially changed skills - [ ] AST10 review considerations documented in the PR summary for material changes +- [ ] PR can't merge because `docs/agent-asset-inventory.md` conflicts with another skill PR: merge + `origin/main` into the branch, take either side of that file, run + `python scripts/generate_agent_asset_inventory.py` and its `--check`, then push without force. It's + generated, so don't hand-merge it. diff --git a/.cursor/skills/windows-agent-tooling/SKILL.md b/.cursor/skills/windows-agent-tooling/SKILL.md index 0a61338..dea5df1 100644 --- a/.cursor/skills/windows-agent-tooling/SKILL.md +++ b/.cursor/skills/windows-agent-tooling/SKILL.md @@ -72,7 +72,7 @@ Full diagram: [windows-wsl-split.md](../cli-tools-overview/references/windows-ws ## Agent-Safe Patterns - Avoid mixing `D:\` and `/mnt/d/` in one workflow. -- In Git Bash, prefix `MSYS_NO_PATHCONV=1` to `docker exec`/`docker run` commands that pass container paths (`-w /app`, `/data/...`); otherwise MSYS rewrites them to Windows paths ("Cwd must be an absolute path"). +- 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. - 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`.