Files
ctask/internal/seed/templates.go
T
typebasedio 17789e4b9f feat: workspace creation with seed files and collision handling
Create function produces full workspace layout (task.yaml, CLAUDE.md, notes.md, context/, output/, logs/). Seed files only written if missing. Collision suffixing tested.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 18:30:59 -04:00

48 lines
867 B
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 (reserved for future use)
`, slug, category, workspacePath)
}
// NotesMD returns the skeleton notes.md content.
func NotesMD(title string) string {
return fmt.Sprintf(`# %s
## Purpose
## Constraints
## Actions
## Results
`, title)
}