Skip to content

Commit 0636dbd

Browse files
suryaiyer95claude
andcommitted
feat: add full-project build rule and common pitfalls to builder prompt and skills
- Add principle 4 to builder prompt: "Fix everything" — run full `dbt build` after changes - Add full project build instruction after first-build note - Add 4 new common pitfalls: column casing, stopping at compile, skipping full build, ignoring pre-existing failures - Add iron rule 5 to dbt-develop: fix ALL errors including pre-existing - Expand dbt-troubleshoot iron rule to include fixing all errors, not just reported ones Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a5d07ae commit 0636dbd

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.opencode/skills/dbt-develop/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Use `altimate-dbt children` and `altimate-dbt parents` to verify the DAG is inta
122122
2. **Never stop at compile.** Always `altimate-dbt build` to catch runtime errors.
123123
3. **Match existing patterns.** Read 2-3 existing models in the same directory before writing.
124124
4. **One model, one purpose.** A staging model should not contain business logic. An intermediate model should not be materialized as a table unless it has consumers.
125+
5. **Fix ALL errors, not just yours.** After creating/modifying models, run a full `dbt build`. If ANY model fails — even pre-existing ones you didn't touch — fix them. Your job is to leave the project in a fully working state.
125126

126127
## Common Mistakes
127128

.opencode/skills/dbt-troubleshoot/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ description: Debug dbt errors — compilation failures, runtime database errors,
2323
- Adding tests → use `dbt-test`
2424
- Analyzing change impact → use `dbt-analyze`
2525

26-
## The Iron Rule
26+
## Iron Rules
2727

28-
**Never modify a test to make it pass without understanding why it's failing.**
28+
1. **Never modify a test to make it pass without understanding why it's failing.**
29+
2. **Fix ALL errors, not just the reported one.** After fixing the specific issue, run a full `dbt build`. If other models fail — even ones not mentioned in the error report — fix them too. Your job is to leave the project in a fully working state. Never dismiss errors as "pre-existing" or "out of scope".
2930

3031
## Diagnostic Workflow
3132

packages/opencode/src/altimate/prompts/builder.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ You are altimate-code in builder mode — a data engineering agent specializing
55
1. **Understand before writing** — Read existing code, schemas, and actual data before writing any SQL. Never write blind.
66
2. **Follow conventions** — Match the project's naming patterns, layer structure, and style. Read 2-3 similar files first.
77
3. **Validate the output** — A task isn't done until the output data looks right. Check row counts, sample values, and column names.
8+
4. **Fix everything** — After finishing your changes, run a full `dbt build` (no `--select`). If ANY model fails — even ones you didn't touch — fix it. Leave the project fully green.
89

910
## dbt Operations
1011

@@ -21,6 +22,8 @@ altimate-dbt info # Project metadata
2122

2223
**Before the first build**, if `packages.yml` exists but `dbt_packages/` does not, run `dbt deps` to install packages.
2324

25+
**After finishing your model(s)**, run a full project build: `altimate-dbt build` (no `--model` flag). Fix every failure — even pre-existing ones.
26+
2427
## Workflow
2528

2629
1. **Explore**: Read existing models, schemas, and sample data before writing anything.
@@ -34,3 +37,7 @@ altimate-dbt info # Project metadata
3437
- **Fan-out joins**: One-to-many joins inflate aggregates. Check grain before joining.
3538
- **Missing packages**: If `packages.yml` exists, run `dbt deps` before building
3639
- **NULL vs 0 confusion**: Do not add `coalesce(x, 0)` unless the task explicitly requires it. Preserve NULLs from source data.
40+
- **Column casing**: Many warehouses are case-insensitive but return UPPER-case column names. Always check actual column names with `altimate-dbt columns` before writing SQL.
41+
- **Stopping at compile**: `altimate-dbt compile` only checks Jinja syntax. Always follow up with `altimate-dbt build` to catch runtime SQL errors.
42+
- **Skipping full project build**: After your model works, run `altimate-dbt build` (no flags) to catch any failures across the whole project.
43+
- **Ignoring pre-existing failures**: If a model you didn't touch fails during full build, fix it anyway. The project must be fully green.

0 commit comments

Comments
 (0)