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.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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ branches from `origin`'s default branch but runs on the main checkout's environm
claude --worktree <task>
```

1. The agent works on that worktree's branch, in a new task directory `analysis/<topic>/<task>_vN/`; a later
1. The agent works on that worktree's branch, in a new task directory `analysis/<dataset>/<topic>/<task>_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.
Expand Down
2 changes: 1 addition & 1 deletion hooks/guard_task_layout.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Keep every task directory in the template's layout.

A task directory (`analysis/<topic>/.../<name>_vN/`) holds at its top only what the task template holds
A task directory (`analysis/<dataset>/<topic>/.../<name>_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.
Expand Down
2 changes: 1 addition & 1 deletion hooks/session_context.md
Original file line number Diff line number Diff line change
@@ -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/<topic>/.../<name>_vN/`. A new task
1. One task = one session = one git worktree = one directory `analysis/<dataset>/<topic>/.../<name>_vN/`. A new task
directory needs a new session, started with `claude --worktree <name>` 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.
Expand Down
7 changes: 5 additions & 2 deletions skills/analysis-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ Elsewhere:

## Two lanes

Humans work in notebooks, flat under `analysis/<topic>/`, writing to `data/<dataset>/results/` and
`figures/<topic>/`; notebook outputs are committed. Agents work in task directories, with scripts.
`analysis/` is split by dataset, then by broad topic: `analysis/<dataset>/<topic>/`, with the dataset level even when

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the task template with the new hierarchy

When a task consumes another task's output under this newly required dataset/topic hierarchy, the copied template still instructs authors at skills/analysis-workflow/assets/task_template/README.md:26 to record analysis/<other_task>/outputs/<file>. That omits the dataset and topic components, so following the template produces a non-existent input path and makes the task README's rerun instructions incorrect; update the template example to include both levels.

Useful? React with 馃憤聽/ 馃憥.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f878e0d: the example is now analysis/<dataset>/<topic>/<other_task>/outputs/<file>. It was the only remaining path without both levels.

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/<dataset>/results/` and
`figures/<dataset>/<topic>/`; notebook outputs are committed. Agents work in task directories under a topic, with
scripts.

## Tasks

Expand Down
2 changes: 1 addition & 1 deletion skills/analysis-workflow/assets/task_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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/<other_task>/outputs/<file>`, `data/<dataset>/processed/<file>`
- Other artifacts consumed: `analysis/<dataset>/<topic>/<other_task>/outputs/<file>`, `data/<dataset>/processed/<file>`

## Write-back

Expand Down
Loading