distill-sessions
Skill0 starsChanged 4 months agoMITView on GitHub
Consolidate open draft mining session PRs into a single clean PR. Copies book entries, sessions, knowledge patterns, dead zones, and factors; deduplicates overlapping artifacts; verifies alpha statuses against BRAIN; runs bugbot iteratively; creates a consolidated PR; then closes the originals. Use when asked to "consolidate PRs", "distill sessions", "merge draft PRs", or "clean up mining PRs".
- Commits and pushes
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- alpha-miningSkill
- brain-checkSkill
- session-reviewSkill
- context-gatherSkill
- econ-reasoningSkill
- experiment-reportingSkill
- hf-serverSkill
- mining-sessionSkill
- pnl-correlationSkill
- result-analysisSkill
- signal-generationSkill
- trace-analysisSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Create directories as needed (mkdir -p).
- Distinctive: line 57
Add exclusivity rules when template variants have mutual corr > 0.85
- Very specific: line 68
Never use CANDIDATE (not a valid book status)
- Very specific: line 71
Update session metas: submissions count, submitted list, candidate verdict fields
- Distinctive: line 83
Update AGENTS.md "Submitted alphas" line with fresh counts.
- Distinctive: line 84
Do NOT update README (immutable superficial info only).
- Distinctive: line 93
All tests must pass. All book entries must parse without error.
- Distinctive: line 104
Create PR with structured body (follow PR #67 format):
- Distinctive: line 120
Run bugbot review on the branch diff.
- Distinctive: line 125
Stop when no new high-severity findings remain
- Distinctive: line 133
After submitting one template variant, siblings are blocked (mutual corr 0.90-0.95)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Distill Sessions
Consolidate accumulated draft mining-session PRs into one merge-ready PR.
Phase 0: Inventory
gh pr list --state open --draftIdentify mining session PRs (branch prefixes: session/, exp/, cursor/alpha-mining-session-*).
Exclude non-session PRs (e.g. feature/, analysis scripts, infra).
For each PR, collect:
gh pr view <N> --json body,title,files --jq '{title, body, files: [.files[].path]}'Build a manifest of artifacts to merge, grouped by type:
data/book/*.mddata/sessions/*/data/knowledge/patterns/*.mddata/knowledge/dead_zones/*.mddata/factors/*.md
Phase 1: Create Branch
git checkout main && git pull origin main
git checkout -b chore/distill-draft-prs-<start_date>-<end_date>Phase 2: Copy Artifacts
For each file in the manifest:
git show origin/<branch>:<path> > <path>Create directories as needed (mkdir -p).
Conflict resolution:
- Same file appears in multiple PRs → use version from latest session date
- File already exists on main → diff branch version against main, merge new content
Phase 3: Deduplicate Knowledge
Scan new pattern files for overlap:
- Same template/mechanism family → merge into single file
- Preserve all learnings from both sources (anti-patterns, stabilizer tables, etc.)
- Add exclusivity rules when template variants have mutual corr > 0.85
Phase 4: Verify Against BRAIN
uv run python3 scripts/brain_check.py --alpha-ids <space-separated IDs of all new book entries>For each alpha, reconcile book entry with BRAIN source of truth:
- BRAIN says ACTIVE → set
status: "ACTIVE"in book entry - BRAIN says UNSUBMITTED → set
status: "PENDING" - Never use
CANDIDATE(not a valid book status)
Then propagate implications:
- Update session metas:
submissionscount,submittedlist, candidateverdictfields - Fix stale novelty claims (e.g. "field X absent from book" when it's now ACTIVE)
- Mark sibling companions as BLOCKED if their primary variant is ACTIVE (template variants with mutual corr ~0.90-0.95 are mutually exclusive)
Phase 5: Update Docs
uv run python3 scripts/parse_frontmatter.py --dir data/book --field status,grade 2>&1 | rg -o 'status=\w+' | sort | uniq -c
uv run python3 scripts/parse_frontmatter.py --dir data/book --field family 2>&1 | rg -o 'family=\w+' | sort -u | wc -lUpdate AGENTS.md "Submitted alphas" line with fresh counts.
Do NOT update README (immutable superficial info only).
Phase 6: Validate
uv run python3 -m pytest tests/ -q
uv run python3 scripts/parse_frontmatter.py --dir data/book --field status,gradeAll tests must pass. All book entries must parse without error.
Phase 7: Create PR
Stage, commit, push:
git add -A
git commit -m "chore: distill draft mining PRs <date_range>"
git push -u origin HEADCreate PR with structured body (follow PR #67 format):
- New book entries table (Alpha, Grade, Sharpe, Fitness, Self-Corr, Family, Session)
- New sessions list
- Knowledge base additions (patterns, dead zones, factors)
- Merged branches list with PR numbers
- Verification results (test count, book entry count)
Phase 8: Close Drafts
For each source PR:
gh pr close <N> --comment "Consolidated into #<new_pr_number>"Phase 9: Bugbot Loop
Run bugbot review on the branch diff. For each iteration:
- Fix all high-severity findings
- Fix medium-severity findings that are factual errors (stale claims, schema mismatches)
- Accept medium findings that are historical session documentation (accurate at session time)
- Amend commit, force-push, re-run bugbot
- Stop when no new high-severity findings remain
Known Gotchas
CANDIDATEis not a valid book status — normalize toPENDING- Session candidate schema uses
self_corr_value/self_corr_result/verdict(notself_corr) - Valid verdicts:
SUBMITTABLE,SUBMITTED,BLOCKED,BACKUP - Skill directory is
cloud-review(notsession-reviewas AGENTS.md hierarchy shows) - After submitting one template variant, siblings are blocked (mutual corr 0.90-0.95)
format_email_digest.pyreadsself_corr_valueandself_corr_resultfrom session candidates- BRAIN API is the source of truth for alpha status — always verify before setting ACTIVE
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

