本文档由Thor提供,只用于测试。
star项目:https://github.com/AIDotNet/Thor
curl --location --request POST 'https://api.token-ai.cn/v1/messages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"stream": false,
"model": "kimi-k2-0711-preview",
"max_tokens": 21333,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<system-reminder>\nAs you answer the user'\''s questions, you can use the following context:\n# claudeMd\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.\n\nContents of /mnt/d/code/chatgpt/context-engineering-intro/CLAUDE.md (project instructions, checked into the codebase):\n\n### ♻️ 项目感知与上下文\r\n- **始终阅读 `README.md` 和相关规划文档**,理解项目架构、目标、风格和约束。\r\n- **新任务前检查 `TASK.md`**,如无则添加,保持任务追踪。\r\n- **遵循一致的命名、文件结构和架构模式**,参考现有模块和示例。\r\n\r\n### \uD83E\uDDD1\uD83D\uDCBB 代码结构与模块化\r\n- **单文件不超过 500 行**,超限需拆分。\r\n- **按功能/责任分模块**,如 agent.py、tools.py、prompts.py。\r\n- **优先使用相对导入**,保持 import 风格一致。\r\n- **环境变量用 python_dotenv 和 load_env() 管理**。\r\n\r\n### \uD83E\uDDEA 测试与可靠性\r\n- **所有新功能必须有 Pytest 单元测试**,包括正常、边界、失败用例。\r\n- **测试文件结构应镜像主 app 结构,放在 `/tests` 目录**。\r\n- **逻辑变更后检查并更新相关测试**。\r\n\r\n### ✅ 任务完成\r\n- **任务完成后立即在 `TASK.md` 标记**,并补充开发中发现的新子任务。\r\n\r\n### \uD83D\uDCCE 风格与约定\r\n- **主语言为 Python**,遵循 PEP8,类型注解,`black` 格式化。\r\n- **数据校验用 pydantic**。\r\n- **API 用 FastAPI,ORM 用 SQLAlchemy/SQLModel(如适用)**。\r\n- **所有函数写 Google 风格 docstring**。\r\n\r\n### \uD83D\uDCDA 文档与可解释性\r\n- **新特性、依赖、配置变更需更新 `README.md`**。\r\n- **复杂逻辑需注释,添加 `# Reason:` 说明原因**。\r\n- **代码应让中级开发者易于理解**。\r\n\r\n### \uD83E\uDDE0 AI 行为规则\r\n- **遇到不确定上下文必须提问,不可臆断**。\r\n- **只用已知、验证过的 Python 包,不可虚构库/函数**。\r\n- **引用路径/模块前先确认存在**。\r\n- **除非明确指示或任务需要,不可删除/覆盖现有代码**。\n# important-instruction-reminders\nDo what has been asked; nothing more, nothing less.\nNEVER create files unless they'\''re absolutely necessary for achieving your goal.\nALWAYS prefer editing an existing file to creating a new one.\nNEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.\n\n \n IMPORTANT: this context may or may not be relevant to your tasks. You should not respond to this context or otherwise consider it in your response unless it is highly relevant to your task. Most of the time, it is not relevant.\n</system-reminder>\n"
},
{
"type": "text",
"text": "Caveat: The messages below were generated by the user while running local commands. DO NOT respond to these messages or otherwise consider them in your response unless the user explicitly asks you to."
},
{
"type": "text",
"text": "<command-name>/clear</command-name>\n <command-message>clear</command-message>\n <command-args></command-args>"
},
{
"type": "text",
"text": "<local-command-stdout></local-command-stdout>"
},
{
"type": "text",
"text": "<command-message>generate-prp is running…</command-message>\n<command-name>/generate-prp</command-name>\n<command-args>INITIAL.md</command-args>"
},
{
"type": "text",
"text": "# Create PRP\r\n\r\n## Feature file: INITIAL.md\r\n\r\nGenerate a complete PRP for general feature implementation with thorough research. Ensure context is passed to the AI agent to enable self-validation and iterative refinement. Read the feature file first to understand what needs to be created, how the examples provided help, and any other considerations.\r\n\r\nThe AI agent only gets the context you are appending to the PRP and training data. Assuma the AI agent has access to the codebase and the same knowledge cutoff as you, so its important that your research findings are included or referenced in the PRP. The Agent has Websearch capabilities, so pass urls to documentation and examples.\r\n\r\n## Research Process\r\n\r\n1. **Codebase Analysis**\r\n - Search for similar features/patterns in the codebase\r\n - Identify files to reference in PRP\r\n - Note existing conventions to follow\r\n - Check test patterns for validation approach\r\n\r\n2. **External Research**\r\n - Search for similar features/patterns online\r\n - Library documentation (include specific URLs)\r\n - Implementation examples (GitHub/StackOverflow/blogs)\r\n - Best practices and common pitfalls\r\n\r\n3. **User Clarification** (if needed)\r\n - Specific patterns to mirror and where to find them?\r\n - Integration requirements and where to find them?\r\n\r\n## PRP Generation\r\n\r\nUsing PRPs/templates/prp_base.md as template:\r\n\r\n### Critical Context to Include and pass to the AI agent as part of the PRP\r\n- **Documentation**: URLs with specific sections\r\n- **Code Examples**: Real snippets from codebase\r\n- **Gotcha{}