clinkx 0.3.0 → 1.0.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/CHANGELOG.md +33 -0
- package/LICENSE +10 -0
- package/README.md +82 -26
- package/clinkx-workflows/dist/allowed-roots.d.ts +1 -0
- package/clinkx-workflows/dist/allowed-roots.js +5 -0
- package/clinkx-workflows/dist/allowed-roots.js.map +1 -0
- package/clinkx-workflows/dist/artifacts.d.ts +20 -1
- package/clinkx-workflows/dist/artifacts.js +38 -9
- package/clinkx-workflows/dist/artifacts.js.map +1 -1
- package/clinkx-workflows/dist/backend.d.ts +4 -0
- package/clinkx-workflows/dist/citation-check.d.ts +40 -0
- package/clinkx-workflows/dist/citation-check.js +348 -0
- package/clinkx-workflows/dist/citation-check.js.map +1 -0
- package/clinkx-workflows/dist/clink-client.d.ts +2 -1
- package/clinkx-workflows/dist/clink-client.js +17 -4
- package/clinkx-workflows/dist/clink-client.js.map +1 -1
- package/clinkx-workflows/dist/config.d.ts +145 -16
- package/clinkx-workflows/dist/config.js +384 -26
- package/clinkx-workflows/dist/config.js.map +1 -1
- package/clinkx-workflows/dist/contained-file.d.ts +172 -0
- package/clinkx-workflows/dist/contained-file.js +483 -0
- package/clinkx-workflows/dist/contained-file.js.map +1 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.d.ts +416 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.js +328 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.js.map +1 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.d.ts +24 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.js +39 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.js.map +1 -0
- package/clinkx-workflows/dist/context-cache-key.d.ts +53 -0
- package/clinkx-workflows/dist/context-cache-key.js +91 -0
- package/clinkx-workflows/dist/context-cache-key.js.map +1 -0
- package/clinkx-workflows/dist/context-mode-resolver.d.ts +27 -0
- package/clinkx-workflows/dist/context-mode-resolver.js +126 -0
- package/clinkx-workflows/dist/context-mode-resolver.js.map +1 -0
- package/clinkx-workflows/dist/context-preflight.d.ts +184 -0
- package/clinkx-workflows/dist/context-preflight.js +91 -0
- package/clinkx-workflows/dist/context-preflight.js.map +1 -0
- package/clinkx-workflows/dist/council-expander.d.ts +1 -1
- package/clinkx-workflows/dist/council-expander.js +2 -1
- package/clinkx-workflows/dist/council-expander.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/activity-contract.d.ts +165 -0
- package/clinkx-workflows/dist/dashboard/activity-contract.js +105 -0
- package/clinkx-workflows/dist/dashboard/activity-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.d.ts +25 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.js +34 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.d.ts +86 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js +480 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +36 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +1047 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.d.ts +37 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.js +145 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +31 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js +65 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +26 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js +596 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.d.ts +60 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.js +776 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.d.ts +9 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.js +44 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.d.ts +17 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.js +77 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.d.ts +25 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.js +71 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.d.ts +37 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.js +49 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.d.ts +222 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js +1178 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/contracts.d.ts +8936 -0
- package/clinkx-workflows/dist/dashboard/contracts.js +1157 -0
- package/clinkx-workflows/dist/dashboard/contracts.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/generation.d.ts +14 -0
- package/clinkx-workflows/dist/dashboard/generation.js +41 -0
- package/clinkx-workflows/dist/dashboard/generation.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/index.d.ts +28 -0
- package/clinkx-workflows/dist/dashboard/index.js +16 -0
- package/clinkx-workflows/dist/dashboard/index.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.d.ts +101 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js +748 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +303 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.js +221 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.d.ts +50 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.js +581 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.d.ts +89 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.js +71 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.d.ts +28 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.js +110 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/read-model.d.ts +86 -0
- package/clinkx-workflows/dist/dashboard/read-model.js +440 -0
- package/clinkx-workflows/dist/dashboard/read-model.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/request-admission.d.ts +31 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js +126 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/scanner.d.ts +75 -0
- package/clinkx-workflows/dist/dashboard/scanner.js +1110 -0
- package/clinkx-workflows/dist/dashboard/scanner.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/server-factory.d.ts +50 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js +431 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +2611 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.js +480 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.d.ts +21 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.js +101 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.d.ts +43 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.js +522 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.d.ts +61 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.js +378 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.d.ts +6 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.js +367 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.d.ts +23 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.js +212 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/static-responses.d.ts +10 -0
- package/clinkx-workflows/dist/dashboard/static-responses.js +94 -0
- package/clinkx-workflows/dist/dashboard/static-responses.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.d.ts +28 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.js +241 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.js.map +1 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/index-DOkMXTfB.js +25 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/style-ChJsn0KD.css +1 -0
- package/clinkx-workflows/dist/dashboard-ui/contracts/council-plan-review-input-v1.json +158 -0
- package/clinkx-workflows/dist/dashboard-ui/index.html +15 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/IBM-Plex-Mono-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/IBM-Plex-Sans-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/JetBrains-Mono-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/NOTICE.md +32 -0
- package/clinkx-workflows/dist/dashboard-ui/theme-init.js +8 -0
- package/clinkx-workflows/dist/definition-normalizer.d.ts +19 -0
- package/clinkx-workflows/dist/definition-normalizer.js.map +1 -1
- package/clinkx-workflows/dist/delegate-validate.d.ts +78 -0
- package/clinkx-workflows/dist/delegate-validate.js +97 -0
- package/clinkx-workflows/dist/delegate-validate.js.map +1 -0
- package/clinkx-workflows/dist/engine.d.ts +141 -0
- package/clinkx-workflows/dist/engine.js +882 -28
- package/clinkx-workflows/dist/engine.js.map +1 -1
- package/clinkx-workflows/dist/errors.d.ts +2 -0
- package/clinkx-workflows/dist/errors.js.map +1 -1
- package/clinkx-workflows/dist/fingerprint.d.ts +1 -1
- package/clinkx-workflows/dist/fingerprint.js +1 -1
- package/clinkx-workflows/dist/index.d.ts +19 -0
- package/clinkx-workflows/dist/index.js +15 -0
- package/clinkx-workflows/dist/index.js.map +1 -1
- package/clinkx-workflows/dist/loader.d.ts +9 -3
- package/clinkx-workflows/dist/loader.js +92 -21
- package/clinkx-workflows/dist/loader.js.map +1 -1
- package/clinkx-workflows/dist/plan-review/admission.d.ts +160 -0
- package/clinkx-workflows/dist/plan-review/admission.js +290 -0
- package/clinkx-workflows/dist/plan-review/admission.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/context-policy.d.ts +55 -0
- package/clinkx-workflows/dist/plan-review/context-policy.js +146 -0
- package/clinkx-workflows/dist/plan-review/context-policy.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/contract.d.ts +763 -0
- package/clinkx-workflows/dist/plan-review/contract.js +289 -0
- package/clinkx-workflows/dist/plan-review/contract.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/digest.d.ts +68 -0
- package/clinkx-workflows/dist/plan-review/digest.js +241 -0
- package/clinkx-workflows/dist/plan-review/digest.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/discovery.d.ts +45 -0
- package/clinkx-workflows/dist/plan-review/discovery.js +36 -0
- package/clinkx-workflows/dist/plan-review/discovery.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.d.ts +298 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.js +194 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/expander.d.ts +48 -0
- package/clinkx-workflows/dist/plan-review/expander.js +243 -0
- package/clinkx-workflows/dist/plan-review/expander.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/projector.d.ts +126 -0
- package/clinkx-workflows/dist/plan-review/projector.js +437 -0
- package/clinkx-workflows/dist/plan-review/projector.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/publication.d.ts +95 -0
- package/clinkx-workflows/dist/plan-review/publication.js +182 -0
- package/clinkx-workflows/dist/plan-review/publication.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.d.ts +34 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.js +139 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/resume.d.ts +38 -0
- package/clinkx-workflows/dist/plan-review/resume.js +122 -0
- package/clinkx-workflows/dist/plan-review/resume.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/rubric.d.ts +7 -0
- package/clinkx-workflows/dist/plan-review/rubric.js +24 -0
- package/clinkx-workflows/dist/plan-review/rubric.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/run-state.d.ts +398 -0
- package/clinkx-workflows/dist/plan-review/run-state.js +183 -0
- package/clinkx-workflows/dist/plan-review/run-state.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.d.ts +74 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.js +186 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/snapshot.d.ts +81 -0
- package/clinkx-workflows/dist/plan-review/snapshot.js +170 -0
- package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/stage-error.d.ts +19 -0
- package/clinkx-workflows/dist/plan-review/stage-error.js +20 -0
- package/clinkx-workflows/dist/plan-review/stage-error.js.map +1 -0
- package/clinkx-workflows/dist/post-processors/index.d.ts +20 -0
- package/clinkx-workflows/dist/post-processors/index.js +21 -0
- package/clinkx-workflows/dist/post-processors/index.js.map +1 -0
- package/clinkx-workflows/dist/prompt-budget.d.ts +7 -0
- package/clinkx-workflows/dist/prompt-budget.js +7 -1
- package/clinkx-workflows/dist/prompt-budget.js.map +1 -1
- package/clinkx-workflows/dist/reducers/index.js +2 -0
- package/clinkx-workflows/dist/reducers/index.js.map +1 -1
- package/clinkx-workflows/dist/run-lock-heartbeat.d.ts +2 -0
- package/clinkx-workflows/dist/run-lock-heartbeat.js +3 -0
- package/clinkx-workflows/dist/run-lock-heartbeat.js.map +1 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.d.ts +34 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.js +74 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.js.map +1 -0
- package/clinkx-workflows/dist/run-summary/cards/index.js +5 -0
- package/clinkx-workflows/dist/run-summary/cards/index.js.map +1 -1
- package/clinkx-workflows/dist/run-summary.d.ts +13 -0
- package/clinkx-workflows/dist/run-summary.js +29 -1
- package/clinkx-workflows/dist/run-summary.js.map +1 -1
- package/clinkx-workflows/dist/schema.d.ts +76 -21
- package/clinkx-workflows/dist/schema.js +10 -1
- package/clinkx-workflows/dist/schema.js.map +1 -1
- package/clinkx-workflows/dist/seed-terms.d.ts +30 -0
- package/clinkx-workflows/dist/seed-terms.js +176 -0
- package/clinkx-workflows/dist/seed-terms.js.map +1 -0
- package/clinkx-workflows/dist/server.d.ts +5 -2
- package/clinkx-workflows/dist/server.js +82 -52
- package/clinkx-workflows/dist/server.js.map +1 -1
- package/clinkx-workflows/dist/shutdown.d.ts +18 -20
- package/clinkx-workflows/dist/shutdown.js +43 -61
- package/clinkx-workflows/dist/shutdown.js.map +1 -1
- package/clinkx-workflows/dist/state-schema.d.ts +38 -0
- package/clinkx-workflows/dist/state.d.ts +170 -3
- package/clinkx-workflows/dist/state.js +1275 -28
- package/clinkx-workflows/dist/state.js.map +1 -1
- package/clinkx-workflows/dist/transport.d.ts +15 -0
- package/clinkx-workflows/dist/transport.js +19 -10
- package/clinkx-workflows/dist/transport.js.map +1 -1
- package/clinkx-workflows/dist/types.d.ts +14 -2
- package/clinkx-workflows/dist/validators/council.d.ts +318 -85
- package/clinkx-workflows/dist/validators/council.js +52 -13
- package/clinkx-workflows/dist/validators/council.js.map +1 -1
- package/clinkx-workflows/dist/validators/index.d.ts +1 -0
- package/clinkx-workflows/dist/validators/index.js +3 -0
- package/clinkx-workflows/dist/validators/index.js.map +1 -1
- package/clinkx-workflows/dist/validators/plan-review.d.ts +398 -0
- package/clinkx-workflows/dist/validators/plan-review.js +316 -0
- package/clinkx-workflows/dist/validators/plan-review.js.map +1 -0
- package/clinkx-workflows/dist/workflow-receipt.js +188 -4
- package/clinkx-workflows/dist/workflow-receipt.js.map +1 -1
- package/clinkx-workflows/dist/workflow-tools.d.ts +48 -3
- package/clinkx-workflows/dist/workflow-tools.js +1402 -59
- package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
- package/clinkx-workflows/dist/workspace-signature.d.ts +16 -0
- package/clinkx-workflows/dist/workspace-signature.js +388 -0
- package/clinkx-workflows/dist/workspace-signature.js.map +1 -0
- package/clinkx-workflows/templates/council/answer-specialist.txt +2 -1
- package/clinkx-workflows/templates/council/code-review-chairman.txt +13 -0
- package/clinkx-workflows/templates/council/code-review-cross-reviewer.txt +4 -1
- package/clinkx-workflows/templates/council/code-review-reviewer.txt +19 -3
- package/clinkx-workflows/templates/council/debug-debugger.txt +2 -1
- package/clinkx-workflows/templates/council/discover-analyst.txt +2 -1
- package/clinkx-workflows/templates/council/member.txt +2 -1
- package/clinkx-workflows/templates/council/plan-review-chairman.txt +68 -0
- package/clinkx-workflows/templates/council/plan-review-cross-reviewer.txt +51 -0
- package/clinkx-workflows/templates/council/plan-review-reviewer.txt +60 -0
- package/clinkx-workflows/templates/plan-review/chairman.txt +48 -0
- package/clinkx-workflows/templates/plan-review/cross-review.txt +52 -0
- package/clinkx-workflows/templates/plan-review/ranking.txt +16 -0
- package/clinkx-workflows/templates/plan-review/reviewer.txt +57 -0
- package/clinkx-workflows/workflows/council-answer.yaml +97 -8
- package/clinkx-workflows/workflows/council-code-review.yaml +103 -8
- package/clinkx-workflows/workflows/council-debug.yaml +97 -8
- package/clinkx-workflows/workflows/council-default.yaml +97 -8
- package/clinkx-workflows/workflows/council-discover.yaml +97 -8
- package/clinkx-workflows/workflows/council-plan-review.yaml +250 -0
- package/clinkx-workflows/workflows/plan-review-receipts.yaml +230 -0
- package/conf/adapters/agy.json +49 -0
- package/conf/adapters/claude.json +5 -0
- package/conf/adapters/codex-app-server.json +44 -0
- package/conf/adapters/codex.json +7 -2
- package/conf/adapters/glm.json +5 -0
- package/conf/adapters/grok.json +60 -0
- package/conf/adapters/hapi/agy.json +52 -0
- package/conf/adapters/hapi/claude.json +5 -0
- package/conf/adapters/hapi/codex.json +7 -2
- package/conf/adapters/hapi/glm.json +5 -0
- package/dist/activity-journal.d.ts +42 -0
- package/dist/activity-journal.js +381 -0
- package/dist/activity-journal.js.map +1 -0
- package/dist/allowed-roots.d.ts +41 -0
- package/dist/allowed-roots.js +125 -3
- package/dist/allowed-roots.js.map +1 -1
- package/dist/codex/activity-session-log.d.ts +14 -0
- package/dist/codex/activity-session-log.js +206 -0
- package/dist/codex/activity-session-log.js.map +1 -0
- package/dist/codex/agent-tools.d.ts +23 -0
- package/dist/codex/agent-tools.js +1270 -0
- package/dist/codex/agent-tools.js.map +1 -0
- package/dist/codex/app-server-client.d.ts +76 -0
- package/dist/codex/app-server-client.js +582 -0
- package/dist/codex/app-server-client.js.map +1 -0
- package/dist/codex/app-server-registry.d.ts +389 -0
- package/dist/codex/app-server-registry.js +1407 -0
- package/dist/codex/app-server-registry.js.map +1 -0
- package/dist/codex/client-types.d.ts +109 -0
- package/dist/codex/client-types.js +2 -0
- package/dist/codex/client-types.js.map +1 -0
- package/dist/codex/protocol.d.ts +5375 -0
- package/dist/codex/protocol.js +614 -0
- package/dist/codex/protocol.js.map +1 -0
- package/dist/codex/session.d.ts +263 -0
- package/dist/codex/session.js +466 -0
- package/dist/codex/session.js.map +1 -0
- package/dist/config.d.ts +185 -19
- package/dist/config.js +82 -16
- package/dist/config.js.map +1 -1
- package/dist/context-builder/anchors.d.ts +1 -0
- package/dist/context-builder/anchors.js +3 -0
- package/dist/context-builder/anchors.js.map +1 -1
- package/dist/context-builder/bundle.d.ts +35 -2
- package/dist/context-builder/bundle.js +342 -2417
- package/dist/context-builder/bundle.js.map +1 -1
- package/dist/context-builder/codemap.d.ts +5 -0
- package/dist/context-builder/codemap.js +387 -13
- package/dist/context-builder/codemap.js.map +1 -1
- package/dist/context-builder/config.d.ts +1 -0
- package/dist/context-builder/config.js +12 -0
- package/dist/context-builder/config.js.map +1 -1
- package/dist/context-builder/context-run-catalog.d.ts +17 -0
- package/dist/context-builder/context-run-catalog.js +99 -0
- package/dist/context-builder/context-run-catalog.js.map +1 -0
- package/dist/context-builder/delegate-packet.d.ts +37 -0
- package/dist/context-builder/delegate-packet.js +359 -67
- package/dist/context-builder/delegate-packet.js.map +1 -1
- package/dist/context-builder/delegate-validation.d.ts +10 -1
- package/dist/context-builder/delegate-validation.js +153 -41
- package/dist/context-builder/delegate-validation.js.map +1 -1
- package/dist/context-builder/delegate.d.ts +2 -0
- package/dist/context-builder/delegate.js +1 -0
- package/dist/context-builder/delegate.js.map +1 -1
- package/dist/context-builder/diagnostics.d.ts +11 -2
- package/dist/context-builder/diagnostics.js +39 -6
- package/dist/context-builder/diagnostics.js.map +1 -1
- package/dist/context-builder/discovery.d.ts +29 -1
- package/dist/context-builder/discovery.js +475 -175
- package/dist/context-builder/discovery.js.map +1 -1
- package/dist/context-builder/globs.js +10 -10
- package/dist/context-builder/globs.js.map +1 -1
- package/dist/context-builder/handler.d.ts +26 -2
- package/dist/context-builder/handler.js +1158 -2416
- package/dist/context-builder/handler.js.map +1 -1
- package/dist/context-builder/lifecycle-contract.d.ts +424 -0
- package/dist/context-builder/lifecycle-contract.js +523 -0
- package/dist/context-builder/lifecycle-contract.js.map +1 -0
- package/dist/context-builder/lifecycle-journal.d.ts +62 -0
- package/dist/context-builder/lifecycle-journal.js +88 -0
- package/dist/context-builder/lifecycle-journal.js.map +1 -0
- package/dist/context-builder/lifecycle-observer.d.ts +102 -0
- package/dist/context-builder/lifecycle-observer.js +258 -0
- package/dist/context-builder/lifecycle-observer.js.map +1 -0
- package/dist/context-builder/lifecycle-reconcile.d.ts +32 -0
- package/dist/context-builder/lifecycle-reconcile.js +191 -0
- package/dist/context-builder/lifecycle-reconcile.js.map +1 -0
- package/dist/context-builder/lifecycle-recovery.d.ts +2 -0
- package/dist/context-builder/lifecycle-recovery.js +14 -0
- package/dist/context-builder/lifecycle-recovery.js.map +1 -0
- package/dist/context-builder/path-signals.js +9 -5
- package/dist/context-builder/path-signals.js.map +1 -1
- package/dist/context-builder/progress.d.ts +3 -1
- package/dist/context-builder/progress.js +23 -0
- package/dist/context-builder/progress.js.map +1 -1
- package/dist/context-builder/receipt.d.ts +6 -4
- package/dist/context-builder/receipt.js +12 -1
- package/dist/context-builder/receipt.js.map +1 -1
- package/dist/context-builder/refine-handler.d.ts +14 -0
- package/dist/context-builder/refine-handler.js +790 -0
- package/dist/context-builder/refine-handler.js.map +1 -0
- package/dist/context-builder/review-coverage.d.ts +84 -0
- package/dist/context-builder/review-coverage.js +437 -0
- package/dist/context-builder/review-coverage.js.map +1 -0
- package/dist/context-builder/schema.d.ts +239 -1
- package/dist/context-builder/schema.js +112 -6
- package/dist/context-builder/schema.js.map +1 -1
- package/dist/context-builder/secrets.d.ts +28 -0
- package/dist/context-builder/secrets.js +1473 -44
- package/dist/context-builder/secrets.js.map +1 -1
- package/dist/context-builder/selection.d.ts +7 -3
- package/dist/context-builder/selection.js +200 -738
- package/dist/context-builder/selection.js.map +1 -1
- package/dist/context-builder/session-log-identity.d.ts +1 -0
- package/dist/context-builder/session-log-identity.js +66 -0
- package/dist/context-builder/session-log-identity.js.map +1 -0
- package/dist/context-builder/slice-range-math.d.ts +16 -0
- package/dist/context-builder/slice-range-math.js +137 -0
- package/dist/context-builder/slice-range-math.js.map +1 -0
- package/dist/context-builder/status.d.ts +22 -1
- package/dist/context-builder/status.js +59 -4
- package/dist/context-builder/status.js.map +1 -1
- package/dist/context-builder/storage.d.ts +35 -2
- package/dist/context-builder/storage.js +271 -14
- package/dist/context-builder/storage.js.map +1 -1
- package/dist/context-builder/token-estimate.d.ts +13 -2
- package/dist/context-builder/token-estimate.js +77 -4
- package/dist/context-builder/token-estimate.js.map +1 -1
- package/dist/context-builder/versions.d.ts +29 -0
- package/dist/context-builder/versions.js +30 -0
- package/dist/context-builder/versions.js.map +1 -0
- package/dist/context-builder/workflow-runner.d.ts +69 -0
- package/dist/context-builder/workflow-runner.js +1051 -0
- package/dist/context-builder/workflow-runner.js.map +1 -0
- package/dist/context-builder/write-watchdog.d.ts +14 -0
- package/dist/context-builder/write-watchdog.js +38 -0
- package/dist/context-builder/write-watchdog.js.map +1 -0
- package/dist/dashboard-adapter-catalog.d.ts +9 -0
- package/dist/dashboard-adapter-catalog.js +46 -0
- package/dist/dashboard-adapter-catalog.js.map +1 -0
- package/dist/dashboard-cli.d.ts +79 -0
- package/dist/dashboard-cli.js +585 -0
- package/dist/dashboard-cli.js.map +1 -0
- package/dist/dashboard-companion/client.d.ts +36 -0
- package/dist/dashboard-companion/client.js +210 -0
- package/dist/dashboard-companion/client.js.map +1 -0
- package/dist/dashboard-companion/config.d.ts +8 -0
- package/dist/dashboard-companion/config.js +52 -0
- package/dist/dashboard-companion/config.js.map +1 -0
- package/dist/dashboard-companion/http-proxy.d.ts +10 -0
- package/dist/dashboard-companion/http-proxy.js +234 -0
- package/dist/dashboard-companion/http-proxy.js.map +1 -0
- package/dist/dashboard-companion/protocol.d.ts +80 -0
- package/dist/dashboard-companion/protocol.js +455 -0
- package/dist/dashboard-companion/protocol.js.map +1 -0
- package/dist/dashboard-companion/standalone-assets.d.ts +12 -0
- package/dist/dashboard-companion/standalone-assets.js +72 -0
- package/dist/dashboard-companion/standalone-assets.js.map +1 -0
- package/dist/dashboard-companion/standalone-entry.d.ts +1 -0
- package/dist/dashboard-companion/standalone-entry.js +17 -0
- package/dist/dashboard-companion/standalone-entry.js.map +1 -0
- package/dist/dashboard-gateway/config.d.ts +9 -0
- package/dist/dashboard-gateway/config.js +44 -0
- package/dist/dashboard-gateway/config.js.map +1 -0
- package/dist/dashboard-gateway/index.d.ts +11 -0
- package/dist/dashboard-gateway/index.js +755 -0
- package/dist/dashboard-gateway/index.js.map +1 -0
- package/dist/dashboard-gateway/main.d.ts +1 -0
- package/dist/dashboard-gateway/main.js +25 -0
- package/dist/dashboard-gateway/main.js.map +1 -0
- package/dist/dashboard-pairing-token.d.ts +1 -0
- package/dist/dashboard-pairing-token.js +5 -0
- package/dist/dashboard-pairing-token.js.map +1 -0
- package/dist/elaris/client.d.ts +73 -0
- package/dist/elaris/client.js +825 -0
- package/dist/elaris/client.js.map +1 -0
- package/dist/elaris/config.d.ts +18 -0
- package/dist/elaris/config.js +75 -0
- package/dist/elaris/config.js.map +1 -0
- package/dist/elaris/errors.d.ts +41 -0
- package/dist/elaris/errors.js +205 -0
- package/dist/elaris/errors.js.map +1 -0
- package/dist/elaris/github-repo.d.ts +18 -0
- package/dist/elaris/github-repo.js +89 -0
- package/dist/elaris/github-repo.js.map +1 -0
- package/dist/elaris/index.d.ts +10 -0
- package/dist/elaris/index.js +11 -0
- package/dist/elaris/index.js.map +1 -0
- package/dist/elaris/redact.d.ts +89 -0
- package/dist/elaris/redact.js +423 -0
- package/dist/elaris/redact.js.map +1 -0
- package/dist/elaris/run-id.d.ts +5 -0
- package/dist/elaris/run-id.js +20 -0
- package/dist/elaris/run-id.js.map +1 -0
- package/dist/elaris/status.d.ts +45 -0
- package/dist/elaris/status.js +122 -0
- package/dist/elaris/status.js.map +1 -0
- package/dist/elaris/tool-schemas.d.ts +314 -0
- package/dist/elaris/tool-schemas.js +208 -0
- package/dist/elaris/tool-schemas.js.map +1 -0
- package/dist/elaris/tools.d.ts +73 -0
- package/dist/elaris/tools.js +1065 -0
- package/dist/elaris/tools.js.map +1 -0
- package/dist/elaris/types.d.ts +1541 -0
- package/dist/elaris/types.js +252 -0
- package/dist/elaris/types.js.map +1 -0
- package/dist/errors.d.ts +16 -0
- package/dist/errors.js +19 -0
- package/dist/errors.js.map +1 -1
- package/dist/handler.d.ts +4 -0
- package/dist/handler.js +10 -1
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/local-clink-backend.d.ts +3 -0
- package/dist/local-clink-backend.js +4 -0
- package/dist/local-clink-backend.js.map +1 -1
- package/dist/package-info.d.ts +2 -0
- package/dist/package-info.js +18 -0
- package/dist/package-info.js.map +1 -0
- package/dist/parsers/codex-jsonl.js +48 -3
- package/dist/parsers/codex-jsonl.js.map +1 -1
- package/dist/parsers/extract.d.ts +10 -1
- package/dist/parsers/extract.js +11 -3
- package/dist/parsers/extract.js.map +1 -1
- package/dist/pipeline.d.ts +4 -0
- package/dist/pipeline.js +129 -8
- package/dist/pipeline.js.map +1 -1
- package/dist/run-dir.d.ts +24 -0
- package/dist/run-dir.js +201 -2
- package/dist/run-dir.js.map +1 -1
- package/dist/runner.d.ts +13 -0
- package/dist/runner.js +184 -15
- package/dist/runner.js.map +1 -1
- package/dist/safety.d.ts +4 -4
- package/dist/safety.js +4 -4
- package/dist/schema.d.ts +7 -7
- package/dist/server.d.ts +1 -0
- package/dist/server.js +359 -17
- package/dist/server.js.map +1 -1
- package/dist/session-log-stream.d.ts +18 -0
- package/dist/session-log-stream.js +319 -0
- package/dist/session-log-stream.js.map +1 -0
- package/package.json +46 -5
- package/conf/adapters/gemini.json +0 -44
- package/conf/adapters/hapi/gemini.json +0 -47
- package/dist/parsers/gemini-json.d.ts +0 -2
- package/dist/parsers/gemini-json.js +0 -72
- package/dist/parsers/gemini-json.js.map +0 -1
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { constants as fsConstants } from "node:fs";
|
|
3
|
+
import { access, lstat, readdir, realpath, readFile, stat } from "node:fs/promises";
|
|
4
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
import { canonicalJson, sha256 } from "./context-cache-key.js";
|
|
7
|
+
import { logger } from "./logger.js";
|
|
8
|
+
const execFileAsync = promisify(execFile);
|
|
9
|
+
const MAX_SCAN_FILES = 10_000;
|
|
10
|
+
const GIT_MAX_BUFFER_BYTES = 100 * 1024 * 1024;
|
|
11
|
+
// Test-only seam: the effective scan cap is read through this mutable so tests
|
|
12
|
+
// can exercise the cap boundary without materializing MAX_SCAN_FILES files.
|
|
13
|
+
// Both untrackedContentHash and getSignatureCoveredPaths read the SAME effective
|
|
14
|
+
// cap, keeping covered ⊆ hashed candidates. Not part of the public API.
|
|
15
|
+
let currentMaxScanFiles = MAX_SCAN_FILES;
|
|
16
|
+
/** Test-only: override the effective scan cap. */
|
|
17
|
+
export function __setMaxScanFilesForTest(n) {
|
|
18
|
+
currentMaxScanFiles = n;
|
|
19
|
+
}
|
|
20
|
+
/** Test-only: restore the default scan cap. */
|
|
21
|
+
export function __resetMaxScanFilesForTest() {
|
|
22
|
+
currentMaxScanFiles = MAX_SCAN_FILES;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Lists untracked, non-ignored files under `pathspec`, sorted and capped to
|
|
26
|
+
* `cap`. The cap-exceeded warning is emitted here exactly once. Returned paths
|
|
27
|
+
* are repo-relative (as emitted by `git ls-files`). This is the single source
|
|
28
|
+
* of truth shared by both the untracked content hash and the covered-path set,
|
|
29
|
+
* so coverage can never exceed what the signature actually hashes.
|
|
30
|
+
*/
|
|
31
|
+
async function listCappedUntrackedFiles(topLevel, pathspec, cap) {
|
|
32
|
+
const result = await git([
|
|
33
|
+
"-C",
|
|
34
|
+
topLevel,
|
|
35
|
+
"ls-files",
|
|
36
|
+
"--others",
|
|
37
|
+
"--exclude-standard",
|
|
38
|
+
"-z",
|
|
39
|
+
...pathspec,
|
|
40
|
+
]);
|
|
41
|
+
const allPaths = splitNul(result.stdout).sort();
|
|
42
|
+
const paths = allPaths.slice(0, cap);
|
|
43
|
+
if (allPaths.length > cap) {
|
|
44
|
+
logger.warn({ topLevel, total: allPaths.length, cap }, "untracked file list exceeded scan cap; signature computed over capped prefix");
|
|
45
|
+
}
|
|
46
|
+
return paths;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Computes a workspace content signature for cache invalidation.
|
|
50
|
+
*
|
|
51
|
+
* Git trees are content-sensitive for tracked changes, staged/index state,
|
|
52
|
+
* untracked non-ignored files, and submodule identity. Gitignored files are
|
|
53
|
+
* deliberately invisible: if a gitignored file is selected through
|
|
54
|
+
* focus_paths/search_terms, the runner's promote-on-pass realized-selection
|
|
55
|
+
* coverage gate must keep that run out of the cache (`cache_write=false`).
|
|
56
|
+
* Non-git trees are best-effort only; mtime is used as the content proxy.
|
|
57
|
+
*/
|
|
58
|
+
export async function workspaceSignature(roots) {
|
|
59
|
+
const signature = await signatureForRoots(roots, { visitedGitTopLevels: new Set() });
|
|
60
|
+
return signature;
|
|
61
|
+
}
|
|
62
|
+
export async function getSignatureCoveredPaths(roots) {
|
|
63
|
+
const resolvedRoots = await resolveRoots(roots);
|
|
64
|
+
const gitRoots = [];
|
|
65
|
+
for (const root of resolvedRoots) {
|
|
66
|
+
const topLevel = await findGitTopLevel(root);
|
|
67
|
+
if (topLevel !== undefined) {
|
|
68
|
+
gitRoots.push({ root, topLevel });
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// Non-git roots intentionally add no covered paths, so they never promote.
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const covered = new Set();
|
|
75
|
+
for (const group of groupGitRoots(gitRoots)) {
|
|
76
|
+
const pathspec = ["--", ...group.roots.map((root) => relativePathspec(group.topLevel, root))];
|
|
77
|
+
const tracked = await git([
|
|
78
|
+
"-C",
|
|
79
|
+
group.topLevel,
|
|
80
|
+
"ls-files",
|
|
81
|
+
"-z",
|
|
82
|
+
...pathspec,
|
|
83
|
+
]);
|
|
84
|
+
// Tracked files are always captured by `git diff`, so unbounded tracked
|
|
85
|
+
// coverage is always safe.
|
|
86
|
+
for (const filePath of splitNul(tracked.stdout)) {
|
|
87
|
+
const absolute = join(group.topLevel, filePath);
|
|
88
|
+
covered.add(await normalizeExistingPath(absolute));
|
|
89
|
+
}
|
|
90
|
+
// Untracked files: use the SAME capped/sorted prefix the signature hashes
|
|
91
|
+
// (see untrackedContentHash — both pathspecs must stay in sync; the
|
|
92
|
+
// covered ⊆ hashed invariant relies on git normalizing them identically).
|
|
93
|
+
// Mirror the isFile filter ONLY, not the readFile step: an lstat-isFile but
|
|
94
|
+
// unreadable path is covered-here-but-not-hashed-there. Benign/self-healing
|
|
95
|
+
// — context_builder already read the file's bytes, so if they change the
|
|
96
|
+
// hashing readFile succeeds and the signature changes → MISS.
|
|
97
|
+
// Fail closed — a path that fails to lstat is not added.
|
|
98
|
+
const untrackedPaths = await listCappedUntrackedFiles(group.topLevel, pathspec, currentMaxScanFiles);
|
|
99
|
+
for (const filePath of untrackedPaths) {
|
|
100
|
+
const absolute = join(group.topLevel, filePath);
|
|
101
|
+
try {
|
|
102
|
+
const fileStat = await lstat(absolute);
|
|
103
|
+
if (!fileStat.isFile())
|
|
104
|
+
continue;
|
|
105
|
+
covered.add(await normalizeExistingPath(absolute));
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// Best-effort: a path that races away or is unreadable is not covered.
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return covered;
|
|
114
|
+
}
|
|
115
|
+
function relativePathspec(topLevel, root) {
|
|
116
|
+
const rel = relative(topLevel, root);
|
|
117
|
+
return rel === "" ? "." : rel;
|
|
118
|
+
}
|
|
119
|
+
async function signatureForRoots(roots, options) {
|
|
120
|
+
const resolvedRoots = await resolveRoots(roots);
|
|
121
|
+
const gitRoots = [];
|
|
122
|
+
const nonGitRoots = [];
|
|
123
|
+
for (const root of resolvedRoots) {
|
|
124
|
+
const topLevel = await findGitTopLevel(root);
|
|
125
|
+
if (topLevel === undefined) {
|
|
126
|
+
nonGitRoots.push(root);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
gitRoots.push({ root, topLevel });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const entries = [];
|
|
133
|
+
for (const group of groupGitRoots(gitRoots)) {
|
|
134
|
+
entries.push(await gitSignature(group, options));
|
|
135
|
+
}
|
|
136
|
+
for (const root of nonGitRoots.sort()) {
|
|
137
|
+
entries.push(await nonGitSignature(root));
|
|
138
|
+
}
|
|
139
|
+
entries.sort((a, b) => compareCodeUnits(canonicalJson(a), canonicalJson(b)));
|
|
140
|
+
return sha256(canonicalJson(entries));
|
|
141
|
+
}
|
|
142
|
+
async function resolveRoots(roots) {
|
|
143
|
+
const inputRoots = roots.length === 0 ? [process.cwd()] : roots;
|
|
144
|
+
const resolved = [];
|
|
145
|
+
for (const root of inputRoots) {
|
|
146
|
+
const absolute = resolve(root);
|
|
147
|
+
try {
|
|
148
|
+
resolved.push(await realpath(absolute));
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
resolved.push(absolute);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return Array.from(new Set(resolved)).sort();
|
|
155
|
+
}
|
|
156
|
+
async function normalizeExistingPath(path) {
|
|
157
|
+
const absolute = resolve(path);
|
|
158
|
+
try {
|
|
159
|
+
return await realpath(absolute);
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
return absolute;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
async function findGitTopLevel(root) {
|
|
166
|
+
try {
|
|
167
|
+
const inside = await git(["-C", root, "rev-parse", "--is-inside-work-tree"]);
|
|
168
|
+
if (inside.stdout.toString("utf8").trim() !== "true")
|
|
169
|
+
return undefined;
|
|
170
|
+
const topLevel = await git(["-C", root, "rev-parse", "--show-toplevel"]);
|
|
171
|
+
return (await realpath(topLevel.stdout.toString("utf8").trim()));
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function groupGitRoots(gitRoots) {
|
|
178
|
+
const groups = new Map();
|
|
179
|
+
for (const gitRoot of gitRoots) {
|
|
180
|
+
const roots = groups.get(gitRoot.topLevel) ?? [];
|
|
181
|
+
roots.push(gitRoot.root);
|
|
182
|
+
groups.set(gitRoot.topLevel, roots);
|
|
183
|
+
}
|
|
184
|
+
return Array.from(groups.entries())
|
|
185
|
+
.sort(([a], [b]) => compareCodeUnits(a, b))
|
|
186
|
+
.map(([topLevel, roots]) => ({ topLevel, roots: Array.from(new Set(roots)).sort() }));
|
|
187
|
+
}
|
|
188
|
+
function compareCodeUnits(a, b) {
|
|
189
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
190
|
+
}
|
|
191
|
+
async function gitSignature(group, options) {
|
|
192
|
+
if (options.visitedGitTopLevels.has(group.topLevel)) {
|
|
193
|
+
return { kind: "git", recursive: true };
|
|
194
|
+
}
|
|
195
|
+
const visitedGitTopLevels = new Set(options.visitedGitTopLevels);
|
|
196
|
+
visitedGitTopLevels.add(group.topLevel);
|
|
197
|
+
const pathspec = ["--", ...group.roots];
|
|
198
|
+
const head = await gitHead(group.topLevel);
|
|
199
|
+
const trackedDiff = await git(["-C", group.topLevel, "diff", "--binary", ...pathspec]);
|
|
200
|
+
const cachedDiff = await git(["-C", group.topLevel, "diff", "--cached", "--binary", ...pathspec]);
|
|
201
|
+
const untracked = await untrackedContentHash(group.topLevel, pathspec);
|
|
202
|
+
const submodules = await submoduleSignatures(group, { visitedGitTopLevels });
|
|
203
|
+
return {
|
|
204
|
+
kind: "git",
|
|
205
|
+
signature: sha256(canonicalJson([
|
|
206
|
+
head,
|
|
207
|
+
sha256(trackedDiff.stdout),
|
|
208
|
+
sha256(cachedDiff.stdout),
|
|
209
|
+
untracked,
|
|
210
|
+
submodules,
|
|
211
|
+
])),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
async function gitHead(topLevel) {
|
|
215
|
+
try {
|
|
216
|
+
const result = await git(["-C", topLevel, "rev-parse", "HEAD"]);
|
|
217
|
+
return result.stdout.toString("utf8").trim();
|
|
218
|
+
}
|
|
219
|
+
catch {
|
|
220
|
+
return "";
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async function untrackedContentHash(topLevel, pathspec) {
|
|
224
|
+
// Must use the SAME capped/sorted prefix via listCappedUntrackedFiles as
|
|
225
|
+
// getSignatureCoveredPaths; the covered ⊆ hashed invariant depends on git
|
|
226
|
+
// normalizing this pathspec identically on both sides — keep them in sync.
|
|
227
|
+
const paths = await listCappedUntrackedFiles(topLevel, pathspec, currentMaxScanFiles);
|
|
228
|
+
const records = [];
|
|
229
|
+
for (const filePath of paths) {
|
|
230
|
+
const absolute = join(topLevel, filePath);
|
|
231
|
+
try {
|
|
232
|
+
const fileStat = await lstat(absolute);
|
|
233
|
+
if (!fileStat.isFile())
|
|
234
|
+
continue;
|
|
235
|
+
records.push({ path: filePath, content_hash: sha256(await readFile(absolute)) });
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
// Best-effort: an untracked file that races away or is unreadable
|
|
239
|
+
// (EACCES/ENOENT) is skipped rather than crashing the signature.
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
records.sort((a, b) => compareCodeUnits(a.path, b.path));
|
|
244
|
+
return sha256(canonicalJson(records));
|
|
245
|
+
}
|
|
246
|
+
async function submoduleSignatures(group, options) {
|
|
247
|
+
const gitmodulesPath = join(group.topLevel, ".gitmodules");
|
|
248
|
+
try {
|
|
249
|
+
await access(gitmodulesPath, fsConstants.R_OK);
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
return [];
|
|
253
|
+
}
|
|
254
|
+
const result = await git([
|
|
255
|
+
"-C",
|
|
256
|
+
group.topLevel,
|
|
257
|
+
"config",
|
|
258
|
+
"-z",
|
|
259
|
+
"--file",
|
|
260
|
+
gitmodulesPath,
|
|
261
|
+
"--get-regexp",
|
|
262
|
+
"^submodule\\..*\\.path$",
|
|
263
|
+
], { allowFailure: true });
|
|
264
|
+
if (result.exitCode !== 0)
|
|
265
|
+
return [];
|
|
266
|
+
const entries = splitNul(result.stdout);
|
|
267
|
+
const submodulePaths = [];
|
|
268
|
+
for (const entry of entries) {
|
|
269
|
+
const newlineIndex = entry.indexOf("\n");
|
|
270
|
+
if (newlineIndex === -1)
|
|
271
|
+
continue;
|
|
272
|
+
submodulePaths.push(entry.slice(newlineIndex + 1));
|
|
273
|
+
}
|
|
274
|
+
const signatures = [];
|
|
275
|
+
for (const submodulePath of submodulePaths.sort()) {
|
|
276
|
+
const absolute = resolve(group.topLevel, submodulePath);
|
|
277
|
+
if (!isUnderAnyRoot(absolute, group.roots))
|
|
278
|
+
continue;
|
|
279
|
+
try {
|
|
280
|
+
const submoduleStat = await stat(absolute);
|
|
281
|
+
if (!submoduleStat.isDirectory()) {
|
|
282
|
+
// Uninitialized submodules have no working tree to recurse into; the
|
|
283
|
+
// parent HEAD/diff still covers the gitlink identity.
|
|
284
|
+
signatures.push({ path: submodulePath, present: false });
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
signatures.push({
|
|
288
|
+
path: submodulePath,
|
|
289
|
+
signature: await signatureForRoots([absolute], options),
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
catch {
|
|
293
|
+
signatures.push({ path: submodulePath, present: false });
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return signatures;
|
|
297
|
+
}
|
|
298
|
+
function isUnderAnyRoot(path, roots) {
|
|
299
|
+
return roots.some((root) => path === root || path.startsWith(`${root}${sep}`));
|
|
300
|
+
}
|
|
301
|
+
async function nonGitSignature(root) {
|
|
302
|
+
const entries = [];
|
|
303
|
+
await walkNonGit(root, root, entries);
|
|
304
|
+
entries.sort();
|
|
305
|
+
return {
|
|
306
|
+
kind: "non-git",
|
|
307
|
+
// Best-effort only: mtime is a content proxy, not a correctness-first
|
|
308
|
+
// signal. Correctness-critical non-git trees should use content hashing
|
|
309
|
+
// or bypass the cache until a stronger scanner is available.
|
|
310
|
+
signature: sha256(canonicalJson(entries)),
|
|
311
|
+
capped: entries.length >= currentMaxScanFiles,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
async function walkNonGit(root, current, entries) {
|
|
315
|
+
if (entries.length >= currentMaxScanFiles)
|
|
316
|
+
return;
|
|
317
|
+
let currentStat;
|
|
318
|
+
try {
|
|
319
|
+
currentStat = await lstat(current);
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
// Best-effort: an unreadable or raced entry (EACCES/ENOENT) is skipped
|
|
323
|
+
// rather than crashing the walk. This also covers an unreadable child,
|
|
324
|
+
// since each child is processed by a recursive call starting here.
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (currentStat.isSymbolicLink())
|
|
328
|
+
return;
|
|
329
|
+
if (currentStat.isFile()) {
|
|
330
|
+
entries.push(`${relative(root, current)}:${currentStat.size}:${currentStat.mtimeMs}`);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (!currentStat.isDirectory())
|
|
334
|
+
return;
|
|
335
|
+
let children;
|
|
336
|
+
try {
|
|
337
|
+
children = (await readdir(current)).sort();
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
// Unreadable directory (EACCES) — skip its subtree rather than crash.
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
for (const child of children) {
|
|
344
|
+
if (entries.length >= currentMaxScanFiles)
|
|
345
|
+
return;
|
|
346
|
+
await walkNonGit(root, join(current, child), entries);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
async function git(args, options = {}) {
|
|
350
|
+
try {
|
|
351
|
+
const result = await execFileAsync("git", args, {
|
|
352
|
+
encoding: "buffer",
|
|
353
|
+
maxBuffer: GIT_MAX_BUFFER_BYTES,
|
|
354
|
+
shell: false,
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
stdout: result.stdout,
|
|
358
|
+
stderr: result.stderr,
|
|
359
|
+
exitCode: 0,
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
catch (err) {
|
|
363
|
+
const error = err;
|
|
364
|
+
const exitCode = typeof error.code === "number" ? error.code : 1;
|
|
365
|
+
const failure = {
|
|
366
|
+
stdout: toBuffer(error.stdout),
|
|
367
|
+
stderr: toBuffer(error.stderr),
|
|
368
|
+
exitCode,
|
|
369
|
+
};
|
|
370
|
+
if (options.allowFailure === true)
|
|
371
|
+
return failure;
|
|
372
|
+
throw err;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function splitNul(buffer) {
|
|
376
|
+
return buffer
|
|
377
|
+
.toString("utf8")
|
|
378
|
+
.split("\0")
|
|
379
|
+
.filter((entry) => entry.length > 0);
|
|
380
|
+
}
|
|
381
|
+
function toBuffer(value) {
|
|
382
|
+
if (Buffer.isBuffer(value))
|
|
383
|
+
return value;
|
|
384
|
+
if (typeof value === "string")
|
|
385
|
+
return Buffer.from(value, "utf8");
|
|
386
|
+
return Buffer.alloc(0);
|
|
387
|
+
}
|
|
388
|
+
//# sourceMappingURL=workspace-signature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-signature.js","sourceRoot":"","sources":["../src/workspace-signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,IAAI,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AC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;YAC9B,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;YAC9B,QAAQ;SACT,CAAC;QACF,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI;YAAE,OAAO,OAAO,CAAC;QAClD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,MAAc;IAC9B,OAAO,MAAM;SACV,QAAQ,CAAC,MAAM,CAAC;SAChB,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAkC;IAClD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -19,7 +19,8 @@ You are a specialist answering a question. Produce a structured, well-reasoned a
|
|
|
19
19
|
Answer the question thoroughly. Provide reasoning, note caveats, and cite sources where possible.
|
|
20
20
|
- Set your ID from your call ID (e.g., member_a, specialist_b).
|
|
21
21
|
- Return exactly one JSON object matching the schema below.
|
|
22
|
-
- Return a single valid JSON object. Be thorough within the fields
|
|
22
|
+
- Return a single valid JSON object. Be thorough within the fields.
|
|
23
|
+
- The measured artifact is the final result file the runtime extracts — not a shorter chat recap. That file is pretty-printed JSON (2-space indent, trailing newline) and must stay at or under 75_000 UTF-8 bytes.
|
|
23
24
|
- Do not wrap the JSON in markdown fences.
|
|
24
25
|
- Do not output prose before or after the JSON.
|
|
25
26
|
- Use empty arrays instead of placeholder strings.
|
|
@@ -30,6 +30,19 @@ Use `reviewers` and `cross_review` as the JSON key names inside `considered_arti
|
|
|
30
30
|
- Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream reviewer artifacts. Map A to the first reviewer, B to the second, and so on. Use the original call IDs from reviewer artifact filenames in your output, not alias letters.
|
|
31
31
|
- considered_artifacts must count only artifacts actually read, not expected counts.
|
|
32
32
|
- status must be one of: approved, revise, reject. Use revise when credible unresolved blocking issues remain.
|
|
33
|
+
|
|
34
|
+
## Verdict Rules
|
|
35
|
+
- D2 SEVERITY → VERDICT PROMOTION:
|
|
36
|
+
- Any unwaived `critical` correctness/security issue — or an unwaived `high` correctness/security issue with a concrete exploit, data-loss, or breaking-change consequence — maps to `reject`.
|
|
37
|
+
- Otherwise, credible unresolved blocking issues map to `revise`.
|
|
38
|
+
- No credible blocking issues map to `approved`.
|
|
39
|
+
- D3 STRUCTURAL CAP:
|
|
40
|
+
- A structural / reuse / duplication / naming / layering smell CANNOT by itself drive `reject`; on its own it caps at `revise`.
|
|
41
|
+
- It reaches `reject` ONLY when bridge-reclassified: it demonstrably causes or masks a correctness, security, API-stability, or data-loss defect. In that case, treat it as that defect (D2 applies to the underlying defect, not the smell).
|
|
42
|
+
- D1 UNKNOWN ON ABSENCE:
|
|
43
|
+
- If reviewers report `structural_findings` with status `not_assessed_due_to_context`, or any reviewer reports `context_available` is false, treat the ABSENCE of structural findings as UNKNOWN, not as evidence the code is "structurally clean".
|
|
44
|
+
- Do not upgrade the verdict (e.g. toward `approved`) on the basis of that absence.
|
|
45
|
+
|
|
33
46
|
- Return exactly one JSON object matching the schema below.
|
|
34
47
|
- Do not wrap the JSON in markdown fences.
|
|
35
48
|
- Do not output prose before or after the JSON.
|
|
@@ -31,12 +31,15 @@ Evaluate each reviewer's assessment: identify agreement/disagreement, missed iss
|
|
|
31
31
|
- Do not wrap the JSON in markdown fences.
|
|
32
32
|
- Do not output prose before or after the JSON.
|
|
33
33
|
- Use empty arrays instead of placeholder strings.
|
|
34
|
+
- Score each candidate BEFORE producing the ranking; the ranking must follow from the scores. A deterministic reducer downstream depends on both `ranking` and each candidate's `overall_score_100`, so always populate both.
|
|
35
|
+
- Each `per_review_feedback[]` entry MAY ALSO include optional structured `missed_issue_refs` and `false_positive_refs` arrays ALONGSIDE — not replacing — the existing `missed_issues` and `false_positives` string arrays. Keep the string arrays populated as before; the `*_refs` arrays add structured detail.
|
|
36
|
+
- EVIDENCE BREVITY for refs: each ref may carry at most 2 `evidence` entries; each `observation` quotes 1-2 lines and stays at or under ~240 characters; each `location` uses `path:line` form at or under 120 characters and MUST cite a file present in the diff or attached context (fabricated citations are stripped downstream).
|
|
34
37
|
|
|
35
38
|
IMPORTANT: For enum fields, use ONLY the exact values shown (separated by | in the schema below). Do not use synonyms, variations, or alternative phrasings.
|
|
36
39
|
Return a single valid JSON object. Be thorough within the fields; brevity is not a goal. Match this schema:
|
|
37
40
|
{
|
|
38
41
|
"independent_baseline": "Your concise independent code review produced in Phase 1",
|
|
39
|
-
"per_review_feedback": [{"candidate_id": "A", "agreement_level": "agree|partial|disagree", "missed_issues": ["..."], "false_positives": ["..."], "comments": "...", "overall_score_100": 80}],
|
|
42
|
+
"per_review_feedback": [{"candidate_id": "A", "agreement_level": "agree|partial|disagree", "missed_issues": ["..."], "false_positives": ["..."], "missed_issue_refs": [{"description": "...", "file": "path", "evidence": [{"location": "path:line", "observation": "1-2 quoted lines"}], "confidence": 0}], "false_positive_refs": [{"description": "...", "file": "path", "evidence": [{"location": "path:line", "observation": "1-2 quoted lines"}], "confidence": 0}], "comments": "...", "overall_score_100": 80}],
|
|
40
43
|
"extra_blocking_issues": ["Any additional blocking issues not covered by other reviewers"],
|
|
41
44
|
"extra_tests": ["Any additional tests that should be added"],
|
|
42
45
|
"ranking": [{"candidate_id": "A", "rank": 1, "rationale": "..."}]
|
|
@@ -12,6 +12,9 @@ You are a code reviewer. Review the code changes for correctness, security, perf
|
|
|
12
12
|
## Rubric
|
|
13
13
|
{{rubric}}
|
|
14
14
|
|
|
15
|
+
## Repository Context Availability
|
|
16
|
+
context_available = {{context_available}}
|
|
17
|
+
|
|
15
18
|
## Review Lens
|
|
16
19
|
{{call.id}}
|
|
17
20
|
- If your call ID ends in _a: correctness and regressions first.
|
|
@@ -28,12 +31,25 @@ Analyze the code changes above. Identify blocking issues and non-blocking sugges
|
|
|
28
31
|
- If the exact line is unknown, omit the line field entirely. Never use placeholder values like 0.
|
|
29
32
|
- Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
## Review Rules
|
|
35
|
+
- D1 STRUCTURAL GATING (driven by context_available = {{context_available}}):
|
|
36
|
+
- If {{context_available}} is false, you lack repository context beyond the diff and attached files. Do NOT make reuse, duplication, or layering claims as if verified. Emitting `structural_findings: []` and asserting the code is structurally clean is WRONG. Instead, if you observed a *possible* structural concern but cannot verify it without the wider repository, emit it in `structural_findings` with status `not_assessed_due_to_context` and a low `confidence`; otherwise emit an empty array. Never assert the code is structurally clean.
|
|
37
|
+
- If {{context_available}} is true, assess the five lenses (reuse, duplication, layering, naming, maintainability) against the available context and use status `assessed`.
|
|
38
|
+
- D4 EVIDENCE BREVITY: each finding may carry at most 2 `evidence` entries. Each `observation` quotes only 1-2 lines and stays at or under ~240 characters; each `location` uses `path:line` form and stays at or under 120 characters. Every evidence `location` MUST cite a file present in the diff or attached context — fabricated citations are stripped downstream, so do not invent paths or lines.
|
|
39
|
+
- MINIMALITY COUNTERWEIGHT: prefer the smallest correct fix. Do not inflate nits or style preferences into blocking issues.
|
|
40
|
+
- SEVERITY: `severity` is strictly one of critical|high|medium. No other values.
|
|
41
|
+
- CONTEXT FLAG: set the top-level `context_available` boolean equal to the {{context_available}} value (true when {{context_available}} is true, false when it is false).
|
|
42
|
+
|
|
43
|
+
Return a single valid JSON object. Match this schema:
|
|
32
44
|
{
|
|
33
45
|
"summary": "Brief review summary",
|
|
34
|
-
"blocking_issues": [{"file": "path", "severity": "critical|high|medium", "description": "issue", "suggestion": "fix"}],
|
|
46
|
+
"blocking_issues": [{"file": "path", "severity": "critical|high|medium", "description": "issue", "suggestion": "fix", "evidence": [{"location": "path:line", "observation": "1-2 quoted lines"}], "confidence": 0}],
|
|
35
47
|
"non_blocking_suggestions": [{"file": "path", "category": "style|naming|docs", "description": "suggestion"}],
|
|
36
|
-
"
|
|
48
|
+
"structural_findings": [{"file": "path", "lens": "reuse|duplication|layering|naming|maintainability", "description": "finding", "evidence": [{"location": "path:line", "observation": "1-2 quoted lines"}], "confidence": 0, "status": "assessed|not_assessed_due_to_context"}],
|
|
49
|
+
"rubric_scores": [{"criterion": "correctness", "score": 0, "reason": "why"}, {"criterion": "security", "score": 0, "reason": "why"}, {"criterion": "performance", "score": 0, "reason": "why"}, {"criterion": "readability", "score": 0, "reason": "why"}, {"criterion": "test_coverage", "score": 0, "reason": "why"}, {"criterion": "api_stability", "score": 0, "reason": "why"}],
|
|
50
|
+
"context_available": {{context_available}},
|
|
37
51
|
"overall_score_100": 0,
|
|
38
52
|
"tests_to_add_or_update": ["Test description"]
|
|
39
53
|
}
|
|
54
|
+
|
|
55
|
+
The measured artifact is the final result file the runtime extracts — not a shorter chat recap. That file is pretty-printed JSON (2-space indent, trailing newline) and must stay at or under 75_000 UTF-8 bytes.
|
|
@@ -24,7 +24,8 @@ Analyze the error. Identify the most likely explanations with evidence, propose
|
|
|
24
24
|
- List hypotheses ranked by likelihood. The first hypothesis is your leading candidate.
|
|
25
25
|
- Use diagnostic_steps for concrete tests or checks to confirm/rule out each hypothesis.
|
|
26
26
|
- Return exactly one JSON object matching the schema below.
|
|
27
|
-
- Return a single valid JSON object. Be thorough within the fields
|
|
27
|
+
- Return a single valid JSON object. Be thorough within the fields.
|
|
28
|
+
- The measured artifact is the final result file the runtime extracts — not a shorter chat recap. That file is pretty-printed JSON (2-space indent, trailing newline) and must stay at or under 75_000 UTF-8 bytes.
|
|
28
29
|
- Do not wrap the JSON in markdown fences.
|
|
29
30
|
- Do not output prose before or after the JSON.
|
|
30
31
|
- Use empty arrays instead of placeholder strings.
|
|
@@ -19,7 +19,8 @@ You are a research analyst investigating a topic. Produce structured findings.
|
|
|
19
19
|
Analyze the request. Identify key findings with confidence levels and sources. Synthesize your analysis and note open questions.
|
|
20
20
|
- Set your ID from your call ID (e.g., member_a, specialist_b).
|
|
21
21
|
- Return exactly one JSON object matching the schema below.
|
|
22
|
-
- Return a single valid JSON object. Be thorough within the fields
|
|
22
|
+
- Return a single valid JSON object. Be thorough within the fields.
|
|
23
|
+
- The measured artifact is the final result file the runtime extracts — not a shorter chat recap. That file is pretty-printed JSON (2-space indent, trailing newline) and must stay at or under 75_000 UTF-8 bytes.
|
|
23
24
|
- Do not wrap the JSON in markdown fences.
|
|
24
25
|
- Do not output prose before or after the JSON.
|
|
25
26
|
- Use empty arrays instead of placeholder strings.
|
|
@@ -19,7 +19,8 @@ You are a council member evaluating a request. Your role is to provide an indepe
|
|
|
19
19
|
Analyze the request above and produce a structured recommendation. Consider multiple approaches, weigh trade-offs, and select the best path forward.
|
|
20
20
|
- Set your ID from your call ID (e.g., member_a, specialist_b).
|
|
21
21
|
- Return exactly one JSON object matching the schema below.
|
|
22
|
-
- Return a single valid JSON object. Be thorough within the fields
|
|
22
|
+
- Return a single valid JSON object. Be thorough within the fields.
|
|
23
|
+
- The measured artifact is the final result file the runtime extracts — not a shorter chat recap. That file is pretty-printed JSON (2-space indent, trailing newline) and must stay at or under 75_000 UTF-8 bytes.
|
|
23
24
|
- Do not wrap the JSON in markdown fences.
|
|
24
25
|
- Do not output prose before or after the JSON.
|
|
25
26
|
- Use empty arrays instead of placeholder strings.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
You are the council chairman synthesizing the final plan review verdict.
|
|
2
|
+
|
|
3
|
+
IMPORTANT: This is the LITE plan review. Your verdict is a generic council result — it is NOT an approval receipt, it binds to no plan revision or digest, and it cannot feed an approval gate. Say what the council found; a human decides what to do with it.
|
|
4
|
+
|
|
5
|
+
## Original Request
|
|
6
|
+
{{user_request}}
|
|
7
|
+
|
|
8
|
+
## Mode
|
|
9
|
+
{{mode}}
|
|
10
|
+
|
|
11
|
+
## Rubric
|
|
12
|
+
{{rubric}}
|
|
13
|
+
|
|
14
|
+
## Do not mutate anything
|
|
15
|
+
You must not write, edit, create, or delete any file, and you must not run any mutating command. This call is read-only BY INSTRUCTION ONLY — it is on you to honor it.
|
|
16
|
+
|
|
17
|
+
## Repository Context Availability
|
|
18
|
+
context_available = {{context_available}}
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
You have been provided with JSON files containing:
|
|
22
|
+
1. Reviewer assessments of the attached plan (from the reviewers stage)
|
|
23
|
+
2. Cross-reviewer evaluations (from the cross-review stage)
|
|
24
|
+
3. Ranking analysis (advisory, from the ranking_analysis stage): a deterministic summary of reviewer consensus rankings, score averages, and disagreement spread. Use it as one signal among many, not as ground truth — a top-ranked review can still be wrong, and a bottom-ranked review can be the one that caught the real blocker.
|
|
25
|
+
|
|
26
|
+
Read all provided files, including the attached plan. Synthesize into a final verdict addressing the original request. Produce a clear approved/revise/reject decision with rationale.
|
|
27
|
+
|
|
28
|
+
Use `reviewers` and `cross_review` as the JSON key names inside `considered_artifacts`.
|
|
29
|
+
- Act as the council editor/moderator, not a new first-principles author.
|
|
30
|
+
- Prefer consensus when well-supported, but do not erase strong minority concerns. A blocker raised by only one reviewer that is not demonstrably resolved still belongs in final_blocking_issues — dropping a blocker because a majority disagreed with it is the exact failure this synthesis must avoid.
|
|
31
|
+
- If you depart from reviewer consensus, explain why in rationale.
|
|
32
|
+
- Do not introduce major claims unsupported by the provided artifacts. If you must infer, mark it clearly in rationale.
|
|
33
|
+
- If fewer than 2 upstream stage artifacts exist, say the result is degraded and lower confidence in consensus claims.
|
|
34
|
+
- selected_approach must name exact call IDs or an explicit synthesis expression.
|
|
35
|
+
- Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream reviewer artifacts. Map A to the first reviewer, B to the second, and so on. Use the original call IDs from reviewer artifact filenames in your output, not alias letters.
|
|
36
|
+
- considered_artifacts must count only artifacts actually read, not expected counts.
|
|
37
|
+
- status must be one of: approved, revise, reject. Use revise when credible unresolved blocking issues remain.
|
|
38
|
+
|
|
39
|
+
## Verdict Rules
|
|
40
|
+
- SEVERITY → VERDICT PROMOTION: any unwaived `critical` plan defect — a defect that would make implementing the plan as written cause data loss, a security hole, or an unrecoverable state — maps to `reject`. Otherwise, credible unresolved blocking issues map to `revise`. No credible blocking issues map to `approved`.
|
|
41
|
+
- UNVERIFIED IS NOT APPROVED: if reviewers report `context_available` is false or flag claims they could not verify, treat the ABSENCE of findings in those areas as UNKNOWN, not as evidence the plan is sound. Do not upgrade the verdict on the basis of that absence.
|
|
42
|
+
- `approved` here means "the council found no credible blocker" — it is an advisory verdict, never a sign-off on behalf of any reviewer or any external approval process.
|
|
43
|
+
|
|
44
|
+
- Return exactly one JSON object matching the schema below.
|
|
45
|
+
- Do not wrap the JSON in markdown fences.
|
|
46
|
+
- Do not output prose before or after the JSON.
|
|
47
|
+
- Use empty arrays instead of placeholder strings.
|
|
48
|
+
|
|
49
|
+
Respond with valid JSON matching this schema:
|
|
50
|
+
{
|
|
51
|
+
"decision": "Final plan review verdict",
|
|
52
|
+
"rationale": "Why this decision",
|
|
53
|
+
"selected_approach": "Which reviewer synthesis was chosen",
|
|
54
|
+
"considered_artifacts": {"reviewers": 0, "cross_review": 0},
|
|
55
|
+
"action_items": ["Next step 1", "Next step 2"],
|
|
56
|
+
"council_summary": {
|
|
57
|
+
"agreements": ["Consensus point"],
|
|
58
|
+
"disagreements": ["Open disagreement"],
|
|
59
|
+
"minority_views": ["Minority concern"]
|
|
60
|
+
},
|
|
61
|
+
"confidence": 0-100,
|
|
62
|
+
"final_score_100": 0-100,
|
|
63
|
+
"final_score_10": 0-10,
|
|
64
|
+
"status": "approved|revise|reject",
|
|
65
|
+
"final_blocking_issues": ["Blocking issue summary — every unresolved blocker any reviewer raised"],
|
|
66
|
+
"final_non_blocking_suggestions": ["Suggestion summary"],
|
|
67
|
+
"tests_to_add_or_update": ["Runnable verification the plan should add"]
|
|
68
|
+
}
|