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
4 changes: 2 additions & 2 deletions .agents/skills/audit-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The audit is the fleet's measurement procedure, and the failure shapes it guards
- **Know what the runner does and does not prove.** `spec/audit.py` mechanizes the deterministic subset only: settings, rulesets, secret names, file and section presence, verbatim hashing, interface wiring, Dependabot coverage, branch facts. It evaluates no check under a type in `spec/project-types.json`, so every per-type check is judged by hand, and a clean run is no evidence for them (`AUDIT.md` section 4). Silence from a tool that was never looking reads exactly like a pass.
- **Judge letter and intent per check** and keep the vocabulary: letter miss with intent satisfied is a drift finding, both missing is a defect, and operational is binary over the applicable set (`AUDIT.md` sections 4 and 7). Do not invent a parallel scheme.
- **Assert the Actions implement `WORKFLOW.md`** by outcome, not by matching catalog snippets byte for byte: the 5A static audit, each applicable guarantee cited in the form 5A sets out, then the 5B trace scenarios (`AUDIT.md` section 5). Read a workflow the repo only calls at the SHA it pins, throughout. The `workflow-ci-contract` skill summarizes that contract.
- **Check live settings, rulesets, and secrets from a hub checkout at `main`** with `AUDIT.md` section 6. Run `repo-config/configure.sh check` with the target repository and model for settings and rulesets, and `spec/audit.py [RepoName]` for secrets, rather than constructing a local comparison. The hub payloads are the only repository-configuration source.
- **Check live settings, rulesets, and secrets from a hub checkout at `main`** with `AUDIT.md` section 6. Run `repo-config/configure.sh check` with the target repository and model for settings and rulesets, and `uv run --no-project --script spec/audit.py [RepoName]` for secrets, rather than constructing a local comparison. The hub payloads are the only repository-configuration source.

## Reporting

Expand All @@ -36,4 +36,4 @@ The audit is the fleet's measurement procedure, and the failure shapes it guards

Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10: fixes ship as pull requests on the target repo, one focused pull request per drift class, the Copilot loop driven to green per the `pr-review-conduct` skill, and the maintainer merges. For a repo already stood up, `RESYNC.md` sequences the findings, since order matters (a deletion lands before the re-vendor that would refresh it). Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo, and spec questions are escalated rather than resolved silently (`AUDIT.md` section 9).

An audit leaves no checkout behind it, since one left standing is what a later sweep has to tell apart from live work. Each is removed when the run ends, per `repo-worktree` "Listing and Cleanup". The report's pull request is cleaned up once it merges, with `python3 scripts/pr_review.py cleanup <number> --repo ptr727/ProjectTemplate --checkout <hub-base-clone>`. A detached checkout at `main` that only read the hub is removed by hand once it is clean.
An audit leaves no checkout behind it, since one left standing is what a later sweep has to tell apart from live work. Each is removed when the run ends, per `repo-worktree` "Listing and Cleanup". The report's pull request is cleaned up once it merges, with `uv run --no-project --script scripts/pr_review.py cleanup <number> --repo ptr727/ProjectTemplate --checkout <hub-base-clone>`. A detached checkout at `main` that only read the hub is removed by hand once it is clean.
2 changes: 1 addition & 1 deletion .agents/skills/backlog-burndown/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Write Safety" forbids.
So the whole procedure moves to the orchestrator, which runs it against the base clone at the round's
cleanup step, while no worker is live in a tree it touches.
It carries the remote half of `drive-pr`'s post-merge cleanup too.
For a merged group both halves are one command, `python3 scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`, run from a hub checkout once for each merged group, `<base-clone>` being the repository's primary clone.
For a merged group both halves are one command, `uv run --no-project --script scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`, run from a hub checkout once for each merged group, `<base-clone>` being the repository's primary clone.
It deletes the remote branch, then removes the group's worktree and local branch, per `repo-worktree` "Listing and Cleanup", which also says what its exit leaves to do.
Taking that step from the worker without naming a new owner would leave a live remote branch behind every group.
`cleanup` holds the delete's checks, among them the tip against the pull request's `headRefOid`.
Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/drive-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ promotion PR once the fix lands, is the early exit this skill exists to prevent.
checked out, and `gh pr merge --delete-branch` needs to switch that worktree to the base branch
to delete it, which fails when `develop` is already checked out somewhere else, the ordinary
case in this layout. Instead run repo-worktree's post-merge cleanup with
`python3 scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`,
`uv run --no-project --script scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`,
run from a hub checkout outside the task's worktree, `<base-clone>` being the repository's
primary clone. It deletes the remote branch, then removes the task's worktree and local branch.
It decides its local refusals before the remote delete, and `repo-worktree` "Listing and
Expand All @@ -122,7 +122,7 @@ promotion PR once the fix lands, is the early exit this skill exists to prevent.
than deleting by hand: `1` is a refusal, a moved tip among them, `2` a read that did not answer
or a delete it could not confirm, and `64` a target under an owner other than the hub
checkout's own `origin`, or that `origin` unreadable. A registry refusal is a `1`. It runs
under the host-safety installer's `Bash(python3 scripts/pr_review.py:*)` allow rule,
under the host-safety installer's `Bash(uv run --no-project --script scripts/pr_review.py:*)` allow rule,
which is what lets auto mode complete it.
It also refuses while another open pull request in the repository has the branch as its head or base.
It names each, since the delete would close or retarget it.
Expand Down
6 changes: 3 additions & 3 deletions .agents/skills/merge-and-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ skill covers all of it, scoped down by what the maintainer actually asks for.
than reading an empty answer as safe: `gh pr list --head "<branch>" --base develop --state
merged --repo owner/repo --json number --jq 'if length == 1 then .[0].number else
error("expected exactly one merged PR for this head, got \(length)") end'`. Then run
`python3 scripts/pr_review.py cleanup <number> --repo owner/repo --checkout <base-clone>`
`uv run --no-project --script scripts/pr_review.py cleanup <number> --repo owner/repo --checkout <base-clone>`
from a hub checkout outside the worktree it removes, `<base-clone>` being the repository's
primary clone, per `repo-worktree` "Listing and Cleanup". It re-reads that pull request and
repeats the merged, base, head-repository, and tip checks in code, refuses a permanent or
Expand All @@ -186,15 +186,15 @@ skill covers all of it, scoped down by what the maintainer actually asks for.
any other exit stops and reports: `1` is a refusal, `2` an unanswered read or an unconfirmed
delete, and `64` a target under an owner other than the hub checkout's own `origin` or that
`origin` unreadable, a registry refusal being a `1`. It runs under the host-safety
installer's `Bash(python3 scripts/pr_review.py:*)` allow rule, which is what lets auto mode
installer's `Bash(uv run --no-project --script scripts/pr_review.py:*)` allow rule, which is what lets auto mode
complete it.
It also refuses while another open pull request in the repository has the branch as its head or base, naming each.
Where this seat cannot run `cleanup`, report the cleanup to the maintainer instead of running its steps by hand, naming the pull request number and `--repo`.
No direct `git push origin --delete`, ref API delete, `git worktree remove`, or `git branch -D` runs on a feature branch from this skill, because `cleanup` is the one place holding the checks.
Never apply this sweep to `develop` or `main`
themselves, only to feature branches a drive-pr loop created.
- What no single pull request names: run
`python3 scripts/pr_review.py cleanup --sweep --repo owner/repo --checkout <base-clone>`
`uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo owner/repo --checkout <base-clone>`
and report what it lists. It writes nothing but a fetch, and `--apply` runs only on the
maintainer's go-ahead, since the report reaches other sessions' finished work too.

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/pr-review-conduct/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ is not a stopping condition here, and neither is patience running out. Reporting
PR was opened is an early exit unless the maintainer explicitly instructed the agent not to
monitor or drive its review.

After an authorized merge, run the `repo-worktree` post-merge cleanup procedure unless the user explicitly asks to retain the checkout or branch. For a merge into `develop` that procedure is `python3 scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`, run from a hub checkout. The pull request loop is incomplete while its finished worktree or local task branch remains, except a promotion branch merged into `main`, which `repo-worktree` leaves for its sweep. It is also incomplete until the base clone returns to fetched and fast-forwarded `develop`.
After an authorized merge, run the `repo-worktree` post-merge cleanup procedure unless the user explicitly asks to retain the checkout or branch. For a merge into `develop` that procedure is `uv run --no-project --script scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`, run from a hub checkout. The pull request loop is incomplete while its finished worktree or local task branch remains, except a promotion branch merged into `main`, which `repo-worktree` leaves for its sweep. It is also incomplete until the base clone returns to fetched and fast-forwarded `develop`.

## Every finding ends in a listed outcome

Expand Down
17 changes: 17 additions & 0 deletions .agents/skills/python-codestyle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ since `unittest` has no fixture-injection mechanism of its own. Fakes over mocks
the docstring's contract, not implementation details. See `references/testing.md` for the full
build-profile conventions, and `references/profiles.md` for the lint-only `unittest` conventions.

## Tests and Script Dependencies

<!-- include: CODESTYLE.md > Tests and Script Dependencies -->

- **A test lives in a `tests/` directory, never inside the production file it tests.** A deployed script may keep a `--selftest` that runs a small smoke check in seconds, and the case matrix lives in `tests/`. A self-test shipped inside the file it tests grows the file every reviewer reads, and its cases can come to outweigh the code they test.
- **A hub-hosted standalone script that needs a third-party library declares it in PEP 723 inline script metadata, and runs as `uv run --no-project --script <path>`.** The block opens on `# /// script`, closes on `# ///`, and carries `dependencies` and `requires-python`. The fleet already installs uv on hosts and in CI. `--no-project` keeps uv from syncing the project around a script that has no block yet, where it would write a lockfile and a virtual environment. A script with no such block runs under `python3` and uv alike. A hook an agent harness runs on every tool call stays standard-library only, since it runs before any toolchain is guaranteed.

<!-- /include -->

## Versioning

Published packages use `_version.py` with `__version__ = "0.0.0"` as a placeholder. Wire
Expand All @@ -255,6 +264,14 @@ Before pushing or opening a PR:
- Markdown in this directory follows CODESTYLE.md's repo-wide Markdown and Spelling rules,
packaged as the `comment-and-doc-style` Skill.

## Parsing Structured Formats

<!-- include: CODESTYLE.md > Parsing Structured Formats -->

- **A program reading a structured format uses a maintained parser rather than a hand-written one, where a field-tested parser exists for the runtime in use.** That covers YAML, Markdown, TOML, JSON, a programming language's comments or strings, and a shell command line. The standard library's own parsers count, such as Python's `json`, `tomllib`, `ast`, `tokenize`, and `html.parser`. A hand-written reader converges on the format's full grammar one review finding at a time, and every script that grows one pays that cost again.

<!-- /include -->

## Command-Line Arguments

<!-- include: CODESTYLE.md > Command-Line Arguments -->
Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/repo-worktree/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ since git then runs whatever that directory holds, and nothing where it holds no
helper worktree needs no pull request, but its commit must be contained in the branch whose
completed operation created it.
- **A pull request merged into `develop` is cleaned up by one command.** Run
`python3 scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`
`uv run --no-project --script scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`
from a hub checkout outside the worktree it removes, `<base-clone>` being the repository's
primary clone. It reads the branch from the pull request and deletes the remote branch. It then
removes every worktree holding the branch without force, deletes the local branch, and
Expand Down Expand Up @@ -307,7 +307,7 @@ since git then runs whatever that directory holds, and nothing where it holds no
release does not leave the base clone on `main`. Stop and report a dirty base clone or a
non-fast-forward instead of switching or reconciling it.
- **What an interrupted or abandoned session left behind is swept.** Run
`python3 scripts/pr_review.py cleanup --sweep --repo <owner>/<repo> --checkout <base-clone>`
`uv run --no-project --script scripts/pr_review.py cleanup --sweep --repo <owner>/<repo> --checkout <base-clone>`
from a hub checkout. It fetches and prunes `origin` and writes nothing else, and it reports
each worktree and branch that is clean, idle past `--min-age-hours` (default 24), and provably
finished. Adding `--apply` removes what the report lists through the same checks, the remote
Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/resync-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ change from one resync to the next.

Read RESYNC.md section 0. A repo with no instruction set at all, or a partial one, is not this
skill's job, it is STANDUP.md sections 1A and 2 instead, since an absent carried file is a
baseline that never arrived rather than drift to converge. Run `python3 spec/audit.py <RepoName>`,
baseline that never arrived rather than drift to converge. Run `uv run --no-project --script spec/audit.py <RepoName>`,
the target's `registry/repos.json` `name` field rather than an `owner/repo` slug or a checkout
path, and read whether the findings are letters (absent) or drift (present but stale) before doing
anything else. The finding kind names the procedure the repo is owed.
Expand All @@ -45,19 +45,19 @@ may be using, the maintainer's own primary checkout included, even one that look
hub and for the target repo alike, create a worktree of your own off that base clone and work
there, per `repo-worktree`. Remove each one when the run ends, per that skill's "Listing and
Cleanup". A merged pull request's worktree goes through
`python3 scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`. A
`uv run --no-project --script scripts/pr_review.py cleanup <number> --repo <owner>/<repo> --checkout <base-clone>`. A
hub worktree that only read the hub is removed by hand once it is clean, its branch with it. On a machine carrying the hub's agent-safety install, Claude Code also
refuses a mutating git command run directly in a primary checkout, though its rules classify git
and gh commands only, so a plain file write is never denied and the re-vendoring this skill exists
to govern goes uncaught. A compound command is judged whole, so a copy chained to a denied git
write does not run either. Prose is the enforcement here, and following it is not optional. Verify
the host with `python3 scripts/host_gate.py --repo <path-to-target-worktree>`, run from your hub
worktree, since `scripts/` is hub-hosted and no carrier holds it. Then run the audit end to end,
`RESYNC.md` section 2. `python3 spec/audit.py <RepoName>` measures the target's ground-truth
`RESYNC.md` section 2. `uv run --no-project --script spec/audit.py <RepoName>` measures the target's ground-truth
branch, which the registry's `groundTruthBranch` names and which is `main` for every cataloged
repo today, never `develop`. That is the invocation "Confirm the procedure before starting"
already ran, run again here. Convergence lands on a ref `main` does not hold yet, so a run that
previews in-flight work names that ref: `python3 spec/audit.py --branch <ref> <RepoName>`. Use it
previews in-flight work names that ref: `uv run --no-project --script spec/audit.py --branch <ref> <RepoName>`. Use it
to check whether a fix landed, since a run against `main` still reports what the in-flight ref
already fixed. Section 2 carries two further commands that neither of these replaces. A finding is
a snapshot, so quote the run stamp in anything derived from it and re-run before acting on a
Expand Down Expand Up @@ -87,7 +87,7 @@ re-measure against `develop` and base the branch for the steps below on `develop
5. **Settings, rulesets, and secrets.** Run
`repo-config/configure.sh check "<owner>/<repo>" release` (substitute `operational` for an
operational repo) from the hub at `main`, then `apply` for what it reports, never from a
carried copy. Run `python3 spec/audit.py <RepoName>` from the same checkout for secrets.
carried copy. Run `uv run --no-project --script spec/audit.py <RepoName>` from the same checkout for secrets.
6. **Intent files last, and by hand,** since nothing mechanical judges these.

Reconcile the registry entry (`status`, `types`, `releaseTrigger`, `workflowModel`,
Expand Down
8 changes: 8 additions & 0 deletions .agents/skills/shell-codestyle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ depend on Python either. Everything else is Python, with a test under its own sc
stale silently, where a comment carrying a reason fails visibly when the reason stops being
true.

## Parsing Structured Formats

<!-- include: CODESTYLE.md > Parsing Structured Formats -->

- **A program reading a structured format uses a maintained parser rather than a hand-written one, where a field-tested parser exists for the runtime in use.** That covers YAML, Markdown, TOML, JSON, a programming language's comments or strings, and a shell command line. The standard library's own parsers count, such as Python's `json`, `tomllib`, `ast`, `tokenize`, and `html.parser`. A hand-written reader converges on the format's full grammar one review finding at a time, and every script that grows one pays that cost again.

<!-- /include -->

## Command-Line Arguments

<!-- include: CODESTYLE.md > Command-Line Arguments -->
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/fleet-skills/.source-digests/audit-a-repo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f35eb33a4105074c
5a9bc7db47dcc412
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4ee037668043169b
465d600e180f3205
2 changes: 1 addition & 1 deletion .claude-plugin/fleet-skills/.source-digests/drive-pr
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7d9e6e4d2054d366
c505ee536cd9fc4b
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f02e5f0fe1f6aa50
21cefc7fd8a4a77b
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0020fcbb04ea694b
0c0d090b10d0e195
Original file line number Diff line number Diff line change
@@ -1 +1 @@
72290bc75166d626
2cc0649ed49326a5
2 changes: 1 addition & 1 deletion .claude-plugin/fleet-skills/.source-digests/repo-worktree
Original file line number Diff line number Diff line change
@@ -1 +1 @@
186ca4bcb8c843e3
c233d55574283ea1
2 changes: 1 addition & 1 deletion .claude-plugin/fleet-skills/.source-digests/resync-a-repo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a7d5b86ccfdd7e69
15f83a2a88f819c3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0eec487f8178228e
1b5ccf36ae0b9176
Loading
Loading