miladinovst/mindlayer
About
Know what breaks before you ship. Engineering intelligence for AI coding agents - 12 portable Agent Skills, Engineering Truth Graph, and deterministic verification.
Developer ToolsMeasured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
AI can write code. MindLayer verifies what that code will actually do to your Azure & Microsoft systems.
Portable Agent Skills + deterministic verification for Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, OpenCode & Windsurf.
What MindLayer Does (In Simple Words)
When you use Claude Code, Cursor, GitHub Copilot, or Codex to edit a real production app, passing the build and unit tests is not enough.
Code breaks in the gaps between layers:
- Your TypeScript code reads
AZURE_SEARCH_ENDPOINT, whileinfra/app.bicepdefinesSEARCH_ENDPOINT. Build passes. Production crashes. - Your Managed Identity gets a valid Entra ID token, but Bicep granted
Search Service Contributor(control plane) instead ofSearch Index Data Reader(data plane). Every search returns403 Forbidden. - Your RAG refactor improves semantic search, but accidentally drops
filter: "tenantId eq '...'". Auth passes. Customer A sees Customer B's private documents. - Your SQL migration drops a column that an Azure Function worker still queries. Deployment breaks and
git revertcannot bring deleted data back. - Your AI agent adds per-document LLM reranking inside a
forloop. Tests pass. Your Azure OpenAI bill jumps 6x.
MindLayer teaches your existing AI coding agent how to catch these bugs before you open a PR or deploy.
- No SaaS dashboard.
- No extra LLM API key.
- No mandatory MCP server.
- No data leaves your machine.
- Just portable
SKILL.mdengineering protocols + zero-dependency Python 3 verification scripts that run right inside the coding agent you already use.
One-Command Installation (10 Seconds)
Pick your preferred one-liner — no config wizard, no API key, no backend:
Option A — Universal Skills CLI (Recommended — works with every agent)
npx skills add miladinovst/mindlayer
(Live-tested against miladinovst/mindlayer — discovers all 12 skills automatically.)
| Want something specific? | Copy-Paste Command |
|---|---|
| Install globally across all your projects | npx skills add -g miladinovst/mindlayer |
| Start minimal — flagship PR reviewer only | npx skills add miladinovst/mindlayer --skill change-review |
| Install one Azure skill (e.g., code ↔ Bicep contracts) | npx skills add miladinovst/mindlayer --skill cloud-contracts |
Option B — Zero-Node One-Line Installers (macOS / Linux / Windows)
# macOS / Linux (installs all 12 skills into .agents/skills/)
curl -fsSL https://raw.githubusercontent.com/miladinovst/mindlayer/main/install.sh | sh
# Windows PowerShell (installs all 12 skills into .agents\skills\)
irm https://raw.githubusercontent.com/miladinovst/mindlayer/main/install.ps1 | iex
(Pass --global / -Global, --agent claude|cursor|copilot|gemini|codex|opencode|windsurf, or --skill change-review to customize.)
Manual installation (without npx) for Claude Code, Cursor, Copilot, Codex, Gemini CLI, OpenCode & Windsurf
Every folder inside skills/ is 100% self-contained. Clone and copy directly into your agent's native skill directory:
git clone https://github.com/miladinovst/mindlayer.git
mkdir -p .agents/skills
cp -r mindlayer/skills/* .agents/skills/
| Coding Agent | Project-Local Path | Global User Path | Compatibility |
|---|---|---|---|
| Claude Code | .claude/skills/<skill>/ |
~/.claude/skills/<skill>/ |
Docs-verified |
| Cursor | .cursor/skills/<skill>/ or .agents/skills/ |
~/.cursor/skills/<skill>/ |
Docs-verified |
| GitHub Copilot | .github/skills/<skill>/ or .agents/skills/ |
~/.copilot/skills/<skill>/ |
Docs-verified |
| Gemini CLI | .gemini/skills/<skill>/ or .agents/skills/ |
~/.gemini/skills/<skill>/ |
Docs-verified |
| OpenAI Codex | .codex/skills/<skill>/ or .agents/skills/ |
~/.codex/skills/<skill>/ |
Docs-verified |
| OpenCode | .opencode/skills/<skill>/ or .agents/skills/ |
~/.config/opencode/skills/<skill>/ |
Docs-verified |
| Windsurf | .windsurf/skills/<skill>/ |
~/.codeium/windsurf/skills/<skill>/ |
Docs-verified |
See docs/installation.md and docs/compatibility.md for full details.
Step 2 — Open Your Repository & Ask in Plain English
There is no new CLI syntax or DSL to memorize. Ask your coding agent normal engineering questions:
"Review my current diff and tell me what could break before I ship to Azure."
"Check if my TypeScript/C#/Python code matches infra/*.bicep and GitHub Actions."
"Trace authentication and RBAC from our frontend to Azure AI Search — why are we getting 403?"
"Check whether our multi-tenant RAG search or Redis cache can leak another customer's data."
"Estimate the monthly Azure OpenAI and Cosmos DB cost impact of this PR."
"Can we safely roll back this SQL migration if deployment fails?"
"Prove that the new document upload endpoint actually works end to end."
"Reconstruct why production threw 403s after yesterday's deployment using ./incident-logs/."
Step 3 — Act on Verified Evidence (Not AI Guesses)
Every finding separates Severity (critical / high / medium / low) from Verification Status (VERIFIED / INFERRED / UNVERIFIED / CONTRADICTED), cites real file:line evidence on both sides of a contract, and lists what compensating controls were checked to avoid false positives.
Built Deeply for Microsoft & Azure
MindLayer doesn't mirror Microsoft Learn docs or spit out generic best-practice checklists. Its 50 focused engineering references encode the exact cross-layer failure modes that break production Azure & Microsoft 365 systems:
| Microsoft / Azure Layer | Real Production Bugs MindLayer Catches |
|---|---|
| Azure AI & Microsoft Foundry | Embedding model swaps without index rebuilds, api-version / max_completion_tokens mismatches, dropped prompt guardrails/citations, Azure Document Intelligence layout drift, Content Safety false refusals, per-chunk LLM cost loops |
| Microsoft Entra ID & Azure RBAC | Control-plane vs. data-plane 403 traps (Search Service Contributor vs. Search Index Data Reader 1407120a-...), Cosmos DB sqlRoleAssignments vs. ARM RBAC, apiKeyOnly rejecting Entra tokens, User-Assigned MI missing AZURE_CLIENT_ID, missing AcrPull (7f951dda-...), Key Vault RBAC vs. Access Policy mode mismatches, OBO audience mismatches |
| Azure Compute, IaC & DevOps | Code ↔ Bicep/Terraform/ARM env var drift, .NET : vs. __ Linux mapping (false-positive safe), Container Apps targetPort & readiness probe 404s, undeclared secretRef, Azure Functions AzureWebJobsStorage__accountName + Storage Blob Data Owner / Table / Queue roles, azure.yaml ↔ azd-service-name tag mismatches, Private Endpoint privatelink.* DNS & vnetRouteAllEnabled, GitHub OIDC id-token: write |
| Azure Data & Messaging | Immutable Cosmos DB partition key mismatches, cross-partition RU spikes, Service Bus queues/topics missing in IaC, missing idempotency on at-least-once Service Bus consumers, destructive SQL DROP COLUMN breaking active Azure Function workers |
| Microsoft 365, Graph & Power Platform | SharePoint RAG indexing without document ACL (allowedGroups/oid) security trimming, Entra JWT group overage (>200 groups), Graph /me called with app-only tokens, over-privileged Sites.Read.All vs. Sites.Selected, Teams SSO webApplicationInfo mismatches, hidden Power Automate / Logic Apps / Copilot Studio JSON contract breaks |
Multi-cloud by design: MindLayer's Engineering Truth Graph and Evidence schemas (
schemas/*.schema.json) are cloud-agnostic (ecosystem: azure | microsoft-365 | github | aws | gcp | kubernetes), enabling AWS, GCP, and Kubernetes packs without redesigning the core.
See Real Output (Zero Mockups)
Run MindLayer's deterministic scripts directly on the included synthetic repositories right now:
# Demo A: Catches code <-> Bicep env var mismatch that passes build & unit tests
python skills/cloud-contracts/scripts/compare_contracts.py \
examples/azure-rag/demo-a-invisible-outage/after
MindLayer Cloud Contracts | Scope: examples/azure-rag/demo-a-invisible-outage/after
Recommendation: BLOCKED_BY_VERIFIED_ISSUES (verified=1, total=1)
[ML-CONTRACT-001] (HIGH | VERIFIED) Environment variable contract mismatch: 'AZURE_SEARCH_ENDPOINT' vs 'SEARCH_ENDPOINT'
- src/config.ts:7 -> Application reads environment variable 'AZURE_SEARCH_ENDPOINT' (fallback=False).
- infra/app.bicep:15 -> Infrastructure supplies similarly named variable 'SEARCH_ENDPOINT' instead of 'AZURE_SEARCH_ENDPOINT'.
Remediation: Align the variable name across src/config.ts and infra/app.bicep.
# Demo G: Proves zero false positives on a properly engineered Azure RAG system
python skills/cloud-contracts/scripts/compare_contracts.py \
examples/azure-rag/demo-g-healthy-system/after
MindLayer Cloud Contracts | Scope: examples/azure-rag/demo-g-healthy-system/after
Recommendation: NO_ISSUES_DETECTED (verified=0, total=0)
No cross-layer contract mismatches detected.
The 12 Skills Catalog
Every skill is independently installable, follows the 8-step MindLayer protocol (Discover → Understand → Map → Investigate → Verify → Challenge → Report → Revalidate), works purely in Markdown when Python isn't available, and includes a zero-dependency Python 3 deterministic helper when it is.
| # | Skill | What It Catches / Solves | Script | Install Single Skill |
|---|---|---|---|---|
| 01 | blast-radius |
Direct, indirect & cross-service impact across code, queues, DB schemas, invariants, Power Platform & tests | analyze_blast_radius.py |
--skill blast-radius |
| 02 | cloud-contracts |
Code ↔ Bicep/Terraform/ARM/Docker/CI/azd mismatches (env vars, ports, queues, Cosmos PKs, Functions, APIM) | compare_contracts.py |
--skill cloud-contracts |
| 03 | identity-trace |
Entra ID, OAuth 2.0, OBO, Graph, Key Vault, ACR, AKS Workload Identity & control-vs-data-plane RBAC 403s | trace_identity.py |
--skill identity-trace |
| 04 | tenant-isolation |
Cross-tenant & M365 SharePoint ACL leaks across Azure AI Search RAG, Cosmos DB, SQL, Redis caches & workers | audit_tenant_isolation.py |
--skill tenant-isolation |
| 05 | ai-regression |
Prompt, model, api-version, embedding, chunking, Document Intelligence & tool schema regressions + Foundry eval plans |
diff_ai_surface.py |
--skill ai-regression |
| 06 | implementation-proof |
Fake 200/202 stub endpoints, swallowed errors, unwired UI buttons, and nonexistent/undeclared SDK imports |
check_implementation.py |
--skill implementation-proof |
| 07 | deployment-proof |
Evidence-backed release readiness (what-if, probes, secretRef, RBAC ordering, slots, approval boundaries) |
verify_release.py |
--skill deployment-proof |
| 08 | cost-impact |
LLM/embedding loops, AI Search replicas/Semantic Ranker, Cosmos RUs & Log Analytics spikes (never invents pricing) | estimate_cost.py |
--skill cost-impact |
| 09 | incident-replay |
UTC log/trace normalization, automatic secret redaction, separating temporal correlation from verified causation | build_timeline.py |
--skill incident-replay |
| 10 | rollback-plan |
Irreversible SQL drops, Cosmos PK / Search index breaks that git revert cannot undo + expand-and-contract plans |
analyze_rollback.py |
--skill rollback-plan |
| 11 | system-memory |
Opt-in local .mindlayer/ verified architectural knowledge with file:line provenance & SHA-256 staleness checks |
memory_store.py |
--skill system-memory |
| 12 | change-review |
Flagship Orchestrator — routes only relevant skills per diff (CSS PR skips Azure RBAC; SQL migration routes rollback + blast radius) | route_review.py |
--skill change-review |
Core Architecture: ETG & Evidence Protocol
flowchart LR
Diff["Git Diff / PR / Prompt"] --> CR["change-review\n(Intelligent Router)"]
CR --> Skills["Relevant Specialized Skills\n(Progressive Disclosure)"]
Skills --> ETG["Engineering Truth Graph\nJSON / JSONL (No Graph DB)"]
Skills --> Det["Python 3 Stdlib Verifiers\n(Read-Only · Path-Safe)"]
ETG --> Challenge["Challenge Step\n(Actively Disprove False Positives)"]
Det --> Challenge
Challenge --> Report["Structured Report\nVERIFIED · INFERRED · UNVERIFIED"]
- Engineering Truth Graph (docs/engineering-truth-graph.md): Portable JSON/JSONL graph (
schemas/graph.schema.json+scripts/etg.py) supporting 33 node types, 22 relationship types, direct/indirect/reverse traversal, cycle detection, transitive blast radius, SHA-256 stale-evidence checks, and snapshot diffs — requiring no graph database. Partial, verified graphs always beat comprehensive hallucinated graphs. - Unified Evidence Protocol (docs/evidence-protocol.md): Every finding (
schemas/finding.schema.json) mandates real file/line locators, separates severity from verification status, forbids invented pricing or arbitrary risk percentages, and records checked compensating controls indisproofChecked.
7 Runnable Synthetic Demonstrations
All examples under examples/ are clearly labeled synthetic reference scenarios containing before/, after/, fixed/, expected-finding.json, and a runnable regression_test.py:
| Demo | Failure Mode Demonstrated | Skill | Run Regression Test |
|---|---|---|---|
| A | Invisible Production Outage (AZURE_SEARCH_ENDPOINT vs SEARCH_ENDPOINT) |
cloud-contracts |
python -m unittest examples/azure-rag/demo-a-invisible-outage/regression_test.py |
| B | Enterprise Data Leak (missing tenantId OData filter in RAG search) |
tenant-isolation |
python -m unittest examples/multitenant-saas/demo-b-enterprise-data-leak/regression_test.py |
| C | Unexpected Cloud Bill (+5 chat & +5 embedding calls inside loop) | cost-impact |
python -m unittest examples/azure-rag/demo-c-unexpected-cloud-bill/regression_test.py |
| D | Impossible Rollback (DROP COLUMN while Python worker still selects it) |
rollback-plan |
python -m unittest examples/event-driven-system/demo-d-impossible-rollback/regression_test.py |
| E | Fake Implementation (POST /api/documents/upload returns hardcoded 202) |
implementation-proof |
python -m unittest examples/event-driven-system/demo-e-fake-implementation/regression_test.py |
| F | Identity Failure (control-plane Search Service Contributor vs data-plane Search Index Data Reader) |
identity-trace |
python -m unittest examples/microsoft-graph-app/demo-f-identity-failure/regression_test.py |
| G | Healthy Reference System (zero false positives across all 5 auditors) | All auditors | python -m unittest examples/azure-rag/demo-g-healthy-system/regression_test.py |
Verification, Benchmarks & Security
Run All Local Checks
python scripts/validate_skills.py # Agent Skills spec & standalone self-containment
python scripts/validate_schemas.py # 6 JSON schemas + demo finding conformance
python -m unittest discover -s tests -v # 31 unit, ETG, Azure contract & security tests
python evals/run_deterministic_bench.py # 56-case MindLayer Bench deterministic runner
- MindLayer Bench (evals/README.md): 56 structured evaluation cases (
activation,correctness,false-positives,cross-layer,adversarial). Deterministic checks run locally and in CI; live LLM/agent A/B evaluations are explicitly markednot_rununtil executed — MindLayer never publishes fabricated AI benchmark scores. - Security Guarantees (docs/security-model.md): Read-only by default, zero telemetry, path-traversal protection, prompt-injection defense against untrusted code/READMEs/commit messages, automatic log token redaction, and explicit disclosure when offline analysis cannot observe live Azure Portal ("ClickOps") state.
Documentation
| Guide | Purpose |
|---|---|
| Getting Started · Installation | Quickstart prompts, npx skills commands & manual paths |
| Compatibility Matrix | Locally tested vs. documentation-verified environments & limits |
| Architecture · ETG Spec · Evidence Protocol | Deep technical design |
| Competitive Landscape | Honest comparison against Microsoft skills, Overmind, Checkov, Infracost & PR bots |
| Skill Authoring · Security Model · Product Roadmap | Contributing new skills, AWS/GCP expansion & CI SARIF roadmap |
Contributing & License
Pull requests for new Azure/M365 edge cases, AWS/GCP/Kubernetes packs, false-positive tests, and MindLayer Bench cases are welcome. Read CONTRIBUTING.md and SECURITY.md.
Licensed under the MIT License.
Independent Project Disclaimer: MindLayer is an independent open-source project and is not affiliated with, sponsored by, or endorsed by Microsoft Corporation or any cloud provider. Azure, Microsoft Entra ID, Microsoft Foundry, Microsoft Graph, Microsoft 365, Power Platform, and GitHub are trademarks of their respective owners.
Explore related projects
Loading…