Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Aug 25, 2025

Summary

  • Comprehensive update to OpenSpec agent instructions based on retrospective analysis
  • Addresses critical documentation gaps identified in user experience
  • Adds troubleshooting and debugging guidance

What Changes

This PR updates the OpenSpec agent instructions to follow best practices for AI coding assistants and addresses all critical issues identified in the comprehensive retrospective.

Key Improvements:

  • Three-stage workflow prominently documented (Create → Implement → Archive)
  • Complete CLI documentation for all 9 commands with examples
  • Scenario formatting - The feat: initialize typescript project #1 pain point, now fully documented
  • Spec file structure examples with ADDED/MODIFIED sections
  • Troubleshooting section with common errors and solutions
  • Debugging commands for delta detection issues
  • 50% length reduction while maintaining all critical information

Critical Additions (from Retrospective):

  1. ✅ Scenario format documentation (#### Scenario: headers) - was "COMPLETELY MISSING"
  2. ✅ Complete spec file examples - prevents structural errors
  3. ✅ Delta detection debugging - helps diagnose issues
  4. ✅ Troubleshooting guide - addresses silent parsing failures

Implementation Scope:

  • 8 task sections
  • 52 specific implementation tasks
  • Updates to both README.md and CLAUDE.md template
  • Comprehensive testing checklist

Test plan

  • Review the proposal in openspec/changes/update-agent-instructions/
  • Validate with openspec validate update-agent-instructions
  • Confirm all retrospective issues are addressed
  • Check that instructions are clearer and more concise

Impact

This is a documentation-only change that will significantly improve the developer experience when using OpenSpec, particularly for AI coding assistants.

🤖 Generated with Claude Code

- Create proposal for streamlining agent instructions
- Document three-stage workflow clearly
- Update CLI command documentation
- Add best practices for AI agents
- Include spec deltas for documentation requirements
- Documentation updates are tooling/infrastructure changes
- No specs needed for OpenSpec's own instructions
- Will use --skip-specs flag when archiving
- Add decision clarity improvements (decision trees, remove ambiguity)
- Include agent-specific sections (tool selection, error recovery, context management)
- Restructure with clear information hierarchy
- Add comprehensive implementation tasks (6 sections, 26 tasks)
- Update design with industry best practices rationale

Based on analysis of Claude Code, Cursor, and other coding agent patterns
- Document all 9 primary OpenSpec commands with examples
- Add openspec list and list --specs prominently
- Add "Before Creating Specs" rule to check existing specs first
- Document all CLI flags (--json, --type, --skip-specs, etc.)
- Update tasks to include 9 CLI documentation items
- Add spec discovery workflow to prevent duplicate capabilities

This ensures AI agents have complete CLI knowledge and avoid spec fragmentation
- Add detailed implementation steps: read docs → implement → mark complete
- Emphasize reading proposal.md, design.md, and tasks.md first
- Require immediate task completion marking (no batching)
- Add rationale: prevents jumping straight to code without context
- Update tasks to include implementation workflow documentation

This ensures agents understand and follow the complete change properly
Based on OPENSPEC_COMPREHENSIVE_RETROSPECTIVE.md analysis:

Added critical missing documentation:
- Scenario formatting requirements (#### Scenario: headers) - #1 pain point
- Complete spec file structure examples with ADDED/MODIFIED sections
- Delta file location and extraction explanation
- Debugging commands (show --json --deltas-only)
- Troubleshooting section with common errors and solutions

Expanded implementation:
- Added 2 new task sections (Spec File Documentation, Troubleshooting)
- Increased from 41 to 52 total implementation tasks
- Added critical items to CLAUDE.md template tasks

This directly addresses the retrospective's top issues:
1. Scenario format documentation (marked "COMPLETELY MISSING")
2. Complete spec file examples
3. Delta detection debugging
4. Silent parsing failure explanations
@TabishB TabishB merged commit d549cec into main Aug 27, 2025
drvova pushed a commit to drvova/VovaSpec that referenced this pull request Oct 13, 2025
…t-instructions

Update OpenSpec agent instructions for clarity and completeness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants