Skip to content

Query CLI: make Know callable, not just browsable - #145

Open
MW8-ai wants to merge 1 commit into
mainfrom
feat/query-cli
Open

Query CLI: make Know callable, not just browsable#145
MW8-ai wants to merge 1 commit into
mainfrom
feat/query-cli

Conversation

@MW8-ai

@MW8-ai MW8-ai commented Aug 16, 2026

Copy link
Copy Markdown
Owner

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

cim list --category "AI / ML"          # what's tracked
cim show "Generative AI"               # one capability, every provider
cim providers "Object Storage"         # provider comparison
cim gov --capability "Generative AI" --level Partial   # where can it legally live?
cim ai --native                         # AI-native capabilities

(python scripts/cim_query.py …, or npm run query -- ….)

The gate

gov filters 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:

npm run query -- gov --capability "Kubernetes" --level Limited --provider azure

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

  • Zero dependencies beyond the standard library; reads the existing data/matrix.json, no schema change.
  • Follows the repo's scripts/+verify.py convention (argparse, ROOT/DATA, utf-8 stdout).
  • --json on every command for the Method's adapters and downstream tooling.
  • 15-check test (scripts/test_cim_query.py, plain-python like verify.py) wired into the verify workflow; query / test:query npm 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

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>
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