@a-company/paradigm 3.24.1 → 3.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accept-orchestration-AAYFKS74.js → accept-orchestration-6EM5EHXA.js} +4 -4
- package/dist/{auto-B22FVSQI.js → auto-24ICVUH4.js} +1 -1
- package/dist/{chunk-EZ6XW6FB.js → chunk-7IJ5JVKT.js} +1 -1
- package/dist/{chunk-6EQRU7WC.js → chunk-J26YQVAK.js} +1 -1
- package/dist/{chunk-VHSTF72C.js → chunk-N6RNYCZD.js} +1 -1
- package/dist/{chunk-XKI55IFI.js → chunk-SCC77UUP.js} +82 -62
- package/dist/chunk-UPLDI7CN.js +1334 -0
- package/dist/{chunk-GC6X3YM7.js → chunk-ZOH24ZPF.js} +5 -5
- package/dist/{diff-QC7PWIPF.js → diff-AH7L4PRQ.js} +4 -4
- package/dist/discipline-5F5OVTXB.js +24 -0
- package/dist/{doctor-RVODPMHJ.js → doctor-INBOLZC7.js} +1 -1
- package/dist/index.js +53 -25
- package/dist/{list-CAL7KS7B.js → list-QTFWN35D.js} +3 -2
- package/dist/mcp.js +4 -3
- package/dist/{orchestrate-NNNWNELP.js → orchestrate-HMSQ2CED.js} +4 -4
- package/dist/{providers-NKGY36QF.js → providers-YW3FG6DA.js} +1 -1
- package/dist/{reindex-CMZARW5K.js → reindex-YG3KIXAK.js} +1 -1
- package/dist/{shift-R6TQ6MBP.js → shift-DRF5M3G6.js} +23 -17
- package/dist/{spawn-52PASJJL.js → spawn-DIY7T4QW.js} +2 -2
- package/dist/{team-JZHIH7H5.js → team-YOGT2Q2X.js} +5 -5
- package/dist/{timeline-B6TMGWRU.js → timeline-RKXNRMKF.js} +4 -3
- package/dist/university-content/courses/.purpose +4 -4
- package/dist/university-content/courses/para-101.json +1 -1
- package/dist/university-content/courses/para-201.json +18 -2
- package/dist/university-content/plsat/.purpose +18 -0
- package/dist/university-content/plsat/v3.0.json +105 -0
- package/package.json +1 -1
- package/templates/paradigm/config.yaml +1 -0
- package/dist/chunk-CHSHON3O.js +0 -669
- package/dist/{chunk-7WTOOH23.js → chunk-5SXMV4SP.js} +0 -0
- package/dist/{chunk-4UC6AQOC.js → chunk-C5ZE6WEX.js} +0 -0
- package/dist/{flow-KZKMMXJC.js → flow-UFMPVOEM.js} +1 -1
package/dist/chunk-CHSHON3O.js
DELETED
|
@@ -1,669 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/core/discipline.ts
|
|
4
|
-
import * as fs from "fs";
|
|
5
|
-
import * as path from "path";
|
|
6
|
-
function detectDiscipline(rootDir) {
|
|
7
|
-
const pkg = readPackageJson(rootDir);
|
|
8
|
-
const pkgDeps = pkg?.dependencies ?? {};
|
|
9
|
-
const pkgDevDeps = pkg?.devDependencies ?? {};
|
|
10
|
-
const deps = { ...pkgDeps, ...pkgDevDeps };
|
|
11
|
-
const hasDep = (name) => name in deps;
|
|
12
|
-
if (pkg?.workspaces || fs.existsSync(path.join(rootDir, "pnpm-workspace.yaml")) || fs.existsSync(path.join(rootDir, "lerna.json"))) {
|
|
13
|
-
return "monorepo";
|
|
14
|
-
}
|
|
15
|
-
if (pkg) {
|
|
16
|
-
if (pkg.bin && !hasUICode(rootDir, deps)) {
|
|
17
|
-
return "cli";
|
|
18
|
-
}
|
|
19
|
-
if ((pkg.exports || pkg.main) && !pkg.bin && !hasUIDeps(deps) && !hasServerDeps(deps)) {
|
|
20
|
-
return "library";
|
|
21
|
-
}
|
|
22
|
-
if (hasDep("next") || hasDep("nuxt") || hasDep("@sveltejs/kit") || hasDep("remix") || hasDep("@remix-run/node") || hasDep("astro")) {
|
|
23
|
-
return "fullstack";
|
|
24
|
-
}
|
|
25
|
-
if (hasUIDeps(deps) && !hasServerDeps(deps)) {
|
|
26
|
-
return "web";
|
|
27
|
-
}
|
|
28
|
-
if (hasServerDeps(deps) && !hasUIDeps(deps)) {
|
|
29
|
-
return "api";
|
|
30
|
-
}
|
|
31
|
-
if (hasUIDeps(deps) && hasServerDeps(deps)) {
|
|
32
|
-
return "fullstack";
|
|
33
|
-
}
|
|
34
|
-
if (hasDep("react-native") || hasDep("expo")) {
|
|
35
|
-
return "mobile";
|
|
36
|
-
}
|
|
37
|
-
if (hasDep("@tensorflow/tfjs") || hasDep("onnxruntime-node")) {
|
|
38
|
-
return "ml";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const pyProject = readFileIfExists(rootDir, "pyproject.toml");
|
|
42
|
-
const requirements = readFileIfExists(rootDir, "requirements.txt");
|
|
43
|
-
const pyDeps = (pyProject || "") + (requirements || "");
|
|
44
|
-
if (pyDeps) {
|
|
45
|
-
if (/torch|tensorflow|scikit-learn|transformers|jax/i.test(pyDeps)) {
|
|
46
|
-
return "ml";
|
|
47
|
-
}
|
|
48
|
-
if (/dbt|airflow|prefect|dagster|spark|pandas(?!.*flask)(?!.*django)/i.test(pyDeps)) {
|
|
49
|
-
return "data";
|
|
50
|
-
}
|
|
51
|
-
if (fs.existsSync(path.join(rootDir, "manage.py")) && fs.existsSync(path.join(rootDir, "templates"))) {
|
|
52
|
-
return "fullstack";
|
|
53
|
-
}
|
|
54
|
-
if (/fastapi|flask|django-rest-framework|djangorestframework|starlette/i.test(pyDeps)) {
|
|
55
|
-
return "api";
|
|
56
|
-
}
|
|
57
|
-
if (fs.existsSync(path.join(rootDir, "manage.py"))) {
|
|
58
|
-
return "fullstack";
|
|
59
|
-
}
|
|
60
|
-
if (/click|typer|argparse|fire/i.test(pyDeps) && !fs.existsSync(path.join(rootDir, "manage.py"))) {
|
|
61
|
-
return "cli";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (fs.existsSync(path.join(rootDir, "go.mod"))) {
|
|
65
|
-
if (fs.existsSync(path.join(rootDir, "cmd"))) {
|
|
66
|
-
return "cli";
|
|
67
|
-
}
|
|
68
|
-
const goMod = readFileIfExists(rootDir, "go.mod") || "";
|
|
69
|
-
if (/gin|echo|fiber|chi|gorilla\/mux/i.test(goMod)) {
|
|
70
|
-
return "api";
|
|
71
|
-
}
|
|
72
|
-
return "backend";
|
|
73
|
-
}
|
|
74
|
-
const cargoToml = readFileIfExists(rootDir, "Cargo.toml");
|
|
75
|
-
if (cargoToml) {
|
|
76
|
-
if (/embedded-hal|no_std|cortex-m/i.test(cargoToml)) {
|
|
77
|
-
return "embedded";
|
|
78
|
-
}
|
|
79
|
-
if (/clap|structopt/i.test(cargoToml)) {
|
|
80
|
-
return "cli";
|
|
81
|
-
}
|
|
82
|
-
if (/actix-web|axum|rocket|warp/i.test(cargoToml)) {
|
|
83
|
-
return "api";
|
|
84
|
-
}
|
|
85
|
-
if (/bevy|ggez|macroquad/i.test(cargoToml)) {
|
|
86
|
-
return "game";
|
|
87
|
-
}
|
|
88
|
-
if (/tauri/i.test(cargoToml)) {
|
|
89
|
-
return "fullstack";
|
|
90
|
-
}
|
|
91
|
-
return "backend";
|
|
92
|
-
}
|
|
93
|
-
if (fs.existsSync(path.join(rootDir, "pubspec.yaml"))) {
|
|
94
|
-
return "mobile";
|
|
95
|
-
}
|
|
96
|
-
if (fs.existsSync(path.join(rootDir, "ios")) && fs.existsSync(path.join(rootDir, "android"))) {
|
|
97
|
-
return "mobile";
|
|
98
|
-
}
|
|
99
|
-
if (fs.existsSync(path.join(rootDir, "project.godot")) || fs.existsSync(path.join(rootDir, "ProjectSettings")) || // Unity
|
|
100
|
-
hasFilesMatching(rootDir, ".pretend")) {
|
|
101
|
-
return "game";
|
|
102
|
-
}
|
|
103
|
-
if (fs.existsSync(path.join(rootDir, "terraform")) || fs.existsSync(path.join(rootDir, "main.tf")) || fs.existsSync(path.join(rootDir, "pulumi")) || fs.existsSync(path.join(rootDir, "ansible.cfg")) || fs.existsSync(path.join(rootDir, "Dockerfile")) && !pkg) {
|
|
104
|
-
return "devops";
|
|
105
|
-
}
|
|
106
|
-
if (fs.existsSync(path.join(rootDir, "platformio.ini"))) {
|
|
107
|
-
return "embedded";
|
|
108
|
-
}
|
|
109
|
-
return "backend";
|
|
110
|
-
}
|
|
111
|
-
var DISCIPLINE_MAPPINGS = {
|
|
112
|
-
web: {
|
|
113
|
-
symbolMapping: {
|
|
114
|
-
"components/**": "#",
|
|
115
|
-
"pages/**": "#",
|
|
116
|
-
"views/**": "#",
|
|
117
|
-
"hooks/**": "#",
|
|
118
|
-
"stores/**": "#",
|
|
119
|
-
"state/**": "#",
|
|
120
|
-
"utils/**": "#",
|
|
121
|
-
"lib/**": "#",
|
|
122
|
-
"services/**": "#",
|
|
123
|
-
"middleware/**": "^",
|
|
124
|
-
"auth/**": "^",
|
|
125
|
-
"guards/**": "^",
|
|
126
|
-
"events/**": "!",
|
|
127
|
-
"handlers/**": "!",
|
|
128
|
-
"flows/**": "$",
|
|
129
|
-
"aspects/**": "~",
|
|
130
|
-
"rules/**": "~"
|
|
131
|
-
},
|
|
132
|
-
purposeRequired: [
|
|
133
|
-
{ pattern: "src/components/*", depth: 1 },
|
|
134
|
-
{ pattern: "src/pages/*", depth: 1 },
|
|
135
|
-
{ pattern: "src/features/*", depth: 1 }
|
|
136
|
-
],
|
|
137
|
-
examples: {
|
|
138
|
-
"#": ["#LoginForm", "#useAuth", "#CartStore", "#api-client"],
|
|
139
|
-
"$": ["$checkout-flow", "$onboarding"],
|
|
140
|
-
"^": ["^authenticated", "^admin-only"],
|
|
141
|
-
"!": ["!form-submit", "!notification-sent"],
|
|
142
|
-
"~": ["~rate-limited", "~csrf-protected"]
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
backend: {
|
|
146
|
-
symbolMapping: {
|
|
147
|
-
"services/**": "#",
|
|
148
|
-
"routes/**": "#",
|
|
149
|
-
"api/**": "#",
|
|
150
|
-
"models/**": "#",
|
|
151
|
-
"lib/**": "#",
|
|
152
|
-
"utils/**": "#",
|
|
153
|
-
"core/**": "#",
|
|
154
|
-
"config/**": "#",
|
|
155
|
-
"middleware/**": "^",
|
|
156
|
-
"auth/**": "^",
|
|
157
|
-
"guards/**": "^",
|
|
158
|
-
"policies/**": "^",
|
|
159
|
-
"events/**": "!",
|
|
160
|
-
"handlers/**": "!",
|
|
161
|
-
"listeners/**": "!",
|
|
162
|
-
"flows/**": "$",
|
|
163
|
-
"workflows/**": "$",
|
|
164
|
-
"pipelines/**": "$",
|
|
165
|
-
"aspects/**": "~",
|
|
166
|
-
"rules/**": "~"
|
|
167
|
-
},
|
|
168
|
-
purposeRequired: [
|
|
169
|
-
{ pattern: "src/services/*", depth: 1 },
|
|
170
|
-
{ pattern: "src/routes/*", depth: 1 },
|
|
171
|
-
{ pattern: "src/api/*", depth: 1 }
|
|
172
|
-
],
|
|
173
|
-
examples: {
|
|
174
|
-
"#": ["#users-create", "#database", "#cache", "#postgres-client"],
|
|
175
|
-
"$": ["$order-fulfillment", "$data-sync"],
|
|
176
|
-
"^": ["^api-key-required", "^rate-limited"],
|
|
177
|
-
"!": ["!order-created", "!email-sent"],
|
|
178
|
-
"~": ["~audit-logged", "~encrypted"]
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
fullstack: {
|
|
182
|
-
symbolMapping: {
|
|
183
|
-
"components/**": "#",
|
|
184
|
-
"pages/**": "#",
|
|
185
|
-
"views/**": "#",
|
|
186
|
-
"hooks/**": "#",
|
|
187
|
-
"stores/**": "#",
|
|
188
|
-
"services/**": "#",
|
|
189
|
-
"routes/**": "#",
|
|
190
|
-
"api/**": "#",
|
|
191
|
-
"models/**": "#",
|
|
192
|
-
"lib/**": "#",
|
|
193
|
-
"utils/**": "#",
|
|
194
|
-
"core/**": "#",
|
|
195
|
-
"config/**": "#",
|
|
196
|
-
"middleware/**": "^",
|
|
197
|
-
"auth/**": "^",
|
|
198
|
-
"guards/**": "^",
|
|
199
|
-
"policies/**": "^",
|
|
200
|
-
"events/**": "!",
|
|
201
|
-
"handlers/**": "!",
|
|
202
|
-
"listeners/**": "!",
|
|
203
|
-
"flows/**": "$",
|
|
204
|
-
"workflows/**": "$",
|
|
205
|
-
"aspects/**": "~",
|
|
206
|
-
"rules/**": "~"
|
|
207
|
-
},
|
|
208
|
-
purposeRequired: [
|
|
209
|
-
{ pattern: "src/components/*", depth: 1 },
|
|
210
|
-
{ pattern: "src/pages/*", depth: 1 },
|
|
211
|
-
{ pattern: "src/api/*", depth: 1 },
|
|
212
|
-
{ pattern: "src/services/*", depth: 1 }
|
|
213
|
-
],
|
|
214
|
-
examples: {
|
|
215
|
-
"#": ["#LoginPage", "#api-users", "#UserService", "#stripe-client"],
|
|
216
|
-
"$": ["$checkout-flow", "$auth-flow"],
|
|
217
|
-
"^": ["^authenticated", "^admin-only"],
|
|
218
|
-
"!": ["!order-created", "!notification-sent"],
|
|
219
|
-
"~": ["~rate-limited", "~audit-required"]
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
api: {
|
|
223
|
-
symbolMapping: {
|
|
224
|
-
"routes/**": "#",
|
|
225
|
-
"endpoints/**": "#",
|
|
226
|
-
"controllers/**": "#",
|
|
227
|
-
"services/**": "#",
|
|
228
|
-
"models/**": "#",
|
|
229
|
-
"lib/**": "#",
|
|
230
|
-
"utils/**": "#",
|
|
231
|
-
"core/**": "#",
|
|
232
|
-
"config/**": "#",
|
|
233
|
-
"middleware/**": "^",
|
|
234
|
-
"auth/**": "^",
|
|
235
|
-
"guards/**": "^",
|
|
236
|
-
"policies/**": "^",
|
|
237
|
-
"events/**": "!",
|
|
238
|
-
"handlers/**": "!",
|
|
239
|
-
"listeners/**": "!",
|
|
240
|
-
"webhooks/**": "!",
|
|
241
|
-
"flows/**": "$",
|
|
242
|
-
"workflows/**": "$",
|
|
243
|
-
"pipelines/**": "$",
|
|
244
|
-
"aspects/**": "~",
|
|
245
|
-
"rules/**": "~"
|
|
246
|
-
},
|
|
247
|
-
purposeRequired: [
|
|
248
|
-
{ pattern: "src/routes/*", depth: 1 },
|
|
249
|
-
{ pattern: "src/services/*", depth: 1 },
|
|
250
|
-
{ pattern: "src/endpoints/*", depth: 1 }
|
|
251
|
-
],
|
|
252
|
-
examples: {
|
|
253
|
-
"#": ["#users-endpoint", "#OrderService", "#database", "#redis-client"],
|
|
254
|
-
"$": ["$order-processing", "$webhook-ingestion"],
|
|
255
|
-
"^": ["^api-key-required", "^rate-limited", "^authenticated"],
|
|
256
|
-
"!": ["!request-received", "!order-created"],
|
|
257
|
-
"~": ["~audit-logged", "~validated", "~idempotent"]
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
cli: {
|
|
261
|
-
symbolMapping: {
|
|
262
|
-
"commands/**": "#",
|
|
263
|
-
"cmd/**": "#",
|
|
264
|
-
"lib/**": "#",
|
|
265
|
-
"utils/**": "#",
|
|
266
|
-
"core/**": "#",
|
|
267
|
-
"config/**": "#",
|
|
268
|
-
"handlers/**": "!",
|
|
269
|
-
"events/**": "!",
|
|
270
|
-
"flows/**": "$",
|
|
271
|
-
"workflows/**": "$",
|
|
272
|
-
"aspects/**": "~",
|
|
273
|
-
"rules/**": "~"
|
|
274
|
-
},
|
|
275
|
-
purposeRequired: [
|
|
276
|
-
{ pattern: "src/commands/*", depth: 1 },
|
|
277
|
-
{ pattern: "cmd/*", depth: 1 }
|
|
278
|
-
],
|
|
279
|
-
examples: {
|
|
280
|
-
"#": ["#init-command", "#config-loader", "#output-formatter"],
|
|
281
|
-
"$": ["$setup-flow", "$migration-flow"],
|
|
282
|
-
"^": ["^config-valid", "^version-check"],
|
|
283
|
-
"!": ["!command-complete", "!error-occurred"],
|
|
284
|
-
"~": ["~logged", "~validated"]
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
ml: {
|
|
288
|
-
symbolMapping: {
|
|
289
|
-
"models/**": "#",
|
|
290
|
-
"data/**": "#",
|
|
291
|
-
"experiments/**": "#",
|
|
292
|
-
"notebooks/**": "#",
|
|
293
|
-
"features/**": "#",
|
|
294
|
-
"utils/**": "#",
|
|
295
|
-
"lib/**": "#",
|
|
296
|
-
"config/**": "#",
|
|
297
|
-
"pipelines/**": "$",
|
|
298
|
-
"training/**": "$",
|
|
299
|
-
"evaluation/**": "#",
|
|
300
|
-
"preprocessing/**": "#",
|
|
301
|
-
"auth/**": "^",
|
|
302
|
-
"events/**": "!",
|
|
303
|
-
"aspects/**": "~"
|
|
304
|
-
},
|
|
305
|
-
purposeRequired: [
|
|
306
|
-
{ pattern: "models/*", depth: 1 },
|
|
307
|
-
{ pattern: "pipelines/*", depth: 1 },
|
|
308
|
-
{ pattern: "experiments/*", depth: 1 }
|
|
309
|
-
],
|
|
310
|
-
examples: {
|
|
311
|
-
"#": ["#classifier-v2", "#dataloader", "#feature-extractor", "#wandb-client"],
|
|
312
|
-
"$": ["$training-pipeline", "$data-ingestion", "$evaluation-pipeline"],
|
|
313
|
-
"^": ["^data-scientist", "^production-only"],
|
|
314
|
-
"!": ["!epoch-complete", "!drift-detected", "!training-finished"],
|
|
315
|
-
"~": ["~reproducible", "~versioned"]
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
mobile: {
|
|
319
|
-
symbolMapping: {
|
|
320
|
-
"screens/**": "#",
|
|
321
|
-
"components/**": "#",
|
|
322
|
-
"widgets/**": "#",
|
|
323
|
-
"services/**": "#",
|
|
324
|
-
"stores/**": "#",
|
|
325
|
-
"state/**": "#",
|
|
326
|
-
"hooks/**": "#",
|
|
327
|
-
"utils/**": "#",
|
|
328
|
-
"lib/**": "#",
|
|
329
|
-
"native/**": "#",
|
|
330
|
-
"navigation/**": "$",
|
|
331
|
-
"flows/**": "$",
|
|
332
|
-
"middleware/**": "^",
|
|
333
|
-
"auth/**": "^",
|
|
334
|
-
"permissions/**": "^",
|
|
335
|
-
"events/**": "!",
|
|
336
|
-
"handlers/**": "!",
|
|
337
|
-
"aspects/**": "~"
|
|
338
|
-
},
|
|
339
|
-
purposeRequired: [
|
|
340
|
-
{ pattern: "src/screens/*", depth: 1 },
|
|
341
|
-
{ pattern: "src/components/*", depth: 1 }
|
|
342
|
-
],
|
|
343
|
-
examples: {
|
|
344
|
-
"#": ["#home-screen", "#camera-capture", "#bottom-sheet", "#push-service"],
|
|
345
|
-
"$": ["$onboarding", "$purchase-flow"],
|
|
346
|
-
"^": ["^camera-permission", "^premium-user"],
|
|
347
|
-
"!": ["!push-received", "!app-backgrounded"],
|
|
348
|
-
"~": ["~offline-capable", "~encrypted-storage"]
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
game: {
|
|
352
|
-
symbolMapping: {
|
|
353
|
-
"gameplay/**": "#",
|
|
354
|
-
"systems/**": "#",
|
|
355
|
-
"entities/**": "#",
|
|
356
|
-
"components/**": "#",
|
|
357
|
-
"scenes/**": "#",
|
|
358
|
-
"ui/**": "#",
|
|
359
|
-
"utils/**": "#",
|
|
360
|
-
"lib/**": "#",
|
|
361
|
-
"core/**": "#",
|
|
362
|
-
"config/**": "#",
|
|
363
|
-
"events/**": "!",
|
|
364
|
-
"triggers/**": "!",
|
|
365
|
-
"flows/**": "$",
|
|
366
|
-
"sequences/**": "$",
|
|
367
|
-
"auth/**": "^",
|
|
368
|
-
"aspects/**": "~"
|
|
369
|
-
},
|
|
370
|
-
purposeRequired: [
|
|
371
|
-
{ pattern: "gameplay/*", depth: 1 },
|
|
372
|
-
{ pattern: "systems/*", depth: 1 },
|
|
373
|
-
{ pattern: "entities/*", depth: 1 }
|
|
374
|
-
],
|
|
375
|
-
examples: {
|
|
376
|
-
"#": ["#attack", "#inventory", "#player", "#enemy-ai"],
|
|
377
|
-
"$": ["$combat-loop", "$tutorial-sequence"],
|
|
378
|
-
"^": ["^multiplayer-session", "^dev-mode"],
|
|
379
|
-
"!": ["!enemy-killed", "!level-complete"],
|
|
380
|
-
"~": ["~deterministic", "~network-synced"]
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
embedded: {
|
|
384
|
-
symbolMapping: {
|
|
385
|
-
"drivers/**": "#",
|
|
386
|
-
"hal/**": "#",
|
|
387
|
-
"bsp/**": "#",
|
|
388
|
-
"src/**": "#",
|
|
389
|
-
"lib/**": "#",
|
|
390
|
-
"utils/**": "#",
|
|
391
|
-
"config/**": "#",
|
|
392
|
-
"protocols/**": "$",
|
|
393
|
-
"flows/**": "$",
|
|
394
|
-
"auth/**": "^",
|
|
395
|
-
"security/**": "^",
|
|
396
|
-
"events/**": "!",
|
|
397
|
-
"interrupts/**": "!",
|
|
398
|
-
"aspects/**": "~"
|
|
399
|
-
},
|
|
400
|
-
purposeRequired: [
|
|
401
|
-
{ pattern: "src/drivers/*", depth: 1 },
|
|
402
|
-
{ pattern: "src/*", depth: 1 }
|
|
403
|
-
],
|
|
404
|
-
examples: {
|
|
405
|
-
"#": ["#spi-driver", "#gpio-handler", "#mqtt-client", "#read-sensor"],
|
|
406
|
-
"$": ["$boot-sequence", "$handshake", "$firmware-update"],
|
|
407
|
-
"^": ["^secure-boot", "^authenticated-cmd"],
|
|
408
|
-
"!": ["!data-ready", "!watchdog-timeout"],
|
|
409
|
-
"~": ["~power-optimized", "~real-time"]
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
devops: {
|
|
413
|
-
symbolMapping: {
|
|
414
|
-
"modules/**": "#",
|
|
415
|
-
"terraform/**": "#",
|
|
416
|
-
"ansible/**": "#",
|
|
417
|
-
"scripts/**": "#",
|
|
418
|
-
"lib/**": "#",
|
|
419
|
-
"config/**": "#",
|
|
420
|
-
"pipelines/**": "$",
|
|
421
|
-
"workflows/**": "$",
|
|
422
|
-
"ci/**": "$",
|
|
423
|
-
"auth/**": "^",
|
|
424
|
-
"policies/**": "^",
|
|
425
|
-
"alerts/**": "!",
|
|
426
|
-
"monitoring/**": "!",
|
|
427
|
-
"aspects/**": "~",
|
|
428
|
-
"rules/**": "~"
|
|
429
|
-
},
|
|
430
|
-
purposeRequired: [
|
|
431
|
-
{ pattern: "modules/*", depth: 1 },
|
|
432
|
-
{ pattern: "terraform/*", depth: 1 },
|
|
433
|
-
{ pattern: "pipelines/*", depth: 1 }
|
|
434
|
-
],
|
|
435
|
-
examples: {
|
|
436
|
-
"#": ["#vpc-module", "#backup-script", "#deploy", "#aws-client"],
|
|
437
|
-
"$": ["$release-pipeline", "$disaster-recovery"],
|
|
438
|
-
"^": ["^admin-access", "^vpc-restricted"],
|
|
439
|
-
"!": ["!high-cpu", "!deployment-failed"],
|
|
440
|
-
"~": ["~immutable-infra", "~zero-downtime"]
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
data: {
|
|
444
|
-
symbolMapping: {
|
|
445
|
-
"models/**": "#",
|
|
446
|
-
"dbt/**": "#",
|
|
447
|
-
"transforms/**": "#",
|
|
448
|
-
"sources/**": "#",
|
|
449
|
-
"utils/**": "#",
|
|
450
|
-
"lib/**": "#",
|
|
451
|
-
"config/**": "#",
|
|
452
|
-
"pipelines/**": "$",
|
|
453
|
-
"dags/**": "$",
|
|
454
|
-
"workflows/**": "$",
|
|
455
|
-
"orchestration/**": "$",
|
|
456
|
-
"auth/**": "^",
|
|
457
|
-
"policies/**": "^",
|
|
458
|
-
"events/**": "!",
|
|
459
|
-
"alerts/**": "!",
|
|
460
|
-
"aspects/**": "~",
|
|
461
|
-
"tests/**": "~"
|
|
462
|
-
},
|
|
463
|
-
purposeRequired: [
|
|
464
|
-
{ pattern: "models/*", depth: 1 },
|
|
465
|
-
{ pattern: "pipelines/*", depth: 1 },
|
|
466
|
-
{ pattern: "dags/*", depth: 1 }
|
|
467
|
-
],
|
|
468
|
-
examples: {
|
|
469
|
-
"#": ["#users-model", "#data-source", "#transform-revenue", "#snowflake-client"],
|
|
470
|
-
"$": ["$etl-pipeline", "$daily-refresh", "$data-quality-check"],
|
|
471
|
-
"^": ["^analyst-only", "^pii-access"],
|
|
472
|
-
"!": ["!pipeline-complete", "!data-quality-fail"],
|
|
473
|
-
"~": ["~idempotent", "~schema-validated"]
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
library: {
|
|
477
|
-
symbolMapping: {
|
|
478
|
-
"src/**": "#",
|
|
479
|
-
"lib/**": "#",
|
|
480
|
-
"utils/**": "#",
|
|
481
|
-
"core/**": "#",
|
|
482
|
-
"config/**": "#",
|
|
483
|
-
"events/**": "!",
|
|
484
|
-
"handlers/**": "!",
|
|
485
|
-
"flows/**": "$",
|
|
486
|
-
"aspects/**": "~"
|
|
487
|
-
},
|
|
488
|
-
purposeRequired: [
|
|
489
|
-
{ pattern: "src/*", depth: 1 },
|
|
490
|
-
{ pattern: "lib/*", depth: 1 }
|
|
491
|
-
],
|
|
492
|
-
examples: {
|
|
493
|
-
"#": ["#parser", "#formatter", "#validator", "#client"],
|
|
494
|
-
"$": ["$build-pipeline", "$publish-flow"],
|
|
495
|
-
"^": ["^version-check", "^config-valid"],
|
|
496
|
-
"!": ["!parse-error", "!validation-failed"],
|
|
497
|
-
"~": ["~tree-shakeable", "~backwards-compatible"]
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
monorepo: {
|
|
501
|
-
symbolMapping: {
|
|
502
|
-
"packages/**": "#",
|
|
503
|
-
"apps/**": "#",
|
|
504
|
-
"services/**": "#",
|
|
505
|
-
"libs/**": "#",
|
|
506
|
-
"shared/**": "#",
|
|
507
|
-
"tools/**": "#",
|
|
508
|
-
"config/**": "#",
|
|
509
|
-
"middleware/**": "^",
|
|
510
|
-
"auth/**": "^",
|
|
511
|
-
"events/**": "!",
|
|
512
|
-
"handlers/**": "!",
|
|
513
|
-
"flows/**": "$",
|
|
514
|
-
"pipelines/**": "$",
|
|
515
|
-
"aspects/**": "~",
|
|
516
|
-
"rules/**": "~"
|
|
517
|
-
},
|
|
518
|
-
purposeRequired: [
|
|
519
|
-
{ pattern: "packages/*", depth: 1 },
|
|
520
|
-
{ pattern: "apps/*", depth: 1 }
|
|
521
|
-
],
|
|
522
|
-
examples: {
|
|
523
|
-
"#": ["#web-app", "#api-server", "#shared-ui", "#config-loader"],
|
|
524
|
-
"$": ["$deploy-all", "$release-pipeline"],
|
|
525
|
-
"^": ["^authenticated", "^admin-only"],
|
|
526
|
-
"!": ["!build-complete", "!package-published"],
|
|
527
|
-
"~": ["~consistent-versions", "~shared-config"]
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
var GENERIC_SYMBOL_MAPPING = {
|
|
532
|
-
"features/**": "#",
|
|
533
|
-
"routes/**": "#",
|
|
534
|
-
"api/**": "#",
|
|
535
|
-
"endpoints/**": "#",
|
|
536
|
-
"commands/**": "#",
|
|
537
|
-
"models/**": "#",
|
|
538
|
-
"components/**": "#",
|
|
539
|
-
"lib/**": "#",
|
|
540
|
-
"utils/**": "#",
|
|
541
|
-
"services/**": "#",
|
|
542
|
-
"core/**": "#",
|
|
543
|
-
"drivers/**": "#",
|
|
544
|
-
"systems/**": "#",
|
|
545
|
-
"stores/**": "#",
|
|
546
|
-
"state/**": "#",
|
|
547
|
-
"reducers/**": "#",
|
|
548
|
-
"config/**": "#",
|
|
549
|
-
"integrations/**": "#",
|
|
550
|
-
"external/**": "#",
|
|
551
|
-
"vendors/**": "#",
|
|
552
|
-
"middleware/**": "^",
|
|
553
|
-
"auth/**": "^",
|
|
554
|
-
"guards/**": "^",
|
|
555
|
-
"policies/**": "^",
|
|
556
|
-
"events/**": "!",
|
|
557
|
-
"handlers/**": "!",
|
|
558
|
-
"listeners/**": "!",
|
|
559
|
-
"hooks/**": "!",
|
|
560
|
-
"flows/**": "$",
|
|
561
|
-
"sagas/**": "$",
|
|
562
|
-
"workflows/**": "$",
|
|
563
|
-
"pipelines/**": "$",
|
|
564
|
-
"aspects/**": "~",
|
|
565
|
-
"rules/**": "~"
|
|
566
|
-
};
|
|
567
|
-
function getDisciplineConfig(discipline) {
|
|
568
|
-
if (discipline === "auto" || discipline === "custom") {
|
|
569
|
-
return {
|
|
570
|
-
symbolMapping: GENERIC_SYMBOL_MAPPING,
|
|
571
|
-
purposeRequired: [
|
|
572
|
-
{ pattern: "src/*", depth: 1 },
|
|
573
|
-
{ pattern: "lib/*", depth: 1 },
|
|
574
|
-
{ pattern: "packages/*", depth: 1 }
|
|
575
|
-
],
|
|
576
|
-
examples: {
|
|
577
|
-
"#": ["#checkout", "#login-handler", "#Button", "#stripe-client"],
|
|
578
|
-
"$": ["$checkout-flow", "$onboarding", "$auth-flow"],
|
|
579
|
-
"^": ["^authenticated", "^admin-only", "^rate-limited"],
|
|
580
|
-
"!": ["!login-success", "!payment-failed", "!rate-limited"],
|
|
581
|
-
"~": ["~audit-required", "~rate-limited", "~cached"]
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
return DISCIPLINE_MAPPINGS[discipline];
|
|
586
|
-
}
|
|
587
|
-
function getDisciplineScanPatterns(discipline) {
|
|
588
|
-
const base = {
|
|
589
|
-
components: [],
|
|
590
|
-
routes: [],
|
|
591
|
-
auth: []
|
|
592
|
-
};
|
|
593
|
-
switch (discipline) {
|
|
594
|
-
case "ml":
|
|
595
|
-
base.components.push("models/**/*.py", "notebooks/**/*.ipynb", "experiments/**/*.py", "data/**/*.py");
|
|
596
|
-
base.routes.push("pipelines/**/*.py", "training/**/*.py");
|
|
597
|
-
break;
|
|
598
|
-
case "game":
|
|
599
|
-
base.components.push("entities/**/*.{ts,rs,cs,gd}", "systems/**/*.{ts,rs,cs,gd}", "gameplay/**/*.{ts,rs,cs,gd}", "scenes/**/*.{ts,rs,cs,gd}");
|
|
600
|
-
break;
|
|
601
|
-
case "embedded":
|
|
602
|
-
base.components.push("drivers/**/*.{c,h,rs}", "hal/**/*.{c,h,rs}", "bsp/**/*.{c,h}");
|
|
603
|
-
base.routes.push("protocols/**/*.{c,h,rs}");
|
|
604
|
-
break;
|
|
605
|
-
case "data":
|
|
606
|
-
base.components.push("models/**/*.sql", "dbt/**/*.sql", "transforms/**/*.{py,sql}", "sources/**/*.yml");
|
|
607
|
-
base.routes.push("dags/**/*.py", "pipelines/**/*.py", "orchestration/**/*.py");
|
|
608
|
-
break;
|
|
609
|
-
case "devops":
|
|
610
|
-
base.components.push("modules/**/*.tf", "terraform/**/*.tf", "ansible/**/*.yml", "scripts/**/*.sh");
|
|
611
|
-
base.routes.push("pipelines/**/*.yml", "workflows/**/*.yml", ".github/workflows/**/*.yml");
|
|
612
|
-
break;
|
|
613
|
-
case "cli":
|
|
614
|
-
base.components.push("commands/**/*.{ts,go,rs,py}", "cmd/**/*.go");
|
|
615
|
-
break;
|
|
616
|
-
case "mobile":
|
|
617
|
-
base.components.push("screens/**/*.{tsx,dart,swift,kt}", "widgets/**/*.dart");
|
|
618
|
-
base.routes.push("navigation/**/*.{ts,tsx,dart}");
|
|
619
|
-
break;
|
|
620
|
-
case "monorepo":
|
|
621
|
-
base.components.push("packages/*/src/**/*.{ts,tsx}", "apps/*/src/**/*.{ts,tsx}");
|
|
622
|
-
break;
|
|
623
|
-
default:
|
|
624
|
-
break;
|
|
625
|
-
}
|
|
626
|
-
return base;
|
|
627
|
-
}
|
|
628
|
-
function readPackageJson(rootDir) {
|
|
629
|
-
const pkgPath = path.join(rootDir, "package.json");
|
|
630
|
-
try {
|
|
631
|
-
return JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
632
|
-
} catch {
|
|
633
|
-
return null;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
function readFileIfExists(rootDir, filename) {
|
|
637
|
-
const filePath = path.join(rootDir, filename);
|
|
638
|
-
try {
|
|
639
|
-
return fs.readFileSync(filePath, "utf8");
|
|
640
|
-
} catch {
|
|
641
|
-
return null;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
function hasUIDeps(deps) {
|
|
645
|
-
const uiPackages = ["react", "vue", "@angular/core", "svelte", "solid-js", "preact", "lit"];
|
|
646
|
-
return uiPackages.some((p) => p in deps);
|
|
647
|
-
}
|
|
648
|
-
function hasServerDeps(deps) {
|
|
649
|
-
const serverPackages = ["express", "fastify", "hono", "koa", "nestjs", "@nestjs/core", "hapi", "@hapi/hapi"];
|
|
650
|
-
return serverPackages.some((p) => p in deps);
|
|
651
|
-
}
|
|
652
|
-
function hasUICode(rootDir, deps) {
|
|
653
|
-
if (hasUIDeps(deps)) return true;
|
|
654
|
-
return fs.existsSync(path.join(rootDir, "src", "components")) || fs.existsSync(path.join(rootDir, "src", "pages"));
|
|
655
|
-
}
|
|
656
|
-
function hasFilesMatching(rootDir, extension) {
|
|
657
|
-
try {
|
|
658
|
-
const entries = fs.readdirSync(rootDir);
|
|
659
|
-
return entries.some((e) => e.endsWith(extension));
|
|
660
|
-
} catch {
|
|
661
|
-
return false;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
export {
|
|
666
|
-
detectDiscipline,
|
|
667
|
-
getDisciplineConfig,
|
|
668
|
-
getDisciplineScanPatterns
|
|
669
|
-
};
|
|
File without changes
|
|
File without changes
|