@attalabs/vinaya 0.33.0 → 0.34.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/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 +2 -1
- 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 +102 -26
- package/dist/checks/bin/check-branch-topology.js +81 -25
- package/dist/checks/bin/check-brief-shape.js +108 -31
- package/dist/checks/bin/check-changeset-coverage.js +331 -87
- package/dist/checks/bin/check-closes-n.js +81 -25
- package/dist/checks/bin/check-coherence.js +108 -27
- package/dist/checks/bin/check-dead-branch-push.js +77 -25
- package/dist/checks/bin/check-dispatch-readiness.js +106 -26
- package/dist/checks/bin/check-doc-coverage-push.js +327 -83
- package/dist/checks/bin/check-doc-coverage.js +329 -85
- package/dist/checks/bin/check-doctrine-no-procedures.js +102 -26
- package/dist/checks/bin/check-doctrine-portability.js +328 -84
- package/dist/checks/bin/check-evidence-fresh.js +300 -56
- package/dist/checks/bin/check-exec-bits.js +325 -81
- package/dist/checks/bin/check-first-push-dispatch.js +106 -26
- package/dist/checks/bin/check-issue-assignment.js +81 -25
- package/dist/checks/bin/check-issue-milestone-attach.js +77 -25
- package/dist/checks/bin/check-issue-objectives-numbering.js +603 -26
- package/dist/checks/bin/check-issue-parts-coverage.js +77 -25
- package/dist/checks/bin/check-issue-surface-globs.js +146 -32
- package/dist/checks/bin/check-issue-title-grammar.js +77 -25
- package/dist/checks/bin/check-issue-tranche-label.js +77 -25
- package/dist/checks/bin/check-main-branch-refusal.js +77 -25
- package/dist/checks/bin/check-no-disk-state.js +77 -25
- package/dist/checks/bin/check-pr-premise-reassert.js +102 -26
- package/dist/checks/bin/check-pr-report-density.js +77 -25
- package/dist/checks/bin/check-principal-test-plan-wait.js +77 -25
- package/dist/checks/bin/check-quoted-command.js +244 -34
- package/dist/checks/bin/check-reader-resolvable-prose.js +295 -42
- package/dist/checks/bin/check-registry-gates.js +77 -25
- package/dist/checks/bin/check-retired-vocabulary.js +244 -34
- package/dist/checks/bin/check-review-gate.js +106 -29
- package/dist/checks/bin/check-single-plan-pr.js +77 -25
- package/dist/checks/bin/check-surface-scope.js +81 -25
- package/dist/checks/bin/check-test-plan.js +77 -25
- package/dist/checks/bin/check-token-collection-wired.js +77 -25
- package/dist/checks/bin/check-token-report.js +77 -25
- package/dist/checks/bin/check-workspace-escape.js +326 -82
- package/dist/index.js +2862 -1953
- package/dist/lib/pre-push-cache-test-run.js +190 -11
- package/dist/lib/pre-push-select-tests.js +45 -3
- package/package.json +1 -1
- 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/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 +72 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +48 -2
- 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 +276 -52
- 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]__18paley._.js → [root-of-the-server]__07uhu5z._.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]__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 +1 -1
- 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/{1ce2dj27_cgbj.js → 0q9p7c6vn-x2w.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{22s44f5k3ecmj.js → 2174nz5he_oc4.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{34hhdtbp20krb.js → 3xnma0-359j17.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/aeg-core}/bin/verify-coherence.ts +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → HmoeqXdX1E4drt7GReFOO}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → HmoeqXdX1E4drt7GReFOO}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{vl7QVqELe1AQ-9kaOd9mR → HmoeqXdX1E4drt7GReFOO}/_ssgManifest.js +0 -0
|
@@ -195,8 +195,8 @@ function maskIndentedCode(body, fill) {
|
|
|
195
195
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
196
196
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
197
197
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
198
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
199
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
198
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
199
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
200
200
|
function splitSlugQualifiedEdge(edge) {
|
|
201
201
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
202
202
|
if (!m)
|
|
@@ -2617,7 +2617,7 @@ function isIssueNotFoundError(err) {
|
|
|
2617
2617
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2618
2618
|
}
|
|
2619
2619
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2620
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2620
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2621
2621
|
return { kind: "none" };
|
|
2622
2622
|
if (issue !== null)
|
|
2623
2623
|
return { kind: "issue", issue };
|
|
@@ -2893,9 +2893,18 @@ var COMMIT_TYPES = [
|
|
|
2893
2893
|
];
|
|
2894
2894
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2895
2895
|
function checkForgeTitle(title) {
|
|
2896
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2896
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2897
2897
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2898
2898
|
return { status: "pass", errors: [] };
|
|
2899
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2900
|
+
if (letteredTaskId) {
|
|
2901
|
+
return {
|
|
2902
|
+
status: "fail",
|
|
2903
|
+
errors: [
|
|
2904
|
+
`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.`
|
|
2905
|
+
]
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2899
2908
|
return {
|
|
2900
2909
|
status: "fail",
|
|
2901
2910
|
errors: [
|
|
@@ -2928,19 +2937,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2928
2937
|
]
|
|
2929
2938
|
};
|
|
2930
2939
|
}
|
|
2931
|
-
function
|
|
2940
|
+
function rolloutRuleFor(message) {
|
|
2932
2941
|
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:")) {
|
|
2933
|
-
return
|
|
2942
|
+
return "briefRules";
|
|
2934
2943
|
}
|
|
2935
2944
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2936
|
-
return
|
|
2945
|
+
return "agentBoxes";
|
|
2946
|
+
return null;
|
|
2947
|
+
}
|
|
2948
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2949
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2950
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2951
|
+
};
|
|
2952
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2953
|
+
const rule = rolloutRuleFor(message);
|
|
2954
|
+
if (rule === "briefRules")
|
|
2955
|
+
return cutovers.briefRulesSincePr;
|
|
2956
|
+
if (rule === "agentBoxes")
|
|
2957
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2937
2958
|
return null;
|
|
2938
2959
|
}
|
|
2939
|
-
function partitionBriefErrorsByRollout(errors, prNumber) {
|
|
2960
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2940
2961
|
const blocking = [];
|
|
2941
2962
|
const info = [];
|
|
2942
2963
|
for (const e of errors) {
|
|
2943
|
-
const threshold = rolloutThresholdFor(e);
|
|
2964
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2944
2965
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2945
2966
|
(grandfathered ? info : blocking).push(e);
|
|
2946
2967
|
}
|
|
@@ -3408,8 +3429,8 @@ function checkIssueRationale(body) {
|
|
|
3408
3429
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3409
3430
|
}
|
|
3410
3431
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3411
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3412
|
-
if (issueNumber !== null && issueNumber <
|
|
3432
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3433
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3413
3434
|
return { status: "pass", errors: [] };
|
|
3414
3435
|
const result = objectivesOf(body);
|
|
3415
3436
|
if (result.ok)
|
|
@@ -3854,7 +3875,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3854
3875
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3855
3876
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3856
3877
|
}
|
|
3857
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3878
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3858
3879
|
const failures = [];
|
|
3859
3880
|
for (const [slug, issues] of issuesBySlug) {
|
|
3860
3881
|
for (const issue of issues) {
|
|
@@ -3863,7 +3884,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3863
3884
|
const errors = [
|
|
3864
3885
|
...checkIssueRationale(issue.body).errors,
|
|
3865
3886
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3866
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3887
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3867
3888
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3868
3889
|
];
|
|
3869
3890
|
if (errors.length === 0)
|
|
@@ -4486,13 +4507,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4486
4507
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4487
4508
|
return `${shipsPrefix}tranches/completed/`;
|
|
4488
4509
|
}
|
|
4489
|
-
|
|
4490
|
-
|
|
4510
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4511
|
+
function normalizeSpecPath(entry) {
|
|
4512
|
+
let out = entry.replace(/\\/g, "/");
|
|
4513
|
+
while (out.startsWith("./"))
|
|
4514
|
+
out = out.slice(2);
|
|
4515
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4516
|
+
while (out.endsWith("/"))
|
|
4517
|
+
out = out.slice(0, -1);
|
|
4518
|
+
return out;
|
|
4519
|
+
}
|
|
4520
|
+
function isSpecFile2(path, specPaths) {
|
|
4521
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4522
|
+
return true;
|
|
4523
|
+
if (!path.endsWith(".md"))
|
|
4524
|
+
return false;
|
|
4525
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4491
4526
|
}
|
|
4492
4527
|
function isClaudeMdFile(path) {
|
|
4493
4528
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4494
4529
|
}
|
|
4495
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4530
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4496
4531
|
if (path.startsWith(shipsPrefix)) {
|
|
4497
4532
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4498
4533
|
}
|
|
@@ -4501,7 +4536,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4501
4536
|
}
|
|
4502
4537
|
if (isClaudeMdFile(path))
|
|
4503
4538
|
return "internal";
|
|
4504
|
-
if (isSpecFile2(path))
|
|
4539
|
+
if (isSpecFile2(path, specPaths))
|
|
4505
4540
|
return "spec";
|
|
4506
4541
|
if (isProductScopeFile(path))
|
|
4507
4542
|
return "product";
|
|
@@ -4530,13 +4565,14 @@ function lineAt(content, index) {
|
|
|
4530
4565
|
}
|
|
4531
4566
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4532
4567
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4568
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4533
4569
|
function legacySlugPattern(legacySlugs) {
|
|
4534
4570
|
if (legacySlugs.length === 0)
|
|
4535
4571
|
return null;
|
|
4536
4572
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4537
4573
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4538
4574
|
}
|
|
4539
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4575
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4540
4576
|
const findings = [];
|
|
4541
4577
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4542
4578
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4548,8 +4584,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4548
4584
|
const productPatterns = [
|
|
4549
4585
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4550
4586
|
];
|
|
4587
|
+
const specPatterns = [
|
|
4588
|
+
...patterns,
|
|
4589
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4590
|
+
];
|
|
4551
4591
|
for (const file of files) {
|
|
4552
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4592
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4553
4593
|
if (!cls || cls === "internal")
|
|
4554
4594
|
continue;
|
|
4555
4595
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4558,15 +4598,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4558
4598
|
continue;
|
|
4559
4599
|
const blocking = cls === "product" || cls === "spec";
|
|
4560
4600
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4561
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4601
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4562
4602
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4563
4603
|
pattern.lastIndex = 0;
|
|
4564
4604
|
let match = pattern.exec(scrubbed);
|
|
4565
4605
|
while (match !== null) {
|
|
4566
4606
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4607
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4567
4608
|
findings.push({
|
|
4568
4609
|
file: file.path,
|
|
4569
|
-
line: lineAt(scrubbed,
|
|
4610
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4570
4611
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4571
4612
|
blocking
|
|
4572
4613
|
});
|
|
@@ -4752,9 +4793,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4752
4793
|
}
|
|
4753
4794
|
return findings;
|
|
4754
4795
|
}
|
|
4755
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4796
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4756
4797
|
return [
|
|
4757
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4798
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4758
4799
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4759
4800
|
];
|
|
4760
4801
|
}
|
|
@@ -5219,7 +5260,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5219
5260
|
}).merge(ObservedSchema);
|
|
5220
5261
|
var TaskStatusResultSchema = z.object({
|
|
5221
5262
|
items: z.array(TaskStatusItemSchema),
|
|
5222
|
-
nextCursor: z.string().nullable()
|
|
5263
|
+
nextCursor: z.string().nullable(),
|
|
5264
|
+
table: z.string()
|
|
5223
5265
|
});
|
|
5224
5266
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5225
5267
|
var EscalationInputsSchema = z.object({
|
|
@@ -5563,6 +5605,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5563
5605
|
}
|
|
5564
5606
|
return findings;
|
|
5565
5607
|
}
|
|
5608
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5609
|
+
var NO_GATE_CUTOVERS = {
|
|
5610
|
+
objectivesSinceIssue: null,
|
|
5611
|
+
briefSectionsSinceIssue: null,
|
|
5612
|
+
documentationSinceIssue: null,
|
|
5613
|
+
briefRulesSincePr: null,
|
|
5614
|
+
agentBoxesRefusedSincePr: null
|
|
5615
|
+
};
|
|
5566
5616
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5567
5617
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5568
5618
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6012,6 +6062,8 @@ function attemptFromEnv(value) {
|
|
|
6012
6062
|
function provenanceFor(input) {
|
|
6013
6063
|
if (input.provenance)
|
|
6014
6064
|
return input.provenance;
|
|
6065
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6066
|
+
return "unavailable";
|
|
6015
6067
|
if (input.env.role || input.env.task)
|
|
6016
6068
|
return "env_correlated";
|
|
6017
6069
|
return "unavailable";
|
|
@@ -6032,7 +6084,7 @@ function buildHeader(input) {
|
|
|
6032
6084
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6033
6085
|
const round = roundFromEnv(input.env.round);
|
|
6034
6086
|
const subject = {
|
|
6035
|
-
issue: issueFromTask(input.env.task),
|
|
6087
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6036
6088
|
role,
|
|
6037
6089
|
...round !== undefined ? { round } : {},
|
|
6038
6090
|
...input.subject ?? {}
|