← Back to Pull requests

chore(conventions): adopt the necessary comment posture in comment-policy.yaml #468

Merged
kyle-sexton merged 1 files (16 lines) on Nov 28, 2026 20:37 UTC
View on GitHub
kyle-sexton kyle-sexton commented on Nov 28, 2026 20:23 UTC
Author

Refs: #466

Summary

Adds docs/conventions/comment-policy.yaml, the team file the code-tidying comment lint reads
(claude-code-plugins#19747).
It sets the necessary comment posture and turns the lint on at block. This repository is not a
standards sync target, so it gets no comment-policy.org.yaml. Its file therefore carries the
posture, the lint level and the four org allow patterns itself. Once it becomes a sync target, those
six lines are deleted.

No hook change: lefthook.yml already loads the claude-code-plugins remote (ref: main,
configs: [lefthook-remote.yml]).

Fix

Each entry, with its reason. The counts come from ccp_entries.py, run against claude-code-plugins
main at cff15882e9 over this repository's SYNCED paths minus LEFT_OUT
(scripts/lanes/sync-lists.sh), which is what a resync brings in.

| Entry | Category | Reason | Matches |
|---|---|---|---|
| comment_posture: necessary | policy | The rollout's posture. It is set here because no org file supplies it. | n/a |
| comment_lint: block | policy | The rollout's lint level. It is set here for the same reason. | n/a |
| allow '^(#\|//)[[:space:]]test-scope:' | reader | Synced files stay byte-identical to claude-code-plugins (check-sync.sh). Its test-scope tooling reads the marker (.github/scripts/pr-unblock/test-scope.mjs, scripts/check-affected.sh). One entry covers both # and //, where upstream has two; the lines it matches are the same. | 242 comment lines (168 #, 74 //) |
| allow '^(#\|//)[[:space:]]
fixture-isolation-scope:[[:space:]][^[:space:]]' | reader | Same sync rule. Upstream's scripts/check-fixture-git-isolation.sh reads the marker. | 1 (plugins/source-control/scripts/test-helpers.sh:8) |
| allow '^(#\|//)[[:space:]]
(BEGIN\|END) hold-floor[[:space:]]' | reader | Same sync rule. Upstream's scripts/sync-hold-floor.py writes the region and merge-holds.mjs carries it. | 4 (.github/scripts/pr-merge/merge-holds.mjs) |
| allow '^/\[[:space:]]rv-chrome:(begin\|end)[[:space:]]\/$' | reader | Same sync rule. Upstream page-chrome tests read the region. | 6 (blindspot and morning-brief templates) |
| keep_opening plugins//evals//scaffold.sh | owner-keep | Synced eval scaffolds open with the summary a person reads before approving a run, as in claude-code-plugins' own file. | 172 files |
| keep_opening plugins//evals//fixtures//.sh | owner-keep | The fixture helpers those scaffolds run, for the same reason. | 6 files |
| keep_opening plugins/source-control/evals/fixtures/gh-forge/gh, .../git, .../git-remote-evalforge | owner-keep | install.sh copies these extensionless gh-forge stand-ins into the run's bin, so a person approves their opening block before the run. | 1 file each |

The other upstream allow patterns (discriminating-skip-, slow-shape-ok, cant-fail-ok,
api-budget, GENERATED, prereq-ok, EMBED|WAV) and keep_opening globs
(evals/routing/..., skills/
/evals/..., review/evals/revert-cases.sh) match nothing under the
synced paths, so they are omitted. None of upstream's comment_lint_exclude globs matches a synced
path, so the file has no exclude list. The run also found no ADR-pointer comments, which would fail
here because this repository has no docs/adr.

Loosened checks

None. The file has no comment_lint_exclude entry, so the lint skips no file. The two kinds of
entry that pass comments the lint would otherwise judge are limited to these:

  • comment_lint_allow (4 patterns): each passes only its own machine-read marker line, whose

  • bytes come from claude-code-plugins and must stay identical.
  • comment_lint_keep_opening (5 globs): for the matching eval scaffolds, fixture helpers and

  • gh-forge stand-ins, only the opening comment block is passed. Every other comment in those files
    is still judged.

    Verification

  • The file is byte-identical to the planned content (diff against the rollout plan block: no

  • output).
  • It parses as YAML (PyYAML) and validates against claude-code-plugins main's

  • plugins/code-tidying/schemas/comment-policy.schema.json (jsonschema): schema: ok.
  • Every allow pattern is a valid POSIX ERE: grep -E returns 1 (no match) on empty input for each,

  • never 2 (bad pattern). As a positive check, git grep -E matches 227 test-scope lines and 1
    fixture-isolation-scope line in this tree, and 4 hold-floor lines once indentation is stripped.
    rv-chrome has no lines here until the next resync brings upstream's 6.
  • claude-code-plugins main comment-lint.py --posture necessary (pygments 2.21.0), run over all

  • 16 lines as added: exit 0 with no findings. A negative control that drops the URL from line 5 gets
    one finding on that line, which confirms the lint judges this file.
  • git commit ran the pre-commit hooks from the claude-code-plugins lefthook remote, and all passed,

  • including code-tidying-remote-comment-lint.

    Related

  • #466

  • melodic-software/claude-code-plugins#19747:

  • adds comment-policy.yaml support to the code-tidying lint.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01MWmASP958J91ZvYyV6Bh76

    Diff: 16 lines (+16 / -0) across 1 files Reviewer: None requested Review duration: 14m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.37) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 16 lines diff across 1 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.170
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #468"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    kyle-sexton kyle-sexton
    Labels
    risk: low confidence: 44.2% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.9% (MEDIUM) · Higher = larger blast radius
    36.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.2% · Lower = rushed or shallow review
    44.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.6% · Safe to merge
    20.6%