Skip to content

Filtered rosetta export (per-section slice) for references consumers #250

Open

Description

@Amm0Bot

Enhancement: filtered rosetta export (per-section / per-path-slice)

Consumer: tikoci/routeros-skills#38 (building skill references/ from rosetta export output).

Today (verified on this checkout)

  • rosetta export <dir> always emits the full DB: 34 MB / 3233 files from a 409 MB DB (8 top-level TSVs + cli-reference/ with 3 trees + source/).
  • ExportOptions is {force?, confirmForeign?} only (src/export.ts:699-709); the CLI parses only --force (src/mcp.ts:284-291). No section/skill/path/tree filter exists.
  • Consumers must slice client-side: pick one manual_version, filter commands.tsv by path prefix, join cliref entries/fields via entry_source_path.

That works (routeros-skills is proceeding with consumer-side slicing), but every consumer re-downloads and re-slices the full export.

Ask

  • A filter flag on rosetta export, e.g. --prefix /container (repeatable) and/or --tree 7.26, emitting only matching rows + the source files they reference, with the manifest recording the filter.
  • Optionally: export the skills / skill_references tables (today MCP-only via listSkills/getSkill/getSkillReference) so consumers can map skills to paths without authoring the mapping from scratch.

Non-goals

  • Changing the default full-export behavior or the format_version = 2 contract.
  • Blocking routeros-skills#38: this is a follow-up optimization, filed openly so the slicing logic is not mistaken for a shadow export. Consumer-side slicing is sufficient for the pilot.

Grounding: local rosetta export run, release_tag v0.12.0-next.123, schema_version 12, cliref trees 7.24/7.25/7.26.

Activity

  1. mobileskyfi commented on Nov 2, 2026

    @mobileskyfi
    Contributor

    Reviewed this alongside tikoci/routeros-skills#38 and its active local draft. The split is sound: a consumer-owned, pinned slice now; a generic filtered export later. I posted concrete consumer correctness findings at tikoci/routeros-skills#38 (comment).

    Suggested contract clarifications before promoting this to implementation:

    • Define --tree as a CLI-reference manual-tree selector only. It must not imply that commands.tsv or prose becomes version-scoped. The reported export combines inspect 7.24.5 with default manual tree 7.26; preserve those separate labels. Export remains DB-only, so filtering neither refreshes upstream content nor avoids downloading the DB for a local exporter. It reduces emitted/vendored data; remotely downloadable slices would be a separate distribution feature.
    • Define prefix matching and dependency closure. Use exact menu-or-descendant matching (path === prefix || path.startsWith(prefix + '/')), with explicit normalization for slashless manual source_path versus slash-prefixed inspect paths. Select manual-only entries from their source paths too; do not require an inspect match. Keep source paths and alias crosswalks distinct. Specify whether linked prose pages/sections and shared standard.tsv/landing-page material are included, and what happens to unrelated top-level datasets.
    • Correct the proposed join key: entry_source_path is a readable coordinate, not unique identity. Join fields/flags to entries by (manual_version, entry_id) and field links by occurrence ID; retain repeated hardware variants, conditions, syscap, and optional crosswalks. Source files should remain byte-exact, even when a retained page includes additional entries outside the filter.
    • Make a partial export unmistakable and internally consistent. Record scope/filter plus parent provenance; hashes/counts must describe emitted files. Distinguish a parent whole-tree digest from a digest of filtered rows. Reject unknown requested trees rather than silently falling back; disclose empty selections. Leaving the full-export default unchanged is good, but retaining format v2 for subsets should be an explicit compatibility decision, with tests proving existing consumers cannot mistake a slice for a complete tree. Useful fixtures: /container versus /container-other, duplicate entry paths, manual-only entries, cross-tree IDs, and repeat-run determinism.
    • Keep optional skills export separate from the grounding input. skills/skill_references are community guidance and do not themselves provide an authoritative skill→menu mapping. Rosetta already imports routeros-skills references/*.md; using that content to regenerate its own references would create circular evidence. The pilot’s explicit menu mapping is the right ownership boundary.

    No objection to proceeding with #38 without this feature. The urgent fixes are in the consumer’s joins, version/provenance retention, and checker semantics, rather than adding filter flags first.

  2. Amm0Bot commented on Nov 2, 2026

    @Amm0Bot
    ContributorAuthor

    Accepted — all five bullets stand as acceptance criteria for this feature whenever it gets implemented. Two notes from the consumer side:

    • The (manual_version, entry_id) join correction and manual-only retention are already implemented in the routeros-skills#38 pilot (its builder was making exactly the entry_source_path mistake), so a future filtered export and the consumer agree on occurrence identity.
    • Conceded on skills-table export as a grounding input: it would be circular given rosetta already imports routeros-skills references/*.md. Dropping that half of this ask — the pilot's explicit menu mapping is the ownership boundary. If a skills export ever exists, it should be labeled community guidance, never grounding input.

    No action needed here for #38: the pilot proceeds on consumer-side slicing. Full consumer-side response: tikoci/routeros-skills#38 (comment)

  3. mobileskyfi commented on Nov 20, 2026

    @mobileskyfi
    Contributor

    Heads-up from tikoci/routeros-skills: this issue's consumer, tikoci/routeros-skills#38 (building skill references/ from a sliced export), was closed as not planned on 2026-11-20. routeros-skills will link manual.mikrotik.com for references instead, and won't vendor export slices. A filtered export may still be useful on its own merits, but routeros-skills no longer needs it. Related: a thin routeros-tikoci-rosetta skill (tikoci/routeros-skills#69) will point agents at export and MCP as they are today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions