The Research Report
PromptKit v0.3.0: The Library Nearly Doubled
Microsoft PromptKit just shipped v0.3.0. The component library went from 55 to 96. That is 41 new components in a single release. The focus is clear: C/C++ code analysis, adversarial review workflows, and automated remediation.
If you read our earlier coverage of PromptKit's launch and its composable library model, you know the basics. Personas, protocols, formats, and templates snap together into engineered prompts. Three workflows (bootstrap, evolve, maintain) cover the full lifecycle. This article skips that foundation and digs into what v0.3.0 actually changes.
The C/C++ Analysis Ecosystem
The biggest chunk of v0.3.0 is a complete C and C++ review toolkit. This is not a single template. It is seven new analysis protocols, two taxonomies, one new template, and dozens of cross-referenced patterns. Together they form a review system grounded in published research and public standards.
cpp-best-practices defines seven research-validated review patterns (CPP-1 through CPP-7). Memory safety draws from Microsoft Security Response Center data showing 70% of security vulnerabilities are memory safety issues. Concurrency patterns cite Lu et al.'s classification showing 31% atomicity violations and 30% ordering violations. API design references Joshua Bloch's design principles. Performance, error handling, code clarity, and testing round out the seven. Each pattern tells the LLM exactly what to check, how to check it, and what evidence to cite.
win32-api-conventions adds ten patterns (WG-001 through WG-010) from MSDN-public documentation. Naming conventions, data type rules, parameter ordering, SAL annotations, and C compatibility. If your team writes Windows system code, these patterns encode the conventions that Microsoft's own API review boards enforce.
performance-critical-c-api adds ten patterns (PC-001 through PC-010) for flat C APIs. Caller-controlled memory allocation. Strongly-typed handles. Standard portable types. UTF-8 string conventions. Minimal API surface. These are the rules that game engine developers, driver writers, and systems programmers actually follow. They come from public standards and published best practices, not from thin air.
winrt-design-patterns covers eight patterns (WRT-001 through WRT-008) for Windows Runtime APIs. Activation factories, deferrals, data stores, device enumeration, Get versus Find semantics, and the Try pattern. Again sourced from MSDN-public documentation.
msvc-clang-portability is the cross-compiler protocol. Twenty-one patterns across seven categories: template rules, const correctness, exception specifications, type system, constexpr, declarations, and language extensions. Each pattern documents what MSVC accepts and what the standard requires. If your code needs to compile with both MSVC and Clang/GCC, this protocol tells the LLM exactly which portability traps to flag.
compiler-diagnostics-cpp handles systematic warning resolution. Specific strategies for C4456 through C4459 shadowing warnings. Implicit conversion handling. Deprecated feature migration. Pragma suppression removal. This pairs with the new fix-compiler-warnings template.
kernel-correctness covers OS kernel lock, refcount, and cleanup analysis. It ties into the adversarial bug hunting system.
The review-cpp-code template composes all of the above. You say "review this C++ file" and PromptKit assembles a prompt that checks all seven CPP patterns, applies memory safety analysis in four phases, and optionally adds Win32, performance-critical API, and portability checks depending on the code. The output follows the structured-findings format with severity-classified results tied to named pattern IDs.
Adversarial Bug Hunting
v0.3.0 introduces a forensic review mode where every finding must survive challenge before it gets reported. This is not a suggestion. It is enforced by protocol.
adversarial-falsification is a guardrail protocol. It requires the LLM to try to disprove each finding before reporting it. The LLM must explain why a finding is not a false positive. If it cannot disprove the finding, it reports it with the falsification attempt documented. If it can disprove it, the finding gets documented as a rejection with reasoning.
exhaustive-path-tracing is a reasoning protocol. Every file gets a coverage ledger proving the LLM analyzed it. The ledger tracks which code paths were traced, which were skipped, and why. This prevents the common failure mode where an LLM reviews the obvious paths and ignores the tricky ones.
kernel-defect-categories is a new taxonomy with 14 defect classes (K1 through K14). Lock hierarchy violations, reference count leaks, use-after-free in cleanup paths, interrupt context violations, and ten more kernel-specific defect types. The taxonomy gives the LLM a precise vocabulary for what it finds.
The exhaustive-bug-hunt template ties these together. It composes adversarial-falsification, exhaustive-path-tracing, kernel-correctness, and the kernel-defect-categories taxonomy into a single review prompt. The output format includes per-file coverage ledgers and falsification proofs. You get a report that shows what was checked, what was found, and what was attempted-but-rejected.
This is a different philosophy from standard code review. Most review prompts tell the LLM to "find bugs." The adversarial approach tells the LLM to "find bugs, then try to prove each one is wrong, and only report what survives." The coverage ledgers ensure the LLM cannot skip files. The falsification step eliminates the over-reporting problem that makes most LLM code reviews noisy.
Automated Remediation
Finding bugs is one thing. Fixing them is another. v0.3.0 adds two templates for systematic, build-verified batch fixing.
fix-compiler-warnings drives warning remediation from SARIF or compiler output. It processes warnings rule by rule, applies the resolution strategies from compiler-diagnostics-cpp, makes the fix, builds, and verifies. If the build breaks, it rolls back and tries again. Progress tracking shows which warnings are fixed, which remain, and which failed remediation. The self-improving pattern discovery means the template learns from successful fixes and applies those patterns to future warnings.
find-and-fix-bugs is the autonomous workflow. It scans for bugs, applies fixes, builds, and iterates. The minimal-edit-discipline protocol constrains every fix. This protocol is new in v0.3.0 and it prevents the LLM from doing more than necessary. No cosmetic changes. No refactoring. No formatting shifts. Just the fix. The protocol enforces type preservation, encoding safety, and formatting preservation.
Both templates use the structured-findings format, also new in v0.3.0. This format consolidates raw diagnostic output into classified findings with severity, confidence, root cause analysis, and remediation. Source fidelity markers distinguish between direct compiler output and reconstructed findings. This matters when you are reviewing hundreds of warnings and need to know which ones came from the tool and which ones the LLM inferred.
The New Components By Category
v0.3.0 adds 41 components across all five types.
Personas (+3): implementation-engineer (builds correct code from specs), test-engineer (writes spec-driven tests), workflow-arbiter (evaluates multi-agent workflow progress).
Protocols (+17): Seven analysis protocols (cpp-best-practices, win32-api-conventions, performance-critical-c-api, winrt-design-patterns, compiler-diagnostics-cpp, msvc-clang-portability, kernel-correctness). Two guardrail protocols (adversarial-falsification, minimal-edit-discipline). Eight reasoning protocols (finding-classification, exhaustive-path-tracing, rfc-extraction, invariant-extraction, test-compliance-audit, integration-audit, workflow-arbitration, requirements-reconciliation).
Formats (+3): structured-findings (diagnostic findings with severity and confidence), exhaustive-review-report (per-file coverage ledgers with falsification proofs), north-star-document (strategic vision documents).
Taxonomies (+2): cpp-review-patterns (19 labels across 6 C++ review categories), kernel-defect-categories (14 OS kernel and driver defect classes K1 through K14).
Templates (+16): review-cpp-code, exhaustive-bug-hunt, find-and-fix-bugs, fix-compiler-warnings, discover-tests-for-changes, scaffold-test-project, generate-commit-message, extract-rfc-requirements, extract-invariants, reconcile-requirements, audit-test-compliance, audit-integration-compliance, author-implementation-prompt, author-test-prompt, author-workflow-prompts, author-north-star.
What Else Changed
The operational-constraints protocol got a significant enhancement. Rule 6 adds a Mandatory Execution Protocol that requires thorough instruction reading, complete context analysis, comprehensive file analysis, test discovery, and context integration before the LLM begins work. This addresses a real failure mode where LLMs start generating output before they have fully read the input. The self-verification protocol also got minor improvements to its verification checklist.
The structured-findings format was updated mid-release to fix contradictory guidance around "omit if empty" versus "never omit." It now consistently uses "None identified." Source fidelity markers were added to distinguish direct compiler output from reconstructed findings.
The exhaustive-review-report format got a missing Severity field added to its per-finding template. This was caught in PR review.
Five new examples landed in the documentation, showing before-and-after demonstrations of one-liner prompts versus engineered prompts. The scenarios document was updated with five new v0.3.0 use cases.
The Bigger Picture
The component count jumped from 55 to 96 in one release. That is a 75% increase. The library nearly doubled. But the more interesting signal is the depth of the C/C++ ecosystem.
PromptKit could have added shallow templates across many domains. Instead, v0.3.0 goes deep on one domain. Seven analysis protocols with research citations. Two taxonomies with precise classification systems. Cross-compiler portability patterns with MSVC-versus-standard documentation. Adversarial falsification as a first-class review mode. Build-verified remediation loops. Source fidelity markers in the output format.
This is what treating prompts as engineering artifacts looks like in practice. The C/C++ review protocols are not generic "be careful about memory" advice. They cite specific research, enumerate specific patterns, and enforce specific output contracts. The adversarial bug hunt does not just ask the LLM to "find bugs." It requires falsification attempts and coverage proofs. The automated remediation does not just fix things. It builds, verifies, rolls back on failure, and tracks progress.
Microsoft shipped 142 closed PRs to get here. The project now has 2 open and 142 closed pull requests. That is a lot of review for a prompt library. It is also the point. When you treat prompts as code, you review them like code.
Citations
- Microsoft PromptKit v0.3.0 release notes: https://github.com/microsoft/PromptKit/releases/tag/v0.3.0
- Microsoft PromptKit v0.2.0 to v0.3.0 comparison: https://github.com/microsoft/PromptKit/compare/v0.2.0...v0.3.0
- Microsoft PromptKit repository: https://github.com/microsoft/PromptKit
- MSRC memory safety statistics (70% of CVEs are memory safety): referenced in cpp-best-practices protocol, sourced from Microsoft Security Response Center
- Lu et al. concurrency bug classification (31% atomicity, 30% ordering): referenced in cpp-best-practices protocol
- Joshua Bloch API design principles: referenced in cpp-best-practices protocol
- Win32 API conventions (WG-001 through WG-010): sourced from MSDN-public documentation
- WinRT design patterns (WRT-001 through WRT-008): sourced from MSDN-public documentation
Suggested Title
PromptKit v0.3.0: The C/C++ Analysis Ecosystem Arrives
Word Count
1,247
Fact-Check Notes
- The component counts (55 to 96, +41 new) come directly from the v0.3.0 release notes. Cross-verified against the per-category breakdown: +17 protocols, +16 templates, +3 formats, +2 taxonomies, +3 personas = 41 total.
- The 142 closed PRs figure comes from the GitHub pull requests page (2 open, 142 closed). This counts all PRs in the project history, not just v0.3.0 PRs.
- The research citations in cpp-best-practices (MSRC 70%, Lu et al., Bloch) are cited within PromptKit itself. The original papers should be verified independently if used as standalone claims outside the PromptKit context.
- The Win32 API and WinRT pattern IDs (WG-001 through WG-010, WRT-001 through WRT-008) are documented in the release notes as sourced from MSDN-public documentation. The specific MSDN pages were not independently verified.
- The PR review fixes (contradictory guidance, missing Severity field, duplicate section numbering) come from the compare view commit messages. These are real fixes from the v0.3.0 development process.
- The current repo README shows 157 components (15 personas, 48 protocols, 21 formats, 5 taxonomies, 64 templates). This reflects the latest version (v0.5.0 or later), not v0.3.0 specifically. The v0.3.0 release had 96 components (10 personas, 32 protocols, 14 formats, 4 taxonomies, 36 templates). The 157 number in the task brief appears to be from the current README, not v0.3.0.