Skip to content

mizcausevic-dev/kg-protocol-detect-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

kg-protocol-detect-action

CI License: AGPL-3.0-or-later

GitHub Action that scans a directory of JSON documents and identifies which Kinetic Gain Suite protocol each one belongs to. Useful for mixed-content repos where AgentCards, MCP Tool Cards, prompt-provenance docs, evidence bundles, and OTel GenAI traces all live side by side and need to be triaged into the right per-protocol diff/stamp pipeline.

Wraps kg-protocol-detect. Pairs naturally with the per-protocol diff Action quintet.

Part of the Kinetic Gain Suite.


Usage

name: Protocol inventory
on:
  pull_request:
    paths: ["governance/**/*.json"]

jobs:
  protocol-detect:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: mizcausevic-dev/kg-protocol-detect-action@v0.1-shipped
        with:
          scan-dir: governance
          fail-on-unknown: true
          min-confidence: medium

Inputs

input required default description
scan-dir Directory to walk recursively for JSON documents.
fail-on-unknown false Fail the run when any file is identified as protocol=unknown (or below min-confidence).
min-confidence low One of high, medium, low. Detections below this rank count as "unknown" for the gate.
comment-on-pr auto Post the protocol summary as a PR comment.
github-token ${{ github.token }} Token for posting the PR comment.

Outputs

output description
file-count Number of JSON files scanned.
unknown-count Number of files identified as unknown (or below min-confidence).
summary-json Compact JSON array of { path, protocol, version, confidence } per file.

What it detects

Recognized protocols (per kg-protocol-detect):

  • agent-cards-spec — A2A AgentCard documents
  • mcp-tool-card-spec — MCP Tool Card documents
  • prompt-provenance-spec — prompt-provenance documents
  • evidence-bundle-spec — evidence-bundle manifests
  • otel-genai-otlp — OTLP export envelopes carrying OTel GenAI spans
  • mcp-tools-list — bare MCP tools/list server responses
  • unknown — anything else

Detection is shape- and discriminator-based — files without a *_version field still get matched on well-known shape signals.

How it composes

License

AGPL-3.0-or-later

About

Scans a directory of JSON docs and identifies which Kinetic Gain Suite protocol each belongs to. Pairs with the per-protocol diff Action quintet for mixed-content governance repos.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors