mulch-cli 0.1.0
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/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +33 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +3 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +30 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/edit.d.ts +3 -0
- package/dist/commands/edit.d.ts.map +1 -0
- package/dist/commands/edit.js +128 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +20 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/onboard.d.ts +8 -0
- package/dist/commands/onboard.d.ts.map +1 -0
- package/dist/commands/onboard.js +144 -0
- package/dist/commands/onboard.js.map +1 -0
- package/dist/commands/prime.d.ts +3 -0
- package/dist/commands/prime.d.ts.map +1 -0
- package/dist/commands/prime.js +107 -0
- package/dist/commands/prime.js.map +1 -0
- package/dist/commands/prune.d.ts +3 -0
- package/dist/commands/prune.d.ts.map +1 -0
- package/dist/commands/prune.js +71 -0
- package/dist/commands/prune.js.map +1 -0
- package/dist/commands/query.d.ts +3 -0
- package/dist/commands/query.d.ts.map +1 -0
- package/dist/commands/query.js +58 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/record.d.ts +3 -0
- package/dist/commands/record.d.ts.map +1 -0
- package/dist/commands/record.js +206 -0
- package/dist/commands/record.js.map +1 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +80 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/setup.d.ts +29 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +497 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +32 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/validate.d.ts +3 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +62 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/config.d.ts +17 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +16 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/record-schema.d.ts +230 -0
- package/dist/schemas/record-schema.d.ts.map +1 -0
- package/dist/schemas/record-schema.js +111 -0
- package/dist/schemas/record-schema.js.map +1 -0
- package/dist/schemas/record.d.ts +49 -0
- package/dist/schemas/record.d.ts.map +1 -0
- package/dist/schemas/record.js +2 -0
- package/dist/schemas/record.js.map +1 -0
- package/dist/utils/config.d.ts +11 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +83 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/expertise.d.ts +14 -0
- package/dist/utils/expertise.d.ts.map +1 -0
- package/dist/utils/expertise.js +107 -0
- package/dist/utils/expertise.js.map +1 -0
- package/dist/utils/format.d.ts +28 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +373 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +50 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface MulchConfig {
|
|
2
|
+
version: string;
|
|
3
|
+
domains: string[];
|
|
4
|
+
governance: {
|
|
5
|
+
max_entries: number;
|
|
6
|
+
warn_entries: number;
|
|
7
|
+
hard_limit: number;
|
|
8
|
+
};
|
|
9
|
+
classification_defaults: {
|
|
10
|
+
shelf_life: {
|
|
11
|
+
tactical: number;
|
|
12
|
+
observational: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_CONFIG: MulchConfig;
|
|
17
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/schemas/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,uBAAuB,EAAE;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,aAAa,EAAE,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,WAc5B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const DEFAULT_CONFIG = {
|
|
2
|
+
version: "1",
|
|
3
|
+
domains: [],
|
|
4
|
+
governance: {
|
|
5
|
+
max_entries: 100,
|
|
6
|
+
warn_entries: 150,
|
|
7
|
+
hard_limit: 200,
|
|
8
|
+
},
|
|
9
|
+
classification_defaults: {
|
|
10
|
+
shelf_life: {
|
|
11
|
+
tactical: 14,
|
|
12
|
+
observational: 30,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/schemas/config.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,EAAE;IACX,UAAU,EAAE;QACV,WAAW,EAAE,GAAG;QAChB,YAAY,EAAE,GAAG;QACjB,UAAU,EAAE,GAAG;KAChB;IACD,uBAAuB,EAAE;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,EAAE;SAClB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { RecordType, Classification, Evidence, ConventionRecord, PatternRecord, FailureRecord, DecisionRecord, ExpertiseRecord, } from "./record.js";
|
|
2
|
+
export type { MulchConfig } from "./config.js";
|
|
3
|
+
export { DEFAULT_CONFIG } from "./config.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
export declare const recordSchema: {
|
|
2
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
3
|
+
readonly title: "Mulch Expertise Record";
|
|
4
|
+
readonly description: "A single expertise record in a Mulch domain file";
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly definitions: {
|
|
7
|
+
readonly classification: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly enum: readonly ["foundational", "tactical", "observational"];
|
|
10
|
+
};
|
|
11
|
+
readonly evidence: {
|
|
12
|
+
readonly type: "object";
|
|
13
|
+
readonly properties: {
|
|
14
|
+
readonly commit: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
};
|
|
17
|
+
readonly date: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
};
|
|
20
|
+
readonly issue: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
};
|
|
23
|
+
readonly file: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
readonly additionalProperties: false;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly oneOf: readonly [{
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
readonly properties: {
|
|
33
|
+
readonly type: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly const: "convention";
|
|
36
|
+
};
|
|
37
|
+
readonly content: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
};
|
|
40
|
+
readonly classification: {
|
|
41
|
+
readonly $ref: "#/definitions/classification";
|
|
42
|
+
};
|
|
43
|
+
readonly recorded_at: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
};
|
|
46
|
+
readonly evidence: {
|
|
47
|
+
readonly $ref: "#/definitions/evidence";
|
|
48
|
+
};
|
|
49
|
+
readonly tags: {
|
|
50
|
+
readonly type: "array";
|
|
51
|
+
readonly items: {
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["type", "content", "classification", "recorded_at"];
|
|
57
|
+
readonly additionalProperties: false;
|
|
58
|
+
}, {
|
|
59
|
+
readonly type: "object";
|
|
60
|
+
readonly properties: {
|
|
61
|
+
readonly type: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly const: "pattern";
|
|
64
|
+
};
|
|
65
|
+
readonly name: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
};
|
|
68
|
+
readonly description: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
};
|
|
71
|
+
readonly files: {
|
|
72
|
+
readonly type: "array";
|
|
73
|
+
readonly items: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly classification: {
|
|
78
|
+
readonly $ref: "#/definitions/classification";
|
|
79
|
+
};
|
|
80
|
+
readonly recorded_at: {
|
|
81
|
+
readonly type: "string";
|
|
82
|
+
};
|
|
83
|
+
readonly evidence: {
|
|
84
|
+
readonly $ref: "#/definitions/evidence";
|
|
85
|
+
};
|
|
86
|
+
readonly tags: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly required: readonly ["type", "name", "description", "classification", "recorded_at"];
|
|
94
|
+
readonly additionalProperties: false;
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly type: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly const: "failure";
|
|
101
|
+
};
|
|
102
|
+
readonly description: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
};
|
|
105
|
+
readonly resolution: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
};
|
|
108
|
+
readonly classification: {
|
|
109
|
+
readonly $ref: "#/definitions/classification";
|
|
110
|
+
};
|
|
111
|
+
readonly recorded_at: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
readonly evidence: {
|
|
115
|
+
readonly $ref: "#/definitions/evidence";
|
|
116
|
+
};
|
|
117
|
+
readonly tags: {
|
|
118
|
+
readonly type: "array";
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly required: readonly ["type", "description", "resolution", "classification", "recorded_at"];
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
}, {
|
|
127
|
+
readonly type: "object";
|
|
128
|
+
readonly properties: {
|
|
129
|
+
readonly type: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly const: "decision";
|
|
132
|
+
};
|
|
133
|
+
readonly title: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
};
|
|
136
|
+
readonly rationale: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
};
|
|
139
|
+
readonly date: {
|
|
140
|
+
readonly type: "string";
|
|
141
|
+
};
|
|
142
|
+
readonly classification: {
|
|
143
|
+
readonly $ref: "#/definitions/classification";
|
|
144
|
+
};
|
|
145
|
+
readonly recorded_at: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
};
|
|
148
|
+
readonly evidence: {
|
|
149
|
+
readonly $ref: "#/definitions/evidence";
|
|
150
|
+
};
|
|
151
|
+
readonly tags: {
|
|
152
|
+
readonly type: "array";
|
|
153
|
+
readonly items: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly required: readonly ["type", "title", "rationale", "classification", "recorded_at"];
|
|
159
|
+
readonly additionalProperties: false;
|
|
160
|
+
}, {
|
|
161
|
+
readonly type: "object";
|
|
162
|
+
readonly properties: {
|
|
163
|
+
readonly type: {
|
|
164
|
+
readonly type: "string";
|
|
165
|
+
readonly const: "reference";
|
|
166
|
+
};
|
|
167
|
+
readonly name: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
};
|
|
170
|
+
readonly description: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
};
|
|
173
|
+
readonly files: {
|
|
174
|
+
readonly type: "array";
|
|
175
|
+
readonly items: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly classification: {
|
|
180
|
+
readonly $ref: "#/definitions/classification";
|
|
181
|
+
};
|
|
182
|
+
readonly recorded_at: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
};
|
|
185
|
+
readonly evidence: {
|
|
186
|
+
readonly $ref: "#/definitions/evidence";
|
|
187
|
+
};
|
|
188
|
+
readonly tags: {
|
|
189
|
+
readonly type: "array";
|
|
190
|
+
readonly items: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly required: readonly ["type", "name", "description", "classification", "recorded_at"];
|
|
196
|
+
readonly additionalProperties: false;
|
|
197
|
+
}, {
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly properties: {
|
|
200
|
+
readonly type: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly const: "guide";
|
|
203
|
+
};
|
|
204
|
+
readonly name: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
readonly description: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
};
|
|
210
|
+
readonly classification: {
|
|
211
|
+
readonly $ref: "#/definitions/classification";
|
|
212
|
+
};
|
|
213
|
+
readonly recorded_at: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
};
|
|
216
|
+
readonly evidence: {
|
|
217
|
+
readonly $ref: "#/definitions/evidence";
|
|
218
|
+
};
|
|
219
|
+
readonly tags: {
|
|
220
|
+
readonly type: "array";
|
|
221
|
+
readonly items: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly required: readonly ["type", "name", "description", "classification", "recorded_at"];
|
|
227
|
+
readonly additionalProperties: false;
|
|
228
|
+
}];
|
|
229
|
+
};
|
|
230
|
+
//# sourceMappingURL=record-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/record-schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Gf,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export const recordSchema = {
|
|
2
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
title: "Mulch Expertise Record",
|
|
4
|
+
description: "A single expertise record in a Mulch domain file",
|
|
5
|
+
type: "object",
|
|
6
|
+
definitions: {
|
|
7
|
+
classification: {
|
|
8
|
+
type: "string",
|
|
9
|
+
enum: ["foundational", "tactical", "observational"],
|
|
10
|
+
},
|
|
11
|
+
evidence: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
commit: { type: "string" },
|
|
15
|
+
date: { type: "string" },
|
|
16
|
+
issue: { type: "string" },
|
|
17
|
+
file: { type: "string" },
|
|
18
|
+
},
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
oneOf: [
|
|
23
|
+
{
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
type: { type: "string", const: "convention" },
|
|
27
|
+
content: { type: "string" },
|
|
28
|
+
classification: { $ref: "#/definitions/classification" },
|
|
29
|
+
recorded_at: { type: "string" },
|
|
30
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
31
|
+
tags: { type: "array", items: { type: "string" } },
|
|
32
|
+
},
|
|
33
|
+
required: ["type", "content", "classification", "recorded_at"],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
type: { type: "string", const: "pattern" },
|
|
40
|
+
name: { type: "string" },
|
|
41
|
+
description: { type: "string" },
|
|
42
|
+
files: { type: "array", items: { type: "string" } },
|
|
43
|
+
classification: { $ref: "#/definitions/classification" },
|
|
44
|
+
recorded_at: { type: "string" },
|
|
45
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
46
|
+
tags: { type: "array", items: { type: "string" } },
|
|
47
|
+
},
|
|
48
|
+
required: ["type", "name", "description", "classification", "recorded_at"],
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
type: { type: "string", const: "failure" },
|
|
55
|
+
description: { type: "string" },
|
|
56
|
+
resolution: { type: "string" },
|
|
57
|
+
classification: { $ref: "#/definitions/classification" },
|
|
58
|
+
recorded_at: { type: "string" },
|
|
59
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
60
|
+
tags: { type: "array", items: { type: "string" } },
|
|
61
|
+
},
|
|
62
|
+
required: ["type", "description", "resolution", "classification", "recorded_at"],
|
|
63
|
+
additionalProperties: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
type: { type: "string", const: "decision" },
|
|
69
|
+
title: { type: "string" },
|
|
70
|
+
rationale: { type: "string" },
|
|
71
|
+
date: { type: "string" },
|
|
72
|
+
classification: { $ref: "#/definitions/classification" },
|
|
73
|
+
recorded_at: { type: "string" },
|
|
74
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
75
|
+
tags: { type: "array", items: { type: "string" } },
|
|
76
|
+
},
|
|
77
|
+
required: ["type", "title", "rationale", "classification", "recorded_at"],
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
type: { type: "string", const: "reference" },
|
|
84
|
+
name: { type: "string" },
|
|
85
|
+
description: { type: "string" },
|
|
86
|
+
files: { type: "array", items: { type: "string" } },
|
|
87
|
+
classification: { $ref: "#/definitions/classification" },
|
|
88
|
+
recorded_at: { type: "string" },
|
|
89
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
90
|
+
tags: { type: "array", items: { type: "string" } },
|
|
91
|
+
},
|
|
92
|
+
required: ["type", "name", "description", "classification", "recorded_at"],
|
|
93
|
+
additionalProperties: false,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
type: { type: "string", const: "guide" },
|
|
99
|
+
name: { type: "string" },
|
|
100
|
+
description: { type: "string" },
|
|
101
|
+
classification: { $ref: "#/definitions/classification" },
|
|
102
|
+
recorded_at: { type: "string" },
|
|
103
|
+
evidence: { $ref: "#/definitions/evidence" },
|
|
104
|
+
tags: { type: "array", items: { type: "string" } },
|
|
105
|
+
},
|
|
106
|
+
required: ["type", "name", "description", "classification", "recorded_at"],
|
|
107
|
+
additionalProperties: false,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=record-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-schema.js","sourceRoot":"","sources":["../../src/schemas/record-schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,eAAe,C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I,EAAE,QAAQ,EAAE;gBACxB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,cAAc,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE;gBACxD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,QAAQ,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;gBAC5C,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;aACnD;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,CAAC;YAC1E,oBAAoB,EAAE,KAAK;SAC5B;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type RecordType = "convention" | "pattern" | "failure" | "decision" | "reference" | "guide";
|
|
2
|
+
export type Classification = "foundational" | "tactical" | "observational";
|
|
3
|
+
export interface Evidence {
|
|
4
|
+
commit?: string;
|
|
5
|
+
date?: string;
|
|
6
|
+
issue?: string;
|
|
7
|
+
file?: string;
|
|
8
|
+
}
|
|
9
|
+
interface BaseRecord {
|
|
10
|
+
classification: Classification;
|
|
11
|
+
recorded_at: string;
|
|
12
|
+
evidence?: Evidence;
|
|
13
|
+
tags?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ConventionRecord extends BaseRecord {
|
|
16
|
+
type: "convention";
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
export interface PatternRecord extends BaseRecord {
|
|
20
|
+
type: "pattern";
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
files?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface FailureRecord extends BaseRecord {
|
|
26
|
+
type: "failure";
|
|
27
|
+
description: string;
|
|
28
|
+
resolution: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DecisionRecord extends BaseRecord {
|
|
31
|
+
type: "decision";
|
|
32
|
+
title: string;
|
|
33
|
+
rationale: string;
|
|
34
|
+
date?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ReferenceRecord extends BaseRecord {
|
|
37
|
+
type: "reference";
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
files?: string[];
|
|
41
|
+
}
|
|
42
|
+
export interface GuideRecord extends BaseRecord {
|
|
43
|
+
type: "guide";
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
}
|
|
47
|
+
export type ExpertiseRecord = ConventionRecord | PatternRecord | FailureRecord | DecisionRecord | ReferenceRecord | GuideRecord;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/schemas/record.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAEnG,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,UAAU,GAAG,eAAe,CAAC;AAE3E,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,cAAc,GACd,eAAe,GACf,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../src/schemas/record.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MulchConfig } from "../schemas/config.js";
|
|
2
|
+
export declare const GITATTRIBUTES_LINE = ".mulch/expertise/*.jsonl merge=union";
|
|
3
|
+
export declare const MULCH_README = "# .mulch/\n\nThis directory is managed by [mulch](https://github.com/jayminwest/mulch) \u2014 a structured expertise layer for coding agents.\n\n## Key Commands\n\n- `mulch init` \u2014 Initialize a .mulch directory\n- `mulch add` \u2014 Add a new domain\n- `mulch record` \u2014 Record an expertise entry\n- `mulch edit` \u2014 Edit an existing record\n- `mulch query` \u2014 Query expertise entries\n- `mulch prime [domain]` \u2014 Output a priming prompt (optionally scoped to one domain)\n- `mulch search` \u2014 Search records across domains\n- `mulch status` \u2014 Show domain statistics\n- `mulch validate` \u2014 Validate all entries against the schema\n- `mulch prune` \u2014 Remove expired entries\n\n## Structure\n\n- `mulch.config.yaml` \u2014 Configuration file\n- `expertise/` \u2014 JSONL files, one per domain\n";
|
|
4
|
+
export declare function getMulchDir(cwd?: string): string;
|
|
5
|
+
export declare function getConfigPath(cwd?: string): string;
|
|
6
|
+
export declare function getExpertiseDir(cwd?: string): string;
|
|
7
|
+
export declare function getExpertisePath(domain: string, cwd?: string): string;
|
|
8
|
+
export declare function readConfig(cwd?: string): Promise<MulchConfig>;
|
|
9
|
+
export declare function writeConfig(config: MulchConfig, cwd?: string): Promise<void>;
|
|
10
|
+
export declare function initMulchDir(cwd?: string): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOxD,eAAO,MAAM,kBAAkB,yCACS,CAAC;AAEzC,eAAO,MAAM,YAAY,y2BAqBxB,CAAC;AAEF,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAE/D;AAED,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAEjE;AAED,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAEnE;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,MAAsB,GAC1B,MAAM,CAER;AAED,wBAAsB,UAAU,CAC9B,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,WAAW,CAAC,CAItB;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,WAAW,EACnB,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import yaml from "js-yaml";
|
|
5
|
+
import { DEFAULT_CONFIG } from "../schemas/config.js";
|
|
6
|
+
const MULCH_DIR = ".mulch";
|
|
7
|
+
const CONFIG_FILE = "mulch.config.yaml";
|
|
8
|
+
const EXPERTISE_DIR = "expertise";
|
|
9
|
+
export const GITATTRIBUTES_LINE = ".mulch/expertise/*.jsonl merge=union";
|
|
10
|
+
export const MULCH_README = `# .mulch/
|
|
11
|
+
|
|
12
|
+
This directory is managed by [mulch](https://github.com/jayminwest/mulch) — a structured expertise layer for coding agents.
|
|
13
|
+
|
|
14
|
+
## Key Commands
|
|
15
|
+
|
|
16
|
+
- \`mulch init\` — Initialize a .mulch directory
|
|
17
|
+
- \`mulch add\` — Add a new domain
|
|
18
|
+
- \`mulch record\` — Record an expertise entry
|
|
19
|
+
- \`mulch edit\` — Edit an existing record
|
|
20
|
+
- \`mulch query\` — Query expertise entries
|
|
21
|
+
- \`mulch prime [domain]\` — Output a priming prompt (optionally scoped to one domain)
|
|
22
|
+
- \`mulch search\` — Search records across domains
|
|
23
|
+
- \`mulch status\` — Show domain statistics
|
|
24
|
+
- \`mulch validate\` — Validate all entries against the schema
|
|
25
|
+
- \`mulch prune\` — Remove expired entries
|
|
26
|
+
|
|
27
|
+
## Structure
|
|
28
|
+
|
|
29
|
+
- \`mulch.config.yaml\` — Configuration file
|
|
30
|
+
- \`expertise/\` — JSONL files, one per domain
|
|
31
|
+
`;
|
|
32
|
+
export function getMulchDir(cwd = process.cwd()) {
|
|
33
|
+
return join(cwd, MULCH_DIR);
|
|
34
|
+
}
|
|
35
|
+
export function getConfigPath(cwd = process.cwd()) {
|
|
36
|
+
return join(getMulchDir(cwd), CONFIG_FILE);
|
|
37
|
+
}
|
|
38
|
+
export function getExpertiseDir(cwd = process.cwd()) {
|
|
39
|
+
return join(getMulchDir(cwd), EXPERTISE_DIR);
|
|
40
|
+
}
|
|
41
|
+
export function getExpertisePath(domain, cwd = process.cwd()) {
|
|
42
|
+
return join(getExpertiseDir(cwd), `${domain}.jsonl`);
|
|
43
|
+
}
|
|
44
|
+
export async function readConfig(cwd = process.cwd()) {
|
|
45
|
+
const configPath = getConfigPath(cwd);
|
|
46
|
+
const content = await readFile(configPath, "utf-8");
|
|
47
|
+
return yaml.load(content);
|
|
48
|
+
}
|
|
49
|
+
export async function writeConfig(config, cwd = process.cwd()) {
|
|
50
|
+
const configPath = getConfigPath(cwd);
|
|
51
|
+
const content = yaml.dump(config, { lineWidth: -1 });
|
|
52
|
+
await writeFile(configPath, content, "utf-8");
|
|
53
|
+
}
|
|
54
|
+
export async function initMulchDir(cwd = process.cwd()) {
|
|
55
|
+
const mulchDir = getMulchDir(cwd);
|
|
56
|
+
const expertiseDir = getExpertiseDir(cwd);
|
|
57
|
+
await mkdir(mulchDir, { recursive: true });
|
|
58
|
+
await mkdir(expertiseDir, { recursive: true });
|
|
59
|
+
// Only write default config if none exists — preserve user customizations
|
|
60
|
+
const configPath = getConfigPath(cwd);
|
|
61
|
+
if (!existsSync(configPath)) {
|
|
62
|
+
await writeConfig({ ...DEFAULT_CONFIG }, cwd);
|
|
63
|
+
}
|
|
64
|
+
// Create or append .gitattributes with merge=union for JSONL files
|
|
65
|
+
const gitattributesPath = join(cwd, ".gitattributes");
|
|
66
|
+
let existing = "";
|
|
67
|
+
try {
|
|
68
|
+
existing = await readFile(gitattributesPath, "utf-8");
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// File doesn't exist yet — will create it
|
|
72
|
+
}
|
|
73
|
+
if (!existing.includes(GITATTRIBUTES_LINE)) {
|
|
74
|
+
const separator = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
75
|
+
await writeFile(gitattributesPath, existing + separator + GITATTRIBUTES_LINE + "\n", "utf-8");
|
|
76
|
+
}
|
|
77
|
+
// Create .mulch/README.md if missing
|
|
78
|
+
const readmePath = join(mulchDir, "README.md");
|
|
79
|
+
if (!existsSync(readmePath)) {
|
|
80
|
+
await writeFile(readmePath, MULCH_README, "utf-8");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,WAAW,GAAG,mBAAmB,CAAC;AACxC,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,kBAAkB,GAC7B,sCAAsC,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IACrD,OAAO,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IACvD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,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+
export declare function appendRecord(filePath: string, record: ExpertiseRecord): Promise<void>;
|
|
4
|
+
export declare function createExpertiseFile(filePath: string): Promise<void>;
|
|
5
|
+
export declare function getFileModTime(filePath: string): Promise<Date | null>;
|
|
6
|
+
export declare function writeExpertiseFile(filePath: string, records: ExpertiseRecord[]): Promise<void>;
|
|
7
|
+
export declare function countRecords(records: ExpertiseRecord[]): number;
|
|
8
|
+
export declare function filterByType(records: ExpertiseRecord[], type: string): ExpertiseRecord[];
|
|
9
|
+
export declare function findDuplicate(existing: ExpertiseRecord[], newRecord: ExpertiseRecord): {
|
|
10
|
+
index: number;
|
|
11
|
+
record: ExpertiseRecord;
|
|
12
|
+
} | null;
|
|
13
|
+
export declare function searchRecords(records: ExpertiseRecord[], query: string): ExpertiseRecord[];
|
|
14
|
+
//# sourceMappingURL=expertise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expertise.d.ts","sourceRoot":"","sources":["../../src/utils/expertise.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,EAAE,CAAC,CAc5B;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAED,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAO3E;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,EAAE,GACzB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAE/D;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,eAAe,EAAE,EAC1B,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAEnB;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,EAAE,EAC3B,SAAS,EAAE,eAAe,GACzB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAyDnD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EAAE,EAC1B,KAAK,EAAE,MAAM,GACZ,eAAe,EAAE,CAiBnB"}
|