You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect Template Path:
- Script tries to copy from /templates/agent-file-template.md (line 16)
- Correct path should be /.specify/templates/agent-file-template.md
Field Extraction Issues:
- Field names containing forward slashes (like "Language/Version") break sed patterns
- Markdown formatting with asterisks (Field:) causes regex parsing failures
Error Context:
The script fails when trying to:
Extract information from plan.md files using grep/sed combinations
Perform template placeholder substitutions
Handle field names with special characters
Steps to Reproduce:
Initialize a spec-kit project: specify init test-project
Create a feature with /specify command
Run /plan command to generate plan.md
Execute: .specify/scripts/bash/update-agent-context.sh claude
Observe sed expression errors and missing template file error
Expected Behavior:
Script should extract field values from plan.md correctly
Script should create/update agent context files (CLAUDE.md, GEMINI.md, etc.)
Template substitutions should work without regex errors
Suggested Fix:
The core issues stem from using complex sed operations with unescaped special characters. A more robust approach would be to:
Fix the template path reference
Use Python-based text processing instead of sed for complex field extraction
Implement proper escaping for special regex characters
Impact:
This affects the /plan command's ability to automatically update agent context files, which is part of the core spec-kit workflow for maintaining agent-specific information.
Additional Context:
The script appears to be attempting to maintain agent context files with current project information extracted from feature plans, but the implementation has reliability issues
with text processing that cause it to fail on common field names and template operations.
This issue prevents the automated agent context updates that are part of the spec-driven development workflow, requiring manual intervention to maintain agent files.
Issue Type: Bug
Environment:
Description:
The update-agent-context.sh script in .specify/scripts/bash/ contains several critical bugs that prevent it from working correctly:
Problems Identified:
sed: -e expression Add John Lam as contributor and release badge #1, char 28: Invalid preceding regular expression
sed: -e expression Add John Lam as contributor and release badge #1, char 31: Invalid preceding regular expression
sed: -e expression Add John Lam as contributor and release badge #1, char 18: Invalid preceding regular expression
sed: -e expression Add John Lam as contributor and release badge #1, char 23: Invalid preceding regular expression
- Script tries to copy from /templates/agent-file-template.md (line 16)
- Correct path should be /.specify/templates/agent-file-template.md
- Field names containing forward slashes (like "Language/Version") break sed patterns
- Markdown formatting with asterisks (Field:) causes regex parsing failures
Error Context:
The script fails when trying to:
Steps to Reproduce:
Expected Behavior:
Suggested Fix:
The core issues stem from using complex sed operations with unescaped special characters. A more robust approach would be to:
Impact:
This affects the /plan command's ability to automatically update agent context files, which is part of the core spec-kit workflow for maintaining agent-specific information.
Additional Context:
The script appears to be attempting to maintain agent context files with current project information extracted from feature plans, but the implementation has reliability issues
with text processing that cause it to fail on common field names and template operations.
This issue prevents the automated agent context updates that are part of the spec-driven development workflow, requiring manual intervention to maintain agent files.