agentleFS
mintesnot-teshomemintesnot-teshome/llm-verify/.github/copilot-instructions.md

llm-verify

Copilot instructions36 starsChanged 4 months agoMITView on GitHub

Copilot MUST update this file automatically when ANY of the following happens: After updating, briefly confirm what was changed at the end of the response. ⚠️ NEVER store actual values here — names/keys only!

  • Reads credentials

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run standardized prompt suites against multiple API endpoints

    line 92

≈ “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

🤖 COPILOT AUTO-UPDATE RULE

Copilot MUST update this file automatically when ANY of the following happens:

  1. User defines or changes project domain, stack, database, or scale → Update 🎯 PROJECT IDENTITY
  2. User starts a new task or completes one → Update 🚧 CURRENT FOCUS and ✅ COMPLETED WORK
  3. User makes architectural decisions → Update 📋 IMPORTANT CONTEXT and 🏗 PATTERNS TO USE
  4. User adds explicit instructions (e.g., "always do X", "use Y for Z") → Add to 📜 USER INSTRUCTIONS LOG
  5. User provides credentials or config names → Add NAME ONLY to 🔐 CREDENTIALS & CONFIG (⚠️ NEVER store values!)
  6. User says "don't do X" or prohibits something → Add to 🚫 USER SAID "DON'T DO THIS"
  7. User shares important context (business rules, constraints, domain knowledge) → Add to 📋 IMPORTANT CONTEXT

After updating, briefly confirm what was changed at the end of the response.


🎯 PROJECT IDENTITY

FieldValue
NameLLM Verify
DomainAI model verification & benchmarking — detect model fraud (e.g., resold APIs misrepresenting identity)
StackPython 3.12+ · FastAPI · Pydantic v2 · httpx (async) · SQLAlchemy 2.0 (async) · Alembic
DatabaseSQLite (dev & prod — file-based, zero-config)
ScaleSingle-node CLI + web dashboard · benchmarks run locally or via CI
Repobenchmark/

📜 USER INSTRUCTIONS LOG

#DateInstruction
12026-02-17Project bootstrapped with Copilot context system

✅ COMPLETED WORK

#DateTask
12026-02-17Project bootstrap — copilot context, settings, gitignore
22026-02-17Full project scaffolding — 30+ files, all layers, 32 prompts
32026-02-17All 9 unit tests passing
42026-02-17Renamed to LLM Verify, pushed to GitHub
52026-02-17Fixed factory: suspect provider now uses Anthropic protocol by default
62026-02-17First live benchmark — identity probes vs suspect API (opuscode.pro)
72026-02-17Confirmed fraud: suspect serves Claude 3.5 Sonnet as Claude Sonnet 4
82026-02-17Updated README with no-API-key usage guide and red flags doc
92026-02-17Added deep analysis feature — service, schemas, handler, README section

🚧 CURRENT FOCUS

ItemDetail
Working onDeep analysis feature complete — ready for live testing
BlockersNone
Next upLive test deep analysis endpoint, web dashboard, more prompt suites

🔐 CREDENTIALS & CONFIG

⚠️ NEVER store actual values here — names/keys only!

#NameServiceNotes
1SUSPECT_API_KEYopuscode.proSuspect API key — Anthropic protocol
2SUSPECT_API_BASE_URLopuscode.prohttps://opuscode.pro/api

🚫 USER SAID "DON'T DO THIS"

#DateProhibition

📋 IMPORTANT CONTEXT

  • Core Problem: Users are being sold API access to models misrepresented as premium models (e.g., Kimi sold as Claude). The system prompt says "Claude" but the underlying model is actually Kimi.
  • Goal: Build a benchmark suite that can fingerprint AI model behavior to verify true model identity, comparing response patterns, capabilities, and quirks across models.
  • Suspect API (opuscode.pro): Uses Anthropic Messages protocol, NOT OpenAI. Endpoint: https://opuscode.pro/api/v1/messages. Auth header: x-api-key. Available models: Opus 4.6, Sonnet 4.5, Haiku 4.5 (their naming). Default model: Opus 4.6.
  • First test result: Suspect claims to be Claude Sonnet 4 but self-identifies as claude-3-5-sonnet-20241022 (Claude 3.5 Sonnet). Gave 3 different knowledge cutoffs, mentions "custom proxy server", avg latency 14s.
  • Factory mapping: suspect provider defaults to anthropic protocol. Can be overridden via protocol field in ModelConfig.
  • Key Features Planned:
    • Run standardized prompt suites against multiple API endpoints
    • Collect and store structured benchmark results (latency, token usage, response quality)
    • Statistical comparison & fingerprinting to detect model identity
    • Web dashboard to visualize results
    • CLI for running benchmarks in CI/CD

🚨 HARD RULES

Security

  • ❌ NEVER commit secrets, API keys, or tokens to code or config files
  • ✅ Use .env files (gitignored) and pydantic-settings for all secrets
  • ✅ Parameterized queries only — no string interpolation in SQL
  • ✅ Validate all external input with Pydantic models

Performance

  • ✅ Use async/await for all I/O (HTTP calls, DB queries, file ops)
  • ✅ Use httpx.AsyncClient with connection pooling for API calls
  • ✅ Use SQLAlchemy async sessions with proper context managers
  • ✅ Batch concurrent API calls with asyncio.gather() where appropriate

Architecture

  • ✅ Dependency injection via FastAPI Depends()
  • ✅ Strict separation: handlers → services → repositories → models
  • ✅ Each layer has a single responsibility
  • ✅ Config is centralized in one place (src/config.py)

📐 CODE STYLE

  • Type hints on ALL function signatures and return types
  • Docstrings on all public functions (Google style)
  • Descriptive names — no single-letter variables except i, _ in comprehensions
  • Early returns to reduce nesting
  • Max 30 lines per function — extract helpers if longer
  • Pydantic models for all data structures crossing boundaries
  • f-strings for string formatting
  • pathlib.Path over os.path

🏗 PATTERNS TO USE

PatternUsage
Result patternReturn Result[T, Error] for operations that can fail
Service patternBusiness logic lives in service classes, not in handlers
Repository patternDB access abstracted behind repository interfaces
Adapter patternEach AI provider gets an adapter implementing a common interface
Factory patternCreate model adapters dynamically from config
Strategy patternBenchmark suites are pluggable strategies

🚫 PATTERNS TO AVOID

Anti-patternWhy
God objectsSplit into focused, single-responsibility classes
Magic numbers/stringsUse enums and constants
Mutable global stateUse DI and explicit passing
Generic utils.pyCreate specific modules (string_helpers.py, etc.)
Bare except:Always catch specific exceptions
Print debuggingUse structlog or logging
Nested callbacksUse async/await

📁 PROJECT STRUCTURE

benchmark/
├── src/
│   ├── __init__.py
│   ├── main.py                  # FastAPI app entry point
│   ├── config.py                # Pydantic Settings configuration
│   ├── database.py              # SQLAlchemy engine & session setup
│   ├── handlers/                # API route handlers (thin layer)
│   │   ├── __init__.py
│   │   ├── benchmarks.py
│   │   └── results.py
│   ├── services/                # Business logic
│   │   ├── __init__.py
│   │   ├── benchmark_runner.py
│   │   ├── model_comparator.py
│   │   └── fingerprint.py
│   ├── repositories/            # Database access
│   │   ├── __init__.py
│   │   ├── benchmark_repo.py
│   │   └── result_repo.py
│   ├── models/                  # SQLAlchemy ORM models
│   │   ├── __init__.py
│   │   ├── benchmark.py
│   │   └── result.py
│   ├── schemas/                 # Pydantic request/response schemas
│   │   ├── __init__.py
│   │   ├── benchmark.py
│   │   └── result.py
│   ├── adapters/                # AI provider adapters
│   │   ├── __init__.py
│   │   ├── base.py              # Abstract base adapter
│   │   ├── openai_adapter.py
│   │   ├── anthropic_adapter.py
│   │   └── generic_adapter.py   # For OpenAI-compatible APIs
│   └── prompts/                 # Benchmark prompt suites
│       ├── __init__.py
│       ├── identity.py          # "Who are you?" probes
│       ├── capability.py        # Capability-specific tests
│       └── fingerprint.py       # Behavioral fingerprinting prompts
├── tests/
│   ├── __init__.py
│   ├── conftest.py              # Shared fixtures
│   ├── test_benchmark_runner.py
│   ├── test_model_comparator.py
│   └── test_adapters/
│       └── test_generic_adapter.py
├── alembic/                     # Database migrations
│   └── versions/
├── alembic.ini
├── .env.example
├── .gitignore
├── pyproject.toml
└── README.md

🔑 ENVIRONMENT VARIABLES

# === REQUIRED ===
DATABASE_URL=sqlite+aiosqlite:///./benchmarker.db

# === AI PROVIDER API KEYS (add as needed) ===
# OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
# SUSPECT_API_KEY=           # The API you're testing/verifying
# SUSPECT_API_BASE_URL=      # Base URL of the suspect API

# === OPTIONAL ===
# LOG_LEVEL=INFO
# BENCHMARK_TIMEOUT=30       # Seconds per API call
# MAX_CONCURRENT_CALLS=5     # Limit parallel API requests

📚 GLOSSARY

AbbreviationMeaning
ctxContext
repoRepository
svcService
dtoData Transfer Object
handlerAPI route handler (controller)
adapterAI provider adapter
cfg / configConfiguration
dbDatabase
req / resRequest / Response
benchBenchmark
fpFingerprint

✅ TESTING

  • Test alongside code — tests mirror src/ structure
  • Mock all externals — API calls, database, file system
  • Cover edge cases — empty inputs, timeouts, malformed responses
  • Target 80% coverage minimum
  • Use pytest with pytest-asyncio for async tests
  • Fixtures in conftest.py — shared test data and mocks
  • Test naming: test_<function>_<scenario>_<expected> (e.g., test_run_benchmark_timeout_raises_error)
  • Use httpx.AsyncClient for integration testing FastAPI endpoints

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.