External API PM Sync Design
Date: 2026-03-24Goal
KeepAPI-Doc as the source of truth for the public external API contract and bring the PM-side 外部 API 接口文档(revision).md to near-parity with it while preserving Chinese PM writing style.
Background
The current Mintlify documentation inAPI-Doc was produced through a code-first workflow:
- live controllers and runtime behavior define the contract
- PM docs provide explanation and business framing
- discrepancies are reconciled after the public docs are written
API-Doc also still reflects an earlier state where the PM revision was behind.
Problem
The project currently has two documentation surfaces for the same external API:API-Doc, which is detailed and structured per endpoint- PM-side
外部 API 接口文档(revision).md, which is Chinese and easier for internal coordination
Source-of-Truth Decision
API-Doc remains the only source of truth for public contract details in this sync pass.
Reasoning:
- it was built from code/runtime evidence first
- it already contains endpoint-by-endpoint parameter, status, example, and note sections
- using one source of truth avoids reintroducing PM-draft-only routes or stale auth/error wording
API-Doc for contract content, not the other way around.
Scope
In scope
- synchronize PM
外部 API 接口文档(revision).mdto matchAPI-Docat endpoint-detail level - keep PM writing in Chinese
- update
docs/reconciliation/external-api-pm-reconciliation.mdso it reflects the new synchronized state instead of the earlier pre-sync discrepancies - preserve current
API-Docpage structure and contract wording as the baseline
Out of scope
- changing the Mintlify navigation or information architecture
- turning the PM document into a page-by-page English mirror
- rewriting unrelated PM platform docs unless they block contract consistency
- changing runtime behavior, controllers, DTOs, or response examples unless evidence shows the docs are already wrong
Synchronization Boundary
This effort targets contract-level parity, not literal text duplication. The following must match betweenAPI-Doc and PM revision:
- implemented endpoint inventory
- authentication expectations relevant to callers
- success status codes
- query parameter and request body field sets
- required vs optional semantics
- response example structure
- listed error responses
- caller-relevant notes and limitations
- language (
API-DocEnglish, PM doc Chinese) - paragraph phrasing and prose style
- Mintlify-specific navigation and cross-link style
- document-level introduction wording where contract meaning is unchanged
Endpoint Mapping Rule
Each endpoint page inAPI-Doc maps to one Chinese section in PM revision.
Stable section mapping:
Endpoint->接口Authentication->鉴权要求Success status code->成功状态码Query parameters->查询参数Request body->请求体Response example->响应示例Error responses->错误响应Notes->说明
Shared Content Rule
Shared contract content in the PMrevision should also be aligned to the Mintlify shared pages:
- auth header and token prefix must match
authentication.mdx - shared external error shape must match
concepts/errors.mdx - shared pagination wording must match
concepts/pagination.mdx - resource inventory must match
docs.jsonnavigation and endpoint pages
API-Doc, the PM statement must be rewritten to match API-Doc.
Files To Change
Primary edits
../a60-lensmor-pm/工作流/研发设计/external-api-platform/外部 API 接口文档(revision).mddocs/reconciliation/external-api-pm-reconciliation.md
Reference inputs
index.mdxauthentication.mdxconcepts/errors.mdxconcepts/pagination.mdx- all files under
api-reference/ docs/endpoint-inventory/external-api-endpoints.md
Implementation Strategy
- Read the shared Mintlify pages and all endpoint pages.
- Build a per-endpoint sync checklist from
API-Doc. - Rewrite the PM
revisionendpoint sections so each one includes the same contract data as the corresponding Mintlify page, in Chinese. - Preserve PM-level headings where they still make sense, but normalize endpoint subsections to the stable mapping rule.
- Update the reconciliation artifact so it documents the synchronized state and any remaining non-contract differences.
- Re-read both surfaces to verify there are no endpoint mismatches in route list, auth wording, status codes, request fields, response example keys, or historical notes.
Reconciliation Artifact Outcome
After this sync,docs/reconciliation/external-api-pm-reconciliation.md should no longer describe the PM revision as generally stale.
Instead, it should document:
- that
API-Docis the contract source of truth - that PM
revisionhas been synchronized to it - any remaining expression-only differences that are intentional
- the maintenance rule for future updates: update
API-Docfirst, then mirror PMrevision
Risks
Risk 1: Copy drift during manual sync
Because the PM doc is prose-heavy and Chinese, manual transcription can introduce small field or status mismatches. Mitigation:- verify every endpoint against the corresponding Mintlify page after editing
- check names, required flags, status codes, and response example keys line by line
Risk 2: Over-synchronizing non-contract wording
Trying to force exact structural duplication would make the PM doc harder to read and maintain. Mitigation:- keep the contract sections aligned
- allow prose-level differences where no contract meaning changes
Risk 3: Leaving stale reconciliation notes behind
If the PM revision is synchronized but reconciliation is not updated, internal readers will see contradictory status reporting. Mitigation:- update reconciliation in the same change set
Success Criteria
The work is successful when:- PM
revisioncontains the same 14 live endpoints asAPI-Doc - each endpoint in PM
revisionincludes the same contract-level data categories as its Mintlify counterpart - auth wording uses the same current public contract as
API-Doc - stale PM-only route framing is not reintroduced
docs/reconciliation/external-api-pm-reconciliation.mdreflects the synchronized state
Follow-up Plan Direction
The implementation plan should focus on a bounded documentation sync pass:- inventory the
API-Docendpoint pages as the sync baseline - patch PM
revision - patch reconciliation
- run a final parity review across the two surfaces