I've been thinking about this some more, and l like the idea of basing orthographic rules on a Plover dictionary. That means that you do not have to change the code for adding new briefs; all that changes in the plugin is the way the dictionary is searched and how the output string is composed before it is sent to be converted into key codes.
In any orthographic system you have various sections of the keyboard that are semi - independent, each contributing a portion of the output. Steno order is a list of section names and the keys that are present in each section. If a dictionary entry contains no section names, then it is created, searched and output like any normal Plover dictionary entry. Only if none of these match are the entries with section names searched. Thus, it is always possible to make a brief using standard Plover practice.
If a dictionary entry starts with a section name then it defines what the output will be for that section - provided there is a match. The final output for the stroke is the output from all the sections, concatenated in steno order. The default output for a section which has no keys in the stroke is an empty string. Thus, Jackdaw implemented through a dictionary would have entries like:
":ONSET CTWH": "b",
":VOWEL O": "o",
":CODA GC": "b" etc.
And the stroke CTWHOGC would produce 'bob'.
So far, so unnecessary. However, consider the EY rule that I failed to get right last time:
"The E is operated by the right little finger, and the Y by the third finger. They append those letters to the coda, E preceding Y if both are present together with at least one right hand consonant, as in HONEY. Otherwise E follows Y as in EYE or RYE"
It's obvious that the E and Y keys should be in a different section to the rest of the coda. Here we have two conflicting rules for the same keys. The more restrictive one must be tested first, then the looser one can catch what it rejects. In this dictionary, the most recent definition always takes precedence.
The looser definition first:
":END EY": "ey"
Now for the tighter one. We need to check that there are no keys in the coda, so we do that by adding the section name to the definition, with no keys following it:
":END EY :CODA": "ye"
That's the rule in two definitions. In a similar way you could check whether particular keys are present in a different section by including them after the section name. You could have variation of syntax for anything from "all of these keys and no others" to "at least one of these keys", but so far I haven't found the need for that.
The Q rule: TNR for Q always adds a U, if followed by a vowel in the same stroke.
is simply
":ONSET TNR": "qu",
":ONSET TNR :VOWEL": "q"
On any orthographic system we need a way to indicate word boundaries. With a conventional keyboard the simplest thing is to use the space bar as normal, including it on almost every stroke.
A normal definition for the space on its own "_": " "
And included in a stroke ":BREAK _": " "
The same trick can be used for other keys which may be optionally included in a stroke whenever you have a free finger. Good candidates are initial capitalisation, ',' and '.' , and the four commonest suffixes.
The alternative way to mark word boundaries is a key that is included if only if you want to combine strokes. Including it in the leading part of a word:
":BREAK": " " ( append a space if it is not pressed)
":BREAK _": "" ( do nothing if it is)
Now we can define the Y rule:
If Y follows a right hand consonant and is followed by another stroke for a continuation of the word, then it changes to an I. Thus, BUSINESS is stroked as BUSY|NESS. but the Y in PAY|MENT does not change.
The common case ":END Y": "y"
The common continuation ":END Y :BREAK _": "i" (or :BREAK for the space bar version)
The exception ":END Y :BREAK _ :CODA": " "y"