modscape 2.0.1 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modscape",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Modscape: A YAML-driven data modeling visualizer CLI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  Start an interactive data modeling session.
2
2
 
3
3
  ## Instructions
4
- 1. FIRST, read `.modscape/rules.md` to understand the project strategy, naming conventions, and YAML schema.
4
+ 1. FIRST, read `.modscape/rules.md` to understand the project strategy, naming conventions, and YAML schema. If `.modscape/rules.custom.md` exists, read it too — custom rules take priority over the base rules.
5
5
  2. SECOND, analyze the existing `model.yaml` if it exists.
6
6
  3. Listen to the user's requirements and propose/apply changes to `model.yaml` strictly following the rules.
7
7
 
@@ -9,7 +9,7 @@ You are a professional Data Modeler. Your primary directive is to manage `model.
9
9
 
10
10
  ## COMMAND: /modscape:modeling
11
11
  When the user issues this command:
12
- 1. READ `.modscape/rules.md` to understand project strategy and conventions.
12
+ 1. READ `.modscape/rules.md` to understand project strategy and conventions. If `.modscape/rules.custom.md` exists, read it too — custom rules take priority over the base rules.
13
13
  2. ANALYZE `model.yaml` (if present).
14
14
  3. INTERACT with the user to gather requirements and update the model strictly following the rules.
15
15
 
@@ -17,7 +17,7 @@ When the user issues this command:
17
17
  - **Appearance**: When creating new tables, include the `appearance` block with an appropriate `type`.
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
- ALWAYS follow the rules defined in `.modscape/rules.md` for any modeling tasks.
20
+ ALWAYS follow the rules defined in `.modscape/rules.md` (and `.modscape/rules.custom.md` if present) for any modeling tasks.
21
21
 
22
22
  ## COMMAND: /modscape:codegen
23
23
  When the user issues this command:
@@ -7,7 +7,7 @@ description: Create the data model defined in `model.yaml` according to project
7
7
 
8
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`. If `.modscape/rules.custom.md` exists, read it too — custom rules take priority over the base rules.
11
11
 
12
12
  If a requested change violates these rules, warn the user.
13
13
 
@@ -24,4 +24,4 @@ If a requested change violates these rules, warn the user.
24
24
  ## Interactive Modeling
25
25
  When the user wants to perform modeling tasks, ensure you are utilizing the strategy and conventions defined in the project rules.
26
26
 
27
- ALWAYS follow the rules defined in `.modscape/rules.md` for any modeling tasks.
27
+ ALWAYS follow the rules defined in `.modscape/rules.md` (and `.modscape/rules.custom.md` if present) for any modeling tasks.
@@ -3,6 +3,9 @@
3
3
  > **Purpose**: This file teaches AI agents how to write valid `model.yaml` files for Modscape.
4
4
  > Read this file completely before generating or editing any YAML.
5
5
 
6
+ > **Extension**: If `.modscape/rules.custom.md` exists in this project, read it **in addition** to this file.
7
+ > Rules in `rules.custom.md` take **priority** over this file when they conflict.
8
+
6
9
  ---
7
10
 
8
11
  ## QUICK REFERENCE (read this first)
@@ -589,7 +592,41 @@ modscape merge ./sales ./marketing -o combined.yaml
589
592
 
590
593
  ---
591
594
 
592
- ## 13. Complete Example
595
+ ## 13. Project-Specific Rule Extensions
596
+
597
+ A project MAY place a `.modscape/rules.custom.md` file to define rules that extend or override this base file.
598
+
599
+ **How to use it:**
600
+
601
+ - Create `.modscape/rules.custom.md` in the project root (alongside `rules.md`)
602
+ - Write any project-specific rules, naming conventions, or overrides in Markdown
603
+ - AI agents reading this file will also check for `rules.custom.md` and apply it
604
+
605
+ **Priority:** Rules in `rules.custom.md` take priority over this file when they conflict.
606
+
607
+ **What to put in `rules.custom.md`** (examples):
608
+
609
+ ```markdown
610
+ ## Naming Conventions
611
+ - All fact table IDs must use the prefix `fct_` followed by the domain: e.g., `fct_sales_orders`
612
+ - All dimension table IDs must end in `_dim`: e.g., `customers_dim`
613
+
614
+ ## Allowed Table Types
615
+ - This project only uses `fact`, `dimension`, and `mart`. Do NOT use `hub`, `link`, or `satellite`.
616
+
617
+ ## Domain Topology
618
+ - This project has three domains: `sales`, `marketing`, `finance`
619
+ - Every new table MUST be assigned to one of these domains
620
+
621
+ ## SCD Policy
622
+ - Dimension tables use SCD Type 1 only. Do NOT apply `scd: type2` or higher.
623
+ ```
624
+
625
+ `rules.custom.md` is NOT generated by `modscape init`. Create it manually when your project needs it.
626
+
627
+ ---
628
+
629
+ ## 14. Complete Example
593
630
 
594
631
  ```yaml
595
632
  domains:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visualizer",
3
3
  "private": true,
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",