kunibert
All repositories: gitoria
5.8 KB
# The earlier reviewer live prompt rules from reference-reviewer#17 (main b25be58), verbatimSource: src/review.ts (constants, used inline in the fresh PROMPT) and src/memory.ts (RULES, used in every wake-up and ledger prompt). Template-literal escapes shown as in source (\` = backtick).## src/review.ts```tsexport const RULES_VERSION = 1const REACH = `Before reporting that a value can be missing, null or out of range, check that it is reachable: look up the schema or field config that produces it (e.g. Payload \`required\`/\`maxRows\`, Zod schemas, data-hub mappers, DB constraints). Do not report states the producer cannot create.`const CONTRACT = `Cross-repo contracts: the earlier setup's services (service, service-data-hub, service-payload, service-next) read each other's data. When the diff changes a shape another service reads or writes (DTO, Zod schema, Payload field, API response, DB column, migration, env var), check that the old reader still works or that the PR says the deploy order ("deploy after ..."). A breaking change without either is a major finding.`const CHECKLIST = `Also check these often-missed categories where the diff touches them: cache invalidation / revalidation tags after writes; existing rows when a constraint, unique index or required field is added (backfill, collisions); publish/draft side effects; timeouts on external calls (sized per purpose); serverless time limits and recovery from a cut-off run; stale async responses overwriting newer UI state; CLI argument validation and hard-coded developer paths; README/ARCHITECTURE claims the change makes untrue; a11y and i18n of new UI; unbounded queries, N+1 and loops over large data.`const SPEC_SOFT = `Before reporting a requirement as missing, read the PR description and any PRs it links or stacks on: work explicitly placed in another PR, or a PR the description scopes to a part of the ticket, is not a gap. Report a change unrelated to the ticket at most as a nit (or only in axes.spec), never as minor or higher. Once the author has cited a ticket exception or a later decision, do not raise that point again.`const SUGGEST = `Your comment anchors on that one line: when the fix only changes that line, add a GitHub suggestion block (\`\`\`suggestion, then the exact replacement line(s), then \`\`\`) so the author can commit it.`export const CALIBRATION = `Updated review rules (they apply from this run on):- correctness: ${REACH}- correctness: ${CONTRACT}- correctness: ${CHECKLIST}- spec: ${SPEC_SOFT}- ${SUGGEST}````How PROMPT uses them (correctness axis line, then three indented lines; spec axis appends SPEC_SOFT; the line rule appends SUGGEST):```ts156:- correctness: ${REACH}157:- correctness: ${CONTRACT}158:- correctness: ${CHECKLIST}159:- spec: ${SPEC_SOFT}160:- ${SUGGEST}`167: ${REACH}168: ${CONTRACT}169: ${CHECKLIST}170:2. spec: ${hasSpec ? 'the originating ticket(s) are in .reviewer/spec.md, each with its comments in chronological order. The spec is the description as amended by the comments: a later comment that drops, changes or adds a requirement overrules the description and earlier comments, so judge against the latest decision and never report a requirement a later comment dropped. Where the comments leave it unclear which version holds, report one minor spec finding naming the conflict instead of a gap. Report (a) acceptance criteria / requirements that are missing or only partial, (b) behaviour the diff adds that the spec did not ask for (scope creep), (c) requirements that look implemented but wrongly. Quote the spec line in every spec finding. ' + SPEC_SOFT : 'no ticket or issue is linked, so there are no spec findings; say so in axes.spec.'}173:Every finding needs the exact file path and the line number on the NEW side that appears in the diff (for a spec finding about something missing, use the closest relevant changed line). Be concrete and short; say what is wrong and how to fix it. ${SUGGEST}```## src/memory.ts RULES (wake-up / ledger prompt)```tsexport const RULES = `Memory rules:- A thread that is resolved, or where the author replied with a reason you accept, is settled: never raise that point again, not as a new finding and not reworded.- If the author shows your point was wrong, say so plainly in that thread (start the reply with "Withdrawn:") and resolve it; do not restate it.- If a reply does not convince you and the point still matters, answer in that thread through "replies" (thread key, e.g. T3) instead of a new finding. Keep it short.- If a thread's problem is fixed by the new code, reply briefly with resolve: true.- "findings" holds only NEW points: problems in the new changes, or ones you missed before.- verdict reflects the whole PR as it stands now: unresolved blocking points still count.- Scope is exactly .reviewer/pr.diff (merge base..head). Code that arrived by merging the base branch into the PR is not the author's change: never review it and never report it as scope creep.````## Wake promptSessions created before the rules existed get CALIBRATION once (sessions.rules < RULES_VERSION), via wakePrompt's `rules` field, pushed right before RULES. After that save sets rules = RULES_VERSION.## SchemaNo withdrawn flag. A withdrawal is a normal entry in `replies` ({thread, body, resolve}): body starts with "Withdrawn:" and resolve is true. src/schema.json unchanged by #17.## Notes for Kunibert (the design consultant)- CONTRACT names the earlier setup's services and REACH names the earlier setup tools (Payload, Zod, data-hub mappers): replace those names with yourrepos/stack; keep the rest word for word.- SUGGEST is NOT for you (point 24: no suggestion blocks on gitoria).- The "Withdrawn:" line is in RULES (memory rules), not in the fresh prompt: a fresh review has no threads to withdraw.- Fresh prompt = PROMPT (correctness line + REACH/CONTRACT/CHECKLIST indented, spec text + SPEC_SOFT). Wake-up = wakePrompt(+ CALIBRATION once for old sessions) + RULES.
Branches
Latest commits
- 8d34ca33records: repo rename (gitoria#53)mre
- 1e05cb3fMerge branch 'repo-rename' into mainKunibert
- 6ee0d2e9|||PR intake: match a delivery by repo.id and signature, not URLs (gitoria#53 rename)mre
- 900ffcd4status: routgermre
- 59b0b793log: routger merge waitmre
- e52f094alog: routger intake check (hycon#122)mre
- f979027frecords: design rule livemre
- 71efaf84Merge branch 'design-guard' into mainKunibert
- c0656581|||PR Flag removal of a documented design as major unless his recorded yes is linked; rules version 5mre
- 901cdd75records: L10 update 2 livemre
- 4a68016bMerge branch 'hl-standard-l10b' into mainKunibert
- 246d0f30|||PR HL-STANDARD L10 update (hybriel ab293e5a), rules version 4mre
- 1aa4d64crecords: HL-STANDARD L10 update livemre
- 2b04c240Merge branch 'hl-standard-l10' into mainKunibert
- 88c7b09d|||PR HL-STANDARD L10 update (hybriel 5885d688), rules version 3mre
- 00869ecbrecords: gitoria#50 step 3 livemre
- f97a0e5fMerge branch 'hl-standard' into mainKunibert
- 9710e39fType STANDARD as String (L10, Kunibert review)mre
- 4140b664|||PR Review against HL-STANDARD and cite rule ids (gitoria#50 step 3)mre
- 75c6888drecords: gitoria#50 step 1 connected and provenmre