@quickchatai/pi-quickreview 0.0.0-stage → 1.2.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/LICENSE +23 -0
- package/README.md +75 -2
- package/assets/agents/pass-abstraction.md +64 -0
- package/assets/agents/pass-ask-human.md +134 -0
- package/assets/agents/pass-backcompat.md +67 -0
- package/assets/agents/pass-baseline.md +61 -0
- package/assets/agents/pass-behaviour-delta.md +64 -0
- package/assets/agents/pass-bounds.md +36 -0
- package/assets/agents/pass-claims.md +31 -0
- package/assets/agents/pass-concurrency.md +168 -0
- package/assets/agents/pass-consistency.md +57 -0
- package/assets/agents/pass-contracts.md +30 -0
- package/assets/agents/pass-data-safety.md +54 -0
- package/assets/agents/pass-deferred.md +35 -0
- package/assets/agents/pass-delivery.md +37 -0
- package/assets/agents/pass-duplication.md +60 -0
- package/assets/agents/pass-intent.md +63 -0
- package/assets/agents/pass-lint-conformance.md +46 -0
- package/assets/agents/pass-maintainability.md +67 -0
- package/assets/agents/pass-placement.md +68 -0
- package/assets/agents/pass-prod-risk.md +24 -0
- package/assets/agents/pass-rollout.md +32 -0
- package/assets/agents/pass-roundtrip.md +46 -0
- package/assets/agents/pass-security.md +31 -0
- package/assets/agents/pass-simplicity.md +68 -0
- package/assets/agents/pass-statelessness.md +27 -0
- package/assets/agents/pass-style.md +37 -0
- package/assets/agents/pass-sweep.md +57 -0
- package/assets/agents/pass-tests.md +58 -0
- package/assets/agents/pass-ui.md +23 -0
- package/assets/agents/pass-validate.md +50 -0
- package/assets/agents/pass-widened.md +46 -0
- package/assets/agents/scan/pass-scan.md +86 -0
- package/assets/config.example.toml +1099 -0
- package/assets/deploy/reviewer/AGENTS.override.md +12 -0
- package/assets/profiles/default/README.md +21 -0
- package/assets/profiles/default/addenda/.gitkeep +0 -0
- package/assets/profiles/default/profile.toml +17 -0
- package/assets/profiles/example-django/README.md +21 -0
- package/assets/profiles/example-django/addenda/10-migration-discipline.md +13 -0
- package/assets/profiles/example-django/addenda/20-new-column-nullability.md +12 -0
- package/assets/profiles/example-django/addenda/30-test-doctrine.md +12 -0
- package/assets/profiles/example-django/addenda/40-orm-usage.md +19 -0
- package/assets/profiles/example-django/addenda/50-declared-shape.md +10 -0
- package/assets/profiles/example-django/addenda/60-config-placement.md +14 -0
- package/assets/profiles/example-django/heuristics.toml +24 -0
- package/assets/profiles/example-django/profile.toml +9 -0
- package/assets/profiles/fast/README.md +24 -0
- package/assets/profiles/fast/profile.toml +59 -0
- package/assets/profiles/minimal/README.md +17 -0
- package/assets/profiles/minimal/addenda/.gitkeep +0 -0
- package/assets/profiles/minimal/profile.toml +8 -0
- package/assets/profiles/snappy/README.md +24 -0
- package/assets/profiles/snappy/addenda/10-race-as-question.md +6 -0
- package/assets/profiles/snappy/profile.toml +46 -0
- package/assets/prompts/companion-day-open.md +46 -0
- package/assets/prompts/companion-first-run.md +104 -0
- package/assets/prompts/companion.md +821 -0
- package/assets/prompts/conversation-system.md +117 -0
- package/assets/prompts/eod-sweep.md +120 -0
- package/assets/prompts/onboarding.md +113 -0
- package/assets/prompts/pass-common.md +52 -0
- package/assets/prompts/pass-quality-common.md +22 -0
- package/assets/prompts/round-first.md +874 -0
- package/assets/prompts/round-follow-up.md +991 -0
- package/assets/prompts/round-re-review.md +889 -0
- package/assets/prompts/round-recheck.md +196 -0
- package/assets/prompts/round-staleness.md +856 -0
- package/assets/schemas/review-result.v1.json +391 -0
- package/assets/schemas/scan-result.v1.json +421 -0
- package/assets/schemas/version.v1.json +57 -0
- package/assets/seed-manifest.json +19 -0
- package/assets/seeds/agents/pass-baseline.md +61 -0
- package/assets/seeds/agents/pass-contracts.md +30 -0
- package/assets/seeds/agents/pass-data-safety.md +54 -0
- package/assets/seeds/agents/pass-delivery.md +37 -0
- package/assets/seeds/agents/pass-prod-risk.md +24 -0
- package/assets/seeds/agents/pass-security.md +31 -0
- package/assets/seeds/agents/pass-statelessness.md +27 -0
- package/assets/seeds/agents/pass-ui.md +23 -0
- package/assets/seeds/agents/pass-validate.md +50 -0
- package/assets/seeds/prompts/conversation-system.md +117 -0
- package/assets/seeds/prompts/eod-sweep.md +120 -0
- package/assets/seeds/prompts/pass-common.md +52 -0
- package/dist/extensions/bash-guard.d.ts +467 -0
- package/dist/extensions/bash-guard.d.ts.map +1 -0
- package/dist/extensions/bash-guard.js +3058 -0
- package/dist/extensions/bash-guard.js.map +1 -0
- package/dist/extensions/finding-clusters.d.ts +33 -0
- package/dist/extensions/finding-clusters.d.ts.map +1 -0
- package/dist/extensions/finding-clusters.js +218 -0
- package/dist/extensions/finding-clusters.js.map +1 -0
- package/dist/extensions/ledger-pin.d.ts +76 -0
- package/dist/extensions/ledger-pin.d.ts.map +1 -0
- package/dist/extensions/ledger-pin.js +331 -0
- package/dist/extensions/ledger-pin.js.map +1 -0
- package/dist/extensions/lens.d.ts +43 -0
- package/dist/extensions/lens.d.ts.map +1 -0
- package/dist/extensions/lens.js +150 -0
- package/dist/extensions/lens.js.map +1 -0
- package/dist/extensions/pi-tool.d.ts +22 -0
- package/dist/extensions/pi-tool.d.ts.map +1 -0
- package/dist/extensions/pi-tool.js +20 -0
- package/dist/extensions/pi-tool.js.map +1 -0
- package/dist/extensions/quickreview.d.ts +21 -0
- package/dist/extensions/quickreview.d.ts.map +1 -0
- package/dist/extensions/quickreview.js +132 -0
- package/dist/extensions/quickreview.js.map +1 -0
- package/dist/src/anchors.d.ts +54 -0
- package/dist/src/anchors.d.ts.map +1 -0
- package/dist/src/anchors.js +127 -0
- package/dist/src/anchors.js.map +1 -0
- package/dist/src/assetroot.d.ts +16 -0
- package/dist/src/assetroot.d.ts.map +1 -0
- package/dist/src/assetroot.js +77 -0
- package/dist/src/assetroot.js.map +1 -0
- package/dist/src/authwatch.d.ts +61 -0
- package/dist/src/authwatch.d.ts.map +1 -0
- package/dist/src/authwatch.js +210 -0
- package/dist/src/authwatch.js.map +1 -0
- package/dist/src/budget.d.ts +15 -0
- package/dist/src/budget.d.ts.map +1 -0
- package/dist/src/budget.js +32 -0
- package/dist/src/budget.js.map +1 -0
- package/dist/src/casebudget.d.ts +3 -0
- package/dist/src/casebudget.d.ts.map +1 -0
- package/dist/src/casebudget.js +3 -0
- package/dist/src/casebudget.js.map +1 -0
- package/dist/src/cigate.d.ts +116 -0
- package/dist/src/cigate.d.ts.map +1 -0
- package/dist/src/cigate.js +176 -0
- package/dist/src/cigate.js.map +1 -0
- package/dist/src/codespan.d.ts +46 -0
- package/dist/src/codespan.d.ts.map +1 -0
- package/dist/src/codespan.js +75 -0
- package/dist/src/codespan.js.map +1 -0
- package/dist/src/contextpack.d.ts +56 -0
- package/dist/src/contextpack.d.ts.map +1 -0
- package/dist/src/contextpack.js +195 -0
- package/dist/src/contextpack.js.map +1 -0
- package/dist/src/contract.d.ts +8 -0
- package/dist/src/contract.d.ts.map +1 -0
- package/dist/src/contract.js +21 -0
- package/dist/src/contract.js.map +1 -0
- package/dist/src/coverage.d.ts +32 -0
- package/dist/src/coverage.d.ts.map +1 -0
- package/dist/src/coverage.js +85 -0
- package/dist/src/coverage.js.map +1 -0
- package/dist/src/datafence.d.ts +19 -0
- package/dist/src/datafence.d.ts.map +1 -0
- package/dist/src/datafence.js +60 -0
- package/dist/src/datafence.js.map +1 -0
- package/dist/src/dedup.d.ts +65 -0
- package/dist/src/dedup.d.ts.map +1 -0
- package/dist/src/dedup.js +459 -0
- package/dist/src/dedup.js.map +1 -0
- package/dist/src/depsources.d.ts +304 -0
- package/dist/src/depsources.d.ts.map +1 -0
- package/dist/src/depsources.js +3367 -0
- package/dist/src/depsources.js.map +1 -0
- package/dist/src/diffinput.d.ts +10 -0
- package/dist/src/diffinput.d.ts.map +1 -0
- package/dist/src/diffinput.js +172 -0
- package/dist/src/diffinput.js.map +1 -0
- package/dist/src/doubtwords.d.ts +10 -0
- package/dist/src/doubtwords.d.ts.map +1 -0
- package/dist/src/doubtwords.js +13 -0
- package/dist/src/doubtwords.js.map +1 -0
- package/dist/src/ecosystem.d.ts +148 -0
- package/dist/src/ecosystem.d.ts.map +1 -0
- package/dist/src/ecosystem.js +338 -0
- package/dist/src/ecosystem.js.map +1 -0
- package/dist/src/engine/agentdir.d.ts +5 -0
- package/dist/src/engine/agentdir.d.ts.map +1 -0
- package/dist/src/engine/agentdir.js +21 -0
- package/dist/src/engine/agentdir.js.map +1 -0
- package/dist/src/engine/auth.d.ts +214 -0
- package/dist/src/engine/auth.d.ts.map +1 -0
- package/dist/src/engine/auth.js +374 -0
- package/dist/src/engine/auth.js.map +1 -0
- package/dist/src/engine/budget.d.ts +60 -0
- package/dist/src/engine/budget.d.ts.map +1 -0
- package/dist/src/engine/budget.js +113 -0
- package/dist/src/engine/budget.js.map +1 -0
- package/dist/src/engine/capfd.d.ts +6 -0
- package/dist/src/engine/capfd.d.ts.map +1 -0
- package/dist/src/engine/capfd.js +21 -0
- package/dist/src/engine/capfd.js.map +1 -0
- package/dist/src/engine/caseout.d.ts +66 -0
- package/dist/src/engine/caseout.d.ts.map +1 -0
- package/dist/src/engine/caseout.js +107 -0
- package/dist/src/engine/caseout.js.map +1 -0
- package/dist/src/engine/context.d.ts +57 -0
- package/dist/src/engine/context.d.ts.map +1 -0
- package/dist/src/engine/context.js +212 -0
- package/dist/src/engine/context.js.map +1 -0
- package/dist/src/engine/envmap.d.ts +13 -0
- package/dist/src/engine/envmap.d.ts.map +1 -0
- package/dist/src/engine/envmap.js +377 -0
- package/dist/src/engine/envmap.js.map +1 -0
- package/dist/src/engine/extfiles.d.ts +7 -0
- package/dist/src/engine/extfiles.d.ts.map +1 -0
- package/dist/src/engine/extfiles.js +23 -0
- package/dist/src/engine/extfiles.js.map +1 -0
- package/dist/src/engine/keyroute.d.ts +21 -0
- package/dist/src/engine/keyroute.d.ts.map +1 -0
- package/dist/src/engine/keyroute.js +58 -0
- package/dist/src/engine/keyroute.js.map +1 -0
- package/dist/src/engine/lens/cache-group.d.ts +20 -0
- package/dist/src/engine/lens/cache-group.d.ts.map +1 -0
- package/dist/src/engine/lens/cache-group.js +31 -0
- package/dist/src/engine/lens/cache-group.js.map +1 -0
- package/dist/src/engine/lens/cache-run.d.ts +65 -0
- package/dist/src/engine/lens/cache-run.d.ts.map +1 -0
- package/dist/src/engine/lens/cache-run.js +159 -0
- package/dist/src/engine/lens/cache-run.js.map +1 -0
- package/dist/src/engine/lens/deadline.d.ts +54 -0
- package/dist/src/engine/lens/deadline.d.ts.map +1 -0
- package/dist/src/engine/lens/deadline.js +111 -0
- package/dist/src/engine/lens/deadline.js.map +1 -0
- package/dist/src/engine/lens/engine-tools.d.ts +13 -0
- package/dist/src/engine/lens/engine-tools.d.ts.map +1 -0
- package/dist/src/engine/lens/engine-tools.js +37 -0
- package/dist/src/engine/lens/engine-tools.js.map +1 -0
- package/dist/src/engine/lens/env.d.ts +23 -0
- package/dist/src/engine/lens/env.d.ts.map +1 -0
- package/dist/src/engine/lens/env.js +42 -0
- package/dist/src/engine/lens/env.js.map +1 -0
- package/dist/src/engine/lens/launch-plan.d.ts +63 -0
- package/dist/src/engine/lens/launch-plan.d.ts.map +1 -0
- package/dist/src/engine/lens/launch-plan.js +203 -0
- package/dist/src/engine/lens/launch-plan.js.map +1 -0
- package/dist/src/engine/lens/leaf-cache.d.ts +22 -0
- package/dist/src/engine/lens/leaf-cache.d.ts.map +1 -0
- package/dist/src/engine/lens/leaf-cache.js +115 -0
- package/dist/src/engine/lens/leaf-cache.js.map +1 -0
- package/dist/src/engine/lens/permits.d.ts +14 -0
- package/dist/src/engine/lens/permits.d.ts.map +1 -0
- package/dist/src/engine/lens/permits.js +18 -0
- package/dist/src/engine/lens/permits.js.map +1 -0
- package/dist/src/engine/lens/registry.d.ts +55 -0
- package/dist/src/engine/lens/registry.d.ts.map +1 -0
- package/dist/src/engine/lens/registry.js +140 -0
- package/dist/src/engine/lens/registry.js.map +1 -0
- package/dist/src/engine/lens/round-lens.d.ts +16 -0
- package/dist/src/engine/lens/round-lens.d.ts.map +1 -0
- package/dist/src/engine/lens/round-lens.js +46 -0
- package/dist/src/engine/lens/round-lens.js.map +1 -0
- package/dist/src/engine/lens/runlens.d.ts +103 -0
- package/dist/src/engine/lens/runlens.d.ts.map +1 -0
- package/dist/src/engine/lens/runlens.js +538 -0
- package/dist/src/engine/lens/runlens.js.map +1 -0
- package/dist/src/engine/lens/section.d.ts +19 -0
- package/dist/src/engine/lens/section.d.ts.map +1 -0
- package/dist/src/engine/lens/section.js +40 -0
- package/dist/src/engine/lens/section.js.map +1 -0
- package/dist/src/engine/lens/semaphore.d.ts +13 -0
- package/dist/src/engine/lens/semaphore.d.ts.map +1 -0
- package/dist/src/engine/lens/semaphore.js +44 -0
- package/dist/src/engine/lens/semaphore.js.map +1 -0
- package/dist/src/engine/lens/tool.d.ts +34 -0
- package/dist/src/engine/lens/tool.d.ts.map +1 -0
- package/dist/src/engine/lens/tool.js +345 -0
- package/dist/src/engine/lens/tool.js.map +1 -0
- package/dist/src/engine/lens/wave.d.ts +63 -0
- package/dist/src/engine/lens/wave.d.ts.map +1 -0
- package/dist/src/engine/lens/wave.js +95 -0
- package/dist/src/engine/lens/wave.js.map +1 -0
- package/dist/src/engine/livesessions.d.ts +21 -0
- package/dist/src/engine/livesessions.d.ts.map +1 -0
- package/dist/src/engine/livesessions.js +57 -0
- package/dist/src/engine/livesessions.js.map +1 -0
- package/dist/src/engine/livewire.d.ts +18 -0
- package/dist/src/engine/livewire.d.ts.map +1 -0
- package/dist/src/engine/livewire.js +31 -0
- package/dist/src/engine/livewire.js.map +1 -0
- package/dist/src/engine/openable.d.ts +37 -0
- package/dist/src/engine/openable.d.ts.map +1 -0
- package/dist/src/engine/openable.js +120 -0
- package/dist/src/engine/openable.js.map +1 -0
- package/dist/src/engine/pisdk.d.ts +235 -0
- package/dist/src/engine/pisdk.d.ts.map +1 -0
- package/dist/src/engine/pisdk.js +577 -0
- package/dist/src/engine/pisdk.js.map +1 -0
- package/dist/src/engine/port.d.ts +144 -0
- package/dist/src/engine/port.d.ts.map +1 -0
- package/dist/src/engine/port.js +16 -0
- package/dist/src/engine/port.js.map +1 -0
- package/dist/src/engine/prompts.d.ts +159 -0
- package/dist/src/engine/prompts.d.ts.map +1 -0
- package/dist/src/engine/prompts.js +339 -0
- package/dist/src/engine/prompts.js.map +1 -0
- package/dist/src/engine/render.d.ts +10 -0
- package/dist/src/engine/render.d.ts.map +1 -0
- package/dist/src/engine/render.js +23 -0
- package/dist/src/engine/render.js.map +1 -0
- package/dist/src/engine/reviewruntime.d.ts +13 -0
- package/dist/src/engine/reviewruntime.d.ts.map +1 -0
- package/dist/src/engine/reviewruntime.js +35 -0
- package/dist/src/engine/reviewruntime.js.map +1 -0
- package/dist/src/engine/reviewsdk.d.ts +75 -0
- package/dist/src/engine/reviewsdk.d.ts.map +1 -0
- package/dist/src/engine/reviewsdk.js +180 -0
- package/dist/src/engine/reviewsdk.js.map +1 -0
- package/dist/src/engine/round.d.ts +166 -0
- package/dist/src/engine/round.d.ts.map +1 -0
- package/dist/src/engine/round.js +543 -0
- package/dist/src/engine/round.js.map +1 -0
- package/dist/src/engine/roundagents.d.ts +17 -0
- package/dist/src/engine/roundagents.d.ts.map +1 -0
- package/dist/src/engine/roundagents.js +49 -0
- package/dist/src/engine/roundagents.js.map +1 -0
- package/dist/src/engine/roundevents.d.ts +110 -0
- package/dist/src/engine/roundevents.d.ts.map +1 -0
- package/dist/src/engine/roundevents.js +276 -0
- package/dist/src/engine/roundevents.js.map +1 -0
- package/dist/src/engine/roundsdk.d.ts +33 -0
- package/dist/src/engine/roundsdk.d.ts.map +1 -0
- package/dist/src/engine/roundsdk.js +76 -0
- package/dist/src/engine/roundsdk.js.map +1 -0
- package/dist/src/engine/sdkruntime.d.ts +23 -0
- package/dist/src/engine/sdkruntime.d.ts.map +1 -0
- package/dist/src/engine/sdkruntime.js +340 -0
- package/dist/src/engine/sdkruntime.js.map +1 -0
- package/dist/src/engine/select.d.ts +16 -0
- package/dist/src/engine/select.d.ts.map +1 -0
- package/dist/src/engine/select.js +32 -0
- package/dist/src/engine/select.js.map +1 -0
- package/dist/src/engine/sessionwrap.d.ts +4 -0
- package/dist/src/engine/sessionwrap.d.ts.map +1 -0
- package/dist/src/engine/sessionwrap.js +31 -0
- package/dist/src/engine/sessionwrap.js.map +1 -0
- package/dist/src/engine/toolfence.d.ts +90 -0
- package/dist/src/engine/toolfence.d.ts.map +1 -0
- package/dist/src/engine/toolfence.js +378 -0
- package/dist/src/engine/toolfence.js.map +1 -0
- package/dist/src/engine/tooluid.d.ts +128 -0
- package/dist/src/engine/tooluid.d.ts.map +1 -0
- package/dist/src/engine/tooluid.js +401 -0
- package/dist/src/engine/tooluid.js.map +1 -0
- package/dist/src/envstrip.d.ts +10 -0
- package/dist/src/envstrip.d.ts.map +1 -0
- package/dist/src/envstrip.js +15 -0
- package/dist/src/envstrip.js.map +1 -0
- package/dist/src/escalationprompt.d.ts +22 -0
- package/dist/src/escalationprompt.d.ts.map +1 -0
- package/dist/src/escalationprompt.js +54 -0
- package/dist/src/escalationprompt.js.map +1 -0
- package/dist/src/execfn.d.ts +29 -0
- package/dist/src/execfn.d.ts.map +1 -0
- package/dist/src/execfn.js +55 -0
- package/dist/src/execfn.js.map +1 -0
- package/dist/src/finding-chain.d.ts +40 -0
- package/dist/src/finding-chain.d.ts.map +1 -0
- package/dist/src/finding-chain.js +76 -0
- package/dist/src/finding-chain.js.map +1 -0
- package/dist/src/finding-row.d.ts +24 -0
- package/dist/src/finding-row.d.ts.map +1 -0
- package/dist/src/finding-row.js +26 -0
- package/dist/src/finding-row.js.map +1 -0
- package/dist/src/findingkey.d.ts +99 -0
- package/dist/src/findingkey.d.ts.map +1 -0
- package/dist/src/findingkey.js +210 -0
- package/dist/src/findingkey.js.map +1 -0
- package/dist/src/findingsrecord.d.ts +175 -0
- package/dist/src/findingsrecord.d.ts.map +1 -0
- package/dist/src/findingsrecord.js +410 -0
- package/dist/src/findingsrecord.js.map +1 -0
- package/dist/src/followup-mode.d.ts +4 -0
- package/dist/src/followup-mode.d.ts.map +1 -0
- package/dist/src/followup-mode.js +6 -0
- package/dist/src/followup-mode.js.map +1 -0
- package/dist/src/gate.d.ts +199 -0
- package/dist/src/gate.d.ts.map +1 -0
- package/dist/src/gate.js +315 -0
- package/dist/src/gate.js.map +1 -0
- package/dist/src/ghcred.d.ts +58 -0
- package/dist/src/ghcred.d.ts.map +1 -0
- package/dist/src/ghcred.js +139 -0
- package/dist/src/ghcred.js.map +1 -0
- package/dist/src/githubAuth.d.ts +70 -0
- package/dist/src/githubAuth.d.ts.map +1 -0
- package/dist/src/githubAuth.js +183 -0
- package/dist/src/githubAuth.js.map +1 -0
- package/dist/src/githubcore.d.ts +20 -0
- package/dist/src/githubcore.d.ts.map +1 -0
- package/dist/src/githubcore.js +20 -0
- package/dist/src/githubcore.js.map +1 -0
- package/dist/src/glob.d.ts +11 -0
- package/dist/src/glob.d.ts.map +1 -0
- package/dist/src/glob.js +69 -0
- package/dist/src/glob.js.map +1 -0
- package/dist/src/guards.d.ts +106 -0
- package/dist/src/guards.d.ts.map +1 -0
- package/dist/src/guards.js +365 -0
- package/dist/src/guards.js.map +1 -0
- package/dist/src/heartbeat.d.ts +29 -0
- package/dist/src/heartbeat.d.ts.map +1 -0
- package/dist/src/heartbeat.js +87 -0
- package/dist/src/heartbeat.js.map +1 -0
- package/dist/src/heuristics.d.ts +247 -0
- package/dist/src/heuristics.d.ts.map +1 -0
- package/dist/src/heuristics.js +927 -0
- package/dist/src/heuristics.js.map +1 -0
- package/dist/src/homes.d.ts +181 -0
- package/dist/src/homes.d.ts.map +1 -0
- package/dist/src/homes.js +242 -0
- package/dist/src/homes.js.map +1 -0
- package/dist/src/hunkheader.d.ts +11 -0
- package/dist/src/hunkheader.d.ts.map +1 -0
- package/dist/src/hunkheader.js +18 -0
- package/dist/src/hunkheader.js.map +1 -0
- package/dist/src/identity.d.ts +34 -0
- package/dist/src/identity.d.ts.map +1 -0
- package/dist/src/identity.js +67 -0
- package/dist/src/identity.js.map +1 -0
- package/dist/src/include.d.ts +435 -0
- package/dist/src/include.d.ts.map +1 -0
- package/dist/src/include.js +1692 -0
- package/dist/src/include.js.map +1 -0
- package/dist/src/launchvocab.d.ts +36 -0
- package/dist/src/launchvocab.d.ts.map +1 -0
- package/dist/src/launchvocab.js +59 -0
- package/dist/src/launchvocab.js.map +1 -0
- package/dist/src/ledgercarry.d.ts +24 -0
- package/dist/src/ledgercarry.d.ts.map +1 -0
- package/dist/src/ledgercarry.js +109 -0
- package/dist/src/ledgercarry.js.map +1 -0
- package/dist/src/lensids.d.ts +7 -0
- package/dist/src/lensids.d.ts.map +1 -0
- package/dist/src/lensids.js +53 -0
- package/dist/src/lensids.js.map +1 -0
- package/dist/src/lensplanning.d.ts +8 -0
- package/dist/src/lensplanning.d.ts.map +1 -0
- package/dist/src/lensplanning.js +126 -0
- package/dist/src/lensplanning.js.map +1 -0
- package/dist/src/lensresult.d.ts +94 -0
- package/dist/src/lensresult.d.ts.map +1 -0
- package/dist/src/lensresult.js +162 -0
- package/dist/src/lensresult.js.map +1 -0
- package/dist/src/lenstuning.d.ts +97 -0
- package/dist/src/lenstuning.d.ts.map +1 -0
- package/dist/src/lenstuning.js +326 -0
- package/dist/src/lenstuning.js.map +1 -0
- package/dist/src/lintconfig.d.ts +31 -0
- package/dist/src/lintconfig.d.ts.map +1 -0
- package/dist/src/lintconfig.js +543 -0
- package/dist/src/lintconfig.js.map +1 -0
- package/dist/src/live/events.d.ts +188 -0
- package/dist/src/live/events.d.ts.map +1 -0
- package/dist/src/live/events.js +136 -0
- package/dist/src/live/events.js.map +1 -0
- package/dist/src/live/writer.d.ts +54 -0
- package/dist/src/live/writer.d.ts.map +1 -0
- package/dist/src/live/writer.js +516 -0
- package/dist/src/live/writer.js.map +1 -0
- package/dist/src/localreview.d.ts +128 -0
- package/dist/src/localreview.d.ts.map +1 -0
- package/dist/src/localreview.js +426 -0
- package/dist/src/localreview.js.map +1 -0
- package/dist/src/loosenedtests.d.ts +13 -0
- package/dist/src/loosenedtests.d.ts.map +1 -0
- package/dist/src/loosenedtests.js +188 -0
- package/dist/src/loosenedtests.js.map +1 -0
- package/dist/src/memoryport.d.ts +264 -0
- package/dist/src/memoryport.d.ts.map +1 -0
- package/dist/src/memoryport.js +445 -0
- package/dist/src/memoryport.js.map +1 -0
- package/dist/src/migrations.d.ts +106 -0
- package/dist/src/migrations.d.ts.map +1 -0
- package/dist/src/migrations.js +373 -0
- package/dist/src/migrations.js.map +1 -0
- package/dist/src/modelroute.d.ts +38 -0
- package/dist/src/modelroute.d.ts.map +1 -0
- package/dist/src/modelroute.js +105 -0
- package/dist/src/modelroute.js.map +1 -0
- package/dist/src/oneshot.d.ts +12 -0
- package/dist/src/oneshot.d.ts.map +1 -0
- package/dist/src/oneshot.js +8 -0
- package/dist/src/oneshot.js.map +1 -0
- package/dist/src/packing.d.ts +11 -0
- package/dist/src/packing.d.ts.map +1 -0
- package/dist/src/packing.js +31 -0
- package/dist/src/packing.js.map +1 -0
- package/dist/src/passes.d.ts +16 -0
- package/dist/src/passes.d.ts.map +1 -0
- package/dist/src/passes.js +104 -0
- package/dist/src/passes.js.map +1 -0
- package/dist/src/passtasks.d.ts +68 -0
- package/dist/src/passtasks.d.ts.map +1 -0
- package/dist/src/passtasks.js +360 -0
- package/dist/src/passtasks.js.map +1 -0
- package/dist/src/pathinside.d.ts +5 -0
- package/dist/src/pathinside.d.ts.map +1 -0
- package/dist/src/pathinside.js +9 -0
- package/dist/src/pathinside.js.map +1 -0
- package/dist/src/pibuiltins.d.ts +36 -0
- package/dist/src/pibuiltins.d.ts.map +1 -0
- package/dist/src/pibuiltins.js +83 -0
- package/dist/src/pibuiltins.js.map +1 -0
- package/dist/src/plankey.d.ts +4 -0
- package/dist/src/plankey.d.ts.map +1 -0
- package/dist/src/plankey.js +10 -0
- package/dist/src/plankey.js.map +1 -0
- package/dist/src/planner.d.ts +375 -0
- package/dist/src/planner.d.ts.map +1 -0
- package/dist/src/planner.js +722 -0
- package/dist/src/planner.js.map +1 -0
- package/dist/src/plugin/args.d.ts +19 -0
- package/dist/src/plugin/args.d.ts.map +1 -0
- package/dist/src/plugin/args.js +107 -0
- package/dist/src/plugin/args.js.map +1 -0
- package/dist/src/plugin/index.d.ts +3 -0
- package/dist/src/plugin/index.d.ts.map +1 -0
- package/dist/src/plugin/index.js +14 -0
- package/dist/src/plugin/index.js.map +1 -0
- package/dist/src/plugin/login.d.ts +42 -0
- package/dist/src/plugin/login.d.ts.map +1 -0
- package/dist/src/plugin/login.js +82 -0
- package/dist/src/plugin/login.js.map +1 -0
- package/dist/src/plugin/review.d.ts +27 -0
- package/dist/src/plugin/review.d.ts.map +1 -0
- package/dist/src/plugin/review.js +302 -0
- package/dist/src/plugin/review.js.map +1 -0
- package/dist/src/plugin/runner.d.ts +6 -0
- package/dist/src/plugin/runner.d.ts.map +1 -0
- package/dist/src/plugin/runner.js +65 -0
- package/dist/src/plugin/runner.js.map +1 -0
- package/dist/src/plugin/scan.d.ts +79 -0
- package/dist/src/plugin/scan.d.ts.map +1 -0
- package/dist/src/plugin/scan.js +348 -0
- package/dist/src/plugin/scan.js.map +1 -0
- package/dist/src/plugin/session.d.ts +56 -0
- package/dist/src/plugin/session.d.ts.map +1 -0
- package/dist/src/plugin/session.js +2 -0
- package/dist/src/plugin/session.js.map +1 -0
- package/dist/src/plugin/setup.d.ts +19 -0
- package/dist/src/plugin/setup.d.ts.map +1 -0
- package/dist/src/plugin/setup.js +142 -0
- package/dist/src/plugin/setup.js.map +1 -0
- package/dist/src/plugin/versiongate.d.ts +26 -0
- package/dist/src/plugin/versiongate.d.ts.map +1 -0
- package/dist/src/plugin/versiongate.js +83 -0
- package/dist/src/plugin/versiongate.js.map +1 -0
- package/dist/src/postingkey.d.ts +8 -0
- package/dist/src/postingkey.d.ts.map +1 -0
- package/dist/src/postingkey.js +25 -0
- package/dist/src/postingkey.js.map +1 -0
- package/dist/src/postingpolicy.d.ts +108 -0
- package/dist/src/postingpolicy.d.ts.map +1 -0
- package/dist/src/postingpolicy.js +341 -0
- package/dist/src/postingpolicy.js.map +1 -0
- package/dist/src/pr-identity.d.ts +3 -0
- package/dist/src/pr-identity.d.ts.map +1 -0
- package/dist/src/pr-identity.js +9 -0
- package/dist/src/pr-identity.js.map +1 -0
- package/dist/src/prdelta.d.ts +181 -0
- package/dist/src/prdelta.d.ts.map +1 -0
- package/dist/src/prdelta.js +501 -0
- package/dist/src/prdelta.js.map +1 -0
- package/dist/src/pricing.d.ts +94 -0
- package/dist/src/pricing.d.ts.map +1 -0
- package/dist/src/pricing.js +209 -0
- package/dist/src/pricing.js.map +1 -0
- package/dist/src/priorfindings.d.ts +167 -0
- package/dist/src/priorfindings.d.ts.map +1 -0
- package/dist/src/priorfindings.js +445 -0
- package/dist/src/priorfindings.js.map +1 -0
- package/dist/src/priortasks.d.ts +31 -0
- package/dist/src/priortasks.d.ts.map +1 -0
- package/dist/src/priortasks.js +119 -0
- package/dist/src/priortasks.js.map +1 -0
- package/dist/src/profilelookup.d.ts +59 -0
- package/dist/src/profilelookup.d.ts.map +1 -0
- package/dist/src/profilelookup.js +98 -0
- package/dist/src/profilelookup.js.map +1 -0
- package/dist/src/profileoverrides.d.ts +91 -0
- package/dist/src/profileoverrides.d.ts.map +1 -0
- package/dist/src/profileoverrides.js +313 -0
- package/dist/src/profileoverrides.js.map +1 -0
- package/dist/src/profiles.d.ts +144 -0
- package/dist/src/profiles.d.ts.map +1 -0
- package/dist/src/profiles.js +604 -0
- package/dist/src/profiles.js.map +1 -0
- package/dist/src/promptdoc.d.ts +3 -0
- package/dist/src/promptdoc.d.ts.map +1 -0
- package/dist/src/promptdoc.js +18 -0
- package/dist/src/promptdoc.js.map +1 -0
- package/dist/src/prtarget.d.ts +70 -0
- package/dist/src/prtarget.d.ts.map +1 -0
- package/dist/src/prtarget.js +181 -0
- package/dist/src/prtarget.js.map +1 -0
- package/dist/src/recheckorder.d.ts +32 -0
- package/dist/src/recheckorder.d.ts.map +1 -0
- package/dist/src/recheckorder.js +5 -0
- package/dist/src/recheckorder.js.map +1 -0
- package/dist/src/reviewapi.d.ts +207 -0
- package/dist/src/reviewapi.d.ts.map +1 -0
- package/dist/src/reviewapi.js +939 -0
- package/dist/src/reviewapi.js.map +1 -0
- package/dist/src/reviewbotfindings.d.ts +33 -0
- package/dist/src/reviewbotfindings.d.ts.map +1 -0
- package/dist/src/reviewbotfindings.js +80 -0
- package/dist/src/reviewbotfindings.js.map +1 -0
- package/dist/src/reviewconfig.d.ts +753 -0
- package/dist/src/reviewconfig.d.ts.map +1 -0
- package/dist/src/reviewconfig.js +805 -0
- package/dist/src/reviewconfig.js.map +1 -0
- package/dist/src/reviewdelta.d.ts +51 -0
- package/dist/src/reviewdelta.d.ts.map +1 -0
- package/dist/src/reviewdelta.js +119 -0
- package/dist/src/reviewdelta.js.map +1 -0
- package/dist/src/reviewdest.d.ts +86 -0
- package/dist/src/reviewdest.d.ts.map +1 -0
- package/dist/src/reviewdest.js +142 -0
- package/dist/src/reviewdest.js.map +1 -0
- package/dist/src/reviewerstub.d.ts +12 -0
- package/dist/src/reviewerstub.d.ts.map +1 -0
- package/dist/src/reviewerstub.js +28 -0
- package/dist/src/reviewerstub.js.map +1 -0
- package/dist/src/reviewhost.d.ts +58 -0
- package/dist/src/reviewhost.d.ts.map +1 -0
- package/dist/src/reviewhost.js +135 -0
- package/dist/src/reviewhost.js.map +1 -0
- package/dist/src/reviewpost.d.ts +79 -0
- package/dist/src/reviewpost.d.ts.map +1 -0
- package/dist/src/reviewpost.js +233 -0
- package/dist/src/reviewpost.js.map +1 -0
- package/dist/src/reviewrender.d.ts +154 -0
- package/dist/src/reviewrender.d.ts.map +1 -0
- package/dist/src/reviewrender.js +480 -0
- package/dist/src/reviewrender.js.map +1 -0
- package/dist/src/reviewstate.d.ts +62 -0
- package/dist/src/reviewstate.d.ts.map +1 -0
- package/dist/src/reviewstate.js +167 -0
- package/dist/src/reviewstate.js.map +1 -0
- package/dist/src/reviewstore.d.ts +17 -0
- package/dist/src/reviewstore.d.ts.map +1 -0
- package/dist/src/reviewstore.js +105 -0
- package/dist/src/reviewstore.js.map +1 -0
- package/dist/src/round-progress.d.ts +120 -0
- package/dist/src/round-progress.d.ts.map +1 -0
- package/dist/src/round-progress.js +172 -0
- package/dist/src/round-progress.js.map +1 -0
- package/dist/src/round-stage-deadlines.d.ts +12 -0
- package/dist/src/round-stage-deadlines.d.ts.map +1 -0
- package/dist/src/round-stage-deadlines.js +10 -0
- package/dist/src/round-stage-deadlines.js.map +1 -0
- package/dist/src/session-command.d.ts +19 -0
- package/dist/src/session-command.d.ts.map +1 -0
- package/dist/src/session-command.js +20 -0
- package/dist/src/session-command.js.map +1 -0
- package/dist/src/settledread.d.ts +61 -0
- package/dist/src/settledread.d.ts.map +1 -0
- package/dist/src/settledread.js +135 -0
- package/dist/src/settledread.js.map +1 -0
- package/dist/src/severity.d.ts +167 -0
- package/dist/src/severity.d.ts.map +1 -0
- package/dist/src/severity.js +364 -0
- package/dist/src/severity.js.map +1 -0
- package/dist/src/severityrank.d.ts +8 -0
- package/dist/src/severityrank.d.ts.map +1 -0
- package/dist/src/severityrank.js +16 -0
- package/dist/src/severityrank.js.map +1 -0
- package/dist/src/standing-review.d.ts +45 -0
- package/dist/src/standing-review.d.ts.map +1 -0
- package/dist/src/standing-review.js +43 -0
- package/dist/src/standing-review.js.map +1 -0
- package/dist/src/storerows.d.ts +225 -0
- package/dist/src/storerows.d.ts.map +1 -0
- package/dist/src/storerows.js +7 -0
- package/dist/src/storerows.js.map +1 -0
- package/dist/src/styleguide.d.ts +25 -0
- package/dist/src/styleguide.d.ts.map +1 -0
- package/dist/src/styleguide.js +272 -0
- package/dist/src/styleguide.js.map +1 -0
- package/dist/src/sweepstatus.d.ts +42 -0
- package/dist/src/sweepstatus.d.ts.map +1 -0
- package/dist/src/sweepstatus.js +97 -0
- package/dist/src/sweepstatus.js.map +1 -0
- package/dist/src/templates.d.ts +243 -0
- package/dist/src/templates.d.ts.map +1 -0
- package/dist/src/templates.js +847 -0
- package/dist/src/templates.js.map +1 -0
- package/dist/src/types.d.ts +639 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +90 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/unifieddiff.d.ts +22 -0
- package/dist/src/unifieddiff.d.ts.map +1 -0
- package/dist/src/unifieddiff.js +176 -0
- package/dist/src/unifieddiff.js.map +1 -0
- package/dist/src/yieldloop.d.ts +2 -0
- package/dist/src/yieldloop.d.ts.map +1 -0
- package/dist/src/yieldloop.js +14 -0
- package/dist/src/yieldloop.js.map +1 -0
- package/package.json +60 -4
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-placement
|
|
3
|
+
description: Placement review pass — is this change in the right place? Judged against the repo's own structure; findings name the better home; capped at P2.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: placement
|
|
10
|
+
|
|
11
|
+
Apply to: WHERE the change lives — the module and layer it was written
|
|
12
|
+
into — judged against the repo's OWN existing structure, never
|
|
13
|
+
against your taste.
|
|
14
|
+
|
|
15
|
+
<!-- RATIFIED repo-anchor — do not edit; owner only -->
|
|
16
|
+
## The anchor is the repo, not your preference
|
|
17
|
+
|
|
18
|
+
A placement judgment is only real when the repo itself establishes the better
|
|
19
|
+
home. Every finding must cite that establishment as evidence: the sibling
|
|
20
|
+
module that already owns this concern, the service layer the repo already
|
|
21
|
+
routes this call through, the existing helper this diff re-implements —
|
|
22
|
+
file and line. Locate it by reading and grep alone. If the repo has no
|
|
23
|
+
established home for the concern, there is no placement finding — a novel
|
|
24
|
+
concern is allowed to pick its own home.
|
|
25
|
+
<!-- /RATIFIED repo-anchor -->
|
|
26
|
+
|
|
27
|
+
## Findings give directions, not verdicts
|
|
28
|
+
|
|
29
|
+
A bare "this belongs elsewhere" is noise. The useful shape is: *name the
|
|
30
|
+
better home, and say what the move buys* — the guards that become
|
|
31
|
+
unnecessary, the duplication that disappears, the callers that stop reaching
|
|
32
|
+
through internals. A finding that cannot name the destination and the payoff
|
|
33
|
+
is not postable.
|
|
34
|
+
|
|
35
|
+
## The edge-case-explosion signal
|
|
36
|
+
|
|
37
|
+
When the diff needs many guards, special cases, or defensive branches for
|
|
38
|
+
states the RIGHT layer would make impossible, that is the strongest placement
|
|
39
|
+
evidence there is: the change is fighting its position. Say so explicitly —
|
|
40
|
+
point at the layer where those cases collapse, and count the guards that
|
|
41
|
+
disappear.
|
|
42
|
+
|
|
43
|
+
<!-- RATIFIED p2-cap — do not edit; owner only -->
|
|
44
|
+
## Severity is capped at P2
|
|
45
|
+
|
|
46
|
+
Misplaced code that works is a structural debt, not an outage: every finding
|
|
47
|
+
from this lens is `P2` at most (a `P2` posts as a blocker only at high
|
|
48
|
+
confidence, under the ordinary map — reachability applies). A genuine
|
|
49
|
+
correctness, security, or data defect you notice along the way belongs to
|
|
50
|
+
whichever lens owns it — raise it as a `P3` question naming the concern and
|
|
51
|
+
let the other passes judge it at their own severity.
|
|
52
|
+
<!-- /RATIFIED p2-cap -->
|
|
53
|
+
|
|
54
|
+
What to look for:
|
|
55
|
+
|
|
56
|
+
- logic added to a view/handler/endpoint that duplicates or bypasses a
|
|
57
|
+
service/domain layer the repo already routes this concern through;
|
|
58
|
+
- a new module or helper re-implementing an existing subsystem's job — grep
|
|
59
|
+
for the existing one and cite it;
|
|
60
|
+
- a call-site patch where the repo's shared layer (adapter, base class,
|
|
61
|
+
middleware, decorator) is the established owner of the behaviour;
|
|
62
|
+
- a utility, constant, or setting dropped into an unrelated module when the
|
|
63
|
+
repo keeps an established home for its kind;
|
|
64
|
+
- a caller in this diff bypassing a public surface the repo's other callers
|
|
65
|
+
use — name that surface (a NEW interface exposing its implementation is
|
|
66
|
+
`pass-abstraction`'s).
|
|
67
|
+
|
|
68
|
+
`NONE` is the correct output when placement is sound — most PRs.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-prod-risk
|
|
3
|
+
description: Production-risk review pass — behavior changes to existing endpoints, rollout widening, cascade and latency risk.
|
|
4
|
+
tools: read, bash, grep, glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: production risk
|
|
10
|
+
|
|
11
|
+
Apply to: changes to existing endpoint behavior, defaults, webhooks/callbacks,
|
|
12
|
+
load on external services, user-blocking latency paths.
|
|
13
|
+
|
|
14
|
+
Does any existing endpoint change response shape, status codes, or error
|
|
15
|
+
behavior? Default-value changes that alter behavior for existing
|
|
16
|
+
implementations? Backward-incompatible webhook/callback changes? Could
|
|
17
|
+
failures cascade? New load on external services (LLM providers, third-party
|
|
18
|
+
APIs)?
|
|
19
|
+
**Rollout widening**: when a diff merely flips a gate or widens an audience,
|
|
20
|
+
review the *entire widened feature's* delivery matrix (schedules × opt-ins ×
|
|
21
|
+
dedup × quotas) — newly exposed bugs live in unchanged code the diff never
|
|
22
|
+
shows. Consider latency from the user's perspective on user-blocking paths
|
|
23
|
+
(know which of the repo's paths are synchronous and user-facing and which are
|
|
24
|
+
async background work).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-rollout
|
|
3
|
+
description: Mixed-version rollout pass (sub-lens of backcompat) — for releases that will not reach every party at once, checks old peer against new code, new peer against old code, and state persisted by the old version.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: mixed-version rollout (sub-lens of backcompat)
|
|
10
|
+
|
|
11
|
+
Selected because the PR describes or implies a release that does not reach
|
|
12
|
+
every party at once — a hotfix, a client/server or SDK/node change, a
|
|
13
|
+
protocol or response limit, persisted client state, a new settings field.
|
|
14
|
+
Field and payload shape skew is `pass-backcompat`'s; you own
|
|
15
|
+
truncation and pagination contracts, persisted client state, and the first
|
|
16
|
+
read of a new setting. Answer each pairing with `file:line` evidence:
|
|
17
|
+
|
|
18
|
+
- **Old client against the new code.** Does a client that makes one request
|
|
19
|
+
now receive a truncated, paginated or reshaped answer that it treats as
|
|
20
|
+
complete? Does it send something the new code now rejects?
|
|
21
|
+
- **New client against old code.** Does the new client rely on a field, page
|
|
22
|
+
size, endpoint or behaviour an old server or node does not provide?
|
|
23
|
+
- **State persisted by the old version.** Stored settings, persisted client
|
|
24
|
+
state (browser storage, local databases), cached objects, rows written before the
|
|
25
|
+
change: do they still load, and does a new field get a value on upgrade — a
|
|
26
|
+
migration or a version bump where the persistence layer needs one?
|
|
27
|
+
- **First read of a new setting.** What does code see when it reads the new
|
|
28
|
+
field before anything has written it?
|
|
29
|
+
|
|
30
|
+
Each failing pairing is a finding; name the protection that closes it — a
|
|
31
|
+
version check, an explicit "more pages" signal, a persistence migration, a
|
|
32
|
+
default. `NONE` when every pairing is safe.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-roundtrip
|
|
3
|
+
description: Persisted-bytes round-trip pass (sub-lens of data-safety) — traces sample files through read, detect, decode, edit, encode and write, and checks the bytes that land on disk.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: persisted-bytes round trip (sub-lens of data-safety)
|
|
10
|
+
|
|
11
|
+
Selected because the diff reads, decodes, transforms and writes back files or
|
|
12
|
+
stored data — encodings, charset detection, line endings, serialization. The
|
|
13
|
+
one question: does content come back out byte for byte, except for exactly
|
|
14
|
+
the change the user asked for?
|
|
15
|
+
|
|
16
|
+
Trace each sample below through the path the PR adds or changes — read →
|
|
17
|
+
detect/parse → decode → edit → encode/serialize → write — using the real
|
|
18
|
+
functions and the real library code. When the task string lists third-party
|
|
19
|
+
sources, read the library there; never assume what a library names an
|
|
20
|
+
encoding, supports, or defaults to. One row per sample in your notes: the
|
|
21
|
+
bytes that end up on disk, and whether that is what the user had plus their
|
|
22
|
+
edit.
|
|
23
|
+
|
|
24
|
+
Samples:
|
|
25
|
+
|
|
26
|
+
- a pure-ASCII file to which the user adds one non-ASCII character;
|
|
27
|
+
- a valid UTF-8 file with only a few non-ASCII characters — the case charset
|
|
28
|
+
detectors most often misjudge;
|
|
29
|
+
- UTF-8 with a byte-order mark; UTF-16 LE and BE with a byte-order mark;
|
|
30
|
+
- CRLF line endings, with and without a final newline, with trailing blank
|
|
31
|
+
lines;
|
|
32
|
+
- a legacy single-byte or multi-byte encoding (Windows-1252, Shift-JIS);
|
|
33
|
+
- an encoding name the detector can return but the codec cannot handle, and a
|
|
34
|
+
name spelled differently by the two libraries;
|
|
35
|
+
- binary content to which a detector assigns a charset;
|
|
36
|
+
- a file larger than any size limit on the path — is the limit checked before
|
|
37
|
+
the whole file is read into memory?
|
|
38
|
+
|
|
39
|
+
Then check the paths around the write: the revert/reject/undo path restores
|
|
40
|
+
the ORIGINAL bytes; anything normalised only for display or comparison
|
|
41
|
+
(trimmed whitespace, converted line endings) never reaches the bytes written;
|
|
42
|
+
and every other entry point that reads the same files makes the same
|
|
43
|
+
decision.
|
|
44
|
+
|
|
45
|
+
A sample whose output differs from input-plus-edit is a finding — name the
|
|
46
|
+
sample in the claim. `NONE` when every sample round-trips.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-security
|
|
3
|
+
description: Security & tenancy review pass — injection, authz, tenant isolation, secrets in logs, cache safety.
|
|
4
|
+
tools: read, bash, grep, glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: security & tenancy
|
|
10
|
+
|
|
11
|
+
Apply to: auth, permissions, secrets, tokens, session handling, tenant-scoped
|
|
12
|
+
data or caching, new endpoints, logging of payloads.
|
|
13
|
+
|
|
14
|
+
Injection (SQL, command, XSS, template). New endpoints authenticated and
|
|
15
|
+
authorized — can a user reach another tenant's data (check the repo's own
|
|
16
|
+
tenant key on every query)? Sensitive fields (tokens, keys, passwords)
|
|
17
|
+
excluded from responses **and from structured log payloads** — logging a raw
|
|
18
|
+
OAuth/exchange response lands `access_token`/`refresh_token` in the log
|
|
19
|
+
aggregator; strip or allowlist before logging, and check persisted previews
|
|
20
|
+
(tool outputs, traces) for embedded auth headers. All user input validated?
|
|
21
|
+
SSRF on user-controlled URLs? New public endpoints rate-limited via the
|
|
22
|
+
repo's own throttling layer? **Cache safety**: any response whose content
|
|
23
|
+
depends on a request header/cookie (a tenant-id header, an API key,
|
|
24
|
+
language) must send `Cache-Control: no-store`/`private` and `Vary` on those
|
|
25
|
+
headers — a header-keyed tenant endpoint cached by URL alone serves one
|
|
26
|
+
tenant's data to another, invisibly to backend telemetry.
|
|
27
|
+
|
|
28
|
+
Severity guidance for this lens: cross-tenant reachability, credential
|
|
29
|
+
leakage into logs/persisted payloads, and unauthenticated new endpoints are
|
|
30
|
+
P0/P1 — never demote for "unlikely in practice". Low-confidence security
|
|
31
|
+
findings survive as questions (the validator demotes rather than drops them).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-simplicity
|
|
3
|
+
description: Simplicity review pass — is the code as simple as its job allows, and do any of its checks defend states that cannot occur? May point beyond the diff at a simpler shape; capped at P2.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: simplicity
|
|
10
|
+
|
|
11
|
+
Apply to: the complexity of the change relative to the job it does. The team's
|
|
12
|
+
standing complaint is real code review pressure producing real code bloat:
|
|
13
|
+
"we'll be forced to add many more lines handling every possible race condition
|
|
14
|
+
and edge case that would never happen, and humans can't follow the code any
|
|
15
|
+
more". This lens is the counter-pressure — applied to the CODE, never by
|
|
16
|
+
lowering anyone's bar.
|
|
17
|
+
|
|
18
|
+
## Question 1 — is there a simpler shape?
|
|
19
|
+
|
|
20
|
+
Same behaviour, less mechanism: nesting that flattens, duplicated branches
|
|
21
|
+
that fold, a flag parameter that splits into two call sites, state that a
|
|
22
|
+
pure value replaces (speculative generality is `pass-abstraction`'s). Judge against
|
|
23
|
+
the job the code does, and show the simpler shape concretely enough that the
|
|
24
|
+
author can see it — name what disappears.
|
|
25
|
+
|
|
26
|
+
## Question 2 — is a check overzealous?
|
|
27
|
+
|
|
28
|
+
A guard is overzealous when it defends a state that CANNOT occur. That is a
|
|
29
|
+
strong claim and it carries a proof burden: show the unreachability by
|
|
30
|
+
reading — the callers that all pass a non-null value, the type that excludes
|
|
31
|
+
the case, the invariant established upstream that makes the state impossible
|
|
32
|
+
— and cite it in `evidence` (file and line). With the proof, the finding is
|
|
33
|
+
"delete this guard, here is why the state cannot arise". Without the proof it
|
|
34
|
+
is at most a `[question]`: "what produces this state? If nothing does, this
|
|
35
|
+
guard can go."
|
|
36
|
+
|
|
37
|
+
<!-- RATIFIED beyond-the-diff — do not edit; owner only -->
|
|
38
|
+
## Beyond the diff is allowed
|
|
39
|
+
|
|
40
|
+
When the diff's complexity signals a wrong or leaky abstraction — the
|
|
41
|
+
edge-case explosion — you may point past the diff at the simpler shape of the
|
|
42
|
+
surrounding structure. State the invariant that must hold and the shape that
|
|
43
|
+
holds it; do not prescribe the rewrite (the remedy-size rule applies — a
|
|
44
|
+
remedy larger than the PR is a design objection, not a merge blocker). More
|
|
45
|
+
upfront refactor work for a cleaner abstraction is an accepted trade here.
|
|
46
|
+
<!-- /RATIFIED beyond-the-diff -->
|
|
47
|
+
|
|
48
|
+
<!-- RATIFIED never-counter-finding — do not edit; owner only -->
|
|
49
|
+
## Never a counter-finding
|
|
50
|
+
|
|
51
|
+
You judge the code as it stands, never other passes' findings. If another
|
|
52
|
+
lens would demand a guard you consider unnecessary, your finding simply
|
|
53
|
+
states the unreachability evidence for the code; the validator weighs
|
|
54
|
+
evidence against evidence. You never argue with, veto, or soften anything —
|
|
55
|
+
and nothing from this lens ever moves the blocker bar.
|
|
56
|
+
<!-- /RATIFIED never-counter-finding -->
|
|
57
|
+
|
|
58
|
+
<!-- RATIFIED p2-cap — do not edit; owner only -->
|
|
59
|
+
## Severity is capped at P2
|
|
60
|
+
|
|
61
|
+
Complexity is debt, not an outage: every finding from this lens is `P2` at
|
|
62
|
+
most (a `P2` posts as a blocker only at high confidence, under the ordinary
|
|
63
|
+
map). A genuine defect you notice belongs to its owning lens — raise it as a
|
|
64
|
+
`P3` question naming the concern.
|
|
65
|
+
<!-- /RATIFIED p2-cap -->
|
|
66
|
+
|
|
67
|
+
`NONE` is the correct output when the code is as simple as its job allows —
|
|
68
|
+
often true.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-statelessness
|
|
3
|
+
description: Statelessness review pass — in-process state that breaks under many pods and rolling deploys.
|
|
4
|
+
tools: read, bash, grep, glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: statelessness & process continuity
|
|
10
|
+
|
|
11
|
+
Apply to: module/class-level state, caches, singletons, anything shared across
|
|
12
|
+
requests.
|
|
13
|
+
|
|
14
|
+
The app runs as **many pods plus separate background workers** behind rolling
|
|
15
|
+
deploys, so any state living inside one process is invisible to the others and
|
|
16
|
+
wiped on every restart. Treat **any newly introduced in-process state that is
|
|
17
|
+
mutable, shared across requests, tenant/request-scoped, must stay consistent
|
|
18
|
+
across pods, or must survive a restart as P1** — module-level mutable
|
|
19
|
+
globals/dicts/sets, attributes mutated on a long-lived singleton,
|
|
20
|
+
`@lru_cache`/`functools.cache` keyed by tenant or request data, in-memory
|
|
21
|
+
rate-limit/dedup/idempotency counters, background-task progress in a process
|
|
22
|
+
variable, mutable default arguments. Required placement: **cache-like
|
|
23
|
+
ephemeral data → the shared cache the codebase already uses** (with TTL); **durable or
|
|
24
|
+
correctness-critical state → the database**. Acceptable in-process values:
|
|
25
|
+
true constants, per-request locals, and memoization of immutable
|
|
26
|
+
process-agnostic computation. An in-memory cache where the codebase already
|
|
27
|
+
has a shared cache is also a reuse P1.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-style
|
|
3
|
+
description: Style review pass — only where the repo writes its code style down. Findings cite the guide's own rule and the changed line that breaks it; never taste, never another ecosystem's conventions, never what a linter or formatter enforces. Nit only.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: style (the repo's written guide only)
|
|
10
|
+
|
|
11
|
+
This lens is planned only when the repo has a written style guide; the plan
|
|
12
|
+
row that launched you names it (the guide file, or the style section of a
|
|
13
|
+
CONTRIBUTING file as `path:from-to`). Read it in full first. It is the ONLY
|
|
14
|
+
standard you apply.
|
|
15
|
+
|
|
16
|
+
## A finding is a rule and a violation
|
|
17
|
+
|
|
18
|
+
Every finding quotes the guide's rule (file and line of the rule) and cites
|
|
19
|
+
the CHANGED line that breaks it. A finding needs a rule in the guide — however
|
|
20
|
+
much you would have written it differently, and whatever another language's
|
|
21
|
+
or company's conventions say. If the guide is missing or unreadable at head,
|
|
22
|
+
answer `NONE`.
|
|
23
|
+
|
|
24
|
+
## Only the lines the change wrote
|
|
25
|
+
|
|
26
|
+
Judge changed lines only; a pre-existing violation next to them is out of
|
|
27
|
+
scope.
|
|
28
|
+
|
|
29
|
+
{{include:prompts/pass-quality-common.md}}
|
|
30
|
+
|
|
31
|
+
## Severity is nit
|
|
32
|
+
|
|
33
|
+
A style violation is a `nit`, always — it never blocks and never becomes a
|
|
34
|
+
question. Group several violations of the SAME rule into one finding listing
|
|
35
|
+
the lines.
|
|
36
|
+
|
|
37
|
+
`NONE` is the correct output when the changed lines follow the guide.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-sweep
|
|
3
|
+
description: Line-by-line sweep of a few changed files for local slips — typos, fall-through, a copied line not updated, shipped placeholders, unchecked parsing — the defects a whole-PR reading skims past.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: sweep — a few files, every changed line
|
|
10
|
+
|
|
11
|
+
Your task string names your FOCUS FILES, usually one to three. The other
|
|
12
|
+
passes read this PR as a whole and chase its big questions; you are the one
|
|
13
|
+
that reads every changed line of these files, in order, and asks of each one:
|
|
14
|
+
is this line right?
|
|
15
|
+
|
|
16
|
+
How to work:
|
|
17
|
+
|
|
18
|
+
1. Get the diff of each focus file (`git -C <worktree> diff <merge-base>
|
|
19
|
+
<head> -- <file>`), then read the file around every hunk — enough to know
|
|
20
|
+
what each changed line refers to.
|
|
21
|
+
2. Walk the hunks top to bottom. Check every added or changed line against
|
|
22
|
+
the list below. Never skip a hunk because it looks mechanical: mechanical
|
|
23
|
+
hunks are where slips hide.
|
|
24
|
+
3. Keep each finding at its line. Follow a name out of the file only to
|
|
25
|
+
confirm the slip — the definition it should match, the key it should equal,
|
|
26
|
+
the lint rule that makes it fatal.
|
|
27
|
+
|
|
28
|
+
What a slip looks like:
|
|
29
|
+
|
|
30
|
+
- a misspelled identifier, key, action, event or setting name — compare it
|
|
31
|
+
with its definition and with every other use;
|
|
32
|
+
- a `switch` case that falls through, a missing `break`/`return`, an `else`
|
|
33
|
+
attached to the wrong `if`;
|
|
34
|
+
- a copied block with one reference not updated — the wrong variable, index,
|
|
35
|
+
field or unit in the copy;
|
|
36
|
+
- an inverted or off-by-one condition, `<` for `<=`, a comparison against the
|
|
37
|
+
wrong constant;
|
|
38
|
+
- placeholder text that ships: `TODO`, `FIXME`, stub help or error text, a raw
|
|
39
|
+
translation key shown to users where a translated string was meant;
|
|
40
|
+
- a new binding, import or parameter nothing uses — a build break when the
|
|
41
|
+
compiler rejects unused code (a CI-run lint rule is
|
|
42
|
+
`pass-lint-conformance`'s);
|
|
43
|
+
- parsing without cleaning: `split(',')` without trimming or dropping empties,
|
|
44
|
+
a number parse with no invalid-input path, a cast of fetched JSON to a type
|
|
45
|
+
with no runtime check;
|
|
46
|
+
- a format string whose specifiers do not match its arguments;
|
|
47
|
+
- an error swallowed where the old code surfaced it (the downstream
|
|
48
|
+
behaviour change is `pass-behaviour-delta`'s), a resource that no longer
|
|
49
|
+
gets closed on one path;
|
|
50
|
+
- a message, log line or comment on a changed line that now says something
|
|
51
|
+
false about the code beside it (stale prose elsewhere is
|
|
52
|
+
`pass-maintainability`'s).
|
|
53
|
+
|
|
54
|
+
Severity follows the consequence, never the size of the slip: a one-character
|
|
55
|
+
typo that breaks a feature is a blocker; a harmless one is a nit. `NONE` is
|
|
56
|
+
the right answer for files with no slips. Formatting and naming taste belong to
|
|
57
|
+
`pass-style` and `pass-lint-conformance`; report slips here.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-tests
|
|
3
|
+
description: Tests review pass — which existing tests, mocks and fixtures the change breaks, and whether the PR's tests actually test the code or mock away the failure point.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: tests
|
|
10
|
+
|
|
11
|
+
Existing tests are consumers of every change, and the PR's own tests are
|
|
12
|
+
claims about the code. This lens reads both. It never runs anything — CI runs
|
|
13
|
+
the tests; you predict, from the code, what CI will see and whether what it
|
|
14
|
+
sees means anything.
|
|
15
|
+
|
|
16
|
+
Work through these three questions, in your notes, before writing findings.
|
|
17
|
+
|
|
18
|
+
## 1. Which existing tests does this change break?
|
|
19
|
+
|
|
20
|
+
For every changed signature, type, field (above all a newly REQUIRED field),
|
|
21
|
+
default value, return shape, error type, environment read (a TTY check, an env
|
|
22
|
+
var, the clock, the working directory) and observable behaviour:
|
|
23
|
+
|
|
24
|
+
- search the test tree for everything that exercises it — tests, mocks, fakes,
|
|
25
|
+
fixtures, factories, snapshots, test helpers;
|
|
26
|
+
- for each hit, say whether it still compiles and still passes against the new
|
|
27
|
+
code: a mock or fixture object missing the new required field, an assertion
|
|
28
|
+
on the old value or message, a snapshot of the old output, a test that relied
|
|
29
|
+
on an environment default CI does not have (CI has no TTY, no network, often a
|
|
30
|
+
different working directory and timezone);
|
|
31
|
+
- a test the PR updated in the same diff is fine; a test it did not touch that
|
|
32
|
+
now fails is a finding, anchored where the PR changed the contract, naming the
|
|
33
|
+
test file and line.
|
|
34
|
+
|
|
35
|
+
## 2. Do the PR's new or changed tests test the code?
|
|
36
|
+
|
|
37
|
+
- a test that mocks away the exact function or branch the PR changed, so the
|
|
38
|
+
real code never runs;
|
|
39
|
+
- an assertion on the mock itself, or on a value the test just set;
|
|
40
|
+
- a test that would still pass with the fix reverted (trace it: what does the
|
|
41
|
+
test do on the base code?);
|
|
42
|
+
- a regression test that does not reach the branch it is named after.
|
|
43
|
+
|
|
44
|
+
## 3. Are the test expectations right?
|
|
45
|
+
|
|
46
|
+
- an expected value that is itself wrong (compare it with what the code and
|
|
47
|
+
the PR text say should happen);
|
|
48
|
+
- an assertion that cannot fail (`assert x or True`, a comparison against the
|
|
49
|
+
value just computed, an empty loop over results);
|
|
50
|
+
- a test that swallows the exception it was meant to check.
|
|
51
|
+
|
|
52
|
+
Severity follows the consequence: a test the change breaks is a broken CI run
|
|
53
|
+
and usually blocks; a test that proves nothing next to a real behaviour change
|
|
54
|
+
is a real gap. Missing tests for new behaviour are the baseline lens's call, and
|
|
55
|
+
a bug-fix PR with no regression test gets one request from the regression-test
|
|
56
|
+
rule — not yours to repeat; this lens is about the tests that exist. `NONE` when every test that
|
|
57
|
+
touches the change still holds and the PR's tests exercise the code they claim
|
|
58
|
+
to.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-ui
|
|
3
|
+
description: UI-state review pass — frontend effects, mutations, translations, tokens, async pipeline durability.
|
|
4
|
+
tools: read, bash, grep, glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: UI state
|
|
10
|
+
|
|
11
|
+
Apply to: frontend effects, client-side data mutations, forms, translations,
|
|
12
|
+
widget behavior.
|
|
13
|
+
|
|
14
|
+
Styling through the repo's own design tokens and components — no raw values
|
|
15
|
+
where the repo defines a token (colors, spacing, type sizes), one icon set;
|
|
16
|
+
new user-facing strings translated in **every** locale the repo ships, through
|
|
17
|
+
its translation mechanism; HTTP through the repo's shared client, never an ad
|
|
18
|
+
hoc call. One-shot effects must not key on async-hydrated or locally-persisted
|
|
19
|
+
state (they skip permanently in the pre-hydration window). Every
|
|
20
|
+
mutation-firing control must be disabled with pending feedback while the
|
|
21
|
+
mutation is in flight. Durable completion of an async pipeline must be
|
|
22
|
+
persisted server-side and reconcilable by polling — never only pushed over a
|
|
23
|
+
transient channel.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-validate
|
|
3
|
+
description: Adversarial validation pass — every candidate finding is re-derived from the code before posting; what does not hold up is doubted or killed.
|
|
4
|
+
tools: read, bash, grep, glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: validation (runs after all other passes)
|
|
10
|
+
|
|
11
|
+
You receive **every candidate finding** from this round's lens passes, plus
|
|
12
|
+
the worktree and the SETTLED list. You are the adversary: your job is to keep
|
|
13
|
+
what doesn't survive contact with the code off the PR. A plausible-but-wrong
|
|
14
|
+
finding posted to a teammate costs more than a missed nit.
|
|
15
|
+
|
|
16
|
+
Per candidate finding, in order:
|
|
17
|
+
|
|
18
|
+
1. **Re-derive the claim from the code.** Open the file, trace the logic
|
|
19
|
+
yourself. If you cannot independently confirm the defect exists as stated,
|
|
20
|
+
mark it DOUBTED (reason: `unverifiable`) or, for security-lens findings
|
|
21
|
+
only, demote to P3/question (reason: `security-demoted`) — security suspicions are worth
|
|
22
|
+
a question, never silent death.
|
|
23
|
+
2. **Check the SETTLED list.** A finding that re-raises a settled thread is
|
|
24
|
+
KILLED (reason: `settled:<thread-id>`) unless marked `contests-settled` —
|
|
25
|
+
pass those through annotated for the session to judge.
|
|
26
|
+
3. **Verify the anchor.** `path:line:side` must land inside a changed-line run
|
|
27
|
+
of the actual diff, on the line that CAUSES the defect. Move the anchor to
|
|
28
|
+
that line if the finding is real but misplaced; strip it (body-only
|
|
29
|
+
finding) if unanchorable.
|
|
30
|
+
4. **Audit severity and confidence** against the shared definitions. Adjust
|
|
31
|
+
with a one-word reason (`inflated`, `understated`). Findings with
|
|
32
|
+
confidence < 0.5 after your audit are DOUBTED (reason: `unverifiable`;
|
|
33
|
+
security → demote, rule 1).
|
|
34
|
+
5. **Merge residual duplicates** the session's dedup missed (same defect, two
|
|
35
|
+
phrasings).
|
|
36
|
+
|
|
37
|
+
Output: the surviving findings in the standard findings-block format, followed
|
|
38
|
+
by:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
DOUBTED
|
|
42
|
+
- <lens> <path:line> — <reason word>: <reason>
|
|
43
|
+
|
|
44
|
+
KILLED
|
|
45
|
+
- <lens> <path:line> — <reason>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
A doubted finding is kept in the findings record, marked "may not be valid",
|
|
49
|
+
and never posted. The kill-log is not discarded — the EOD critic reads it;
|
|
50
|
+
recurring kill reasons become rubric fixes. Be exact about reasons.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-widened
|
|
3
|
+
description: Widened-check review pass (sub-lens of baseline) — when a predicate, guard or accepted-value list changes, every consumer that trusted the old set is checked against each newly admitted member.
|
|
4
|
+
tools: read, bash, grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: widened checks (sub-lens of baseline)
|
|
10
|
+
|
|
11
|
+
Selected because the diff changes a predicate, a guard or a list of accepted
|
|
12
|
+
values — an `isX()`/`supportsX()` function, an allow-list, a device/model/ID
|
|
13
|
+
table, a comparison against a literal. The defects this lens exists for live
|
|
14
|
+
OUTSIDE the diff: in code that trusted the old, narrower set.
|
|
15
|
+
|
|
16
|
+
Work through these steps in your notes before writing any finding:
|
|
17
|
+
|
|
18
|
+
1. **What changed.** Name the predicate, guard or list, and the members it
|
|
19
|
+
now admits or no longer admits.
|
|
20
|
+
2. **Every consumer.** Search the whole tree for every caller of the
|
|
21
|
+
predicate and every reader of the list — not only the ones in the diff. One
|
|
22
|
+
row per consumer: its `file:line`, the branch it takes when the check
|
|
23
|
+
passes, and what that branch ASSUMES about the member (capabilities, data
|
|
24
|
+
layout, format, version, which features it has).
|
|
25
|
+
3. **New member × consumer.** For each newly admitted member and each
|
|
26
|
+
consumer row: does the assumption hold for this member? A row where it
|
|
27
|
+
does not is a finding, anchored where the PR widened the check and naming
|
|
28
|
+
the consumer.
|
|
29
|
+
4. **Checks that stand in for a property.** When a check stands in for a
|
|
30
|
+
property — `ptr != nil` meaning "readable and already computed",
|
|
31
|
+
`status != "draft"` meaning "published", `len > 0` meaning "valid" — list
|
|
32
|
+
the values that pass the check without having the property: other
|
|
33
|
+
spellings and letter cases of the same name, sentinels, empty-but-present
|
|
34
|
+
values, partially initialised states. Trace each to what it breaks.
|
|
35
|
+
5. **Completeness of the family.** When the PR adds members of a family
|
|
36
|
+
(models, transports, platforms, error codes, locales), list the family as
|
|
37
|
+
the PR text or the surrounding table defines it, and check that every
|
|
38
|
+
combination is present — every variant through every channel it can
|
|
39
|
+
arrive by, every platform in every table. A missing combination is a
|
|
40
|
+
finding.
|
|
41
|
+
6. **The smallest result.** For code that filters, merges, deduplicates or removes
|
|
42
|
+
items, trace the smallest possible result — zero items, one item — into
|
|
43
|
+
every consumer (size bounds against peer input are `pass-bounds`').
|
|
44
|
+
|
|
45
|
+
Report only the rows that fail. `NONE` is the expected output when every
|
|
46
|
+
consumer's assumption holds.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pass-scan
|
|
3
|
+
description: Scan stage 1 — a cheap, wide first look at one unit of the whole repo with no pull request. Reports the clear defects it sees and suggests which deep lenses the unit's files deserve, and why. Built only into the companion's scan build, never a PR round's.
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{include:prompts/pass-common.md}}
|
|
8
|
+
|
|
9
|
+
# Lens: scan — stage 1, one unit, a first look
|
|
10
|
+
|
|
11
|
+
You are the first pass of a whole-repository scan. Your case is one unit of
|
|
12
|
+
the repo (or one part of an oversized unit), named in your task string with
|
|
13
|
+
its focus files and the tree root they sit under. Nobody changed this code
|
|
14
|
+
for you to review: it is the code as it stands at the scan sha, and every
|
|
15
|
+
line of it is in scope.
|
|
16
|
+
|
|
17
|
+
You are the CHEAP pass. Deeper, dearer lenses may follow, but only where you
|
|
18
|
+
point them. So your job has two halves, and the second matters as much as the
|
|
19
|
+
first:
|
|
20
|
+
|
|
21
|
+
1. **Report what is plainly wrong.** Read every focus file once, top to
|
|
22
|
+
bottom. Report the defects you can see and confirm without a long
|
|
23
|
+
investigation — a bug a reader can trace in a few steps, an unguarded
|
|
24
|
+
input, a broken contract between two files of this unit, an error
|
|
25
|
+
swallowed where it matters, a resource never released, dead or
|
|
26
|
+
contradictory code that misleads. Follow a name out of the unit only to
|
|
27
|
+
confirm a finding, never to go looking for new ones.
|
|
28
|
+
2. **Point the deep lenses.** Where a file or a group of files deserves a
|
|
29
|
+
harder look than you can give — authentication and permissions, data
|
|
30
|
+
written or migrated, money, concurrency, a public contract many callers
|
|
31
|
+
lean on, a design that looks wrong but needs the whole picture — name the
|
|
32
|
+
deep lens that should look, the files, and one line saying what it should
|
|
33
|
+
chase. Your task string lists the lenses you may name.
|
|
34
|
+
|
|
35
|
+
What you do not do:
|
|
36
|
+
|
|
37
|
+
- No speculation dressed as a finding. A finding you could not confirm from
|
|
38
|
+
the code is a suggestion for a deep lens, not a finding.
|
|
39
|
+
- No style sweep. A style or naming point is a `nit` only when it misleads a
|
|
40
|
+
reader; the style lens has its own pass.
|
|
41
|
+
- No tests and no migrations: they are not in your case, and a missing test
|
|
42
|
+
is not a finding here.
|
|
43
|
+
- No inventory of what you checked and found fine.
|
|
44
|
+
|
|
45
|
+
`NONE` is a good answer for clean code. Few, confirmed findings and a sharp
|
|
46
|
+
suggestion beat a long list.
|
|
47
|
+
|
|
48
|
+
## Every finding: the reach and the odds
|
|
49
|
+
|
|
50
|
+
A cheap pass is only worth its price if a reader can act on a finding
|
|
51
|
+
without re-deriving it. Where the finding is anchored, and how its evidence
|
|
52
|
+
quotes that line, the scan-mode rule at the end of these instructions
|
|
53
|
+
settles. Two more rules bind every finding you return:
|
|
54
|
+
|
|
55
|
+
- **Reachability is a claim you checked, not a default.** Every finding
|
|
56
|
+
carries the reachability axis the rule below describes. Before calling a
|
|
57
|
+
finding routine, name in `evidence` the caller or input that actually
|
|
58
|
+
reaches the state (grep for the callers — this is a confirmation, allowed
|
|
59
|
+
outside the unit). A missing guard is only a defect where the unguarded
|
|
60
|
+
value can arrive: when you did not find a caller that passes it, the
|
|
61
|
+
finding is at most plausible; when reaching it needs several unrelated
|
|
62
|
+
things to line up, it is contrived. The scan applies the PR rounds' map to
|
|
63
|
+
what you write — a contrived finding is stored as P3 whatever its
|
|
64
|
+
severity, a plausible P2 as P3 — so an honest axis is what keeps a real
|
|
65
|
+
P1 a P1.
|
|
66
|
+
- **Calibrate confidence.** `confidence` is the probability that the claim —
|
|
67
|
+
including its reachability — is true as stated. 0.9 and above means you
|
|
68
|
+
read every step of the path, the caller included; a defect you saw on the
|
|
69
|
+
line but whose trigger you did not trace is 0.6–0.7 at most; a pattern that
|
|
70
|
+
merely looks risky is a SUGGEST row, not a finding. A 0.99 on an untraced
|
|
71
|
+
trigger is a bluff, and the scan's record of your findings is audited.
|
|
72
|
+
|
|
73
|
+
## Output — two blocks, nothing else
|
|
74
|
+
|
|
75
|
+
First the findings block of the shared contract (with the scan-mode header
|
|
76
|
+
and `kind:` your build's scan rules describe), or `NONE`. Then:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
SUGGEST
|
|
80
|
+
- lens: <a lens name from your task string's list>
|
|
81
|
+
files: <comma-separated repo-relative paths>
|
|
82
|
+
reason: <one line — what a deeper look with that lens would chase here>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
At most five suggestions, the most valuable first. When no file of the case
|
|
86
|
+
deserves a deeper look, write `SUGGEST NONE`.
|