chore: declutter repo, and fix the documented pandas API - #14
Merged
Conversation
Remove the unused agent layer and the stale design documents, then point memory at site_docs as the source of truth for behaviour. Deleted: - .claude/agents/ and .claude/agent-memory/ — the multi-agent setup was never useful, and its memory had rotted (it sent readers to src/clair/auth/environments.py, a path that does not exist). - .claude/specs/pandas_trouve*.md — 822 lines of design for a feature that has no code. - docs/ — PRD and architecture for `clair docs`, which shipped. The logo was a byte-identical copy of the one in site_docs. - specs/environments.md — the feature shipped; site_docs documents it. Renamed site-docs -> site_docs, per the underscore directory convention. Memory now holds only what the documentation cannot: the design invariants and user corrections. CLAUDE.md gains a package map and tells a new session to grep site_docs before it reads src. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README is the PyPI long description. A relative image path does not resolve there, so the logo was broken on the package page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The guide, landing page and README documented `PandasTrouve(inputs={},
transform=)`. That class does not exist. `from clair import PandasTrouve`
raises ImportError, and README.md is the PyPI long description, so the
first code block on the package page was broken.
The real API is a `df_fn` on the normal Trouve. Dependencies are the
parameter defaults:
def daily_event_counts(
refined_events: pd.DataFrame = upstream, # type: ignore
) -> pd.DataFrame: ...
trouve = Trouve(df_fn=daily_event_counts)
The docs were written from an early design spec whose two main decisions
-- a separate class, and an `inputs` dict -- were both reversed during
implementation. The API reference already described `df_fn` correctly, so
the docs contradicted themselves.
Also corrected against real output from example_projects/example_4:
- compile writes a .py artifact, not a .json manifest
- `clair dag` renders roots down to dependents, and tags [PANDAS]
- there is no `clair[pandas]` extra; pandas is a hard dependency
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The pandas guide disproved it. mkdocs does not execute examples, so a wrong code block ships. The note now says the code is the final authority, and that you should search for field names, not only class names. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
OmerBaddour
marked this pull request as ready for review
August 1, 2026 22:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things: a cleanup, and a public-facing docs bug the cleanup uncovered.
1. Decluttering
.claude/agents/,.claude/agent-memory/src/clair/auth/environments.py, which does not exist (real path:src/clair/environments/)..claude/specs/pandas_trouve*.mddocs/clair docs, a shipped feature. Its logo was byte-identical to thesite_docscopy.specs/environments.mdsite_docsdocuments it.Renamed
site-docs→site_docsper the underscore convention (workflow,.gitignore, README updated). Markdown filenames keep hyphens — they are public URL slugs.2. Memory, rearchitected
.claude/memory/now holds only what documentation cannot:project_design_invariants.md(seven rules, each re-verified against code) andproject_docs_are_the_source_of_truth.md. Routing-collision and environments notes dropped as duplication ofguides/routing.mdandconcepts/environments.md.CLAUDE.mdgains a "What clair is" section, a package-level map ofsrc/clair/, and a 3-step opening move for feature requests (grepsite_docs→ readMEMORY.md→ open only the named files). One line per package, so it stays true as files move.3. The pandas API was documented wrong
PandasTrouvedoes not exist.from clair import PandasTrouveraisesImportError— andREADME.mdis the PyPI long description, so the first code block on the package page was broken.The real API is a
df_fnon the ordinaryTrouve, with dependencies declared as parameter defaults:The docs were written from the design spec, whose two headline decisions — separate class and
inputsdict — were both reversed during implementation. The result was self-contradictory docs:reference/trouve-api.md,concepts/trouve.mddf_fnguides/pandas-native.md(12×),index.md,README.md(5×)PandasTrouveAll now use
df_fn. Three further claims corrected against real output fromexample_projects/example_4:.pyartifact, not a.jsonmanifestclair dagrenders roots down to dependents (the old example had the arrows backwards) and tags nodes[PANDAS]clair[pandas]extra — pandas is a hard dependencyThis also disproved a claim I had written into the new memory note ("CI publishes the docs, so they stay correct"). mkdocs does not execute examples. The note now states that the code is the final authority.
Checks
uv run pytest tests/— 516 passed (no code changed)uv run --group docs mkdocs build --strict— clean, no broken linksclair compileandclair dagrun againstexample_projects/example_4to verify every documented claimPandasTrouvereference remains inREADME.mdorsite_docs/🤖 Generated with Claude Code