@smartmemory/compose 0.1.41-beta → 0.1.42-beta

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 (2) hide show
  1. package/lib/roadmap-gen.js +10 -1
  2. package/package.json +1 -1
@@ -103,7 +103,16 @@ export function generateRoadmapFromBase(baseText, features, opts = {}) {
103
103
  // Build merged phase order: source order first (preserves curated sequencing
104
104
  // for empty/legacy phases that have no feature.json), then any feature.json
105
105
  // phases not yet in source (truly new phases) sorted by feature position.
106
- const orderedPhaseIds = [...sourcePhaseOrder];
106
+ //
107
+ // Dedupe by phase identity (first occurrence wins). A phaseId is a section
108
+ // identity; the same `## ` heading appearing twice in source is the
109
+ // duplicate-section bug, not two distinct phases. Without this dedupe the
110
+ // emit loop below pushes an anon-phase block once per occurrence, so regen
111
+ // is a fixed point on duplicates (2x stays 2x forever) rather than a
112
+ // converger — a duplicate introduced once becomes permanent and survives
113
+ // hand-collapse on the next regen. Deduping makes regen self-healing:
114
+ // 4x/2x/1x source all converge to 1x output.
115
+ const orderedPhaseIds = [...new Set(sourcePhaseOrder)];
107
116
  const seenInSource = new Set(sourcePhaseOrder);
108
117
  const newPhases = [...phases.keys()].filter(p => !seenInSource.has(p));
109
118
  newPhases.sort((a, b) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartmemory/compose",
3
- "version": "0.1.41-beta",
3
+ "version": "0.1.42-beta",
4
4
  "description": "Structured AI dev pipeline — goal-to-product orchestration with gates, iteration loops, and feature lifecycle management.",
5
5
  "author": "SmartMemory",
6
6
  "license": "MIT",