diff --git a/internal/seed/templates.go b/internal/seed/templates.go index 609e678..f658afb 100644 --- a/internal/seed/templates.go +++ b/internal/seed/templates.go @@ -2,26 +2,29 @@ package seed import "fmt" -// ClaudeMD returns the advisory CLAUDE.md content for a workspace. +// ClaudeMD returns the built-in default CLAUDE.md content for a task workspace. +// Parameters are accepted for API compatibility but are not interpolated in v0.3. func ClaudeMD(slug, category, workspacePath string) string { - return fmt.Sprintf(`# Task Workspace: %s + _ = slug + _ = category + _ = workspacePath + return `# Workspace Guidelines -This is a ctask-managed workspace. +This is a ctask workspace. Prefer operating inside this directory unless explicitly instructed otherwise. -- **Category:** %s -- **Workspace:** %s +## File Placement -## Scope +- Source code and scripts -> workspace root or ` + "`src/`" + ` +- Documentation, summaries, reports -> ` + "`docs/`" + ` +- Deliverables and exports -> ` + "`output/`" + ` +- Reference material and imported files -> ` + "`context/`" + ` +- Do not place non-code outputs (docs, summaries, exports) in the workspace root -This workspace is scoped to a single task. Keep work focused on the task described in notes.md. +## Conventions -## 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) +- Do not install global packages or modify system files unless asked +- Record important assumptions and actions in notes.md +- Keep the workspace root clean -- use subdirectories for organization ## Session Handoff @@ -32,12 +35,8 @@ 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. - -## Repository and Package Identity - -Never invent remote repository, package, or module identities. Do not guess GitHub usernames/orgs, repo URLs, Go module paths, release install commands, or package manager coordinates. Only provide remote clone/install/publish commands if they are verified from the actual repo config (e.g. go.mod, git remote -v) or explicitly provided by the user. If publishing/release details are not configured, say so plainly and provide local-only build/install commands instead. -`, slug, category, workspacePath) +Keep it concise -- a few bullet points is enough. +` } // NotesMD returns the skeleton notes.md content. diff --git a/internal/seed/templates_test.go b/internal/seed/templates_test.go index df0b28c..c0df5e2 100644 --- a/internal/seed/templates_test.go +++ b/internal/seed/templates_test.go @@ -1,6 +1,7 @@ package seed import ( + "strings" "testing" ) @@ -14,6 +15,25 @@ func TestClaudeMDIsASCII(t *testing.T) { } } +func TestClaudeMDContainsV03Sections(t *testing.T) { + content := ClaudeMD("ignored", "ignored", "ignored") + for _, want := range []string{ + "# Workspace Guidelines", + "## File Placement", + "Source code and scripts", + "Documentation, summaries, reports", + "Deliverables and exports", + "Reference material and imported files", + "## Conventions", + "## Session Handoff", + "What was accomplished", + } { + if !strings.Contains(content, want) { + t.Errorf("CLAUDE.md missing required section: %q", want) + } + } +} + func TestNotesMDIsASCII(t *testing.T) { content := NotesMD("test title") for i, b := range []byte(content) {