@attalabs/vinaya 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -1
- package/aeg-root/contracts/architect-planner.md +72 -0
- package/aeg-root/enforcement.md +3 -2
- package/aeg-root/roles/architect.md +91 -0
- package/aeg-root/roles/planner.md +14 -15
- package/aeg-root/tranche-model.md +9 -1
- package/dist/checks/bin/check-body-bare-digits.js +262 -26
- package/dist/checks/bin/check-branch-topology.js +171 -23
- package/dist/checks/bin/check-brief-shape.js +171 -23
- package/dist/checks/bin/check-closes-n.js +171 -23
- package/dist/checks/bin/check-coherence.js +265 -29
- package/dist/checks/bin/check-dead-branch-push.js +171 -23
- package/dist/checks/bin/check-dispatch-readiness.js +329 -53
- package/dist/checks/bin/check-doc-coverage-push.js +266 -30
- package/dist/checks/bin/check-doc-coverage.js +266 -30
- package/dist/checks/bin/check-evidence-fresh.js +171 -23
- package/dist/checks/bin/check-first-push-dispatch.js +330 -54
- package/dist/checks/bin/check-issue-assignment.js +171 -23
- package/dist/checks/bin/check-no-disk-state.js +171 -23
- package/dist/checks/bin/check-reader-resolvable-prose.js +465 -46
- package/dist/checks/bin/check-registry-gates.js +171 -23
- package/dist/checks/bin/check-retired-vocabulary.js +3595 -0
- package/dist/checks/bin/check-review-gate.js +262 -26
- package/dist/checks/bin/check-single-plan-pr.js +171 -23
- package/dist/checks/bin/check-test-plan.js +171 -23
- package/dist/index.js +2959 -1581
- package/package.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__0e95dv5._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/1q96_modules_@clerk_nextjs_dist_esm_app-router_client_keyless-creator-reader_0lom2js.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__029-1ch._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0q56ohl._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__0z47hfl._.js → [root-of-the-server]__0xdkvod._.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1_ojzp1._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1d_8nm4._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1zkwtx8._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__210ehg9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_00yjcv1._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0rix02i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_18-d2be._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1fqw88f._.js +5 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1gw6vc9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_1vo08dj._.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2myi4phnshkfw.js → 1zaotsjjq5o6o.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{415k4k1rf3swg.js → 295mri9sjante.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3z3a3gb6he23i.js → 2opd70pfbc5yx.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/templates/noop-check.template.ts +18 -0
- package/templates/role.template.md +20 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{8tXGbArNoU7_MriIVYvN0 → SG6gXRhit12wl-8HLX9d3}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{8tXGbArNoU7_MriIVYvN0 → SG6gXRhit12wl-8HLX9d3}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{8tXGbArNoU7_MriIVYvN0 → SG6gXRhit12wl-8HLX9d3}/_ssgManifest.js +0 -0
|
@@ -270,6 +270,9 @@ function issueListByLabelArgs(owner, repo, label) {
|
|
|
270
270
|
"200"
|
|
271
271
|
];
|
|
272
272
|
}
|
|
273
|
+
function ghIssueListByLabel(owner, repo, label) {
|
|
274
|
+
return JSON.parse(run(issueListByLabelArgs(owner, repo, label)));
|
|
275
|
+
}
|
|
273
276
|
async function ghIssueListByLabelAsync(owner, repo, label) {
|
|
274
277
|
return JSON.parse(await runAsync(issueListByLabelArgs(owner, repo, label)));
|
|
275
278
|
}
|
|
@@ -285,18 +288,6 @@ async function ghIssueListByAnyLabelAsync(owner, repo, labels) {
|
|
|
285
288
|
return dedupeByNumber(perLabel.flat());
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
// ../../packages/aeg-forge-state/src/fetch-milestone.ts
|
|
289
|
-
function findMilestoneForSlug(owner, repo, slug) {
|
|
290
|
-
const milestones = ghApiGet(`repos/${owner}/${repo}/milestones?state=all&per_page=100`);
|
|
291
|
-
const match = milestones.find((m) => m.title === slug);
|
|
292
|
-
if (!match)
|
|
293
|
-
return null;
|
|
294
|
-
return {
|
|
295
|
-
goal: match.description ?? "",
|
|
296
|
-
lifecycle: match.state === "closed" ? "complete" : "active"
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
291
|
// ../../packages/aeg-forge-state/src/labels.ts
|
|
301
292
|
var LABELS = [
|
|
302
293
|
{
|
|
@@ -539,6 +530,66 @@ function resolveTaskIssueRef(title, labels) {
|
|
|
539
530
|
return { trancheSlug, taskId };
|
|
540
531
|
}
|
|
541
532
|
|
|
533
|
+
// ../../packages/aeg-forge-state/src/fetch-milestone.ts
|
|
534
|
+
var INTENTS_HEADING = /^#{1,6}\s*Tranche intents\s*$/im;
|
|
535
|
+
var NEXT_HEADING = /^#{1,6}\s+\S/m;
|
|
536
|
+
var INTENT_BULLET = /^-\s+([a-z0-9][a-z0-9-]*)\s*:\s*(.+)$/i;
|
|
537
|
+
function intentGoalForSlug(description, slug) {
|
|
538
|
+
const text = stripCode(description, { inlineSpans: "keep" });
|
|
539
|
+
const start = text.match(INTENTS_HEADING);
|
|
540
|
+
if (!start || start.index === undefined)
|
|
541
|
+
return "";
|
|
542
|
+
const rest = text.slice(start.index + start[0].length);
|
|
543
|
+
const next = rest.match(NEXT_HEADING);
|
|
544
|
+
const section = rest.slice(0, next && next.index !== undefined ? next.index : rest.length);
|
|
545
|
+
for (const line of section.split(`
|
|
546
|
+
`)) {
|
|
547
|
+
const trimmed = line.trim();
|
|
548
|
+
if (trimmed.length === 0)
|
|
549
|
+
continue;
|
|
550
|
+
const m = trimmed.match(INTENT_BULLET);
|
|
551
|
+
if (m && (m[1] ?? "").toLowerCase() === slug.toLowerCase())
|
|
552
|
+
return (m[2] ?? "").trim();
|
|
553
|
+
}
|
|
554
|
+
return "";
|
|
555
|
+
}
|
|
556
|
+
function matchesLegacyMilestone(milestones, slug) {
|
|
557
|
+
return milestones.find((m) => m.title === slug) ?? null;
|
|
558
|
+
}
|
|
559
|
+
function factsFromLegacyMilestone(milestone) {
|
|
560
|
+
return {
|
|
561
|
+
goal: milestone.description ?? "",
|
|
562
|
+
lifecycle: milestone.state === "closed" ? "complete" : "active"
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
function resolveLegacyFacts(milestone, labelIssues) {
|
|
566
|
+
if (milestone.state === "closed" && labelIssues.length > 0) {
|
|
567
|
+
return { goal: milestone.description ?? "", lifecycle: lifecycleFromIssues(labelIssues) };
|
|
568
|
+
}
|
|
569
|
+
return factsFromLegacyMilestone(milestone);
|
|
570
|
+
}
|
|
571
|
+
function lifecycleFromIssues(issues) {
|
|
572
|
+
if (issues.length === 0)
|
|
573
|
+
return "planned";
|
|
574
|
+
return issues.some((i) => i.state === "OPEN") ? "active" : "complete";
|
|
575
|
+
}
|
|
576
|
+
function goalFromMilestones(milestones, slug) {
|
|
577
|
+
for (const m of milestones) {
|
|
578
|
+
const goal = intentGoalForSlug(m.description ?? "", slug);
|
|
579
|
+
if (goal)
|
|
580
|
+
return goal;
|
|
581
|
+
}
|
|
582
|
+
return "";
|
|
583
|
+
}
|
|
584
|
+
function findMilestoneForSlug(owner, repo, slug) {
|
|
585
|
+
const milestones = ghApiGet(`repos/${owner}/${repo}/milestones?state=all&per_page=100`);
|
|
586
|
+
const legacy = matchesLegacyMilestone(milestones, slug);
|
|
587
|
+
const issues = ghIssueListByLabel(owner, repo, trancheLabel(slug));
|
|
588
|
+
if (legacy)
|
|
589
|
+
return resolveLegacyFacts(legacy, issues);
|
|
590
|
+
return { goal: goalFromMilestones(milestones, slug), lifecycle: lifecycleFromIssues(issues) };
|
|
591
|
+
}
|
|
592
|
+
|
|
542
593
|
// ../../packages/aeg-forge-state/src/derive-from-forge.ts
|
|
543
594
|
function trancheFromIssues(slug, issues, known) {
|
|
544
595
|
return {
|
|
@@ -2722,16 +2773,18 @@ function checkDeadBranchPush(input) {
|
|
|
2722
2773
|
}
|
|
2723
2774
|
// ../../packages/aeg-core/src/reader-resolvable-prose.ts
|
|
2724
2775
|
var SHIPS_PREFIX = "aeg-root/";
|
|
2725
|
-
|
|
2776
|
+
function shipsArchivePrefix(shipsPrefix) {
|
|
2777
|
+
return `${shipsPrefix}tranches/completed/`;
|
|
2778
|
+
}
|
|
2726
2779
|
function isSpecFile2(path) {
|
|
2727
2780
|
return path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md");
|
|
2728
2781
|
}
|
|
2729
2782
|
function isClaudeMdFile(path) {
|
|
2730
2783
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
2731
2784
|
}
|
|
2732
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix) {
|
|
2733
|
-
if (path.startsWith(
|
|
2734
|
-
return path.startsWith(
|
|
2785
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
2786
|
+
if (path.startsWith(shipsPrefix)) {
|
|
2787
|
+
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
2735
2788
|
}
|
|
2736
2789
|
if (path.startsWith(readerFacingPrefix) && path.endsWith(readerFacingSuffix)) {
|
|
2737
2790
|
return "reader-facing";
|
|
@@ -2766,7 +2819,7 @@ function legacySlugPattern(legacySlugs) {
|
|
|
2766
2819
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
2767
2820
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
2768
2821
|
}
|
|
2769
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = []) {
|
|
2822
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX) {
|
|
2770
2823
|
const findings = [];
|
|
2771
2824
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
2772
2825
|
const patterns = [
|
|
@@ -2775,7 +2828,7 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
2775
2828
|
...legacyPattern ? [{ pattern: legacyPattern, what: "an internal tranche slug", group: 2 }] : []
|
|
2776
2829
|
];
|
|
2777
2830
|
for (const file of files) {
|
|
2778
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix);
|
|
2831
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
2779
2832
|
if (!cls || !SWEPT_CLASSES.has(cls))
|
|
2780
2833
|
continue;
|
|
2781
2834
|
const scrubbed = stripNonProse(file.path, file.content);
|
|
@@ -2821,10 +2874,10 @@ function definesOrLinksGlossary(content, term) {
|
|
|
2821
2874
|
return true;
|
|
2822
2875
|
return /docs\/glossary|glossary\.md/i.test(content);
|
|
2823
2876
|
}
|
|
2824
|
-
function checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix) {
|
|
2877
|
+
function checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
2825
2878
|
const findings = [];
|
|
2826
2879
|
for (const file of files) {
|
|
2827
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix);
|
|
2880
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
2828
2881
|
if (!cls || !SWEPT_CLASSES.has(cls))
|
|
2829
2882
|
continue;
|
|
2830
2883
|
const scrubbed = stripNonProse(file.path, file.content);
|
|
@@ -2843,10 +2896,10 @@ function checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, read
|
|
|
2843
2896
|
}
|
|
2844
2897
|
return findings;
|
|
2845
2898
|
}
|
|
2846
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = []) {
|
|
2899
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX) {
|
|
2847
2900
|
return [
|
|
2848
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs),
|
|
2849
|
-
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix)
|
|
2901
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix),
|
|
2902
|
+
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
2850
2903
|
];
|
|
2851
2904
|
}
|
|
2852
2905
|
function parseGlossaryTerms(glossaryContent) {
|
|
@@ -2860,6 +2913,101 @@ function parseGlossaryTerms(glossaryContent) {
|
|
|
2860
2913
|
}
|
|
2861
2914
|
return terms;
|
|
2862
2915
|
}
|
|
2916
|
+
// ../../packages/aeg-core/src/retired-vocabulary.ts
|
|
2917
|
+
var RETIRED_PATTERNS = [
|
|
2918
|
+
String.raw`\bD-[0-9]{3}\b`,
|
|
2919
|
+
"D-(###|NNN|nnn|xxx)",
|
|
2920
|
+
"decision (entry|logged)",
|
|
2921
|
+
"decision-log entry",
|
|
2922
|
+
"decision log entry",
|
|
2923
|
+
"decision log(s|ged|ging)?([^a-z]|$)",
|
|
2924
|
+
"decision-log",
|
|
2925
|
+
"decision entr",
|
|
2926
|
+
"decisions? (are |is )?logged",
|
|
2927
|
+
"log entries",
|
|
2928
|
+
String.raw`decisions\.md`,
|
|
2929
|
+
"decisions-legacy",
|
|
2930
|
+
"CONTRADICTION",
|
|
2931
|
+
"assumes Tier 3",
|
|
2932
|
+
"Lock: ?YES",
|
|
2933
|
+
"Lock: ?NO",
|
|
2934
|
+
"lock approvals?",
|
|
2935
|
+
"approves locks",
|
|
2936
|
+
"Conforms to lock",
|
|
2937
|
+
"Challenges lock",
|
|
2938
|
+
"checkDecisionNumbersFresh",
|
|
2939
|
+
String.raw`roles/team-leader\.md`,
|
|
2940
|
+
String.raw`\(,`,
|
|
2941
|
+
String.raw`,\)`,
|
|
2942
|
+
String.raw`\(\.\)`
|
|
2943
|
+
];
|
|
2944
|
+
var RETIRED_EXEMPT_SUBSTRINGS = [
|
|
2945
|
+
"docs/decisions-legacy.md",
|
|
2946
|
+
"apps/herald-ai/docs/",
|
|
2947
|
+
"apps/vada-ai/docs/",
|
|
2948
|
+
"aeg-root/tranches/completed/",
|
|
2949
|
+
"packages/aeg-core/src/docs/published-prose",
|
|
2950
|
+
"packages/aeg-core/src/retired-vocabulary.test.ts",
|
|
2951
|
+
"packages/aeg-core/src/retired-vocabulary.ts",
|
|
2952
|
+
"/fixtures/",
|
|
2953
|
+
"/node_modules/",
|
|
2954
|
+
"/.next/",
|
|
2955
|
+
"/.turbo/"
|
|
2956
|
+
];
|
|
2957
|
+
var PATTERN_EXEMPT = {
|
|
2958
|
+
[String.raw`\bD-[0-9]{3}\b`]: ["./CLAUDE.md"],
|
|
2959
|
+
[String.raw`decisions\.md`]: [
|
|
2960
|
+
"docs-index.md",
|
|
2961
|
+
"apps/vada-ai/specs/legacy/README.md",
|
|
2962
|
+
"apps/vada-ai/specs/vada-product-spec.md",
|
|
2963
|
+
"apps/vada-ai/web/CLAUDE.md",
|
|
2964
|
+
"apps/vada-ai/CLAUDE.md"
|
|
2965
|
+
],
|
|
2966
|
+
"decisions-legacy": [
|
|
2967
|
+
"packages/aeg-core/src/file-classify.ts",
|
|
2968
|
+
"packages/aeg-core/src/file-classify.test.ts",
|
|
2969
|
+
"packages/aeg-core/src/pr-tier.test.ts",
|
|
2970
|
+
"docs-index.md",
|
|
2971
|
+
".claude/skills/database/SKILL.md",
|
|
2972
|
+
".claude/skills/vada-architecture/SKILL.md",
|
|
2973
|
+
"apps/vada-ai/specs/vada-byok-principles.md",
|
|
2974
|
+
"apps/vada-ai/web/CLAUDE.md",
|
|
2975
|
+
"apps/vada-ai/CLAUDE.md"
|
|
2976
|
+
],
|
|
2977
|
+
CONTRADICTION: ["apps/vada-ai/specs/vada-reviewers-spec.md"]
|
|
2978
|
+
};
|
|
2979
|
+
function lineNumbers(content, pattern) {
|
|
2980
|
+
const out = [];
|
|
2981
|
+
const lines = content.split(`
|
|
2982
|
+
`);
|
|
2983
|
+
for (let i = 0;i < lines.length; i++) {
|
|
2984
|
+
if (pattern.test(lines[i] ?? ""))
|
|
2985
|
+
out.push(i + 1);
|
|
2986
|
+
}
|
|
2987
|
+
return out;
|
|
2988
|
+
}
|
|
2989
|
+
function scanRetiredVocabulary(files) {
|
|
2990
|
+
const findings = [];
|
|
2991
|
+
for (const file of files) {
|
|
2992
|
+
if (RETIRED_EXEMPT_SUBSTRINGS.some((e) => file.path.includes(e)))
|
|
2993
|
+
continue;
|
|
2994
|
+
for (const pattern of RETIRED_PATTERNS) {
|
|
2995
|
+
const patternExempt = PATTERN_EXEMPT[pattern] ?? [];
|
|
2996
|
+
if (patternExempt.some((e) => file.path.includes(e)))
|
|
2997
|
+
continue;
|
|
2998
|
+
const re = new RegExp(pattern);
|
|
2999
|
+
for (const line of lineNumbers(file.content, re)) {
|
|
3000
|
+
findings.push({
|
|
3001
|
+
file: file.path,
|
|
3002
|
+
line,
|
|
3003
|
+
pattern,
|
|
3004
|
+
message: `claims a retired AEG mechanism is still live (matches /${pattern}/)`
|
|
3005
|
+
});
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
return findings;
|
|
3010
|
+
}
|
|
2863
3011
|
// ../../packages/aeg-core/src/dispatch-gate.ts
|
|
2864
3012
|
function isHandClosedByRecognizedPrincipal(dep, principalAllowlist) {
|
|
2865
3013
|
return dep.issueState === "closed" && dep.stateReason === "completed" && isPrincipal(dep.closedByActor ?? null, principalAllowlist);
|