agentleFS
MicrosoftKnown publishermicrosoft/PromptKit/.github/copilot-instructions.md

PromptKit

Copilot instructions109 starsChanged 8 months agoMITView on GitHub

When a user asks you to perform a task that this library supports (writing requirements, investigating bugs, reviewing code, etc.), use the /promptkit skill (or read and execute bootstrap.md). It is the entry point that guides component selection, parameter gathering, and prompt assembly. Do not try to answer the task directly — assemble the right prompt first. PromptKit is a composable prompt library, not a software application. There is no build system, no runtime, and no application code. Every file…

The file

We split this copilot-instructions.md into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When a user asks you to perform a task that this library supports (writing requirements, investigating bugs, reviewing code, etc.), use the …

    line 5
  2. Very specific:

    All components use kebab-case filenames matching their name field.

    line 44
  3. Distinctive:

    Update the component's YAML frontmatter

    line 93
  4. Very specific:

    Update manifest.yaml to match

    line 94
  5. Distinctive:

    When hand-authoring: protocols must have numbered, ordered phases with specific checks (not vague instructions).

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

PromptKit — Copilot Instructions

How to Use This Repository

When a user asks you to perform a task that this library supports (writing requirements, investigating bugs, reviewing code, etc.), use the /promptkit skill (or read and execute bootstrap.md). It is the entry point that guides component selection, parameter gathering, and prompt assembly. Do not try to answer the task directly — assemble the right prompt first.

What This Repository Is

PromptKit is a composable prompt library, not a software application. There is no build system, no runtime, and no application code. Every file is Markdown or YAML — the "code" is prose that LLMs consume.

The core loop: bootstrap.md reads manifest.yaml to discover components, then assembles them into task-specific prompts from five composable layers: personas → protocols → formats → taxonomies → templates.

Architecture

Templates are the orchestration layer. Each template declares which persona, protocols, and format to compose via YAML frontmatter. The bootstrap engine reads these declarations from manifest.yaml and assembles a single coherent prompt in this order:

  1. Identity (persona)
  2. Reasoning Protocols (one or more, in order)
  3. Classification Taxonomy (if applicable)
  4. Output Format (structure rules)
  5. Task (template with {{param}} placeholders filled)
  6. Non-Goals

Templates can chain via pipelines — each declares input_contract / output_contract with artifact types (e.g., requirements-document → design-document). The document-lifecycle pipeline chains requirements → design, plus validation consuming requirements and optionally design.

Component Conventions

All components use kebab-case filenames matching their name field.

Protocols have three categories with different scoping rules:

  • guardrails/ — Cross-cutting, apply to all tasks (anti-hallucination, self-verification, operational-constraints)
  • analysis/ — Domain/language-specific checks (memory-safety-c, security-vulnerability). Language-specific protocols are separate files, not conditional blocks.
  • reasoning/ — Systematic reasoning approaches (root-cause-analysis, requirements-elicitation)

Template frontmatter references protocols by category path:

protocols:
  - guardrails/anti-hallucination
  - guardrails/self-verification
  - reasoning/root-cause-analysis

But manifest.yaml uses short names (without category prefix):

protocols: [anti-hallucination, self-verification, root-cause-analysis]

These two lists must stay in sync — CI enforces this via tests/validate-manifest.py.

Templates have two modes:

  • Single-shot (default): gather params, assemble prompt, write file
  • Interactive (mode: interactive in frontmatter): execute directly in the current session with a reasoning-and-challenge phase before generation

Required frontmatter fields by component 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

Manifest Sync Rule

manifest.yaml is the source of truth for the bootstrap engine. When adding or modifying any component:

  1. Update the component's YAML frontmatter
  2. Update manifest.yaml to match
  3. The CI checks (tests/validate-manifest.py and tests/validate-instruction-fidelity.py) validate manifest/template protocol sync and universal guardrail coverage

CI

# Validate manifest ↔ template protocol sync and universal guardrails
python tests/validate-manifest.py
python tests/validate-instruction-fidelity.py

Triggered on push/PR when manifest.yaml, component files, or the validation scripts change.

Testing

There is no automated test suite. Testing uses reference comparison: hand-crafted known-good prompts in tests/references/ are compared against PromptKit-generated prompts in tests/generated/ (gitignored) across five dimensions: task framing, reasoning methodology, output specification, operational guidance, and quality assurance. See TESTING.md for the full methodology.

Adding New Components

The preferred workflow is to use PromptKit's own extend-library template (interactive mode) rather than hand-authoring:

copilot
# The /promptkit skill activates automatically.
# Then: "I want to add a template for <your use case>"

This generates PR-ready files following all conventions automatically.

When hand-authoring: protocols must have numbered, ordered phases with specific checks (not vague instructions). Templates must include a quality checklist section. Formats define structure only (not content) and enforce "if a section is empty, state 'None identified'" — never omit sections.

Protocols must be independent and additive — composing any two protocols together must not produce conflicting instructions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.