Files
Claude-Code-Workflow/.claude/workflows/cli-templates/prompts/workflow/task-json-cli-mode.txt
catlog22 83664cb777 feat: migrate to Gemini CLI v0.11.0-nightly with native prompt support
## Major Changes

### Gemini CLI Integration (google-gemini/gemini-cli#11228)
- Migrate from wrapper scripts to native Gemini CLI v0.11.0-nightly
- Remove `-p` flag requirement for prompt strings
- Deprecate `gemini-wrapper` and `qwen-wrapper` scripts
- Update all commands and workflows to use direct CLI syntax

### Command Syntax Updates
- **Before**: `gemini -p "CONTEXT: @**/* prompt"`
- **After**: `gemini "CONTEXT: @**/* prompt"`
- Apply to all 70+ command files and workflow templates
- Maintain backward compatibility for Qwen fallback

### File Pattern Migration
- Replace `@{CLAUDE.md}` with `@CLAUDE.md`
- Replace `@{**/*}` with `@**/*`
- Update all file references to use direct @ notation
- Remove legacy brace syntax across all documentation

### Documentation Improvements
- Reorganize `intelligent-tools-strategy.md` structure
- Add Quick Start section with decision matrix
- Enhance `--include-directories` best practices
- Add comprehensive command templates and examples
- Improve navigation with clearer section hierarchy

### Files Modified (75+ files)
- Commands: All CLI commands updated (cli/, workflow/, task/, memory/)
- Workflows: Core strategy files and templates
- Agents: CLI execution agent and doc generator
- Templates: Planning roles and tech stack guides

## Breaking Changes
- Gemini CLI v0.11.0-nightly or later required
- Old wrapper scripts no longer supported
- Legacy `@{pattern}` syntax deprecated

## Migration Guide
Users should:
1. Update Gemini CLI to v0.11.0-nightly or later
2. Remove `-p` flag from existing commands
3. Update file patterns from `@{pattern}` to `@pattern`

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 14:46:16 +08:00

179 lines
6.7 KiB
Plaintext

Task JSON Schema - CLI Execute Mode (With Command Field)
## Schema Structure
```json
{
"id": "IMPL-N[.M]",
"title": "Descriptive task name",
"status": "pending",
"meta": {
"type": "feature|bugfix|refactor|test|docs",
"agent": "@code-developer|@test-fix-agent|@general-purpose"
},
"context": {
"requirements": ["extracted from analysis"],
"focus_paths": ["src/paths"],
"acceptance": ["measurable criteria"],
"depends_on": ["IMPL-N"],
"artifacts": [
{
"type": "synthesis_specification",
"path": "{synthesis_spec_path}",
"priority": "highest",
"usage": "Primary requirement source - use for consolidated requirements and cross-role alignment"
},
{
"type": "role_analysis",
"path": "{role_analysis_path}",
"priority": "high",
"usage": "Technical/design/business details from specific roles"
}
]
},
"flow_control": {
"pre_analysis": [
{
"step": "load_synthesis_specification",
"action": "Load consolidated synthesis specification",
"commands": [
"Read({synthesis_spec_path})"
],
"output_to": "synthesis_specification",
"on_error": "fail"
},
{
"step": "load_context_package",
"action": "Load context package",
"commands": [
"Read({context_package_path})"
],
"output_to": "context_pkg",
"on_error": "fail"
},
{
"step": "mcp_codebase_exploration",
"action": "Explore codebase using MCP",
"command": "mcp__code-index__find_files(pattern=\"{file_pattern}\")",
"output_to": "codebase_structure",
"on_error": "skip_optional"
}
],
"implementation_approach": [
{
"step": 1,
"title": "Implement task with Codex",
"description": "Implement '{title}' using Codex CLI tool",
"command": "bash(codex -C {focus_path} --full-auto exec \"PURPOSE: {purpose} TASK: {task_description} MODE: auto CONTEXT: @{{synthesis_spec_path}} @{{context_package_path}} EXPECTED: {expected_output} RULES: Follow synthesis specification\" --skip-git-repo-check -s danger-full-access)",
"modification_points": [
"Create/modify implementation files",
"Follow synthesis specification requirements",
"Integrate with existing patterns"
],
"logic_flow": [
"Codex loads context package and synthesis",
"Codex implements according to specification",
"Codex validates against acceptance criteria"
],
"depends_on": [],
"output": "implementation"
}
],
"target_files": ["file:function:lines", "path/to/NewFile.ts"]
}
}
```
## Multi-Step Example (Complex Task with Resume)
```json
{
"id": "IMPL-002",
"title": "Implement RBAC system",
"flow_control": {
"implementation_approach": [
{
"step": 1,
"title": "Create RBAC models",
"description": "Create role and permission data models",
"command": "bash(codex -C src/models --full-auto exec \"PURPOSE: Create RBAC models TASK: Define role and permission models MODE: auto CONTEXT: @{{synthesis_spec_path}} @{{context_package_path}} EXPECTED: Models with migrations RULES: Follow synthesis spec\" --skip-git-repo-check -s danger-full-access)",
"modification_points": ["Define role model", "Define permission model"],
"logic_flow": ["Design schema", "Implement models", "Generate migrations"],
"depends_on": [],
"output": "rbac_models"
},
{
"step": 2,
"title": "Implement RBAC middleware",
"description": "Create route protection middleware",
"command": "bash(codex --full-auto exec \"PURPOSE: Create RBAC middleware TASK: Route protection middleware MODE: auto CONTEXT: RBAC models from step 1 EXPECTED: Middleware for route protection RULES: Use session patterns\" resume --last --skip-git-repo-check -s danger-full-access)",
"modification_points": ["Create permission checker", "Add route decorators"],
"logic_flow": ["Check user role", "Validate permissions", "Allow/deny access"],
"depends_on": [1],
"output": "rbac_middleware"
}
]
}
}
```
## Key Features - CLI Execute Mode
**Execution Model**: Commands in `command` field execute steps directly
**Command Field Required**: Every step in `implementation_approach` MUST include `command` field
**Context Delivery**: Context provided via CONTEXT field in command prompt using `@{path}` syntax
**Multi-Step Support**:
- First step: Full context with `-C directory` and complete CONTEXT field
- Subsequent steps: Use `resume --last` to maintain session continuity
- Step dependencies: Use `depends_on` array to specify step order
## Command Templates
### Single-Step Codex Command
```bash
bash(codex -C {focus_path} --full-auto exec "PURPOSE: {purpose} TASK: {task} MODE: auto CONTEXT: @{{synthesis_spec_path}} @{{context_package_path}} EXPECTED: {expected} RULES: {rules}" --skip-git-repo-check -s danger-full-access)
```
### Multi-Step Codex with Resume
```bash
# First step
bash(codex -C {path} --full-auto exec "..." --skip-git-repo-check -s danger-full-access)
# Subsequent steps
bash(codex --full-auto exec "..." resume --last --skip-git-repo-check -s danger-full-access)
```
### Gemini/Qwen Commands (Analysis/Documentation)
```bash
bash(gemini "PURPOSE: {purpose} TASK: {task} MODE: analysis CONTEXT: @{synthesis_spec_path} EXPECTED: {expected} RULES: {rules}")
# With write permission
bash(gemini --approval-mode yolo "PURPOSE: {purpose} TASK: {task} MODE: write CONTEXT: @{context} EXPECTED: {expected} RULES: {rules}")
```
## Field Descriptions
**implementation_approach**: Array of step objects (WITH command field)
- **step**: Sequential step number
- **title**: Step description
- **description**: Brief step description
- **command**: Complete CLI command to execute the step
- **modification_points**: Specific code modifications (for reference)
- **logic_flow**: Execution sequence (for reference)
- **depends_on**: Step dependencies (array of step numbers, empty for independent)
- **output**: Expected deliverable variable name
## Usage Guidelines
1. **Always Include Command**: Every step MUST have a `command` field
2. **Context via CONTEXT Field**: Provide context using `@{path}` syntax in command prompt
3. **First Step Full Context**: First step should include `-C directory` and full context package
4. **Resume for Continuity**: Use `resume --last` for subsequent steps in same task
5. **Step Dependencies**: Use `depends_on: [1, 2]` to specify execution order
6. **Parameter Position**:
- Codex: `--skip-git-repo-check -s danger-full-access` at END
- Gemini/Qwen: `--approval-mode yolo` BEFORE the prompt