- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
3.2 KiB
3.2 KiB
| description |
|---|
| Adds comments and JSDoc to a single file or set of files following ReloPortal standards |
Add Docs
This workflow adds comments and JSDoc to a single file or set of files following ReloPortal coding standards defined in .devin/rules/rules.md.
Steps
-
Read the file(s)
- Use
read_fileto read the target file(s) - Identify the file type (component, service, hook, utility, etc.)
- Use
-
Check for existing JSDoc/comments
- Identify exported components - check for JSDoc comment above component
- Identify props interfaces - check for inline JSDoc on non-obvious props
- Identify functions - check for JSDoc if function is non-obvious or complex
- Identify service functions - check for error logging pattern
-
Add missing JSDoc/comments following standards
For React Components:
- Add JSDoc above every exported component:
/** * ComponentName — Brief description of what it renders * Used in: List of parent components/pages where this is used */
For Props Interfaces:
- Name interface
{ComponentName}Props - Add inline JSDoc for non-obvious props:
interface ComponentNameProps { /** Description of what this prop does and expected values */ propName: string; }
For Functions:
- Add JSDoc for non-obvious or complex functions:
/** * Brief description of what the function does * @param paramName - Description of parameter * @returns Description of return value */
For Service Functions:
- Ensure error logging follows pattern:
console.error("[functionName] message:", error);
For Utility Functions:
- Add JSDoc explaining purpose and usage:
/** * Brief description of what the utility does * @param input - Description of input parameter * @returns Description of return value */
- Add JSDoc above every exported component:
-
Follow ReloPortal Standards
- No
anytypes - define actual interfaces/types - Use
interfacefor object shapes;typefor unions - Use optional chaining
?.and nullish coalescing?? - Props interface named
{ComponentName}Props - Destructure props in function signature
- Imports order: React → AntD → internal components → utils/hooks/services → styles
- No
-
Run lint check
- Run
npm run lintafter adding comments - Fix any lint issues
- Run
Alert Rules
STOP and tell the user if you need to:
- Add JSDoc to a shared component in
src/components/that changes its public API - Modify a service function's error handling pattern
Wait for explicit approval before proceeding.
Checklist
- Read the target file(s)
- Identified file type and purpose
- Checked for existing JSDoc/comments
- Added JSDoc to exported components (if missing)
- Added inline JSDoc to non-obvious props (if missing)
- Added JSDoc to non-obvious functions (if missing)
- Verified service error logging follows pattern
- Followed ReloPortal naming conventions
- Ran
npm run lintand fixed issues