OpenSpec .md files should provide JSON metadata in the md file header that link back to the prompts used to create and/or modify them

Đang mở
#2,036 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation, tooling

Hướng nghiên cứu

The issue does not name specific files, tests, or entry points. Start by locating the agent instructions and document-generation or check-in integration for OpenSpec markdown files, then determine whether the requested scope is prompt-URI tags, YAML creation metadata, update history, or all three. Done should be defined by the project’s chosen metadata schema and verified for both newly created and updated documents.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement needs-triage
The problem, in one or two sentences

When .md files are written or updated by agents, I find it helpful to be able to trace them back to the specific agent, session, and prompt that writes them. The IETF Draft https://www.ietf.org/archive/id/draft-boone-prompt-uri-scheme-01.html descripts the prompt-uri scheme, and suggests how it might be used in check ins, and metadata enabling documentation of the prompt used to create or update the md file. This content enables agents to search prior sessions for prompts, and users to understand how the content came to be created, which gives additional historical context enabling a user to track how a change has progressed over time, giving more context to both the user and the agent.

In this feature request, I am minimally requesting that agents be directed that checkins of files using the @Prompt-URI tag in the check in.

I would love this feature even more if it guides the agents in creation of appropriate .md file yaml metadata to include some metadata in yaml format in the md file about each file creation. or update:

schema_version: '1.0'
document_type: openspec-proposal        # or openspec-design, openspec-spec, openspec-tasks
created:
  date: '2026-10-03T17:21:07.546Z'       # * strongly recommended — MCP-generated, RFC 3339 UTC, ms precision
  user: kboone                           # * strongly recommended — MCP-generated, OS username
  agent:
    name: claude-code                    #   less critical — e.g. claude-code, github-copilot-cli
    version: '2.1.263'                   #   less critical — actual CLI/tool version
  llm:
    name: claude-sonnet-5                #   less critical — e.g. claude-sonnet-5, claude-sonnet-4-6, gpt-5
    version: '20260101'                  #   less critical — model release-date snapshot, format varies by vendor
  prompt_uri: 'prompt:/claude-code/d4131666-810c-4b6e-b704-fe0024e84f15/~5f6d82c0-ab47-4e61-ae1b-c77e9fbd78a2'                             # * strongly recommended — MCP-generated, draft-boone-prompt-uri-scheme-01
  summary: 'Initial proposal for the X capability'   # * strongly recommended
updated:
  - date: '2026-10-03T18:05:44.112Z'     # * strongly recommended
    user: kboone                          # * strongly recommended
    agent:
      name: claude-code
      version: '2.1.263'
    llm:
      name: claude-sonnet-5
      version: '20260101'
    prompt_uri: 'prompt:/claude-code/d4131666-810c-4b6e-b704-fe0024e84f15/~a3bb21c4-...'  # * strongly recommended
    summary: 'Added Impact section after SME review'  # * strongly recommended 

The metadata makes it so much easier to track back the change request work through possibly several different agent sessions, even across multiple agents (something I've been known to do when I run out of tokens on one agent is switch to another one that has tokens left).

Who this affects

Anyone working with multiple changes, especially across different agents and sessions.

What you tried

I have existing MCPs which force agents to create MD files with appropriate metadata and prompt URIs, and github actions on checkin which forcibly add the @Prompt-URI tag to the checking (they are documented in the IETF draft), but I'd love to see this draft more broadly used in Agentic tooling.

What you have in mind

Minimally, When a specification is checked in, or a change is pushed the checkin comment, or push comment comment contains the @Prompt-URI metadata tag at the end so that folks can trace it back, or at least the developer creating it can trace it back to a specific session and prompt.

Ideally, When change request documents are created, the creation and update metadata is recorded so that history can be tracked over time in yaml metadata in the .md files.

Ngôn ngữ chính
TypeScript
Star
76k
Fork
5.2k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
58

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Fission-AI/OpenSpec

Tất cả issue của Fission-AI/OpenSpec

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.