Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "analysis-workflow",
"version": "0.5.0",
"version": "0.6.0",
"description": "Conventions for analysis repos where humans (notebooks) and coding agents (scripts) work side by side: one task per session, worktree and directory; worktree-safe output paths; additive write-back to AnnData zarr working objects. Ships a skill, guard hooks and the analysis_workflow Python package.",
"author": {
"name": "quadbio"
Expand Down
9 changes: 5 additions & 4 deletions skills/analysis-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ repo, a short summary.
1. The agreed deliverables, and the README brought up to date, its jobs counted with the compute environment's
tools.
2. Write back: dry run, sign-off on that diff, then `yes=True`.
3. An object other tasks will load is promoted to `data/<dataset>/processed/` at sign-off. Ask which subdirectory;
record the path.
3. An object other tasks will load is promoted to `data/<dataset>/processed/` at sign-off: a working object into
`working/`, anything else into a subdirectory with a descriptive name. Ask which subdirectory; record the path.
4. `analysis-workflow check layout`, then push.
5. Open the PR, its body from the PR template; then add it with a short summary to the README and push again. The
body is edited until the merge, never after.
Expand All @@ -93,10 +93,11 @@ repo, a short summary.
| --- | --- | --- |
| `raw/` | bytes as they arrived | nobody, after arrival |
| `resources/` | curated inputs that are not data: gene lists, marker tables | a human, rarely |
| `processed/` | objects code loads, the working objects among them | notebooks; tasks by promotion |
| `processed/` | objects code loads: working objects in `working/`, others in descriptively named subdirectories | notebooks; tasks by promotion |
| `results/` | a notebook's own outputs, prefixed with its stem | humans only |

**Working objects** are AnnData zarr stores, `<name>_<YYYY-MM-DD>.zarr`, in which results accumulate.
**Working objects** are AnnData zarr stores, `processed/working/<name>_<YYYY-MM-DD>.zarr`, in which results
accumulate.
- Read only what you need: `ad.io.read_elem(zarr.open_group(path)["obs"])`, or `ad.experimental.read_lazy`.
- Write back only through `commit_adata`: additions only. Never write an in-memory object over a working object.
Changing or removing a key means a new dated copy; recomputing an existing key is a silent no-op.
Expand Down
4 changes: 2 additions & 2 deletions skills/analysis-workflow/assets/task_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ here too. -->

<!-- The actual files, not concepts: this is what makes the task re-runnable. -->

- Working object: `data/<dataset>/processed/.../<object>.zarr`, and the label keys used
- Other artifacts consumed: `analysis/<dataset>/<topic>/<other_task>/outputs/<file>`, `data/<dataset>/processed/<file>`
- Working object: `data/<dataset>/processed/working/<object>.zarr`, and the label keys used
- Other artifacts consumed: `analysis/<dataset>/<topic>/<other_task>/outputs/<file>`, `data/<dataset>/processed/<subdirectory>/<file>`

## Write-back

Expand Down
Loading