MINOR — auto-bumped (PATCH reset to 0) when the tracked directory set changes between HEAD and the staged index (dot-dirs like .agents-tools excluded; .gitkeep keeps empty dirs visible).
PATCH — auto-bumped on every other commit.
AGENTS/.agents-tools/ — committed version-bump script + pre-commit / prepare-commit-msg hook shims, wired via local core.hooksPath. The prepare-commit-msg hook appends (vX.Y.Z) to the commit subject.
Hooks never block a commit (guarded [ -x ], always exit 0).
agents-init seeds .version, installs/refreshes the tooling (marker-versioned), sets core.hooksPath, and now pulls before auto-commit when an upstream exists (no-op for local-only repos).
Downstream tooling can read AGENTS/.version — a changed MINOR field signals a directory-structure change.
2. plans/specs/devlogs consolidation
Dropped the AGENTS/plugins/ layer; plans/ and specs/ now live directly under AGENTS/ alongside the new devlogs/.
Merges content from every legacy location (docs/<tgt>, docs/superpowers/<tgt>, old AGENTS/plugins/...) into the canonical AGENTS/<tgt>.
Always creates docs/superpowers/{plans,specs} symlinks (where superpowers skills write); docs/{plans,specs} symlinks only when they had existed as real dirs.
Design & plan
Captured in the AGENTS sub-repo: specs/2026-06-17-agents-version-tracking-design.md, plans/2026-06-17-agents-version-tracking.md.
The AGENTS/ sub-repo is gitignored by this repo; its own commits are separate and local.
Manual Verification
Fresh repo: cd (mktemp -d); and agents-init → creates AGENTS/.version = 1.0.0, AGENTS/.agents-tools/{version-bump,hooks/*} (executable), and core.hooksPath = .agents-tools/hooks.
In that AGENTS repo, mkdir newdir; touch newdir/.gitkeep; git add -A; git commit -m "add dir" → .version bumps to 1.1.0 and the commit subject ends with (v1.1.0).
A content-only commit (edit an existing file) bumps PATCH only (e.g. 1.1.1), not MINOR.
Manually set MAJOR (echo 2.0.0 > AGENTS/.version) → next structure commit → 2.1.0; MAJOR is never auto-changed.
Second agents-init run on an unchanged repo is a strict no-op (no output, no new commit).
bash scripts/agents-tools/test-version-bump.sh prints precommit OK / prepmsg OK / e2e OK / corrupt-recovery OK / hook-resilience OK.
Existing behavior intact: agents-init still scaffolds plans/, specs/, devlogs/ and the docs/superpowers/{plans,specs} symlinks; no AGENTS/plugins/ remains.
config-help agents-init (or browse docs/fish-config.md) reflects the versioning behavior.
## Summary
Two related AGENTS/-structure improvements to `agents-init`.
### 1. Structure versioning (new)
Every `AGENTS/` sub-repo now carries a self-contained, commit-time version bumper:
- **`AGENTS/.version`** — `MAJOR.MINOR.PATCH` (seeded `1.0.0`).
- **MAJOR** — manual only.
- **MINOR** — auto-bumped (PATCH reset to 0) when the tracked **directory set** changes between `HEAD` and the staged index (dot-dirs like `.agents-tools` excluded; `.gitkeep` keeps empty dirs visible).
- **PATCH** — auto-bumped on every other commit.
- **`AGENTS/.agents-tools/`** — committed `version-bump` script + `pre-commit` / `prepare-commit-msg` hook shims, wired via local `core.hooksPath`. The `prepare-commit-msg` hook appends `(vX.Y.Z)` to the commit subject.
- Hooks **never block a commit** (guarded `[ -x ]`, always `exit 0`).
- `agents-init` seeds `.version`, installs/refreshes the tooling (marker-versioned), sets `core.hooksPath`, and now **pulls before auto-commit when an upstream exists** (no-op for local-only repos).
Downstream tooling can read `AGENTS/.version` — a changed **MINOR** field signals a directory-structure change.
### 2. plans/specs/devlogs consolidation
- Dropped the `AGENTS/plugins/` layer; `plans/` and `specs/` now live directly under `AGENTS/` alongside the new `devlogs/`.
- Merges content from every legacy location (`docs/<tgt>`, `docs/superpowers/<tgt>`, old `AGENTS/plugins/...`) into the canonical `AGENTS/<tgt>`.
- Always creates `docs/superpowers/{plans,specs}` symlinks (where superpowers skills write); `docs/{plans,specs}` symlinks only when they had existed as real dirs.
### Design & plan
Captured in the AGENTS sub-repo: `specs/2026-06-17-agents-version-tracking-design.md`, `plans/2026-06-17-agents-version-tracking.md`.
## Tests
- `scripts/agents-tools/test-version-bump.sh` — 5 hermetic blocks (precommit baseline/PATCH/MINOR, prepmsg suffix+idempotency, real-hook e2e, corrupt-`.version` recovery, hook-resilience-when-bumper-missing). All green.
- Two independent review passes; findings fixed (incl. a real hook-blocking bug in the first hook approach).
## Notes
- Docs synced: `docs/fish-config.md` + `docs/fish-config.index` (offline SSOT). README unchanged (overview-only; defers function/agent-tooling detail to offline docs).
- The `AGENTS/` sub-repo is gitignored by this repo; its own commits are separate and local.
## Manual Verification
- [x] Fresh repo: `cd (mktemp -d); and agents-init` → creates `AGENTS/.version` = `1.0.0`, `AGENTS/.agents-tools/{version-bump,hooks/*}` (executable), and `core.hooksPath` = `.agents-tools/hooks`.
- [x] In that AGENTS repo, `mkdir newdir; touch newdir/.gitkeep; git add -A; git commit -m "add dir"` → `.version` bumps to `1.1.0` and the commit subject ends with `(v1.1.0)`.
- [x] A content-only commit (edit an existing file) bumps **PATCH** only (e.g. `1.1.1`), not MINOR.
- [x] Manually set `MAJOR` (`echo 2.0.0 > AGENTS/.version`) → next structure commit → `2.1.0`; MAJOR is never auto-changed.
- [x] Second `agents-init` run on an unchanged repo is a strict no-op (no output, no new commit).
- [x] `bash scripts/agents-tools/test-version-bump.sh` prints `precommit OK / prepmsg OK / e2e OK / corrupt-recovery OK / hook-resilience OK`.
- [x] Existing behavior intact: `agents-init` still scaffolds `plans/`, `specs/`, `devlogs/` and the `docs/superpowers/{plans,specs}` symlinks; no `AGENTS/plugins/` remains.
- [x] `config-help agents-init` (or browse `docs/fish-config.md`) reflects the versioning behavior.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Two related AGENTS/-structure improvements to
agents-init.1. Structure versioning (new)
Every
AGENTS/sub-repo now carries a self-contained, commit-time version bumper:AGENTS/.version—MAJOR.MINOR.PATCH(seeded1.0.0).HEADand the staged index (dot-dirs like.agents-toolsexcluded;.gitkeepkeeps empty dirs visible).AGENTS/.agents-tools/— committedversion-bumpscript +pre-commit/prepare-commit-msghook shims, wired via localcore.hooksPath. Theprepare-commit-msghook appends(vX.Y.Z)to the commit subject.[ -x ], alwaysexit 0).agents-initseeds.version, installs/refreshes the tooling (marker-versioned), setscore.hooksPath, and now pulls before auto-commit when an upstream exists (no-op for local-only repos).Downstream tooling can read
AGENTS/.version— a changed MINOR field signals a directory-structure change.2. plans/specs/devlogs consolidation
AGENTS/plugins/layer;plans/andspecs/now live directly underAGENTS/alongside the newdevlogs/.docs/<tgt>,docs/superpowers/<tgt>, oldAGENTS/plugins/...) into the canonicalAGENTS/<tgt>.docs/superpowers/{plans,specs}symlinks (where superpowers skills write);docs/{plans,specs}symlinks only when they had existed as real dirs.Design & plan
Captured in the AGENTS sub-repo:
specs/2026-06-17-agents-version-tracking-design.md,plans/2026-06-17-agents-version-tracking.md.Tests
scripts/agents-tools/test-version-bump.sh— 5 hermetic blocks (precommit baseline/PATCH/MINOR, prepmsg suffix+idempotency, real-hook e2e, corrupt-.versionrecovery, hook-resilience-when-bumper-missing). All green.Notes
docs/fish-config.md+docs/fish-config.index(offline SSOT). README unchanged (overview-only; defers function/agent-tooling detail to offline docs).AGENTS/sub-repo is gitignored by this repo; its own commits are separate and local.Manual Verification
cd (mktemp -d); and agents-init→ createsAGENTS/.version=1.0.0,AGENTS/.agents-tools/{version-bump,hooks/*}(executable), andcore.hooksPath=.agents-tools/hooks.mkdir newdir; touch newdir/.gitkeep; git add -A; git commit -m "add dir"→.versionbumps to1.1.0and the commit subject ends with(v1.1.0).1.1.1), not MINOR.MAJOR(echo 2.0.0 > AGENTS/.version) → next structure commit →2.1.0; MAJOR is never auto-changed.agents-initrun on an unchanged repo is a strict no-op (no output, no new commit).bash scripts/agents-tools/test-version-bump.shprintsprecommit OK / prepmsg OK / e2e OK / corrupt-recovery OK / hook-resilience OK.agents-initstill scaffoldsplans/,specs/,devlogs/and thedocs/superpowers/{plans,specs}symlinks; noAGENTS/plugins/remains.config-help agents-init(or browsedocs/fish-config.md) reflects the versioning behavior.