Skip to content

Commit dd4fc6c

Browse files
huangyiireneclaude
andauthored
fix(spec-docs): a module header's headings start at the page's section level (#12551)
The 38 generated pages under `content/docs/references/**` rendered two `<h1>`. The second one was never in the MDX: it came from a JSDoc file header in `packages/spec/src/**`, which `build-docs.ts` copied verbatim into the page. A `.zod.ts` header is written as if it were a standalone document, so its author opens a section with `# ` — embedded under a page whose `<h1>` is already its frontmatter `title`, that compiles to a second one. 43 headings across the 38 pages. `renderFileDescription` now renumbers the fragment so its SHALLOWEST heading sits at `ctx.sectionLevel`, which `build-docs.ts` supplies as the level its own `## TypeScript Usage` and `## <SchemaName>` sections use. Renumbering rather than rewriting every `# ` to `## `, for three reasons the pins carry: 26 described modules already start at level 2 and a blanket shift would regenerate 26 pages that were never wrong; a block mixing `#` and `##` would collide two source levels into one; and — the load-bearing one — the shift is scoped to `prose` lines, so a `# Install pnpm globally` inside a fence is left alone. That last is why this lives beside `classifyLines` instead of running as a regex over the emitted string: a fence-blind pass corrupts working snippets to satisfy a rule about HTML those lines never produce. With the tree clean, `scripts/check-docs-single-h1.mjs` goes `DEAD-EXCLUSION` on its own carve-out, so that entry is deleted here. The gate's judged population grows from 356 to 394 pages. Claude-Session: https://claude.ai/code/session_01E5LFCYBJ3q2s6yW6oMLxwy Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5fbd58e commit dd4fc6c

42 files changed

Lines changed: 453 additions & 127 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/docs/references/api/dispatcher.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Dispatcher protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# HttpDispatcher Protocol
8+
## HttpDispatcher Protocol
99

1010
Defines how the ObjectStack HttpDispatcher routes incoming API requests
1111
to the correct kernel service based on URL prefix matching.

content/docs/references/api/package-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Package Api protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Package API Protocol
8+
## Package API Protocol
99

1010
REST API endpoint schemas for package lifecycle management.
1111

content/docs/references/api/versioning.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Versioning protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# API Versioning Protocol
8+
## API Versioning Protocol
99

1010
Defines how API versions are negotiated between client and server.
1111
Supports multiple versioning strategies and deprecation lifecycle management.

content/docs/references/cloud/app-store.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ description: App Store protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# App Store Protocol (Customer Experience)
8+
## App Store Protocol (Customer Experience)
99

1010
Defines schemas for the end-customer experience when browsing, evaluating,
1111
installing, and managing marketplace apps from within ObjectOS.
1212

13-
## Architecture Alignment
13+
### Architecture Alignment
1414
- **Salesforce AppExchange (Customer)**: Browse apps, read reviews, 1-click install
1515
- **Shopify App Store (Merchant)**: App evaluation, trial, install, manage subscriptions
1616
- **Apple App Store (User)**: Ratings, reviews, featured collections, personalized recs
1717

18-
## Customer Journey
18+
### Customer Journey
1919
```
2020
Discover → Evaluate → Install → Configure → Use → Rate/Review → Manage
2121
```
2222

23-
## Key Concepts
23+
### Key Concepts
2424
- **Reviews & Ratings**: User-submitted ratings and reviews with moderation
2525
- **Collections & Recommendations**: Personalized discovery and curated picks
2626
- **Subscription Management**: Manage licenses, billing, and renewals

content/docs/references/cloud/developer-portal.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Developer Portal protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Developer Portal Protocol
8+
## Developer Portal Protocol
99

1010
Defines schemas for the developer-facing side of the marketplace ecosystem.
1111
Covers the complete developer journey:
@@ -14,12 +14,12 @@ Covers the complete developer journey:
1414
Register → Create App → Develop → Validate → Build → Submit → Monitor → Iterate
1515
```
1616

17-
## Architecture Alignment
17+
### Architecture Alignment
1818
- **Salesforce Partner Portal**: ISV registration, AppExchange publishing, Trialforce
1919
- **Shopify Partner Dashboard**: App management, analytics, billing
2020
- **VS Code Marketplace Management**: Extension publishing, statistics, tokens
2121

22-
## Identity Integration (better-auth)
22+
### Identity Integration (better-auth)
2323
Authentication, organization management, and API keys are handled by the
2424
Identity module (`@objectstack/spec` Identity namespace), which follows the
2525
better-auth specification. This module only defines marketplace-specific
@@ -35,7 +35,7 @@ extensions on top of the shared identity layer:
3535
There is no `Identity.ApiKeySchema`#8715 retired it (it documented
3636
better-auth's apiKey plugin, which this platform does not load)
3737

38-
## Key Concepts
38+
### Key Concepts
3939
- **Publisher Profile**: Links an Identity Organization to a marketplace publisher
4040
- **App Listing Management**: CRUD for marketplace listings (draft → published)
4141
- **Version Channels**: alpha / beta / rc / stable release channels

content/docs/references/cloud/environment-artifact.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Environment Artifact protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Environment Artifact Envelope — re-export (#4740, #4535 C10)
8+
## Environment Artifact Envelope — re-export (#4740, #4535 C10)
99

1010
The envelope has exactly ONE declaration:
1111
`../system/environment-artifact.zod` (maintainer route A′ on #4740

content/docs/references/cloud/environment-package.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Environment Package protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Environment Package Installation Protocol
8+
## Environment Package Installation Protocol
99

1010
Models `sys_package_installation` — the pairing between an Environment and
1111
a specific, immutable `sys_package_version` snapshot.

content/docs/references/cloud/environment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Environment protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Environment Protocol (runtime container)
8+
## Environment Protocol (runtime container)
99

1010
An **Environment** is the runtime container of an organization's data.
1111
It owns a physically isolated database, a canonical hostname, a plan/quota

content/docs/references/cloud/marketplace-admin.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ description: Marketplace Admin protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Marketplace Administration Protocol
8+
## Marketplace Administration Protocol
99

1010
Defines schemas for the platform (Cloud) side of marketplace operations.
1111
Covers the administrative workflows for managing and governing the marketplace.
1212

13-
## Architecture Alignment
13+
### Architecture Alignment
1414
- **Salesforce AppExchange Admin**: Security review, ISV monitoring, partner management
1515
- **Apple App Store Connect Review**: Human review process, guidelines, rejection reasons
1616
- **Google Play Console**: Policy enforcement, quality gates, content moderation
1717

18-
## Key Concepts
18+
### Key Concepts
1919
- **Review Process**: Structured workflow for submission review (automated + manual)
2020
- **Curation**: Featured apps, curated collections, editorial picks
2121
- **Governance**: Policy enforcement, takedown, compliance

content/docs/references/cloud/marketplace.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Marketplace protocol schemas
55

66
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
77

8-
# Marketplace Protocol
8+
## Marketplace Protocol
99

1010
Defines the core schemas for the plugin marketplace ecosystem, covering:
1111
- **Developer Side**: Package publishing, submission, and version releases
@@ -14,13 +14,13 @@ Defines the core schemas for the plugin marketplace ecosystem, covering:
1414
This protocol defines the contract between plugin developers, the marketplace
1515
platform, and customers who install plugins.
1616

17-
## Architecture Alignment
17+
### Architecture Alignment
1818
- **Salesforce AppExchange**: Security review, managed packages, listing profiles
1919
- **VS Code Marketplace**: Extension publishing, ratings, verified publishers
2020
- **npm Registry**: Package publishing, versioning, scoped packages
2121
- **Shopify App Store**: App review process, billing integration, merchant installs
2222

23-
## Developer Publishing Flow
23+
### Developer Publishing Flow
2424
```
2525
1. Develop → Build the project locally using ObjectStack CLI
2626
2. Validate → Run `os validate` (schema + security checks)
@@ -30,7 +30,7 @@ platform, and customers who install plugins.
3030
6. Publish → Approved listing goes live on marketplace
3131
```
3232

33-
## Platform Management Flow
33+
### Platform Management Flow
3434
```
3535
1. Receive → Accept submissions from verified publishers
3636
2. Scan → Automated security scan and compatibility check

0 commit comments

Comments
 (0)