@rmrdeveloper/sideroom-pi 5.0.1 → 7.0.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.
- package/README.md +115 -81
- package/{src/assets → assets}/artifacts/GUIDELINES_TEMPLATE.md +40 -11
- package/extensions/ask/execute.ts +56 -0
- package/extensions/ask/index.ts +78 -0
- package/extensions/ask/model.ts +196 -0
- package/extensions/ask/ui.ts +445 -0
- package/extensions/guidelines/index.ts +13 -0
- package/extensions/guidelines/prompt.ts +26 -0
- package/extensions/modified-files/index.ts +45 -0
- package/extensions/modified-files/model.ts +74 -0
- package/extensions/modified-files/session.ts +200 -0
- package/extensions/modified-files/ui.ts +207 -0
- package/extensions/todo/execute.ts +69 -0
- package/extensions/todo/guards.ts +107 -0
- package/extensions/todo/index.ts +91 -0
- package/extensions/todo/model.ts +327 -0
- package/extensions/todo/session.ts +166 -0
- package/extensions/todo/ui.ts +41 -0
- package/package.json +28 -24
- package/skills/sideroom-guidelines/SKILL.md +77 -0
- package/skills/sideroom-guidelines/references/languages/go.md +27 -0
- package/skills/sideroom-guidelines/references/languages/java.md +24 -0
- package/skills/sideroom-guidelines/references/languages/php-laravel.md +26 -0
- package/skills/sideroom-guidelines/references/languages/python.md +21 -0
- package/skills/sideroom-guidelines/references/languages/rust.md +19 -0
- package/skills/sideroom-guidelines/references/languages/typescript.md +30 -0
- package/dist/pi-extension.js +0 -1175
- package/skills/sideroom-critic/SKILL.md +0 -32
- package/skills/sideroom-grilling/SKILL.md +0 -81
- package/skills/sideroom-spec/SKILL.md +0 -38
- package/skills/sideroom-transcribe-audio/SKILL.md +0 -38
- package/skills/sideroom-transcribe-audio/scripts/transcribe.py +0 -40
- package/src/assets/agents/sideroom-code-reviewer.md +0 -30
- package/src/assets/agents/sideroom-fixer.md +0 -37
- package/src/assets/agents/sideroom-implementer.md +0 -39
- package/src/assets/agents/sideroom-planner.md +0 -31
- package/src/assets/agents/sideroom-verifier.md +0 -32
- package/src/assets/artifacts/guidelines/java.md +0 -211
- package/src/assets/artifacts/guidelines/javascript.md +0 -235
- package/src/assets/artifacts/guidelines/php-laravel.md +0 -210
- package/src/assets/artifacts/guidelines/python.md +0 -227
- package/src/assets/artifacts/guidelines/typescript.md +0 -231
package/package.json
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmrdeveloper/sideroom-pi",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A global Pi package
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "A global Pi package with a questionnaire, work board, edited-file view, and coding guidelines for parent agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"skills"
|
|
7
|
+
"extensions",
|
|
8
|
+
"assets",
|
|
9
|
+
"skills",
|
|
10
|
+
"!extensions/**/*.test.ts"
|
|
10
11
|
],
|
|
11
12
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"prepublishOnly": "npm run check && npm run build",
|
|
13
|
+
"prepublishOnly": "npm run check",
|
|
14
14
|
"changeset": "changeset",
|
|
15
15
|
"changeset:status": "changeset status",
|
|
16
16
|
"version-packages": "changeset version",
|
|
17
|
-
"release": "npm run check && changeset publish",
|
|
18
17
|
"commitlint": "commitlint",
|
|
19
18
|
"types": "tsc --noEmit",
|
|
20
|
-
"test": "node --test
|
|
21
|
-
"lint": "biome lint
|
|
22
|
-
"lint:fix": "biome lint --write
|
|
23
|
-
"format": "biome format --write
|
|
24
|
-
"format:check": "biome format
|
|
25
|
-
"check": "
|
|
19
|
+
"test": "node --test 'extensions/**/*.test.ts'",
|
|
20
|
+
"lint": "biome lint extensions scripts commitlint.config.mjs",
|
|
21
|
+
"lint:fix": "biome lint --write extensions scripts commitlint.config.mjs",
|
|
22
|
+
"format": "biome format --write extensions scripts package.json biome.json commitlint.config.mjs .changeset/config.json",
|
|
23
|
+
"format:check": "biome format extensions scripts package.json biome.json commitlint.config.mjs .changeset/config.json",
|
|
24
|
+
"check:if-blocks": "node scripts/check-if-blocks.mjs",
|
|
25
|
+
"check": "npm run types && npm run check:if-blocks && biome check extensions scripts package.json biome.json commitlint.config.mjs .changeset/config.json && npm test"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=22.19.0"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
|
-
"agents",
|
|
32
|
-
"ai",
|
|
33
|
-
"coding-agents",
|
|
34
|
-
"multi-agent",
|
|
35
|
-
"orchestration",
|
|
36
31
|
"pi",
|
|
37
32
|
"pi-package",
|
|
38
|
-
"pi-
|
|
33
|
+
"pi-extension",
|
|
34
|
+
"questionnaire",
|
|
35
|
+
"todo",
|
|
36
|
+
"edited-files",
|
|
37
|
+
"sideroom_ask",
|
|
38
|
+
"sideroom_todo",
|
|
39
|
+
"guidelines",
|
|
39
40
|
"typescript"
|
|
40
41
|
],
|
|
41
42
|
"license": "MIT",
|
|
@@ -48,23 +49,26 @@
|
|
|
48
49
|
},
|
|
49
50
|
"pi": {
|
|
50
51
|
"extensions": [
|
|
51
|
-
"./
|
|
52
|
+
"./extensions"
|
|
52
53
|
],
|
|
53
54
|
"skills": [
|
|
54
55
|
"./skills"
|
|
55
56
|
]
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"@earendil-works/pi-coding-agent": "*"
|
|
59
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
60
|
+
"@earendil-works/pi-tui": "*",
|
|
61
|
+
"typebox": "*"
|
|
59
62
|
},
|
|
60
63
|
"devDependencies": {
|
|
61
|
-
"@earendil-works/pi-coding-agent": "0.84.4",
|
|
62
64
|
"@biomejs/biome": "2.5.11",
|
|
63
65
|
"@changesets/cli": "^3.0.2",
|
|
64
66
|
"@commitlint/cli": "^21.2.2",
|
|
65
67
|
"@commitlint/config-conventional": "^21.2.2",
|
|
68
|
+
"@earendil-works/pi-coding-agent": "0.84.4",
|
|
69
|
+
"@earendil-works/pi-tui": "0.84.4",
|
|
66
70
|
"@types/node": "^22.20.1",
|
|
67
|
-
"
|
|
71
|
+
"typebox": "1.3.7",
|
|
68
72
|
"typescript": "^5.6.0"
|
|
69
73
|
}
|
|
70
74
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sideroom-guidelines
|
|
3
|
+
description: "Trigger: write, edit, coding, Java, Laravel, TypeScript, Python, Go, Rust. Apply Sideroom coding principles before changing code."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: RMRdeveloper
|
|
7
|
+
version: "1.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Sideroom guidelines
|
|
11
|
+
|
|
12
|
+
## Activation Contract
|
|
13
|
+
|
|
14
|
+
Load this skill before `write` or `edit`. Load at most one file from `references/languages/` for the path being changed.
|
|
15
|
+
|
|
16
|
+
## Hard Rules
|
|
17
|
+
|
|
18
|
+
- Follow the Do/Don't table. Language files override syntax and framework idiom only.
|
|
19
|
+
- Do not load language files you are not editing this turn.
|
|
20
|
+
- Fail fast, keep control flow flat, and validate once at the boundary.
|
|
21
|
+
|
|
22
|
+
## Decision Gates
|
|
23
|
+
|
|
24
|
+
| Path | Read |
|
|
25
|
+
|------|------|
|
|
26
|
+
| `.java` | `references/languages/java.md` |
|
|
27
|
+
| `.php` | `references/languages/php-laravel.md` |
|
|
28
|
+
| `.ts` `.tsx` | `references/languages/typescript.md` |
|
|
29
|
+
| `.py` | `references/languages/python.md` |
|
|
30
|
+
| `.go` | `references/languages/go.md` |
|
|
31
|
+
| `.rs` | `references/languages/rust.md` |
|
|
32
|
+
| other | shared table only |
|
|
33
|
+
|
|
34
|
+
## Execution Steps
|
|
35
|
+
|
|
36
|
+
1. Apply the table to the change.
|
|
37
|
+
2. Read the matching language file, if any.
|
|
38
|
+
3. Ship the smallest change that satisfies the current requirement.
|
|
39
|
+
|
|
40
|
+
## Do / Don't
|
|
41
|
+
|
|
42
|
+
| Do | Don't |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| Braces around every `if` body (Python: a full indented suite) | Unbraced or one-line conditional bodies |
|
|
45
|
+
| Early return on bad input | Pyramid `if/else` nesting |
|
|
46
|
+
| Explicit error, fail now | Fallbacks that hide the real failure |
|
|
47
|
+
| One responsibility per unit | Validate + transform + persist + notify together |
|
|
48
|
+
| Extract when duplication repeats | Abstract before a second real use |
|
|
49
|
+
| Simplest solution for the current problem | Layers, hooks, or config "just in case" |
|
|
50
|
+
| Build only what is needed today | Fields or branches for a future case |
|
|
51
|
+
| Compose small focused units | Deep inheritance for unrelated behavior |
|
|
52
|
+
| Talk only to immediate collaborators | Reach through another object's internals |
|
|
53
|
+
| A function either does or returns, not both | Side effects inside a getter |
|
|
54
|
+
| Validate once at the edge | Re-check the same invariant inward |
|
|
55
|
+
| One validator per input | Two validators for the same body/query |
|
|
56
|
+
| Let errors surface with context | Empty `catch` or catch-and-continue |
|
|
57
|
+
| Return new values instead of mutating input | Mutate parameters |
|
|
58
|
+
| One meaning per null/undefined | Overload null for several business states |
|
|
59
|
+
| Inject dependencies | Hardcode infra that blocks tests |
|
|
60
|
+
| Inner layers depend on nothing outward | Domain imports of DB/HTTP/framework types |
|
|
61
|
+
| Names that reveal role or domain meaning | `data`, `info`, `temp`, `result`, `obj` |
|
|
62
|
+
| Named const/enum/contract for domain literals | Magic strings |
|
|
63
|
+
| Depend on ports where variation is real | Couple a use case to a concrete implementation |
|
|
64
|
+
| Comments only for non-obvious intent | Narration, noise, or stale TODOs |
|
|
65
|
+
|
|
66
|
+
## Output Contract
|
|
67
|
+
|
|
68
|
+
Changed code follows the table and the loaded language delta. No extra files, layers, or comments unless the change requires them.
|
|
69
|
+
|
|
70
|
+
## References
|
|
71
|
+
|
|
72
|
+
- `references/languages/java.md`
|
|
73
|
+
- `references/languages/php-laravel.md`
|
|
74
|
+
- `references/languages/typescript.md`
|
|
75
|
+
- `references/languages/python.md`
|
|
76
|
+
- `references/languages/go.md`
|
|
77
|
+
- `references/languages/rust.md`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Go
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Braces on every `if`. Keep `err` checks as flat guard clauses; do not nest the happy path.
|
|
6
|
+
- Return errors with context. Do not `panic` for expected business failure, and do not ignore `err`.
|
|
7
|
+
- Do not mutate slices or maps passed in as input; return a new value.
|
|
8
|
+
|
|
9
|
+
```go
|
|
10
|
+
// Bad
|
|
11
|
+
func loadUser(id string) (*User, error) {
|
|
12
|
+
user, err := repo.Get(id)
|
|
13
|
+
if err == nil {
|
|
14
|
+
return user, nil
|
|
15
|
+
}
|
|
16
|
+
return nil, nil
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Good
|
|
20
|
+
func loadUser(id string) (*User, error) {
|
|
21
|
+
user, err := repo.Get(id)
|
|
22
|
+
if err != nil {
|
|
23
|
+
return nil, fmt.Errorf("load user %s: %w", id, err)
|
|
24
|
+
}
|
|
25
|
+
return user, nil
|
|
26
|
+
}
|
|
27
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Java
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Braces on every `if` / `else`, including one-line guards.
|
|
6
|
+
- Fail fast with a clear exception. Do not hide a missing value behind a silent default.
|
|
7
|
+
- Domain code depends on ports, not `new` of infrastructure types.
|
|
8
|
+
|
|
9
|
+
```java
|
|
10
|
+
// Bad
|
|
11
|
+
public int shippingCost(Order order) {
|
|
12
|
+
Zone zone = zones.getOrDefault(order.zoneId(), Zone.DEFAULT);
|
|
13
|
+
return zone.baseCost();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Good
|
|
17
|
+
public int shippingCost(Order order) {
|
|
18
|
+
Zone zone = zones.get(order.zoneId());
|
|
19
|
+
if (zone == null) {
|
|
20
|
+
throw new IllegalArgumentException("Unknown zoneId: " + order.zoneId());
|
|
21
|
+
}
|
|
22
|
+
return zone.baseCost();
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# PHP / Laravel
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Braces on every `if` / `else`.
|
|
6
|
+
- `FormRequest` (or one equivalent boundary) is the single validator. Services trust that contract and do not re-check the same rules.
|
|
7
|
+
- Keep Eloquent/HTTP types out of domain logic.
|
|
8
|
+
|
|
9
|
+
```php
|
|
10
|
+
// Bad — Service repeats the FormRequest rule
|
|
11
|
+
class ProfileService {
|
|
12
|
+
public function update(array $data) {
|
|
13
|
+
if (empty($data['email'])) {
|
|
14
|
+
throw new \InvalidArgumentException('email required');
|
|
15
|
+
}
|
|
16
|
+
$this->user->update($data);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Good — Service trusts validated input
|
|
21
|
+
class ProfileService {
|
|
22
|
+
public function update(array $validated) {
|
|
23
|
+
$this->user->update($validated);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Use a complete indented suite for every `if` / `else`. Never a one-line conditional body.
|
|
6
|
+
- Treat `None` as "not set" or "explicitly empty" — pick one meaning and keep it. Do not use `None` for a real business state that deserves its own value.
|
|
7
|
+
- Prefer returning new collections over mutating a caller's list or dict.
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
# Bad
|
|
11
|
+
def get_discount(user):
|
|
12
|
+
if user: return 0.2 if user.is_active else 0
|
|
13
|
+
|
|
14
|
+
# Good
|
|
15
|
+
def get_discount(user):
|
|
16
|
+
if user is None:
|
|
17
|
+
return 0
|
|
18
|
+
if not user.is_active:
|
|
19
|
+
return 0
|
|
20
|
+
return 0.2
|
|
21
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Prefer `Result` and `?`. Do not `.unwrap()` / `.expect()` in library or production paths.
|
|
6
|
+
- Let errors surface with context (`map_err`, `anyhow`, or an equivalent). Do not swallow with `let _ =`.
|
|
7
|
+
- Do not mutate the caller's value when returning a new one is enough.
|
|
8
|
+
|
|
9
|
+
```rust
|
|
10
|
+
// Bad
|
|
11
|
+
fn load_user(id: &str) -> User {
|
|
12
|
+
repo.get(id).unwrap()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Good
|
|
16
|
+
fn load_user(id: &str) -> Result<User, LoadUserError> {
|
|
17
|
+
repo.get(id).map_err(|err| LoadUserError::from_repo(id, err))
|
|
18
|
+
}
|
|
19
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# TypeScript
|
|
2
|
+
|
|
3
|
+
Delta only. Keep the shared table.
|
|
4
|
+
|
|
5
|
+
- Braces on every `if` / `else`, including one-line guards.
|
|
6
|
+
- Pick one meaning for `undefined` vs `null` and keep it. Do not use either as a stand-in for a named business state.
|
|
7
|
+
- Name domain literals once (`const` / enum / const object). Do not scatter magic strings.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Bad
|
|
11
|
+
function getDiscount(user?: { plan?: { discount: number } }) {
|
|
12
|
+
if (!user) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (!user.plan) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (user.plan.discount === 0) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Good
|
|
24
|
+
function getDiscount(user: { plan?: { discount: number } } | undefined): number {
|
|
25
|
+
if (user === undefined || user.plan === undefined) {
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
return user.plan.discount;
|
|
29
|
+
}
|
|
30
|
+
```
|