Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Warehouse presets and guides for Redshift, Postgres, SQL Server, Azure SQL, MySQL, DuckDB,
MotherDuck, and Athena.
- `/dbt.implement-all` command template for sequential multi-task implementation with validation
checkpoints and stop conditions.

## [1.1.0] — 2026-05-18

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ The agent commands are:
- `/dbt.plan` creates a file-by-file implementation contract.
- `/dbt.tasks` decomposes the approved plan into small tasks.
- `/dbt.implement` executes one task at a time.
- `/dbt.implement-all` executes approved pending tasks sequentially, stopping on validation or scope failures.
- `/dbt.analyze` checks traceability before implementation.
- `/dbt.review` reviews the final diff against the approved plan.

Expand Down
60 changes: 60 additions & 0 deletions commands/dbt.implement-all.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# /dbt.implement-all — execute approved pending tasks with checkpoints

You are implementing the remaining approved tasks in order. This command is for small, well-scoped
plans where the approved task list already names all files and validation evidence.

## Read these first
1. The current `specs/<NNN>-<slug>/tasks.md`
2. The approved `specs/<NNN>-<slug>/plan.md`
3. The approved `specs/<NNN>-<slug>/spec.md`
4. `.dbt-specify/constitution.md`
5. `CLAUDE.md`
6. Relevant `.dbt-specify/skills/` and dbt Labs skills

## Preflight

Before editing, confirm:

1. The plan is approved.
2. Every pending task has a clear "Done when" validation step.
3. The plan contains a concrete "Files to add/modify/delete" list.
4. There are no unrelated uncommitted changes in files you need to edit.
5. The work fits the approved scope.

If any preflight item fails, stop and tell the user what must be fixed.

## What to do

1. Find the first unchecked task in `tasks.md`.
2. Implement ONLY that task.
3. Run the task's validation step, `dbt parse`, and relevant `dbt test` selectors.
4. If validation passes, check the task's box `[x]`.
5. Commit using the message format `T-NN: <task description>` with a body referencing the spec,
plan, and task paths.
6. Continue to the next unchecked task only after the prior task is committed.
7. After all tasks are complete, run:
- `dbt-specify validate project`
- `dbt parse`
- `dbt-specify validate dbt --manifest target/manifest.json`, if a manifest exists
- `dbt-specify report --format markdown`
8. Stop and summarize completed tasks, commits, validation evidence, and remaining review steps.

## Stop immediately if

- A validation command fails.
- A task requires a file not listed in the approved plan.
- A dbt model or YAML file would be edited outside the current task.
- A business rule, grain, contract, metric, or governance decision is unclear.
- You discover unrelated bugs or refactors.
- Two tasks would require conflicting edits in the same file.

## Hard rules

- Execute tasks sequentially, never in parallel.
- Do not skip tasks.
- Do not combine task commits.
- Do not add files not listed in the approved plan.
- Do not silently update the spec, plan, or task scope.
- Do not mark a task complete if validation fails.
- Do not run `/dbt.review` for yourself. Ask the user to run review after implementation.
- Never auto-merge. Human approval is the final gate.
4 changes: 3 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ In your AI agent, invoke `/dbt.specify <description of the feature>`. The agent
3. Draft `specs/001-<slug>/spec.md`
4. Tell you to review

Once you approve, run `/dbt.plan` to get a plan, then `/dbt.tasks` to break it down, then `/dbt.implement` to execute one task at a time.
Once you approve, run `/dbt.plan` to get a plan, then `/dbt.tasks` to break it down, then
`/dbt.implement` to execute one task at a time. For small approved plans, `/dbt.implement-all` can
run pending tasks sequentially while stopping on validation failures or scope changes.

Validate your spec is EARS-conformant:

Expand Down
4 changes: 4 additions & 0 deletions docs/methodology.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Tasks are ordered by dependency: sources → staging → intermediate → marts
**Human checkpoint:** the engineer reviews and approves the final diff before merge.

`/dbt.implement` runs one task per invocation. After each task: validate, commit with the task-id message format, and stop. Never work ahead.

For small, approved plans, `/dbt.implement-all` may run the pending tasks sequentially. It still
validates and commits after each task, stops on any failure or scope expansion, and never merges.
Use it only after the spec, plan, and task list have been reviewed.
If delegated, the implementation worker follows `.dbt-specify/agents/implementation-agent.md` and
may edit only files listed in the approved plan.

Expand Down
8 changes: 8 additions & 0 deletions docs/tutorials/02-jaffle-shop-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ Good tasks are small:

The implementation agent should complete one checked task and stop.

For a short demo with a reviewed plan, you can use:

```text
/dbt.implement-all
```

It still runs tasks sequentially and stops if validation fails or the file scope changes.

## 6. Validate and review

Run:
Expand Down
3 changes: 3 additions & 0 deletions docs/tutorials/04-skills-and-sub-agent-handoffs.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ T1. Stop after validation evidence is recorded.

Do not run two implementation agents against the same model or YAML file.

For small, approved plans, `/dbt.implement-all` can process pending tasks in order. It must still
commit after each task and stop on validation failure, unclear scope, or unapproved files.

## 5. Review final evidence

Before merge:
Expand Down
1 change: 1 addition & 0 deletions templates/CLAUDE.md.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Core commands map to the phases:
- `/dbt.plan` — reads the current spec and proposes a plan
- `/dbt.tasks` — decomposes the approved plan into ordered tasks
- `/dbt.implement` — executes the next task
- `/dbt.implement-all` — executes approved pending tasks sequentially with validation checkpoints
- `/dbt.analyze` — checks spec/plan/task traceability before implementation
- `/dbt.review` — reviews the final diff against the approved plan

Expand Down
15 changes: 15 additions & 0 deletions tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ def test_jaffle_shop_walkthrough_has_required_commands() -> None:
assert command in text


def test_implement_all_command_is_documented() -> None:
command = (ROOT / "commands" / "dbt.implement-all.md").read_text()
assert "execute approved pending tasks" in command
assert "Commit using the message format" in command
assert "Stop immediately" in command
assert "Never auto-merge" in command

readme = (ROOT / "README.md").read_text()
claude_template = (ROOT / "templates" / "CLAUDE.md.template").read_text()
methodology = (ROOT / "docs" / "methodology.md").read_text()
assert "/dbt.implement-all" in readme
assert "/dbt.implement-all" in claude_template
assert "/dbt.implement-all" in methodology


def test_launch_ready_oss_files_exist() -> None:
required_paths = [
"SECURITY.md",
Expand Down
1 change: 1 addition & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_init_creates_dbt_specify_dir(minimal_dbt_project: Path) -> None:
# Commands and skills directories created
assert (minimal_dbt_project / ".dbt-specify" / "commands").is_dir()
assert (minimal_dbt_project / ".dbt-specify" / "commands" / "dbt.analyze.md").exists()
assert (minimal_dbt_project / ".dbt-specify" / "commands" / "dbt.implement-all.md").exists()
assert (minimal_dbt_project / ".dbt-specify" / "commands" / "dbt.review.md").exists()
assert (minimal_dbt_project / ".dbt-specify" / "skills").is_dir()
agents_dir = minimal_dbt_project / ".dbt-specify" / "agents"
Expand Down
Loading