Skip to content

docs: add AGENTS.md at repo root + pin tests - #32

Merged
dreamrec merged 1 commit into
mainfrom
claude/agents-md-draft
May 11, 2026
Merged

docs: add AGENTS.md at repo root + pin tests#32
dreamrec merged 1 commit into
mainfrom
claude/agents-md-draft

Conversation

@dreamrec

Copy link
Copy Markdown
Owner

Summary

Adds AGENTS.md at the repo root — the development-time operating-rules doc that AI coding agents (Claude, Codex, Copilot, Cursor) and human contributors share. Reviewer on PR #30 specifically requested this: their local copy had "important release and DeepSeek-specific operating rules that future agents won't see from the public repo." AGENTS.md is exactly that doc, now public.

What's covered

  • TL;DR fresh-agent kit — the things every new agent should internalize in the first 30 seconds.
  • Critical naming pinstdpilot-dpsk4 (NOT tdpilot), dreamrec/TDPilot_deepseekv4, dreamrec-TDPilot_deepseekv4, etc. Cross-linked to the test pins from PR ci: fix post-v2.1.5 package-name drift caught by Codex review on PR #30 #31.
  • Repository layoutsrc/td_mcp/ (MCP-server Python) vs td_component/ (TD-bound code that gets baked into the .tox files).
  • The two .tox files — what's baked into each, the source-hash freshness gates, when you must rebuild, and the canonical paste-verbatim Textport recipe with the four-footgun explanation (ASCII open default, Textport multi-line bug, TD_MCP_REPO_ROOT requirement, marker-file path drift).
  • Eight version manifests in lockstep + the API_VERSION → .tox rebuild chain.
  • The 12-step release ritual that's settled across v2.1.3/4/5 and PR ci: fix post-v2.1.5 package-name drift caught by Codex review on PR #30 #31, including the load-bearing gh release create step (because git push origin <tag> alone never fires release-assets.yml).
  • DeepSeek-specific operating rulesthinking blocks must be echoed back, reasoning_content sub-keys must be stripped (opposite handling), prefix-cache byte-stability requirement, model-tier override regex.
  • Security model — origin allowlist always enforced, per-launch session token, Sec-Fetch-Site rejection, TDPILOT_API_INSECURE escape hatch, EXEC_MODE clamp under insecure mode, MCP shared-secret auth.
  • TouchDesigner gotchas — Textport rules, cook thread vs worker thread, comp.storage for reload-safe state, sys.modules overwrite (not setdefault), executeDAT force-cook, op.run unreliability, webRenderTOP http:// requirement, webserverDAT.onServerStart hook, geometryCOMP POP-family default, reference-style params need real OP refs, viewer=True on test COMPs, td_get_errors is not a render-success signal, the canonical feedbackTOP wiring, expression relative-vs-absolute paths.
  • PR conventions — branch naming, HEREDOC commit messages, always-squash-merge, gh CLI usage, the Codex review cadence.
  • Meta — how to keep AGENTS.md living (add a rule when you find a non-obvious gotcha; pin it in test_release_critical_names.py if mechanically checkable).

Test plan

  • 3 new pin tests in tests/test_release_critical_names.py:
    • test_agents_md_exists_at_repo_root
    • test_agents_md_pins_all_critical_names (every canonical name from the naming-pins table)
    • test_agents_md_covers_release_critical_topics (substring match on every load-bearing topic — release flow gates, DeepSeek rules, security model, TD gotchas, .tox dance)
  • pytest tests/ — 1695 → 1698 passed, 0 failed.
  • ruff format --check + ruff check — clean.
  • check_versions.py — sync at v2.1.5 (no bump; pure docs+tests).
  • Both .tox freshness gates — pass (no rebuild needed).

No version bump. Style and convention follow agents.md (~60K-project standard, no required schema, repo-root markdown).

🤖 Generated with Claude Code

AGENTS.md is the development-time operating-rules doc for coding
agents (Claude, Codex, Copilot, Cursor) and human contributors.
It captures the non-obvious rules for changing the repo:

  * Critical naming pins (tdpilot-dpsk4 vs parent fork's tdpilot)
  * Repository layout (src/td_mcp vs td_component split)
  * Setup, build, and test commands
  * The two .tox files — what bakes in, when to rebuild, the
    canonical paste-verbatim Textport rebuild recipe with the
    four-footgun explanation
  * Version manifests (eight artifacts in lockstep)
  * The 12-step release ritual that's settled across v2.1.3/4/5
    and PR #31, including the load-bearing
    `gh release create` step that fires release-assets.yml
  * DeepSeek operating rules — thinking-block echo, prefix-cache
    byte-stability, model-tier override regex
  * Security model — origin allowlist, token, Sec-Fetch-Site,
    EXEC_MODE clamp under TDPILOT_API_INSECURE
  * TouchDesigner gotchas — cook thread, comp.storage,
    sys.modules overwrite, executeDAT force-cook, webRenderTOP
    http://, geometryCOMP POP default, viewer=True, td_get_errors
    is not a render-success signal, feedbackTOP canonical
    pattern, expressions (relative vs absolute paths)
  * PR conventions (HEREDOC commits, squash-merge, gh CLI)

Reviewer on PR #30 specifically requested this: their local
copy had "important release and DeepSeek-specific operating
rules that future agents won't see from the public repo."
AGENTS.md is exactly that doc, now public.

Three new pin tests in tests/test_release_critical_names.py:

  * test_agents_md_exists_at_repo_root
  * test_agents_md_pins_all_critical_names  (every canonical
    name from the naming-pins table)
  * test_agents_md_covers_release_critical_topics  (substring
    match on every load-bearing topic — release flow gates,
    DeepSeek rules, security model, TD gotchas, .tox dance)

Tests 1695 → 1698, ruff clean, both .tox freshness gates pass.
No version bump; pure docs+tests patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dreamrec
dreamrec merged commit 93c9a30 into main May 11, 2026
6 checks passed
@dreamrec
dreamrec deleted the claude/agents-md-draft branch May 11, 2026 10:22
dreamrec added a commit that referenced this pull request May 11, 2026
* docs: add ROADMAP.md and NEW_SESSION_PROMPT.md + 2 pin tests

Adds the v2.2.0→v3.0 implementation plan (`docs/ROADMAP.md`, 476
lines covering 7 phases) and a self-contained copy-pasteable starter
prompt (`docs/NEW_SESSION_PROMPT.md`, 224 lines) that bootstraps a
fresh agent session on Phase 0.

Both files are explicitly exempted from the `/docs/*.md` deny-list in
.gitignore — they're source-of-truth artifacts, not transient session
reports, so they ship with the public repo alongside MANUAL.md and
CHUNK_SCHEMA.md.

Two pin tests in `tests/test_release_critical_names.py` keep both
files honest:

- `test_roadmap_md_exists_and_covers_all_phases` — file exists and
  contains all 7 `## Phase N` headings (N=0..6) plus cross-links to
  NEW_SESSION_PROMPT.md, AGENTS.md, CHANGELOG.md. Renaming a phase
  or stripping a cross-link fails CI.
- `test_new_session_prompt_md_exists_with_required_invariants` —
  file exists, has the `==== BEGIN PROMPT ====` / `==== END PROMPT
  ====` markers (load-bearing for copy-paste UX), and inlines the 6
  worst footguns (package name, thinking-blocks rule, tox-freshness,
  7-manifest lockstep, `gh release create`, comp.storage). A future
  agent that skips AGENTS.md still gets the protection.

AGENTS.md updated: TL;DR now points at NEW_SESSION_PROMPT.md +
ROADMAP.md as the bootstrap chain, and the Cross-references section
lists both files with their purpose.

No version bump — docs+tests only, same shape as PR #31 and PR #32.
Full local sweep green: 1700 pytest, ruff format+check, all 3
freshness/version gates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: replace hardcoded $HOME path in NEW_SESSION_PROMPT.md with <REPO_ROOT>

CI lint job on PR #33 caught two hardcoded personal-path references
in docs/NEW_SESSION_PROMPT.md (lines 26 and 149):

  /Users/visansilviugeorge/Desktop/DREAM AI/TDPilot_deepseekv4

This slipped through the local sweep because `scripts/check_no_personal_paths.sh`
scans only `git ls-files` output — the file was still untracked when
I ran the pre-commit check. CI runs the check post-merge so it scans
the committed tree.

The fix uses `<REPO_ROOT>` as a portable placeholder (matching the
script's documented suggestion) and clarifies the prose: anyone
copy-pasting the prompt will `cd` into their own clone path, so a
hardcoded $HOME path was just wrong regardless of the lint check.

Verified locally with files now staged:
- `bash scripts/check_no_personal_paths.sh` — clean
- `uv run pytest tests/test_release_critical_names.py` — 12/12 pass
- `uv run --extra dev ruff format --check ...` — clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dreamrec added a commit that referenced this pull request May 19, 2026
AGENTS.md is the development-time operating-rules doc for coding
agents (Claude, Codex, Copilot, Cursor) and human contributors.
It captures the non-obvious rules for changing the repo:

  * Critical naming pins (tdpilot-dpsk4 vs parent fork's tdpilot)
  * Repository layout (src/td_mcp vs td_component split)
  * Setup, build, and test commands
  * The two .tox files — what bakes in, when to rebuild, the
    canonical paste-verbatim Textport rebuild recipe with the
    four-footgun explanation
  * Version manifests (eight artifacts in lockstep)
  * The 12-step release ritual that's settled across v2.1.3/4/5
    and PR #31, including the load-bearing
    `gh release create` step that fires release-assets.yml
  * DeepSeek operating rules — thinking-block echo, prefix-cache
    byte-stability, model-tier override regex
  * Security model — origin allowlist, token, Sec-Fetch-Site,
    EXEC_MODE clamp under TDPILOT_API_INSECURE
  * TouchDesigner gotchas — cook thread, comp.storage,
    sys.modules overwrite, executeDAT force-cook, webRenderTOP
    http://, geometryCOMP POP default, viewer=True, td_get_errors
    is not a render-success signal, feedbackTOP canonical
    pattern, expressions (relative vs absolute paths)
  * PR conventions (HEREDOC commits, squash-merge, gh CLI)

Reviewer on PR #30 specifically requested this: their local
copy had "important release and DeepSeek-specific operating
rules that future agents won't see from the public repo."
AGENTS.md is exactly that doc, now public.

Three new pin tests in tests/test_release_critical_names.py:

  * test_agents_md_exists_at_repo_root
  * test_agents_md_pins_all_critical_names  (every canonical
    name from the naming-pins table)
  * test_agents_md_covers_release_critical_topics  (substring
    match on every load-bearing topic — release flow gates,
    DeepSeek rules, security model, TD gotchas, .tox dance)

Tests 1695 → 1698, ruff clean, both .tox freshness gates pass.
No version bump; pure docs+tests patch.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant