Skip to content

Commit 49ee1df

Browse files
committed
chore: follow the template's move to a maintenance branch
The drift script, its test and the list of shared files now live on the template's "maintenance" branch, so this repo drops its copies. check.yml passes template-repo to the shared check workflow, which fetches the script from there and reports drift as before. AGENTS.md below the marker is the template's new text. Applied with the maintenance branch's template-drift.sh --apply. Tested: scripts/ci.sh, claude plugin validate in both profiles. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QT6szv5y1hHiZr5DD8HJkv
1 parent 21b37a9 commit 49ee1df

5 files changed

Lines changed: 22 additions & 485 deletions

File tree

‎.github/workflows/check.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ jobs:
99
permissions:
1010
contents: write # for the nested badges job; the nested check job lowers it to read
1111
uses: rjstone/plugin-ci/.github/workflows/check.yml@main
12+
with:
13+
template-repo: rjstone/harness-plugin-template # drift report; see AGENTS.md

‎AGENTS.md‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Rules carried over from `agent-skills`:
4646
`if not selected("<skill>"): raise unittest.SkipTest(...)` (`tests/_select.py`; `SKILLS=a,b`
4747
limits a run). Run `python3 -m unittest discover -s tests`. No network in tests.
4848

49-
<!-- template-reference: everything below is copied from rjstone/harness-plugin-template; change it there, then run scripts/template-drift.sh --apply -->
49+
<!-- template-reference: everything below is copied from rjstone/harness-plugin-template; change it there, then apply it (see "Staying in step with the template") -->
5050
## Making a plugin from the template
5151

5252
1. Create a repo from the template (rjstone/harness-plugin-template) and name it
@@ -62,10 +62,7 @@ Rules carried over from `agent-skills`:
6262
6. Update `README.md` (install table, owner/repo, and the badge row's owner/repo).
6363
7. Put the repo's own checks in `scripts/ci.sh` (see "Checks"). It starts with the template's
6464
three; add yours below them.
65-
8. In a repo just created from the template, delete the template's own files under
66-
`docs/superpowers/` (its shared-CI spec and plans). A plugin's own specs and plans may live
67-
there.
68-
9. In the repo's Actions settings, set the variable `MARKETPLACE_APP_CLIENT_ID` and the secret
65+
8. In the repo's Actions settings, set the variable `MARKETPLACE_APP_CLIENT_ID` and the secret
6966
`MARKETPLACE_APP_PRIVATE_KEY`, or delete `.github/workflows/notify-marketplace.yml` if the
7067
plugin isn't listed in `rjstone/plugin-marketplace` (the drift list marks that file optional,
7168
so a deleted copy stays deleted).
@@ -144,10 +141,9 @@ the plugin uses it; **doc** = described here only, not in the template.
144141
├── cline/ doc Cline plugin (package.json "cline" key)
145142
├── amp/ doc Amp plugin module (<name>/index.ts)
146143
├── scripts/ core the generator (build.ts, generate.ts, types.ts, frontmatter.ts),
147-
│ ci.sh (the repo's own checks), template-drift.sh and
148-
│ template-files.txt (see "Staying in step with the template")
149-
├── tests/ core build.test.ts (generator tests) and template-drift.test.ts
150-
│ (node:test, throwaway folders, no network)
144+
│ ci.sh (the repo's own checks)
145+
├── tests/ core build.test.ts (generator tests; node:test, throwaway
146+
│ folders, no network)
151147
├── .github/workflows/ three thin callers of rjstone/plugin-ci's reusable workflows
152148
│ ├── check.yml core scripts/ci.sh, claude plugin validate, test counts; badges job
153149
│ ├── release.yml core GitHub Release from git-cliff notes on a vX.Y.Z tag
@@ -385,17 +381,21 @@ workflows. Pass event values to scripts through `env:`, never by `${{ }}` inside
385381
## Staying in step with the template
386382

387383
A plugin made from the template keeps some files identical to the template's: the generator
388-
modules, its tests, `tsconfig.json`, the three workflow callers, `CLAUDE.md`, the drift script
389-
and its list, and this file from the `template-reference` marker to the end.
390-
`scripts/template-files.txt` names them (one path per line; `path :: MARKER` means from the
391-
first line containing MARKER to the end of the file; `? path` marks a whole file optional: it
392-
is skipped while the plugin has no copy, and compared and applied once it exists).
393-
394-
- `bash scripts/template-drift.sh` fetches the template's `main` and compares each listed file.
395-
In CI it runs after validation and prints one warning per differing file; it never
396-
fails the run. It does nothing in the template itself.
397-
- `bash scripts/template-drift.sh --apply` copies the template's versions over the local ones.
398-
Review the diff and commit it.
384+
modules, their test, `tsconfig.json`, the three workflow callers, `CLAUDE.md`, and this file
385+
from the `template-reference` marker to the end. The list and the script that compares them are
386+
not in the plugin: they live on the template's `maintenance` branch (`scripts/template-files.txt`
387+
and `scripts/template-drift.sh`).
388+
389+
- In CI, `check.yml` passes `template-repo` to the shared workflow, which fetches that branch
390+
and runs the script after validation. It prints one warning per differing file and never fails
391+
a plugin's run. A plugin that should stop following the template removes that input.
392+
- To pull the template's versions in, run this from the plugin repo's root, then review the diff
393+
and commit it (leave out `--apply` for a report only):
394+
395+
```sh
396+
d=$(mktemp -d) && git clone -q --depth 1 -b maintenance https://github.com/rjstone/harness-plugin-template "$d" && bash "$d/scripts/template-drift.sh" --apply
397+
```
398+
399399
- Fix a shared file in the template first, then apply it in each plugin repo. A fix made only in
400400
a plugin repo is overwritten by the next `--apply`.
401401

‎scripts/template-drift.sh‎

Lines changed: 0 additions & 213 deletions
This file was deleted.

‎scripts/template-files.txt‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)