test(workflow-assets): 整合流程正本與委派規則

以能力描述補齊可委派步驟,讓流程正本、委派規則、AGENTS、README 與 ADR 保持同一份繁體中文與 UTF-8 契約。
This commit is contained in:
2026-09-22 15:31:36 +08:00
parent c56f3271b5
commit 43e91ceb70
5 changed files with 119 additions and 4 deletions
+21
View File
@@ -176,6 +176,27 @@ test('支援 command 的四個平台產生 command 轉接檔,另外三個產
assert.deepEqual(filesUnder(join(home, 'work', '.github')), ['skills/sdlc-plan/SKILL.md']);
});
test('七個平台的轉接檔都保留繁體中文且沒有 UTF-8 亂碼', async (t) => {
const plugin = makeFakePlugin(t, { prompts: { 'sdlc-plan': fakePrompt('sdlc-plan') } });
const home = makeHome(t, ['claude', 'codex', 'opencode', 'oh-my-pi', 'antigravity', 'kiro', 'copilot']);
await inHome(plugin, home)(['install']);
const files = [
join(home, '.claude', 'commands', 'sdlc-plan.md'),
join(home, '.codex', 'prompts', 'sdlc-plan.md'),
join(home, '.config', 'opencode', 'command', 'sdlc-plan.md'),
join(home, '.omp', 'agent', 'commands', 'sdlc-plan.md'),
join(home, '.gemini', 'skills', 'sdlc-plan', 'SKILL.md'),
join(home, '.kiro', 'skills', 'sdlc-plan', 'SKILL.md'),
join(home, 'work', '.github', 'skills', 'sdlc-plan', 'SKILL.md'),
];
for (const path of files) {
const text = new TextDecoder('utf-8', { fatal: true }).decode(readFileSync(path));
assert.match(text, /僅由 \/sdlc-plan 指令叫用。/);
}
});
test('轉接檔內容是一句指向 tea-sdlc 的話,不含任何檔案路徑', async (t) => {
const plugin = makeFakePlugin(t, { prompts: PROMPTS, version: '1.2.3' });
const home = makeHome(t, ['claude']);