modscape 1.2.0 → 1.3.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/README.ja.md +152 -22
- package/README.md +139 -31
- package/package.json +3 -2
- package/src/export.js +57 -1
- package/src/import-dbt.js +181 -0
- package/src/index.js +38 -1
- package/src/init.js +17 -7
- package/src/merge.js +74 -0
- package/src/sync-dbt.js +146 -0
- package/src/templates/claude/codegen.md +15 -0
- package/src/templates/claude/{command.md → modeling.md} +0 -2
- package/src/templates/codegen-rules.md +138 -0
- package/src/templates/codex/modscape-codegen/SKILL.md +20 -0
- package/src/templates/codex/{SKILL.md → modscape-modeling/SKILL.md} +10 -0
- package/src/templates/gemini/modscape-codegen/SKILL.md +23 -0
- package/src/templates/gemini/{SKILL.md → modscape-modeling/SKILL.md} +5 -3
- package/src/templates/rules.md +681 -72
- package/visualizer/package.json +1 -1
- package/visualizer-dist/assets/index-D-14ykQt.js +63 -0
- package/visualizer-dist/assets/index-DHPAF3El.css +1 -0
- package/visualizer-dist/index.html +2 -2
- package/visualizer-dist/assets/index-CTX8C1g5.js +0 -63
- package/visualizer-dist/assets/index-O8OLF7Nv.css +0 -1
|
@@ -18,3 +18,13 @@ When the user issues this command:
|
|
|
18
18
|
- **Layout**: For any new entity, assign logical `x` and `y` coordinates in the `layout` section to prevent overlapping and ensure a clean initial visualization.
|
|
19
19
|
|
|
20
20
|
ALWAYS follow the rules defined in `.modscape/rules.md` for any modeling tasks.
|
|
21
|
+
|
|
22
|
+
## COMMAND: /modscape:codegen
|
|
23
|
+
When the user issues this command:
|
|
24
|
+
1. READ `.modscape/codegen-rules.md` to understand how to interpret the YAML for code generation.
|
|
25
|
+
2. READ the target YAML file specified by the user (default: `model.yaml`).
|
|
26
|
+
3. ASK which tool to target if not specified (dbt / SQLMesh / Spark SQL / plain SQL).
|
|
27
|
+
4. GENERATE models in dependency order (upstream first) based on `lineage.upstream`.
|
|
28
|
+
5. ADD `-- TODO:` comments wherever the YAML does not provide enough information to generate definitive code.
|
|
29
|
+
|
|
30
|
+
Usage: `/modscape:codegen [path/to/model.yaml] [--target dbt|sqlmesh|spark|sql]`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: modscape-codegen
|
|
3
|
+
description: Generate implementation code (dbt, SQLMesh, Spark SQL, etc.) from a Modscape YAML model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Generation from Modscape YAML
|
|
7
|
+
|
|
8
|
+
You are a data pipeline engineer. Your task is to generate implementation code from a Modscape `model.yaml`.
|
|
9
|
+
|
|
10
|
+
BEFORE generating any code, you MUST read `.modscape/codegen-rules.md` to understand how to interpret the YAML.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
1. READ `.modscape/codegen-rules.md`.
|
|
14
|
+
2. READ the target YAML file specified by the user (default: `model.yaml`).
|
|
15
|
+
3. ASK which tool to target if not specified (dbt / SQLMesh / Spark SQL / plain SQL).
|
|
16
|
+
4. GENERATE models in dependency order (upstream first) based on `lineage.upstream`.
|
|
17
|
+
5. ADD `-- TODO:` comments wherever the YAML does not provide enough information to generate definitive code.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
```
|
|
21
|
+
@modscape-codegen model.yaml
|
|
22
|
+
@modscape-codegen model.yaml --target dbt
|
|
23
|
+
```
|
|
@@ -5,9 +5,9 @@ description: Create the data model defined in `model.yaml` according to project
|
|
|
5
5
|
|
|
6
6
|
# Data Modeling Expert
|
|
7
7
|
|
|
8
|
-
You are a professional Data Modeler. Your primary directive is to manage `model.yaml`.
|
|
8
|
+
You are a professional Data Modeler. Your primary directive is to manage `model.yaml`.
|
|
9
9
|
|
|
10
|
-
BEFORE making any suggestions or changes, you MUST read and strictly follow the rules defined in `.modscape/rules.md`.
|
|
10
|
+
BEFORE making any suggestions or changes, you MUST read and strictly follow the rules defined in `.modscape/rules.md`.
|
|
11
11
|
|
|
12
12
|
If a requested change violates these rules, warn the user.
|
|
13
13
|
|
|
@@ -22,4 +22,6 @@ If a requested change violates these rules, warn the user.
|
|
|
22
22
|
- **Layout**: You are responsible for the initial placement of new entities. Assign logical `x` and `y` coordinates in the `layout` section so they don't overlap existing nodes. The user will fine-tune the layout via the GUI.
|
|
23
23
|
|
|
24
24
|
## Interactive Modeling
|
|
25
|
-
When the user wants to perform modeling tasks, ensure you are utilizing the strategy and conventions defined in the project rules.
|
|
25
|
+
When the user wants to perform modeling tasks, ensure you are utilizing the strategy and conventions defined in the project rules.
|
|
26
|
+
|
|
27
|
+
ALWAYS follow the rules defined in `.modscape/rules.md` for any modeling tasks.
|