Skip to content

feat(tools): deterministic vendor-neutrality score (magpie-site#17)#672

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/vendor-neutrality-score
Jul 1, 2026
Merged

feat(tools): deterministic vendor-neutrality score (magpie-site#17)#672
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/vendor-neutrality-score

Conversation

@potiuk

@potiuk potiuk commented Jul 1, 2026

Copy link
Copy Markdown
Member

What & why

Answers the recurring "is Magpie really vendor neutral?" question from
apache/magpie-site#17 with a number that isn't a matter of opinion. Adds
tools/vendor-neutrality-score: a stdlib-only, offline uv tool that
scores vendor neutrality straight from repository metadata, so the result
is reproducible from the source tree and can't drift from the code.

The rule

Neutrality is measured per capability contract (substrate tools —
Magpie's own machinery — are excluded). One rule per contract class:

  • vendor-backed → GREEN once ≥2 distinct backend vendors implement
    it (one backend is a default, not neutrality; interface specs don't count)
  • agnostic → GREEN by construction (one vendor-neutral spec serves every backend)
  • single-organisation → GREEN by exemption (bound to one org's data model)

Overall score = green contracts / total. Each skill is then classified
capability-pure / portable / vendor-coupled, with declared
organization: scope reported as an orthogonal dimension.

To make it deterministic

  • Each of the 16 contract tools now declares **Kind:**
    (interface|implementation) and **Vendor:** in its README.
  • tools/ponymail is additionally tagged contract:mail-source — it was
    already an inbound list-traffic source, just not tagged (capability-sync
    tables updated to match).
  • docs/vendor-neutrality.md gains a Vendor-neutrality score section
    (algorithm + a generated block); a pytest keeps that block in sync with
    the tool output, so the published number can't go stale.

Result today

8/9 capability contracts vendor neutral (89%). The only gap is
contract:mail-draft (outbound mail is Gmail-only) — one adapter away.
59/63 skills carry no vendor lock-in; the 4 that do all reach the same
mail-draft contract.

uv run --project tools/vendor-neutrality-score vendor-neutrality-score
uv run --project tools/vendor-neutrality-score vendor-neutrality-score --json
uv run --project tools/vendor-neutrality-score vendor-neutrality-score --markdown   # regenerates the doc block

Closes apache/magpie-site#17 once the site tagline links here.

Add `tools/vendor-neutrality-score`: a stdlib-only uv tool that scores
Magpie's vendor neutrality straight from repository metadata, so the
number is reproducible and cannot drift from the code.

Answers apache/magpie-site#17 with a hard, falsifiable rule per
capability contract (substrates excluded):

- vendor-backed  -> GREEN once >=2 distinct backend vendors implement it
- agnostic       -> GREEN by construction (one spec serves every backend)
- single-org     -> GREEN by exemption (bound to one org's data model)

To make it deterministic, each of the 16 contract tools now declares
`**Kind:**` (interface|implementation) and `**Vendor:**` in its README;
`tools/ponymail` is additionally tagged `contract:mail-source` (it was
already an inbound list-traffic source). The tool also assesses every
skill: capability-pure / portable / vendor-coupled, plus declared
`organization:` scope.

docs/vendor-neutrality.md gains a "Vendor-neutrality score" section that
describes the algorithm and embeds a generated block; a pytest keeps the
block in sync with the tool output.

Current score: 8/9 contracts vendor neutral (89%) — only mail-draft
(Gmail-only outbound) is a gap. 59/63 skills carry no vendor lock-in;
the 4 that do all reach mail-draft.
@potiuk potiuk merged commit 976b800 into apache:main Jul 1, 2026
31 checks passed
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.

Is Magpie really vendor neutral currently?

1 participant