@rmrdeveloper/sideroom-pi 8.10.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 (37) hide show
  1. package/README.md +63 -28
  2. package/assets/artifacts/GUIDELINES_TEMPLATE.md +3 -3
  3. package/extensions/ask/index.ts +3 -2
  4. package/extensions/done/guard.ts +42 -37
  5. package/extensions/done/index.ts +3 -2
  6. package/extensions/done/model.ts +1 -5
  7. package/extensions/explain/guard.ts +13 -11
  8. package/extensions/explain/model.ts +2 -25
  9. package/extensions/guidelines/review.ts +31 -13
  10. package/extensions/jev/client.ts +27 -2
  11. package/extensions/jev/context.ts +360 -0
  12. package/extensions/jev/guard.ts +116 -34
  13. package/extensions/jev/model.ts +175 -23
  14. package/extensions/jev/workflow.ts +188 -0
  15. package/extensions/persona/catalog.ts +2 -2
  16. package/extensions/persona/execute.ts +4 -6
  17. package/extensions/persona/index.ts +3 -2
  18. package/extensions/persona/model.ts +1 -31
  19. package/extensions/persona/prompt.ts +5 -3
  20. package/extensions/shared/settle.ts +63 -13
  21. package/package.json +1 -1
  22. package/skills/sideroom-architecture/SKILL.md +17 -8
  23. package/skills/sideroom-codebase-design/LICENSE.txt +21 -0
  24. package/skills/sideroom-codebase-design/SKILL.md +151 -0
  25. package/skills/sideroom-codebase-design/references/growth.md +62 -0
  26. package/skills/sideroom-domain-modeling/SKILL.md +1 -1
  27. package/skills/sideroom-domain-scaffold/SKILL.md +6 -4
  28. package/skills/sideroom-grill/SKILL.md +16 -6
  29. package/skills/sideroom-guidelines/SKILL.md +9 -7
  30. package/skills/sideroom-guidelines/references/languages/go.md +3 -3
  31. package/skills/sideroom-guidelines/references/languages/java.md +3 -3
  32. package/skills/sideroom-guidelines/references/languages/javascript.md +25 -3
  33. package/skills/sideroom-guidelines/references/languages/php-laravel.md +3 -3
  34. package/skills/sideroom-guidelines/references/languages/python.md +3 -3
  35. package/skills/sideroom-guidelines/references/languages/rust.md +3 -3
  36. package/skills/sideroom-guidelines/references/languages/typescript.md +27 -3
  37. package/skills/sideroom-persona/SKILL.md +43 -25
@@ -249,7 +249,7 @@ async function createUser(userInput) {
249
249
 
250
250
  ### 12. DRY (real duplication only)
251
251
 
252
- 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.
252
+ 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.
253
253
 
254
254
  ```js
255
255
  // bad — extracted after one use
@@ -264,7 +264,7 @@ function normalizeTicketStatus(status) {
264
264
 
265
265
  ### 13. KISS
266
266
 
267
- RULE: Ship the simplest solution for the current, real requirement. No configurability, hooks, or layers added "just in case."
267
+ 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.
268
268
 
269
269
  ```js
270
270
  // bad
@@ -279,7 +279,7 @@ function formatPrice(value) {
279
279
 
280
280
  ### 14. YAGNI
281
281
 
282
- 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.)
282
+ 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.
283
283
 
284
284
  ```js
285
285
  // bad
@@ -382,3 +382,25 @@ setInterval(checkPaymentStatus, 5_000);
382
382
  **When in doubt:** fail fast, keep it flat, keep it small.
383
383
 
384
384
  **Enforcement note:** rules 1–2 are mechanical and should be backed by a JavaScript formatter/linter. Rules 3–10 are structural checks. Rules 11–19 require review judgment.
385
+
386
+ ## Language-specific conventions
387
+
388
+ ### Destructured function parameters
389
+
390
+ 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.
391
+
392
+ 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.
393
+
394
+ ```js
395
+ // bad
396
+ function createInvoice(order, currency, dueDate) {
397
+ return { items: order.items, total: order.total, currency, dueDate };
398
+ }
399
+
400
+ // good
401
+ function createInvoice({ order, currency, dueDate }) {
402
+ return { items: order.items, total: order.total, currency, dueDate };
403
+ }
404
+
405
+ createInvoice({ order, currency: 'USD', dueDate });
406
+ ```
@@ -153,7 +153,7 @@ function create(ValidatedUser $input): User { $user = $this->normalizer->normali
153
153
 
154
154
  ### 12. DRY (real duplication only)
155
155
 
156
- 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.
156
+ 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.
157
157
 
158
158
  ```php
159
159
  // bad — extracted after one use
@@ -164,7 +164,7 @@ function normalizeTicketStatus(string $status): TicketStatus { return TicketStat
164
164
 
165
165
  ### 13. KISS
166
166
 
167
- RULE: Ship the simplest solution for the current, real requirement. No configurability, hooks, or layers added "just in case."
167
+ 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.
168
168
 
169
169
  ```php
170
170
  // bad
@@ -175,7 +175,7 @@ function formatPrice(float $value): string { return '$'.number_format($value, 2)
175
175
 
176
176
  ### 14. YAGNI
177
177
 
178
- 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.)
178
+ 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.
179
179
 
180
180
  ```php
181
181
  // bad
@@ -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,44 +15,57 @@ 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
 
23
33
  | # | Rule | Do | Don't |
24
34
  | --- | --- | --- | --- |
25
- | 1 | Plain, never in doubt | `Enable the flag to skip cache (enableCache).` | `The registry resolves the provider through the auth resolver pipeline.` |
26
- | 2 | Direct and dry | `The guard blocks the write. Fix the emoji and retry.` | `I'd be happy to help with that! Let's take a look together.` |
35
+ | 1 | Plain, never in doubt | `Your work list stays with this conversation, not in project files.` | `Session-scoped board state persists outside the repository.` |
36
+ | 2 | Direct and dry | `The file was not saved. Remove the symbol and try again.` | `I'd be happy to help with that! Let's take a look together.` |
27
37
  | 3 | No filler | Start with the answer. | `Before we dive in…`, `As I mentioned earlier…`, `To summarize what I just said…` |
28
- | 4 | No invented terms | `the file the mutation adds` | `the artifact delta` (when the user never asked for that name) |
38
+ | 4 | No invented terms | `the file you changed` | `the artifact delta` (when the user never asked for that name) |
29
39
  | 5 | Short prose | Prose for one or two points. | A three-bullet list for a single sentence. |
30
40
  | 6 | User's language | Answer in the language and variant the user wrote in. | A Spanish question answered in English. |
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.
35
- Concretely: name the subject and the goal **before** the detail, use everyday
36
- words instead of concept jargon (`hook`, `pipeline`, `registry`, `resolver`,
37
- `guardrail`, `invariant`) unless the user already used them, define any
38
- necessary term in one line, then stop. Being explicit is not a licence to
39
- repeat yourself, restate the question, or explain the same point twice.
40
-
41
- - Do: `This runs when the session closes. In code: \`session_save\`.`
42
- - Don't: `The lifecycle hook tears down session-scoped resources via the
43
- cleanup path.`
44
- - Do: `The persona reminder is injected on every turn, so it survives
45
- compaction. That is why switching profiles would be pointless here.`
46
- - Don't: `What I'm saying is that the reminder gets injected, and since it's
47
- injected every turn, it survives compaction — which means it comes back after
48
- compaction, so profile switching has no effect.`
44
+ Accuracy and clarity take priority over brevity. Remove filler and repetition
45
+ without removing facts the user needs.
46
+ Say what the user needs to know or do before explaining how. Choose words a
47
+ student can understand without knowing the code. Even if the user uses a
48
+ technical term, do not repeat it unless they need it to understand the answer
49
+ or take the next step. If they do, explain it at first use in one short
50
+ sentence. Keep exact commands, file names, and code names when needed to act;
51
+ explain their purpose in everyday words. Plain words must stay accurate.
52
+ Do not repeat the question or explain the same point twice.
53
+
54
+ - User: `Where is the session-scoped work board?`
55
+ - Do: `Your work list stays with this conversation, not in project files.`
56
+ - Don't: `Session-scoped board state persists outside the repository.`
57
+ - Do: `To get a fresh answer, turn off the cache (stored results).`
58
+ - Don't: `Disable the cache invalidation pipeline.`
59
+ - Do: `The answer is saved with this conversation. You can read it again later.`
60
+ - Don't: `The response is persisted to the session, so the session stores the
61
+ response for future access.`
49
62
 
50
63
  ### Names the user did not ask for
51
64
 
52
- Rule 4 bans coining vocabulary mid-conversation. Do not rename a concept the
53
- user already named, do not invent abbreviations (`the PRF layer`), and do not
54
- use an internal field name as if it were the domain word. Use the user's word
55
- until they ask for another.
65
+ Rule 4 bans coining vocabulary mid-conversation. Do not invent abbreviations
66
+ (`the PRF layer`) or use an internal field name as if it were the domain word.
67
+ Replace a user's unnecessary technical term with everyday words, not another
68
+ new label. Keep exact names only when needed to act.
56
69
 
57
70
  ## Hard prohibitions
58
71
 
@@ -90,3 +103,8 @@ At most three steers are sent per agent run.
90
103
  - Nothing is written to the target repository.
91
104
  - The persona governs wording. It never relaxes the coding guidelines, the
92
105
  added-line rules, or the check-before-finish gate.
106
+
107
+ ## References
108
+
109
+ - [Digital.gov: Avoid jargon](https://digital.gov/guides/plain-language/principles/avoid-jargon): keep only necessary specialist words and explain them.
110
+ - [GOV.UK: Use clear language](https://guidance.publishing.service.gov.uk/writing-to-gov-uk-standards/writing-guidelines/clear-language/): write plainly even for specialists.