feat: /norm — norminette sensor feedforward (closes #4)#15
Open
Cimeci wants to merge 1 commit into
Open
Conversation
#4) /norm runs the 42 norm linter, parses its findings, and injects them as read-only feedforward into the reviewer mentor, which turns each error into a Socratic question graded by severity — never fixing the code itself. - src/norminette.ts: pure parseNorminette + injectable runNorminette (never throws — missing binary → available:false; non-zero exit → parse stdout) + formatFindingsForReview. Modelled on providers/localModels.ts, testable without the binary. - Generalizes the per-turn channel: RespondOptions.reviewContext, composed with VERIFY outside the prompt cache so it never leaks into later turns. - Chat: /norm [path] runs the sensor, shows a summary, and forces the reviewer mentor via an extended sendToMentor(mentor, reviewContext). - palette + /help + i18n (FR/EN). Tested: parse/run/format (incl. missing binary & non-zero exit), reviewContext injection + cache cleanliness, palette + demo guard. 140 green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements issue #4: a deterministic computational sensor that runs the 42
norminetteand feeds its findings into the reviewer mentor as feedforward.What it does
/norm [path]runs the norm linter, parses the violations, and hands them to the reviewer mentor as read-only context. The mentor turns each error into a Socratic question graded by severity (blocker/should-fix/consider/nit) and helps the student fix it themselves — it never rewrites the code.How
src/norminette.ts: pureparseNorminette+ injectablerunNorminette(never throws — missing binary →available:false; non-zero exit still parsed from stdout) +formatFindingsForReview. Modelled onproviders/localModels.ts, fully testable without the binary./verifyper-turn channel:RespondOptions.reviewContext, composed outside the prompt cache so findings never leak into later turns.sendToMentor(mentor, reviewContext)./help+ FR/EN strings. No prompt changes — thereviewdomain already forbids rewriting code.Test plan
npm test— 140 tests green (parse/run/format incl. missing-binary & non-zero-exit; reviewContext injection + cache cleanliness; palette + demo guard)npm run build— cleantsc{ available: false }, no crashTargets
dev. Closes #4.