Skip to content

feat: 添加 iFlow CLI 全面支持#146

Open
shenshuoyaoyouguang wants to merge 2 commits intonextlevelbuilder:mainfrom
shenshuoyaoyouguang:main
Open

feat: 添加 iFlow CLI 全面支持#146
shenshuoyaoyouguang wants to merge 2 commits intonextlevelbuilder:mainfrom
shenshuoyaoyouguang:main

Conversation

@shenshuoyaoyouguang
Copy link
Copy Markdown

  • 添加 iFlow 平台配置文件
  • 更新类型定义、模板映射和检测逻辑
  • 创建 Sub Command 文件提供快捷访问
  • 更新 README.md 和创建 IFLOW_INSTALL.md
  • 支持技能模式自动激活和 Sub Command 快捷访问

测试验证:

  • CLI 构建成功
  • 安装测试通过
  • 文件内容验证通过

- 添加 iFlow 平台配置文件
- 更新类型定义、模板映射和检测逻辑
- 创建 Sub Command 文件提供快捷访问
- 更新 README.md 和创建 IFLOW_INSTALL.md
- 支持技能模式自动激活和 Sub Command 快捷访问

测试验证:
- CLI 构建成功
- 安装测试通过
- 文件内容验证通过
@mrgoonie
Copy link
Copy Markdown
Contributor

@claude review

@claude
Copy link
Copy Markdown

claude bot commented Mar 24, 2026

Claude finished @mrgoonie's task in 2m 43s —— View job


PR Review: feat: 添加 iFlow CLI 全面支持

Tasks:

  • Gather context and understand request
  • Read changed files
  • Analyze for bugs, security, and best practices
  • Post review feedback

Summary

This PR adds iFlow platform support to the uipro-cli installer. The overall structure follows established patterns, but there are several issues that need to be addressed before merging.


Issues Found

🔴 Critical

1. iflow.json is only 1 line (+1/-0)

Both cli/assets/templates/platforms/iflow.json and src/ui-ux-pro-max/templates/platforms/iflow.json are listed as +1/-0. Every other platform config is 21–22 lines. A valid PlatformConfig requires these fields: platform, displayName, installType, folderStructure (3 sub-fields), scriptPath, frontmatter, sections, title, description, skillOrWorkflow. A single-line JSON file almost certainly means the content is incomplete or a stub. If the JSON is malformed or missing required fields, loadPlatformConfig() in template.ts will fail at runtime, crashing the install for any user selecting iFlow. Fix this →

2. AI_FOLDERS likely missing iflow entry

cli/src/types/index.ts defines AI_FOLDERS as Record<Exclude<AIType, 'all'>, string[]> (line 47). Adding 'iflow' to the AIType union requires a corresponding entry in AI_FOLDERS, or TypeScript will throw a compile error. The PR changes to this file are +3/-2 — enough to add iflow to the union type and AI_TYPES array, but not enough to also add an entry to AI_FOLDERS (which spans lines 47–63). This would break the build. Fix this →


🟡 Moderate

3. commands/ui-ux-pro-max.md has no install logic

cli/assets/templates/commands/ui-ux-pro-max.md is a new 80-line file in a new commands/ directory. However, neither cli/src/utils/template.ts nor cli/src/commands/init.ts contain any logic to read from or install files from a commands/ directory. Unless the +38/-3 changes to template.ts add this logic, this file is a dead asset — it gets bundled into the CLI but never installed. Please clarify or add the corresponding install logic.

4. Unknown iFlow config directory

detect.ts needs to check for iFlow's actual config folder (e.g., .iflow). The PR doesn't document what folder iFlow uses. If the detection checks the wrong folder name, iflow will never be auto-suggested during install. Please document the iFlow config directory in the PR description or IFLOW_INSTALL.md.

5. getAITypeDescription missing iflow case

The switch statement in detect.ts:getAITypeDescription() needs a case 'iflow': entry. With TypeScript's exhaustive checks, an unhandled case on a union type will produce a compile warning or error depending on tsconfig settings. Fix this →


🟢 Minor

6. bun.lock +1 line — undocumented dependency

A new dependency was added (lockfile changed). The PR description doesn't mention which package was added or why it's needed for iFlow support. Please clarify.

7. IFLOW_INSTALL.md placed at repo root

All other platform-specific docs live in the existing docs structure or README. Adding IFLOW_INSTALL.md at the root creates an inconsistency — there's no CURSOR_INSTALL.md, WINDSURF_INSTALL.md, etc. Consider consolidating into README.md or a docs/ directory.


What's Done Well

  • Follows the correct sync pattern (src/cli/assets/) per CLAUDE.md rules
  • Adding iflow to both AIType union and AI_TYPES array follows the established pattern
  • AI_TO_PLATFORM mapping in template.ts correctly maps the new type to the config file name

Checklist Before Merging

  • Verify iflow.json contains all required PlatformConfig fields
  • Add iflow entry to AI_FOLDERS in types/index.ts
  • Add case 'iflow': to getAITypeDescription switch
  • Add or confirm install logic for commands/ directory in template.ts
  • Document what .iflow (or equivalent) folder iFlow uses
  • Explain the bun.lock dependency change

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