Compass Method Feature
Table of Contents
1. When to use this skill
Behaviour that does not exist yet, or behaviour that must change. Use it from the request to the merged change.
Not this method when the behaviour exists and is wrong: that is
compass-method-bug-fix. Not when the question is which of two designs to
choose and the answer is observable: settle that with
compass-method-prototype first, then come back.
2. How to use this skill
Copy the phases into the todo list before reasoning about the task. A
phase you skip stays in the list with skip: and the reason.
2.1. 1. Ground
Resolve every domain concept the request names to a knowledge document (Grounding), reading the cluster's structure note first where one exists. A feature built on a misunderstood concept is not a feature with a bug in it; it is the wrong feature, and no amount of later verification finds that.
2.2. 2. State the predicate
What will be true when this is done, in terms someone else can check? Write it before designing. Where behaviour is involved, the predicate belongs in a specification rather than only in prose, so it can be checked rather than remembered.
2.3. 3. Name the data shape
Before any control flow, name what is being represented and how it is
held (principle-model-the-domain). Most of the difficulty in a feature
is in this decision, and it is the cheapest thing to change now and the
most expensive later.
In C++, take the type decisions with
compass-principle-type-system-discipline: illegal states unrepresentable,
semantic primitives branded, external input parsed at the boundary.
Where the shape belongs to an entity, it is generated rather than written: the model is the source and the code follows from it.
2.4. 4. Check what already exists
Search before writing (principle-subtract-before-you-add). The most
common waste is re-implementing something a few files over, and the second
most common is adding a parallel mechanism beside one that nearly fits.
Ask also what comes out. A feature that only adds has usually not been thought about long enough.
2.5. 5. Build
The smallest thing that satisfies the predicate
(principle-laziness-protocol). No interface with one implementation, no
configuration for a value that never varies, no scaffolding for a second
case that has not arrived.
Where the work is repetitive across many files, write the script rather
than doing it by hand (principle-build-the-lever): the script is what a
reviewer re-runs, and the next change of the same shape is then cheap.
Sequence it so each step ends in something checkable
(principle-sequence-verifiable-units), rather than one commit that works
only when finished.
2.6. 6. Prove
Against the predicate from phase 2, on the real artefact rather than a
proxy (principle-prove-it-works). Climb the
verification ladder as far as
what changed requires, via
compass-code-run-build and,
for anything a user touches,
compass-code-run-feature-test.
"It compiles" is not evidence. Neither is a unit test that asserts the implementation back to itself.
2.7. 7. Land
Close the bookkeeping with compass-agile-close-task, then raise with compass-pr-raise. What generalises beyond this task goes to a memory, a principle or a check rather than staying in the diff.
3. When this method is the wrong one
Re-match if grounding shows the capability already exists in another form, which makes this a refactor or a documentation gap; or if the request cannot be reduced to a checkable predicate, which usually means the requirement is still a wish and belongs in deliberation first.
4. Recipes
- How do I work a task? — the lifecycle this method runs inside.
- How do I build the system? — the build phase 6 runs.
5. Reference
- Methods and the mode — what a method is, and how a phase binds to actions.
- Principles — the rules cited above.
- Generated artefacts — why phase 3 prefers the model to the file.