@rotorsoft/act-diagram 0.4.0 → 1.0.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.
Files changed (60) hide show
  1. package/README.md +110 -171
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/@types/cli/colors.d.ts +1 -1
  4. package/dist/@types/cli/colors.d.ts.map +1 -1
  5. package/dist/@types/cli/contract-index.d.ts +6 -6
  6. package/dist/@types/cli/contract-index.d.ts.map +1 -1
  7. package/dist/@types/cli/format.d.ts +9 -9
  8. package/dist/@types/cli/format.d.ts.map +1 -1
  9. package/dist/@types/cli/index.d.ts +9 -9
  10. package/dist/@types/cli/index.d.ts.map +1 -1
  11. package/dist/@types/cli/json-schema.d.ts +1 -1
  12. package/dist/@types/cli/json-schema.d.ts.map +1 -1
  13. package/dist/@types/cli/load-project.d.ts +3 -3
  14. package/dist/@types/cli/load-project.d.ts.map +1 -1
  15. package/dist/@types/cli/markdown.d.ts +1 -1
  16. package/dist/@types/cli/markdown.d.ts.map +1 -1
  17. package/dist/@types/cli/open-editor.d.ts +4 -4
  18. package/dist/@types/cli/open-editor.d.ts.map +1 -1
  19. package/dist/@types/cli/repl.d.ts +1 -1
  20. package/dist/@types/cli/repl.d.ts.map +1 -1
  21. package/dist/@types/cli/vim-keys.d.ts +1 -1
  22. package/dist/@types/cli/vim-keys.d.ts.map +1 -1
  23. package/dist/@types/client/components/ActDiagram.d.ts +1 -1
  24. package/dist/@types/client/components/ActDiagram.d.ts.map +1 -1
  25. package/dist/@types/client/components/AiBar.d.ts +1 -1
  26. package/dist/@types/client/components/AiBar.d.ts.map +1 -1
  27. package/dist/@types/client/components/CodePreview.d.ts +2 -2
  28. package/dist/@types/client/components/CodePreview.d.ts.map +1 -1
  29. package/dist/@types/client/components/Diagram.d.ts +1 -1
  30. package/dist/@types/client/components/Diagram.d.ts.map +1 -1
  31. package/dist/@types/client/components/Logo.d.ts +1 -1
  32. package/dist/@types/client/components/Logo.d.ts.map +1 -1
  33. package/dist/@types/client/components/Tooltip.d.ts +1 -1
  34. package/dist/@types/client/components/Tooltip.d.ts.map +1 -1
  35. package/dist/@types/client/lib/build-model.d.ts +2 -2
  36. package/dist/@types/client/lib/build-model.d.ts.map +1 -1
  37. package/dist/@types/client/lib/evaluate.d.ts +2 -2
  38. package/dist/@types/client/lib/evaluate.d.ts.map +1 -1
  39. package/dist/@types/client/lib/layout.d.ts +1 -1
  40. package/dist/@types/client/lib/layout.d.ts.map +1 -1
  41. package/dist/@types/client/lib/mock-builders.d.ts +6 -6
  42. package/dist/@types/client/lib/mock-builders.d.ts.map +1 -1
  43. package/dist/@types/client/lib/navigate.d.ts +1 -1
  44. package/dist/@types/client/lib/navigate.d.ts.map +1 -1
  45. package/dist/@types/client/lib/schema-extract.d.ts +4 -4
  46. package/dist/@types/client/lib/schema-extract.d.ts.map +1 -1
  47. package/dist/@types/client/lib/sort.d.ts +1 -1
  48. package/dist/@types/client/lib/sort.d.ts.map +1 -1
  49. package/dist/@types/client/lib/strip-fences.d.ts +3 -3
  50. package/dist/@types/client/lib/strip-fences.d.ts.map +1 -1
  51. package/dist/@types/index.d.ts +0 -6
  52. package/dist/@types/index.d.ts.map +1 -1
  53. package/dist/cli/act.js +1515 -1310
  54. package/dist/cli/act.js.map +1 -1
  55. package/dist/index.cjs +640 -704
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.js +640 -696
  58. package/dist/index.js.map +1 -1
  59. package/dist/styles.css +1 -1
  60. package/package.json +12 -12
package/README.md CHANGED
@@ -4,82 +4,45 @@
4
4
  [![NPM Downloads](https://img.shields.io/npm/dm/@rotorsoft/act-diagram.svg)](https://www.npmjs.com/package/@rotorsoft/act-diagram)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
- Interactive domain model diagram for [@rotorsoft/act](https://www.npmjs.com/package/@rotorsoft/act) event-sourced apps. Extracts states, actions, events, reactions, slices, and projections from TypeScript source code and renders them as an interactive SVG.
7
+ _Interactive domain model diagram for [@rotorsoft/act](https://www.npmjs.com/package/@rotorsoft/act). Reads your TypeScript, renders an SVG of states, slices, projections, and reactions — with click-through to source._
8
8
 
9
- > **Stability:** Public API governed by the [Act Stability Charter](../../STABILITY.md). The diagram **output shape** (SVG structure, click-through anchors) is *not* part of the stability surface and may evolve. Charter takes effect at 1.0 (gated on [milestone 1.0](https://github.com/Rotorsoft/act-root/milestone/1)).
9
+ ## Why this package
10
10
 
11
- ## Features
11
+ Act apps grow horizontally — more states, more slices, more projections, more reactions — and at some point the mental model of "what fires what" stops fitting in your head. This package solves that two ways:
12
12
 
13
- - **Real-time visualization** — SVG diagram updates as source files change
14
- - **Code navigation** — click any diagram element to jump to its `file:line:col` location
15
- - **Per-slice error isolation** — broken files show errors in their slice boundary while healthy slices render normally
16
- - **Bottom-up model building** — states → slices → act, each level independently validated
17
- - **IDE-agnostic** — works over props, postMessage, or WebSocket (see [act-nvim](https://github.com/Rotorsoft/act-nvim) for Neovim integration)
18
- - **Embeddable** — React component for any host (IDE webview, standalone app, docs site)
19
- - **AI refinement** — optional prompt bar to generate code via a streaming endpoint (see [AI server](#ai-server-optional))
20
- - **`act` CLI** — terminal companion that walks the model interactively, surfaces Zod schemas as captured source text, and jumps into `$EDITOR` at any file:line (see [the act CLI](#the-act-cli))
21
- - **High test coverage** — over 400 tests covering extraction, layout, navigation, the CLI, and error paths
13
+ A **React component** that renders the live domain model as an interactive SVG, with click-to-source navigation. Drop it into an IDE webview (VS Code, Cursor, Neovim via [`act-nvim`](https://github.com/Rotorsoft/act-nvim)), a docs site, or a standalone explorer. Per-slice error isolation means a broken file shows its error in the slice boundary while healthy slices keep rendering.
14
+
15
+ A **terminal CLI** (`act`) that walks the same parsed model interactively, surfaces captured Zod schemas, flags deprecation via the `_v<n>` convention, and jumps into `$EDITOR` at the exact `file:line`. Use it when you want the structural answer ("who emits `TicketOpened`?") without leaving the terminal.
16
+
17
+ Both reuse the same extraction pipeline — mock builders + Sucrase transpile — so the diagram and the CLI always agree.
22
18
 
23
19
  ## Installation
24
20
 
25
- ```sh
26
- npm install @rotorsoft/act-diagram
27
- # or
21
+ ```bash
28
22
  pnpm add @rotorsoft/act-diagram
29
23
  ```
30
24
 
31
- **Peer dependencies:** `react >= 18`, `react-dom >= 18`
32
-
33
- The component ships its own stylesheet — import it once at the host's entry point:
25
+ The React component ships its own stylesheet — import it once at your host's entry point:
34
26
 
35
27
  ```ts
36
28
  import "@rotorsoft/act-diagram/styles.css";
37
29
  ```
38
30
 
39
- ## How It Works
31
+ The CLI ships as the `act` bin:
40
32
 
33
+ ```bash
34
+ npx -p @rotorsoft/act-diagram act
35
+ # or, in a workspace that depends on it:
36
+ pnpm act
41
37
  ```
42
- TypeScript files (.ts)
43
- |
44
- v
45
- topoSort() ← order files by import dependencies
46
- |
47
- v
48
- extractModel() ← transpile + execute with mock builders → DomainModel
49
- | inventory scan → per-state validation → per-slice error isolation
50
- v
51
- validate() ← check for missing emits, orphan reactions, etc.
52
- |
53
- v
54
- computeLayout() ← pure layout: positions nodes, edges, slice boxes, projections
55
- |
56
- v
57
- <Diagram /> ← SVG rendering with pan/zoom/model tree/errors section
58
- |
59
- v
60
- navigateToCode() ← click element → { file, line, col }
61
- ```
62
-
63
- ### Extraction Pipeline
64
-
65
- The extraction uses mock versions of `state()`, `slice()`, `projection()`, and `act()` that capture the builder structure without needing the real framework runtime. Code is transpiled with [Sucrase](https://github.com/alangpierce/sucrase) and evaluated in an isolated scope.
66
-
67
- **Bottom-up model building:**
68
38
 
69
- 1. **Inventory** — scan source files for all `state()`, `slice()`, `projection()`, `act()` declarations
70
- 2. **Build states** — validate each state independently (detects undefined schemas from broken imports)
71
- 3. **Build slices** — compose states from step 2, track missing/corrupted references per slice
72
- 4. **Build projections** — extract projection handlers
73
- 5. **Compose act** — wire slices + projections + reactions into entries, standalone states into a "global" slice
39
+ ## Quick start
74
40
 
75
- Every item from the inventory is always displayed — with a diagram on success, or an error box on failure.
76
-
77
- ## Usage
78
-
79
- ### Standalone Component
41
+ ### React component
80
42
 
81
43
  ```tsx
82
44
  import { ActDiagram } from "@rotorsoft/act-diagram";
45
+ import "@rotorsoft/act-diagram/styles.css";
83
46
 
84
47
  function App() {
85
48
  return (
@@ -89,109 +52,50 @@ function App() {
89
52
  { path: "src/app.ts", content: "..." },
90
53
  ]}
91
54
  onNavigate={(file, line, col) => {
92
- console.log(`Navigate to ${file}:${line}:${col}`);
55
+ console.log(`open ${file}:${line}:${col}`);
93
56
  }}
94
57
  />
95
58
  );
96
59
  }
97
60
  ```
98
61
 
99
- ### IDE Webview (postMessage)
100
-
101
- ```tsx
102
- // In the webview
103
- <ActDiagram usePostMessage onNavigate={handleNavigate} />
104
-
105
- // From the IDE extension host
106
- webview.postMessage({ type: "files", files: [...] });
107
- webview.postMessage({ type: "fileChanged", path: "src/app.ts", content: "..." });
108
- ```
109
-
110
- ### Raw Diagram (bring your own pipeline)
111
-
112
- ```tsx
113
- import { Diagram, extractModel, validate } from "@rotorsoft/act-diagram";
114
-
115
- const { model } = extractModel(files);
116
- const warnings = validate(model);
62
+ ### CLI
117
63
 
118
- <Diagram
119
- model={model}
120
- warnings={warnings}
121
- onClickElement={(name, type, file) => { /* ... */ }}
122
- />
64
+ ```bash
65
+ pnpm act # interactive: pick category → entry → detail
66
+ pnpm act packages/wolfdesk # target a specific package
67
+ pnpm act -q TicketOpened # non-interactive: print one entity, exit
123
68
  ```
124
69
 
125
- ### Code Navigation (pure function)
126
-
127
- ```typescript
128
- import { navigateToCode } from "@rotorsoft/act-diagram";
129
-
130
- const result = navigateToCode(files, "OpenTicket", "action");
131
- // → { file: "src/states.ts", line: 24, col: 7 }
132
- ```
70
+ Interactive mode uses arrow-key navigation ([`@clack/prompts`](https://github.com/natemoo-re/clack)). Each entry shows producers, consumers, captured Zod schema text, deprecation status, and a one-key shortcut to open the source in `$EDITOR` (VS Code, Cursor, vim, nvim, nano, emacs all recognized). `-q <name>` is the script-friendly path — exits 0 with the detail on a single match, 0 with the match list on ambiguity, 1 with no matches. CI smoke-tests parsing with this mode.
133
71
 
134
72
  ## API
135
73
 
136
- ### Components
74
+ ### React components
137
75
 
138
- | Component | Props | Description |
139
- |-----------|-------|-------------|
140
- | `ActDiagram` | `files?`, `onNavigate?(file, line, col, type?)`, `usePostMessage?`, `onAiRequest?`, `generating?` | Standalone wrapper: pipeline + diagram + optional AI bar. `onNavigate`'s 4th argument carries the diagram element type (`state`, `slice`, `event`, …) for callers that want type-aware routing. |
141
- | `Diagram` | `model`, `warnings`, `onClickElement?`, `onFixWithAi?`, `toolbarExtra?` | Raw SVG diagram with pan/zoom/model tree/warnings |
142
- | `AiBar` | `onSubmit`, `generating?` | Resizable prompt input with model and token controls |
143
- | `Logo` | `size?` | Act logo SVG |
144
- | `Tooltip` | `title`, `description?`, `details?`, `children`, `position?`, `align?` | Hover tooltip |
76
+ | Component | Purpose |
77
+ |---|---|
78
+ | `ActDiagram` | Standalone wrapper — pipeline + diagram + optional AI bar. `onNavigate(file, line, col, type?)` for click-to-source. |
79
+ | `Diagram` | Raw SVG diagram with pan/zoom/model tree/warnings. Use when you want to drive the pipeline yourself. |
80
+ | `AiBar` | Resizable prompt input with model and token controls (optional refinement bar). |
81
+ | `Logo`, `Tooltip` | Small UI primitives used inside the diagram, exported for host reuse. |
145
82
 
146
83
  ### Functions
147
84
 
148
- | Function | Signature | Description |
149
- |----------|-----------|-------------|
150
- | `extractModel` | `(files: FileTab[]) => { model: DomainModel; error?: string }` | Extract domain model from TypeScript source files (orchestrates `topoSort` + `buildModel`) |
151
- | `buildModel` | `(files: FileTab[]) => ExecuteResult` | Lower-level: transpile + execute one file at a time, returns the merged inventory and per-file errors. Use when you want to drive the pipeline yourself |
152
- | `validate` | `(model: DomainModel) => ValidationWarning[]` | Validate model for missing emits, etc. |
153
- | `navigateToCode` | `(files, name, type?, targetFile?) => { file, line, col } \| undefined` | Find source location of a named element |
154
- | `topoSort` | `(files: FileTab[]) => FileTab[]` | Sort files by import dependency order |
155
- | `computeLayout` | `(model: DomainModel) => Layout` | Pure layout computation — positions all nodes, edges, and slice boxes |
156
- | `emptyModel` | `() => DomainModel` | Create an empty domain model |
157
- | `parseMultiFileResponse` | `(text: string) => FileTab[]` | Parse a multi-file AI response into individual `FileTab`s |
158
- | `stripFences` | `(text: string) => string` | Strip Markdown code fences from a block — used by the AI pipeline to extract raw code |
159
- | `deriveProjectName` | `(files: FileTab[]) => string` | Best-effort project name from the file set — used in the AI prompt context |
160
-
161
- ### Types
162
-
163
- ```typescript
164
- type FileTab = { path: string; content: string };
165
-
166
- type ExecuteResult = {
167
- model: DomainModel;
168
- errors: Record<string, string>; // keyed by file path
169
- };
170
-
171
- type DomainModel = {
172
- entries: EntryPoint[];
173
- states: StateNode[];
174
- slices: SliceNode[];
175
- projections: ProjectionNode[];
176
- reactions: ReactionNode[];
177
- orchestrator?: ActNode; // present only after `act()` is composed
178
- };
179
-
180
- type StateNode = { name, varName, events: EventNode[], actions: ActionNode[], file?, line? };
181
- type ActionNode = { name, emits: string[], invariants: string[], line? };
182
- type EventNode = { name, hasCustomPatch: boolean, line? };
183
- type SliceNode = { name, states: string[], stateVars: string[], projections: string[], reactions: ReactionNode[], error?, file?, line? };
184
- type ProjectionNode = { name, varName, handles: string[], line? };
185
- type ReactionNode = { event, handlerName, dispatches: string[], line? };
186
-
187
- // Layout types
188
- type Box = { x, y, w, h, label, error? };
189
- type Layout = { ns: N[], es: E[], boxes: Box[], minX, minY, width, height };
190
- ```
85
+ | Function | Purpose |
86
+ |---|---|
87
+ | `extractModel(files)` | High-level extract: `topoSort` + `buildModel`. Returns `{ model, error? }`. |
88
+ | `buildModel(files)` | Lower-level: transpile + execute per-file, returns merged inventory + per-file errors. |
89
+ | `validate(model)` | Check for missing emits, orphan reactions, etc. Returns `ValidationWarning[]`. |
90
+ | `navigateToCode(files, name, type?)` | Pure function — find `{ file, line, col }` for a named element. |
91
+ | `topoSort(files)` | Sort files by import dependency order. |
92
+ | `computeLayout(model)` | Pure layout — positions nodes, edges, slice boxes. |
93
+ | `emptyModel()` | Construct an empty `DomainModel`. |
94
+ | `parseMultiFileResponse(text)`, `stripFences(text)`, `deriveProjectName(files)` | AI-pipeline helpers used by `ActDiagram` when `onAiRequest` is wired. |
191
95
 
192
- ### IDE Plugin Protocol
96
+ ### IDE plugin protocol (postMessage)
193
97
 
194
- ```typescript
98
+ ```ts
195
99
  // Host → Diagram
196
100
  type HostMessage =
197
101
  | { type: "files"; files: FileTab[] }
@@ -205,59 +109,94 @@ type DiagramMessage =
205
109
  | { type: "aiRequest"; prompt: string; files: FileTab[] };
206
110
  ```
207
111
 
208
- ## The `act` CLI
112
+ Full type reference: [typedoc](https://github.com/Rotorsoft/act-root/blob/master/docs/docs/api/act-diagram/src/README.md).
113
+
114
+ ## Common patterns
115
+
116
+ ### IDE webview (postMessage)
209
117
 
210
- A terminal companion for the diagram. Reuses the same parser to walk the model, but renders neighborhoods as text and lets you jump into `$EDITOR` at any file:line.
118
+ ```tsx
119
+ <ActDiagram usePostMessage onNavigate={handleNavigate} />
120
+ ```
211
121
 
212
- ```sh
213
- # From the monorepo root
214
- pnpm act # interactive: pick category → entry → detail
215
- pnpm act packages/wolfdesk # target a specific package
216
- pnpm act -q TicketOpened # non-interactive: print one entity and exit
122
+ ```ts
123
+ // From the extension host:
124
+ webview.postMessage({ type: "files", files: [...] });
125
+ webview.postMessage({ type: "fileChanged", path: "src/app.ts", content: "..." });
217
126
  ```
218
127
 
219
- In interactive mode you navigate with arrow keys (powered by [`@clack/prompts`](https://github.com/natemoo-re/clack)). Each entry shows producers, consumers, captured Zod schema text, deprecation status (via the `_v<n>` convention), and a one-key shortcut to open the source in `$EDITOR` (`$VISUAL` takes precedence). VS Code, Cursor, vim, nvim, nano, and emacs are all recognized.
128
+ The webview side picks up host messages automatically when `usePostMessage` is set; the diagram emits `navigate` and `aiRequest` back through `window.parent.postMessage`.
220
129
 
221
- `-q <name>` is the script-friendly path — exits 0 with the detail on a single match, 0 with the match list on ambiguity, 1 with no matches. CI uses this to smoke-test the parser against the example apps.
130
+ ### Bring-your-own pipeline
131
+
132
+ ```tsx
133
+ import { Diagram, extractModel, validate } from "@rotorsoft/act-diagram";
222
134
 
223
- The CLI ships as the `act` bin from this package, so:
135
+ const { model } = extractModel(files);
136
+ const warnings = validate(model);
224
137
 
225
- ```sh
226
- npx -p @rotorsoft/act-diagram act
138
+ <Diagram
139
+ model={model}
140
+ warnings={warnings}
141
+ onClickElement={(name, type, file) => {/* … */}}
142
+ />
227
143
  ```
228
144
 
229
- works from any project that has the package installed.
145
+ Use when you want to cache the extracted model, run extraction in a worker, or wire it to a non-standard file source.
230
146
 
231
- ## AI server (optional)
147
+ ### Optional AI refinement
232
148
 
233
- The `AiBar` component dispatches refinement prompts to a streaming endpoint. The package ships with a reference server at `src/server/server.ts` (port 4002) that forwards prompts to Anthropic's API:
149
+ The `AiBar` component dispatches refinement prompts to a streaming endpoint. A reference SSE server lives at `src/server/server.ts` (port 4002) and forwards prompts to Anthropic's API:
234
150
 
235
- ```sh
236
- # In one terminal
151
+ ```bash
237
152
  ANTHROPIC_API_KEY=sk-ant-... pnpm -F @rotorsoft/act-diagram dev:server
153
+ ```
154
+
155
+ In your host:
238
156
 
239
- # In your host app, pass onAiRequest to ActDiagram
240
- <ActDiagram onAiRequest={(prompt, files) => fetch("http://localhost:4002/api/generate", { ... })} />
157
+ ```tsx
158
+ <ActDiagram
159
+ onAiRequest={(prompt, files) =>
160
+ fetch("http://localhost:4002/api/generate", { /* … */ })
161
+ }
162
+ />
241
163
  ```
242
164
 
243
- The reference server is a thin SSE relay — bring your own API key, your own model selection, and your own prompt strategy. AI mode is opt-in: omit `onAiRequest` and the `AiBar` doesn't render.
165
+ The reference server is a thin SSE relay — bring your own API key, model selection, and prompt strategy. AI mode is opt-in: omit `onAiRequest` and the `AiBar` doesn't render.
244
166
 
245
- ## Neovim Integration
167
+ ### Neovim integration
246
168
 
247
- See [@rotorsoft/act-nvim](https://github.com/Rotorsoft/act-nvim) — a Neovim plugin that renders act-diagram in the browser with bidirectional navigation, live refresh, and LSP diagnostic forwarding.
169
+ [`@rotorsoft/act-nvim`](https://github.com/Rotorsoft/act-nvim) renders this diagram in the browser with bidirectional navigation, live refresh, and LSP diagnostic forwarding. The diagram is launched from inside Neovim; you click an element in the browser and the cursor jumps to the corresponding source line.
248
170
 
249
- ## Development
171
+ ## How it works
250
172
 
251
- ```sh
252
- # Visual dev server with sample diagram
253
- pnpm -F @rotorsoft/act-diagram dev
173
+ The extraction pipeline uses mock versions of `state()`, `slice()`, `projection()`, and `act()` that capture the builder structure without needing the real framework runtime. Code is transpiled with [Sucrase](https://github.com/alangpierce/sucrase) and evaluated in an isolated scope.
254
174
 
255
- # Run the test suite
256
- pnpm -F @rotorsoft/act-diagram test
175
+ Bottom-up: inventory scan → per-state validation → per-slice composition (with error isolation) → projection extraction → `act()` composition. Every item from the inventory is always displayed — with a diagram on success, or an error box on failure. Standalone states without a slice land in a synthetic "global" slice so nothing gets dropped.
257
176
 
258
- # Build library
259
- pnpm -F @rotorsoft/act-diagram build
260
- ```
177
+ ## Compatibility
178
+
179
+ - **Node**: >=22.18.0
180
+ - **Peer**: `react` ^18 || ^19, `react-dom` ^18 || ^19, `zod` ^4.4.3
181
+ - **Bundled deps**: `lucide-react`, `sucrase`
182
+ - **CLI**: works from any project where the package is installed; recognizes `$VISUAL` / `$EDITOR` (vim, nvim, nano, emacs, VS Code, Cursor)
183
+ - **Browser**: the component is a React SPA — runs in any browser that supports modern ES (the host's bundler picks the target)
184
+ - **400+ tests** covering extraction, layout, navigation, CLI, error paths
185
+
186
+ ## Stability
187
+
188
+ Public API governed by the [Act Stability Charter](../../STABILITY.md). The diagram's **output shape** (SVG structure, click-through anchors) is *not* part of the stability surface and may evolve. Charter is **in effect as of 1.0.0**; the milestone tracker is [milestone 1.0](https://github.com/Rotorsoft/act-root/milestone/1).
189
+
190
+ ## Related packages
191
+
192
+ - **[@rotorsoft/act](https://www.npmjs.com/package/@rotorsoft/act)** — the framework whose builders this parses (`state`, `slice`, `projection`, `act`).
193
+ - **[@rotorsoft/act-inspector](https://github.com/rotorsoft/act-root/tree/master/packages/inspector)** — runtime observatory (sibling to this build-time tool). Inspector shows live events + drain state; diagram shows the structural contract.
194
+
195
+ ## Documentation
196
+
197
+ - **[Contracts CLI guide](https://rotorsoft.github.io/act-root/docs/guides/contracts-cli)** — full reference for the `act` CLI's interactive and non-interactive modes.
198
+ - **[State management](https://rotorsoft.github.io/act-root/docs/concepts/state-management)** — how the builders this parses compose into an app.
199
+ - **[`act-nvim`](https://github.com/Rotorsoft/act-nvim)** — Neovim integration repo.
261
200
 
262
201
  ## License
263
202