演示

Use Prompt Engineering

编写工作流优先的 Agent Plan,而不是 CRUD 清单。以 HR 预构建提示词为结构参考。

提示词建议

  • 从 Pre-build Prompts → HR 复制结构再改领域
  • 要求先阅读 quan-erp / quan-erp-plugins skills
  • 要求工作流结果 — 禁止只做 list/create/edit
  • 实体类必须以 Entity 结尾并继承 BaseEntity;列出全部 detail props
  • 复用内置服务/实体
  • Service=领域逻辑,API=动作,Pages=运营界面
  • 写明插件 id/目录,并以演示路径 + 检查清单收尾

推荐计划结构(来自 HR)

对齐 HR Agent Plan 的章节,给代理完整构建契约。

  • 0. Intro & detail
  • 1. Features(工作流优先)
  • 2. Entity(*Entity + detail props)
  • 3. Service
  • 4. Apis(动作)
  • 5. Dto
  • 6. Pages
  • 7. Goal + checklist

示例提示词(HR 形状)

短启动词 — 完整内容请复制 Pre-build Prompts → HR。

TSexample prompt
1Read .agents/skills/quan-erp/SKILL.md and quan-erp-plugins first. 2Use the Pre-build Prompts → HR Plugins plan as the reference format. 3 4Build plugins/hr/ as a full people-ops plugin — NOT CRUD only. 5Mandatory: EmployeeDetailEntity dossier; per-employee EmployeeSalaryHistoryEntity 6(different current amount/currency/frequency allowed); LeaveTypeEntity + LeavePolicyEntity 7+ optional EmployeeLeaveEntitlementEntity overrides; AttendanceRecordEntity; 8PayrollRunEntity → PayslipEntity/PayslipLineEntity from each employee's own current salary. 9 10Naming: every DB entity class must end with Entity and extend BaseEntity. 11List full detail props for every entity. Reuse User/Branch/Currency/File/Notification builtins. 12Deliver workflow services + action APIs + ops pages (leave inbox, salary timeline, payroll run). 13Demo: hire two employees with different salaries → leave + attendance → payroll finalize. 14End with registration checklist and README assumptions (leave-day rules, payroll deductions).

使用 Pre-build Prompts

打开 Build with AI Agent → Pre-build Prompts → HR Plugins,复制完整提示词到 Cursor Agent。其他领域保持 0–7 相同结构。

  • HR 是最完整的参考
  • 保持 0–7 章节顺序
  • 优先用预构建提示,而不是只写 CRUD 请求