Skip to content

feat(aidd-dev): validate acceptance criteria against repository rules and detect contract drift #1421

Backlog

Description

@waewoo

Problem

An issue can define acceptance criteria (AC) that conflict with repository rules, documented architecture, or existing technical contracts. These conflicts may remain unnoticed until implementation or PR review.

Requirements may also become outdated when the framework evolves after an issue has been validated.

A concrete example is #914 / PR #992:

  • AC16 required verification dates, while a later repository rule prohibited dates in documentation and tests.
  • AC6 specified categorized Kilo rules with individual configuration entries, while the newer shared writer architecture adopted flat rules and a glob.
  • Several implementation rounds were completed before the differences between the original requirements and the current architecture were explicitly reconciled.

Existing planning and review workflows inspect project rules and implementation conformity, but do not explicitly validate the acceptance criteria themselves against current repository constraints or track changes to their validity.

Scope

  • Define a reusable, read-only consistency assessment between issue acceptance criteria and applicable repository rules, architecture, and documented technical contracts.
  • Integrate the assessment into appropriate existing workflows: issue preparation or validation where supported, SDLC framing or planning before implementation, and review or pre-PR checks when relevant inputs change.
  • Distinguish an existing contradiction from requirements made outdated by subsequent repository changes.
  • Identify conflicting AC, authoritative sources, and relevant file or commit references.
  • Request an explicit human decision when a material conflict changes the agreed outcome.
  • Record the resolution in existing workflow artifacts so subsequent steps can use the agreed contract.
  • Reuse existing planning, review, and rule-discovery mechanisms rather than introducing a parallel review framework.

Acceptance criteria

  • A proposed issue with an AC that contradicts an applicable repository rule produces an explicit conflict report before the issue is considered implementation-ready.
  • A validated issue is reassessed against current repository constraints before implementation planning is finalized.
  • A rule or architecture change introduced after issue validation can be reported as requirement drift, with evidence of the relevant change.
  • Every reported contradiction identifies the affected AC and the conflicting source with precise references.
  • Confirmed contradictions, possible conflicts, and insufficient evidence are distinguishable.
  • A material conflict requiring a change to the agreed outcome triggers a human decision before implementation proceeds.
  • The user can choose to retain an existing requirement through an explicitly authorized exception, revise the requirement, or request a change to the governing rule.
  • No issue, rule, or architectural document is modified automatically as a consequence of this assessment.
  • The accepted resolution is recorded in existing workflow artifacts and remains available to subsequent planning and review steps.
  • Review can identify a new conflict introduced since the previous assessment without repeating unnecessary work when relevant inputs are unchanged.
  • Existing compliant issues continue without additional mandatory human interaction.
  • Tests cover an initial AC conflict, drift introduced after issue validation, explicit human resolution, and a conflict-free scenario.

Prior art in this repo

Out of scope

  • Replacing the existing planning or review workflows.
  • Automatically rewriting issue acceptance criteria.
  • Automatically changing repository rules or architecture.
  • Introducing a new standalone agent, skill, or CI pipeline solely for this assessment.
  • Reopening PR feat(aidd-context): add Kilo-native generation targets #992 or restoring its implementation.
  • A general-purpose architecture refactoring audit or test-quality framework.
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

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions