archik 0.19.5 → 0.20.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/commands/spawn.md CHANGED
@@ -87,30 +87,12 @@ archik suggest set` stages it.
87
87
  - **Frontends**: `apps/web`, `apps/mobile`, `client/`,
88
88
  `packages/ui` apps that ship a UI → `frontend`.
89
89
 
90
- 5. **Choose the kind and ECB stereotype for each node.** Default
90
+ 5. **Choose the kind for each node.** Default
91
91
  kind: `service`. Use the taxonomy from the skill — `function`
92
92
  for serverless, `worker` for background consumers, `agent` for
93
93
  LLM-driven agents, etc. When unsure, pick the closest fit and
94
94
  add a `notes:` entry explaining the inference.
95
95
 
96
- For every node that faces a user or external system, also infer
97
- its ECB `stereotype`:
98
- - `stereotype: boundary` — accepts requests from actors / external
99
- systems: API handlers, gateways, adapters, webhook endpoints,
100
- BFF layers. Rule of thumb: the first thing an actor touches.
101
- - `stereotype: control` — orchestrates use-case logic: services
102
- that coordinate domain objects, use-case handlers, workflow
103
- engines. Rule of thumb: knows *what* to do but delegates *how*.
104
- - `stereotype: entity` — stores or represents domain data:
105
- repositories, domain models, DB-backed modules, caches.
106
- Rule of thumb: knows the data and its invariants.
107
-
108
- If a node's role is purely infrastructure (`database`, `queue`,
109
- `external`, `cloud`, etc.) or genuinely ambiguous, omit
110
- `stereotype` — don't guess. The field is optional and the
111
- validator only enforces ECB transition rules on seq diagrams
112
- that carry a `realizes` block.
113
-
114
96
  6. **Attach `sourcePath` to every code-bearing node.** This is
115
97
  non-negotiable in a normal/suggested file — the validator rejects
116
98
  any `service`, `function`, `worker`, `module`, `page`, `component`,
@@ -223,27 +205,18 @@ archik suggest set` stages it.
223
205
  `/archik:evolve` after accepting if you want a cleaner
224
206
  bounded-context version."
225
207
 
226
- **Offer the Jacobson-chain follow-up at the end of this step**
227
- (not after accept — you won't be there). Check what's missing
228
- before framing the offer:
208
+ **Offer a smells check at the end of this step** (not after
209
+ accept — you won't be there). Run it now so the offer is concrete:
229
210
  ```
230
- npx archik q actors
231
- npx archik q usecases
211
+ npx archik smells
232
212
  ```
233
- Then close with one of these follow-up lines, whichever fits:
234
- - No actors, diagram has boundary nodes / user-facing components:
235
- *"Once you accept, ask me to author a `*.archik.actors.yaml`
236
- — that's the starting point for use-case coverage."*
237
- - Actors exist but no use cases:
238
- *"Once you accept, ask me to stub `*.archik.uc.yaml` files for
239
- the key flows."*
240
- - Both exist already:
241
- *"Run `/archik:evolve` after accepting for ECB and coverage
242
- gap suggestions."*
213
+ If it finds folder loops or oversized files, close with:
214
+ *"Once you accept, want me to look at the folder loop between
215
+ `<a>` and `<b>`? The cheapest cut is `<file imports "specifier">`."*
216
+ If it finds none, skip this line.
243
217
 
244
- Do NOT author actors or use cases here — that requires the
245
- structural diagram to be accepted first and is a separate ask
246
- from the user. This note is a prompt, not an action.
218
+ Do NOT fix smells here — spawn is descriptive, and the fix is a
219
+ separate ask from the user. This note is a prompt, not an action.
247
220
 
248
221
  ## Notes
249
222
 
@@ -37,10 +37,6 @@ start Build phase here; that's gated on accept.
37
37
  0. **Frame + clarify (entering DESIGN).** Before any CLI call, restate
38
38
  the user's intent in one sentence and list 1–3 sharp clarifying
39
39
  questions if any of these are ambiguous in `$ARGUMENTS`:
40
- - **Actor + use case** — which actor initiates this? Does an
41
- existing use case cover it, or is this a new user-visible
42
- behaviour? (Check `npx archik q actors` and `q usecases` in
43
- step 2 before asking if the answer isn't obvious from the brief.)
44
40
  - **Boundary** — which existing context owns this, or is it a new
45
41
  one? (data ownership = bounded context)
46
42
  - **Sync vs async** — request/response (`http_call`) or
@@ -57,15 +53,6 @@ start Build phase here; that's gated on accept.
57
53
  don't ask questions for the sake of asking.** When in doubt, ask
58
54
  the user "you decide?" so they can defer back if they want.
59
55
 
60
- **Before the structural sidecar, check if the feature needs
61
- requirements artifacts first:**
62
- - New human-facing flow or actor? Create/update
63
- `*.archik.actors.yaml` (direct-write) before staging the sidecar.
64
- - New user-visible behaviour? Author a `*.archik.uc.yaml` under
65
- `.archik/usecases/` (direct-write) with the flow and at least one
66
- slice before staging the sidecar. The structural model references
67
- what the use case requires.
68
-
69
56
  1. **Make sure the canvas is running** so the user can review:
70
57
  ```
71
58
  npx archik status
@@ -85,23 +72,6 @@ start Build phase here; that's gated on accept.
85
72
  If `$ARGUMENTS` mentions a specific node by name, also run
86
73
  `npx archik q describe <id>` for it.
87
74
 
88
- If the change is **non-trivial** (new actor, new user-visible
89
- behaviour, boundary impact, more than one node affected) also
90
- ground in the requirements model:
91
- ```
92
- npx archik q actors
93
- npx archik q usecases
94
- ```
95
- If any use case looks related, run
96
- `npx archik q describe-usecase <id>` to see its slices and
97
- check whether the proposed change extends, modifies, or
98
- introduces a UC — that determines whether you need to update
99
- a `*.archik.uc.yaml` before staging the structural sidecar.
100
-
101
- If step 0 already determined the change is trivially small
102
- (one node, one edge, no boundary or UC impact), skip the
103
- actor/UC queries and go straight to step 3.
104
-
105
75
  3. **Lock in the schema.** Run this before drafting any YAML —
106
76
  the prose in this file describes the workflow, not the field
107
77
  shapes. The CLI is the schema:
@@ -135,18 +105,6 @@ start Build phase here; that's gated on accept.
135
105
  not just its kind or name. Empty / missing descriptions are
136
106
  rejected by the validator.
137
107
 
138
- **For nodes that participate in a use case flow**, add a
139
- `stereotype` field to classify their role in the ECB model:
140
- - `stereotype: boundary` — accepts requests from actors / external
141
- systems (adapters, gateways, API handlers)
142
- - `stereotype: control` — orchestrates the use case logic (services,
143
- use-case handlers, orchestrators)
144
- - `stereotype: entity` — stores or represents domain data (repos,
145
- domain models, DB-backed modules)
146
-
147
- The validator enforces ECB transition rules on seq diagrams that
148
- carry a `realizes` block — tag the nodes now so the rules can fire.
149
-
150
108
  ```bash
151
109
  npx archik suggest set --note "$ARGUMENTS" - <<'YAML'
152
110
  version: "1.0"