@yemi33/minions 0.1.2413 → 0.1.2414

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.
@@ -0,0 +1,101 @@
1
+ # Dev composite branch + dev-dashboard workflow
2
+
3
+ This documents the recurring "rebuild the composite branch from all my open PRs and
4
+ relaunch the dev dashboard" workflow. It exists because the flow is otherwise
5
+ reconstructed from `git reflog` every time. The [`rebuild-composite`](../.claude/skills/rebuild-composite/SKILL.md)
6
+ skill and [`scripts/rebuild-composite.ps1`](../scripts/rebuild-composite.ps1) automate it.
7
+
8
+ ## What the composite branch is
9
+
10
+ `composite/calebt-prs` is a throwaway integration branch: `origin/main` plus every
11
+ one of an operator's currently-open PRs merged on top, so the whole in-flight set can
12
+ be exercised together in one running dev instance. It is **rebuilt from scratch each
13
+ time** (hard reset to `origin/main`, then re-merge each open PR) — never fast-forwarded
14
+ and never pushed. Because of the hard reset, **anything committed only to
15
+ `composite/calebt-prs` is discarded on the next rebuild**; durable changes (like this
16
+ doc, the skill, and the script) must land on `main` via a normal PR.
17
+
18
+ ## The rebuild flow
19
+
20
+ 1. Confirm you are on `composite/calebt-prs` and note any dirty tracked files.
21
+ 2. Stash dirty tracked edits (see "Rogue dev edits" below) — do **not** discard them.
22
+ 3. `git fetch origin --prune`.
23
+ 4. Enumerate the operator's open PRs against `main`:
24
+ `gh pr list --repo <owner/repo> --state open --author <login> --base main --json number,headRefName`.
25
+ 5. `git reset --hard origin/main`.
26
+ 6. Merge each PR's head branch (`origin/<headRefName>`) in ascending PR-number order
27
+ with `git merge --no-edit`. Resolve conflicts, then `git commit --no-edit`.
28
+ 7. `node --check` the touched `.js` files.
29
+ 8. Relaunch the dev dashboard (see "Relaunching the dev dashboard").
30
+
31
+ ## Recurring merge conflicts
32
+
33
+ Two conflicts have recurred on essentially every rebuild. Both are **clean additive**
34
+ conflicts (two branches append to the same spot); the resolution is always "keep both
35
+ sides". The canonical resolutions:
36
+
37
+ ### `bin/minions.js` (from the `agent rekey` PR, e.g. #412)
38
+
39
+ `main` adds an `else if (cmd === 'state')` command block; the PR adds an
40
+ `else if (cmd === 'agent')` block at the same location. **Keep both** — the `state`
41
+ block first, then the `agent` block, then continue to the existing `doctor` block.
42
+ Simply delete the three conflict markers (`<<<<<<<`, `|||||||`/`=======`, `>>>>>>>`);
43
+ no lines between the sides need to be dropped.
44
+
45
+ ### `dashboard/slim/styles.css` (from the slim-ux Engine-embed PR, e.g. #896)
46
+
47
+ `main` has the `#slim-settings-modal` block; the PR adds `.slim-engine-embed,` to the
48
+ front of the `.slim-*-embed` selector group. **Keep both** — the settings-modal block,
49
+ then `.slim-engine-embed,`, then the existing `.slim-work-embed, …` group.
50
+
51
+ > **Strongly recommended: `git rerere`.** These resolutions are byte-identical every
52
+ > rebuild. Enabling `git config rerere.enabled true` records each resolution once and
53
+ > replays it automatically on every subsequent rebuild, so the conflicts resolve
54
+ > themselves. The rerere cache lives in `.git/` and therefore survives the hard reset.
55
+
56
+ Stop and resolve manually only when a **new** conflict (any other path) appears.
57
+
58
+ ## Relaunching the dev dashboard
59
+
60
+ `--dev` mode runs the current checkout **as** the runtime root (`MINIONS_HOME = checkout`)
61
+ with the dashboard on port **7332** (default) so it coexists with a global install on
62
+ 7331. See `bin/minions.js` (`--dev` / `--dev-port`).
63
+
64
+ Rebuild is not a compile step — the dashboard SPA is reassembled at startup — so
65
+ "rebuild + relaunch" is just a dev restart:
66
+
67
+ ```powershell
68
+ node bin/minions.js --dev restart # or: npm run dev
69
+ ```
70
+
71
+ ### Restart-under-load gotchas
72
+
73
+ When the box is saturated (e.g. the dev fleet is running the full test suite), the
74
+ `--dev restart` health verifier can **fast-fail**: the freshly spawned engine can't
75
+ write its pid file inside the verifier's short window, so it is reported
76
+ `state=stopped, pid=none`, the partial stack is torn down, and `engine/stop-intent.json`
77
+ is set — which then blocks the next start, creating a loop. A **stray orphaned
78
+ `dashboard.js`** from an earlier attempt independently trips the verifier's
79
+ duplicate-daemon check.
80
+
81
+ Reliable recovery:
82
+
83
+ 1. Stop any stray `engine.js` / `dashboard.js` / `supervisor.js` daemons (leave
84
+ `dispatch-*` agent processes and their worktree children alone — those are detached
85
+ agents that reattach on the next start).
86
+ 2. Delete `engine/stop-intent.json`.
87
+ 3. Confirm nothing is listening on the dev port.
88
+ 4. Start with `node bin/minions.js --dev start` — from a clean state this is more
89
+ reliable than `restart` under load.
90
+ 5. Verify: `GET http://localhost:7332/api/status` returns HTTP 200.
91
+
92
+ The engine itself boots fine under load (a foreground `node engine.js` stays healthy);
93
+ the fragility is only in the restart verifier's fast-fail path.
94
+
95
+ ## Rogue dev edits
96
+
97
+ Because `--dev` uses the checkout as the runtime root, the dev fleet's own agents
98
+ sometimes edit **tracked** files in place (e.g. `dashboard/js/settings.js`, docs, even
99
+ reverting `README.md`). These show up as dirty tracked files before a rebuild. This is
100
+ expected, not corruption — stash them (with a dated message) rather than discarding, so
101
+ nothing is lost, then rebuild.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2413",
3
+ "version": "0.1.2414",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"