Skip to content

docs: improve public API documentation for human readability#5

Merged
shinaoka merged 1 commit intomainfrom
docs/improve-public-api-docs
Mar 25, 2026
Merged

docs: improve public API documentation for human readability#5
shinaoka merged 1 commit intomainfrom
docs/improve-public-api-docs

Conversation

@shinaoka
Copy link
Copy Markdown
Member

Summary

  • README: Add Quick Example (copy-pasteable reverse-mode gradient) and Architecture diagram showing type relationships
  • TrackedValue: Explain struct purpose, detach (stop gradient flow), new (detached constant), node_id (gradient lookup), tangent (HVP direction)
  • Tape: Expand docs on leaf, leaf_with_tangent, placeholder (two-phase recording), tracked_existing, attach_rule, free_graph (lifecycle), hvp (requirements)
  • Gradients: Document leaf-only semantics and lookup pattern
  • PullbackPlan: Explain build-once-execute-many pattern with working doctest

Test plan

  • cargo fmt --all — clean
  • cargo clippy --workspace — only pre-existing warning
  • cargo nextest run --release --workspace — 60/60 pass
  • cargo test --doc --release --workspace — 24/24 pass
  • Coverage thresholds met (5/5 files)

🤖 Generated with Claude Code

- README: add Quick Example and Architecture diagram showing type
  relationships (Tape → TrackedValue → Gradients, DualValue)
- TrackedValue: explain struct purpose, detach (stop gradient flow),
  new (detached constant), node_id (gradient lookup), tangent (HVP)
- Tape: expand docs on leaf, leaf_with_tangent, placeholder (two-phase
  recording), tracked_existing (rehydrating handles), attach_rule,
  free_graph (lifecycle), hvp (requirements and workflow)
- Gradients: document leaf-only semantics and lookup pattern
- PullbackPlan: explain build-once-execute-many pattern with example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinaoka shinaoka enabled auto-merge (squash) March 25, 2026 02:43
@shinaoka shinaoka merged commit 10074db into main Mar 25, 2026
5 checks passed
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.

1 participant