@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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dispatch-readiness composition
|
|
3
|
-
* Pure — no `fs`, no `fetch`. Composes the forge/rationale/provenance/
|
|
2
|
+
* Dispatch-readiness composition. Pure — no `fs`, no `fetch`. Composes the forge/rationale/provenance/
|
|
4
3
|
* archival facts the CLI shim (`bin/verify-dispatch.ts`) gathers (reusing
|
|
5
4
|
* `parseTranche`, `hasProvenance`, `taskRefFromBranch`,
|
|
6
5
|
* `checkIssueRationale`, `fetchProvenance` — never re-implementing any of
|
|
@@ -37,9 +36,9 @@ export type DispatchDependsOnFact = DispatchEdgeFact & {
|
|
|
37
36
|
* `false` when the resolver could not find any tranche/task/Issue matching
|
|
38
37
|
* this edge at all — a fact distinct from `merged: false`, which means the
|
|
39
38
|
* edge resolved to a real target that just hasn't merged yet. Conflating
|
|
40
|
-
* the two produced a false "not merged yet" claim for
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* the two produced a false "not merged yet" claim for a real dependency
|
|
40
|
+
* edge, which had genuinely already merged
|
|
41
|
+
* — the message this distinction exists to correct. Absent or
|
|
43
42
|
* `true` for every edge the resolver actually matched to a target,
|
|
44
43
|
* including one whose target lookup itself then failed (an outage), which
|
|
45
44
|
* stays under the existing conservative `merged: false` default rather
|
|
@@ -47,7 +46,7 @@ export type DispatchDependsOnFact = DispatchEdgeFact & {
|
|
|
47
46
|
*/
|
|
48
47
|
resolved?: boolean
|
|
49
48
|
/**
|
|
50
|
-
* Hand-close recognition facts
|
|
49
|
+
* Hand-close recognition facts — a
|
|
51
50
|
* second, narrower path alongside `merged` for a dependency Issue closed
|
|
52
51
|
* directly by a recognized Principal, with a stated `COMPLETED` reason,
|
|
53
52
|
* rather than via a merged PR. All three are `null`/absent when the edge
|
|
@@ -143,7 +142,40 @@ export type DispatchGateInput = {
|
|
|
143
142
|
principalAllowlist?: string[]
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Every distinct dispatch-readiness blocker shape `checkDispatchReadiness`
|
|
147
|
+
* can produce, named apart from its human `message` string —
|
|
148
|
+
* the recovery-prompt switch in `check-dispatch-readiness.ts` matches on
|
|
149
|
+
* THIS, never on parsing `message`'s text. Closed deliberately: a new
|
|
150
|
+
* blocker kind that reuses an existing member here silently inherits that
|
|
151
|
+
* member's (possibly wrong) recovery prompt, while adding a genuinely new
|
|
152
|
+
* member without a matching `case` in the consumer's switch fails typecheck
|
|
153
|
+
* via that switch's exhaustiveness check — the trap a real regression fell into (a new
|
|
154
|
+
* self-dependency class read as depends-on, whose stock prompt said "close
|
|
155
|
+
* the dependency" for a dependency that can never close) is now a compile
|
|
156
|
+
* error, not a live incident.
|
|
157
|
+
*/
|
|
158
|
+
export type DispatchBlockerClass =
|
|
159
|
+
| 'internal-self-dependency'
|
|
160
|
+
| 'issue-existence'
|
|
161
|
+
| 'rationale'
|
|
162
|
+
| 'depends-on-unresolvable'
|
|
163
|
+
| 'depends-on-not-merged'
|
|
164
|
+
| 'conflicts-with'
|
|
165
|
+
| 'prior-tranche-archival'
|
|
166
|
+
|
|
167
|
+
/** A blocker's machine-readable class, beside the human string it always also carries. */
|
|
168
|
+
export type DispatchBlocker = { class: DispatchBlockerClass; message: string }
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* `blockers` stays the plain message list existing callers (`brief-render.ts`
|
|
172
|
+
* via `brief-assembly.ts`, `bin/verify-dispatch.ts`) already depend on —
|
|
173
|
+
* unchanged, byte-identical to before this task. `blockerDetails` is the new,
|
|
174
|
+
* additive field: the same blockers, each now paired with its
|
|
175
|
+
* `DispatchBlockerClass`, for a consumer (`check-dispatch-readiness.ts`) that
|
|
176
|
+
* needs to route on the class rather than re-parse the string.
|
|
177
|
+
*/
|
|
178
|
+
export type DispatchResult = { ready: boolean; blockers: string[]; blockerDetails: DispatchBlocker[] }
|
|
147
179
|
|
|
148
180
|
/**
|
|
149
181
|
* True when a parsed `depends-on` edge points back at its own host task.
|
|
@@ -152,10 +184,10 @@ export type DispatchResult = { ready: boolean; blockers: string[] }
|
|
|
152
184
|
* gate state — its presence is proof of a defect in the edge text or in its
|
|
153
185
|
* resolution. `parseRationaleDeps` (`@attalabs/aeg-forge-state`) reads only
|
|
154
186
|
* a labeled `Depends-on:`/`Conflicts-with:` field's own comma-separated,
|
|
155
|
-
* id-shaped tokens;
|
|
187
|
+
* id-shaped tokens; an unlabeled/bare span elsewhere in the
|
|
156
188
|
* "Dependency rationale" section is never read as an edge, whatever its
|
|
157
189
|
* shape (`parse-rationale-deps.ts`'s own module comment states the rule). A
|
|
158
|
-
* slug-qualified token in that list (`aeg-governance-hardening #
|
|
190
|
+
* slug-qualified token in that list (`aeg-governance-hardening #NNN`) still
|
|
159
191
|
* resolves its trailing bare number against the NAMED tranche, not the host
|
|
160
192
|
* — a resolver bug there is what would land a task depending on itself, on
|
|
161
193
|
* that tranche's own task `1`.
|
|
@@ -182,29 +214,35 @@ export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult
|
|
|
182
214
|
const { trancheSlug, task } = input
|
|
183
215
|
const taskLabel = `task ${task.id} (tranche ${trancheSlug})`
|
|
184
216
|
const principalAllowlist = input.principalAllowlist ?? PRINCIPAL_ALLOWLIST
|
|
185
|
-
const
|
|
217
|
+
const blockerDetails: DispatchBlocker[] = []
|
|
218
|
+
const push = (blockerClass: DispatchBlockerClass, message: string): void => {
|
|
219
|
+
blockerDetails.push({ class: blockerClass, message })
|
|
220
|
+
}
|
|
186
221
|
|
|
187
222
|
// Issue-existence — the topology row itself has no Issue number.
|
|
188
223
|
if (task.issue === null) {
|
|
189
|
-
|
|
224
|
+
push(
|
|
225
|
+
'issue-existence',
|
|
190
226
|
`dispatch-gate issue-existence: ${taskLabel} has no Issue (#TBD or blank) in the topology — not dispatchable until the Planner cuts the Issue.`
|
|
191
227
|
)
|
|
192
228
|
} else if (input.issue === null) {
|
|
193
229
|
// Row names an Issue number, but it doesn't resolve on the forge — phantom ref (T1's fail class).
|
|
194
|
-
|
|
230
|
+
push(
|
|
231
|
+
'issue-existence',
|
|
195
232
|
`dispatch-gate issue-existence: ${taskLabel} names Issue #${task.issue}, but it does not resolve to a real GitHub Issue (phantom reference).`
|
|
196
233
|
)
|
|
197
234
|
}
|
|
198
235
|
|
|
199
236
|
// Planner-rationale completeness — only evaluable when the Issue itself resolved.
|
|
200
237
|
if (input.issue !== null && !input.issueRationalePass) {
|
|
201
|
-
|
|
238
|
+
push(
|
|
239
|
+
'rationale',
|
|
202
240
|
`dispatch-gate rationale: Issue #${input.issue.number} for ${taskLabel} fails the rationale gate (checkIssueRationale) — the Planner must complete the eight-field rationale before this task is dispatchable.`
|
|
203
241
|
)
|
|
204
242
|
}
|
|
205
243
|
|
|
206
|
-
// Depends-on merged — OR hand-closed by a recognized Principal
|
|
207
|
-
//
|
|
244
|
+
// Depends-on merged — OR hand-closed by a recognized Principal: a
|
|
245
|
+
// second, narrower path for a dependency
|
|
208
246
|
// Issue closed directly rather than via a merged PR.
|
|
209
247
|
for (const dep of input.dependsOn) {
|
|
210
248
|
// Evaluated BEFORE the unresolvable branch: a self-reference that also
|
|
@@ -213,25 +251,28 @@ export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult
|
|
|
213
251
|
// not actually the fault.
|
|
214
252
|
if (isSelfDependency(dep, task, input.issue)) {
|
|
215
253
|
const issueStr = input.issue !== null ? `#${input.issue.number}` : '?'
|
|
216
|
-
|
|
254
|
+
push(
|
|
255
|
+
'internal-self-dependency',
|
|
217
256
|
`dispatch-gate INTERNAL: parsed a self-dependency for task ${task.id} (${issueStr}) — this is a parser bug in parseRationaleDeps, not a real dependency. Please report it upstream. Re-run once the rationale is corrected or the fix ships.`
|
|
218
257
|
)
|
|
219
258
|
continue
|
|
220
259
|
}
|
|
221
260
|
if (dep.resolved === false) {
|
|
222
|
-
// Distinct from the "not merged yet" branch below
|
|
261
|
+
// Distinct from the "not merged yet" branch below: this edge
|
|
223
262
|
// never resolved to any tranche/task/Issue at all, so a "not merged"
|
|
224
263
|
// claim would misattribute the failure to the forge rather than to
|
|
225
264
|
// the edge text. Still blocks — the conservative default is correct
|
|
226
265
|
// for a genuinely unresolvable edge — but says so honestly.
|
|
227
|
-
|
|
266
|
+
push(
|
|
267
|
+
'depends-on-unresolvable',
|
|
228
268
|
`dispatch-gate depends-on: ${taskLabel} depends on "${dep.id}", which is UNRESOLVABLE — the resolver could not find a matching tranche/task/Issue for this edge (not a claim about merge status). Not dispatchable until the edge is corrected.`
|
|
229
269
|
)
|
|
230
270
|
continue
|
|
231
271
|
}
|
|
232
272
|
if (!dep.merged && !isHandClosedByRecognizedPrincipal(dep, principalAllowlist)) {
|
|
233
273
|
const issueStr = dep.issue !== null ? ` (#${dep.issue})` : ''
|
|
234
|
-
|
|
274
|
+
push(
|
|
275
|
+
'depends-on-not-merged',
|
|
235
276
|
`dispatch-gate depends-on: ${taskLabel} depends on ${dep.id}${issueStr}, whose PR is not merged yet — not dispatchable, it serializes behind it.`
|
|
236
277
|
)
|
|
237
278
|
}
|
|
@@ -241,7 +282,8 @@ export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult
|
|
|
241
282
|
for (const c of input.conflictsWith) {
|
|
242
283
|
if (c.openOrInFlight) {
|
|
243
284
|
const issueStr = c.issue !== null ? ` (#${c.issue})` : ''
|
|
244
|
-
|
|
285
|
+
push(
|
|
286
|
+
'conflicts-with',
|
|
245
287
|
`dispatch-gate conflicts-with: ${taskLabel} conflicts with ${c.id}${issueStr}, whose PR is open or in-flight — not dispatchable until it merges.`
|
|
246
288
|
)
|
|
247
289
|
}
|
|
@@ -258,11 +300,12 @@ export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult
|
|
|
258
300
|
// Prior-tranche archival, per project named in Project(s).
|
|
259
301
|
for (const proj of input.priorTrancheArchival) {
|
|
260
302
|
if (proj.priorTrancheSlug !== null && !proj.archived) {
|
|
261
|
-
|
|
303
|
+
push(
|
|
304
|
+
'prior-tranche-archival',
|
|
262
305
|
`dispatch-gate prior-tranche-archival: project \`${proj.project}\`'s previous tranche \`${proj.priorTrancheSlug}\` is not archived — the Tranche Archivist must run before new work on this product.`
|
|
263
306
|
)
|
|
264
307
|
}
|
|
265
308
|
}
|
|
266
309
|
|
|
267
|
-
return { ready:
|
|
310
|
+
return { ready: blockerDetails.length === 0, blockers: blockerDetails.map((b) => b.message), blockerDetails }
|
|
268
311
|
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doc-claim binding. Pure — no `fs`; cited-file content is
|
|
3
|
+
* injected via `fileReader`, the same discipline `premise-check.ts` and
|
|
4
|
+
* `quoted-command.ts` keep.
|
|
5
|
+
*
|
|
6
|
+
* **The defect this closes.** A brief may not state a fact about code as
|
|
7
|
+
* prose — every fact is a premise pin or an executed command. Doctrine pages
|
|
8
|
+
* and source comments had no such rule, so a behavioural sentence ("the
|
|
9
|
+
* extraction reads only the first five lines, never a caller field") was a
|
|
10
|
+
* claim nothing verified: an edit that changed the number left the sentence
|
|
11
|
+
* standing, half true. Measured, live: one false sentence had five copies and
|
|
12
|
+
* took seven review rounds, each round fixing the one copy its finding
|
|
13
|
+
* happened to anchor.
|
|
14
|
+
*
|
|
15
|
+
* **Marker-based, not inferred.** This module implements NO inference and NO
|
|
16
|
+
* heuristic fallback over unmarked prose; only annotated sentences are ever
|
|
17
|
+
* evaluated — the Principal's standing ruling for `quoted-command.ts`,
|
|
18
|
+
* applied unchanged. Coverage grows only as docs adopt the marker.
|
|
19
|
+
*
|
|
20
|
+
* **The marker grammar** is the premise pin, reused rather than reinvented:
|
|
21
|
+
* the same `<path> contains:<literal>` / `absent:` / `sha256:` triple
|
|
22
|
+
* `premise-check.ts` parses, carried inline in a marker that sits on its own
|
|
23
|
+
* line immediately before the paragraph it binds. Two forms, one per host
|
|
24
|
+
* language — in markdown, an HTML comment of the same invisible-on-render
|
|
25
|
+
* shape as `AEG:QUOTES-FILE`; in TypeScript, a `//` line comment or a `*`
|
|
26
|
+
* block-comment line:
|
|
27
|
+
*
|
|
28
|
+
* <!-- AEG:CLAIM: <path> contains:<literal> -->
|
|
29
|
+
* // AEG:CLAIM: <path> contains:<literal>
|
|
30
|
+
*
|
|
31
|
+
* Several markers may stack before one paragraph. Both example lines above
|
|
32
|
+
* are inert here by construction: the patterns below require `AEG:CLAIM:` to
|
|
33
|
+
* follow its comment prefix immediately, and in a JSDoc both examples carry
|
|
34
|
+
* an intervening `<!--` or `//` after this comment's own `*`.
|
|
35
|
+
*
|
|
36
|
+
* **What it proves, and what it does not.** It proves the cited file still
|
|
37
|
+
* holds the literal (or still lacks it, or still hashes the same). It cannot
|
|
38
|
+
* prove the sentence is true. Choosing a literal whose change would falsify
|
|
39
|
+
* the sentence is the author's judgment, and whether an unbound sentence
|
|
40
|
+
* should be bound or deleted is the Reviewer's — the same division
|
|
41
|
+
* `documentation-coherence.md` already draws for C7. For a claim about a read
|
|
42
|
+
* window, the binding literal is the function that windows the read, never
|
|
43
|
+
* another comment: a comment-to-comment binding proves only that two
|
|
44
|
+
* unverified sentences agree.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
import { maskCode } from '@attalabs/aeg-forge-state/strip-code'
|
|
48
|
+
import { checkPremises, type PremiseAssertion } from './premise-check'
|
|
49
|
+
import { isValidCitedFilePath } from './quoted-command'
|
|
50
|
+
|
|
51
|
+
export type DocClaimSourceFile = { path: string; content: string }
|
|
52
|
+
|
|
53
|
+
/** One marker: the file carrying it, the line it sits on, and the pin it asserts. */
|
|
54
|
+
export type ClaimBinding = { file: string; line: number; assertion: PremiseAssertion }
|
|
55
|
+
|
|
56
|
+
export type ClaimFinding = { file: string; line: number; message: string }
|
|
57
|
+
|
|
58
|
+
/** Markdown form — an HTML comment, invisible on render, exactly as `AEG:QUOTES-FILE` is. */
|
|
59
|
+
const MARKDOWN_MARKER = /^\s*<!--\s*AEG:CLAIM:\s*(\S+)\s+(contains|absent|sha256)\s*:\s*(.+?)\s*-->\s*$/i
|
|
60
|
+
|
|
61
|
+
/** Source-comment form — a `//` line or a `*` block-comment line. */
|
|
62
|
+
const COMMENT_MARKER = /^\s*(?:\/\/|\*)\s*AEG:CLAIM:\s*(\S+)\s+(contains|absent|sha256)\s*:\s*(.+?)\s*$/i
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A line that announces itself as a marker but parses as neither form. Kept
|
|
66
|
+
* deliberately loose — anything carrying the `AEG:CLAIM:` token after a
|
|
67
|
+
* comment opener is a marker the author *meant*, so a typo in the kind or a
|
|
68
|
+
* missing colon surfaces as a finding rather than silently binding nothing.
|
|
69
|
+
* Silence there would be the worst outcome this check has: a sentence that
|
|
70
|
+
* looks bound to every reader and is checked by nothing.
|
|
71
|
+
*/
|
|
72
|
+
const MARKER_ANNOUNCEMENT = /^\s*(?:<!--|\/\/|\*)\s*AEG:CLAIM:/i
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Marker lines are scanned on `maskCode`'s output — index- and
|
|
76
|
+
* line-preserving, so a masked line still maps 1:1 onto the original. This is
|
|
77
|
+
* what makes a fenced example inert: `documentation-coherence.md` and
|
|
78
|
+
* `roles/reviewer.md` both *show* this grammar in fenced blocks, and a check
|
|
79
|
+
* that evaluated its own documentation would fire on every page that explains
|
|
80
|
+
* it. Values are then read back from the ORIGINAL line, never the mask —
|
|
81
|
+
* `maskCode` blanks inline code spans, and a literal may legitimately contain
|
|
82
|
+
* backticks. Same find-in-mask / slice-from-original discipline
|
|
83
|
+
* `quoted-command.ts` uses.
|
|
84
|
+
*/
|
|
85
|
+
function scanFile(path: string, content: string): { bindings: ClaimBinding[]; malformed: ClaimFinding[] } {
|
|
86
|
+
const original = content.split('\n')
|
|
87
|
+
const masked = maskCode(content).split('\n')
|
|
88
|
+
const bindings: ClaimBinding[] = []
|
|
89
|
+
const malformed: ClaimFinding[] = []
|
|
90
|
+
|
|
91
|
+
for (let i = 0; i < original.length; i++) {
|
|
92
|
+
const maskedLine = masked[i] ?? ''
|
|
93
|
+
if (!MARKER_ANNOUNCEMENT.test(maskedLine)) continue
|
|
94
|
+
|
|
95
|
+
const raw = original[i] as string
|
|
96
|
+
const line = i + 1
|
|
97
|
+
const m = MARKDOWN_MARKER.exec(raw) ?? COMMENT_MARKER.exec(raw)
|
|
98
|
+
if (m === null) {
|
|
99
|
+
malformed.push({
|
|
100
|
+
file: path,
|
|
101
|
+
line,
|
|
102
|
+
message: `${path}:${line} carries an \`AEG:CLAIM:\` marker that parses as neither form — expected \`<path> contains:<literal>\` (or \`absent:\`/\`sha256:\`), in an HTML comment in markdown or a \`//\`/\`*\` comment line in TypeScript. A marker that binds nothing is worse than no marker: the sentence reads as checked and is not.`
|
|
103
|
+
})
|
|
104
|
+
continue
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const [, citedPath, kindRaw, value] = m
|
|
108
|
+
bindings.push({
|
|
109
|
+
file: path,
|
|
110
|
+
line,
|
|
111
|
+
assertion: {
|
|
112
|
+
kind: (kindRaw as string).toLowerCase(),
|
|
113
|
+
path: citedPath as string,
|
|
114
|
+
value: (value as string).trim()
|
|
115
|
+
} as PremiseAssertion
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return { bindings, malformed }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Every well-formed marker across `files`. Zero I/O — `files` is read by the caller. */
|
|
123
|
+
export function findClaimBindings(files: readonly DocClaimSourceFile[]): ClaimBinding[] {
|
|
124
|
+
const bindings: ClaimBinding[] = []
|
|
125
|
+
for (const file of files) bindings.push(...scanFile(file.path, file.content).bindings)
|
|
126
|
+
return bindings
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Every marker that announced itself and then failed to parse. Separate from
|
|
131
|
+
* `findClaimBindings` because a malformed marker yields no binding to
|
|
132
|
+
* evaluate — it is a finding on its own, before any file is read.
|
|
133
|
+
*/
|
|
134
|
+
export function findMalformedClaimMarkers(files: readonly DocClaimSourceFile[]): ClaimFinding[] {
|
|
135
|
+
const malformed: ClaimFinding[] = []
|
|
136
|
+
for (const file of files) malformed.push(...scanFile(file.path, file.content).malformed)
|
|
137
|
+
return malformed
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Removes every `AEG:CLAIM:` marker line from a cited file's content before a
|
|
142
|
+
* `contains`/`absent` pin is evaluated against it.
|
|
143
|
+
*
|
|
144
|
+
* Defeat case this closes: a marker whose literal is the marker's own text
|
|
145
|
+
* ("`reviewer.md` contains `AEG:CLAIM`", written inside `reviewer.md`) would
|
|
146
|
+
* otherwise satisfy itself, proving nothing while reading as bound. Stripping
|
|
147
|
+
* the marker lines makes the evidence necessarily live outside the claim —
|
|
148
|
+
* and closes the cross-file variant too, where a marker in one file cites
|
|
149
|
+
* another whose only matching text is that file's own marker. Not applied to
|
|
150
|
+
* `sha256`, which hashes the file as it actually is.
|
|
151
|
+
*/
|
|
152
|
+
function withoutClaimMarkers(content: string): string {
|
|
153
|
+
return content
|
|
154
|
+
.split('\n')
|
|
155
|
+
.filter((line) => !MARKER_ANNOUNCEMENT.test(line))
|
|
156
|
+
.join('\n')
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Re-assert every binding against the cited file's current content. The
|
|
161
|
+
* predicate itself is delegated to `checkPremises` — one implementation of
|
|
162
|
+
* `contains`/`absent`/`sha256`, shared with the brief's own `Premise:` block,
|
|
163
|
+
* so the two grammars can never drift into disagreeing about what a pin
|
|
164
|
+
* means. Only the message is composed here, because a doc claim's remediation
|
|
165
|
+
* differs from a stale brief's.
|
|
166
|
+
*/
|
|
167
|
+
export function evaluateClaimBindings(
|
|
168
|
+
bindings: readonly ClaimBinding[],
|
|
169
|
+
fileReader: (path: string) => string | null
|
|
170
|
+
): ClaimFinding[] {
|
|
171
|
+
const findings: ClaimFinding[] = []
|
|
172
|
+
|
|
173
|
+
for (const binding of bindings) {
|
|
174
|
+
const { file, line, assertion } = binding
|
|
175
|
+
const pin = `${assertion.path} ${assertion.kind}:${assertion.value}`
|
|
176
|
+
|
|
177
|
+
// An invalid cited path never reaches the file-read stage. `quoted-command.ts`
|
|
178
|
+
// treats one as no marker at all, to deny an attacker any signal difference;
|
|
179
|
+
// here it is a finding instead, because the outcome is constant — the same
|
|
180
|
+
// message for every path shape, with no file read and so no content to leak —
|
|
181
|
+
// and silence would let a doc carry a marker that binds nothing forever.
|
|
182
|
+
if (!isValidCitedFilePath(assertion.path)) {
|
|
183
|
+
findings.push({
|
|
184
|
+
file,
|
|
185
|
+
line,
|
|
186
|
+
message: `${file}:${line} binds \`${pin}\`, but \`${assertion.path}\` is not a repo-root-relative path (absolute paths and \`..\` traversal are refused). Cite a file inside the repository.`
|
|
187
|
+
})
|
|
188
|
+
continue
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const content = fileReader(assertion.path)
|
|
192
|
+
if (content === null) {
|
|
193
|
+
findings.push({
|
|
194
|
+
file,
|
|
195
|
+
line,
|
|
196
|
+
message: `${file}:${line} binds \`${pin}\`, but \`${assertion.path}\` could not be read. Cite a file that exists, or remove the sentence.`
|
|
197
|
+
})
|
|
198
|
+
continue
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const subject = assertion.kind === 'sha256' ? content : withoutClaimMarkers(content)
|
|
202
|
+
const result = checkPremises([assertion], () => subject)
|
|
203
|
+
if (result.pass) continue
|
|
204
|
+
|
|
205
|
+
const remediation =
|
|
206
|
+
assertion.kind === 'sha256'
|
|
207
|
+
? `\`${assertion.path}\` changed, so the pinned hash is stale. If this PR is the change, update the pin in this same PR; otherwise the bound sentence may no longer be true — re-read it, then re-bind or remove it.`
|
|
208
|
+
: `The sentence bound here claims something \`${assertion.path}\` no longer shows. Re-read the code, then correct the sentence and re-bind it, or remove it — never reword an unbound claim.`
|
|
209
|
+
|
|
210
|
+
findings.push({
|
|
211
|
+
file,
|
|
212
|
+
line,
|
|
213
|
+
message: `${file}:${line} binds \`${pin}\`, which no longer holds. ${remediation}`
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return findings
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Both phases in one call: discover markers, report the malformed, evaluate
|
|
222
|
+
* the rest. Returns `bindingCount` alongside the findings so a caller that
|
|
223
|
+
* wants to report "how many bindings were verified" does not scan the corpus
|
|
224
|
+
* a second time to count them (review round 1, MINOR) — this is the one
|
|
225
|
+
* entry point `verify-docs` needs, and the only one the package barrel
|
|
226
|
+
* exports; the granular functions stay module-level for direct testing.
|
|
227
|
+
*/
|
|
228
|
+
export function checkDocClaims(
|
|
229
|
+
files: readonly DocClaimSourceFile[],
|
|
230
|
+
fileReader: (path: string) => string | null
|
|
231
|
+
): { findings: ClaimFinding[]; bindingCount: number } {
|
|
232
|
+
const scanned = files.map((file) => scanFile(file.path, file.content))
|
|
233
|
+
const bindings = scanned.flatMap((s) => s.bindings)
|
|
234
|
+
return {
|
|
235
|
+
findings: [...scanned.flatMap((s) => s.malformed), ...evaluateClaimBindings(bindings, fileReader)],
|
|
236
|
+
bindingCount: bindings.length
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -162,7 +162,20 @@ export function readDocNeutrals(body: string): DocNeutral[] {
|
|
|
162
162
|
* scope).
|
|
163
163
|
*/
|
|
164
164
|
const LANGUAGE_COMMENT_PREFIXES: ReadonlyArray<{ test: RegExp; prefixes: readonly string[] }> = [
|
|
165
|
-
|
|
165
|
+
// `* `/`/**`/`*/`: a JSDoc/block-comment continuation line (` * ...`
|
|
166
|
+
// inside `/** ... */`), a single-line `/** ... */` doc comment, and a
|
|
167
|
+
// standalone closing `*/` are all comment-shaped exactly like `//` is —
|
|
168
|
+
// omitting them made every neutral edit to a block-comment body (the
|
|
169
|
+
// common TS doc-comment style in this repo) register as "changes beyond
|
|
170
|
+
// comments," found live on a task whose entire surface was block-comment
|
|
171
|
+
// citation rewrites. `'* '` — WITH the trailing space — not bare `'*'`:
|
|
172
|
+
// a bare `*` would also match `*gen() {` (a generator method) or
|
|
173
|
+
// `*[Symbol.iterator]() {`, real code the original doc comment above
|
|
174
|
+
// already named as the reason a `*`-prefixed heuristic is unsafe. Every
|
|
175
|
+
// real JSDoc continuation line in this repo's own style is `* <text>`,
|
|
176
|
+
// never a bare `*` with no following space, so the space keeps the two
|
|
177
|
+
// apart.
|
|
178
|
+
{ test: /\.(ts|tsx|js|jsx|mjs|cjs)$/, prefixes: ['//', '* ', '/**', '*/'] },
|
|
166
179
|
{ test: /(^|\/)(pre-push|pre-commit|pre-merge-commit)$/, prefixes: ['#'] },
|
|
167
180
|
{ test: /\.(sh|bash)$/, prefixes: ['#'] },
|
|
168
181
|
{ test: /\.ya?ml$/, prefixes: ['#'] },
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* (a) and (b) mirror the real parent/child resolution
|
|
14
14
|
* `apps/vinaya/web/src/lib/docs/nest-doc-children.ts` performs when building
|
|
15
|
-
* Vinaya's live `/docs` nav (a Portal route
|
|
15
|
+
* Vinaya's live `/docs` nav (a Portal route added later;
|
|
16
16
|
* that file is read-only reference here, never imported): a doc whose
|
|
17
17
|
* `parent:` frontmatter points at
|
|
18
18
|
* a nonexistent (or excluded) slug is silently dropped from that nav's flat
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Derived, not hand-listed: the failure mode this replaces is exactly the
|
|
11
11
|
* one `node-route.ts`'s own header comment warns against for a second slug
|
|
12
12
|
* source. Zero I/O, additive export — takes an already-derived node, returns
|
|
13
|
-
* data, never reads a file (aeg-core purity
|
|
13
|
+
* data, never reads a file (an aeg-core purity fix).
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import type { DiagramNode } from '../diagram-model'
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* same slug it always did, since stripping/cutting are no-ops on it.
|
|
28
28
|
*
|
|
29
29
|
* Zero I/O, additive export — takes an already-derived node, returns data,
|
|
30
|
-
* never reads a file (aeg-core purity
|
|
30
|
+
* never reads a file (an aeg-core purity fix).
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
import type { DiagramNode } from '../diagram-model'
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* Purity: this module imports only the `DiagramModel` **type** from the
|
|
26
26
|
* diagram layer — no runtime coupling, no I/O. The doctrine is read (and the
|
|
27
27
|
* model derived) by the caller, which passes the derived path set in; aeg-core
|
|
28
|
-
* stays zero-I/O
|
|
28
|
+
* stays zero-I/O.
|
|
29
29
|
*
|
|
30
30
|
* Paths are relative to `aeg-root/` (e.g. `roles/developer.md`), matching
|
|
31
31
|
* `DocFrontmatter`'s existing convention.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Doctrine-no-procedures sweep
|
|
2
|
+
* Doctrine-no-procedures sweep — task 9's rule that
|
|
3
3
|
* doctrine prose describes no command sequence, made a check. `roles/*.md`
|
|
4
4
|
* and `contracts/*.md` explain *what* a command sequence does and *why*;
|
|
5
5
|
* they are not a runbook a reader executes verbatim, and a copy-pasted
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Doctrine portability — the class `check-reader-resolvable-prose` sweeps
|
|
3
|
-
* but cannot see
|
|
3
|
+
* but cannot see. That check's own module header
|
|
4
4
|
* declares zero I/O, so it never resolves a cited path against a
|
|
5
5
|
* filesystem — and if it tried, it would resolve against the authoring
|
|
6
6
|
* repo, the one environment where every author-repo-internal path in
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* from), where a deny-list of "known author-repo prefixes" would fail open
|
|
18
18
|
* on the next unlisted one instead.
|
|
19
19
|
*
|
|
20
|
-
* **A second, additive dimension
|
|
20
|
+
* **A second, additive dimension: a portable path is not the
|
|
21
21
|
* only way doctrine couples itself to one vendor.** Prose can name a
|
|
22
22
|
* specific AI company, product, or agent directly — "Claude Code", "GPT",
|
|
23
23
|
* "Anthropic" — with no path shape for the path-based predicate above to
|
|
@@ -49,7 +49,7 @@ export type PortabilityFinding = {
|
|
|
49
49
|
line: number
|
|
50
50
|
cited: string
|
|
51
51
|
message: string
|
|
52
|
-
/** `'path'` — the original non-portable-path predicate. `'vendor-name'` —
|
|
52
|
+
/** `'path'` — the original non-portable-path predicate. `'vendor-name'` — a later word-list predicate. */
|
|
53
53
|
kind: 'path' | 'vendor-name'
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -129,7 +129,7 @@ const CITED_PATH_PATTERN = /^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]*)+$/
|
|
|
129
129
|
export const NON_PATH_TOP_SEGMENTS: ReadonlySet<string> = new Set(['origin', 'refs', 'HEAD', 'vinaya', 'fix'])
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* The vendor-name word list (
|
|
132
|
+
* The vendor-name word list (a live re-count at authoring time):
|
|
133
133
|
* every AI company/product/agent name this doctrine's own prose has
|
|
134
134
|
* actually used, as either the shipped reference host or a peer example —
|
|
135
135
|
* a real, hardcoded list for this repo's own corpus, not a growable
|
|
@@ -140,7 +140,7 @@ export const NON_PATH_TOP_SEGMENTS: ReadonlySet<string> = new Set(['origin', 're
|
|
|
140
140
|
* by a dangling "code".
|
|
141
141
|
*
|
|
142
142
|
* Includes model-TIER names (`opus`/`sonnet`/`haiku`), not just
|
|
143
|
-
* company/product names — a review round on this task's own PR
|
|
143
|
+
* company/product names — a review round on this task's own PR
|
|
144
144
|
* found the first cut missed exactly this class: `brief-authoring/SKILL.md`
|
|
145
145
|
* and `brief-template.md` named a specific model tier bare, in prose, in
|
|
146
146
|
* three places the path-shape predicate could never see either. `sonnet`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Idempotent label-minting
|
|
2
|
+
* Idempotent label-minting — the
|
|
3
3
|
* decision logic three call sites (`apps/cli/src/commands/audit.ts`,
|
|
4
4
|
* `bin/check-direct-main-push.ts`, `bin/dead-branch-audit.ts`) each
|
|
5
5
|
* reimplemented: does this label already exist on the forge, and if not,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* First-push dispatch gate
|
|
2
|
+
* First-push dispatch gate. Pure —
|
|
3
3
|
* no `fs`, no `gh`/`git` shell-outs. The CLI shim (`bin/check-first-push-
|
|
4
4
|
* dispatch.ts`, wired into `.husky/pre-push`) runs the UNCHANGED
|
|
5
5
|
* `verify-dispatch.ts` gate mode once on a `task/<tranche>/<n>` branch's
|
|
@@ -94,8 +94,7 @@ export const GATE_AUDIENCE: Record<string, GateAudience> = {
|
|
|
94
94
|
* cannot import without closing a dependency cycle, so the declaration lives
|
|
95
95
|
* here and `apps/cli`'s own suite does the asserting.
|
|
96
96
|
*
|
|
97
|
-
* `check-reader-resolvable-prose`/`check-retired-vocabulary`
|
|
98
|
-
* #56): both used to live here as `internal` — hardcoded monorepo-specific
|
|
97
|
+
* `check-reader-resolvable-prose`/`check-retired-vocabulary`: both used to live here as `internal` — hardcoded monorepo-specific
|
|
99
98
|
* doctrine paths made them unreachable through an adopter's own registry.
|
|
100
99
|
* Both are now config-driven (`vinaya.config.json`'s `proseGates`) and
|
|
101
100
|
* registered in `coreCheckRegistry()` as `reader-resolvable-prose` /
|
|
@@ -127,7 +126,9 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
|
|
|
127
126
|
'dispatch-readiness': 0,
|
|
128
127
|
'closes-n': 1,
|
|
129
128
|
'single-plan-pr': 0,
|
|
129
|
+
'surface-scope': 0,
|
|
130
130
|
'test-plan': 1,
|
|
131
|
+
'principal-test-plan-wait': 1,
|
|
131
132
|
'body-bare-digits': 1,
|
|
132
133
|
'no-disk-state': 0,
|
|
133
134
|
'registry-gates': 0,
|
|
@@ -144,11 +145,21 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
|
|
|
144
145
|
'doctrine-portability': 0,
|
|
145
146
|
'workspace-escape': 0,
|
|
146
147
|
'exec-bits': 0,
|
|
148
|
+
'ci-shard-coverage': 0,
|
|
147
149
|
'changeset-coverage': 0,
|
|
148
150
|
'quoted-command': 0,
|
|
149
151
|
'main-branch-refusal': 0,
|
|
150
152
|
'token-collection-wired': 0,
|
|
151
|
-
'token-report': 1
|
|
153
|
+
'token-report': 1,
|
|
154
|
+
'pr-premise-reassert': 0,
|
|
155
|
+
// The six write-only rules named apart — `ownWorkflow: true`
|
|
156
|
+
// each, same ring reasoning as `review-gate`/`body-bare-digits` above.
|
|
157
|
+
'issue-title-grammar': 1,
|
|
158
|
+
'issue-objectives-numbering': 1,
|
|
159
|
+
'issue-parts-coverage': 1,
|
|
160
|
+
'issue-surface-globs': 1,
|
|
161
|
+
'issue-tranche-label': 1,
|
|
162
|
+
'issue-milestone-attach': 1
|
|
152
163
|
}
|
|
153
164
|
|
|
154
165
|
/**
|