Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Canonical source for the fleet's Claude Code / opencode / Codex Skills, one directory per skill: `<name>/SKILL.md` plus optional `scripts/` and `references/`. This is the only place a skill's content is hand-authored. Everything else derived from it is generated, never hand-edited.

Codex and opencode read this directory directly (`.agents/skills/<name>/SKILL.md`), no install step required, walking from a downstream repo's working directory up to its own repository root. Claude Code does not scan this path. `scripts/build_dist.py` generates a Claude-plugin-compatible copy at `.claude-plugin/fleet-skills/`, published through `.claude-plugin/marketplace.json`.
Codex and opencode read this directory directly (`.agents/skills/<name>/SKILL.md`), no install step required, walking from a downstream repo's working directory up to its own repository root. Claude Code does not scan this path. GitHub Copilot discovers repository skills under `.github/skills/`. `scripts/build_dist.py` generates both the GitHub tree and a Claude-plugin-compatible copy at `.claude-plugin/fleet-skills/`, published through `.claude-plugin/marketplace.json`.

See `AGENTS.md` for how a repo depends on these skills and `scripts/README.md` for `build_dist.py` and the installer. The procedure for creating, changing, or retiring a skill is the `skill-lifecycle` skill (`skill-lifecycle/SKILL.md` here), which this README defers to.
46 changes: 46 additions & 0 deletions .agents/skills/add-host-tool/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: add-host-tool
description: >-
Adds or changes a managed host tool across the ptr727/ProjectTemplate fleet contract, Linux and
Windows installers, platform documentation, and tests. Use this whenever adding, removing,
renaming, or changing the source, probe, version floor, install, report, upgrade, or dry-run
behavior of a tool in host-setup or spec/host-tools.json. Triggers even when the request names
only one platform, because a required fleet tool needs an executable remedy everywhere it
applies and native verification must stay on the platform being tested.
---

# Add Host Tool

## Establish the Contract

1. Read the issue and all follow-up comments before choosing a source or package identifier.
2. Add the tool to `spec/host-tools.json` in name order.
3. Use the executable's real version banner for the probe and pattern.
4. Set a floor only when it is measured or anchored to every supported distribution.
5. Provide `source` and executable `remedy` entries for every applicable platform.

## Implement Each Platform

- Keep the existing named-tool interface and default selection behavior.
- Prefer the distribution package when it meets the floor.
- Use the platform's established package manager and official package identifier.
- Keep install and upgrade idempotent.
- Before an apt-managed install, detect and remove an unowned downloaded copy that shadows it.
- Before a downloaded install, detect and remove a conflicting package-managed copy.
- Preserve report, list, explicit selection, install, upgrade, reinstall, and dry-run behavior.
- Do not test a Windows mutation on Linux or a Linux mutation on Windows.

When a platform is unavailable, verify its registry and tests without claiming a native install. Hand off the exact native commands and expected observations to the operator.

## Update the Complete Surface

Update the platform installers, `spec/host-tools.json`, `docs/host-setup.md`, and the applicable platform READMEs. Update installer and host-gate tests for selection, reporting, installation, upgrade, and dry-run behavior. Sweep prose that describes tool sources or the managed set.

## Verify

1. Run the spec validator and the focused installer and host-gate tests.
2. Run the repository's formatting, lint, type, and test gates required by the changed files.
3. On the current native platform, exercise list and report first.
4. Exercise install and upgrade dry runs.
5. Apply the install, repeat it to prove idempotence, and run the host gate.
6. Record untested platforms explicitly and leave cross-platform verification open.
71 changes: 71 additions & 0 deletions .agents/skills/code-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: code-review
description: >-
Reviews a pull request or change set against the repository's contracts, with explicit diff
coverage and no suppressed findings. Use this whenever asked to review code, a pull request,
a patch, or a proposed change, and whenever GitHub Copilot performs code review. Triggers even
when the diff is documentation-only or workflow-only, because the review must load the
applicable general, language, documentation, and workflow skills before judging the change.
---

# Code Review

## Establish the Contract

1. Read the root `AGENTS.md` and the sections it routes to for the changed paths.
2. Read the complete diff and enumerate every changed file before forming findings.
3. Load every applicable sibling skill from the current skill distribution:
- `comment-and-doc-style` for Markdown, prose, comments, commit messages, and PR titles.
- `dotnet-codestyle` for C# and .NET changes.
- `python-codestyle` for Python changes.
- `shell-codestyle` for shell changes.
- `workflow-ci-contract` for GitHub Actions and CI/CD changes.
4. Treat a missing executable on `PATH` as no evidence that its check is unavailable. Read the
repository's documented local invocation before reporting a check as skipped.

Do not substitute a familiar convention for the repository's written contract. Report a
conflict between instructions instead of silently choosing one.

## Review the Change

Review for correctness, regressions, security, compatibility, error handling, concurrency,
resource lifetime, tests, and contract drift. Follow data and control flow beyond the edited
lines when the behavior depends on unchanged callers or consumers.

For each candidate finding:

1. Verify it against the current head tree, not an unfetched checkout or the base branch.
2. Identify the concrete failing behavior and the conditions that reach it.
3. Confirm that the repository does not already prevent it elsewhere.
4. Prefer one root-cause finding over several symptoms of the same defect.
5. Omit pure preferences that no repository rule or user-visible risk supports.

Review carried fleet content by intent and fidelity. A byte-locked reference to a path that one
downstream repository does not carry is not a broken link. A substantive defect in canonical
content remains a finding, with the fix located at its canonical source.

## Publish Every Finding

Never suppress or hide a finding because confidence is low. Investigate until it is supported
or discard it. Publish every supported finding as an inline review comment when a changed line
can anchor it. Use the review body only when no valid inline anchor exists.

Each finding states:

- A concise imperative title with a severity.
- The file and smallest useful line range.
- The behavior that fails and the input or state that triggers it.
- Why the change causes the failure.
- A bounded direction for the fix when one is known.

Do not report a clean review until every changed file has been read. End the review body with
exactly one ASCII marker, replacing the numbers with measured counts:

```text
<!-- fleet-review: reviewed=N changed=N findings=N -->
```

`reviewed` is the number of changed files actually reviewed. `changed` is the total number of
changed files. `findings` is the number of published findings, including body-only findings.
Never emit `reviewed=changed` as a placeholder. If full coverage is impossible, emit the actual
counts and explain the limitation in the review body.
8 changes: 4 additions & 4 deletions .agents/skills/copilot-instructions-keeper/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ description: >-

## Why this exists

`.github/copilot-instructions.md` is read directly by the GitHub Copilot review bot, which
cannot read a `SKILL.md`. Unlike other carried governance content, its rule text is never
pointer-ized into a skill, this file always stays fully intact in every repo that carries it.
This skill is about maintaining that file's carried copy, not a substitute for it.
`.github/copilot-instructions.md` is read directly by GitHub Copilot and bootstraps the shared
`AGENTS.md` instruction set and review-focused skills. Its Copilot-specific rules stay fully
intact in every repo that carries it. This skill maintains that carried copy, it does not replace
the bootstrap.

`spec/files.json` declares it `intent` fidelity, `whole: true`, covering three named sections
(`Commit Messages and Pull Request Titles`, `Reviewing Carried Fleet Content`, `GitHub Copilot
Expand Down
26 changes: 13 additions & 13 deletions .agents/skills/pr-review-conduct/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ description: >-
full diff, or left a suppressed low-confidence finding, which opens no thread at all,
unanswered. Also triggers when a review loop looks stuck
(no review landing, findings that keep reappearing) or when deciding a finding is real, false,
deferred, or a deliberate decline. Provider-specific mechanics (GitHub Copilot's request/poll/
reply API calls) live in .github/copilot-instructions.md's "GitHub Copilot Review Runbook,"
this skill is the contract that runbook implements, not a replacement for it.
deferred, or a deliberate decline. Provider-specific mechanics are implemented by
scripts/pr_review.py and bootstrapped by .github/copilot-instructions.md. This skill is the
contract those surfaces implement, not a replacement for them.
---

# PR Review Conduct
Expand Down Expand Up @@ -124,7 +124,8 @@ reviewer's own words to identify it), give one bold verdict per finding (`Fixed
`Disproven`, or `No change needed`), state the `(N)` count the block gave so answers can be
checked against findings, and link the review round. **Read every round, not only the head.** A
suppressed finding does not retire when a later push supersedes it, it just stops showing up in a
head-scoped query while still unanswered.
head-scoped query while still unanswered. Post the answer with `scripts/pr_review.py comment`
from a hub checkout. Do not use a provider connector or reconstruct the GitHub mutation.

## Escalate to the maintainer when

Expand All @@ -134,13 +135,12 @@ head-scoped query while still unanswered.
- A finding is judged real but should not be fixed. That decision is never the agent's alone.
- An architectural redesign is proposed rather than a bug fix.

## Mechanics live elsewhere
## Mechanics Live Elsewhere

This skill is the provider-agnostic contract. For the actual GitHub API calls, requesting a
Copilot review, polling for it, matching the suppressed-findings heading (its wording has moved
more than once), verifying head-SHA and diff coverage, replying and resolving threads without a
hand-typed id, see `.github/copilot-instructions.md` "GitHub Copilot Review Runbook" in the repo
being worked in, and reach for `scripts/pr_review.py` (hub-hosted, invoked from a hub checkout)
before hand-rolling any of it. `status` reports coverage, threads, suppressed findings, and shapes
in one call, `wait` backs off in-process, and `reply` resolves a thread by matching the finding's
own words rather than a line number a fix push can move.
This skill is the provider-agnostic contract. Use `scripts/pr_review.py` from a hub checkout for
the GitHub-specific API operations. `status` reports coverage, threads, body-only findings, and
shapes in one call. `wait` requests and polls in-process. `comment` posts a PR-conversation
answer after it reads the PR node ID. `reply` resolves a thread by matching the finding's own
words instead of a line number a fix push can move. The repository's
`.github/copilot-instructions.md` bootstraps Copilot into the `code-review` skill and its stable
coverage marker. Do not reconstruct the API operations by hand.
7 changes: 7 additions & 0 deletions .agents/skills/python-codestyle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ chaining, so it runs the same on any task shell) is in the hub `vscode-tasks-pyt
CI runs the same clean-compile commands as the authoritative backstop. Git hooks are opt-in, so
wire `pre-commit` for `ruff` and the type checker yourself if you want local enforcement.

A restricted executor gives each task a cache directory under a writable temporary root. Point
`UV_CACHE_DIR`, `RUFF_CACHE_DIR`, `MYPY_CACHE_DIR`, and `COVERAGE_FILE` into that directory before
running the applicable tools. This keeps their generated state outside both the home directory
and the checkout. Do not change `HOME` or an agent configuration directory. A denied network
request means the tool did not run, so preserve the denial and rerun through the executor's scoped
approval mechanism.

## Layout

`src` layout, which keeps the package out of the repo root and prevents accidental imports of
Expand Down
33 changes: 32 additions & 1 deletion .agents/skills/repo-worktree/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: >-
including a continuation of a prior session's task, creates its own git worktree on its own
feature branch before its first file edit, based on the branch work starts on (develop on both
fleet workflow models unless the task is explicitly about main-only content, never whichever
branch a tool defaulted to). Also wraps the mechanics:
branch a tool defaulted to), with a standalone-clone fallback when an executor cannot write
both the standard worktree and its Git metadata. Also wraps the mechanics:
creating a worktree with git worktree add, the fleet layout convention, listing what is in
flight, and removing a worktree and its branch after merge. Use this whenever about to create
or edit files in a fleet repo, whenever starting or resuming a task, whenever the task's
Expand Down Expand Up @@ -97,6 +98,33 @@ git -C ~/repos/<Repo> fetch origin develop
git -C ~/repos/<Repo> worktree add ~/repos/worktrees/<Repo>-<task-slug> -b <task-branch> origin/develop
```

Before choosing that path, inspect the executor's active write boundaries. A linked worktree
requires write access to both of these locations:

- the intended `~/repos/worktrees/<Repo>-<task-slug>` worktree directory
- the base clone's `.git/worktrees/` administrative directory, which holds the index and locks

A writable worktree directory does not make the administrative directory writable.

Use the standard layout when both locations are writable. When either location is outside the
write boundary, create a standalone clone under a writable temporary root. Name it
`<temporary-root>/<Repo>-<task-slug>`, fetch immediately, and create the task branch from
`origin/develop`. A standalone clone keeps its worktree and Git administrative directory under
the same writable root. It therefore supports edits, explicit-path staging, commits, and branch
updates without sharing the base clone's index.

```sh
TASK_ORIGIN="$(git -C <base-clone> remote get-url origin)"
git clone --no-checkout "$TASK_ORIGIN" <temporary-root>/<Repo>-<task-slug>
git -C <temporary-root>/<Repo>-<task-slug> fetch origin develop
git -C <temporary-root>/<Repo>-<task-slug> switch -c <task-branch> origin/develop
```

Do not use a linked worktree under the temporary root when the base clone's Git metadata is
read-only. If an existing linked worktree must be kept, index operations require the executor's
scoped approval for that administrative path. Prefer the standalone clone so ordinary Git work
does not require repeated approval.

A continuation attaches the task's existing branch rather than forking a fresh one:

```sh
Expand Down Expand Up @@ -129,6 +157,9 @@ GitHub default branch, which is the wrong path and the wrong base here. Create t
in flight across the whole fleet.
- After the task's pull request merges, remove the worktree and its branch from the base clone:
`git worktree remove ~/repos/worktrees/<Repo>-<task-slug>`, then `git branch -d <task-branch>`.
- After the task's pull request merges, remove a temporary standalone clone at its exact
`<temporary-root>/<Repo>-<task-slug>` path. The remote branch follows the repository's normal
pull request cleanup policy.
- A worktree that refuses removal is dirty, and force is not the fix: look at what is
uncommitted in it first, since discarding uncommitted work runs only on explicit instruction,
per the `git-commit-conventions` skill.
Loading