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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +181 -0
  3. package/dist/cli/index.d.ts +2 -0
  4. package/dist/cli/index.js +96 -0
  5. package/dist/cli/index.js.map +1 -0
  6. package/dist/cli/init.d.ts +5 -0
  7. package/dist/cli/init.js +69 -0
  8. package/dist/cli/init.js.map +1 -0
  9. package/dist/cli/mcp.d.ts +4 -0
  10. package/dist/cli/mcp.js +17 -0
  11. package/dist/cli/mcp.js.map +1 -0
  12. package/dist/cli/validate.d.ts +5 -0
  13. package/dist/cli/validate.js +77 -0
  14. package/dist/cli/validate.js.map +1 -0
  15. package/dist/cli/view.d.ts +6 -0
  16. package/dist/cli/view.js +37 -0
  17. package/dist/cli/view.js.map +1 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +2 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/mcp/server.d.ts +4 -0
  22. package/dist/mcp/server.js +293 -0
  23. package/dist/mcp/server.js.map +1 -0
  24. package/dist/server/app.d.ts +9 -0
  25. package/dist/server/app.js +135 -0
  26. package/dist/server/app.js.map +1 -0
  27. package/dist/server/drift.d.ts +29 -0
  28. package/dist/server/drift.js +128 -0
  29. package/dist/server/drift.js.map +1 -0
  30. package/dist/server/fileOps.d.ts +13 -0
  31. package/dist/server/fileOps.js +56 -0
  32. package/dist/server/fileOps.js.map +1 -0
  33. package/dist/server/findLoomRoot.d.ts +9 -0
  34. package/dist/server/findLoomRoot.js +28 -0
  35. package/dist/server/findLoomRoot.js.map +1 -0
  36. package/dist/server/watch.d.ts +29 -0
  37. package/dist/server/watch.js +83 -0
  38. package/dist/server/watch.js.map +1 -0
  39. package/dist/types/diagram.d.ts +99 -0
  40. package/dist/types/diagram.js +7 -0
  41. package/dist/types/diagram.js.map +1 -0
  42. package/dist/types/node-types.d.ts +55 -0
  43. package/dist/types/node-types.js +7 -0
  44. package/dist/types/node-types.js.map +1 -0
  45. package/dist/validate.d.ts +11 -0
  46. package/dist/validate.js +47 -0
  47. package/dist/validate.js.map +1 -0
  48. package/dist/view/assets/index-Cst6HUW5.css +1 -0
  49. package/dist/view/assets/index-jlp2cU4j.js +205 -0
  50. package/dist/view/index.html +24 -0
  51. package/package.json +83 -0
  52. package/schema/diagram.schema.json +173 -0
  53. package/schema/node-types.schema.json +116 -0
  54. package/templates/.claude/skills/loom-spec/SKILL.md +278 -0
  55. package/templates/.loom/README.md +25 -0
  56. package/templates/.loom/diagrams/overview.flow.json +8 -0
  57. 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,8 @@
1
+ {
2
+ "version": "1",
3
+ "id": "overview",
4
+ "title": "Overview",
5
+ "description": "Top-level architecture of this project.",
6
+ "nodes": [],
7
+ "edges": []
8
+ }
@@ -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
+ }