modscape 1.2.0 → 2.0.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.
@@ -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. You can be triggered via the `/modscape:modeling` command which provides a dedicated workflow.
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.