From 052459ee89c7649cfbeb933195d217080756c7ff Mon Sep 17 00:00:00 2001 From: Marius1311 Date: Wed, 21 Oct 2026 11:32:58 +0200 Subject: [PATCH 1/2] Split analysis/ by dataset, then by topic Co-Authored-By: Claude Opus 5.5 --- .claude-plugin/plugin.json | 2 +- README.md | 2 +- hooks/guard_task_layout.py | 2 +- hooks/session_context.md | 2 +- skills/analysis-workflow/SKILL.md | 7 +++++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 117afbd..98a47e8 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "analysis-workflow", - "version": "0.4.0", + "version": "0.5.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" diff --git a/README.md b/README.md index 2a98c5a..b9ce209 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ branches from `origin`'s default branch but runs on the main checkout's environm claude --worktree ``` -1. The agent works on that worktree's branch, in a new task directory `analysis//_vN/`; a later +1. The agent works on that worktree's branch, in a new task directory `analysis///_vN/`; a later answer to the same question gets the next version, in a new session. Earlier task directories are never edited. 2. It asks you which working object is current and agrees what the task delivers (by default your `deliverables` setting), then works in scripts; outputs go to the task directory. diff --git a/hooks/guard_task_layout.py b/hooks/guard_task_layout.py index 760d135..eefed45 100644 --- a/hooks/guard_task_layout.py +++ b/hooks/guard_task_layout.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Keep every task directory in the template's layout. -A task directory (`analysis//.../_vN/`) holds at its top only what the task template holds +A task directory (`analysis///.../_vN/`) holds at its top only what the task template holds (`skills/analysis-workflow/assets/task_template/`), the output directories of `task_paths` and a task-local environment. Its README's title is the directory's name, and its other headings are the template README's, all of them and in order. Both are read from their sources, the template and `paths.py`, so a change there is a change here. diff --git a/hooks/session_context.md b/hooks/session_context.md index c7e41b5..765ab64 100644 --- a/hooks/session_context.md +++ b/hooks/session_context.md @@ -1,7 +1,7 @@ This repository follows the analysis-workflow conventions. Load the `analysis-workflow` skill before writing analysis code, outputs or data. Always: -1. One task = one session = one git worktree = one directory `analysis//.../_vN/`. A new task +1. One task = one session = one git worktree = one directory `analysis///.../_vN/`. A new task directory needs a new session, started with `claude --worktree ` in the main checkout. Analysis only moves forward: earlier task directories are never edited, fixed or updated. 2. Every output path comes from `task_paths(__file__)` (package `analysis_workflow`); never a bare relative path. diff --git a/skills/analysis-workflow/SKILL.md b/skills/analysis-workflow/SKILL.md index 3fa8dc3..e8dc8da 100644 --- a/skills/analysis-workflow/SKILL.md +++ b/skills/analysis-workflow/SKILL.md @@ -35,8 +35,11 @@ Elsewhere: ## Two lanes -Humans work in notebooks, flat under `analysis//`, writing to `data//results/` and -`figures//`; notebook outputs are committed. Agents work in task directories, with scripts. +`analysis/` is split by dataset, then by broad topic: `analysis///`, with the dataset level even when +there is one dataset. Topics, such as `preprocessing/`, `annotation/` or `spatial/`, can mostly be worked on in any +order. Humans work in notebooks, flat under a topic, writing to `data//results/` and +`figures///`; notebook outputs are committed. Agents work in task directories under a topic, with +scripts. ## Tasks From f878e0d80d99dede828153379806cc1d8fa37d45 Mon Sep 17 00:00:00 2001 From: Marius1311 Date: Wed, 21 Oct 2026 11:36:02 +0200 Subject: [PATCH 2/2] Task template: other tasks' outputs under dataset and topic Co-Authored-By: Claude Opus 5.5 --- skills/analysis-workflow/assets/task_template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/analysis-workflow/assets/task_template/README.md b/skills/analysis-workflow/assets/task_template/README.md index dc58104..a6c0da4 100644 --- a/skills/analysis-workflow/assets/task_template/README.md +++ b/skills/analysis-workflow/assets/task_template/README.md @@ -23,7 +23,7 @@ here too. --> - Working object: `data//processed/.../.zarr`, and the label keys used -- Other artifacts consumed: `analysis//outputs/`, `data//processed/` +- Other artifacts consumed: `analysis////outputs/`, `data//processed/` ## Write-back