This file is the copy-pasteable first message for a fresh agent session that is picking up work on the v2.2.0→v3.0 roadmap.
To use: copy everything between the ==== BEGIN PROMPT ==== and
==== END PROMPT ==== markers below into a new Claude Code (or other
agent) session as the user's first message.
The prompt is self-contained: it tells the agent where it is, what to read first, what to build, and what footguns to avoid before any code gets written.
The latest version of this file lives at
docs/NEW_SESSION_PROMPT.md on the main branch. If you're reading a
copy that disagrees with the repo, the repo wins.
You're picking up work on TDPilot DPSK4 — a TouchDesigner AI
assistant. The GitHub repo is dreamrec/TDPilot_deepseekv4. cd
into your local clone of it before running any commands below — this
prompt uses <REPO_ROOT> as a placeholder for whatever path you
cloned to.
- Latest shipped release: v2.3.0 (May 11, 2026 — bilateral-audit
release closing 9 bugs + adding scoped snapshot tools; tool count
91 → 93). v2.3.1 fixes have also landed (4-bug audit: ClassVar +
watchdog + sticky-tier + exec-mode) at commit
8f087cdonmain. - v2.4 is in planning — see
docs/plans/v2.4_IMPLEMENTATION_PLAN.mdfor the cold-start executable plan covering Phases A–E. - Most recent merged PR: #43 (4-bug audit).
- Branch you should start from:
origin/main(or use the worktree referenced in the v2.4 plan if continuing prior work).
Start work on Phase 0 of the v2.2.0→v3.0 roadmap. Phase 0 is foundation plumbing — no user-visible UX yet — that subsequent phases need to ship safely.
The full multi-month plan lives in
docs/ROADMAP.md. Phase 0 is at
docs/ROADMAP.md lines 56–86 (search for ## Phase 0).
Read these three files, in order. They override anything you remember from training:
AGENTS.mdat the repo root — the fresh-agent kit: critical naming pins, the two .tox files, the canonical Textport rebuild recipe, the 7-version-manifest lockstep, the 12-step release ritual, DeepSeek operating rules, and TD-specific gotchas. Don't skim — every section solves a real bug we've already hit.docs/ROADMAP.md— the plan itself. Read "How to use this doc", "North-star vision", "Competitive context", then drill into Phase 0.CHANGELOG.md(top entry) — what just shipped in v2.1.5, so you understand the "before" state your Phase 0 changes will sit on top of.
(Direct from docs/ROADMAP.md "Phase 0 — Foundation".)
-
td_component/tdpilot_api_features.py— central feature-flag registry. Reads COMP params first, then env vars, thenconfig.json, then declarativeFLAGSdict defaults. Tests can monkey-patch. Skeleton structure:FLAGS = { "AUTO_ROLLBACK": {"default": True, "since": "2.2.0"}, "CYCLE_DETECT": {"default": True, "since": "2.2.0"}, "PLAN_PREVIEW": {"default": False, "since": "2.5.0"}, # ... } def is_enabled(flag_name: str) -> bool: ... def get(flag_name: str): ...
Add this file to
_API_TOX_SOURCE_FILESintd_component/build_tdpilot_api_tox.pyso the freshness gate picks it up. -
scripts/bench_chat_pipe.py— runs N canonical chat turns against the mock-DeepSeek fixture machinery already intests/_mock_deepseek.py(see memory: PR-20 Mock-DeepSeek architecture). Reports per-tool latency, total turn time, token usage. We need this baseline before measuring Phase-1 perf regressions. -
AGENTS.md"Phase-PR test conventions" subsection — codify: every phase PR follows: source diff → unit tests → integration tests → request user tox rebuild → live verification. This is the procedural piece that prevents tox-rebuild friction from torpedoing iteration speed.
Also add tests/test_v220_features_module.py (~6 tests) pinning the
flag-precedence rules: COMP param > env var > config.json > default.
These are encoded in CI gates and pin tests; violating them = red CI.
- Package name is
tdpilot-dpsk4, NOTtdpilot. Repo isdreamrec/TDPilot_deepseekv4, NOTdreamrec/TDPilot. Tests intests/test_release_critical_names.pypin this. - Don't touch
_TOX_SOURCE_FILESor_API_TOX_SOURCE_FILESlists with comment-only edits. Even a# noqacomment bumps the source hash and failscheck_tox_freshness.py/check_tox_api_freshness.pyuntil the .tox is rebuilt in a live TD session. See memory:feedback_noqa_on_tox_source_breaks_ci.md. - DeepSeek thinking blocks must be echoed back to the API
verbatim. Only strip
reasoning_contentsub-keys. Strippingtype: thinkingcontent blocks causes HTTP 400 on the next turn. See memory:feedback_deepseek_thinking_blocks_must_echo.md. - TD Textport runs only single-line statements. Multi-line
with/def/classafter a continuation prompt eats the next statement as SyntaxError. Always use the one-lineexec(compile(...))form in the canonical rebuild recipe (AGENTS.md → ".tox rebuild"). - No
time.sleep()on TD's main thread. It blocks cooks and invalidates diagnostics. - Use
comp.storage, not module globals, for state that has to survive textDAT reloads (WS clients, registries, etc.). - 7 version manifests in lockstep. Don't bump for this PR (Phase 0
is docs+tests+plumbing only — no version bump until end of Phase 1
when v2.2.0 ships). When you DO bump, all 7 files plus the
API_VERSIONconstant move together. CI gatescripts/check_versions.pyenforces. - Use
ghCLI for git ops. Not the GitHub web UI. - Squash-merge PRs. Don't merge-commit. AGENTS.md has the full
12-step release ritual; key non-obvious step:
gh release createis mandatory aftergit push origin vX.Y.Z— pushing the tag alone does NOT firerelease-assets.yml. - After every
git push, check CI:gh run list --branch <branch>orgh pr checks. Don't claim "done" until CI is green.
Before writing any code:
cd <REPO_ROOT> # your local clone of dreamrec/TDPilot_deepseekv4
git fetch origin && git checkout -b claude/v2.2.0-phase-0-foundation origin/main
git log --oneline -5 # confirm 93c9a30 AGENTS.md is the tip
uv sync --extra dev --frozen
uv run pytest tests/ -q # baseline: 1688/1688 should pass
uv run ruff check src tests scripts td_component
uv run python scripts/check_versions.py
uv run python scripts/check_tox_freshness.py
uv run python scripts/check_tox_api_freshness.pyIf any of those fail on a clean main, STOP and investigate before
adding Phase 0 work on top.
Once the baseline is green, work through Phase 0's three deliverables
in the order listed above. After source changes land, ask me (the
user) to rebuild the API .tox using the canonical recipe in
AGENTS.md (search for "tdpilot-api-tox-rebuild") — do not attempt to
rebuild it yourself; the rebuild has to happen inside a running
TouchDesigner session, and there are 4 specific footguns documented
in that recipe.
Phase 0 does NOT bump version. It ships as a docs+plumbing PR like PR #31 (the post-v2.1.5 hygiene fix) or PR #32 (AGENTS.md). The flow:
1. Commit on branch claude/v2.2.0-phase-0-foundation
2. Push git push -u origin HEAD
3. Open PR gh pr create --title "..." --body "..."
4. Watch CI gh pr checks
5. Squash-merge gh pr merge --squash
6. Pull main + cleanup git checkout main && git pull && git branch -D claude/...
When Phase 1 ships at v2.2.0, the full 12-step release ritual kicks in (see AGENTS.md). That's a separate PR.
- Conflicting instructions?
docs/ROADMAP.mdis source-of-truth for the plan;AGENTS.mdis source-of-truth for the workflow; this file is just the bootstrap. Defer to those. - Surprising CI failure? Check
feedback_*.mdmemory files first — most production footguns are already documented there. - Unsure whether a change is "Phase 0 scope" or "Phase 1 scope"? Ask before coding. Phase boundaries matter for release-cadence discipline.
Acknowledge that you've read AGENTS.md, ROADMAP.md, and the latest CHANGELOG entry. Then propose your Phase 0 implementation order before writing any code.
- This file is pinned by
tests/test_release_critical_names.py. If you rename or move it, the pin test fails until the test is updated too. Same fordocs/ROADMAP.md. - Both docs are explicitly listed in
.gitignoreexceptions (search for!/docs/ROADMAP.mdand!/docs/NEW_SESSION_PROMPT.md). The default policy underdocs/is/docs/*.mddeny-list — these two files plusdocs/MANUAL.mdanddocs/CHUNK_SCHEMA.mdare the only tracked free-form docs. - When v2.2.0 ships, update this prompt's "Current state" section to reflect v2.2.0 as latest and shift "Today's task" to Phase 1 or Phase 2 depending on what's next. Same drift discipline as AGENTS.md.
- The prompt deliberately inlines the 7-or-so worst footguns rather than punting everything to AGENTS.md. If a future agent skips AGENTS.md (they will), the inlined constraints still protect the repo from the most expensive mistakes.