fix: 修复InitCommand项目路径识别问题,优化角色发现机制

主要修改:
• 修复InitCommand.js中AI提供路径优先级配置问题
• 重构Luban角色思维模式文件结构,提升代码组织
• 优化工具执行系统,清理技术债务
• 更新package.registry.json反映最新资源结构

影响:解决了technical-product-manager等角色无法发现的关键问题

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sean
2025-06-28 22:11:17 +08:00
parent 071138ef57
commit ffb5b4adaf
14 changed files with 704 additions and 1603 deletions

View File

@ -4,9 +4,9 @@
"metadata": {
"version": "2.0.0",
"description": "package 级资源注册表",
"createdAt": "2025-06-28T11:53:03.703Z",
"updatedAt": "2025-06-28T11:53:03.717Z",
"resourceCount": 29
"createdAt": "2025-06-28T13:36:34.963Z",
"updatedAt": "2025-06-28T13:36:34.978Z",
"resourceCount": 30
},
"resources": [
{
@ -17,9 +17,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://resource/role/assistant/assistant.role.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.708Z",
"updatedAt": "2025-06-28T11:53:03.708Z",
"scannedAt": "2025-06-28T11:53:03.708Z",
"createdAt": "2025-06-28T13:36:34.968Z",
"updatedAt": "2025-06-28T13:36:34.968Z",
"scannedAt": "2025-06-28T13:36:34.968Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/assistant/assistant.role.md",
"fileType": "role"
}
@ -32,9 +32,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://resource/role/luban/luban.role.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.708Z",
"updatedAt": "2025-06-28T11:53:03.708Z",
"scannedAt": "2025-06-28T11:53:03.708Z",
"createdAt": "2025-06-28T13:36:34.968Z",
"updatedAt": "2025-06-28T13:36:34.968Z",
"scannedAt": "2025-06-28T13:36:34.968Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/luban.role.md",
"fileType": "role"
}
@ -47,9 +47,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://resource/role/noface/noface.role.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.708Z",
"updatedAt": "2025-06-28T11:53:03.708Z",
"scannedAt": "2025-06-28T11:53:03.708Z",
"createdAt": "2025-06-28T13:36:34.968Z",
"updatedAt": "2025-06-28T13:36:34.968Z",
"scannedAt": "2025-06-28T13:36:34.968Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/noface/noface.role.md",
"fileType": "role"
}
@ -62,9 +62,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://resource/role/nuwa/nuwa.role.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.709Z",
"updatedAt": "2025-06-28T11:53:03.709Z",
"scannedAt": "2025-06-28T11:53:03.709Z",
"createdAt": "2025-06-28T13:36:34.969Z",
"updatedAt": "2025-06-28T13:36:34.969Z",
"scannedAt": "2025-06-28T13:36:34.969Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/nuwa.role.md",
"fileType": "role"
}
@ -77,9 +77,9 @@
"description": "专业角色,提供特定领域的专业能力",
"reference": "@package://resource/role/sean/sean.role.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.709Z",
"updatedAt": "2025-06-28T11:53:03.709Z",
"scannedAt": "2025-06-28T11:53:03.709Z",
"createdAt": "2025-06-28T13:36:34.969Z",
"updatedAt": "2025-06-28T13:36:34.969Z",
"scannedAt": "2025-06-28T13:36:34.969Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/sean/sean.role.md",
"fileType": "role"
}
@ -92,9 +92,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/core/_deprecated/recall_v1.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.710Z",
"updatedAt": "2025-06-28T11:53:03.710Z",
"scannedAt": "2025-06-28T11:53:03.710Z",
"createdAt": "2025-06-28T13:36:34.970Z",
"updatedAt": "2025-06-28T13:36:34.970Z",
"scannedAt": "2025-06-28T13:36:34.970Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/core/_deprecated/recall_v1.thought.md",
"fileType": "thought"
}
@ -107,9 +107,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/core/_deprecated/remember_v1.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.710Z",
"updatedAt": "2025-06-28T11:53:03.710Z",
"scannedAt": "2025-06-28T11:53:03.710Z",
"createdAt": "2025-06-28T13:36:34.970Z",
"updatedAt": "2025-06-28T13:36:34.970Z",
"scannedAt": "2025-06-28T13:36:34.970Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/core/_deprecated/remember_v1.thought.md",
"fileType": "thought"
}
@ -122,9 +122,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/core/remember-xml.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.711Z",
"updatedAt": "2025-06-28T11:53:03.711Z",
"scannedAt": "2025-06-28T11:53:03.711Z",
"createdAt": "2025-06-28T13:36:34.971Z",
"updatedAt": "2025-06-28T13:36:34.971Z",
"scannedAt": "2025-06-28T13:36:34.971Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/core/remember-xml.thought.md",
"fileType": "thought"
}
@ -137,9 +137,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/core/remember.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.711Z",
"updatedAt": "2025-06-28T11:53:03.711Z",
"scannedAt": "2025-06-28T11:53:03.711Z",
"createdAt": "2025-06-28T13:36:34.971Z",
"updatedAt": "2025-06-28T13:36:34.971Z",
"scannedAt": "2025-06-28T13:36:34.971Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/core/remember.thought.md",
"fileType": "thought"
}
@ -152,25 +152,70 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/assistant/thought/assistant.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.711Z",
"updatedAt": "2025-06-28T11:53:03.711Z",
"scannedAt": "2025-06-28T11:53:03.711Z",
"createdAt": "2025-06-28T13:36:34.971Z",
"updatedAt": "2025-06-28T13:36:34.971Z",
"scannedAt": "2025-06-28T13:36:34.971Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/assistant/thought/assistant.thought.md",
"fileType": "thought"
}
},
{
"id": "craftsmanship",
"id": "design",
"source": "package",
"protocol": "thought",
"name": "Craftsmanship 思维模式",
"name": "Design 思维模式",
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/luban/thought/craftsmanship.thought.md",
"reference": "@package://resource/role/luban/thought/design.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.711Z",
"updatedAt": "2025-06-28T11:53:03.711Z",
"scannedAt": "2025-06-28T11:53:03.711Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/thought/craftsmanship.thought.md",
"createdAt": "2025-06-28T13:36:34.972Z",
"updatedAt": "2025-06-28T13:36:34.972Z",
"scannedAt": "2025-06-28T13:36:34.972Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/thought/design.thought.md",
"fileType": "thought"
}
},
{
"id": "engineering",
"source": "package",
"protocol": "thought",
"name": "Engineering 思维模式",
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/luban/thought/engineering.thought.md",
"metadata": {
"createdAt": "2025-06-28T13:36:34.972Z",
"updatedAt": "2025-06-28T13:36:34.972Z",
"scannedAt": "2025-06-28T13:36:34.972Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/thought/engineering.thought.md",
"fileType": "thought"
}
},
{
"id": "requirements",
"source": "package",
"protocol": "thought",
"name": "Requirements 思维模式",
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/luban/thought/requirements.thought.md",
"metadata": {
"createdAt": "2025-06-28T13:36:34.972Z",
"updatedAt": "2025-06-28T13:36:34.972Z",
"scannedAt": "2025-06-28T13:36:34.972Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/thought/requirements.thought.md",
"fileType": "thought"
}
},
{
"id": "validation",
"source": "package",
"protocol": "thought",
"name": "Validation 思维模式",
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/luban/thought/validation.thought.md",
"metadata": {
"createdAt": "2025-06-28T13:36:34.972Z",
"updatedAt": "2025-06-28T13:36:34.972Z",
"scannedAt": "2025-06-28T13:36:34.972Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/thought/validation.thought.md",
"fileType": "thought"
}
},
@ -182,9 +227,9 @@
"description": "思维模式指导AI的思考方式",
"reference": "@package://resource/role/nuwa/thought/role-creation.thought.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.711Z",
"updatedAt": "2025-06-28T11:53:03.711Z",
"scannedAt": "2025-06-28T11:53:03.711Z",
"createdAt": "2025-06-28T13:36:34.972Z",
"updatedAt": "2025-06-28T13:36:34.972Z",
"scannedAt": "2025-06-28T13:36:34.972Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/thought/role-creation.thought.md",
"fileType": "thought"
}
@ -197,9 +242,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/assistant/execution/assistant.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.712Z",
"updatedAt": "2025-06-28T11:53:03.712Z",
"scannedAt": "2025-06-28T11:53:03.712Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/assistant/execution/assistant.execution.md",
"fileType": "execution"
}
@ -212,9 +257,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/luban/execution/tool-development-workflow.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/execution/tool-development-workflow.execution.md",
"fileType": "execution"
}
@ -227,9 +272,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/luban/execution/toolsandbox-mastery.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/execution/toolsandbox-mastery.execution.md",
"fileType": "execution"
}
@ -242,9 +287,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/noface/execution/adaptive-learning.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/noface/execution/adaptive-learning.execution.md",
"fileType": "execution"
}
@ -257,9 +302,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/noface/execution/content-preservation.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/noface/execution/content-preservation.execution.md",
"fileType": "execution"
}
@ -272,9 +317,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/nuwa/execution/dpml-authoring.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.974Z",
"updatedAt": "2025-06-28T13:36:34.974Z",
"scannedAt": "2025-06-28T13:36:34.974Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/execution/dpml-authoring.execution.md",
"fileType": "execution"
}
@ -287,9 +332,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/nuwa/execution/role-design-patterns.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.713Z",
"updatedAt": "2025-06-28T11:53:03.713Z",
"scannedAt": "2025-06-28T11:53:03.713Z",
"createdAt": "2025-06-28T13:36:34.975Z",
"updatedAt": "2025-06-28T13:36:34.975Z",
"scannedAt": "2025-06-28T13:36:34.975Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/execution/role-design-patterns.execution.md",
"fileType": "execution"
}
@ -302,9 +347,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/nuwa/execution/role-generation.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.714Z",
"updatedAt": "2025-06-28T11:53:03.714Z",
"scannedAt": "2025-06-28T11:53:03.714Z",
"createdAt": "2025-06-28T13:36:34.975Z",
"updatedAt": "2025-06-28T13:36:34.975Z",
"scannedAt": "2025-06-28T13:36:34.975Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/execution/role-generation.execution.md",
"fileType": "execution"
}
@ -317,9 +362,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/nuwa/execution/visualization-enhancement.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.714Z",
"updatedAt": "2025-06-28T11:53:03.714Z",
"scannedAt": "2025-06-28T11:53:03.714Z",
"createdAt": "2025-06-28T13:36:34.975Z",
"updatedAt": "2025-06-28T13:36:34.975Z",
"scannedAt": "2025-06-28T13:36:34.975Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/nuwa/execution/visualization-enhancement.execution.md",
"fileType": "execution"
}
@ -332,9 +377,9 @@
"description": "执行模式,定义具体的行为模式",
"reference": "@package://resource/role/sean/execution/template-adherence.execution.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.714Z",
"updatedAt": "2025-06-28T11:53:03.714Z",
"scannedAt": "2025-06-28T11:53:03.714Z",
"createdAt": "2025-06-28T13:36:34.975Z",
"updatedAt": "2025-06-28T13:36:34.975Z",
"scannedAt": "2025-06-28T13:36:34.975Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/sean/execution/template-adherence.execution.md",
"fileType": "execution"
}
@ -347,28 +392,13 @@
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/luban/knowledge/dpml-tool-tagging.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.715Z",
"updatedAt": "2025-06-28T11:53:03.715Z",
"scannedAt": "2025-06-28T11:53:03.715Z",
"createdAt": "2025-06-28T13:36:34.976Z",
"updatedAt": "2025-06-28T13:36:34.976Z",
"scannedAt": "2025-06-28T13:36:34.976Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/knowledge/dpml-tool-tagging.knowledge.md",
"fileType": "knowledge"
}
},
{
"id": "javascript-ecosystem",
"source": "package",
"protocol": "knowledge",
"name": "Javascript Ecosystem 知识库",
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/luban/knowledge/javascript-ecosystem.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.715Z",
"updatedAt": "2025-06-28T11:53:03.715Z",
"scannedAt": "2025-06-28T11:53:03.715Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/knowledge/javascript-ecosystem.knowledge.md",
"fileType": "knowledge"
}
},
{
"id": "promptx-tool-architecture",
"source": "package",
@ -377,28 +407,13 @@
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/luban/knowledge/promptx-tool-architecture.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.715Z",
"updatedAt": "2025-06-28T11:53:03.715Z",
"scannedAt": "2025-06-28T11:53:03.715Z",
"createdAt": "2025-06-28T13:36:34.977Z",
"updatedAt": "2025-06-28T13:36:34.977Z",
"scannedAt": "2025-06-28T13:36:34.976Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/knowledge/promptx-tool-architecture.knowledge.md",
"fileType": "knowledge"
}
},
{
"id": "tool-best-practices",
"source": "package",
"protocol": "knowledge",
"name": "Tool Best Practices 知识库",
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/luban/knowledge/tool-best-practices.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.716Z",
"updatedAt": "2025-06-28T11:53:03.716Z",
"scannedAt": "2025-06-28T11:53:03.716Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/luban/knowledge/tool-best-practices.knowledge.md",
"fileType": "knowledge"
}
},
{
"id": "contradiction-methodology",
"source": "package",
@ -407,9 +422,9 @@
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/sean/knowledge/contradiction-methodology.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.716Z",
"updatedAt": "2025-06-28T11:53:03.716Z",
"scannedAt": "2025-06-28T11:53:03.716Z",
"createdAt": "2025-06-28T13:36:34.977Z",
"updatedAt": "2025-06-28T13:36:34.977Z",
"scannedAt": "2025-06-28T13:36:34.977Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/sean/knowledge/contradiction-methodology.knowledge.md",
"fileType": "knowledge"
}
@ -422,9 +437,9 @@
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/sean/knowledge/product-philosophy.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.716Z",
"updatedAt": "2025-06-28T11:53:03.716Z",
"scannedAt": "2025-06-28T11:53:03.716Z",
"createdAt": "2025-06-28T13:36:34.977Z",
"updatedAt": "2025-06-28T13:36:34.977Z",
"scannedAt": "2025-06-28T13:36:34.977Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/sean/knowledge/product-philosophy.knowledge.md",
"fileType": "knowledge"
}
@ -437,24 +452,24 @@
"description": "知识库,提供专业知识和信息",
"reference": "@package://resource/role/sean/knowledge/promptx-evolution.knowledge.md",
"metadata": {
"createdAt": "2025-06-28T11:53:03.716Z",
"updatedAt": "2025-06-28T11:53:03.716Z",
"scannedAt": "2025-06-28T11:53:03.716Z",
"createdAt": "2025-06-28T13:36:34.977Z",
"updatedAt": "2025-06-28T13:36:34.977Z",
"scannedAt": "2025-06-28T13:36:34.977Z",
"filePath": "/Users/sean/Management/ContradictionManagement/projects/PromptX/resource/role/sean/knowledge/promptx-evolution.knowledge.md",
"fileType": "knowledge"
}
}
],
"stats": {
"totalResources": 29,
"totalResources": 30,
"byProtocol": {
"role": 5,
"thought": 7,
"thought": 10,
"execution": 10,
"knowledge": 7
"knowledge": 5
},
"bySource": {
"package": 29
"package": 30
}
}
}