@juancr11/sibu 0.11.0 → 0.11.1
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/package.json
CHANGED
package/templates/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"templateVersion": "
|
|
2
|
+
"templateVersion": "91",
|
|
3
3
|
"templates": {
|
|
4
4
|
"AGENTS.md": {
|
|
5
5
|
"version": "28",
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
124
|
"skills/react/SKILL.md": {
|
|
125
|
-
"version": "
|
|
125
|
+
"version": "2",
|
|
126
126
|
"description": "Selectable React skill for component design, props, state ownership, and presentational boundaries.",
|
|
127
127
|
"changes": [
|
|
128
|
-
"
|
|
128
|
+
"Strengthens React component guidance around Single Responsibility Principle splits, stateless versus stateful boundaries, and one component per file by default."
|
|
129
129
|
]
|
|
130
130
|
},
|
|
131
131
|
"skills/scrum-master-planner/SKILL.md": {
|
|
@@ -21,15 +21,17 @@ This skill covers React componentization, component responsibility, state owners
|
|
|
21
21
|
|
|
22
22
|
### 1. Treat components like focused functions
|
|
23
23
|
- A component should have one clear reason to exist.
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
24
|
+
- Apply the Single Responsibility Principle aggressively: split components whenever rendering, state ownership, event handling, data access, layout, formatting, or low-level UI concerns start to blur together.
|
|
25
|
+
- Create as many components as needed to keep each component easy to name, test, scan, and change independently.
|
|
26
|
+
- Prefer small components with clear names and explicit responsibilities over broad components with internal sections.
|
|
27
|
+
- Do not preserve a large component just to avoid adding files; a few extra focused components are better than one file that hides multiple responsibilities.
|
|
28
|
+
|
|
29
|
+
### 2. Separate stateless, stateful, and data-owning components
|
|
30
|
+
- Stateless presentational components should render UI from props and avoid owning state or side effects.
|
|
31
|
+
- Stateful interaction components may own local UI state when that state belongs only to their focused responsibility.
|
|
32
|
+
- Data-owning components may fetch, subscribe, mutate, or coordinate server data.
|
|
33
|
+
- Keep stateless, stateful, and server-interacting responsibilities visibly separate; split components when those roles mix.
|
|
34
|
+
- Avoid hiding state transitions, server interactions, or mutations deep inside components that look presentational.
|
|
33
35
|
|
|
34
36
|
### 3. Keep props narrow and explicit
|
|
35
37
|
- Pass only what the child component needs.
|
|
@@ -63,13 +65,18 @@ This skill covers React componentization, component responsibility, state owners
|
|
|
63
65
|
- Name components by what they represent in the UI or product.
|
|
64
66
|
- Keep server-interacting, stateful, and presentational responsibilities easy to identify from the component shape.
|
|
65
67
|
- Avoid mixing data fetching, mutation, layout, formatting, and low-level UI rendering in one component.
|
|
68
|
+
- Each component should live in its own file by default; do not define multiple components in the same file just because they are currently small.
|
|
69
|
+
- If a helper component is only temporary, promote it to its own file as soon as it represents a meaningful UI responsibility.
|
|
66
70
|
|
|
67
71
|
## Decision rule
|
|
68
72
|
|
|
69
73
|
When unsure, prefer:
|
|
70
74
|
1. one clear responsibility per component
|
|
71
|
-
2.
|
|
72
|
-
3.
|
|
73
|
-
4.
|
|
74
|
-
5.
|
|
75
|
-
6.
|
|
75
|
+
2. more focused components instead of fewer overloaded components
|
|
76
|
+
3. one component per file by default
|
|
77
|
+
4. stateless presentational components that render from props
|
|
78
|
+
5. stateful components only where local interaction state is genuinely owned
|
|
79
|
+
6. data/server interaction in obvious owner components
|
|
80
|
+
7. local state unless coordination requires lifting it
|
|
81
|
+
8. composition over flag-heavy component APIs
|
|
82
|
+
9. no duplicated derived state
|