@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
|
@@ -196,8 +196,8 @@ function maskIndentedCode(body, fill) {
|
|
|
196
196
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
197
197
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
198
198
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
199
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
200
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
199
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
200
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
201
201
|
function splitSlugQualifiedEdge(edge) {
|
|
202
202
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
203
203
|
if (!m)
|
|
@@ -2618,7 +2618,7 @@ function isIssueNotFoundError(err) {
|
|
|
2618
2618
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2619
2619
|
}
|
|
2620
2620
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2621
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2621
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2622
2622
|
return { kind: "none" };
|
|
2623
2623
|
if (issue !== null)
|
|
2624
2624
|
return { kind: "issue", issue };
|
|
@@ -2894,9 +2894,18 @@ var COMMIT_TYPES = [
|
|
|
2894
2894
|
];
|
|
2895
2895
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2896
2896
|
function checkForgeTitle(title) {
|
|
2897
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2897
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2898
2898
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2899
2899
|
return { status: "pass", errors: [] };
|
|
2900
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2901
|
+
if (letteredTaskId) {
|
|
2902
|
+
return {
|
|
2903
|
+
status: "fail",
|
|
2904
|
+
errors: [
|
|
2905
|
+
`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.`
|
|
2906
|
+
]
|
|
2907
|
+
};
|
|
2908
|
+
}
|
|
2900
2909
|
return {
|
|
2901
2910
|
status: "fail",
|
|
2902
2911
|
errors: [
|
|
@@ -2929,19 +2938,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2929
2938
|
]
|
|
2930
2939
|
};
|
|
2931
2940
|
}
|
|
2932
|
-
function
|
|
2941
|
+
function rolloutRuleFor(message) {
|
|
2933
2942
|
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:")) {
|
|
2934
|
-
return
|
|
2943
|
+
return "briefRules";
|
|
2935
2944
|
}
|
|
2936
2945
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2937
|
-
return
|
|
2946
|
+
return "agentBoxes";
|
|
2947
|
+
return null;
|
|
2948
|
+
}
|
|
2949
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2950
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2951
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2952
|
+
};
|
|
2953
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2954
|
+
const rule = rolloutRuleFor(message);
|
|
2955
|
+
if (rule === "briefRules")
|
|
2956
|
+
return cutovers.briefRulesSincePr;
|
|
2957
|
+
if (rule === "agentBoxes")
|
|
2958
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2938
2959
|
return null;
|
|
2939
2960
|
}
|
|
2940
|
-
function partitionBriefErrorsByRollout(errors, prNumber) {
|
|
2961
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2941
2962
|
const blocking = [];
|
|
2942
2963
|
const info = [];
|
|
2943
2964
|
for (const e of errors) {
|
|
2944
|
-
const threshold = rolloutThresholdFor(e);
|
|
2965
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2945
2966
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2946
2967
|
(grandfathered ? info : blocking).push(e);
|
|
2947
2968
|
}
|
|
@@ -3409,8 +3430,8 @@ function checkIssueRationale(body) {
|
|
|
3409
3430
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3410
3431
|
}
|
|
3411
3432
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3412
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3413
|
-
if (issueNumber !== null && issueNumber <
|
|
3433
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3434
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3414
3435
|
return { status: "pass", errors: [] };
|
|
3415
3436
|
const result = objectivesOf(body);
|
|
3416
3437
|
if (result.ok)
|
|
@@ -3855,7 +3876,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3855
3876
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3856
3877
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3857
3878
|
}
|
|
3858
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3879
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3859
3880
|
const failures = [];
|
|
3860
3881
|
for (const [slug, issues] of issuesBySlug) {
|
|
3861
3882
|
for (const issue of issues) {
|
|
@@ -3864,7 +3885,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3864
3885
|
const errors = [
|
|
3865
3886
|
...checkIssueRationale(issue.body).errors,
|
|
3866
3887
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3867
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3888
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3868
3889
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3869
3890
|
];
|
|
3870
3891
|
if (errors.length === 0)
|
|
@@ -4487,13 +4508,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4487
4508
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4488
4509
|
return `${shipsPrefix}tranches/completed/`;
|
|
4489
4510
|
}
|
|
4490
|
-
|
|
4491
|
-
|
|
4511
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4512
|
+
function normalizeSpecPath(entry) {
|
|
4513
|
+
let out = entry.replace(/\\/g, "/");
|
|
4514
|
+
while (out.startsWith("./"))
|
|
4515
|
+
out = out.slice(2);
|
|
4516
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4517
|
+
while (out.endsWith("/"))
|
|
4518
|
+
out = out.slice(0, -1);
|
|
4519
|
+
return out;
|
|
4520
|
+
}
|
|
4521
|
+
function isSpecFile2(path, specPaths) {
|
|
4522
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4523
|
+
return true;
|
|
4524
|
+
if (!path.endsWith(".md"))
|
|
4525
|
+
return false;
|
|
4526
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4492
4527
|
}
|
|
4493
4528
|
function isClaudeMdFile(path) {
|
|
4494
4529
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4495
4530
|
}
|
|
4496
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4531
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4497
4532
|
if (path.startsWith(shipsPrefix)) {
|
|
4498
4533
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4499
4534
|
}
|
|
@@ -4502,7 +4537,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4502
4537
|
}
|
|
4503
4538
|
if (isClaudeMdFile(path))
|
|
4504
4539
|
return "internal";
|
|
4505
|
-
if (isSpecFile2(path))
|
|
4540
|
+
if (isSpecFile2(path, specPaths))
|
|
4506
4541
|
return "spec";
|
|
4507
4542
|
if (isProductScopeFile(path))
|
|
4508
4543
|
return "product";
|
|
@@ -4531,13 +4566,14 @@ function lineAt(content, index) {
|
|
|
4531
4566
|
}
|
|
4532
4567
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4533
4568
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4569
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4534
4570
|
function legacySlugPattern(legacySlugs) {
|
|
4535
4571
|
if (legacySlugs.length === 0)
|
|
4536
4572
|
return null;
|
|
4537
4573
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4538
4574
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4539
4575
|
}
|
|
4540
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4576
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4541
4577
|
const findings = [];
|
|
4542
4578
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4543
4579
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4549,8 +4585,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4549
4585
|
const productPatterns = [
|
|
4550
4586
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4551
4587
|
];
|
|
4588
|
+
const specPatterns = [
|
|
4589
|
+
...patterns,
|
|
4590
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4591
|
+
];
|
|
4552
4592
|
for (const file of files) {
|
|
4553
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4593
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4554
4594
|
if (!cls || cls === "internal")
|
|
4555
4595
|
continue;
|
|
4556
4596
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4559,15 +4599,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4559
4599
|
continue;
|
|
4560
4600
|
const blocking = cls === "product" || cls === "spec";
|
|
4561
4601
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4562
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4602
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4563
4603
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4564
4604
|
pattern.lastIndex = 0;
|
|
4565
4605
|
let match = pattern.exec(scrubbed);
|
|
4566
4606
|
while (match !== null) {
|
|
4567
4607
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4608
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4568
4609
|
findings.push({
|
|
4569
4610
|
file: file.path,
|
|
4570
|
-
line: lineAt(scrubbed,
|
|
4611
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4571
4612
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4572
4613
|
blocking
|
|
4573
4614
|
});
|
|
@@ -4753,9 +4794,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4753
4794
|
}
|
|
4754
4795
|
return findings;
|
|
4755
4796
|
}
|
|
4756
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4797
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4757
4798
|
return [
|
|
4758
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4799
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4759
4800
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4760
4801
|
];
|
|
4761
4802
|
}
|
|
@@ -5220,7 +5261,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5220
5261
|
}).merge(ObservedSchema);
|
|
5221
5262
|
var TaskStatusResultSchema = z.object({
|
|
5222
5263
|
items: z.array(TaskStatusItemSchema),
|
|
5223
|
-
nextCursor: z.string().nullable()
|
|
5264
|
+
nextCursor: z.string().nullable(),
|
|
5265
|
+
table: z.string()
|
|
5224
5266
|
});
|
|
5225
5267
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5226
5268
|
var EscalationInputsSchema = z.object({
|
|
@@ -5564,6 +5606,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5564
5606
|
}
|
|
5565
5607
|
return findings;
|
|
5566
5608
|
}
|
|
5609
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5610
|
+
var NO_GATE_CUTOVERS = {
|
|
5611
|
+
objectivesSinceIssue: null,
|
|
5612
|
+
briefSectionsSinceIssue: null,
|
|
5613
|
+
documentationSinceIssue: null,
|
|
5614
|
+
briefRulesSincePr: null,
|
|
5615
|
+
agentBoxesRefusedSincePr: null
|
|
5616
|
+
};
|
|
5567
5617
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5568
5618
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5569
5619
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6013,6 +6063,8 @@ function attemptFromEnv(value) {
|
|
|
6013
6063
|
function provenanceFor(input) {
|
|
6014
6064
|
if (input.provenance)
|
|
6015
6065
|
return input.provenance;
|
|
6066
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6067
|
+
return "unavailable";
|
|
6016
6068
|
if (input.env.role || input.env.task)
|
|
6017
6069
|
return "env_correlated";
|
|
6018
6070
|
return "unavailable";
|
|
@@ -6033,7 +6085,7 @@ function buildHeader(input) {
|
|
|
6033
6085
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6034
6086
|
const round = roundFromEnv(input.env.round);
|
|
6035
6087
|
const subject = {
|
|
6036
|
-
issue: issueFromTask(input.env.task),
|
|
6088
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6037
6089
|
role,
|
|
6038
6090
|
...round !== undefined ? { round } : {},
|
|
6039
6091
|
...input.subject ?? {}
|
|
@@ -201,8 +201,8 @@ function maskIndentedCode(body, fill) {
|
|
|
201
201
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
202
202
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
203
203
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
204
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
205
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
204
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
205
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
206
206
|
function splitSlugQualifiedEdge(edge) {
|
|
207
207
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
208
208
|
if (!m)
|
|
@@ -2623,7 +2623,7 @@ function isIssueNotFoundError(err) {
|
|
|
2623
2623
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2624
2624
|
}
|
|
2625
2625
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2626
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2626
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2627
2627
|
return { kind: "none" };
|
|
2628
2628
|
if (issue !== null)
|
|
2629
2629
|
return { kind: "issue", issue };
|
|
@@ -2899,9 +2899,18 @@ var COMMIT_TYPES = [
|
|
|
2899
2899
|
];
|
|
2900
2900
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2901
2901
|
function checkForgeTitle(title) {
|
|
2902
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2902
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2903
2903
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2904
2904
|
return { status: "pass", errors: [] };
|
|
2905
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2906
|
+
if (letteredTaskId) {
|
|
2907
|
+
return {
|
|
2908
|
+
status: "fail",
|
|
2909
|
+
errors: [
|
|
2910
|
+
`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.`
|
|
2911
|
+
]
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2905
2914
|
return {
|
|
2906
2915
|
status: "fail",
|
|
2907
2916
|
errors: [
|
|
@@ -2934,19 +2943,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2934
2943
|
]
|
|
2935
2944
|
};
|
|
2936
2945
|
}
|
|
2937
|
-
function
|
|
2946
|
+
function rolloutRuleFor(message) {
|
|
2938
2947
|
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:")) {
|
|
2939
|
-
return
|
|
2948
|
+
return "briefRules";
|
|
2940
2949
|
}
|
|
2941
2950
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2942
|
-
return
|
|
2951
|
+
return "agentBoxes";
|
|
2943
2952
|
return null;
|
|
2944
2953
|
}
|
|
2945
|
-
|
|
2954
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2955
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2956
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2957
|
+
};
|
|
2958
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2959
|
+
const rule = rolloutRuleFor(message);
|
|
2960
|
+
if (rule === "briefRules")
|
|
2961
|
+
return cutovers.briefRulesSincePr;
|
|
2962
|
+
if (rule === "agentBoxes")
|
|
2963
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2964
|
+
return null;
|
|
2965
|
+
}
|
|
2966
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2946
2967
|
const blocking = [];
|
|
2947
2968
|
const info = [];
|
|
2948
2969
|
for (const e of errors) {
|
|
2949
|
-
const threshold = rolloutThresholdFor(e);
|
|
2970
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2950
2971
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2951
2972
|
(grandfathered ? info : blocking).push(e);
|
|
2952
2973
|
}
|
|
@@ -3414,8 +3435,8 @@ function checkIssueRationale(body) {
|
|
|
3414
3435
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3415
3436
|
}
|
|
3416
3437
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3417
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3418
|
-
if (issueNumber !== null && issueNumber <
|
|
3438
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3439
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3419
3440
|
return { status: "pass", errors: [] };
|
|
3420
3441
|
const result = objectivesOf(body);
|
|
3421
3442
|
if (result.ok)
|
|
@@ -3860,7 +3881,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3860
3881
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3861
3882
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3862
3883
|
}
|
|
3863
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3884
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3864
3885
|
const failures = [];
|
|
3865
3886
|
for (const [slug, issues] of issuesBySlug) {
|
|
3866
3887
|
for (const issue of issues) {
|
|
@@ -3869,7 +3890,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3869
3890
|
const errors = [
|
|
3870
3891
|
...checkIssueRationale(issue.body).errors,
|
|
3871
3892
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3872
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3893
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3873
3894
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3874
3895
|
];
|
|
3875
3896
|
if (errors.length === 0)
|
|
@@ -4492,13 +4513,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4492
4513
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4493
4514
|
return `${shipsPrefix}tranches/completed/`;
|
|
4494
4515
|
}
|
|
4495
|
-
|
|
4496
|
-
|
|
4516
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4517
|
+
function normalizeSpecPath(entry) {
|
|
4518
|
+
let out = entry.replace(/\\/g, "/");
|
|
4519
|
+
while (out.startsWith("./"))
|
|
4520
|
+
out = out.slice(2);
|
|
4521
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4522
|
+
while (out.endsWith("/"))
|
|
4523
|
+
out = out.slice(0, -1);
|
|
4524
|
+
return out;
|
|
4525
|
+
}
|
|
4526
|
+
function isSpecFile2(path, specPaths) {
|
|
4527
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4528
|
+
return true;
|
|
4529
|
+
if (!path.endsWith(".md"))
|
|
4530
|
+
return false;
|
|
4531
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4497
4532
|
}
|
|
4498
4533
|
function isClaudeMdFile(path) {
|
|
4499
4534
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4500
4535
|
}
|
|
4501
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4536
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4502
4537
|
if (path.startsWith(shipsPrefix)) {
|
|
4503
4538
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4504
4539
|
}
|
|
@@ -4507,7 +4542,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4507
4542
|
}
|
|
4508
4543
|
if (isClaudeMdFile(path))
|
|
4509
4544
|
return "internal";
|
|
4510
|
-
if (isSpecFile2(path))
|
|
4545
|
+
if (isSpecFile2(path, specPaths))
|
|
4511
4546
|
return "spec";
|
|
4512
4547
|
if (isProductScopeFile(path))
|
|
4513
4548
|
return "product";
|
|
@@ -4536,13 +4571,14 @@ function lineAt(content, index) {
|
|
|
4536
4571
|
}
|
|
4537
4572
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4538
4573
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4574
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4539
4575
|
function legacySlugPattern(legacySlugs) {
|
|
4540
4576
|
if (legacySlugs.length === 0)
|
|
4541
4577
|
return null;
|
|
4542
4578
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4543
4579
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4544
4580
|
}
|
|
4545
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4581
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4546
4582
|
const findings = [];
|
|
4547
4583
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4548
4584
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4554,8 +4590,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4554
4590
|
const productPatterns = [
|
|
4555
4591
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4556
4592
|
];
|
|
4593
|
+
const specPatterns = [
|
|
4594
|
+
...patterns,
|
|
4595
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4596
|
+
];
|
|
4557
4597
|
for (const file of files) {
|
|
4558
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4598
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4559
4599
|
if (!cls || cls === "internal")
|
|
4560
4600
|
continue;
|
|
4561
4601
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4564,15 +4604,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4564
4604
|
continue;
|
|
4565
4605
|
const blocking = cls === "product" || cls === "spec";
|
|
4566
4606
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4567
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4607
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4568
4608
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4569
4609
|
pattern.lastIndex = 0;
|
|
4570
4610
|
let match = pattern.exec(scrubbed);
|
|
4571
4611
|
while (match !== null) {
|
|
4572
4612
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4613
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4573
4614
|
findings.push({
|
|
4574
4615
|
file: file.path,
|
|
4575
|
-
line: lineAt(scrubbed,
|
|
4616
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4576
4617
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4577
4618
|
blocking
|
|
4578
4619
|
});
|
|
@@ -4758,9 +4799,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4758
4799
|
}
|
|
4759
4800
|
return findings;
|
|
4760
4801
|
}
|
|
4761
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4802
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4762
4803
|
return [
|
|
4763
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4804
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4764
4805
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4765
4806
|
];
|
|
4766
4807
|
}
|
|
@@ -5225,7 +5266,8 @@ var TaskStatusItemSchema = z.object({
|
|
|
5225
5266
|
}).merge(ObservedSchema);
|
|
5226
5267
|
var TaskStatusResultSchema = z.object({
|
|
5227
5268
|
items: z.array(TaskStatusItemSchema),
|
|
5228
|
-
nextCursor: z.string().nullable()
|
|
5269
|
+
nextCursor: z.string().nullable(),
|
|
5270
|
+
table: z.string()
|
|
5229
5271
|
});
|
|
5230
5272
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5231
5273
|
var EscalationInputsSchema = z.object({
|
|
@@ -5569,6 +5611,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5569
5611
|
}
|
|
5570
5612
|
return findings;
|
|
5571
5613
|
}
|
|
5614
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5615
|
+
var NO_GATE_CUTOVERS = {
|
|
5616
|
+
objectivesSinceIssue: null,
|
|
5617
|
+
briefSectionsSinceIssue: null,
|
|
5618
|
+
documentationSinceIssue: null,
|
|
5619
|
+
briefRulesSincePr: null,
|
|
5620
|
+
agentBoxesRefusedSincePr: null
|
|
5621
|
+
};
|
|
5572
5622
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5573
5623
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5574
5624
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -6018,6 +6068,8 @@ function attemptFromEnv(value) {
|
|
|
6018
6068
|
function provenanceFor(input) {
|
|
6019
6069
|
if (input.provenance)
|
|
6020
6070
|
return input.provenance;
|
|
6071
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6072
|
+
return "unavailable";
|
|
6021
6073
|
if (input.env.role || input.env.task)
|
|
6022
6074
|
return "env_correlated";
|
|
6023
6075
|
return "unavailable";
|
|
@@ -6038,7 +6090,7 @@ function buildHeader(input) {
|
|
|
6038
6090
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
6039
6091
|
const round = roundFromEnv(input.env.round);
|
|
6040
6092
|
const subject = {
|
|
6041
|
-
issue: issueFromTask(input.env.task),
|
|
6093
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
6042
6094
|
role,
|
|
6043
6095
|
...round !== undefined ? { round } : {},
|
|
6044
6096
|
...input.subject ?? {}
|
|
@@ -6822,6 +6874,10 @@ var COMMANDS = [
|
|
|
6822
6874
|
flag: "--role <name>",
|
|
6823
6875
|
description: "Resolve to a specific role file (roles/<name>.md) instead of the front door"
|
|
6824
6876
|
},
|
|
6877
|
+
{
|
|
6878
|
+
flag: "--template <name>",
|
|
6879
|
+
description: "Print a template the package ships (templates/<name>-template.md) instead of the front door"
|
|
6880
|
+
},
|
|
6825
6881
|
{
|
|
6826
6882
|
flag: "--print",
|
|
6827
6883
|
description: "Emit the resolved file's body (frontmatter stripped) instead of its path — the one-hop mode every generated skill and slash command invokes. A role file whose frontmatter carries an `ack-token` emits that token as the output's own first line."
|
|
@@ -7189,7 +7245,12 @@ var VinayaConfigSchema = z5.object({
|
|
|
7189
7245
|
allowlist: z5.array(z5.string().min(1)).optional(),
|
|
7190
7246
|
severity: z5.enum(["warning", "error"]).optional()
|
|
7191
7247
|
}).optional(),
|
|
7192
|
-
specGrandfather: z5.array(z5.string().min(1)).optional()
|
|
7248
|
+
specGrandfather: z5.array(z5.string().min(1)).optional(),
|
|
7249
|
+
specPaths: z5.array(z5.string().min(1).refine((entry) => !entry.startsWith("/") && !/^[A-Za-z]:/.test(entry), {
|
|
7250
|
+
message: "must be a repository-relative path, not an absolute one"
|
|
7251
|
+
}).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
|
|
7252
|
+
message: "must stay inside the repository — no `..` segment"
|
|
7253
|
+
})).optional()
|
|
7193
7254
|
}).optional(),
|
|
7194
7255
|
projects: z5.array(ProjectEntrySchema).optional(),
|
|
7195
7256
|
dispatch: z5.object({
|
|
@@ -7203,6 +7264,13 @@ var VinayaConfigSchema = z5.object({
|
|
|
7203
7264
|
securityThreshold: z5.string().min(1).optional(),
|
|
7204
7265
|
maxRounds: z5.number().optional()
|
|
7205
7266
|
}).optional(),
|
|
7267
|
+
gateCutovers: z5.object({
|
|
7268
|
+
objectivesSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7269
|
+
briefSectionsSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7270
|
+
documentationSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7271
|
+
briefRulesSincePr: z5.number().int().nonnegative().optional(),
|
|
7272
|
+
agentBoxesRefusedSincePr: z5.number().int().nonnegative().optional()
|
|
7273
|
+
}).optional(),
|
|
7206
7274
|
prePush: z5.object({
|
|
7207
7275
|
alwaysRun: z5.array(z5.string()).optional()
|
|
7208
7276
|
}).optional(),
|
|
@@ -7340,6 +7408,18 @@ function resolveReviewPolicy(config) {
|
|
|
7340
7408
|
maxRounds
|
|
7341
7409
|
};
|
|
7342
7410
|
}
|
|
7411
|
+
function resolveGateCutovers(config) {
|
|
7412
|
+
const raw = config?.gateCutovers;
|
|
7413
|
+
if (!raw)
|
|
7414
|
+
return NO_GATE_CUTOVERS;
|
|
7415
|
+
return {
|
|
7416
|
+
objectivesSinceIssue: raw.objectivesSinceIssue ?? null,
|
|
7417
|
+
briefSectionsSinceIssue: raw.briefSectionsSinceIssue ?? null,
|
|
7418
|
+
documentationSinceIssue: raw.documentationSinceIssue ?? null,
|
|
7419
|
+
briefRulesSincePr: raw.briefRulesSincePr ?? null,
|
|
7420
|
+
agentBoxesRefusedSincePr: raw.agentBoxesRefusedSincePr ?? null
|
|
7421
|
+
};
|
|
7422
|
+
}
|
|
7343
7423
|
function resolveRuntimeDirSetting(config) {
|
|
7344
7424
|
return config?.runtimeDir ?? null;
|
|
7345
7425
|
}
|