mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-05 02:30:26 +08:00
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>
This commit is contained in:
28
github-workflow/commands/gh-create-issue.md
Normal file
28
github-workflow/commands/gh-create-issue.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
description: Create structured GitHub issue through multi-round dialogue
|
||||
argument-hint: Brief description (e.g., "user auth feature")
|
||||
---
|
||||
|
||||
You are the `/gh-create-issue` workflow orchestrator. Drive a minimal, deterministic flow to turn a short request into a fully formed GitHub issue, avoiding fluff and unnecessary branching.
|
||||
|
||||
## Phase 1: Initial Understanding
|
||||
- Use `AskUserQuestion` for 2-3 targeted prompts covering: Why (problem/impact), Who (audience/owner), What (expected outcome/scope).
|
||||
- Keep questions crisp; stop once answers are specific enough to draft an issue.
|
||||
|
||||
## Phase 2: Technical Scoping
|
||||
- From responses, extract and confirm: acceptance criteria (testable), technical constraints (stack, perf, security), dependencies (teams/services), priority/urgency.
|
||||
- If gaps remain, one more `AskUserQuestion` round is allowed; otherwise proceed.
|
||||
|
||||
## Phase 3: Issue Generation
|
||||
- Assemble a structured draft:
|
||||
- **Title**: `[Type]` + brief description.
|
||||
- **Problem Statement**: why it matters and who is impacted.
|
||||
- **Proposed Solution**: high-level approach only.
|
||||
- **Acceptance Criteria**: checkbox list.
|
||||
- **Technical Notes**: constraints, dependencies, risks.
|
||||
- **Labels Suggestion**: short list inferred from scope.
|
||||
|
||||
## Phase 4: Confirmation & Creation
|
||||
- Show the full preview to the user for confirmation.
|
||||
- On approval, run: `gh issue create --title "<Title>" --body "<Markdown body>"`.
|
||||
- Return the created issue URL; if command fails, surface stderr succinctly and stop.
|
||||
28
github-workflow/commands/gh-implement.md
Normal file
28
github-workflow/commands/gh-implement.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
description: Implement GitHub issue with full development lifecycle
|
||||
argument-hint: Issue number (e.g., "123")
|
||||
---
|
||||
|
||||
You are the `/gh-implement` workflow orchestrator. Drive the issue-to-PR loop with minimal ceremony and zero fluff.
|
||||
|
||||
## Phase 1: Issue Analysis
|
||||
- Run `gh issue view $ARGUMENTS --json title,body,labels,comments`.
|
||||
- Parse requirements and acceptance criteria; derive a concise task list.
|
||||
- Identify affected files via codebase exploration; prefer existing patterns.
|
||||
|
||||
## Phase 2: Clarification (if needed)
|
||||
- Use `AskUserQuestion` to resolve ambiguity on approach, scope boundaries, and testing.
|
||||
- Offer lean implementation options when trade-offs exist; confirm before coding.
|
||||
|
||||
## Phase 3: Development
|
||||
- Invoke `codeagent` skill via codeagent-wrapper with parsed requirements:
|
||||
`codeagent-wrapper --backend codex`
|
||||
- For narrow scope, use direct codeagent-wrapper call; for complex features, use `/dev` workflow.
|
||||
- Enforce task breakdown, focused execution, and coverage validation ≥90%.
|
||||
|
||||
## Phase 4: Progress Updates
|
||||
- After each milestone, post: `gh issue comment $ARGUMENTS --body "✅ Completed: [milestone]"`.
|
||||
|
||||
## Phase 5: PR Creation
|
||||
- Create PR: `gh pr create --title "[#$ARGUMENTS] ..." --body "Closes #$ARGUMENTS"`.
|
||||
- Return the PR URL; surface errors succinctly and stop on failure.
|
||||
Reference in New Issue
Block a user