@smartmemory/compose 0.2.18-beta → 0.2.19-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.
- package/dist/assets/{App-CG-2euMe.js → App-rQ0dy9X4.js} +168 -168
- package/dist/assets/{arc-7QBWoLra.js → arc-pUkmrihQ.js} +1 -1
- package/dist/assets/{architectureDiagram-3BPJPVTR-CUw-7uLm.js → architectureDiagram-3BPJPVTR-HfQQjJmI.js} +1 -1
- package/dist/assets/{blockDiagram-GPEHLZMM-COU1vmr7.js → blockDiagram-GPEHLZMM-BsKGohnn.js} +1 -1
- package/dist/assets/{c4Diagram-AAUBKEIU-XPO9PSJL.js → c4Diagram-AAUBKEIU-BKxSEqgT.js} +1 -1
- package/dist/assets/channel-Dle3XKII.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-zMzVB2a6.js → chunk-2J33WTMH-CHHmGuZd.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-Kke_qcHU.js → chunk-4BX2VUAB-BElBpOhR.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-hMeFx5Nh.js → chunk-55IACEB6-DflFI1z8.js} +1 -1
- package/dist/assets/{chunk-727SXJPM-DesUnrEw.js → chunk-727SXJPM-D9nK-RWm.js} +1 -1
- package/dist/assets/{chunk-AQP2D5EJ-1uGGvkxW.js → chunk-AQP2D5EJ-Dbn0WxRo.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DYHv1PcZ.js → chunk-FMBD7UC4-BGcm6Vvv.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-D0MENOLX.js → chunk-ND2GUHAM-BB1l7iXM.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-8nn3HP-N.js → chunk-QZHKN3VN-DBednlUY.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-C_u9Angz.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-C_u9Angz.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-BoZPVIny.js → cose-bilkent-S5V4N54A-DPu8eCS8.js} +1 -1
- package/dist/assets/{dagre-BM42HDAG-BgZzdLG9.js → dagre-BM42HDAG-CO-3fQv_.js} +1 -1
- package/dist/assets/{diagram-2AECGRRQ-CknAnpSu.js → diagram-2AECGRRQ-ES8OaCtj.js} +1 -1
- package/dist/assets/{diagram-5GNKFQAL-CZUEbKim.js → diagram-5GNKFQAL-DAxAGwHz.js} +1 -1
- package/dist/assets/{diagram-KO2AKTUF-DCs-pLdH.js → diagram-KO2AKTUF-Ch8FzysS.js} +1 -1
- package/dist/assets/{diagram-LMA3HP47-lRaDjIfM.js → diagram-LMA3HP47-CKzGPl09.js} +1 -1
- package/dist/assets/{diagram-OG6HWLK6-CIGqmehP.js → diagram-OG6HWLK6-DO22Vj8Q.js} +1 -1
- package/dist/assets/{erDiagram-TEJ5UH35-Lx3c2N6F.js → erDiagram-TEJ5UH35-BqW54tXR.js} +1 -1
- package/dist/assets/{flowDiagram-I6XJVG4X-VoluKqSq.js → flowDiagram-I6XJVG4X-B2b-dSfR.js} +1 -1
- package/dist/assets/{ganttDiagram-6RSMTGT7-D7hETiNZ.js → ganttDiagram-6RSMTGT7-CmJFWbDF.js} +1 -1
- package/dist/assets/{gitGraphDiagram-PVQCEYII-DenEcUvY.js → gitGraphDiagram-PVQCEYII-BT8o_4m6.js} +1 -1
- package/dist/assets/{index-B4dv3acY.js → index-D1hzx617.js} +2 -2
- package/dist/assets/{infoDiagram-5YYISTIA-v7cq9Er9.js → infoDiagram-5YYISTIA-BqunByDN.js} +1 -1
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-CfCCXt2x.js → ishikawaDiagram-YF4QCWOH-B7d9fw7d.js} +1 -1
- package/dist/assets/{journeyDiagram-JHISSGLW-Bbokl_xO.js → journeyDiagram-JHISSGLW-gEGcRX8K.js} +1 -1
- package/dist/assets/{kanban-definition-UN3LZRKU-DhkOZ2hg.js → kanban-definition-UN3LZRKU-Ce6Ql7ld.js} +1 -1
- package/dist/assets/{linear-bHjluRm2.js → linear-DmFVERwp.js} +1 -1
- package/dist/assets/{mindmap-definition-RKZ34NQL-C1bHpoXH.js → mindmap-definition-RKZ34NQL-B5XNiIMw.js} +1 -1
- package/dist/assets/{pieDiagram-4H26LBE5-CZb1i55T.js → pieDiagram-4H26LBE5-DkZl7DXu.js} +1 -1
- package/dist/assets/{quadrantDiagram-W4KKPZXB-o37AwRHB.js → quadrantDiagram-W4KKPZXB-2lwVSBWb.js} +1 -1
- package/dist/assets/{requirementDiagram-4Y6WPE33-BVErWDzU.js → requirementDiagram-4Y6WPE33-C0t5AupD.js} +1 -1
- package/dist/assets/{sankeyDiagram-5OEKKPKP-BhBK8gHQ.js → sankeyDiagram-5OEKKPKP-CeXMM5uX.js} +1 -1
- package/dist/assets/{sequenceDiagram-3UESZ5HK-CsICF23P.js → sequenceDiagram-3UESZ5HK-B3NY1tZo.js} +1 -1
- package/dist/assets/{stateDiagram-AJRCARHV-TN1AXwim.js → stateDiagram-AJRCARHV-DWmuapu-.js} +1 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-Dk4v8A5E.js +1 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-DftAajbU.js → timeline-definition-PNZ67QCA-BcThQznB.js} +1 -1
- package/dist/assets/{vennDiagram-CIIHVFJN-cFTMstT7.js → vennDiagram-CIIHVFJN-dfCrxHjF.js} +1 -1
- package/dist/assets/{wardley-L42UT6IY-DL8CivzO.js → wardley-L42UT6IY-Cp-dRZDP.js} +1 -1
- package/dist/assets/{wardleyDiagram-YWT4CUSO-BDZT1hQj.js → wardleyDiagram-YWT4CUSO-BaxHdcre.js} +1 -1
- package/dist/assets/{xychartDiagram-2RQKCTM6-DQQSkfC4.js → xychartDiagram-2RQKCTM6-BmPqraoL.js} +1 -1
- package/dist/index.html +1 -1
- package/lib/feature-validator.js +10 -1
- package/lib/feature-writer.js +22 -0
- package/lib/status-projection.js +36 -0
- package/package.json +1 -1
- package/scripts/backproject-vision-status.mjs +96 -0
- package/server/graph-export.js +1 -0
- package/server/vision-store.js +1 -1
- package/dist/assets/channel-Bcu04MIK.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-DU4yxldU.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DU4yxldU.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-BLR6AkKX.js +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* status-projection.js — the single canonical status mapping (COMP-MCP-VALIDATE-3).
|
|
3
|
+
*
|
|
4
|
+
* Projects a feature/ROADMAP status (UPPERCASE roadmap vocabulary) onto the
|
|
5
|
+
* vision-state status (lowercase tracker vocabulary). Used on WRITE (the
|
|
6
|
+
* `setFeatureStatus` projection and the back-projection migration) AND on READ
|
|
7
|
+
* (the validator's `*_VS_VISION_STATE` comparison), so a status written by the
|
|
8
|
+
* projection can never itself trip STATUS_MISMATCH_*_VS_VISION_STATE — one rule
|
|
9
|
+
* set, enforced on write and read.
|
|
10
|
+
*
|
|
11
|
+
* Pure data, no IO.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// feature/ROADMAP UPPERCASE status -> vision-state lowercase status.
|
|
15
|
+
const FEATURE_TO_VISION = {
|
|
16
|
+
PLANNED: 'planned',
|
|
17
|
+
IN_PROGRESS: 'in_progress',
|
|
18
|
+
PARTIAL: 'in_progress', // vision cannot represent "partially shipped"
|
|
19
|
+
COMPLETE: 'complete',
|
|
20
|
+
BLOCKED: 'blocked',
|
|
21
|
+
PARKED: 'parked',
|
|
22
|
+
KILLED: 'killed',
|
|
23
|
+
SUPERSEDED: 'superseded', // D1: vision VALID_STATUSES gains 'superseded'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {string|null|undefined} status A feature/ROADMAP status (any case).
|
|
28
|
+
* @returns {string|null} The vision-state status, or null for empty/unknown
|
|
29
|
+
* input. Vision-native statuses with no feature-vocab key (e.g. ready/review)
|
|
30
|
+
* also return null; callers treat null as "no opinion" — the validator falls
|
|
31
|
+
* back to identity, the writer skips the projection.
|
|
32
|
+
*/
|
|
33
|
+
export function featureStatusToVisionStatus(status) {
|
|
34
|
+
if (!status) return null;
|
|
35
|
+
return FEATURE_TO_VISION[String(status).toUpperCase()] ?? null;
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartmemory/compose",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19-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",
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* backproject-vision-status.mjs — one-time back-projection of historical
|
|
4
|
+
* vision-state status drift (COMP-MCP-VALIDATE-3).
|
|
5
|
+
*
|
|
6
|
+
* The typed writers now project status onto vision-state on every transition,
|
|
7
|
+
* but historical vision-state was never reconciled. This script projects the
|
|
8
|
+
* canonical feature.json status onto each bound vision item, clearing the
|
|
9
|
+
* pre-existing STATUS_MISMATCH_*_VS_VISION_STATE findings the write-time hook
|
|
10
|
+
* cannot reach (they predate any new mutation).
|
|
11
|
+
*
|
|
12
|
+
* Idempotent: a second run stages zero changes. Dry-run by default; pass
|
|
13
|
+
* --apply to write. Operates on the project root (default: process.cwd()),
|
|
14
|
+
* NOT compose's own data/.
|
|
15
|
+
*
|
|
16
|
+
* node scripts/backproject-vision-status.mjs # dry-run, cwd
|
|
17
|
+
* node scripts/backproject-vision-status.mjs --apply # write
|
|
18
|
+
* node scripts/backproject-vision-status.mjs --root /path/to/project --apply
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { readFileSync, writeFileSync, renameSync, existsSync } from 'node:fs';
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { fileURLToPath } from 'node:url';
|
|
24
|
+
import crypto from 'node:crypto';
|
|
25
|
+
import { loadFeaturesDir } from '../lib/project-paths.js';
|
|
26
|
+
import { featureStatusToVisionStatus } from '../lib/status-projection.js';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Compute (and optionally apply) the back-projection for one project root.
|
|
30
|
+
*
|
|
31
|
+
* @param {object} opts
|
|
32
|
+
* @param {string} opts.root Project root containing .compose/data + features dir.
|
|
33
|
+
* @param {boolean} [opts.apply=false] Write the reconciled state when true.
|
|
34
|
+
* @returns {{changes: Array<{code:string, id:string, from:string|null, to:string}>,
|
|
35
|
+
* skipped: number, total: number, applied: boolean}}
|
|
36
|
+
*/
|
|
37
|
+
export function backprojectVisionStatus({ root, apply = false }) {
|
|
38
|
+
const visionPath = join(root, '.compose', 'data', 'vision-state.json');
|
|
39
|
+
if (!existsSync(visionPath)) {
|
|
40
|
+
return { changes: [], skipped: 0, total: 0, applied: false };
|
|
41
|
+
}
|
|
42
|
+
const state = JSON.parse(readFileSync(visionPath, 'utf-8'));
|
|
43
|
+
const items = Array.isArray(state.items) ? state.items : [];
|
|
44
|
+
const featuresDir = join(root, loadFeaturesDir(root));
|
|
45
|
+
|
|
46
|
+
const changes = [];
|
|
47
|
+
let skipped = 0;
|
|
48
|
+
for (const item of items) {
|
|
49
|
+
const code = item.lifecycle?.featureCode || item.featureCode;
|
|
50
|
+
if (!code) { skipped++; continue; }
|
|
51
|
+
const fjPath = join(featuresDir, code, 'feature.json');
|
|
52
|
+
if (!existsSync(fjPath)) { skipped++; continue; } // UI-only / external items
|
|
53
|
+
let feature;
|
|
54
|
+
try {
|
|
55
|
+
feature = JSON.parse(readFileSync(fjPath, 'utf-8'));
|
|
56
|
+
} catch {
|
|
57
|
+
skipped++; continue;
|
|
58
|
+
}
|
|
59
|
+
const target = featureStatusToVisionStatus(feature.status);
|
|
60
|
+
if (!target) { skipped++; continue; }
|
|
61
|
+
if (item.status !== target) {
|
|
62
|
+
changes.push({ code, id: item.id, from: item.status ?? null, to: target });
|
|
63
|
+
item.status = target;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (apply && changes.length > 0) {
|
|
68
|
+
const tmp = `${visionPath}.tmp.${crypto.randomUUID()}`;
|
|
69
|
+
writeFileSync(tmp, JSON.stringify(state, null, 2) + '\n', 'utf-8');
|
|
70
|
+
renameSync(tmp, visionPath);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return { changes, skipped, total: items.length, applied: apply && changes.length > 0 };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ── CLI ──────────────────────────────────────────────────────────────────────
|
|
77
|
+
const isMain = process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1];
|
|
78
|
+
if (isMain) {
|
|
79
|
+
const argv = process.argv.slice(2);
|
|
80
|
+
const apply = argv.includes('--apply');
|
|
81
|
+
const rootIdx = argv.indexOf('--root');
|
|
82
|
+
const root = rootIdx !== -1 ? argv[rootIdx + 1] : process.cwd();
|
|
83
|
+
|
|
84
|
+
const { changes, skipped, total, applied } = backprojectVisionStatus({ root, apply });
|
|
85
|
+
|
|
86
|
+
console.log(`Back-projection — ${total} vision items, ${skipped} skipped (no bound feature.json).`);
|
|
87
|
+
if (changes.length === 0) {
|
|
88
|
+
console.log('No drift. vision-state already matches canonical feature.json status.');
|
|
89
|
+
} else {
|
|
90
|
+
console.log(`${changes.length} item(s) ${applied ? 'reconciled' : 'would change'}:`);
|
|
91
|
+
for (const c of changes) {
|
|
92
|
+
console.log(` ${c.code.padEnd(28)} ${String(c.from).padEnd(12)} → ${c.to}`);
|
|
93
|
+
}
|
|
94
|
+
if (!applied) console.log('\nDry-run. Re-run with --apply to write.');
|
|
95
|
+
}
|
|
96
|
+
}
|
package/server/graph-export.js
CHANGED
package/server/vision-store.js
CHANGED
|
@@ -8,7 +8,7 @@ import fs from 'node:fs';
|
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
|
|
10
10
|
export const VALID_TYPES = ['feature', 'bug', 'track', 'idea', 'decision', 'question', 'thread', 'artifact', 'task', 'spec', 'evaluation'];
|
|
11
|
-
export const VALID_STATUSES = ['planned', 'ready', 'in_progress', 'review', 'complete', 'blocked', 'parked', 'killed'];
|
|
11
|
+
export const VALID_STATUSES = ['planned', 'ready', 'in_progress', 'review', 'complete', 'blocked', 'parked', 'killed', 'superseded'];
|
|
12
12
|
export const VALID_CONNECTION_TYPES = ['informs', 'blocks', 'supports', 'contradicts', 'implements'];
|
|
13
13
|
export const VALID_PHASES = ['vision', 'specification', 'planning', 'implementation', 'verification', 'release'];
|
|
14
14
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai as o,aj as n}from"./App-CG-2euMe.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DesUnrEw.js";import{_ as i}from"./App-CG-2euMe.js";import"./chunk-FMBD7UC4-DYHv1PcZ.js";import"./chunk-ND2GUHAM-D0MENOLX.js";import"./chunk-55IACEB6-hMeFx5Nh.js";import"./chunk-2J33WTMH-zMzVB2a6.js";import"./mobile-CG5tLa2S.js";import"./index-B4dv3acY.js";import"./graph-Cs_vqCR0.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DesUnrEw.js";import{_ as i}from"./App-CG-2euMe.js";import"./chunk-FMBD7UC4-DYHv1PcZ.js";import"./chunk-ND2GUHAM-D0MENOLX.js";import"./chunk-55IACEB6-hMeFx5Nh.js";import"./chunk-2J33WTMH-zMzVB2a6.js";import"./mobile-CG5tLa2S.js";import"./index-B4dv3acY.js";import"./graph-Cs_vqCR0.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-AQP2D5EJ-1uGGvkxW.js";import{_ as i}from"./App-CG-2euMe.js";import"./chunk-55IACEB6-hMeFx5Nh.js";import"./chunk-2J33WTMH-zMzVB2a6.js";import"./mobile-CG5tLa2S.js";import"./index-B4dv3acY.js";import"./graph-Cs_vqCR0.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|