crewlore 0.1.0__tar.gz
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.
- crewlore-0.1.0/.env.example +6 -0
- crewlore-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- crewlore-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
- crewlore-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- crewlore-0.1.0/.github/SECURITY.md +32 -0
- crewlore-0.1.0/.github/dependabot.yml +19 -0
- crewlore-0.1.0/.github/workflows/ci.yml +35 -0
- crewlore-0.1.0/.gitignore +31 -0
- crewlore-0.1.0/CHANGELOG.md +88 -0
- crewlore-0.1.0/CONTRIBUTING.md +65 -0
- crewlore-0.1.0/LICENSE +21 -0
- crewlore-0.1.0/PKG-INFO +251 -0
- crewlore-0.1.0/README.md +196 -0
- crewlore-0.1.0/docs/anchors.md +80 -0
- crewlore-0.1.0/docs/assets/demo.gif +0 -0
- crewlore-0.1.0/docs/evaluating-on-your-codebase.md +118 -0
- crewlore-0.1.0/docs/examples/README.md +13 -0
- crewlore-0.1.0/docs/examples/pydantic-ai/README.md +63 -0
- crewlore-0.1.0/docs/examples/pydantic-ai/book.md +93 -0
- crewlore-0.1.0/docs/examples/pydantic-ai/claims.jsonl +18 -0
- crewlore-0.1.0/docs/examples/pydantic-ai/provenance.md +99 -0
- crewlore-0.1.0/docs/mcp.md +77 -0
- crewlore-0.1.0/docs/recording.tape +50 -0
- crewlore-0.1.0/docs/scrub.md +59 -0
- crewlore-0.1.0/pyproject.toml +60 -0
- crewlore-0.1.0/scripts/demo.py +186 -0
- crewlore-0.1.0/src/lore/__init__.py +3 -0
- crewlore-0.1.0/src/lore/actuation.py +64 -0
- crewlore-0.1.0/src/lore/capture/__init__.py +0 -0
- crewlore-0.1.0/src/lore/capture/adapters/__init__.py +0 -0
- crewlore-0.1.0/src/lore/capture/adapters/claude_code.py +128 -0
- crewlore-0.1.0/src/lore/capture/ingest.py +47 -0
- crewlore-0.1.0/src/lore/capture/signals.py +56 -0
- crewlore-0.1.0/src/lore/cli.py +184 -0
- crewlore-0.1.0/src/lore/compile/__init__.py +0 -0
- crewlore-0.1.0/src/lore/compile/extractor.py +196 -0
- crewlore-0.1.0/src/lore/compile/llm.py +109 -0
- crewlore-0.1.0/src/lore/compile/pipeline.py +145 -0
- crewlore-0.1.0/src/lore/compile/run.py +84 -0
- crewlore-0.1.0/src/lore/replay.py +63 -0
- crewlore-0.1.0/src/lore/schemas.py +129 -0
- crewlore-0.1.0/src/lore/scrub.py +117 -0
- crewlore-0.1.0/src/lore/serve/__init__.py +0 -0
- crewlore-0.1.0/src/lore/serve/mcp_server.py +39 -0
- crewlore-0.1.0/src/lore/serve/server.py +119 -0
- crewlore-0.1.0/src/lore/store.py +161 -0
- crewlore-0.1.0/tests/__init__.py +0 -0
- crewlore-0.1.0/tests/e2e/test_end_to_end.py +119 -0
- crewlore-0.1.0/tests/integration/test_auto_compile.py +98 -0
- crewlore-0.1.0/tests/integration/test_cli.py +80 -0
- crewlore-0.1.0/tests/integration/test_extraction_cache.py +85 -0
- crewlore-0.1.0/tests/integration/test_run_compile.py +77 -0
- crewlore-0.1.0/tests/unit/test_actuation.py +83 -0
- crewlore-0.1.0/tests/unit/test_claude_code_adapter.py +116 -0
- crewlore-0.1.0/tests/unit/test_compiler.py +194 -0
- crewlore-0.1.0/tests/unit/test_extractor.py +250 -0
- crewlore-0.1.0/tests/unit/test_ingest.py +82 -0
- crewlore-0.1.0/tests/unit/test_llm.py +54 -0
- crewlore-0.1.0/tests/unit/test_nsf_and_conflict.py +66 -0
- crewlore-0.1.0/tests/unit/test_replay.py +87 -0
- crewlore-0.1.0/tests/unit/test_schemas.py +100 -0
- crewlore-0.1.0/tests/unit/test_scrub.py +188 -0
- crewlore-0.1.0/tests/unit/test_serve.py +119 -0
- crewlore-0.1.0/tests/unit/test_signals.py +81 -0
- crewlore-0.1.0/tests/unit/test_store.py +109 -0
- crewlore-0.1.0/uv.lock +1353 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bring your own API key. crewlore never ships keys anywhere — they only
|
|
2
|
+
# exist in your environment / your model provider's account.
|
|
3
|
+
#
|
|
4
|
+
# One of the following, matching your `provider` in `.lore/config.yaml`:
|
|
5
|
+
ANTHROPIC_API_KEY=sk-ant-your-key-here
|
|
6
|
+
# OPENAI_API_KEY=sk-your-openai-key-here
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Something behaves unexpectedly
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**What happened**
|
|
8
|
+
|
|
9
|
+
A short, specific description of the unexpected behavior.
|
|
10
|
+
|
|
11
|
+
**What you expected**
|
|
12
|
+
|
|
13
|
+
What you thought should happen instead.
|
|
14
|
+
|
|
15
|
+
**How to reproduce**
|
|
16
|
+
|
|
17
|
+
Minimal steps, ideally runnable:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# commands
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If the issue is with a specific session/transcript, please *do not* paste sensitive content. A reduced synthetic example is best; otherwise describe the shape (which `kind` events, roughly how many, what triggered the bug).
|
|
24
|
+
|
|
25
|
+
**Environment**
|
|
26
|
+
|
|
27
|
+
- `crewlore` version (`lore --version` or `pip show crewlore`):
|
|
28
|
+
- Python version:
|
|
29
|
+
- OS:
|
|
30
|
+
- Model provider + model name (if relevant):
|
|
31
|
+
|
|
32
|
+
**Anything else**
|
|
33
|
+
|
|
34
|
+
Logs, screenshots, related issues, hunches.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest something crewlore could do
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**The problem you're trying to solve**
|
|
8
|
+
|
|
9
|
+
What's the underlying friction? (Not the solution — the problem.)
|
|
10
|
+
|
|
11
|
+
**The shape of a solution you're picturing**
|
|
12
|
+
|
|
13
|
+
How would it work from the user's side? CLI command, config option, file format, …?
|
|
14
|
+
|
|
15
|
+
**Alternatives considered**
|
|
16
|
+
|
|
17
|
+
What did you think about and rule out, and why?
|
|
18
|
+
|
|
19
|
+
**Scope check**
|
|
20
|
+
|
|
21
|
+
`crewlore`'s job is to compile agent session transcripts into a versioned, plaintext, citable knowledge layer. It is intentionally *not* a coding agent, a vector DB, or a personal-memory store. If your request fits comfortably inside that scope, say so; if it's a stretch, that's fine — just call it out so the discussion can be honest about whether it belongs here or somewhere else.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## What this changes
|
|
2
|
+
|
|
3
|
+
One short paragraph. Focus on the *why* — the *what* is in the diff.
|
|
4
|
+
|
|
5
|
+
## Test plan
|
|
6
|
+
|
|
7
|
+
- [ ] `uv run pytest -q` passes locally
|
|
8
|
+
- [ ] `uv run ruff check .` passes locally
|
|
9
|
+
- [ ] If this changes user-visible behavior: README / docs updated
|
|
10
|
+
- [ ] If this changes the on-disk schema: migration / version bump documented in CHANGELOG
|
|
11
|
+
|
|
12
|
+
## Notes for reviewers
|
|
13
|
+
|
|
14
|
+
Anything reviewers should look at first, or any decision you'd like a second opinion on.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
`crewlore` is an early-stage open-source project. It runs locally and does not host any service on the maintainer's infrastructure — there is no server to attack — but it does process session transcripts that may contain sensitive content, and it ships a secret-scrubber that other people will rely on.
|
|
4
|
+
|
|
5
|
+
## Reporting a vulnerability
|
|
6
|
+
|
|
7
|
+
If you find anything in the following list, **please do not file a public issue**. Email **srijan@pavoai.com** with the details and I'll respond within 72 hours:
|
|
8
|
+
|
|
9
|
+
- A secret-scrub bypass (a real-world secret format that `lore.scrub` passes through un-redacted)
|
|
10
|
+
- A way for `crewlore` to read or leak data from outside its working directory
|
|
11
|
+
- A way for `lore serve` / the MCP server to expose more than the user intended
|
|
12
|
+
- A dependency-chain vulnerability with practical exploitability against `crewlore`'s usage
|
|
13
|
+
|
|
14
|
+
For ordinary bugs and feature requests, please open a GitHub issue.
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
In scope:
|
|
19
|
+
|
|
20
|
+
- `crewlore`'s own code (`src/lore/`)
|
|
21
|
+
- Documented behavior of `lore init`, `lore compile`, `lore query`, `lore status`, `lore watch`, `lore serve`
|
|
22
|
+
- The secret-scrubber pattern set in `src/lore/scrub.py` (see also `docs/scrub.md` for the documented coverage contract)
|
|
23
|
+
|
|
24
|
+
Out of scope:
|
|
25
|
+
|
|
26
|
+
- Vulnerabilities in the model provider's API (Anthropic / OpenAI)
|
|
27
|
+
- Issues that require physical/local access to the developer's machine
|
|
28
|
+
- Theoretical or non-exploitable patterns
|
|
29
|
+
|
|
30
|
+
## Disclosure preference
|
|
31
|
+
|
|
32
|
+
Once a fix is shipped, I will credit reporters in the release notes unless asked not to. Coordinated disclosure window: 7–14 days from a fix landing, depending on severity.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: pip
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
day: monday
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
labels:
|
|
10
|
+
- dependencies
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: github-actions
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: monthly
|
|
16
|
+
open-pull-requests-limit: 3
|
|
17
|
+
labels:
|
|
18
|
+
- dependencies
|
|
19
|
+
- ci
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: test (py${{ matrix.python-version }})
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
22
|
+
with:
|
|
23
|
+
enable-cache: true
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
run: uv python install ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --all-extras --dev
|
|
30
|
+
|
|
31
|
+
- name: Lint (ruff)
|
|
32
|
+
run: uv run ruff check .
|
|
33
|
+
|
|
34
|
+
- name: Test (pytest)
|
|
35
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
|
|
9
|
+
# Virtualenv
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
|
|
13
|
+
# Tooling caches
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
.coverage
|
|
17
|
+
htmlcov/
|
|
18
|
+
|
|
19
|
+
# OS
|
|
20
|
+
.DS_Store
|
|
21
|
+
|
|
22
|
+
# Local lore data captured during dev (raw sessions never committed)
|
|
23
|
+
.lore/sessions/
|
|
24
|
+
|
|
25
|
+
# Secrets
|
|
26
|
+
.env
|
|
27
|
+
*.key
|
|
28
|
+
|
|
29
|
+
# Local-only working dir — strategy notes, launch copy drafts,
|
|
30
|
+
# experiments. Never committed; never pushed.
|
|
31
|
+
local/
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
First working vertical slice — capture → compile → serve → actuate → measure, built test-first.
|
|
6
|
+
|
|
7
|
+
### Pre-launch hardening
|
|
8
|
+
|
|
9
|
+
A full adversarial audit before going public surfaced a cluster of fixes, all landed here:
|
|
10
|
+
|
|
11
|
+
- **Incremental compile cost.** `lore watch` now caches extraction per session (sessions are immutable, so the id is a safe key) — each interval only LLM-extracts newly-ingested sessions instead of re-running the whole corpus against your key. `--rebuild` ignores the cache. The watch loop is now incremental in *cost*, not just idempotent in *output*.
|
|
12
|
+
- **First-run works out of the box.** `anthropic` (the default provider) is now a base dependency, and SDK imports are guarded with an actionable message instead of a raw `ModuleNotFoundError`. `pipx install crewlore` → `lore compile` just works with a key.
|
|
13
|
+
- **Local models are real.** `model.provider: local` + `model.base_url` routes to any OpenAI-compatible endpoint (Ollama, LM Studio, vLLM). Previously "local" was advertised but unimplemented and produced a dead-end error.
|
|
14
|
+
- **`lore serve --mcp`** — the documented MCP flag now exists (it was missing; the copy-paste `mcp.json` failed to launch).
|
|
15
|
+
- **Tool-call arguments are scrubbed.** Secrets passed as tool-call args live in event `meta`, which previously bypassed the scrubber; `meta` is now walked recursively. Coverage broadened (AWS `ASIA`/secret-key assignments, all `xox?-` Slack tokens, quoted multi-word secrets). See [`docs/scrub.md`](docs/scrub.md).
|
|
16
|
+
- **Usage stats moved to a gitignored sidecar** so `lore query` no longer rewrites the git-tracked `claims.jsonl` on every call — `git log .lore/` stays clean.
|
|
17
|
+
- **Robustness:** timestamps are always timezone-aware (a timestampless transcript no longer crashes the actuation loop); a single failing session no longer aborts the whole compile pass.
|
|
18
|
+
- **`lore --version`** flag; one canonical-form definition shared between the fidelity gate and the reported fidelity number; honesty passes on the README (the synthetic rediscovery metric is labelled demo data, the fidelity claim states what the gate does and does not certify, retrieval is described as lexical).
|
|
19
|
+
- Corrected the pydantic-ai example counts (9 scope groupings / 6 topics, matching the committed data).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **Schemas** — content-addressed `Claim` IDs (idempotent compile, clean merges); `NSFEvent`, `Anchor`, `Provenance`, `Conflict`, `UsageStats`. Actuation fields (`action`, `status`, `usage`) and a conflict-grouping `topic` baked in.
|
|
24
|
+
- **Store** — `.lore/` layout; sorted, one-object-per-line JSONL for line-oriented diffs/merges; raw sessions gitignored (secrets safety).
|
|
25
|
+
- **Capture** — Claude Code adapter (transcript records → NSF) and a friction/resolution signal gate so trivial one-shot sessions are not compiled.
|
|
26
|
+
- **Compiler** — deterministic dedup/merge, conflict-recording (not merging), authority-by-support, latest-observed; LLM extraction behind a `complete(prompt)->str` seam with a verbatim-anchor fidelity gate.
|
|
27
|
+
- **Serve** — instrumented task-conditioned retrieval (records usage), influence/override feedback, markdown knowledge book, optional MCP server (`[serve]` extra).
|
|
28
|
+
- **Actuation loop** — usage-driven lifecycle: decay unused, retire overridden, reinforce influential.
|
|
29
|
+
- **Measurement** — `fidelity_report` and held-out `replay_report` (preventable-rediscovery rate).
|
|
30
|
+
- **CLI** — `init`, `compile`, `query`, `status` (surfaces utilization as a dumpyard early-warning), `serve`.
|
|
31
|
+
- **Demo** — `scripts/demo.py` runs the full loop on synthetic public-safe data, no API key.
|
|
32
|
+
|
|
33
|
+
### Provider support
|
|
34
|
+
|
|
35
|
+
- BYO-key Anthropic and OpenAI; loud `CredentialsError` when no key is configured. Nothing routes through any lore-operated infrastructure.
|
|
36
|
+
|
|
37
|
+
### Live validation (Anthropic Haiku)
|
|
38
|
+
|
|
39
|
+
Ran the real extraction path end-to-end and fixed what it surfaced:
|
|
40
|
+
|
|
41
|
+
- Tolerate ```` ```json ```` fences and prose around the JSON array (models wrap output).
|
|
42
|
+
- Conflicts require matching `kind` (a gotcha and its fix-decision shared a topic and were falsely flagged).
|
|
43
|
+
- Feed existing topic vocabulary back to the extractor so it reuses keys across sessions.
|
|
44
|
+
|
|
45
|
+
Confirmed working live: extraction returns well-formed claims, the verbatim-anchor fidelity gate holds at 100%, trivial sessions are gated out, and retrieval returns relevant claims. See README "Known limitations" for the residual conflict-coordinate-consistency gap.
|
|
46
|
+
|
|
47
|
+
### Automatic compilation + secret scrubbing
|
|
48
|
+
|
|
49
|
+
Compilation is now automatic by default — no human has to remember to run it:
|
|
50
|
+
|
|
51
|
+
- **Secret scrubber** (`lore.scrub`) runs at ingest: API keys, AWS keys, private-key blocks, and secret assignments are redacted before anything is stored or sent to the model.
|
|
52
|
+
- **Capture-from-transcripts** (`lore.capture.ingest`): reads the coding agent's existing on-disk transcripts, incrementally (skips already-captured sessions). No live hook needed for MVP.
|
|
53
|
+
- **`auto_compile`** = ingest → compile → prune (actuation lifecycle) → re-render the book, in one idempotent pass.
|
|
54
|
+
- **`lore watch`** runs that pass on an interval (`--once` for cron/CI); `lore compile` is the manual escape hatch.
|
|
55
|
+
- **Signal gate** widened to capture procedures/conventions/team-norms, not only friction (was silently dropping "how we do X" / "the rule is Y" sessions).
|
|
56
|
+
|
|
57
|
+
Live end-to-end on public-safe data (Haiku): 6 transcripts ingested, 2 secrets redacted, 7 compiled claims (decisions/gotchas/procedures), a rendered team-knowledge book, and 2 of 3 held-out sessions re-deriving known knowledge (illustrative demo data, n=3).
|
|
58
|
+
|
|
59
|
+
### Fidelity-gate contract made explicit (`_canonical_form`)
|
|
60
|
+
|
|
61
|
+
The fidelity gate's tolerance shape — what counts as a "verbatim" anchor — is now a documented contract instead of an implicit substring check. Driven by real-data findings from capturing pydantic-ai sessions where agent prose contains Markdown decoration and long replies are split across NSF events by tool calls.
|
|
62
|
+
|
|
63
|
+
- **New module-level `_canonical_form(text)`** in `lore.compile.extractor`. Three transformations applied in order, each with its own line and rationale: strip Markdown decoration (`` ` ``, `*`, `_`); collapse whitespace; lowercase. Full docstring covering the contract.
|
|
64
|
+
- **What's accepted:** Markdown decoration differences, whitespace differences, case differences, quotes that span event boundaries (e.g. a long agent reply split by a tool_call).
|
|
65
|
+
- **What's still rejected:** fabricated content, paraphrase, changed meaningful words, out-of-order stitching of disjoint substrings.
|
|
66
|
+
- **Five adversarial tests** pin down both halves: `test_fidelity_accepts_*` for tolerated variations, `test_fidelity_rejects_*` for content-drift cases.
|
|
67
|
+
- **New spec doc:** [`docs/anchors.md`](docs/anchors.md) — the precise contract, why each transformation exists, what's deliberately preserved, and the v0.2 roadmap item (position-pointer anchors that eliminate the gate entirely).
|
|
68
|
+
- **Haystack excludes `tool_call` events** — their `content` is just the tool name (e.g. `"Read"`), not session prose; including it would break quotes that span agent-message events separated by tool calls.
|
|
69
|
+
|
|
70
|
+
### Real-data evidence: pydantic-ai example expanded
|
|
71
|
+
|
|
72
|
+
`docs/examples/pydantic-ai/` now reflects three captured sessions (G1 #5679, G3 #5358, D1 #5536):
|
|
73
|
+
|
|
74
|
+
- **18 active claims** (7 gotchas, 7 decisions, 3 procedures, 1 style)
|
|
75
|
+
- **9 distinct scope groupings** spanning UI adapters, decorator introspection, durable-execution threat modeling, toolsets, tests, and version policy
|
|
76
|
+
- **100% per-session canonical fidelity** — every anchor verified against its session's content under the explicit contract
|
|
77
|
+
- **0 conflicts** (sessions disjoint in scope)
|
|
78
|
+
- Provenance documents five real-data bugs the capture process found and fixed before publication.
|
|
79
|
+
|
|
80
|
+
### Renamed from `agent-lore` to `crewlore`
|
|
81
|
+
|
|
82
|
+
The original working name `agent-lore` collided on PyPI and on GitHub (taken by an unrelated 2018 project). Renamed to `crewlore` — two familiar words, instant comprehension, with the name free on PyPI and the repo live on GitHub. The importable package, CLI command, and `.lore/` directory layout stay the same; only the distribution and GitHub URL change. (Not yet published to PyPI; install from git until the first release is cut.)
|
|
83
|
+
|
|
84
|
+
### README hero GIF rework
|
|
85
|
+
|
|
86
|
+
- **Compiled-book renders as Markdown** in the recording (via `rich.markdown.Markdown`) — headings, bullets, and kind tags are now visibly formatted; previously the GIF showed raw text and the "interesting facts" landed weakly.
|
|
87
|
+
- **Architecture diagram is Mermaid**, not ASCII — renders inline on GitHub with the engine + artifact visually emphasized.
|
|
88
|
+
- **Higher-contrast theme + larger font** in `docs/recording.tape` (Catppuccin Mocha, 18pt) for legibility at README hero size.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to crewlore
|
|
2
|
+
|
|
3
|
+
Thanks for considering a contribution. `crewlore` is small, alpha, and intentionally focused — the best way to help right now is to try it on a real repo, open a [discussion](https://github.com/srijansk/crewlore/discussions) about what worked and what didn't, and (if you're up for it) ship a small, well-scoped PR.
|
|
4
|
+
|
|
5
|
+
Before substantial changes, please open a discussion or an issue so we can agree on the shape before you write code. A 5-minute conversation usually saves an hour of rework.
|
|
6
|
+
|
|
7
|
+
## The highest-leverage contribution
|
|
8
|
+
|
|
9
|
+
**Add a capture adapter for another coding agent.** The architecture is harness-neutral by design; the moat is in compile, and capture is deliberately thin. A new adapter is one self-contained module that maps a harness's session artifacts into the Normalized Session Format (NSF). Look at `src/lore/capture/adapters/claude_code.py` and the tests in `tests/unit/test_claude_code_adapter.py` for the shape — that's the entire surface area.
|
|
10
|
+
|
|
11
|
+
## Local setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/srijansk/crewlore.git
|
|
15
|
+
cd crewlore
|
|
16
|
+
uv venv && source .venv/bin/activate
|
|
17
|
+
uv pip install -e ".[dev]"
|
|
18
|
+
pytest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
You should see all tests green. If anything's off, that's a bug — please open an issue.
|
|
22
|
+
|
|
23
|
+
## Running the tests
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pytest # full suite
|
|
27
|
+
pytest tests/unit # fast feedback loop
|
|
28
|
+
pytest tests/integration # store/compile orchestration
|
|
29
|
+
pytest tests/e2e # the whole vertical, deterministic
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The suite is fully deterministic. **No real API calls happen during `pytest`** — LLM extraction is exercised behind an injected `complete(prompt) -> str` callable so tests are fast, hermetic, and free. To exercise the live extraction path, set `ANTHROPIC_API_KEY` (or `OPENAI_API_KEY`) and run `lore compile` against a real repo's transcripts.
|
|
33
|
+
|
|
34
|
+
## Code style
|
|
35
|
+
|
|
36
|
+
- Linting and formatting: `ruff check src tests scripts` and `ruff check --fix` for autofixes. Line length 100.
|
|
37
|
+
- Type hints throughout (`from __future__ import annotations` at the top of every module).
|
|
38
|
+
- Pydantic models for any data that crosses a module boundary.
|
|
39
|
+
|
|
40
|
+
## Test-driven development
|
|
41
|
+
|
|
42
|
+
The project was built test-first and that's the discipline for contributions. Concretely: write the failing test that captures the desired behavior, verify it fails for the expected reason, then write the smallest implementation that makes it pass. The schema and pipeline tests in `tests/unit/` are good models for the shape.
|
|
43
|
+
|
|
44
|
+
If you're fixing a bug, please include a regression test that fails on `main` and passes with your fix.
|
|
45
|
+
|
|
46
|
+
## Pull requests
|
|
47
|
+
|
|
48
|
+
- Branch from `main`; keep PRs focused on one thing.
|
|
49
|
+
- Include the test that proves the change works (red → green in the same PR).
|
|
50
|
+
- Run `pytest` and `ruff check src tests scripts` before pushing.
|
|
51
|
+
- Reference the issue or discussion the PR addresses.
|
|
52
|
+
|
|
53
|
+
## Reporting issues
|
|
54
|
+
|
|
55
|
+
For bugs: please include the command you ran, the observed output, the expected output, and your Python version + OS. If the bug involves real transcripts, **don't paste their contents** — describe the shape (kinds of events, rough size) instead.
|
|
56
|
+
|
|
57
|
+
For security issues, please email rather than filing publicly.
|
|
58
|
+
|
|
59
|
+
## Code of conduct
|
|
60
|
+
|
|
61
|
+
Be excellent to each other. Discussions and reviews are technical and direct, but always respectful — disagree about the work, never about the person.
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
By contributing you agree your contributions are licensed under the same MIT license that covers the project.
|
crewlore-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 crewlore Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
crewlore-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: crewlore
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An open, local-first, harness-agnostic compiler that turns AI-coding-agent sessions into a versioned, plaintext team tribal-knowledge layer in your own git repo.
|
|
5
|
+
Author: crewlore Contributors
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 crewlore Contributors
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Keywords: agents,ai,cli,compiler,knowledge,local-first,mcp,tribal-knowledge
|
|
29
|
+
Classifier: Development Status :: 3 - Alpha
|
|
30
|
+
Classifier: Environment :: Console
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Programming Language :: Python :: 3
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
38
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
39
|
+
Requires-Python: >=3.10
|
|
40
|
+
Requires-Dist: anthropic>=0.39
|
|
41
|
+
Requires-Dist: pydantic<3.0,>=2.0
|
|
42
|
+
Requires-Dist: pyyaml<7.0,>=6.0
|
|
43
|
+
Requires-Dist: rich<16.0,>=13.0
|
|
44
|
+
Requires-Dist: typer<1.0,>=0.12
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: openai>=1.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
48
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
49
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
50
|
+
Provides-Extra: openai
|
|
51
|
+
Requires-Dist: openai>=1.0; extra == 'openai'
|
|
52
|
+
Provides-Extra: serve
|
|
53
|
+
Requires-Dist: mcp>=1.0; extra == 'serve'
|
|
54
|
+
Description-Content-Type: text/markdown
|
|
55
|
+
|
|
56
|
+
# crewlore
|
|
57
|
+
|
|
58
|
+
[](https://github.com/srijansk/crewlore/actions/workflows/ci.yml)
|
|
59
|
+
[](https://opensource.org/licenses/MIT)
|
|
60
|
+
[](docs/examples/pydantic-ai/)
|
|
61
|
+
[](docs/examples/pydantic-ai/)
|
|
62
|
+
|
|
63
|
+
> **Your coding agents keep relearning what your team already figured out.**
|
|
64
|
+
> `crewlore` compiles agent sessions into a citable, plaintext team-knowledge layer that lives in your git repo. Local-first.
|
|
65
|
+
|
|
66
|
+
<p align="center">
|
|
67
|
+
<img src="docs/assets/demo.gif" alt="crewlore in action — sessions compiled into a citable team knowledge book" />
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pipx install git+https://github.com/srijansk/crewlore.git
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> **Validated on [`pydantic/pydantic-ai`](https://github.com/pydantic/pydantic-ai)** (17.3k ⭐) · 3 sessions · 18 claims · 100% fidelity · [see receipts →](docs/examples/pydantic-ai/)
|
|
75
|
+
|
|
76
|
+
## Quickstart
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cd my-repo
|
|
80
|
+
lore init # create .lore/ in your repo
|
|
81
|
+
lore watch # automatic: read agent transcripts, scrub secrets,
|
|
82
|
+
# compile to claims, prune — on an interval
|
|
83
|
+
lore query "billing webhook" # ask the knowledge layer anything, anytime
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
That's it — engineers keep working in whatever agent they use; `lore` keeps the knowledge layer fresh in the background. Commit `.lore/knowledge` and `.lore/claims` and your teammates inherit it on the next `git pull`.
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary>Trouble installing?</summary>
|
|
90
|
+
|
|
91
|
+
If `pipx` fails with `Broken Python installation, platform.mac_ver() returned an empty value`, your default Python is a broken install (sometimes seen with very recent Homebrew Python 3.14 builds). Pin a known-working interpreter:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pipx install --python python3.13 git+https://github.com/srijansk/crewlore.git
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
To make pipx default to Python 3.13 going forward: `export PIPX_DEFAULT_PYTHON=$(which python3.13)`.
|
|
98
|
+
|
|
99
|
+
</details>
|
|
100
|
+
|
|
101
|
+
### Try it in 30 seconds — no API key
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git clone https://github.com/srijansk/crewlore.git
|
|
105
|
+
cd crewlore && uv run python scripts/demo.py
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The demo runs the full loop on bundled public-safe sessions and prints what it found:
|
|
109
|
+
|
|
110
|
+
> [!NOTE]
|
|
111
|
+
> **Fidelity — 100%.** Every claim's citation resolves verbatim back to its source.
|
|
112
|
+
> **Conflicts surfaced — 1.** A real disagreement kept with both provenances, not silently merged.
|
|
113
|
+
> **Preventable rediscovery — 2 of 3.** Two of the three held-out follow-up sessions re-derived knowledge the layer already had. (Illustrative demo data — n=3, not a benchmark.)
|
|
114
|
+
|
|
115
|
+
## See it run on a real codebase: pydantic-ai (17.3k ⭐)
|
|
116
|
+
|
|
117
|
+
[`docs/examples/pydantic-ai/`](docs/examples/pydantic-ai/) is a committed snapshot of `crewlore` compiled on the public [`pydantic/pydantic-ai`](https://github.com/pydantic/pydantic-ai) repo — 3 Claude Code sessions on real issues, no synthetic data.
|
|
118
|
+
|
|
119
|
+
- **18 claims** compiled across 9 scope groupings (UI adapters, decorator introspection, durable-execution threat modeling, toolsets, tests, version policy)
|
|
120
|
+
- **100% fidelity** under the explicit [canonical-form contract](docs/anchors.md) — every anchor's quote canonically resolves to a substring of its source session. (Fidelity certifies the *citation* is real, not that the model's *statement* is fully entailed by it — that's what human/PR review of the book is for.)
|
|
121
|
+
- **0 conflicts** because the three sessions covered disjoint scopes — the conflict detector wasn't given anything to flag
|
|
122
|
+
- **Receipts:** the rendered [`book.md`](docs/examples/pydantic-ai/book.md), the raw [`claims.jsonl`](docs/examples/pydantic-ai/claims.jsonl), and full [`provenance.md`](docs/examples/pydantic-ai/provenance.md) (session ids, commit hashes, compile cost, scrub redactions, five real-data bugs the capture surfaced and we fixed before publishing)
|
|
123
|
+
|
|
124
|
+
## What you get
|
|
125
|
+
|
|
126
|
+
Raw, messy sessions go in. Out comes a structured, citable **compiled claim** — every one carrying its kind, its scope, the action it implies for future work, and a verbatim **anchor** back to the moment it was discovered:
|
|
127
|
+
|
|
128
|
+
> **`[gotcha]`** · *services/billing*
|
|
129
|
+
>
|
|
130
|
+
> Billing webhook handler lacks an idempotency check, causing duplicate charges when Stripe retries webhooks.
|
|
131
|
+
>
|
|
132
|
+
> **Do** — dedupe on the Stripe idempotency key before processing.
|
|
133
|
+
>
|
|
134
|
+
> > *anchor* — "the handler has no idempotency check, so when Stripe retries a webhook the charge is processed again."
|
|
135
|
+
|
|
136
|
+
A human can verify it (the anchor points back to the exact session line); an agent can trust it (the citation is real, not hallucinated). Claims roll up into a knowledge book at `.lore/knowledge/README.md`, grouped by area and committed to your repo alongside your code:
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
# Team knowledge (compiled by crewlore)
|
|
140
|
+
|
|
141
|
+
## services/billing
|
|
142
|
+
|
|
143
|
+
- **[gotcha]** Billing webhook handler lacks an idempotency check; dedupe on the Stripe key.
|
|
144
|
+
- *Do:* Dedupe on the Stripe idempotency key before processing.
|
|
145
|
+
- _anchor_ `ses_1#1`: "the handler has no idempotency check, so when Stripe retries a webhook the charge is processed again."
|
|
146
|
+
|
|
147
|
+
## deployment
|
|
148
|
+
|
|
149
|
+
- **[procedure]** Run migrations before deploy to prevent missing columns.
|
|
150
|
+
- *Do:* Run `make migrate` before every deploy.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## How it works
|
|
154
|
+
|
|
155
|
+
```mermaid
|
|
156
|
+
flowchart LR
|
|
157
|
+
S["coding agent<br/>sessions"] --> I["ingest + scrub<br/>(transcripts → NSF,<br/>secrets redacted)"]
|
|
158
|
+
I --> C["compile<br/>(NSF → claims,<br/>verbatim anchors)"]
|
|
159
|
+
C --> R["<b>.lore/</b> in your repo<br/>(knowledge book + claims,<br/>plaintext, git-versioned)"]
|
|
160
|
+
R --> SV["serve<br/>(files + MCP query)"]
|
|
161
|
+
SV --> N["next agent session<br/>inherits the knowledge"]
|
|
162
|
+
|
|
163
|
+
SV -. "usage signal" .-> AL["actuation loop<br/>(decay · reinforce · retire)"]
|
|
164
|
+
AL -. "lifecycle update" .-> R
|
|
165
|
+
|
|
166
|
+
classDef engine fill:#4a5d9e,stroke:#1a2c4d,color:#fff,stroke-width:2px
|
|
167
|
+
classDef artifact fill:#2d6a4f,stroke:#1b4332,color:#fff,stroke-width:2px
|
|
168
|
+
class C engine
|
|
169
|
+
class R artifact
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
> `lore watch` runs ingest → compile → prune automatically, on an interval.
|
|
173
|
+
|
|
174
|
+
- **Ingest + scrub** — reads the coding agent's existing on-disk transcripts and redacts a curated set of secret patterns (Anthropic / OpenAI / generic `sk-*` API keys, AWS keys, GitHub classic + fine-grained PATs, Google API keys, Slack tokens, HuggingFace tokens, JWTs, connection-string passwords, private-key blocks, and `password=…` assignment shapes) *before* anything is stored or sent to a model. The pattern set is documented in [`docs/scrub.md`](docs/scrub.md).
|
|
175
|
+
- **Compile** — extracts atomic claims, deduplicates them, records disagreements instead of silently overwriting, scores authority by how often a claim recurs, and drops any claim whose citation doesn't resolve verbatim.
|
|
176
|
+
- **Serve** — writes a human- and agent-readable knowledge book to `.lore/knowledge/`, and exposes a query tool (including an optional MCP server) so any agent can pull the relevant slice on demand.
|
|
177
|
+
- **Actuation loop** — every retrieval is recorded, and that usage drives a lifecycle: unused claims decay and archive, contradicted claims are retired, useful claims are reinforced. The store stays small and fresh instead of growing into a pile nobody reads.
|
|
178
|
+
|
|
179
|
+
The intelligence is in **compile**; ingest and serve are deliberately thin, so supporting another coding agent is a small adapter, not a rewrite. To be precise about the word "compile": extraction is an LLM step (the only non-deterministic part), wrapped in deterministic stages — verbatim-anchor verification, content-addressed dedup, conflict recording, and authority scoring. "Compile" means the repeatable session → claims transform, not that an LLM is absent.
|
|
180
|
+
|
|
181
|
+
## How it differs
|
|
182
|
+
|
|
183
|
+
- **vs. hosted memory (Letta, mem0)** — their store lives in someone else's cloud and you can't `git log` it; `crewlore`'s lives in your repo as plaintext.
|
|
184
|
+
- **vs. per-IDE memory (Cursor rules, Claude memory, Continue, Cody)** — tied to one developer, one IDE; `crewlore` is a *team* artifact, committed and reviewed like code.
|
|
185
|
+
- **vs. hand-curated `CLAUDE.md` / `.cursorrules`** — humans write those by hand and they go stale; `crewlore` compiles + reinforces from real sessions and retires what stops being used.
|
|
186
|
+
- **vs. RAG over a vector DB** — RAG retrieves *document chunks*; `crewlore` compiles atomic, citable *claims* with verbatim anchors, so a human or agent can verify the cited source in seconds. (Retrieval today is deterministic lexical overlap, not embeddings — simpler and dependency-free; semantic ranking is on the roadmap.)
|
|
187
|
+
|
|
188
|
+
## Why this exists
|
|
189
|
+
|
|
190
|
+
Knowledge discovered inside an agent session is private by default and lost by default. It lives in one developer's transcript, so the next engineer — and every future agent run — re-reads the same files, re-learns the same gotcha, and re-makes a decision the team already made. There's no shared layer that both humans and agents read from, so decisions drift and bugs resurface.
|
|
191
|
+
|
|
192
|
+
`crewlore` makes that knowledge a first-class, versioned artifact in the place your team already trusts: your git repo.
|
|
193
|
+
|
|
194
|
+
**What it is:** a compiler that turns sessions into accurate, deduplicated, conflict-aware, provenance-carrying team knowledge, served back to any agent.
|
|
195
|
+
|
|
196
|
+
**What it isn't:** a hosted service, a vector database, or a personal-memory layer for a single IDE. There's no account, no cloud, and no proprietary store — the compiled knowledge is plaintext you own.
|
|
197
|
+
|
|
198
|
+
## Your data stays yours
|
|
199
|
+
|
|
200
|
+
- **Local-first.** Capture, compile, and serve all run on infrastructure you control. Point the compiler at your own model provider or a local OpenAI-compatible model (Ollama, LM Studio, vLLM) via `provider: local` — nothing routes through any `crewlore`-operated service, because there is none.
|
|
201
|
+
- **Plaintext, in your repo.** The knowledge layer is human-readable Markdown and JSONL under `.lore/`, versioned by git. `git log .lore/` is your audit trail.
|
|
202
|
+
- **Secrets never travel.** Scrubbing — of both message content and tool-call arguments — happens at ingest, before storage or any model call. It's a high-precision pattern set (a floor, not a DLP guarantee; see [`docs/scrub.md`](docs/scrub.md)), and raw session captures are git-ignored by default regardless.
|
|
203
|
+
|
|
204
|
+
## CLI
|
|
205
|
+
|
|
206
|
+
| Command | What it does |
|
|
207
|
+
|---|---|
|
|
208
|
+
| `lore init` | Create the `.lore/` layout in your repo. |
|
|
209
|
+
| `lore watch` | Automatically ingest → compile → prune on an interval (`--once` for cron/CI). |
|
|
210
|
+
| `lore compile` | Run a single ingest-and-compile pass manually. |
|
|
211
|
+
| `lore query "<task>"` | Retrieve the claims most relevant to a task (records usage). |
|
|
212
|
+
| `lore status` | Show claim/conflict counts and how much of the layer is actually being used. |
|
|
213
|
+
| `lore serve --mcp` | Start an MCP server exposing query-time retrieval to any MCP-speaking agent (Claude Desktop, Cursor, …). Requires `pip install 'crewlore[serve]'`. See [`docs/mcp.md`](docs/mcp.md) for wiring snippets. |
|
|
214
|
+
|
|
215
|
+
## Configuration
|
|
216
|
+
|
|
217
|
+
`.lore/config.yaml`:
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
model:
|
|
221
|
+
provider: anthropic # anthropic | openai | local
|
|
222
|
+
name: claude-sonnet-4-6
|
|
223
|
+
# For provider: local — point at any OpenAI-compatible endpoint you run:
|
|
224
|
+
# base_url: http://localhost:11434/v1 # e.g. Ollama, LM Studio, vLLM
|
|
225
|
+
capture:
|
|
226
|
+
transcripts: ~/.claude/projects
|
|
227
|
+
compile:
|
|
228
|
+
cadence: auto # `lore watch` interval below
|
|
229
|
+
watch_interval_seconds: 300
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Bring your own key (`ANTHROPIC_API_KEY` / `OPENAI_API_KEY`); `crewlore` never ships keys anywhere. The default Anthropic provider works out of the box. For OpenAI or a local OpenAI-compatible model, add the SDK: `pipx inject crewlore openai` (or `pip install 'crewlore[openai]'`). With `provider: local` nothing leaves your machine at all — the compile call hits your own endpoint.
|
|
233
|
+
|
|
234
|
+
## Roadmap & limitations
|
|
235
|
+
|
|
236
|
+
> [!NOTE]
|
|
237
|
+
> **Status: alpha.** The core is stable and tested end to end. The on-disk schema may change before 1.0 — and because everything is plaintext and git-versioned, breaking format changes will ship with migrations.
|
|
238
|
+
|
|
239
|
+
- **Stable today:** capture, secret scrubbing, the compile pipeline, retrieval, the actuation loop, and the `.lore/` plaintext format.
|
|
240
|
+
- **In flight:** cross-session conflict alignment — real disagreements are surfaced today, but reliably aligning claims about the same question across independently-compiled sessions is an active area of work.
|
|
241
|
+
- **Planned:** an explicit human approve-before-serve gate (secret scrubbing is already automated), more capture adapters beyond Claude Code, and a real-time capture hook.
|
|
242
|
+
|
|
243
|
+
## Contributing
|
|
244
|
+
|
|
245
|
+
Issues, discussions, and PRs welcome. New here? Start a [discussion](https://github.com/srijansk/crewlore/discussions) — adding a capture adapter for another coding agent is the most valuable first contribution and is intentionally small. See [CONTRIBUTING.md](CONTRIBUTING.md) for local setup and the dev loop.
|
|
246
|
+
|
|
247
|
+
Tests are fully deterministic — no real API calls during `pytest`.
|
|
248
|
+
|
|
249
|
+
## License
|
|
250
|
+
|
|
251
|
+
MIT — see [LICENSE](LICENSE).
|