@juancr11/sibu 0.12.3 → 0.13.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.
|
@@ -147,7 +147,7 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
|
|
|
147
147
|
{
|
|
148
148
|
id: 'ddd-hexagonal',
|
|
149
149
|
name: 'DDD + Hexagonal Architecture',
|
|
150
|
-
description: '
|
|
150
|
+
description: 'Choose for complex back-end domains that need DDD, ports/adapters, and strict inward dependencies',
|
|
151
151
|
routingInstruction: 'For backend features, refactors, bug fixes, persistence, external integrations, application/service boundaries, domain modeling, or architectural tradeoffs, use `ddd-hexagonal`.',
|
|
152
152
|
templateRelativePath: 'skills/architecture/ddd-hexagonal/SKILL.md',
|
|
153
153
|
targetRelativePathsByAgent: {
|
|
@@ -160,7 +160,7 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
|
|
|
160
160
|
{
|
|
161
161
|
id: 'command-pattern',
|
|
162
162
|
name: 'Command Pattern',
|
|
163
|
-
description: '
|
|
163
|
+
description: 'Choose for workflow-heavy apps that need executable operations structured as commands and handlers',
|
|
164
164
|
routingInstruction: 'For work that structures actions, workflows, command handlers, operation dispatch, request processing, or executable tasks, use `command-pattern`.',
|
|
165
165
|
templateRelativePath: 'skills/architecture/command-pattern/SKILL.md',
|
|
166
166
|
targetRelativePathsByAgent: {
|
|
@@ -170,6 +170,19 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
|
|
|
170
170
|
windsurf: '.agents/skills/command-pattern/SKILL.md',
|
|
171
171
|
},
|
|
172
172
|
},
|
|
173
|
+
{
|
|
174
|
+
id: 'layered-architecture',
|
|
175
|
+
name: 'Layered Architecture',
|
|
176
|
+
description: 'Choose for smaller apps that need lightweight separation with controllers, services, models, and repositories',
|
|
177
|
+
routingInstruction: 'For smaller apps that need lightweight separation of concerns with controllers, services, models, and repositories, use `layered-architecture`.',
|
|
178
|
+
templateRelativePath: 'skills/architecture/layered-architecture/SKILL.md',
|
|
179
|
+
targetRelativePathsByAgent: {
|
|
180
|
+
codex: '.agents/skills/layered-architecture/SKILL.md',
|
|
181
|
+
gemini: '.agents/skills/layered-architecture/SKILL.md',
|
|
182
|
+
claude: '.agents/skills/layered-architecture/SKILL.md',
|
|
183
|
+
windsurf: '.agents/skills/layered-architecture/SKILL.md',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
173
186
|
];
|
|
174
187
|
export const SELECTABLE_WORKFLOW_SKILLS = [
|
|
175
188
|
{
|
package/package.json
CHANGED
package/templates/manifest.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"templateVersion": "
|
|
2
|
+
"templateVersion": "96",
|
|
3
3
|
"templates": {
|
|
4
4
|
"AGENTS.md": {
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "29",
|
|
6
6
|
"description": "Project-level agent instructions and Sibu maintenance guidance.",
|
|
7
7
|
"changes": [
|
|
8
|
-
"
|
|
8
|
+
"Can render Layered Architecture routing when that architecture option is selected."
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
".codex/config.toml": {
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
"skills/deep-module-map-writer/SKILL.md": {
|
|
61
|
-
"version": "
|
|
61
|
+
"version": "4",
|
|
62
62
|
"description": "Mandatory Deep Module Map writer skill installed once at the shared .agents/skills workspace path.",
|
|
63
63
|
"changes": [
|
|
64
|
-
"
|
|
64
|
+
"Adds explicit Deep Module Map discovery guidance so agents keep interviewing one question at a time until module interfaces, hidden complexity, ownership, exclusions, scenarios, relationships, and cross-module rules are clear enough to defend."
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"skills/feature-brief-writer/SKILL.md": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"version": "1",
|
|
90
90
|
"description": "Selectable Go skill installed when Go language support is selected.",
|
|
91
91
|
"changes": [
|
|
92
|
-
"Adds an optional Go skill with concise, Effective Go
|
|
92
|
+
"Adds an optional Go skill with concise, Effective Go–style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
95
|
"skills/postgresql-expert/SKILL.md": {
|
|
@@ -161,6 +161,13 @@
|
|
|
161
161
|
"changes": [
|
|
162
162
|
"Strengthens UX interviews to resolve material experience questions before drafting and replaces open UX questions with risks/tradeoffs."
|
|
163
163
|
]
|
|
164
|
+
},
|
|
165
|
+
"skills/architecture/layered-architecture/SKILL.md": {
|
|
166
|
+
"version": "1",
|
|
167
|
+
"description": "Selectable lightweight architecture skill for pragmatic controllers, services, models, and repositories guidance.",
|
|
168
|
+
"changes": [
|
|
169
|
+
"Adds a Layered Architecture skill for smaller apps that need simple separation of concerns."
|
|
170
|
+
]
|
|
164
171
|
}
|
|
165
172
|
}
|
|
166
173
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layered-architecture
|
|
3
|
+
description: Use this skill for smaller apps that need lightweight separation of concerns with controllers, services, models, and repositories.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# layered-architecture
|
|
7
|
+
|
|
8
|
+
Use this skill for smaller apps that need basic separation of concerns.
|
|
9
|
+
|
|
10
|
+
This is Sibu's pragmatic layered architecture guidance. It is not the only valid meaning of “Layered Architecture”; it is the lightweight shape Sibu recommends when a project needs clearer boundaries but not a full domain-architecture framework.
|
|
11
|
+
|
|
12
|
+
## Main rule
|
|
13
|
+
|
|
14
|
+
> **Controllers adapt input, services coordinate behavior, models represent core concepts, and repositories hide persistence details.**
|
|
15
|
+
|
|
16
|
+
Keep the layers useful, not ceremonial. If splitting a small function across layers makes the code harder to understand, prefer the simpler code.
|
|
17
|
+
|
|
18
|
+
## Layer responsibilities
|
|
19
|
+
|
|
20
|
+
### Controllers
|
|
21
|
+
|
|
22
|
+
Controllers are entrypoints. They adapt the outside world into application calls.
|
|
23
|
+
|
|
24
|
+
Controllers may:
|
|
25
|
+
|
|
26
|
+
- parse request, CLI, job, or UI-facing input
|
|
27
|
+
- call services
|
|
28
|
+
- translate service results into response, CLI, or UI-facing output
|
|
29
|
+
- handle transport-specific validation and formatting
|
|
30
|
+
|
|
31
|
+
Controllers should not:
|
|
32
|
+
|
|
33
|
+
- own business rules
|
|
34
|
+
- talk directly to persistence
|
|
35
|
+
- coordinate multi-step business behavior that belongs in a service
|
|
36
|
+
- leak framework-specific objects into services
|
|
37
|
+
|
|
38
|
+
### Services
|
|
39
|
+
|
|
40
|
+
Services coordinate application behavior and business rules.
|
|
41
|
+
|
|
42
|
+
Services may:
|
|
43
|
+
|
|
44
|
+
- run use-case or workflow logic
|
|
45
|
+
- validate business conditions
|
|
46
|
+
- coordinate models and repositories
|
|
47
|
+
- return plain results that controllers can adapt
|
|
48
|
+
|
|
49
|
+
Services should not:
|
|
50
|
+
|
|
51
|
+
- depend on framework request/response objects
|
|
52
|
+
- embed SQL, ORM, SDK, or filesystem details directly
|
|
53
|
+
- become generic “miscellaneous helper” bags
|
|
54
|
+
|
|
55
|
+
### Models
|
|
56
|
+
|
|
57
|
+
Models represent core data shapes or business concepts.
|
|
58
|
+
|
|
59
|
+
Models may:
|
|
60
|
+
|
|
61
|
+
- define meaningful application data structures
|
|
62
|
+
- contain simple validation or derived behavior when it clarifies the concept
|
|
63
|
+
- make important states and invariants explicit
|
|
64
|
+
|
|
65
|
+
Models should not:
|
|
66
|
+
|
|
67
|
+
- mirror persistence tables blindly when that hides business meaning
|
|
68
|
+
- know about controllers, framework concerns, or repository implementations
|
|
69
|
+
- become over-modeled when a plain type or object is enough
|
|
70
|
+
|
|
71
|
+
### Repositories
|
|
72
|
+
|
|
73
|
+
Repositories hide persistence and data-access details.
|
|
74
|
+
|
|
75
|
+
Repositories may:
|
|
76
|
+
|
|
77
|
+
- load and save models or data shapes
|
|
78
|
+
- translate between storage records and application-facing data
|
|
79
|
+
- contain SQL, ORM, filesystem, or external data-access details
|
|
80
|
+
|
|
81
|
+
Repositories should not:
|
|
82
|
+
|
|
83
|
+
- own business workflows
|
|
84
|
+
- expose low-level persistence details to services
|
|
85
|
+
- import controllers or transport-layer code
|
|
86
|
+
|
|
87
|
+
## Dependency direction
|
|
88
|
+
|
|
89
|
+
Use this default flow:
|
|
90
|
+
|
|
91
|
+
```txt
|
|
92
|
+
controller -> service -> repository
|
|
93
|
+
service -> model
|
|
94
|
+
repository -> model or storage mapping
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Avoid these flows:
|
|
98
|
+
|
|
99
|
+
```txt
|
|
100
|
+
controller -> repository
|
|
101
|
+
service -> controller
|
|
102
|
+
model -> controller
|
|
103
|
+
repository -> service
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Practical project mapping
|
|
107
|
+
|
|
108
|
+
Use the project's existing folders when they are already clear. If no convention exists, this simple shape is enough:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
src/controllers/** # entrypoints and adapters
|
|
112
|
+
src/services/** # application behavior and business rules
|
|
113
|
+
src/models/** # core data shapes and business concepts
|
|
114
|
+
src/repositories/** # persistence and data access
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For modular projects, place those layers inside the owning module instead:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
src/modules/<module-slug>/controllers/**
|
|
121
|
+
src/modules/<module-slug>/services/**
|
|
122
|
+
src/modules/<module-slug>/models/**
|
|
123
|
+
src/modules/<module-slug>/repositories/**
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Review checklist
|
|
127
|
+
|
|
128
|
+
- Does each controller stay thin and call services instead of persistence?
|
|
129
|
+
- Does each service coordinate behavior without depending on framework objects?
|
|
130
|
+
- Do repositories hide data-access details from services?
|
|
131
|
+
- Are models meaningful without unnecessary ceremony?
|
|
132
|
+
- Is the layer split making the app easier to understand?
|
|
@@ -139,6 +139,42 @@ Be deliberately interrogative before writing.
|
|
|
139
139
|
- If the conversation stalls, propose one concise assumption for the next unresolved point and ask the user to confirm or correct it.
|
|
140
140
|
- Draft only when there are no material open questions about interfaces, hidden complexity, ownership, exclusions, relationships, or cross-module rules.
|
|
141
141
|
|
|
142
|
+
## Clarify module intent before drafting
|
|
143
|
+
|
|
144
|
+
Do not draft a Deep Module Map from a vague product idea, feature label, command name, screen, folder, or implementation mechanism alone. The map must reflect the user's actual system responsibilities and the complexity boundaries that should stay stable over time.
|
|
145
|
+
|
|
146
|
+
A request is too vague when the user gives only a broad area such as "onboarding," "analytics," "sync," "workflow," "AI features," "the CLI," or "the database" without enough detail to know what capability the rest of the system should rely on or what implementation complexity should be hidden.
|
|
147
|
+
|
|
148
|
+
When module intent is vague or incomplete:
|
|
149
|
+
|
|
150
|
+
1. Stop before drafting.
|
|
151
|
+
2. Explain briefly that a responsible Deep Module Map requires more boundary context.
|
|
152
|
+
3. Ask one focused discovery question.
|
|
153
|
+
4. Wait for the user's answer.
|
|
154
|
+
5. Continue asking one question at a time until there is enough context to defend the map.
|
|
155
|
+
6. Draft only after the module candidates, interfaces, hidden complexity, ownership, exclusions, scenarios, relationships, and cross-module rules are clear enough to avoid invention.
|
|
156
|
+
|
|
157
|
+
Do not ask the user to answer a large questionnaire all at once. Keep the interview conversational and focused.
|
|
158
|
+
|
|
159
|
+
## Gather the minimum required module context
|
|
160
|
+
|
|
161
|
+
Ask every question needed to remove material ambiguity, but only one at a time. Clarify:
|
|
162
|
+
|
|
163
|
+
- what product or system capabilities the map must support
|
|
164
|
+
- what the rest of the app should be able to ask each area to do
|
|
165
|
+
- what messy details callers should not need to know
|
|
166
|
+
- which decisions or policies should change together
|
|
167
|
+
- which responsibilities each candidate module owns
|
|
168
|
+
- which responsibilities each candidate module explicitly does not own
|
|
169
|
+
- key scenarios that prove the module boundary is useful
|
|
170
|
+
- relationships and dependencies between candidate modules
|
|
171
|
+
- cross-module rules such as user ownership, safety, validation, local customization, or read-only vs mutating behavior
|
|
172
|
+
- where future implementation work is likely to create boundary confusion
|
|
173
|
+
|
|
174
|
+
Treat "enough context" as: candidate modules, suggested slugs, simple external interfaces, hidden implementation complexity, responsibilities, exclusions, scenarios, relationships, and cross-module rules are all clear enough to defend. Do not draft a map with an `Open Questions` section. Resolve material questions during the interview, or record only known risks/tradeoffs after decisions are made.
|
|
175
|
+
|
|
176
|
+
If the conversation stalls, offer one concise default assumption for the next unresolved boundary and ask the user to confirm, correct, or reject it before proceeding.
|
|
177
|
+
|
|
142
178
|
## Interview method
|
|
143
179
|
|
|
144
180
|
Derive candidate modules from answers. Do not make the user design the map from scratch.
|