conformance/.claude/skills/mcp-sdk-tier-audit/references/policy-evaluation-prompt.md
Felix Weinberger 3b4a92baad
feat: SDK tier assessment CLI and skill (#142)
* feat: add tier-check CLI for SDK tier assessment

Adds a 'tier-check' subcommand to the conformance tool that automates
SDK tier assessment against SEP-1730 criteria.

Checks performed:
- Conformance test pass rate (via everything-server)
- GitHub label taxonomy (priority/status/area labels)
- Issue triage SLA compliance
- P0 bug resolution tracking
- Stable release detection
- Required file existence (CHANGELOG, SECURITY, etc.)
- Spec tracking (SDK release within 30d of spec release)

Also includes a Claude Code skill (skills/mcp-sdk-tier-audit/) for
judgment-based checks that require codebase analysis (feature coverage,
docs quality, policy evaluation).

Usage:
  npx tsx src/index.ts tier-check --repo modelcontextprotocol/typescript-sdk
  npx tsx src/index.ts tier-check --repo ... --conformance-server-cmd '...' \
    --conformance-server-cwd ... --conformance-server-url ... --output json

* refactor: revise tier-check CLI and skill based on review feedback

- Move skill to .claude/skills/ so it's auto-available in Claude Code
- Remove feature-coverage subagent (redundant with conformance tests)
- Remove hardcoded ~/src/mcp paths from all skill files
- Trim conformance server table to TS + Python only
- Rename file_existence check to policy_signals (informational, not blocking)
- Add GitHub native issue types detection to labels check
- Add missing features to docs-coverage checklist (tasks, elicitation URL mode, JSON Schema 2020-12)
- Add README with CLI quick start and escape hatch for non-Claude-Code users
- Use --limit 500 instead of --limit 100 for gh issue list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address review feedback on skill and README

- Use npx @modelcontextprotocol/conformance instead of node dist/index.js
- Add full GitHub auth instructions (gh auth login, GITHUB_TOKEN, --token)
- Point TS SDK conformance server to typescript-sdk/test/conformance/
- Fix Python SDK URL to localhost:3001/mcp (not TBD)
- Remove manual gh issue list / gh release list from SKILL.md (CLI handles it)
- Remove Claude Code-specific subagent_type references
- Assume user is already in conformance repo
- Clean up policy-evaluation-prompt.md: remove redundant grep commands,
  focus on content evaluation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve lint errors in conformance.ts

Remove unused variable assignments flagged by eslint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: apply prettier formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add npm run tier-check script, update docs with examples

- Add "tier-check" npm script so users can run `npm run tier-check --`
  instead of `node dist/index.js tier-check`
- Update SKILL.md, README, and skill README to use npm run tier-check
- Add full conformance examples with --conformance-server-cmd/cwd/url
  flags and realistic paths (~/src/mcp/typescript-sdk)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: fix prettier formatting in SKILL.md

* fix: add per-scenario timeout, support url-only conformance, fix stdout pollution

- Add 30s per-scenario timeout to prevent tier-check from hanging
- Allow --conformance-server-url without --conformance-server-cmd (server already running)
- Move runner status logs to stderr so --output json produces clean JSON
- Update SKILL.md and README with --silent flag and pre-start server workflow

* refactor: skill takes local path + server URL instead of repo name

The skill now requires two arguments:
1. Local path to the SDK checkout (for direct file inspection)
2. URL where the everything server is already running

The GitHub owner/repo is derived from git remote. This eliminates
cloning, server startup complexity, and branch confusion (v1.x vs main).

* refactor: write detailed reports to files, show concise summary

Reports go to results/tier-audits/<sdk>-<date>/ (already gitignored).
Claude's console output is now just the tier classification,
pass/fail summary line, top 3 actions, and file paths.

* docs: update READMEs for new skill interface and pre-start workflow

* simplify: flat file output instead of nested directory

* fix: remediation always shows path to Tier 2 and Tier 1

* feat: add client conformance testing to tier-check CLI and skill

- Add checkClientConformance() that runs core client scenarios
  (initialize, tools_call, elicitation-defaults, sse-retry, auth)
  by spawning the SDK's conformance client via --client-cmd
- Add client_conformance to TierScorecard type
- Wire --client-cmd option into the CLI
- Update tier logic: both server + client conformance feed into
  Tier 1 (100%) and Tier 2 (>=80%) requirements
- Update terminal and markdown output to show both conformance types
- Update skill to auto-detect conformance client or accept explicit
  client-cmd argument
- Update README with new option and examples

* improve: table summary output, write reports via subagents

- Change executive summary from pipe-delimited line to a readable
  table with T2/T1 columns
- Move assessment and remediation file writing into parallel
  subagents to keep the main conversation thread clean

* improve: list tier gaps as numbered items instead of one-line blob

* improve: finalize summary format with separator, high-priority fixes, numbered gaps

* improve: add pre-flight checks for gh auth and server reachability

Fail fast with clear error messages if GitHub CLI is not authenticated
or if the conformance server URL is not reachable, rather than failing
deep into the scorecard run.

* docs: improve README and fix skill auto-detection paths

- Claude Code section: explain client-cmd auto-detection for TS/Python,
  show explicit 3-arg form for other SDKs, add examples for all three
- Fix TypeScript build command (npm run build, not pnpm build:all)
- Fix Python server command (add --port, use uv sync --package)
- Fix Python client path (.github/actions/conformance/client.py)
- Expand 'Other SDKs' section with guidance on everything server
- Add gh auth login prerequisite to Claude Code steps

* simplify: remove client-cmd auto-detection, require explicit argument

Client command is now always passed as the third argument. If omitted,
client conformance is skipped and noted as a gap. No more magic path
detection — clearer and more predictable.

* fix: align docs table with canonical list (48 features), simplify policy eval

Docs coverage:
- Table now has numbered rows matching all 48 non-experimental features
  from the canonical list (was missing 7: tools text/image/audio/embedded/
  error/notifications, protocol version negotiation)
- Hardcode total as 48 in summary so agents don't miscount

Policy evaluation:
- Simplified from deep content analysis to file-existence checks
- Dependency policy: DEPENDENCY_POLICY.md, dependabot.yml, or CONTRIBUTING.md section
- Roadmap: ROADMAP.md must exist (GitHub milestones alone not sufficient)
- Versioning: VERSIONING.md or CONTRIBUTING.md section
- Removed GitHub API calls for milestones and releases from policy eval

* refactor: extract canonical feature list into single source of truth

Create references/feature-list.md with all 48 non-experimental + 5
experimental features. The docs-coverage prompt now references this
file instead of duplicating the list. One place to update when
features change.

* fix: separate deterministic file checks from AI content evaluation

CLI (files.ts): now checks all policy files deterministically —
DEPENDENCY_POLICY.md, docs/dependency-policy.md, dependabot.yml,
renovate.json, ROADMAP.md, docs/roadmap.md, VERSIONING.md,
docs/versioning.md, BREAKING_CHANGES.md (in addition to existing
CHANGELOG.md, SECURITY.md, CONTRIBUTING.md).

AI policy eval: receives CLI output showing which files exist,
then reads ONLY those files to judge content quality. No longer
searches the repo for files — clean separation of concerns.

* style: apply prettier formatting

* revert: undo unrelated console.log change in runner/server.ts

* refactor: shell out to conformance CLI instead of reimplementing runner

Address PR feedback: conformance.ts was duplicating the normal conformance
running code. Now shells out to 'node dist/index.js server/client' with
-o to save results to a temp dir, then parses the checks.json files.

Also removes --conformance-server-cmd and --conformance-server-cwd options
since the server must be pre-started.

* docs: add Go and C# SDK examples to README and SKILL.md

* fix: add --framework net9.0 to C# server command

* rename: conformance.ts -> test-conformance-results.ts

Avoids confusion with src/runner/ (the actual conformance runner).
This file just invokes the CLI and parses output.

* style: prettier formatting

* fix: reconcile conformance results against full scenario list

The tier-check CLI was only counting scenarios that produced a
checks.json file. Scenarios that crashed or failed to run (e.g., auth
scenarios when OAuth is not implemented) were invisible, making the
denominator artificially small (e.g., 4/4 instead of 4/23).

Now both checkConformance and checkClientConformance reconcile their
parsed results against the known scenario lists, adding failure entries
for any expected scenario that didn't produce results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: tighten documentation evaluation criteria

Clarify what counts as documented vs just having code:
- Conformance test servers don't count as docs or examples
- Examples without prose = PARTIAL, not PASS
- Go Example* test functions explicitly allowed
- Clear PASS/PARTIAL/FAIL verdict definitions

* docs: add Labels and Spec Tracking rows to audit report templates

The executive summary and assessment report were missing two SEP-1730
requirements: label taxonomy compliance and spec tracking (new protocol
features timeline).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: reuse ConformanceCheck type from src/types.ts instead of redefining

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:59:06 +00:00

5.5 KiB

Policy Evaluation Prompt

You are evaluating the governance and policy documentation of an MCP SDK repository for the SEP-1730 tier assessment.

Input

  • SDK path: {local-path} (absolute path to local SDK checkout)
  • Repository: {repo} (GitHub owner/repo, derived from git remote)
  • CLI policy_signals: {policy_signals_json} (from the tier-check CLI output — shows which files exist)

Your Task

The CLI has already determined which policy files exist in the repository. Your job is to read and evaluate the content of the files that were found. Do NOT search for files in other locations — only evaluate what the CLI reported as present.

Three policy areas to evaluate:

  1. Dependency update policy (required for Tier 1 and Tier 2)
  2. Roadmap (Tier 1: published roadmap; Tier 2: published plan toward Tier 1)
  3. Versioning policy (Tier 1 only: documented breaking change policy)

Steps

1. Identify which files exist from CLI output

From the policy_signals.files object in the CLI JSON output, note which files have true (exist) vs false (missing).

The CLI checks these files:

Dependency policy: DEPENDENCY_POLICY.md, docs/dependency-policy.md, .github/dependabot.yml, .github/renovate.json, renovate.json

Roadmap: ROADMAP.md, docs/roadmap.md

Versioning: VERSIONING.md, docs/versioning.md, BREAKING_CHANGES.md

General (may contain relevant sections): CONTRIBUTING.md

2. Read and evaluate files that exist

For each file that the CLI reported as present, read its content at {local-path}/{file} and evaluate:

  • Is the content substantive (not just a placeholder title)?
  • Does it meet the criteria below?

Do NOT search the repo for policy information in other files. If the dedicated file doesn't exist, the policy is not published.

Evaluation Criteria

Dependency Update Policy

PASS if any of these exist with substantive content:

  • DEPENDENCY_POLICY.md or docs/dependency-policy.md — must describe how and when dependencies are updated
  • .github/dependabot.yml or .github/renovate.json or renovate.json — automated tooling counts as a published policy in practice

FAIL if none of the above exist (per CLI output).

Roadmap

PASS for Tier 1: ROADMAP.md or docs/roadmap.md exists with concrete work items tracking MCP spec components.

PASS for Tier 2: Same file exists with at least a plan toward Tier 1, or explanation for remaining at Tier 2.

FAIL if no roadmap file exists (per CLI output).

Versioning Policy

PASS for Tier 1 if any of these exist with substantive content:

  • VERSIONING.md or docs/versioning.md or BREAKING_CHANGES.md
  • A clearly labeled "Versioning" or "Breaking Changes" section in CONTRIBUTING.md (only check if CONTRIBUTING.md exists per CLI output)

The content must describe: what constitutes a breaking change, how breaking changes are communicated, and the versioning scheme.

Not required for Tier 2.

FAIL if no versioning documentation found in the above files.

Required Output Format

### Policy Evaluation Assessment

**SDK path**: {local-path}
**Repository**: {repo}

---

#### 1. Dependency Update Policy: {PASS/FAIL}

| File                      | Exists (CLI) | Content Verdict                 |
| ------------------------- | ------------ | ------------------------------- |
| DEPENDENCY_POLICY.md      | Yes/No       | Substantive / Placeholder / N/A |
| docs/dependency-policy.md | Yes/No       | Substantive / Placeholder / N/A |
| .github/dependabot.yml    | Yes/No       | Configured / N/A                |
| .github/renovate.json     | Yes/No       | Configured / N/A                |

**Verdict**: **PASS/FAIL** — {one-line explanation}

---

#### 2. Roadmap: {PASS/FAIL}

| File            | Exists (CLI) | Content Verdict                 |
| --------------- | ------------ | ------------------------------- |
| ROADMAP.md      | Yes/No       | Substantive / Placeholder / N/A |
| docs/roadmap.md | Yes/No       | Substantive / Placeholder / N/A |

**Verdict**:

- **Tier 1**: **PASS/FAIL** — {one-line explanation}
- **Tier 2**: **PASS/FAIL** — {one-line explanation}

---

#### 3. Versioning Policy: {PASS/FAIL}

| File                                 | Exists (CLI) | Content Verdict                 |
| ------------------------------------ | ------------ | ------------------------------- |
| VERSIONING.md                        | Yes/No       | Substantive / Placeholder / N/A |
| docs/versioning.md                   | Yes/No       | Substantive / Placeholder / N/A |
| BREAKING_CHANGES.md                  | Yes/No       | Substantive / Placeholder / N/A |
| CONTRIBUTING.md (versioning section) | Yes/No       | Found / Not found / N/A         |

**Verdict**:

- **Tier 1**: **PASS/FAIL** — {one-line explanation}
- **Tier 2**: **N/A** — only requires stable release

---

#### Overall Policy Summary

| Policy Area              | Tier 1    | Tier 2    |
| ------------------------ | --------- | --------- |
| Dependency Update Policy | PASS/FAIL | PASS/FAIL |
| Roadmap                  | PASS/FAIL | PASS/FAIL |
| Versioning Policy        | PASS/FAIL | N/A       |

Important Notes

  • Only evaluate files the CLI reported as existing. Do not search the repo for alternatives.
  • If a file exists but is just a placeholder (e.g., only has a title with no content), mark it as "Placeholder" and FAIL.
  • Dependabot/Renovate config files pass automatically if they exist and are properly configured.
  • CHANGELOG.md showing past releases does NOT count as a roadmap.