2a606053dd
Add "Repository and Package Identity" rule to both the project-level CLAUDE.md and the seeded CLAUDE.md template (internal/seed/templates.go). Every new ctask workspace now inherits guidance against fabricating repo URLs, module paths, GitHub identities, or remote install commands. Also adds local-only build/install instructions and data safety invariant documentation to the project-level CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
1.7 KiB
Go
63 lines
1.7 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.
|
|
|
|
## 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)
|
|
}
|
|
|
|
// NotesMD returns the skeleton notes.md content.
|
|
func NotesMD(title string) string {
|
|
return fmt.Sprintf(`# %s
|
|
|
|
## Purpose
|
|
|
|
|
|
|
|
## Constraints
|
|
|
|
|
|
|
|
## Actions
|
|
|
|
|
|
|
|
## Results
|
|
|
|
`, title)
|
|
}
|