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>
This commit is contained in:
@@ -54,6 +54,12 @@ When `--no-launch` is used, no session is started and no session log is written.
|
||||
- `CTASK_PROJECT_ROOT` set, no `-c`: workspace goes directly under `$CTASK_PROJECT_ROOT/<date>_<slug>` (no `projects/` subdirectory is appended)
|
||||
- `CTASK_PROJECT_ROOT` set, explicit `-c <category>`: workspace goes under `$CTASK_PROJECT_ROOT/<category>/<date>_<slug>`
|
||||
|
||||
**Single git repo rule:**
|
||||
|
||||
Project workspaces use a single git repository initialized at the workspace root.
|
||||
Do not create nested git repositories inside the workspace. If your project code
|
||||
lives in a subdirectory, it is tracked by the root repo.
|
||||
|
||||
### Seed directories
|
||||
|
||||
On `ctask new`, after writing the built-in defaults, ctask copies the contents of an optional user seed directory into the workspace. Files in the seed directory overwrite the built-in defaults; subdirectories are preserved recursively. `task.yaml` and `.ctask/` at the seed root are always skipped.
|
||||
|
||||
@@ -62,6 +62,12 @@ This is a ctask project workspace -- a long-lived working environment, not a dis
|
||||
- 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:
|
||||
|
||||
@@ -62,6 +62,18 @@ func TestClaudeMDProjectContainsRequiredSections(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClaudeMDProjectContainsNestedGitRule(t *testing.T) {
|
||||
body := ClaudeMDProject()
|
||||
for _, must := range []string{
|
||||
"single git repository",
|
||||
"Do not initialize additional git repositories",
|
||||
} {
|
||||
if !strings.Contains(body, must) {
|
||||
t.Errorf("ClaudeMDProject missing guidance %q", must)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNotesMDIsASCII(t *testing.T) {
|
||||
content := NotesMD("test title")
|
||||
for i, b := range []byte(content) {
|
||||
|
||||
Reference in New Issue
Block a user