[GH-ISSUE #2443] [Feature] Expose caller-selected path exclusions in the local source import CLI #815

Open
opened 2026-10-15 18:28:42 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @matbrgz on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2443

Type: Feature Domain: Reverse Engineering Status: Proposed Ecosystem: REA

Contexto

GitReverse's context selection illustrates a useful analyst choice: omit irrelevant repository paths. REA's existing local importer already accepts excludePaths, records caller-excluded provenance and prunes traversal, but import-reference-source does not expose that choice to CLI callers.

Functional reference: github.com/filiksyos/gitreverse@20864c6a05. No upstream implementation is copied; the reviewed snapshot declares no license. Extend REA's own importer.

Objetivo

Expose caller-selected exclusions in the existing import CLI, preserving its current policy precedence and explicit coverage limitations.

Escopo

  • A JSON-array CLI option selects the existing importer's Git-ignore-style path rules.
  • Validate JSON and nonempty string rules before filesystem access.
  • Retain existing default ignores, project policy and declared-secret policy. Explicit exclusion is not a secrecy heuristic.
  • Keep exclusions marked caller-excluded and do not traverse excluded subdirectories.
  • Do not execute a source file, hook, build script, remote fetch or LLM request.

Critérios de aceite

  • Owned compiled CLI fixtures verify directory pruning, wildcard rules, empty/default compatibility and exact exclusion provenance.
  • Malformed JSON and invalid rule element types fail before an import starts.
  • Project/default/secret policy behavior and source commitments remain valid.
  • Relevant CLI/importer tests, static checks and documentation checks pass.

Perguntas para decisão

Rules follow the existing importer's Git-ignore syntax; the option must describe that grammar instead of claiming literal-path matching.

Observações técnicas

Use docs/specs/reference-source/caller-exclusions/{spec.md,plan.md,tasks.md}. Reuse the existing importer and policy owner; this is an additive CLI control, not a new provider.

Originally created by @matbrgz on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2443 [![Type: Feature](https://img.shields.io/badge/type-feature-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Domain: Reverse Engineering](https://img.shields.io/badge/domain-reverse_engineering-blueviolet.svg?style=flat-square)](https://github.com/morluto/rea) [![Status: Proposed](https://img.shields.io/badge/status-proposed-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Ecosystem: REA](https://img.shields.io/badge/ecosystem-morluto%2Frea-8A2BE2.svg?style=flat-square)](https://github.com/morluto/rea) ## Contexto GitReverse's context selection illustrates a useful analyst choice: omit irrelevant repository paths. REA's existing local importer already accepts `excludePaths`, records `caller-excluded` provenance and prunes traversal, but `import-reference-source` does not expose that choice to CLI callers. Functional reference: https://github.com/filiksyos/gitreverse/tree/20864c6a05ea6080a5d25f151919eb19721eea11. No upstream implementation is copied; the reviewed snapshot declares no license. Extend REA's own importer. ## Objetivo Expose caller-selected exclusions in the existing import CLI, preserving its current policy precedence and explicit coverage limitations. ## Escopo - A JSON-array CLI option selects the existing importer's Git-ignore-style path rules. - Validate JSON and nonempty string rules before filesystem access. - Retain existing default ignores, project policy and declared-secret policy. Explicit exclusion is not a secrecy heuristic. - Keep exclusions marked `caller-excluded` and do not traverse excluded subdirectories. - Do not execute a source file, hook, build script, remote fetch or LLM request. ## Critérios de aceite - [ ] Owned compiled CLI fixtures verify directory pruning, wildcard rules, empty/default compatibility and exact exclusion provenance. - [ ] Malformed JSON and invalid rule element types fail before an import starts. - [ ] Project/default/secret policy behavior and source commitments remain valid. - [ ] Relevant CLI/importer tests, static checks and documentation checks pass. ## Perguntas para decisão Rules follow the existing importer's Git-ignore syntax; the option must describe that grammar instead of claiming literal-path matching. ## Observações técnicas Use `docs/specs/reference-source/caller-exclusions/{spec.md,plan.md,tasks.md}`. Reuse the existing importer and policy owner; this is an additive CLI control, not a new provider.
Author
Owner

@YunzhouLi-hub commented on GitHub (Oct 13, 2026):

Hi! I'd like to take this one. My plan is to add a caller-selected path exclusion option (e.g. a repeatable --exclude <path/glob> flag) to the local source import CLI, wire it through to the existing import logic, and add focused regression tests. I'll follow AGENTS.md and the PR template, and link the PR with Fixes #2443. Please let me know if there's a preferred flag name or scope boundary.

<!-- gh-comment-id:6137345098 --> @YunzhouLi-hub commented on GitHub (Oct 13, 2026): Hi! I'd like to take this one. My plan is to add a caller-selected path exclusion option (e.g. a repeatable `--exclude <path/glob>` flag) to the local source import CLI, wire it through to the existing import logic, and add focused regression tests. I'll follow AGENTS.md and the PR template, and link the PR with `Fixes #2443`. Please let me know if there's a preferred flag name or scope boundary.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#815
No description provided.