Skip to content

Add embedded-firmware-engineer persona, spec-invariant-audit protocol, and audit-spec-invariants template#85

Merged
Alan-Jowett merged 1 commit intomicrosoft:mainfrom
Alan-Jowett:add-spec-invariant-audit-template
Mar 28, 2026
Merged

Add embedded-firmware-engineer persona, spec-invariant-audit protocol, and audit-spec-invariants template#85
Alan-Jowett merged 1 commit intomicrosoft:mainfrom
Alan-Jowett:add-spec-invariant-audit-template

Conversation

@Alan-Jowett
Copy link
Copy Markdown
Member

Summary

Adds three new components for adversarial specification analysis against user-supplied invariants. The protocol is domain-agnostic; the persona provides embedded firmware expertise; the template assembles them with a configurable persona so any domain can use the audit methodology.

New Components

Type Name Path Description
Persona \�mbedded-firmware-engineer\ \personas/embedded-firmware-engineer.md\ Boot sequences, flash, OTA, power-fail-safe, watchdog, recovery
Protocol \spec-invariant-audit\ \protocols/reasoning/spec-invariant-audit.md\ 7-phase adversarial spec analysis against user-supplied invariants
Template \�udit-spec-invariants\ \ emplates/audit-spec-invariants.md\ Assembles persona + protocol + investigation-report format

Design Decisions

  • Persona is domain-specific (\�mbedded-firmware-engineer), protocol + template are domain-agnostic — \spec-invariant-audit\ can be reused with any persona for any domain
  • Template uses \persona: configurable\ — at assembly time the user picks the appropriate domain persona
  • Protocol incorporates disproof discipline directly (Phase 3, step 5) rather than depending on \�dversarial-falsification, keeping it self-contained
  • Finding classification uses 5 types: Gap, Ambiguity, Contradiction, Incompleteness, Implicit Assumption
  • The template does NOT include \�dversarial-falsification\ as a separate protocol to avoid conflicting instructions (code-review-specific rules vs spec-analysis)

Checklist

  • All files have SPDX license headers
  • YAML frontmatter is valid and complete
  • Component names match file names (kebab-case)
  • manifest.yaml updated with all new components
  • No vague instructions in protocols or templates
  • Protocols have numbered, ordered phases
  • Templates have a quality checklist section
  • New components do not conflict with existing ones
  • \python tests/validate-manifest.py\ passes

…, and audit-spec-invariants template

New components for adversarial specification analysis against
user-supplied invariants:

- Persona: embedded-firmware-engineer — domain expertise in boot
  sequences, flash management, OTA updates, power-fail-safe operations,
  watchdog timers, and device recovery mechanisms.

- Protocol: spec-invariant-audit — 7-phase reasoning protocol that
  systematically constructs compliant-but-violating interpretations to
  find spec gaps, ambiguities, contradictions, and missing recovery
  paths. Domain-agnostic (works with any persona).

- Template: audit-spec-invariants — assembles persona + protocol +
  investigation-report format. Uses configurable persona so it can be
  applied to any domain (firmware, protocols, safety systems, etc.).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 28, 2026 03:26
@Alan-Jowett Alan-Jowett merged commit 4d3d02e into microsoft:main Mar 28, 2026
5 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new PromptKit components to support adversarial auditing of specifications against user-provided invariants, including a reusable reasoning protocol, an embedded-firmware persona, and a new template that emits an investigation report.

Changes:

  • Added spec-invariant-audit reasoning protocol with a 7-phase invariant-focused audit methodology.
  • Added audit-spec-invariants template to apply the protocol (with configurable persona) and produce an investigation-report.
  • Added embedded-firmware-engineer persona and registered all new components in manifest.yaml.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
templates/audit-spec-invariants.md New template wiring guardrails + spec-invariant-audit protocol into the investigation-report format.
protocols/reasoning/spec-invariant-audit.md New 7-phase reasoning protocol for adversarial invariant audits of specifications.
personas/embedded-firmware-engineer.md New persona focused on embedded firmware failure modes (boot/update/power-loss/recovery).
manifest.yaml Registers the new persona, protocol, and template so the CLI can assemble them.


5. **Format the output** according to the investigation-report format
with these audit-specific additions:
- Group findings by invariant violated
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instruction to “Group findings by invariant violated” conflicts with the investigation-report format requirement that findings be ordered by severity (Critical first). Please adjust the template guidance so the Findings section remains severity-ordered (e.g., severity buckets first, then group by invariant within each bucket, or provide an invariant-grouped appendix in addition to the severity-ordered findings list).

Suggested change
- Group findings by invariant violated
- In the primary **Findings** section, maintain severity ordering as required
by the investigation-report format (Critical first, then High, Medium, Low).
Within each severity bucket, you may group or clearly label findings by
invariant violated.
- You may add an appendix that regroups the same findings by invariant
violated for cross-reference. Do not introduce new findings in the appendix;
it must only re-present findings already listed in the severity-ordered
Findings section.

Copilot uses AI. Check for mistakes.
interpretation
- **Disproof attempt**: What you checked to try to disprove this
finding, and why disproof failed
- **Confidence**: Confirmed / High-confidence / Needs-domain-check
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This protocol’s finding “Confidence” scale (Confirmed / High-confidence / Needs-domain-check) doesn’t match the investigation-report format’s required confidence values (High / Medium / Low). To prevent format drift, align the protocol with the format’s scale or explicitly instruct how to map these confidence levels into the format’s allowed values.

Suggested change
- **Confidence**: Confirmed / High-confidence / Needs-domain-check
- **Confidence**: High / Medium / Low (per investigation-report format)

Copilot uses AI. Check for mistakes.
Alan-Jowett pushed a commit to Alan-Jowett/PromptKit that referenced this pull request Mar 28, 2026
- Template: maintain severity ordering (Critical first) per
  investigation-report format instead of grouping by invariant.
  Invariant-grouped appendix is optional.
- Protocol: align confidence scale to High/Medium/Low per
  investigation-report format instead of Confirmed/High-confidence/
  Needs-domain-check.

Addresses review comments from PR microsoft#85.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alan-Jowett added a commit that referenced this pull request Mar 28, 2026
* Fix review feedback on spec-invariant-audit components

- Template: maintain severity ordering (Critical first) per
  investigation-report format instead of grouping by invariant.
  Invariant-grouped appendix is optional.
- Protocol: align confidence scale to High/Medium/Low per
  investigation-report format instead of Confirmed/High-confidence/
  Needs-domain-check.

Addresses review comments from PR #85.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update templates/audit-spec-invariants.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants