@cubis/foundry 0.3.12 → 0.3.13
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.
|
@@ -123,98 +123,7 @@
|
|
|
123
123
|
"testing-patterns",
|
|
124
124
|
"vulnerability-scanner",
|
|
125
125
|
"web-design-guidelines",
|
|
126
|
-
"vercel-automation",
|
|
127
|
-
"vercel-project-configuration",
|
|
128
|
-
"vercel-git-deployments",
|
|
129
|
-
"vercel-environments",
|
|
130
|
-
"vercel-generated-urls",
|
|
131
|
-
"vercel-deployment-promotion",
|
|
132
|
-
"vercel-build-pipeline",
|
|
133
|
-
"vercel-build-image-upgrades",
|
|
134
|
-
"vercel-build-output-api",
|
|
135
|
-
"vercel-monorepos",
|
|
136
|
-
"vercel-remote-caching",
|
|
137
|
-
"vercel-microfrontends",
|
|
138
|
-
"vercel-multi-tenant",
|
|
139
|
-
"vercel-functions-core",
|
|
140
|
-
"vercel-fluid-compute",
|
|
141
|
-
"vercel-functions-nodejs",
|
|
142
|
-
"vercel-functions-python",
|
|
143
|
-
"vercel-functions-edge-runtime",
|
|
144
|
-
"vercel-edge-to-node-migration",
|
|
145
|
-
"vercel-routing-middleware",
|
|
146
|
-
"vercel-function-config",
|
|
147
|
-
"vercel-runtime-cache",
|
|
148
|
-
"vercel-data-cache-nextjs",
|
|
149
|
-
"vercel-cron-jobs",
|
|
150
|
-
"vercel-og-image-generation",
|
|
151
|
-
"vercel-cdn-cache",
|
|
152
|
-
"vercel-cache-control-headers",
|
|
153
|
-
"vercel-isr",
|
|
154
|
-
"vercel-image-optimization",
|
|
155
|
-
"vercel-request-collapsing",
|
|
156
|
-
"vercel-redirects-rewrites",
|
|
157
|
-
"vercel-cdn-purging",
|
|
158
|
-
"vercel-blob",
|
|
159
|
-
"vercel-edge-config",
|
|
160
|
-
"vercel-edge-config-integrations",
|
|
161
|
-
"vercel-marketplace-storage-redis",
|
|
162
|
-
"vercel-storage-migrations",
|
|
163
|
-
"vercel-ai-sdk-core",
|
|
164
|
-
"vercel-ai-sdk-ui",
|
|
165
|
-
"vercel-ai-gateway-core",
|
|
166
|
-
"vercel-ai-gateway-model-routing",
|
|
167
|
-
"vercel-ai-gateway-fallbacks",
|
|
168
|
-
"vercel-ai-gateway-auth-byok",
|
|
169
|
-
"vercel-ai-gateway-observability",
|
|
170
|
-
"vercel-ai-gateway-openai-compatible",
|
|
171
|
-
"vercel-agent-workflows",
|
|
172
|
-
"vercel-mcp-for-agents",
|
|
173
|
-
"vercel-flags-platform",
|
|
174
|
-
"vercel-flags-dashboard",
|
|
175
|
-
"vercel-flags-sdk",
|
|
176
|
-
"vercel-flags-openfeature",
|
|
177
|
-
"vercel-flags-explorer",
|
|
178
|
-
"vercel-flags-cli-workflows",
|
|
179
|
-
"vercel-observability-overview",
|
|
180
|
-
"vercel-runtime-logs",
|
|
181
|
-
"vercel-tracing-otel",
|
|
182
|
-
"vercel-session-tracing",
|
|
183
|
-
"vercel-alerts-monitoring",
|
|
184
|
-
"vercel-drains-setup",
|
|
185
|
-
"vercel-log-drain-reference",
|
|
186
|
-
"vercel-log-trace-correlation",
|
|
187
|
-
"vercel-speed-insights",
|
|
188
|
-
"vercel-web-analytics",
|
|
189
|
-
"vercel-custom-events",
|
|
190
|
-
"vercel-deployment-protection",
|
|
191
|
-
"vercel-protection-bypass-automation",
|
|
192
|
-
"vercel-firewall-core",
|
|
193
|
-
"vercel-waf-custom-rules",
|
|
194
|
-
"vercel-waf-rate-limiting",
|
|
195
|
-
"vercel-bot-management",
|
|
196
|
-
"vercel-botid",
|
|
197
|
-
"vercel-secure-compute",
|
|
198
|
-
"vercel-static-ips",
|
|
199
|
-
"vercel-oidc-federation",
|
|
200
|
-
"vercel-rbac-access-groups",
|
|
201
|
-
"vercel-audit-logs",
|
|
202
|
-
"vercel-2fa-enforcement",
|
|
203
126
|
"vercel-domains",
|
|
204
|
-
"vercel-dns-records",
|
|
205
|
-
"vercel-nameservers",
|
|
206
|
-
"vercel-ssl-certificates",
|
|
207
|
-
"vercel-domain-ownership-claims",
|
|
208
|
-
"vercel-cli-core",
|
|
209
|
-
"vercel-cli-project-domain-env",
|
|
210
|
-
"vercel-cli-flags",
|
|
211
|
-
"vercel-cli-microfrontends",
|
|
212
|
-
"vercel-cli-mcp",
|
|
213
|
-
"vercel-rest-api",
|
|
214
|
-
"vercel-sdk",
|
|
215
|
-
"vercel-integrations-native",
|
|
216
|
-
"vercel-marketplace-partner-api",
|
|
217
|
-
"vercel-webhooks-and-checks",
|
|
218
127
|
"drift-flutter",
|
|
219
128
|
"database-design",
|
|
220
129
|
"database-optimizer"
|
|
@@ -353,98 +262,7 @@
|
|
|
353
262
|
"testing-patterns",
|
|
354
263
|
"vulnerability-scanner",
|
|
355
264
|
"web-design-guidelines",
|
|
356
|
-
"vercel-automation",
|
|
357
|
-
"vercel-project-configuration",
|
|
358
|
-
"vercel-git-deployments",
|
|
359
|
-
"vercel-environments",
|
|
360
|
-
"vercel-generated-urls",
|
|
361
|
-
"vercel-deployment-promotion",
|
|
362
|
-
"vercel-build-pipeline",
|
|
363
|
-
"vercel-build-image-upgrades",
|
|
364
|
-
"vercel-build-output-api",
|
|
365
|
-
"vercel-monorepos",
|
|
366
|
-
"vercel-remote-caching",
|
|
367
|
-
"vercel-microfrontends",
|
|
368
|
-
"vercel-multi-tenant",
|
|
369
|
-
"vercel-functions-core",
|
|
370
|
-
"vercel-fluid-compute",
|
|
371
|
-
"vercel-functions-nodejs",
|
|
372
|
-
"vercel-functions-python",
|
|
373
|
-
"vercel-functions-edge-runtime",
|
|
374
|
-
"vercel-edge-to-node-migration",
|
|
375
|
-
"vercel-routing-middleware",
|
|
376
|
-
"vercel-function-config",
|
|
377
|
-
"vercel-runtime-cache",
|
|
378
|
-
"vercel-data-cache-nextjs",
|
|
379
|
-
"vercel-cron-jobs",
|
|
380
|
-
"vercel-og-image-generation",
|
|
381
|
-
"vercel-cdn-cache",
|
|
382
|
-
"vercel-cache-control-headers",
|
|
383
|
-
"vercel-isr",
|
|
384
|
-
"vercel-image-optimization",
|
|
385
|
-
"vercel-request-collapsing",
|
|
386
|
-
"vercel-redirects-rewrites",
|
|
387
|
-
"vercel-cdn-purging",
|
|
388
|
-
"vercel-blob",
|
|
389
|
-
"vercel-edge-config",
|
|
390
|
-
"vercel-edge-config-integrations",
|
|
391
|
-
"vercel-marketplace-storage-redis",
|
|
392
|
-
"vercel-storage-migrations",
|
|
393
|
-
"vercel-ai-sdk-core",
|
|
394
|
-
"vercel-ai-sdk-ui",
|
|
395
|
-
"vercel-ai-gateway-core",
|
|
396
|
-
"vercel-ai-gateway-model-routing",
|
|
397
|
-
"vercel-ai-gateway-fallbacks",
|
|
398
|
-
"vercel-ai-gateway-auth-byok",
|
|
399
|
-
"vercel-ai-gateway-observability",
|
|
400
|
-
"vercel-ai-gateway-openai-compatible",
|
|
401
|
-
"vercel-agent-workflows",
|
|
402
|
-
"vercel-mcp-for-agents",
|
|
403
|
-
"vercel-flags-platform",
|
|
404
|
-
"vercel-flags-dashboard",
|
|
405
|
-
"vercel-flags-sdk",
|
|
406
|
-
"vercel-flags-openfeature",
|
|
407
|
-
"vercel-flags-explorer",
|
|
408
|
-
"vercel-flags-cli-workflows",
|
|
409
|
-
"vercel-observability-overview",
|
|
410
|
-
"vercel-runtime-logs",
|
|
411
|
-
"vercel-tracing-otel",
|
|
412
|
-
"vercel-session-tracing",
|
|
413
|
-
"vercel-alerts-monitoring",
|
|
414
|
-
"vercel-drains-setup",
|
|
415
|
-
"vercel-log-drain-reference",
|
|
416
|
-
"vercel-log-trace-correlation",
|
|
417
|
-
"vercel-speed-insights",
|
|
418
|
-
"vercel-web-analytics",
|
|
419
|
-
"vercel-custom-events",
|
|
420
|
-
"vercel-deployment-protection",
|
|
421
|
-
"vercel-protection-bypass-automation",
|
|
422
|
-
"vercel-firewall-core",
|
|
423
|
-
"vercel-waf-custom-rules",
|
|
424
|
-
"vercel-waf-rate-limiting",
|
|
425
|
-
"vercel-bot-management",
|
|
426
|
-
"vercel-botid",
|
|
427
|
-
"vercel-secure-compute",
|
|
428
|
-
"vercel-static-ips",
|
|
429
|
-
"vercel-oidc-federation",
|
|
430
|
-
"vercel-rbac-access-groups",
|
|
431
|
-
"vercel-audit-logs",
|
|
432
|
-
"vercel-2fa-enforcement",
|
|
433
265
|
"vercel-domains",
|
|
434
|
-
"vercel-dns-records",
|
|
435
|
-
"vercel-nameservers",
|
|
436
|
-
"vercel-ssl-certificates",
|
|
437
|
-
"vercel-domain-ownership-claims",
|
|
438
|
-
"vercel-cli-core",
|
|
439
|
-
"vercel-cli-project-domain-env",
|
|
440
|
-
"vercel-cli-flags",
|
|
441
|
-
"vercel-cli-microfrontends",
|
|
442
|
-
"vercel-cli-mcp",
|
|
443
|
-
"vercel-rest-api",
|
|
444
|
-
"vercel-sdk",
|
|
445
|
-
"vercel-integrations-native",
|
|
446
|
-
"vercel-marketplace-partner-api",
|
|
447
|
-
"vercel-webhooks-and-checks",
|
|
448
266
|
"drift-flutter",
|
|
449
267
|
"database-design",
|
|
450
268
|
"database-optimizer"
|
|
@@ -583,98 +401,7 @@
|
|
|
583
401
|
"testing-patterns",
|
|
584
402
|
"vulnerability-scanner",
|
|
585
403
|
"web-design-guidelines",
|
|
586
|
-
"vercel-automation",
|
|
587
|
-
"vercel-project-configuration",
|
|
588
|
-
"vercel-git-deployments",
|
|
589
|
-
"vercel-environments",
|
|
590
|
-
"vercel-generated-urls",
|
|
591
|
-
"vercel-deployment-promotion",
|
|
592
|
-
"vercel-build-pipeline",
|
|
593
|
-
"vercel-build-image-upgrades",
|
|
594
|
-
"vercel-build-output-api",
|
|
595
|
-
"vercel-monorepos",
|
|
596
|
-
"vercel-remote-caching",
|
|
597
|
-
"vercel-microfrontends",
|
|
598
|
-
"vercel-multi-tenant",
|
|
599
|
-
"vercel-functions-core",
|
|
600
|
-
"vercel-fluid-compute",
|
|
601
|
-
"vercel-functions-nodejs",
|
|
602
|
-
"vercel-functions-python",
|
|
603
|
-
"vercel-functions-edge-runtime",
|
|
604
|
-
"vercel-edge-to-node-migration",
|
|
605
|
-
"vercel-routing-middleware",
|
|
606
|
-
"vercel-function-config",
|
|
607
|
-
"vercel-runtime-cache",
|
|
608
|
-
"vercel-data-cache-nextjs",
|
|
609
|
-
"vercel-cron-jobs",
|
|
610
|
-
"vercel-og-image-generation",
|
|
611
|
-
"vercel-cdn-cache",
|
|
612
|
-
"vercel-cache-control-headers",
|
|
613
|
-
"vercel-isr",
|
|
614
|
-
"vercel-image-optimization",
|
|
615
|
-
"vercel-request-collapsing",
|
|
616
|
-
"vercel-redirects-rewrites",
|
|
617
|
-
"vercel-cdn-purging",
|
|
618
|
-
"vercel-blob",
|
|
619
|
-
"vercel-edge-config",
|
|
620
|
-
"vercel-edge-config-integrations",
|
|
621
|
-
"vercel-marketplace-storage-redis",
|
|
622
|
-
"vercel-storage-migrations",
|
|
623
|
-
"vercel-ai-sdk-core",
|
|
624
|
-
"vercel-ai-sdk-ui",
|
|
625
|
-
"vercel-ai-gateway-core",
|
|
626
|
-
"vercel-ai-gateway-model-routing",
|
|
627
|
-
"vercel-ai-gateway-fallbacks",
|
|
628
|
-
"vercel-ai-gateway-auth-byok",
|
|
629
|
-
"vercel-ai-gateway-observability",
|
|
630
|
-
"vercel-ai-gateway-openai-compatible",
|
|
631
|
-
"vercel-agent-workflows",
|
|
632
|
-
"vercel-mcp-for-agents",
|
|
633
|
-
"vercel-flags-platform",
|
|
634
|
-
"vercel-flags-dashboard",
|
|
635
|
-
"vercel-flags-sdk",
|
|
636
|
-
"vercel-flags-openfeature",
|
|
637
|
-
"vercel-flags-explorer",
|
|
638
|
-
"vercel-flags-cli-workflows",
|
|
639
|
-
"vercel-observability-overview",
|
|
640
|
-
"vercel-runtime-logs",
|
|
641
|
-
"vercel-tracing-otel",
|
|
642
|
-
"vercel-session-tracing",
|
|
643
|
-
"vercel-alerts-monitoring",
|
|
644
|
-
"vercel-drains-setup",
|
|
645
|
-
"vercel-log-drain-reference",
|
|
646
|
-
"vercel-log-trace-correlation",
|
|
647
|
-
"vercel-speed-insights",
|
|
648
|
-
"vercel-web-analytics",
|
|
649
|
-
"vercel-custom-events",
|
|
650
|
-
"vercel-deployment-protection",
|
|
651
|
-
"vercel-protection-bypass-automation",
|
|
652
|
-
"vercel-firewall-core",
|
|
653
|
-
"vercel-waf-custom-rules",
|
|
654
|
-
"vercel-waf-rate-limiting",
|
|
655
|
-
"vercel-bot-management",
|
|
656
|
-
"vercel-botid",
|
|
657
|
-
"vercel-secure-compute",
|
|
658
|
-
"vercel-static-ips",
|
|
659
|
-
"vercel-oidc-federation",
|
|
660
|
-
"vercel-rbac-access-groups",
|
|
661
|
-
"vercel-audit-logs",
|
|
662
|
-
"vercel-2fa-enforcement",
|
|
663
404
|
"vercel-domains",
|
|
664
|
-
"vercel-dns-records",
|
|
665
|
-
"vercel-nameservers",
|
|
666
|
-
"vercel-ssl-certificates",
|
|
667
|
-
"vercel-domain-ownership-claims",
|
|
668
|
-
"vercel-cli-core",
|
|
669
|
-
"vercel-cli-project-domain-env",
|
|
670
|
-
"vercel-cli-flags",
|
|
671
|
-
"vercel-cli-microfrontends",
|
|
672
|
-
"vercel-cli-mcp",
|
|
673
|
-
"vercel-rest-api",
|
|
674
|
-
"vercel-sdk",
|
|
675
|
-
"vercel-integrations-native",
|
|
676
|
-
"vercel-marketplace-partner-api",
|
|
677
|
-
"vercel-webhooks-and-checks",
|
|
678
405
|
"drift-flutter",
|
|
679
406
|
"database-design",
|
|
680
407
|
"database-optimizer"
|
package/README.md
CHANGED
|
@@ -36,6 +36,10 @@ cbx workflows install --platform antigravity --dry-run
|
|
|
36
36
|
cbx workflows install --platform antigravity --terminal-integration --terminal-verifier codex
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Install bootstrap behavior:
|
|
40
|
+
- `cbx workflows install` now also bootstraps `ENGINEERING_RULES.md` and `TECH.md` (creates when missing; keeps existing files unless explicitly regenerated).
|
|
41
|
+
- Use `cbx rules init --platform <platform> --overwrite` to force-regenerate both files.
|
|
42
|
+
|
|
39
43
|
`rules` manages strict engineering policy and a generated codebase tech map:
|
|
40
44
|
|
|
41
45
|
```bash
|
package/bin/cubis.js
CHANGED
|
@@ -2882,6 +2882,14 @@ async function runWorkflowInstall(options) {
|
|
|
2882
2882
|
dryRun,
|
|
2883
2883
|
cwd: process.cwd()
|
|
2884
2884
|
});
|
|
2885
|
+
const engineeringArtifactsResult = await upsertEngineeringArtifacts({
|
|
2886
|
+
platform,
|
|
2887
|
+
scope,
|
|
2888
|
+
overwrite: false,
|
|
2889
|
+
dryRun,
|
|
2890
|
+
skipTech: false,
|
|
2891
|
+
cwd: process.cwd()
|
|
2892
|
+
});
|
|
2885
2893
|
|
|
2886
2894
|
const terminalVerificationRuleResult =
|
|
2887
2895
|
platform === "antigravity" && installResult.terminalIntegration
|
|
@@ -2918,6 +2926,10 @@ async function runWorkflowInstall(options) {
|
|
|
2918
2926
|
dryRun
|
|
2919
2927
|
});
|
|
2920
2928
|
printRuleSyncResult(syncResult);
|
|
2929
|
+
printInstallEngineeringSummary({
|
|
2930
|
+
engineeringResults: engineeringArtifactsResult.engineeringResults,
|
|
2931
|
+
techResult: engineeringArtifactsResult.techResult
|
|
2932
|
+
});
|
|
2921
2933
|
if (dryRun) {
|
|
2922
2934
|
console.log("\nDry-run complete. Re-run without `--dry-run` to apply changes.");
|
|
2923
2935
|
} else {
|
|
@@ -3128,6 +3140,94 @@ function printRulesInitSummary({
|
|
|
3128
3140
|
}
|
|
3129
3141
|
}
|
|
3130
3142
|
|
|
3143
|
+
function printInstallEngineeringSummary({ engineeringResults, techResult }) {
|
|
3144
|
+
console.log("\nEngineering artifacts:");
|
|
3145
|
+
for (const item of engineeringResults) {
|
|
3146
|
+
console.log(`- ENGINEERING_RULES.md: ${item.rulesFileResult.action} (${item.rulesFilePath})`);
|
|
3147
|
+
console.log(`- Managed engineering block (${item.ruleFilePath}): ${item.blockResult.action}`);
|
|
3148
|
+
if (item.blockResult.warnings.length > 0) {
|
|
3149
|
+
for (const warning of item.blockResult.warnings) {
|
|
3150
|
+
console.log(` - warning: ${warning}`);
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
if (techResult) {
|
|
3156
|
+
console.log(`- TECH.md: ${techResult.action} (${techResult.filePath})`);
|
|
3157
|
+
console.log(`- TECH scan files: ${techResult.snapshot.scannedFiles}`);
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
async function upsertEngineeringArtifacts({
|
|
3162
|
+
platform,
|
|
3163
|
+
scope,
|
|
3164
|
+
overwrite = false,
|
|
3165
|
+
skipTech = false,
|
|
3166
|
+
dryRun = false,
|
|
3167
|
+
cwd = process.cwd()
|
|
3168
|
+
}) {
|
|
3169
|
+
const ruleFilePath = await resolveRuleFilePath(platform, scope, cwd);
|
|
3170
|
+
if (!ruleFilePath) throw new Error(`No rule file configured for platform '${platform}'.`);
|
|
3171
|
+
|
|
3172
|
+
const workspaceRoot = findWorkspaceRoot(cwd);
|
|
3173
|
+
const techMdPath = path.join(workspaceRoot, "TECH.md");
|
|
3174
|
+
const targets = [{ ruleFilePath }];
|
|
3175
|
+
|
|
3176
|
+
if (scope === "global") {
|
|
3177
|
+
const workspaceRuleFile = await resolveWorkspaceRuleFileForGlobalScope(platform, cwd);
|
|
3178
|
+
const globalRuleFile = expandPath(WORKFLOW_PROFILES[platform].global.ruleFilesByPriority[0], cwd);
|
|
3179
|
+
if (workspaceRuleFile && path.resolve(workspaceRuleFile) !== path.resolve(globalRuleFile)) {
|
|
3180
|
+
targets.push({ ruleFilePath: workspaceRuleFile });
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
const template = buildEngineeringRulesTemplate();
|
|
3185
|
+
const engineeringResults = [];
|
|
3186
|
+
for (const target of targets) {
|
|
3187
|
+
const rulesFilePath = path.join(path.dirname(target.ruleFilePath), "ENGINEERING_RULES.md");
|
|
3188
|
+
const rulesFileResult = await writeTextFile({
|
|
3189
|
+
targetPath: rulesFilePath,
|
|
3190
|
+
content: `${template}\n`,
|
|
3191
|
+
overwrite,
|
|
3192
|
+
dryRun
|
|
3193
|
+
});
|
|
3194
|
+
const blockResult = await upsertEngineeringRulesBlock({
|
|
3195
|
+
ruleFilePath: target.ruleFilePath,
|
|
3196
|
+
platform,
|
|
3197
|
+
engineeringRulesFilePath: rulesFilePath,
|
|
3198
|
+
techMdFilePath: techMdPath,
|
|
3199
|
+
dryRun
|
|
3200
|
+
});
|
|
3201
|
+
engineeringResults.push({
|
|
3202
|
+
ruleFilePath: target.ruleFilePath,
|
|
3203
|
+
rulesFilePath,
|
|
3204
|
+
rulesFileResult,
|
|
3205
|
+
blockResult
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
let techResult = null;
|
|
3210
|
+
if (!skipTech) {
|
|
3211
|
+
const snapshot = await collectTechSnapshot(workspaceRoot);
|
|
3212
|
+
const content = buildTechMd(snapshot);
|
|
3213
|
+
const fileResult = await writeTextFile({
|
|
3214
|
+
targetPath: techMdPath,
|
|
3215
|
+
content: `${content}\n`,
|
|
3216
|
+
overwrite,
|
|
3217
|
+
dryRun
|
|
3218
|
+
});
|
|
3219
|
+
techResult = {
|
|
3220
|
+
...fileResult,
|
|
3221
|
+
snapshot
|
|
3222
|
+
};
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
return {
|
|
3226
|
+
engineeringResults,
|
|
3227
|
+
techResult
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3131
3231
|
async function runRulesInit(options) {
|
|
3132
3232
|
try {
|
|
3133
3233
|
const scope = normalizeScope(options.scope);
|
|
@@ -3135,68 +3235,21 @@ async function runRulesInit(options) {
|
|
|
3135
3235
|
const overwrite = Boolean(options.overwrite);
|
|
3136
3236
|
const cwd = process.cwd();
|
|
3137
3237
|
const platform = await resolvePlatform(options.platform, scope, cwd);
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
const workspaceRuleFile = await resolveWorkspaceRuleFileForGlobalScope(platform, cwd);
|
|
3147
|
-
const globalRuleFile = expandPath(WORKFLOW_PROFILES[platform].global.ruleFilesByPriority[0], cwd);
|
|
3148
|
-
if (workspaceRuleFile && path.resolve(workspaceRuleFile) !== path.resolve(globalRuleFile)) {
|
|
3149
|
-
targets.push({ ruleFilePath: workspaceRuleFile });
|
|
3150
|
-
}
|
|
3151
|
-
}
|
|
3152
|
-
|
|
3153
|
-
const template = buildEngineeringRulesTemplate();
|
|
3154
|
-
const engineeringResults = [];
|
|
3155
|
-
for (const target of targets) {
|
|
3156
|
-
const rulesFilePath = path.join(path.dirname(target.ruleFilePath), "ENGINEERING_RULES.md");
|
|
3157
|
-
const rulesFileResult = await writeTextFile({
|
|
3158
|
-
targetPath: rulesFilePath,
|
|
3159
|
-
content: `${template}\n`,
|
|
3160
|
-
overwrite,
|
|
3161
|
-
dryRun
|
|
3162
|
-
});
|
|
3163
|
-
const blockResult = await upsertEngineeringRulesBlock({
|
|
3164
|
-
ruleFilePath: target.ruleFilePath,
|
|
3165
|
-
platform,
|
|
3166
|
-
engineeringRulesFilePath: rulesFilePath,
|
|
3167
|
-
techMdFilePath: techMdPath,
|
|
3168
|
-
dryRun
|
|
3169
|
-
});
|
|
3170
|
-
engineeringResults.push({
|
|
3171
|
-
ruleFilePath: target.ruleFilePath,
|
|
3172
|
-
rulesFilePath,
|
|
3173
|
-
rulesFileResult,
|
|
3174
|
-
blockResult
|
|
3175
|
-
});
|
|
3176
|
-
}
|
|
3177
|
-
|
|
3178
|
-
let techResult = null;
|
|
3179
|
-
if (!options.skipTech) {
|
|
3180
|
-
const snapshot = await collectTechSnapshot(workspaceRoot);
|
|
3181
|
-
const content = buildTechMd(snapshot);
|
|
3182
|
-
const fileResult = await writeTextFile({
|
|
3183
|
-
targetPath: techMdPath,
|
|
3184
|
-
content: `${content}\n`,
|
|
3185
|
-
overwrite,
|
|
3186
|
-
dryRun
|
|
3187
|
-
});
|
|
3188
|
-
techResult = {
|
|
3189
|
-
...fileResult,
|
|
3190
|
-
snapshot
|
|
3191
|
-
};
|
|
3192
|
-
}
|
|
3238
|
+
const initResult = await upsertEngineeringArtifacts({
|
|
3239
|
+
platform,
|
|
3240
|
+
scope,
|
|
3241
|
+
overwrite,
|
|
3242
|
+
skipTech: Boolean(options.skipTech),
|
|
3243
|
+
dryRun,
|
|
3244
|
+
cwd
|
|
3245
|
+
});
|
|
3193
3246
|
|
|
3194
3247
|
printRulesInitSummary({
|
|
3195
3248
|
platform,
|
|
3196
3249
|
scope,
|
|
3197
3250
|
dryRun,
|
|
3198
|
-
engineeringResults,
|
|
3199
|
-
techResult
|
|
3251
|
+
engineeringResults: initResult.engineeringResults,
|
|
3252
|
+
techResult: initResult.techResult
|
|
3200
3253
|
});
|
|
3201
3254
|
|
|
3202
3255
|
if (dryRun) {
|