Add query dependencies verb and enhance CLI flags for Markdown#44
Merged
Conversation
…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>
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
dependenciesquery verb, a refactoring of depth-related CLI flags for clearer semantics, and the introduction of theQualifiedNameShortenerutility. These changes enhance both the user experience and the maintainability of the codebase.New Features and CLI Changes:
dependenciesquery 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]--depthis now used exclusively for Markdown heading depth (global option), while--walk-depthis introduced as a per-command flag for controlling diagram nesting and impact traversal depth inrenderandquerycommands, respectively. [1] [2] [3] [4] [5] [6] [7] [8] [9]Documentation and Design Updates:
dependenciesquery verb and theQualifiedNameShortenerutility, which strips common prefixes from qualified names for improved Markdown rendering.--headingflag, making it specific to thequerycommand and documenting its purpose and rationale.Review and Test Infrastructure:
QualifiedNameShortenerutility, including associated docs, implementation, and tests, to.reviewmark.yaml.Minor Improvements:
--walk-depthinstead of--depth,--report-depth→--walk-depth).These changes collectively improve the clarity, usability, and extensibility of the SysML2 Tools CLI and its documentation.