[WIP] docs: enforce Architecture.md integrity and document public API surface#1155
[WIP] docs: enforce Architecture.md integrity and document public API surface#1155descorp wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates AGENTS.md with new refactoring conventions and public API guidelines, and introduces docs/PublicAPI.md to serve as the canonical source of truth for the package's public API surface. The review feedback points out inaccuracies in docs/PublicAPI.md regarding how configurations are exported (they are exported as both types and values, not just types) and notes that the source paths in the configurations table are missing the core/ prefix.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| ## Configurations | ||
|
|
||
| Re-exported (as types) from `src/core/configurations/` via `src/core/index.ts`. |
There was a problem hiding this comment.
The description states "Re-exported (as types)", but src/core/index.ts exports configurations using export * from './configurations'; which exports both types and values. Additionally, this section exports the GooglePayEnvironment enum, which is a runtime value.\n\nFurthermore, the source paths in the table below (lines 66-107) are missing the core/ prefix (e.g., configurations/Configuration.ts instead of core/configurations/Configuration.ts). They should be updated to be relative to src/ to maintain consistency with the rest of the document.
There was a problem hiding this comment.
Fixed in commit 7acae296 — two changes:
-
Paths: Added the
core/prefix to all source paths in the Configurations table (e.g.core/configurations/Configuration.ts) for consistency with the rest of the document. -
Type-only clarification: Verified empirically with
tscthat the configurations barrel (src/core/configurations/index.ts) usesexport type *, so all configuration symbols — includingGooglePayEnvironment— are type-only and cannot be used as runtime values. The compiler confirms this:error TS1362: 'GooglePayEnvironment' cannot be used as a value because it was exported using 'export type'. The section description now explicitly states this, andGooglePayEnvironmentis marked asenum (type-only)in the table.
…ports in PublicAPI.md
|



Summary
AGENTS.mdsodocs/Architecture.mdis kept in sync with code (not just reviewed before refactoring): added an "update in the same PR" rule for directory structure, class hierarchies, core interfaces, configuration hierarchy, embedded bus contracts, and event/error/result codes, plus an integrity-validation step (grep every documented symbol, remove stale entries).## Public APIsection toAGENTS.mddeclaringsrc/index.tsre-exports as the contractual API and governing add/remove/rename of exports as breaking changes.docs/PublicAPI.mdenumerating every symbol re-exported through the four barrels (components,core,hooks,modules), grouped by category, with an "Internal (not exported)" section listing symbols that must stay internal (session, embedded bus, base wrappers, internal helpers).docs/PublicAPI.mdto be updated andexample/usages fixed on public API changes; new item 8 requiresdocs/Architecture.mdupdate + integrity validation when structure/hierarchy/interfaces/configs/codes change.No ticket — docs-only change to agent guidance and API documentation.
Test plan
docs/PublicAPI.mdcross-checked againstsrc/index.tsand the four barrels (src/components/index.ts,src/core/index.ts,src/hooks/index.ts,src/modules/index.ts) — every listed export resolves, and internal symbols (session, embedded, base) are correctly excluded.AGENTS.mdrenders correctly (markdown structure, no broken references).yarn test/yarn lint/yarn typechecknot affected.