query
npx graph-spec-cli query [path] [--type <T>] [--tag <t>] [--status <s>] [--json]Filters concepts and prints them. Filters combine with AND.
| Flag | Effect |
|---|---|
--type <type> |
Exact match on frontmatter type |
--tag <tag> |
Matches if the tag appears in the tags list |
--status <status> |
Exact match on frontmatter status |
--json |
Emit an array of concept records |
Table output
Section titled “Table output”$ npx graph-spec-cli query spec/ --type DecisionID TYPE TITLE-------------------------------------- -------- ---------------specification/adopt-okf.decision Decision Adopt OKFspecification/profile-as-data.decision Decision Profile as Data
2 concept(s).Columns are sized to content and left aligned.
JSON output
Section titled “JSON output”$ npx graph-spec-cli query spec/ --type Requirement --json[ { "id": "specification/concept-filtering.requirement", "type": "Requirement", "title": "Concept Filtering", "description": "Concepts can be filtered by type, tag, and status for querying.", "tags": ["requirement", "query"], "status": "implemented" }]Useful queries
Section titled “Useful queries”Everything still in flight:
npx graph-spec-cli query spec/ --status proposedEvery test scenario, to check what the suite owes:
npx graph-spec-cli query spec/ --type TestScenario --jsonEverything in one work area, if you tag by area:
npx graph-spec-cli query spec/ --tag paymentsRequirements that claim to be done, which is the list worth auditing against reality:
npx graph-spec-cli query spec/ --type Requirement --status implementedExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Success, including a zero-match result |
2 |
The bundle could not be read |
An empty result is not an error. If you expected matches and got none, check the filter value
against the actual frontmatter: --type and --status are exact, case-sensitive matches.
--typetakes the PascalCase type name (Requirement), not the filename token (requirement).- A concept missing
titleordescriptionshows blank in those columns, which is a decent way to spot thin concepts.