Skip to content

[Feature Request] Reverse-engineer specs from existing implementations (code-first workflow) #724

Description

@alfred-openspec

Problem

Teams adopting OpenSpec often have members who prefer implementing features manually with minimal AI assistance. After implementation, they need a way to generate specs and documentation retroactively from the existing code.

Currently, OpenSpec is optimized for a spec-first workflow. There is no native support for generating specs from already-implemented code.

User Story

"I have a specific use case: for team members who prefer to implement features manually with minimal AI assistance, is it possible to generate the specifications and documentation after the code is written? Specifically, can /opsx:verify be used to 'reverse-engineer' these artifacts then archive it?"

"In your experience, do you recommend generating specs for manual implementations, or is the tool optimized for a 'spec-first' workflow?"

— Ousama Esbel (Discord, rolling out to a 15-person team)

Context

  • Team of 15 members with mixed workflows (some AI-assisted, some manual coding)
  • Need to reduce rework and AI variability across different tools, rules, and prompts
  • Want all work captured in specs regardless of how it was implemented

Current Workaround

Prompt your coding agent to create specs from the current codebase. However, this is manual and not part of any built-in workflow.

Design Consideration

Specs store contracts of intent and user experience. Even reverse-engineered specs should be reviewed by humans before becoming the context that agents treat as ground truth.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions