@claude-flow/cli 3.1.0-alpha.25 → 3.1.0-alpha.27
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/.claude/helpers/hook-handler.cjs +9 -1
- package/.claude/helpers/intelligence.cjs +267 -1
- package/.claude/helpers/statusline.cjs +96 -28
- package/README.md +113 -2
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +9 -1
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +104 -34
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -206,6 +206,14 @@ const handlers = {
|
|
|
206
206
|
}
|
|
207
207
|
console.log('[OK] Task completed');
|
|
208
208
|
},
|
|
209
|
+
|
|
210
|
+
'stats': () => {
|
|
211
|
+
if (intelligence && intelligence.stats) {
|
|
212
|
+
intelligence.stats(args.includes('--json'));
|
|
213
|
+
} else {
|
|
214
|
+
console.log('[WARN] Intelligence module not available. Run session-restore first.');
|
|
215
|
+
}
|
|
216
|
+
},
|
|
209
217
|
};
|
|
210
218
|
|
|
211
219
|
// Execute the handler
|
|
@@ -220,5 +228,5 @@ if (command && handlers[command]) {
|
|
|
220
228
|
// Unknown command - pass through without error
|
|
221
229
|
console.log(`[OK] Hook: ${command}`);
|
|
222
230
|
} else {
|
|
223
|
-
console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task>');
|
|
231
|
+
console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task|stats>');
|
|
224
232
|
}
|
|
@@ -639,6 +639,11 @@ function consolidate() {
|
|
|
639
639
|
// 8. Persist updated store (with new insight entries)
|
|
640
640
|
if (newEntries > 0) writeJSON(STORE_PATH, store);
|
|
641
641
|
|
|
642
|
+
// 9. Save snapshot for delta tracking
|
|
643
|
+
const updatedGraph = readJSON(GRAPH_PATH);
|
|
644
|
+
const updatedRanked = readJSON(RANKED_PATH);
|
|
645
|
+
saveSnapshot(updatedGraph, updatedRanked);
|
|
646
|
+
|
|
642
647
|
return {
|
|
643
648
|
entries: store.length,
|
|
644
649
|
edges: edges.length,
|
|
@@ -647,4 +652,265 @@ function consolidate() {
|
|
|
647
652
|
};
|
|
648
653
|
}
|
|
649
654
|
|
|
650
|
-
|
|
655
|
+
// ── Snapshot for delta tracking ─────────────────────────────────────────────
|
|
656
|
+
|
|
657
|
+
const SNAPSHOT_PATH = path.join(DATA_DIR, 'intelligence-snapshot.json');
|
|
658
|
+
|
|
659
|
+
function saveSnapshot(graph, ranked) {
|
|
660
|
+
const snap = {
|
|
661
|
+
timestamp: Date.now(),
|
|
662
|
+
nodes: graph ? Object.keys(graph.nodes || {}).length : 0,
|
|
663
|
+
edges: graph ? (graph.edges || []).length : 0,
|
|
664
|
+
pageRankSum: 0,
|
|
665
|
+
confidences: [],
|
|
666
|
+
accessCounts: [],
|
|
667
|
+
topPatterns: [],
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
if (graph && graph.pageRanks) {
|
|
671
|
+
for (const v of Object.values(graph.pageRanks)) snap.pageRankSum += v;
|
|
672
|
+
}
|
|
673
|
+
if (graph && graph.nodes) {
|
|
674
|
+
for (const n of Object.values(graph.nodes)) {
|
|
675
|
+
snap.confidences.push(n.confidence || 0.5);
|
|
676
|
+
snap.accessCounts.push(n.accessCount || 0);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
if (ranked && ranked.entries) {
|
|
680
|
+
snap.topPatterns = ranked.entries.slice(0, 10).map(e => ({
|
|
681
|
+
id: e.id,
|
|
682
|
+
summary: (e.summary || '').slice(0, 60),
|
|
683
|
+
confidence: e.confidence || 0.5,
|
|
684
|
+
pageRank: e.pageRank || 0,
|
|
685
|
+
accessCount: e.accessCount || 0,
|
|
686
|
+
}));
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// Keep history: append to array, cap at 50
|
|
690
|
+
let history = readJSON(SNAPSHOT_PATH);
|
|
691
|
+
if (!Array.isArray(history)) history = [];
|
|
692
|
+
history.push(snap);
|
|
693
|
+
if (history.length > 50) history = history.slice(-50);
|
|
694
|
+
writeJSON(SNAPSHOT_PATH, history);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* stats() — Diagnostic report showing intelligence health and improvement.
|
|
699
|
+
* Can be called as: node intelligence.cjs stats [--json]
|
|
700
|
+
*/
|
|
701
|
+
function stats(outputJson) {
|
|
702
|
+
const graph = readJSON(GRAPH_PATH);
|
|
703
|
+
const ranked = readJSON(RANKED_PATH);
|
|
704
|
+
const history = readJSON(SNAPSHOT_PATH) || [];
|
|
705
|
+
const pending = fs.existsSync(PENDING_PATH)
|
|
706
|
+
? fs.readFileSync(PENDING_PATH, 'utf-8').trim().split('\n').filter(Boolean).length
|
|
707
|
+
: 0;
|
|
708
|
+
|
|
709
|
+
// Current state
|
|
710
|
+
const nodes = graph ? Object.keys(graph.nodes || {}).length : 0;
|
|
711
|
+
const edges = graph ? (graph.edges || []).length : 0;
|
|
712
|
+
const density = nodes > 1 ? (2 * edges) / (nodes * (nodes - 1)) : 0;
|
|
713
|
+
|
|
714
|
+
// Confidence distribution
|
|
715
|
+
const confidences = [];
|
|
716
|
+
const accessCounts = [];
|
|
717
|
+
if (graph && graph.nodes) {
|
|
718
|
+
for (const n of Object.values(graph.nodes)) {
|
|
719
|
+
confidences.push(n.confidence || 0.5);
|
|
720
|
+
accessCounts.push(n.accessCount || 0);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
confidences.sort((a, b) => a - b);
|
|
724
|
+
const confMin = confidences.length ? confidences[0] : 0;
|
|
725
|
+
const confMax = confidences.length ? confidences[confidences.length - 1] : 0;
|
|
726
|
+
const confMean = confidences.length ? confidences.reduce((s, c) => s + c, 0) / confidences.length : 0;
|
|
727
|
+
const confMedian = confidences.length ? confidences[Math.floor(confidences.length / 2)] : 0;
|
|
728
|
+
|
|
729
|
+
// Access stats
|
|
730
|
+
const totalAccess = accessCounts.reduce((s, c) => s + c, 0);
|
|
731
|
+
const accessedCount = accessCounts.filter(c => c > 0).length;
|
|
732
|
+
|
|
733
|
+
// PageRank stats
|
|
734
|
+
let prSum = 0, prMax = 0, prMaxId = '';
|
|
735
|
+
if (graph && graph.pageRanks) {
|
|
736
|
+
for (const [id, pr] of Object.entries(graph.pageRanks)) {
|
|
737
|
+
prSum += pr;
|
|
738
|
+
if (pr > prMax) { prMax = pr; prMaxId = id; }
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Top patterns by composite score
|
|
743
|
+
const topPatterns = (ranked && ranked.entries || []).slice(0, 10).map((e, i) => ({
|
|
744
|
+
rank: i + 1,
|
|
745
|
+
summary: (e.summary || '').slice(0, 60),
|
|
746
|
+
confidence: (e.confidence || 0.5).toFixed(3),
|
|
747
|
+
pageRank: (e.pageRank || 0).toFixed(4),
|
|
748
|
+
accessed: e.accessCount || 0,
|
|
749
|
+
score: (0.6 * (e.pageRank || 0) + 0.4 * (e.confidence || 0.5)).toFixed(4),
|
|
750
|
+
}));
|
|
751
|
+
|
|
752
|
+
// Edge type breakdown
|
|
753
|
+
const edgeTypes = {};
|
|
754
|
+
if (graph && graph.edges) {
|
|
755
|
+
for (const e of graph.edges) {
|
|
756
|
+
edgeTypes[e.type || 'unknown'] = (edgeTypes[e.type || 'unknown'] || 0) + 1;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
// Delta from previous snapshot
|
|
761
|
+
let delta = null;
|
|
762
|
+
if (history.length >= 2) {
|
|
763
|
+
const prev = history[history.length - 2];
|
|
764
|
+
const curr = history[history.length - 1];
|
|
765
|
+
const elapsed = (curr.timestamp - prev.timestamp) / 1000;
|
|
766
|
+
const prevConfMean = prev.confidences.length
|
|
767
|
+
? prev.confidences.reduce((s, c) => s + c, 0) / prev.confidences.length : 0;
|
|
768
|
+
const currConfMean = curr.confidences.length
|
|
769
|
+
? curr.confidences.reduce((s, c) => s + c, 0) / curr.confidences.length : 0;
|
|
770
|
+
const prevAccess = prev.accessCounts.reduce((s, c) => s + c, 0);
|
|
771
|
+
const currAccess = curr.accessCounts.reduce((s, c) => s + c, 0);
|
|
772
|
+
|
|
773
|
+
delta = {
|
|
774
|
+
elapsed: elapsed < 3600 ? `${Math.round(elapsed / 60)}m` : `${(elapsed / 3600).toFixed(1)}h`,
|
|
775
|
+
nodes: curr.nodes - prev.nodes,
|
|
776
|
+
edges: curr.edges - prev.edges,
|
|
777
|
+
confidenceMean: currConfMean - prevConfMean,
|
|
778
|
+
totalAccess: currAccess - prevAccess,
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Trend over all history
|
|
783
|
+
let trend = null;
|
|
784
|
+
if (history.length >= 3) {
|
|
785
|
+
const first = history[0];
|
|
786
|
+
const last = history[history.length - 1];
|
|
787
|
+
const sessions = history.length;
|
|
788
|
+
const firstConfMean = first.confidences.length
|
|
789
|
+
? first.confidences.reduce((s, c) => s + c, 0) / first.confidences.length : 0;
|
|
790
|
+
const lastConfMean = last.confidences.length
|
|
791
|
+
? last.confidences.reduce((s, c) => s + c, 0) / last.confidences.length : 0;
|
|
792
|
+
trend = {
|
|
793
|
+
sessions,
|
|
794
|
+
nodeGrowth: last.nodes - first.nodes,
|
|
795
|
+
edgeGrowth: last.edges - first.edges,
|
|
796
|
+
confidenceDrift: lastConfMean - firstConfMean,
|
|
797
|
+
direction: lastConfMean > firstConfMean ? 'improving' :
|
|
798
|
+
lastConfMean < firstConfMean ? 'declining' : 'stable',
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
const report = {
|
|
803
|
+
graph: { nodes, edges, density: +density.toFixed(4) },
|
|
804
|
+
confidence: {
|
|
805
|
+
min: +confMin.toFixed(3), max: +confMax.toFixed(3),
|
|
806
|
+
mean: +confMean.toFixed(3), median: +confMedian.toFixed(3),
|
|
807
|
+
},
|
|
808
|
+
access: { total: totalAccess, patternsAccessed: accessedCount, patternsNeverAccessed: nodes - accessedCount },
|
|
809
|
+
pageRank: { sum: +prSum.toFixed(4), topNode: prMaxId, topNodeRank: +prMax.toFixed(4) },
|
|
810
|
+
edgeTypes,
|
|
811
|
+
pendingInsights: pending,
|
|
812
|
+
snapshots: history.length,
|
|
813
|
+
topPatterns,
|
|
814
|
+
delta,
|
|
815
|
+
trend,
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
if (outputJson) {
|
|
819
|
+
console.log(JSON.stringify(report, null, 2));
|
|
820
|
+
return report;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
// Human-readable output
|
|
824
|
+
const bar = '+' + '-'.repeat(62) + '+';
|
|
825
|
+
console.log(bar);
|
|
826
|
+
console.log('|' + ' Intelligence Diagnostics (ADR-050)'.padEnd(62) + '|');
|
|
827
|
+
console.log(bar);
|
|
828
|
+
console.log('');
|
|
829
|
+
|
|
830
|
+
console.log(' Graph');
|
|
831
|
+
console.log(` Nodes: ${nodes}`);
|
|
832
|
+
console.log(` Edges: ${edges} (${Object.entries(edgeTypes).map(([t,c]) => `${c} ${t}`).join(', ') || 'none'})`);
|
|
833
|
+
console.log(` Density: ${(density * 100).toFixed(1)}%`);
|
|
834
|
+
console.log('');
|
|
835
|
+
|
|
836
|
+
console.log(' Confidence');
|
|
837
|
+
console.log(` Min: ${confMin.toFixed(3)}`);
|
|
838
|
+
console.log(` Max: ${confMax.toFixed(3)}`);
|
|
839
|
+
console.log(` Mean: ${confMean.toFixed(3)}`);
|
|
840
|
+
console.log(` Median: ${confMedian.toFixed(3)}`);
|
|
841
|
+
console.log('');
|
|
842
|
+
|
|
843
|
+
console.log(' Access');
|
|
844
|
+
console.log(` Total accesses: ${totalAccess}`);
|
|
845
|
+
console.log(` Patterns used: ${accessedCount}/${nodes}`);
|
|
846
|
+
console.log(` Never accessed: ${nodes - accessedCount}`);
|
|
847
|
+
console.log(` Pending insights: ${pending}`);
|
|
848
|
+
console.log('');
|
|
849
|
+
|
|
850
|
+
console.log(' PageRank');
|
|
851
|
+
console.log(` Sum: ${prSum.toFixed(4)} (should be ~1.0)`);
|
|
852
|
+
console.log(` Top node: ${prMaxId || '(none)'} (${prMax.toFixed(4)})`);
|
|
853
|
+
console.log('');
|
|
854
|
+
|
|
855
|
+
if (topPatterns.length > 0) {
|
|
856
|
+
console.log(' Top Patterns (by composite score)');
|
|
857
|
+
console.log(' ' + '-'.repeat(60));
|
|
858
|
+
for (const p of topPatterns) {
|
|
859
|
+
console.log(` #${p.rank} ${p.summary}`);
|
|
860
|
+
console.log(` conf=${p.confidence} pr=${p.pageRank} score=${p.score} accessed=${p.accessed}x`);
|
|
861
|
+
}
|
|
862
|
+
console.log('');
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
if (delta) {
|
|
866
|
+
console.log(` Last Delta (${delta.elapsed} ago)`);
|
|
867
|
+
const sign = v => v > 0 ? `+${v}` : `${v}`;
|
|
868
|
+
console.log(` Nodes: ${sign(delta.nodes)}`);
|
|
869
|
+
console.log(` Edges: ${sign(delta.edges)}`);
|
|
870
|
+
console.log(` Confidence: ${delta.confidenceMean >= 0 ? '+' : ''}${delta.confidenceMean.toFixed(4)}`);
|
|
871
|
+
console.log(` Accesses: ${sign(delta.totalAccess)}`);
|
|
872
|
+
console.log('');
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
if (trend) {
|
|
876
|
+
console.log(` Trend (${trend.sessions} snapshots)`);
|
|
877
|
+
console.log(` Node growth: ${trend.nodeGrowth >= 0 ? '+' : ''}${trend.nodeGrowth}`);
|
|
878
|
+
console.log(` Edge growth: ${trend.edgeGrowth >= 0 ? '+' : ''}${trend.edgeGrowth}`);
|
|
879
|
+
console.log(` Confidence drift: ${trend.confidenceDrift >= 0 ? '+' : ''}${trend.confidenceDrift.toFixed(4)}`);
|
|
880
|
+
console.log(` Direction: ${trend.direction.toUpperCase()}`);
|
|
881
|
+
console.log('');
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
if (!delta && !trend) {
|
|
885
|
+
console.log(' No history yet — run more sessions to see deltas and trends.');
|
|
886
|
+
console.log('');
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
console.log(bar);
|
|
890
|
+
return report;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
module.exports = { init, getContext, recordEdit, feedback, consolidate, stats };
|
|
894
|
+
|
|
895
|
+
// ── CLI entrypoint ──────────────────────────────────────────────────────────
|
|
896
|
+
if (require.main === module) {
|
|
897
|
+
const cmd = process.argv[2];
|
|
898
|
+
const jsonFlag = process.argv.includes('--json');
|
|
899
|
+
|
|
900
|
+
const cmds = {
|
|
901
|
+
init: () => { const r = init(); console.log(JSON.stringify(r)); },
|
|
902
|
+
stats: () => { stats(jsonFlag); },
|
|
903
|
+
consolidate: () => { const r = consolidate(); console.log(JSON.stringify(r)); },
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
if (cmd && cmds[cmd]) {
|
|
907
|
+
cmds[cmd]();
|
|
908
|
+
} else {
|
|
909
|
+
console.log('Usage: intelligence.cjs <stats|init|consolidate> [--json]');
|
|
910
|
+
console.log('');
|
|
911
|
+
console.log(' stats Show intelligence diagnostics and trends');
|
|
912
|
+
console.log(' stats --json Output as JSON for programmatic use');
|
|
913
|
+
console.log(' init Build graph and rank entries');
|
|
914
|
+
console.log(' consolidate Process pending insights and recompute');
|
|
915
|
+
}
|
|
916
|
+
}
|
|
@@ -135,48 +135,104 @@ function getUserInfo() {
|
|
|
135
135
|
return { name, gitBranch, modelName };
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
// Get learning stats from
|
|
138
|
+
// Get learning stats from intelligence loop data (ADR-050)
|
|
139
139
|
function getLearningStats() {
|
|
140
|
-
const memoryPaths = [
|
|
141
|
-
path.join(process.cwd(), '.swarm', 'memory.db'),
|
|
142
|
-
path.join(process.cwd(), '.claude', 'memory.db'),
|
|
143
|
-
path.join(process.cwd(), 'data', 'memory.db'),
|
|
144
|
-
];
|
|
145
|
-
|
|
146
140
|
let patterns = 0;
|
|
147
141
|
let sessions = 0;
|
|
148
142
|
let trajectories = 0;
|
|
143
|
+
let edges = 0;
|
|
144
|
+
let confidenceMean = 0;
|
|
145
|
+
let accessedCount = 0;
|
|
146
|
+
let trend = 'STABLE';
|
|
147
|
+
|
|
148
|
+
// PRIMARY: Read from intelligence loop data files
|
|
149
|
+
const dataDir = path.join(process.cwd(), '.claude-flow', 'data');
|
|
150
|
+
|
|
151
|
+
// 1. graph-state.json — authoritative node/edge counts
|
|
152
|
+
const graphPath = path.join(dataDir, 'graph-state.json');
|
|
153
|
+
if (fs.existsSync(graphPath)) {
|
|
154
|
+
try {
|
|
155
|
+
const graph = JSON.parse(fs.readFileSync(graphPath, 'utf-8'));
|
|
156
|
+
patterns = graph.nodes ? Object.keys(graph.nodes).length : 0;
|
|
157
|
+
edges = Array.isArray(graph.edges) ? graph.edges.length : 0;
|
|
158
|
+
} catch (e) { /* ignore */ }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 2. ranked-context.json — confidence and access data
|
|
162
|
+
const rankedPath = path.join(dataDir, 'ranked-context.json');
|
|
163
|
+
if (fs.existsSync(rankedPath)) {
|
|
164
|
+
try {
|
|
165
|
+
const ranked = JSON.parse(fs.readFileSync(rankedPath, 'utf-8'));
|
|
166
|
+
if (ranked.entries && ranked.entries.length > 0) {
|
|
167
|
+
patterns = Math.max(patterns, ranked.entries.length);
|
|
168
|
+
let confSum = 0;
|
|
169
|
+
let accCount = 0;
|
|
170
|
+
for (let i = 0; i < ranked.entries.length; i++) {
|
|
171
|
+
confSum += (ranked.entries[i].confidence || 0);
|
|
172
|
+
if ((ranked.entries[i].accessCount || 0) > 0) accCount++;
|
|
173
|
+
}
|
|
174
|
+
confidenceMean = confSum / ranked.entries.length;
|
|
175
|
+
accessedCount = accCount;
|
|
176
|
+
}
|
|
177
|
+
} catch (e) { /* ignore */ }
|
|
178
|
+
}
|
|
149
179
|
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
180
|
+
// 3. intelligence-snapshot.json — trend history
|
|
181
|
+
const snapshotPath = path.join(dataDir, 'intelligence-snapshot.json');
|
|
182
|
+
if (fs.existsSync(snapshotPath)) {
|
|
183
|
+
try {
|
|
184
|
+
const snapshot = JSON.parse(fs.readFileSync(snapshotPath, 'utf-8'));
|
|
185
|
+
if (snapshot.history && snapshot.history.length >= 2) {
|
|
186
|
+
const first = snapshot.history[0];
|
|
187
|
+
const last = snapshot.history[snapshot.history.length - 1];
|
|
188
|
+
const confDrift = (last.confidenceMean || 0) - (first.confidenceMean || 0);
|
|
189
|
+
trend = confDrift > 0.01 ? 'IMPROVING' : confDrift < -0.01 ? 'DECLINING' : 'STABLE';
|
|
190
|
+
sessions = Math.max(sessions, snapshot.history.length);
|
|
191
|
+
}
|
|
192
|
+
} catch (e) { /* ignore */ }
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 4. auto-memory-store.json — fallback entry count
|
|
196
|
+
if (patterns === 0) {
|
|
197
|
+
const autoMemPath = path.join(dataDir, 'auto-memory-store.json');
|
|
198
|
+
if (fs.existsSync(autoMemPath)) {
|
|
153
199
|
try {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
200
|
+
const data = JSON.parse(fs.readFileSync(autoMemPath, 'utf-8'));
|
|
201
|
+
patterns = Array.isArray(data) ? data.length : (data.entries ? data.entries.length : 0);
|
|
202
|
+
} catch (e) { /* ignore */ }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// FALLBACK: Legacy memory.db file-size estimation
|
|
207
|
+
if (patterns === 0) {
|
|
208
|
+
const memoryPaths = [
|
|
209
|
+
path.join(process.cwd(), '.swarm', 'memory.db'),
|
|
210
|
+
path.join(process.cwd(), '.claude', 'memory.db'),
|
|
211
|
+
path.join(process.cwd(), 'data', 'memory.db'),
|
|
212
|
+
];
|
|
213
|
+
for (let j = 0; j < memoryPaths.length; j++) {
|
|
214
|
+
if (fs.existsSync(memoryPaths[j])) {
|
|
215
|
+
try {
|
|
216
|
+
const dbStats = fs.statSync(memoryPaths[j]);
|
|
217
|
+
patterns = Math.floor(dbStats.size / 1024 / 2);
|
|
218
|
+
break;
|
|
219
|
+
} catch (e) { /* ignore */ }
|
|
164
220
|
}
|
|
165
221
|
}
|
|
166
222
|
}
|
|
167
223
|
|
|
168
|
-
//
|
|
224
|
+
// Session count from session files
|
|
169
225
|
const sessionsPath = path.join(process.cwd(), '.claude', 'sessions');
|
|
170
226
|
if (fs.existsSync(sessionsPath)) {
|
|
171
227
|
try {
|
|
172
228
|
const sessionFiles = fs.readdirSync(sessionsPath).filter(f => f.endsWith('.json'));
|
|
173
229
|
sessions = Math.max(sessions, sessionFiles.length);
|
|
174
|
-
} catch (e) {
|
|
175
|
-
// Ignore
|
|
176
|
-
}
|
|
230
|
+
} catch (e) { /* ignore */ }
|
|
177
231
|
}
|
|
178
232
|
|
|
179
|
-
|
|
233
|
+
trajectories = Math.floor(patterns / 5);
|
|
234
|
+
|
|
235
|
+
return { patterns, sessions, trajectories, edges, confidenceMean, accessedCount, trend };
|
|
180
236
|
}
|
|
181
237
|
|
|
182
238
|
// Get V3 progress from learning state (grows as system learns)
|
|
@@ -290,10 +346,22 @@ function getSystemMetrics() {
|
|
|
290
346
|
// Get learning stats for intelligence %
|
|
291
347
|
const learning = getLearningStats();
|
|
292
348
|
|
|
293
|
-
// Intelligence %
|
|
294
|
-
|
|
349
|
+
// Intelligence % from REAL intelligence loop data (ADR-050)
|
|
350
|
+
// Composite: 40% confidence mean + 30% access ratio + 30% pattern density
|
|
351
|
+
let intelligencePct = 0;
|
|
352
|
+
if (learning.confidenceMean > 0 || (learning.patterns > 0 && learning.accessedCount > 0)) {
|
|
353
|
+
const confScore = Math.min(100, Math.floor(learning.confidenceMean * 100));
|
|
354
|
+
const accessRatio = learning.patterns > 0 ? (learning.accessedCount / learning.patterns) : 0;
|
|
355
|
+
const accessScore = Math.min(100, Math.floor(accessRatio * 100));
|
|
356
|
+
const densityScore = Math.min(100, Math.floor(learning.patterns / 5));
|
|
357
|
+
intelligencePct = Math.floor(confScore * 0.4 + accessScore * 0.3 + densityScore * 0.3);
|
|
358
|
+
}
|
|
359
|
+
// Fallback: legacy pattern count
|
|
360
|
+
if (intelligencePct === 0 && learning.patterns > 0) {
|
|
361
|
+
intelligencePct = Math.min(100, Math.floor(learning.patterns / 10));
|
|
362
|
+
}
|
|
295
363
|
|
|
296
|
-
// Context % based on session history
|
|
364
|
+
// Context % based on session history
|
|
297
365
|
const contextPct = Math.min(100, Math.floor(learning.sessions * 5));
|
|
298
366
|
|
|
299
367
|
// Count active sub-agents from process list
|
package/README.md
CHANGED
|
@@ -616,6 +616,13 @@ codex mcp add ruflo -- npx ruflo mcp start
|
|
|
616
616
|
4. REMEMBER: memory_store(key, value, namespace="patterns") → Save for future
|
|
617
617
|
```
|
|
618
618
|
|
|
619
|
+
The **Intelligence Loop** (ADR-050) automates this cycle through hooks. Each session automatically:
|
|
620
|
+
- Builds a knowledge graph from memory entries (PageRank + Jaccard similarity)
|
|
621
|
+
- Injects ranked context into every route decision
|
|
622
|
+
- Tracks edit patterns and generates new insights
|
|
623
|
+
- Boosts confidence for useful patterns, decays unused ones
|
|
624
|
+
- Saves snapshots so you can track improvement with `node .claude/helpers/hook-handler.cjs stats`
|
|
625
|
+
|
|
619
626
|
### MCP Tools for Learning
|
|
620
627
|
|
|
621
628
|
| Tool | Purpose | When to Use |
|
|
@@ -2886,6 +2893,101 @@ Performance: <1ms (352x faster than LLM)
|
|
|
2886
2893
|
Cost: $0
|
|
2887
2894
|
```
|
|
2888
2895
|
|
|
2896
|
+
### Intelligence Loop (ADR-050)
|
|
2897
|
+
|
|
2898
|
+
The intelligence loop wires PageRank-ranked memory into the hook system. Every session builds a knowledge graph that improves over time:
|
|
2899
|
+
|
|
2900
|
+
```
|
|
2901
|
+
SessionStart:
|
|
2902
|
+
session-restore → intelligence.init()
|
|
2903
|
+
→ Read MEMORY.md / auto-memory-store.json
|
|
2904
|
+
→ Build graph (nodes + similarity/temporal edges)
|
|
2905
|
+
→ Compute PageRank
|
|
2906
|
+
→ "[INTELLIGENCE] Loaded 13 patterns, 12 edges"
|
|
2907
|
+
|
|
2908
|
+
UserPrompt:
|
|
2909
|
+
route → intelligence.getContext(prompt)
|
|
2910
|
+
→ Jaccard-match prompt against pre-ranked entries
|
|
2911
|
+
→ Inject top-5 patterns into Claude's context:
|
|
2912
|
+
|
|
2913
|
+
[INTELLIGENCE] Relevant patterns for this task:
|
|
2914
|
+
* (0.95) HNSW gives 150x-12,500x speedup [rank #1, 12x accessed]
|
|
2915
|
+
* (0.88) London School TDD preferred [rank #3, 8x accessed]
|
|
2916
|
+
|
|
2917
|
+
PostEdit:
|
|
2918
|
+
post-edit → intelligence.recordEdit(file)
|
|
2919
|
+
→ Append to pending-insights.jsonl (<2ms)
|
|
2920
|
+
|
|
2921
|
+
SessionEnd:
|
|
2922
|
+
session-end → intelligence.consolidate()
|
|
2923
|
+
→ Process pending insights (3+ edits → new entry)
|
|
2924
|
+
→ Confidence boost for accessed patterns (+0.03)
|
|
2925
|
+
→ Confidence decay for unused patterns (-0.005/day)
|
|
2926
|
+
→ Recompute PageRank, rebuild edges
|
|
2927
|
+
→ Save snapshot for trend tracking
|
|
2928
|
+
```
|
|
2929
|
+
|
|
2930
|
+
**Measuring improvement:**
|
|
2931
|
+
|
|
2932
|
+
```bash
|
|
2933
|
+
# Human-readable diagnostics
|
|
2934
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
2935
|
+
|
|
2936
|
+
# JSON output for scripting
|
|
2937
|
+
node .claude/helpers/hook-handler.cjs stats --json
|
|
2938
|
+
|
|
2939
|
+
# Or via intelligence.cjs directly
|
|
2940
|
+
node .claude/helpers/intelligence.cjs stats
|
|
2941
|
+
```
|
|
2942
|
+
|
|
2943
|
+
The stats command shows:
|
|
2944
|
+
|
|
2945
|
+
| Section | What It Tells You |
|
|
2946
|
+
|---------|-------------------|
|
|
2947
|
+
| **Graph** | Node/edge count, density % |
|
|
2948
|
+
| **Confidence** | Min/max/mean/median across all patterns |
|
|
2949
|
+
| **Access** | Total accesses, patterns used vs never accessed |
|
|
2950
|
+
| **PageRank** | Sum (~1.0), highest-ranked node |
|
|
2951
|
+
| **Top Patterns** | Top 10 by composite score with access counts |
|
|
2952
|
+
| **Last Delta** | Changes since previous session (confidence shift, access delta) |
|
|
2953
|
+
| **Trend** | Over all sessions: IMPROVING / DECLINING / STABLE |
|
|
2954
|
+
|
|
2955
|
+
**Example output:**
|
|
2956
|
+
```
|
|
2957
|
+
+--------------------------------------------------------------+
|
|
2958
|
+
| Intelligence Diagnostics (ADR-050) |
|
|
2959
|
+
+--------------------------------------------------------------+
|
|
2960
|
+
|
|
2961
|
+
Graph
|
|
2962
|
+
Nodes: 9
|
|
2963
|
+
Edges: 8 (7 temporal, 1 similar)
|
|
2964
|
+
Density: 22.2%
|
|
2965
|
+
|
|
2966
|
+
Confidence
|
|
2967
|
+
Min: 0.490 Max: 0.600
|
|
2968
|
+
Mean: 0.556 Median: 0.580
|
|
2969
|
+
|
|
2970
|
+
Access
|
|
2971
|
+
Total accesses: 11
|
|
2972
|
+
Patterns used: 6/9
|
|
2973
|
+
Never accessed: 3
|
|
2974
|
+
|
|
2975
|
+
Top Patterns (by composite score)
|
|
2976
|
+
#1 HNSW gives 150x-12,500x speedup
|
|
2977
|
+
conf=0.600 pr=0.2099 score=0.3659 accessed=2x
|
|
2978
|
+
#2 London School TDD preferred
|
|
2979
|
+
conf=0.600 pr=0.1995 score=0.3597 accessed=2x
|
|
2980
|
+
|
|
2981
|
+
Last Delta (5m ago)
|
|
2982
|
+
Confidence: +0.0300
|
|
2983
|
+
Accesses: +6
|
|
2984
|
+
|
|
2985
|
+
Trend (3 snapshots)
|
|
2986
|
+
Confidence drift: +0.0422
|
|
2987
|
+
Direction: IMPROVING
|
|
2988
|
+
+--------------------------------------------------------------+
|
|
2989
|
+
```
|
|
2990
|
+
|
|
2889
2991
|
### All 27 Hooks by Category
|
|
2890
2992
|
|
|
2891
2993
|
#### 🔧 Tool Lifecycle Hooks (6 hooks)
|
|
@@ -2954,7 +3056,7 @@ npx ruflo@v3alpha hooks session-end --export-metrics --persist-patterns
|
|
|
2954
3056
|
| `trajectory-end` | RL | Finish recording, trigger learning |
|
|
2955
3057
|
| `pattern-store` | Memory | Store a pattern with HNSW indexing |
|
|
2956
3058
|
| `pattern-search` | Memory | Find similar patterns (150x faster) |
|
|
2957
|
-
| `stats` | Analytics |
|
|
3059
|
+
| `stats` | Analytics | Intelligence diagnostics, confidence trends, improvement tracking |
|
|
2958
3060
|
| `attention` | Focus | Compute attention-weighted similarity |
|
|
2959
3061
|
|
|
2960
3062
|
```bash
|
|
@@ -2966,6 +3068,10 @@ npx ruflo@v3alpha hooks intelligence trajectory-step --action "created token ser
|
|
|
2966
3068
|
|
|
2967
3069
|
# End trajectory and trigger learning
|
|
2968
3070
|
npx ruflo@v3alpha hooks intelligence trajectory-end --success true
|
|
3071
|
+
|
|
3072
|
+
# View intelligence diagnostics and improvement trends (ADR-050)
|
|
3073
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
3074
|
+
node .claude/helpers/intelligence.cjs stats --json
|
|
2969
3075
|
```
|
|
2970
3076
|
|
|
2971
3077
|
### 12 Background Workers (Auto-Triggered)
|
|
@@ -3033,7 +3139,7 @@ npx ruflo@v3alpha hooks model-route --task "design distributed consensus system"
|
|
|
3033
3139
|
# MOST COMMON HOOKS
|
|
3034
3140
|
# ══════════════════════════════════════════════════════════════════
|
|
3035
3141
|
|
|
3036
|
-
# Route task to best agent
|
|
3142
|
+
# Route task to best agent (with intelligence context injection)
|
|
3037
3143
|
npx ruflo@v3alpha hooks route "<task>" --include-explanation
|
|
3038
3144
|
|
|
3039
3145
|
# Start/end session with learning
|
|
@@ -3044,6 +3150,11 @@ npx ruflo@v3alpha hooks session-end --persist-patterns
|
|
|
3044
3150
|
npx ruflo@v3alpha hooks metrics
|
|
3045
3151
|
npx ruflo@v3alpha hooks intelligence stats
|
|
3046
3152
|
|
|
3153
|
+
# Intelligence diagnostics — see if intelligence is improving
|
|
3154
|
+
node .claude/helpers/hook-handler.cjs stats # Human-readable
|
|
3155
|
+
node .claude/helpers/hook-handler.cjs stats --json # JSON for scripting
|
|
3156
|
+
node .claude/helpers/intelligence.cjs stats # Direct access
|
|
3157
|
+
|
|
3047
3158
|
# Bootstrap on new project
|
|
3048
3159
|
npx ruflo@v3alpha hooks pretrain --depth deep
|
|
3049
3160
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-generator.d.ts","sourceRoot":"","sources":["../../../src/init/helpers-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA4B9C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAkB/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAiI/C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAoE5C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAqF7C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers-generator.d.ts","sourceRoot":"","sources":["../../../src/init/helpers-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA4B9C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAkB/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAiI/C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAoE5C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAqF7C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CA6K5C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAyMjD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAqGrD;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAOpD;AAED;;GAEG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAoH5D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwB5E"}
|
|
@@ -506,6 +506,14 @@ export function generateHookHandler() {
|
|
|
506
506
|
' }',
|
|
507
507
|
" console.log('[OK] Task completed');",
|
|
508
508
|
' },',
|
|
509
|
+
'',
|
|
510
|
+
" 'stats': () => {",
|
|
511
|
+
' if (intelligence && intelligence.stats) {',
|
|
512
|
+
" intelligence.stats(args.includes('--json'));",
|
|
513
|
+
' } else {',
|
|
514
|
+
" console.log('[WARN] Intelligence module not available. Run session-restore first.');",
|
|
515
|
+
' }',
|
|
516
|
+
' },',
|
|
509
517
|
'};',
|
|
510
518
|
'',
|
|
511
519
|
'if (command && handlers[command]) {',
|
|
@@ -517,7 +525,7 @@ export function generateHookHandler() {
|
|
|
517
525
|
'} else if (command) {',
|
|
518
526
|
" console.log('[OK] Hook: ' + command);",
|
|
519
527
|
'} else {',
|
|
520
|
-
" console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task>');",
|
|
528
|
+
" console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task|stats>');",
|
|
521
529
|
'}',
|
|
522
530
|
];
|
|
523
531
|
return lines.join('\n') + '\n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-generator.js","sourceRoot":"","sources":["../../../src/init/helpers-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE7F;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;CAgBR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFR,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IACjC,4EAA4E;IAC5E,MAAM,KAAK,GAAG;QACZ,qBAAqB;QACrB,KAAK;QACL,8CAA8C;QAC9C,8DAA8D;QAC9D,KAAK;QACL,EAAE;QACF,+BAA+B;QAC/B,2BAA2B;QAC3B,EAAE;QACF,+BAA+B;QAC/B,EAAE;QACF,oCAAoC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;QAC3G,WAAW;QACX,uCAAuC;QACvC,OAAO;QACP,MAAM;QACN,EAAE;QACF,0BAA0B;QAC1B,qDAAqD;QACrD,aAAa;QACb,kDAAkD;QAClD,6CAA6C;QAC7C,gHAAgH;QAChH,gFAAgF;QAChF,2CAA2C;QAC3C,6BAA6B;QAC7B,WAAW;QACX,uCAAuC;QACvC,OAAO;QACP,mCAAmC;QACnC,sBAAsB;QACtB,cAAc;QACd,0CAA0C;QAC1C,OAAO;QACP,MAAM;QACN,EAAE;QACF,uBAAuB;QACvB,sCAAsC;QACtC,gCAAgC;QAChC,OAAO;QACP,iDAAiD;QACjD,8CAA8C;QAC9C,2GAA2G;QAC3G,cAAc;QACd,yCAAyC;QACzC,OAAO;QACP,MAAM;QACN,EAAE;QACF,wBAAwB;QACxB,kDAAkD;QAClD,aAAa;QACb,sCAAsC;QACtC,uCAAuC;QACvC,OAAO;QACP,yCAAyC;QACzC,MAAM;QACN,IAAI;QACJ,EAAE;QACF,qCAAqC;QACrC,SAAS;QACT,0BAA0B;QAC1B,iBAAiB;QACjB,oFAAoF;QACpF,KAAK;QACL,uBAAuB;QACvB,yCAAyC;QACzC,UAAU;QACV,
|
|
1
|
+
{"version":3,"file":"helpers-generator.js","sourceRoot":"","sources":["../../../src/init/helpers-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAE7F;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;CAgBR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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