agentleFS
89jobrien89jobrien/godmode/skills/crs-propose-rules/SKILL.md

godmode:crs-propose-rules

Skill1 starsChanged 57 days agoMITView on GitHub

Draft course-correct rule stubs (pattern, message, exceptions) from the candidates crs-discover produced. LLM-assisted step of the coursers-rules pipeline — writes .ctx/coursers/crs-proposed-rules.json for crs-validate.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After crs-discover has written .ctx/coursers/crs-candidates.json

    line 19
  2. Very specific:

    Read .ctx/coursers/crs-candidates.json.

    line 24
  3. Very specific:

    Add exceptions for pipeline use (\\|\\s*<cmd>) and for nu -c wrapped commands (nu\\s+-c\\b) when the command is fine in those contexts — …

    line 48
  4. Very specific:

    Test each pattern before writing it out: echo "<sample>" | crs probe against a temp rules file, or at minimum verify the regex compiles.

    line 51
  5. Very specific:

    Write {"rules": [...]} to .ctx/coursers/crs-proposed-rules.json.

    line 53
  6. Very specific:

    Never edit ~/.config/coursers/course-correct-rules.json in this step — installation is crs-install's job, after validation.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

crs-propose-rules

Turn discovered unhandled commands into concrete course-correct rule proposals. This is the judgment step: not every frequent command deserves a blocking rule.

When to Use

  • After crs-discover has written .ctx/coursers/crs-candidates.json
  • Asked to "propose rules for these commands" or "draft blocking rules"

Steps

  1. Read .ctx/coursers/crs-candidates.json. If empty, write an empty rules array to the output path and stop.
  2. For each candidate, decide whether a rule is warranted. Propose a rule only when a dedicated tool or cheaper alternative exists (the same logic behind no-grep/no-cat: Grep tool over grep, Read tool over cat/sed -n). Skip candidates that are legitimate commands with no better alternative.
  3. For each accepted candidate, draft a rule object matching the live config's schema (~/.config/coursers/course-correct-rules.json):

    {
      "id": "no-<cmd>-use-<alternative>",
      "enabled": true,
      "pattern": "\\b<cmd>\\b",
      "pattern_flags": "",
      "target_commands": ["<cmd>"],
      "exceptions": [],
      "exception_policy": "allow_if_any_match",
      "message": "Use <alternative> instead. Example: <concrete example>."
    }
  4. Author patterns defensively:
    • Anchor with \b word boundaries; never bare substrings.
    • Add exceptions for pipeline use (\\|\\s*<cmd>) and for nu -c wrapped commands (nu\\s+-c\\b) when the command is fine in those contexts — mirror the exception style of the existing no-grep rule.
    • Test each pattern before writing it out: echo "<sample>" | crs probe against a temp rules file, or at minimum verify the regex compiles.
  5. Write {"rules": [...]} to .ctx/coursers/crs-proposed-rules.json.
  6. Report each proposed rule id with a one-line rationale, and list the candidates you deliberately skipped with why.

Contract

  • Input: .ctx/coursers/crs-candidates.json
  • Output: .ctx/coursers/crs-proposed-rules.json — object with a rules array in the live config schema. crs-validate merges this file; a malformed rule here fails the pipeline there, which is the intended safety net.
  • Never edit ~/.config/coursers/course-correct-rules.json in this step — installation is crs-install's job, after validation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.