Keep the launch dump out of the session's git status

The .orchestra directory showed up as untracked work in the very worktree whose
own launch context said "uncommitted changes: false". It would have polluted
the quality gate, the review diff, and the agent's reading of git status. A
.gitignore of "*" inside the directory ignores it including itself. The
worker's done marker lives there too and had the same problem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-26 22:57:39 +04:00
parent 09e572f11e
commit a0209a2951
2 changed files with 36 additions and 1 deletions
+9 -1
View File
@@ -120,7 +120,15 @@ const LaunchContextFile = ".orchestra/launch.md"
// evidence is worth having, and is not worth refusing to start work over.
func WriteLaunchContext(worktree, prompt string) error {
path := filepath.Join(worktree, LaunchContextFile)
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
dir := filepath.Dir(path)
if err := os.MkdirAll(dir, 0o755); err != nil {
return err
}
// Orchestra's own scratch directory must not show up as the session's
// work. A .gitignore of "*" ignores the directory including itself, so the
// tree stays clean for the agent, for the gate, and for review evidence.
// The worker's done marker lives here too and had the same problem.
if err := os.WriteFile(filepath.Join(dir, ".gitignore"), []byte("*\n"), 0o644); err != nil {
return err
}
return os.WriteFile(path, []byte(prompt), 0o644)