archik 0.22.0 → 0.22.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/README.md CHANGED
@@ -70,7 +70,6 @@ Day to day:
70
70
  | You type | You get |
71
71
  | --- | --- |
72
72
  | `/archik:suggest <feature>` | A staged diagram change, shown as a green/red diff on the canvas — accept or reject |
73
- | `/archik:realize` | Make the code match the model the architect changed (works `archik gap` until empty) |
74
73
  | `/archik:evolve [area]` | A proposed cleaner refactor, backed by drift and smells |
75
74
 
76
75
  Already have docker-compose or Mermaid? Bootstrap from it instead of a blank canvas:
@@ -113,18 +112,6 @@ There are no coordinates — layout is computed by [ELK](https://eclipse.dev/elk
113
112
  | Sub-architecture | `.archik/*.archik.yaml` | A node's internals, linked via `archikFile` |
114
113
  | Decisions | `.archik/decisions/NNNN-*.md` | Why each accepted change was made — context, decision, alternatives, consequences |
115
114
 
116
- **Steer by moving boxes.** The architect changes the architecture directly on the canvas — drag a node into another module (or out to the top level), draw or delete an edge, set a layer — and saves it with a short "why" (the decision record). A moved component becomes a *pending move*. `archik gap` (and the **Code gap** panel on the canvas) then lists exactly what the code must change: move or create code, remove or add imports, fix style breaks, finish nodes whose code landed. "Copy task for your agent" hands it to Claude Code as `/archik:realize`; the agent works the list until the code matches the model.
117
-
118
- **Architecture style.** The architect picks the structure the code must follow — `layered`, `hexagonal`, `clean`, `modular-monolith` or `feature-slices` — with `style:` in the root file and a `layer:` on top-level nodes. archik enforces it on every change (validate, suggest set, canvas save reject a dependency that breaks it), draws the board in the style's lanes, and tells agents where each node sits and what it may depend on (`archik style`, `archik q describe`).
119
-
120
- ```yaml
121
- style:
122
- kind: hexagonal # adapters → ports / core; the core never depends on an adapter
123
- nodes:
124
- - { id: rest-api, kind: module, name: REST API, layer: adapters, ... }
125
- - { id: core, kind: module, name: Ordering core, layer: core, ... }
126
- ```
127
-
128
115
  The diagram says *what*; decision records say *why*. Every staged change carries one under `metadata.suggestion.decision` — `suggest set` refuses a draft without it — and accepting the change writes it as a numbered markdown record with the node and edge changes listed as evidence. Records are never edited; a later decision that changes course lists the old numbers in `supersedes`.
129
116
 
130
117
  Each change is also labelled by how hard it is to undo. A **one-way door** — a new data store, queue, external system, gateway, LLM or top-level module, a removal, or a boundary move — gets its own canvas review before the build plan; if it adds data, an outside system or public traffic, its record must say how it is secured, observed and rolled back. A **two-way door** goes through one combined review of model and plan.
@@ -225,8 +212,6 @@ Every command supports `--help`; agent-facing commands support `--json`.
225
212
  | `archik dev` / `start` / `stop` / `status` | Live canvas lifecycle (foreground / detached) |
226
213
  | `archik validate [path]` | Schema + cross-file + constraints (exit 1 on error) |
227
214
  | `archik complexity [path]` | Flag over-large files, hub nodes, deep nesting (`--fail-on-warn` to gate) |
228
- | `archik gap` | What the code must change to match the model — move / create code, imports, style breaks, finish (`--json`, `--all`, `--fail-on-gap`) |
229
- | `archik style [list]` | The architecture style: rule, layers / modules, where nodes sit, violations; `list` shows every style |
230
215
  | `archik smells [dir]` | Folder import loops + oversized source files, from the code (`--max-file-lines`, `--fail-on-warn`, `--update-baseline`) |
231
216
  | `archik render --out <svg>` | Headless SVG render (`--focus <id>`, `--hide-structural`) |
232
217
  | `archik watch` | Re-render SVG on every change |
@@ -261,7 +246,6 @@ Reach for archik when a project has more than a handful of components, ships wit
261
246
  | Drift detection | **Yes** | No | No |
262
247
  | Decision records tied to model changes | **Yes** | No | No |
263
248
  | Governance constraints | **Yes** | No | No |
264
- | Enforced architecture style (layered, hexagonal, clean, modular) | **Yes** | No | No |
265
249
  | Validator | **Schema + cross-file + constraints** | Syntax only | Syntax only |
266
250
 
267
251
  ## Contributing
@@ -36,9 +36,7 @@ done at step 1 — the diagram changed; the code probably hasn't.
36
36
  ran approved it — go straight to step 4. One-way doors always get
37
37
  their own plan approval here.
38
38
 
39
- Start from `npx archik gap --json` — it lists the code work the
40
- accepted model now asks for (moves, new code, imports, style
41
- breaks). Then translate the diagram delta into a numbered file-level
39
+ Translate the diagram delta into a numbered file-level
42
40
  plan and present it for approval **before** touching code:
43
41
  - Each new code-bearing node (`service`, `function`, `worker`,
44
42
  `module`, `page`, `component`, `store`, `hook`, `model`, `dto`,
@@ -67,14 +67,7 @@ brief and start the DESIGN loop.
67
67
  > Only the first milestone is modelled in detail; later areas stay
68
68
  > coarse placeholders until their turn.
69
69
  > The commitment lives in the YAML, not in the chat log."
70
- 5. When the brief lands, agree the **architecture style** first:
71
- show `npx archik style list`, recommend one that fits the brief
72
- (small service → layered; rich domain with many integrations →
73
- hexagonal or clean; several teams in one deployable → modular
74
- monolith; many independent features → feature slices), and ask
75
- the user to pick. The first sidecar sets `style:` and puts each
76
- top-level node in its layer or module.
77
- 6. Then run the standard DESIGN loop:
70
+ 5. When the brief lands, run the standard DESIGN loop:
78
71
  `/archik:suggest` (structural sidecar) → `/archik:accept` →
79
72
  BUILD. Stop at each inline-review gate; don't barrel through.
80
73
 
@@ -30,16 +30,10 @@ any file under `.archik/`.
30
30
 
31
31
  2. **Ground yourself in the current shape** via the query CLI:
32
32
  ```
33
- npx archik style
34
33
  npx archik q stats
35
34
  npx archik q list
36
35
  npx archik q edges
37
36
  ```
38
- If no style is declared, one of the best improvements you can
39
- offer is to adopt one (`npx archik style list`): pick the style the
40
- code is closest to, set it in the draft with layers on the
41
- top-level nodes, and let the violations it reports become the
42
- refactor plan.
43
37
  If `$ARGUMENTS` names a specific area, also:
44
38
  ```
45
39
  npx archik q describe <id>
package/commands/spawn.md CHANGED
@@ -223,13 +223,6 @@ archik suggest set` stages it.
223
223
  - "Looks wrong? Run `/archik:reject` and we'll iterate. Or run
224
224
  `/archik:evolve` after accepting if you want a cleaner
225
225
  bounded-context version."
226
- - Offer an **architecture style** next: name the style the code is
227
- closest to (`npx archik style list` — e.g. `controllers/`,
228
- `services/`, `repositories/` folders → layered; `ports/` +
229
- `adapters/` → hexagonal; one folder per feature → feature
230
- slices) and offer to stage it with layers on the top-level
231
- nodes. Spawn itself stays descriptive — don't add the style in
232
- the spawn draft.
233
226
 
234
227
  **Offer a smells check at the end of this step** (not after
235
228
  accept — you won't be there). Run it now so the offer is concrete:
@@ -66,21 +66,11 @@ start Build phase here; that's gated on accept.
66
66
  2. **Ground yourself in the current models** using the query CLI
67
67
  (do not `cat` the YAML):
68
68
  ```
69
- npx archik style
70
69
  npx archik q stats
71
70
  npx archik q list
72
71
  ```
73
72
  If `$ARGUMENTS` mentions a specific node by name, also run
74
- `npx archik q describe <id>` for it (its `style:` line says which
75
- layer or module it sits in and what it may depend on).
76
-
77
- If the model declares a style, the draft must follow it: give each
78
- new top-level node its `layer` (layered, hexagonal, clean) or put
79
- it in the right module (modular monolith, feature slices), and keep
80
- every new edge inside the style's rule. `suggest set` rejects a
81
- draft that breaks it. If the feature truly needs a forbidden
82
- dependency, stop and ask the user — the fix is usually a port /
83
- interface, not an exception.
73
+ `npx archik q describe <id>` for it.
84
74
 
85
75
  3. **Lock in the schema.** Run this before drafting any YAML —
86
76
  the prose in this file describes the workflow, not the field