loreli 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +670 -97
  3. package/bin/loreli.js +89 -0
  4. package/package.json +74 -14
  5. package/packages/README.md +101 -0
  6. package/packages/action/README.md +98 -0
  7. package/packages/action/src/index.js +656 -0
  8. package/packages/agent/README.md +517 -0
  9. package/packages/agent/src/backends/claude.js +287 -0
  10. package/packages/agent/src/backends/codex.js +278 -0
  11. package/packages/agent/src/backends/cursor.js +294 -0
  12. package/packages/agent/src/backends/index.js +329 -0
  13. package/packages/agent/src/base.js +138 -0
  14. package/packages/agent/src/cli.js +198 -0
  15. package/packages/agent/src/factory.js +119 -0
  16. package/packages/agent/src/index.js +12 -0
  17. package/packages/agent/src/models.js +141 -0
  18. package/packages/agent/src/output.js +62 -0
  19. package/packages/agent/src/session.js +162 -0
  20. package/packages/agent/src/trace.js +186 -0
  21. package/packages/config/README.md +833 -0
  22. package/packages/config/src/defaults.js +134 -0
  23. package/packages/config/src/index.js +192 -0
  24. package/packages/config/src/schema.js +273 -0
  25. package/packages/config/src/validate.js +160 -0
  26. package/packages/context/README.md +165 -0
  27. package/packages/context/src/index.js +198 -0
  28. package/packages/hub/README.md +338 -0
  29. package/packages/hub/src/base.js +154 -0
  30. package/packages/hub/src/github.js +1558 -0
  31. package/packages/hub/src/index.js +79 -0
  32. package/packages/hub/src/labels.js +48 -0
  33. package/packages/identity/README.md +288 -0
  34. package/packages/identity/src/index.js +620 -0
  35. package/packages/identity/src/themes/avatar.js +217 -0
  36. package/packages/identity/src/themes/digimon.js +217 -0
  37. package/packages/identity/src/themes/dragonball.js +217 -0
  38. package/packages/identity/src/themes/lotr.js +217 -0
  39. package/packages/identity/src/themes/marvel.js +217 -0
  40. package/packages/identity/src/themes/pokemon.js +217 -0
  41. package/packages/identity/src/themes/starwars.js +217 -0
  42. package/packages/identity/src/themes/transformers.js +217 -0
  43. package/packages/identity/src/themes/zelda.js +217 -0
  44. package/packages/knowledge/README.md +237 -0
  45. package/packages/knowledge/src/index.js +412 -0
  46. package/packages/log/README.md +93 -0
  47. package/packages/log/src/index.js +252 -0
  48. package/packages/marker/README.md +200 -0
  49. package/packages/marker/src/index.js +184 -0
  50. package/packages/mcp/README.md +279 -0
  51. package/packages/mcp/instructions.md +121 -0
  52. package/packages/mcp/scaffolding/.agents/skills/loreli-context/SKILL.md +89 -0
  53. package/packages/mcp/scaffolding/ISSUE_TEMPLATE/config.yml +2 -0
  54. package/packages/mcp/scaffolding/ISSUE_TEMPLATE/loreli.yml +83 -0
  55. package/packages/mcp/scaffolding/loreli.yml +453 -0
  56. package/packages/mcp/scaffolding/mcp-configs/.codex/config.toml +3 -0
  57. package/packages/mcp/scaffolding/mcp-configs/.cursor/mcp.json +11 -0
  58. package/packages/mcp/scaffolding/mcp-configs/.mcp.json +11 -0
  59. package/packages/mcp/scaffolding/pull-request.md +23 -0
  60. package/packages/mcp/src/index.js +571 -0
  61. package/packages/mcp/src/tools/agents.js +429 -0
  62. package/packages/mcp/src/tools/context.js +199 -0
  63. package/packages/mcp/src/tools/github.js +1199 -0
  64. package/packages/mcp/src/tools/hitl.js +149 -0
  65. package/packages/mcp/src/tools/index.js +17 -0
  66. package/packages/mcp/src/tools/start.js +835 -0
  67. package/packages/mcp/src/tools/status.js +146 -0
  68. package/packages/mcp/src/tools/work.js +124 -0
  69. package/packages/orchestrator/README.md +192 -0
  70. package/packages/orchestrator/src/index.js +1226 -0
  71. package/packages/planner/README.md +168 -0
  72. package/packages/planner/src/index.js +1166 -0
  73. package/packages/review/README.md +129 -0
  74. package/packages/review/src/index.js +1283 -0
  75. package/packages/risk/README.md +119 -0
  76. package/packages/risk/src/index.js +428 -0
  77. package/packages/session/README.md +165 -0
  78. package/packages/session/src/index.js +215 -0
  79. package/packages/test-utils/README.md +96 -0
  80. package/packages/test-utils/src/index.js +354 -0
  81. package/packages/tmux/README.md +261 -0
  82. package/packages/tmux/src/index.js +452 -0
  83. package/packages/workflow/README.md +313 -0
  84. package/packages/workflow/src/index.js +481 -0
  85. package/packages/workflow/src/proof-of-life.js +74 -0
  86. package/packages/workspace/README.md +143 -0
  87. package/packages/workspace/src/index.js +1076 -0
  88. package/index.js +0 -8
@@ -0,0 +1,83 @@
1
+ name: Loreli Work Item
2
+ description: Structured work item for Loreli agent orchestration. Issues created with this template are automatically labeled for agent dispatch.
3
+ title: "[Loreli]: "
4
+ labels: ["loreli"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ This template produces issues that Loreli agents can act on directly.
10
+ Write each section as if briefing an engineer who has never seen this
11
+ codebase — specific, testable, and unambiguous.
12
+
13
+ - type: textarea
14
+ id: objective
15
+ attributes:
16
+ label: Objective
17
+ description: What needs to be done, in one sentence. Be precise — this becomes the agent's mission.
18
+ placeholder: "Add exponential backoff retry logic to the GitHub API client for transient failures."
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: acceptance
24
+ attributes:
25
+ label: Acceptance Criteria
26
+ description: >
27
+ Specific, testable conditions that define "done". Each criterion must be
28
+ independently verifiable by someone who did not write the code. Aim for
29
+ 3+ criteria — vague items like "works correctly" will be rejected.
30
+ placeholder: |
31
+ - [ ] Retries on 429 and 5xx status codes, up to 3 attempts.
32
+ - [ ] Uses exponential backoff: 1s, 2s, 4s base delays with jitter.
33
+ - [ ] Non-retryable errors (4xx except 429) propagate immediately.
34
+ - [ ] Retry attempts are logged with attempt number and delay.
35
+ validations:
36
+ required: true
37
+
38
+ - type: textarea
39
+ id: testing
40
+ attributes:
41
+ label: Testing Strategy
42
+ description: >
43
+ Concrete test scenarios to write before implementation (TDD). Name
44
+ specific inputs, expected behaviors, and edge cases. Agents write
45
+ tests first — this section tells them what to test.
46
+ placeholder: |
47
+ - Test that 429 responses trigger retry with correct backoff timing.
48
+ - Test that 500/502/503 trigger retry.
49
+ - Test that 400/401/404 propagate immediately without retry.
50
+ - Test that max retries is respected and final error surfaces.
51
+ - Test jitter produces non-deterministic delays within expected bounds.
52
+ validations:
53
+ required: true
54
+
55
+ - type: textarea
56
+ id: scope
57
+ attributes:
58
+ label: Scope Boundaries
59
+ description: What is explicitly NOT included in this work. Helps agents avoid scope creep.
60
+ placeholder: "Does NOT include circuit breaker patterns, request queuing, or rate limit header parsing."
61
+ validations:
62
+ required: false
63
+
64
+ - type: textarea
65
+ id: dependencies
66
+ attributes:
67
+ label: Dependencies
68
+ description: Other issues, PRs, or external work this depends on. Link them if possible.
69
+ placeholder: "Depends on #42 (API client refactor)."
70
+ validations:
71
+ required: false
72
+
73
+ - type: dropdown
74
+ id: complexity
75
+ attributes:
76
+ label: Estimated Complexity
77
+ description: Rough sizing to help the orchestrator allocate the right agent tier.
78
+ options:
79
+ - Low
80
+ - Medium
81
+ - High
82
+ validations:
83
+ required: true
@@ -0,0 +1,453 @@
1
+ # loreli.yml - repo-level orchestration config
2
+ # See https://www.npmjs.com/package/loreli for full documentation.
3
+ #
4
+ # Duration fields support both numbers (milliseconds) and strings parsed by `ms`.
5
+ # Prefer strings like 10m, 1h, 3d for readability.
6
+
7
+ # --- Identity ---
8
+ # theme
9
+ # What: Chooses naming/theme vocabulary for agent identities and system messages.
10
+ # Impact: Cosmetic only; does not change orchestration behavior or model quality.
11
+ # Signal: Humans find agent identity/readability poor in PRs, comments, or dashboards.
12
+ # Change when: You want agent names/messages to match your team's preferred style.
13
+ theme: transformers # string or list: transformers | pokemon | marvel | digimon | starwars | lotr | dragonball | avatar | zelda
14
+ # theme: # list = randomize theme per work item
15
+ # - transformers
16
+ # - pokemon
17
+ # - marvel
18
+
19
+ # --- Agent defaults ---
20
+ # model
21
+ # What: Default model tier when tools do not specify a model explicitly.
22
+ # Impact: Higher tiers are usually stronger but slower/more expensive.
23
+ # Signal: Repeated low-quality outputs at current tier, or cost/latency pressure from higher tiers.
24
+ # Change when: You want a global quality/cost baseline shift for all agents.
25
+ model: balanced # fast | balanced | powerful | exact model string
26
+
27
+ # --- Merge gate ---
28
+ # reviewers
29
+ # What: GitHub usernames for HITL review requests.
30
+ # Impact: Non-empty reviewers typically means more human approval steps.
31
+ # Signal: PRs merge without enough human oversight, or reviewer assignment is missing expected owners.
32
+ # Change when: You want specific humans looped into merges.
33
+ reviewers: [] # empty = autonomous merge path
34
+
35
+ merge:
36
+ # merge.method
37
+ # What: Git merge strategy used by Loreli when merging approved PRs.
38
+ # Impact: Changes commit history shape (single squash commit vs merge commit vs rebase history).
39
+ # Signal: Repository policy violations or maintainer feedback about history shape.
40
+ # Change when: Your repo has a strict merge policy.
41
+ method: squash # squash | merge | rebase
42
+
43
+ # merge.hitl
44
+ # What: Enables/disables Human In The Loop merge gating.
45
+ # Impact: true blocks final merge on human approval; false allows full automation.
46
+ # Signal: Unexpected autonomous merges (need true) or merge throughput too slow due to manual gates (consider false).
47
+ # Change when: You need more safety (set true) or more autonomy/speed (set false).
48
+ hitl: false
49
+
50
+ # merge.base
51
+ # What: Base branch target for agent PRs.
52
+ # Impact: Controls where agent changes accumulate (for example staging branch vs main).
53
+ # Signal: Main branch receiving agent merges too early, or release managers asking for a promotion/staging lane.
54
+ # Change when: You want agents to merge into an integration branch before promotion to main.
55
+ base: loreli
56
+
57
+ # --- PR quality gates ---
58
+ pr:
59
+ validation:
60
+ # pr.validation.command
61
+ # What: Shell command run before `pr/create` is allowed.
62
+ # Impact: Non-zero exit blocks PR creation; stronger checks reduce bad PRs but increase latency.
63
+ # Signal: PRs repeatedly fail CI after creation (tighten command), or PR creation is bottlenecked by long prechecks (lighten command).
64
+ # Change when: You want a different gate (for example lint+test, unit-only, or build-only).
65
+ command: npm test
66
+
67
+ selfReview:
68
+ # pr.selfReview.enabled
69
+ # What: Requires a preview step before actual PR creation.
70
+ # Impact: Adds one extra tool step but catches obvious metadata/diff mistakes early.
71
+ # Signal: Frequent wrong-base/wrong-scope PRs (enable), or operators report friction from two-step create flow (disable).
72
+ # Change when: You want faster single-step PR creation (set false) or stricter guardrails (true).
73
+ enabled: true
74
+
75
+ # --- HITL behavior ---
76
+ hitl:
77
+ # hitl.timeout
78
+ # What: Max idle age for HITL-owned claims before stale-claim eviction logic can act.
79
+ # Impact: Lower values recycle stuck ownership faster; higher values preserve ownership longer.
80
+ # Signal: Claims remain stuck for days (decrease), or valid long human review cycles get evicted too early (increase).
81
+ # Change when: Human review cadence is slower/faster than current default.
82
+ # Special: null disables stale-claim eviction in HITL mode.
83
+ timeout: 3d
84
+
85
+ # --- Stall and lifecycle timeouts ---
86
+ timeouts:
87
+ # timeouts.stall
88
+ # What: No-activity threshold for stall escalation.
89
+ # Impact: >stall triggers tier-1, >2x triggers tier-2 warning, >3x triggers kill.
90
+ # Signal: Agents killed during legitimate long runs (increase), or stalled agents consume slots too long (decrease).
91
+ # Change when: Agents are killed too aggressively on long tasks (increase),
92
+ # or stuck agents linger too long (decrease).
93
+ stall: 10m
94
+
95
+ # timeouts.shutdown
96
+ # What: Grace window for cooperative shutdown before force stop.
97
+ # Impact: Lower values free resources faster; higher values allow cleaner agent exits.
98
+ # Signal: Frequent force-kill shutdowns while agents are still finishing final output (increase),
99
+ # or shutdown hangs tying up capacity (decrease).
100
+ # Change when: Agents need more time to finalize output before shutdown.
101
+ shutdown: 1m
102
+
103
+ # timeouts.poll
104
+ # What: Poll cadence during shutdown waiting loop.
105
+ # Impact: Lower values detect stop faster but increase loop overhead.
106
+ # Signal: Slow recognition of completed shutdowns (decrease), or excessive polling/log churn during shutdown (increase).
107
+ # Change when: You want quicker shutdown detection or lower polling churn.
108
+ poll: 2s
109
+
110
+ # timeouts.rapidDeath
111
+ # What: Startup watch window used to detect immediate backend failures.
112
+ # Impact: Helps mark unhealthy backends degraded sooner after repeated instant failures.
113
+ # Signal: Backends crash quickly but are not degraded soon enough (increase), or degraded too aggressively from transient startup blips (decrease).
114
+ # Change when: Startup failures are missed (increase) or false positives occur (decrease).
115
+ rapidDeath: 15s
116
+
117
+ # timeouts.nudge
118
+ # What: Enables/disables tier-1 "you appear stalled" message.
119
+ # Impact: true may interrupt deep work; false keeps escalation signals without message interruption.
120
+ # Signal: Agents frequently context-switch into status reporting mid-task (disable), or teams need explicit stall prompts (enable).
121
+ # Change when: Long-running autonomous tasks should not be interrupted.
122
+ nudge: true
123
+
124
+ # --- Reactor polling ---
125
+ watch:
126
+ # watch.interval
127
+ # What: Main orchestration tick interval.
128
+ # Impact: Lower = faster reaction to new issues/PR state changes, higher API/process load.
129
+ # Signal: Claim/review actions happen too slowly after repo events (decrease), or API rate pressure/churn is high (increase).
130
+ # Change when: You need faster responsiveness or lower background churn.
131
+ interval: 1m
132
+
133
+ # watch.maxRounds
134
+ # What: Maximum re-review/rework loop cycles before escalation.
135
+ # Impact: Higher values allow deeper autonomous iteration; lower values force earlier human escalation.
136
+ # Signal: PRs escalate before they can converge autonomously (increase), or loops churn too long without convergence (decrease).
137
+ # Change when: PRs routinely need more/less autonomous correction rounds.
138
+ maxRounds: 7
139
+
140
+ # watch.maxClaims
141
+ # What: Max simultaneous issue claims per action agent.
142
+ # Impact: Higher increases per-agent throughput but can dilute focus and increase context switching.
143
+ # Signal: Idle action agents with unclaimed work (increase), or agents juggle too many tasks and miss follow-through (decrease).
144
+ # Change when: Agents are underutilized (increase) or overloaded (decrease).
145
+ maxClaims: 3
146
+
147
+ # --- Review policy ---
148
+ review:
149
+ # review.skipRiskAssessment
150
+ # What: Skips mandatory risk verdict checks in review flow.
151
+ # Impact: Faster review path with less explicit risk gating.
152
+ # Signal: Teams intentionally bypassing risk gates for speed, or conversely incidents from insufficient risk checks (set false).
153
+ # Change when: You intentionally prefer speed over formal risk signoff.
154
+ skipRiskAssessment: false
155
+
156
+ # --- Scaling policy ---
157
+ scaling:
158
+ # scaling.maxAgents
159
+ # What: Global cap for active non-dormant agents.
160
+ # Impact: Upper bound on parallelism and compute/resource consumption.
161
+ # Signal: Backlog grows with idle infrastructure (increase), or host/API limits are saturated (decrease).
162
+ # Change when: You need more throughput (increase) or tighter resource limits (decrease).
163
+ maxAgents: 8
164
+
165
+ maxPerRole:
166
+ # scaling.maxPerRole.action
167
+ # What: Max concurrent action agents.
168
+ # Impact: Controls parallel implementation throughput.
169
+ # Signal: Large implementation queue with insufficient coding capacity.
170
+ # Change when: Work backlog is implementation-heavy.
171
+ action: 3
172
+
173
+ # scaling.maxPerRole.reviewer
174
+ # What: Max concurrent reviewer agents.
175
+ # Impact: Controls review bottleneck relief.
176
+ # Signal: PRs are ready but waiting on reviewer assignment/completion.
177
+ # Change when: PR queue waits on reviews.
178
+ reviewer: 2
179
+
180
+ # scaling.maxPerRole.risk
181
+ # What: Max concurrent risk agents.
182
+ # Impact: Controls parallel risk assessment capacity.
183
+ # Signal: Reviews blocked on risk verdicts.
184
+ # Change when: Risk checks become the bottleneck.
185
+ risk: 3
186
+
187
+ # scaling.maxPerRole.planner
188
+ # What: Max concurrent planner agents.
189
+ # Impact: Limits parallel planning/discussion churn.
190
+ # Signal: Planning queue grows (increase) or discussion noise overwhelms maintainers (decrease).
191
+ # Change when: You want more/fewer simultaneous planning threads.
192
+ planner: 1
193
+
194
+ # scaling.maxPerTick
195
+ # What: Spawn budget per reactor tick.
196
+ # Impact: Higher values ramp up faster but can spike load.
197
+ # Signal: Slow recovery from empty capacity (increase), or sudden spawn bursts causing instability (decrease).
198
+ # Change when: Startup/recovery is too slow (increase) or too bursty (decrease).
199
+ maxPerTick: 2
200
+
201
+ # scaling.cooldown
202
+ # What: Minimum delay before spawning another agent of the same role.
203
+ # Impact: Prevents spawn thrashing when demand oscillates.
204
+ # Signal: Repeated rapid spawn/stop cycles for same role (increase), or role fill speed too slow during sustained demand (decrease).
205
+ # Change when: You see role churn/flapping or need faster re-scaling.
206
+ cooldown: 30s
207
+
208
+ # --- Logging ---
209
+ log:
210
+ # log.level
211
+ # What: Minimum severity written to logs.
212
+ # Impact: Lower levels (debug/trace) increase observability and log volume.
213
+ # Signal: Hard-to-diagnose behavior with insufficient log detail (lower level), or noisy oversized logs (raise level).
214
+ # Change when: Debugging production behavior or reducing noise.
215
+ level: info # error | warn | info | debug | trace
216
+
217
+ # log.maxSize
218
+ # What: Per-file rotation size threshold in bytes.
219
+ # Impact: Larger files reduce rotation frequency but grow disk usage per file.
220
+ # Signal: Too-frequent rotations splitting incidents (increase), or very large log files hard to handle (decrease).
221
+ # Change when: You want fewer rotations or smaller log files.
222
+ maxSize: 10485760 # 10 MB
223
+
224
+ # log.maxFiles
225
+ # What: Number of rotated files retained.
226
+ # Impact: Higher values keep more history and consume more disk.
227
+ # Signal: Needed historical context disappears before investigation (increase), or disk pressure from logs (decrease).
228
+ # Change when: You need longer local forensic history.
229
+ maxFiles: 3
230
+
231
+ # --- Labels ---
232
+ labels:
233
+ # labels.track
234
+ # What: Adds Loreli/provider/model tracking labels to issues and PRs.
235
+ # Impact: Better observability/filtering in GitHub labels, but more label traffic.
236
+ # Signal: Need to filter/report by provider/role/model (enable), or label clutter complaints from maintainers (disable).
237
+ # Change when: You want a cleaner label surface (set false).
238
+ track: true
239
+
240
+ # labels.extra
241
+ # What: Extra labels applied to all Loreli-created items.
242
+ # Impact: Improves triage/routing automation via label-based workflows.
243
+ # Signal: Manual relabeling happens repeatedly after Loreli creates items.
244
+ # Change when: You need team/project labels attached automatically.
245
+ extra: []
246
+
247
+ # --- Agent tool restrictions ---
248
+ agents:
249
+ disallowedTools:
250
+ # agents.disallowedTools
251
+ # What: Commands agents cannot execute directly.
252
+ # Impact: Helps prevent bypassing MCP guardrails and policy checks.
253
+ # Signal: Agents attempt raw GitHub/API shell tooling that bypasses Loreli controls.
254
+ # Change when: You need stricter/looser command policy.
255
+ - gh
256
+ - curl
257
+
258
+ # --- Backend model/env overrides ---
259
+ # backends.{name}.models
260
+ # What: Per-backend tier/provider model routing overrides.
261
+ # Impact: Changes model selection without code changes.
262
+ # Signal: Specific backend underperforms at current tier/provider mapping.
263
+ # Change when: You need backend-specific model tuning.
264
+ #
265
+ # backends.{name}.env
266
+ # What: Env vars injected into backend launcher scripts.
267
+ # Impact: Controls API base URLs, auth endpoints, and backend runtime options.
268
+ # Signal: Backend needs proxy routing/custom endpoint/auth flag and current environment inheritance is insufficient.
269
+ # Change when: You use proxies/self-hosted gateways/custom backend flags.
270
+ #
271
+ # backends:
272
+ # claude:
273
+ # env:
274
+ # ANTHROPIC_BASE_URL: https://your-proxy.example.com/v1
275
+ # models:
276
+ # fast:
277
+ # anthropic: claude-haiku-4-5-20251001
278
+ # balanced:
279
+ # anthropic: claude-sonnet-4-5-20250929
280
+ # powerful:
281
+ # anthropic: claude-opus-4-5-20251101
282
+ # codex:
283
+ # env:
284
+ # OPENAI_BASE_URL: https://your-proxy.example.com/v1
285
+ # models:
286
+ # fast:
287
+ # openai: gpt-5-mini
288
+ # balanced:
289
+ # openai: gpt-5.1-codex
290
+ # powerful:
291
+ # openai: gpt-5.2-pro
292
+ # cursor:
293
+ # models:
294
+ # fast:
295
+ # anthropic: sonnet-4.5
296
+ # openai: gpt-5.3-codex-low
297
+ # balanced:
298
+ # anthropic: sonnet-4.5-thinking
299
+ # openai: gpt-5.3-codex
300
+ # powerful:
301
+ # anthropic: opus-4.6-thinking
302
+ # openai: gpt-5.1-codex-max
303
+
304
+ # --- Trace capture ---
305
+ trace:
306
+ # trace.enabled
307
+ # What: Master switch for workflow trace collection.
308
+ # Impact: Off reduces trace artifacts; on improves debuggability.
309
+ # Signal: Missing forensic context during incidents (enable), or trace storage overhead too high (disable).
310
+ # Change when: You need to reduce trace volume or increase diagnostics.
311
+ enabled: true
312
+
313
+ # trace.includeOutput
314
+ # What: Include model/tool output snippets in traces.
315
+ # Impact: Better debugging context but larger logs and potentially sensitive output in traces.
316
+ # Signal: Investigations lack enough output context (enable), or traces include too much sensitive/noisy content (disable).
317
+ # Change when: You want minimal traces or stricter output hygiene.
318
+ includeOutput: true
319
+
320
+ # trace.maxOutputChars
321
+ # What: Global cap of captured output chars per trace item.
322
+ # Impact: Higher captures richer context but grows trace size.
323
+ # Signal: Trace snippets are cut before key error details appear (increase), or traces are too large/noisy (decrease).
324
+ # Change when: Useful context is being truncated too aggressively.
325
+ maxOutputChars: 8000
326
+
327
+ workflows:
328
+ planner:
329
+ # trace.workflows.planner.enabled / maxOutputChars
330
+ # What: Planner-specific trace override.
331
+ # Impact: Fine-grained planner trace tuning.
332
+ # Signal: Planner traces need different verbosity than global behavior.
333
+ # Change when: Planner traces need different verbosity than global default.
334
+ enabled: true
335
+ maxOutputChars: 4000
336
+
337
+ reviewer:
338
+ # trace.workflows.reviewer.enabled / maxOutputChars
339
+ # What: Reviewer-specific trace override.
340
+ # Impact: Fine-grained reviewer trace tuning.
341
+ # Signal: Reviewer traces are too sparse for diagnosis or too noisy for signal extraction.
342
+ # Change when: Reviewer traces are too noisy or too sparse.
343
+ enabled: true
344
+ maxOutputChars: 4000
345
+
346
+ risk:
347
+ # trace.workflows.risk.enabled / maxOutputChars
348
+ # What: Risk-specific trace override.
349
+ # Impact: Fine-grained risk trace tuning.
350
+ # Signal: Risk reasoning context is truncated (increase) or over-captured (decrease).
351
+ # Change when: Risk traces need tighter/looser capture bounds.
352
+ enabled: true
353
+ maxOutputChars: 2000
354
+
355
+ # --- Proof of life ---
356
+ proofOfLife:
357
+ # proofOfLife.timeout
358
+ # What: Wait window for liveness responses before stale claim eviction actions.
359
+ # Impact: Lower values reclaim work faster; higher values are more tolerant of slow responses.
360
+ # Signal: Active claims get evicted while agents are still responsive (increase), or dead claims linger too long (decrease).
361
+ # Change when: Claims are reclaimed too quickly or too slowly.
362
+ timeout: 5m
363
+
364
+ # --- Workspace lifecycle ---
365
+ workspace:
366
+ # workspace.cleanup
367
+ # What: Deletes per-agent workspace directories on kill/shutdown.
368
+ # Impact: true saves disk space; false preserves artifacts for debugging.
369
+ # Signal: Disk growth from stale workspaces (enable), or need post-run forensic inspection (disable).
370
+ # Change when: You want cleaner disks (true) or post-mortem inspection (false).
371
+ cleanup: false
372
+
373
+ # --- Session cleanup ---
374
+ cleanup:
375
+ # cleanup.retention
376
+ # What: Age threshold for pruning old sessions.
377
+ # Impact: Lower values reduce disk usage; higher values keep history longer.
378
+ # Signal: Session storage growth pressure (decrease), or historical debugging context disappears too soon (increase).
379
+ # Change when: You need more/less historical session retention.
380
+ retention: 12h
381
+
382
+ # cleanup.autoprune
383
+ # What: Runs prune/sweep automatically at start.
384
+ # Impact: true keeps storage tidy without manual cleanup.
385
+ # Signal: Accumulated stale files/sessions between runs (enable), or need strict manual lifecycle control (disable).
386
+ # Change when: You want explicit/manual cleanup control (set false).
387
+ autoprune: true
388
+
389
+ # --- Prompt overrides ---
390
+ # prompts.{role}
391
+ # What: Repo-local prompt file overrides for each role.
392
+ # Impact: Changes agent behavior/instructions without code changes.
393
+ # Signal: Repeated instruction gaps that can be fixed with persistent repo-specific guidance.
394
+ # Change when: You need project-specific guardrails or workflow guidance.
395
+ # prompts:
396
+ # action: .loreli/action.md
397
+ # reviewer: .loreli/review.md
398
+ # planner: .loreli/planner.md
399
+ # risk: .loreli/risk.md
400
+
401
+ # --- Feedback and knowledge capture ---
402
+ feedback:
403
+ # feedback.enabled
404
+ # What: Master switch for feedback marker capture and knowledge aggregation.
405
+ # Impact: false disables automated pattern accumulation.
406
+ # Signal: Need to temporarily pause all feedback mining/noise.
407
+ # Change when: You want to pause feedback mining entirely.
408
+ enabled: true
409
+
410
+ # feedback.threshold
411
+ # What: Repeat-count threshold before a feedback pattern is promoted/escalated.
412
+ # Impact: Lower values promote patterns sooner; higher values reduce noisy promotions.
413
+ # Signal: Too many low-signal promotions (increase), or important repeated issues taking too long to surface (decrease).
414
+ # Change when: Pattern promotion is too noisy (increase) or too slow (decrease).
415
+ threshold: 5
416
+
417
+ # feedback.categories
418
+ # What: Allowed classifier buckets for captured feedback.
419
+ # Impact: Removed categories are ignored by pattern promotion.
420
+ # Signal: Certain feedback classes are irrelevant/noisy for your team.
421
+ # Change when: You want to focus feedback mining on specific quality dimensions.
422
+ categories:
423
+ - naming
424
+ - architecture
425
+ - testing
426
+ - documentation
427
+ - performance
428
+ - security
429
+
430
+ # --- Tmux ---
431
+ tmux:
432
+ # tmux.session
433
+ # What: Shared tmux session name where agent panes run.
434
+ # Impact: Changing this isolates Loreli panes into a different tmux session namespace.
435
+ # Signal: Multiple orchestrations collide in same tmux namespace.
436
+ # Change when: Running multiple isolated Loreli orchestrations on one machine.
437
+ session: loreli
438
+
439
+ # tmux.capture
440
+ # What: Number of pane history lines Loreli reads when inspecting output.
441
+ # Impact: Higher values improve diagnostics but increase capture overhead.
442
+ # Signal: Error root cause appears just above currently captured history window.
443
+ # Change when: Important error context scrolls out of captured history.
444
+ capture: 500
445
+
446
+ # --- GitHub auth override ---
447
+ # github.token
448
+ # What: Fallback GitHub token in config (env token is preferred).
449
+ # Impact: Enables Hub API auth when env injection is unavailable.
450
+ # Signal: Hub/API auth failures in environments where you cannot set env vars.
451
+ # Change when: You cannot provide GITHUB_TOKEN via environment.
452
+ # github:
453
+ # token: ghp_your_token_here
@@ -0,0 +1,3 @@
1
+ [mcp_servers.loreli]
2
+ command = "npx"
3
+ args = ["loreli", "mcp"]
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "loreli": {
4
+ "command": "npx",
5
+ "args": [
6
+ "loreli",
7
+ "mcp"
8
+ ]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "loreli": {
4
+ "command": "npx",
5
+ "args": [
6
+ "loreli",
7
+ "mcp"
8
+ ]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,23 @@
1
+ ## Summary
2
+
3
+ Brief description of what this PR does and why.
4
+
5
+ ## Changes
6
+
7
+ - List the key changes made in this PR.
8
+
9
+ ## Testing
10
+
11
+ - [ ] Tests added/updated
12
+ - [ ] Manual testing performed
13
+ - [ ] Edge cases considered
14
+
15
+ ## Issue Reference
16
+
17
+ Closes #
18
+
19
+ ## Sign-off
20
+
21
+ - [ ] Code follows project conventions
22
+ - [ ] Documentation updated
23
+ - [ ] No scope creep beyond the referenced issue