Skip to content

chore: additional deslag lints - #509

Merged
webern merged 1 commit into
mainfrom
no-more-knobs
Nov 9, 2026
Merged

webern merged 1 commit into
mainfrom
no-more-knobs

Conversation

@webern

@webern webern commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Extends deslag to the agent skills and bans the word "knob".

  • deslag.toml now lints /.agents/skills/**/*.md. .claude/skills is a symlink to the same directory, so only the .agents path is listed.
  • The four skills whose frontmatter says llm-edit: false (mx-api-doctrine, mx-comments, mx-open-issue, mx-open-pr) are excluded by exact path, since their owner does not want automatic prose edits. mx-comments and mx-api-doctrine gain the marker in this PR.
  • mx-api-classify-roundtrip-failures was the only skill with lint hits. They are fixed without changing its meaning: emphasis removed, em dashes and an arrow replaced, and a few negations reworded.
  • "knob" and "knobs" are banned in the md and cpp lints. The existing uses are replaced with the real term (field or parameter) in gen/AGENTS.md, gen/DESIGN.md, the gen/press/engine.py docstring, a comment in gen/tests/test_press.py, the review instructions under .github/instructions/, and the mx-api-doctrine heading.
  • The mx-open-issue and mx-open-pr skills and api-headers.instructions.md are also rewrapped to 100 columns.

No code behavior changes: the Python edits are in docstrings and comments.

Testing

  • make fmt-check passes (clang-format and deslag check)
  • deslag explain shows the four llm-edit: false skills excluded, including through the .claude/skills symlink
  • gen/press/engine.py and gen/tests/test_press.py byte-compile
  • The gen test suite was not run, because only docstrings and comments changed

References

Onboard .agents/skills/**/*.md to deslag. The skills whose frontmatter
says `llm-edit: false` are excluded by path, since their owner does not
want automatic prose edits. Fix the lint hits in
mx-api-classify-roundtrip-failures.

Ban "knob" and "knobs" in the md and cpp lints, and replace the existing
uses with the real term (field, parameter) in the gen docs, the gen
press engine docstrings, the review instructions and the api doctrine.
@webern webern added non-breaking fixes or implementation that do not require breaking changes gen The gen/ directory which is generating code from the spec ai Issues opened by, or through, a coding agent. labels Nov 9, 2026
@webern webern changed the title chore: lint agent skills with deslag and retire "knob" chore: additional deslag lints Nov 9, 2026
@webern
webern marked this pull request as ready for review November 9, 2026 10:04
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

gen-quality gen/

gen-quality: 84.8 / 100   (floor 84.5, +0.3)

  structure     86.2  x0.50   [fn 90.8 / file 81.6]
  cyclomatic    89.0  x0.25
  cognitive     77.9  x0.25

  436 functions across 32 files, 8133 lines (largest file 1103)
  max cc 56  max cognitive 44  max fn loc 152

Worst offenders (top 5 per axis; full lists in score.json):
  cyclomatic gen/xsd/analyze.py:311     report                             56
  cyclomatic gen/plates/build.py:1014   _validate_config_against_ir        35
  cyclomatic gen/press/context.py:145   plate_context                      35
  cyclomatic gen/__main__.py:46         _ir                                23
  cyclomatic gen/tests/test_ir.py:102   _check_references                  20
  cognitive  gen/xsd/analyze.py:311     report                             44
  cognitive  gen/ir/resolve.py:119      flat_elements                      40
  cognitive  gen/tests/test_ir.py:102   _check_references                  38
  cognitive  gen/press/context.py:145   plate_context                      37
  cognitive  gen/xsd/analyze.py:207     _sccs                              37
  size       gen/xsd/analyze.py:311     report                             152
  size       gen/press/context.py:145   plate_context                      97
  size       gen/plates/build.py:1014   _validate_config_against_ir        90
  size       gen/plates/build.py:572    _value_plate                       89
  size       gen/ir/resolve.py:119      flat_elements                      78

Commit 8ca08e933ebea575fa3be754fb4828e7375c7b30.

@webern
webern merged commit e866c70 into main Nov 9, 2026
9 checks passed
@webern
webern deleted the no-more-knobs branch November 9, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Issues opened by, or through, a coding agent. gen The gen/ directory which is generating code from the spec non-breaking fixes or implementation that do not require breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant