@attalabs/vinaya 0.33.0 → 0.35.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 +104 -201
- package/README.md +1 -1
- package/aeg-root/enforcement.md +1 -1
- package/aeg-root/glossary.md +4 -0
- package/aeg-root/roles/developer.md +3 -0
- package/aeg-root/roles/operator.md +30 -10
- package/aeg-root/roles/planner/reference.md +3 -2
- package/aeg-root/roles/planner.md +3 -1
- package/aeg-root/templates/brief-template.md +9 -7
- package/aeg-root/templates/pr-report-template.md +3 -1
- package/dist/checks/bin/check-body-bare-digits.js +107 -28
- package/dist/checks/bin/check-branch-topology.js +94 -25
- package/dist/checks/bin/check-brief-shape.js +113 -33
- package/dist/checks/bin/check-changeset-coverage.js +369 -92
- package/dist/checks/bin/check-closes-n.js +94 -25
- package/dist/checks/bin/check-coherence.js +124 -29
- package/dist/checks/bin/check-dead-branch-push.js +79 -25
- package/dist/checks/bin/check-dispatch-readiness.js +122 -28
- package/dist/checks/bin/check-doc-coverage-push.js +365 -88
- package/dist/checks/bin/check-doc-coverage.js +367 -90
- package/dist/checks/bin/check-doctrine-no-procedures.js +107 -28
- package/dist/checks/bin/check-doctrine-portability.js +366 -89
- package/dist/checks/bin/check-evidence-fresh.js +338 -61
- package/dist/checks/bin/check-exec-bits.js +363 -86
- package/dist/checks/bin/check-first-push-dispatch.js +122 -28
- package/dist/checks/bin/check-issue-assignment.js +94 -25
- package/dist/checks/bin/check-issue-milestone-attach.js +79 -25
- package/dist/checks/bin/check-issue-objectives-numbering.js +606 -26
- package/dist/checks/bin/check-issue-parts-coverage.js +79 -25
- package/dist/checks/bin/check-issue-surface-globs.js +162 -34
- package/dist/checks/bin/check-issue-title-grammar.js +79 -25
- package/dist/checks/bin/check-issue-tranche-label.js +79 -25
- package/dist/checks/bin/check-main-branch-refusal.js +79 -25
- package/dist/checks/bin/check-no-disk-state.js +79 -25
- package/dist/checks/bin/check-pr-premise-reassert.js +107 -28
- package/dist/checks/bin/check-pr-report-density.js +79 -25
- package/dist/checks/bin/check-principal-test-plan-wait.js +79 -25
- package/dist/checks/bin/check-quoted-command.js +282 -39
- package/dist/checks/bin/check-reader-resolvable-prose.js +333 -47
- package/dist/checks/bin/check-registry-gates.js +79 -25
- package/dist/checks/bin/check-retired-vocabulary.js +282 -39
- package/dist/checks/bin/check-review-gate.js +111 -31
- package/dist/checks/bin/check-single-plan-pr.js +79 -25
- package/dist/checks/bin/check-surface-scope.js +94 -25
- package/dist/checks/bin/check-test-plan.js +79 -25
- package/dist/checks/bin/check-token-collection-wired.js +79 -25
- package/dist/checks/bin/check-token-report.js +79 -25
- package/dist/checks/bin/check-workspace-escape.js +364 -87
- package/dist/index.js +2713 -1609
- package/dist/lib/pre-push-cache-test-run.js +226 -16
- package/dist/lib/pre-push-select-tests.js +48 -5
- package/package.json +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +153 -37
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +87 -24
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +9 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +13 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +7 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +5 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +116 -20
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +100 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-cutovers.ts +49 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +60 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +138 -54
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +26 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives-cutover-config.ts +31 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +15 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +122 -23
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +18 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +24 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +15 -10
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +16 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-phase-history.ts +194 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +312 -53
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +62 -8
- 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/_head.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.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 +3 -3
- 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]__02a-3g8._.js +4 -4
- 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]__074w9nf._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__18paley._.js → [root-of-the-server]__0zc_0gx._.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_15gdg48._.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.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 +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{22s44f5k3ecmj.js → 3goaig_rysc6p.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1ce2dj27_cgbj.js → 3ip5z3cf43bgo.js} +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{34hhdtbp20krb.js → 3u9emqjwpd0t9.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bm4nrrzwc7zi.css +0 -1
- /package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/{aeg-core → vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/aeg-core}/bin/verify-coherence.ts +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → ca66rAHI_w9D7S7ceXDvR}/_ssgManifest.js +0 -0
|
@@ -198,8 +198,8 @@ function maskIndentedCode(body, fill) {
|
|
|
198
198
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
199
199
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
200
200
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
201
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
202
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
201
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
202
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
203
203
|
function splitSlugQualifiedEdge(edge) {
|
|
204
204
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
205
205
|
if (!m)
|
|
@@ -2620,7 +2620,7 @@ function isIssueNotFoundError(err) {
|
|
|
2620
2620
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2621
2621
|
}
|
|
2622
2622
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2623
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2623
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2624
2624
|
return { kind: "none" };
|
|
2625
2625
|
if (issue !== null)
|
|
2626
2626
|
return { kind: "issue", issue };
|
|
@@ -2896,9 +2896,18 @@ var COMMIT_TYPES = [
|
|
|
2896
2896
|
];
|
|
2897
2897
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2898
2898
|
function checkForgeTitle(title) {
|
|
2899
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2899
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2900
2900
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2901
2901
|
return { status: "pass", errors: [] };
|
|
2902
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2903
|
+
if (letteredTaskId) {
|
|
2904
|
+
return {
|
|
2905
|
+
status: "fail",
|
|
2906
|
+
errors: [
|
|
2907
|
+
`brief-validation title: "${title}" names task id \`${letteredTaskId[1]}\` — task ids are whole numbers (\`1\`, \`2\`), never lettered (\`2a\`). \`vinaya task run\` and \`task dispatch\` refuse a non-numeric id, so a plan titled this way names a task that cannot be started.`
|
|
2908
|
+
]
|
|
2909
|
+
};
|
|
2910
|
+
}
|
|
2902
2911
|
return {
|
|
2903
2912
|
status: "fail",
|
|
2904
2913
|
errors: [
|
|
@@ -2931,19 +2940,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2931
2940
|
]
|
|
2932
2941
|
};
|
|
2933
2942
|
}
|
|
2934
|
-
function
|
|
2943
|
+
function rolloutRuleFor(message) {
|
|
2935
2944
|
if (message.startsWith("brief-validation unpinned code claim:") || message.startsWith("brief-validation commands carry output:") || message.startsWith("brief-validation consumer tests:") || message.startsWith("brief-validation defeat cases:")) {
|
|
2936
|
-
return
|
|
2945
|
+
return "briefRules";
|
|
2937
2946
|
}
|
|
2938
2947
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2939
|
-
return
|
|
2948
|
+
return "agentBoxes";
|
|
2949
|
+
return null;
|
|
2950
|
+
}
|
|
2951
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2952
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2953
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2954
|
+
};
|
|
2955
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2956
|
+
const rule = rolloutRuleFor(message);
|
|
2957
|
+
if (rule === "briefRules")
|
|
2958
|
+
return cutovers.briefRulesSincePr;
|
|
2959
|
+
if (rule === "agentBoxes")
|
|
2960
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2940
2961
|
return null;
|
|
2941
2962
|
}
|
|
2942
|
-
function partitionBriefErrorsByRollout(errors, prNumber) {
|
|
2963
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2943
2964
|
const blocking = [];
|
|
2944
2965
|
const info = [];
|
|
2945
2966
|
for (const e of errors) {
|
|
2946
|
-
const threshold = rolloutThresholdFor(e);
|
|
2967
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2947
2968
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2948
2969
|
(grandfathered ? info : blocking).push(e);
|
|
2949
2970
|
}
|
|
@@ -3411,8 +3432,8 @@ function checkIssueRationale(body) {
|
|
|
3411
3432
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3412
3433
|
}
|
|
3413
3434
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3414
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3415
|
-
if (issueNumber !== null && issueNumber <
|
|
3435
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3436
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3416
3437
|
return { status: "pass", errors: [] };
|
|
3417
3438
|
const result = objectivesOf(body);
|
|
3418
3439
|
if (result.ok)
|
|
@@ -3488,6 +3509,8 @@ function parseIssueSurface(body) {
|
|
|
3488
3509
|
function globCoversPath(glob, path) {
|
|
3489
3510
|
const g = glob.replace(/\/\*\*?$/, "").replace(/\/+$/, "");
|
|
3490
3511
|
const p = path.replace(/\/+$/, "");
|
|
3512
|
+
if (g === "*")
|
|
3513
|
+
return !p.includes("/");
|
|
3491
3514
|
return g === p || g.startsWith(`${p}/`) || p.startsWith(`${g}/`);
|
|
3492
3515
|
}
|
|
3493
3516
|
function checkSurfaceGlobsResolve(body, resolvesToFile) {
|
|
@@ -3857,7 +3880,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3857
3880
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3858
3881
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3859
3882
|
}
|
|
3860
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3883
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3861
3884
|
const failures = [];
|
|
3862
3885
|
for (const [slug, issues] of issuesBySlug) {
|
|
3863
3886
|
for (const issue of issues) {
|
|
@@ -3866,7 +3889,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3866
3889
|
const errors = [
|
|
3867
3890
|
...checkIssueRationale(issue.body).errors,
|
|
3868
3891
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3869
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3892
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3870
3893
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3871
3894
|
];
|
|
3872
3895
|
if (errors.length === 0)
|
|
@@ -4489,13 +4512,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4489
4512
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4490
4513
|
return `${shipsPrefix}tranches/completed/`;
|
|
4491
4514
|
}
|
|
4492
|
-
|
|
4493
|
-
|
|
4515
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4516
|
+
function normalizeSpecPath(entry) {
|
|
4517
|
+
let out = entry.replace(/\\/g, "/");
|
|
4518
|
+
while (out.startsWith("./"))
|
|
4519
|
+
out = out.slice(2);
|
|
4520
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4521
|
+
while (out.endsWith("/"))
|
|
4522
|
+
out = out.slice(0, -1);
|
|
4523
|
+
return out;
|
|
4524
|
+
}
|
|
4525
|
+
function isSpecFile2(path, specPaths) {
|
|
4526
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4527
|
+
return true;
|
|
4528
|
+
if (!path.endsWith(".md"))
|
|
4529
|
+
return false;
|
|
4530
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4494
4531
|
}
|
|
4495
4532
|
function isClaudeMdFile(path) {
|
|
4496
4533
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4497
4534
|
}
|
|
4498
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4535
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4499
4536
|
if (path.startsWith(shipsPrefix)) {
|
|
4500
4537
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4501
4538
|
}
|
|
@@ -4504,7 +4541,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4504
4541
|
}
|
|
4505
4542
|
if (isClaudeMdFile(path))
|
|
4506
4543
|
return "internal";
|
|
4507
|
-
if (isSpecFile2(path))
|
|
4544
|
+
if (isSpecFile2(path, specPaths))
|
|
4508
4545
|
return "spec";
|
|
4509
4546
|
if (isProductScopeFile(path))
|
|
4510
4547
|
return "product";
|
|
@@ -4533,13 +4570,14 @@ function lineAt(content, index) {
|
|
|
4533
4570
|
}
|
|
4534
4571
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4535
4572
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4573
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4536
4574
|
function legacySlugPattern(legacySlugs) {
|
|
4537
4575
|
if (legacySlugs.length === 0)
|
|
4538
4576
|
return null;
|
|
4539
4577
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4540
4578
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4541
4579
|
}
|
|
4542
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4580
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4543
4581
|
const findings = [];
|
|
4544
4582
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4545
4583
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4551,8 +4589,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4551
4589
|
const productPatterns = [
|
|
4552
4590
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4553
4591
|
];
|
|
4592
|
+
const specPatterns = [
|
|
4593
|
+
...patterns,
|
|
4594
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4595
|
+
];
|
|
4554
4596
|
for (const file of files) {
|
|
4555
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4597
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4556
4598
|
if (!cls || cls === "internal")
|
|
4557
4599
|
continue;
|
|
4558
4600
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4561,15 +4603,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4561
4603
|
continue;
|
|
4562
4604
|
const blocking = cls === "product" || cls === "spec";
|
|
4563
4605
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4564
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4606
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4565
4607
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4566
4608
|
pattern.lastIndex = 0;
|
|
4567
4609
|
let match = pattern.exec(scrubbed);
|
|
4568
4610
|
while (match !== null) {
|
|
4569
4611
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4612
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4570
4613
|
findings.push({
|
|
4571
4614
|
file: file.path,
|
|
4572
|
-
line: lineAt(scrubbed,
|
|
4615
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4573
4616
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4574
4617
|
blocking
|
|
4575
4618
|
});
|
|
@@ -4755,9 +4798,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4755
4798
|
}
|
|
4756
4799
|
return findings;
|
|
4757
4800
|
}
|
|
4758
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4801
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4759
4802
|
return [
|
|
4760
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4803
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4761
4804
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4762
4805
|
];
|
|
4763
4806
|
}
|
|
@@ -5222,7 +5265,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5222
5265
|
}).merge(ObservedSchema);
|
|
5223
5266
|
var TaskStatusResultSchema = z.object({
|
|
5224
5267
|
items: z.array(TaskStatusItemSchema),
|
|
5225
|
-
nextCursor: z.string().nullable()
|
|
5268
|
+
nextCursor: z.string().nullable(),
|
|
5269
|
+
table: z.string()
|
|
5226
5270
|
});
|
|
5227
5271
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5228
5272
|
var EscalationInputsSchema = z.object({
|
|
@@ -5566,6 +5610,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5566
5610
|
}
|
|
5567
5611
|
return findings;
|
|
5568
5612
|
}
|
|
5613
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5614
|
+
var NO_GATE_CUTOVERS = {
|
|
5615
|
+
objectivesSinceIssue: null,
|
|
5616
|
+
briefSectionsSinceIssue: null,
|
|
5617
|
+
documentationSinceIssue: null,
|
|
5618
|
+
briefRulesSincePr: null,
|
|
5619
|
+
agentBoxesRefusedSincePr: null
|
|
5620
|
+
};
|
|
5569
5621
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5570
5622
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5571
5623
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6015,6 +6067,8 @@ function attemptFromEnv(value) {
|
|
|
6015
6067
|
function provenanceFor(input) {
|
|
6016
6068
|
if (input.provenance)
|
|
6017
6069
|
return input.provenance;
|
|
6070
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6071
|
+
return "unavailable";
|
|
6018
6072
|
if (input.env.role || input.env.task)
|
|
6019
6073
|
return "env_correlated";
|
|
6020
6074
|
return "unavailable";
|
|
@@ -6035,7 +6089,7 @@ function buildHeader(input) {
|
|
|
6035
6089
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6036
6090
|
const round = roundFromEnv(input.env.round);
|
|
6037
6091
|
const subject = {
|
|
6038
|
-
issue: issueFromTask(input.env.task),
|
|
6092
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6039
6093
|
role,
|
|
6040
6094
|
...round !== undefined ? { round } : {},
|
|
6041
6095
|
...input.subject ?? {}
|