Skip to content

docs: add AGENTS.md, STYLEGUIDE.md, agent-assisted contribution (#114)#149

Open
lipikaramaswamy wants to merge 4 commits intomainfrom
lipikaramaswamy/docs/114-agents-styleguide
Open

docs: add AGENTS.md, STYLEGUIDE.md, agent-assisted contribution (#114)#149
lipikaramaswamy wants to merge 4 commits intomainfrom
lipikaramaswamy/docs/114-agents-styleguide

Conversation

@lipikaramaswamy
Copy link
Copy Markdown
Collaborator

Summary

  • Add AGENTS.md — architecture overview, pipeline diagrams, and structural invariants for agents working in
    the codebase.
  • Add STYLEGUIDE.md — code conventions ruff and ty cannot enforce (Pydantic vs dataclass, error handling,
    column-name constants, prompt construction).
  • Add CLAUDE.md — 3-line redirect to AGENTS.md so Claude Code picks it up.
  • Add an "Agent-Assisted Development" subsection to CONTRIBUTING.md establishing the
    plans/<issue-number>/<short-name>.md convention for non-trivial changes.
  • Ignore .claude/worktrees/ (Claude Code session worktrees).

Filed #148 as a follow-up for three pre-existing column-name string-literal violations in
llm_replace_workflow.py:53-55 that the new STYLEGUIDE rule covers.

Closes #114.

Test plan

  • CI passes (format-check, mkdocs build --strict)
  • Reviewer can navigate the AGENTS.md ↔ STYLEGUIDE.md ↔ CONTRIBUTING.md cross-links
  • git check-ignore .claude/worktrees/foo returns the path (worktrees properly ignored)

lipikaramaswamy and others added 2 commits May 8, 2026 16:56
Local Claude Code session worktrees under .claude/worktrees/ shouldn't
be tracked. Matches the convention already in the DataDesigner repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…orkflow (#114)

- AGENTS.md: architecture overview, pipeline diagrams, structural invariants
- STYLEGUIDE.md: code conventions ruff and ty cannot enforce
- CLAUDE.md: 3-line redirect to AGENTS.md
- CONTRIBUTING.md: new Agent-Assisted Development subsection establishing the
  plans/<issue-number>/<short-name>.md convention for non-trivial changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com>
@lipikaramaswamy lipikaramaswamy requested a review from a team as a code owner May 9, 2026 01:03
@lipikaramaswamy lipikaramaswamy changed the title docs: add AGENTS.md, STYLEGUIDE.md, and agent-assisted contribution workflow (#114) docs: add AGENTS.md, STYLEGUIDE.md, agent-assisted contribution (#114) May 9, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR adds developer-facing documentation — AGENTS.md, STYLEGUIDE.md, CLAUDE.md, and an "Agent-Assisted Development" subsection in CONTRIBUTING.md — to guide both human contributors and coding agents through the project's architecture, conventions, and structural invariants. It also adds .claude/worktrees/ to .gitignore.

  • AGENTS.md documents the three-module layout, both pipeline diagrams (replace and rewrite modes), core concepts, NDD adapter contract, prompt conventions, and structural invariants for agents working in the codebase.
  • STYLEGUIDE.md codifies conventions that static analysis cannot enforce: Pydantic-vs-dataclass selection, error handling patterns, column-name constants, prompt construction, and annotation requirements.
  • CONTRIBUTING.md adds the plans/<issue-number>/<short-name>.md convention requiring a design-review PR before non-trivial implementation work.

Confidence Score: 5/5

This PR adds only documentation and a .gitignore entry — no production code is changed, so there is no risk to runtime behavior.

All five files are documentation or configuration. The cross-links between AGENTS.md, STYLEGUIDE.md, and CONTRIBUTING.md are internally consistent, the pipeline diagrams match the described module boundaries, and the structural invariants align across all three guides. The .gitignore addition is a single, correct path entry.

No files require special attention.

Important Files Changed

Filename Overview
AGENTS.md New file — architecture overview, pipeline ASCII diagrams, invariants, and NDD adapter contract for agent-assisted development. Cross-links are accurate; structural invariants are consistent with STYLEGUIDE.md.
STYLEGUIDE.md New file — code conventions covering Pydantic/dataclass usage, error handling, column constants, prompt construction, type annotations, and code organization. Well structured; cross-links to AGENTS.md and CONTRIBUTING.md are correct.
CLAUDE.md New 3-line file that redirects Claude Code to AGENTS.md via the @AGENTS.md file-import syntax. Minimal and correct.
CONTRIBUTING.md Adds "Agent-Assisted Development" subsection establishing the plans/<issue-number>/<short-name>.md convention and requiring agents to read AGENTS.md/STYLEGUIDE.md before non-trivial changes.
.gitignore Adds .claude/worktrees/ ignore entry to exclude Claude Code session worktrees from version control.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["CLAUDE.md\n(Claude Code entry point)"] -->|"@AGENTS.md"| B["AGENTS.md\nArchitecture + Invariants"]
    B -->|cross-link| C["STYLEGUIDE.md\nCode Conventions"]
    B -->|cross-link| D["CONTRIBUTING.md\nWorkflow + Agent-Assisted Dev"]
    C -->|cross-link| B
    C -->|cross-link| D
    D -->|cross-link| B
    D -->|cross-link| C
    D --> E["plans/issue/name.md\nDesign review PRs"]
    F[".gitignore"] -->|ignores| G[".claude/worktrees/\nSession worktrees"]
Loading

Reviews (5): Last reviewed commit: "docs: clarify TYPE_CHECKING guidance and..." | Re-trigger Greptile

Comment thread STYLEGUIDE.md Outdated
Comment on lines +118 to +127
Use `TYPE_CHECKING` blocks for imports only needed for type hints — prevents circular imports and avoids loading heavy libraries at import time:

```python
from typing import TYPE_CHECKING

if TYPE_CHECKING:
import pandas as pd
```

`pandas` is import-time expensive — only import it at the top level where it is actually needed at runtime.
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.

P2 TYPE_CHECKING guidance may mislead agents into wrong pandas placement

The example puts pandas inside a TYPE_CHECKING block, and the very next sentence says "only import it at the top level where it is actually needed at runtime." An agent reading these two adjacent statements could interpret "use TYPE_CHECKING blocks for heavy libraries" as universal advice and wrap every pandas import in TYPE_CHECKING — even in workflow files that use DataFrames at runtime — causing NameError at execution time. The intent is that TYPE_CHECKING is for type-hint-only imports, while runtime pandas usage always goes at the top level. Splitting these into two clearly labelled scenarios (type-hint-only vs. runtime-needed) would prevent the misreading.

Comment thread STYLEGUIDE.md Outdated

Conventions for NeMo Anonymizer that ruff and ty cannot enforce. Read before adding a new module, workflow, or config class.

NeMo Anonymizer wraps [NeMo Data Designer](https://github.com/NVIDIA-NeMo/DataDesigner) (NDD) for LLM column generation. References to NDD below mean that library.
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.

P2 Minor naming inconsistency: AGENTS.md calls the library "DataDesigner" while STYLEGUIDE.md calls it "NeMo Data Designer". Both point to the same URL, but an agent doing a grep for one spelling will miss the other. Aligning to the same display name avoids confusion.

Suggested change
NeMo Anonymizer wraps [NeMo Data Designer](https://github.com/NVIDIA-NeMo/DataDesigner) (NDD) for LLM column generation. References to NDD below mean that library.
NeMo Anonymizer wraps [DataDesigner](https://github.com/NVIDIA-NeMo/DataDesigner) (NDD) for LLM column generation. References to NDD below mean that library.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

lipikaramaswamy and others added 2 commits May 8, 2026 18:07
Required by the copyright-check CI step (tools/codestyle/copyright_fixer.py).
Matches the HTML-comment header format used by docs/concepts/*.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com>
Address greptile-apps review feedback on PR #149:

- Rewrite the TYPE_CHECKING paragraph to explicitly split type-hint-only
  imports (TYPE_CHECKING block) from runtime use (top-level), and call
  out the NameError failure mode. Avoids the misread where an agent
  could wrap all heavy-library imports in TYPE_CHECKING.
- Use "DataDesigner" instead of "NeMo Data Designer" so the display
  name matches AGENTS.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add AGENTS.md, CLAUDE.md, and STYLEGUIDE.md for agent-assisted development

1 participant