microsoft / microsoft/PromptKit

Expand automated test suite: schema validation, pipeline contracts, graph integrity in CI

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
105
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Summary

Expand PromptKit's automated test suite beyond the current validate-manifest.py to include frontmatter schema validation, pipeline contract chain validation, and graph integrity checking — all running in CI.

Motivation

GitHub Spec Kit has 13 pytest modules covering:

  • Manifest validation and schema enforcement
  • Agent config consistency (all supported agents have correct metadata)
  • Template resolution priority ordering
  • Extension/preset manifest schema validation
  • Release artifact parity checking

PromptKit currently has:

  • validate-manifest.py — checks manifest ↔ template protocol sync
  • validate-graph-integrity.py — exists but may not be in CI
  • self-audit-prompt.md — manual self-audit prompt
  • ❌ No frontmatter schema validation (required fields by component type)
  • ❌ No pipeline contract chain validation
  • ❌ No component cross-reference validation

Proposed Additions

1. Frontmatter schema validation

Validate that every component has the required frontmatter fields for its type:

  • Persona: name, description, domain, tone
  • Protocol: name, type (guardrail|analysis|reasoning), description
  • Format: name, type (format), description, produces
  • Template: name, description, persona, protocols, format, params, input_contract, output_contract
2. Pipeline contract chain validation

For each pipeline in manifest.yaml, verify that stage N's output_contract matches stage N+1's input_contract. Catch broken chains before they reach users.

3. Graph integrity in CI

validate-graph-integrity.py already exists — add it to the CI workflow alongside validate-manifest.py so it runs on every push/PR.

4. Component cross-reference validation
  • Every persona referenced by a template exists in personas/
  • Every protocol referenced by a template exists in protocols/
  • Every format referenced by a template exists in formats/
  • Every taxonomy referenced exists in taxonomies/
5. Dead component detection

Flag components that exist in the repo but are not referenced by any template or pipeline.

Credit

The testing depth and structure is inspired by GitHub Spec Kit's test suite. See their tests/ directory and TESTING.md for their approach to structural validation and manual testing mapping rules.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading validate-manifest.py, validate-graph-integrity.py, manifest.yaml, and the CI workflow to understand existing checks and how validators are invoked. Define the validation coverage for frontmatter, pipeline contracts, cross-references, and dead components, then verify that all checks run successfully in CI on pushes and pull requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.