pstack: add model-the-domain principle; true up README#147
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Principle missing from index
- Added Model the Domain to poteto-mode's architecture index so agents can discover and apply its disabled leaf skill.
Or push these changes by commenting:
@cursor push 5879648e6e
Preview (5879648e6e)
diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md
--- a/pstack/skills/poteto-mode/SKILL.md
+++ b/pstack/skills/poteto-mode/SKILL.md
@@ -48,6 +48,7 @@
**Architecture**
+- **Model the Domain** (**principle-model-the-domain**). Writing stateful logic, or code that branches a lot or repeats a shape assumption across files. Encode the domain in a structure instead of scattered conditionals.
- **Boundary Discipline** (**principle-boundary-discipline**). Wiring validation, error handling, or framework adapters. Guards at system boundaries, trust internal types, keep business logic pure.
- **Type System Discipline** (**principle-type-system-discipline**). Designing types or a signature in any typed language. Make illegal states unrepresentable, brand primitives, parse external data at boundaries.
- **Make Operations Idempotent** (**principle-make-operations-idempotent**). Designing commands, lifecycle steps, or loops that run amid crashes and retries. Converge to the same end state.You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 3c70833. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
principle-model-the-domain: encode the domain in a structure (state machine, typed model, lookup table/registry, reducer, module boundary, the right collection — or whatever structure the invariants ask for) instead of scattered conditionals, applied while writing code. Includes the do-not-force guard and the tell (a feature that grows an if/else chain by one more branch). Chosen by a 5-encoding × 2-task × 2-model eval: write-time encodings beat both baseline and a post-hoc review skill, which made agents correctly decline the reshape as scope creep./interrogaterow said "four different models" while the skill's default list is three (now count-agnostic); added a line documenting that/poteto-modeis a sticky mode since pstack: make poteto-mode a sticky mode with a conditional reminder #144. Model slugs were already current (no stale composer-2.5-fast anywhere).Test plan
Note
Low Risk
Documentation and plugin metadata only; no application logic or production data-shape assumptions.
Overview
Adds a new architecture principle skill
principle-model-the-domain, which tells agents to encode stateful or heavily branching domain logic in explicit structures (state machines, typed models, registries, reducers, boundaries, etc.) instead of scattered conditionals, with guidance not to over-abstract and a concrete “tell” when the principle was skipped.The principle is wired into
poteto-mode’s inline Architecture index and the README principles list (count twenty-one; model-the-domain listed under architecture). README also documents/poteto-modeas a sticky mode, softens/interrogatecopy from “four different models” to count-agnostic “several,” and bumpsplugin.jsonto 0.10.4.Reviewed by Cursor Bugbot for commit 8f1beeb. Bugbot is set up for automated code reviews on this repo. Configure here.