@boshu2/vibe-check 1.7.0 → 1.8.1

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 (98) hide show
  1. package/.agents/bundles/actionable-coaching-plan-2025-12-02.md +209 -0
  2. package/.agents/plans/git-forensics-enhancement-2025-12-05.md +493 -0
  3. package/.claude/skills/typescript-review.md +152 -0
  4. package/CHANGELOG.md +41 -5
  5. package/CLAUDE.md +85 -23
  6. package/Makefile +43 -19
  7. package/README.md +178 -172
  8. package/SECURITY.md +5 -1
  9. package/assets/logo-dark.svg +47 -0
  10. package/assets/logo.svg +47 -0
  11. package/claude-progress.json +28 -7
  12. package/claude-progress.txt +48 -0
  13. package/dist/analyzers/patterns.d.ts +62 -0
  14. package/dist/analyzers/patterns.d.ts.map +1 -0
  15. package/dist/analyzers/patterns.js +103 -0
  16. package/dist/analyzers/patterns.js.map +1 -0
  17. package/dist/analyzers/quality.d.ts +58 -0
  18. package/dist/analyzers/quality.d.ts.map +1 -0
  19. package/dist/analyzers/quality.js +114 -0
  20. package/dist/analyzers/quality.js.map +1 -0
  21. package/dist/analyzers/sessions.d.ts +45 -0
  22. package/dist/analyzers/sessions.d.ts.map +1 -0
  23. package/dist/analyzers/sessions.js +123 -0
  24. package/dist/analyzers/sessions.js.map +1 -0
  25. package/dist/cli.js +4 -0
  26. package/dist/cli.js.map +1 -1
  27. package/dist/commands/analyze.d.ts.map +1 -1
  28. package/dist/commands/analyze.js +5 -0
  29. package/dist/commands/analyze.js.map +1 -1
  30. package/dist/commands/forensics.d.ts +29 -0
  31. package/dist/commands/forensics.d.ts.map +1 -0
  32. package/dist/commands/forensics.js +213 -0
  33. package/dist/commands/forensics.js.map +1 -0
  34. package/dist/commands/index.d.ts +4 -0
  35. package/dist/commands/index.d.ts.map +1 -1
  36. package/dist/commands/index.js +11 -1
  37. package/dist/commands/index.js.map +1 -1
  38. package/dist/commands/insights.d.ts +3 -0
  39. package/dist/commands/insights.d.ts.map +1 -0
  40. package/dist/commands/insights.js +120 -0
  41. package/dist/commands/insights.js.map +1 -0
  42. package/dist/commands/pipeline.d.ts +3 -0
  43. package/dist/commands/pipeline.d.ts.map +1 -0
  44. package/dist/commands/pipeline.js +485 -0
  45. package/dist/commands/pipeline.js.map +1 -0
  46. package/dist/commands/profile.d.ts +0 -1
  47. package/dist/commands/profile.d.ts.map +1 -1
  48. package/dist/commands/profile.js +0 -4
  49. package/dist/commands/profile.js.map +1 -1
  50. package/dist/commands/session.d.ts +9 -0
  51. package/dist/commands/session.d.ts.map +1 -1
  52. package/dist/commands/session.js +95 -0
  53. package/dist/commands/session.js.map +1 -1
  54. package/dist/commands/sessions.d.ts +20 -0
  55. package/dist/commands/sessions.d.ts.map +1 -0
  56. package/dist/commands/sessions.js +201 -0
  57. package/dist/commands/sessions.js.map +1 -0
  58. package/dist/commands/watch.d.ts.map +1 -1
  59. package/dist/commands/watch.js +124 -7
  60. package/dist/commands/watch.js.map +1 -1
  61. package/dist/inner-loop/context-amnesia.d.ts +20 -0
  62. package/dist/inner-loop/context-amnesia.d.ts.map +1 -0
  63. package/dist/inner-loop/context-amnesia.js +249 -0
  64. package/dist/inner-loop/context-amnesia.js.map +1 -0
  65. package/dist/inner-loop/index.d.ts +39 -0
  66. package/dist/inner-loop/index.d.ts.map +1 -0
  67. package/dist/inner-loop/index.js +208 -0
  68. package/dist/inner-loop/index.js.map +1 -0
  69. package/dist/inner-loop/instruction-drift.d.ts +28 -0
  70. package/dist/inner-loop/instruction-drift.d.ts.map +1 -0
  71. package/dist/inner-loop/instruction-drift.js +260 -0
  72. package/dist/inner-loop/instruction-drift.js.map +1 -0
  73. package/dist/inner-loop/logging-only.d.ts +30 -0
  74. package/dist/inner-loop/logging-only.d.ts.map +1 -0
  75. package/dist/inner-loop/logging-only.js +264 -0
  76. package/dist/inner-loop/logging-only.js.map +1 -0
  77. package/dist/inner-loop/tests-passing-lie.d.ts +34 -0
  78. package/dist/inner-loop/tests-passing-lie.d.ts.map +1 -0
  79. package/dist/inner-loop/tests-passing-lie.js +213 -0
  80. package/dist/inner-loop/tests-passing-lie.js.map +1 -0
  81. package/dist/inner-loop/types.d.ts +111 -0
  82. package/dist/inner-loop/types.d.ts.map +1 -0
  83. package/dist/inner-loop/types.js +29 -0
  84. package/dist/inner-loop/types.js.map +1 -0
  85. package/dist/storage/index.d.ts +1 -0
  86. package/dist/storage/index.d.ts.map +1 -1
  87. package/dist/storage/index.js +11 -1
  88. package/dist/storage/index.js.map +1 -1
  89. package/dist/storage/spiral-history.d.ts +62 -0
  90. package/dist/storage/spiral-history.d.ts.map +1 -0
  91. package/dist/storage/spiral-history.js +265 -0
  92. package/dist/storage/spiral-history.js.map +1 -0
  93. package/docs/ARCHITECTURE.md +2 -10
  94. package/docs/FEATURES.md +340 -0
  95. package/docs/GAMIFICATION.md +19 -266
  96. package/docs/VIBE-ECOSYSTEM.md +12 -78
  97. package/feature-list.json +140 -88
  98. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * Inner Loop Failure Pattern Types
4
+ *
5
+ * These detect the 4 "Inner Loop Disasters" from vibe coding:
6
+ * 1. "Tests Passing" Lie - AI claims success but code doesn't work
7
+ * 2. Context Amnesia - Forgets instructions, re-does work
8
+ * 3. Instruction Drift - "Improves" things not asked for
9
+ * 4. Debug Loop Spiral - Adds logging instead of fixing
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DEFAULT_INNER_LOOP_CONFIG = void 0;
13
+ exports.DEFAULT_INNER_LOOP_CONFIG = {
14
+ runTestsAfterCommit: false,
15
+ amnesiaWindowMinutes: 60,
16
+ similarityThreshold: 0.7,
17
+ allowedDriftFiles: ['package.json', 'package-lock.json', 'tsconfig.json', '.gitignore'],
18
+ maxConsecutiveLoggingCommits: 3,
19
+ loggingPatterns: [
20
+ /console\.(log|error|warn|debug|info)\(/,
21
+ /print\s*\(/,
22
+ /logger\.(log|error|warn|debug|info)\(/,
23
+ /System\.out\.print/,
24
+ /fmt\.Print/,
25
+ /debug!\(/,
26
+ /println!\(/,
27
+ ],
28
+ };
29
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inner-loop/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAuJU,QAAA,yBAAyB,GAAoB;IACxD,mBAAmB,EAAE,KAAK;IAC1B,oBAAoB,EAAE,EAAE;IACxB,mBAAmB,EAAE,GAAG;IACxB,iBAAiB,EAAE,CAAC,cAAc,EAAE,mBAAmB,EAAE,eAAe,EAAE,YAAY,CAAC;IACvF,4BAA4B,EAAE,CAAC;IAC/B,eAAe,EAAE;QACf,wCAAwC;QACxC,YAAY;QACZ,uCAAuC;QACvC,oBAAoB;QACpB,YAAY;QACZ,UAAU;QACV,YAAY;KACb;CACF,CAAC"}
@@ -2,4 +2,5 @@ export { TimelineStore, StoredSession, StoredInsight, PatternStats, TrendData, W
2
2
  export { atomicWriteSync, appendLineSync, readNdjsonSync, readNdjsonWithErrors, safeReadJsonSync, ensureGitignore, NdjsonReadResult, } from './atomic';
3
3
  export { StoredCommit, getCommitLogPath, appendCommits, readCommitLog, getLastLoggedCommitHash, getCommitLogCount, } from './commit-log';
4
4
  export { SchemaVersion, CURRENT_SCHEMA_VERSION, VersionedStore, migrateStore, needsMigration, } from './schema';
5
+ export { SpiralRecord, SpiralResolution, SpiralAdvice, getSpiralHistoryPath, appendSpiral, resolveSpiral, readSpiralHistory, getAdvice, getPatternStats, getPatternDisplayName, getResolutionDisplayName, } from './spiral-history';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.needsMigration = exports.migrateStore = exports.CURRENT_SCHEMA_VERSION = exports.getCommitLogCount = exports.getLastLoggedCommitHash = exports.readCommitLog = exports.appendCommits = exports.getCommitLogPath = exports.ensureGitignore = exports.safeReadJsonSync = exports.readNdjsonWithErrors = exports.readNdjsonSync = exports.appendLineSync = exports.atomicWriteSync = exports.getStoreDir = exports.getStorePath = exports.getLastCommitHash = exports.updateStore = exports.createInitialStore = exports.saveStore = exports.loadStore = void 0;
3
+ exports.getResolutionDisplayName = exports.getPatternDisplayName = exports.getPatternStats = exports.getAdvice = exports.readSpiralHistory = exports.resolveSpiral = exports.appendSpiral = exports.getSpiralHistoryPath = exports.needsMigration = exports.migrateStore = exports.CURRENT_SCHEMA_VERSION = exports.getCommitLogCount = exports.getLastLoggedCommitHash = exports.readCommitLog = exports.appendCommits = exports.getCommitLogPath = exports.ensureGitignore = exports.safeReadJsonSync = exports.readNdjsonWithErrors = exports.readNdjsonSync = exports.appendLineSync = exports.atomicWriteSync = exports.getStoreDir = exports.getStorePath = exports.getLastCommitHash = exports.updateStore = exports.createInitialStore = exports.saveStore = exports.loadStore = void 0;
4
4
  // Timeline store (computed view)
5
5
  var timeline_store_1 = require("./timeline-store");
6
6
  Object.defineProperty(exports, "loadStore", { enumerable: true, get: function () { return timeline_store_1.loadStore; } });
@@ -30,4 +30,14 @@ var schema_1 = require("./schema");
30
30
  Object.defineProperty(exports, "CURRENT_SCHEMA_VERSION", { enumerable: true, get: function () { return schema_1.CURRENT_SCHEMA_VERSION; } });
31
31
  Object.defineProperty(exports, "migrateStore", { enumerable: true, get: function () { return schema_1.migrateStore; } });
32
32
  Object.defineProperty(exports, "needsMigration", { enumerable: true, get: function () { return schema_1.needsMigration; } });
33
+ // Spiral history (coaching feature)
34
+ var spiral_history_1 = require("./spiral-history");
35
+ Object.defineProperty(exports, "getSpiralHistoryPath", { enumerable: true, get: function () { return spiral_history_1.getSpiralHistoryPath; } });
36
+ Object.defineProperty(exports, "appendSpiral", { enumerable: true, get: function () { return spiral_history_1.appendSpiral; } });
37
+ Object.defineProperty(exports, "resolveSpiral", { enumerable: true, get: function () { return spiral_history_1.resolveSpiral; } });
38
+ Object.defineProperty(exports, "readSpiralHistory", { enumerable: true, get: function () { return spiral_history_1.readSpiralHistory; } });
39
+ Object.defineProperty(exports, "getAdvice", { enumerable: true, get: function () { return spiral_history_1.getAdvice; } });
40
+ Object.defineProperty(exports, "getPatternStats", { enumerable: true, get: function () { return spiral_history_1.getPatternStats; } });
41
+ Object.defineProperty(exports, "getPatternDisplayName", { enumerable: true, get: function () { return spiral_history_1.getPatternDisplayName; } });
42
+ Object.defineProperty(exports, "getResolutionDisplayName", { enumerable: true, get: function () { return spiral_history_1.getResolutionDisplayName; } });
33
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,mDAe0B;AAPxB,2GAAA,SAAS,OAAA;AACT,2GAAA,SAAS,OAAA;AACT,oHAAA,kBAAkB,OAAA;AAClB,6GAAA,WAAW,OAAA;AACX,mHAAA,iBAAiB,OAAA;AACjB,8GAAA,YAAY,OAAA;AACZ,6GAAA,WAAW,OAAA;AAGb,yBAAyB;AACzB,mCAQkB;AAPhB,yGAAA,eAAe,OAAA;AACf,wGAAA,cAAc,OAAA;AACd,wGAAA,cAAc,OAAA;AACd,8GAAA,oBAAoB,OAAA;AACpB,0GAAA,gBAAgB,OAAA;AAChB,yGAAA,eAAe,OAAA;AAIjB,sCAAsC;AACtC,2CAOsB;AALpB,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,2GAAA,aAAa,OAAA;AACb,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AAGnB,oBAAoB;AACpB,mCAMkB;AAJhB,gHAAA,sBAAsB,OAAA;AAEtB,sGAAA,YAAY,OAAA;AACZ,wGAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,mDAe0B;AAPxB,2GAAA,SAAS,OAAA;AACT,2GAAA,SAAS,OAAA;AACT,oHAAA,kBAAkB,OAAA;AAClB,6GAAA,WAAW,OAAA;AACX,mHAAA,iBAAiB,OAAA;AACjB,8GAAA,YAAY,OAAA;AACZ,6GAAA,WAAW,OAAA;AAGb,yBAAyB;AACzB,mCAQkB;AAPhB,yGAAA,eAAe,OAAA;AACf,wGAAA,cAAc,OAAA;AACd,wGAAA,cAAc,OAAA;AACd,8GAAA,oBAAoB,OAAA;AACpB,0GAAA,gBAAgB,OAAA;AAChB,yGAAA,eAAe,OAAA;AAIjB,sCAAsC;AACtC,2CAOsB;AALpB,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,2GAAA,aAAa,OAAA;AACb,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AAGnB,oBAAoB;AACpB,mCAMkB;AAJhB,gHAAA,sBAAsB,OAAA;AAEtB,sGAAA,YAAY,OAAA;AACZ,wGAAA,cAAc,OAAA;AAGhB,oCAAoC;AACpC,mDAY0B;AARxB,sHAAA,oBAAoB,OAAA;AACpB,8GAAA,YAAY,OAAA;AACZ,+GAAA,aAAa,OAAA;AACb,mHAAA,iBAAiB,OAAA;AACjB,2GAAA,SAAS,OAAA;AACT,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AACrB,0HAAA,wBAAwB,OAAA"}
@@ -0,0 +1,62 @@
1
+ export type SpiralResolution = 'TEST' | 'BREAK' | 'DOCS' | 'HELP' | 'ROLLBACK' | 'OTHER';
2
+ export interface SpiralRecord {
3
+ date: string;
4
+ pattern: string;
5
+ component: string;
6
+ duration: number;
7
+ commits: number;
8
+ resolution?: SpiralResolution;
9
+ resolvedAt?: string;
10
+ }
11
+ export interface SpiralAdvice {
12
+ yourHistory: {
13
+ times: number;
14
+ avgDuration: number;
15
+ totalMinutes: number;
16
+ };
17
+ whatWorked: Array<{
18
+ resolution: SpiralResolution;
19
+ times: number;
20
+ avgDuration: number;
21
+ }>;
22
+ suggestion: string;
23
+ }
24
+ /**
25
+ * Get spiral history file path (in user's home directory)
26
+ */
27
+ export declare function getSpiralHistoryPath(): string;
28
+ /**
29
+ * Append a spiral to history
30
+ */
31
+ export declare function appendSpiral(pattern: string, component: string, duration: number, commits: number): void;
32
+ /**
33
+ * Resolve the most recent unresolved spiral
34
+ */
35
+ export declare function resolveSpiral(resolution: SpiralResolution): boolean;
36
+ /**
37
+ * Read all spiral history
38
+ */
39
+ export declare function readSpiralHistory(): SpiralRecord[];
40
+ /**
41
+ * Get personalized advice for a pattern
42
+ */
43
+ export declare function getAdvice(pattern: string, component?: string): SpiralAdvice | null;
44
+ /**
45
+ * Get pattern statistics for insights command
46
+ */
47
+ export declare function getPatternStats(days?: number): Array<{
48
+ pattern: string;
49
+ times: number;
50
+ avgDuration: number;
51
+ bestFix: SpiralResolution | null;
52
+ components: string[];
53
+ }>;
54
+ /**
55
+ * Friendly pattern names for display
56
+ */
57
+ export declare function getPatternDisplayName(pattern: string): string;
58
+ /**
59
+ * Friendly resolution names for display
60
+ */
61
+ export declare function getResolutionDisplayName(resolution: SpiralResolution): string;
62
+ //# sourceMappingURL=spiral-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spiral-history.d.ts","sourceRoot":"","sources":["../../src/storage/spiral-history.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAGzF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OA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B,wBAAwB,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM,CAW7E"}
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getSpiralHistoryPath = getSpiralHistoryPath;
37
+ exports.appendSpiral = appendSpiral;
38
+ exports.resolveSpiral = resolveSpiral;
39
+ exports.readSpiralHistory = readSpiralHistory;
40
+ exports.getAdvice = getAdvice;
41
+ exports.getPatternStats = getPatternStats;
42
+ exports.getPatternDisplayName = getPatternDisplayName;
43
+ exports.getResolutionDisplayName = getResolutionDisplayName;
44
+ /**
45
+ * Spiral History Storage
46
+ *
47
+ * Append-only NDJSON log of spiral events with resolution tracking.
48
+ * Enables personalized coaching based on what worked before.
49
+ */
50
+ const path = __importStar(require("path"));
51
+ const os = __importStar(require("os"));
52
+ const atomic_1 = require("./atomic");
53
+ const HISTORY_DIR = '.vibe-check';
54
+ const HISTORY_FILE = 'spiral-history.ndjson';
55
+ const MAX_RECORDS = 100; // Keep last 100 spirals
56
+ /**
57
+ * Get spiral history file path (in user's home directory)
58
+ */
59
+ function getSpiralHistoryPath() {
60
+ return path.join(os.homedir(), HISTORY_DIR, HISTORY_FILE);
61
+ }
62
+ /**
63
+ * Append a spiral to history
64
+ */
65
+ function appendSpiral(pattern, component, duration, commits) {
66
+ const record = {
67
+ date: new Date().toISOString(),
68
+ pattern,
69
+ component,
70
+ duration,
71
+ commits,
72
+ };
73
+ (0, atomic_1.appendLineSync)(getSpiralHistoryPath(), JSON.stringify(record));
74
+ }
75
+ /**
76
+ * Resolve the most recent unresolved spiral
77
+ */
78
+ function resolveSpiral(resolution) {
79
+ const records = readSpiralHistory();
80
+ // Find most recent unresolved spiral
81
+ for (let i = records.length - 1; i >= 0; i--) {
82
+ if (!records[i].resolution) {
83
+ records[i].resolution = resolution;
84
+ records[i].resolvedAt = new Date().toISOString();
85
+ // Rewrite entire file (since we're modifying existing record)
86
+ rewriteHistory(records);
87
+ return true;
88
+ }
89
+ }
90
+ return false; // No unresolved spiral found
91
+ }
92
+ /**
93
+ * Read all spiral history
94
+ */
95
+ function readSpiralHistory() {
96
+ return (0, atomic_1.readNdjsonSync)(getSpiralHistoryPath());
97
+ }
98
+ /**
99
+ * Get personalized advice for a pattern
100
+ */
101
+ function getAdvice(pattern, component) {
102
+ const records = readSpiralHistory();
103
+ // Filter to matching pattern (and optionally component)
104
+ const matching = records.filter((r) => r.pattern === pattern && (!component || r.component === component));
105
+ if (matching.length === 0) {
106
+ return null;
107
+ }
108
+ // Calculate history stats
109
+ const totalDuration = matching.reduce((sum, r) => sum + r.duration, 0);
110
+ const avgDuration = Math.round(totalDuration / matching.length);
111
+ // Group by resolution
112
+ const resolutionStats = new Map();
113
+ for (const record of matching) {
114
+ if (record.resolution) {
115
+ const stats = resolutionStats.get(record.resolution) || { times: 0, totalDuration: 0 };
116
+ stats.times++;
117
+ stats.totalDuration += record.duration;
118
+ resolutionStats.set(record.resolution, stats);
119
+ }
120
+ }
121
+ // Sort by frequency
122
+ const whatWorked = Array.from(resolutionStats.entries())
123
+ .map(([resolution, stats]) => ({
124
+ resolution,
125
+ times: stats.times,
126
+ avgDuration: Math.round(stats.totalDuration / stats.times),
127
+ }))
128
+ .sort((a, b) => b.times - a.times);
129
+ // Generate suggestion
130
+ const suggestion = generateSuggestion(pattern, whatWorked, matching.length);
131
+ return {
132
+ yourHistory: {
133
+ times: matching.length,
134
+ avgDuration,
135
+ totalMinutes: totalDuration,
136
+ },
137
+ whatWorked,
138
+ suggestion,
139
+ };
140
+ }
141
+ /**
142
+ * Get pattern statistics for insights command
143
+ */
144
+ function getPatternStats(days = 30) {
145
+ const records = readSpiralHistory();
146
+ const cutoff = new Date();
147
+ cutoff.setDate(cutoff.getDate() - days);
148
+ // Filter to recent records
149
+ const recent = records.filter((r) => new Date(r.date) >= cutoff);
150
+ // Group by pattern
151
+ const patternStats = new Map();
152
+ for (const record of recent) {
153
+ const stats = patternStats.get(record.pattern) || {
154
+ times: 0,
155
+ totalDuration: 0,
156
+ resolutions: new Map(),
157
+ components: new Set(),
158
+ };
159
+ stats.times++;
160
+ stats.totalDuration += record.duration;
161
+ stats.components.add(record.component);
162
+ if (record.resolution) {
163
+ stats.resolutions.set(record.resolution, (stats.resolutions.get(record.resolution) || 0) + 1);
164
+ }
165
+ patternStats.set(record.pattern, stats);
166
+ }
167
+ // Convert to array and sort by frequency
168
+ return Array.from(patternStats.entries())
169
+ .map(([pattern, stats]) => {
170
+ // Find most common resolution
171
+ let bestFix = null;
172
+ let maxCount = 0;
173
+ for (const [resolution, count] of stats.resolutions) {
174
+ if (count > maxCount) {
175
+ maxCount = count;
176
+ bestFix = resolution;
177
+ }
178
+ }
179
+ return {
180
+ pattern,
181
+ times: stats.times,
182
+ avgDuration: Math.round(stats.totalDuration / stats.times),
183
+ bestFix,
184
+ components: Array.from(stats.components),
185
+ };
186
+ })
187
+ .sort((a, b) => b.times - a.times);
188
+ }
189
+ /**
190
+ * Rewrite entire history (used when modifying records)
191
+ */
192
+ function rewriteHistory(records) {
193
+ const filePath = getSpiralHistoryPath();
194
+ // Trim to max records
195
+ const trimmed = records.slice(-MAX_RECORDS);
196
+ // Write each record as a line
197
+ const content = trimmed.map((r) => JSON.stringify(r)).join('\n') + '\n';
198
+ // Use atomic write for safety
199
+ (0, atomic_1.atomicWriteSync)(filePath, content);
200
+ }
201
+ /**
202
+ * Generate actionable suggestion based on history
203
+ */
204
+ function generateSuggestion(pattern, whatWorked, totalTimes) {
205
+ // Pattern-specific base advice
206
+ const patternAdvice = {
207
+ SECRETS_AUTH: 'Write a test that validates your auth/token assumptions',
208
+ VOLUME_CONFIG: 'Check mount paths and permissions with a minimal test pod',
209
+ API_MISMATCH: 'Verify API version and schema against the docs',
210
+ SSL_TLS: 'Test certificate chain and FIPS compliance in isolation',
211
+ IMAGE_REGISTRY: 'Verify image exists and credentials are valid with docker pull',
212
+ GITOPS_DRIFT: 'Sync with ArgoCD and check for resource conflicts',
213
+ };
214
+ const baseAdvice = patternAdvice[pattern] || 'Take a step back and validate your assumptions';
215
+ // If we have history of what worked, personalize
216
+ if (whatWorked.length > 0) {
217
+ const best = whatWorked[0];
218
+ const resolutionText = {
219
+ TEST: 'writing a test',
220
+ BREAK: 'taking a break',
221
+ DOCS: 'reading the docs',
222
+ HELP: 'asking for help',
223
+ ROLLBACK: 'rolling back',
224
+ OTHER: 'trying something different',
225
+ };
226
+ if (best.times >= 2) {
227
+ return `Your go-to: ${resolutionText[best.resolution]} (worked ${best.times}x). ${baseAdvice}`;
228
+ }
229
+ }
230
+ // First time or no resolution data
231
+ if (totalTimes === 1) {
232
+ return baseAdvice;
233
+ }
234
+ return `You've hit this ${totalTimes}x. ${baseAdvice}`;
235
+ }
236
+ /**
237
+ * Friendly pattern names for display
238
+ */
239
+ function getPatternDisplayName(pattern) {
240
+ const names = {
241
+ SECRETS_AUTH: 'OAuth/Token Issues',
242
+ VOLUME_CONFIG: 'Volume/Mount Issues',
243
+ API_MISMATCH: 'API Version/Schema Issues',
244
+ SSL_TLS: 'SSL/TLS/Certificate Issues',
245
+ IMAGE_REGISTRY: 'Image/Registry Issues',
246
+ GITOPS_DRIFT: 'GitOps Sync Issues',
247
+ OTHER: 'Other Issues',
248
+ };
249
+ return names[pattern] || pattern;
250
+ }
251
+ /**
252
+ * Friendly resolution names for display
253
+ */
254
+ function getResolutionDisplayName(resolution) {
255
+ const names = {
256
+ TEST: 'Wrote a test',
257
+ BREAK: 'Took a break',
258
+ DOCS: 'Read the docs',
259
+ HELP: 'Asked for help',
260
+ ROLLBACK: 'Rolled back',
261
+ OTHER: 'Other',
262
+ };
263
+ return names[resolution];
264
+ }
265
+ //# sourceMappingURL=spiral-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spiral-history.js","sourceRoot":"","sources":["../../src/storage/spiral-history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,oDAEC;AAKD,oCAeC;AAKD,sCAgBC;AAKD,8CAEC;AAKD,8BAiDC;AAKD,0CAuEC;AAkED,sDAYC;AAKD,4DAWC;AAhUD;;;;;GAKG;AACH,2CAA6B;AAC7B,uCAAyB;AACzB,qCAA2E;AA+B3E,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,wBAAwB;AAEjD;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAC5D,CAAC;AAED;;GA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IAED,mCAAmC;IACnC,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,mBAAmB,UAAU,MAAM,UAAU,EAAE,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,OAAe;IACnD,MAAM,KAAK,GAA2B;QACpC,YAAY,EAAE,oBAAoB;QAClC,aAAa,EAAE,qBAAqB;QACpC,YAAY,EAAE,2BAA2B;QACzC,OAAO,EAAE,4BAA4B;QACrC,cAAc,EAAE,uBAAuB;QACvC,YAAY,EAAE,oBAAoB;QAClC,KAAK,EAAE,cAAc;KACtB,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,UAA4B;IACnE,MAAM,KAAK,GAAqC;QAC9C,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,aAAa;QACvB,KAAK,EAAE,OAAO;KACf,CAAC;IAEF,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC"}
@@ -77,15 +77,8 @@ src/
77
77
  │ ├── xp.ts # XP calculation, levels
78
78
  │ ├── streaks.ts # Streak tracking
79
79
  │ ├── achievements.ts # Achievement definitions
80
- │ ├── challenges.ts # Weekly challenges
81
- │ ├── leaderboards.ts # Personal high scores
82
- │ ├── hall-of-fame.ts # Personal records
83
80
  │ ├── stats.ts # Weekly stats, sparklines
84
- ├── badges.ts # Rank badges
85
- │ ├── share.ts # Shareable profiles
86
- │ ├── profile.ts # Profile persistence
87
- │ ├── pattern-memory.ts # Spiral trigger tracking
88
- │ └── intervention-memory.ts # What breaks spirals
81
+ └── profile.ts # Profile persistence
89
82
 
90
83
  └── output/ # Output formatters
91
84
  ├── index.ts # Format router
@@ -345,8 +338,7 @@ const XP_REWARDS = {
345
338
 
346
339
  ```
347
340
  ~/.vibe-check/ # Global (cross-repo)
348
- ├── profile.json # User profile
349
- └── leaderboards.json # Personal high scores
341
+ └── profile.json # User profile
350
342
 
351
343
  .vibe-check/ # Per-repo (optional)
352
344
  └── profile.json # Repo-specific profile