@yemi33/minions 0.1.2107 → 0.1.2108

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.
@@ -766,6 +766,20 @@ async function prdItemEdit(source, itemId) {
766
766
  d.meta?.item?.id === itemId && d.meta?.item?.sourcePlan === source
767
767
  );
768
768
 
769
+ // W-mpxridf8001852f1 — resolve work-item type for the detail-modal pill via
770
+ // documented fallback chain: structured PRD field, materialized WI, dispatch
771
+ // sidecar, then prose `Type: <label>` prefix in the description (covers
772
+ // legacy unmaterialized items like prd/minions-2026-06-03.json).
773
+ let typeValue = item.type || wi?.type || completedEntry?.meta?.item?.type || '';
774
+ if (!typeValue && item.description) {
775
+ const m = /^Type:\s*([a-z-]+)\b/i.exec(item.description.trimStart());
776
+ if (m) typeValue = m[1];
777
+ }
778
+ typeValue = (typeValue || '').toString().toLowerCase();
779
+ const typePillHtml = typeValue
780
+ ? '<span style="font-size:10px;font-weight:600;padding:2px 6px;border-radius:3px;background:var(--surface-alt,var(--surface));border:1px solid var(--border);color:var(--muted);text-transform:lowercase">' + escHtml(typeValue) + '</span>'
781
+ : '';
782
+
769
783
  // Build completion summary section
770
784
  let completionHtml = '';
771
785
  const isDone = item.status === 'done';
@@ -786,6 +800,7 @@ async function prdItemEdit(source, itemId) {
786
800
  completionHtml = '<div style="background:var(--surface);border:1px solid var(--border);border-left:3px solid ' + statusColor + ';border-radius:4px;padding:10px 12px;margin-bottom:12px">' +
787
801
  '<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px">' +
788
802
  (wi ? '<a href="#" onclick="event.preventDefault();event.stopPropagation();openWorkItemDetail(\'' + escHtml(wi.id) + '\')" title="Open ' + escHtml(wi.id) + ' detail" style="font-size:11px;font-weight:700;color:' + statusColor + ';text-decoration:none;cursor:pointer" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'">' + statusLabel + ' &rarr;</a>' : '<span style="font-size:11px;font-weight:700;color:' + statusColor + '">' + statusLabel + '</span>') +
803
+ typePillHtml +
789
804
  (agent ? '<span style="font-size:11px;color:var(--muted)">by ' + escHtml(agent) + '</span>' : '') +
790
805
  (completedAt ? '<span style="font-size:10px;color:var(--muted)">' + escHtml(completedAt.slice(0, 16).replace('T', ' ')) + '</span>' : '') +
791
806
  '</div>' +
@@ -795,8 +810,13 @@ async function prdItemEdit(source, itemId) {
795
810
  '</div>';
796
811
  }
797
812
 
813
+ const standaloneTypePillHtml = (!completionHtml && typePillHtml)
814
+ ? '<div style="margin-bottom:10px">' + typePillHtml + '</div>'
815
+ : '';
816
+
798
817
  const html = '<div style="padding:8px 0">' +
799
818
  completionHtml +
819
+ standaloneTypePillHtml +
800
820
  '<label style="font-size:11px;color:var(--muted);display:block;margin-bottom:4px">Name</label>' +
801
821
  '<input id="prd-edit-name" value="' + escHtml(item.name || '') + '" style="width:100%;padding:6px 10px;background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text);font-size:13px;margin-bottom:10px">' +
802
822
  '<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:4px">' +
@@ -831,7 +851,7 @@ async function prdItemEdit(source, itemId) {
831
851
  '</div>';
832
852
 
833
853
  document.getElementById('modal-title').textContent = item.id + ' — ' + (item.name || '').slice(0, 60);
834
- // eslint-disable-next-line no-unsanitized/property -- reason: structural HTML is a string literal; all user data wrapped in escHtml() or renderMd() (fields: PRD item name/description, source, item id, agent, completion summary, PR links)
854
+ // eslint-disable-next-line no-unsanitized/property -- reason: structural HTML is a string literal; all user data wrapped in escHtml() or renderMd() (fields: PRD item name/description, source, item id, agent, completion summary, PR links, work-item type pill)
835
855
  document.getElementById('modal-body').innerHTML = html;
836
856
  document.getElementById('modal-body').style.fontFamily = '';
837
857
  document.getElementById('modal-body').style.whiteSpace = '';
@@ -0,0 +1,23 @@
1
+ # Dead-code audit retractions
2
+
3
+ **Future dead-code audit dispatches MUST read this file before re-asserting any of the retracted findings below.**
4
+
5
+ This file records false-positive findings from past dead-code audits so subsequent weekly audits do not re-cite them. Each entry names the claim verbatim, the correction, and the source lines that disprove it.
6
+
7
+ ```json
8
+ {
9
+ "id": "reviewFeedbackSourceMatches-not-dead-exported",
10
+ "retractedOn": "2026-06-03",
11
+ "retractedBy": "Dead Code Review meeting (Lambert, Dallas, Ripley unanimous)",
12
+ "claim": "engine/lifecycle.js reviewFeedbackSourceMatches is still dead-exported",
13
+ "correction": "The function is NOT exported (verify: grep `reviewFeedbackSourceMatches` in engine/lifecycle.js module.exports block at :5161-5220 returns zero hits) and IS live-called intra-file at engine/lifecycle.js:2939 inside createReviewFeedbackForAuthor.",
14
+ "sources": [
15
+ "engine/lifecycle.js:2883 (definition)",
16
+ "engine/lifecycle.js:2939 (live caller inside createReviewFeedbackForAuthor)",
17
+ "engine/lifecycle.js:5161-5220 (module.exports block — function absent)",
18
+ "knowledge/project-notes/2026-06-03-ripley-meeting-conclusion-dead-code-review-2026-06-03.md",
19
+ "notes/inbox/ripley-2026-06-03-1012.md (R2 retraction)"
20
+ ],
21
+ "futureGuidance": "Do NOT remove. Do NOT 'un-export' — there is no export. The function is a 33-line scope-filter helper that is intentionally callable separately for testability/naming; inlining it into its sole caller worsens readability of the inbox-scan loop and is not a dead-code action."
22
+ }
23
+ ```
@@ -9,34 +9,34 @@
9
9
  },
10
10
  {
11
11
  "id": "legacy-done-aliases",
12
- "location": "engine/cleanup.js:1052-1054",
12
+ "location": "engine/cleanup.js:1165-1166",
13
13
  "constants": ["LEGACY_DONE_ALIASES", "LEGACY_NEEDS_REVIEW_STATUS"],
14
14
  "reason": "Read-side tolerance: cleanup sweep auto-migrates four obsolete work-item / PRD status strings ('in-pr', 'implemented', 'complete', 'needs-human-review') to the canonical 'done' / 'failed' values. The aliases are no longer written anywhere in the engine; the constants exist only to repair stale on-disk values from old engine versions.",
15
15
  "targetRemovalDate": null,
16
- "notes": "Keep indefinitely until telemetry / a sweep log shows zero migrations performed for 30 consecutive days across all known projects (work-items.json + prd/*.json). At that point the constants and both _migrateLegacyItem branches in engine/cleanup.js (definitions at :1052-1054; usage at :1055-1071 for work items and :1156-1162 for PRD missing_features) can be deleted. Total cost on disk today: 4 strings."
16
+ "notes": "Keep indefinitely until telemetry / a sweep log shows zero migrations performed for 30 consecutive days across all known projects (work-items.json + prd/*.json). At that point the constants and both _migrateLegacyItem branches in engine/cleanup.js (definitions at :1165-1166; usage at :1168-1183 for work items and :1269-1272 for PRD missing_features) can be deleted. Total cost on disk today: 4 strings."
17
17
  },
18
18
  {
19
19
  "id": "completion-fallback-parsers",
20
20
  "description": "parseStructuredCompletion and parseCompletionFieldSummary in engine/lifecycle.js",
21
21
  "file": "engine/lifecycle.js",
22
- "lines": "2856, 3054",
22
+ "lines": "3075, 3273",
23
23
  "telemetryGate": "_engine.completionFallbacks must read 0 (both fenced and summary counters) across sweepWindowDays starting from sweepStartDate",
24
24
  "sweepWindowDays": 14,
25
25
  "sweepStartDate": "2026-05-27",
26
26
  "sweepRationale": "14 days matches the dead-code audit cadence (one full weekly audit cycle plus a buffer week). Policy decision pending confirmation in open-question #1 of the 2026-05-27 Bug Audit Review meeting conclusion — if the human teammate prefers a different cadence, repin this field and the matching enforcingSweepWindowTest fixture.",
27
27
  "enforcingTest": "test/unit/completion-fallback-telemetry.test.js:217-234",
28
28
  "enforcingSweepWindowTest": "test/unit/completion-fallback-sweep-window.test.js",
29
- "notes": "Do NOT set removedAt until telemetry confirms zero usage across the sweepWindowDays from sweepStartDate. The follow-up code-removal PR (dropping parseStructuredCompletion at engine/lifecycle.js:2856, parseCompletionFieldSummary at :3054, and the gated fallback at :3852-3877) is dispatched separately once the window is observed clean."
29
+ "notes": "Do NOT set removedAt until telemetry confirms zero usage across the sweepWindowDays from sweepStartDate. The follow-up code-removal PR (dropping parseStructuredCompletion at engine/lifecycle.js:3075, parseCompletionFieldSummary at :3273, and the gated fallback at :4240-4266) is dispatched separately once the window is observed clean."
30
30
  },
31
31
  {
32
32
  "id": "config-claude-binary-override",
33
33
  "description": "Legacy `config.claude.binary` runtime-resolution override. Older `minions init` versions persisted a `config.claude.binary` field that pointed the Claude runtime at a specific binary path. The runtime adapter still honors this override on every Claude spawn; the engine emits a `deprecated-config-claude` warning at config-load time but does NOT delete the override, so the override branch in claude.js is load-bearing for any install that still carries a non-default value.",
34
34
  "code": [
35
- { "file": "engine/runtimes/claude.js", "lines": "82-93", "note": "resolveBinary() respects config.claude.binary on every Claude spawn (probes npm package dir or direct binary path)" },
36
- { "file": "engine/shared.js", "lines": "2311-2326", "note": "warnings.push({ id: 'deprecated-config-claude' }) — surface-only; never deletes the override" },
37
- { "file": "engine/shared.js", "lines": "2770-2774", "note": "DEFAULT_CLAUDE.binary baseline that the warning + prune logic compares against" }
35
+ { "file": "engine/runtimes/claude.js", "lines": "82-86", "note": "resolveBinary() respects config.claude.binary on every Claude spawn (probes npm package dir or direct binary path)" },
36
+ { "file": "engine/shared.js", "lines": "2482-2496", "note": "warnings.push({ id: 'deprecated-config-claude' }) — surface-only; never deletes the override" },
37
+ { "file": "engine/shared.js", "lines": "3120-3124", "note": "DEFAULT_CLAUDE.binary baseline that the warning + prune logic compares against" }
38
38
  ],
39
- "removalGate": "Telemetry: the `deprecated-config-claude` warning emitted at engine/shared.js:2321-2324 must report zero hits across all known engines for >=30 consecutive days, AND a sweep of every persisted config.json must show no `config.claude.binary` value that diverges from DEFAULT_CLAUDE.binary. Only then is the override branch in resolveBinary() (engine/runtimes/claude.js:82-93) removable, along with the `_deprecatedConfigClaudeFields` membership for `binary` and the warning emitter at engine/shared.js:2311-2326.",
39
+ "removalGate": "Telemetry: the `deprecated-config-claude` warning emitted at engine/shared.js:2492-2495 must report zero hits across all known engines for >=30 consecutive days, AND a sweep of every persisted config.json must show no `config.claude.binary` value that diverges from DEFAULT_CLAUDE.binary. Only then is the override branch in resolveBinary() (engine/runtimes/claude.js:82-86) removable, along with the `_deprecatedConfigClaudeFields` membership for `binary` and the warning emitter at engine/shared.js:2482-2496.",
40
40
  "targetRemovalDate": null,
41
41
  "notes": "Do NOT set targetRemovalDate — removal must be signal-gated, not calendar-gated. This entry is paired with `prune-default-claude-config`: the prune strips DEFAULT-matching values but intentionally preserves user overrides, which is precisely why the override branch in claude.js stays reachable. Removing the override before the prune entry's gate clears would silently break installs that still rely on a custom binary path."
42
42
  },
@@ -44,15 +44,15 @@
44
44
  "id": "legacy-cc-model-migration",
45
45
  "description": "applyLegacyCcModelMigration: in-memory shim that promotes legacy `engine.ccModel` to `engine.defaultModel` when defaultModel is unset, so single-model installs keep working after the runtime fleet refactor (P-3b8e5f1d). No on-disk rewrite — the persisted config.json continues to carry the legacy `ccModel` field. Called unconditionally on every engine boot from cli.start().",
46
46
  "code": [
47
- { "file": "engine/shared.js", "lines": "2236", "note": "applyLegacyCcModelMigration definition (function signature + once-per-process flag via _resetLegacyCcModelMigrationFlag)" },
48
- { "file": "engine/cli.js", "lines": "471-472", "note": "Boot call site inside start(); wrapped in try/catch so a migration failure cannot block startup" },
47
+ { "file": "engine/shared.js", "lines": "2407", "note": "applyLegacyCcModelMigration definition (function signature + once-per-process flag via _resetLegacyCcModelMigrationFlag)" },
48
+ { "file": "engine/cli.js", "lines": "477", "note": "Boot call site inside start(); wrapped in try/catch so a migration failure cannot block startup" },
49
49
  { "file": "CLAUDE.md", "lines": "316", "note": "Architectural documentation calling out the in-memory promotion contract" },
50
50
  { "file": "docs/slim-ux/concepts.md", "lines": "671", "note": "Surface-level concepts doc cross-reference" },
51
- { "file": "test/unit.test.js", "lines": "19402", "note": "Source-inspection test pinning the CLAUDE.md description against the function name" },
51
+ { "file": "test/unit.test.js", "lines": "19801", "note": "Source-inspection test pinning the CLAUDE.md description against the function name" },
52
52
  { "file": "test/unit/runtime-fleet-helpers.test.js", "lines": "209-254", "note": "Behavioural unit tests (promotion, no-op when defaultModel set, no-op when ccModel unset, empty-string handling, once-only logging, null-safety)" },
53
53
  { "file": "test/unit/runtime-fleet-helpers.test.js", "lines": "500-505", "note": "Source-inspection test pinning the cli.js boot call site" }
54
54
  ],
55
- "removalGate": "Telemetry: the once-per-boot deprecation log line emitted by applyLegacyCcModelMigration (via the injected logger at engine/shared.js:2236) must show zero promotion events across all known engines for >=30 consecutive days, AND a sweep of every persisted config.json must confirm no `engine.ccModel` field remains. Once both conditions hold, removal deletes the function + _resetLegacyCcModelMigrationFlag export at engine/shared.js:4977, the boot call at engine/cli.js:471-472, the CLAUDE.md:316 paragraph and docs/slim-ux/concepts.md:671 reference, and the tests at runtime-fleet-helpers.test.js:209-254 + :500-505 + unit.test.js:19402.",
55
+ "removalGate": "Telemetry: the once-per-boot deprecation log line emitted by applyLegacyCcModelMigration (via the injected logger at engine/shared.js:2407) must show zero promotion events across all known engines for >=30 consecutive days, AND a sweep of every persisted config.json must confirm no `engine.ccModel` field remains. Once both conditions hold, removal deletes the function + _resetLegacyCcModelMigrationFlag export at engine/shared.js:4977, the boot call at engine/cli.js:477, the CLAUDE.md:316 paragraph and docs/slim-ux/concepts.md:671 reference, and the tests at runtime-fleet-helpers.test.js:209-254 + :500-505 + unit.test.js:19801.",
56
56
  "targetRemovalDate": null,
57
57
  "notes": "Do NOT set targetRemovalDate — gating is signal-based. The function is silent on no-op (returns false without logging), so the meaningful telemetry signal is the absence of the promotion log line over the sweep window, NOT the absence of function invocations (cli.js calls it every boot regardless)."
58
58
  },
@@ -77,18 +77,18 @@
77
77
  "id": "prune-default-claude-config",
78
78
  "description": "pruneDefaultClaudeConfig: active sanitizer that strips generated `config.claude.{binary,outputFormat,allowedTools,permissionMode}` defaults from persisted config.json so the `deprecated-config-claude` warning stops tripping on stale defaults left by older `minions init` versions. Sub-cluster of `config-claude-binary-override` — the prune deliberately preserves non-default user overrides (binary/allowedTools), which is what keeps the override branch in engine/runtimes/claude.js load-bearing.",
79
79
  "code": [
80
- { "file": "engine/shared.js", "lines": "2776-2809", "note": "pruneDefaultClaudeConfig definition: preserves non-default binary/allowedTools, always strips permissionMode + outputFormat" },
81
- { "file": "engine/shared.js", "lines": "4989", "note": "Module export entry" },
82
- { "file": "dashboard.js", "lines": "196", "note": "Called when loading config for the dashboard UI" },
83
- { "file": "dashboard.js", "lines": "8753", "note": "Called during first config save handler" },
84
- { "file": "dashboard.js", "lines": "8983", "note": "Called during second config save path" },
85
- { "file": "dashboard.js", "lines": "9102", "note": "Called during third config save path" },
80
+ { "file": "engine/shared.js", "lines": "3126", "note": "pruneDefaultClaudeConfig definition: preserves non-default binary/allowedTools, always strips permissionMode + outputFormat" },
81
+ { "file": "engine/shared.js", "lines": "5673", "note": "Module export entry" },
82
+ { "file": "dashboard.js", "lines": "202", "note": "Called when loading config for the dashboard UI" },
83
+ { "file": "dashboard.js", "lines": "9116", "note": "Called during first config save handler" },
84
+ { "file": "dashboard.js", "lines": "9331", "note": "Called during second config save path" },
85
+ { "file": "dashboard.js", "lines": "9450", "note": "Called during third config save path" },
86
86
  { "file": "minions.js", "lines": "385", "note": "Called during CLI init/update flow" },
87
- { "file": "test/unit.test.js", "lines": "2153-2196", "note": "Behavioural unit tests (default strip, override preservation, outputFormat unconditional strip) + dashboard call-site source pin" },
87
+ { "file": "test/unit.test.js", "lines": "2260-2303", "note": "Behavioural unit tests (default strip, override preservation, outputFormat unconditional strip) + dashboard call-site source pin" },
88
88
  { "file": "test/unit/runtime-fleet-helpers.test.js", "lines": "546", "note": "Source-inspection test pinning the dashboard handler call site" }
89
89
  ],
90
- "removalGate": "Telemetry: pruneDefaultClaudeConfig must return false (no mutation) for every call across all known engines for >=30 consecutive days (add an `_engine.pruneDefaultClaudeConfigStrips` counter if needed to observe this), AND the parent `config-claude-binary-override` entry must have already cleared its own gate. The dependency is strict: removing the prune while users still rely on the override branch would surface the `deprecated-config-claude` warning on every stale generated default. Once both conditions hold, removal is the function definition (engine/shared.js:2776-2809), the export at :4989, all 5 call sites (dashboard.js:196, :8753, :8983, :9102; minions.js:385), and the tests at unit.test.js:2153-2196 + runtime-fleet-helpers.test.js:546.",
90
+ "removalGate": "Telemetry: pruneDefaultClaudeConfig must return false (no mutation) for every call across all known engines for >=30 consecutive days (add an `_engine.pruneDefaultClaudeConfigStrips` counter if needed to observe this), AND the parent `config-claude-binary-override` entry must have already cleared its own gate. The dependency is strict: removing the prune while users still rely on the override branch would surface the `deprecated-config-claude` warning on every stale generated default. Once both conditions hold, removal is the function definition (engine/shared.js:3126), the export at :5673, all 5 call sites (dashboard.js:202, :9116, :9331, :9450; minions.js:385), and the tests at unit.test.js:2260-2303 + runtime-fleet-helpers.test.js:546.",
91
91
  "targetRemovalDate": null,
92
- "notes": "Do NOT set targetRemovalDate — gating is signal-based AND ordered. This entry MUST NOT be removed before `config-claude-binary-override` clears its gate, otherwise installs with stale defaults will flood the deprecation channel until their next config save. The 5 call sites form a complete coverage net: load (dashboard.js:196 + minions.js:385) + save (dashboard.js:8753/8983/9102), so any code path that touches config.json runs the sanitizer."
92
+ "notes": "Do NOT set targetRemovalDate — gating is signal-based AND ordered. This entry MUST NOT be removed before `config-claude-binary-override` clears its gate, otherwise installs with stale defaults will flood the deprecation channel until their next config save. The 5 call sites form a complete coverage net: load (dashboard.js:202 + minions.js:385) + save (dashboard.js:9116/9331/9450), so any code path that touches config.json runs the sanitizer."
93
93
  }
94
94
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2107",
3
+ "version": "0.1.2108",
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"