fix: replace all non-ASCII characters with safe ASCII equivalents
Replace box-drawing characters (U+2500) in session log with ASCII dashes. Replace em dashes (U+2014) in CLAUDE.md template with double hyphens. Remove em dash from comment in run.go. Add ASCII-guard tests for session log output and seed templates. Prevents mojibake on Windows terminals that misinterpret UTF-8 as CP1252. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,11 +17,11 @@ This workspace is scoped to a single task. Keep work focused on the task describ
|
||||
|
||||
## Files
|
||||
|
||||
- task.yaml — Task metadata (machine-managed, do not edit)
|
||||
- notes.md — Task log (human/agent-managed)
|
||||
- context/ — Reference documents (user-managed)
|
||||
- output/ — Task deliverables and artifacts
|
||||
- logs/ — Session logs (automatic session snapshots)
|
||||
- task.yaml -- Task metadata (machine-managed, do not edit)
|
||||
- notes.md -- Task log (human/agent-managed)
|
||||
- context/ -- Reference documents (user-managed)
|
||||
- output/ -- Task deliverables and artifacts
|
||||
- logs/ -- Session logs (automatic session snapshots)
|
||||
|
||||
## Session Handoff
|
||||
|
||||
@@ -32,7 +32,7 @@ Before ending a session, append a brief summary to notes.md with:
|
||||
- Open follow-ups or unfinished work
|
||||
- How to continue from here
|
||||
|
||||
Keep it concise — a few bullet points is enough. This helps the developer (or a future session) resume without losing context.
|
||||
Keep it concise -- a few bullet points is enough. This helps the developer (or a future session) resume without losing context.
|
||||
`, slug, category, workspacePath)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package seed
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestClaudeMDIsASCII(t *testing.T) {
|
||||
content := ClaudeMD("test-slug", "general", "/tmp/test")
|
||||
for i, b := range []byte(content) {
|
||||
if b > 127 {
|
||||
t.Errorf("non-ASCII byte 0x%02x at position %d in CLAUDE.md template", b, i)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNotesMDIsASCII(t *testing.T) {
|
||||
content := NotesMD("test title")
|
||||
for i, b := range []byte(content) {
|
||||
if b > 127 {
|
||||
t.Errorf("non-ASCII byte 0x%02x at position %d in notes.md template", b, i)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user