cmp-standards 2.6.0 → 2.8.0-alpha
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/README.md +633 -633
- package/dist/cache/EmbeddingCache.d.ts +109 -0
- package/dist/cache/EmbeddingCache.d.ts.map +1 -0
- package/dist/cache/EmbeddingCache.js +239 -0
- package/dist/cache/EmbeddingCache.js.map +1 -0
- package/dist/cache/index.d.ts +6 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +6 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/db/turso-client.js +11 -11
- package/dist/eslint/rules/no-async-useeffect.js +6 -6
- package/dist/events/EventBus.d.ts +87 -0
- package/dist/events/EventBus.d.ts.map +1 -0
- package/dist/events/EventBus.js +200 -0
- package/dist/events/EventBus.js.map +1 -0
- package/dist/events/index.d.ts +7 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +9 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/types.d.ts +989 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +136 -0
- package/dist/events/types.js.map +1 -0
- package/dist/experts/ConsensusEngine.d.ts +57 -0
- package/dist/experts/ConsensusEngine.d.ts.map +1 -0
- package/dist/experts/ConsensusEngine.js +146 -0
- package/dist/experts/ConsensusEngine.js.map +1 -0
- package/dist/experts/ExpertPanelService.d.ts +84 -0
- package/dist/experts/ExpertPanelService.d.ts.map +1 -0
- package/dist/experts/ExpertPanelService.js +204 -0
- package/dist/experts/ExpertPanelService.js.map +1 -0
- package/dist/experts/ExpertRouter.d.ts +68 -0
- package/dist/experts/ExpertRouter.d.ts.map +1 -0
- package/dist/experts/ExpertRouter.js +374 -0
- package/dist/experts/ExpertRouter.js.map +1 -0
- package/dist/experts/VoteCollector.d.ts +58 -0
- package/dist/experts/VoteCollector.d.ts.map +1 -0
- package/dist/experts/VoteCollector.js +146 -0
- package/dist/experts/VoteCollector.js.map +1 -0
- package/dist/experts/index.d.ts +9 -0
- package/dist/experts/index.d.ts.map +1 -0
- package/dist/experts/index.js +13 -0
- package/dist/experts/index.js.map +1 -0
- package/dist/hooks/cloud-pre-tool-use.js +20 -20
- package/dist/hooks/expert-review.d.ts +74 -0
- package/dist/hooks/expert-review.d.ts.map +1 -0
- package/dist/hooks/expert-review.js +220 -0
- package/dist/hooks/expert-review.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/performance/Debouncer.d.ts +91 -0
- package/dist/performance/Debouncer.d.ts.map +1 -0
- package/dist/performance/Debouncer.js +198 -0
- package/dist/performance/Debouncer.js.map +1 -0
- package/dist/performance/MemoryDecay.d.ts +82 -0
- package/dist/performance/MemoryDecay.d.ts.map +1 -0
- package/dist/performance/MemoryDecay.js +153 -0
- package/dist/performance/MemoryDecay.js.map +1 -0
- package/dist/performance/index.d.ts +7 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +9 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/schema/expert-types.d.ts +395 -0
- package/dist/schema/expert-types.d.ts.map +1 -0
- package/dist/schema/expert-types.js +250 -0
- package/dist/schema/expert-types.js.map +1 -0
- package/dist/schema/plans.d.ts +16 -16
- package/dist/schema/tracking.d.ts +90 -90
- package/dist/services/ContextGenerator.js +7 -7
- package/dist/services/ProjectScaffold.js +76 -76
- package/dist/services/context-injector.d.ts +6 -0
- package/dist/services/context-injector.d.ts.map +1 -1
- package/dist/services/context-injector.js +43 -3
- package/dist/services/context-injector.js.map +1 -1
- package/dist/services/memory-router.d.ts +25 -1
- package/dist/services/memory-router.d.ts.map +1 -1
- package/dist/services/memory-router.js +176 -32
- package/dist/services/memory-router.js.map +1 -1
- package/dist/services/pattern-tracker.d.ts +5 -1
- package/dist/services/pattern-tracker.d.ts.map +1 -1
- package/dist/services/pattern-tracker.js +114 -36
- package/dist/services/pattern-tracker.js.map +1 -1
- package/dist/services/semantic-search.js +2 -2
- package/dist/types/index.d.ts +329 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +186 -9
- package/dist/types/index.js.map +1 -1
- package/package.json +105 -100
- package/standards/README.md +50 -50
- package/standards/experts/expert-routing.md +215 -215
- package/standards/general/code-quality.md +86 -86
- package/standards/general/memory-usage.md +205 -205
- package/standards/general/sync-workflow.md +235 -235
- package/standards/general/workflow.md +82 -82
- package/standards/hooks/mandatory-tracking.md +446 -446
- package/standards/infrastructure/cloud-database.md +287 -287
- package/standards/mcp/server-design.md +243 -243
- package/standards/mcp/tool-patterns.md +354 -354
- package/standards/skills/skill-structure.md +286 -286
- package/standards/skills/workflow-design.md +323 -323
- package/standards/tools/tool-design.md +297 -297
- package/templates/agents/architecture-expert.md +61 -61
- package/templates/agents/database-expert.md +62 -62
- package/templates/agents/documentation-expert.md +57 -57
- package/templates/agents/memory-expert.md +88 -88
- package/templates/agents/performance-expert.md +61 -61
- package/templates/agents/security-expert.md +59 -59
- package/templates/agents/ux-expert.md +63 -63
- package/templates/agents/worker.md +75 -75
- package/templates/ai-skills/SKILL_TEMPLATE.md +55 -55
- package/templates/claude-settings.json +72 -72
- package/templates/commands/experts.md +138 -138
- package/templates/hooks/README.md +158 -158
- package/templates/hooks/project.config.json.template +77 -77
- package/templates/hooks/settings.local.json.template +57 -57
- package/templates/memory-config.json +56 -56
- package/templates/memory-config.schema.json +212 -212
- package/templates/settings.json +58 -58
- package/templates/skills/continue.md +205 -205
- package/templates/workflows/business-improvement.md +264 -264
- package/templates/workflows/expert-review.md +153 -153
- package/templates/workflows/internal-app.md +245 -245
- package/templates/workflows/sync-docs.md +187 -187
package/dist/schema/plans.d.ts
CHANGED
|
@@ -33,37 +33,37 @@ export declare const PlanSchema: z.ZodObject<{
|
|
|
33
33
|
lastCheckpointSummary: z.ZodOptional<z.ZodString>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
system: string;
|
|
36
|
-
|
|
36
|
+
title: string;
|
|
37
37
|
type: "plan";
|
|
38
38
|
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
39
|
+
id: string;
|
|
39
40
|
createdAt: string;
|
|
40
41
|
updatedAt: string;
|
|
41
|
-
title: string;
|
|
42
42
|
taskIds: string[];
|
|
43
43
|
keywords: string[];
|
|
44
44
|
originalPrompt: string;
|
|
45
45
|
mergedFromIds: string[];
|
|
46
46
|
createdBy: string;
|
|
47
|
+
domain?: string | undefined;
|
|
47
48
|
description?: string | undefined;
|
|
48
49
|
completedAt?: string | undefined;
|
|
49
|
-
domain?: string | undefined;
|
|
50
50
|
parentPlanId?: string | undefined;
|
|
51
51
|
lastCheckpointId?: string | undefined;
|
|
52
52
|
lastCheckpointSummary?: string | undefined;
|
|
53
53
|
}, {
|
|
54
54
|
system: string;
|
|
55
|
-
|
|
55
|
+
title: string;
|
|
56
56
|
type: "plan";
|
|
57
57
|
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
58
|
+
id: string;
|
|
58
59
|
createdAt: string;
|
|
59
60
|
updatedAt: string;
|
|
60
|
-
title: string;
|
|
61
61
|
originalPrompt: string;
|
|
62
62
|
createdBy: string;
|
|
63
|
+
domain?: string | undefined;
|
|
63
64
|
description?: string | undefined;
|
|
64
|
-
taskIds?: string[] | undefined;
|
|
65
65
|
completedAt?: string | undefined;
|
|
66
|
-
|
|
66
|
+
taskIds?: string[] | undefined;
|
|
67
67
|
keywords?: string[] | undefined;
|
|
68
68
|
parentPlanId?: string | undefined;
|
|
69
69
|
mergedFromIds?: string[] | undefined;
|
|
@@ -98,12 +98,12 @@ export declare const PlanCheckpointSchema: z.ZodObject<{
|
|
|
98
98
|
sessionId: z.ZodString;
|
|
99
99
|
createdAt: z.ZodString;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
|
-
id: string;
|
|
102
101
|
type: "plan_checkpoint";
|
|
103
|
-
createdAt: string;
|
|
104
102
|
sessionId: string;
|
|
105
|
-
summary: string;
|
|
106
103
|
filesModified: string[];
|
|
104
|
+
id: string;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
summary: string;
|
|
107
107
|
agentId: string;
|
|
108
108
|
planId: string;
|
|
109
109
|
checkpointType: "progress" | "decision" | "blocker" | "pivot" | "handoff" | "resume" | "complete";
|
|
@@ -114,10 +114,10 @@ export declare const PlanCheckpointSchema: z.ZodObject<{
|
|
|
114
114
|
}[];
|
|
115
115
|
nextSteps: string[];
|
|
116
116
|
}, {
|
|
117
|
-
id: string;
|
|
118
117
|
type: "plan_checkpoint";
|
|
119
|
-
createdAt: string;
|
|
120
118
|
sessionId: string;
|
|
119
|
+
id: string;
|
|
120
|
+
createdAt: string;
|
|
121
121
|
summary: string;
|
|
122
122
|
agentId: string;
|
|
123
123
|
planId: string;
|
|
@@ -141,19 +141,19 @@ export declare const PlanMatchSchema: z.ZodObject<{
|
|
|
141
141
|
checkpointCount: z.ZodNumber;
|
|
142
142
|
status: z.ZodEnum<["active", "paused", "completed", "abandoned", "merged"]>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
145
144
|
title: string;
|
|
145
|
+
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
146
146
|
planId: string;
|
|
147
147
|
similarity: number;
|
|
148
|
-
matchReason: "
|
|
148
|
+
matchReason: "domain" | "recent" | "keyword" | "semantic";
|
|
149
149
|
lastActivity: string;
|
|
150
150
|
checkpointCount: number;
|
|
151
151
|
}, {
|
|
152
|
-
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
153
152
|
title: string;
|
|
153
|
+
status: "active" | "completed" | "paused" | "abandoned" | "merged";
|
|
154
154
|
planId: string;
|
|
155
155
|
similarity: number;
|
|
156
|
-
matchReason: "
|
|
156
|
+
matchReason: "domain" | "recent" | "keyword" | "semantic";
|
|
157
157
|
lastActivity: string;
|
|
158
158
|
checkpointCount: number;
|
|
159
159
|
}>;
|
|
@@ -17,10 +17,10 @@ export declare const ImprovementSchema: z.ZodObject<{
|
|
|
17
17
|
implementedAt: z.ZodOptional<z.ZodString>;
|
|
18
18
|
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
20
22
|
id: string;
|
|
21
23
|
priority: "critical" | "high" | "medium" | "low";
|
|
22
|
-
description: string;
|
|
23
|
-
title: string;
|
|
24
24
|
area: string;
|
|
25
25
|
detectedAt: string;
|
|
26
26
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -28,10 +28,10 @@ export declare const ImprovementSchema: z.ZodObject<{
|
|
|
28
28
|
implementedAt?: string | undefined;
|
|
29
29
|
implementedInTask?: string | undefined;
|
|
30
30
|
}, {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
31
33
|
id: string;
|
|
32
34
|
priority: "critical" | "high" | "medium" | "low";
|
|
33
|
-
description: string;
|
|
34
|
-
title: string;
|
|
35
35
|
area: string;
|
|
36
36
|
detectedAt: string;
|
|
37
37
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -66,10 +66,10 @@ export declare const TaskContentSchema: z.ZodObject<{
|
|
|
66
66
|
implementedAt: z.ZodOptional<z.ZodString>;
|
|
67
67
|
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
title: string;
|
|
70
|
+
description: string;
|
|
69
71
|
id: string;
|
|
70
72
|
priority: "critical" | "high" | "medium" | "low";
|
|
71
|
-
description: string;
|
|
72
|
-
title: string;
|
|
73
73
|
area: string;
|
|
74
74
|
detectedAt: string;
|
|
75
75
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -77,10 +77,10 @@ export declare const TaskContentSchema: z.ZodObject<{
|
|
|
77
77
|
implementedAt?: string | undefined;
|
|
78
78
|
implementedInTask?: string | undefined;
|
|
79
79
|
}, {
|
|
80
|
+
title: string;
|
|
81
|
+
description: string;
|
|
80
82
|
id: string;
|
|
81
83
|
priority: "critical" | "high" | "medium" | "low";
|
|
82
|
-
description: string;
|
|
83
|
-
title: string;
|
|
84
84
|
area: string;
|
|
85
85
|
detectedAt: string;
|
|
86
86
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -91,15 +91,16 @@ export declare const TaskContentSchema: z.ZodObject<{
|
|
|
91
91
|
lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
92
92
|
}, "strip", z.ZodTypeAny, {
|
|
93
93
|
title: string;
|
|
94
|
+
domain: string;
|
|
95
|
+
sessionId: string;
|
|
94
96
|
files: string[];
|
|
95
97
|
startedAt: string;
|
|
96
|
-
|
|
97
|
-
plan: string[];
|
|
98
|
+
userRequest: string;
|
|
98
99
|
improvements: {
|
|
100
|
+
title: string;
|
|
101
|
+
description: string;
|
|
99
102
|
id: string;
|
|
100
103
|
priority: "critical" | "high" | "medium" | "low";
|
|
101
|
-
description: string;
|
|
102
|
-
title: string;
|
|
103
104
|
area: string;
|
|
104
105
|
detectedAt: string;
|
|
105
106
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -107,34 +108,32 @@ export declare const TaskContentSchema: z.ZodObject<{
|
|
|
107
108
|
implementedAt?: string | undefined;
|
|
108
109
|
implementedInTask?: string | undefined;
|
|
109
110
|
}[];
|
|
110
|
-
|
|
111
|
-
userRequest: string;
|
|
111
|
+
plan: string[];
|
|
112
112
|
currentStep: number;
|
|
113
113
|
lastActivityAt: string;
|
|
114
114
|
lessons: string[];
|
|
115
115
|
description?: string | undefined;
|
|
116
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
117
116
|
completedAt?: string | undefined;
|
|
117
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
118
118
|
agentId?: string | undefined;
|
|
119
119
|
resultNotes?: string | undefined;
|
|
120
120
|
}, {
|
|
121
121
|
title: string;
|
|
122
|
-
startedAt: string;
|
|
123
|
-
sessionId: string;
|
|
124
|
-
plan: string[];
|
|
125
122
|
domain: string;
|
|
123
|
+
sessionId: string;
|
|
124
|
+
startedAt: string;
|
|
126
125
|
userRequest: string;
|
|
126
|
+
plan: string[];
|
|
127
127
|
currentStep: number;
|
|
128
128
|
lastActivityAt: string;
|
|
129
129
|
description?: string | undefined;
|
|
130
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
131
130
|
files?: string[] | undefined;
|
|
132
131
|
completedAt?: string | undefined;
|
|
133
132
|
improvements?: {
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
134
135
|
id: string;
|
|
135
136
|
priority: "critical" | "high" | "medium" | "low";
|
|
136
|
-
description: string;
|
|
137
|
-
title: string;
|
|
138
137
|
area: string;
|
|
139
138
|
detectedAt: string;
|
|
140
139
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -142,6 +141,7 @@ export declare const TaskContentSchema: z.ZodObject<{
|
|
|
142
141
|
implementedAt?: string | undefined;
|
|
143
142
|
implementedInTask?: string | undefined;
|
|
144
143
|
}[] | undefined;
|
|
144
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
145
145
|
agentId?: string | undefined;
|
|
146
146
|
resultNotes?: string | undefined;
|
|
147
147
|
lessons?: string[] | undefined;
|
|
@@ -178,10 +178,10 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
178
178
|
implementedAt: z.ZodOptional<z.ZodString>;
|
|
179
179
|
implementedInTask: z.ZodOptional<z.ZodString>;
|
|
180
180
|
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
title: string;
|
|
182
|
+
description: string;
|
|
181
183
|
id: string;
|
|
182
184
|
priority: "critical" | "high" | "medium" | "low";
|
|
183
|
-
description: string;
|
|
184
|
-
title: string;
|
|
185
185
|
area: string;
|
|
186
186
|
detectedAt: string;
|
|
187
187
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -189,10 +189,10 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
189
189
|
implementedAt?: string | undefined;
|
|
190
190
|
implementedInTask?: string | undefined;
|
|
191
191
|
}, {
|
|
192
|
+
title: string;
|
|
193
|
+
description: string;
|
|
192
194
|
id: string;
|
|
193
195
|
priority: "critical" | "high" | "medium" | "low";
|
|
194
|
-
description: string;
|
|
195
|
-
title: string;
|
|
196
196
|
area: string;
|
|
197
197
|
detectedAt: string;
|
|
198
198
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -203,15 +203,16 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
203
203
|
lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
204
204
|
}, "strip", z.ZodTypeAny, {
|
|
205
205
|
title: string;
|
|
206
|
+
domain: string;
|
|
207
|
+
sessionId: string;
|
|
206
208
|
files: string[];
|
|
207
209
|
startedAt: string;
|
|
208
|
-
|
|
209
|
-
plan: string[];
|
|
210
|
+
userRequest: string;
|
|
210
211
|
improvements: {
|
|
212
|
+
title: string;
|
|
213
|
+
description: string;
|
|
211
214
|
id: string;
|
|
212
215
|
priority: "critical" | "high" | "medium" | "low";
|
|
213
|
-
description: string;
|
|
214
|
-
title: string;
|
|
215
216
|
area: string;
|
|
216
217
|
detectedAt: string;
|
|
217
218
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -219,34 +220,32 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
219
220
|
implementedAt?: string | undefined;
|
|
220
221
|
implementedInTask?: string | undefined;
|
|
221
222
|
}[];
|
|
222
|
-
|
|
223
|
-
userRequest: string;
|
|
223
|
+
plan: string[];
|
|
224
224
|
currentStep: number;
|
|
225
225
|
lastActivityAt: string;
|
|
226
226
|
lessons: string[];
|
|
227
227
|
description?: string | undefined;
|
|
228
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
229
228
|
completedAt?: string | undefined;
|
|
229
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
230
230
|
agentId?: string | undefined;
|
|
231
231
|
resultNotes?: string | undefined;
|
|
232
232
|
}, {
|
|
233
233
|
title: string;
|
|
234
|
-
startedAt: string;
|
|
235
|
-
sessionId: string;
|
|
236
|
-
plan: string[];
|
|
237
234
|
domain: string;
|
|
235
|
+
sessionId: string;
|
|
236
|
+
startedAt: string;
|
|
238
237
|
userRequest: string;
|
|
238
|
+
plan: string[];
|
|
239
239
|
currentStep: number;
|
|
240
240
|
lastActivityAt: string;
|
|
241
241
|
description?: string | undefined;
|
|
242
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
243
242
|
files?: string[] | undefined;
|
|
244
243
|
completedAt?: string | undefined;
|
|
245
244
|
improvements?: {
|
|
245
|
+
title: string;
|
|
246
|
+
description: string;
|
|
246
247
|
id: string;
|
|
247
248
|
priority: "critical" | "high" | "medium" | "low";
|
|
248
|
-
description: string;
|
|
249
|
-
title: string;
|
|
250
249
|
area: string;
|
|
251
250
|
detectedAt: string;
|
|
252
251
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -254,6 +253,7 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
254
253
|
implementedAt?: string | undefined;
|
|
255
254
|
implementedInTask?: string | undefined;
|
|
256
255
|
}[] | undefined;
|
|
256
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
257
257
|
agentId?: string | undefined;
|
|
258
258
|
resultNotes?: string | undefined;
|
|
259
259
|
lessons?: string[] | undefined;
|
|
@@ -262,20 +262,23 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
262
262
|
updatedAt: z.ZodString;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
264
|
system: string;
|
|
265
|
-
id: string;
|
|
266
265
|
type: "task";
|
|
267
266
|
status: "in_progress" | "blocked" | "pending" | "completed";
|
|
267
|
+
id: string;
|
|
268
|
+
createdAt: string;
|
|
269
|
+
updatedAt: string;
|
|
268
270
|
content: {
|
|
269
271
|
title: string;
|
|
272
|
+
domain: string;
|
|
273
|
+
sessionId: string;
|
|
270
274
|
files: string[];
|
|
271
275
|
startedAt: string;
|
|
272
|
-
|
|
273
|
-
plan: string[];
|
|
276
|
+
userRequest: string;
|
|
274
277
|
improvements: {
|
|
278
|
+
title: string;
|
|
279
|
+
description: string;
|
|
275
280
|
id: string;
|
|
276
281
|
priority: "critical" | "high" | "medium" | "low";
|
|
277
|
-
description: string;
|
|
278
|
-
title: string;
|
|
279
282
|
area: string;
|
|
280
283
|
detectedAt: string;
|
|
281
284
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -283,42 +286,40 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
283
286
|
implementedAt?: string | undefined;
|
|
284
287
|
implementedInTask?: string | undefined;
|
|
285
288
|
}[];
|
|
286
|
-
|
|
287
|
-
userRequest: string;
|
|
289
|
+
plan: string[];
|
|
288
290
|
currentStep: number;
|
|
289
291
|
lastActivityAt: string;
|
|
290
292
|
lessons: string[];
|
|
291
293
|
description?: string | undefined;
|
|
292
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
293
294
|
completedAt?: string | undefined;
|
|
295
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
294
296
|
agentId?: string | undefined;
|
|
295
297
|
resultNotes?: string | undefined;
|
|
296
298
|
};
|
|
297
|
-
createdAt: string;
|
|
298
|
-
updatedAt: string;
|
|
299
299
|
}, {
|
|
300
300
|
system: string;
|
|
301
|
-
id: string;
|
|
302
301
|
type: "task";
|
|
303
302
|
status: "in_progress" | "blocked" | "pending" | "completed";
|
|
303
|
+
id: string;
|
|
304
|
+
createdAt: string;
|
|
305
|
+
updatedAt: string;
|
|
304
306
|
content: {
|
|
305
307
|
title: string;
|
|
306
|
-
startedAt: string;
|
|
307
|
-
sessionId: string;
|
|
308
|
-
plan: string[];
|
|
309
308
|
domain: string;
|
|
309
|
+
sessionId: string;
|
|
310
|
+
startedAt: string;
|
|
310
311
|
userRequest: string;
|
|
312
|
+
plan: string[];
|
|
311
313
|
currentStep: number;
|
|
312
314
|
lastActivityAt: string;
|
|
313
315
|
description?: string | undefined;
|
|
314
|
-
result?: "blocked" | "success" | "partial" | undefined;
|
|
315
316
|
files?: string[] | undefined;
|
|
316
317
|
completedAt?: string | undefined;
|
|
317
318
|
improvements?: {
|
|
319
|
+
title: string;
|
|
320
|
+
description: string;
|
|
318
321
|
id: string;
|
|
319
322
|
priority: "critical" | "high" | "medium" | "low";
|
|
320
|
-
description: string;
|
|
321
|
-
title: string;
|
|
322
323
|
area: string;
|
|
323
324
|
detectedAt: string;
|
|
324
325
|
effort?: "medium" | "small" | "large" | "trivial" | undefined;
|
|
@@ -326,12 +327,11 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
326
327
|
implementedAt?: string | undefined;
|
|
327
328
|
implementedInTask?: string | undefined;
|
|
328
329
|
}[] | undefined;
|
|
330
|
+
result?: "blocked" | "success" | "partial" | undefined;
|
|
329
331
|
agentId?: string | undefined;
|
|
330
332
|
resultNotes?: string | undefined;
|
|
331
333
|
lessons?: string[] | undefined;
|
|
332
334
|
};
|
|
333
|
-
createdAt: string;
|
|
334
|
-
updatedAt: string;
|
|
335
335
|
}>;
|
|
336
336
|
export type Task = z.infer<typeof TaskSchema>;
|
|
337
337
|
export type TaskContent = z.infer<typeof TaskContentSchema>;
|
|
@@ -353,9 +353,9 @@ export declare const ImprovementContentSchema: z.ZodObject<{
|
|
|
353
353
|
rejectedAt: z.ZodOptional<z.ZodString>;
|
|
354
354
|
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
355
355
|
}, "strip", z.ZodTypeAny, {
|
|
356
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
357
|
-
description: string;
|
|
358
356
|
title: string;
|
|
357
|
+
description: string;
|
|
358
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
359
359
|
area: string;
|
|
360
360
|
detectedAt: string;
|
|
361
361
|
detectedBy: string;
|
|
@@ -367,9 +367,9 @@ export declare const ImprovementContentSchema: z.ZodObject<{
|
|
|
367
367
|
rejectedAt?: string | undefined;
|
|
368
368
|
rejectedReason?: string | undefined;
|
|
369
369
|
}, {
|
|
370
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
371
|
-
description: string;
|
|
372
370
|
title: string;
|
|
371
|
+
description: string;
|
|
372
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
373
373
|
area: string;
|
|
374
374
|
detectedAt: string;
|
|
375
375
|
detectedBy: string;
|
|
@@ -401,9 +401,9 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
|
401
401
|
rejectedAt: z.ZodOptional<z.ZodString>;
|
|
402
402
|
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
403
403
|
}, "strip", z.ZodTypeAny, {
|
|
404
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
405
|
-
description: string;
|
|
406
404
|
title: string;
|
|
405
|
+
description: string;
|
|
406
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
407
407
|
area: string;
|
|
408
408
|
detectedAt: string;
|
|
409
409
|
detectedBy: string;
|
|
@@ -415,9 +415,9 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
|
415
415
|
rejectedAt?: string | undefined;
|
|
416
416
|
rejectedReason?: string | undefined;
|
|
417
417
|
}, {
|
|
418
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
419
|
-
description: string;
|
|
420
418
|
title: string;
|
|
419
|
+
description: string;
|
|
420
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
421
421
|
area: string;
|
|
422
422
|
detectedAt: string;
|
|
423
423
|
detectedBy: string;
|
|
@@ -433,13 +433,15 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
|
433
433
|
updatedAt: z.ZodString;
|
|
434
434
|
}, "strip", z.ZodTypeAny, {
|
|
435
435
|
system: string;
|
|
436
|
-
id: string;
|
|
437
436
|
type: "improvement";
|
|
438
437
|
status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
|
|
438
|
+
id: string;
|
|
439
|
+
createdAt: string;
|
|
440
|
+
updatedAt: string;
|
|
439
441
|
content: {
|
|
440
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
441
|
-
description: string;
|
|
442
442
|
title: string;
|
|
443
|
+
description: string;
|
|
444
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
443
445
|
area: string;
|
|
444
446
|
detectedAt: string;
|
|
445
447
|
detectedBy: string;
|
|
@@ -451,17 +453,17 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
|
451
453
|
rejectedAt?: string | undefined;
|
|
452
454
|
rejectedReason?: string | undefined;
|
|
453
455
|
};
|
|
454
|
-
createdAt: string;
|
|
455
|
-
updatedAt: string;
|
|
456
456
|
}, {
|
|
457
457
|
system: string;
|
|
458
|
-
id: string;
|
|
459
458
|
type: "improvement";
|
|
460
459
|
status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
|
|
460
|
+
id: string;
|
|
461
|
+
createdAt: string;
|
|
462
|
+
updatedAt: string;
|
|
461
463
|
content: {
|
|
462
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
463
|
-
description: string;
|
|
464
464
|
title: string;
|
|
465
|
+
description: string;
|
|
466
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
465
467
|
area: string;
|
|
466
468
|
detectedAt: string;
|
|
467
469
|
detectedBy: string;
|
|
@@ -473,8 +475,6 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
|
|
|
473
475
|
rejectedAt?: string | undefined;
|
|
474
476
|
rejectedReason?: string | undefined;
|
|
475
477
|
};
|
|
476
|
-
createdAt: string;
|
|
477
|
-
updatedAt: string;
|
|
478
478
|
}>;
|
|
479
479
|
export type ImprovementRecord = z.infer<typeof ImprovementRecordSchema>;
|
|
480
480
|
export type ImprovementContent = z.infer<typeof ImprovementContentSchema>;
|
|
@@ -495,8 +495,8 @@ export declare const SessionContentSchema: z.ZodObject<{
|
|
|
495
495
|
improvementsDetected: z.ZodDefault<z.ZodNumber>;
|
|
496
496
|
}, "strip", z.ZodTypeAny, {
|
|
497
497
|
system: string;
|
|
498
|
-
startedAt: string;
|
|
499
498
|
sessionId: string;
|
|
499
|
+
startedAt: string;
|
|
500
500
|
toolCalls: number;
|
|
501
501
|
lastActivityAt: string;
|
|
502
502
|
tasksStarted: number;
|
|
@@ -508,11 +508,11 @@ export declare const SessionContentSchema: z.ZodObject<{
|
|
|
508
508
|
ide?: string | undefined;
|
|
509
509
|
}, {
|
|
510
510
|
system: string;
|
|
511
|
-
startedAt: string;
|
|
512
511
|
sessionId: string;
|
|
512
|
+
startedAt: string;
|
|
513
513
|
lastActivityAt: string;
|
|
514
|
-
endedAt?: string | undefined;
|
|
515
514
|
toolCalls?: number | undefined;
|
|
515
|
+
endedAt?: string | undefined;
|
|
516
516
|
userId?: string | undefined;
|
|
517
517
|
projectPath?: string | undefined;
|
|
518
518
|
ide?: string | undefined;
|
|
@@ -540,8 +540,8 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
540
540
|
improvementsDetected: z.ZodDefault<z.ZodNumber>;
|
|
541
541
|
}, "strip", z.ZodTypeAny, {
|
|
542
542
|
system: string;
|
|
543
|
-
startedAt: string;
|
|
544
543
|
sessionId: string;
|
|
544
|
+
startedAt: string;
|
|
545
545
|
toolCalls: number;
|
|
546
546
|
lastActivityAt: string;
|
|
547
547
|
tasksStarted: number;
|
|
@@ -553,11 +553,11 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
553
553
|
ide?: string | undefined;
|
|
554
554
|
}, {
|
|
555
555
|
system: string;
|
|
556
|
-
startedAt: string;
|
|
557
556
|
sessionId: string;
|
|
557
|
+
startedAt: string;
|
|
558
558
|
lastActivityAt: string;
|
|
559
|
-
endedAt?: string | undefined;
|
|
560
559
|
toolCalls?: number | undefined;
|
|
560
|
+
endedAt?: string | undefined;
|
|
561
561
|
userId?: string | undefined;
|
|
562
562
|
projectPath?: string | undefined;
|
|
563
563
|
ide?: string | undefined;
|
|
@@ -569,13 +569,15 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
569
569
|
updatedAt: z.ZodString;
|
|
570
570
|
}, "strip", z.ZodTypeAny, {
|
|
571
571
|
system: string;
|
|
572
|
-
id: string;
|
|
573
572
|
type: "session";
|
|
574
573
|
status: "active" | "ended";
|
|
574
|
+
id: string;
|
|
575
|
+
createdAt: string;
|
|
576
|
+
updatedAt: string;
|
|
575
577
|
content: {
|
|
576
578
|
system: string;
|
|
577
|
-
startedAt: string;
|
|
578
579
|
sessionId: string;
|
|
580
|
+
startedAt: string;
|
|
579
581
|
toolCalls: number;
|
|
580
582
|
lastActivityAt: string;
|
|
581
583
|
tasksStarted: number;
|
|
@@ -586,20 +588,20 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
586
588
|
projectPath?: string | undefined;
|
|
587
589
|
ide?: string | undefined;
|
|
588
590
|
};
|
|
589
|
-
createdAt: string;
|
|
590
|
-
updatedAt: string;
|
|
591
591
|
}, {
|
|
592
592
|
system: string;
|
|
593
|
-
id: string;
|
|
594
593
|
type: "session";
|
|
595
594
|
status: "active" | "ended";
|
|
595
|
+
id: string;
|
|
596
|
+
createdAt: string;
|
|
597
|
+
updatedAt: string;
|
|
596
598
|
content: {
|
|
597
599
|
system: string;
|
|
598
|
-
startedAt: string;
|
|
599
600
|
sessionId: string;
|
|
601
|
+
startedAt: string;
|
|
600
602
|
lastActivityAt: string;
|
|
601
|
-
endedAt?: string | undefined;
|
|
602
603
|
toolCalls?: number | undefined;
|
|
604
|
+
endedAt?: string | undefined;
|
|
603
605
|
userId?: string | undefined;
|
|
604
606
|
projectPath?: string | undefined;
|
|
605
607
|
ide?: string | undefined;
|
|
@@ -607,8 +609,6 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
607
609
|
tasksCompleted?: number | undefined;
|
|
608
610
|
improvementsDetected?: number | undefined;
|
|
609
611
|
};
|
|
610
|
-
createdAt: string;
|
|
611
|
-
updatedAt: string;
|
|
612
612
|
}>;
|
|
613
613
|
export type Session = z.infer<typeof SessionSchema>;
|
|
614
614
|
export type SessionContent = z.infer<typeof SessionContentSchema>;
|
|
@@ -42,13 +42,13 @@ export class ContextGenerator {
|
|
|
42
42
|
if (content.includes(splitMarker)) {
|
|
43
43
|
content = content.split(splitMarker)[0];
|
|
44
44
|
}
|
|
45
|
-
const freshContext = `
|
|
46
|
-
${splitMarker}
|
|
47
|
-
### Active Tasks
|
|
48
|
-
${tasksMd || "- No active tasks."}
|
|
49
|
-
|
|
50
|
-
### Recent Memories
|
|
51
|
-
${memoriesMd || "- No recent memories."}
|
|
45
|
+
const freshContext = `
|
|
46
|
+
${splitMarker}
|
|
47
|
+
### Active Tasks
|
|
48
|
+
${tasksMd || "- No active tasks."}
|
|
49
|
+
|
|
50
|
+
### Recent Memories
|
|
51
|
+
${memoriesMd || "- No recent memories."}
|
|
52
52
|
`;
|
|
53
53
|
await fs.writeFile(filePath, content + freshContext, "utf-8");
|
|
54
54
|
return true;
|