Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

First-class consumption modes: the CI/CD gate and the agent signal #14

Open

Description

@kinlane

Treat the two real consumption modes — the CI/CD gate and the agent signal — as first-class in the specification.

The format was designed for a human reading terminal output. That is now the third most common way it gets consumed, and the design has not caught up.

Mode one: the gate

A ruleset is what a pipeline blocks a merge on. Everything downstream of that — whether a build fails, whether a release ships, whether a team can deploy — hangs on the diagnostics being stable and comparable between runs.

What the specification currently under-specifies for this mode:

  • Stable rule identity. A rule's code is the thing an exception, a waiver, a baseline, a dashboard, and a six-month-old ticket all key on. What makes a code stable, what constitutes a breaking change to one, and what an implementation must do when a code changes are governance questions the format should answer, not each tool separately.
  • Comparability between runs. Determinism — same ruleset, same document, same diagnostics, in a defined order — is the precondition for baselining, ratcheting, and trend reporting. If it is not required, it will not hold.
  • Machine-readable output shape. Every tool that consumes results reinvents this. A specified diagnostic structure, versioned alongside the format, is what lets a report, a scorecard, a waiver file, and a gate all agree on what a finding is.
  • Severity as policy, not decoration. What severities mean and how a host tool maps them to exit behaviour belongs in the specification, because that mapping is the actual gate.

Mode two: the agent signal

This is new and it is growing fast. Agents now author API descriptions, and the useful question is not whether they should but what they are told about the rules.

There are two distinct sub-cases and they need different things:

  • Agent as consumer of results. An agent reads diagnostics and fixes the document. It needs the same machine-readable, stable output as the gate — plus enough context per finding to act rather than guess: which requirement, where, and what a compliant version looks like.
  • Agent as consumer of the rules themselves. The far more valuable case. Rules reaching the agent before it authors, rather than as a rejection after, is the difference between governance as a gate and governance as guidance. That requires the ruleset to carry human-and-machine-intelligible intent — what the rule is for, not just what it matches.

The second case is why the incumbent format's fields are not enough. A rule today can say what it matches and how loudly to complain. It cannot reliably say why, in a form something else can use. Any extension here has to be additive, optional, and ignorable by an existing engine — compatibility is not negotiable.

Why both belong in the specification rather than in tools

Because both are already being solved, separately and incompatibly, by every tool that touches the format. Report generators, scorecards, waiver reconcilers, baselines, federation layers and agent exporters have each had to invent an answer to "what exactly is a finding, and what is a rule's identity." That is precisely the kind of question a specification exists to answer once.

Deliverables

  • Specify a versioned diagnostic output structure
  • Specify determinism and diagnostic ordering requirements
  • Specify rule-code identity and stability rules
  • Specify the severity model and its relationship to host-tool exit behaviour
  • Proposal for optional, additive intent metadata on a rule, with compatibility analysis
  • Conformance cases for output shape, ordering, and determinism

Activity

  1. added
    roadmap
    maturity:discussing
    on Jul 31, 2026
  2. kinlane commented on Aug 28, 2026

    @kinlane
    ContributorAuthor

    From the office hours of 28 August 2026 (#40) — a consumption mode this issue has not named, from someone who worked on it.

    The whole JS API, actually — so we could integrate it easily into the studio. There are actually a lot of consumers that use it this way, by the way — not just the CLI, but taking the JS API and using it programmatically. And I feel like there is a lot of stuff that we could make better on that side too, to make it easier to integrate. Because right now it's there, people use it, but realistically it was there so we could integrate it. And it's not necessarily the best of designs — if you as a stranger looked at it, without knowing all the background, it looks odd.

    This issue currently treats the CI/CD gate and the agent signal as the first-class modes. There is a third, it has real users today, and it is the one nobody designed:

    The embedded library. Someone else's product calling this in-process — a platform, an IDE extension, a gateway, a CI service, a vendor who would otherwise write their own linter.

    Two things follow.

    1. First-class means the specification has something to say about it. A CI gate cares about exit codes and machine-readable output; an embedder cares about the result shape, how you supply your own document resolution and I/O, how custom functions are registered, and what is guaranteed across versions. If "first-class consumption modes" is a normative section, the embedding surface belongs in it.
    2. The current design is an accident of the studio, and is admitted to be. That is not a criticism of anyone — it was built to serve one product and it did. But it means the surface most likely to carry other people's products is the one with the least design attention, which is backwards given api-commons/spotlight-tools#77.

    Also worth recording here: the CLI fork is being renamed tools, precisely because "it's not really a CLI, it's a toolbox of tools." The naming and this issue are making the same point from opposite ends.

    Related: api-commons/spotlight-tools#77 · api-commons/spotlight-tools#66 · #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maturity:discussingroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions