Skip to content

feat: propagate workflow output language#53

Open
ddddddddwp wants to merge 2 commits into
rpamis:masterfrom
ddddddddwp:feat/follow-user-language
Open

feat: propagate workflow output language#53
ddddddddwp wants to merge 2 commits into
rpamis:masterfrom
ddddddddwp:feat/follow-user-language

Conversation

@ddddddddwp
Copy link
Copy Markdown

Summary

Test Plan

  • npx vitest run test/ts/skills.test.ts
  • git diff --check origin/master..HEAD

Notes

  • Full npx vitest run currently fails in test/ts/init-e2e.test.ts because the clean-directory init fixture cannot find .claude/skills in the temporary Lingma Superpowers staging directory, which also leaves .codex/skills/comet/SKILL.md absent.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces output language constraints across various Comet workflows and skills (both English and Chinese versions) to ensure that generated artifacts, proposals, plans, and reports respect the language of the triggering user request. It also adds corresponding test coverage to safeguard these language rules. A review comment suggests optimizing the test file by reading the skill markdown files concurrently using Promise.all instead of sequentially.

Comment thread test/ts/skills.test.ts Outdated
Comment on lines +355 to +418
const zhComet = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet', 'SKILL.md'),
'utf-8',
);
const zhOpen = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-open', 'SKILL.md'),
'utf-8',
);
const zhDesign = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-design', 'SKILL.md'),
'utf-8',
);
const zhBuild = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-build', 'SKILL.md'),
'utf-8',
);
const zhVerify = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-verify', 'SKILL.md'),
'utf-8',
);
const zhArchive = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-archive', 'SKILL.md'),
'utf-8',
);
const zhHotfix = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-hotfix', 'SKILL.md'),
'utf-8',
);
const zhTweak = await fs.readFile(
path.resolve('assets', 'skills-zh', 'comet-tweak', 'SKILL.md'),
'utf-8',
);
const enComet = await fs.readFile(
path.resolve('assets', 'skills', 'comet', 'SKILL.md'),
'utf-8',
);
const enOpen = await fs.readFile(
path.resolve('assets', 'skills', 'comet-open', 'SKILL.md'),
'utf-8',
);
const enDesign = await fs.readFile(
path.resolve('assets', 'skills', 'comet-design', 'SKILL.md'),
'utf-8',
);
const enBuild = await fs.readFile(
path.resolve('assets', 'skills', 'comet-build', 'SKILL.md'),
'utf-8',
);
const enVerify = await fs.readFile(
path.resolve('assets', 'skills', 'comet-verify', 'SKILL.md'),
'utf-8',
);
const enArchive = await fs.readFile(
path.resolve('assets', 'skills', 'comet-archive', 'SKILL.md'),
'utf-8',
);
const enHotfix = await fs.readFile(
path.resolve('assets', 'skills', 'comet-hotfix', 'SKILL.md'),
'utf-8',
);
const enTweak = await fs.readFile(
path.resolve('assets', 'skills', 'comet-tweak', 'SKILL.md'),
'utf-8',
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Reading 16 files sequentially using await fs.readFile blocks the event loop and can slow down test execution, especially in CI environments with slower disk I/O. We can optimize this by reading all files concurrently using Promise.all.

      const [
        zhComet,
        zhOpen,
        zhDesign,
        zhBuild,
        zhVerify,
        zhArchive,
        zhHotfix,
        zhTweak,
        enComet,
        enOpen,
        enDesign,
        enBuild,
        enVerify,
        enArchive,
        enHotfix,
        enTweak,
      ] = await Promise.all([
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-open', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-design', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-build', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-verify', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-archive', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-hotfix', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills-zh', 'comet-tweak', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-open', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-design', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-build', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-verify', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-archive', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-hotfix', 'SKILL.md'), 'utf-8'),
        fs.readFile(path.resolve('assets', 'skills', 'comet-tweak', 'SKILL.md'), 'utf-8'),
      ]);

@ddddddddwp ddddddddwp marked this pull request as ready for review May 29, 2026 17:15
@benym
Copy link
Copy Markdown
Contributor

benym commented May 30, 2026

Please fix the issues in the Gemini review first.

@ddddddddwp
Copy link
Copy Markdown
Author

已经解决Gemini评论中的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants