Commit Graph

17 Commits

Author SHA1 Message Date
林凯90331
f7a405f703 fix(utils): replace using syntax with withDisposable for node v20 compatibility
Node.js v20 does not support the  syntax. Replace all  patterns with a new  helper that wraps the operation in try/finally and explicitly calls Symbol.dispose.

Also rename listBuiltinSkillNames to listBuiltinSkills in generate-review-builtin.ts.

Signed-off-by: 林凯90331 <90331@sangfor.com>

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-14 20:48:37 +08:00
kingboung
6ea0297ecb chore: switch review skill download branch to main
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 20:51:25 +08:00
kingboung
dbaf0374fc fix: clean target directory before extracting review skills
Regenerate builtin.ts template to rm stale files from previous
version/locale before writing new ones, preventing file residue
when switching languages or upgrading skill versions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:42:27 +08:00
kingboung
33bdcb9b74 fix: restore verified commit 89c9e87c files after main merge
Restore files to match the verified commit state:
- generate-review-builtin.ts: skill-only generation, SSH clone, optimize/agent-prompts branch
- extension.ts: listBuiltinSkillNames, getClaudeConfigHomeDir approach
- lang.ts: re-extract review skills on language switch
- locales: use Skill tool prompt format

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:41:21 +08:00
kingboung
4c56bbe268 fix: remove agent-based review code reintroduced from main merge
Revert PR #43 agent-based code that was brought in during the main merge:
- Remove generateBuiltinAgents and all agent-related logic from generate script
- Delete src/costrict/review/agent/ directory
- Delete src/commands/security-review.ts (handled by bundled skill)
- Restore PR #64 extension.ts with getClaudeConfigHomeDir approach
- Remove REVIEW_AGENTS from builtInAgents.ts
- Keep review command (needed for MCP entry), but use CommandLocale instead of agent

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:32:07 +08:00
kingboung
a645f34ee5 fix: resolve merge conflicts with main, keep branch review architecture
- Remove duplicate extractBundledSkill from generated builtin.ts template
- Keep extract-to-disk extension.ts (branch version)
- Keep SSH clone URL for generate-review-builtin
- Revert .gitignore, package.json, locales to branch versions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:16:17 +08:00
kingboung
8599340c68 Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents
Conflicts resolved in favor of our branch for review-related files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 15:08:13 +08:00
kingboung
89c9e87c58 chore: switch review skill download branch to optimize/agent-prompts
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:57:04 +08:00
kingboung
3780b517c5 chore: switch review skill download branch to main
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:44:55 +08:00
y574444354
7b2b5871ed fix: 使用 HTTPS + gh token 替代 SSH 克隆 review 仓库
将 generate-review-builtin.ts 的 CLONE_URL 从 SSH (git@github.com:)
改为 HTTPS,并通过 gh auth token 或环境变量获取认证令牌,
解决 SSH key 未配置时无法克隆私有仓库的问题。
2026-05-12 12:23:50 +08:00
y574444354
4fce66348c Revert "Merge pull request #60 from y574444354/feat/migrate-review-agents"
This reverts commit 62398b2dcc, reversing
changes made to ba39b17a7e.
2026-05-12 12:11:37 +08:00
kingboung
c3e19d7d2a refactor: migrate review skills from registerBundledSkill to extract-to-disk
Replace registerBundledSkill() with runtime extract-to-disk + standard
skill scanner discovery, aligning with upstream opencode PR #360 approach.

- Add extractBundledSkill() to generate script output
- Create extension.ts for runtime skill extraction to ~/.claude/skills/
- Remove reviewSkills.ts (registerBundledSkill registration)
- Update bundled/index.ts to call Extension.initializeBuiltinSkills()
- Add build:builtin-review script to package.json

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 11:49:38 +08:00
kingboung
62efcef508 refactor: consolidate review skill registration and fix command conflicts
- Merge strict:review/strict:security-review into reviewSkills.ts (single
  file registers all four commands: /review, /security-review,
  /strict:review, /strict:security-review)
- Remove conflicting prompt commands from src/commands/ (review.ts,
  security-review.ts) so bundled skills take precedence
- Remove REVIEW_AGENTS import from builtInAgents.ts and mcp.ts
- Remove agent generation logic from generate-review-builtin.ts
- Configure allowedTools and model: 'inherit' per claudecode spec
- Switch test branch to optimize/agent-prompts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 20:52:18 +08:00
kingboung
a5235ab03c Merge remote-tracking branch 'origin/main' into feat/migrate-review-agents 2026-05-11 20:21:16 +08:00
kingboung
e3ba147dbe refactor: migrate review system to bundled skill files mechanism
Replace custom extension.ts initialization and agent-based routing with
csc's built-in registerBundledSkill({ files }) mechanism. Review and
security-review skills are now registered with embedded files that
get lazily extracted to disk on first invocation. Locale is resolved
at startup via getResolvedLanguage().

- Remove agent generation from generate-review-builtin.ts (skill-only)
- Remove extension.ts, REVIEW_AGENTS registration, strict:* skills
- Add reviewSkills.ts with registerReviewSkills() for unified registration
- Adapt to new costrict-review index.json format (skills-only, new paths)
- Remove src/costrict/command/locales/ (no longer needed)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 20:19:05 +08:00
林凯90331
2fa9f1616f fix: code-review compile issue 2026-05-09 17:32:33 +08:00
kingboung
abf67ea914 feat: add generate-review-builtin script for unified review resource generation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 09:36:47 +08:00