gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainbd3591c7conductor: gates run on the live day44 binarymremain/docs/reviewer-design/5-rules-verbatim.md

5.8 KB

  1. # The earlier reviewer live prompt rules from reference-reviewer#17 (main b25be58), verbatim
  2. Source: 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).
  3. ## src/review.ts
  4. ```ts
  5. export const RULES_VERSION = 1
  6. const 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.`
  7. 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.`
  8. 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.`
  9. 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.`
  10. 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.`
  11. export const CALIBRATION = `Updated review rules (they apply from this run on):
  12. - correctness: ${REACH}
  13. - correctness: ${CONTRACT}
  14. - correctness: ${CHECKLIST}
  15. - spec: ${SPEC_SOFT}
  16. - ${SUGGEST}`
  17. ```
  18. How PROMPT uses them (correctness axis line, then three indented lines; spec axis appends SPEC_SOFT; the line rule appends SUGGEST):
  19. ```ts
  20. 156:- correctness: ${REACH}
  21. 157:- correctness: ${CONTRACT}
  22. 158:- correctness: ${CHECKLIST}
  23. 159:- spec: ${SPEC_SOFT}
  24. 160:- ${SUGGEST}`
  25. 167: ${REACH}
  26. 168: ${CONTRACT}
  27. 169: ${CHECKLIST}
  28. 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.'}
  29. 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}
  30. ```
  31. ## src/memory.ts RULES (wake-up / ledger prompt)
  32. ```ts
  33. export const RULES = `Memory rules:
  34. - 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.
  35. - 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.
  36. - 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.
  37. - If a thread's problem is fixed by the new code, reply briefly with resolve: true.
  38. - "findings" holds only NEW points: problems in the new changes, or ones you missed before.
  39. - verdict reflects the whole PR as it stands now: unresolved blocking points still count.
  40. - 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.`
  41. ```
  42. ## Wake prompt
  43. Sessions 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.
  44. ## Schema
  45. No 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.
  46. ## Notes for Kunibert (the design consultant)
  47. - CONTRACT names the earlier setup's services and REACH names the earlier setup tools (Payload, Zod, data-hub mappers): replace those names with your
  48. repos/stack; keep the rest word for word.
  49. - SUGGEST is NOT for you (point 24: no suggestion blocks on gitoria).
  50. - The "Withdrawn:" line is in RULES (memory rules), not in the fresh prompt: a fresh review has no threads to withdraw.
  51. - Fresh prompt = PROMPT (correctness line + REACH/CONTRACT/CHECKLIST indented, spec text + SPEC_SOFT). Wake-up = wakePrompt
  52. (+ CALIBRATION once for old sessions) + RULES.

Branches

Latest commits

  • bd3591c7conductor: gates run on the live day44 binarymre
  • 47f747a7records: jukebox #9 fix livemre
  • 0a3169fdMerge branch 'vendored-size' into mainKunibert
  • e447bb09Vendored size fix: keep renames with an app side whole; type the filter parameter (L10)mre
  • 99ccc742Vendored size fix: no renames in the app diff, filter the resumed delta toomre
  • 1a52e100|||PR Diff size limit counts only app files when vendored paths are setmre
  • 50a1867estatus: jukebox #9mre
  • c57484e6log: jukebox #9 diff sizemre
  • 795a20carecords: guard fix live (PR 8)mre
  • 6981d96fMerge branch 'fresh-on-nocmd' into mainKunibert
  • 37c47840runner: one shared prompt for both fresh-session fallbacks (L16)mre
  • f945d2e1|||PR runner: a resumed run with no command on a new head gets one fresh session instead of a tool errormre
  • 10b2a49estatus: PR 314, guard fix proposedmre
  • e73995a3log: hycon PR 314 approved after fresh reviewmre
  • f60427falog: hycon PR 314 false tool errormre
  • 481974f7log: Hermes accepts PR 259 findingmre
  • bb0976acrecords: hycon PR 259 design findingmre
  • 5c637c24records: hycon PR 259 false tool errormre
  • a344c406log: routger 132 reviewedmre
  • 56e70dcbrecords: review time limit 1800 s (routger 132)mre