Repository navigation
Expand file tree
/
Copy pathconfig.example.toml
More file actions
956 lines (932 loc) · 59.5 KB
/
Copy pathconfig.example.toml
File metadata and controls
956 lines (932 loc) · 59.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# This file describes behaviour. Machine-specific values -- data_dir, port, the
# model URLs and names, ripgrep_path, rust_analyzer_path and the language-server
# sections below -- can also be set per machine, outside this file, so it can
# be shared unchanged: in a local overlay file beside it (config.local.toml for
# config.toml; the same keys, nothing else) or in LCI_* environment variables
# (LCI_DATA_DIR, LCI_PORT, ...). Both win over this file; the environment wins
# over the overlay. `lci config` prints every resolved value with the layer it
# came from, and `lci init` writes the overlay for this machine (the data
# directory, the absolute path of each tool on PATH) with comments on the
# model services and the port; it never edits this file. Details: the
# Configuration section of the README.
embedding_url = "http://localhost:8766/v1"
embedding_model = "qwen3-embedding-4b"
reranker_url = "http://localhost:8767/rerank"
reranker_model = "qwen3-reranker-4b"
# Each model service (the embedder and reranker above, System One below) is a
# URL, a model name and, optionally, the NAME of an environment variable that
# holds an API key (sent as a bearer token). The key itself never belongs in a
# configuration file; the name is upper-case letters, digits and '_'. Each
# service can be a local server, a server on another machine, or a hosted
# provider; the defaults point at local servers. A key sent over plain http to a
# non-loopback host travels unencrypted; LCI logs a warning at startup. Use https.
# embedding_api_key_env = "EMBEDDING_API_KEY"
# reranker_api_key_env = "RERANKER_API_KEY"
#
# The optional [system_one] section (a small model planned to steer a traversal)
# is a table, so its commented example is at the end of this file.
default_top_k = 8
# Defaults to the OS-native local data directory joined with
# "local-code-intelligence": %LOCALAPPDATA% on Windows, ~/Library/Application
# Support on macOS, $XDG_DATA_HOME or ~/.local/share on Linux, which is
# usually right. Must be absolute and outside every workspace you index. To
# place it for this machine only, set data_dir in the local overlay or
# LCI_DATA_DIR instead of here.
# data_dir = '/absolute/path/outside/every/indexed/workspace'
# Loopback port `serve` binds (127.0.0.1). 8765, 8766 and 8767 belong to other
# services and are rejected. `serve --port` overrides it.
port = 8768
embedding_batch_size = 8
# Prompt formats for the embedding model. Models differ in what they expect (an
# instruction prefix, a task label), so the text embedded for a query and for an
# indexed chunk are both templates. The defaults below are Qwen3-Embedding's
# query instruction and the bare code for documents.
#
# embedding_query_template is the text embedded for a search query. {query} is
# required. It shapes the query only, so changing it never re-embeds an index.
embedding_query_template = "Instruct: Given a code search query, retrieve relevant code passages that answer the query\nQuery: {query}"
# embedding_document_template is the text embedded for each indexed chunk.
# {code} (the chunk's source) is required; {path} (its repository-relative file
# path) is optional. Changing it changes the index's embedding identity, so
# every chunk is re-embedded: the next index_workspace does it, and so does a
# search under the default on-search freshness (under manual or watch a search
# fails until you re-index). Without {path}, identical code is embedded once
# and reused wherever it appears; with {path} the vector depends on the file
# too, so identical code in different files, or a file moved to a new path, is
# embedded per path.
# Placeholders are filled in one pass: code that contains the text {path} is
# embedded literally, and any other {text} in a template is kept as it is.
embedding_document_template = "{code}"
# EmbeddingGemma 2 (set both):
# embedding_query_template = "task: code retrieval | query: {query}"
# embedding_document_template = "title: {path} | text: {code}"
# bge-code-v1 (set both; the document format is the bare code):
# embedding_query_template = "<instruct>Given a question in text, retrieve relevant code that answers it.\n<query>{query}"
# embedding_document_template = "{code}"
embedding_timeout_seconds = 120
reranker_timeout_seconds = 120
# Which service orders the fused shortlist while [channels].reranker is on:
# "reranker" (the reranking service above, the default) or "system_one" (the
# typed [system_one] service, provider = "system_one_wire": batched requests, one
# yes/no question per candidate, the probabilities as scores). "system_one"
# needs the [system_one] section at the end of this file. If the typed service
# fails (timeout, error status, malformed or partial answer) the search returns
# the fusion order with one warning; the reranker is not the fallback.
rescorer = "reranker"
# Bounded timeout for /ready and service_status dependency probes, and for the
# readiness probe of the lsp.live traversal map (1-30 seconds). 15 by default: a
# language-server binary can take several seconds to answer its probe
# (`<server> --version`, `gopls version`, a start for pyright) while the machine
# is busy. A hanging dependency is waited for up to this long, one that answers
# within it is reported ready; a refused port or a missing binary fails at once.
readiness_timeout_seconds = 15
ripgrep_path = "rg"
semantic_candidate_count = 40
lexical_candidate_count = 40
# Candidates kept after fusion: the reranker's window, and the most results a
# search returns even when top_k asks for more (a top_k passed above it adds
# a note to the response). A search profile may set its own (1-200).
rerank_candidate_count = 24
# Most bytes of code sent to the reranker per candidate (256-1048576).
rerank_document_max_bytes = 4096
rrf_k = 60.0
# Used only after watch_workspace is called for a workspace.
watch_poll_milliseconds = 2000
watch_debounce_milliseconds = 750
rust_analyzer_path = "rust-analyzer"
# Restore rust-analyzer's execution/network defaults only for trusted
# repositories and dependencies. Applies to every workspace this process uses.
# Also gates the probe.compile traverse map (cargo check runs build scripts).
rust_analyzer_trusted = false
# Seconds a request to a language server may go without any sign of life from
# it (1-86400).
lsp_timeout_seconds = 60
# Seconds a language server may go without any sign of life from it while it
# starts (its initialize request; 0-86400). 0 bounds the start by
# lsp_timeout_seconds. Raise it for a server that is silent while it loads a
# large solution or project, without raising the bound of every later request.
lsp_start_timeout_seconds = 0
lsp_candidate_count = 40
# Most milliseconds one search waits for the language-server channel
# (100-60000). A server that is still starting (rust-analyzer takes about 10 s
# to index a workspace; an estimate) or slow to answer costs a search at most this long: the
# search returns without symbol candidates, notes that in its "notes" field
# (not "warning": nothing failed), and the server keeps starting in the
# background so a later search uses it. Raise it to wait longer for a cold
# server; lsp_timeout_seconds separately bounds one request to a hung server.
lsp_search_budget_ms = 1500
# Seconds a language server may go unused before LCI shuts it down (through
# the protocol's shutdown request and exit notification: up to 2 seconds for
# the answer and 2 more for the process to end, then it is killed) to free its
# memory; 0 keeps every server until the service stops. Any search or
# navigation call for the workspace counts as use, and a server that is still
# building its symbol index or serving a call is never released. The next call
# after a release starts a fresh server, which pays the cold start and priming
# again, so a search right after a release can hit lsp_search_budget_ms and
# note it. Allowed: 0-86400; values below 60 are meant for tests.
lsp_idle_timeout_seconds = 1800
# Seconds a language server may answer nothing but transient "ask again"
# errors (ContentModified, ServerCancelled, RequestFailed, a loading server's
# own errors) before its session is replaced; the span runs from its first such
# answer, and any result, any other error, or a progress notification from the
# server ends it. A server that is still loading answers them for minutes and a
# restarted one starts the load over, so keep this above the longest load you
# expect. 0 never replaces a session for this.
# Allowed: 0-86400; values below 60 are meant for tests.
lsp_stuck_seconds = 900
# Optional C# language server (csharp-ls). C# tooling is optional and
# fail-open: omitting this section (or leaving path empty) keeps it disabled
# without affecting syntax retrieval. The shared lsp_timeout_seconds and
# lsp_candidate_count above also apply to the C# server.
# [csharp]
# path = "csharp-ls"
# args = []
# disabled = false
# Optional TypeScript/JavaScript language server (typescript-language-server,
# npm install -g typescript-language-server typescript). One configured
# server navigates .ts/.tsx/.js/.jsx. Optional and fail-open, same as csharp
# above. LCI always passes --stdio; args here are appended after it.
# [typescript]
# path = "typescript-language-server"
# args = []
# disabled = false
# Optional Python language server (pyright, npm install -g pyright, which
# provides pyright-langserver). Optional and fail-open, same as csharp above.
# LCI always passes --stdio; args here are appended after it.
# [python]
# path = "pyright-langserver"
# args = []
# disabled = false
# Optional Go language server (gopls, go install
# golang.org/x/tools/gopls@latest). Optional and fail-open, same as csharp
# above. Unlike csharp-ls/typescript-language-server/pyright, gopls needs no
# forced leading transport flag -- stdio is its default communication mode.
# Needs a go.mod at or above the workspace root to build its package graph.
# [go]
# path = "gopls"
# args = []
# disabled = false
# Optional Java language server (jdtls / Eclipse JDT Language Server).
# Unlike every other server above, path is the jdtls *installation
# directory* (e.g. an extracted jdt-language-server-*.tar.gz), not an
# executable -- LCI spawns java directly, finding the Equinox launcher jar
# and platform config dir under that directory itself. Optional and
# fail-open, same as csharp above.
# [java]
# path = "/path/to/jdtls" # a relative path resolves against the working directory of the LCI process
# JVM options (-Xmx..., -D...) go before -jar; other args after -data <dir>.
# args = []
# disabled = false
# Optional C/C++ language server (clangd). One configured server navigates
# .c/.h and .cpp/.cc/.cxx/.hpp/.hh/.hxx. Optional and fail-open, same as csharp
# above. Like gopls, clangd needs no forced leading transport flag. No compile_commands.json
# is needed for simple per-file navigation; point clangd at a real one via
# args (e.g. "--compile-commands-dir=...") for a workspace with a build system.
# [clangd]
# path = "clangd"
# args = []
# disabled = false
# Optional Markdown language server (marksman). Reached only for an indexed
# prose file, so it also needs [index] prose = true. Optional and fail-open,
# same as csharp above. The adapter forces the `server` subcommand before args
# (marksman's stdio mode). It reads headings and links: documentSymbol is the
# heading outline, definition at a link is its target, references at a heading
# are the links that point at it, workspace/symbol lists headings (needs a .git
# directory or a .marksman.toml at the workspace root, which LCI never writes). The install
# path is a machine key: set it in the local overlay or LCI_MARKDOWN_PATH.
# [markdown]
# path = "marksman"
# args = []
# disabled = false
# Query-time switches for the retrieval channels and the reranker; all default
# to true, and a file without this section behaves exactly as before. A
# disabled channel is skipped outright: no candidates, no work (semantic =
# false never embeds the query; lsp = false never starts a language server), a
# zero timing, and no "unavailable" warning, because turning it off is a
# choice, not a failure. A disabled reranker returns the fusion order with
# reranked = false, sends no request, and adds no warning. At least one of
# semantic, lexical, and lsp must stay enabled, or the configuration is
# rejected at startup.
# The switches affect searches only. Indexing always embeds and stores every
# chunk, so flipping one never needs a reindex, and /ready and service_status
# keep probing the embedding service even with semantic = false, because
# indexing still needs it.
# Grep-only baseline for an evaluation arm (ripgrep matches mapped onto
# chunks, nothing else): semantic = false, lsp = false, reranker = false.
[channels]
semantic = true
lexical = true
lsp = true
reranker = true
# Named query-time profiles, [search_profiles.<name>]: none are configured by
# default, and a search that names none behaves exactly as it does without this
# section. A profile overrides only semantic, lexical, lsp, reranker (the same
# switches as [channels]) and rerank_candidate_count (1..=200); a key it leaves
# out keeps the top-level value above. Nothing that changes the index, the
# embedding identity, fusion, the candidate depths, the per-file cap, or
# rerank_document_max_bytes can be set here (an unknown key is an error), so
# every profile searches the same index. Each profile must keep at least one of
# semantic, lexical, and lsp enabled. A name is 1 to 32 letters, digits, "_" or
# "-" starting with a letter or digit, and "default" is reserved. Choose one
# with `search --search-profile <name>` on the command line; an unknown name is
# an error that lists the configured ones, never a silent fall back to the
# defaults. The response and the candidate dump then carry search_profile.
# Fusion order only, no rerank request:
# [search_profiles.fast]
# reranker = false
# Rerank a wider shortlist and leave the language servers out:
# [search_profiles.deep]
# lsp = false
# rerank_candidate_count = 48
#
# Four more profile keys change only how the MCP endpoint /mcp/<name> shows
# itself to an agent and never what a search retrieves; REST and the command
# line always return the full result:
# tools = "full" (default) or "search": "search" lists and serves only
# search_code, search_symbols, find_definition and find_references, not the
# six maintenance tools (about a third of the tool list).
# response = "full" (default) or "compact": "compact" makes search_code return
# per hit only relative_file_path, start_line, end_line, language,
# source_role and code, and a short envelope. The same hits in the same
# order.
# compact_max_hit_lines = 40 (1..=1000): a longer hit's code is cut after this
# many lines and marked (code_truncated, excerpt_end_line, and a last line
# naming the lines to read from the file).
# compact_max_response_chars = 16000 (1000..=1000000): a ceiling on the whole
# serialized result; code is shortened across hits (response_truncated), and
# if even the locators do not fit the call fails and asks for a lower top_k.
# The two compact_* keys are an error without response = "compact". A search-only
# agent endpoint with the compact result (served at /mcp/agent):
# [search_profiles.agent]
# tools = "search"
# response = "compact"
# compact_max_hit_lines = 40
# compact_max_response_chars = 16000
# Per-channel weights for Reciprocal Rank Fusion. A channel adds
# weight / (rrf_k + rank) for each chunk it returns, and a chunk several
# channels return sums those terms; the source-role prior is added afterwards
# and is never scaled. All three weights default to 1.0, which is plain
# unweighted RRF (a semantic_weight of 2.0 had no significant effect in an exact
# offline replay; see docs/decisions.md). A file without this section uses the defaults. Set max_chunks_per_file to 0
# for plain RRF with no file cap, for example for an evaluation arm that must
# match earlier reports. Each weight must be finite and greater than zero: a
# zero weight is rejected at startup, because turning a channel off is what
# [channels] is for. The weights show up only in fusion_score; channel ranks and
# scores, and the reranker's input, are unchanged. rrf_k stays a top-level key.
#
# max_chunks_per_file (0..=100, default 2; 0 = unlimited, which leaves the
# fused order exactly as plain fusion gives it) caps how many chunks of one file
# keep their place in the fused order. A file's chunks beyond the cap are
# demoted, never dropped: they move behind every other chunk, both groups
# keeping their fused order, before the list is cut to rerank_candidate_count.
# The reranker's shortlist (and, with the reranker off or failing, the results)
# therefore fill with distinct files first, and top_k is still filled from the
# demoted chunks when there are too few files. fusion_score is not rescaled, so
# a demoted chunk can appear after a chunk with a lower fusion_score. The
# reranker's own output order is not capped again. The default of 2 was
# measured on the mined evaluation set and core; the numbers are in
# docs/decisions.md.
[fusion]
semantic_weight = 1.0
lexical_weight = 1.0
lsp_weight = 1.0
max_chunks_per_file = 2
# The documentation lane (runs only with [index] prose = true; Markdown is not
# indexed by default). Markdown chunks never enter the code `results` list
# (when no source_roles filter is given, that list is exactly what an index of
# the same files without Markdown would return); they are searched on their own
# and come back in a separate `docs` list of search_code, with a second rerank
# only when reranker = true below (default off). The lane is fail-open: a failure there only sets
# docs.warning and never touches the code list. top_k (0..=10) is the length of
# the docs list; 0 leaves the lane off. rerank_candidate_count (1..=200) is the
# docs shortlist. semantic_candidate_count is the semantic depth of the docs
# lane. enabled = false drops the lane (Markdown is then absent from default
# searches; name source_roles = ["documentation"] to search it). A search profile
# may override docs_top_k and docs_reranker; [channels].reranker does not
# affect the docs lane.
[docs_lane]
enabled = true
top_k = 2
rerank_candidate_count = 12
semantic_candidate_count = 20
reranker = false
[index]
# manual: never refresh automatically; call index_workspace explicitly.
# on-search: refresh a stale snapshot on the first search that needs it (default for agents).
# watch: leave refresh to watch_workspace's background poller instead of checking on every search.
freshness = "on-search"
# Throttles filesystem staleness checks under "on-search" so repeated
# searches in the same unchanged workspace reuse the current snapshot.
stale_check_interval_seconds = 10
# How long a search waits for a concurrently running refresh job before
# falling back to the previous snapshot.
wait_for_existing_job_seconds = 120
# Index prose files (.md). false (default): they are not indexed at all, so
# the index and every search result are as before the Markdown adapter and the
# [docs_lane] below never runs; true: they are indexed and the docs lane
# applies. Opt-in because the default docs list cost +26-28% returned tokens on
# the core set. Flipping it makes the snapshot stale; the next refresh adds or
# drops exactly the .md files.
prose = false
# The graph-traversal mode of search_code (mode = "traverse"), off by default.
# While enabled is false, search_code, its schema and the server instructions
# are exactly those of a server without the mode, and a request that asks for
# the mode is an error. Enabled, a request with mode = "traverse" walks the
# workspace's SCIP index (map graph.scip, written by `rust-analyzer scip`;
# the start nodes are the top seed_k hits of the hybrid search search_code runs
# in its normal mode, mapped to symbols of the index) under the budget, the rule
# list and the stop settings of its steer object, and returns the reached
# nodes with the trace totals; a handle and a checkpoint come back only when
# the steering ladder could not decide a stop or the budget ran out. The
# limits below are caps: a request may lower them, never raise them. The same
# walk runs as `lci traverse`, which ignores enabled and, given --root, seeds
# from the hybrid search of that tree (the model services it configures). A
# stand-in that matches the question's words against symbol names replaces the
# hybrid search only when it is unavailable or finds nothing, and the response
# and the trace say so (seed_source). Traces and handles are written under
# data_dir. Engine reference: docs/spike/multimap/engine.md.
[traverse]
enabled = false
# A relative path is taken from the workspace directory.
scip_index = "index.scip"
max_pops = 200
max_depth = 6
max_est_tokens = 20000
# Longest the walk may run. The hybrid search for the start nodes does not
# count against it (embedding_timeout_seconds and reranker_timeout_seconds
# bound that search). Loading the index does count against it. Building the
# tree maps (with lsp.live, the version probe of its server among them, bounded
# by readiness_timeout_seconds) and the tree barrier are credited back too, so a
# call's wall time can exceed deadline_ms by that setup.
deadline_ms = 5000
max_stops = 4
# Confidence a rung of the steering ladder needs to decide a stop. Only the
# rules rung exists: confidence 1 on a clean match, else 0. Any value above 0
# behaves the same; 0 lets an unmatched rule list decide with no actions, so no
# stop escalates to the caller (a rule's own `stop` and a list cut short still
# end the call).
tau = 0.8
# How much each independent map beyond the first that reaches a node lifts its
# rank: potential * (1 + boost * (maps - 1)). 0 ranks by potential alone; the
# most is 10 (a larger value could overflow the ranks). Maps built on one graph
# (structure.contains, graph.scip, scip.impact) count as one. A resumed
# traversal must be given the boost its handle was made with.
corroboration_boost = 0.1
# How results are ranked. "boost" (default): the path potential lifted by
# corroboration_boost. "rrf": weighted reciprocal rank fusion, as Qdrant does:
# each evidence source (one independent map; the maps built on one graph
# together; a seed's own map) ranks the nodes it delivered by the best
# potential with which it delivered them, and a node scores the sum over
# sources of weight / (rank + 2), rank from 0, weight the map weight a steering
# policy sets (1 by default). Ties go by node id. Under "rrf" the score bound
# (the early stop `bound`) is off, because a fused score depends on the ranks of
# all the other results, and corroboration_boost does not rank. "log_odds":
# capped log-odds over the same sources: a node scores the sum over sources of
# weight * clamp(ln(p / (1 - p)), -3, 3), p the best potential with which the
# source delivered it, and a source that delivered other results but not this
# node costs weight * 3. So one strong source with one silent can beat two weak
# ones, and no flood of low-weight deliveries moves a node past weight * 3 per
# source. Ties by node id; the score bound is off and corroboration_boost does
# not rank here either. A resumed traversal keeps the fusion its handle was made
# with.
fusion = "boost"
# Connective nodes (files, commits, config keys) are passed through: expanding one
# does not cost a pop, so they do not eat the budget that answer nodes need. The
# traversal ends when the free pops reach max_pops, a pass-through pop does not
# make its children free, and the token budget is charged as usual. A resumed
# traversal keeps the setting its handle was made with.
pass_through = false
# Reranker frontier: after the gate and the beam keep the edges of an expansion, one
# batched reranker call scores the kept destinations against the question, and each
# kept hop's value is multiplied by rerank_floor + (1 - rerank_floor) * s, s the
# relevance in 0..1. The factor is at most 1, so the score bound stays sound. A
# failed call leaves the factor at 1; the response warns when any failed and counts
# the failures by reason. Uses the configured reranker; a resumed traversal must be
# given the same settings, the same reranker model and endpoint, and the same
# top_k. rerank_floor is the factor for relevance 0, 0 to 1 (1: no effect).
# rerank_scores says what the reranker's scores are, for every document alike:
# "probability" (default; llama.cpp's /rerank returns probabilities) clamps each
# score to 0..1, "logit" maps each through 1 / (1 + e^-score).
rerank_frontier = false
rerank_floor = 0.25
rerank_scores = "probability"
# Most model calls (the reranker frontier's calls) one traversal may make, a
# continuation counting on from the calls before it. Once reached, the frontier
# stops rating (the hops keep factor 1) and the walk goes on. Absent: no cap.
# max_model_calls = 200
# Whether the score bound may end a traversal early: once enough results exist and
# nothing queued can lift a result above the k-th, the walk stops with the stop
# reason `bound`. false: the walk runs to its budgets or a dry frontier. A resumed
# traversal keeps the setting its handle was made with.
score_bound = true
# A table of fitted hop priors (written by `cargo xtask maps fit-priors`) and the
# question type whose priors price the hops; both or neither. Per question type
# the priors are divided by the largest, and a pair the table lacks keeps the
# guessed prior. A continuation handle keeps the table's content hash and is
# refused when the file changed.
# priors = "hop-priors.json"
# question_type = "flow"
# A fitted tie-break (written by `cargo xtask maps fit-tiebreak`): a weighted sum of
# result features that orders results tied at the same rank, which otherwise keep
# discovery order. It never lifts a result over a higher rank. A continuation
# handle keeps the file's content hash and is refused when the file changed.
# tie_break = "tie-break.json"
# Hits of the hybrid search that become start nodes, 1 to 40.
seed_k = 8
# First stage: answers that join the walk's results ahead of or among them. The
# first stage is the cards of the exact operators the call selects (the maps
# exact.closure and exact.pickaxe, named in the maps list and needing the tree;
# each abstains with a note when nothing the question names resolves), in the
# order of the maps list, then, with answer_seeds, the start nodes. Cards say
# where they came from (origin: exact, seed or walk) and a node is listed once,
# at its first place. "append" (default): the first stage (at most first_k),
# then the walk's results. "interleave": first-stage and walk results
# alternately, first stage first, cut to top_k in total. "off": the results are
# the walk's alone and the response is as without these keys. first_k caps the
# first stage, 0 to 200 (0: no cap). A continuation (handle) returns the walk
# alone. The defaults here (append, answer_seeds, exact_seeds) are the measured
# ones: the gains came from the first stage (N0, N0b; 2026-10-15,
# docs/spike/multimap/v2/engine-results.md); see [traverse.policies] below for
# the per-question-type walk.
first_stage = "append"
first_k = 10
answer_seeds = true
# Add the exact cards whose node the SCIP graph holds to the walk's start nodes,
# after the others (independent of first_stage). Measured as neutral (no score
# change in N0; two more expansions per impact item); on because the cards are
# exact answers.
exact_seeds = true
# Per steering policy (the question type: steer.policy, `lci traverse --policy`),
# settings of the first stage and the walk. The built-in values below are the
# measured defaults (N0, N0b; 2026-10-15, docs/spike/multimap/v2/engine-results.md); a key given in a
# [traverse.policies.<name>] table wins over the built-in value of that policy,
# which wins over the [traverse] key of the same name. A call with no named
# policy, or with `explore`, uses the [traverse] keys alone: first stage, then
# the walk. The keys:
# walk = false the first stage alone answers; the walk takes one pop,
# its cards are not returned, and the handle lets a
# caller continue it. Needs first_stage other than "off".
# walk_min_answers = N the walk runs only when the call asks for N answers or
# more (first_k + top_k); below that the first stage alone
# answers. 0: no minimum.
# extra_maps = [...] maps added to the default maps when the call names none
# (they read the tree). It may name the opt-in maps, e.g.
# "grep.live" or "lsp.live" (needs the tree), which is how an
# intent is routed to grep or a language server. A list given
# here replaces the built-in list of the policy whole.
# first_k, seed_k the policy's own first_k and seed_k.
# Built-in values:
# impact walk = false, extra_maps = ["exact.closure"], first_k = 20, seed_k = 20
# (the first stage alone at 20 cards beat the walk on second-ring recall,
# -.043 with the walk; N0b)
# history walk = false, extra_maps = ["git.history", "exact.pickaxe"],
# first_k = 20, seed_k = 20 (the walk adds nothing the data can separate
# at 153 pops per question; N0b)
# flow walk = true (the walk adds path recall at 10 and at 20 answers)
# where-to walk_min_answers = 20 (the walk wins at 20 answers, +.069 set F1, and
# not significantly at 10)
# explore nothing
# Over MCP the default top_k is 8, so first_k 10 + top_k 8 = 18 answers. That point
# was not measured; the threshold sits at the measured point (20), so where-to
# does not walk over MCP with the default top_k and gets its walk from top_k 10.
# Edges of one expansion the walk follows once it offers more than 8: the best
# `beam` by the hop score are adopted, the rest are dropped. A search heuristic,
# not a limit of the maps (config.key offers up to 256 edges per node,
# scip.impact 64). 16 is what the walk always used; 1 to 256.
beam = 16
# A per-policy table must come after every [traverse] key above; a key placed
# below its header would belong to the policy, not to [traverse]. Example:
# [traverse.policies.impact]
# walk = true
# Named server-side recipes (config_readers, impact_rings, flow_path, flow_from,
# config_neighbours): fixed chains of the operators above, each answering with
# its steps, a witness per result and a stop reason. Off by default; while
# enabled is false the tool list, the schemas and the REST routes are exactly
# those of a server without them. Needs [traverse] scip_index. The same recipes
# run as `lci recipe`, which ignores enabled. flow_judge asks a judge to drop
# walk results of flow_from; no judge is wired in this build, so it only adds a
# note.
[recipes]
enabled = false
# measured off (N2, N0b; 2026-10-15, docs/spike/multimap/v2/engine-results.md)
flow_judge = false
# lci_compose: up to 6 operator steps in one call, with $sN.field references to
# earlier steps and no model between them. Off by default; same rules as
# [recipes]. Needs [traverse] scip_index.
[compose]
enabled = false
# [run_profile] holds the switches that name a run's configuration; an unknown
# key is an error. `lci config --json` prints derived.run_profile_hash, the hash
# of the result-affecting settings; README `[run_profile]` lists what is left out.
[run_profile]
[run_profile.traverse]
# Name each map's freshness in a traverse answer: `maps`, an array of
# {id, observed, stale, lag}, one entry for every map of the call that states it
# (the SCIP-built maps and the maps that read the tree or git). `observed` is
# "snapshot" (stored data) or "live" (read from the tree or git now; grep.live and
# lsp.live still place what they read by the index's positions). `lag` counts
# source files, never wall time: those newer than the index file plus those that
# changed (content hash), were added or removed since this process first saw the
# index's stamp, each counted once. `stale` is true when lag is above 0. lag is
# null (stale false: not compared) when the call has no tree, the tree could not
# be read or the index file has no modified time. Costs one read of the tree's
# source files per call. false (default): the answer has no `maps` key and is as
# without the key.
map_freshness = false
# Label every traverse answer (a walk, a continuation, an answer with no start
# node). On the answer, `completeness` {complete, why, estimate}: complete is
# true when status is complete (the walk ended complete or bound) and no map the
# call asked for was lost (could not be set up, or had failed calls: then
# complete is false, why is degraded and `degraded` lists the maps), why is the
# stop_reason (no_seeds without a walk), estimate is the fraction of the
# likely_complete hint or null until two maps share a node; a partial answer also
# gets one note. On every card of results and of the checkpoint's answer,
# visited_cards and frontier, `freshness`: changed (file_changed true), fresh
# (file_changed false, or every map of the card found in `maps` with a lag),
# stale (a map of the card is stale) or unverified (anything else, which is what
# every card says with map_freshness and verify_on_read off). Nothing is withheld
# and the trace, the checkpoint and the handle do not change. false (default):
# the answer is as without the key.
answer_labels = false
# Put the route on the cards: every card of `results` (and of the checkpoint's
# `answer`) that the walk reached gains `kind` (the kind of the edge that found
# the node; null for a start node) and `path`, the route from its start node:
# {node, map, kind, witness} per node, depth + 1 entries, the last one the card
# itself. The checkpoint's visited cards and frontier, the cards of the first
# stage and the trace are unchanged. A handle made with the key on also keeps
# each state's kind; one made with it off does not, so a continuation under the
# key shows null for the earlier hops and the answer says so. The answer grows
# by about 25 tokens per hop of each card. false (default): the answer, the
# checkpoint, the trace and the handle are as without the key.
card_paths = false
# [run_profile.walk]: how a traversal counts the evidence that reaches a node.
# groups = "tool" (default): every map is one piece of evidence (maps over one
# shared graph count once). "claim": the same (source node, destination node,
# claim family) is one piece of evidence whichever maps assert it, and an edge's
# confidence is the noisy-OR over its claims, not its maps; the score bound is
# off, and it cannot be combined with [traverse] fusion = "rrf" or "log_odds".
# grep_corroboration (0 to 1, default 1): what a group made only of text-match
# ("mentions") edges adds to the evidence count; 1 counts it like any other.
# pricing = "rank" (default): above the gate (8 edges), the edge at rank r is
# worth 1 / (1 + r) of its kind's prior whatever the fan-out. "relative": rank r
# of n candidates (counted before the beam) is worth 1 / (1 + a + r * gate / n)
# (a: the implementors of a trait seed, ranked in front of them; 0 for any other
# node): equal to "rank" at n = gate, so continuous at the gate for every node,
# and flatter above it (80 callers price the 9th edge at 1 / 1.8, not 1 / 9).
# At or below the gate nothing changes.
# confirm = false (default): a text hop stays as grep.live found it. true: with
# grep.live and lsp.live both in the call, the hops an expansion keeps whose
# only witnesses are grep.live text matches, the best top_k by hop value, are
# sent in one call to the language server: textDocument/definition at each
# hop's site. A definition that is the expanded node confirms the hop (it
# becomes a server answer); a definition that is another node drops it; no
# answer, an error, the deadline or no external call left leaves it as it was.
# Each proposal is at most one external call, counted in max_external_calls;
# a failure never ends a walk. Without either map the walk runs unconfirmed
# and says so in a note.
# All four keys are part of the run-profile hash. A handle keeps groups,
# grep_corroboration and confirm (with its top_k and the places arm); it does
# not carry pricing (like the gate and the beam), so a resumed call prices
# under the profile it is given and a walk can mix pricings across resumes.
[run_profile.walk]
groups = "tool"
grep_corroboration = 1.0
pricing = "rank"
confirm = false
# [run_profile.scip]: what a traversal does with the SCIP index (index.scip).
# mode = "cache" (default): the index is read when the file is there and
# readable; otherwise the SCIP graph is empty and a note says so. A file that
# cannot be parsed is parsed once per file stamp (size and modified time); later
# calls say it was not read again until the stamp changes or 30 s pass. An I/O
# error is never remembered. "authoritative": the
# index is required; a missing or unreadable file is an error. "off": the
# index path is never touched; graph.scip, structure.contains (beyond chunk
# lines), scip.impact, scip.implements, tests.tested_by, config.key and
# exact.closure are empty,
# each with a note. A handle made with a graph does not resume under "off".
# Part of the run-profile hash. Recipes read the index under "cache" when it is
# there and refuse under "off" or without it.
# arbitration = false (default): nothing is arbitrated and no output changes.
# true: with lsp.live in the call and mode not "authoritative", a language
# server's answer at a node overrules the index's scip.impact, scip.implements
# (with [run_profile.lsp] implementations = true) and structure.contains edges
# to functions and methods that it did not name, in a claim family it answered
# at that node. graph.scip is never arbitrated. The counts are in the trace,
# totals.arbitration, per_map and one note. A handle made with it does not
# resume without it, nor the reverse.
[run_profile.scip]
mode = "cache"
arbitration = false
# [run_profile.lsp]: whose language servers the lsp.live map asks (on by default
# where a server is installed and the service keeps it: see `live` below).
# sessions = "shared" (default): the calls of this process may keep a server
# across calls, the one that navigation and the search channel use, so a cold
# start is paid once, but only a server that lists the configuration files its
# tree stamp covers (every adapter but jdtls and marksman) and sees an edit on
# its own (today rust-analyzer) or is told by sync = "watch" (the default). So
# by default every server but jdtls and marksman is kept; with sync = "off",
# rust-analyzer alone is, and every other server (csharp-ls,
# typescript-language-server, pyright, gopls, clangd) is started by each call
# and stopped when its walk ends, as under "per_call". jdtls and marksman are
# always started by each call.
# Before a walk (and before navigation and the search channel) uses a kept
# server it passes a tree barrier: a stamp of the
# server's indexed files, their directories and ancestors (child names too),
# one level of child directories of those (except .git, target, node_modules,
# obj, bin, build, dist, out and virtual environments) and the server's
# configuration files among those children by name (rust-analyzer: Cargo.toml,
# Cargo.lock, rust-analyzer.toml; typescript: tsconfig.json, tsconfig.*.json,
# jsconfig.json, package.json; and so on), taken from the index's file list and
# one directory read each, with no recursive walk. If the stamp differs from the
# last one, or cannot be taken (a stat error other than "not found"), the
# server is stopped and the walk starts a fresh one that reads the disk (a note
# says so); an unchanged stamp keeps the server and a note says that too ("kept
# session; tree stamp unchanged since N s ago"). So a reused server is never
# staler than under "per_call" for a change inside that coverage. Not seen: a
# new file two or more levels below a stamped directory or inside a skipped
# build directory, a configuration file that is not on the server's list, and
# an edit that keeps modification time and length. A workspace with no index
# snapshot has no sharing. A kept server stops when it has been idle for
# lsp_idle_timeout_seconds (which only limits residency), on release_workspace
# and at service shutdown, not when a walk ends. A kept server holds memory while
# it runs; peak resident size measured during walks (a measurement, not a limit,
# and idle use is at most that): rust-analyzer about 4 GB, typescript-language-server
# about 460 MB, csharp-ls about 190 MB, pyright and gopls about 120 MB each (gopls
# 250 MB without the sync). A workspace in all of those languages holds about 0.9 GB
# beside rust-analyzer's 4 GB. "per_call": every traverse call starts its own
# servers and stops them when its walk ends (the off switch; it changes the
# profile hash). The recipes never run lsp.live and are the same under both.
# outline_cache = false (default): every file outline lsp.live needs
# (textDocument/documentSymbol) is asked of the server. true: for the servers that
# are sent a file's current text before every request (pyright, gopls, jdtls,
# clangd, marksman), the language-server manager keeps each non-empty outline under the
# content hash of the file and answers it again while the file's bytes and the
# server session are unchanged; an edited file, or a restarted or released
# server, is asked again, and an empty outline is never kept. rust-analyzer (it
# watches the disk itself and can lag an edit), csharp-ls and
# typescript-language-server (they are not resent the text) are asked every time.
# At most 4096 outlines per manager (a new one past that clears them). Within one
# walk under "per_call" (and for a server a "shared" walk starts per call), across
# calls in the service's manager under "shared" with sync = "watch" (the default).
# The recipes never run lsp.live and are the same under both values.
# implementations = false (default): lsp.live asks a symbol for its definition
# and its references. true: it also asks textDocument/implementation (one more
# external call per symbol) and offers the answers as `implements` edges, from
# an interface or trait member to the members that implement it. Needs a server
# that answers the request; a failed request leaves the other edges alone.
# call_hierarchy = false (default): as above. true: lsp.live also asks the call
# hierarchy of a symbol: textDocument/prepareCallHierarchy, then
# callHierarchy/incomingCalls and callHierarchy/outgoingCalls of the item that
# answers (up to three more external calls per symbol; none after an empty
# prepare). The callers and callees become `calls_or_refs` edges (one per
# destination), seen at the call. A server without call hierarchy refuses the
# request: that is noted and the other edges stay. Servers miss some calls
# (macro arguments, for one): this complements graph.scip.
# sync = "watch" (default): this process's language-server manager watches each
# workspace that has a running session and sends every source-file change to its
# servers (workspace/didChangeWatchedFiles). Before each request the manager
# sends what the watcher has already reported; the notification goes out before
# the request, but the manager does not wait for the server to apply it, and an
# event the watcher reports after that send goes out with the first request that
# drains after the report. So a long-lived
# session (search_symbols, the search channel, a "shared" lsp.live) is told of
# the edits the watcher has seen, which is what makes a server that lists its
# stamp's configuration files worth keeping by "shared" (see above). The
# one-shot `lci traverse` builds its manager without the sync. It falls back to polling (a scan of the tree) every
# watch_poll_milliseconds when the platform watcher cannot start, and stops with
# the workspace's last session. If both watchers fail, or the Windows watcher
# silently stops, a kept server that does not watch on its own is told nothing
# and relies on the tree stamp alone. Independent of index watching. "off": a
# language server is told nothing about edits after it starts (the default before
# K11b-4). A per-call manager (sessions = "per_call") never syncs. A shared
# lsp.live walk restarts a kept server after an edit whatever the sync did (the
# tree barrier above), so for lsp.live the sync is what makes a server worth
# keeping, not what avoids a restart. The recipes are the same under both values.
# places = "auto" (default): per walk, "scip" when the SCIP graph read for the
# workspace has at least one node (that walk is the "scip" walk), else "outline",
# so a tree with no index read (scip.mode = "off", or "cache" with no file) still
# gets lsp.live cards. "scip": lsp.live places a symbol only where the SCIP index
# has a node for it, so it asks nothing about a symbol the index lacks and,
# under [run_profile.scip] mode = "off", nothing at all. "outline": the index's
# table first, then the language server's own outline of a file
# (textDocument/documentSymbol) for what the index lacks or misplaces: the first
# time a walk expands a symbol the index places in a file, or expands the file,
# it asks the server for that file's outline (one more external call per file
# and walk, none for a file already outlined) and from then on the outline's
# places win in that file, so lines inserted since the index was written no
# longer lose edges. A symbol of the index keeps its id; a function, method,
# type, enum, module, constant, field (a property too) or variable the index
# lacks gets an id with the file's language (sym:csharp:Shapes.cs::Area/method;
# a class is /class, an interface /interface, a Rust trait /trait), so with
# scip.mode = "off" a file's declarations have ids once it is outlined. Enum
# members, impl blocks and type parameters have no node. A seed that is a
# symbol id of a file never outlined still has no place. Needs a server that
# answers documentSymbol. The recipes never run lsp.live and are the same
# under all three values.
# breaker = true (default): a provider whose version probe failed, or whose
# server could not be started (it could not be spawned, exited, or broke the
# protocol), is left alone for 30 seconds: the next probe or start of that
# provider is refused at once, with a note that says so, and the window closes
# when a probe or a start succeeds. A binary that is not found and a probe that
# timed out open no window (the first costs under a millisecond per probe and its
# note is the same on every call; the second may only be a loaded machine). The
# windows are per provider and shared by the process's managers (the service's
# and each call's); `lci traverse` under sessions = "per_call" has no shared
# manager and so no window. A server that is already running is still asked, a start that
# timed out (lsp_timeout_seconds) opens no window because the server may only be
# slow, and /ready still probes the binaries. false: every call probes and
# starts a language server as it is asked, so a dead server is probed or started
# again on every call. The recipes never run lsp.live and are the same under
# both values.
# live = true (default): a call that names no maps, has a tree, runs under
# sessions = "shared" and has the service's manager (MCP and REST mode =
# "traverse") also walks lsp.live, after the extra_maps of its policy (naming it
# there is then a no-op). A language server that is not installed, will not start
# or is refused costs the walk a note ("lsp.live is unavailable: ..") and the
# map, never an error; rust-analyzer is enabled with
# the bare path "rust-analyzer", the other servers need their [language] path.
# [traverse] deadline_ms bounds the walk: the setup (building the tree maps, the
# version probe among them, the seed search and the tree barrier) is
# credited back, so a call's wall time can exceed deadline_ms by that setup.
# A service with [traverse] enabled = true also warms the servers at the first
# touch of a workspace. `lci traverse` (the one-shot) and sessions = "per_call"
# are not changed by it: a server that dies with the call cannot amortise its
# start, so there the map runs only when --maps or a policy names it. A call
# that names its maps is never changed. With a SCIP index that has nodes the
# walk places symbols by it (places = "auto"); with none read the map places
# them by the server's own outline. For a language an index that has nodes
# lacks, set places = "outline": under "scip" the map then asks nothing.
# false: the map runs only when a call or a policy names it. The recipes never
# run lsp.live and are the same under both values.
# roots = "workspace" (default): every language server starts at the workspace
# path. "manifest": a server starts at the directory of the topmost project file
# its adapter names (go.mod, go.sum, go.work for gopls; pyrightconfig.json,
# pyproject.toml, setup.cfg for pyright; tsconfig.json, package.json and so on
# for typescript-language-server; *.sln, *.csproj for csharp-ls) found
# in the directories of the index's files of its languages and their ancestors
# (one directory read each, no recursive walk), so a module under services/api/
# is served from services/api/. The workspace is kept when no such file is found,
# when sibling directories at the same depth each hold one (one session per
# module is not built), or when the chosen directory would leave an indexed file
# of the server's languages outside it; `index_status` says which in
# servers[].root and servers[].root_reason. A session fixes its root when it
# starts. The one-shot `lci traverse` under sessions = "per_call" has no index
# file list, so under "manifest" its servers start at the workspace
# (no_file_list) and its output does not say so; the service always has it. There is one session per server per workspace either way, and the tree
# stamp and barrier read the whole workspace as before. The recipes never run
# lsp.live and are the same under both values. Measured on small fixtures (not a
# general bound): "manifest" helps pyright when a name resolves only through a
# nested project's own settings (extraPaths in its pyproject.toml);
# typescript-language-server already finds the nearest tsconfig.json from the
# workspace root, so it gains nothing; and any indexed file of the server's
# languages outside the project directory sends "manifest" back to the workspace
# root (reason files_outside_root:<n>), so the gain needs every such file under
# the project.
# All nine keys are part of the run-profile hash.
[run_profile.lsp]
sessions = "shared"
outline_cache = false
implementations = false
call_hierarchy = false
sync = "watch"
places = "auto"
breaker = true
live = true
roots = "workspace"
# [run_profile.freshness]: verify on read. verify_on_read = false (default): every
# answer is as without the key. true checks what a traverse answer cites against
# the working tree by content hash; it needs [run_profile.traverse] map_freshness
# too (it reuses that key's one read of the tree), reads and labels, and never
# refreshes the index or changes [index].freshness. seeds.hybrid, search.lexical
# and search.vector get a `maps` entry whose lag counts the source files that
# differ between the index snapshot's manifest and the tree. grep.live and
# lsp.live keep observed "live" but say places = "index" and carry the SCIP
# index's lag (what they read is current; where they put it is the index's).
# Every card gets file_changed: true, false, or null when no reference applies (a
# commit, a file that is not a source file); true also covers a file that was
# newer than the index file when its stamp was first seen (no baseline hash).
# A search report (JSON) gets a `freshness` block: the snapshot's lag, the lag of
# the vector and lexical channels that ran, and file_changed per hit; lsp.symbols
# is reported as a session answer that is not compared. It is read after the
# search, so a snapshot refresh in between is not seen. This needs no other key
# and costs one read of the tree's source files per search a caller asks for
# (timings.verify_ms); a traversal's seed searches and the evaluation runner do
# not pay it.
# stat_gate = false (default): every such read of the tree reads and hashes every
# source file. true: the process keeps (modified time, length) and the content hash
# per source file and per root, lists the tree without reading it, and reads and
# hashes only the files whose stamp is new or changed (a file with no modified
# time is always read). It serves map_freshness and verify_on_read alike and
# changes no answer except for one gap: a same-length edit that keeps a modified
# time older than 3 seconds before the previous read of the file (a deliberate
# set_modified, or a clock that went back) is not seen until that file's next
# edit. A file modified within 3 seconds of a read is read again on the next call
# (a write in the same clock tick, filesystems with coarse stamps: FAT and exFAT
# 2 s, SMB shares, 1 s filesystems). The table lives in the
# process (per root) and is rebuilt on the first call; the index scan is not gated.
# Both keys are part of the run-profile hash.
[run_profile.freshness]
verify_on_read = false
stat_gate = false
# [run_profile.seeds]: where a traversal's start nodes come from.
# bm25 = false (default): the opt-in map seeds.bm25 does not run; naming it in
# `maps` gives a note and no seeds, it is not in the default set, and every answer
# is as without the key. true: the map is in the default set of a call that names
# no maps, and runs when named. It ranks the SCIP graph's functions and methods
# (the nodes) by BM25, the scorer of the ripgrep channel, over three fields of
# each node: the tokens of its name, of its qualified path (the symbol's package,
# modules, types and member, and the file's path) and of its documentation (the
# index's `documentation` for the symbol, up to 1024 bytes; empty when
# rust-analyzer writes none). A question word counts if it is a whole token (up to
# 4 characters) or inside one (longer); words under 3 characters and stop words
# are not terms; a term in more than a quarter of the nodes is dropped unless no
# term would remain. Of the top [traverse] seed_k nodes, those the hybrid search
# did not already give (so possibly fewer) go after its nodes (seed_source
# "hybrid+bm25"), or are the start nodes
# when the hybrid search gave none ("bm25"; the name-token stand-in then does not
# run). It reads the SCIP graph only (no tree needed) and builds its index on the
# first call that wants it, reading the documentation from the index file then
# (a second parse of the file; with the key off no documentation is ever read). The recipes' seeds are given, so they are the same
# under both values. Part of the run-profile hash.
[run_profile.seeds]
bm25 = false
# literal = false (default): the opt-in map seeds.literal does not run; naming it
# in `maps` gives a note and no seeds, it is not in the default set, ripgrep is
# not started for it, and every answer is as without the key. true: the map is in
# the default set of a call that names no maps, and runs when named. It takes the
# names the question puts in code spans (the last segment of `a::Name`, `Name()`;
# at least 2 characters, at most 4 names), runs `rg --fixed-strings
# --word-regexp` for them (case-sensitive; `_` is a word character; the source
# files of the language adapters; 20 lines per file at most), and places each
# line in the SCIP graph: the symbol defined on that line, else the innermost
# symbol around it, else (the line declares the name: `trait`, `struct`, `fn`,
# `class`... right before it, or `impl .. for` it) the file's node, which
# structure.contains or lsp.live under places = "outline" expands; any other
# line is dropped. Definitions (3 per name at most) come first, then the
# occurrences (the symbols around the most lines first), then the files; nodes
# the other sources gave are left out and the list is cut at [traverse] seed_k.
# They go after the hybrid search's and seeds.bm25's nodes (seed_source
# "hybrid+literal", "hybrid+bm25+literal", "bm25+literal"), or are the start
# nodes when those gave none ("literal"; the name-token stand-in then does not
# run). Not [traverse] exact_seeds, which turns the first stage's exact cards
# into start nodes. Needs the application (a question with --root); without it
# the call says so and goes on. The recipes' seeds are given, so they are the
# same under both values. Part of the run-profile hash.
literal = false
# repo_map = false (default): the opt-in map seeds.repo_map does not run; naming it
# in `maps` gives a note and no seeds, it is not in the default set, and every
# answer is as without the key. true: the map is in the default set of a call that
# names no maps, and runs when named. It ranks the SCIP graph's functions and
# methods by personalized PageRank over the call and containment edges (not
# `implements`; damping 0.85, at most 30 iterations), with the random jump on the
# top 64 seeds.bm25 matches for the question: a function that many matched
# functions call becomes a start node even when its own name holds none of the
# question's words. A question with no bm25 match gives no seeds. The top
# [traverse] seed_k nodes the other sources did not give go after theirs
# (seed_source "hybrid+repo_map", "hybrid+bm25+repo_map", "bm25+repo_map"), or are
# the start nodes when those gave none ("repo_map"). Reads the SCIP graph only (no
# tree needed) and builds its edge lists, and the bm25 index it needs, on the first
# call that wants it. The recipes' seeds are given, so they are the same under
# both values. Part of the run-profile hash.
repo_map = false
# [run_profile.grep]: switches of the grep-style maps.
# structural = false (default): the opt-in map grep.structural does not run; naming
# it in `maps` gives a note and no edges, ripgrep is not started for it, it is not
# in the default set, and every answer is as without the key. true: the map is in
# the default set of a call that has a tree root and names no maps, and runs when
# named. From a symbol it asks ripgrep for the files that hold the name as a whole
# word (`rg --fixed-strings --word-regexp`; at most 200 files), parses each with
# the chunker's tree-sitter grammar (files over 1 MiB are skipped) and keeps the
# occurrences that an ast-grep pattern finds in a header (`impl .. for ..`,
# `extends`, `implements`: an Implements edge to the other party) or as a call (a
# CallsOrRefs edge to the enclosing function). A name in a comment or a string
# gives no edge. Not seen: derive and macro impls, Go and duck-typed headers, Rust headers
# with a `where` clause, a generic seed type (`impl Shape for Wrapper<T>` is not found from
# `Wrapper`), C and C++ member calls (`a.f()`, `p->f()`), calls inside a Rust macro.
# Part of the run-profile hash.
[run_profile.grep]
structural = false
# [system_one] is the slot for a small model planned to steer a traversal (the
# configuration and provider client exist; no traversal rung calls it yet) and
# the typed service behind `rescorer = "system_one"`. Off when the section is
# absent. Uncomment the whole block, header included; it is last in this file
# because a table header ends the table before it.
# [system_one]
# provider = "openai_compat" # or "mock" (replays recorded pairs, tests only) or "system_one_wire"
# url = "http://127.0.0.1:8080/v1" # base URL; /chat/completions or /completions is appended
# model = "your-model-name"
# api = "chat" # "chat" or "completion"
# timeout_ms = 30000 # 100 to 600000; per batch request, one attempt, no retry
# api_key_env = "SYSTEM_ONE_API_KEY"
# allow_remote = false # a non-loopback host in url is refused unless true
# replay_file = "pairs.json" # provider = "mock" only
# For rescorer = "system_one" set provider = "system_one_wire" and: url = the service root
# (POST <url>/v1/systemone; a trailing /v1 is not doubled, e.g. "http://127.0.0.1:11435"),
# model = the typed model's name, api_key_env = the variable holding the key (read per
# request, never logged); a non-loopback url needs allow_remote = true; port 8765 is refused.
# batch_size = 24 # 1 to 200; the most candidates per request (smaller for small-context models)
# Worst case before fail-open: (number of batches) x timeout_ms.
# [system_one.capabilities]
# constraint = "json_schema" # "gbnf" (llama.cpp grammar), "json_schema" or "none"
# logprobs = false # the server returns top log-probabilities
# batch = false