skill(fw-react-app): add initial documentation and command structure for React Meta apps - #16
skill(fw-react-app): add initial documentation and command structure for React Meta apps#16rohankokkula wants to merge 1 commit into
Conversation
…or React Meta apps - Introduced README.md and SKILL.md to outline the purpose and usage of the fw-react-app skill for Freshworks Platform 3.0. - Added command documentation for `/react-meta-scaffold`, `/react-meta-add-surface`, and `/react-meta-validate` to facilitate app creation and validation. - Included plugin manifests for Cursor and Claude, detailing commands and descriptions. - Established rules for React Meta HTML shells and orchestration, ensuring compliance with platform standards. - Created quick reference and agent documentation to assist developers in implementing React Meta features effectively.
|
!! do not merge this, testing with more use-cases |
There was a problem hiding this comment.
Review — fw-react-app skill
Scope: React Meta app skill package (skills/fw-react-app/).
Summary
Solid React Meta patterns (metaConfig.framework: react, {{{appclient}}}, per-surface HTML+JSX). Blockers before merge: fw-app-dev rule conflict, wrong icon path, phantom fw-migrate-to-react-app, no marketplace/routing registration.
Findings by priority
| Priority | Issue |
|---|---|
| P0 | fw-app-dev always-on rules will fight React scaffold (vanilla app.js, Crayons CDN, app/styles/images/icon.svg) |
| P0 | Icon path/docs mismatch — template uses app/public/icon.svg + manifest "icon": "icon.svg" |
| P0 | react-meta-validate.md references non-existent fw-migrate-to-react-app |
| P1 | Document fdk create --template react-starter-template --app-dir <dir> |
| P1 | Add-surface: edit template in place; do not nest duplicate scaffolds into subdirectories |
| P2 | Register in marketplace JSON, AGENTS.md, installer spec; align plugin version with sibling skills (1.2.0) |
Suggested next steps
- Add React Meta exception block at top of
SKILL.md(overridefw-app-devfile-tree gates). - Fix icon paths across commands/rules.
- Remove or replace phantom migrate skill reference.
- Wire skill into plugin manifests + routing spec before publish.
|
|
||
| # Freshworks React Meta app creation | ||
|
|
||
| **Orchestration:** Treat **`fw-app-dev`** (or **`app-dev`**) as the source of truth for Platform 3.0 rules—manifest shape, `fdk validate` loops, request templates (`<%= %>`), OAuth, SMI, security, lint/complexity, and `app/styles/images/icon.svg`. This skill adds **React Meta–specific** structure and workflows on top of that baseline. |
There was a problem hiding this comment.
🛠️ Refactor suggestion | P0 — fw-app-dev conflict
fw-app-dev rules (app-building-blocking-gates, freshworks-platform3, app-templates) are alwaysApply: true and mandate vanilla tree: app/scripts/app.js, Crayons CDN in HTML, app/styles/images/icon.svg.
React Meta uses react-starter-template with app/src/, Vite, app/public/icon.svg, and @freshworks/crayons/react.
Add a blocking preamble (like fw-ai-actions-app's fw-app-dev override):
## fw-app-dev override (React Meta)
When this skill is active, IGNORE fw-app-dev gates for:
- app/scripts/app.js, app/styles/style.css
- Crayons CDN script tags in HTML
- app/styles/images/icon.svg
Use react-starter-template layout instead.Without this, agents will corrupt scaffolds during validate/fix.
| ## Canonical create path | ||
|
|
||
| 1. Empty folder for the app; **do not** scatter app files in an unrelated repo root. | ||
| 2. Run **`fdk create`** and select **`react-starter-template`** (official scaffold: `package.json`, `app/index.html`, `app/components/*.jsx`, `vitest.config.js`, etc.). |
There was a problem hiding this comment.
📝 Nitpick | P1 — CLI flag
Document non-interactive scaffold:
fdk create --template react-starter-template --app-dir <target-dir>Use --app-dir for non-interactive and CI flows; skill only shows bare fdk create.
|
|
||
| ## Do not | ||
|
|
||
| - Generate **Platform 2.x** manifests or **`$request.post|get`|** patterns. |
There was a problem hiding this comment.
$request.post|get| looks like a pipe typo. Should be:
Never
$request.post(),$request.get(), or direct URL calls — only$request.invokeTemplate().
Agents may copy the broken token literally.
|
|
||
| - Generate **Platform 2.x** manifests or **`$request.post|get`|** patterns. | ||
| - Use **`{{variable}}`** in request templates—use **`<%= iparam.* %>`, `<%= context.* %>`, `<%= access_token %>`** only. | ||
| - Ship frontend apps without a manifest **`icon`** path that resolves to an existing file (commonly **`app/styles/images/icon.svg`** per `fw-app-dev`—keep manifest paths and disk layout in sync). |
There was a problem hiding this comment.
References app/styles/images/icon.svg (fw-app-dev vanilla path).
react-starter-template uses:
- File:
app/public/icon.svg - Manifest:
"icon": "icon.svg"
Template apps validate with 0 platform errors using those paths. Update all skill docs.
| - **Rules:** [rules/react-meta-bootstrap.mdc](rules/react-meta-bootstrap.mdc), [rules/react-meta-orchestration.mdc](rules/react-meta-orchestration.mdc) | ||
| - **Commands:** [commands/](commands/) | ||
| - **Quick reference:** [references/react-meta-quick-reference.md](references/react-meta-quick-reference.md) | ||
| - Full React Meta narrative (bootstrap, templates, SMI, troubleshooting): **React Meta gist** PDF / internal docs |
There was a problem hiding this comment.
📝 Nitpick | P2 — gist vs template
References external gist for React Meta narrative while scaffold uses react-starter-template. Prefer canonical in-repo snippet from template's App.jsx / entry files so agents don't fetch stale gist content.
| { | ||
| "name": "fw-react-app", | ||
| "displayName": "Freshworks React Meta Apps", | ||
| "version": "1.0.0", |
There was a problem hiding this comment.
📝 Nitpick | P2 — version drift
Same as Cursor plugin — align version with fw-app-dev / fw-setup (1.2.0) when adding marketplace entries.
| --- | ||
| description: React Meta HTML shells, SDK bootstrap, and per-surface JSX entries for Freshworks Platform 3.0. | ||
| globs: ["**/app/**/*.html", "**/app/**/*.jsx", "**/config/iparams.html"] | ||
| alwaysApply: false |
There was a problem hiding this comment.
💡 Suggestion | P1 — alwaysApply
alwaysApply: false means bootstrap rules won't load unless manually attached. For React workspaces, consider alwaysApply: true only when skill routing is wired — or document that agents must load this rule when metaConfig.framework === 'react'.
Otherwise fw-app-dev wins by default.
| ## Platform semantics | ||
|
|
||
| - **manifest**, **modules**, **requests.json ↔ manifest sync**, **OAuth**, **`renderData`**, **events**, **complexity ≤ 7**, **async/await**, **unused parameters**: **fw-app-dev** (or **app-dev** skill) is authoritative. | ||
| - **React Meta** skills only add: **metaConfig**, **JSX/bundler** conventions, **HTML shells**, **migration** from vanilla UI. |
There was a problem hiding this comment.
Orchestration mentions migration from vanilla UI but validate command references non-existent fw-migrate-to-react-app. Either add a react-meta-migrate.md command or remove migrate from orchestration until skill exists.
| ## Layout (matches [fw-app-dev](https://github.com/freshworks-developers/fw-dev-tools/tree/main/skills/fw-app-dev)) | ||
|
|
||
| | Path | Role | | ||
| |------|------| |
There was a problem hiding this comment.
🛠️ Refactor suggestion | P2 — not installable yet
README describes usage but skill is not in .cursor-plugin/marketplace.json, .claude-plugin/marketplace.json, AGENTS.md inventory, or installer/src/specs/fw-dev-tools-spec.md.
npx @freshworks/fw-dev-tools install won't route to /react-meta-* until those are updated (see CONTRIBUTING.md plugin table).
| @@ -0,0 +1,14 @@ | |||
| # Agent: React Meta UI review (optional) | |||
There was a problem hiding this comment.
💡 Suggestion | P2 — fw-review integration
Agent prompt is useful but not wired into fw-review pipeline (skills/fw-review/scripts/). Consider adding React-specific checks (metaConfig, {{{appclient}}}, no duplicate scaffold dirs) to script-check-rules or document that react-meta-review is optional pre-fw-review only.
/react-meta-scaffold,/react-meta-add-surface, and/react-meta-validateto facilitate app creation and validation.