@complexthings/superpowers-agent 8.2.2 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,90 +0,0 @@
1
- # Post-Migration Fixes: Update Checking, Version Source, Husky Hook, and Docs
2
-
3
- You are working in an agentic coding environment with access to file system tools, web fetching, subagents, and skills.
4
-
5
- ## Objective
6
-
7
- Fix two issues introduced during the shell-to-npm migration, add a Husky pre-commit hook to keep versions synchronized, and update documentation to reflect today's changes. Target version: **8.2.0**.
8
-
9
- ## Phase 1 — Discover
10
-
11
- Before writing or modifying anything:
12
-
13
- 1. Read `git.js` — locate the `checkForUpdates` function and understand its current Git-based logic.
14
- 2. Read `output.js` — locate the `getLocalVersion` function and understand how it currently resolves the version.
15
- 3. Read `./package.json` and `.agents/package.json` — note current version values and any relevant fields.
16
- 4. Check if `husky` is already a dependency or if any `.husky/` directory exists.
17
- 5. Identify how the CLI is built (confirm `bun i && bun run build` in `.agents/`).
18
- 6. Read `README.md` and `CHANGELOG.md` to understand their current structure and formatting conventions.
19
-
20
- ## Phase 2 — Fix: Update Checking
21
-
22
- The `checkForUpdates` function in `git.js` currently checks the Git repo, which is unreliable post-migration.
23
-
24
- 1. Create a new function that fetches the latest published version from the npm registry for the package (e.g., `https://registry.npmjs.org/@complexthings/superpowers-agent/latest`).
25
- 2. Refactor `checkForUpdates` to use the npm registry function instead of the Git repo check.
26
- 3. Compare the registry version against the locally installed version to determine if an update is available.
27
-
28
- ## Phase 3 — Fix: Local Version Source
29
-
30
- The `getLocalVersion` function in `output.js` should read the version from `.agents/package.json` (the Bun-built CLI tool's package manifest).
31
-
32
- 1. Update `getLocalVersion` to read and parse `.agents/package.json` for its `version` field.
33
- 2. Remove or replace any previous version resolution logic that no longer applies.
34
-
35
- ## Phase 4 — Add: Husky Pre-Commit Hook
36
-
37
- Add a `husky` pre-commit hook that enforces version parity between `./package.json` and `.agents/package.json`.
38
-
39
- 1. Install `husky` as a dev dependency in the root. Initialize it (`npx husky init` or equivalent).
40
- 2. Create a pre-commit hook script that does the following:
41
- - Read `version` from `./package.json` and `.agents/package.json`.
42
- - If versions match → proceed, no action needed.
43
- - If versions differ:
44
- 1. Determine the HIGHEST version (semver comparison).
45
- 2. Update both `package.json` files to the highest version.
46
- 3. Run `npm i --package-lock-only` in the repo root to sync `package-lock.json`.
47
- 4. Run `bun i && bun run build` in `.agents/` to rebuild the CLI with the correct version.
48
- 5. Stage the changed files (`package.json`, `package-lock.json`, `.agents/package.json`, and build output) into the current commit.
49
- - Allow the commit to proceed.
50
-
51
- ## Phase 5 — Update Documentation
52
-
53
- 1. Update `CHANGELOG.md` for version **8.2.0** dated **2026-03-16**, following the existing format. Document today's changes:
54
- - Update checking now uses npm registry instead of Git repo
55
- - `getLocalVersion` now reads from `.agents/package.json`
56
- - Added Husky pre-commit hook to enforce version parity between root and `.agents/` package manifests
57
- 2. Update `README.md` to reflect any install, usage, or behavior changes introduced by these fixes. Preserve existing structure — only modify or add sections relevant to today's changes.
58
- 3. Ensure both `./package.json` and `.agents/package.json` have version set to `8.2.0`.
59
-
60
- ## Phase 6 — Verify
61
-
62
- 1. Confirm `checkForUpdates` no longer references Git-based version checking.
63
- 2. Confirm `getLocalVersion` reads from `.agents/package.json`.
64
- 3. Simulate a version mismatch between `./package.json` and `.agents/package.json` — run the pre-commit hook manually and verify it syncs versions, updates lockfiles, rebuilds, and stages changes.
65
- 4. Confirm a matching-version scenario passes the hook with no modifications.
66
- 5. Confirm both `package.json` files show version `8.2.0`.
67
- 6. Confirm `CHANGELOG.md` has a `8.2.0` entry and `README.md` reflects current behavior.
68
-
69
- ## Completion Criteria
70
-
71
- - `checkForUpdates` fetches latest version from npm registry, not Git
72
- - `getLocalVersion` reads version from `.agents/package.json`
73
- - Husky pre-commit hook installed and enforces version parity (highest wins)
74
- - Hook runs lockfile update and Bun rebuild when versions diverge, then stages all changes
75
- - Both `package.json` files set to version `8.2.0`
76
- - `CHANGELOG.md` updated with `8.2.0` entry for 2026-03-16
77
- - `README.md` updated to reflect current install/usage behavior
78
- - No regressions in existing CLI functionality
79
-
80
- ## Agent Instructions
81
-
82
- - Spawn parallel subagents where tasks are independent; each subagent owns a single concern
83
- - Use Claude Sonnet 4.6 model for subagents
84
- - Phase 2 and Phase 3 are independent — run in parallel
85
- - Phase 4 depends on Phase 1 discovery but is independent of Phases 2–3
86
- - Phase 5 depends on Phases 2–4 completing (needs final change list)
87
- - USE `leveraging-cli-tools` skill — use `rg`, `fd`, `jq`, `bat`, `ast-grep` over standard tools
88
- - Reason from facts only — read actual files before writing or modifying anything
89
- - Do not guess file contents, dependency structures, or platform behaviors — verify first
90
- - Concise output only; no padding
@@ -1,33 +0,0 @@
1
- # Refactor: Shell Script Install → npm Package
2
-
3
- You are working in an agentic coding environment with access to file system tools, web fetching, subagents, and skills.
4
-
5
- ## Objective
6
-
7
- I want to fix some issues I've noticed since the migration.
8
-
9
- Update checking:
10
- - Right now it uses `checkForUpdates` in `git.js` which checks the Git Repo, but this is unreliable. Instead I'd like it to check the npm registry for the latest published version and compare it to the current version.
11
- - This will require a new function to fetch the latest version from npm, and then update the existing `checkForUpdates` function to use that instead of the Git Repo.
12
- Get Local Version:
13
- - The `getLocalVersion` in `output.js` function should read the version from the `package.json` file in `.agents/pacakge.json` for the bun built superpowers-agent cli tool.
14
-
15
- Additions I want:
16
-
17
- - Add `husky` pre-commit hook to the repo:
18
- - It needs to check the `package.json` file in the root of the repo and the `package.json` file in the `.agents` directory to ensure that their versions match before allowing a commit.
19
- - IF they don't match
20
- - THEN it needs to update the version to match in both, HIGHEST version wins
21
- - THEN it needs to run `npm i --package-lock-only` in the root of the repo to ensure that the `package-lock.json` is updated with the new version for the root package as well.
22
- - THEN it needs to run `bun i && bun run build` in the `.agents` directory to ensure that the built cli tool is updated with the new version as well.
23
- - This will ensure that the versions are always in sync and that the built cli tool is always up to date with the version in the `package.json` files.
24
- - Then add those changes to the commit and allow the commit to proceed.
25
-
26
- ## Agent Instructions
27
-
28
- - Spawn parallel subagents where tasks are independent; each subagent owns a single concern
29
- - Use Claude Sonnet 4.6 model for subagents
30
- - USE `leveraging-cli-tools` skill — use `rg`, `fd`, `jq`, `bat`, `ast-grep` over standard tools
31
- - Reason from facts only — read actual files before writing or modifying anything
32
- - Do not guess file contents, dependency structures, or platform behaviors — verify first
33
- - Concise output only; no padding