Skip to content

feat: /norm — norminette sensor feedforward (closes #4)#15

Open
Cimeci wants to merge 1 commit into
devfrom
feat/issue-4-norminette
Open

feat: /norm — norminette sensor feedforward (closes #4)#15
Cimeci wants to merge 1 commit into
devfrom
feat/issue-4-norminette

Conversation

@Cimeci

@Cimeci Cimeci commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Implements issue #4: a deterministic computational sensor that runs the 42 norminette and 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.

  • No norminette installed → clear "not installed" message (no crash).
  • No errors → "clean ✅".
  • Errors → summary + the reviewer guides the student.

How

  • src/norminette.ts: pure parseNorminette + injectable runNorminette (never throws — missing binary → available:false; non-zero exit still parsed from stdout) + formatFindingsForReview. Modelled on providers/localModels.ts, fully testable without the binary.
  • Reuses & generalizes the /verify per-turn channel: RespondOptions.reviewContext, composed outside the prompt cache so findings never leak into later turns.
  • Forces the reviewer mentor via an extended sendToMentor(mentor, reviewContext).
  • Palette + /help + FR/EN strings. No prompt changes — the review domain already forbids rewriting code.

Test plan

  • npm test140 tests green (parse/run/format incl. missing-binary & non-zero-exit; reviewContext injection + cache cleanliness; palette + demo guard)
  • npm run build — clean tsc
  • Real run here (no norminette): degrades to { available: false }, no crash
  • Manual with norminette installed (42 machine): findings → Socratic review

Targets dev. Closes #4.

#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant