@magic-spells/constellation 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 +674 -0
- package/README.md +147 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +127 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/extract.d.ts +9 -0
- package/dist/core/extract.js +56 -0
- package/dist/core/extract.js.map +1 -0
- package/dist/core/handles.d.ts +13 -0
- package/dist/core/handles.js +45 -0
- package/dist/core/handles.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/indexer.d.ts +3 -0
- package/dist/core/indexer.js +209 -0
- package/dist/core/indexer.js.map +1 -0
- package/dist/core/lint.d.ts +9 -0
- package/dist/core/lint.js +19 -0
- package/dist/core/lint.js.map +1 -0
- package/dist/core/parse.d.ts +7 -0
- package/dist/core/parse.js +19 -0
- package/dist/core/parse.js.map +1 -0
- package/dist/core/resolve.d.ts +12 -0
- package/dist/core/resolve.js +57 -0
- package/dist/core/resolve.js.map +1 -0
- package/dist/core/scaffold.d.ts +3 -0
- package/dist/core/scaffold.js +36 -0
- package/dist/core/scaffold.js.map +1 -0
- package/dist/core/types.d.ts +50 -0
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validate.d.ts +6 -0
- package/dist/core/validate.js +64 -0
- package/dist/core/validate.js.map +1 -0
- package/dist/core/writer.d.ts +34 -0
- package/dist/core/writer.js +170 -0
- package/dist/core/writer.js.map +1 -0
- package/dist/mcp/git.d.ts +34 -0
- package/dist/mcp/git.js +172 -0
- package/dist/mcp/git.js.map +1 -0
- package/dist/mcp/search.d.ts +11 -0
- package/dist/mcp/search.js +52 -0
- package/dist/mcp/search.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.js +684 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/serve/server.d.ts +12 -0
- package/dist/serve/server.js +281 -0
- package/dist/serve/server.js.map +1 -0
- package/docs/001-file-format.md +222 -0
- package/docs/002-mcp.md +109 -0
- package/examples/constellation/agent/AGENT-CODE-STYLE.md +14 -0
- package/examples/constellation/api/API-TICKETS.md +24 -0
- package/examples/constellation/component/COMPONENT-TICKET-CARD.md +16 -0
- package/examples/constellation/datatype/DATATYPE-CREATE-TICKET-INPUT.md +15 -0
- package/examples/constellation/datatype/DATATYPE-TICKET.md +20 -0
- package/examples/constellation/db/DB-TICKETS.md +21 -0
- package/examples/constellation/diagram/DIAGRAM-SYSTEM-OVERVIEW.md +19 -0
- package/examples/constellation/doc/DOC-TICKET-LIFECYCLE.md +22 -0
- package/examples/constellation/event/EVENT-TICKET-CREATED.md +13 -0
- package/examples/constellation/external/EXTERNAL-EMAIL-PROVIDER.md +13 -0
- package/examples/constellation/file/FILE-TICKETS-ROUTE.md +12 -0
- package/examples/constellation/flow/FLOW-CREATE-TICKET.md +16 -0
- package/examples/constellation/job/JOB-AUTO-ASSIGN.md +15 -0
- package/examples/constellation/page/PAGE-INBOX.md +19 -0
- package/examples/constellation/plan.md +23 -0
- package/examples/constellation/role/ROLE-SUPPORT-AGENT.md +12 -0
- package/examples/constellation/state/STATE-TICKET.md +31 -0
- package/examples/constellation/test/TEST-CREATE-TICKET.md +17 -0
- package/package.json +80 -0
- package/schemas/agent.json +21 -0
- package/schemas/api.json +47 -0
- package/schemas/card.json +37 -0
- package/schemas/component.json +40 -0
- package/schemas/datatype.json +8 -0
- package/schemas/db.json +51 -0
- package/schemas/diagram.json +95 -0
- package/schemas/doc.json +8 -0
- package/schemas/event.json +28 -0
- package/schemas/external.json +24 -0
- package/schemas/file.json +22 -0
- package/schemas/flow.json +20 -0
- package/schemas/job.json +25 -0
- package/schemas/page.json +36 -0
- package/schemas/plan.json +13 -0
- package/schemas/role.json +18 -0
- package/schemas/state.json +35 -0
- package/schemas/test.json +13 -0
- package/skill/SKILL.md +105 -0
- package/skill/types/agent.md +26 -0
- package/skill/types/api.md +38 -0
- package/skill/types/component.md +30 -0
- package/skill/types/datatype.md +26 -0
- package/skill/types/db.md +33 -0
- package/skill/types/diagram.md +32 -0
- package/skill/types/doc.md +23 -0
- package/skill/types/event.md +31 -0
- package/skill/types/external.md +30 -0
- package/skill/types/file.md +28 -0
- package/skill/types/flow.md +29 -0
- package/skill/types/job.md +27 -0
- package/skill/types/page.md +28 -0
- package/skill/types/plan.md +37 -0
- package/skill/types/role.md +25 -0
- package/skill/types/state.md +38 -0
- package/skill/types/test.md +28 -0
- package/viewer/dist/assets/arc-Kj6pF3JI.js +1 -0
- package/viewer/dist/assets/architecture-7EHR7CIX-CGfWeim3.js +1 -0
- package/viewer/dist/assets/architectureDiagram-3BPJPVTR-C5bZdErB.js +36 -0
- package/viewer/dist/assets/array-BifhSqXX.js +1 -0
- package/viewer/dist/assets/blockDiagram-GPEHLZMM-C1Q6l6fE.js +132 -0
- package/viewer/dist/assets/c4Diagram-AAUBKEIU-BmM6Tmtq.js +10 -0
- package/viewer/dist/assets/channel-19IdUS_c.js +1 -0
- package/viewer/dist/assets/chunk-2J33WTMH-z09tLTpZ.js +1 -0
- package/viewer/dist/assets/chunk-3OPIFGDE-BynpXh1r.js +62 -0
- package/viewer/dist/assets/chunk-4BX2VUAB-CDOVuPyG.js +1 -0
- package/viewer/dist/assets/chunk-55IACEB6-nBwigOgn.js +1 -0
- package/viewer/dist/assets/chunk-5ZQYHXKU-Bxe5xIy_.js +2 -0
- package/viewer/dist/assets/chunk-727SXJPM-DZmTgL68.js +206 -0
- package/viewer/dist/assets/chunk-AQP2D5EJ-B7wr_Owx.js +231 -0
- package/viewer/dist/assets/chunk-BSJP7CBP-DbAKfVCK.js +1 -0
- package/viewer/dist/assets/chunk-CSCIHK7Q-C0rsBwqP.js +124 -0
- package/viewer/dist/assets/chunk-FMBD7UC4-BAtzt0wv.js +15 -0
- package/viewer/dist/assets/chunk-KSCS5N6A-CXXwf52I.js +10 -0
- package/viewer/dist/assets/chunk-L5ZTLDWV-DS4vRI1U.js +1 -0
- package/viewer/dist/assets/chunk-LZXEDZCA-CclT9MXr.js +2 -0
- package/viewer/dist/assets/chunk-ND2GUHAM-CUSnPl8t.js +1 -0
- package/viewer/dist/assets/chunk-NNHCCRGN-DlpIbxXb.js +159 -0
- package/viewer/dist/assets/chunk-NZK2D7GU-Dh986nJk.js +1 -0
- package/viewer/dist/assets/chunk-O5CBEL6O-JAEZ_pS6.js +70 -0
- package/viewer/dist/assets/chunk-QZHKN3VN-BKc_Kg2Z.js +1 -0
- package/viewer/dist/assets/chunk-WU5MYG2G-9ssTSMzt.js +1 -0
- package/viewer/dist/assets/chunk-XPW4576I-BwMZI0gv.js +32 -0
- package/viewer/dist/assets/classDiagram-4FO5ZUOK-DXv85WFd.js +1 -0
- package/viewer/dist/assets/classDiagram-v2-Q7XG4LA2-DXv85WFd.js +1 -0
- package/viewer/dist/assets/cose-bilkent-S5V4N54A-NGC7gYHM.js +1 -0
- package/viewer/dist/assets/cytoscape.esm-h6BdjjI9.js +321 -0
- package/viewer/dist/assets/dagre-BM42HDAG-RD63uyvd.js +4 -0
- package/viewer/dist/assets/dagre-Bx709z4p.js +1 -0
- package/viewer/dist/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/viewer/dist/assets/diagram-2AECGRRQ-hwnqqCcb.js +43 -0
- package/viewer/dist/assets/diagram-5GNKFQAL-q8EaoZSG.js +10 -0
- package/viewer/dist/assets/diagram-KO2AKTUF-D4_5Qf-l.js +3 -0
- package/viewer/dist/assets/diagram-LMA3HP47-D8pwekFs.js +24 -0
- package/viewer/dist/assets/diagram-OG6HWLK6-D9KinIWZ.js +24 -0
- package/viewer/dist/assets/dist-CFOOgrqc.js +1 -0
- package/viewer/dist/assets/erDiagram-TEJ5UH35-D0Wfq250.js +85 -0
- package/viewer/dist/assets/eventmodeling-FCH6USID-D3KRSuC1.js +1 -0
- package/viewer/dist/assets/flowDiagram-I6XJVG4X-Y2DY-Ze2.js +162 -0
- package/viewer/dist/assets/ganttDiagram-6RSMTGT7-BnqkeLVw.js +292 -0
- package/viewer/dist/assets/gitGraph-WXDBUCRP-Cft7usRT.js +1 -0
- package/viewer/dist/assets/gitGraphDiagram-PVQCEYII-D-cYtraK.js +106 -0
- package/viewer/dist/assets/graphlib-B8gBHxth.js +1 -0
- package/viewer/dist/assets/index-CDR-riG2.css +2 -0
- package/viewer/dist/assets/index-DRPsTWe2.js +98 -0
- package/viewer/dist/assets/info-J43DQDTF-Djc8Bx3F.js +1 -0
- package/viewer/dist/assets/infoDiagram-5YYISTIA-D-ehtyyJ.js +2 -0
- package/viewer/dist/assets/init-D6jRqBbL.js +1 -0
- package/viewer/dist/assets/ishikawaDiagram-YF4QCWOH-Ct3f6bH-.js +70 -0
- package/viewer/dist/assets/journeyDiagram-JHISSGLW-DXlULEmi.js +139 -0
- package/viewer/dist/assets/kanban-definition-UN3LZRKU-3vE9h-R7.js +89 -0
- package/viewer/dist/assets/katex-Vhh-h91d.js +257 -0
- package/viewer/dist/assets/line-B8MygbLB.js +1 -0
- package/viewer/dist/assets/linear-CfMuM0B3.js +1 -0
- package/viewer/dist/assets/mermaid-parser.core-DzlZTbbh.js +4 -0
- package/viewer/dist/assets/mermaid.core-IM-sPiyq.js +9 -0
- package/viewer/dist/assets/mindmap-definition-RKZ34NQL-CMnpAq1T.js +96 -0
- package/viewer/dist/assets/ordinal-hYBb2elL.js +1 -0
- package/viewer/dist/assets/packet-YPE3B663-D44AzgHh.js +1 -0
- package/viewer/dist/assets/path-BWPyau1x.js +1 -0
- package/viewer/dist/assets/pie-LRSECV5Y-DL8AVJH_.js +1 -0
- package/viewer/dist/assets/pieDiagram-4H26LBE5-FvKK5jd7.js +30 -0
- package/viewer/dist/assets/quadrantDiagram-W4KKPZXB-CmjSkU8c.js +7 -0
- package/viewer/dist/assets/radar-GUYGQ44K-BvfZTVyH.js +1 -0
- package/viewer/dist/assets/requirementDiagram-4Y6WPE33-BOjca3VH.js +84 -0
- package/viewer/dist/assets/rough.esm-CSKSodPl.js +1 -0
- package/viewer/dist/assets/sankeyDiagram-5OEKKPKP-ANcjfNix.js +40 -0
- package/viewer/dist/assets/sequenceDiagram-3UESZ5HK-BLQ9AL7I.js +162 -0
- package/viewer/dist/assets/src-CAMdANUp.js +1 -0
- package/viewer/dist/assets/stateDiagram-AJRCARHV-D6CriBS6.js +1 -0
- package/viewer/dist/assets/stateDiagram-v2-BHNVJYJU-DcTp66RQ.js +1 -0
- package/viewer/dist/assets/timeline-definition-PNZ67QCA-BNhWZ_DL.js +120 -0
- package/viewer/dist/assets/treeView-BLDUP644-CY6Ph5Pu.js +1 -0
- package/viewer/dist/assets/treemap-LRROVOQU-DChSA_Qx.js +1 -0
- package/viewer/dist/assets/vennDiagram-CIIHVFJN-C01WznAC.js +34 -0
- package/viewer/dist/assets/wardley-L42UT6IY-BJ8uNoJu.js +1 -0
- package/viewer/dist/assets/wardleyDiagram-YWT4CUSO-DwDEzlVm.js +78 -0
- package/viewer/dist/assets/xychartDiagram-2RQKCTM6-BCvIDwU0.js +7 -0
- package/viewer/dist/index.html +20 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "component.json",
|
|
4
|
+
"title": "COMPONENT card frontmatter",
|
|
5
|
+
"description": "Reusable UI component.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"framework": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "e.g. svelte, react, web-component"
|
|
11
|
+
},
|
|
12
|
+
"props": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": { "type": "string" },
|
|
18
|
+
"type": { "type": "string" },
|
|
19
|
+
"required": { "type": "boolean" }
|
|
20
|
+
},
|
|
21
|
+
"required": ["name"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"slots": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"name": { "type": "string" },
|
|
30
|
+
"accepts": { "type": "array", "items": { "type": "string" } }
|
|
31
|
+
},
|
|
32
|
+
"required": ["name"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"variants": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "datatype.json",
|
|
4
|
+
"title": "DATATYPE card frontmatter",
|
|
5
|
+
"description": "Data type schema. No structured fields: the type declaration lives in the body as a fenced code block (```ts, ```sql, etc.).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {}
|
|
8
|
+
}
|
package/schemas/db.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "db.json",
|
|
4
|
+
"title": "DB card frontmatter",
|
|
5
|
+
"description": "Database table or collection. Suggested kinds: sql-table, document-collection, kv, time-series, graph.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"table_name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Physical table/collection name, e.g. tickets"
|
|
11
|
+
},
|
|
12
|
+
"columns": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": { "type": "string" },
|
|
18
|
+
"sql_type": { "type": "string" },
|
|
19
|
+
"primary_key": { "type": "boolean" },
|
|
20
|
+
"not_null": { "type": "boolean" },
|
|
21
|
+
"unique": { "type": "boolean" },
|
|
22
|
+
"default": { "type": "string" }
|
|
23
|
+
},
|
|
24
|
+
"required": ["name"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"indexes": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"name": { "type": "string" },
|
|
33
|
+
"columns": { "type": "array", "items": { "type": "string" } },
|
|
34
|
+
"unique": { "type": "boolean" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"foreign_keys": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"columns": { "type": "array", "items": { "type": "string" } },
|
|
44
|
+
"references_table": { "type": "string" },
|
|
45
|
+
"references_columns": { "type": "array", "items": { "type": "string" } },
|
|
46
|
+
"on_delete": { "type": "string" }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "diagram.json",
|
|
4
|
+
"title": "DIAGRAM card frontmatter",
|
|
5
|
+
"description": "Architecture diagram. Default: a ```mermaid block in the body (handles as node IDs). These structured fields are the pinned-layout escape hatch for curated diagrams where positions carry meaning.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"nodes": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"maxItems": 300,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
15
|
+
"label": { "type": "string", "maxLength": 200 },
|
|
16
|
+
"shape": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"rounded_rectangle", "rectangle", "pill", "cylinder", "queue",
|
|
19
|
+
"hexagon", "cloud", "actor", "diamond", "circle", "note"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"group": {
|
|
23
|
+
"enum": [
|
|
24
|
+
"client", "service", "middleware", "gateway",
|
|
25
|
+
"datastore", "queue", "external", "infra"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"position": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"x": { "type": "number" },
|
|
32
|
+
"y": { "type": "number" }
|
|
33
|
+
},
|
|
34
|
+
"required": ["x", "y"]
|
|
35
|
+
},
|
|
36
|
+
"size": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"w": { "type": "number", "exclusiveMinimum": 0 },
|
|
40
|
+
"h": { "type": "number", "exclusiveMinimum": 0 }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"phase": { "$ref": "#/$defs/slug" },
|
|
44
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
45
|
+
"refs": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"maxItems": 50,
|
|
48
|
+
"items": { "$ref": "card.json#/$defs/handle" },
|
|
49
|
+
"description": "Handles of the cards this diagram node depicts."
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": ["id", "label", "position"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"edges": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"maxItems": 1000,
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"from": { "$ref": "#/$defs/slug" },
|
|
62
|
+
"to": { "$ref": "#/$defs/slug" },
|
|
63
|
+
"label": { "type": "string", "maxLength": 200 },
|
|
64
|
+
"direction": { "enum": ["from_to", "to_from", "both", "none"] },
|
|
65
|
+
"style": { "enum": ["solid", "dashed"] },
|
|
66
|
+
"from_side": { "enum": ["top", "right", "bottom", "left"] },
|
|
67
|
+
"to_side": { "enum": ["top", "right", "bottom", "left"] },
|
|
68
|
+
"phase": { "$ref": "#/$defs/slug" }
|
|
69
|
+
},
|
|
70
|
+
"required": ["from", "to"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"phases": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"maxItems": 20,
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
80
|
+
"label": { "type": "string", "maxLength": 120 },
|
|
81
|
+
"order": { "type": "integer", "minimum": 0 }
|
|
82
|
+
},
|
|
83
|
+
"required": ["id", "label", "order"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"$defs": {
|
|
88
|
+
"slug": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"maxLength": 64
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
package/schemas/doc.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "doc.json",
|
|
4
|
+
"title": "DOC card frontmatter",
|
|
5
|
+
"description": "Documentation card. No structured fields: prose lives in the body. Suggested kinds: guide, rule, decision, meta.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {}
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "event.json",
|
|
4
|
+
"title": "EVENT card frontmatter",
|
|
5
|
+
"description": "Domain event or signal. References are handles.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"emitter": {
|
|
9
|
+
"$ref": "card.json#/$defs/handle",
|
|
10
|
+
"description": "Handle of the card that emits this event."
|
|
11
|
+
},
|
|
12
|
+
"payload_schema": {
|
|
13
|
+
"$ref": "card.json#/$defs/handle",
|
|
14
|
+
"description": "Handle of the DATATYPE card describing the payload."
|
|
15
|
+
},
|
|
16
|
+
"delivery_semantics": {
|
|
17
|
+
"enum": ["at-least-once", "at-most-once", "exactly-once"]
|
|
18
|
+
},
|
|
19
|
+
"ordering": {
|
|
20
|
+
"enum": ["per-aggregate", "total", "none"]
|
|
21
|
+
},
|
|
22
|
+
"idempotency_key_field": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Payload field consumers dedupe on, e.g. event_id."
|
|
25
|
+
},
|
|
26
|
+
"version": { "type": "integer", "minimum": 1 }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "external.json",
|
|
4
|
+
"title": "EXTERNAL card frontmatter",
|
|
5
|
+
"description": "External service or integration. Suggested kinds: saas-vendor, cloud-infra, external-microservice, hardware-peripheral.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"vendor": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Vendor or platform name, e.g. Stripe."
|
|
11
|
+
},
|
|
12
|
+
"purpose": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "What this service is used for."
|
|
15
|
+
},
|
|
16
|
+
"docs_url": { "type": "string" },
|
|
17
|
+
"status_url": { "type": "string" },
|
|
18
|
+
"credentials_envs": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string" },
|
|
21
|
+
"description": "Environment variable NAMES holding credentials. Never values."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "file.json",
|
|
4
|
+
"title": "FILE card frontmatter",
|
|
5
|
+
"description": "Source file reference. The only card type with a required field: a file reference without a path refers to nothing.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Path relative to the repo root, e.g. src/api/tickets.ts"
|
|
11
|
+
},
|
|
12
|
+
"language": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "e.g. typescript, python, go"
|
|
15
|
+
},
|
|
16
|
+
"summary": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "One-line description of what the file does."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["path"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "flow.json",
|
|
4
|
+
"title": "FLOW card frontmatter",
|
|
5
|
+
"description": "Multi-step sequenced process. Steps live in the BODY as a numbered markdown list (with nested items for edge cases), not in frontmatter.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"triggers": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"kind": { "enum": ["cron", "event", "manual"] },
|
|
14
|
+
"schedule": { "type": "string" },
|
|
15
|
+
"event": { "$ref": "card.json#/$defs/handle" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/schemas/job.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "job.json",
|
|
4
|
+
"title": "JOB card frontmatter",
|
|
5
|
+
"description": "Background, scheduled, or queue-triggered work.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"trigger": {
|
|
9
|
+
"enum": ["cron", "queue", "event", "manual"]
|
|
10
|
+
},
|
|
11
|
+
"schedule": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Cron expression when trigger is cron, e.g. */15 * * * *"
|
|
14
|
+
},
|
|
15
|
+
"flow": {
|
|
16
|
+
"$ref": "card.json#/$defs/handle",
|
|
17
|
+
"description": "Handle of the FLOW this job executes, if any."
|
|
18
|
+
},
|
|
19
|
+
"max_retries": { "type": "integer", "minimum": 0 },
|
|
20
|
+
"idempotency_key": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Field or expression that makes runs idempotent."
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "page.json",
|
|
4
|
+
"title": "PAGE card frontmatter",
|
|
5
|
+
"description": "Frontend route/screen. Route fields are flat (no nested route object).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"route": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "URL pattern, e.g. /inbox/:ticket_id"
|
|
11
|
+
},
|
|
12
|
+
"parent": {
|
|
13
|
+
"$ref": "card.json#/$defs/handle",
|
|
14
|
+
"description": "Handle of the parent PAGE (layout/shell) this page nests under."
|
|
15
|
+
},
|
|
16
|
+
"path_params": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": { "$ref": "#/$defs/param" }
|
|
19
|
+
},
|
|
20
|
+
"query_params": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "$ref": "#/$defs/param" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"param": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"name": { "type": "string" },
|
|
30
|
+
"type": { "type": "string" },
|
|
31
|
+
"required": { "type": "boolean" }
|
|
32
|
+
},
|
|
33
|
+
"required": ["name"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "plan.json",
|
|
4
|
+
"title": "PLAN card frontmatter",
|
|
5
|
+
"description": "Plan document. constellation/plan.md is PLAN-PROJECT; scoped plans (PLAN-FRONTEND) live in plan/. Keep plans short — decisions belong in DOC cards (kind: decision), status on the cards themselves.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"scope": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Area this plan covers, e.g. frontend. Omit for the project plan."
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "role.json",
|
|
4
|
+
"title": "ROLE card frontmatter",
|
|
5
|
+
"description": "User role or permission group.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"permissions": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": { "type": "string" },
|
|
11
|
+
"description": "Permission strings, conventionally resource:action (e.g. tickets:read)."
|
|
12
|
+
},
|
|
13
|
+
"issued_by": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Who grants this role, e.g. app, org, tenant, os."
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "state.json",
|
|
4
|
+
"title": "STATE card frontmatter",
|
|
5
|
+
"description": "State machine. Prefer a ```mermaid stateDiagram-v2 block in the body; structured states/transitions are optional for tooling that needs them.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"states": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"name": { "type": "string" },
|
|
14
|
+
"initial": { "type": "boolean" },
|
|
15
|
+
"terminal": { "type": "boolean" }
|
|
16
|
+
},
|
|
17
|
+
"required": ["name"]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"transitions": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"from": { "type": "string" },
|
|
26
|
+
"to": { "type": "string" },
|
|
27
|
+
"event": { "$ref": "card.json#/$defs/handle" },
|
|
28
|
+
"guard": { "type": "string" },
|
|
29
|
+
"action": { "type": "string" }
|
|
30
|
+
},
|
|
31
|
+
"required": ["from", "to"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "test.json",
|
|
4
|
+
"title": "TEST card frontmatter",
|
|
5
|
+
"description": "Test spec. Use the reserved kind for the category (unit, integration, e2e). Connect to the cards the test covers.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"framework": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Test runner, e.g. vitest, jest, pytest, playwright."
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: constellation
|
|
3
|
+
description: Author and edit Constellation plan cards — markdown files in a constellation/ folder that model a project's architecture as a typed, connected graph. Use when creating, updating, or querying cards (API endpoints, data types, DB tables, flows, pages, etc.) in any repo with a constellation/ directory.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Constellation cards
|
|
7
|
+
|
|
8
|
+
A Constellation plan is a folder of markdown files. Each file is one **card** — one
|
|
9
|
+
typed piece of the plan, linked to other cards by **connections**. Filenames are
|
|
10
|
+
identities, frontmatter is structure, the body is prose, and git is the
|
|
11
|
+
change-tracking system.
|
|
12
|
+
|
|
13
|
+
## The one rule that matters most
|
|
14
|
+
|
|
15
|
+
**The filename is the handle.** `constellation/api/API-TICKETS.md` defines the card
|
|
16
|
+
`API-TICKETS`. The prefix (before the first dash) determines the type. Never put
|
|
17
|
+
`handle:` or `type:` in frontmatter.
|
|
18
|
+
|
|
19
|
+
Handle grammar: `^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9-]*$` — uppercase letters, digits,
|
|
20
|
+
dashes only. No underscores, no lowercase.
|
|
21
|
+
|
|
22
|
+
## Types, prefixes, folders
|
|
23
|
+
|
|
24
|
+
| Prefix | Folder | Use for | Reference |
|
|
25
|
+
|--------------|--------------|----------------------------------|----------------------|
|
|
26
|
+
| `API-` | `api/` | HTTP/RPC endpoints | `types/api.md` |
|
|
27
|
+
| `DB-` | `db/` | Tables / collections | `types/db.md` |
|
|
28
|
+
| `DATATYPE-` | `datatype/` | Type schemas | `types/datatype.md` |
|
|
29
|
+
| `ROLE-` | `role/` | Roles / permissions | `types/role.md` |
|
|
30
|
+
| `DOC-` | `doc/` | Documentation, rules, decisions | `types/doc.md` |
|
|
31
|
+
| `FILE-` | `file/` | Source file references | `types/file.md` |
|
|
32
|
+
| `TEST-` | `test/` | Test specs | `types/test.md` |
|
|
33
|
+
| `EXTERNAL-` | `external/` | External services | `types/external.md` |
|
|
34
|
+
| `EVENT-` | `event/` | Domain events | `types/event.md` |
|
|
35
|
+
| `COMPONENT-` | `component/` | UI components | `types/component.md` |
|
|
36
|
+
| `PAGE-` | `page/` | Routes / screens | `types/page.md` |
|
|
37
|
+
| `JOB-` | `job/` | Background / scheduled work | `types/job.md` |
|
|
38
|
+
| `FLOW-` | `flow/` | Step-by-step processes | `types/flow.md` |
|
|
39
|
+
| `STATE-` | `state/` | State machines | `types/state.md` |
|
|
40
|
+
| `DIAGRAM-` | `diagram/` | Architecture diagrams | `types/diagram.md` |
|
|
41
|
+
| `AGENT-` | `agent/` | AI agent instructions | `types/agent.md` |
|
|
42
|
+
| `PLAN-` | `plan/` | Plan docs (`plan.md` at root = `PLAN-PROJECT`) | `types/plan.md` |
|
|
43
|
+
|
|
44
|
+
Read the matching `types/<type>.md` before writing a card of a type you haven't
|
|
45
|
+
authored in this session — it has the field table and a golden example.
|
|
46
|
+
|
|
47
|
+
## Frontmatter
|
|
48
|
+
|
|
49
|
+
Four reserved keys, all optional. Everything else is a type-specific field (see the
|
|
50
|
+
type reference). Don't invent fields when the type reference defines one for the
|
|
51
|
+
purpose — but unknown extra fields are allowed (lint warns, doesn't fail).
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
name: List & create tickets # display label (handle is the identity)
|
|
55
|
+
kind: sql-table # lowercase-slug subtype, when the type has variants
|
|
56
|
+
status: built # planned | building | built | verified
|
|
57
|
+
connections: # plain list of handles — no kinds, no direction
|
|
58
|
+
- DB-TICKETS
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Connections — how the graph gets wired
|
|
62
|
+
|
|
63
|
+
Connections are undirected and come from four places; all count equally:
|
|
64
|
+
|
|
65
|
+
1. The `connections:` list.
|
|
66
|
+
2. Any handle-shaped value in other frontmatter fields (`response_schema: DATATYPE-TICKET`
|
|
67
|
+
connects automatically — don't repeat it in `connections`).
|
|
68
|
+
3. `[[HANDLE]]` wiki-links in the body — use these freely in prose; they're the
|
|
69
|
+
cheapest way to connect cards.
|
|
70
|
+
4. Handle-shaped node IDs inside ```mermaid blocks.
|
|
71
|
+
|
|
72
|
+
Declare a connection on whichever card you're editing — the other card sees it via
|
|
73
|
+
the index. Never edit two cards just to record one connection.
|
|
74
|
+
|
|
75
|
+
**Frontmatter references must resolve** (lint error if the target card doesn't
|
|
76
|
+
exist). Body `[[links]]` may point at cards not yet written (lint warning only) —
|
|
77
|
+
that's how you mark future work.
|
|
78
|
+
|
|
79
|
+
## Body conventions
|
|
80
|
+
|
|
81
|
+
- DATATYPE: the type declaration as a fenced code block (```ts).
|
|
82
|
+
- FLOW: a numbered markdown list of steps; nested items for error/edge branches.
|
|
83
|
+
If it genuinely branches, it's a Mermaid flowchart or a STATE card instead.
|
|
84
|
+
- STATE: a ```mermaid stateDiagram-v2 block.
|
|
85
|
+
- DIAGRAM: a ```mermaid flowchart with **handles as node IDs** so the diagram joins
|
|
86
|
+
the graph.
|
|
87
|
+
- Everything else: prose with `[[links]]`. Put relationship nuance in prose, not
|
|
88
|
+
in structure.
|
|
89
|
+
|
|
90
|
+
## Workflow
|
|
91
|
+
|
|
92
|
+
1. Before creating a card, check it doesn't exist: the filename is deterministic,
|
|
93
|
+
so look up `constellation/<folder>/<HANDLE>.md`; grep for the handle to find
|
|
94
|
+
prose references.
|
|
95
|
+
2. Write or edit the card.
|
|
96
|
+
3. Verify: `npx constellation lint` (errors break the graph and must be fixed;
|
|
97
|
+
warnings are quality signals).
|
|
98
|
+
4. Update `status` when reality changes: `planned → building → built`, and
|
|
99
|
+
`verified` only after checking the card against the actual code.
|
|
100
|
+
5. Never bulk-rewrite `constellation/plan.md` — edit the relevant section.
|
|
101
|
+
Decisions go in DOC cards (`kind: decision`), one file each, not in the plan.
|
|
102
|
+
|
|
103
|
+
"What changed in the plan" is never tracked in cards — that's
|
|
104
|
+
`git diff -- constellation/`. Don't add dirty flags, changelogs, or timestamps to
|
|
105
|
+
frontmatter.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# AGENT cards (`AGENT-`, `agent/`)
|
|
2
|
+
|
|
3
|
+
AI agent instructions/policies — the plan-level equivalent of a scoped CLAUDE.md.
|
|
4
|
+
The instruction text is the body.
|
|
5
|
+
|
|
6
|
+
| Field | Type | Notes |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| `scope` | string | glob/directory the rules apply to |
|
|
9
|
+
| `applies_to` | string | `all-agents` or a specific role |
|
|
10
|
+
| `priority` | integer | higher loads first |
|
|
11
|
+
|
|
12
|
+
Example — `constellation/agent/AGENT-CODE-STYLE.md`:
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
---
|
|
16
|
+
name: Code style rules
|
|
17
|
+
status: built
|
|
18
|
+
scope: src/**
|
|
19
|
+
applies_to: all-agents
|
|
20
|
+
priority: 1
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
- TypeScript strict mode; no `any` without a comment explaining why.
|
|
24
|
+
- Route handlers validate input with the shapes from [[DATATYPE-TICKET]] —
|
|
25
|
+
never hand-rolled checks.
|
|
26
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# API cards (`API-`, `api/`)
|
|
2
|
+
|
|
3
|
+
One card per endpoint path (methods nest inside). Schema references are DATATYPE
|
|
4
|
+
handles and connect automatically.
|
|
5
|
+
|
|
6
|
+
| Field | Type | Notes |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| `path` | string | URL pattern, e.g. `/api/v1/tickets/:id` |
|
|
9
|
+
| `path_params` | array | `{ name, type?, required?, default?, notes? }` |
|
|
10
|
+
| `methods` | object | Keys: `GET POST PUT PATCH DELETE HEAD OPTIONS` |
|
|
11
|
+
| `methods.<VERB>.query_params` | array | same param shape |
|
|
12
|
+
| `methods.<VERB>.request_schema` | handle | DATATYPE card |
|
|
13
|
+
| `methods.<VERB>.response_schema` | handle | DATATYPE card |
|
|
14
|
+
|
|
15
|
+
Example — `constellation/api/API-TICKETS.md`:
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
---
|
|
19
|
+
name: List & create tickets
|
|
20
|
+
status: built
|
|
21
|
+
path: /api/v1/tickets
|
|
22
|
+
methods:
|
|
23
|
+
GET:
|
|
24
|
+
query_params:
|
|
25
|
+
- { name: status, type: string }
|
|
26
|
+
response_schema: DATATYPE-TICKET
|
|
27
|
+
POST:
|
|
28
|
+
request_schema: DATATYPE-CREATE-TICKET-INPUT
|
|
29
|
+
response_schema: DATATYPE-TICKET
|
|
30
|
+
connections:
|
|
31
|
+
- DB-TICKETS
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# Tickets API
|
|
35
|
+
|
|
36
|
+
GET returns tickets filtered by status. POST is the public intake endpoint and
|
|
37
|
+
emits [[EVENT-TICKET-CREATED]] after insert — see [[FLOW-CREATE-TICKET]].
|
|
38
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# COMPONENT cards (`COMPONENT-`, `component/`)
|
|
2
|
+
|
|
3
|
+
One card per reusable UI component. Prop types may be handles
|
|
4
|
+
(`type: DATATYPE-TICKET`) — those connect automatically.
|
|
5
|
+
|
|
6
|
+
| Field | Type | Notes |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| `framework` | string | `svelte`, `react`, `web-component`, … |
|
|
9
|
+
| `props` | array | `{ name, type?, required? }` |
|
|
10
|
+
| `slots` | array | `{ name, accepts? }` |
|
|
11
|
+
| `variants` | string[] | |
|
|
12
|
+
|
|
13
|
+
Example — `constellation/component/COMPONENT-TICKET-CARD.md`:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
---
|
|
17
|
+
name: Ticket card
|
|
18
|
+
status: building
|
|
19
|
+
framework: svelte
|
|
20
|
+
props:
|
|
21
|
+
- { name: ticket, type: DATATYPE-TICKET, required: true }
|
|
22
|
+
- { name: selected, type: boolean }
|
|
23
|
+
variants: [default, compact]
|
|
24
|
+
connections:
|
|
25
|
+
- PAGE-INBOX
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
One ticket in the inbox list: subject, requester, status chip, age. The status
|
|
29
|
+
chip colors follow [[STATE-TICKET]].
|
|
30
|
+
```
|