Skip to content

gitignore: TASKPLANE_GITIGNORE_ENTRIES missing 8 runtime-artifact dirs (doctor false-passes) #611

Description

@HenryLach

Summary

TASKPLANE_GITIGNORE_ENTRIES in bin/gitignore-patterns.mjs is missing 8 runtime-artifact directories that the engine writes during batch execution. As a result:

  1. taskplane init scaffolds a .gitignore that doesn't cover them, so batch runs leave untracked noise in .pi/.
  2. taskplane doctor reports "✅ .gitignore has all Taskplane runtime entries" even when these dirs are untracked — a false pass, because the doctor check validates against this same (incomplete) constant.

Discovered while configuring a downstream project: after two batch runs, .pi/ contained diagnostics/, runtime/, supervisor/, telemetry/, and verification/ as untracked dirs, none of which the scaffolded .gitignore covered, yet doctor was green.

Missing entries

Grepping the engine for .pi/<subdir>/ write sites:

$ grep -rhoE '\.pi/[a-z-]+/' extensions/taskplane/*.ts | sort -u
.pi/agent/              # (pi-owned, not taskplane runtime)
.pi/agents/             # TRACKED on purpose — agent prompt overrides
.pi/bridge-outbox/      # ← missing from gitignore
.pi/context-snapshots/  # ← missing
.pi/diagnostics/        # ← missing
.pi/mailbox/            # ← missing
.pi/runtime/            # ← missing
.pi/supervisor/         # ← missing
.pi/telemetry/          # ← missing
.pi/verification/       # ← missing

All 8 confirmed absent from the current constant (lines 21–33):

export const TASKPLANE_GITIGNORE_ENTRIES = [
	".pi/batch-state.json",
	".pi/batch-history.json",
	".pi/lane-state-*",
	".pi/merge-result-*",
	".pi/merge-request-*",
	".pi/worker-conversation-*",
	".pi/orch-logs/",
	".pi/orch-abort-signal",
	".pi/settings.json",
	".worktrees/",
	".taskplane-tasks/",
];

Proposed fix

Add the 8 runtime dirs to TASKPLANE_GITIGNORE_ENTRIES in bin/gitignore-patterns.mjs:

	".pi/settings.json",
	// Runtime artifact directories written during batch execution
	".pi/diagnostics/",
	".pi/runtime/",
	".pi/supervisor/",
	".pi/telemetry/",
	".pi/verification/",
	".pi/bridge-outbox/",
	".pi/context-snapshots/",
	".pi/mailbox/",
	".worktrees/",
	".taskplane-tasks/",

Because both the init scaffolder and the doctor check import this constant (bin/taskplane.mjs lines ~1336, ~3240, ~3310), a single edit fixes scaffolding and the doctor false-pass. patternToRegex() already handles trailing-slash directory patterns, so no matcher changes are needed.

Notes / related

  • Existing projects that ran taskplane init before this fix will still have the incomplete .gitignore. Consider whether taskplane doctor should offer to append missing entries (it already detects them once the constant is complete), or document a one-liner for users to re-run.
  • Secondary (separate) gap: the managedFiles cleanup array in bin/taskplane.mjs (~line 1148) lists individual runtime files but not these runtime directories, so an uninstall/cleanup flow wouldn't remove them either. Out of scope for this issue but worth a follow-up.
  • .pi/agents/, .pi/taskplane-config.json, and .pi/taskplane.json must remain tracked — do not add them.

Acceptance criteria

  • The 8 dirs are present in TASKPLANE_GITIGNORE_ENTRIES.
  • taskplane init scaffolds a .gitignore covering them.
  • taskplane doctor only reports "all runtime entries present" when the 8 dirs are actually ignored.
  • Existing tests in extensions/tests/ updated/added for the new entries (pattern matching + doctor check).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions