Skip to content

handling and exploring artifacts #721

@Xavier-Brinon

Description

@Xavier-Brinon

Feature Request: Numbered Artifact Files + Browser UI

I'd like to keep a chronological order when exploring artifacts.

Summary

Two related improvements inspired by
MADR (Markdown Architectural Decision
Records):

  1. Numbered artifact filenames — prefix every change artifact with
    a zero-padded sequence number so artifacts sort chronologically and
    can be referenced unambiguously by number.
  2. Artifact browser — a lightweight tool (CLI or web UI) to list,
    filter, and read all artifacts across changes, similar to what
    Log4brains or
    adr-viewer do for ADRs.

Motivation

Problem 1 — artifacts have no stable, ordered identity

Today a completed change lives at
openspec/changes/archive/YYYY-MM-DD-<name>/. Inside it, artifact
files are named by role (proposal.md, design.md, tasks.md) but
carry no global sequence number. This means:

  • You cannot say "see change feat: Update spec change format #3" in a conversation or commit
    message.
  • Shell ls sorts alphabetically by name, not creation order.
  • Cross-linking between changes ("this supersedes Add init command for OpenSpec #7") is not
    possible without full path quoting.
  • Archive folder names already carry the date, but the date alone is
    ambiguous when multiple changes are archived on the same day.

MADR solved this for ADRs by adopting the convention
NNNN-title-with-dashes.md (four zero-padded digits, up to 9 999
records). The same principle applied to opsx changes would give each
change a globally unique, stable, sortable identifier.

Problem 2 — no way to browse the artifact corpus

Once a project accumulates tens of archived changes, finding relevant
history requires grep or manual directory traversal. MADR's
ecosystem grew an entire family of tools to address exactly this:

  • Log4brains — static site
    with search, rendered from markdown on disk.
  • adr-viewer
    single-command Python app that generates a searchable HTML page.
  • Backstage ADR
    plugin

    — enterprise-scale search across multiple repos.
  • ADR Manager — web UI connected to GitHub.

opsx has no equivalent. Proposals, specs, designs, and tasks are only
readable if you know the exact file path.


Proposed Changes

1. Numbered change directories

Assign each change a zero-padded four-digit sequence number at creation time:

openspec/changes/
  0001-scaffold-and-pipes/
  0002-book-crud/
  0003-status-machine/
  ...
  archive/
    0001-scaffold-and-pipes/   ← number preserved on archive
    0002-book-crud/

The sequence counter is maintained in a single file (e.g.,
openspec/.change-counter) or derived by scanning existing
directories — whichever is simpler. The openspec new change <name>
command would assign the next number automatically and create
NNNN-<name>/.

Benefits:

  • Stable short references: "change 0003", "feat: Update spec change format #3".
  • ls sorts chronologically without relying on date prefixes.
  • Archive preserves the number, so 0003-status-machine remains
    0003-status-machine after archiving, not
    2026-02-18-status-machine.
  • Cross-change references in design.md or tasks.md are unambiguous.

2. Numbered spec files within a change

Extend numbering to the artifact files themselves:

openspec/changes/0001-scaffold-and-pipes/
  proposal.md          ← role-named, single file, no number needed
  design.md
  tasks.md
  specs/
    0001-project-scaffold/
      spec.md
    0002-dotenvx-setup/
      spec.md

Spec capability folders already have names; adding a number makes
ordering explicit when multiple capabilities ship in one change.

3. openspec list command (CLI browser)

A new subcommand that renders a summary table of all changes:

$ openspec list

  #     Name                   Status     Artifacts   Date
  ────────────────────────────────────────────────────────
  0003  status-machine         active     3/4         2026-02-17
  0002  book-crud              archived   4/4         2026-02-10
  0001  scaffold-and-pipes     archived   4/4         2026-02-05

Options:

  • --active — show only in-progress changes
  • --archived — show only archived changes
  • --json — machine-readable output for piping

4. openspec browse command (optional, stretch goal)

Launch a local static site (similar to Log4brains) that renders all
artifacts as navigable HTML with full-text search. Implementation
could reuse an existing tool (Log4brains, adr-viewer) or be a thin
wrapper around a markdown-to-HTML converter pointed at
openspec/changes/.

Thank you 🙆‍♂️

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