Query CLI: make Know callable, not just browsable - #145
Open
MW8-ai wants to merge 1 commit into
Open
Conversation
scripts/cim_query.py answers the matrix from a shell or CI: list / show /
providers / gov / ai, with --json for machine output. The gov command filters
by government availability and exits non-zero when nothing meets the level, so
it doubles as a policy gate ('fail the build if the target environment can't
run this capability').
- No dependencies beyond the standard library.
- scripts/test_cim_query.py: 15 checks (threshold logic + CLI exit-code
contract), runnable as plain python, wired into the verify workflow.
- package.json: 'query' and 'test:query' script aliases.
- README: Query CLI section with the gate pattern.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Roadmap item — 'CloudIntelMatrix query CLI so Know is callable, not just browsable.' The same verified facts the site renders, now answerable from a shell or a CI job.
Commands
(
python scripts/cim_query.py …, ornpm run query -- ….)The gate
govfilters by government availability (Full > Partial > Limited > None > Unknown) and exits non-zero when nothing meets the level — so it's also a policy gate. Drop it in CI to fail a build that assumes a capability its target environment doesn't offer:This is the callable form of the Method's first question — where is this workload even allowed to live? — that the METHOD.md walkthrough opens with.
Fit
data/matrix.json, no schema change.scripts/+verify.pyconvention (argparse,ROOT/DATA, utf-8 stdout).--jsonon every command for the Method's adapters and downstream tooling.scripts/test_cim_query.py, plain-python likeverify.py) wired into the verify workflow;query/test:querynpm aliases added.Verified
Data contract still passes (
verify.py: 0 errors); test suite 15/15; documented examples produce real output; exit-code contract confirmed (0 on match, 1 on no-match, 2 on bad input).🤖 Generated with Claude Code