feat: allow a configured backend to serve learnings retrieval and capture instead of <root>/solutions/

Open
#1,505 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
36/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript, yaml

Research direction

Start with configuration.md, docs_root, learnings-researcher.md, ce-compound, and ce-compound-refresh to trace how configuration, retrieval, and capture currently work. Check the skills' guidance for the Discoverability Check and the existing default file behavior. Done means a configured backend can handle retrieval and capture, while an unset backend preserves today's behavior and refresh reports that lifecycle is externally owned.

Written by the indexing model from the issue text.

Description

We get a lot out of CE's learning capture, but our repo layout makes the file-based corpus hard to use.

We work out of a central planning repo. Sessions clone whichever service repo the work is in, but CE itself is invoked from the planning repo. So the learnings a session produces are about the cloned repo, while <root>/solutions/ lives in the planning repo — the corpus and the code it describes are never in the same checkout. Keeping a markdown copy in step across that boundary means it drifts, and a drifted corpus is worse than an empty one: CE retrieves a stale snapshot that reads as authoritative.

We've built a central knowledge store for this, served over MCP. It has its own review gate, retrieval, and provenance. We'd like CE to read from it and write to it rather than the docs directory — and we'd very much rather not maintain a fork to do it.

Proposal

A config entry naming a backend for learnings. Unset, behaviour is byte-identical to today; <root>/solutions/ stays the default.

learnings_backend: mcp                  # files (default) | mcp
learnings_retrieval_tool: <tool>        # called instead of grepping <root>/solutions/
learnings_capture_tool: <tool>          # called instead of writing a solution file

Declarative on purpose — configuration.md says config shouldn't carry credentials, CLI commands, or harness flags, so CE would only ever name tools the harness has already registered and authenticated. CE wouldn't configure a server or handle a credential.

Retrieval looks self-contained

If the backend returns the same distilled findings shape learnings-researcher.md already produces, ce-plan, ce-code-review, ce-ideate, and ce-optimize shouldn't need changes at all.

Capture has a real question in it, so here's our proposed answer

Rather than leave it open: when a backend is configured, the backend owns lifecycle.

ce-compound hands the learning over and stops. It doesn't run the overlap-driven update-in-place decision, because the backend is better placed to know its own corpus. ce-compound-refresh reports that lifecycle is externally owned rather than trying to classify entries it can neither enumerate nor mutate.

We're not asking you to make ce-compound-refresh work over MCP — that would be a port of the whole skill. We've implemented your five-outcome model (Keep / Update / Consolidate / Replace / Delete, plus a stale mark for "couldn't tell") in our own store, precisely because it's the right model. What we need from CE is the documented hand-off, not the mechanism.

Things we don't think need to change

  • CONCEPTS.md stays repo-local — it's shared vocabulary, not a learning.
  • The grounding-validation pass still works; it validates claims against the current tree rather than against the store.
  • The Discoverability Check's advice would presumably need to point somewhere other than <root>/solutions/ when a backend is set.

Prior art

This feels like the same move docs_root made for artifact location, applied to learnings source and sink.

Offer

We're glad to do the work if this is a shape you'd accept, and happy to split it — retrieval first, capture as a follow-up — if you'd rather review it in two pieces.

Would welcome a steer on naming, on whether MCP tool references in config are the right seam, and on whether the lifecycle hand-off above is how you'd want it drawn.

Dominant language
TypeScript
Stars
25.6k
Forks
2.1k
Avg merge
3h 57m
Merged PRs (30d)
170

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EveryInc/compound-engineering-plugin

All issues in EveryInc/compound-engineering-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.