archik 0.12.40 → 0.12.41
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 +17 -3
- package/commands/bootstrap.md +134 -0
- package/package.json +1 -1
- package/skills/archik/SKILL.md +16 -11
package/README.md
CHANGED
|
@@ -52,10 +52,18 @@ npx archik@latest init # scaffolds .archik/main.archik.yaml +
|
|
|
52
52
|
npx archik@latest start # opens the live canvas at http://localhost:5173
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Then in Claude Code:
|
|
55
|
+
Then in Claude Code, type:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
/archik:bootstrap # always your first message — detects project state
|
|
59
|
+
# and routes to the right next step (asks for a brief
|
|
60
|
+
# on fresh projects, suggests /archik:spawn on existing
|
|
61
|
+
# codebases, surfaces trace status if already modelled)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Day-to-day after that:
|
|
56
65
|
|
|
57
66
|
```
|
|
58
|
-
/archik:spawn # mirror your real source tree as the first diagram
|
|
59
67
|
/archik:suggest <feature> # propose changes for a specific feature
|
|
60
68
|
/archik:usecase <name> # author a use case with slices + tests
|
|
61
69
|
/archik:trace # "am I done?" — the coverage matrix
|
|
@@ -181,11 +189,17 @@ If all you need is a one-off rendered diagram, Mermaid is faster. If you need th
|
|
|
181
189
|
|
|
182
190
|
## All slash commands
|
|
183
191
|
|
|
192
|
+
**Start here** (always your first message on a new project):
|
|
193
|
+
|
|
194
|
+
| Command | What it does |
|
|
195
|
+
| --------------------- | --------------------------------------------------------------------------- |
|
|
196
|
+
| `/archik:bootstrap` | Detects project state (fresh / has-code / already-modelled) and routes to the right next action — asks for a brief if you're starting from scratch, suggests `/archik:spawn` if there's existing code, surfaces the trace status if you're already running the loop. |
|
|
197
|
+
|
|
184
198
|
**Structural diagram** (the original surface):
|
|
185
199
|
|
|
186
200
|
| Command | What it does |
|
|
187
201
|
| --------------------------- | ------------------------------------------------------ |
|
|
188
|
-
| `/archik:spawn` |
|
|
202
|
+
| `/archik:spawn` | Mirror your real source tree as the first diagram |
|
|
189
203
|
| `/archik:evolve` | Propose a cleaner bounded-context refactor |
|
|
190
204
|
| `/archik:suggest <feature>` | Propose changes for a specific feature |
|
|
191
205
|
| `/archik:describe <id>` | Explain a node and its connections |
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start here — detect project state and kick off the right archik loop
|
|
3
|
+
argument-hint: [optional one-line brief]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /archik:bootstrap — first command on a fresh project
|
|
7
|
+
|
|
8
|
+
The user just installed archik and wants to start using it but
|
|
9
|
+
doesn't know what to type first. **Detect the project's current
|
|
10
|
+
state, then route to the right next action**. Optional inline brief:
|
|
11
|
+
|
|
12
|
+
**$ARGUMENTS**
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
1. **Check current state.** Don't assume — actually inspect:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
ls .archik/main.archik.yaml 2>/dev/null && echo HAS_ARCHIK || echo NO_ARCHIK
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
And see whether there's any code worth modeling (don't pattern-
|
|
23
|
+
match on framework files — actually look):
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
ls src/ lib/ app/ packages/ 2>/dev/null | head -20
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Route based on what you found.** There are exactly four cases.
|
|
30
|
+
Pick the one that matches and follow its branch — don't run more
|
|
31
|
+
than one.
|
|
32
|
+
|
|
33
|
+
### A. No `.archik/` yet, no source code (empty / scratch project)
|
|
34
|
+
|
|
35
|
+
This is a **fresh project**. The user wants to build something but
|
|
36
|
+
hasn't written any code. Run `archik init` first, then ask for a
|
|
37
|
+
brief and start the DESIGN loop.
|
|
38
|
+
|
|
39
|
+
1. Confirm with the user once before writing anything:
|
|
40
|
+
> "I see this is a fresh project. I'll scaffold archik, then ask
|
|
41
|
+
> for a one-paragraph brief so I can model the actors and your
|
|
42
|
+
> first use case. Sound right?"
|
|
43
|
+
2. On confirmation, run:
|
|
44
|
+
```sh
|
|
45
|
+
npx archik@latest init
|
|
46
|
+
```
|
|
47
|
+
3. If `$ARGUMENTS` already contains a brief, treat it as the brief
|
|
48
|
+
and skip step 4. Otherwise:
|
|
49
|
+
4. **Ask for the brief**, in this exact shape (so the user knows
|
|
50
|
+
what fields you actually need):
|
|
51
|
+
> "Send me a project brief in this shape (skip any line that
|
|
52
|
+
> doesn't apply):
|
|
53
|
+
>
|
|
54
|
+
> **What:** one sentence on what you're building.
|
|
55
|
+
> **Why:** the problem it solves / who it's for.
|
|
56
|
+
> **Stack:** language, framework, hosting.
|
|
57
|
+
> **Constraints:** budget, deadline, team size, hard-no's.
|
|
58
|
+
> **Out of scope:** things you explicitly DON'T want.
|
|
59
|
+
>
|
|
60
|
+
> After you reply, I'll model actors first, then propose the
|
|
61
|
+
> first use case to ship."
|
|
62
|
+
5. When the brief lands, run the standard DESIGN loop:
|
|
63
|
+
`/archik:actor` (if needed) → `/archik:usecase` → `/archik:suggest`
|
|
64
|
+
(structural sidecar) → behavioural seq files. Stop at each
|
|
65
|
+
inline-review gate; don't barrel through.
|
|
66
|
+
|
|
67
|
+
### B. No `.archik/` yet, but source code exists (existing project)
|
|
68
|
+
|
|
69
|
+
The user has a codebase but no diagram yet. The right starting
|
|
70
|
+
point is `/archik:spawn` — mirror what's there as the first-pass
|
|
71
|
+
diagram, then iterate from honest ground truth.
|
|
72
|
+
|
|
73
|
+
1. Note what you see briefly:
|
|
74
|
+
> "I see existing code under `src/` (and / `lib/` / `app/` etc.).
|
|
75
|
+
> Best starting point is `/archik:spawn` — I'll mirror your real
|
|
76
|
+
> source tree as the first diagram so we begin from honest
|
|
77
|
+
> ground truth, not a clean-slate fantasy."
|
|
78
|
+
2. Run:
|
|
79
|
+
```sh
|
|
80
|
+
npx archik@latest init
|
|
81
|
+
```
|
|
82
|
+
(init also installs the slash commands and skill if they're
|
|
83
|
+
missing.)
|
|
84
|
+
3. Then immediately run the `/archik:spawn` workflow — see
|
|
85
|
+
`.claude/commands/archik/spawn.md` for the steps. Don't
|
|
86
|
+
duplicate them here.
|
|
87
|
+
4. After the user accepts the spawn sidecar, suggest the natural
|
|
88
|
+
follow-up: "Want to author the first use case for what you're
|
|
89
|
+
actively working on right now? `/archik:usecase <name>`."
|
|
90
|
+
|
|
91
|
+
### C. `.archik/` exists but the diagram is empty or near-empty
|
|
92
|
+
|
|
93
|
+
Someone ran `init` but nothing else. Treat this like case A or B
|
|
94
|
+
based on whether there's source code:
|
|
95
|
+
|
|
96
|
+
- No source code → ask for a brief (case A from step 3 onward)
|
|
97
|
+
- Source code present → suggest `/archik:spawn` (case B from
|
|
98
|
+
step 3 onward)
|
|
99
|
+
|
|
100
|
+
Skip the `init` step in both — the file already exists.
|
|
101
|
+
|
|
102
|
+
### D. `.archik/main.archik.yaml` already has nodes (modelled project)
|
|
103
|
+
|
|
104
|
+
The project is already running the loop. Don't re-bootstrap. Surface
|
|
105
|
+
the current state and let the user pick the next move:
|
|
106
|
+
|
|
107
|
+
1. Run two queries to ground the user in where they are:
|
|
108
|
+
```sh
|
|
109
|
+
npx archik q stats
|
|
110
|
+
npx archik trace
|
|
111
|
+
```
|
|
112
|
+
2. Translate the trace totals into one sentence: "X full slices,
|
|
113
|
+
Y partial, Z untraced." Name the worst-case slice if any.
|
|
114
|
+
3. Suggest the next action based on state:
|
|
115
|
+
- **All traced** → "Ready to ship. Want to add a feature?
|
|
116
|
+
`/archik:suggest <feature>`. Or start a new use case?
|
|
117
|
+
`/archik:usecase <name>`."
|
|
118
|
+
- **Partial / untraced** → "The biggest gap is `<slice-id>`
|
|
119
|
+
— it's missing `<thing>`. Want me to fix it?"
|
|
120
|
+
|
|
121
|
+
## Notes
|
|
122
|
+
|
|
123
|
+
- This command is the user's "I just installed archik, what now?"
|
|
124
|
+
answer. Keep your routing decision visible: state which case you
|
|
125
|
+
detected and why before acting, so the user can correct you if
|
|
126
|
+
the project state is misleading (e.g. they have a `src/` that's
|
|
127
|
+
pure assets, or an empty `.archik/main.archik.yaml`).
|
|
128
|
+
- Don't skip `init` if it's needed. The slash commands rely on
|
|
129
|
+
`npx archik` being callable from the project root, and `init`
|
|
130
|
+
also makes sure the skill + slash commands are installed.
|
|
131
|
+
- **Do not** start writing actors / use cases / sidecars before
|
|
132
|
+
the user replies to your "sound right?" check. Bootstrap is the
|
|
133
|
+
one place where confirming-before-acting is more important than
|
|
134
|
+
speed — the user is still calibrating what archik will do.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archik",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.41",
|
|
4
4
|
"description": "The shared vocabulary between you and Claude Code, at the engineering level. Plain-YAML architecture diagrams with a live browser canvas, headless SVG render in CI, and an installable Claude skill so the model treats the diagram as the spec.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"architecture",
|
package/skills/archik/SKILL.md
CHANGED
|
@@ -17,17 +17,22 @@ description: Use whenever .archik/main.archik.yaml or architecture.archik.yaml e
|
|
|
17
17
|
|
|
18
18
|
These are the user's entry points. They're triggered by the user typing `/archik:<name>` in chat. When you see one, it's the user's authorisation to run the corresponding workflow now — skip the "want me to update the YAML?" question.
|
|
19
19
|
|
|
20
|
-
| Slash command
|
|
21
|
-
|
|
|
22
|
-
| `/archik:
|
|
23
|
-
| `/archik:
|
|
24
|
-
| `/archik:
|
|
25
|
-
| `/archik:
|
|
26
|
-
| `/archik:
|
|
27
|
-
| `/archik:
|
|
28
|
-
| `/archik:
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
| Slash command | What the user is asking for |
|
|
21
|
+
| --------------------------------- | ----------------------------------------------------------------- |
|
|
22
|
+
| `/archik:bootstrap` | **Start here on a new project.** Detect state (fresh / has-code / already-modelled) and route to the right next action — ask for a brief, suggest `/archik:spawn`, or surface trace status. |
|
|
23
|
+
| `/archik:spawn` | Mirror the source tree as a first-pass diagram (descriptive) |
|
|
24
|
+
| `/archik:evolve` | Propose a cleaner bounded-context refactor (prescriptive) |
|
|
25
|
+
| `/archik:suggest <…>` | Apply one feature-sized change from a description (targeted) |
|
|
26
|
+
| `/archik:describe <id>` | Explain a node and its connections |
|
|
27
|
+
| `/archik:dev` | Open the live canvas |
|
|
28
|
+
| `/archik:accept` | Apply the pending sidecar suggestion |
|
|
29
|
+
| `/archik:reject` | Discard the pending sidecar suggestion |
|
|
30
|
+
| `/archik:actor <id>` | Add or update an actor in the actor index (direct-write) |
|
|
31
|
+
| `/archik:usecase <name>` | Author a use case — flows + slices + tests (direct-write) |
|
|
32
|
+
| `/archik:trace` | Coverage matrix + concrete next action |
|
|
33
|
+
| `/archik:alpha [show \| promote]` | Read or move project alphas with a machine-checked criteria |
|
|
34
|
+
|
|
35
|
+
The full protocol for each lives at `commands/<name>.md` in the repo (or `.claude/commands/archik/<name>.md` once installed in a project). Follow it when invoked.
|
|
31
36
|
|
|
32
37
|
### You run these (`npx archik` CLI)
|
|
33
38
|
|