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: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
# Mark it generated so GitHub collapses its diffs and excludes it from
# language stats: review it as build output, not as hand-written code.
pstack/** linguist-generated=true

# Binaries stay byte-identical on checkout (assets/logo.png): pin the intent
# so a future text rule cannot start rewriting them.
*.png binary
10 changes: 5 additions & 5 deletions .github/actions/build-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Build pstack package
description: >-
Shared build prologue for every workflow that produces the generated pstack/
package: pin the upstream clone, verify it resolved, convert, validate and
scanner-gate. Extracted from the step bodies that ci.yml, release.yml and
publish-plugin.yml each carried their own copy of, so all three callers now
get the same fail-loud SHA verification.
scanner-gate. Extracted from the step bodies that ci.yml and release.yml each
carried their own copy of, so every caller now gets the same fail-loud SHA
verification.

# WHY A COMPOSITE ACTION AND NOT A REUSABLE WORKFLOW
# A reusable workflow (`uses: ./.github/workflows/build.yml`) would have to contain
# the caller's ENTIRE job, because a `uses:` job cannot be followed by more steps
# in that same job. All three callers continue past the shared prologue with their
# in that same job. Both callers continue past the shared prologue with their
# own steps (ci: reproducibility gate + artifact upload; release: zip + notes +
# gh release; publish: dist push + tag), so a reusable workflow cannot express
# gh release), so a reusable workflow cannot express
# this shape without duplicating those steps into the called file. A composite
# action composes into the middle of a job and is the correct tool here.
# The usual reason to prefer a reusable workflow - secrets - does not apply: this
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
# job above validates the source pstack/ directory on disk, where files are LF
# because the converter wrote them that way. Nothing here constructs a git
# checkout of the dist tree, so a line-ending or binary-asset regression in the
# published artifacts would ship uncaught. This stages the package exactly as
# publish-plugin.yml does and checks out the result with core.autocrlf=true.
# published artifacts would ship uncaught. This stages the package exactly as an
# install clone receives it (pstack/ subdir, core.autocrlf=true).
- name: Dist checkout is LF-only under autocrlf
shell: bash
run: uv run --frozen tools/dist_checkout_check.py --package pstack --source-tree
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/publish-plugin.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
persist-credentials: false

# release.yml previously carried its own copy of the build prologue AND was
# missing the "Verify pinned SHA" step that ci.yml and publish-plugin.yml
# missing the "Verify pinned SHA" step that ci.yml
# had, so a release could be cut from a pin that silently failed to
# resolve. The shared action gives every caller the verified-pin behaviour.
- name: Build package from pin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upstream-drift-watch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
echo ""
echo "Rebuild against the new upstream, update the transform maps for any"
echo "reworded anchors (the converter's anchor audit will name them), bump"
echo "UPSTREAM_PIN in all four workflows (ci.yml / release.yml /"
echo "publish-plugin.yml / upstream-drift-watch.yml - tools/check_pins.py"
echo "UPSTREAM_PIN in all three workflows (ci.yml / release.yml /"
echo "upstream-drift-watch.yml - tools/check_pins.py"
echo "enforces lock-step), and re-run the pipeline."
} > "$RUNNER_TEMP/drift-body.md"
# Guard for the next step: split across steps, the no-drift `exit 0`s
Expand Down
27 changes: 13 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ to improve **stock** pstack skills shipped in this package.
|---|---|---|
| Change stock method for all users | Converter / `tools/assets/` → rebuild → validate → release | Yes (product) |
| Personal or project procedure | `skill_manage` / `/learn` into **local** `~/.hermes/skills/` | Yes (outside package) |
| Owned variant of pstack skills | **Fork** of dist `iap/pstack`, install from the fork | Yes (you control merge) |
| Owned variant of pstack skills | **Fork** of this repo, install from the fork's `pstack/` subdir | Yes (you control merge) |
| New skills beside pstack | **Skill tap** (`hermes skills tap add` / install) | Yes |
| Durable "learning" into installed plugin `SKILL.md` files | **Forbidden** as source of truth | No — updates and dist republish collide |
| Durable "learning" into installed plugin `SKILL.md` files | **Forbidden** as source of truth | No — reinstalls overwrite the installed tree |

> [!WARNING]
> Never instruct `skill_manage` (or any self-evolution path) to patch
Expand Down Expand Up @@ -75,7 +75,7 @@ Default home for work is **this repo**. Escalate only when the table says so.
| If you need to… | Do this | Not this |
|---|---|---|
| Change skill prose, delegation wording, model panel, hermesbot, bans, docs, converter maps | Edit `tools/` / `tools/assets/` → rebuild → validate → (ledger row if converter changed) | Hand-edit `pstack/`; rewrite in Cursor vocabulary |
| Personal skill improvement or new procedures | Local skills, skill tap, or fork of `iap/pstack` ([docs/USING.md](docs/USING.md)) | `skill_manage` against stock plugin skills; durable edits under the install tree |
| Personal skill improvement or new procedures | Local skills, skill tap, or fork of this repo ([docs/USING.md](docs/USING.md)) | `skill_manage` against stock plugin skills; durable edits under the install tree |
| Package validates / doctor is clean, but stock install misbehaves on hermes | File/fix in `NousResearch/hermes-agent`; `patches/` is **historical reference only** ([docs/PATCHES.md](docs/PATCHES.md)) | Paper over harness gaps with skill prose that claims nonexistent tools |
| Bug reproduces on upstream Cursor pstack *without* this port | Route to `cursor/plugins` ([SECURITY.md](SECURITY.md)) | "Fix" it in the converter as if it were a port bug |
| Touch `.cursor-plugin/`, `pstack/agents/`, attribution, excluded `benny` / `make-bot-ui` | Leave as-is (dual-load / scanner contract) | "Clean up", re-add, or modernize |
Expand Down Expand Up @@ -183,23 +183,23 @@ Cursor still appears in three **legitimate** roles only — preserve, do not
## Hard rules (CI enforces)

- **Pin lock-step.** `UPSTREAM_PIN`
(`93b00b89ef425a9c1bac0d0b317dfc49c930ac99`) is declared in `ci.yml`,
`release.yml`, `publish-plugin.yml`, and `upstream-drift-watch.yml` — all four
move together. The build steps that consume it are shared via
(`c47b12849e43f18d5c374c7069c744cc55b0ea00`) is declared in `ci.yml`,
`release.yml`, and `upstream-drift-watch.yml` — all three move together. The build steps that consume it are shared via
`.github/actions/build-package`.
Procedure: [docs/RUNBOOK-upstream-drift.md](docs/RUNBOOK-upstream-drift.md).
- **Anchors audited.** A converter transform whose anchor matches nothing in
the upstream build fails loudly. Re-anchor or prune; never silence the audit.
- **Two version lines.** Package keeps upstream identity `0.14.8`; repo
- **Two version lines.** Package keeps upstream identity `0.15.5`; repo
releases are `v0.4.x` in `CHANGELOG.md`. Never mix them.
- **Encoding.** LF-only, no BOM, UTF-8 (`.gitattributes` + `validate.py`).
- **Converter changes are documented.** New pass/map → ADAPTATIONS row with
reviewer check + rebuilt `pstack/` in the same PR.
- **Excluded upstreams stay excluded.** `automations/benny` and
`skills/make-bot-ui` omitted (slot filled by repo-owned `hermesbot`).
- **Dist repo is build output.** `iap/pstack` is written only by CI
(`publish-plugin.yml`), append-only. Never hand-push. Never point install
docs at this dev repo's root (scanner sees `tools/` ban needles).
- **Single-source installs.** Installs come from this repo's `pstack/` subdir
(`hermes plugins install iap/pstack-hermes/pstack`). The old dist repo
`iap/pstack` is retired — never publish there again; never document a
root install of this dev repo (scanner sees `tools/` ban needles).

## Common traps

Expand All @@ -209,10 +209,9 @@ Cursor still appears in three **legitimate** roles only — preserve, do not
`tools/assets/model-panel.json` and rebuild; `validate.py` checks they match.
- "Fixing" Cursor mentions that are attribution or dual-load — correct as-is.
- Rewriting hermes primitives back into Cursor vocabulary — bans catch this.
- Blurring install routes: **root** (`hermes plugins install iap/pstack`) keeps
`.git` and updates via `hermes plugins update pstack`; **subdir**
(`iap/pstack-hermes/pstack`) strips `.git` → reinstall only. Docs must keep
them distinct.
- Install-update mechanics: subdir installs strip `.git` (hermes design), so
`hermes plugins update` does NOT work for them — updates are reinstalls
(`hermes plugins install iap/pstack-hermes/pstack --force`). Docs must say so.
- Using Cursor IDE dual-load habits as the implementation or review path for
hermes delivery — verify with convert → validate → doctor / hermes invoke.
- Pointing hermes `skill_manage` / learning / self-evolution at **stock**
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to the pstack-hermes port tooling will be documented in this
- `.github/actions/drift-issue-upsert/`: shared composite action for the idempotent issue-by-title upsert both drift watchers need; the two callers' copies had already drifted apart (different jq expressions for the same intent).

### Changed
- **Single-source installs.** The package installs directly from this repository's `pstack/` subdir (`hermes plugins install iap/pstack-hermes/pstack`); the dist-repo publish pipeline (`publish-plugin.yml` → `iap/pstack`) is retired and `UPSTREAM_PIN` lock-step now covers three workflows. Updates are reinstalls (`--force`) - documented in README and the installed `after-install.md`.
- **Re-pin to upstream `c47b1284` (pstack v0.15.5); `pstack/` rebuilt.** Every converter anchor was re-anchored or pruned against the new upstream text (36 dead anchors at the new pin -> 0; `T8`-`T14` + delegation), **F16 retired** (upstream now ships the slug-agnostic lane check itself), `reflect`'s 4-column reviewer table adopted with the upstream `budget` key in the setup-written panel shape, and the two new upstream principles ported (`principle-attack-the-premise`, `principle-test-behavior-not-implementation`) - 45 -> 47 skills. Prose model defaults refreshed (`grok-4.7-xhigh-fast`, `claude-opus-5-5-max`); the shipped panel keeps its vendor-qualified verified slugs. `UPSTREAM_PIN` bumped in all four workflows (lock-step enforced by `tools/check_pins.py`); details and the triage correction (no `skills/orchestrate` ever existed) in `docs/ADAPTATIONS.md` section 4.
- Docs / agent policy (Phase A, no package rebuild): `AGENTS.md` and `docs/USING.md` codify the stock-skills write surface — Hermes self-improvement (`skill_manage` / learning) targets local skills, skill taps, or a dist fork, not stock plugin skills. Stack forge freeze: **Graphite (`gt`) default**, **GitHub (`gh`) fallback**, **GitLab (`glab`) halted**. README Known limitations aligned (was incorrectly describing Graphite as optional-only).

Expand Down
Loading
Loading