Skip to content

Add AGENTS.md, with CLAUDE.md importing it - #45

Merged
Claptar merged 1 commit into
mainfrom
docs/agent-guide
Oct 15, 2026
Merged

Claptar merged 1 commit into
mainfrom
docs/agent-guide

Conversation

@Claptar

@Claptar Claptar commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Guidance for coding agents working in this repo. It lives in AGENTS.md, which most agents read; CLAUDE.md imports it with @AGENTS.md, so there's one text to maintain.

It covers:

  • the dev, test and benchmark commands;
  • the layering of src/adata (cli → commands → core → elements → storage, plus conversion and formats);
  • the write-safety rules every command that writes a store follows: staged outputs, refusing an output that names the input, validating before the output exists, and keeping the source's Zarr version;
  • the test conventions;
  • the release route.

🤖 Generated with Claude Code

Commands, the layering of src/adata, the write-safety rules every
store-writing command follows, the test conventions and the release
route, for coding agents working in the repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T14:09:40.513826Z c62d621 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c62d621d08

ℹ️ 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".

Comment thread AGENTS.md
Comment on lines +9 to +11
point of the tool is that memory is set by `--chunk`, not by the size of the
input, so code that loads a whole matrix or column is a regression unless it is
behind an explicit `--in-memory`.

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 Qualify the whole-column memory rule

For workflows involving axis metadata, this invariant does not describe the repository: core/select.py::read_names reads an entire axis index, core/concat.py::concat_on_disk retains every input's obs and var names, and conversion/tenx.py::_features calls read_str_all for complete var columns. Their memory therefore scales with axis length even without --in-memory, so an agent cannot follow this guidance without treating established implementations as regressions. Either distinguish matrix payloads from metadata or stream these paths before presenting the rule as universal.

AGENTS.md reference: AGENTS.md:L6-L11

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
Comment on lines +98 to +99
- **Never write a store in place.** Every command that writes a store wraps the
write in `util/staging.staged_outputs([...])`.

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 Limit the staged-write guarantee to commands that implement it

When an agent works on create or any import subcommand, this categorical guarantee is false: commands/create.py::create_store deletes a forced destination and opens the final path directly with mode "w", while commands/import_data.py::_prepare_target_path copies or opens the final output directly and --inplace later mutates it with mode "a". A failure can therefore leave those destinations removed, partially written, or modified, despite this guide implying atomic rollback; either stage those flows or name only the commands for which the rule currently holds.

AGENTS.md reference: AGENTS.md:L98-L106

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
Comment on lines +116 to +117
- **Outputs keep the source's index dtypes, chunking and compression.**
Changing them is `recast`'s job, or that of an explicit flag.

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 Document the required exceptions to layout preservation

For concatenations whose combined dimensions or nonzero count exceed a source integer type, core/concat.py::_concat_index_dtypes intentionally widens indices or indptr; similarly, storage.fit_chunks must shrink invalid HDF5 chunks and cross-backend copies cannot preserve incompatible codecs. The unconditional statement that only recast or an explicit flag may make these changes could lead an agent to undo safeguards and introduce overflow or invalid datasets. Qualify preservation as best-effort, with required capacity and backend-compatibility exceptions.

AGENTS.md reference: AGENTS.md:L116-L117

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.12)

1 281 tests  ±0   1 281 ✅ ±0   4m 28s ⏱️ + 1m 50s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit c62d621. ± Comparison against base commit 63d1aae.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.13)

1 281 tests  ±0   1 281 ✅ ±0   5m 4s ⏱️ -5s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit c62d621. ± Comparison against base commit 63d1aae.

@Claptar
Claptar merged commit 52cce67 into main Oct 15, 2026
6 checks passed
@Claptar
Claptar deleted the docs/agent-guide branch October 15, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants