Every config.yaml block and every file under .repowise/ that you write
yourself. For how to read and change a setting, and for the top-level keys
(provider, model, embedder, excludes), see
Configuration. Any key below can be read
with repowise config explain <key> and changed with repowise config set.
Local semantic search
Two embedders run on your machine with no key and no spend: Ollama, and
fastembed, which embeds inside the repowise process with a small ONNX
model (BAAI/bge-small-en-v1.5), with no server to keep running. Both are
opt-in: name one with reindex.
pip install "repowise[local-embed]"
repowise reindex --embedder fastembedThe extra adds about 65 MB of packages, and the model (about 65 MB)
downloads once to ~/.repowise/models (FASTEMBED_CACHE_PATH moves it). A
query embeds in a few milliseconds on a laptop CPU. Install the extra
wherever repowise update and the MCP server run. It covers Python 3.11 and
3.12; on 3.13 and newer, pip install fastembed into the same environment.
On an air-gapped machine, copy ~/.repowise/models from a machine that ran
reindex --embedder fastembed and set HF_HUB_OFFLINE=1.
The distill: block
Controls output distillation for this repo.
Everything defaults sensibly when the block is absent; repowise doctor
validates it.
distill:
enabled: true # master switch for this repo
commands:
enabled: true # the command path (CLI + hook rewrites)
permission: allow # ask | allow | off: rewrite-hook posture
families: # per-filter overrides
test_output: allow # auto-allow rewrites for test runs
git_diff: deny # never rewrite git diff here
disabled_filters: [] # filters to skip entirely, e.g. [logs]
omission_store:
ttl_days: 7 # prune stored omissions after this many days
max_mb: 50 # size cap; oldest entries pruned firstpermission: allow is the default: it auto-approves rewrites uniformly
across the main agent and every subagent. This is not a permission
escalation, a rewrite is always repowise distill <one recognized command> from a closed family set, never an arbitrary command smuggled
behind the wrapper. Set ask to have each rewritten command shown for
approval instead, or off to disable rewrites in this repo.
families keys are filter names (test_output, build_output,
lint_output, git_status, git_log, git_diff, search_results,
file_listing, logs) and accept ask | allow | off | deny. Declining
the repowise init opt-in prompt writes commands.enabled: false, so a
rewrite hook installed globally from another repo stays inert here.
Under Codex, only families set to allow are rewritten; its hook
protocol has no ask-with-mutation (see Distill).
The hooks: block
Behaviour of the agent hooks. Absent means every key below is off;
repowise init writes read_skeleton, read_reread and search_digest as
true when the rewrite-hook consent is yes, which is its default.
hooks:
read_skeleton: false # serve large indexed files as skeletons
read_skeleton_mode: smart # smart | plus (plus keeps all code outside function bodies)
read_reread: false # serve unchanged re-reads as a pointer
search_digest: false # serve multi-file grep floods as a digest
coverage_reingest: false # re-ingest coverage after an agent's full test run
measure: false # on update, check locally whether agents acted on each hook firing
health_gate: false # gate an agent's git commit / git push on repowise health checkREPOWISE_HOOK_<KEY> (for example REPOWISE_HOOK_READ_REREAD=1) overrides a
key for one session.
read_skeletonlets the PostToolUse Read hook return the skeleton of a large indexed file instead of the full file, once per file per session. Signatures stay; bodies become... N lines (a-b)markers, and any elided span can be pulled back with a ranged Read. Reading the file a second time returns it whole. A file whose skeleton is over the hook's 10,000-character cap comes back as an outline: one line per symbol at its real line number, as many as fit. A file edited since the last index (its indexed symbols are off their lines) is served whole.read_rereadlets the PostToolUse Read hook answer a repeat Read of the same range with a short notice instead of the content, when nothing changed the bytes since the last time this session served them. A file whose content differs on disk is always served in full.search_digestserves a grep flood (50+ result lines across 3+ files) as a per-file digest instead of raw matches. With it off, the raw output is left as it is and nothing is added.coverage_reingestrefreshes the stored coverage in the background after an agent runs the whole test suite (passing or failing), soget_change_riskreads current coverage. It acts only in a repository that has ingested coverage before, and never on a run that targets some tests.REPOWISE_HOOK_COVERAGE_REINGEST=1turns it on for one session.health_gateblocks an agent'sgit commitorgit pushthat failsrepowise health check. Set it withrepowise hook health-gate install, which also writes the hook entry.- Both
read_skeletonandread_rereadrequire Claude Code 2.1.218+; older clients are left untouched. - Saying yes to the rewrite-hook question in
repowise init(the default, and what--yesdoes) turns these on too;--no-editor-setupand--no-distill-hookturn them off with everything else. To change your mind for one repo without re-runninginit, userepowise hook read-skeleton install | uninstall | status.
The mcp: block
Which tools the MCP server lists, and whether Claude Code loads the read tools up front. The default profile depends on the client; see Tool profiles for what each value lists.
mcp:
tools: standard # core | lean | standard | all
# tools: ["core", "+get_health"] # a profile plus a delta
# tools: ["+get_execution_flows", "-get_dead_code"] # adjust each client's default
# tools: ["get_answer", "get_context"] # an explicit list
always_load: false # load the four read tools up front in Claude Code| Key | Default | What it does |
|---|---|---|
tools | unset (each client's default profile) | A profile, a profile with +name/-name deltas, deltas alone, or an exact list. repowise mcp --tools and --all override it for one launch |
always_load | false | Asks a client that defers tool schemas to load get_answer, get_context, search_codebase and get_symbol up front |
repowise config set mcp.tools standard writes the key; the server reads it
on its next start.
The editor_files: block
Controls the generated block in .claude/CLAUDE.md and AGENTS.md. The block
is read into the agent's context on every turn, so the default holds to about
250 tokens. sections adjusts it with the mcp.tools grammar: +name /
-name change the default set, unprefixed names replace it.
editor_files:
claude_md: true
agents_md: true
sections: ["+key_modules", "+hotspots"]| Key | Default | What it does |
|---|---|---|
claude_md, agents_md, cursor_rules, kiro_steering | true | Write that file. false stops repowise writing it |
vscode_mcp | true | Write the VS Code MCP entry |
sections | [decisions, how_to_work] | Sections of the generated block |
Every block opens with one line telling the agent to call a Repowise tool first for any question about the codebase.
| Sections | Contents |
|---|---|
| Default | how_to_work (one line per moment: before a rename, before editing, before finishing, noisy commands, settings, recording a decision) and decisions (one pointer to get_why when decisions govern files, plus pinned titles) |
| Opt-in | architecture, key_modules, entry_points, hotspots, health (score and worst file), code_health (every health signal, replaces health), fix_first, commands (build, test and lint read from manifests), how_to_work_full, tools (the tool table) |
The block names only the tools the reading client is listed, and points the
agent at repowise config list and repowise config explain for settings.
CLAUDE.md names the tools the way Claude Code calls them
(mcp__repowise__<tool>, or mcp__plugin_repowise_repowise__<tool> under the
plugin); AGENTS.md names the repowise server and leaves tool naming to the
client.
The decisions: block
The decisions layer: one mode for the whole layer, which sources init
mines, whether any may call a model, and the switches for each hook. One
resolved policy backs the CLI, the API, the hooks, the MCP tools and the index
pipeline, so they agree about what will run.
decisions:
mode: full # full | read_only | off: the one switch for the layer
enabled: true # master switch for automatic capture
llm: true # master switch for decision-extraction model calls
preset: balanced # default | off | local_only | balanced | full
sources:
inline_marker: true # WHY:/DECISION: markers
git_archaeology: true # commit messages
adr: true # ADR files
pr: true # PR / squash-merge bodies
comment: false # comment archaeology on top central files
session: # off by default; long form runs the source, skips its model stage
enabled: true
llm: false
session_discovery: true # one broad model pass over new transcript prose
conventions: false # import patterns the graph proves, no model
discovery: # budget for that one pass, per update
max_sessions: 12 # 1-24
max_input_tokens: 30000 # 2000-60000
harnesses: [claude_code] # whose transcripts the session source reads; add codex
capture_prompt: true # after a commit, ask the agent to record the decision
agent_acceptance: true # let an agent accept a decision, signed as itself
require_approval: false # make every new decision wait for a person
upkeep_prompt: false # after a commit, ask the agent to settle the decisions it touched
session_start: false # open each session with the decisions over its working set
sync: false # exchange decisions with this repo on repowise.dev on update
update_mining: false # let update mine new commits and PRs with the model| Key | Default | What it does |
|---|---|---|
mode | full | full captures and shows decisions; read_only shows what exists and captures nothing; off shows nothing. Each mode sets the defaults of the switches below; one you set explicitly wins, except under off. An unknown value reads as read_only |
agent_acceptance | on in full, off otherwise | Let a coding agent accept a decision, signed as the agent's |
capture_prompt | on in full, off otherwise | Ask the agent to record a decision when a commit states a choice |
require_approval | false | Landing a commit grants nothing and an agent's own acceptance is refused; a person puts each new decision in force with repowise decision confirm |
upkeep_prompt | false | After a commit that changes governed files, name up to three of their decisions, each once a session, with one command for each outcome (still holds, replaced, knowingly broken) |
session_start | false | The session start hook also lists up to six decisions in force over the files the session is likely to touch, plus at most two labelled background records |
sync | false | With repowise login and a GitHub origin, every update runs decision push then decision pull against the repo on repowise.dev. Under read_only only pull runs. A failure prints one line and never fails the update |
update_mining | off | Each update also mines new PR bodies and commits, structures new inline markers, and asks the model whether a change replaced a decision it touches. Unset reads as on when the block names a preset or lists sources, so a repository configured that way keeps mining on update |
Every key is optional. With update_mining off, init reads history once
and the records it mines are background, served by get_why when asked;
update reads inline markers on changed files and makes no decision model
call, and decisions an agent recorded still come into force when their commit
lands. A config with no decisions: block resolves to the default policy: inline_marker, git_archaeology, adr, pr and
comment on with their model stages; session, session_discovery and
conventions off until you turn them on
(repowise decision source set session --on). Upgrading never starts a
model call nobody enabled. A config that names a preset and lists its
sources keeps exactly that list; re-apply the preset to pick up a source
the preset gained since.
A source is a bare boolean or an {enabled, llm} mapping. The long form
only matters for a source with both a deterministic and a model stage
(inline_marker, adr, session): it keeps the deterministic parse and
skips the model call. A source that is model-only (git_archaeology,
pr, comment, session_discovery) is skipped entirely when its model
stage is off, because running it would produce a zero indistinguishable
from an empty repository.
Unknown keys are reported as warnings and kept, so a typo'd
source name shows up instead of silently reading as a working switch.
Unrecognised names such as code_comment, changelog and
readme_mining load with a warning naming the key that was ignored.
Presets
Conveniences that write the same keys. Nothing downstream branches on the preset name.
| Preset | Effect |
|---|---|
default | What a config with no decisions: block resolves to. Every long-standing source on; session mining and broad discovery off. |
off | No automatic capture. Stored decisions and manual entry keep working. |
local_only | Deterministic capture only, session mining included. Zero decision-extraction model calls. |
balanced | The high-signal sources plus session mining and broad session discovery; comment archaeology off. |
full | Every source, every model stage. |
Editing any individual key after applying a preset drops the preset
line, and the resolved policy reads as custom.
llm: false is a complete mode, not a degraded one: transcripts are
still read, markers and ADRs are still parsed, episodes are still
recorded, manual decisions still work, and already-accepted decisions
keep governing. It is the one switch that proves no decision extraction
reaches a model.
Session mining
The session source lets repowise update mine coding-agent session
transcripts (Claude Code's ~/.claude/projects/) for durable decisions:
user corrections, explicit choices with a stated reason, and failed
approaches replaced by working ones. Candidates pass deterministic gates
first, then one batched LLM structuring call per update, and every
produced field must quote the transcript verbatim or it is dropped.
Everything stays local: transcripts are read from your machine, staging
lives in .repowise/sessions/sessions.db, and only the distilled
decision text about the codebase is stored.
session_discovery is the broader reading of the same transcripts: one
model pass over new prose each update, bounded by the discovery:
budget above. It is off in the default policy and on in balanced and
full.
capture_prompt and agent_acceptance are on by default, and a
non-boolean value reads as off. With capture_prompt on, after a git commit
whose message carries decision signals, the agent is offered the
repowise decision add --agent line once per session. It only proposes: what
the agent records lands as a candidate for review. With agent_acceptance on,
an agent accepts by signing as itself; set it to false to keep granting to
people.
decisions.session_mining: true|false is an alias for the session
source in both directions. The first write through the CLI or the API
replaces it with sources.session, which is the key to write.
Setting it from the CLI
repowise decision config show # the resolved policy, per source
repowise decision config mode read-only # off | read-only | full
repowise decision config update-mining --on
repowise decision config preset local_only
repowise decision source set comment --off
repowise decision source set adr --no-llm # keep the parse, skip the model
repowise decision source set session_discovery --on
repowise decision config discovery --max-sessions 6 --max-input-tokens 12000
repowise decision llm --offEvery mutating command takes --dry-run to print the change without
writing, and --format json for scripts. Writes are atomic and preserve
every unrelated key in config.yaml. See
repowise decision.
Coverage and test selection
The coverage: block feeds repowise coverage and the
CI gates; tests: extends
repowise impacted-tests.
coverage:
paths: # reports or globs (skips discovery)
- coverage/lcov.info
- {path: "web/coverage/*.info", path_prefix: web}
strip_prefix: "/build/src/" # trim a prefix from report paths
ignore: ["**/*_pb2.py"] # gitignore-style globs coverage leaves out
fail_under: 80 # patch-coverage gate for coverage check (0-100)
min_coverable_lines: 5 # smaller changes are reported, never failed
fail_under_risky: 90 # optional gate over hotspots and bug magnets
fail_under_branches: 70 # optional gate on branches taken on changed lines
max_drop: 0.5 # most project coverage may fall from the base, in points
gates: # path-scoped gates (repowise coverage suggest-gates)
- {name: api, paths: ["/services/api/"], fail_under: 85}
- {name: scripts, paths: ["/scripts/"], fail_under: 50, informational: true}
tests:
full_run_on: ["migrations/**"] # changes here select every test
always_run: ["tests/test_smoke.py"]Discovery keys (auto_discover, artifacts, format,
reingest_on_update) are on Test intelligence.
The evidence: block
Caps on the runtime evidence
repowise evidence add stores, and the bar a measured function clears to
count as a cost. A capped run keeps its costliest entries and counts the
rest, so a reader shows them as unknown, never as zero.
| Key | Default | What it does |
|---|---|---|
max_file_mb | 20 | Largest evidence file read, in MB; a bigger one is refused before it is read |
max_symbols_per_run | 1500 | Most functions stored from one profile, costliest self time first |
max_rows_per_run | 30000 | Most benchmark, test or query rows stored from one run |
history_runs | 20 | Runs kept per workload and environment for each evidence kind |
max_runs | 50 | Runs kept per evidence kind across all workloads; each workload and environment always keeps its newest run |
rank_top_n | 10 | A measured function is ranked when it is among this many production functions with the most self time in its run |
rank_min_samples | 30 | Fewest self samples on a function for it to be ranked |
lead_min_share | 0.025 | Self share of the run's time a ranked function needs to count as a measured cost from one run |
lead_min_lower_bound | 0.02 | Lower bound of the 95% interval on that share a lead candidate needs from one run |
lead_min_runs | 2 | Independent runs in which a function must be ranked to lead without the share rule |
The report: block
The repo report init writes after the
first index.
| Key | Default | What it does |
|---|---|---|
first_look.enabled | true | Write the repo report after the first index; the template version costs nothing |
first_look.llm | true | Let one model call write the report's wording when a provider is configured and prose is on |
first_look.model | "" | Model for that call; empty uses the provider's cheap model, else its default |
The security: block
Secret shapes of your own for repowise security check:
security:
patterns:
- name: internal_token # 1 to 40 of a-z, 0-9, _ and -, unique
regex: 'itk_[A-Za-z0-9]{32}'
severity: high # low, med or high; high when omittedEach reports as the kind custom:<name>, masked like every other secret.
A regex that does not compile or can match zero characters fails the
check with exit 2. At most 50 patterns.
.repowise/components.yaml
Components name the parts of a repository that health, hotspots, bus factor,
test reach, dead code and Change Records roll up to. The file is
multi-document Backstage YAML (Component, System and Group on
backstage.io/v1alpha1) with repowise data in annotations:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: payments-api
annotations:
repowise.dev/paths: "services/payments/**, libs/billing/**"
repowise.dev/criticality: high # low, medium, high or critical
repowise.dev/tags: "pci, api"
spec:
type: service
owner: group:default/payments
system: checkoutrepowise.dev/paths holds gitignore-style globs written with /, matched
case-sensitively; where two components match a file, the first declared wins.
A repo-root catalog-info.yaml is read the same way, so a developer portal
and repowise share one file. With no file, components are derived from
workspace services, then module pages, then top-level directories. Validate
with repowise components check.
.repowise/teams.yaml
Declared teams and the identities that count as each team's activity, for
repowise components ownership. Members are used only to match commits and
never appear in output.
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: payments
annotations:
repowise.dev/member-emails: "dev1@example.com, dev2@example.com"
spec:
type: team
children: []
members: [dev1-login, dev2-login]A CODEOWNERS @org/team (GitHub or GitLab, sections included) and a catalog
spec.owner of group:default/team both resolve to the Group named team.
.repowise/policies.yaml
The change policy repowise check
evaluates. Each rule selects components (match, exclude), tests
conditions over the change's evidence (when, all must hold) and names an
action. A rule can instead wrap an existing gate with that command's options
under with.
version: 1
rules:
- name: agent-pci-needs-owner
match:
components: {tags: [pci]} # also names, criticality; each list is any-of
when:
attribution: agent # agent, human_attested or unknown
reaching_tests: missing # a changed file in scope has no reaching test
action: require_owner_review
- name: no-new-secrets
gate: security # security, coverage, doc_drift or health
with:
fail_on: high
baseline: .security-baseline.json
action: fail # the default for a gate| Key | Values |
|---|---|
Conditions (when) | attribution, agent_tier (1, 2 or 3), reaching_tests (missing or present), contract_break, decision_crossed, bus_factor_below |
| Actions | warn, require_owner_review and require_tests (reported, exit 0), fail (exit 1) |
| Gates | security, coverage, doc_drift (scoped to the change unless the rule sets since) |
There is no risk-score condition. A condition whose evidence is unavailable
leaves the rule not evaluated, and it never fires. An unknown key, condition
or gate option, a bad action or a duplicate rule name exits 2 with every
problem listed.
The attribution: block
attribution:
enabled: true # read public AI markers: bot authors, trailers, footers, git-ai notes, Agent Trace files
capture: off # off, local or notes
agents: [] # agent ids to capture, e.g. claude-code, codex, cursorThe same block in ~/.repowise/config.yaml applies to every repository, and
the stricter value wins per key: enabled: false in either file, the lower
capture level, and only the agents both files list. With enabled: false
nothing about AI is stored or shown anywhere, and DO_NOT_TRACK=1 keeps
capture off. capture: local records the listed agents' edits as line hashes
in .repowise/attribution/; notes also writes git-ai notes on
refs/notes/ai. See repowise attribution.
To recognise your own bot or footer, add it under agent_provenance::
agent_provenance:
service_emails:
mybot@example.com: {agent: mybot, tier: 1}
footer_patterns:
- {pattern: "Generated by MyBot", agent: mybot}The events: block
events:
enabled: true # snapshot components at each index run and diff them
retention_days: 365 # older runs and events are dropped
compact_after_days: 30 # older runs keep one per ISO week
kinds: {new_hotspot: true}
sinks: [jsonl] # jsonl (.repowise/events.jsonl), stdout, or a plugin's sinkA run is diffed against the run right before it when both ran under the same
analyzer and parser stamp; a stamp change starts a new baseline. new_hotspot
is off by default and every other kind is on. repowise doctor names any
value here that fell back to its default. Read events with
repowise events.
The assertions: block
Names your own assertion helpers, so a test built from them is not flagged as checking nothing:
assertions:
extra_names: [ensureInvariant, mustMatch] # exact, case-insensitive; never prefixesThese names reach only the advisory test-quality markers. They never change a health score.
The refactoring: block
Controls the refactoring-intelligence layer: the structured Extract
Class / Extract Helper / Move Method / Break Cycle / Split File plans
surfaced by repowise health --refactoring-targets,
get_health(include=["refactoring"]), and the web Refactoring tab.
refactoring:
enabled: true # the deterministic plans (zero LLM, in the health pass)
detectors:
disabled: [] # e.g. [move_method] to silence one detector
min_confidence: null # low | medium | high (confidence floor; null = no floor)
llm:
enabled: false # code generation: off until you set trueThe deterministic layer is zero-LLM and runs in the init / update
health pass. Code generation is the only part that calls a provider. It
is off until llm.enabled: true, because it sends source to a model, and
even then it runs only on an explicit request, never during indexing.
enabled: false
skips the whole deterministic detector pass; detectors.disabled
silences named detectors while the rest keep running.
The health-rules.json file
A separate JSON file (not part of config.yaml) that tunes code-health
biomarkers: which ones run, their severity, and per-path overrides.
Malformed JSON never raises, repowise warns and falls back to an empty
config.
{
"profile": null,
"disabled_biomarkers": [],
"severity_overrides": {
"high_churn": "low"
},
"rules": [
{
"path": "legacy/**",
"disabled_biomarkers": ["long_function"],
"severity_overrides": {
"duplication": "critical"
}
}
]
}| Parameter | Type | Default | Description |
|---|---|---|---|
profile | string | null | Named calibration profile; "small-team" is the one defined |
disabled_biomarkers | string[] | [] | Biomarker names to skip repo-wide |
severity_overrides | object | {} | Maps a biomarker name to a severity label: low | medium | high | critical |
rules | object[] | [] | Per-path overrides, evaluated in order. Each entry takes path (glob, aliases path_glob / glob also accepted), disabled_biomarkers, and severity_overrides |
Only the severity label is overridable this way, never the underlying numeric weights or caps that produce the health score.
skip_tests, skip_infra, and include_submodules are CLI-flag-only
(--skip-tests, --skip-infra, --include-submodules) and they don't
persist to config.yaml, so pass them again on each init/update
run if you want the same exclusions.
Next
- Configuration reads and changes these keys with
repowise config. - Environment variables covers keys and knobs that live outside
config.yaml. - Tool profiles explains what each
mcp.toolsvalue lists for each client.