Skip to content

[WIP] docs: enforce Architecture.md integrity and document public API surface#1155

Open
descorp wants to merge 3 commits into
developfrom
chore/agents-docs-integrity
Open

[WIP] docs: enforce Architecture.md integrity and document public API surface#1155
descorp wants to merge 3 commits into
developfrom
chore/agents-docs-integrity

Conversation

@descorp

@descorp descorp commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Strengthen AGENTS.md so docs/Architecture.md is 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).
  • Add a new ## Public API section to AGENTS.md declaring src/index.ts re-exports as the contractual API and governing add/remove/rename of exports as breaking changes.
  • Add a standalone docs/PublicAPI.md enumerating 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).
  • Update the Verification Checklist: item 7 now requires docs/PublicAPI.md to be updated and example/ usages fixed on public API changes; new item 8 requires docs/Architecture.md update + integrity validation when structure/hierarchy/interfaces/configs/codes change.

No ticket — docs-only change to agent guidance and API documentation.

Test plan

  • docs/PublicAPI.md cross-checked against src/index.ts and 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.md renders correctly (markdown structure, no broken references).
  • No code or test changes — yarn test / yarn lint / yarn typecheck not affected.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/PublicAPI.md Outdated

## Configurations

Re-exported (as types) from `src/core/configurations/` via `src/core/index.ts`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 7acae296 — two changes:

  1. 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.

  2. Type-only clarification: Verified empirically with tsc that the configurations barrel (src/core/configurations/index.ts) uses export type *, so all configuration symbols — including GooglePayEnvironment — 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, and GooglePayEnvironment is marked as enum (type-only) in the table.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@descorp descorp changed the title docs: enforce Architecture.md integrity and document public API surface [WIP] docs: enforce Architecture.md integrity and document public API surface Jul 8, 2026
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