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 skill-author hardening
(learning-loop supersedes it in Phase 2b). 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.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-23description: 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 (skill-author hardening, until the learning-loop skill lands) 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 skill-author hardening23 (learning-loop supersedes it in Phase 2b). For authoring mechanics and the24 quality bar, use skill-author.2526## Key directives2728- Delegation posture: **embed** — the mining workflow lives here; it consumes29 the engine tools at scripts/engine/ (observations.py, verify_citations.py,30 placement.py) and the registry at learnings/SOURCES.md.31- **Spend only on approval.** <!-- id: spend-gated-registry --> Discovery32 (filing candidate rows with a one-line why) is autonomous; survey and deep33 passes run only on rows the human approved or repos the user named directly.34- **Every citation must grep.** <!-- id: citation-must-grep --> External35 observations carry source (repo@short-sha path#lines) and a verbatim quote;36 run the citation verifier before committing — a citation that fails is a37 discarded candidate, never a "close enough".38- **Observations, never skill edits.** <!-- id: observations-not-edits -->39 Mining output lands in learnings/observations/ and the registry. Skill40 content changes go through the absorb pipeline (Phase 2b) with its human41 merge gate — even for obviously-right findings.42- **Generic distills, specific doesn't.** <!-- id: generic-vs-specific -->43 Transferable patterns (idioms, orderings, workarounds, config shapes, how44 large apps are structured) become observations; project-local choices45 (names, ports, one-off tunings) are noise — drop them.46- **License gates vendoring.** <!-- id: permissive-license-only --> Check the47 repo license during survey. Pointer-first always (cite repo + path + commit);48 vendor a snippet only if short and adapted or materially modified, only from49 Apache/BSD/MIT (attribution header + upstream link + commit), never GPL into50 the plugin. Vendored files enter status unverified.51- **Code only.** <!-- id: code-only-no-history --> No issue-tracker crawling;52 commit-history mining (reverts, fix-chains) is considered-and-deferred53 (spec §6a.2) — do not re-litigate it mid-run.5455## Quick start5657Single-repo run, end to end (repo already approved in learnings/SOURCES.md):5859```bash60# 1. pin a clone (shallow is fine — the recorded SHA is the clone's HEAD)61git clone --depth 1 https://github.com/ros2/examples .robium/mining/examples62git -C .robium/mining/examples rev-parse --short=7 HEAD # record this SHA6364# 2. survey: map the tree, check LICENSE, inventory candidate areas →65# write .robium/mining/examples-survey.md proposing which areas earn deep reads6667# 3. deep pass (approved areas only): read, triage generic-vs-specific,68# place each candidate:69python3 scripts/engine/placement.py --text "composition via NodeOptions idiom"7071# 4. draft observations in learnings/observations/<skill>.md72# (origin: external, source: repo@sha path#lines, quote: verbatim)7374# 5. verify — both must PASS before commit:75python3 scripts/engine/observations.py --check learnings/observations/*.md76python3 scripts/engine/verify_citations.py --repos .robium/mining learnings/observations/*.md7778# 6. update the SOURCES.md row: status → distilled, add the crawl record:79# crawled: YYYY-MM-DD @ <sha> → fed: <obs ids>80```8182Flip the row to exploring when the survey starts; survey report stays in83.robium/mining/ (gitignored) as the audit trail.8485## Decision guidance8687**Run type.**8889| Situation | Run |90|---|---|91| 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) |92| 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 |93| 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 |9495Every comparative run also diffs against **our own catalog and learnings** —96where the ecosystem contradicts a skill, route it as wrong-guidance or97better-method, not as a silent overwrite.9899**Evidence bar by source authority** (spec §6a.4):100101| Source | Bar |102|---|---|103| 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 |104| Community repos, same pattern in ≥2 independent reputable ones | ready via convergence (a comparative common-split satisfies this by construction) |105| Single community repo | tentative — stays until a second witness or a robium trial |106| Extracted example files | status unverified regardless of source; promoted only by a robium trial or the deep-verify lane (Phase 3) |107108**Signal mapping for mined findings:** new transferable pattern →109better-method; confirms existing skill content → verified; contradicts skill110content → wrong-guidance; domain no skill owns → no-skill-fired (route to the111new-skills observations file).112113**Conflicts — record both, field-tested leads.** <!-- id: field-tested-leads -->114When mined guidance contradicts session-verified knowledge, the observation115carries both with provenance: our field-tested guidance leads, the official116idiom is noted alongside with why it bit us, and the divergence is flagged117for re-verification (upstream may have fixed the original reason).118119**New-skill path** (spec §6a.6): when mining surfaces a domain no skill owns,120file a proposal in the new-skills observations file — overlap analysis (run121the placement tool over the finding set), trigger-surface sketch, evidence122inventory. The human approves the *concept* before any authoring starts;123authoring then follows skill-author. Two gates, because new skills change124catalog shape.125126## Platform gotchas127128- Shallow clones (`--depth 1`) satisfy citation verification for the HEAD129 commit only. For a re-crawl diff, fetch the recorded SHA first:130 `git -C <clone> fetch --depth 1 origin <sha>`.131- Big repos (navigation2, IsaacLab): use a blobless clone to survey cheaply —132 `git clone --filter=blob:none <url>` — blobs download lazily on read.133- Prefer git clones over the GitHub API for reading (no rate-limit surprises;134 the clone is also what the citation verifier needs).135- Licenses live in LICENSE/LICENSE.md at the repo root but subdirectories can136 carry their own (vendored third-party dirs) — check the directory you are137 actually citing from.138139## Customization140141- Comparison sets are defined in the registry: list the member repos in one142 row's Notes (or a dedicated subsection) and mine them in a single run.143- User tier (Phase 4 preview): the same flow with a private registry at144 .robium/sources.md, observations in the user's repo, and overlay skills as145 the absorb destination — mined-from-private content gets an extra provenance146 review before any upstream contribution.147148## References149150- Registry: learnings/SOURCES.md — statuses, crawl records, discovery inbox.151- Observations contract: the README in learnings/observations/ (schema, ready152 bar, external-entry fields).153- Engine tools (repo root): scripts/engine/observations.py (lint),154 scripts/engine/verify_citations.py (citation check),155 scripts/engine/placement.py (target/overlap report).156- Pattern-recognition heuristics: the skill-author skill's mining-guide157 reference (what makes a pattern worth distilling) — still the judgment core.158- Spec: docs/superpowers/specs/2026-08-01-learning-engine-design.md §6a.159160## Changelog161162- 0.1.0 (2026-08-02): initial skill — registry-driven survey→deep and163 comparative runs, extraction contract, source-authority evidence bar,164 conflict policy, new-skill proposal path (learning-engine Phase 2a, spec §6a).