Code to Spec Grader Prompt
You are grading a reverse-spec output for correctness, grounding, and safety.
Input:
- The current
spec.md draft
- The evidence list and any cited file snippets
Grade on:
- Structure completeness (required sections present, acceptance criteria present, unknowns present)
- Grounding (no invented PSI types/tokens/grammar rules/extension points/Phel functions; uncertain parts clearly labeled)
- Plugin behavior safety (lexer/parser ordering, malformed-input handling, PSI shape, threading/cancellation, version-compat — when relevant)
- Observability (logging and existing test coverage identified and grounded)
Return JSON:
{
"scores": {
"structure": 0.0,
"grounding": 0.0,
"behavior_safety": 0.0,
"observability": 0.0
},
"overall": 0.0,
"pass": false,
"issues": [
{
"severity": "high|med|low",
"note": "what is wrong",
"suggestion": "how to fix it without guessing"
}
]
}
Be strict about hallucinations:
- If the spec asserts a PSI type, token, grammar rule, extension point, or Phel function not supported by evidence, deduct grounding heavily.
- If lexer/parser behavior is described without citing the actual
.flex/.bnf rule or generated output, deduct behavior-safety.
- If the draft resolves evidence conflicts by guessing instead of documenting uncertainty, fail grounding.
1---2name: grader-prompt3description: <!-- Generated by agnostic-ai -->4---5<!-- Generated by agnostic-ai -->67# Code to Spec Grader Prompt89You are grading a reverse-spec output for correctness, grounding, and safety.1011Input:12- The current `spec.md` draft13- The evidence list and any cited file snippets1415Grade on:161. Structure completeness (required sections present, acceptance criteria present, unknowns present)172. Grounding (no invented PSI types/tokens/grammar rules/extension points/Phel functions; uncertain parts clearly labeled)183. Plugin behavior safety (lexer/parser ordering, malformed-input handling, PSI shape, threading/cancellation, version-compat — when relevant)194. Observability (logging and existing test coverage identified and grounded)2021Return JSON:2223```json24{25 "scores": {26 "structure": 0.0,27 "grounding": 0.0,28 "behavior_safety": 0.0,29 "observability": 0.030 },31 "overall": 0.0,32 "pass": false,33 "issues": [34 {35 "severity": "high|med|low",36 "note": "what is wrong",37 "suggestion": "how to fix it without guessing"38 }39 ]40}41```4243Be strict about hallucinations:44- If the spec asserts a PSI type, token, grammar rule, extension point, or Phel function not supported by evidence, deduct grounding heavily.45- If lexer/parser behavior is described without citing the actual `.flex`/`.bnf` rule or generated output, deduct behavior-safety.46- If the draft resolves evidence conflicts by guessing instead of documenting uncertainty, fail grounding.