Feature request: `openspec drift` — detect divergence between git changes and active change scope
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- git, typescript
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
Start by reading src/core/store/git.ts to understand the existing git utilities, then inspect the CLI command structure and how it parses tasks.md and design.md. Define how file references map to git changes and how phantom completions are identified; done means reporting aligned and unscoped changes and checked tasks with untouched paths, with --json output. The issue proposes the behavior but does not name CLI files or tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The problem, in one or two sentences
During implementation (/opsx:apply or manual coding), there is no way to verify whether the files actually modified in git match the scope declared in tasks.md and design.md. Coding agents can silently touch files outside the plan (scope creep or unintended regressions) or check off tasks without actually modifying the relevant files (phantom completions), with no CLI command to catch this drift before archiving or opening a PR.
Who this affects
Everyone using coding agents (Claude Code, Cursor, Copilot, Cline, etc.) and teams reviewing PRs. Because agents frequently make extraneous edits or hallucinate task completion, verifying that the git working tree aligns with the spec is currently a tedious, manual review step for every change.
Alternatives you considered
openspec validate: Only checks Markdown schemas, structure, placeholders, and RFC 2119 keywords insideopenspec/. It has zero awareness of the git working tree or codebase files./opsx:verify: Relies entirely on the LLM's subjective self-evaluation inside the agent chat session. It consumes substantial token context, can be nondeterministic, and does not provide a fast, offline verification in CI or terminal.- Manual
git status/git diff: Developers and reviewers must manually cross-reference dozens of changed lines against task checkboxes.
Why it's worth the added complexity
OpenSpec’s core value is keeping agents and humans honest on a single plan. Catching drift between the spec plan and actual code before archiving or merging is the missing link between spec authoring and code implementation.
- Zero heavy dependencies: OpenSpec already has git utilities in
src/core/store/git.ts. - Fast & deterministic: Runs in sub-second CLI time without needing an LLM call.
- CI-friendly: Can run as a gate in pull requests (
openspec drift --strict/--json) to ensure PRs don't introduce un-scoped changes.
What you have in mind
A lightweight command like openspec drift [change-name] (or flag on openspec validate):
- Extract scope from change artifacts:
- Parse file paths, directories, and components referenced in
tasks.mdanddesign.md.
- Parse file paths, directories, and components referenced in
- Inspect git changes:
- Read modified files from
git status --porcelain(orgit diff --name-only <base>...HEAD).
- Read modified files from
- Report alignment:
- Unscoped changes: files modified in git with no reference or relevance in the active change.
- Phantom completions: tasks marked
[x]whose referenced files/paths were never touched. - Aligned changes: summary of files modified that match planned tasks.
- Provide
--jsonoutput complying with the agent contract for tool integration.
I would love to help design and implement this if the maintainers agree this fits OpenSpec's roadmap!
- 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
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.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Fission-AI/OpenSpec
-
enhancement needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Fission-AI/OpenSpec#2337 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Fission-AI/OpenSpec#2311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-specs skill overwrites an existing ADDED requirement, contradicting the CLI's no-op/conflict rule from #1376Có thể làm lại được @vaibhavdabas16 đã nhận 10 ngày trước và không có pull request nào đang mở. Đang mởapproved
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Fission-AI/OpenSpec#2289 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Fission-AI/OpenSpec#2208 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Document the RFC 2119 keyword rule (attribution lost in docs rebuild) and its clarification update RFC 8174Có thể đã có người làm @sofiaali1521-cloud đã nhận 5 ngày trước. Đang mởdocumentation needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Fission-AI/OpenSpec#2200 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Fission-AI/OpenSpec
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nicobailon/pi-subagents#3425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[PORT] A2A: map audio file parts to audio content and ignore MIME parameters (TS→Py)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea-a2a bug port python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
strands-agents/harness-sdk#6697 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
opencollective/opencollective#9235 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
openwatersio/slackwater#603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày