Implement Documentation Authority CI/CD system#10
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Create components/docs/ directory with 60 markdown documentation files - Add scripts/build-llms-docs.py to aggregate docs into llms-full.txt - Add .github/workflows/docs-authority.yml for automated CI/CD - Create llms.txt documentation index for LLM navigation - Generate initial llms-full.txt (560KB, 21,114 lines, 60 documents) Co-authored-by: Krosebrook <214532761+Krosebrook@users.noreply.github.com>
ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||||||||||
There was a problem hiding this comment.
13 issues found across 64 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="components/docs/ARCHITECTURE_v2.md">
<violation number="1" location="components/docs/ARCHITECTURE_v2.md:358">
P2: Documentation uses deprecated `cacheTime` option. In TanStack Query v5 (which this project uses), `cacheTime` was renamed to `gcTime`. Update the documentation to reflect the correct option name.</violation>
</file>
<file name="components/docs/DATABASE_SCHEMA_TECHNICAL_SPEC.md">
<violation number="1" location="components/docs/DATABASE_SCHEMA_TECHNICAL_SPEC.md:3">
P2: Documentation inconsistency: The file claims 73 tables but only documents 70. The appendix breakdown is incorrect - Gamification shows 16 (actual: 17 tables numbered 20-36) and System & Configuration shows 10 (actual: 6 tables numbered 64-69). Consider correcting the counts or adding the 3 missing tables if they should exist.</violation>
</file>
<file name="components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md">
<violation number="1" location="components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md:287">
P2: Incorrect file path in Version Control section. The document claims to be located at `docs/AGENTS_DOCUMENTATION_AUTHORITY.md` but the actual path is `components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md`.</violation>
</file>
<file name="components/docs/DOC_POLICY.md">
<violation number="1" location="components/docs/DOC_POLICY.md:15">
P2: Path inconsistency: This policy document references `docs/**` and `ADR/**` paths throughout, but the actual documentation files (including this file itself) are located in `components/docs/`. The `ADR/` directory doesn't exist. Consider updating paths to match the actual repository structure (e.g., `components/docs/**`) or creating the referenced directories.</violation>
</file>
<file name=".github/workflows/docs-authority.yml">
<violation number="1" location=".github/workflows/docs-authority.yml:16">
P2: Workflow is missing explicit `permissions` declaration. This workflow requires `contents: write` for auto-committing and `pull-requests: write` for PR comments. Explicitly declaring permissions follows the security principle of least privilege and prevents the workflow from having broader access than needed.</violation>
</file>
<file name="components/docs/COMPONENT_LIBRARY.md">
<violation number="1" location="components/docs/COMPONENT_LIBRARY.md:638">
P2: Documentation example uses deprecated TanStack Query v4 syntax. Since the project uses @tanstack/react-query v5, the example should use the v5 object syntax to avoid confusing developers who copy this code.</violation>
</file>
<file name="components/docs/CALENDAR_SYSTEM_AUDIT.md">
<violation number="1" location="components/docs/CALENDAR_SYSTEM_AUDIT.md:1445">
P2: Typo in documentation code example: `eventsToCan cel` should be `eventsToCancel`. This variable name has a space in it, which would cause a syntax error if developers copy this fix example.</violation>
</file>
<file name="components/docs/DEPLOYMENT_OPERATIONS.md">
<violation number="1" location="components/docs/DEPLOYMENT_OPERATIONS.md:397">
P2: The `cacheTime` option was renamed to `gcTime` in TanStack Query v5. Since this project uses `@tanstack/react-query@^5.84.1`, this documentation example uses a deprecated option name that will confuse developers following this guide.</violation>
</file>
<file name="components/docs/EDGE_CASES_AUDIT.md">
<violation number="1" location="components/docs/EDGE_CASES_AUDIT.md:298">
P2: Incorrect React Query v5 pattern: `onError` callback was removed from `useQuery` in TanStack Query v5. This code example will not work with the project's `@tanstack/react-query@^5.84.1`. Use the `error` return value or configure global error handling via `QueryCache` instead.</violation>
<violation number="2" location="components/docs/EDGE_CASES_AUDIT.md:302">
P2: Malformed markdown code fence: missing backtick in closing fence. The code block ends with `` instead of ```, which will break markdown rendering.</violation>
</file>
<file name="components/docs/DATABASE_EDGE_CASES.md">
<violation number="1" location="components/docs/DATABASE_EDGE_CASES.md:510">
P2: Async/await precedence bug in documentation code example. The `.length` is called on the Promise before await resolves it, resulting in `undefined`. Wrap the await in parentheses or use a temporary variable to get the correct count.</violation>
</file>
<file name="components/docs/API_REFERENCE.md">
<violation number="1" location="components/docs/API_REFERENCE.md:366">
P2: Missing `await` for async Stripe method. `constructEventAsync` returns a Promise and must be awaited, otherwise `event` will be a Promise object and `event.type` will be undefined. Developers copying this example will encounter silent failures.</violation>
</file>
<file name="components/docs/ARCHITECTURE.md">
<violation number="1" location="components/docs/ARCHITECTURE.md:372">
P2: This template code exposes raw `error.message` to clients, which is a security anti-pattern. Since this is a "Standard backend function structure" that developers will copy, it could propagate information disclosure vulnerabilities. Consider returning a generic error message like `'Internal server error'` instead, while logging the detailed error server-side only.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| // React Query config | ||
| { | ||
| staleTime: 30000, // 30s for user data | ||
| cacheTime: 300000, // 5min cache retention |
There was a problem hiding this comment.
P2: Documentation uses deprecated cacheTime option. In TanStack Query v5 (which this project uses), cacheTime was renamed to gcTime. Update the documentation to reflect the correct option name.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/ARCHITECTURE_v2.md, line 358:
<comment>Documentation uses deprecated `cacheTime` option. In TanStack Query v5 (which this project uses), `cacheTime` was renamed to `gcTime`. Update the documentation to reflect the correct option name.</comment>
<file context>
@@ -0,0 +1,503 @@
+// React Query config
+{
+ staleTime: 30000, // 30s for user data
+ cacheTime: 300000, // 5min cache retention
+ refetchOnWindowFocus: false
+}
</file context>
| cacheTime: 300000, // 5min cache retention | |
| gcTime: 300000, // 5min garbage collection retention |
| @@ -0,0 +1,2965 @@ | |||
| # DATABASE SCHEMA TECHNICAL SPECIFICATION | |||
| ## INTeract Employee Engagement Platform | |||
| ### Complete Entity Reference - All 73 Tables | |||
There was a problem hiding this comment.
P2: Documentation inconsistency: The file claims 73 tables but only documents 70. The appendix breakdown is incorrect - Gamification shows 16 (actual: 17 tables numbered 20-36) and System & Configuration shows 10 (actual: 6 tables numbered 64-69). Consider correcting the counts or adding the 3 missing tables if they should exist.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/DATABASE_SCHEMA_TECHNICAL_SPEC.md, line 3:
<comment>Documentation inconsistency: The file claims 73 tables but only documents 70. The appendix breakdown is incorrect - Gamification shows 16 (actual: 17 tables numbered 20-36) and System & Configuration shows 10 (actual: 6 tables numbered 64-69). Consider correcting the counts or adding the 3 missing tables if they should exist.</comment>
<file context>
@@ -0,0 +1,2965 @@
+# DATABASE SCHEMA TECHNICAL SPECIFICATION
+## INTeract Employee Engagement Platform
+### Complete Entity Reference - All 73 Tables
+
+**Platform:** Base44 (NoSQL/Document Database)
</file context>
| ## Version Control | ||
|
|
||
| This system prompt is **versioned** and **repo-resident**: | ||
| - **Location**: `docs/AGENTS_DOCUMENTATION_AUTHORITY.md` |
There was a problem hiding this comment.
P2: Incorrect file path in Version Control section. The document claims to be located at docs/AGENTS_DOCUMENTATION_AUTHORITY.md but the actual path is components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md, line 287:
<comment>Incorrect file path in Version Control section. The document claims to be located at `docs/AGENTS_DOCUMENTATION_AUTHORITY.md` but the actual path is `components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md`.</comment>
<file context>
@@ -0,0 +1,318 @@
+## Version Control
+
+This system prompt is **versioned** and **repo-resident**:
+- **Location**: `docs/AGENTS_DOCUMENTATION_AUTHORITY.md`
+- **Changes**: Require pull request and human approval
+- **Format**: Semantic versioning (1.0, 1.1, 2.0, etc.)
</file context>
| - **Location**: `docs/AGENTS_DOCUMENTATION_AUTHORITY.md` | |
| - **Location**: `components/docs/AGENTS_DOCUMENTATION_AUTHORITY.md` |
| This policy establishes governance for all documentation in the INTeract Employee Engagement Platform repository. Documentation is treated as security-critical infrastructure with the same rigor as production code. | ||
|
|
||
| **In Scope**: | ||
| - `docs/**` (architecture, security, framework, schemas, APIs) |
There was a problem hiding this comment.
P2: Path inconsistency: This policy document references docs/** and ADR/** paths throughout, but the actual documentation files (including this file itself) are located in components/docs/. The ADR/ directory doesn't exist. Consider updating paths to match the actual repository structure (e.g., components/docs/**) or creating the referenced directories.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/DOC_POLICY.md, line 15:
<comment>Path inconsistency: This policy document references `docs/**` and `ADR/**` paths throughout, but the actual documentation files (including this file itself) are located in `components/docs/`. The `ADR/` directory doesn't exist. Consider updating paths to match the actual repository structure (e.g., `components/docs/**`) or creating the referenced directories.</comment>
<file context>
@@ -0,0 +1,269 @@
+This policy establishes governance for all documentation in the INTeract Employee Engagement Platform repository. Documentation is treated as security-critical infrastructure with the same rigor as production code.
+
+**In Scope**:
+- `docs/**` (architecture, security, framework, schemas, APIs)
+- `ADR/**` (Architecture Decision Records)
+- `llms.txt` and `llms-full.txt` (LLM context files)
</file context>
| - `docs/**` (architecture, security, framework, schemas, APIs) | |
| - `components/docs/**` (architecture, security, framework, schemas, APIs) |
| schedule: | ||
| - cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
P2: Workflow is missing explicit permissions declaration. This workflow requires contents: write for auto-committing and pull-requests: write for PR comments. Explicitly declaring permissions follows the security principle of least privilege and prevents the workflow from having broader access than needed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/docs-authority.yml, line 16:
<comment>Workflow is missing explicit `permissions` declaration. This workflow requires `contents: write` for auto-committing and `pull-requests: write` for PR comments. Explicitly declaring permissions follows the security principle of least privilege and prevents the workflow from having broader access than needed.</comment>
<file context>
@@ -0,0 +1,141 @@
+ schedule:
+ - cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
+
+jobs:
+ build_and_validate_docs:
+ name: Build & Validate Documentation
</file context>
| // Graceful error handling | ||
| } | ||
| }); | ||
| `` No newline at end of file |
There was a problem hiding this comment.
P2: Malformed markdown code fence: missing backtick in closing fence. The code block ends with `` instead of ```, which will break markdown rendering.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/EDGE_CASES_AUDIT.md, line 302:
<comment>Malformed markdown code fence: missing backtick in closing fence. The code block ends with `` instead of ```, which will break markdown rendering.</comment>
<file context>
@@ -0,0 +1,302 @@
+ // Graceful error handling
+ }
+});
+``
\ No newline at end of file
</file context>
| `` |
<a href="https://www.cubic.dev/action/fix/violation/fec8bd2f-e3e2-46d1-a744-ece3201fb85a" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://cubic.dev/buttons/fix-with-cubic-light.svg">
<img alt="Fix with Cubic" src="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
</picture>
</a>
| enabled: !!dependency, // Prevent fetch without dependency | ||
| staleTime: 30000, | ||
| retry: 2, | ||
| onError: (error) => { |
There was a problem hiding this comment.
P2: Incorrect React Query v5 pattern: onError callback was removed from useQuery in TanStack Query v5. This code example will not work with the project's @tanstack/react-query@^5.84.1. Use the error return value or configure global error handling via QueryCache instead.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/EDGE_CASES_AUDIT.md, line 298:
<comment>Incorrect React Query v5 pattern: `onError` callback was removed from `useQuery` in TanStack Query v5. This code example will not work with the project's `@tanstack/react-query@^5.84.1`. Use the `error` return value or configure global error handling via `QueryCache` instead.</comment>
<file context>
@@ -0,0 +1,302 @@
+ enabled: !!dependency, // Prevent fetch without dependency
+ staleTime: 30000,
+ retry: 2,
+ onError: (error) => {
+ // Graceful error handling
+ }
</file context>
| const confirmedCount = await base44.entities.Participation.filter({ | ||
| event_id: event[0].id, | ||
| rsvp_status: 'yes' | ||
| }).length; |
There was a problem hiding this comment.
P2: Async/await precedence bug in documentation code example. The .length is called on the Promise before await resolves it, resulting in undefined. Wrap the await in parentheses or use a temporary variable to get the correct count.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/DATABASE_EDGE_CASES.md, line 510:
<comment>Async/await precedence bug in documentation code example. The `.length` is called on the Promise before await resolves it, resulting in `undefined`. Wrap the await in parentheses or use a temporary variable to get the correct count.</comment>
<file context>
@@ -0,0 +1,1498 @@
+ const confirmedCount = await base44.entities.Participation.filter({
+ event_id: event[0].id,
+ rsvp_status: 'yes'
+ }).length;
+
+ if (event[0].max_participants && confirmedCount >= event[0].max_participants) {
</file context>
| const sig = req.headers.get('stripe-signature'); | ||
| const body = await req.text(); | ||
|
|
||
| const event = stripe.webhooks.constructEventAsync( |
There was a problem hiding this comment.
P2: Missing await for async Stripe method. constructEventAsync returns a Promise and must be awaited, otherwise event will be a Promise object and event.type will be undefined. Developers copying this example will encounter silent failures.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/API_REFERENCE.md, line 366:
<comment>Missing `await` for async Stripe method. `constructEventAsync` returns a Promise and must be awaited, otherwise `event` will be a Promise object and `event.type` will be undefined. Developers copying this example will encounter silent failures.</comment>
<file context>
@@ -0,0 +1,424 @@
+ const sig = req.headers.get('stripe-signature');
+ const body = await req.text();
+
+ const event = stripe.webhooks.constructEventAsync(
+ body,
+ sig,
</file context>
| const event = stripe.webhooks.constructEventAsync( | |
| const event = await stripe.webhooks.constructEventAsync( |
|
|
||
| } catch (error) { | ||
| console.error('Function error:', error); | ||
| return Response.json({ error: error.message }, { status: 500 }); |
There was a problem hiding this comment.
P2: This template code exposes raw error.message to clients, which is a security anti-pattern. Since this is a "Standard backend function structure" that developers will copy, it could propagate information disclosure vulnerabilities. Consider returning a generic error message like 'Internal server error' instead, while logging the detailed error server-side only.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At components/docs/ARCHITECTURE.md, line 372:
<comment>This template code exposes raw `error.message` to clients, which is a security anti-pattern. Since this is a "Standard backend function structure" that developers will copy, it could propagate information disclosure vulnerabilities. Consider returning a generic error message like `'Internal server error'` instead, while logging the detailed error server-side only.</comment>
<file context>
@@ -0,0 +1,766 @@
+
+ } catch (error) {
+ console.error('Function error:', error);
+ return Response.json({ error: error.message }, { status: 500 });
+ }
+});
</file context>
User description
Adds automated documentation aggregation and validation pipeline to enable LLM-powered documentation workflows. The system extracts markdown documentation, aggregates it into a unified context file, and validates completeness on every commit.
Changes
Documentation Extraction
components/docs/with 60 markdown files extracted fromsrc/components/docs/*.md.jsxBuild Pipeline
scripts/build-llms-docs.py: Aggregates docs →llms-full.txt(560KB, 21K lines)CI/CD Workflow (
.github/workflows/docs-authority.yml)llms-full.txtto main (with[skip ci])Documentation Index
llms.txt: Human-curated overview organized by 7 categories (Governance, Architecture, Features, AI, Development, Audit, User Guides)Example Build Output
The generated
llms-full.txtprovides complete documentation context for AI assistants, eliminating need for manual documentation lookup.Original prompt
GitHub Integration Files - Complete Reference
Status: Manual Setup Required
Last Updated: 2026-01-08
Purpose: Documentation Authority CI/CD Implementation
Overview
These files enable automated documentation building and validation through GitHub Actions. They must be manually created in your external GitHub repository as they cannot be directly managed within the Base44 platform.
File 1:
scripts/build-llms-docs.pyLocation:
scripts/build-llms-docs.py(repository root)Purpose: Aggregates all markdown documentation from
components/docs/into a singlellms-full.txtfile for comprehensive LLM context.Full Content:
File Walkthrough
1 files
build-llms-docs.py
Documentation aggregation build script for LLM contextscripts/build-llms-docs.py
components/docs/into a singlellms-full.txtfile for LLM contextformatting, and HTML while preserving markdown structure
including file sizes and source paths
(document count, output size in bytes/KB)
7 files
DATABASE_SCHEMA_TECHNICAL_SPEC.md
Complete database schema technical specification documentationcomponents/docs/DATABASE_SCHEMA_TECHNICAL_SPEC.md
entities for the INTeract Employee Engagement Platform
field descriptions, data types, and indexes for each entity
Management, Gamification, Learning & Development, User Management,
Communication, Analytics & Reporting, Administration, and System &
Configuration
mappings, security notes, performance considerations, and GDPR/CCPA
compliance requirements
RECOGNITION_SYSTEM_AUDIT.md
Recognition system audit with critical issues and fixescomponents/docs/RECOGNITION_SYSTEM_AUDIT.md
grade B+ (Very Good with Logic Errors)
updates, status default mismatch between entity and form, missing
notification triggers, and points not recorded in ledger
code examples, security/privacy audit, and gamification integration
assessment
for race condition resolution, points integration, notification
system, and entity configuration
INTEGRATION_SECURITY_AUDIT.md
Integration Layer Security Audit with Vulnerability Fixescomponents/docs/INTEGRATION_SECURITY_AUDIT.md
Teams, Stripe) identifying 6 critical vulnerabilities
for authentication, authorization, and webhook validation issues
PII exposure in Teams notifications, and missing Stripe replay
protection
recommendations, and pre-launch security checklist
CALENDAR_SYSTEM_AUDIT.md
Calendar System Logic and Data Integrity Auditcomponents/docs/CALENDAR_SYSTEM_AUDIT.md
logic errors in recurring events, participation tracking, and status
updates
non-transactional recurring event creation, missing event cancellation
cascade
composition review with A+ modularity assessment
participation deduplication, recurring event validation, and event
cancellation logic
ENTITY_ACCESS_RULES_SETUP.md
Complete Entity Access Rules Documentation for 73 Entitiescomponents/docs/ENTITY_ACCESS_RULES_SETUP.md
73 entities in the INTeract platform
Restrictions, Creator Only, Entity-User Field Comparison, User
Property Check, Complex OR Conditions)
(Activity, Event, Participation, Asset, AIRecommendation, etc.)
access control patterns
DATABASE_EDGE_CASES.md
Comprehensive Database Edge Cases and Error Handling Guidecomponents/docs/DATABASE_EDGE_CASES.md
scheduling, gamification, recognition, surveys, and data integrity
analysis, and JavaScript handling strategies
scaling issues, and concurrency problems
and recovery procedures
DEPLOYMENT_GUIDE.md
Production Deployment Guide with Configuration and Setupcomponents/docs/DEPLOYMENT_GUIDE.md
configuration, secrets management, and owner email setup
activity library seeding, gamification config)
database migrations, and performance optimization strategies
considerations, and post-deployment validation procedures
1 files
docs-authority.yml
Documentation Authority CI/CD Workflow Implementation.github/workflows/docs-authority.yml
validation on push, PR, and weekly schedule
llms-full.txtgeneration, checks for 5 requireddocumentation files, and enforces minimum 100-line threshold
retention, and auto-commits updates to main branch with
[skip ci]flagmanual workflow trigger support
55 files