panapps-framework-standards

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Panapps {{FRAMEWORK_TITLE}} Standards

Panapps {{FRAMEWORK_TITLE}} 编码标准

What this skill does

此技能的作用

This skill helps the agent create and review {{FRAMEWORK}} code using Panapps team conventions.
此技能可帮助Agent遵循Panapps团队规范来创建和审查{{FRAMEWORK}}代码。

When to use

使用场景

Use this skill when:
  • Building new {{FRAMEWORK}} components
  • Refactoring existing {{FRAMEWORK}} code
  • Reviewing pull requests
  • Improving readability, reusability, and performance
  • Checking folder structure and naming conventions
Do not use this skill for:
  • Backend-only tasks
  • Database schema design
  • Infrastructure or DevOps work
在以下场景使用此技能:
  • 构建新的{{FRAMEWORK}}组件
  • 重构现有{{FRAMEWORK}}代码
  • 审查Pull Request
  • 提升代码可读性、可复用性和性能
  • 检查文件夹结构和命名规范
以下场景请勿使用此技能:
  • 仅涉及后端的任务
  • 数据库架构设计
  • 基础设施或DevOps相关工作

Inputs needed

所需输入

  • Feature requirement or ticket summary
  • Existing file or component path
  • Whether this is a new component or refactor
  • Any design reference or API contract if available
  • 功能需求或工单摘要
  • 现有文件或组件路径
  • 任务类型是新建组件还是重构
  • 如有可用的设计参考或API契约

Panapps rules

Panapps 编码规则

  • Prefer clear prop and variable names over short abbreviations
  • Keep components small and reusable
  • Move repeated UI into shared components
  • Keep business logic out of JSX or templates where possible
  • Use hooks/state management carefully; avoid unnecessary re-renders
  • Use meaningful folder and file names
  • Add loading, empty, and error states where needed
  • Follow existing project styling conventions before introducing new patterns
  • 优先使用清晰的prop和变量名,避免简写
  • 保持组件小巧且可复用
  • 将重复的UI抽离到共享组件中
  • 尽可能将业务逻辑从JSX或模板中分离
  • 谨慎使用hooks/状态管理,避免不必要的重渲染
  • 使用有意义的文件夹和文件名
  • 在需要的地方添加加载、空状态和错误状态
  • 在引入新样式模式前,遵循现有项目的样式规范

Procedure

操作流程

  1. Read the existing component or feature context.
  2. Identify whether the task is create, refactor, fix, or review.
  3. Apply Panapps standards for {{FRAMEWORK}}.
  4. Suggest or implement improvements aligned with Panapps rules.
  5. Verify the output matches project patterns and does not introduce unnecessary complexity.
  1. 阅读现有组件或功能的上下文信息。
  2. 确定任务类型是创建、重构、修复还是审查。
  3. 应用Panapps针对{{FRAMEWORK}}的编码标准。
  4. 根据Panapps规则提出或实现改进方案。
  5. 验证输出符合项目模式,且未引入不必要的复杂度。

Validation

验证标准

A task is complete when:
  • Code is readable
  • Naming is consistent
  • Reusability is improved where appropriate
  • Edge states are covered
  • The solution follows the project’s current architecture
任务完成的标准:
  • 代码具备可读性
  • 命名保持一致
  • 在合适的场景提升了可复用性
  • 覆盖了边缘状态
  • 解决方案符合项目当前的架构

Common failure modes

常见失败场景

  • Overcomplicating a simple component
  • Introducing inconsistent naming
  • Breaking existing styling or folder conventions
  • Refactoring too aggressively without need
  • 将简单组件过度复杂化
  • 引入不一致的命名
  • 破坏现有样式或文件夹规范
  • 无必要地过度重构