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
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ It assumes analysis repos made from [analysis_template](https://github.com/quadb
(pixi-managed) and code repos from the [scverse cookiecutter](https://github.com/scverse/cookiecutter-scverse)
(uv-managed). Nothing in it is specific to a dataset, an analysis or a compute environment.

## Install
## Use

**The plugin**, once per machine:
Start each analysis task as its own session, from the analysis repo's main checkout. Pull it first: the worktree
branches from `origin`'s default branch but runs on the main checkout's environment.

```bash
claude plugin marketplace add quadbio/claude-plugins
claude plugin install analysis-workflow@quadbio
claude --worktree <task>
```

The skill is then available everywhere, so it can set up a new project. The hooks and session-start rules act only
in repos that enable the plugin in their committed `.claude/settings.json`, as
[analysis_template](https://github.com/quadbio/analysis_template) does:
1. The agent works on that worktree's branch, in a new task directory `analysis/<topic>/<task>_vN/`; a later
answer to the same question gets the next version, in a new session.
2. It asks you which working object is current, then works in scripts; outputs go to the task directory.
3. Results reach a shared working object only after you sign off the dry run.
4. It opens a PR. Once it is merged, leave with `/exit` and remove the worktree.

Notebooks and environment changes (`pixi install`, `pixi add`) stay with you, in the main checkout. With no
analysis repo yet, ask Claude to start an analysis project: the skill sets one up.

## Install

**The plugin**, once per machine, from the [quadbio marketplace](https://github.com/quadbio/claude-plugins). The
skill is then available everywhere; the hooks and session-start rules act only in repos that enable the plugin in
their committed `.claude/settings.json`, as [analysis_template](https://github.com/quadbio/analysis_template) does:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion hooks/session_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This repository follows the analysis-workflow conventions. Load the `analysis-wo
analysis code, outputs or data. Always:

1. One task = one session = one git worktree = one directory `analysis/<topic>/.../<name>_vN/`. A new task
directory needs a new session.
directory needs a new session, which the human starts with `claude --worktree <name>` in the main checkout.
2. Every output path comes from `task_paths(__file__)` (package `analysis_workflow`); never a bare relative path.
3. Ask the human which working object (and which label keys) is current; never infer it from a script or the
newest file name.
Expand Down
3 changes: 2 additions & 1 deletion skills/analysis-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ into the human lane.

**Start**
1. One task = one session = one git worktree = one branch = one directory `analysis/<topic>/.../<name>_vN/`, merged
through one or more PRs. A new task directory needs a new session; a later answer to the same question is `_v2`.
through one or more PRs. A new task directory needs a new session, which the human starts with
`claude --worktree <name>` in the main checkout; a later answer to the same question is `_v2`.
2. Copy `assets/task_template/`.
3. Ask which working object and which label keys are current, and record them under Inputs. Never infer them from a
script or the newest file name.
Expand Down
Loading