Files
ctask/internal/seed/templates.go
T
typebasedio b4f35231d4 docs(v0.4.1): add nested git guidance for project mode
Project CLAUDE.md template now includes a Git section stating that the
workspace uses a single git repo at the root and subdirectory git init
is not permitted. docs/commands.md picks up the same guidance under the
--project flag section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 17:55:29 -04:00

102 lines
2.6 KiB
Go

package seed
import "fmt"
// 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 {
_ = slug
_ = category
_ = workspacePath
return `# Workspace Guidelines
This is a ctask workspace. Prefer operating inside this directory unless explicitly instructed otherwise.
## File Placement
- 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
## Conventions
- 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
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.
`
}
// ClaudeMDProject returns the built-in default CLAUDE.md content for a project workspace.
func ClaudeMDProject() string {
return `# Project Workspace Guidelines
This is a ctask project workspace -- a long-lived working environment, not a disposable task.
## File Placement
- Source code -> ` + "`src/`" + ` or workspace root
- Documentation -> ` + "`docs/`" + `
- Deliverables and exports -> ` + "`output/`" + `
- Reference material -> ` + "`context/`" + `
- Tests -> ` + "`tests/`" + `
- Configuration files -> workspace root
- Do not place non-code outputs in the workspace root
## Conventions
- This project uses git. Commit meaningful changes with clear messages.
- Do not install global packages or modify system files unless asked.
- Record important assumptions and actions in notes.md.
- Keep the workspace root clean.
## Git
This workspace uses a single git repository at the workspace root.
Do not initialize additional git repositories inside subdirectories.
All project code, even if nested in a subdirectory, is tracked by the root repo.
## 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
`
}
// NotesMD returns the skeleton notes.md content.
func NotesMD(title string) string {
return fmt.Sprintf(`# %s
## Purpose
## Constraints
## Actions
## Results
`, title)
}