@attalabs/vinaya 0.32.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/README.md +1 -1
- package/aeg-root/contracts/principal-operator.md +18 -5
- 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 +89 -16
- package/aeg-root/roles/planner/reference.md +3 -2
- package/aeg-root/roles/planner.md +3 -1
- package/aeg-root/roles/tranche-archivist.md +1 -0
- package/aeg-root/skills/aeg-context-packets/SKILL.md +1 -1
- package/aeg-root/skills/aeg-context-packets/examples/operator-start.md +1 -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 +213 -41
- package/dist/checks/bin/check-branch-topology.js +164 -41
- package/dist/checks/bin/check-brief-shape.js +219 -46
- package/dist/checks/bin/check-changeset-coverage.js +669 -152
- package/dist/checks/bin/check-closes-n.js +164 -41
- package/dist/checks/bin/check-coherence.js +220 -43
- package/dist/checks/bin/check-dead-branch-push.js +159 -40
- package/dist/checks/bin/check-dispatch-readiness.js +218 -42
- package/dist/checks/bin/check-doc-coverage-push.js +665 -148
- package/dist/checks/bin/check-doc-coverage.js +667 -150
- package/dist/checks/bin/check-doctrine-no-procedures.js +213 -41
- package/dist/checks/bin/check-doctrine-portability.js +666 -149
- package/dist/checks/bin/check-evidence-fresh.js +643 -125
- package/dist/checks/bin/check-exec-bits.js +663 -146
- package/dist/checks/bin/check-first-push-dispatch.js +218 -42
- package/dist/checks/bin/check-issue-assignment.js +164 -41
- package/dist/checks/bin/check-issue-milestone-attach.js +159 -40
- package/dist/checks/bin/check-issue-objectives-numbering.js +685 -41
- package/dist/checks/bin/check-issue-parts-coverage.js +159 -40
- package/dist/checks/bin/check-issue-surface-globs.js +258 -48
- package/dist/checks/bin/check-issue-title-grammar.js +159 -40
- package/dist/checks/bin/check-issue-tranche-label.js +159 -40
- package/dist/checks/bin/check-main-branch-refusal.js +159 -40
- package/dist/checks/bin/check-no-disk-state.js +159 -40
- package/dist/checks/bin/check-pr-premise-reassert.js +213 -41
- package/dist/checks/bin/check-pr-report-density.js +159 -40
- package/dist/checks/bin/check-principal-test-plan-wait.js +159 -40
- package/dist/checks/bin/check-quoted-command.js +586 -103
- package/dist/checks/bin/check-reader-resolvable-prose.js +637 -111
- package/dist/checks/bin/check-registry-gates.js +159 -40
- package/dist/checks/bin/check-retired-vocabulary.js +586 -103
- package/dist/checks/bin/check-review-gate.js +284 -152
- package/dist/checks/bin/check-single-plan-pr.js +159 -40
- package/dist/checks/bin/check-surface-scope.js +164 -41
- package/dist/checks/bin/check-test-plan.js +159 -40
- package/dist/checks/bin/check-token-collection-wired.js +159 -40
- package/dist/checks/bin/check-token-report.js +159 -40
- package/dist/checks/bin/check-workspace-escape.js +664 -147
- package/dist/index.js +3932 -1118
- package/dist/lib/pre-push-cache-test-run.js +507 -72
- package/dist/lib/pre-push-select-tests.js +136 -13
- package/package.json +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/actions.ts +10 -12
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/archive-task.ts +42 -17
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/baseline-capture.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/branch-topology-gate.ts +3 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +554 -95
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +264 -44
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/claude-code-transcript.ts +9 -9
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +211 -30
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/consumer-enumeration.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +75 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +961 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +222 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/outcomes.ts +135 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +394 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-audit.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-guard.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/derive-section7.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +514 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +110 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +30 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +219 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +97 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +240 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/diagram-model.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/direct-main-push.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +65 -22
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +238 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-owners.ts +14 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/docs-coherence.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/legacy-anchors.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/node-route.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/surfaced-manifest.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-no-procedures.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ensure-label.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/first-push-dispatch-gate.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +14 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +425 -11
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +3 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +1450 -33
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +1 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/local-anchor-coverage.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +119 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +75 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/redact.ts +87 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +801 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +373 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/metering-io-guard.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/milestone-validation.ts +2 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/no-disk-state.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +288 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-token-report.ts +3 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-tranche.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +30 -16
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-tier.ts +17 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/premise-check.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/quoted-command.ts +1 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +267 -19
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +91 -24
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-scaffold.ts +6 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/report-tokens.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +254 -110
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +384 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +208 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +80 -28
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +92 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/single-plan-pr.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/state-machine-model.ts +40 -27
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/symbol-collisions.ts +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +38 -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 +712 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +7 -9
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-section.ts +5 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/types.ts +4 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +368 -56
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +2 -3
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/workspace-escape.ts +3 -3
- 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 +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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/{[externals]__1agj1ww._.js → [externals]__0cki-x_._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +6 -6
- 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 +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__0r7e54g._.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/{[root-of-the-server]__1r47dr7._.js → _08onyya._.js} +3 -3
- 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/_0y1jv16._.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 +5 -5
- 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/0bjnj-5fy4e7l.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1dc2_-c_gavj1.js → 0q9p7c6vn-x2w.js} +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3xg6-flovrcx-.js → 2174nz5he_oc4.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3xnma0-359j17.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0hstap0._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bm4nrrzwc7zi.css +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2t_rfsztmwu6y.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3ua4rm5f-a9k6.js +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/{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/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_ssgManifest.js +0 -0
|
@@ -193,8 +193,8 @@ function maskIndentedCode(body, fill) {
|
|
|
193
193
|
var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
|
|
194
194
|
var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
|
|
195
195
|
var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
|
|
196
|
-
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d
|
|
197
|
-
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+
|
|
196
|
+
var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
|
|
197
|
+
var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
|
|
198
198
|
function splitSlugQualifiedEdge(edge) {
|
|
199
199
|
const m = edge.trim().match(SLUG_QUALIFIED_ID);
|
|
200
200
|
if (!m)
|
|
@@ -2042,12 +2042,24 @@ function extractBaseSha(comment) {
|
|
|
2042
2042
|
const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
|
|
2043
2043
|
return m ? m[1].toLowerCase() : null;
|
|
2044
2044
|
}
|
|
2045
|
-
var
|
|
2045
|
+
var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
|
|
2046
|
+
function parseFindingState(description) {
|
|
2047
|
+
const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
|
|
2048
|
+
if (!m)
|
|
2049
|
+
return { id: null, state: null };
|
|
2050
|
+
return { id: `F${m[1]}`, state: m[2] ?? null };
|
|
2051
|
+
}
|
|
2052
|
+
var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
|
|
2046
2053
|
function extractFindingSeverities(comment) {
|
|
2047
|
-
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) =>
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2054
|
+
return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
|
|
2055
|
+
const { id, state } = parseFindingState(m[3] ?? "");
|
|
2056
|
+
return {
|
|
2057
|
+
severity: m[1],
|
|
2058
|
+
location: m[2],
|
|
2059
|
+
id,
|
|
2060
|
+
state
|
|
2061
|
+
};
|
|
2062
|
+
});
|
|
2051
2063
|
}
|
|
2052
2064
|
function extractVerdict(comments, valuePattern, missingLabel) {
|
|
2053
2065
|
const candidates = comments.filter((c) => valuePattern.test(c));
|
|
@@ -2461,6 +2473,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
|
|
|
2461
2473
|
});
|
|
2462
2474
|
return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
|
|
2463
2475
|
}
|
|
2476
|
+
function isConsequentialFinding(finding) {
|
|
2477
|
+
return finding.state !== "resolved";
|
|
2478
|
+
}
|
|
2479
|
+
function consequentialFindings(findings) {
|
|
2480
|
+
return findings.filter((f) => isConsequentialFinding(f));
|
|
2481
|
+
}
|
|
2464
2482
|
function evaluateCodeReview(findings, policy) {
|
|
2465
2483
|
return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
|
|
2466
2484
|
}
|
|
@@ -2597,7 +2615,7 @@ function isIssueNotFoundError(err) {
|
|
|
2597
2615
|
return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
|
|
2598
2616
|
}
|
|
2599
2617
|
function resolveObjectivesSource(prBody, issue, cutoverIssue) {
|
|
2600
|
-
if (issue !== null && issue < cutoverIssue)
|
|
2618
|
+
if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
|
|
2601
2619
|
return { kind: "none" };
|
|
2602
2620
|
if (issue !== null)
|
|
2603
2621
|
return { kind: "issue", issue };
|
|
@@ -2873,9 +2891,18 @@ var COMMIT_TYPES = [
|
|
|
2873
2891
|
];
|
|
2874
2892
|
var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
|
|
2875
2893
|
function checkForgeTitle(title) {
|
|
2876
|
-
const taskStyle = /^\[[a-z0-9._-]+\] \
|
|
2894
|
+
const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
|
|
2877
2895
|
if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
|
|
2878
2896
|
return { status: "pass", errors: [] };
|
|
2897
|
+
const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
|
|
2898
|
+
if (letteredTaskId) {
|
|
2899
|
+
return {
|
|
2900
|
+
status: "fail",
|
|
2901
|
+
errors: [
|
|
2902
|
+
`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.`
|
|
2903
|
+
]
|
|
2904
|
+
};
|
|
2905
|
+
}
|
|
2879
2906
|
return {
|
|
2880
2907
|
status: "fail",
|
|
2881
2908
|
errors: [
|
|
@@ -2908,19 +2935,31 @@ function checkNoAgentBoxes(prBody) {
|
|
|
2908
2935
|
]
|
|
2909
2936
|
};
|
|
2910
2937
|
}
|
|
2911
|
-
function
|
|
2938
|
+
function rolloutRuleFor(message) {
|
|
2912
2939
|
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:")) {
|
|
2913
|
-
return
|
|
2940
|
+
return "briefRules";
|
|
2914
2941
|
}
|
|
2915
2942
|
if (message.startsWith("brief-validation no agent boxes:"))
|
|
2916
|
-
return
|
|
2943
|
+
return "agentBoxes";
|
|
2917
2944
|
return null;
|
|
2918
2945
|
}
|
|
2919
|
-
|
|
2946
|
+
var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
|
|
2947
|
+
briefRulesSincePr: BRIEF_RULES_SINCE_PR,
|
|
2948
|
+
agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
|
|
2949
|
+
};
|
|
2950
|
+
function rolloutThresholdFor(message, cutovers) {
|
|
2951
|
+
const rule = rolloutRuleFor(message);
|
|
2952
|
+
if (rule === "briefRules")
|
|
2953
|
+
return cutovers.briefRulesSincePr;
|
|
2954
|
+
if (rule === "agentBoxes")
|
|
2955
|
+
return cutovers.agentBoxesRefusedSincePr;
|
|
2956
|
+
return null;
|
|
2957
|
+
}
|
|
2958
|
+
function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
|
|
2920
2959
|
const blocking = [];
|
|
2921
2960
|
const info = [];
|
|
2922
2961
|
for (const e of errors) {
|
|
2923
|
-
const threshold = rolloutThresholdFor(e);
|
|
2962
|
+
const threshold = rolloutThresholdFor(e, cutovers);
|
|
2924
2963
|
const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
|
|
2925
2964
|
(grandfathered ? info : blocking).push(e);
|
|
2926
2965
|
}
|
|
@@ -3388,8 +3427,8 @@ function checkIssueRationale(body) {
|
|
|
3388
3427
|
return { status: errors.length > 0 ? "fail" : "pass", errors };
|
|
3389
3428
|
}
|
|
3390
3429
|
var OBJECTIVES_SINCE_ISSUE = 404;
|
|
3391
|
-
function checkIssueObjectives(body, issueNumber) {
|
|
3392
|
-
if (issueNumber !== null && issueNumber <
|
|
3430
|
+
function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
|
|
3431
|
+
if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
|
|
3393
3432
|
return { status: "pass", errors: [] };
|
|
3394
3433
|
const result = objectivesOf(body);
|
|
3395
3434
|
if (result.ok)
|
|
@@ -3834,7 +3873,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
|
|
|
3834
3873
|
return issueToEntry.get(Number(issueMatch[1]));
|
|
3835
3874
|
return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
|
|
3836
3875
|
}
|
|
3837
|
-
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
3876
|
+
function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
|
|
3838
3877
|
const failures = [];
|
|
3839
3878
|
for (const [slug, issues] of issuesBySlug) {
|
|
3840
3879
|
for (const issue of issues) {
|
|
@@ -3843,7 +3882,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
|
|
|
3843
3882
|
const errors = [
|
|
3844
3883
|
...checkIssueRationale(issue.body).errors,
|
|
3845
3884
|
...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
|
|
3846
|
-
...checkIssueObjectives(issue.body, issue.number).errors,
|
|
3885
|
+
...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
|
|
3847
3886
|
...checkPartsCiteDefinedObjectives(issue.body).errors
|
|
3848
3887
|
];
|
|
3849
3888
|
if (errors.length === 0)
|
|
@@ -4093,8 +4132,8 @@ function checkReviewGate(input) {
|
|
|
4093
4132
|
let codeReviewPolicyEvaluation;
|
|
4094
4133
|
let securityPolicyEvaluation;
|
|
4095
4134
|
try {
|
|
4096
|
-
codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
|
|
4097
|
-
securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
|
|
4135
|
+
codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
|
|
4136
|
+
securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
|
|
4098
4137
|
} catch (err) {
|
|
4099
4138
|
return {
|
|
4100
4139
|
verdict: "fail",
|
|
@@ -4466,13 +4505,27 @@ var SHIPS_PREFIX = "aeg-root/";
|
|
|
4466
4505
|
function shipsArchivePrefix(shipsPrefix) {
|
|
4467
4506
|
return `${shipsPrefix}tranches/completed/`;
|
|
4468
4507
|
}
|
|
4469
|
-
|
|
4470
|
-
|
|
4508
|
+
var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
|
|
4509
|
+
function normalizeSpecPath(entry) {
|
|
4510
|
+
let out = entry.replace(/\\/g, "/");
|
|
4511
|
+
while (out.startsWith("./"))
|
|
4512
|
+
out = out.slice(2);
|
|
4513
|
+
out = out.replace(/\/{2,}/g, "/");
|
|
4514
|
+
while (out.endsWith("/"))
|
|
4515
|
+
out = out.slice(0, -1);
|
|
4516
|
+
return out;
|
|
4517
|
+
}
|
|
4518
|
+
function isSpecFile2(path, specPaths) {
|
|
4519
|
+
if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
|
|
4520
|
+
return true;
|
|
4521
|
+
if (!path.endsWith(".md"))
|
|
4522
|
+
return false;
|
|
4523
|
+
return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
|
|
4471
4524
|
}
|
|
4472
4525
|
function isClaudeMdFile(path) {
|
|
4473
4526
|
return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
|
|
4474
4527
|
}
|
|
4475
|
-
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
|
|
4528
|
+
function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
|
|
4476
4529
|
if (path.startsWith(shipsPrefix)) {
|
|
4477
4530
|
return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
|
|
4478
4531
|
}
|
|
@@ -4481,7 +4534,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
|
|
|
4481
4534
|
}
|
|
4482
4535
|
if (isClaudeMdFile(path))
|
|
4483
4536
|
return "internal";
|
|
4484
|
-
if (isSpecFile2(path))
|
|
4537
|
+
if (isSpecFile2(path, specPaths))
|
|
4485
4538
|
return "spec";
|
|
4486
4539
|
if (isProductScopeFile(path))
|
|
4487
4540
|
return "product";
|
|
@@ -4510,13 +4563,14 @@ function lineAt(content, index) {
|
|
|
4510
4563
|
}
|
|
4511
4564
|
var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
|
|
4512
4565
|
var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
|
|
4566
|
+
var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
|
|
4513
4567
|
function legacySlugPattern(legacySlugs) {
|
|
4514
4568
|
if (legacySlugs.length === 0)
|
|
4515
4569
|
return null;
|
|
4516
4570
|
const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
4517
4571
|
return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
|
|
4518
4572
|
}
|
|
4519
|
-
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4573
|
+
function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4520
4574
|
const findings = [];
|
|
4521
4575
|
const legacyPattern = legacySlugPattern(legacySlugs);
|
|
4522
4576
|
const grandfathered = new Set(specGrandfather);
|
|
@@ -4528,8 +4582,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4528
4582
|
const productPatterns = [
|
|
4529
4583
|
{ pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
|
|
4530
4584
|
];
|
|
4585
|
+
const specPatterns = [
|
|
4586
|
+
...patterns,
|
|
4587
|
+
{ pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
|
|
4588
|
+
];
|
|
4531
4589
|
for (const file of files) {
|
|
4532
|
-
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
|
|
4590
|
+
const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
|
|
4533
4591
|
if (!cls || cls === "internal")
|
|
4534
4592
|
continue;
|
|
4535
4593
|
if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
|
|
@@ -4538,15 +4596,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
|
|
|
4538
4596
|
continue;
|
|
4539
4597
|
const blocking = cls === "product" || cls === "spec";
|
|
4540
4598
|
const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
|
|
4541
|
-
const patternsToRun = cls === "product" ? productPatterns : patterns;
|
|
4599
|
+
const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
|
|
4542
4600
|
for (const { pattern, what, group } of patternsToRun) {
|
|
4543
4601
|
pattern.lastIndex = 0;
|
|
4544
4602
|
let match = pattern.exec(scrubbed);
|
|
4545
4603
|
while (match !== null) {
|
|
4546
4604
|
const cited = group !== undefined ? match[group] ?? match[0] : match[0];
|
|
4605
|
+
const citedIndex = match.index + match[0].indexOf(cited);
|
|
4547
4606
|
findings.push({
|
|
4548
4607
|
file: file.path,
|
|
4549
|
-
line: lineAt(scrubbed,
|
|
4608
|
+
line: lineAt(scrubbed, citedIndex),
|
|
4550
4609
|
message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
|
|
4551
4610
|
blocking
|
|
4552
4611
|
});
|
|
@@ -4732,9 +4791,9 @@ function checkSourceComments(files, allowlist = []) {
|
|
|
4732
4791
|
}
|
|
4733
4792
|
return findings;
|
|
4734
4793
|
}
|
|
4735
|
-
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
|
|
4794
|
+
function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
|
|
4736
4795
|
return [
|
|
4737
|
-
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
|
|
4796
|
+
...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
|
|
4738
4797
|
...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
|
|
4739
4798
|
];
|
|
4740
4799
|
}
|
|
@@ -5175,15 +5234,32 @@ var ObservedSchema = z.object({
|
|
|
5175
5234
|
var TaskStatusInputSchema = z.object({
|
|
5176
5235
|
task: TaskToolRefSchema.optional()
|
|
5177
5236
|
}).merge(PageRequestSchema).strict();
|
|
5237
|
+
var TaskConfidenceSchema = z.object({
|
|
5238
|
+
round: z.number().int().positive(),
|
|
5239
|
+
percent: z.number().int().min(0).max(100).nullable(),
|
|
5240
|
+
source: z.enum(["stated", "published-summary"])
|
|
5241
|
+
}).strict();
|
|
5242
|
+
var TaskPhaseHistorySchema = z.object({
|
|
5243
|
+
typicalPhaseMinutes: z.number().nonnegative(),
|
|
5244
|
+
typicalPhaseSamples: z.number().int().positive()
|
|
5245
|
+
}).strict();
|
|
5178
5246
|
var TaskStatusItemSchema = z.object({
|
|
5179
5247
|
task: TaskToolRefSchema,
|
|
5180
5248
|
issue: z.number().int().positive(),
|
|
5181
5249
|
pr: z.number().int().positive().nullable(),
|
|
5182
|
-
state: z.string()
|
|
5250
|
+
state: z.string(),
|
|
5251
|
+
round: z.number().int().positive().nullable().optional(),
|
|
5252
|
+
phase: z.string().min(1).nullable().optional(),
|
|
5253
|
+
minutesInPhase: z.number().nonnegative().nullable().optional(),
|
|
5254
|
+
phaseIsCurrent: z.boolean().nullable().optional(),
|
|
5255
|
+
lastConfidence: TaskConfidenceSchema.nullable().optional(),
|
|
5256
|
+
lastConfidenceUnread: z.boolean().optional(),
|
|
5257
|
+
phaseHistory: TaskPhaseHistorySchema.nullable().optional()
|
|
5183
5258
|
}).merge(ObservedSchema);
|
|
5184
5259
|
var TaskStatusResultSchema = z.object({
|
|
5185
5260
|
items: z.array(TaskStatusItemSchema),
|
|
5186
|
-
nextCursor: z.string().nullable()
|
|
5261
|
+
nextCursor: z.string().nullable(),
|
|
5262
|
+
table: z.string()
|
|
5187
5263
|
});
|
|
5188
5264
|
var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
|
|
5189
5265
|
var EscalationInputsSchema = z.object({
|
|
@@ -5191,7 +5267,7 @@ var EscalationInputsSchema = z.object({
|
|
|
5191
5267
|
round: z.number().int().nonnegative(),
|
|
5192
5268
|
head: z.string(),
|
|
5193
5269
|
branch: z.string(),
|
|
5194
|
-
prNumber: z.number().int().positive()
|
|
5270
|
+
prNumber: z.number().int().positive().nullable()
|
|
5195
5271
|
});
|
|
5196
5272
|
var EscalationEvidenceSchema = z.object({
|
|
5197
5273
|
round: z.number().int().nonnegative(),
|
|
@@ -5227,13 +5303,45 @@ var TaskEscalationReadResultSchema = z.object({
|
|
|
5227
5303
|
items: z.array(TaskEscalationPacketSchema),
|
|
5228
5304
|
nextCursor: z.string().nullable()
|
|
5229
5305
|
}).merge(ObservedSchema);
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
|
|
5306
|
+
var TaskPrCheckSchema = z.object({
|
|
5307
|
+
name: z.string(),
|
|
5308
|
+
required: z.boolean(),
|
|
5309
|
+
status: z.string(),
|
|
5310
|
+
conclusion: z.string().nullable(),
|
|
5311
|
+
detailsUrl: z.string().nullable(),
|
|
5312
|
+
failureSummary: z.string().nullable()
|
|
5313
|
+
});
|
|
5314
|
+
var TaskPrVerdictSchema = z.object({
|
|
5315
|
+
role: z.enum(["code-review", "security"]),
|
|
5316
|
+
value: z.string(),
|
|
5317
|
+
judgedHead: z.string().nullable(),
|
|
5318
|
+
objectivesVersion: z.string().nullable()
|
|
5319
|
+
});
|
|
5320
|
+
var TaskPrPauseSchema = z.object({
|
|
5321
|
+
reason: z.string(),
|
|
5322
|
+
body: z.string()
|
|
5323
|
+
});
|
|
5324
|
+
var TaskPrReviewRecordSchema = z.object({
|
|
5325
|
+
verdicts: z.array(TaskPrVerdictSchema),
|
|
5326
|
+
roundMarkers: z.array(z.number().int().nonnegative()),
|
|
5327
|
+
summaryTable: z.string().nullable(),
|
|
5328
|
+
pause: TaskPrPauseSchema.nullable()
|
|
5329
|
+
});
|
|
5330
|
+
var TaskPrReadInputSchema = z.object({
|
|
5331
|
+
task: TaskToolRefSchema,
|
|
5332
|
+
pr: z.number().int().positive().optional()
|
|
5233
5333
|
}).strict();
|
|
5334
|
+
var TaskPrReadResultSchema = z.object({
|
|
5335
|
+
task: TaskToolRefSchema,
|
|
5336
|
+
issue: z.number().int().positive(),
|
|
5337
|
+
pr: z.number().int().positive(),
|
|
5338
|
+
head: z.string().nullable(),
|
|
5339
|
+
checks: z.array(TaskPrCheckSchema),
|
|
5340
|
+
review: TaskPrReviewRecordSchema
|
|
5341
|
+
}).merge(ObservedSchema);
|
|
5234
5342
|
var TaskStartResultSchema = z.object({
|
|
5235
5343
|
requestId: z.string().min(1),
|
|
5236
|
-
run:
|
|
5344
|
+
run: TaskToolRefSchema,
|
|
5237
5345
|
started: z.boolean(),
|
|
5238
5346
|
startedAt: z.string(),
|
|
5239
5347
|
mode: z.literal("attended")
|
|
@@ -5247,7 +5355,7 @@ var TaskCancelInputSchema = z.object({
|
|
|
5247
5355
|
}).strict();
|
|
5248
5356
|
var TaskResumeResultSchema = z.object({
|
|
5249
5357
|
task: z.number().int().positive(),
|
|
5250
|
-
pr: z.number().int().positive(),
|
|
5358
|
+
pr: z.number().int().positive().nullable(),
|
|
5251
5359
|
escalationId: z.string().min(1),
|
|
5252
5360
|
outcome: z.enum(["started", "already_resumed"]),
|
|
5253
5361
|
authenticatedBy: z.string().min(1),
|
|
@@ -5256,7 +5364,7 @@ var TaskResumeResultSchema = z.object({
|
|
|
5256
5364
|
var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
|
|
5257
5365
|
var TaskCancelResultSchema = z.object({
|
|
5258
5366
|
task: z.number().int().positive(),
|
|
5259
|
-
pr: z.number().int().positive(),
|
|
5367
|
+
pr: z.number().int().positive().nullable(),
|
|
5260
5368
|
escalationId: z.string().min(1),
|
|
5261
5369
|
outcome: TaskCancelOutcomeSchema,
|
|
5262
5370
|
authenticatedBy: z.string().min(1),
|
|
@@ -5267,6 +5375,7 @@ var TASK_TOOL_NAMES = [
|
|
|
5267
5375
|
"task_start",
|
|
5268
5376
|
"task_status",
|
|
5269
5377
|
"task_escalation_read",
|
|
5378
|
+
"task_pr_read",
|
|
5270
5379
|
"task_resume",
|
|
5271
5380
|
"task_cancel"
|
|
5272
5381
|
];
|
|
@@ -5494,6 +5603,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
|
|
|
5494
5603
|
}
|
|
5495
5604
|
return findings;
|
|
5496
5605
|
}
|
|
5606
|
+
// ../../packages/aeg-core/src/gate-cutovers.ts
|
|
5607
|
+
var NO_GATE_CUTOVERS = {
|
|
5608
|
+
objectivesSinceIssue: null,
|
|
5609
|
+
briefSectionsSinceIssue: null,
|
|
5610
|
+
documentationSinceIssue: null,
|
|
5611
|
+
briefRulesSincePr: null,
|
|
5612
|
+
agentBoxesRefusedSincePr: null
|
|
5613
|
+
};
|
|
5497
5614
|
// ../../packages/aeg-core/src/dev-review-loop/types.ts
|
|
5498
5615
|
var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
|
|
5499
5616
|
// ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
|
|
@@ -5943,6 +6060,8 @@ function attemptFromEnv(value) {
|
|
|
5943
6060
|
function provenanceFor(input) {
|
|
5944
6061
|
if (input.provenance)
|
|
5945
6062
|
return input.provenance;
|
|
6063
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
6064
|
+
return "unavailable";
|
|
5946
6065
|
if (input.env.role || input.env.task)
|
|
5947
6066
|
return "env_correlated";
|
|
5948
6067
|
return "unavailable";
|
|
@@ -5963,7 +6082,7 @@ function buildHeader(input) {
|
|
|
5963
6082
|
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
5964
6083
|
const round = roundFromEnv(input.env.round);
|
|
5965
6084
|
const subject = {
|
|
5966
|
-
issue: issueFromTask(input.env.task),
|
|
6085
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
5967
6086
|
role,
|
|
5968
6087
|
...round !== undefined ? { round } : {},
|
|
5969
6088
|
...input.subject ?? {}
|
|
@@ -6269,9 +6388,9 @@ function readIssueCheckEnv(env = process.env) {
|
|
|
6269
6388
|
}
|
|
6270
6389
|
|
|
6271
6390
|
// src/lib/brief-assembly.ts
|
|
6272
|
-
import { execFileSync as
|
|
6273
|
-
import { existsSync as
|
|
6274
|
-
import { join as
|
|
6391
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
6392
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4, readdirSync as readdirSync2 } from "node:fs";
|
|
6393
|
+
import { join as join4 } from "node:path";
|
|
6275
6394
|
|
|
6276
6395
|
// ../../packages/sources/src/commands.ts
|
|
6277
6396
|
var COMMANDS = [
|
|
@@ -6466,7 +6585,7 @@ var COMMANDS = [
|
|
|
6466
6585
|
details: [
|
|
6467
6586
|
"Exposes the task-operator tool catalog (`packages/aeg-core/src/task-tools.ts`) to an agent runtime as one MCP server speaking newline-delimited JSON-RPC 2.0 (`initialize`/`tools/list`/`tools/call`). Claude registers it through the generated `.mcp.json`; Codex through its documented `~/.codex/config.toml` `[mcp_servers]` table — both point at this same command.",
|
|
6468
6587
|
"stdout carries JSON-RPC and nothing else: any stray write from the CLI (a forge-read warning) is redirected to stderr, so the protocol stream is never corrupted.",
|
|
6469
|
-
"`task_status`/`task_escalation_read` read; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6588
|
+
"`task_status`/`task_escalation_read`/`task_pr_read` read; `task_pr_read` returns the selected task's OWN pull request — every required and reported check with its state, conclusion and failure summary, plus the principal-authored review record (newest verdicts and their judged head, round markers, published summary table, pause comment) — and refuses any other pull request; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
|
|
6470
6589
|
],
|
|
6471
6590
|
status: "shipped"
|
|
6472
6591
|
},
|
|
@@ -6777,6 +6896,10 @@ var COMMANDS = [
|
|
|
6777
6896
|
flag: "--role <name>",
|
|
6778
6897
|
description: "Resolve to a specific role file (roles/<name>.md) instead of the front door"
|
|
6779
6898
|
},
|
|
6899
|
+
{
|
|
6900
|
+
flag: "--template <name>",
|
|
6901
|
+
description: "Print a template the package ships (templates/<name>-template.md) instead of the front door"
|
|
6902
|
+
},
|
|
6780
6903
|
{
|
|
6781
6904
|
flag: "--print",
|
|
6782
6905
|
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."
|
|
@@ -7255,7 +7378,12 @@ var VinayaConfigSchema = z5.object({
|
|
|
7255
7378
|
allowlist: z5.array(z5.string().min(1)).optional(),
|
|
7256
7379
|
severity: z5.enum(["warning", "error"]).optional()
|
|
7257
7380
|
}).optional(),
|
|
7258
|
-
specGrandfather: z5.array(z5.string().min(1)).optional()
|
|
7381
|
+
specGrandfather: z5.array(z5.string().min(1)).optional(),
|
|
7382
|
+
specPaths: z5.array(z5.string().min(1).refine((entry) => !entry.startsWith("/") && !/^[A-Za-z]:/.test(entry), {
|
|
7383
|
+
message: "must be a repository-relative path, not an absolute one"
|
|
7384
|
+
}).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
|
|
7385
|
+
message: "must stay inside the repository — no `..` segment"
|
|
7386
|
+
})).optional()
|
|
7259
7387
|
}).optional(),
|
|
7260
7388
|
projects: z5.array(ProjectEntrySchema).optional(),
|
|
7261
7389
|
dispatch: z5.object({
|
|
@@ -7269,6 +7397,13 @@ var VinayaConfigSchema = z5.object({
|
|
|
7269
7397
|
securityThreshold: z5.string().min(1).optional(),
|
|
7270
7398
|
maxRounds: z5.number().optional()
|
|
7271
7399
|
}).optional(),
|
|
7400
|
+
gateCutovers: z5.object({
|
|
7401
|
+
objectivesSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7402
|
+
briefSectionsSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7403
|
+
documentationSinceIssue: z5.number().int().nonnegative().optional(),
|
|
7404
|
+
briefRulesSincePr: z5.number().int().nonnegative().optional(),
|
|
7405
|
+
agentBoxesRefusedSincePr: z5.number().int().nonnegative().optional()
|
|
7406
|
+
}).optional(),
|
|
7272
7407
|
prePush: z5.object({
|
|
7273
7408
|
alwaysRun: z5.array(z5.string()).optional()
|
|
7274
7409
|
}).optional(),
|
|
@@ -7406,6 +7541,18 @@ function resolveReviewPolicy(config) {
|
|
|
7406
7541
|
maxRounds
|
|
7407
7542
|
};
|
|
7408
7543
|
}
|
|
7544
|
+
function resolveGateCutovers(config) {
|
|
7545
|
+
const raw = config?.gateCutovers;
|
|
7546
|
+
if (!raw)
|
|
7547
|
+
return NO_GATE_CUTOVERS;
|
|
7548
|
+
return {
|
|
7549
|
+
objectivesSinceIssue: raw.objectivesSinceIssue ?? null,
|
|
7550
|
+
briefSectionsSinceIssue: raw.briefSectionsSinceIssue ?? null,
|
|
7551
|
+
documentationSinceIssue: raw.documentationSinceIssue ?? null,
|
|
7552
|
+
briefRulesSincePr: raw.briefRulesSincePr ?? null,
|
|
7553
|
+
agentBoxesRefusedSincePr: raw.agentBoxesRefusedSincePr ?? null
|
|
7554
|
+
};
|
|
7555
|
+
}
|
|
7409
7556
|
function resolveRuntimeDirSetting(config) {
|
|
7410
7557
|
return config?.runtimeDir ?? null;
|
|
7411
7558
|
}
|
|
@@ -7480,7 +7627,28 @@ function trustAnchorRepoFromRemoteUrl(url) {
|
|
|
7480
7627
|
return m?.[1] && m[2] ? wellFormedRepoSlug(`${m[1]}/${m[2]}`) : null;
|
|
7481
7628
|
}
|
|
7482
7629
|
var execFileAsync4 = promisify4(execFile4);
|
|
7630
|
+
function resolveCiTrustAnchorProbeRef(env = process.env) {
|
|
7631
|
+
const ref = env.VINAYA_CI_CONFIG_PROBE_REF?.trim();
|
|
7632
|
+
if (!ref)
|
|
7633
|
+
return null;
|
|
7634
|
+
if (env.GITHUB_ACTIONS !== "true")
|
|
7635
|
+
return null;
|
|
7636
|
+
if ((env.GH_TOKEN ?? "").length > 0 || (env.GITHUB_TOKEN ?? "").length > 0)
|
|
7637
|
+
return null;
|
|
7638
|
+
return ref;
|
|
7639
|
+
}
|
|
7640
|
+
function readTrustAnchorConfigAtRef(ref) {
|
|
7641
|
+
const raw = execFileSync3("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7642
|
+
encoding: "utf-8",
|
|
7643
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
7644
|
+
timeout: 1e4
|
|
7645
|
+
});
|
|
7646
|
+
return Buffer.from(raw, "utf-8").toString("base64");
|
|
7647
|
+
}
|
|
7483
7648
|
function ghFetchTrustAnchorConfig() {
|
|
7649
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7650
|
+
if (probeRef)
|
|
7651
|
+
return readTrustAnchorConfigAtRef(probeRef);
|
|
7484
7652
|
const repo = trustAnchorRepo();
|
|
7485
7653
|
if (!repo)
|
|
7486
7654
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
@@ -7490,6 +7658,14 @@ function ghFetchTrustAnchorConfig() {
|
|
|
7490
7658
|
});
|
|
7491
7659
|
}
|
|
7492
7660
|
async function ghFetchTrustAnchorConfigAsync() {
|
|
7661
|
+
const probeRef = resolveCiTrustAnchorProbeRef();
|
|
7662
|
+
if (probeRef) {
|
|
7663
|
+
const { stdout } = await execFileAsync4("git", ["show", `${probeRef}:${LOCAL_CONFIG_FILENAME}`], {
|
|
7664
|
+
encoding: "utf-8",
|
|
7665
|
+
timeout: 1e4
|
|
7666
|
+
});
|
|
7667
|
+
return Buffer.from(stdout, "utf-8").toString("base64");
|
|
7668
|
+
}
|
|
7493
7669
|
const repo = await trustAnchorRepoAsync();
|
|
7494
7670
|
if (!repo)
|
|
7495
7671
|
throw new Error("could not resolve repo identity for the trust-anchor read");
|
|
@@ -7583,13 +7759,47 @@ function packageRoot(moduleUrl) {
|
|
|
7583
7759
|
return dir;
|
|
7584
7760
|
}
|
|
7585
7761
|
|
|
7762
|
+
// src/commands/doctrine.ts
|
|
7763
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
7764
|
+
import { existsSync as existsSync3, readdirSync, readFileSync as readFileSync3 } from "node:fs";
|
|
7765
|
+
import { dirname as dirname3, join as join3, sep } from "node:path";
|
|
7766
|
+
import matter2 from "gray-matter";
|
|
7767
|
+
var ENTRY_SEGMENTS = ["skills", "aeg", "SKILL.md"];
|
|
7768
|
+
function resolveDoctrineRoot(pkg = packageRoot(import.meta.url), cwd = process.cwd()) {
|
|
7769
|
+
return resolveDoctrineRootInfo(pkg, cwd)?.root ?? null;
|
|
7770
|
+
}
|
|
7771
|
+
function gitToplevel(cwd) {
|
|
7772
|
+
try {
|
|
7773
|
+
return execFileSync4("git", ["-C", cwd, "rev-parse", "--show-toplevel"], {
|
|
7774
|
+
encoding: "utf8",
|
|
7775
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
7776
|
+
}).trim();
|
|
7777
|
+
} catch {
|
|
7778
|
+
return null;
|
|
7779
|
+
}
|
|
7780
|
+
}
|
|
7781
|
+
function resolveDoctrineRootInfo(pkg = packageRoot(import.meta.url), cwd = process.cwd()) {
|
|
7782
|
+
const toplevel = gitToplevel(cwd);
|
|
7783
|
+
if (toplevel !== null) {
|
|
7784
|
+
const treeRoot = join3(toplevel, "aeg-root");
|
|
7785
|
+
if (existsSync3(join3(treeRoot, "roles")))
|
|
7786
|
+
return { root: treeRoot, source: "tree" };
|
|
7787
|
+
}
|
|
7788
|
+
const fromSource = !pkg.split(sep).includes("node_modules");
|
|
7789
|
+
const bundleRoot = fromSource ? join3(dirname3(dirname3(pkg)), "aeg-root") : join3(pkg, "aeg-root");
|
|
7790
|
+
return hasDoctrineEntry(bundleRoot) ? { root: bundleRoot, source: "bundle" } : null;
|
|
7791
|
+
}
|
|
7792
|
+
function hasDoctrineEntry(root) {
|
|
7793
|
+
return existsSync3(join3(root, ...ENTRY_SEGMENTS));
|
|
7794
|
+
}
|
|
7795
|
+
|
|
7586
7796
|
// src/lib/brief-assembly.ts
|
|
7587
7797
|
var PACKAGE_ROOT = packageRoot(import.meta.url);
|
|
7588
|
-
var PACKAGED_TEMPLATE_PATH =
|
|
7589
|
-
var TEMPLATE_PATH =
|
|
7798
|
+
var PACKAGED_TEMPLATE_PATH = join4(PACKAGE_ROOT, "aeg-root", "templates", "brief-template.md");
|
|
7799
|
+
var TEMPLATE_PATH = existsSync4(PACKAGED_TEMPLATE_PATH) ? PACKAGED_TEMPLATE_PATH : join4(PACKAGE_ROOT, "..", "..", "aeg-root", "templates", "brief-template.md");
|
|
7590
7800
|
function git(args) {
|
|
7591
7801
|
try {
|
|
7592
|
-
return
|
|
7802
|
+
return execFileSync5("git", args, { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
7593
7803
|
} catch {
|
|
7594
7804
|
return "";
|
|
7595
7805
|
}
|