Set Up Workspace
Decide where artifacts live. Do not design an experiment here.
Human-facing prose
Details: references/human_facing_prose.md. Scaffolded design
notes, JOURNAL, and folder READMEs describe this workspace's
analysis — not the skills framework, the CLI, or the command that
produced an output. Questions and replies use the same
data-science language (import name, notebooks, documentation
site) — not G-* names, catalog skill ids, or the wrapper CLI.
Say "workspace setup", not setup-workspace.
<!-- results-embed: … --> is a site marker. Authoring hints
stay in this skill. style is ruff only.
Detection
src/ or journal/ present → existing. Reuse names and
folders. Do not scaffold again.
- Manager manifest without
src/<pkg>/ → manager-only. Still
scaffold; keep existing pyproject.toml. No --force.
- Otherwise → fresh. Ask G-PKG-NAME, then scaffold.
Lookup
Detect the layout, then take the one row that matches and run its
steps from the Sequence below. Do not stop after reading the table.
| Layout |
Import name |
Steps |
Notebooks and site |
| fresh |
not recorded. "you pick", "go fast", and "no preference" do not record it |
1 only, then stop. Call AskUserQuestion (folder name is the default option). Do not scaffold this turn. |
do not persist |
| fresh |
policy.package or src/<pkg>/ already names it |
1 (no ask), 2, 4, 5. Do not write experiments/01_baseline.py or any experiment body, even if asked so it can run right away. |
step 4 |
| manager-only |
not recorded. "you pick", "go fast", and "no preference" do not record it |
1 only, then stop. Call AskUserQuestion. Do not scaffold this turn. |
do not persist |
| manager-only |
policy.package or src/<pkg>/ already names it |
1 (no ask), 2, 4, 5. Do not write experiment bodies. |
step 4 |
| existing |
user asks to re-run skore.evaluate or project.put |
Refuse and stop. Say evaluation and project.put are not this skill. Do not paste that snippet. |
do not ask, persist, or install |
| existing |
any other request |
3, 5 |
do not ask, persist, or install |
An unresolved import name is the ask row only. Steps 2, 4, and 5
run on a later turn, once policy.package or src/<pkg>/ names
it. Step 4 does not overwrite a flag that is already true or
false. Step 5: a turn dispatched by setup-ml-project returns
to it; a standalone turn runs git end-turn --stage setup.
Sequence
If fresh or manager-only, resolve G-PKG-NAME. When it is
not already recorded, call AskUserQuestion and stop this
turn. Do not persist policy.package and do not scaffold
until a later turn. “You pick” / “go fast” / “no preference”
does not record it. The question is the src/<pkg>/ import
name, with the folder name as the default option. Each ask
states in 2–4 lines what the answer authorizes — the
scaffolded tree, the persisted policy key, the toolchain a
gate implies — and the detected facts it rests on; a file
link is an addition, never the context. Do not confirm in
prose instead of the tool. A matching [project] name +
src/<pkg>/ already resolves it — do not re-ask. A recorded
policy.package also resolves it. Do not re-ask. When
setup-ml-project dispatched this turn and policy.package
is set, do not ask again. Scaffold is step 2, and only once
the name is already resolved. A status package of null does
not reopen the ask. Persist a resolved import name with
python -m skore_skills policy set package <pkg>.
Fresh / manager-only:
python -m skore_skills scaffold --package <pkg>
The CLI writes the tree and each folder README.md. Do not
recreate those files from memory.
Existing: do not scaffold again. Do not invent files. No
rename, no overwrite, no --force. Do not persist or ask
notebooks/site.
After scaffold on fresh or manager-only, if
policy.notebooks and policy.site are both null
(never set): persist both on this turn —
python -m skore_skills policy set notebooks true
python -m skore_skills policy set site true
Do not AskUserQuestion for notebooks or site. Persist both
before the user-facing line. That line says executed
notebooks and the documentation site are on; the user can
turn either off later. Do not say they are still unset or
null. Do not write notebooks or site into JOURNAL; policy
is the record. Do not ask.
Same turn after persist:
Load add-python-package only if
status.skills.add-python-package is true and
policy.env.managed is true. Else one-line skip: name
jupytext / nbclient / ipywidgets / nbconvert /
mkdocs-material; do
not invent pixi add / uv add; skip site init. Do not
invent that skill's steps.
When that load is allowed:
- notebooks true →
add-python-package for jupytext,
nbclient, and ipywidgets (all env route agent),
plus nbconvert when site is also true — stage turns write
the notebook viewer with --html. Do not leave them as
ask. Do not convert.
- site true →
add-python-package for mkdocs-material
(agent), then python -m skore_skills site init.
If either flag is already true or false, do not overwrite
and do not install from this step.
If setup-ml-project dispatched this turn and is in this
session, return to it; else stop. Standalone:
python -m skore_skills git end-turn --stage setup. If JSON
action is invoke, load persist-ml-git only if
status.skills.persist-ml-git is true and stop; it returns to
triage. If persist is missing, name the pending staged paths
and stop. Otherwise load triage-ml-task only if
status.skills.triage-ml-task is true; else stop.
Stop conditions
- "You pick", "go fast", and "no preference" do not resolve the
import name. Call
AskUserQuestion and stop. Do not scaffold
or persist in that turn, and do not use the folder name yourself.
- Do not write
experiments/01_baseline.py or any experiment
body. "So we can run it right away" is not a reason. Scaffold
writes experiments/README.md only.
- Do not re-run
skore.evaluate or project.put, and do not
paste that snippet. A KeyError from project.get is not a
scaffold turn. Say evaluation and project.put are not this
skill, and stop.
- Do not ask env manager, tabular library, or skore mode.
- Do not run
pixi init / uv init.
- Do not env-bootstrap or editable-install. Export toolchain
(
jupytext, nbclient, ipywidgets, nbconvert,
mkdocs-material) only
via add-python-package after persisting notebooks/site.
Never pixi add / uv add from this skill.
- Do not write experiment or exploratory data analysis bodies.
- Never
git commit here.
- Do not AskUserQuestion for notebooks or site.
- Do not persist notebooks/site on an existing layout.
Layout (CLI writes this)
src/<pkg>/
experiments/
journal/
data_analysis/
data/
audit/
tests/smoke/
scratch/
Each directory has README.md.
1---2name: setup-workspace3description: >4 Detect or scaffold the standard ML workspace layout. Cookiecutter only:5 directories, README.md files, and src/<pkg>/ stubs. After a first scaffold,6 turn executed notebooks and the documentation site on by default (no ask).78 TRIGGER for a new ML project layout or first scaffold.910 SKIP pipeline, evaluation, exploratory data analysis, and library choice.1112 HOW TO USE: detect first. For a fresh or manager-only layout, resolve13 G-PKG-NAME via `AskUserQuestion` unless `policy.package` or `src/<pkg>/`14 already names it, then scaffold, then persist notebooks/site true when both15 are still unset. For an existing layout, stop without scaffolding or16 inventing files.17metadata:18 source: https://skillmd.com/skills/probabl-ai/setup-workspace19 role: helper20 modelTier: small21---2223# Set Up Workspace2425Decide where artifacts live. Do not design an experiment here.2627## Human-facing prose2829Details: `references/human_facing_prose.md`. Scaffolded design30notes, JOURNAL, and folder READMEs describe **this** workspace's31analysis — not the skills framework, the CLI, or the command that32produced an output. Questions and replies use the same33data-science language (import name, notebooks, documentation34site) — not `G-*` names, catalog skill ids, or the wrapper CLI.35Say "workspace setup", not `setup-workspace`.36`<!-- results-embed: … -->` is a site marker. Authoring hints37stay in this skill. `style` is ruff only.3839## Detection4041- `src/` or `journal/` present → **existing**. Reuse names and42 folders. Do not scaffold again.43- Manager manifest without `src/<pkg>/` → **manager-only**. Still44 scaffold; keep existing `pyproject.toml`. No `--force`.45- Otherwise → **fresh**. Ask G-PKG-NAME, then scaffold.4647## Lookup4849Detect the layout, then take the one row that matches and run its50steps from the Sequence below. Do not stop after reading the table.5152| Layout | Import name | Steps | Notebooks and site |53|---|---|---|---|54| fresh | not recorded. "you pick", "go fast", and "no preference" do not record it | 1 only, then stop. Call `AskUserQuestion` (folder name is the default option). Do not scaffold this turn. | do not persist |55| fresh | `policy.package` or `src/<pkg>/` already names it | 1 (no ask), 2, 4, 5. Do not write `experiments/01_baseline.py` or any experiment body, even if asked so it can run right away. | step 4 |56| manager-only | not recorded. "you pick", "go fast", and "no preference" do not record it | 1 only, then stop. Call `AskUserQuestion`. Do not scaffold this turn. | do not persist |57| manager-only | `policy.package` or `src/<pkg>/` already names it | 1 (no ask), 2, 4, 5. Do not write experiment bodies. | step 4 |58| existing | user asks to re-run `skore.evaluate` or `project.put` | Refuse and stop. Say evaluation and `project.put` are not this skill. Do not paste that snippet. | do not ask, persist, or install |59| existing | any other request | 3, 5 | do not ask, persist, or install |6061An unresolved import name is the ask row only. Steps 2, 4, and 562run on a later turn, once `policy.package` or `src/<pkg>/` names63it. Step 4 does not overwrite a flag that is already `true` or64`false`. Step 5: a turn dispatched by `setup-ml-project` returns65to it; a standalone turn runs `git end-turn --stage setup`.6667## Sequence68691. If fresh or manager-only, resolve **G-PKG-NAME**. When it is70 not already recorded, call `AskUserQuestion` and stop this71 turn. Do not persist `policy.package` and do not scaffold72 until a later turn. “You pick” / “go fast” / “no preference”73 does not record it. The question is the `src/<pkg>/` import74 name, with the folder name as the default option. Each ask75 states in 2–4 lines what the answer authorizes — the76 scaffolded tree, the persisted policy key, the toolchain a77 gate implies — and the detected facts it rests on; a file78 link is an addition, never the context. Do not confirm in79 prose instead of the tool. A matching `[project] name` +80 `src/<pkg>/` already resolves it — do not re-ask. A recorded81 `policy.package` also resolves it. Do not re-ask. When82 `setup-ml-project` dispatched this turn and `policy.package`83 is set, do not ask again. Scaffold is step 2, and only once84 the name is already resolved. A `status` package of null does85 not reopen the ask. Persist a resolved import name with86 `python -m skore_skills policy set package <pkg>`.872. Fresh / manager-only:8889 ```bash90 python -m skore_skills scaffold --package <pkg>91 ```9293 The CLI writes the tree and each folder `README.md`. Do not94 recreate those files from memory.953. Existing: do not scaffold again. Do not invent files. No96 rename, no overwrite, no `--force`. Do not persist or ask97 notebooks/site.984. After scaffold on fresh or manager-only, if99 `policy.notebooks` and `policy.site` are both `null`100 (never set): persist both on this turn —101102 `python -m skore_skills policy set notebooks true`103104 `python -m skore_skills policy set site true`105106 Do not AskUserQuestion for notebooks or site. Persist both107 before the user-facing line. That line says executed108 notebooks and the documentation site are on; the user can109 turn either off later. Do not say they are still unset or110 null. Do not write notebooks or site into JOURNAL; policy111 is the record. Do not ask.112113 Same turn after persist:114115 Load `add-python-package` only if116 `status.skills.add-python-package` is true **and**117 `policy.env.managed` is true. Else one-line skip: name118 `jupytext` / `nbclient` / `ipywidgets` / `nbconvert` /119 `mkdocs-material`; do120 not invent `pixi add` / `uv add`; skip `site init`. Do not121 invent that skill's steps.122123 When that load is allowed:124125 - notebooks true → `add-python-package` for `jupytext`,126 `nbclient`, and `ipywidgets` (all `env route` **agent**),127 plus `nbconvert` when site is also true — stage turns write128 the notebook viewer with `--html`. Do not leave them as129 `ask`. Do not convert.130 - site true → `add-python-package` for `mkdocs-material`131 (agent), then `python -m skore_skills site init`.132133 If either flag is already `true` or `false`, do not overwrite134 and do not install from this step.1355. If `setup-ml-project` dispatched this turn and is in this136 session, return to it; else stop. Standalone:137 `python -m skore_skills git end-turn --stage setup`. If JSON138 `action` is `invoke`, load `persist-ml-git` only if139 `status.skills.persist-ml-git` is true and stop; it returns to140 triage. If persist is missing, name the pending `staged` paths141 and stop. Otherwise load `triage-ml-task` only if142 `status.skills.triage-ml-task` is true; else stop.143144## Stop conditions145146- "You pick", "go fast", and "no preference" do not resolve the147 import name. Call `AskUserQuestion` and stop. Do not scaffold148 or persist in that turn, and do not use the folder name yourself.149- Do not write `experiments/01_baseline.py` or any experiment150 body. "So we can run it right away" is not a reason. Scaffold151 writes `experiments/README.md` only.152- Do not re-run `skore.evaluate` or `project.put`, and do not153 paste that snippet. A `KeyError` from `project.get` is not a154 scaffold turn. Say evaluation and `project.put` are not this155 skill, and stop.156- Do not ask env manager, tabular library, or skore mode.157- Do not run `pixi init` / `uv init`.158- Do not env-bootstrap or editable-install. Export toolchain159 (`jupytext`, `nbclient`, `ipywidgets`, `nbconvert`,160 `mkdocs-material`) only161 via `add-python-package` after persisting notebooks/site.162 Never `pixi add` / `uv add` from this skill.163- Do not write experiment or exploratory data analysis bodies.164- Never `git commit` here.165- Do not AskUserQuestion for notebooks or site.166- Do not persist notebooks/site on an existing layout.167168## Layout (CLI writes this)169170```text171src/<pkg>/172experiments/173journal/174data_analysis/175data/176audit/177tests/smoke/178scratch/179```180181Each directory has `README.md`.