Basic data
**********

Note:

  This is an Agent Skill: a workflow written mainly for coding agents,
  and also useful as a checklist for people. PsyNet installs it into
  experiments at ".cursor/skills/psynet/basic-data/SKILL.md"; in
  Cursor, run "/basic-data". Edit it in the PsyNet repository at
  ".cursor/skills/experiment/basic-data/".


Read first
==========

Read these pages before acting. The "Documentation" section of the
experiment's "AGENTS.md" explains how to find and search them.

* Basic data — writing "get_basic_data" and the files it exports

* Exporting data — how to export data and where exports land

* What an export contains — the raw database tables in an export


Checklist
=========

1. From the research question, list the units of analysis (rows) and
   the variables (columns) each analysis needs. Plan one table per
   unit, such as trials and participants.

2. Implement "get_basic_data" as described in "data/basic_data",
   returning data frames only when "context == "export"".

3. Give every row the IDs that trace it back to the database, such as
   "trial_id" and "participant_id".

4. Leave out identifiers and sensitive values; basic data is not
   anonymized. Filter trials on "complete" as well as "failed", or
   export "complete" as a column: an unfinished trial, abandoned or
   still running, can have an "answer", the answer given so far.

5. Run "psynet debug local", take a few participants through the
   experiment, and export with "psynet export local". Check the basic
   data files: row counts match the expected numbers of participants
   and trials, and no column is unexpectedly empty.

6. If participants interact in groups, also follow "basic-data-group-
   experiment/SKILL.md". Group results usually live on the round
   record that a group's trials share ("trial.group_round"), so plan a
   table per group and round read from the rounds as well as one per
   player and round.
