Commit Graph

4 Commits

Author SHA1 Message Date
ben
1f42bcc1c6 fix: comprehensive security and quality improvements for PR #85 & #87 (#90)
Co-authored-by: tytsxai <tytsxai@users.noreply.github.com>
2025-12-21 18:01:20 +08:00
cexll
f6bb97eba9 update codeagent skill backend select 2025-12-16 13:02:40 +08:00
swe-agent[bot]
e1ad08fcc1 feat(codeagent-wrapper): 完整多后端支持与安全优化
修复 PR #53 中发现的问题,实现完整的多后端功能:

**多后端功能完整性**
- Claude/Gemini 后端支持 workdir (-C) 和 resume (--session-id) 参数
- 并行模式支持全局 --backend 参数和任务级 backend 配置
- 后端参数映射统一,支持 new/resume 两种模式

**安全控制**
- Claude 后端默认启用 --dangerously-skip-permissions 以支持自动化
- 通过 CODEAGENT_SKIP_PERMISSIONS 环境变量控制权限检查
- 不同后端行为区分:Claude 默认跳过,Codex/Gemini 默认启用

**并发控制**
- 新增 CODEAGENT_MAX_PARALLEL_WORKERS 环境变量限制并发数
- 实现 fail-fast context 取消机制
- Worker pool 防止资源耗尽,支持并发监控日志

**向后兼容**
- 版本号统一管理,提供 codex-wrapper 兼容脚本
- 所有默认行为保持不变
- 支持渐进式迁移

**测试覆盖**
- 总体覆盖率 93.4%(超过 90% 要求)
- 新增后端参数、并行模式、并发控制测试用例
- 核心模块覆盖率:backend.go 100%, config.go 97.8%, executor.go 96.4%

**文档更新**
- 更新 skills/codeagent/SKILL.md 反映多后端和安全控制
- 添加 CHANGELOG.md 记录重要变更
- 更新 README 版本说明和安装脚本

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 16:09:33 +08:00
swe-agent[bot]
3ef288bfaa feat: implement enterprise workflow with multi-backend support
## Overview
Complete implementation of enterprise-level workflow features including
multi-backend execution (Codex/Claude/Gemini), GitHub issue-to-PR automation,
hooks system, and comprehensive documentation.

## Major Changes

### 1. Multi-Backend Support (codeagent-wrapper)
- Renamed codex-wrapper → codeagent-wrapper
- Backend interface with Codex/Claude/Gemini implementations
- Multi-format JSON stream parser (auto-detects backend)
- CLI flag: --backend codex|claude|gemini (default: codex)
- Test coverage: 89.2%

**Files:**
- codeagent-wrapper/backend.go - Backend interface
- codeagent-wrapper/parser.go - Multi-format parser
- codeagent-wrapper/config.go - CLI parsing with backend selection
- codeagent-wrapper/executor.go - Process execution
- codeagent-wrapper/logger.go - Async logging
- codeagent-wrapper/utils.go - Utilities

### 2. GitHub Workflow Commands
- /gh-create-issue - Create structured issues via guided dialogue
- /gh-implement - Issue-to-PR automation with full dev lifecycle

**Files:**
- github-workflow/commands/gh-create-issue.md
- github-workflow/commands/gh-implement.md
- skills/codeagent/SKILL.md

### 3. Hooks System
- UserPromptSubmit hook for skill activation
- Pre-commit example with code quality checks
- merge_json operation in install.py for settings.json merging

**Files:**
- hooks/skill-activation-prompt.sh|.js
- hooks/pre-commit.sh
- hooks/hooks-config.json
- hooks/test-skill-activation.sh

### 4. Skills System
- skill-rules.json for auto-activation
- codeagent skill for multi-backend wrapper

**Files:**
- skills/skill-rules.json
- skills/codeagent/SKILL.md
- skills/codex/SKILL.md (updated)

### 5. Installation System
- install.py: Added merge_json operation
- config.json: Added "gh" module
- config.schema.json: Added op_merge_json schema

### 6. CI/CD
- GitHub Actions workflow for testing and building

**Files:**
- .github/workflows/ci.yml

### 7. Comprehensive Documentation
- Architecture overview with ASCII diagrams
- Codeagent-wrapper complete usage guide
- GitHub workflow detailed examples
- Hooks customization guide

**Files:**
- docs/architecture.md (21KB)
- docs/CODEAGENT-WRAPPER.md (9KB)
- docs/GITHUB-WORKFLOW.md (9KB)
- docs/HOOKS.md (4KB)
- docs/enterprise-workflow-ideas.md
- README.md (updated with doc links)

## Test Results
- All tests passing 
- Coverage: 89.2%
- Security scan: 0 issues (gosec)

## Breaking Changes
- codex-wrapper renamed to codeagent-wrapper
- Default backend: codex (documented in README)

## Migration Guide
Users with codex-wrapper installed should:
1. Run: python3 install.py --module dev --force
2. Update shell aliases if any

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 15:53:31 +08:00