8000 Draft: the ruby prompts that would remain by devill · Pull Request #152 · habit-hooks/habit-hooks · GitHub
[go: up one dir, main page]

Skip to content
8000

Draft: the ruby prompts that would remain - #152

Closed
devill wants to merge 2 commits into
add-rubocop-supportfrom
review/pr-150-prompts
Closed

devill wants to merge 2 commits into
add-rubocop-supportfrom
review/pr-150-prompts

Conversation

@devill
@devill devill commented Aug 29, 2026 •
Copy link
Copy Markdown
Collaborator

Draft, for reading the prompts. Not for merge.

Base is add-rubocop-support, so this diff is only what I propose changing on
top of PR #150: 16 files, +19 −99.

Generic guides

  • parse-error.md moves to the typescript plugin. It names ESLint,
    tsconfig.json and npx eslint, so it only ever coached one plugin's
    findings.
  • high-complexity.md no longer says "cyclomatic". Naming the measure invites
    gaming it.
  • The coached unit now reads function/method in seven guides. It said
    "function", which is wrong in Ruby, Python and PHP.

Known gap: ruff maps invalid-syntax to parse-error too, so Python now
falls back to uncoached.md for it. parse-error is enforced, so a Python
syntax error still blocks the run, with generic advice instead of ESLint's.
Tracked in #153.

Ruby guides

Nine forks become two.

Guide Kept Why
parse-error yes ruby -c, TargetRubyVersion, cops rather than rules
oversized-block yes only this plugin reports the smell
deep-nesting no generic, with Ruby nouns
high-complexity no generic, plus the metric paragraph
oversized-function no generic, with Ruby nouns
swallowed-exception no generic, with Ruby nouns
too-many-parameters no generic, with Ruby nouns
unused-variable no generic, reformatted
uncoached no core, rewritten
includes/rubocop_line_level_issues.md no printed the cop's message

oversized-block now uses the shared line_level_issues.md. The forked include
existed to print RuboCop's message, which carries the count ([8/7]) the guides
deliberately withhold. The cop name is already in the block banner.

Not in here

  • Ruby code examples the deleted guides carried: next unless, return unless,
    **opts. They need a per-language include, which does not exist yet.
  • oversized-block's guide is still the plugin's own oversized-function guide
    with the nouns changed.

Gate

1046 passed, 4 skipped, ruff clean, uv run habit-hooks --all clean.

devill added 2 commits August 29, 2026 11:29
The ESLint parse-error guide names ESLint, tsconfig.json and npx eslint, so it
only ever coached one plugin's findings. It moves to the typescript plugin.
Python's ruff maps invalid-syntax to the same smell and now has no guide for it,
which is what the unification issue is for.

high-complexity opened by naming the metric. Handing an agent the measure
invites gaming it, so the word goes and the guide keeps the shape.

Every generic guide named the coached unit "function", which is wrong in Ruby,
Python and PHP. It now reads "function/method" wherever the unit is meant.
PR #150 forks nine prompts that already exist. Seven say the same thing once
Ruby nouns are substituted, which the generic guides now carry as
"function/method", so they are dropped and the generic guide renders.

Two remain. parse-error states RuboCop facts no shared guide can hold: ruby -c,
TargetRubyVersion, cops rather than rules. oversized-block is a smell only this
plugin reports, so nothing else coaches it.

The forked line-level include goes with them. It existed to print the cop's
message, which is the metric the guides deliberately do not hand the agent, so
oversized-block uses the shared listing.
@devill
devill changed the base branch from main to add-rubocop-support August 29, 2026 09:49
@devill
devill commented Aug 29, 2026
< 8000 svg aria-label="Show options" role="img" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> Copy link
Copy Markdown
Collaborator Author

Superseded — the prompt changes go to add-rubocop-support as cherry-pickable commits instead.

@devill devill closed this Aug 29, 2026
@devill
devill deleted the review/pr-150-prompts branch August 29, 2026 10:10
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

0