Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
web-ui【部署与运维】Guides React/Vite PyCaret Control Plane UI work: routes, typed API client, auth state, data-driven experiment forms, run/trial/deployment pages, LLM widgets, and npm verification.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for PyCaret Control Plane frontend work under apps/web: route wiring, page/component edits, the typed API client, auth state, TanStack Query integration, dynamic experiment forms, live run/trial screens, deployment/model-registry views, LLM advisory widgets, and npm-based verification.
Helper scripts bundled with this sub-skill:
bash scripts/ui_static_check.sh --help
node scripts/list_ui_routes.mjs --help
describe_setup_params, model registry contents, RunConfig execution, or event-kind generation: route to the engine workflow skill.DynamicForm data-driven from the describe/setup-params schema. Do not hard-code setup parameter names inside DynamicForm; it renders only structural kinds (bool, int, float, enum, column, string) and honors schema.groups, choices, minimum, maximum, required, default, and description.ExperimentConfigForm, read defaults and descriptions from the schema and keep the fallback for engine parameters that do not have a dedicated widget.src/api/endpoints.ts and mirror response/request shapes in src/api/types.ts; call sites should import endpoint groups, not raw axios./auth/refresh.@/ imports for src/, prefer named exports, and use import type for TypeScript types because verbatimModuleSyntax is enabled.card, btn-*, input, field, hint, error, h-page, h-section, pill-*) before inventing new styles.suggested_config_json, suggested_action, reasoning_summary, and risk_flags; do not let an LLM response directly trigger a destructive action.apps/web before handoff. For a full frontend gate: npm run typecheck && npm run lint && npm test && npm run build.src/pages/<Name>.tsx.src/App.tsx and add a <Route> under the authenticated <Layout> unless it is intentionally public (/setup, /login) or a catch-all.bash scripts/ui_static_check.sh --typecheck --lint --test --build.src/api/endpoints.ts and all mirrors in src/api/types.ts.useQuery and writes with useMutation; invalidate only the affected query keys.errorMessage() for user-facing axios errors.Read Component and route map first. The important split is:
RunDetail: run status, event drawer, worker/load charting, trials leaderboard, request snapshot, promoted versions.TrialsCard / ExperimentTrialsCard: run-level vs experiment-level trial lists.TrialDetail: one candidate model, metrics, pipeline diagram, plots, prediction tester, validation, tune/ensemble/promote actions.DeploymentDetail: endpoint metrics, interactive prediction, versions/rollback, prediction logs, drift reports.From the repository root:
cd apps/web
npm run typecheck
npm run lint
npm test
npm run build
Or use the bundled wrapper:
bash scripts/ui_static_check.sh --typecheck --test
bash scripts/ui_static_check.sh --lint --build
To inspect route wiring without installing packages:
node scripts/list_ui_routes.mjs REPO_ROOT