archik 0.16.0 → 0.16.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 +1 -1
- package/skills/archik/SKILL.md +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archik",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
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
|
@@ -51,6 +51,7 @@ These are the verbs you reach for during the loop. Default to `npx archik` (no g
|
|
|
51
51
|
| List use cases (filter by actor) | `npx archik q usecases [--actor <id>]` |
|
|
52
52
|
| Describe one use case | `npx archik q describe-usecase <id>` |
|
|
53
53
|
| List actors | `npx archik q actors` |
|
|
54
|
+
| List concrete run traces | `npx archik q traces [--usecase <id>] [--slice <id>]` |
|
|
54
55
|
| Use case coverage matrix | `npx archik trace [--json] [--fail-on partial\|none]` |
|
|
55
56
|
| Map changed files onto the model | `npx archik affected [--since <ref>] [--files <list>] [--json]` |
|
|
56
57
|
| Run the tests a change touches | `npx archik affected --run [--runner '<cmd>']` |
|
|
@@ -534,6 +535,29 @@ slices:
|
|
|
534
535
|
|
|
535
536
|
Query: `npx archik q usecases [--actor <id>]` | `npx archik q describe-usecase <id>`
|
|
536
537
|
|
|
538
|
+
## Concrete run traces
|
|
539
|
+
|
|
540
|
+
A sequence diagram is the **abstract** flow (boxes and arrows, no values). A **concrete trace** is one real run of a slice with the **actual data at each step** — captured from the slice's tests and shown on the canvas as an expandable dataflow **timeline** (each step's real in/out values, expandable to the full JSON). It's the concrete counterpart to the slice's abstract seq diagram (a bound trace links to that diagram; it doesn't redraw onto it). Use it when someone asks to *see a real example of a use case running, with the data at each step*.
|
|
541
|
+
|
|
542
|
+
- **Tests record it via the `archik/trace` recorder** (a zero-dep import archik ships). Add it to the slice's test:
|
|
543
|
+
```ts
|
|
544
|
+
import { trace } from "archik/trace";
|
|
545
|
+
const t = trace({
|
|
546
|
+
useCase: "place-order",
|
|
547
|
+
slice: "happy-path",
|
|
548
|
+
seqFile: ".archik/place-order.happy.archik.seq.yaml", // optional → binds to the diagram
|
|
549
|
+
});
|
|
550
|
+
t.step({ id: "m1", from: "browser", to: "api", label: "POST /orders", in: cart, out: res });
|
|
551
|
+
t.step({ id: "m2", from: "api", to: "db", label: "insert order", in: order });
|
|
552
|
+
// auto-flushes on process exit → .archik/traces/place-order.happy-path.archik.trace.json
|
|
553
|
+
```
|
|
554
|
+
When `seqFile` is set, `id`/`from`/`to` must match the diagram's message + participant ids (so the run is checked against the declared flow); omit `seqFile` for a standalone trace.
|
|
555
|
+
- **Passive — archik never runs your tests.** Run them however you like (`npm test`, `archik affected --run`); the recorder writes the file, archik only reads it. The canvas shows a "Concrete run" affordance on each slice that has one.
|
|
556
|
+
- **Query / shape:** `npx archik q traces [--usecase <id>] [--slice <id>]` lists captured runs; `npx archik schema trace` prints the schema (the file is JSON, machine-generated — never hand-author it).
|
|
557
|
+
- **Validated:** `npx archik validate` checks each trace — its use case/slice resolves, and (when bound) its step ids + participants exist in the seq diagram; seq steps the run didn't exercise are reported informationally, not as errors.
|
|
558
|
+
|
|
559
|
+
**Two different "trace"s — don't confuse them:** `npx archik trace` is the use-case **coverage matrix** (use case × slice × test × seq). **Concrete run traces** are `*.archik.trace.json` files captured by the recorder and listed by `npx archik q traces`.
|
|
560
|
+
|
|
537
561
|
## Alpha state
|
|
538
562
|
|
|
539
563
|
One file per project: `<name>.archik.alphas.yaml`. Direct-write. Tracks four Essence alphas that archik can directly evidence: **stakeholders**, **requirements**, **softwareSystem**, **work**.
|
|
@@ -663,6 +687,7 @@ npx archik schema # the document shape (start here when au
|
|
|
663
687
|
--seq # seq diagram schema instead of arch schema
|
|
664
688
|
uc # use case schema
|
|
665
689
|
actors # actors schema
|
|
690
|
+
trace # concrete run-trace schema
|
|
666
691
|
|
|
667
692
|
npx archik q describe <id> | deps <id> | dependents <id>
|
|
668
693
|
list | edges | impact <id> | stats
|
|
@@ -671,6 +696,7 @@ npx archik q describe <id> | deps <id> | dependents <id>
|
|
|
671
696
|
usecases [--actor <id>] # list use cases; filter by actor
|
|
672
697
|
describe-usecase <id> # one use case in detail
|
|
673
698
|
actors # list actors
|
|
699
|
+
traces [--usecase <id>] [--slice <id>] # concrete run traces (.archik.trace.json)
|
|
674
700
|
--json # stable machine-readable shape
|
|
675
701
|
|
|
676
702
|
npx archik trace [--json] # coverage matrix: use case × slice × test × seq × ECB
|