Migrating deployment file selection
***********************************

PsyNet now uses "deploy.toml" to decide which experiment files enter
local debug staging and remote deployment packages. Earlier versions
used Git visibility and ".gitignore" for this purpose.

This is a deliberate separation:

* ".gitignore" decides which files Git tracks.

* "deploy.toml" decides which files PsyNet copies.


Create and review the policy
============================

Run "psynet setup" or "psynet scripts scaffold" to create the stock
"deploy.toml" without overwriting an existing policy. If the
experiment's ".gitignore" ignores files that the new "deploy.toml"
does not exclude, the next debug, test, or deployment command stops
once before copying files and lists them, because they would now be
deployed. Add any that should not be deployed to "[exclude]" and
rerun. This check only runs if the experiment directory has its own
".gitignore"; if your experiment lives inside a larger repository and
relied on that repository's ".gitignore", review the preview below
yourself.

Preview the complete deployment plan:

   dallinger deployment-files list

This command only prints the files that PsyNet would copy. It does not
start or deploy the experiment. Check the output for credentials,
private data, exports, large local files, and generated files. Add
anything that should stay local to the "[exclude]" section of
"deploy.toml", then run the preview again.

"paths" are root-relative prefixes, "names" are basenames excluded in
every directory, and "suffixes" are literal filename endings. Git
globs and negation are not supported, so translate custom ".gitignore"
rules deliberately instead of copying them verbatim. See Dallinger's
deploy.toml guide for the complete format.


Remove old Docker selection files
=================================

".dockerignore" is no longer supported. PsyNet removes recognized
generated copies, but preserves custom files and stops debug or
deployment until their rules have been moved to "deploy.toml" and the
old file has been removed.

Generated experiment-local "docker/" helper scripts are also obsolete
because they bypass the reviewed deployment plan. Replace commands
such as "bash docker/run" or "bash docker/psynet" with:

   psynet debug local
   psynet debug local --docker

The "psynet setup --docker" option has been removed. Run "psynet
setup" first, then choose "psynet debug local --docker" when Docker
execution is needed.


Verify the migration
====================

After updating "deploy.toml":

1. Run "dallinger deployment-files list" and inspect the complete
   output.

2. Confirm that authored experiment files are present.

3. Confirm that credentials, exports, participant data, virtual
   environments, generated local files, and the "audit/" review packet
   are absent.

4. Run "psynet test local".

5. Commit the reviewed "deploy.toml" before a remote deployment.

PsyNet never overwrites an existing "deploy.toml". If your experiment
already has one, add "audit", "data" and ".cursor/skills/psynet" to
"[exclude].paths" so the local review packet, local data and PsyNet's
Agent Skills are not copied into debug staging or the deployment
package. Stock templates created from this PsyNet version already
include these paths.

Git provenance records the commit and whether deployment-selected
files contain uncommitted changes. Remote deployments require at least
one Git commit; local debug and test runs may use a newly initialized
repository.


Pregenerated stimuli
====================

Git-ignored files under "static/" are deployed unless "deploy.toml"
excludes them. The stock "deploy.toml" and ".gitignore" still exclude
"static/assets", where older PsyNet versions left a link to local
asset storage (remove it with "psynet scripts prune"), so files there
are not tracked or deployed; keep your own files elsewhere in
"static/". The deployment plan has a size limit, described in How
deployment works. PsyNet commands apply PsyNet's default limit, but
"dallinger verify" run on its own uses Dallinger's smaller default
unless you set "EXP_MAX_SIZE_MB".

To move stimuli into "static/", follow step 18 of Upgrading to PsyNet
14 and Using stimuli and media.
