feat(agents): AGENTS/ structure versioning + plans/specs/devlogs consolidation #57
Reference in New Issue
Block a user
Delete Branch "feat/agents-version-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.