learn-from-projects

Generated source view for the actual executable productivity/learn-from-projects skill. The durable routing article is Agent Operations Skills. Source: skills/productivity/learn-from-projects/SKILL.md

Runtime Source

Field Value
Category productivity
Origin personal
Slug learn-from-projects
Source slug learn-from-projects
Family Agent Operations Skills
Source skills/productivity/learn-from-projects/SKILL.md

Bundled Resources

No bundled resource files.

Description

Mine recent agent transcripts across all of Kevin's projects into candidate wiki learnings behind a codify gate. Use when Kevin says "harvest learnings", "what have I learned" or "mine my sessions", or when the cross-project automation runs.

Skill Source

---
name: learn-from-projects
description: >-
  Mine recent agent transcripts across all of Kevin's projects into candidate wiki learnings
  behind a codify gate. Use when Kevin says "harvest learnings", "what have I learned" or "mine my
  sessions", or when the cross-project automation runs.
origin: personal
source_slug: learn-from-projects
---

# learn-from-projects

The brain must compound from **every** project Kevin works in, not just the wiki. Conversations
live in provider stores including `~/.codex/sessions/`, `~/.codex/archived_sessions/`,
`~/.cursor/projects/*/agent-transcripts/`, and `~/.claude/projects/`. Index them in place;
do not duplicate their bytes into the repository. Read the selected transcripts, then write
approved changes into existing owner pages. Procedural-memory
principle: **session signals are proposals; codified owners are law** — never silently rewrite
the brain's rules from transcript noise.

## Pipeline

```
index → select → read → candidates → owner page (kb) → Kevin approves → writeback → proof
```

## Point a conversation at the wiki

Use either entry point; both end in the same evidence and writeback gates.

### From an old project task

Finish the task first, copy its Codex task URL or native UUID, then open a
Kevin-Wiki task and say:

```text
Use /learn-from-projects to absorb completed task <task-url-or-id>.
Read every completed turn and the tool outputs, artifacts, repository diff,
and tests that support a learning. Correlate it with its project and current
wiki owners. Propose the smallest durable owner changes; do not create one page
for the conversation and do not treat the task title or summary as evidence.
```

The wiki task should use the Codex task catalog to resolve a human title or
project, show matching native task IDs when ambiguous, and page through the
selected task with outputs included. If the matching local JSONL exists, read
it at the path `sessions list` prints. If it is only visible through the app
catalog, materialize an authorized private task capture first; catalog metadata
alone is discovery, not durable evidence. Never read the currently active turn
as complete.

### From the wiki by project or month

Ask for a project/date cohort instead of opening conversations manually:

```text
Use /learn-from-projects to inventory every completed Codex, Cursor, and Claude
task for <project> from <start-date> through <end-date>. Reconcile the app task
catalog with local provider stores and the repository history. Show coverage
gaps, then absorb the cohort in bounded batches with per-task provenance.
```

Group parent tasks, forks, and subagent transcripts without erasing their
separate source identities. Reconcile claimed work against the actual checkout,
commits, PRs, generated artifacts, and test receipts. Project-level extraction
must consider current state, decisions and rationale, reusable procedures,
preferences, failures and corrections, unresolved work, and cross-project
patterns. The result updates existing project pages, decisions, workflows,
skills, design rules, tools, or postmortems; it does not become a transcript
archive in the public wiki.

1. **Index** — run `npm run brain -- sessions index`. This inventories every local Codex,
   Cursor, and Claude evidence file with provider, session ID, workspace hint, byte count,
   modification time, fingerprint, trace kind, and parent lineage under
   `.brain/sessions/index.json`. Top-level `conversation` records are counted separately from
   Claude `subagent` and `workflow` traces. It does not copy the provider stores. Use
   `--path <path> --provider <provider>` to add an exported task or another authorized transcript
   root to the standard provider index; existing local coverage remains.
2. **Select** — run `npm run brain -- sessions list --limit 50` and choose a parent conversation
   by agent-session ID, provider, project/workspace, or date. The default list excludes delegated
   traces so that subagents do not masquerade as separate human tasks. Add `--include-traces` to
   inspect the selected corpus's delegation or `--kind conversation|subagent|workflow` to isolate
   one trace class. `npm run harvest:learnings -- --days N` remains an optional ranked project
   digest, not the source of truth.
3. **Read** — each row of `sessions list` ends with the transcript path. Read the completed
   turns there, including tool output when a learning depends on it. Titles and previews are
   discovery metadata, not evidence. Do not treat a running task as complete. Parent and
   delegated traces keep separate session IDs; cite each one you use.
4. **Extract** — for each selected session, mine for **durable, reusable** signal only:
   - **Patterns / conventions** that recurred (→ a concept page or a rule)
   - **Decisions** with rationale (→ `wiki/decisions/`)
   - **Skill gaps** — a workflow done by hand 2+ times across sessions/projects (→ a new skill;
     this is the no-one-off-work rule applied across projects)
   - **Tool/pattern discoveries** worth a tool page or SKILL-RESOLVER ranking change
   - **Postmortems** — a bug + fix + lesson (→ `wiki/postmortems/`)
   - **Project state** — what shipped, what broke, what is next (→ the project page)

   Ignore one-off task chatter and secrets.
5. **Find the owner** — `kb <words>` for each candidate and `kb get <name>` for the page. A
   missing owner is a filing decision for [[RESOLVER]], not a reason to create an inbox page.
6. **Codify** — show Kevin the table of candidate, owner page and exact change; apply what he
   approves. Cite each change with `[Source: <provider> session <id>, <date>]` and add a dated
   Timeline line. Ask before publicizing private material or crossing an external or
   destructive authority boundary.
7. **Prove** — `kb <words a future agent would type>` ranks the changed page in the top 3,
   `npm run build-index` passes, and the affected skill or workflow doctors pass.

## Rules

- **Test before bulk** — read 2-3 sessions, check the owner changes with Kevin, then widen.
- **Cross-project > single-project** — a pattern seen in 2+ projects is higher-signal than one session.
- **No secrets** — never copy keys/tokens/private data into candidates (env var *names* only).
- **Dedup against the brain** — `kb` each candidate; update the existing owner instead of creating a transcript-shaped page.
- **Kevin approves** — no session signal changes canonical behavior until Kevin approves its row.
- **Authority is preserved** — approval of a row does not authorize publication, external messages, destructive actions, credentials, spend, or production changes.

## Related

- `scripts/harvest-learnings.ts` — the collection half (`npm run harvest:learnings`)
- `automations/cross-project-learning.md` — runs this on a cadence
- `skill-audit` skill — the Cursor-only, skill-focused predecessor (this generalizes it to all projects + all knowledge types)
- `signal-detector.mdc` — ambient per-message capture (this is the batched, cross-project version)
- `wiki/concepts/brain-agent-loop.md` — the read/write compounding loop this feeds

Timeline

1 page links here