@rmrdeveloper/sideroom-pi 8.11.0 → 8.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +33 -5
  2. package/assets/artifacts/GUIDELINES_TEMPLATE.md +3 -3
  3. package/extensions/done/guard.ts +42 -37
  4. package/extensions/done/index.ts +3 -2
  5. package/extensions/done/model.ts +1 -5
  6. package/extensions/explain/guard.ts +13 -11
  7. package/extensions/explain/model.ts +2 -25
  8. package/extensions/guidelines/review.ts +31 -13
  9. package/extensions/jev/client.ts +22 -1
  10. package/extensions/jev/context.ts +36 -3
  11. package/extensions/jev/guard.ts +113 -34
  12. package/extensions/jev/model.ts +90 -12
  13. package/extensions/jev/workflow.ts +188 -0
  14. package/extensions/persona/execute.ts +4 -6
  15. package/extensions/persona/index.ts +3 -2
  16. package/extensions/persona/model.ts +1 -31
  17. package/extensions/persona/prompt.ts +3 -1
  18. package/extensions/shared/settle.ts +63 -13
  19. package/package.json +1 -1
  20. package/skills/sideroom-architecture/SKILL.md +5 -3
  21. package/skills/sideroom-codebase-design/LICENSE.txt +21 -0
  22. package/skills/sideroom-codebase-design/SKILL.md +151 -0
  23. package/skills/sideroom-codebase-design/references/growth.md +62 -0
  24. package/skills/sideroom-domain-modeling/SKILL.md +1 -1
  25. package/skills/sideroom-domain-scaffold/SKILL.md +6 -4
  26. package/skills/sideroom-grill/SKILL.md +6 -4
  27. package/skills/sideroom-guidelines/SKILL.md +9 -7
  28. package/skills/sideroom-guidelines/references/languages/go.md +3 -3
  29. package/skills/sideroom-guidelines/references/languages/java.md +3 -3
  30. package/skills/sideroom-guidelines/references/languages/javascript.md +25 -3
  31. package/skills/sideroom-guidelines/references/languages/php-laravel.md +3 -3
  32. package/skills/sideroom-guidelines/references/languages/python.md +3 -3
  33. package/skills/sideroom-guidelines/references/languages/rust.md +3 -3
  34. package/skills/sideroom-guidelines/references/languages/typescript.md +27 -3
  35. package/skills/sideroom-persona/SKILL.md +15 -4
@@ -205,7 +205,7 @@ def create_user(validated_payload, repository):
205
205
 
206
206
  ### 12. DRY (real duplication only)
207
207
 
208
- RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract on the first or second occurrence, and do not extract look-alike code that belongs to different concepts (a user's email validation vs a vendor's) — they will diverge.
208
+ RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract solely to anticipate reuse on the first or second occurrence, and do not extract look-alike code that belongs to different concepts (a user's email validation vs a vendor's) — they will diverge. Extraction for a present responsibility, clear contract, or testability is valid even with one caller.
209
209
 
210
210
  ```python
211
211
  # bad — extracted after one real use
@@ -218,7 +218,7 @@ def normalize_ticket_status(status):
218
218
 
219
219
  ### 13. KISS
220
220
 
221
- RULE: Ship the simplest solution for the current, real requirement. No configurability, hooks, or layers added "just in case."
221
+ RULE: Choose the simplest design that fully satisfies the current requirements and preserves required behavior. Avoid configurability, hooks, or layers without a demonstrated need; do not remove necessary structure just to reduce code size.
222
222
 
223
223
  ```python
224
224
  # bad
@@ -231,7 +231,7 @@ def format_price(value):
231
231
 
232
232
  ### 14. YAGNI
233
233
 
234
- RULE: Don't add fields, params, or branches for a use case that hasn't arrived. (Differs from KISS: KISS simplifies the chosen solution; YAGNI stops you building the unrequested one.)
234
+ RULE: Avoid capabilities for hypothetical future use cases without evidence. User requirements, established project contracts, required error handling, compatibility, and meaningful tests are current needs, not speculation. Never use YAGNI to omit them or remove existing supported behavior. Apply it to the proposed change, not as a reason to refactor unrelated code.
235
235
 
236
236
  ```python
237
237
  # bad
@@ -155,7 +155,7 @@ fn create(input: ValidatedInput, repo: &impl Repo) -> Result<User> { let user =
155
155
 
156
156
  ### 12. DRY (real duplication only)
157
157
 
158
- RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract on the first or second occurrence, or extract look-alike code from different concepts.
158
+ RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract solely to anticipate reuse on the first or second occurrence, or extract look-alike code from different concepts. Extraction for a present responsibility, clear contract, or testability is valid even with one caller.
159
159
 
160
160
  ```rust
161
161
  // bad — extracted after one use
@@ -166,7 +166,7 @@ fn normalize_ticket_status(status: &str) -> Result<TicketStatus> { status.trim()
166
166
 
167
167
  ### 13. KISS
168
168
 
169
- RULE: Ship the simplest solution for the current, real requirement. No configurability, hooks, or layers added "just in case."
169
+ RULE: Choose the simplest design that fully satisfies the current requirements and preserves required behavior. Avoid configurability, hooks, or layers without a demonstrated need; do not remove necessary structure just to reduce code size.
170
170
 
171
171
  ```rust
172
172
  // bad
@@ -177,7 +177,7 @@ fn format_price(value: f64) -> String { format!("${value:.2}") }
177
177
 
178
178
  ### 14. YAGNI
179
179
 
180
- RULE: Don't add fields, params, or branches for a use case that hasn't arrived. (KISS simplifies the chosen solution; YAGNI stops you building the unrequested one.)
180
+ RULE: Avoid capabilities for hypothetical future use cases without evidence. User requirements, established project contracts, required error handling, compatibility, and meaningful tests are current needs, not speculation. Never use YAGNI to omit them or remove existing supported behavior. Apply it to the proposed change, not as a reason to refactor unrelated code.
181
181
 
182
182
  ```rust
183
183
  // bad
@@ -154,7 +154,7 @@ async function create(input: ValidatedUser): Promise<User> { const user = normal
154
154
 
155
155
  ### 12. DRY (real duplication only)
156
156
 
157
- RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract on the first or second occurrence, or extract look-alike code from different concepts.
157
+ RULE: Extract when at least 2 of 3 hold: (a) the logic appears 3+ times, (b) a future rule change would need to touch all occurrences at once, (c) the copies represent the same domain concept. Do not extract solely to anticipate reuse on the first or second occurrence, or extract look-alike code from different concepts. Extraction for a present responsibility, clear contract, or testability is valid even with one caller.
158
158
 
159
159
  ```ts
160
160
  // bad — extracted after one use
@@ -165,7 +165,7 @@ const normalizeTicketStatus = (status: string): TicketStatus => parseTicketStatu
165
165
 
166
166
  ### 13. KISS
167
167
 
168
- RULE: Ship the simplest solution for the current, real requirement. No configurability, hooks, or layers added "just in case."
168
+ RULE: Choose the simplest design that fully satisfies the current requirements and preserves required behavior. Avoid configurability, hooks, or layers without a demonstrated need; do not remove necessary structure just to reduce code size.
169
169
 
170
170
  ```ts
171
171
  // bad
@@ -176,7 +176,7 @@ function formatPrice(value: number): string { return `$${value.toFixed(2)}`; }
176
176
 
177
177
  ### 14. YAGNI
178
178
 
179
- RULE: Don't add fields, params, or branches for a use case that hasn't arrived. (KISS simplifies the chosen solution; YAGNI stops you building the unrequested one.)
179
+ RULE: Avoid capabilities for hypothetical future use cases without evidence. User requirements, established project contracts, required error handling, compatibility, and meaningful tests are current needs, not speculation. Never use YAGNI to omit them or remove existing supported behavior. Apply it to the proposed change, not as a reason to refactor unrelated code.
180
180
 
181
181
  ```ts
182
182
  // bad
@@ -247,3 +247,27 @@ setInterval(checkPaymentStatus, 5_000);
247
247
  **When in doubt:** fail fast, keep it flat, keep it small.
248
248
 
249
249
  **Enforcement note:** rules 1–2 are mechanical and should be backed by TypeScript formatting or linting. Rules 3–10 are structural checks. Rules 11–19 require review judgment.
250
+
251
+ ## Language-specific conventions
252
+
253
+ ### Destructured function parameters
254
+
255
+ When a function would take 3 or more parameters, accept one object and destructure its named properties in the parameter list. Count optional and defaulted parameters toward the threshold. Functions with 1 or 2 parameters may keep positional parameters. In TypeScript, type the object with a named type or interface.
256
+
257
+ Keep signatures imposed by external APIs, framework callbacks, overrides, or public compatibility contracts; use a destructured internal helper when it makes the implementation clearer. When changing a signature you own, update its callers together. Do not rewrite unrelated functions only to satisfy this convention.
258
+
259
+ ```ts
260
+ // bad
261
+ function createInvoice(order: Order, currency: string, dueDate: Date): Invoice {
262
+ return { items: order.items, total: order.total, currency, dueDate };
263
+ }
264
+
265
+ // good
266
+ type InvoiceInput = { order: Order; currency: string; dueDate: Date };
267
+
268
+ function createInvoice({ order, currency, dueDate }: InvoiceInput): Invoice {
269
+ return { items: order.items, total: order.total, currency, dueDate };
270
+ }
271
+
272
+ createInvoice({ order, currency: 'USD', dueDate });
273
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sideroom-persona
3
- description: "Apply Sideroom's single built-in persona: the voice rules and hard prohibitions every user-facing answer must follow. Load it when an explanation, summary, or report needs the full guide. Do not use for code-only mutations that need no prose."
3
+ description: "Write and revise user-facing prose in Sideroom's direct, plain voice. Load the complete guide before the first substantial explanation, findings report, implementation summary, or user-facing documentation, and when the user requests clearer, shorter, or less technical wording. Apply it to progress messages and final answers. Brief acknowledgments can use the always-on reminder; reuse the guide while it remains in context."
4
4
  license: MIT
5
5
  metadata:
6
6
  author: RMRdeveloper
@@ -15,8 +15,18 @@ the complete guide.
15
15
 
16
16
  ## Activation Contract
17
17
 
18
- Read this whole file with `read`, without `offset` or `limit`, when an answer
19
- needs the full persona instead of the injected reminder.
18
+ Before the first substantial explanation, findings report, implementation
19
+ summary, or user-facing documentation, load this complete guide through
20
+ `sideroom_persona` or read this whole file without `offset` or `limit`. Also
21
+ load it when the user asks for clearer, shorter, or less technical wording.
22
+ Reuse it while it remains in context; reload it after compaction if the guide
23
+ is no longer available. Brief acknowledgments use the always-on reminder.
24
+
25
+ Apply the voice to progress messages and final answers. Before sending prose,
26
+ check that the answer starts with the outcome, explains only necessary
27
+ technical terms, and avoids repetition, invented labels, and filler. Keep
28
+ evidence, exact commands, uncertainty, and requested detail when needed;
29
+ plain language must not remove facts.
20
30
 
21
31
  ## Voice rules
22
32
 
@@ -31,7 +41,8 @@ needs the full persona instead of the injected reminder.
31
41
 
32
42
  ### Plain means everyday words, not more words
33
43
 
34
- Rule 1 outranks brevity for clarity, and rule 3 outranks rule 1 for length.
44
+ Accuracy and clarity take priority over brevity. Remove filler and repetition
45
+ without removing facts the user needs.
35
46
  Say what the user needs to know or do before explaining how. Choose words a
36
47
  student can understand without knowing the code. Even if the user uses a
37
48
  technical term, do not repeat it unless they need it to understand the answer