Skip to content

fix: state the risk rule in the form that survives mdformat - #86

Open
retr0h wants to merge 1 commit into
mainfrom
fix/risk-form
Open

fix: state the risk rule in the form that survives mdformat#86
retr0h wants to merge 1 commit into
mainfrom
fix/risk-form

Conversation

@retr0h

@retr0h retr0h commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The design rule in openspec/config.yaml asked for [Risk] -> Mitigation. Our own markdown formatter escapes [...] as a link reference, so the prescribed form cannot survive just md-fmt — and did so inconsistently, escaping three of four bullets in the same list:

- \[An agent does not read `AGENTS.md` before working\] -> `CLAUDE.md` points at it
- [Guidance cannot be enforced, so an agent can still use the wrong version] ->

No design has ever used it. Two invented a form that works instead — the risk in bold, an arrow, the mitigation — and that is what the rule now says.

The rule was ours

It came from config.yaml, not from OpenSpec. We wrote a rule that fights our own formatter, and nothing caught it because just validate never reads design.md — it checks that deltas are well formed, not that artifacts follow the schema.

Regenerated rather than patched

Rebuilding each design against the template found more than the arrow:

  • specify-agent-tool-invocation had no Goals / Non-Goals and no Risks / Trade-offs at all — 41 lines with two of the four required sections missing. Regenerated to 82, with four risks and a second alternative recorded on a decision that previously asserted itself.
  • specify-documentation-homes carried three findings appended as top-level ## sections after Open Questions, where they read as peers of Context and Decisions rather than as the decisions they are. Moved under ## Decisions and demoted.
  • specify-go-code-standards stated its risks as prose. Rewritten to the form, and a third risk added — a rule universal today may stop being universal, which the measurement approach already answers.
  • standardize-repository-layout needed nothing. Five risks, all in the form, all sections present.

Patching would have fixed the arrow and left the missing sections in place.

Result

Change Sections Risks Alternatives recorded
specify-agent-tool-invocation all four 4 3
specify-documentation-homes all four 3 10
specify-go-code-standards all four 3 3
standardize-repository-layout all four 5 16

The eleven archived designs are left alone. They record what was decided and why; rewriting them to satisfy a rule written after they were filed would make the archive claim a history that did not happen.

just test passes.

🤖 Generated with Claude Code

The rule asked for square brackets. The markdown formatter escapes
those as link references, inconsistently, so no design ever used the
prescribed form and two invented a bolded arrow instead.

Adopt what those two were already doing, and bring the other two
designs to it. One was missing Goals and Risks entirely; another had
three findings appended as top-level sections rather than decisions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thank you for contributing to this project! 😊🕹️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant