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: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Runs this repo's checks (scripts/ci.sh), Claude Code validation and, on main, the badges.
# The steps live in rjstone/plugin-ci (reusable workflow, called at @main).
name: check
Expand All @@ -9,3 +9,5 @@
permissions:
contents: write # for the nested badges job; the nested check job lowers it to read
uses: rjstone/plugin-ci/.github/workflows/check.yml@main
with:
template-repo: rjstone/harness-plugin-template # drift report; see AGENTS.md
40 changes: 20 additions & 20 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# AGENTS.md

Instructions for coding agents (any harness) working in this repository, and the reference for
Expand Down Expand Up @@ -90,7 +90,7 @@
This repo was made from `rjstone/harness-plugin-template`; everything below the marker is that
template's reference.

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

1. Create a repo from the template (rjstone/harness-plugin-template) and name it
Expand All @@ -106,10 +106,7 @@
6. Update `README.md` (install table, owner/repo, and the badge row's owner/repo).
7. Put the repo's own checks in `scripts/ci.sh` (see "Checks"). It starts with the template's
three; add yours below them.
8. In a repo just created from the template, delete the template's own files under
`docs/superpowers/` (its shared-CI spec and plans). A plugin's own specs and plans may live
there.
9. In the repo's Actions settings, set the variable `MARKETPLACE_APP_CLIENT_ID` and the secret
8. In the repo's Actions settings, set the variable `MARKETPLACE_APP_CLIENT_ID` and the secret
`MARKETPLACE_APP_PRIVATE_KEY`, or delete `.github/workflows/notify-marketplace.yml` if the
plugin isn't listed in `rjstone/plugin-marketplace` (the drift list marks that file optional,
so a deleted copy stays deleted).
Expand Down Expand Up @@ -188,10 +185,9 @@
├── cline/ doc Cline plugin (package.json "cline" key)
├── amp/ doc Amp plugin module (<name>/index.ts)
├── scripts/ core the generator (build.ts, generate.ts, types.ts, frontmatter.ts),
│ ci.sh (the repo's own checks), template-drift.sh and
│ template-files.txt (see "Staying in step with the template")
├── tests/ core build.test.ts (generator tests) and template-drift.test.ts
│ (node:test, throwaway folders, no network)
│ ci.sh (the repo's own checks)
├── tests/ core build.test.ts (generator tests; node:test, throwaway
│ folders, no network)
├── .github/workflows/ three thin callers of rjstone/plugin-ci's reusable workflows
│ ├── check.yml core scripts/ci.sh, claude plugin validate, test counts; badges job
│ ├── release.yml core GitHub Release from git-cliff notes on a vX.Y.Z tag
Expand Down Expand Up @@ -429,17 +425,21 @@
## Staying in step with the template

A plugin made from the template keeps some files identical to the template's: the generator
modules, its tests, `tsconfig.json`, the three workflow callers, `CLAUDE.md`, the drift script
and its list, and this file from the `template-reference` marker to the end.
`scripts/template-files.txt` names them (one path per line; `path :: MARKER` means from the
first line containing MARKER to the end of the file; `? path` marks a whole file optional: it
is skipped while the plugin has no copy, and compared and applied once it exists).

- `bash scripts/template-drift.sh` fetches the template's `main` and compares each listed file.
In CI it runs after validation and prints one warning per differing file; it never
fails the run. It does nothing in the template itself.
- `bash scripts/template-drift.sh --apply` copies the template's versions over the local ones.
Review the diff and commit it.
modules, their test, `tsconfig.json`, the three workflow callers, `CLAUDE.md`, and this file
from the `template-reference` marker to the end. The list and the script that compares them are
not in the plugin: they live on the template's `maintenance` branch (`scripts/template-files.txt`
and `scripts/template-drift.sh`).

- In CI, `check.yml` passes `template-repo` to the shared workflow, which fetches that branch
and runs the script after validation. It prints one warning per differing file and never fails
a plugin's run. A plugin that should stop following the template removes that input.
- To pull the template's versions in, run this from the plugin repo's root, then review the diff
and commit it (leave out `--apply` for a report only):

```sh
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
```

- Fix a shared file in the template first, then apply it in each plugin repo. A fix made only in
a plugin repo is overwritten by the next `--apply`.

Expand Down
213 changes: 0 additions & 213 deletions scripts/template-drift.sh

This file was deleted.

19 changes: 0 additions & 19 deletions scripts/template-files.txt

This file was deleted.

Loading