Mining — learning from external examples
Working external repos encode more accumulated judgment than our own sessions
can generate. This skill turns approved example repos into evidence-cited
observations in the learnings observations tier, sharing one pipeline with
session learning (spec: docs/superpowers/specs/2026-08-01-learning-engine-design.md §6a).
When to use this skill
- A repo in learnings/SOURCES.md is approved for exploration (status flip or
the user says "mine repo X" — a direct naming is itself approval).
- A comparative question needs settling across sibling repos ("how do TB3 and
TB4 sims differ on bringup?") — run a comparative set.
- A distilled repo drifted (status recheck, or a major upstream release) — re-crawl.
- Candidate repos need triage into the registry (discovery — filing rows is
autonomous; mining them is not).
- For absorbing robium's own session learnings, use the learning-loop skill.
For authoring mechanics and the quality bar, use skill-author.
Key directives
- Delegation posture: embed — the mining workflow lives here; it consumes
the engine tools at scripts/engine/ (observations.py, verify_citations.py,
placement.py) and the registry at learnings/SOURCES.md.
- Spend only on approval. Discovery
(filing candidate rows with a one-line why) is autonomous; survey and deep
passes run only on rows the human approved or repos the user named directly.
- Every citation must grep. External
observations carry source (repo@short-sha path#lines) and a verbatim quote;
run the citation verifier before committing — a citation that fails is a
discarded candidate, never a "close enough".
- Observations, never skill edits.
Mining output lands in learnings/observations/ and the registry. Skill
content changes go through the absorb pipeline (Phase 2b) with its human
merge gate — even for obviously-right findings.
- Generic distills, specific doesn't.
Transferable patterns (idioms, orderings, workarounds, config shapes, how
large apps are structured) become observations; project-local choices
(names, ports, one-off tunings) are noise — drop them.
- License gates vendoring. Check the
repo license during survey. Pointer-first always (cite repo + path + commit);
vendor a snippet only if short and adapted or materially modified, only from
Apache/BSD/MIT (attribution header + upstream link + commit), never GPL into
the plugin. Vendored files enter status unverified.
- Code only. No issue-tracker crawling;
commit-history mining (reverts, fix-chains) is considered-and-deferred
(spec §6a.2) — do not re-litigate it mid-run.
Quick start
Single-repo run, end to end (repo already approved in learnings/SOURCES.md):
# 1. pin a clone (shallow is fine — the recorded SHA is the clone's HEAD)
git clone --depth 1 https://github.com/ros2/examples .robium/mining/examples
git -C .robium/mining/examples rev-parse --short=7 HEAD # record this SHA
# 2. survey: map the tree, check LICENSE, inventory candidate areas →
# write .robium/mining/examples-survey.md proposing which areas earn deep reads
# 3. deep pass (approved areas only): read, triage generic-vs-specific,
# place each candidate:
python3 scripts/engine/placement.py --text "composition via NodeOptions idiom"
# 4. draft observations in learnings/observations/<skill>.md
# (origin: external, source: repo@sha path#lines, quote: verbatim)
# 5. verify — both must PASS before commit:
python3 scripts/engine/observations.py --check learnings/observations/*.md
python3 scripts/engine/verify_citations.py --repos .robium/mining learnings/observations/*.md
# 6. update the SOURCES.md row: status → distilled, add the crawl record:
# crawled: YYYY-MM-DD @ <sha> → fed: <obs ids>
Flip the row to exploring when the survey starts; survey report stays in
.robium/mining/ (gitignored) as the audit trail.
Decision guidance
Run type.
| Situation |
Run |
| One approved repo, unknown value |
Survey first; deep pass only on areas the survey report proposes (or pre-authorized survey+deep in the registry row) |
| Sibling repos answering the same need (e.g. TB3 sim vs TB4 sim) |
Comparative: readers fan out across all members; distill the common/divergent split — commons arrive pre-verified (convergence bar met by construction), divergences become decision-surface candidates for umbrella skills |
| Distilled repo with upstream drift |
Re-crawl: diff against the recorded SHA, re-mine only what changed, flag distillations whose source lines changed as recheck |
Every comparative run also diffs against our own catalog and learnings —
where the ecosystem contradicts a skill, route it as wrong-guidance or
better-method, not as a silent overwrite.
Evidence bar by source authority (spec §6a.4):
| Source |
Bar |
| Official/vendor repo, consistent with the tool's current docs |
ready outright — evidence line says "official" + how docs were checked (direct fetch vs search synthesis) + date; enters the 90-day staleness sweep like any dated claim |
| Community repos, same pattern in ≥2 independent reputable ones |
ready via convergence (a comparative common-split satisfies this by construction) |
| Single community repo |
tentative — stays until a second witness or a robium trial |
| Extracted example files |
status unverified regardless of source; promoted only by a robium trial or the deep-verify lane (Phase 3) |
Signal mapping for mined findings: new transferable pattern →
better-method; confirms existing skill content → verified; contradicts skill
content → wrong-guidance; domain no skill owns → no-skill-fired (route to the
new-skills observations file).
Conflicts — record both, field-tested leads.
When mined guidance contradicts session-verified knowledge, the observation
carries both with provenance: our field-tested guidance leads, the official
idiom is noted alongside with why it bit us, and the divergence is flagged
for re-verification (upstream may have fixed the original reason).
New-skill path (spec §6a.6): when mining surfaces a domain no skill owns,
file a proposal in the new-skills observations file — overlap analysis (run
the placement tool over the finding set), trigger-surface sketch, evidence
inventory. The human approves the concept before any authoring starts;
authoring then follows skill-author. Two gates, because new skills change
catalog shape.
Platform gotchas
- Shallow clones (
--depth 1) satisfy citation verification for the HEAD
commit only. For a re-crawl diff, fetch the recorded SHA first:
git -C <clone> fetch --depth 1 origin <sha>.
- Big repos (navigation2, IsaacLab): use a blobless clone to survey cheaply —
git clone --filter=blob:none <url> — blobs download lazily on read.
- Prefer git clones over the GitHub API for reading (no rate-limit surprises;
the clone is also what the citation verifier needs).
- Licenses live in LICENSE/LICENSE.md at the repo root but subdirectories can
carry their own (vendored third-party dirs) — check the directory you are
actually citing from.
Customization
- Comparison sets are defined in the registry: list the member repos in one
row's Notes (or a dedicated subsection) and mine them in a single run.
- User tier (Phase 4 preview): the same flow with a private registry at
.robium/sources.md, observations in the user's repo, and overlay skills as
the absorb destination — mined-from-private content gets an extra provenance
review before any upstream contribution.
References
- Registry: learnings/SOURCES.md — statuses, crawl records, discovery inbox.
- Observations contract: the README in learnings/observations/ (schema, ready
bar, external-entry fields).
- Engine tools (repo root): scripts/engine/observations.py (lint),
scripts/engine/verify_citations.py (citation check),
scripts/engine/placement.py (target/overlap report).
- Pattern-recognition heuristics: the skill-author skill's mining-guide
reference (what makes a pattern worth distilling) — still the judgment core.
- Spec: docs/superpowers/specs/2026-08-01-learning-engine-design.md §6a.
Changelog
- 0.1.1 (2026-08-02): pointers updated — learning-loop landed; hardening
references retargeted.
- 0.1.0 (2026-08-02): initial skill — registry-driven survey→deep and
comparative runs, extraction contract, source-authority evidence bar,
conflict policy, new-skill proposal path (learning-engine Phase 2a, spec §6a).
1---2name: mining-33description: Registry-driven mining of external example repos — the learning engine's second experience source. Surveys, deep-reads, and comparatively analyzes approved repos (vendor demos, framework samples, community robot apps) into evidence-cited observations (origin: external) that harden robium skills or propose new ones; maintains crawl records for drift re-checks. Use when: 'mine repo X', 'survey this repo', 'run a comparative run', 'learn from external repos', 'distill patterns from a repo', 'crawl SOURCES.md', triaging or re-crawling entries in learnings/SOURCES.md. Discovery is autonomous; mining spends only on human-approved registry entries. Output is observations plus registry updates — never direct skill edits. Not for: absorbing robium's own session learnings (learning-loop) or fresh skill authoring mechanics (skill-author).4---56# Mining — learning from external examples78Working external repos encode more accumulated judgment than our own sessions9can generate. This skill turns approved example repos into evidence-cited10observations in the learnings observations tier, sharing one pipeline with11session learning (spec: docs/superpowers/specs/2026-08-01-learning-engine-design.md §6a).1213## When to use this skill1415- A repo in learnings/SOURCES.md is approved for exploration (status flip or16 the user says "mine repo X" — a direct naming is itself approval).17- A comparative question needs settling across sibling repos ("how do TB3 and18 TB4 sims differ on bringup?") — run a comparative set.19- A distilled repo drifted (status recheck, or a major upstream release) — re-crawl.20- Candidate repos need triage into the registry (discovery — filing rows is21 autonomous; mining them is not).22- For absorbing robium's own session learnings, use the learning-loop skill.23 For authoring mechanics and the quality bar, use skill-author.2425## Key directives2627- Delegation posture: **embed** — the mining workflow lives here; it consumes28 the engine tools at scripts/engine/ (observations.py, verify_citations.py,29 placement.py) and the registry at learnings/SOURCES.md.30- **Spend only on approval.** <!-- id: spend-gated-registry --> Discovery31 (filing candidate rows with a one-line why) is autonomous; survey and deep32 passes run only on rows the human approved or repos the user named directly.33- **Every citation must grep.** <!-- id: citation-must-grep --> External34 observations carry source (repo@short-sha path#lines) and a verbatim quote;35 run the citation verifier before committing — a citation that fails is a36 discarded candidate, never a "close enough".37- **Observations, never skill edits.** <!-- id: observations-not-edits -->38 Mining output lands in learnings/observations/ and the registry. Skill39 content changes go through the absorb pipeline (Phase 2b) with its human40 merge gate — even for obviously-right findings.41- **Generic distills, specific doesn't.** <!-- id: generic-vs-specific -->42 Transferable patterns (idioms, orderings, workarounds, config shapes, how43 large apps are structured) become observations; project-local choices44 (names, ports, one-off tunings) are noise — drop them.45- **License gates vendoring.** <!-- id: permissive-license-only --> Check the46 repo license during survey. Pointer-first always (cite repo + path + commit);47 vendor a snippet only if short and adapted or materially modified, only from48 Apache/BSD/MIT (attribution header + upstream link + commit), never GPL into49 the plugin. Vendored files enter status unverified.50- **Code only.** <!-- id: code-only-no-history --> No issue-tracker crawling;51 commit-history mining (reverts, fix-chains) is considered-and-deferred52 (spec §6a.2) — do not re-litigate it mid-run.5354## Quick start5556Single-repo run, end to end (repo already approved in learnings/SOURCES.md):5758```bash59# 1. pin a clone (shallow is fine — the recorded SHA is the clone's HEAD)60git clone --depth 1 https://github.com/ros2/examples .robium/mining/examples61git -C .robium/mining/examples rev-parse --short=7 HEAD # record this SHA6263# 2. survey: map the tree, check LICENSE, inventory candidate areas →64# write .robium/mining/examples-survey.md proposing which areas earn deep reads6566# 3. deep pass (approved areas only): read, triage generic-vs-specific,67# place each candidate:68python3 scripts/engine/placement.py --text "composition via NodeOptions idiom"6970# 4. draft observations in learnings/observations/<skill>.md71# (origin: external, source: repo@sha path#lines, quote: verbatim)7273# 5. verify — both must PASS before commit:74python3 scripts/engine/observations.py --check learnings/observations/*.md75python3 scripts/engine/verify_citations.py --repos .robium/mining learnings/observations/*.md7677# 6. update the SOURCES.md row: status → distilled, add the crawl record:78# crawled: YYYY-MM-DD @ <sha> → fed: <obs ids>79```8081Flip the row to exploring when the survey starts; survey report stays in82.robium/mining/ (gitignored) as the audit trail.8384## Decision guidance8586**Run type.**8788| Situation | Run |89|---|---|90| One approved repo, unknown value | Survey first; deep pass only on areas the survey report proposes (or pre-authorized survey+deep in the registry row) |91| Sibling repos answering the same need (e.g. TB3 sim vs TB4 sim) | Comparative: readers fan out across all members; distill the **common/divergent split** — commons arrive pre-verified (convergence bar met by construction), divergences become decision-surface candidates for umbrella skills |92| Distilled repo with upstream drift | Re-crawl: diff against the recorded SHA, re-mine only what changed, flag distillations whose source lines changed as recheck |9394Every comparative run also diffs against **our own catalog and learnings** —95where the ecosystem contradicts a skill, route it as wrong-guidance or96better-method, not as a silent overwrite.9798**Evidence bar by source authority** (spec §6a.4):99100| Source | Bar |101|---|---|102| Official/vendor repo, consistent with the tool's current docs | ready outright — evidence line says "official" + how docs were checked (direct fetch vs search synthesis) + date; enters the 90-day staleness sweep like any dated claim |103| Community repos, same pattern in ≥2 independent reputable ones | ready via convergence (a comparative common-split satisfies this by construction) |104| Single community repo | tentative — stays until a second witness or a robium trial |105| Extracted example files | status unverified regardless of source; promoted only by a robium trial or the deep-verify lane (Phase 3) |106107**Signal mapping for mined findings:** new transferable pattern →108better-method; confirms existing skill content → verified; contradicts skill109content → wrong-guidance; domain no skill owns → no-skill-fired (route to the110new-skills observations file).111112**Conflicts — record both, field-tested leads.** <!-- id: field-tested-leads -->113When mined guidance contradicts session-verified knowledge, the observation114carries both with provenance: our field-tested guidance leads, the official115idiom is noted alongside with why it bit us, and the divergence is flagged116for re-verification (upstream may have fixed the original reason).117118**New-skill path** (spec §6a.6): when mining surfaces a domain no skill owns,119file a proposal in the new-skills observations file — overlap analysis (run120the placement tool over the finding set), trigger-surface sketch, evidence121inventory. The human approves the *concept* before any authoring starts;122authoring then follows skill-author. Two gates, because new skills change123catalog shape.124125## Platform gotchas126127- Shallow clones (`--depth 1`) satisfy citation verification for the HEAD128 commit only. For a re-crawl diff, fetch the recorded SHA first:129 `git -C <clone> fetch --depth 1 origin <sha>`.130- Big repos (navigation2, IsaacLab): use a blobless clone to survey cheaply —131 `git clone --filter=blob:none <url>` — blobs download lazily on read.132- Prefer git clones over the GitHub API for reading (no rate-limit surprises;133 the clone is also what the citation verifier needs).134- Licenses live in LICENSE/LICENSE.md at the repo root but subdirectories can135 carry their own (vendored third-party dirs) — check the directory you are136 actually citing from.137138## Customization139140- Comparison sets are defined in the registry: list the member repos in one141 row's Notes (or a dedicated subsection) and mine them in a single run.142- User tier (Phase 4 preview): the same flow with a private registry at143 .robium/sources.md, observations in the user's repo, and overlay skills as144 the absorb destination — mined-from-private content gets an extra provenance145 review before any upstream contribution.146147## References148149- Registry: learnings/SOURCES.md — statuses, crawl records, discovery inbox.150- Observations contract: the README in learnings/observations/ (schema, ready151 bar, external-entry fields).152- Engine tools (repo root): scripts/engine/observations.py (lint),153 scripts/engine/verify_citations.py (citation check),154 scripts/engine/placement.py (target/overlap report).155- Pattern-recognition heuristics: the skill-author skill's mining-guide156 reference (what makes a pattern worth distilling) — still the judgment core.157- Spec: docs/superpowers/specs/2026-08-01-learning-engine-design.md §6a.158159## Changelog160161- 0.1.1 (2026-08-02): pointers updated — learning-loop landed; hardening162 references retargeted.163- 0.1.0 (2026-08-02): initial skill — registry-driven survey→deep and164 comparative runs, extraction contract, source-authority evidence bar,165 conflict policy, new-skill proposal path (learning-engine Phase 2a, spec §6a).