mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
refactor(agents): deduplicate agent invocation prompts and strengthen project artifact consumption
Remove duplicated content from caller prompts that repeat agent spec definitions: - EXECUTION METHOD MAPPING, CLI EXECUTION ID strategies, Quantification Rules - MANDATORY FIRST STEPS (now internalized in cli-explore-agent) - relevant_files schema details, Phase execution flow re-specifications - plan.json/task JSON field listings (reference schemas instead) Strengthen project-tech.json and project-guidelines.json consumption: - context-search-agent: add Phase 1.1b mandatory project context loading - cli-explore-agent: add Autonomous Initialization with 4 self-contained steps - action-planning-agent: strengthen Phase 1 Step 0 with detailed usage guidance - All caller prompts: add/reinforce PROJECT CONTEXT (MANDATORY) sections Agent specs modified: action-planning-agent, cli-explore-agent, context-search-agent Caller prompts slimmed: 04-task-generation, 05-tdd-task-generation, 02-context-gathering, 01-lite-plan, collaborative-plan-with-file, 05-test-cycle-execute
This commit is contained in:
@@ -202,13 +202,8 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
|
||||
- **Task Description**: ${task_description}
|
||||
- **Exploration Index**: ${index + 1} of ${selectedAngles.length}
|
||||
|
||||
## MANDATORY FIRST STEPS (Execute by Agent)
|
||||
**You (cli-explore-agent) MUST execute these steps in order:**
|
||||
1. Run: ccw tool exec get_modules_by_depth '{}' (project structure)
|
||||
2. Run: rg -l "{keyword_from_task}" --type ts (locate relevant files)
|
||||
3. Execute: cat ~/.ccw/workflows/cli-templates/schemas/explore-json-schema.json (get output schema reference)
|
||||
4. Read: .workflow/project-tech.json (technology stack and architecture context)
|
||||
5. Read: .workflow/project-guidelines.json (user-defined constraints and conventions)
|
||||
## Agent Initialization
|
||||
cli-explore-agent autonomously handles: project structure discovery, schema loading, project context loading (project-tech.json, project-guidelines.json), and keyword search. These steps execute automatically.
|
||||
|
||||
## Exploration Strategy (${angle} focus)
|
||||
|
||||
@@ -228,27 +223,16 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
|
||||
|
||||
## Expected Output
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 3, follow schema exactly
|
||||
**Schema Reference**: explore-json-schema.json (auto-loaded by agent during initialization)
|
||||
|
||||
**Required Fields** (all ${angle} focused):
|
||||
- project_structure: Modules/architecture relevant to ${angle}
|
||||
- relevant_files: Files affected from ${angle} perspective
|
||||
**MANDATORY**: Every file MUST use structured object format with ALL required fields:
|
||||
\`[{path: "src/file.ts", relevance: 0.85, rationale: "Contains AuthService.login() - entry point for JWT token generation", role: "modify_target", discovery_source: "bash-scan", key_symbols: ["AuthService", "login"]}]\`
|
||||
- **rationale** (required): Specific selection basis tied to ${angle} topic (>10 chars, not generic)
|
||||
- **role** (required): modify_target|dependency|pattern_reference|test_target|type_definition|integration_point|config|context_only
|
||||
- **discovery_source** (recommended): bash-scan|cli-analysis|ace-search|dependency-trace|manual
|
||||
- **key_symbols** (recommended): Key functions/classes/types in the file relevant to the task
|
||||
- Scores: 0.7+ high priority, 0.5-0.7 medium, <0.5 low
|
||||
- patterns: ${angle}-related patterns to follow
|
||||
- dependencies: Dependencies relevant to ${angle}
|
||||
- integration_points: Where to integrate from ${angle} viewpoint (include file:line locations)
|
||||
- constraints: ${angle}-specific limitations/conventions
|
||||
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
|
||||
- Follow explore-json-schema.json exactly (auto-loaded by agent)
|
||||
- All fields scoped to ${angle} perspective
|
||||
- Ensure rationale is specific and >10 chars (not generic)
|
||||
- Include file:line locations in integration_points
|
||||
- _metadata.exploration_angle: "${angle}"
|
||||
|
||||
## Success Criteria
|
||||
- [ ] Schema obtained via cat explore-json-schema.json
|
||||
- [ ] get_modules_by_depth.sh executed
|
||||
- [ ] At least 3 relevant files identified with specific rationale + role
|
||||
- [ ] Every file has rationale >10 chars (not generic like "Related to ${angle}")
|
||||
@@ -528,9 +512,9 @@ Generate plan.json and .task/*.json following the schema obtained above. Key con
|
||||
- plan.json: Overview with task_ids[] referencing .task/ files (NO tasks[] array)
|
||||
- .task/TASK-*.json: Independent task files following task-schema.json
|
||||
|
||||
plan.json required fields: summary, approach, task_ids, task_count, _metadata (with plan_type: "feature")
|
||||
Each task file required fields: id, title, description, depends_on, convergence (with criteria[])
|
||||
Task fields use: files[].change (not modification_points), convergence.criteria (not acceptance), test (not verification)
|
||||
Follow plan-overview-base-schema.json (loaded via cat command above) for plan.json structure.
|
||||
Follow task-schema.json for .task/TASK-*.json structure.
|
||||
Note: Use files[].change (not modification_points), convergence.criteria (not acceptance).
|
||||
|
||||
## Task Grouping Rules
|
||||
1. **Group by feature**: All changes for one feature = one task (even if 3-5 files)
|
||||
|
||||
Reference in New Issue
Block a user