You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Rewrite CLAUDE.md with dev commands and architecture (#1097)
* Rename claude.md to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Rewrite CLAUDE.md with dev commands and architecture
Replace the lengthy style guide with a focused reference that includes
build/lint/format commands, the 3-site GitBook architecture, codegen
pipeline details, and condensed writing conventions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update CLAUDE.md with dev commands, 3-site architecture, and codegen details
Keep all existing writing conventions, patterns, and guidelines intact.
Add new sections for:
- Development commands (generate, format, lint, validate-*)
- Three GitBook sites (guides, api-reference, brand-guides)
- Codegen pipeline (smith.ts, Metalsmith, Handlebars, @seamapi packages)
- Auto-generated vs. hand-written content guidance
Fix stale references from /docs/api/ to docs/api-reference/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add guideline to avoid modifying file URLs in SUMMARY.md
Use the GitBook UI to rename or move pages instead, as modifying
URLs via SUMMARY.md can break GitBook sync.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+59-44Lines changed: 59 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,57 @@
1
-
# Seam API Documentation - Repository Guide
1
+
# CLAUDE.md
2
2
3
-
This document provides a comprehensive overview of the Seam API documentation repository structure, organization, and writing conventions. Use this as a reference when working with the documentation.
3
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
4
5
-
**Repository:** Seam API Documentation (hosted on GitBook at https://docs.seam.co/latest/)
6
-
**Total Files:** 627 markdown files
7
-
**Last Updated:** 2026-01-28
5
+
## Repository Overview
8
6
9
-
---
7
+
Seam API documentation hosted on GitBook at https://docs.seam.co/latest/. Contains hand-written guides, auto-generated API reference pages, a codegen pipeline, and a GitBook plugin.
npm run generate # Regenerate API reference docs (Metalsmith + Handlebars)
14
+
npm run format # Prettier (also runs eslint --fix via preformat hook)
15
+
npm run lint # ESLint + Prettier check
16
+
npm run typecheck # TypeScript type checking
17
+
npm run validate-paths # Validate doc file paths
18
+
npm run validate-links # Validate internal links
19
+
npm run validate-orphan-pages # Find pages not in SUMMARY.md
20
+
npm run validate-redirects # Validate .gitbook.yaml redirects
21
+
```
22
+
23
+
**Always run `npm run format` before committing.** CI auto-commits formatting fixes on non-main branches, but formatting locally avoids noise.
24
+
25
+
Optional external tools used during `npm run generate` for code sample formatting: `ruff` (Python), `shfmt` (shell), `gofmt` (Go), `stree` from `syntax_tree` gem (Ruby).
26
+
27
+
## Architecture
28
+
29
+
### Three GitBook Sites
30
+
31
+
The repo serves three separate GitBook sites, each with its own config, `SUMMARY.md`, and redirect rules:
**`docs/api-reference/`** is auto-generated by `npm run generate`. Do not manually edit these files -- changes will be overwritten. The codegen pipeline:
10
42
11
-
## Table of Contents
43
+
- Entry point: `codegen/smith.ts` (Metalsmith static site generator)
**Purpose:** Ensures old documentation links continue working as structure evolves
368
+
Each `.gitbook.yaml` contains redirects maintaining backward compatibility. When restructuring, always add redirects in the appropriate site's config.
356
369
357
370
---
358
371
@@ -698,7 +711,7 @@ To follow this guide, you need:
698
711
699
712
### For Working with This Repository
700
713
701
-
1.**Auto-generated content:** The `/docs/api/` directory appears to be auto-generated. Avoid manual edits here - changes should be made to the source spec.
714
+
1.**Auto-generated content:** The `docs/api-reference/` directory is auto-generated by `npm run generate`. Do not manually edit these files -- changes should be made to the codegen pipeline or upstream packages (`@seamapi/types`, `@seamapi/blueprint`).
702
715
703
716
2.**Consistency is critical:** With 627 files, maintaining consistent formatting, tone, and structure is essential. Follow existing patterns exactly.
704
717
@@ -714,9 +727,11 @@ To follow this guide, you need:
714
727
715
728
8.**Link maintenance:** When restructuring, always add redirects in `.gitbook.yaml` to maintain backward compatibility.
716
729
717
-
9.**Visual aids:** Use screenshots, diagrams, and videos generously. IoT integrations benefit from visual guidance.
730
+
9.**Do not modify file URLs in SUMMARY.md.** Renaming or moving page URLs via SUMMARY.md can break GitBook sync. Use the GitBook UI to rename or move pages instead.
731
+
732
+
10.**Visual aids:** Use screenshots, diagrams, and videos generously. IoT integrations benefit from visual guidance.
718
733
719
-
10.**Accessibility:** Provide alt text for images, use semantic HTML, and ensure code examples are properly formatted.
734
+
11.**Accessibility:** Provide alt text for images, use semantic HTML, and ensure code examples are properly formatted.
0 commit comments