Skip to content

StyleLatch v0.3.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 17:22
· 5 commits to main since this release
1865728

Added

  • A fourth layer, and the first one that reads rather than writes. A style
    may declare machine-checkable assertions in its frontmatter, and a Stop
    hook measures the finished reply against them:

    checks: max_sentence_words=25; forbid=let me know if; no_bullets

    Rules: max_sentence_words, max_reply_lines, max_reply_chars,
    max_paragraphs, forbid, forbid_opening, require, no_headings,
    no_bullets. Modifiers can add checks, and they accumulate.

  • Closed-loop correction. Breaking a check puts one short line in the next
    turn's nudge naming the rule that broke, instead of restating the whole
    style. Naming the specific failure is a stronger signal for fewer tokens.
    Each breach is delivered exactly once, so a host without a Stop hook cannot
    nag forever about one old reply.

  • ::status reports adherence over the recent replies, and what broke.

  • ::test fails on a checks line it cannot parse. A check that is silently
    never enforced is the worst outcome: the style looks measured and is not.

  • The five built-in styles that have mechanically checkable rules now declare
    them, so this works without writing a style first.

  • One-shot latches: ::terse! explain this regex applies the rules to that
    message and latches nothing, so trying a style — or asking for one plain
    answer — no longer costs you the style you actually work in.

  • A bounded record of what was latched and when. ::status shows the last
    five, so "what did I switch away from" is answerable.