Skip to content

feat(cli): add rooted paths-file scan selection#760

Merged
mstykow merged 10 commits intomainfrom
feat/paths-file-scan-selection
Apr 22, 2026
Merged

feat(cli): add rooted paths-file scan selection#760
mstykow merged 10 commits intomainfrom
feat/paths-file-scan-selection

Conversation

@mstykow
Copy link
Copy Markdown
Owner

@mstykow mstykow commented Apr 22, 2026

Summary

  • add --paths-file <FILE> for native scans under one explicit root, including stdin support, root-relative normalization, and structured warnings for missing entries
  • tighten --include so it behaves as an explicit glob/path filter: recursive subtree selection now requires an explicit recursive pattern like src/**, while bare directory-like tokens no longer imply descendant selection
  • document the split between pattern filtering and explicit rooted selection across the CLI guide, migration guide, and docs/improvements/cli-workflows.md

Issues

Scope and exclusions

  • Included:
    • one explicit native scan root plus root-relative path-list input via --paths-file
    • --paths-file - stdin support
    • missing-entry warning propagation into terminal output and header warnings
    • explicit separation between --include pattern filtering and rooted path selection
    • CLI/help/docs/migration updates for the new workflow and include semantics
    • improvement-doc coverage for rooted selected-path scans and incremental rescans
  • Explicit exclusions:
    • absolute paths inside --paths-file
    • true multi-root scans in one invocation
    • --paths-file support for --from-json
    • glob semantics inside --paths-file entries

Intentional differences from Python

  • Provenant now has a first-class rooted path-list workflow for selected-file scans instead of relying on argv expansion or cwd-sensitive multi-input workarounds.
  • Provenant now keeps a clearer split between pattern filtering and explicit rooted selection: --include is a glob/path filter, while --paths-file is the exact rooted-selection workflow.
  • The current --paths-file contract is intentionally single-root and root-relative; broader absolute/multi-root support is deferred instead of being partially implemented.

Follow-up work

  • Created or intentionally deferred:
    • defer absolute-entry and multi-root --paths-file support until there is evidence that single-root root-relative workflows are insufficient
    • keep replay-specific improvements such as multi-input --from-json merge semantics out of this PR because upstream already supports multi-input --from-json
    • continue tracking local contract verification for rooted selected-path scans, incremental reuse, and explicit recursive include semantics in the CLI workflow scorecard

Expected-output fixture changes

  • Files changed: none
  • Why the new expected output is correct: this change adds a new CLI selection mode, tightens include semantics, and updates docs only; no golden expected outputs needed to change

mstykow and others added 5 commits April 22, 2026 16:15
Allow one explicit scan root to consume root-relative path lists so selected-file scans no longer depend on cwd-sensitive positional argument expansion.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Lock in the rooted paths-file contract with validation, cwd-independence, normalization, and warning formatting coverage.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Explain when to use rooted paths-file scans versus multi-input selection so PR-file workflows are documented alongside the existing CLI guidance.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Track rooted paths-file scans and incremental rescans in the beyond-parity improvements index so workflow-level CLI gains have a stable landing zone.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Describe the current paths-file behavior without v1 shorthand so the guide reads as product documentation instead of roadmap language.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow
Copy link
Copy Markdown
Owner Author

mstykow commented Apr 22, 2026

Follow-up note on include semantics:

This branch now intentionally keeps a sharper split between pattern filtering and explicit path selection.

  • --include is treated as a path/glob filter: recursion should be explicit in the pattern (for example src/foo/**), and bare directory-looking tokens like src/foo no longer imply "the whole subtree".
  • --paths-file remains the explicit rooted-selection workflow: file entries mean one file, directory entries mean that subtree.

That differs from the previous Provenant behavior, where bare directory-style --include values were effectively treated as recursive subtree selectors. It also means Provenant now has a first-class rooted selected-path workflow (--paths-file) instead of forcing users to approximate that intent through --include/--ignore combinations alone.

mstykow and others added 5 commits April 22, 2026 18:00
Separate explicit rooted selection from glob filtering so bare directory-like include values no longer imply recursive subtree scans.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Lock in the narrowed include contract while preserving exact-file and rooted-subtree selection behavior for internal selectors.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Explain that include patterns now require explicit recursive globs while paths-file remains the explicit rooted-selection workflow.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Help ScanCode users adapt path-selection workflows by pointing pattern filtering to --include and exact rooted selection to --paths-file.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Match slashless include patterns against the basename so literal directory tokens like src stop selecting descendant files implicitly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow mstykow merged commit 58ecc9a into main Apr 22, 2026
15 checks passed
@mstykow mstykow deleted the feat/paths-file-scan-selection branch April 22, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli: add --paths-file for selected-file scans under an explicit root

1 participant