Skip to content

v7.20.0 — Stack Laws: /ss:init Writes the Checks

Latest

Choose a tag to compare

@MartyBonacci MartyBonacci released this 29 Nov 19:05
f973904

SpecSwarm was built to hold a project's stack so that its owner would not have to keep repeating it. The guides /ss:init writes are prose, and nothing reads prose at the moment a mistake is made. Rules that lived in scripts held. Rules that lived in prose faded. This release gives a rule a check.

A stack law is a rule in your own words, plus a check in the repo that fails when the rule is broken.

/ss:init writes the checks. There is a new Step 6.9, and /ss:init --laws runs that step alone. It asks for the rules you keep repeating and records your words exactly. For each one it writes a check, makes the check prove itself on a planted mistake, counts the places that already break the law, and freezes them with your go. It never takes a law from the code: the code holds the pattern you want and the one you are leaving, and the old one usually outnumbers the new. --laws-file <path> supplies the words in a headless run.

A runner that needs no plugin. /ss:init copies .specswarm/laws/run.sh into the repo, so the checks run in CI, in a pre-commit hook, for a teammate, and for an agent that never loaded SpecSwarm. It needs bash, git, grep and awk.

A ledger that may only shrink, and a proof per law. A new violation fails. An old one is tolerated. A fixed one is recorded with tighten, so it cannot come back. Each law keeps a planted mistake that must be flagged and a correct example that must not be. That proof runs before every check, so a law whose pattern stops matching fails loudly instead of passing quietly.

"Is the setup still current?" Session start prints one line when the stack-law setup needs a look: a law without a check, your words changed, a check changed, a dependency that moved a major version, a newer runner in the plugin, a runner edited by hand, or a check that no lint, test or CI step runs. It reads and never writes, and it is silent when the setup is current.

Nothing changes for an existing project until someone runs /ss:init --laws.

Known and not done. The conversational path, where /ss:init asks you for your rules, has had no use outside its author yet. A lint rule that already keeps a ledger of its own should stay in your linter for now. A pattern check sees text, not meaning. See CHANGELOG.md for the full list.