Summary
brief inspect supports JSON and human-readable output but does not support Markdown. This differs from the primary scan and the other reporting commands, which support --markdown for agent and CI-oriented output.
Markdown is also lost when an artifact passed to the primary command is automatically routed to inspect.
Current behavior
Explicit inspection rejects the flag:
brief inspect --markdown dist/package.whl
flag provided but not defined: -markdown
Automatic inspection accepts the primary command's flag but does not carry it into cmdInspect:
brief --markdown dist/package.whl
When stdout is not a terminal, this produces JSON rather than Markdown.
Root cause
cmdInspect defines only --json and --human.
- The report package provides
ArtifactJSON and ArtifactHuman, but no ArtifactMarkdown.
inspectAutoArgs accepts and forwards only the JSON and human flags.
Expected behavior
Both forms should produce equivalent Markdown artifact reports:
brief inspect --markdown dist/package.whl
brief --markdown dist/package.whl
Proposed implementation
- Add a
--markdown flag to cmdInspect.
- Implement
report.ArtifactMarkdown(w io.Writer, art *brief.Artifact).
- Pass the Markdown flag through
inspectAutoArgs when auto-routing from the primary command.
- Preserve the existing precedence in which Markdown wins when multiple output flags are supplied.
The Markdown report should include:
- Artifact path, container format, SHA-256, archive entry count, native object count and duration.
- A section for each native object with path, format, architecture, SOName, producers, required dynamic libraries, Go build information and static-library hints.
- Proper Markdown escaping for artifact paths and all metadata originating from inspected files.
Suggested tests
- Unit-test
ArtifactMarkdown with an archive containing multiple native objects.
- Cover empty optional fields and an artifact with no native objects.
- Verify Markdown escaping for pipes, newlines and other table-sensitive content.
- Verify
brief inspect --markdown artifact selects Markdown output.
- Verify
brief --markdown artifact preserves Markdown through automatic inspection.
Summary
brief inspectsupports JSON and human-readable output but does not support Markdown. This differs from the primary scan and the other reporting commands, which support--markdownfor agent and CI-oriented output.Markdown is also lost when an artifact passed to the primary command is automatically routed to
inspect.Current behavior
Explicit inspection rejects the flag:
Automatic inspection accepts the primary command's flag but does not carry it into
cmdInspect:When stdout is not a terminal, this produces JSON rather than Markdown.
Root cause
cmdInspectdefines only--jsonand--human.ArtifactJSONandArtifactHuman, but noArtifactMarkdown.inspectAutoArgsaccepts and forwards only the JSON and human flags.Expected behavior
Both forms should produce equivalent Markdown artifact reports:
Proposed implementation
--markdownflag tocmdInspect.report.ArtifactMarkdown(w io.Writer, art *brief.Artifact).inspectAutoArgswhen auto-routing from the primary command.The Markdown report should include:
Suggested tests
ArtifactMarkdownwith an archive containing multiple native objects.brief inspect --markdown artifactselects Markdown output.brief --markdown artifactpreserves Markdown through automatic inspection.