Skip to content

Add query dependencies verb and enhance CLI flags for Markdown#44

Merged
Malcolmnixon merged 1 commit into
mainfrom
feature/query-report-heading
Jul 19, 2026
Merged

Add query dependencies verb and enhance CLI flags for Markdown#44
Malcolmnixon merged 1 commit into
mainfrom
feature/query-report-heading

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request introduces several important updates to the SysML2 Tools documentation and CLI, focusing on improved clarity, new features, and better alignment between documentation and command-line behavior. The most significant changes include the addition of a new dependencies query verb, a refactoring of depth-related CLI flags for clearer semantics, and the introduction of the QualifiedNameShortener utility. These changes enhance both the user experience and the maintainability of the codebase.

New Features and CLI Changes:

  • Added a new dependencies query verb to the CLI and documentation, increasing the number of supported query verbs from 11 to 12. This verb provides combined incoming/outgoing dependency information. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Refactored depth-related CLI flags: --depth is now used exclusively for Markdown heading depth (global option), while --walk-depth is introduced as a per-command flag for controlling diagram nesting and impact traversal depth in render and query commands, respectively. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Documentation and Design Updates:

  • Updated the design documentation to describe the new dependencies query verb and the QualifiedNameShortener utility, which strips common prefixes from qualified names for improved Markdown rendering.
  • Clarified the scoping and usage of the --heading flag, making it specific to the query command and documenting its purpose and rationale.

Review and Test Infrastructure:

  • Added a new review section for the QualifiedNameShortener utility, including associated docs, implementation, and tests, to .reviewmark.yaml.

Minor Improvements:

  • Updated examples and documentation for option names and usage (e.g., --walk-depth instead of --depth, --report-depth--walk-depth).

These changes collectively improve the clarity, usability, and extensibility of the SysML2 Tools CLI and its documentation.

…iedNameShortener

- Rename the pre-existing --depth flag to --walk-depth for query's impact-walk
  bounded traversal and render's diagram-nesting depth (breaking CLI change;
  no CI scripts referenced the old semantics).
- Repurpose the pre-existing global --depth flag (shared with --validate) to
  control query's Markdown heading depth, and add a new --heading <text>
  override for the auto-generated heading text (Markdown-only; no effect on
  --format json).
- Add a new `query dependencies --element X` verb combining `uses` and
  `used-by` into one bullet-prose Markdown result (outgoing "Depends on"
  and incoming "Used by" bullets, each with kind), suitable for pasting
  into design-doc dependency sections. JSON output gains a new Direction
  field (Outgoing/Incoming), absent for all other verbs.
- Add QualifiedNameShortener, a reusable utility that strips the longest
  common leading "::"-segment prefix across a pool of qualified names
  (always keeping each name's leaf), wired into dependencies' Markdown
  rendering only; JSON stays fully-qualified.
- Update design/verification/reqstream docs and CONTRIBUTING/README for all
  of the above; update CLI/Cli-Context/Query/Render/Utilities help text,
  tests, and .reviewmark.yaml with a new review-set for the new unit.
- Address formal-review findings scoped to this branch's changes: verb-aware
  query --help schema hints for `dependencies` (was showing an inaccurate
  generic table/JSON hint), missing --walk-depth no-op note, missing
  QualifiedNameShortener/Query entries in the Tool decomposition overview,
  stale CLI contract text, and reqstream traceability gaps for --heading and
  QualifiedNameShortener.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant