loom-spec 0.1.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/LICENSE +21 -0
- package/README.md +181 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +96 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +5 -0
- package/dist/cli/init.js +69 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/mcp.d.ts +4 -0
- package/dist/cli/mcp.js +17 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/validate.d.ts +5 -0
- package/dist/cli/validate.js +77 -0
- package/dist/cli/validate.js.map +1 -0
- package/dist/cli/view.d.ts +6 -0
- package/dist/cli/view.js +37 -0
- package/dist/cli/view.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.js +293 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/server/app.d.ts +9 -0
- package/dist/server/app.js +135 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/drift.d.ts +29 -0
- package/dist/server/drift.js +128 -0
- package/dist/server/drift.js.map +1 -0
- package/dist/server/fileOps.d.ts +13 -0
- package/dist/server/fileOps.js +56 -0
- package/dist/server/fileOps.js.map +1 -0
- package/dist/server/findLoomRoot.d.ts +9 -0
- package/dist/server/findLoomRoot.js +28 -0
- package/dist/server/findLoomRoot.js.map +1 -0
- package/dist/server/watch.d.ts +29 -0
- package/dist/server/watch.js +83 -0
- package/dist/server/watch.js.map +1 -0
- package/dist/types/diagram.d.ts +99 -0
- package/dist/types/diagram.js +7 -0
- package/dist/types/diagram.js.map +1 -0
- package/dist/types/node-types.d.ts +55 -0
- package/dist/types/node-types.js +7 -0
- package/dist/types/node-types.js.map +1 -0
- package/dist/validate.d.ts +11 -0
- package/dist/validate.js +47 -0
- package/dist/validate.js.map +1 -0
- package/dist/view/assets/index-Cst6HUW5.css +1 -0
- package/dist/view/assets/index-jlp2cU4j.js +205 -0
- package/dist/view/index.html +24 -0
- package/package.json +83 -0
- package/schema/diagram.schema.json +173 -0
- package/schema/node-types.schema.json +116 -0
- package/templates/.claude/skills/loom-spec/SKILL.md +278 -0
- package/templates/.loom/README.md +25 -0
- package/templates/.loom/diagrams/overview.flow.json +8 -0
- package/templates/.loom/node-types.json +56 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# .loom — Architecture Spec
|
|
2
|
+
|
|
3
|
+
This directory contains the node-based architecture spec for the project. It is **the source of truth** for how the app is structured, kept in sync with code by humans and AI agents together.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `node-types.json` — defines the available node types for this project. Customize freely; add types specific to your domain.
|
|
8
|
+
- `diagrams/*.flow.json` — one file per subsystem. Each is a self-contained graph.
|
|
9
|
+
- `timelines/*.timeline.json` — (future) time-axis views for sequenced behavior.
|
|
10
|
+
|
|
11
|
+
## Viewing and editing
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx loom-spec view
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Opens a browser-based editor on `localhost:7777`. Changes are written back to the JSON files.
|
|
18
|
+
|
|
19
|
+
## For AI agents
|
|
20
|
+
|
|
21
|
+
See `.claude/skills/loom-spec/SKILL.md`. The skill explains when to read and update these files.
|
|
22
|
+
|
|
23
|
+
## Format
|
|
24
|
+
|
|
25
|
+
See the JSON Schemas shipped with the `loom-spec` package.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"types": {
|
|
3
|
+
"ui": {
|
|
4
|
+
"label": "UI Component",
|
|
5
|
+
"description": "User-facing component (page, view, widget).",
|
|
6
|
+
"color": "#60a5fa",
|
|
7
|
+
"icon": "monitor",
|
|
8
|
+
"fields": [
|
|
9
|
+
{ "name": "framework", "type": "string", "required": false }
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"service": {
|
|
13
|
+
"label": "Service",
|
|
14
|
+
"description": "Backend service, API, or business-logic module.",
|
|
15
|
+
"color": "#34d399",
|
|
16
|
+
"icon": "server",
|
|
17
|
+
"fields": [
|
|
18
|
+
{ "name": "language", "type": "string", "required": false },
|
|
19
|
+
{ "name": "runtime", "type": "string", "required": false }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"data": {
|
|
23
|
+
"label": "Data Store",
|
|
24
|
+
"description": "Persistent or cached data location.",
|
|
25
|
+
"color": "#a78bfa",
|
|
26
|
+
"icon": "database",
|
|
27
|
+
"fields": [
|
|
28
|
+
{
|
|
29
|
+
"name": "engine",
|
|
30
|
+
"type": "enum",
|
|
31
|
+
"values": ["postgres", "mysql", "sqlite", "redis", "s3", "file", "memory"],
|
|
32
|
+
"required": false
|
|
33
|
+
},
|
|
34
|
+
{ "name": "ttl_seconds", "type": "number", "required": false }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"event": {
|
|
38
|
+
"label": "Event",
|
|
39
|
+
"description": "Asynchronous message or domain event.",
|
|
40
|
+
"color": "#fbbf24",
|
|
41
|
+
"icon": "zap",
|
|
42
|
+
"fields": [
|
|
43
|
+
{ "name": "channel", "type": "string", "required": false }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"external": {
|
|
47
|
+
"label": "External System",
|
|
48
|
+
"description": "Third-party service or system outside this codebase.",
|
|
49
|
+
"color": "#94a3b8",
|
|
50
|
+
"icon": "globe",
|
|
51
|
+
"fields": [
|
|
52
|
+
{ "name": "url", "type": "string", "required": false }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|