More

The rules

A rule is a Markdown file that the agent reads when it plans, writes and reviews. The skills name each rule by its file name.

Why rules ship with the skills

A metric finds a long function. It does not find a design problem, such as a status field that five functions assign. A person finds such a problem in a review, if the person has time. A rule tells the agent what to look for, how to recognise it, and what to write. The same rule applies in a plan, in the code and in a review. When a rule and a metric do not agree, the rule wins.

Where the files are

The files in your repo are yours. You can change each rule, and the skills then use your text.

Simplified Technical English

simplified-technical-english.md

The agent writes all text for people in ASD-STE100: comments, commit messages, pull request text, documents and the pages of the skills. Many readers of a codebase do not have English as a first language, and many read through a translation tool. STE text is clear to them.

Code, commands, error messages and the UI text of a product are not in scope. This guide obeys the rule too.

Why the skills are short

An agent reads the whole skill each time that it runs. Each word that does not change what the agent does costs time and tokens, and it hides the words that do. Each skill thus has a budget: 1500 words for SKILL.md, 1500 for each reference file, and 5000 for the whole skill. A test in the skillsaw repo fails when a skill is over its budget. The skills keep their articles and their full STE grammar: they are short because they say each fact one time, not because they drop words.

State machines

state-machines.md

An implicit state machine is code that has states and permitted changes, but no one place that says which changes are valid. A status field that many functions assign is one. Three booleans where only some combinations are possible is one. Such code permits states that must not exist, and a line-by-line review does not find them.

The rule tells the agent how to recognise the smell and what to do: write the states as an enum, write one definition with each permitted transition, and change the state only with an event. It has a table with one library for each language. It also says when not to make a machine: when the values are independent.

For TypeScript and JavaScript, the full rule is switchyard-state-machines.md, from the Switchyard project.

Enum comparisons

enum-comparisons.md

A comparison with a string literal, such as status == "failed", is an enum that the code does not declare. A wrong letter in the string is not an error. A rename does not find each use. Nothing tells you which values exist. The rule tells the agent to declare the enum and to compare its members.

A rule can be more strict than you think is necessary. In the example review, the status of a design was a TypeScript union, which the compiler checks. The rule made it an Important finding. The agent kept the level, because "the rule wins", and said the real cost in the evidence: the list of values was in two places. You can change the rule in your repo.

Interviews

skillsaw-interviews.md

This rule is the method that each skill uses for its interview. The start page gives the method. The rule also has two procedures that run one time for each repo:

The first real runs changed this rule more than each other file. Each skill page of this guide says what changed.

Config keys

A team can name its own library for a language. The agent reads these keys. The CLI does not read them.

KeyDefaultMeaningWho reads it
rules.libraries.<language>.stateMachineThe table in state-machines.mdThe state machine library of one language.Agent: the rule state-machines.md
rules.libraries.<language>.enumThe table in enum-comparisons.mdThe enum library or feature of one language.Agent: the rule enum-comparisons.md