Skip to content

Commit 5ea2a16

Browse files
Add an experimental doc as a repository for AI agent knowledge (#1734)
* Create Jules.md AI guide and incorporate feedback This commit introduces the Jules.md file, a comprehensive guide for AI agents contributing to the Firebase C++ SDK. The document covers: - Repository setup and build commands for various platforms. - Testing strategy, emphasizing integration tests. - Overview of the API surface, including initialization, Futures, core class patterns (using Auth and Database as examples), and listeners. - Best practices for coding style, error handling, resource management, and platform-specific code. - Common coding patterns observed in the repository like Pimpl, namespace usage, and platform abstraction. - A section on how to prompt AI agents effectively when working with this codebase, including suggested prompt text and key directives. - A reminder to keep Jules.md updated with new patterns. This addresses your initial request to create a context document for AI agents and incorporates your feedback to: - Generalize API examples previously focused on Firestore. - Add a new section with guidance for prompting AI agents. * Formatted Jules.md to 80-character line wrap This commit reformats the Jules.md AI guide to ensure all narrative text is wrapped to a maximum of 80 characters per line. This change improves readability, especially in environments or editors with limited horizontal space, and aligns with common markdown style preferences. Code blocks have been preserved with minimal changes to maintain their integrity. * Enrich Jules.md with info from online Firebase C++ docs This commit updates Jules.md, the AI agent guide, with additional context and details sourced from the official Firebase C++ online documentation. Key enhancements include: - **Introduction**: Added a link to the Firebase library support by platform table and a note on the open-source structure of the C++ SDKs (desktop vs. mobile). - **Setup Commands**: - Clarified iOS setup to include linking .framework files alongside pods. - Added a new "Desktop Platform Setup Details" subsection, covering: - Conversion of iOS `GoogleService-Info.plist` to `google-services-desktop.json` using the provided Python script. - Search order for desktop configuration files. - Common system library dependencies for Windows, macOS, and Linux desktop builds. - **API Surface**: - Clarified that `firebase::auth::User` objects are typically obtained from `firebase::auth::AuthResult` after successful authentication operations. - **Best Practices**: - Added a "Platform-Specific Considerations" subsection detailing: - The REST-based nature of the Realtime Database C++ SDK on desktop and the consequent need for server-side indexing for `OrderByChild()` queries. - Awareness of iOS method swizzling used by some Firebase products. These additions provide more comprehensive guidance for you, particularly regarding platform-specific nuances and SDK architecture. The document maintains an 80-character line wrap. * I've updated the Jules.md file with information about Analytics initialization and Future management. This update incorporates further feedback from you into Jules.md: 1. **Clarified Analytics Initialization:** The "API Surface" -> "Initialization" section now specifies that Firebase Analytics uses a different initialization pattern (`firebase::analytics::Initialize(app)`) compared to the common `GetInstance(app, ...)` pattern of other services. It also notes that Analytics functions are typically called globally. 2. **Added Future Lifecycle Management Guidance:** A new point in "Best Practices" -> "Resource Management" emphasizes the importance of ensuring `Future` objects complete their course (e.g., via `OnCompletion` or by checking results) to prevent potential issues with operations not finalizing or resources not being cleaned up promptly. These changes provide more nuanced guidance for interacting with the Firebase C++ SDK. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent e171c8a commit 5ea2a16

File tree

1 file changed

+578
-0
lines changed

1 file changed

+578
-0
lines changed

0 commit comments

Comments
 (0)