@alenfitz/spec-copilot 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/index.js +1 -218
- package/bin/cli.js +1 -786
- package/commands/spec:apply.md +16 -3
- package/commands/spec:review.md +12 -2
- package/commands/spec:smoke.md +6 -2
- package/framework/AGENTS.md.template +37 -11
- package/framework/VERSION +1 -1
- package/framework/changes/templates/tasks.md +12 -0
- package/package.json +2 -2
package/adapters/index.js
CHANGED
|
@@ -1,218 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool adapters — 每个 AI 编码工具的适配配置
|
|
3
|
-
*
|
|
4
|
-
* 每个 adapter 定义:
|
|
5
|
-
* - promptPath: 提示词文件相对项目根目录的路径
|
|
6
|
-
* - commandsDir: 原生命令目录(null = 无原生命令支持)
|
|
7
|
-
* - detect(projectRoot): 自动检测该工具是否在使用
|
|
8
|
-
* - formatPrompt(content): 将通用 prompt 转换为工具专属格式
|
|
9
|
-
* - formatCommand(content, meta): 将通用命令转换为工具专属格式
|
|
10
|
-
* - cleanupPaths: uninstall 时需清理的路径(相对项目根)
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const fs = require('fs');
|
|
14
|
-
const path = require('path');
|
|
15
|
-
|
|
16
|
-
// ─── 命令路由模板(无原生命令的工具追加到 prompt 末尾) ───────
|
|
17
|
-
|
|
18
|
-
function buildCommandRoutingSection() {
|
|
19
|
-
return `
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 命令路由
|
|
24
|
-
|
|
25
|
-
当用户输入以下命令时,读取对应文件并按其指令执行:
|
|
26
|
-
|
|
27
|
-
| 命令 | 读取文件 |
|
|
28
|
-
|------|---------|
|
|
29
|
-
| \`/spec:init\` | \`spec_copilot/commands/spec:init.md\` |
|
|
30
|
-
| \`/spec:bootstrap\` | \`spec_copilot/commands/spec:bootstrap.md\` |
|
|
31
|
-
| \`/spec:propose <需求>\` | \`spec_copilot/commands/spec:propose.md\` |
|
|
32
|
-
| \`/spec:flow <需求>\` | \`spec_copilot/commands/spec:flow.md\` |
|
|
33
|
-
| \`/spec:apply <变更名>\` | \`spec_copilot/commands/spec:apply.md\` |
|
|
34
|
-
| \`/spec:smoke <变更名>\` | \`spec_copilot/commands/spec:smoke.md\` |
|
|
35
|
-
| \`/spec:review <变更名>\` | \`spec_copilot/commands/spec:review.md\` |
|
|
36
|
-
| \`/spec:fix <变更名>\` | \`spec_copilot/commands/spec:fix.md\` |
|
|
37
|
-
| \`/spec:test <变更名>\` | \`spec_copilot/commands/spec:test.md\` |
|
|
38
|
-
| \`/spec:archive <变更名>\` | \`spec_copilot/commands/spec:archive.md\` |
|
|
39
|
-
| \`/spec:hotfix <描述>\` | \`spec_copilot/commands/spec:hotfix.md\` |
|
|
40
|
-
|
|
41
|
-
用户输入命令后,**立即**读取对应文件并执行,不需要再次确认。
|
|
42
|
-
将 \`<需求>\`、\`<变更名>\`、\`<描述>\` 替换为用户在命令后提供的参数。
|
|
43
|
-
`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// ─── Adapters ───────────────────────────────────────────────
|
|
47
|
-
|
|
48
|
-
const adapters = {
|
|
49
|
-
|
|
50
|
-
// ─── opencode ────────────────────────────────────────────
|
|
51
|
-
opencode: {
|
|
52
|
-
name: 'opencode',
|
|
53
|
-
displayName: 'opencode',
|
|
54
|
-
description: 'opencode CLI (github.com/opencode-ai/opencode)',
|
|
55
|
-
promptPath: 'AGENTS.md',
|
|
56
|
-
commandsDir: '.opencode/commands',
|
|
57
|
-
hasNativeCommands: true,
|
|
58
|
-
|
|
59
|
-
detect(projectRoot) {
|
|
60
|
-
return fs.existsSync(path.join(projectRoot, '.opencode')) ||
|
|
61
|
-
fs.existsSync(path.join(projectRoot, 'opencode.json'));
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
formatPrompt(content) {
|
|
65
|
-
return content;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
formatCommand(content, _meta) {
|
|
69
|
-
return content; // opencode uses same format as our command files
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
cleanupPaths: ['AGENTS.md', '.opencode/commands'],
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
// ─── Claude Code ─────────────────────────────────────────
|
|
76
|
-
'claude-code': {
|
|
77
|
-
name: 'claude-code',
|
|
78
|
-
displayName: 'Claude Code',
|
|
79
|
-
description: 'Claude Code CLI (Anthropic)',
|
|
80
|
-
promptPath: 'CLAUDE.md',
|
|
81
|
-
commandsDir: '.claude/commands',
|
|
82
|
-
hasNativeCommands: true,
|
|
83
|
-
|
|
84
|
-
detect(projectRoot) {
|
|
85
|
-
return fs.existsSync(path.join(projectRoot, '.claude')) ||
|
|
86
|
-
fs.existsSync(path.join(projectRoot, 'CLAUDE.md'));
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
formatPrompt(content) {
|
|
90
|
-
return content;
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
formatCommand(content, _meta) {
|
|
94
|
-
return content; // Claude Code uses same frontmatter format
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
cleanupPaths: ['CLAUDE.md', '.claude/commands'],
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
// ─── Cursor ──────────────────────────────────────────────
|
|
101
|
-
cursor: {
|
|
102
|
-
name: 'cursor',
|
|
103
|
-
displayName: 'Cursor',
|
|
104
|
-
description: 'Cursor IDE (.cursor/rules/*.mdc)',
|
|
105
|
-
promptPath: '.cursor/rules/spec-copilot.mdc',
|
|
106
|
-
commandsDir: null, // commands go to spec_copilot/commands/
|
|
107
|
-
hasNativeCommands: false,
|
|
108
|
-
|
|
109
|
-
detect(projectRoot) {
|
|
110
|
-
return fs.existsSync(path.join(projectRoot, '.cursor')) ||
|
|
111
|
-
fs.existsSync(path.join(projectRoot, '.cursorrules'));
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
formatPrompt(content) {
|
|
115
|
-
const frontmatter = [
|
|
116
|
-
'---',
|
|
117
|
-
'description: "Spec-Driven Development Framework — AI 编码协作规范"',
|
|
118
|
-
'alwaysApply: true',
|
|
119
|
-
'---',
|
|
120
|
-
'',
|
|
121
|
-
].join('\n');
|
|
122
|
-
return frontmatter + content + buildCommandRoutingSection();
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
formatCommand(content, _meta) {
|
|
126
|
-
return content; // stored in spec_copilot/commands/, not tool-specific
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
cleanupPaths: ['.cursor/rules/spec-copilot.mdc'],
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
// ─── Windsurf ────────────────────────────────────────────
|
|
133
|
-
windsurf: {
|
|
134
|
-
name: 'windsurf',
|
|
135
|
-
displayName: 'Windsurf',
|
|
136
|
-
description: 'Windsurf IDE (.windsurf/rules/)',
|
|
137
|
-
promptPath: '.windsurf/rules/spec-copilot.md',
|
|
138
|
-
commandsDir: null,
|
|
139
|
-
hasNativeCommands: false,
|
|
140
|
-
|
|
141
|
-
detect(projectRoot) {
|
|
142
|
-
return fs.existsSync(path.join(projectRoot, '.windsurf')) ||
|
|
143
|
-
fs.existsSync(path.join(projectRoot, '.windsurfrules'));
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
formatPrompt(content) {
|
|
147
|
-
return content + buildCommandRoutingSection();
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
formatCommand(content, _meta) {
|
|
151
|
-
return content;
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
cleanupPaths: ['.windsurf/rules/spec-copilot.md'],
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
// ─── GitHub Copilot ──────────────────────────────────────
|
|
158
|
-
copilot: {
|
|
159
|
-
name: 'copilot',
|
|
160
|
-
displayName: 'GitHub Copilot',
|
|
161
|
-
description: 'GitHub Copilot (.github/copilot-instructions.md)',
|
|
162
|
-
promptPath: '.github/copilot-instructions.md',
|
|
163
|
-
commandsDir: null,
|
|
164
|
-
hasNativeCommands: false,
|
|
165
|
-
|
|
166
|
-
detect(projectRoot) {
|
|
167
|
-
return fs.existsSync(path.join(projectRoot, '.github', 'copilot-instructions.md'));
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
formatPrompt(content) {
|
|
171
|
-
return content + buildCommandRoutingSection();
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
formatCommand(content, _meta) {
|
|
175
|
-
return content;
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
cleanupPaths: ['.github/copilot-instructions.md'],
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
// ─── Cline ───────────────────────────────────────────────
|
|
182
|
-
cline: {
|
|
183
|
-
name: 'cline',
|
|
184
|
-
displayName: 'Cline',
|
|
185
|
-
description: 'Cline VSCode extension (.clinerules/)',
|
|
186
|
-
promptPath: '.clinerules/spec-copilot.md',
|
|
187
|
-
commandsDir: null,
|
|
188
|
-
hasNativeCommands: false,
|
|
189
|
-
|
|
190
|
-
detect(projectRoot) {
|
|
191
|
-
return fs.existsSync(path.join(projectRoot, '.clinerules')) ||
|
|
192
|
-
fs.existsSync(path.join(projectRoot, '.cline'));
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
formatPrompt(content) {
|
|
196
|
-
return content + buildCommandRoutingSection();
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
formatCommand(content, _meta) {
|
|
200
|
-
return content;
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
cleanupPaths: ['.clinerules/spec-copilot.md'],
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
/** 自动检测项目中使用的工具 */
|
|
209
|
-
function detectTools(projectRoot) {
|
|
210
|
-
return Object.values(adapters).filter(a => a.detect(projectRoot));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/** 获取所有支持的工具名 */
|
|
214
|
-
function supportedTools() {
|
|
215
|
-
return Object.keys(adapters);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
module.exports = { adapters, detectTools, supportedTools, buildCommandRoutingSection };
|
|
1
|
+
const _0x49f5b4=_0xa4dd,_0x32a8b6=_0xa4dd;(function(_0x2938be,_0x1aece7){const _0x3035e7={_0x58067d:0x17a,_0x20358f:0x119,_0x3830e8:0x1aa,_0x305761:0x123,_0x4cc53e:0x15f},_0x4f3328=_0xa4dd,_0x350cee=_0xa4dd,_0x1bc1e8=_0x2938be();while(!![]){try{const _0x32e231=parseInt(_0x4f3328(_0x3035e7._0x58067d))/(-0x10c8+-0x1585*0x1+-0x1327*-0x2)+-parseInt(_0x350cee(_0x3035e7._0x20358f))/(0x262*-0x4+0x269*0x4+-0x1a)*(-parseInt(_0x4f3328(0x19e))/(0x1107+-0xf82+0x182*-0x1))+parseInt(_0x350cee(0x137))/(-0x3e*-0x31+-0x2296+-0x61*-0x3c)*(parseInt(_0x4f3328(_0x3035e7._0x3830e8))/(-0x1*-0x22fb+0x20b5+-0x1*0x43ab))+parseInt(_0x4f3328(_0x3035e7._0x305761))/(-0x43f*0x7+0xf4*0x25+-0x585)+parseInt(_0x4f3328(0x16b))/(-0x1*0xfee+0x69e+0x957*0x1)*(-parseInt(_0x4f3328(0x11b))/(-0xdb5+-0xd11+-0x49*-0x5e))+-parseInt(_0x350cee(0x144))/(-0xd*0x115+0x6*-0x19e+0x17ce)+-parseInt(_0x350cee(_0x3035e7._0x4cc53e))/(0x15*-0x27+0x16*0x79+-0x729);if(_0x32e231===_0x1aece7)break;else _0x1bc1e8['push'](_0x1bc1e8['shift']());}catch(_0x5916ba){_0x1bc1e8['push'](_0x1bc1e8['shift']());}}}(_0x57cb,0x107d01+-0x2beb*-0xb+0x33e29*-0x3));const _0x1fe0e4=(function(){const _0x1a6bec={_0x53058e:0x182,_0x2a8af6:0x173,_0x63cb3e:0x1b0},_0x494201={_0x5f2734:0x12a,_0x143771:0x11e,_0x203caf:0x172,_0x25b7b6:0x1ab,_0x16df82:0x15e},_0x18f6a0=_0xa4dd,_0x273d0a=_0xa4dd,_0x36525f={};_0x36525f[_0x18f6a0(0x14b)]=_0x18f6a0(0x1a4),_0x36525f['HQKta']=_0x18f6a0(_0x1a6bec._0x53058e)+'structions'+_0x18f6a0(_0x1a6bec._0x2a8af6),_0x36525f[_0x18f6a0(_0x1a6bec._0x63cb3e)]=_0x273d0a(0x17b);const _0x32596e=_0x36525f;let _0x2f71ad=!![];return function(_0x3a5295,_0x14af12){const _0xa064b={_0x13cfd4:0x1ab,_0x238b82:0x11e,_0x194302:0x161},_0x200adb=_0x18f6a0,_0x2ba1df=_0x18f6a0,_0x2cc113={};_0x2cc113[_0x200adb(_0x494201._0x5f2734)]=_0x32596e['HQKta'];const _0x14700a=_0x2cc113;if(_0x32596e[_0x2ba1df(0x1b0)]!==_0x200adb(0x17b))return _0x26ff01[_0x2ba1df(0x1ab)](_0x21d944[_0x200adb(_0x494201._0x143771)](_0xc21513,_0x200adb(_0x494201._0x203caf)))||_0x3432b6[_0x2ba1df(_0x494201._0x25b7b6)](_0x33547e[_0x200adb(0x11e)](_0x239f30,_0x2ba1df(_0x494201._0x16df82)+'es'));else{const _0x5331e9=_0x2f71ad?function(){const _0x11790e=_0x200adb,_0x47560d=_0x200adb;if(_0x14af12){if(_0x32596e['THXmi']===_0x32596e['THXmi']){const _0x432e04=_0x14af12['apply'](_0x3a5295,arguments);return _0x14af12=null,_0x432e04;}else return _0xa09faf[_0x11790e(_0xa064b._0x13cfd4)](_0x5d9ad5[_0x11790e(_0xa064b._0x238b82)](_0x480e29,_0x11790e(_0xa064b._0x194302),_0x14700a['VJeHW']));}}:function(){};return _0x2f71ad=![],_0x5331e9;}};}()),_0x1bae5a=_0x1fe0e4(this,function(){const _0x4373e3={_0x5c40a4:0x169,_0x2bd40e:0x164,_0x58feac:0x126},_0x418051=_0xa4dd,_0x168fd4=_0xa4dd,_0x442b7d={};_0x442b7d[_0x418051(0x126)]=_0x168fd4(_0x4373e3._0x5c40a4)+'+$';const _0x42734a=_0x442b7d;return _0x1bae5a[_0x418051(0x192)]()[_0x168fd4(_0x4373e3._0x2bd40e)](_0x42734a[_0x168fd4(_0x4373e3._0x58feac)])['toString']()[_0x418051(0x159)+'r'](_0x1bae5a)[_0x418051(0x164)](_0x168fd4(0x169)+'+$');});_0x1bae5a();const fs=require('fs'),path=require(_0x49f5b4(0x15c));function buildCommandRoutingSection(){const _0x37e70e={_0x184bbb:0x16e,_0x1596f2:0x1a6,_0x5f177e:0x122,_0x230da8:0x195,_0x223bf7:0x155,_0x34cd51:0x162,_0x46747e:0x171,_0x11d7ad:0x129,_0x4eb42a:0x148,_0x5c6154:0x187,_0x53f925:0x195,_0x2014aa:0x1a2,_0x5852eb:0x152,_0x3be95e:0x191,_0x2b4256:0x16a,_0x357dc2:0x145,_0x4e01c7:0x18d,_0x4a2967:0x1a3,_0x5798d4:0x153,_0x13acac:0x19f,_0x187827:0x165,_0x34c413:0x17f,_0x58fd07:0x120,_0x486c35:0x14e,_0x3eb7dc:0x187,_0x47538c:0x13c,_0x36c7f0:0x14d,_0x130063:0x171,_0x539369:0x133},_0x2aeb41=_0x49f5b4,_0x38e44d=_0x49f5b4;return _0x2aeb41(_0x37e70e._0x184bbb)+_0x38e44d(_0x37e70e._0x1596f2)+_0x2aeb41(0x11d)+'应文件并按其指令执行'+':\x0a\x0a|\x20命令\x20|\x20'+'读取文件\x20|\x0a|--'+'----|-----'+_0x38e44d(0x13d)+_0x38e44d(_0x37e70e._0x5f177e)+_0x38e44d(0x14e)+_0x2aeb41(0x187)+_0x38e44d(_0x37e70e._0x230da8)+':init.md`\x20'+_0x2aeb41(_0x37e70e._0x223bf7)+_0x38e44d(_0x37e70e._0x34cd51)+'`\x20|\x20`spec_'+_0x2aeb41(_0x37e70e._0x46747e)+_0x2aeb41(_0x37e70e._0x11d7ad)+'c:bootstra'+_0x2aeb41(_0x37e70e._0x4eb42a)+'`/spec:pro'+'pose\x20<需求>`'+_0x38e44d(0x14e)+_0x38e44d(_0x37e70e._0x5c6154)+_0x2aeb41(_0x37e70e._0x53f925)+_0x38e44d(0x136)+_0x2aeb41(0x19b)+_0x38e44d(0x158)+_0x2aeb41(_0x37e70e._0x2014aa)+'ec_copilot'+_0x38e44d(0x17c)+_0x38e44d(_0x37e70e._0x5852eb)+'md`\x20|\x0a|\x20`/'+_0x38e44d(_0x37e70e._0x3be95e)+_0x2aeb41(0x1a0)+_0x38e44d(0x13f)+_0x2aeb41(0x14f)+_0x2aeb41(_0x37e70e._0x2b4256)+_0x2aeb41(_0x37e70e._0x357dc2)+_0x2aeb41(_0x37e70e._0x4e01c7)+_0x38e44d(0x180)+_0x38e44d(_0x37e70e._0x4a2967)+_0x38e44d(_0x37e70e._0x46747e)+'mmands/spe'+_0x2aeb41(0x15a)+_0x38e44d(0x151)+'ec:review\x20'+'<变更名>`\x20|\x20`'+'spec_copil'+_0x2aeb41(_0x37e70e._0x5798d4)+'s/spec:rev'+_0x38e44d(0x12f)+_0x2aeb41(_0x37e70e._0x13acac)+'ix\x20<变更名>`\x20'+_0x38e44d(_0x37e70e._0x187827)+'pilot/comm'+_0x2aeb41(_0x37e70e._0x34c413)+'fix.md`\x20|\x0a'+_0x2aeb41(_0x37e70e._0x58fd07)+_0x2aeb41(0x156)+_0x38e44d(_0x37e70e._0x486c35)+_0x38e44d(_0x37e70e._0x3eb7dc)+_0x2aeb41(_0x37e70e._0x53f925)+_0x38e44d(0x125)+'|\x0a|\x20`/spec'+_0x2aeb41(0x13a)+_0x38e44d(_0x37e70e._0x47538c)+_0x38e44d(0x15d)+'t/commands'+'/spec:arch'+_0x2aeb41(0x170)+'|\x20`/spec:h'+_0x2aeb41(_0x37e70e._0x36c7f0)+_0x2aeb41(0x1a3)+_0x2aeb41(_0x37e70e._0x130063)+_0x2aeb41(_0x37e70e._0x11d7ad)+'c:hotfix.m'+_0x2aeb41(0x131)+_0x38e44d(0x1a9)+_0x38e44d(0x1a5)+'不需要再次确认。\x0a将'+'\x20`<需求>`、`<'+_0x38e44d(0x127)+_0x2aeb41(0x178)+_0x38e44d(_0x37e70e._0x539369);}const adapters={'opencode':{'name':'opencode','displayName':'opencode','description':_0x49f5b4(0x188)+_0x49f5b4(0x154)+_0x32a8b6(0x16c)+_0x32a8b6(0x121)+'ncode)','promptPath':_0x32a8b6(0x135),'commandsDir':_0x32a8b6(0x15b)+'commands','hasNativeCommands':!![],'detect'(_0x386572){const _0xa42c58={_0x14f975:0x1a8,_0x2ab496:0x1ab,_0x242c23:0x11e,_0x56d93c:0x18b},_0x462125=_0x32a8b6,_0x1faf12=_0x32a8b6,_0x3e1041={};_0x3e1041[_0x462125(0x18b)]=_0x462125(_0xa42c58._0x14f975)+_0x1faf12(0x124);const _0x4eebd7=_0x3e1041;return fs[_0x1faf12(0x1ab)](path[_0x1faf12(0x11e)](_0x386572,_0x1faf12(0x12c)))||fs[_0x1faf12(_0xa42c58._0x2ab496)](path[_0x1faf12(_0xa42c58._0x242c23)](_0x386572,_0x4eebd7[_0x462125(_0xa42c58._0x56d93c)]));},'formatPrompt'(_0x382f0f){return _0x382f0f;},'formatCommand'(_0x32be4e,_0x5a899d){return _0x32be4e;},'cleanupPaths':['AGENTS.md','.opencode/'+_0x32a8b6(0x1ae)]},'claude-code':{'name':_0x32a8b6(0x11f)+'e','displayName':_0x49f5b4(0x174)+'e','description':_0x49f5b4(0x174)+_0x32a8b6(0x1a1)+_0x49f5b4(0x168),'promptPath':_0x32a8b6(0x138),'commandsDir':_0x49f5b4(0x157)+'mmands','hasNativeCommands':!![],'detect'(_0x38f608){const _0x658b74={_0x184f30:0x198,_0xa6de2f:0x14a,_0x2258ca:0x138,_0x429313:0x1ab,_0xd4c1d7:0x11e},_0x30d202=_0x32a8b6,_0x4705d7=_0x32a8b6,_0x10df6e={};_0x10df6e[_0x30d202(0x1a7)]=_0x4705d7(_0x658b74._0x184f30),_0x10df6e[_0x30d202(_0x658b74._0xa6de2f)]=_0x4705d7(_0x658b74._0x2258ca);const _0x3ef2ca=_0x10df6e;return fs[_0x4705d7(_0x658b74._0x429313)](path[_0x30d202(_0x658b74._0xd4c1d7)](_0x38f608,_0x3ef2ca['Rwywm']))||fs[_0x4705d7(0x1ab)](path[_0x4705d7(0x11e)](_0x38f608,_0x3ef2ca[_0x4705d7(0x14a)]));},'formatPrompt'(_0x4ec0cb){return _0x4ec0cb;},'formatCommand'(_0x42c370,_0x1647c2){return _0x42c370;},'cleanupPaths':[_0x32a8b6(0x138),_0x49f5b4(0x157)+_0x49f5b4(0x19a)]},'cursor':{'name':_0x49f5b4(0x130),'displayName':'Cursor','description':'Cursor\x20IDE'+_0x49f5b4(0x12b)+_0x32a8b6(0x140)+'c)','promptPath':'.cursor/ru'+_0x49f5b4(0x14c)+'opilot.mdc','commandsDir':null,'hasNativeCommands':![],'detect'(_0x5be46d){const _0x578f2a={_0xe1ba06:0x18f},_0x162107=_0x49f5b4,_0x5d02ec=_0x49f5b4,_0x4a8b0f={};_0x4a8b0f[_0x162107(0x18f)]=_0x5d02ec(0x172);const _0x300dc0=_0x4a8b0f;return fs[_0x162107(0x1ab)](path[_0x5d02ec(0x11e)](_0x5be46d,_0x300dc0[_0x162107(_0x578f2a._0xe1ba06)]))||fs[_0x162107(0x1ab)](path[_0x5d02ec(0x11e)](_0x5be46d,'.cursorrul'+'es'));},'formatPrompt'(_0x5621c3){const _0x565cc5={_0xca03d2:0x194,_0x2aaa89:0x1af,_0x386347:0x160,_0x58b252:0x118},_0x3187a6=_0x32a8b6,_0x451429=_0x32a8b6,_0x2d9875={};_0x2d9875[_0x3187a6(0x160)]=_0x3187a6(0x118),_0x2d9875[_0x3187a6(0x197)]=_0x3187a6(0x189)+_0x3187a6(_0x565cc5._0xca03d2)+'riven\x20Deve'+_0x451429(0x16d)+_0x451429(0x13e)+'AI\x20编码协作规范\x22',_0x2d9875['hgVwX']=_0x3187a6(0x177)+'y:\x20true',_0x2d9875[_0x451429(_0x565cc5._0x2aaa89)]=function(_0x53514b,_0x1a7fb7){return _0x53514b+_0x1a7fb7;};const _0x2ae607=_0x2d9875,_0x24a484=[_0x2ae607[_0x451429(_0x565cc5._0x386347)],_0x2ae607[_0x451429(0x197)],_0x2ae607[_0x451429(0x183)],_0x3187a6(_0x565cc5._0x58b252),''][_0x451429(0x11e)]('\x0a');return _0x2ae607['tVPSE'](_0x2ae607['tVPSE'](_0x24a484,_0x5621c3),buildCommandRoutingSection());},'formatCommand'(_0xc2612c,_0x3d9c1a){return _0xc2612c;},'cleanupPaths':[_0x32a8b6(0x1ad)+_0x49f5b4(0x14c)+_0x32a8b6(0x19c)]},'windsurf':{'name':_0x49f5b4(0x134),'displayName':'Windsurf','description':'Windsurf\x20I'+_0x49f5b4(0x11a)+_0x32a8b6(0x186)+')','promptPath':_0x32a8b6(0x17e)+_0x49f5b4(0x18c)+_0x32a8b6(0x184)+'d','commandsDir':null,'hasNativeCommands':![],'detect'(_0x3257f2){const _0x52bf80={_0x4c157e:0x181,_0x5ac56e:0x1ab},_0x580b18=_0x49f5b4,_0x2fc490=_0x49f5b4,_0x35a981={};_0x35a981['UEMmx']='.windsurfr'+_0x580b18(0x132);const _0x1d3cf1=_0x35a981;return fs[_0x2fc490(0x1ab)](path[_0x2fc490(0x11e)](_0x3257f2,_0x580b18(_0x52bf80._0x4c157e)))||fs[_0x580b18(_0x52bf80._0x5ac56e)](path[_0x580b18(0x11e)](_0x3257f2,_0x1d3cf1['UEMmx']));},'formatPrompt'(_0x2e13d4){const _0x505e4b=_0x32a8b6,_0x5a13c6=_0x32a8b6,_0x5e5720={'AwbGd':function(_0x176622,_0x2ca68b){return _0x176622+_0x2ca68b;},'GTAdt':function(_0x4250e2){return _0x4250e2();}};return _0x5e5720[_0x505e4b(0x146)](_0x2e13d4,_0x5e5720[_0x505e4b(0x176)](buildCommandRoutingSection));},'formatCommand'(_0x313e28,_0xafa47d){return _0x313e28;},'cleanupPaths':['.windsurf/'+_0x32a8b6(0x18c)+_0x32a8b6(0x184)+'d']},'copilot':{'name':'copilot','displayName':_0x49f5b4(0x199)+_0x32a8b6(0x142),'description':_0x49f5b4(0x199)+_0x49f5b4(0x19d)+'hub/copilo'+_0x32a8b6(0x150)+_0x32a8b6(0x1b2),'promptPath':'.github/co'+_0x49f5b4(0x179)+_0x49f5b4(0x166)+'d','commandsDir':null,'hasNativeCommands':![],'detect'(_0x1e8010){const _0x554315={_0x2cc2a1:0x161,_0xa4b0a5:0x182,_0x5d823c:0x18a,_0x4e02ba:0x11e,_0x29c868:0x12e},_0x595d37=_0x32a8b6,_0x5e4cc2=_0x32a8b6,_0x4e32f4={};_0x4e32f4[_0x595d37(0x12e)]=_0x595d37(_0x554315._0x2cc2a1),_0x4e32f4[_0x5e4cc2(0x141)]=_0x5e4cc2(_0x554315._0xa4b0a5)+_0x595d37(_0x554315._0x5d823c)+_0x595d37(0x173);const _0x1aaa4c=_0x4e32f4;return fs[_0x5e4cc2(0x1ab)](path[_0x595d37(_0x554315._0x4e02ba)](_0x1e8010,_0x1aaa4c[_0x595d37(_0x554315._0x29c868)],_0x1aaa4c[_0x595d37(0x141)]));},'formatPrompt'(_0x12c3d6){const _0x3f528d={_0x27f6d7:0x143},_0x5b5f1e=_0x49f5b4,_0x3a698f={};_0x3a698f[_0x5b5f1e(_0x3f528d._0x27f6d7)]=function(_0x50aada,_0x58012d){return _0x50aada+_0x58012d;};const _0x3b632d=_0x3a698f;return _0x3b632d['ucffr'](_0x12c3d6,buildCommandRoutingSection());},'formatCommand'(_0xd51ae4,_0x220bfd){return _0xd51ae4;},'cleanupPaths':[_0x49f5b4(0x11c)+'pilot-inst'+_0x49f5b4(0x166)+'d']},'cline':{'name':_0x49f5b4(0x167),'displayName':_0x32a8b6(0x163),'description':'Cline\x20VSCo'+_0x32a8b6(0x149)+_0x49f5b4(0x193)+_0x32a8b6(0x128),'promptPath':'.clinerule'+'s/spec-cop'+_0x32a8b6(0x16f),'commandsDir':null,'hasNativeCommands':![],'detect'(_0x165d95){const _0x51ea1d={_0x4a41a0:0x17d,_0x5bd091:0x147,_0x3352a7:0x13b},_0x4f6614=_0x49f5b4,_0x4256b3=_0x49f5b4,_0x26b532={};_0x26b532['DOEcf']=_0x4f6614(_0x51ea1d._0x4a41a0)+'s';const _0x12dbeb=_0x26b532;return fs['existsSync'](path['join'](_0x165d95,_0x12dbeb[_0x4256b3(_0x51ea1d._0x5bd091)]))||fs['existsSync'](path[_0x4256b3(0x11e)](_0x165d95,_0x4256b3(_0x51ea1d._0x3352a7)));},'formatPrompt'(_0x1afbe5){const _0x3b088f=_0x49f5b4,_0x4088e1={'kGqkm':function(_0x1ad04b){return _0x1ad04b();}};return _0x1afbe5+_0x4088e1[_0x3b088f(0x1ac)](buildCommandRoutingSection);},'formatCommand'(_0x3d7230,_0x44d5a1){return _0x3d7230;},'cleanupPaths':[_0x32a8b6(0x17d)+'s/spec-cop'+_0x32a8b6(0x16f)]}};function detectTools(_0x4e1d2a){const _0x1ee956={_0xbed1d5:0x1b1},_0x21f703=_0x49f5b4,_0x4d730c=_0x49f5b4;return Object[_0x21f703(_0x1ee956._0xbed1d5)](adapters)[_0x21f703(0x190)](_0xb6147=>_0xb6147[_0x21f703(0x196)](_0x4e1d2a));}function supportedTools(){const _0x5969db=_0x49f5b4;return Object[_0x5969db(0x139)](adapters);}const _0x2fa142={};function _0xa4dd(_0x452f4f,_0x190dd1){_0x452f4f=_0x452f4f-(-0x772+-0x167c+0x1f06);const _0x3d97c3=_0x57cb();let _0x3bfdba=_0x3d97c3[_0x452f4f];if(_0xa4dd['YRDgvN']===undefined){var _0x5a3298=function(_0x4b0641){const _0x53a0d3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42c403='',_0x2cb56d='',_0x594e6f=_0x42c403+_0x5a3298,_0x425875=(''+function(){return 0x20dc*0x1+-0x1ea1+0x23b*-0x1;})['indexOf']('\x0a')!==-(0x8d6+0x21*-0x79+0x1*0x6c4);for(let _0x57df0e=0x1933+-0xdf3*0x1+-0xb40,_0x41b4be,_0x558a76,_0xc8279d=0xd9e+0x9da+-0x1778;_0x558a76=_0x4b0641['charAt'](_0xc8279d++);~_0x558a76&&(_0x41b4be=_0x57df0e%(-0x1*-0x31+-0x37*-0x6a+-0x2f*0x7d)?_0x41b4be*(0x32*-0x57+-0x241c+0x355a)+_0x558a76:_0x558a76,_0x57df0e++%(-0x1bc0*0x1+-0x1b39+0x1*0x36fd))?_0x42c403+=_0x425875||_0x594e6f['charCodeAt'](_0xc8279d+(0x163+-0x2*0x5bd+0xa21))-(-0xb*0x2a6+0x3b2+0x197a)!==0x6*0x46c+0x4*0x38+-0x1b68?String['fromCharCode'](-0x1213*-0x1+-0x12f2+-0xef*-0x2&_0x41b4be>>(-(0x90f*0x1+0x46*-0x3e+0x7e7)*_0x57df0e&-0x1fc+0x4*0x932+-0x22c6)):_0x57df0e:0x259f+0x13f7+-0x4e*0xbd){_0x558a76=_0x53a0d3['indexOf'](_0x558a76);}for(let _0x380d20=-0x3*-0x60a+-0x89*0x3b+0x109*0xd,_0x1cef2d=_0x42c403['length'];_0x380d20<_0x1cef2d;_0x380d20++){_0x2cb56d+='%'+('00'+_0x42c403['charCodeAt'](_0x380d20)['toString'](0xc7*0x25+-0x6f2*0x3+-0x7dd))['slice'](-(0x18d9+-0x2641+0xd6a));}return decodeURIComponent(_0x2cb56d);};_0xa4dd['xELLcN']=_0x5a3298,_0xa4dd['xBueDL']={},_0xa4dd['YRDgvN']=!![];}const _0x37795d=_0x3d97c3[0x7*0x50f+0x39*-0x41+-0x53c*0x4],_0x28d6d2=_0x452f4f+_0x37795d,_0x312c2a=_0xa4dd['xBueDL'][_0x28d6d2];if(!_0x312c2a){const _0x203e3e=function(_0x31718f){this['AonyrI']=_0x31718f,this['FaSCeA']=[0x22ba+0x1fa3+-0x425c,-0x451*-0x3+0x2*0x9de+-0x20af,0x156f+0x2314+-0x3883],this['GCHvzx']=function(){return'newState';},this['VrJhCg']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['wwQtSw']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x203e3e['prototype']['xWTLVD']=function(){const _0x256f93=new RegExp(this['VrJhCg']+this['wwQtSw']),_0x502020=_0x256f93['test'](this['GCHvzx']['toString']())?--this['FaSCeA'][-0x1718+0x2522+-0x1*0xe09]:--this['FaSCeA'][-0x28*-0xda+-0x391+-0x1e7f];return this['jsSvKC'](_0x502020);},_0x203e3e['prototype']['jsSvKC']=function(_0x5638ce){if(!Boolean(~_0x5638ce))return _0x5638ce;return this['eEQGIk'](this['AonyrI']);},_0x203e3e['prototype']['eEQGIk']=function(_0x411d34){for(let _0x7caa6a=0x27a+0x688*0x1+-0x902,_0x3cc2bc=this['FaSCeA']['length'];_0x7caa6a<_0x3cc2bc;_0x7caa6a++){this['FaSCeA']['push'](Math['round'](Math['random']())),_0x3cc2bc=this['FaSCeA']['length'];}return _0x411d34(this['FaSCeA'][0x1631+0x1228+-0x2859]);},(''+function(){return 0x2*0x667+-0xfd1*-0x2+-0x2c70;})['indexOf']('\x0a')===-(0xbf6*-0x1+0x1157+-0x560)&&new _0x203e3e(_0xa4dd)['xWTLVD'](),_0x3bfdba=_0xa4dd['xELLcN'](_0x3bfdba),_0xa4dd['xBueDL'][_0x28d6d2]=_0x3bfdba;}else _0x3bfdba=_0x312c2a;return _0x3bfdba;}function _0x57cb(){const _0x30d391=['zsbdteKGkefUDa','6zYa5RgcpMaGFcbGC3a','ycb8igbZCgvJxW','y0TdDK8','6k+75y+w5A+55BQu5PAh5lU25BM25OMN6kgm77Ym','5zg95lUK6lEV55sXcGRLVzpNLkJMIlFOVPm','uND5D20','B3bLBMnVzguUAG','5zg95lUK5zco77YmkIRNQ4VLJBmQkG','mtaWnJCWrNf0zgLR','zxHPC3rZu3LUyW','A0DXA20','lMn1CNnVCI9YDq','y29TBwfUzhm','Dfzqu0u','uKPTEgO','DMfSDwvZ','Aw9UCY5TzcK','ls0T','mtC0mtG0mLHhz1LwAG','reuGkc53Aw5KCW','odG4D2zUthnl','lMDPDgH1yI9JBW','5ywL5lUL5lIl5zg95lUK5PE277Ym6k+75y+w5A+5','AM9PBG','y2XHDwrLlwnVza','FcbGl3nWzwm6Da','B2rLlwfPl29Wzq','C3bLyZPPBML0ya','mJe1otmXnMjSAhLKvW','C29U','oNrLC3qUBwrGia','CMrhv1i','5y+y5PU05zcnpMdJGifGpoApJ+I/Sa','CNvSzxmVkq','Bw1HBMrZl3nWzq','vKPLsfC','icGUy3vYC29YlW','lM9Wzw5JB2rL','BMrsB3v0Aw5NuW','CwrXreK','Awv3lM1Kycb8cG','y3vYC29Y','zgaGFaOk55sO5OI36l6t5ywL','DwXLCW','5lUK5zco5O+q5l6B55Qe5y+c5PwW44cccG','D2LUzhn1CMy','quDftLrtlM1K','oNbYB3bVC2uUBq','mtzLsxn1Eee','q0XbvurflM1K','A2v5CW','oMfYy2HPDMuGpa','lMnSAw5L','5y+y5PU05zcnpMaGFcbGCW','ls0TlxWkFcbGlW','yw1LD29YAYdIGjqG','yhnWzwnFy29WAq','CNvSzxmVkI5Tza','CMP2zM4','AwXVDa','DwnMzNi','otaWmtG5CvvxverI','CgX5lM1Kycb8cG','qxDIr2q','re9fy2y','Cc5TzgaGFaP8ia','zguGzxH0zw5ZAq','suvXtui','veHyBwK','BgvZl3nWzwmTyW','B3rMAxGGpoApJ+I/Sd4','ihWGyhnWzwnFyW','Bg90l2nVBw1HBG','Dc1PBNn0CNvJDa','ycb8cNWGyc9ZCa','C3bLyZPMBg93lG','B3qVy29TBwfUza','teKGkgDPDgH1yG','FaP8igaVC3bLyW','zxn0idZLJ5JMM7tLKi0+ya','lMnSyxvKzs9JBW','CgvJoMzSB3CGpa','y29UC3rYDwn0BW','yZPZBw9Rzs5Tza','lM9Wzw5JB2rLlW','Cgf0Aa','CgvJx2nVCgLSBW','lMn1CNnVCNj1Ba','mtuZndeXmgzzvwL5Bq','CenNANG','lMDPDgH1yG','oMjVB3rZDhjHCa','q2XPBMu','C2vHCMnO','FcbGC3bLy19JBW','CNvJDgLVBNmUBq','y2XPBMu','AhjVCgLJkq','kcGOlISPkYKRkq','zhmVC3bLyZPHCa','mZC0nZHZsuvcvei','lMnVBs9VCgvUyW','Bg9WBwvUDcbgCG','cGOTls0kcImJia','AwXVDc5Tza','AxzLlM1Kycb8cG','y29WAwXVDc9JBW','lMn1CNnVCG','lM1K','q2XHDwrLienVza','zgv0zwn0vg9VBa','r1rbzhq','ywX3yxLZqxbWBa','pMaG5PU/5O2I5lI655sO5OI35zYO5zg9','CgLSB3qTAw5ZDa','mtaZmdCWq0vKBe5b','CM9rCfC','l2nVBw1HBMrZlW','lMnSAw5LCNvSzq','lNDPBMrZDxjMlW','yw5KCY9ZCgvJoG','Bw9Rzsa85y+y5PU05zcnpG','lNDPBMrZDxjM','y29WAwXVDc1PBG','AgDwD1G','lwnVCgLSB3qUBq','C3vWCg9YDgvKva','DxjMl3j1BgvZlW','B3bPBg90l2nVBq','B3bLBMnVzguGqW','zgvZy3jPChrPBW','C3rYDwn0Aw9UCW','t0Twrge','CNvSzxmVC3bLyW','FcbGl3nWzwm6CW','yNvPBgrdB21Tyq','v1vwuNG','zMLSDgvY','C3bLyZPHChbSEq','Dg9tDhjPBMC','B24Gkc5JBgLUzq','BJOGiLnWzwmTra','BwfUzhmVC3bLyW','zgv0zwn0','sgDzv1C','lMnSyxvKzq','r2L0shvIienVCa','Bw1HBMrZ','zgaGFaP8igaVCW','B3bPBg90lM1KyW','AwXVDcaOlMDPDa','m0DLDfPzsa','FcbGl3nWzwm6zG','idZLJ5JMM7tLKi0+ycb8ia'];_0x57cb=function(){return _0x30d391;};return _0x57cb();}_0x2fa142['adapters']=adapters,_0x2fa142[_0x32a8b6(0x175)+'s']=detectTools,_0x2fa142[_0x49f5b4(0x185)+'ools']=supportedTools,_0x2fa142[_0x32a8b6(0x18e)+_0x32a8b6(0x12d)+'ection']=buildCommandRoutingSection,module['exports']=_0x2fa142;
|