Files
ctask/internal/seed/templates.go
T
typebasedio 75911faeeb 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>
2026-04-06 10:15:02 -04:00

59 lines
1.2 KiB
Go

package seed
import "fmt"
// ClaudeMD returns the advisory CLAUDE.md content for a workspace.
func ClaudeMD(slug, category, workspacePath string) string {
return fmt.Sprintf(`# Task Workspace: %s
This is a ctask-managed workspace.
- **Category:** %s
- **Workspace:** %s
## Scope
This workspace is scoped to a single task. Keep work focused on the task described in notes.md.
## 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)
## Session Handoff
Before ending a session, append a brief summary to notes.md with:
- What was accomplished
- Key decisions made
- 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.
`, slug, category, workspacePath)
}
// NotesMD returns the skeleton notes.md content.
func NotesMD(title string) string {
return fmt.Sprintf(`# %s
## Purpose
## Constraints
## Actions
## Results
`, title)
}