Check the text of a rule against each case that it covers before you propose it

Open
#70 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
56/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
markdown, shell

Research direction

Read docs/doc-rules.md, CONTRIBUTING.md, and .agents/skills/review-pr/SKILL.md, then review PR #67 and issue #38 for the examples and existing validation guidance. Decide where the rule belongs and define how to limit the cases it covers; clarify whether review-pr should request a table. Done means the rule explains how to compare literal-text and intended verdicts on current cases, with its relationship to #34 addressed.

Written by the indexing model from the issue text.

Description

type/documentation
Kind

Missing

Location
  • docs/doc-rules.md: no rule says how to check the text of a rule before somebody proposes it. Candidate places: Writing style, or When to write.
  • CONTRIBUTING.md Pull requests, the Validations line.
  • .agents/skills/review-pr/SKILL.md step 3 of its checks, if review checks it.
Version

4804c6b

Problem

No rule asks a writer to apply the literal text of a proposed rule to the cases that it covers. A writer then checks a rule with a proxy, or with the cases that come to mind, and a review finds each missed case one at a time.

This happened in PR #67, for the rule of #51 about commands in skills:

  • 5344446 gave the rule "Put commands that run in a fixed order, with no judgment between them, into a script". A review found that it does not say if a pipeline is one command, with two pipelines in current skills as cases.
  • 77a113e replaced it. Its Validations said that only two steps break the rule. The writer counted the lines of each code block and did not read the steps. A review found a third step, trace-decision line 68.
  • The Cost: line of 77a113e said that steps 3 and 4 of trace-decision break the rule. By its literal text they follow it, because each runs one command. Nobody had compared the two verdicts.
  • One more case, step 1 of review-pr, broke the literal text and followed the intent. A design review then found the cause: each version decided its scope by the form of a step. 8333238 replaced the rule.
  • Before 8333238 was written, a table of each step that reacts to the result of a command found one more counterexample, trace-decision line 36, at no review cost. The Validations of PR #67 show the table.

It also happened in #38. The stop rule of its first comment was wrong, and the fourth comment found it with test cases: https://github.com/c-w-z/commit-decision-record/issues/38#issuecomment-7256531076

Evidence
Proposal

Add a rule to docs/doc-rules.md. Example text:

Before you propose or change a rule, apply its literal text to each current case that it covers. For each case, give the verdict of the text and the verdict that you want. A difference means that the text is wrong. Put the table in the Validations of the PR.

One table finds both kinds of problem in the evidence: a missed case, and a criterion that does not match the intent.

Rejected:

  • A skill for this check. Where to write gives skills the procedures with fixed steps that fail silently. This check is one step, and AI assistants already read docs/doc-rules.md when they write a doc.
  • Run review-design earlier, for example after two reviews of one rule. It finds the problem later, and it does not prevent it.

Decisions for the maintainer:

  • The place: Writing style, When to write, or Where to write.
  • How to limit "each current case" when a rule covers many cases, for example a rule for commit messages that applies to every commit.
  • Whether review-pr asks for the table in a PR that adds or changes a rule. Its step 3 already checks Writing style in docs/doc-rules.md, so a rule there is checked with no change to the skill.
  • How the table relates to #34, which makes Validations shorter. The table is not a CI result, so #34 does not exclude it.
Dominant language
Shell
Stars
1
Forks
0
Avg merge
6h 59m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c-w-z/commit-decision-record

All issues in c-w-z/commit-decision-record

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.