Skip to content

ollama_change_pack

Change pack (writes artifact). PACK. Runs the full change REVIEW job: assemble evidence (diff + paths + corpus if given) → triage_logs ONLY when log_text is provided → change_brief → targeted ollama_extract (narrow review schema: scripts_touched, config_surfaces, runtime_hints) → deterministic markdown+JSON artifact on disk. Change-first, not repo-first — this is about the DELTA, not a tour. Release note draft is a blockquote-wrapped DRAFT (not marketing copy). No VCS integration — caller hands in diff_text / source_paths / optional log_text. Response is compact; full brief + extracted facts live in the artifact.

Parameter Type Required Default Description
diff_text string no Unified-diff text (e.g. git diff output). Split per file on diff --git markers. At least one of diff_text or source_paths is required.
source_paths any no Changed files to read server-side (Claude does not preload). Alongside or instead of diff_text. Optional — diff-driven calls work without it; runtime requires at least one of diff_text or source_paths.
log_text string no Optional CI log that triggered this review. When present, triage_logs runs and its signal is surfaced in the Change section.
corpus string no Optional named corpus for architecture/doctrine context. Pulled in only when you need it to sharpen impact — this pack is about the delta, not a repo tour.
corpus_query string no Corpus query (defaults to the head of diff_text or first source path). (max 200 chars — deliberately shorter than ollama_corpus_search.query’s 1000, because this is a short retrieval prompt, not a document.)
title string no Short human title — used in the artifact header and filename slug. Defaults to the change_summary head.
artifact_dir string no Directory to write the change.md + change.json artifact pair. Defaults to ~/.ollama-intern/artifacts/change/.
allowed_roots string[] no Absolute directories artifact_dir may live under when it is not inside INTERN_ARTIFACT_DIR. Same dual-declaration as ollama_artifact_export_to_path.
confirm_write boolean no Required when the artifact pair would land on a protected path (.git/, SECURITY.md, memory/, …). Same gate as ollama_draft.
per_file_max_chars integer no Chars per source file (default 20k).
max_breakpoints integer no Cap on likely_breakpoints (default 6).
max_validation_checks integer no Cap on validation_checks (default 8).
backend "cloud" \ "local" no

The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"diff_text": {
"description": "Unified-diff text (e.g. `git diff` output). Split per file on `diff --git` markers. At least one of diff_text or source_paths is required.",
"type": "string",
"minLength": 1
},
"source_paths": {
"description": "Changed files to read server-side (Claude does not preload). Alongside or instead of diff_text. Optional — diff-driven calls work without it; runtime requires at least one of diff_text or source_paths."
},
"log_text": {
"description": "Optional CI log that triggered this review. When present, triage_logs runs and its signal is surfaced in the Change section.",
"type": "string",
"minLength": 1
},
"corpus": {
"description": "Optional named corpus for architecture/doctrine context. Pulled in only when you need it to sharpen impact — this pack is about the delta, not a repo tour.",
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$"
},
"corpus_query": {
"description": "Corpus query (defaults to the head of diff_text or first source path). (max 200 chars — deliberately shorter than ollama_corpus_search.query's 1000, because this is a short retrieval prompt, not a document.)",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"title": {
"description": "Short human title — used in the artifact header and filename slug. Defaults to the change_summary head.",
"type": "string",
"minLength": 1,
"maxLength": 120
},
"artifact_dir": {
"description": "Directory to write the change.md + change.json artifact pair. Defaults to ~/.ollama-intern/artifacts/change/.",
"type": "string",
"minLength": 1
},
"allowed_roots": {
"description": "Absolute directories artifact_dir may live under when it is not inside INTERN_ARTIFACT_DIR. Same dual-declaration as ollama_artifact_export_to_path.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"confirm_write": {
"description": "Required when the artifact pair would land on a protected path (.git/, SECURITY.md, memory/, ...). Same gate as ollama_draft.",
"type": "boolean"
},
"per_file_max_chars": {
"description": "Chars per source file (default 20k).",
"type": "integer",
"minimum": 1000,
"maximum": 200000
},
"max_breakpoints": {
"description": "Cap on likely_breakpoints (default 6).",
"type": "integer",
"minimum": 1,
"maximum": 12
},
"max_validation_checks": {
"description": "Cap on validation_checks (default 8).",
"type": "integer",
"minimum": 1,
"maximum": 15
},
"backend": {
"description": "Optional per-call backend directive (v2.9). 'cloud' escalates THIS call to Ollama Cloud — works in cloud standby (OLLAMA_API_KEY set, OLLAMA_CLOUD_PRIMARY unset) and cloud-primary modes; errors with CLOUD_NOT_CONFIGURED when no cloud is configured (never silently runs local while claiming escalation). 'local' pins the call to the local backend (zero egress) even under cloud-primary. Omit for the mode default. Escalated calls disclose egress loudly and carry backend provenance on the envelope. Synthesis quality on this tool scales sharply with model class — on a repo-scale job the local 8B is often the binding constraint, not the evidence. Tools where a local model is genuinely adequate (ollama_summarize_fast, ollama_classify, ollama_triage_logs, and every no-LLM tool) deliberately do NOT offer this field. SCOPE: this directive reaches the brief synthesis step (ollama_change_brief, Deep tier) ONLY — evidence assembly, the triage pass, the targeted extract (Workhorse structured fill) and the artifact write run on the mode default regardless. A pack is a mixed-cost pipeline; escalating all of it would bill a flagship for work a local model does fine.",
"type": "string",
"enum": [
"cloud",
"local"
]
}
}
}

Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.

Schema + handler: src/tools/packs/changePack.ts · registration: src/index.ts


Back to the Tool Reference.