@locksmithdon/dons-flow 2.1.1 → 2.2.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.
Files changed (57) hide show
  1. package/README.md +19 -71
  2. package/docs/conventions.md +1 -2
  3. package/docs/memory/.upstream-last-sync.json +4 -0
  4. package/docs/memory/MEMORY.md +2 -1
  5. package/docs/memory/monitor_upstream_evolution.md +8 -6
  6. package/docs/memory/upstream-sync-2026-06-13.md +61 -0
  7. package/docs/runbooks/monitor-upstream-evolution.md +74 -45
  8. package/package.json +21 -5
  9. package/scripts/sync-upstream.sh +193 -0
  10. package/skills/dons-flow/SKILL.md +9 -11
  11. package/skills/land/SKILL.md +2 -2
  12. package/skills/setup-dons-flow/SKILL.md +24 -102
  13. package/skills/sync-upstream/SKILL.md +94 -0
  14. package/vendor/superpowers/LICENSE +21 -0
  15. package/vendor/superpowers/skills/brainstorming/SKILL.md +164 -0
  16. package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
  17. package/vendor/superpowers/skills/brainstorming/scripts/helper.js +88 -0
  18. package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +354 -0
  19. package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
  20. package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
  21. package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  22. package/vendor/superpowers/skills/brainstorming/visual-companion.md +287 -0
  23. package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
  24. package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
  25. package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
  26. package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
  27. package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +168 -0
  28. package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +279 -0
  29. package/vendor/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
  30. package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
  31. package/vendor/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  32. package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  33. package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
  34. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  35. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  36. package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  37. package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
  38. package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  39. package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
  40. package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  41. package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  42. package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  43. package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
  44. package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
  45. package/vendor/superpowers/skills/using-superpowers/SKILL.md +117 -0
  46. package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +59 -0
  47. package/vendor/superpowers/skills/using-superpowers/references/copilot-tools.md +42 -0
  48. package/vendor/superpowers/skills/using-superpowers/references/gemini-tools.md +51 -0
  49. package/vendor/superpowers/skills/writing-plans/SKILL.md +152 -0
  50. package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  51. package/vendor/superpowers/skills/writing-skills/SKILL.md +655 -0
  52. package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  53. package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  54. package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  55. package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  56. package/vendor/superpowers/skills/writing-skills/render-graphs.js +168 -0
  57. package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
package/README.md CHANGED
@@ -22,82 +22,29 @@ None of these replaces the others. Superpowers excels at the inner loop of desig
22
22
 
23
23
  Install in each repo where you want the workflow, or install once in your global Pi configuration if you want it everywhere.
24
24
 
25
- ### 1. Install Superpowers
25
+ ### Install
26
26
 
27
- Superpowers is a harness plugin, not an npm package. Install it for the agent you are using:
28
-
29
- **Claude Code**
30
- ```bash
31
- /plugin install superpowers@claude-plugins-official
32
- ```
33
- Or register the Superpowers marketplace first:
34
- ```bash
35
- /plugin marketplace add obra/superpowers-marketplace
36
- /plugin install superpowers@superpowers-marketplace
37
- ```
38
-
39
- **Codex CLI / Codex App**
40
- ```bash
41
- /plugins
42
- # search "Superpowers" and select Install Plugin
43
- ```
44
-
45
- **Gemini CLI**
46
- ```bash
47
- gemini extensions install https://github.com/obra/superpowers
48
- ```
49
-
50
- **Factory Droid**
51
- ```bash
52
- droid plugin marketplace add https://github.com/obra/superpowers
53
- droid plugin install superpowers@superpowers
54
- ```
55
-
56
- **OpenCode**
57
- ```bash
58
- # Fetch and follow instructions from:
59
- # https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md
60
- ```
61
-
62
- **Cursor**
63
- ```bash
64
- /add-plugin superpowers
65
- # or search "superpowers" in the plugin marketplace
66
- ```
67
-
68
- **GitHub Copilot CLI**
69
- ```bash
70
- copilot plugin marketplace add obra/superpowers-marketplace
71
- copilot plugin install superpowers@superpowers-marketplace
72
- ```
73
-
74
- Full instructions are at [obra/superpowers](https://github.com/obra/superpowers).
75
-
76
- ### 2. Install RPIV and this package
77
-
78
- RPIV and the Pi subagent runtime are declared as peer dependencies of this package. With npm 7+, they are installed automatically when you install `@locksmithdon/dons-flow`:
27
+ One command installs the entire workflow:
79
28
 
80
29
  ```bash
81
30
  pi install npm:@locksmithdon/dons-flow
82
31
  ```
83
32
 
84
- If your Pi setup does not auto-install peer dependencies, install them explicitly:
33
+ This single package includes:
85
34
 
86
- ```bash
87
- pi install npm:@juicesharp/rpiv-pi
88
- pi install npm:@tintinweb/pi-subagents
89
- pi install npm:@locksmithdon/dons-flow
90
- ```
35
+ - **RPIV** skills and runtime extensions as npm dependencies.
36
+ - **Superpowers** skills vendored directly into the package at `vendor/superpowers/skills/` (MIT licensed; see `vendor/superpowers/LICENSE`).
37
+ - **Don's Flow** skills for closeout, scope control, and learning capture.
91
38
 
92
- If RPIV's `/rpiv-setup` command is available, run it once and restart Pi to install RPIV's sibling plugins.
39
+ If RPIV warns about missing sibling extensions during install, restart Pi once the install completes; the dependencies are already declared.
93
40
 
94
- ### 3. Onboard the repo
41
+ ### Onboard the repo
95
42
 
96
43
  ```bash
97
44
  /skill:setup-dons-flow
98
45
  ```
99
46
 
100
- This checks prerequisites, detects Superpowers, and creates the repo-owned conventions listed below.
47
+ This creates the repo-owned conventions listed below.
101
48
 
102
49
  ## Three ways to work
103
50
 
@@ -181,24 +128,25 @@ This separation lets the same workflow travel with you across repos while keepin
181
128
 
182
129
  ## Monitoring upstream evolution
183
130
 
184
- The dependency relationship with Superpowers is intentionally deferred. Superpowers is installed via your harness, so we do not need to resolve it as an npm dependency. We review monthly whether to keep this arrangement, fork Superpowers, or drop the peer dependency entirely.
131
+ Superpowers, RPIV, and Don's Flow will evolve independently. The `sync-upstream` skill clones the Superpowers and RPIV repositories, diffs them against the last-synced hashes, and produces a decision report so you can choose what to incorporate into Don's Flow.
185
132
 
186
- - Memory: `docs/memory/monitor_upstream_evolution.md`
133
+ - Skill: `/skill:sync-upstream`
134
+ - Script: `scripts/sync-upstream.sh`
187
135
  - Runbook: `docs/runbooks/monitor-upstream-evolution.md`
136
+ - Memory: `docs/memory/monitor_upstream_evolution.md`
188
137
 
189
- Set a monthly calendar reminder for the 13th, or run the runbook after every 2–3 completed projects.
138
+ The default stance is to incorporate upstream improvements unless there is a clear reason not to. Run the sync monthly or after every 2–3 projects.
190
139
 
191
140
  ## Typical first use
192
141
 
193
- 1. Install Superpowers for your harness.
194
- 2. Install `npm:@juicesharp/rpiv-pi`, `npm:@tintinweb/pi-subagents`, and `npm:@locksmithdon/dons-flow`.
195
- 3. Run `/skill:setup-dons-flow` to scaffold repo conventions.
196
- 4. Choose a mode:
142
+ 1. `pi install npm:@locksmithdon/dons-flow`.
143
+ 2. Run `/skill:setup-dons-flow` to scaffold repo conventions.
144
+ 3. Choose a mode:
197
145
  - Superpowers-led: start with `brainstorming`.
198
146
  - RPIV-led: start with `/skill:discover "[feature description]"`.
199
147
  - Mixed: start with `discover`, then use Superpowers inside `implement`.
200
- 5. Close the cycle with `/skill:land`.
201
- 6. After 2–3 projects, run the upstream monitoring runbook.
148
+ 4. Close the cycle with `/skill:land`.
149
+ 5. After 2–3 projects, run `/skill:sync-upstream`.
202
150
 
203
151
  ## License
204
152
 
@@ -1,4 +1,4 @@
1
- # Repo Conventions for RPIV + Superpowers Landing
1
+ # Repo Conventions for Don's Flow
2
2
 
3
3
  This workflow expects a small set of project-owned documents in every repo that uses it. These are **not** part of the `@locksmithdon/dons-flow` package; they live in the codebase because they are shared by the whole team.
4
4
 
@@ -7,7 +7,6 @@ This workflow expects a small set of project-owned documents in every repo that
7
7
  ```
8
8
  docs/
9
9
  tabled.md # Working memory for epiphanies and deferred work
10
- tabled/ # Optional per-item tabled docs (keep .gitkeep)
11
10
  status.md # Living status: Recently Completed, What's Next
12
11
  memory/
13
12
  MEMORY.md # Index of memory entries
@@ -0,0 +1,4 @@
1
+ {
2
+ "superpowers": "6fd4507659784c351abbd2bc264c7162cfd386dc",
3
+ "rpiv": "88f52084c408fdb50e9e57d31a80c8227f08de15"
4
+ }
@@ -6,4 +6,5 @@ Cross-session context for `@locksmithdon/dons-flow`.
6
6
 
7
7
  | File | Type | Why it matters |
8
8
  |---|---|---|
9
- | [monitor_upstream_evolution.md](./monitor_upstream_evolution.md) | decision-deferred | We deferred choosing how to track Superpowers. Review monthly. |
9
+ | [monitor_upstream_evolution.md](./monitor_upstream_evolution.md) | decision-deferred | How we track Superpowers and RPIV over time. Review monthly. |
10
+ | [upstream-sync-2026-06-13.md](./upstream-sync-2026-06-13.md) | upstream-sync | First automated diff of Superpowers and RPIV. |
@@ -9,14 +9,14 @@ next-review: 2026-07-13
9
9
 
10
10
  How should `@locksmithdon/dons-flow` track its upstream projects?
11
11
 
12
- - **RPIV** (`@juicesharp/rpiv-pi`) is published to npm and declared as a normal peer dependency.
13
- - **Superpowers** (`obra/superpowers`) is a harness plugin, not an npm package. It is installed via Claude, Codex, Gemini, Cursor, Copilot, or other agent harnesses, not via `pi install` or `npm install`.
12
+ - **RPIV** (`@juicesharp/rpiv-pi`) is published to npm and declared as a normal dependency. New versions are adopted by bumping `package.json`.
13
+ - **Superpowers** (`obra/superpowers`) is not published to npm under a usable name. We vendor selected Superpowers skills directly into this package at `vendor/superpowers/skills/` and update them with `scripts/sync-upstream.sh`.
14
14
 
15
- We are not forking or publishing Superpowers yet. Instead, we document it as a harness-plugin dependency and will monitor both projects for 2–3 months before deciding whether to:
15
+ The default stance is to incorporate upstream improvements into Don's Flow unless there is a clear reason not to. We will review both projects for 2–3 months before deciding whether to:
16
16
 
17
- 1. Keep the harness-plugin arrangement.
18
- 2. Fork Superpowers and publish it under `@locksmithdon/superpowers` as a normal npm peer dependency.
19
- 3. Drop Superpowers integration entirely and rely on this package's ported closeout skills + RPIV's pipeline.
17
+ 1. Keep vendoring Superpowers skills.
18
+ 2. Fork Superpowers and publish it under `@locksmithdon/superpowers` as a normal npm dependency.
19
+ 3. Drop Superpowers integration entirely and rely on RPIV + Don's closeout skills.
20
20
  4. Some hybrid we haven't thought of yet.
21
21
 
22
22
  ## Why we deferred
@@ -48,5 +48,7 @@ Drop Superpowers integration if:
48
48
  ## Related
49
49
 
50
50
  - Runbook: `docs/runbooks/monitor-upstream-evolution.md`
51
+ - Skill: `sync-upstream`
52
+ - Script: `scripts/sync-upstream.sh`
51
53
  - Skill: `setup-dons-flow`
52
54
  - Package: `package.json` § `peerDependencies`
@@ -0,0 +1,61 @@
1
+ # Upstream Sync: 2026-06-13
2
+
3
+ type: upstream-sync
4
+ superpowers-last: 6fd4507659784c351abbd2bc264c7162cfd386dc
5
+ superpowers-current: 6fd4507659784c351abbd2bc264c7162cfd386dc
6
+ rpiv-last: 88f52084c408fdb50e9e57d31a80c8227f08de15
7
+ rpiv-current: 88f52084c408fdb50e9e57d31a80c8227f08de15
8
+
9
+ ## Superpowers (6fd4507659784c351abbd2bc264c7162cfd386dc → 6fd4507659784c351abbd2bc264c7162cfd386dc)
10
+
11
+ Vendored skills: brainstorming,dispatching-parallel-agents,executing-plans,receiving-code-review,requesting-code-review,subagent-driven-development,systematic-debugging,test-driven-development,using-superpowers,writing-plans,writing-skills
12
+
13
+ ### Commits since last sync
14
+
15
+ ```bash
16
+
17
+ ```
18
+
19
+ ### Files changed
20
+
21
+ ```bash
22
+
23
+ ```
24
+
25
+ ### Decisions
26
+
27
+ - **Incorporate:** _list Superpowers changes to pull into Don's Flow (already copied if in vendored list)_
28
+ - **Add new skill to vendor list:** _new upstream skills worth including_
29
+ - **Defer / Skip:** _changes that do not fit or are not yet needed_
30
+ - **Notes:** _impact assessment, breaking changes, conflicts with Don's Flow skills_
31
+
32
+ ## RPIV (88f52084c408fdb50e9e57d31a80c8227f08de15 → 88f52084c408fdb50e9e57d31a80c8227f08de15)
33
+
34
+ RPIV ships as an npm dependency. Review changes for version bumps or workflow impact.
35
+
36
+ ### Commits since last sync
37
+
38
+ ```bash
39
+
40
+ ```
41
+
42
+ ### Files changed
43
+
44
+ ```bash
45
+
46
+ ```
47
+
48
+ ### Decisions
49
+
50
+ - **Bump dependency version:** _new RPIV version to pin in package.json_
51
+ - **Workflow impact:** _changes that affect how Don's Flow uses RPIV skills_
52
+ - **Defer / Skip:** _changes that do not affect Don's Flow_
53
+
54
+ ## Next steps
55
+
56
+ 1. Review the commits and diffs above.
57
+ 2. Edit the **Decisions** sections in this file.
58
+ 3. If Superpowers skills changed, the vendored copies are already updated in `vendor/superpowers/skills/`.
59
+ 4. If RPIV changed, update `package.json` dependency versions as needed.
60
+ 5. Run tests / install the package locally.
61
+ 6. Bump version, commit, push, and publish.
@@ -1,82 +1,111 @@
1
1
  # Runbook: Monitor Upstream Evolution
2
2
 
3
- Check RPIV and Superpowers monthly to decide how `@locksmithdon/dons-flow` should track them. Superpowers is a harness plugin; RPIV is an npm package.
3
+ Check Superpowers and RPIV monthly to keep Don's Flow current with its upstream partners. Superpowers skills are vendored into the package; RPIV is an npm dependency. Both upstream repos are tracked in `vendor/`.
4
4
 
5
5
  ## Schedule
6
6
 
7
7
  - **Cadence:** Monthly, or after every 2–3 projects completed with this workflow.
8
- - **Duration:** 1530 minutes.
8
+ - **Duration:** 3060 minutes.
9
9
  - **Owner:** Don Smith.
10
10
 
11
11
  ## Trigger
12
12
 
13
13
  - Calendar reminder on the 13th of each month.
14
- - After any project closeout where the dependency relationship felt awkward.
14
+ - After any project closeout where upstream behavior felt different.
15
+ - Before publishing a new version of `@locksmithdon/dons-flow`.
15
16
 
16
17
  ## Steps
17
18
 
18
- ### 1. Check RPIV
19
+ ### 1. Run the upstream sync script
19
20
 
20
- Visit https://github.com/juicesharp/rpiv-mono and look at:
21
+ From the root of the Don's Flow repo:
21
22
 
22
- - **Releases / CHANGELOG** — new versions of `@juicesharp/rpiv-pi`.
23
- - **Skills** — has RPIV added a `land`, `closeout`, `retro`, or `as-built` skill? If so, evaluate whether our port is still needed.
24
- - **Implement / validate / code-review** — have these skills changed in ways that affect our closeout sequence?
25
- - **Onboarding** — has RPIV added smoother setup commands we should mirror?
23
+ ```bash
24
+ ./scripts/sync-upstream.sh
25
+ ```
26
26
 
27
- Record findings in `docs/memory/monitor_upstream_evolution.md` under a dated heading.
27
+ This clones or pulls:
28
28
 
29
- ### 2. Check Superpowers
29
+ - `https://github.com/obra/superpowers` `vendor/superpowers-source`
30
+ - `https://github.com/juicesharp/rpiv-mono` → `vendor/rpiv-mono`
30
31
 
31
- Visit https://github.com/obra/superpowers and look at:
32
+ It then copies selected Superpowers skills into `vendor/superpowers/skills/`, compares each repo's current HEAD against the last-synced hash stored in `docs/memory/.upstream-last-sync.json`, and writes a dated report to `docs/memory/upstream-sync-YYYY-MM-DD.md`.
32
33
 
33
- - **Releases / RELEASE-NOTES.md** new versions.
34
- - **Skills** — has Superpowers added a `land`, `closeout`, or `as-built` skill? Has it published to npm or added new harness install paths?
35
- - **Brainstorming / writing-plans / subagent-driven-development** — have these changed in ways that make them more or less attractive than RPIV equivalents?
36
- - **License** — still MIT and forkable?
34
+ If `jq` is missing, install it first:
37
35
 
38
- Record findings in `docs/memory/monitor_upstream_evolution.md` under the same dated heading.
36
+ ```bash
37
+ brew install jq # macOS
38
+ apt-get install jq # Debian/Ubuntu
39
+ ```
39
40
 
40
- ### 3. Check our own usage
41
+ ### 2. Review the generated report
41
42
 
42
- Review recent projects that used this workflow:
43
+ Open the latest report:
43
44
 
44
- - Did we use Superpowers-specific entry points (`brainstorming`, `writing-plans`, `subagent-driven-development`) or RPIV entry points (`discover`, `blueprint`, `implement`)?
45
- - Did the harness-plugin install path for Superpowers cause friction?
46
- - Did RPIV's pipeline cover everything we needed?
47
- - Did our `land` skill feel like the right cycle boundary?
45
+ ```bash
46
+ ls docs/memory/upstream-sync-*.md | tail -1
47
+ ```
48
48
 
49
- Sources:
50
- - Recent `docs/retros/` files.
51
- - Recent `docs/changes/` files.
52
- - `docs/tabled.md` history.
49
+ For each upstream project, the report shows:
53
50
 
54
- ### 4. Decide or defer
51
+ - Last-synced and current commit hashes.
52
+ - Commits since the last sync.
53
+ - Files changed and diff stats.
54
+ - Empty **Decisions** sections.
55
55
 
56
- Ask:
56
+ ### 3. Decide what to incorporate
57
57
 
58
- 1. Is Superpowers on npm yet?
59
- 2. Does RPIV now provide closeout/landing?
60
- 3. Are we actively hurt by the current dependency setup?
61
- 4. Would a fork save more friction than it costs?
58
+ Default stance: **incorporate upstream improvements** unless there is a clear reason not to.
62
59
 
63
- If the answer to any of 1–3 is **yes**, consider updating `package.json` and the workflow.
60
+ For each change, label it:
64
61
 
65
- If the answer is **no**, bump `next-review` by one month and keep monitoring.
62
+ - **Incorporate** pull it into Don's Flow now.
63
+ - **Defer** — relevant, but wait for the next cycle or a triggering project.
64
+ - **Skip** — not relevant to Don's Flow.
66
65
 
67
- ### 5. Capture the decision
66
+ Edit the report in place with your decisions and any impact notes.
68
67
 
69
- If you make a change:
70
- - Update `docs/memory/monitor_upstream_evolution.md`.
71
- - Write a brief note in `docs/changes/` if the package behavior changed.
72
- - Update `README.md` and `skills/dons-flow/SKILL.md` if install instructions changed.
68
+ ### 4. Apply incorporated changes
73
69
 
74
- If you defer:
75
- - Update `last-reviewed` and `next-review` in `docs/memory/monitor_upstream_evolution.md`.
76
- - Add one paragraph summarizing the month's observations.
70
+ Common actions:
71
+
72
+ - **Superpowers skill changed** the sync script already copied the selected skills into `vendor/superpowers/skills/`. Review and commit those changes.
73
+ - **Superpowers adds a new skill** — add it to the `SUPERPOWERS_SKILLS` list in `scripts/sync-upstream.sh` if you want to vendor it.
74
+ - **RPIV version changed** — bump the RPIV dependency versions in `package.json`.
75
+ - **Workflow instructions changed** — update `README.md`, `skills/setup-dons-flow/SKILL.md`, and `skills/dons-flow/SKILL.md`.
76
+
77
+ ### 5. Update long-term memory
78
+
79
+ Open `docs/memory/monitor_upstream_evolution.md` and:
80
+
81
+ - Update `last-reviewed` and `next-review` dates.
82
+ - Add a paragraph summarizing this month's sync and any deferred decisions.
83
+ - Update decision criteria if your thinking has changed.
84
+
85
+ ### 6. Release Don's Flow
86
+
87
+ If you applied changes:
88
+
89
+ 1. Bump the version in `package.json`.
90
+ 2. Write a brief `docs/changes/` entry if the package behavior changed.
91
+ 3. Commit and push.
92
+ 4. Publish to npm.
93
+
94
+ If you deferred everything:
95
+
96
+ 1. Still commit the new sync report so the next run has a baseline.
97
+ 2. Update `last-reviewed` and `next-review`.
77
98
 
78
99
  ## Outputs
79
100
 
101
+ - Updated `docs/memory/upstream-sync-YYYY-MM-DD.md`.
80
102
  - Updated `docs/memory/monitor_upstream_evolution.md`.
81
- - Optional `docs/changes/` entry if the package changed.
82
- - Optional update to install docs.
103
+ - Updated `docs/memory/.upstream-last-sync.json`.
104
+ - Optional `docs/changes/` entry.
105
+ - Optional new version of `@locksmithdon/dons-flow` on npm.
106
+
107
+ ## Anti-patterns
108
+
109
+ - **Syncing without deciding.** The script surfaces changes; a human must decide what to do.
110
+ - **Updating `.last-sync.json` without applying changes.** This hides skipped changes from future diffs.
111
+ - **Incorporating blindly.** Upstream changes may conflict with Don's Flow conventions. Review first.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@locksmithdon/dons-flow",
3
- "version": "2.1.1",
4
- "description": "Don's Flow v2 — a developer-specific Pi Agent workflow built on RPIV's observable pipeline, Superpowers' discipline, and a structured landing closeout.",
3
+ "version": "2.2.0",
4
+ "description": "Don's Flow v2 — a single Pi Agent workflow package combining RPIV's observable pipeline, Superpowers' discipline, and Don's landing closeout.",
5
5
  "keywords": [
6
6
  "pi-package",
7
7
  "pi-extension",
@@ -29,19 +29,35 @@
29
29
  },
30
30
  "files": [
31
31
  "skills/",
32
+ "vendor/superpowers/",
32
33
  "docs/",
34
+ "scripts/",
33
35
  "README.md",
34
36
  "LICENSE"
35
37
  ],
36
38
  "pi": {
37
39
  "skills": [
38
- "./skills"
40
+ "./skills",
41
+ "./vendor/superpowers/skills"
39
42
  ]
40
43
  },
41
44
  "peerDependencies": {
42
- "@earendil-works/pi-coding-agent": "*",
45
+ "@earendil-works/pi-coding-agent": "*"
46
+ },
47
+ "dependencies": {
48
+ "@juicesharp/rpiv-pi": "*",
43
49
  "@tintinweb/pi-subagents": "*",
44
- "@juicesharp/rpiv-pi": "*"
50
+ "@juicesharp/rpiv-ask-user-question": "*",
51
+ "@juicesharp/rpiv-todo": "*",
52
+ "@juicesharp/rpiv-advisor": "*",
53
+ "@juicesharp/rpiv-i18n": "*",
54
+ "@juicesharp/rpiv-web-tools": "*",
55
+ "@juicesharp/rpiv-args": "*",
56
+ "@juicesharp/rpiv-workflow": "*",
57
+ "yaml": "*",
58
+ "typebox": "*",
59
+ "jiti": "*",
60
+ "@standard-schema/spec": "*"
45
61
  },
46
62
  "scripts": {
47
63
  "lint": "echo 'No lint configured yet'",
@@ -0,0 +1,193 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # sync-upstream.sh
5
+ #
6
+ # Update Don's Flow's vendored Superpowers skills and track upstream changes.
7
+ # RPIV is installed as a normal npm dependency, so this script only monitors
8
+ # its repo for changes that might affect dependency versions or workflow.
9
+ #
10
+ # Usage:
11
+ # ./scripts/sync-upstream.sh
12
+ #
13
+ # Outputs:
14
+ # vendor/superpowers-source/ git mirror of obra/superpowers
15
+ # vendor/superpowers/skills/ selected Superpowers skills vendored into Don's Flow
16
+ # vendor/superpowers/LICENSE Superpowers MIT license
17
+ # docs/memory/upstream-sync-YYYY-MM-DD.md decision report
18
+ # docs/memory/.upstream-last-sync.json last-synced commit hashes
19
+
20
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
21
+ cd "$REPO_ROOT"
22
+
23
+ SOURCE_DIR="$REPO_ROOT/vendor/superpowers-source"
24
+ VENDOR_DIR="$REPO_ROOT/vendor/superpowers"
25
+ VENDOR_SKILLS_DIR="$VENDOR_DIR/skills"
26
+ MEMORY_DIR="$REPO_ROOT/docs/memory"
27
+ TODAY="$(date +%Y-%m-%d)"
28
+ REPORT_FILE="$MEMORY_DIR/upstream-sync-$TODAY.md"
29
+ LAST_SYNC_FILE="$MEMORY_DIR/.upstream-last-sync.json"
30
+
31
+ # Skills from Superpowers that Don's Flow vendors directly.
32
+ # Conflicting skills (finishing-a-development-branch, using-git-worktrees,
33
+ # verification-before-completion) are intentionally excluded because Don's Flow
34
+ # provides its own integrated versions.
35
+ SUPERPOWERS_SKILLS=(
36
+ brainstorming
37
+ dispatching-parallel-agents
38
+ executing-plans
39
+ receiving-code-review
40
+ requesting-code-review
41
+ subagent-driven-development
42
+ systematic-debugging
43
+ test-driven-development
44
+ using-superpowers
45
+ writing-plans
46
+ writing-skills
47
+ )
48
+
49
+ mkdir -p "$SOURCE_DIR" "$VENDOR_SKILLS_DIR" "$MEMORY_DIR"
50
+
51
+ # Ensure last-sync tracking file exists
52
+ if [[ ! -f "$LAST_SYNC_FILE" ]]; then
53
+ echo '{}' > "$LAST_SYNC_FILE"
54
+ fi
55
+
56
+ # Read last-synced hashes
57
+ SUPERPOWERS_LAST="$(jq -r '.superpowers // ""' "$LAST_SYNC_FILE")"
58
+ RPIV_LAST="$(jq -r '.rpiv // ""' "$LAST_SYNC_FILE")"
59
+
60
+ sync_repo() {
61
+ local name="$1"
62
+ local url="$2"
63
+ local dir="$3"
64
+
65
+ if [[ -d "$dir/.git" ]]; then
66
+ echo "Updating $name..." >&2
67
+ git -C "$dir" fetch origin --quiet
68
+ git -C "$dir" pull origin --quiet
69
+ else
70
+ echo "Cloning $name..." >&2
71
+ git clone --quiet "$url" "$dir"
72
+ fi
73
+
74
+ git -C "$dir" rev-parse HEAD
75
+ }
76
+
77
+ SUPERPOWERS_CURRENT="$(sync_repo "Superpowers" "https://github.com/obra/superpowers" "$SOURCE_DIR")"
78
+
79
+ # Copy selected Superpowers skills into the package
80
+ for skill in "${SUPERPOWERS_SKILLS[@]}"; do
81
+ if [[ -d "$SOURCE_DIR/skills/$skill" ]]; then
82
+ rm -rf "$VENDOR_SKILLS_DIR/$skill"
83
+ cp -R "$SOURCE_DIR/skills/$skill" "$VENDOR_SKILLS_DIR/$skill"
84
+ else
85
+ echo "Warning: Superpowers skill '$skill' not found" >&2
86
+ fi
87
+ done
88
+
89
+ # Copy attribution
90
+ cp "$SOURCE_DIR/LICENSE" "$VENDOR_DIR/LICENSE"
91
+
92
+ # For RPIV, just track the upstream repo for release notes / workflow changes.
93
+ # The actual RPIV skills ship through the npm dependency chain.
94
+ RPIV_CURRENT="$(sync_repo "RPIV" "https://github.com/juicesharp/rpiv-mono" "$REPO_ROOT/vendor/rpiv-mono")"
95
+
96
+ # Build report
97
+ cat > "$REPORT_FILE" <<EOF
98
+ # Upstream Sync: $TODAY
99
+
100
+ type: upstream-sync
101
+ superpowers-last: ${SUPERPOWERS_LAST:-none}
102
+ superpowers-current: $SUPERPOWERS_CURRENT
103
+ rpiv-last: ${RPIV_LAST:-none}
104
+ rpiv-current: $RPIV_CURRENT
105
+
106
+ ## Superpowers ($SUPERPOWERS_LAST → $SUPERPOWERS_CURRENT)
107
+
108
+ Vendored skills: $(IFS=,; echo "${SUPERPOWERS_SKILLS[*]}")
109
+
110
+ ### Commits since last sync
111
+
112
+ \`\`\`bash
113
+ $(if [[ -n "$SUPERPOWERS_LAST" ]]; then
114
+ git -C "$SOURCE_DIR" log --oneline "$SUPERPOWERS_LAST..$SUPERPOWERS_CURRENT" -- || true
115
+ else
116
+ git -C "$SOURCE_DIR" log --oneline -20 -- || true
117
+ fi)
118
+ \`\`\`
119
+
120
+ ### Files changed
121
+
122
+ \`\`\`bash
123
+ $(if [[ -n "$SUPERPOWERS_LAST" ]]; then
124
+ git -C "$SOURCE_DIR" diff --stat "$SUPERPOWERS_LAST..$SUPERPOWERS_CURRENT" -- || true
125
+ else
126
+ echo "First sync — review the repository structure and recent commits."
127
+ fi)
128
+ \`\`\`
129
+
130
+ ### Decisions
131
+
132
+ - **Incorporate:** _list Superpowers changes to pull into Don's Flow (already copied if in vendored list)_
133
+ - **Add new skill to vendor list:** _new upstream skills worth including_
134
+ - **Defer / Skip:** _changes that do not fit or are not yet needed_
135
+ - **Notes:** _impact assessment, breaking changes, conflicts with Don's Flow skills_
136
+
137
+ ## RPIV ($RPIV_LAST → $RPIV_CURRENT)
138
+
139
+ RPIV ships as an npm dependency. Review changes for version bumps or workflow impact.
140
+
141
+ ### Commits since last sync
142
+
143
+ \`\`\`bash
144
+ $(if [[ -n "$RPIV_LAST" ]]; then
145
+ git -C "$REPO_ROOT/vendor/rpiv-mono" log --oneline "$RPIV_LAST..$RPIV_CURRENT" -- || true
146
+ else
147
+ git -C "$REPO_ROOT/vendor/rpiv-mono" log --oneline -20 -- || true
148
+ fi)
149
+ \`\`\`
150
+
151
+ ### Files changed
152
+
153
+ \`\`\`bash
154
+ $(if [[ -n "$RPIV_LAST" ]]; then
155
+ git -C "$REPO_ROOT/vendor/rpiv-mono" diff --stat "$RPIV_LAST..$RPIV_CURRENT" -- || true
156
+ else
157
+ echo "First sync — review the repository structure and recent commits."
158
+ fi)
159
+ \`\`\`
160
+
161
+ ### Decisions
162
+
163
+ - **Bump dependency version:** _new RPIV version to pin in package.json_
164
+ - **Workflow impact:** _changes that affect how Don's Flow uses RPIV skills_
165
+ - **Defer / Skip:** _changes that do not affect Don's Flow_
166
+
167
+ ## Next steps
168
+
169
+ 1. Review the commits and diffs above.
170
+ 2. Edit the **Decisions** sections in this file.
171
+ 3. If Superpowers skills changed, the vendored copies are already updated in \`vendor/superpowers/skills/\`.
172
+ 4. If RPIV changed, update \`package.json\` dependency versions as needed.
173
+ 5. Run tests / install the package locally.
174
+ 6. Bump version, commit, push, and publish.
175
+ EOF
176
+
177
+ # Update last-sync tracking
178
+ jq -n \
179
+ --arg superpowers "$SUPERPOWERS_CURRENT" \
180
+ --arg rpiv "$RPIV_CURRENT" \
181
+ '{superpowers: $superpowers, rpiv: $rpiv}' > "$LAST_SYNC_FILE"
182
+
183
+ echo ""
184
+ echo "Upstream sync complete."
185
+ echo "Report: $REPORT_FILE"
186
+ echo "Last-sync tracking: $LAST_SYNC_FILE"
187
+ echo ""
188
+ echo "Current hashes:"
189
+ echo " Superpowers: $SUPERPOWERS_CURRENT"
190
+ echo " RPIV: $RPIV_CURRENT"
191
+ echo ""
192
+ echo "Note: vendor/superpowers-source/ and vendor/rpiv-mono/ are gitignored."
193
+ echo " Vendored Superpowers skills are in vendor/superpowers/skills/ and should be committed."