Skip to content

Document TypeSpec API contracts in formal-methods guidance - #79840

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan/redesigned-goggles
Nov 21, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan/redesigned-goggles

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

API consumers need definitions in different formats without maintaining separate copies of the same contract. The formal-methods instructions now direct agents to define APIs in TypeSpec and generate formats such as OpenAPI and JSON Schema from the same source.

The guidance also explains how to keep generated outputs in sync and distinguishes contract compilation from implementation verification.

Validation: make check-instruction-prefixes, python3 scripts/check-instruction-prefixes.py .github/aw/formal-methods.md, and git diff --check passed.

@pelikhan
pelikhan marked this pull request as ready for review November 21, 2026 17:38
Copilot AI adaptive review requested due to automatic review settings November 21, 2026 17:38
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #79840 · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #79840 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

Matt Pocock Skills Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@pelikhan
pelikhan merged commit 4303d43 into main Nov 21, 2026
57 checks passed
@pelikhan
pelikhan deleted the pelikhan/redesigned-goggles branch November 21, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The added TypeSpec rule is not yet actionable because it neither accounts for repository-specific generation commands nor requires a reproducible, pinned toolchain for generated output.

2 open issues
What changed in this PR

Updates shared formal-methods guidance to cover TypeSpec API contracts and generated consumer formats, while distinguishing contract compilation from implementation verification.

Changes:

  • Adds TypeSpec guidance for defining API operations, payloads, and errors.
  • Documents generating OpenAPI and JSON Schema outputs and handling generated-output drift.
  • Preserves the existing TLA+/TLC and Koka verification guidance.
File Description
.github/​aw/​formal-methods.md Adds TypeSpec API-contract guidance, generated OpenAPI and JSON Schema workflows, and clarification that compilation does not verify implementation behavior.

Review effort: Lite (adaptive)

Comment on lines +19 to +21
- Compile the TypeSpec definitions and regenerate the configured outputs when
the contract changes. Fix drift in the `.tsp` source or emitter configuration,
not in generated files. Compilation checks the contract, not implementation behavior.
Comment on lines +19 to +21
- Compile the TypeSpec definitions and regenerate the configured outputs when
the contract changes. Fix drift in the `.tsp` source or emitter configuration,
not in generated files. Compilation checks the contract, not implementation behavior.
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