Prerequisites
- Slack connected (the agent posts a documentation summary to
#analytics-engviapost_slack_message). - Write access to the repo, so the agent can commit to the PR branch.
- Familiarity with programmable agents and running an agent with Bolt.
Steps
1
Create the agent
In the Agent app, open Agents, select New agent, and start from the Goal:Backstory:Model: leave Auto selected.Allowed tools (everything else is refused, see the Tools Reference):
docs-writer template (or Start from scratch). Fill in the builder fields with the content below. See Build an agent in the UI for a tour of the builder.Name: doc-backfillerRole:read_file,write_file,search_files_and_directories,ripgrep_searchget_lineagerun_terminal_commandpost_slack_message
#analytics-eng (or your team’s channel).Notably
run_sql_query is excluded: the agent works entirely from the SQL source files and YAML, so no live database connection is needed. get_lineage (a dbt Discovery tool) lets it check downstream usage before flagging a column as stale.2
Deploy the agent
Select Deploy and choose where the agent lives: Just here saves it to the workspace and makes it live immediately, Open a pull request commits it to your repo as
.dinoai/agents/doc-backfiller.yml so it is governed as code. Both appear in the Bolt agent picker. See Creating Agents in the App.3
Run it on every PR with Bolt
Add a Run Paradime DinoAI Agent command to a Bolt schedule and set its trigger to run on pull request merge, so the agent backfills docs whenever models change. The command runs natively with no API keys to configure. See Run an agent with Bolt for the full walkthrough.Pick
doc-backfiller as the agent and give it a task that names the changed files, for example:4
Review the backfilled docs
After the agent runs, open the PR. You’ll see a new commit
docs: backfill missing descriptions [DinoAI] on the branch, a PR comment with the per-file summary, and the same summary in #analytics-eng. Confirm or edit any TODO: confirm with owner entries and remove any # STALE columns you agree are no longer needed before merging.On a PR that adds or changes models with undocumented columns, the agent commits filled-in descriptions and posts a summary. On a PR where everything is already documented, it skips the commit and reports full coverage instead. Descriptions it could not infer are marked
TODO: confirm with owner, and columns dropped from the SQL are flagged # STALE rather than deleted.How it works
The agent is handed the list of changed.sql and .yml files. For each changed model it compares the SQL definition against the existing schema YAML, drafts any missing or stale descriptions, writes the YAML changes, commits them directly to the PR branch, and posts a summary. The PR author sees a new commit appear with all documentation gaps filled.
When docs are considered stale
The agent flags an existing description as stale when any of the following are true after a SQL change:- A column is referenced in the
.sqlfile but has no entry in the schema YAML. - A column exists in the schema YAML but is no longer selected in the SQL.
- The model’s SQL logic has changed substantially enough that the model-level description no longer matches what the model produces.
The agent does not delete stale column entries automatically. Instead it adds an inline
# STALE: column no longer selected — confirm removal comment in the YAML, checking get_lineage first so the comment notes whether downstream models still reference the column. A human reviews before merging, which prevents accidental data contract breakage downstream.TODO: confirm with owner rather than guessing. If existing documentation is still accurate after a change, it leaves it untouched.
Prefer to orchestrate the run yourself from a GitHub Actions workflow or a webhook? Trigger the agent through the API with
triggerDinoaiAgentRun and pass the changed-file list in the message. See the API and SDK reference.Next steps
Run an agent with Bolt
Trigger this agent on a schedule, on merge, or in Turbo CI.
dbt™ test maintainer
Write and validate missing tests on the same PR.
End-to-end PR reviewer
Review scope, code, tests, and docs in one pass.
Programmable Agents reference
The agent schema, tools, and API.