@clipboard-health/ai-rules 1.6.2 → 1.6.3
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/datamodeling/AGENTS.md +13 -2
- package/package.json +1 -1
package/datamodeling/AGENTS.md
CHANGED
|
@@ -16,7 +16,7 @@ Use the dbt-mcp server to:
|
|
|
16
16
|
|
|
17
17
|
## Querying Snowflake Data Warehouse (using Snowflake MCP)
|
|
18
18
|
|
|
19
|
-
- When you need to answer data-related questions or obtain analytics by querying the Snowflake data warehouse,
|
|
19
|
+
- When you need to answer data-related questions or obtain analytics by querying the Snowflake data warehouse, please use the `snowflake` mcp tool.
|
|
20
20
|
- When using the Snowflake MCP to run queries, you must set the database context properly in your queries. Use fully qualified table names or set the database context to avoid connection errors.
|
|
21
21
|
- The `describe_object` tool in the Snowflake MCP has a bug where it misinterprets the target_object structure, treating the table name as a database name and causing 404 "database does not exist" errors. Use `run_snowflake_query` with "DESCRIBE TABLE" instead to get table schema information successfully.
|
|
22
22
|
|
|
@@ -80,10 +80,14 @@ Instead of using LIKE clauses or partial matching which can be imprecise.
|
|
|
80
80
|
- README.md
|
|
81
81
|
- models/DEVIN_ANALYST_MODEL_GUIDE.md
|
|
82
82
|
- models/DEVIN_ANALYST_FOLDER_STRUCTURE.md
|
|
83
|
-
|
|
83
|
+
- .github/pull_request_template.md
|
|
84
|
+
|
|
85
|
+
These define our modeling rules, patterns, and safety constraints.
|
|
84
86
|
|
|
85
87
|
# Key best practices to follow
|
|
86
88
|
|
|
89
|
+
- DEVIN ONLY: When running dbt commands in the data-modeling repository, always reuse the existing SNOWFLAKE_SCHEMA environment variable value that is already set. Do NOT replace it with a hardcoded value like "dbt_devin" - the SNOWFLAKE_SCHEMA is set to a unique per-session string and overwriting it will cause issues.
|
|
90
|
+
- Use `dbt build` to verify your changes.
|
|
87
91
|
- ALL dbt staging models must have strictly defined datatypes. Please Read the "Casting DBT Staging Model Datatype Heuristic" Knowledge we have. These datatypes need to defined in the yaml documentation too.
|
|
88
92
|
- Use doc blocks for any YAML column descriptions that span across more than one model. Do NOT repeat descriptions for the same column - please reuse a doc-block!
|
|
89
93
|
- When adding new fields to tables keep the original source field name format, but remove any custom field prefix (**c). For example assignment_type**c should be renamed to assignment_type. Please do not hallucinate the column field names as this is misleading for users.
|
|
@@ -91,6 +95,13 @@ Instead of using LIKE clauses or partial matching which can be imprecise.
|
|
|
91
95
|
- A model must always have a primary/unique key. If there's no obvious one, please create a surrogate key using a combination of fields and by looking at the data. Use `dbt_utils.generate_surrogate_key` to do so.
|
|
92
96
|
- Keep It Simple. Don't overcomplicate.
|
|
93
97
|
|
|
98
|
+
# When creating PR's for the data-modeling repo
|
|
99
|
+
|
|
100
|
+
- Read .github/pull_request_template.md. It contains the structure of how you would format the PR Description.
|
|
101
|
+
- Under the **Validation of models** section in the PR Description, print the full table names of the dev models you've built, so it's easy for us to review the data.
|
|
102
|
+
- Keep PR descriptions concise and focused. A reader should be able to quickly understand the intent and scope of the change.
|
|
103
|
+
- Include the **dbt commands run** to validate the models.
|
|
104
|
+
|
|
94
105
|
<!-- Source: .ruler/datamodeling/dbtYamlDocumentation.md -->
|
|
95
106
|
|
|
96
107
|
# .yaml documentation rules
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/ai-rules",
|
|
3
3
|
"description": "Pre-built AI agent rules for consistent coding standards.",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.3",
|
|
5
5
|
"bugs": "https://github.com/ClipboardHealth/core-utils/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@intellectronica/ruler": "0.3.20"
|