Skip to content

[Feature Request] Spec-to-Implementation Gap Classification and Metrics #42

Description

@kanfil

Summary

Add gap classification (Intent→Spec vs Spec→Implementation) and track spec quality metrics for harness improvement.

Problem

InfoQ article "Long-Term Direction" discusses:

  • Classifying gaps as "Intent→Spec" or "Spec→Implementation"
  • Using gap data to improve specification harness
  • Tracking spec quality as governance metrics

Current State

Already Implemented:

  • /spec.trace - Session trace generation

    • Templates: templates/commands/trace.md, templates/trace-template.md
    • Scripts: scripts/bash/generate-trace.sh, scripts/powershell/generate-trace.ps1
    • Scripts: scripts/bash/validate-trace.sh, scripts/powershell/validate-trace.ps1
    • Tests: tests/test_trace_command.py
    • 5-section trace: Session Overview, Decision Patterns, Execution Context, Reusable Patterns, Evidence Links
  • /spec.analyze - Cross-artifact validation

    • Detects discrepancies between spec, clarifications, plan, tasks, constitution
    • Non-destructive alignment report

Still Needed:

  • Gap classification (Intent→Spec vs Spec→Implementation)
  • Metrics tracking (quality scores, gap frequency)
  • Feedback to constitution improvement

Proposal

1. Gap Classification

  • In /spec.analyze, classify gaps by type:
    • "Intent→Spec": Missing requirements, unclear acceptance criteria
    • "Spec→Implementation": Code doesn't match spec, incomplete features

2. Metrics Tracking

  • Track: spec quality score, gap frequency, revision cycles
  • Dashboard or report showing spec health over time

3. Feedback to Constitution

  • Use gap data to suggest constitution improvements
  • Pattern: repeated gaps → constitution rule addition

Priority

Low-Medium - Advanced feature, differentiates from competitors

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions