cdf1c55c5f
Rewrites the built-in project CLAUDE.md template with a new Workspace Structure section that explains the root-vs-subdir split. File Placement rules refer to the subdirectory. Git section keeps the single-repo rule and explicitly names the project subdirectory as an example of where not to init. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
118 lines
3.6 KiB
Go
118 lines
3.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.
|
|
|
|
## Workspace Structure
|
|
|
|
This is a ctask project workspace. The workspace root contains ctask management
|
|
files. Your project code lives in the project subdirectory.
|
|
|
|
- Workspace root: ctask metadata, session logs, notes, reference material
|
|
- Project subdirectory: source code, project CLAUDE.md, project configuration
|
|
- ` + "`context/`" + `: reference material and imported specs (workspace level)
|
|
- ` + "`output/`" + `: deliverables and exports (workspace level)
|
|
- ` + "`logs/`" + `: session logs (managed by ctask)
|
|
|
|
When working on project code, operate inside the project subdirectory.
|
|
Place project-specific CLAUDE.md, documentation, and configuration there.
|
|
|
|
## File Placement
|
|
|
|
- Source code -> ` + "`src/`" + ` (inside the project subdirectory)
|
|
- Documentation -> ` + "`docs/`" + ` (workspace level for general notes, project subdir for project docs)
|
|
- Deliverables and exports -> ` + "`output/`" + ` (workspace level)
|
|
- Reference material -> ` + "`context/`" + ` (workspace level)
|
|
- Tests -> ` + "`tests/`" + ` (inside the project subdirectory)
|
|
- Configuration files -> inside the project subdirectory
|
|
- 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 (workspace level).
|
|
- Keep the workspace root clean.
|
|
|
|
## Git
|
|
|
|
This workspace uses a single git repository initialized at the workspace root.
|
|
The project subdirectory and all its contents are tracked by this root repo.
|
|
Do not initialize additional git repositories inside the project subdirectory
|
|
or any other subdirectory. If you need to check git status or make commits,
|
|
the repo root is the workspace root.
|
|
|
|
## 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)
|
|
}
|