Skip to content

[documentation-writing-alignment] Reconcile the diagnosis rule for intent and implementation mismatches #281

Description

Context and request

Contributors and agents receive incompatible instructions when documented intent and running code disagree. Preserve one explicit diagnosis rule across the principle pages without assuming that either side is always correct.

Observed and expected behavior

At reviewed source 7f19e88045ee50d2e26a39387f44602961deaf90, AI-first development says: If the docs and the code disagree, the docs are wrong — fix the docs, fix the tests, then fix the code to match. Engineering practices instead says either intent or implementation can be wrong and requires diagnosis before choosing the correction.

A reader comparing the same mismatch must not receive incompatible first actions. The owner must establish the intended rule and make both explanations consistent. This issue records the defect; it does not select that rule.

Reproduction, environment, and regression

Read the two linked sections and apply them to a case where implemented behavior violates an otherwise valid requirement. One directs the reader to declare the documentation wrong; the other directs diagnosis. This is a source-contract defect, not evidence of a runtime defect. The discrepancy is retained from campaign baseline 1b0d4893c8fefabe604d04393068a8ff6f848082; a last known consistent version is unknown. No authoritative workaround is established.

Acceptance criteria

  • Both sections state compatible actions for wrong intent, wrong implementation, and an unresolved mismatch.
  • The chosen authority and diagnosis rule is explicit and preserves the approved owner decision.
  • Existing test-first and context-first requirements, unrelated principles, headings, and links remain correct.

Technical decisions

Scope is the two principle sections and only directly coupled references. No runtime change or new enforcement tool is requested. The conflicting policy interpretation must be resolved by its owner before implementation readiness; this capture is not a ready delivery authorization.

Implementation plan

  • Record the conflicting before cases and the owner-approved expected action for each case before editing.
  • Reconcile the two sections in one focused change without unrelated policy changes.
  • Repeat the cases and existing Markdown/link checks; retain the decision and before/after evidence in the delivery record.

References

Discovered in MSXOrg/docs#263 and preserved outside MSXOrg/docs#273. This follow-up is not delivered or closed by that writing PR.

Activity

  1. MariusStorhaug commented on Dec 2, 2026

    @MariusStorhaug
    MemberAuthor

    Decision

    Use evidence-based diagnosis. Documented intent defines desired behavior; running code shows actual behavior. A mismatch alone does not establish which artifact is wrong.

    Case Expected action
    Valid intent, wrong implementation Preserve correct documents and tests. Fix the implementation and add a focused regression check when coverage is missing.
    Wrong intent Confirm the corrected intent. Update the affected document, specification, or issue before aligning affected tests and code.
    Unresolved mismatch Collect evidence and request a decision before changing the disputed contract. Record what remains unknown.

    Preserve already-correct artifacts rather than rewriting them for consistency alone. Keep context-first and test-first requirements where the intended contract changes.

    The correction is proposed in #306 as part of the shared working agreement and documentation evaluation tracked by #305. Existing validation, independent review, and merge requirements remain in force.

  2. MariusStorhaug commented on Dec 2, 2026

    @MariusStorhaug
    MemberAuthor

    The approved diagnosis-first rule is implemented in #306 at beaffa3. The previous AI-first instruction declared the documentation wrong for every mismatch; Engineering Practices required diagnosis.

    Re-reading both final sections produces compatible actions for all three acceptance cases:

    Case Action after the correction
    Valid intent, wrong implementation Preserve correct documents and tests. Fix implementation and add focused regression coverage when missing.
    Wrong intent Confirm corrected intent. Correct the owning document, specification, or issue before updating affected tests and code.
    Unresolved mismatch Collect evidence and request a decision before changing the disputed contract. State what remains unknown.

    AI-first Development links to the explicit cases in Engineering Practices. Context-first and test-first requirements remain, and a behavior-preserving refactor no longer requires unrelated document changes.

    Markdown and link checks pass. All five validation jobs pass on beaffa3: Docs CI and Cross-repository links. The earlier owner decision and this before/after record remain with the issue. The issue stays open until normal pull-request delivery completes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions