This task tracks the high-ish-level goal of creating a framework to enrol users in experiments, track those enrolments, and bucket the user.
Since the first milestone targets experimentation on the Wikipedias, the framework is limited to PHP and JS.
=== Pseudocode
```lang=php,name=pseudocode.php
use RequestContext;
use MediaWiki\MediaWikiServices;
$user = RequestContext::getMain()->getUser();
$experimentFactory = MediaWikiServices::getInstance()->getService( 'Experiments.ExperimentFactory' );
$experiment = $experimentFactory->getExperiment( 'PSEUDOCODE' );
$bucket = $experiment->enroll( $user );
echo "User {$user->getName()} was enrolled in the {$experiment->getName()} experiment. " .
"They were placed in the \"{$bucket}\" bucket. ";
```
```lang=js,name=pseudocode.js
const experiments = require( 'mw.experiments' );
const experiment = experiments.getExperiment( 'PSEUDOCODE' );
experiment.enroll( ( user, bucket, loaded_modules ) => {
console.log(
`User ${user.name} was enrolled in the "${experiment.name}" experiment. ` +
`They were placed in the "${bucket}" bucket. ` +
`The following ResourceLoader modules were loaded: ` + loaded_modules.join( ', ' )
);
} );
```