02. CONFIGURATION BOARD
Briefed incorporates a flexible, layered configuration structure designed to adapt easily to multi-developer teams. Configurations are loaded and deep-merged based on a strict priority cascade:
- Local Project Config (
.briefed.json) — Repository-specific overrides (committed or ignored). - Global User Config (
~/.briefed.json) — System developer credentials (like private keys). - Built-in defaults — System fallbacks.
📋 Complete Blueprint Code
Here is a complete configuration template detailing every operational parameter for .briefed.json:
{
"target": "auto",
"backend": "gemini",
"model": "gemini-2.5-flash",
"apiUrl": "http://localhost:11434",
"window": {
"days": 7,
"entries": 10,
"maxTotalWords": 1000
},
"ignored": [
"*.lock",
"package-lock.json",
"pnpm-lock.yaml",
"dist/",
"node_modules/",
"coverage/"
],
"minDiffLines": 10,
"maxSummaryWords": 150
}
⚙️ Configuration Parameter Guide
1. target (Type: string | Default: "auto")
Specifies the relative or absolute file path to write your AI context entries. When set to "auto", Briefed dynamically scans your workspace root directory for context files in the following priority order:
CLAUDE.md(First priority)AGENTS.md.github/copilot-instructions.md
CLAUDE.md file in your workspace root.
2. backend (Type: "ollama" | "gemini" | "anthropic" | "none" | Default: "ollama")
Chooses the LLM summarizing engine:
"ollama": Connects locally to run offline custom models (100% free)."gemini": Leverages fast and cost-efficient Google Gemini API models."anthropic": Connects to high-fidelity Anthropic messages APIs."none": Bypasses LLMs completely, running standard local mechanical heuristics instantly.
3. model (Type: string | Default: "llama3")
Specifies the model identifier passed to the active backend. If you override the backend at runtime (e.g. running briefed run --backend gemini), Briefed incorporates a **Smart Mismatch Auto-Resolution** that swaps backend-incompatible models to standard defaults (such as gemini-2.5-flash) with console warnings to prevent crashes.
4. window (Type: object)
Configures the automated rolling fader window to prune older history and protect context lengths:
window.days(Type:number| Default:7): Older entries beyond these days are deleted automatically.window.entries(Type:number| Default:10): Keeps the latest N entries, deleting oldest logs when exceeded.window.maxTotalWords(Type:number| Default:1000): The maximum cumulative words allowed across all combined entries. Older entries are pruned dynamically to strictly bound context file footprints.
5. ignored (Type: string[] | Default: ["*.lock", "package-lock.json", "pnpm-lock.yaml", "dist/", "*.map", "*.min.js", "*.min.css"])
A list of glob matches. Files fitting these patterns are ignored and discarded during git diff parsing, preventing lockfile updates or compiled folder outputs from bloating token usage.
6. minDiffLines (Type: number | Default: 10)
The total number of changed lines (insertions + deletions) below which Briefed skips LLM summaries completely, instantly writing mechanical summaries locally to save API quotas and compute time.
7. maxSummaryWords (Type: number | Default: 250)
Enforces a maximum word-count cap on LLM response summaries. If the returned summary exceeds this limit, Briefed iterates backward and prunes content at the last complete line boundary to keep log lists concise.
Briefed protects your security! Before sending diffs to cloud APIs (Gemini or Anthropic), it runs client-side regex detection filters to mask keys, database passwords, AWS credentials, bearer tokens, and GitHub SSH keys, ensuring secrets are never leaked to external networks.
🤖 Core LLM Summarization Prompt
Briefed maintains full transparency. To ensure your AI backends respond in a standardized, parseable format without conversational fluff or markdown enclosures, Briefed runs the exact structured template below:
Summarize the following git diff.
You MUST output ONLY a structured block format with exactly these categories: FILES, ADDED, REMOVED, RENAMED, DEPS.
Use pipe (|) to separate items within each category. Do not include any markdown fences, extra explanations, or conversational filler.
Format:
FILES: <comma-separated list of directories/files changed>
ADDED: <key features, modules or code additions, separated by |>
REMOVED: <key removals or deprecations, separated by |>
RENAMED: <files renamed, e.g. path/to/old -> path/to/new, separated by |>
DEPS: <dependency changes or change counts, e.g., "X additions, Y deletions">
Git Diff:
<rawDiff>
List of changed files:
<listOfFilesChanged>
Change Statistics:
Additions: <additionsCount>
Deletions: <deletionsCount>
🔌 Auto-Injected AI Skill Guidelines
Briefed makes sure your AI coding assistants (like Claude Code or Antigravity) are immediately aware of the sync workflow without any manual instruction writing. When Briefed dynamically creates your context file (e.g. CLAUDE.md), it automatically prefixes the file with the following concise, high-value **AI Skill Guidelines**:
# AI Context
## Briefed CLI Guidelines
- Run `briefed run` to manually synchronize git context or review change stats.
- Run `briefed status` to inspect the latest summarized entry.
- Do not manually edit the `<!-- BRIEFED_START -->` block; the post-merge and post-rewrite hooks handle it automatically.
<!-- BRIEFED_START -->
<!-- BRIEFED_END -->