{
  "markdown": "# rc-apps-generator — GSoC Work Showcase\n\n> **Project:** AI-Assisted Rocket.Chat App Generator using Gemini CLI + MCP tools  \n> **Proposal Goal:** Build an agentic workflow that lets developers describe a Rocket.Chat app in plain English and get a fully scaffolded, deployed app — zero boilerplate, zero guesswork.\n\n---\n\n## What This Project Does\n\nThis repository is a **Gemini CLI extension** that turns a natural language description into a working Rocket.Chat App Engine app in one pass:\n\n1. The AI reads your request and outputs an **implementation plan**\n2. It reads the relevant **skill docs** (`/skills/*.md`) for the features needed\n3. It scaffolds the app using **`rc-apps create`** CLI (no manual setup)\n4. It writes **all app code in one shot**, using free public APIs where possible\n5. It runs **`tsc --noEmit`** to eliminate errors before deploying\n6. It deploys with **`rc-apps deploy`** and guards against infinite bot loops\n\n---\n\n## Demo: Math Solver Bot (AI-Generated)\n\nThis submission includes a real generated math-solver app flow. One prompt produced it:\n\n```\nCreate a Rocket.Chat app with a /math command that evaluates mathematical expressions.\n```\n\n**What got generated:**\n- `/math 12+(6*5)/12` → evaluates expression using Math.js public API\n- Error handling for invalid expressions and failed requests\n- `sendMessage` (public) + `notifyMessage` (ephemeral/private) pattern\n- Full TypeScript app ready to deploy\n\n### Generated App — Key Snippet\n\n```typescript\n// MathSolverApp.ts — App class is always the FIRST exported class\nexport class MathSolverApp extends App {\n    public getName(): string {\n        return 'Math Expression Solver';\n    }\n\n    protected async extendConfiguration(configuration: IConfigurationExtend): Promise<void> {\n        await configuration.slashCommands.provideSlashCommand(new MathSlashCommand());\n    }\n}\n\nclass MathSlashCommand implements ISlashCommand {\n    public command = 'math';\n\n    public async executor(context: SlashCommandContext, read: IRead, modify: IModify, http: IHttp): Promise<void> {\n        const expression = context.getArguments().join(' ').trim();\n        if (!expression) {\n            return await this.notifyMessage(context, modify, 'Usage: /math 5 * (2 + 3)');\n        }\n        try {\n            const encodedExpr = encodeURIComponent(expression);\n            const url = `https://api.mathjs.org/v4/?expr=${encodedExpr}`;\n            const response = await http.get(url);\n            if (response.statusCode !== 200) {\n                return await this.notifyMessage(context, modify, `Invalid expression: ${expression}`);\n            }\n            await this.sendMessage(context, modify, `Math Expression: ${expression}\\nResult: ${response.content || response.data}`);\n        } catch (err) {\n            await this.notifyMessage(context, modify, `Error: ${err.message}`);\n        }\n    }\n}\n```\n\n---\n\n## Screenshots (Current GSoC Evidence)\n\nAll screenshots below are from `docs/screenshots/` and use the exact filenames currently present in this submission.\n\n### 1. Prompt + Implementation Plan\n**File:** `plan_hitl.png`  \n**Shows:** User prompt (`/rc-create ...`) followed by the generated implementation plan (app name, features, required skills, API, output file).\n\n![Prompt and implementation plan](docs/screenshots/plan_hitl.png)\n\n### 2. Skill Docs Read Before Coding\n**File:** `prompt_reading.png`  \n**Shows:** The agent loading required skill docs (`SLASH_COMMANDS.md`, `MESSAGE_LISTENERS.md`, `REVIEW.md`) before implementation.\n\n![Skill files read before implementation](docs/screenshots/prompt_reading.png)\n\n### 3. App Scaffolding Stage\n**File:** `scaffholding.png`  \n**Shows:** `rc-apps create` scaffolding the app and reading generated metadata (`app.json`) to continue flow.\n\n![rc-apps create scaffold output](docs/screenshots/scaffholding.png)\n\n### 4. Dependency Install + TypeScript Validation\n**File:** `packages.png`  \n**Shows:** Package installation and TypeScript validation flow (`npx tsc --noEmit`) during pre-deploy checks.\n\n![Dependencies and TypeScript checks](docs/screenshots/packages.png)\n\n### 5. Install/Validate + Pre-Deploy Updates\n**File:** `validate.png`  \n**Shows:** `install_and_validate_rc_app` success and follow-up deployment preparation updates.\n\n![Install and validate rc app](docs/screenshots/validate.png)\n\n### 6. Deployment Command Success\n**File:** `deploy.png`  \n**Shows:** `deploy_rc_app` execution with successful packaging/upload stages and deployment logs.\n\n![Deploy command success output](docs/screenshots/deploy.png)\n\n### 7. Final Deployment Summary\n**File:** `done.png`  \n**Shows:** Final generated summary confirming app creation/deployment and the available slash command.\n\n![Final deployment summary output](docs/screenshots/done.png)\n\n### 8. Skill Query via MCP Tooling\n**File:** `mcp_1.png`  \n**Shows:** `query_rc_docs` MCP usage to fetch `SLASH_COMMANDS.md` guidance used by the workflow.\n\n![MCP skill query output](docs/screenshots/mcp_1.png)\n\n### 9. Rocket.Chat Runtime Proof (Math Solver Bot)\n**File:** `rc-bot.png`  \n**Shows:** Bot responses inside Rocket.Chat for math expressions, including examples like `4+5` and `12+(6*5)/12`.\n\n![Math solver bot responses in Rocket.Chat](docs/screenshots/rc-bot.png)\n\n---\n\n## Repository Structure\n\n```\n.\n├── GEMINI.md                  ← AI workflow and generation constraints\n├── MASTER.md                  ← Master orchestration and execution policy\n├── gemini-extension.json      ← Extension wiring for this project\n├── README.md                  ← Mentor-facing GSoC showcase (this file)\n├── apps/\n│   ├── MathSolverAppApp.ts    ← Generated Rocket.Chat app source\n│   ├── app.json               ← App metadata\n│   ├── package-lock.json      ← Locked dependency versions\n│   ├── package.json           ← App package/dependency metadata\n│   ├── tsconfig.json          ← TypeScript configuration\n│   └── README.md              ← App-specific usage and testing notes\n├── skills/\n│   ├── SLASH_COMMANDS.md      ← /command patterns\n│   ├── UIKIT.md               ← Modal form patterns\n│   ├── PERSISTENCE.md         ← Data storage patterns\n│   ├── WEBHOOK.md             ← Incoming webhook handlers\n│   ├── HTTP.md                ← External API call patterns\n│   ├── SETTINGS.md            ← App config / settings patterns\n│   ├── MESSAGE_LISTENERS.md   ← Event listener patterns\n│   ├── SCHEDULER.md           ← Scheduled task patterns\n│   └── REVIEW.md              ← Pre-deploy checklist\n├── docs/\n│   ├── screenshots/       ← Terminal + RocketChat evidence screenshots\n│   ├── snippets/          ← Focused code evidence snippets\n│   │   ├── app-class-registration.ts\n│   │   ├── slash-command-executor.ts\n│   │   ├── public-api-call.ts\n│   │   └── bot-loop-guard.ts\n│   └── README.md          ← Snippet index and generation context\n└── .gitignore                 ← Submission-safe ignore rules\n```\n\n---\n\n## How The Skill System Works\n\nEach skill file is a standalone playbook. The AI reads only what is needed:\n\n| User Says | Skill Loaded |\n|-----------|-------------|\n| \"command\" / \"type /something\" | `SLASH_COMMANDS.md` |\n| \"form\" / \"input\" / \"modal\" | `UIKIT.md` |\n| \"remember\" / \"save\" / \"store\" | `PERSISTENCE.md` |\n| \"receive from outside\" / \"webhook\" | `WEBHOOK.md` |\n| \"call API\" / \"external service\" | `HTTP.md` + `SETTINGS.md` |\n| \"when someone joins\" / \"event\" | `MESSAGE_LISTENERS.md` |\n| \"scheduled\" / \"every day\" | `SCHEDULER.md` |\n\n---\n\n## Code Snippets\n\nFocused evidence snippets in [`docs/snippets/`](docs/snippets/):\n\n### 1. App Class Registration\n[`app-class-registration.ts`](docs/snippets/app-class-registration.ts) — **Proves:** The App class is always the first exported class in the file. This is a hard requirement of the RC Apps Engine — if any other export appears before it, the deploy fails with \"App must contain a getName function\". The AI enforces this rule.\n\n### 2. Slash Command Executor (Full Pattern)\n[`slash-command-executor.ts`](docs/snippets/slash-command-executor.ts) — **Proves:** Complete slash command implementation generated in one pass by the AI. Demonstrates:\n- Argument validation before async work\n- Try/catch around all HTTP calls (mandatory rule)\n- HTTP status code check before reading data\n- `sendMessage` (public) vs `notifyMessage` (private) pattern\n\n### 3. Public API Call Pattern\n[`public-api-call.ts`](docs/snippets/public-api-call.ts) — **Proves:** The AI prefers free, key-less public APIs over paid alternatives. For the math solver, it uses the Math.js public API without credentials, while still supporting the same error-handling pattern for other free APIs.\n\n### 4. Bot Loop Guard (Infinite Loop Prevention)\n[`bot-loop-guard.ts`](docs/snippets/bot-loop-guard.ts) — **Proves:** The AI never generates message listeners without this guard. Without it, an app that sends a message in response to a message will trigger itself again — creating an infinite bot loop that floods the channel. This guard is added as part of the workflow, not as an afterthought.\n\n---\n",
  "bytes": 9010,
  "sha": "0910b96d871daf257bc13f225aa0695a867dcadb8e8d8cdddfeb16deaf71e343",
  "repo_slug": "suyashr25/gsoc-rc-extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_suyashr25_gsoc_rc_extension_35bba6ff/readme"
}