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/audit-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ The audit is the fleet's measurement procedure. The failure shapes it guards aga

## After the Report

Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the Copilot loop is 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `AUDIT.md` section 9.
Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the agent drives the fix pull request into the target's `develop` to green, per the `pr-review-conduct` skill. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`. The re-audit runs once the fix is on `main`. 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `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 `uv run --no-project --script scripts/pr_review.py cleanup "<number>" --repo ptr727/ProjectTemplate --checkout ~/repos/ProjectTemplate`, `~/repos/ProjectTemplate` being the hub's primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. A detached checkout at `main` that only read the hub is removed by hand once it is clean.
6 changes: 5 additions & 1 deletion .agents/skills/resync-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ Where `RESYNC.md` section 4 requires a pin bump before a retirement, the bump la
deletions pull request. A pull request is never a direct
push to a protected branch and never a hand edit outside a pull request. Close the review loop,
per the `pr-review-conduct` skill, before asking the maintainer for merge permission. The
maintainer merges, the agent drives to green and stops. Re-run the audit after the merge.
agent drives each fix pull request into the target's `develop` to green. Once the maintainer
merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one,
and drives it to green. The maintainer merges that too. On an operational repository, the agent
confirms that a promotion is wanted before opening one, per `drive-pr`.
Re-run the audit once the fix is on `main`.
From the hub checkout, commit the report under the hub's own `reports/` once authorized, per
`AUDIT.md` section 8 and `git-commit-conventions`. A session resyncing its own repository
leaves the report to a hub-side audit instead. Done means measured, not applied.
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 @@
592ffff8cbe35734
7c60eac88803cfe0
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 @@
c30bd281093441d9
3f5c7c32eaeaabf8
2 changes: 1 addition & 1 deletion .claude-plugin/fleet-skills/skills/audit-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ The audit is the fleet's measurement procedure. The failure shapes it guards aga

## After the Report

Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the Copilot loop is 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `AUDIT.md` section 9.
Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the agent drives the fix pull request into the target's `develop` to green, per the `pr-review-conduct` skill. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`. The re-audit runs once the fix is on `main`. 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `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 `uv run --no-project --script scripts/pr_review.py cleanup "<number>" --repo ptr727/ProjectTemplate --checkout ~/repos/ProjectTemplate`, `~/repos/ProjectTemplate` being the hub's primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. A detached checkout at `main` that only read the hub is removed by hand once it is clean.
6 changes: 5 additions & 1 deletion .claude-plugin/fleet-skills/skills/resync-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ Where `RESYNC.md` section 4 requires a pin bump before a retirement, the bump la
deletions pull request. A pull request is never a direct
push to a protected branch and never a hand edit outside a pull request. Close the review loop,
per the `pr-review-conduct` skill, before asking the maintainer for merge permission. The
maintainer merges, the agent drives to green and stops. Re-run the audit after the merge.
agent drives each fix pull request into the target's `develop` to green. Once the maintainer
merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one,
and drives it to green. The maintainer merges that too. On an operational repository, the agent
confirms that a promotion is wanted before opening one, per `drive-pr`.
Re-run the audit once the fix is on `main`.
From the hub checkout, commit the report under the hub's own `reports/` once authorized, per
`AUDIT.md` section 8 and `git-commit-conventions`. A session resyncing its own repository
leaves the report to a hub-side audit instead. Done means measured, not applied.
2 changes: 1 addition & 1 deletion .github/skills/audit-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ The audit is the fleet's measurement procedure. The failure shapes it guards aga

## After the Report

Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the Copilot loop is 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `AUDIT.md` section 9.
Measuring and fixing are separate phases. Converging is `AUDIT.md` section 10. In that section, a file fix ships as a pull request on the target repo, one focused pull request per drift class. In that section too, the agent drives the fix pull request into the target's `develop` to green, per the `pr-review-conduct` skill. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`. The re-audit runs once the fix is on `main`. 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). Its section 6 states the one grouping. Systemic drift shared by many repos is fixed in the hub spec, not hand-patched per repo. Spec questions are escalated rather than resolved silently. Both are in `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 `uv run --no-project --script scripts/pr_review.py cleanup "<number>" --repo ptr727/ProjectTemplate --checkout ~/repos/ProjectTemplate`, `~/repos/ProjectTemplate` being the hub's primary clone. That path is the convention layout, and a machine not yet migrated passes its actual primary clone instead. Spell every `scripts/pr_review.py` call this skill prints as `pr-review-conduct` "Expected review loop" says. A detached checkout at `main` that only read the hub is removed by hand once it is clean.
6 changes: 5 additions & 1 deletion .github/skills/resync-a-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ Where `RESYNC.md` section 4 requires a pin bump before a retirement, the bump la
deletions pull request. A pull request is never a direct
push to a protected branch and never a hand edit outside a pull request. Close the review loop,
per the `pr-review-conduct` skill, before asking the maintainer for merge permission. The
maintainer merges, the agent drives to green and stops. Re-run the audit after the merge.
agent drives each fix pull request into the target's `develop` to green. Once the maintainer
merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one,
and drives it to green. The maintainer merges that too. On an operational repository, the agent
confirms that a promotion is wanted before opening one, per `drive-pr`.
Re-run the audit once the fix is on `main`.
From the hub checkout, commit the report under the hub's own `reports/` once authorized, per
`AUDIT.md` section 8 and `git-commit-conventions`. A session resyncing its own repository
leaves the report to a hub-side audit instead. Done means measured, not applied.
7 changes: 4 additions & 3 deletions AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ flowchart LR
finding["a finding from 7: Verdict Model"] -->|"the same miss, many repos"| s9["9: Escalate, fix the spec instead"]
finding -->|"one repo"| s10["10: Converge, branch + fix + PR"]
s10 --> review["review loop to green"]
review --> merge["maintainer merges"]
merge --> reaudit["re-audit, the hub commits the report"]
review --> merge["maintainer merges into develop"]
merge --> promote["promotion to main, driven to green, maintainer merges"]
promote --> reaudit["re-audit, the hub commits the report"]
s9 --> reaudit
```

Expand All @@ -236,7 +237,7 @@ Sections 0-9 (the audit and its report) never edit the target's content. **Conve

- **Apply a file fix via a pull request on the target repo.** Branch from the target's `develop`, make the fix, and open a PR against `develop`.
- **Drive the PR's review to green** - the same loop the hub runs (see [GOVERNANCE.md "PR Review Etiquette"][governance-pr-review-etiquette]). The [Copilot review runbook][copilot-runbook] in `.github/copilot-instructions.md` covers that one reviewer's mechanics.
- **Merge only with explicit maintainer approval.** The agent drives to green and stops. The maintainer merges.
- **Merge only with explicit maintainer approval.** The agent drives the fix pull request into the target's `develop` to green. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`.
- **Re-audit once the fix reaches `main`.** Section 1 reads `main` as ground truth, so a convergence is done once a re-run of the audit measures it there. Section 8's `--branch` run checks it on `develop` first. The hub commits the report under its own `reports/`, per section 8.
- **One focused PR per drift class of file fixes**, apart from the grouping [`RESYNC.md`][resync] section 6 states, cross-referencing the audit finding. A sprawling all-drifts PR draws many review rounds and never feels done.
- **A `hub-only:` finding converges by deleting the file, not by updating it.** That prefix is how `spec/audit.py` reports the **carried-scope** dimension section 4 names. Such a finding is easy to convert into a re-vendor by reflex and end up refreshing a copy that should not exist. Delete the repo's copy. Where the hub still hosts the file, reach the hub's per [GOVERNANCE.md "Hub-Hosted Tooling"][governance-hub-hosted-tooling]. The finding says which of the two it is. Confirm the path's [`spec/divergences.json`][divergences] `gaps` disposition is `retire` before deleting anything. A file the fleet retired outright is deleted only where the finding says the copy matches a past hub version. Any other copy is reported to the maintainer, per [`RESYNC.md`][resync] section 3 step 2. An untriaged hit may be the repo's own content at a shared path, and deleting that destroys work the hub never owned.
Expand Down
6 changes: 3 additions & 3 deletions RESYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ flowchart TD
instr["instruction set"] --> del["deletions"] --> revendor["verbatim re-vendors"] --> iface["interface workflows"] --> settings["settings, rulesets, secrets"] --> intent["intent files, by hand (see 5: what this cannot detect)"]
end
measure --> apply
apply --> ship["6: grouped PRs, review loop, merge, then re-audit"]
apply --> ship["6: grouped PRs, review loop, merge, promotion to main, then re-audit"]
```

## 0. Route Here Only If the Repository Is Stood Up
Expand Down Expand Up @@ -127,10 +127,10 @@ One further gap is checked by hand, because `spec/audit.py` does not report it.
- **Every other class waits for that pull request to merge.** Step 2's deletions, step 3's remaining re-vendors, the interface workflows, step 5's `repo-config/` deletions, and the intent files each take their own pull request. Each branches from `develop` only after it merges, in section 3's order. A class with nothing to change opens no pull request and holds nothing up. Step 5's `apply` writes no file, so it opens no pull request and runs once step 4's has merged. Where section 4 requires a pin bump before a retirement, the bump lands in the deletions pull request. Moving the trees ahead of step 2 disturbs nothing. Section 4's detector leaves out every path a `trees` entry covers, so no deletion reaches it.
- **Never push a fix directly to a protected branch**, and never hand-edit a target outside a pull request. An operational repository commits to `develop` directly by design, and a conformance change is still a reviewable change.
- **Close the review loop.** Request a review at the defined moments. Confirm the head commit is covered, and answer and resolve every thread. All of that follows [GOVERNANCE.md "PR Review Etiquette"][governance-pr-review-etiquette] and the [Copilot review runbook][copilot-runbook].
- **The maintainer merges.** The agent drives to green and stops.
- **The maintainer merges.** The agent drives each fix pull request into the target's `develop` to green. Once the maintainer merges it, the agent opens that target's `develop` -> `main` promotion, or finds the open one, and drives it to green. The maintainer merges that too. On an operational repository, the agent confirms that a promotion is wanted before opening one, per `drive-pr`.
- **Fix systemic drift in the hub instead.** Where many repositories share a drift, fix the rule or add a check here and let a re-audit re-flag it. This is instead of hand-patching each repository for a shared cause.

**Done means measured, not applied.** Re-run the audit after the merge, because a convergence asserted without a report is a convergence nobody can check. The hub commits that report under its own `reports/` per [`AUDIT.md`][audit] section 8. So a session resyncing its own repository leaves the report to a hub-side audit.
**Done means measured, not applied.** Re-run the audit once the fix is on `main`, because a convergence asserted without a report is a convergence nobody can check. The hub commits that report under its own `reports/` per [`AUDIT.md`][audit] section 8. So a session resyncing its own repository leaves the report to a hub-side audit.

<!-- Repo -->

Expand Down
Loading