Repository navigation
Conventions for data lineage: writes blocks and inputs.yaml - #31
Conversation
Follows analysis-workflow 0.8: every write into `processed/` sits in a `writes` block, which records in the store which task wrote what, and each task's `inputs.yaml` lists what its code consumed. - CONVENTIONS: the `%%writes` form of a write-back; stores only grow; a changed key gets a new name in a dated copy; plain files under `data/` carry no record; `inputs.yaml`, how to get it written, and `analysis-workflow trace`. - REVIEW_GUIDE: flag writes outside a block and keys changed under their old name; compare a task's `inputs.yaml` with what its code consumes, replacing "every key appears in the README". - Starter notebook and demo: the write cell starts with `%%writes`; the demo task gets its `inputs.yaml`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0821352dd7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| inputs: | ||
| - path: data/example_dataset/raw/pbmc3k_raw.h5ad |
There was a problem hiding this comment.
Declare the CellTypist model as an input
The demo notebook loads Immune_All_High.pkl with models.Model.load() and passes it to celltypist.annotate(), so the resulting obs["cell_type"] depends on that model as well as the PBMC data. Declaring only the expression dataset leaves this dependency out of the new lineage record, making the promised trace back to inputs incomplete. Add the consumed model file to the declaration, as required by the declared-input checks in REVIEW_GUIDE.md.
AGENTS.md reference: {{cookiecutter.project_name}}/AGENTS.md:L12-L13
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the latest commit: the demo declares the model in CellTypist's per-user cache, ~/.celltypist/data/models/Immune_All_High.pkl. The trace and the input check expand ~ in the analysis-workflow PR that adds them.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
What a task consumed is in its `inputs.yaml`, so the README section held nothing of its own. The demo's two entries are already in its `inputs.yaml`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtTJWVCHDBr1Lcg8K1Gaft
Follows the plugin: `analysis-workflow new` writes the id into the README header, and `inputs.yaml` holds only what the task's code consumed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtTJWVCHDBr1Lcg8K1Gaft
… with its task A file of another format cannot hold a record of which task made it. In the task's `results/` or `outputs/`, its location says so. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtTJWVCHDBr1Lcg8K1Gaft
…n for plain files is stated Only AnnData and SpatialData stores hold a record of the task that wrote them. Another file under `data/` has none: a trace stops at it, and the task's README is the only link. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtTJWVCHDBr1Lcg8K1Gaft
Marius1311
left a comment
There was a problem hiding this comment.
Let's discuss these before you make changes please.
| @@ -2,6 +2,7 @@ | |||
|
|
|||
| **Date:** 2026-01-27 | |||
| **Author:** ML | |||
There was a problem hiding this comment.
How's the author written down here? What does this look like by default for humans and for agents? For humans, it would be nice if one could pass this already when creating the task dir, with a default if left empty.
There was a problem hiding this comment.
analysis-workflow new --author writes it: a human passed a name or initials, an agent its model. As agreed, --author becomes optional for a human's task and defaults to the git user name; an agent's task still has to pass its model (quadbio/analysis-workflow#26). The commands here drop the flag (34f2be7).
|
|
||
| A task writes into its own directory. An object other tasks will load goes to `processed/` (for an agent, after | ||
| sign-off), and the task README records its path. | ||
| A task writes into its own directory, and so do the external tools and shell scripts it runs. An object other |
There was a problem hiding this comment.
Let's make sure the top level README contains a link to these conventions, so humans actually read what it says here. Also, I feel like it should be clearly marked what's human-relevant, so that humans can quickly get what matters to them, withouth having to read all the agent-specific stuff.
There was a problem hiding this comment.
Of course, let's not duplicate anything - rules that hold for agents and humans alike won't be duplicated. What I"m saying is, make sure these conventions are actually human-readable, if we want humans to follow them!
There was a problem hiding this comment.
Done in 34f2be7. The README already linked the conventions under "Start Your Analysis"; it now also points to them at the top. CONVENTIONS.md opens by saying it is written for humans and applies to their work throughout, with agents mentioned only where a human needs to know what they do, and the sentences that said "you" now name who acts.
| @@ -13,7 +13,7 @@ pixi run analysis-workflow new analysis/<dataset>/<topic>/human_<name>_v1 --auth | |||
| ``` | |||
|
|
|||
| This creates the task directory with its `README.md` and a starter notebook in `notebooks/`. Open the notebook, | |||
There was a problem hiding this comment.
Please justify the existence of this file to me in chat - why can't this not live in the central AGENTS.md? Let's discuss this.
There was a problem hiding this comment.
Or is this entire file mean for humans? I need more context.
There was a problem hiding this comment.
Kept, as discussed: it is the one document humans are meant to read, and it is entirely template-owned, so a template update replaces it cleanly, whereas AGENTS.md holds the facts each repo edits.
… points to them first - CONVENTIONS.md opens by saying it is written for humans and applies to their work throughout; agents are mentioned only where a human needs to know what they do. Sentences that addressed the reader as "you" now name who acts. - `analysis-workflow new` no longer needs `--author` for a human's task: the author line takes the git user name. - README: a pointer to the conventions at the top. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtTJWVCHDBr1Lcg8K1Gaft
Companion to quadbio/analysis-workflow#22 and the PR that follows it (declared inputs and
analysis-workflow trace). Merge after both: the docs, the starter notebook and the demo usewritesandinputs.yaml, which arrive with analysis-workflow 0.8.CONVENTIONS.md
processed/sits in awritesblock (%%writes <path>in a notebook,with writes(<path>):in a script), which records in the store which task wrote what. Stores only grow. External tools write into the task's own directory. Limitation: only AnnData and SpatialData stores hold such a record. Any other file underdata/has none, so a trace stops at it. The only link to the task that made it is that task's README.%%writesform; in a new dated copy a key may be dropped, and one whose values change gets a new name.inputs.yaml, how a human gets it written (ask an agent to declare the task's inputs), andanalysis-workflow trace.REVIEW_GUIDE.md
processed/outside a block, a shellcp/mvamong them, and a key changed under its old name in a dated copy.inputs.yaml. In a trial on a test repo with planted errors, a reviewer working from that paragraph alone found all four and raised nothing false.inputs.yamlto a frozen task is not a finding.Task README: it carries the task's id in its header and loses its Inputs section, in the conventions and the demo;
inputs.yamlholds only what a task consumed.Notebooks: the starter notebook's write-back cell and the demo's save cell start with
%%writes; the demo task gets itsinputs.yamland the task template's new guidance comments.CONVENTIONS.mdnow opens by saying it is written for humans and applies to their work throughout; it names who acts where it used to say "you". The README points to it at the top.analysis-workflow newis shown without--author, which for a human's task defaults to the git user name (quadbio/analysis-workflow#26, to merge first).+103 −42 lines.
🤖 Generated with Claude Code