Commit Graph

779 Commits

Author SHA1 Message Date
catlog22
7b692ce415 refactor: Clarify agent schema reading with explicit cat commands
Replaced ambiguous "Read: schema.json" instructions with explicit
"Execute: cat schema.json" commands to eliminate orchestrator/agent
responsibility confusion. Updated in three key sections:

- MANDATORY FIRST STEPS: Added "Execute by Agent" header with explicit
  cat command for schema retrieval
- Expected Deliverables: Shortened to reference prior schema step
- Success Criteria: Simplified to "Schema obtained via cat"

Files modified:
- lite-plan.md: explore-json-schema.json + plan-json-schema.json
- review-module-cycle.md: dimension results + deep-dive schemas
- review-session-cycle.md: dimension results + deep-dive schemas

Benefits:
- Removes ambiguity about who reads schema (always agent, never orchestrator)
- Uses direct command syntax ("cat") instead of passive language
- Consistent English-only phrasing across all three files
- Three-point reinforcement ensures agents execute schema reading
2025-11-26 16:02:00 +08:00
catlog22
2cf8efec74 refactor: Optimize review cycle dashboard generation and merge JSON state files
Changes:
- Dashboard generation: Split piped command into 4 independent steps (cp + 3x sed -i) for higher success rate
- JSON consolidation: Merge review-metadata.json into review-state.json (2 files instead of 3)
- Enhanced constraints: Add mandatory template usage requirements and post-generation modification prohibitions
- Updated documentation: Sync changes across review-module-cycle and review-session-cycle

Benefits:
- Reduced command execution failures with independent steps
- Simplified state management with unified metadata+state JSON
- Clearer orchestrator/agent boundaries for dashboard interaction
2025-11-26 15:32:56 +08:00
catlog22
34a9a23d5b fix: Add explicit JSON schema requirements to review cycle agent prompts
Move specific JSON structure requirements from cli-explore-agent (keep generic)
to review-*-cycle.md prompts. Key requirements now inline in prompts:
- Root must be array [{}] not object {}
- analysis_timestamp field (not timestamp/analyzed_at)
- Flat summary structure (not nested by_severity)
- Lowercase severity/id values
- Correct field names (snippet not code_snippet, impact not exploit_scenario)
2025-11-26 15:15:30 +08:00
catlog22
cf6a0f1bc0 refactor: Simplify cli-explore-agent with prompt-driven architecture
- Restructure cli-explore-agent.md from 620 to 165 lines
- Replace hardcoded task types with prompt-based extraction
- Add 4-phase workflow: Task Understanding → Analysis → Schema Validation → Output
- Emphasize mandatory schema reading before JSON output
- Remove inline output templates, reference external schema files
- Update code-map-memory.md to use codemap-json-schema.json
2025-11-26 15:07:22 +08:00
catlog22
247db0d041 Refactor lite-execute and lite-plan workflows to support plan.json format, enhance task structure, and improve exploration angle assignment. Update review cycle dashboard with dimension summary table and associated styles. Modify plan JSON schema to include new properties and adjust validation rules. 2025-11-26 11:31:15 +08:00
catlog22
fec5d9a605 refactor: Simplify and standardize TodoWrite structure in review-module-cycle and review-session-cycle documentation for clarity 2025-11-26 10:31:04 +08:00
catlog22
97fea9f19e refactor: Remove resume option from argument hints in review-module-cycle and review-session-cycle documentation for clarity 2025-11-26 10:26:14 +08:00
catlog22
6717e2a59b refactor: Update review-fix command examples and output structure for clarity and consistency 2025-11-26 10:00:18 +08:00
catlog22
84c180ab66 refactor: Simplify and streamline agent documentation and output schemas for clarity and consistency 2025-11-26 09:37:14 +08:00
catlog22
e70f086b7e refactor: Update file paths in documentation to use relative paths for consistency and clarity 2025-11-25 23:48:58 +08:00
catlog22
6359a364cb refactor: Remove outdated examples and related commands from review-module-cycle documentation for clarity 2025-11-25 23:03:27 +08:00
catlog22
8f2126677f refactor: Update review commands to require active sessions and unify output directory structure for improved organization and clarity 2025-11-25 23:02:20 +08:00
catlog22
c3e87db5be refactor: Enhance task objectives and output requirements in review-fix command for improved clarity and structure 2025-11-25 22:23:56 +08:00
catlog22
a6561a7d01 feat: Enhance exploration schema and introduce automated review-fix workflow
- Added new fields to the exploration JSON schema: exploration_angle, exploration_index, and total_explorations for better tracking of exploration parameters.
- Created a comprehensive review-fix command documentation to automate code review findings fixing, detailing the workflow, execution flow, agent roles, and error handling.
- Introduced fix-plan-template.json for structured planning output, including execution strategy, group definitions, and risk assessments.
- Added fix-progress-template.json to track progress for each group during the execution phase, ensuring real-time updates and status management.
2025-11-25 22:01:01 +08:00
catlog22
4bd732c4db refactor: enhance multi-angle exploration context in lite-execute command output 2025-11-25 20:01:43 +08:00
catlog22
152303f1b8 refactor: optimize TodoWrite format with hierarchical display across workflow commands
Adopt consistent hierarchical TodoWrite format for better visual clarity:
- Phase-level tasks: "Phase N: Description"
- Sub-tasks: "  → Sub-task description" (indented with arrow)
- Clear parent-child relationships through visual hierarchy
- Task attachment/collapse pattern visualization

Updated commands:
- lite-plan.md (Phase 1-4 examples)
- auto-parallel.md (Phase 0-3 examples)
- tdd-plan.md (Phase 3-5 examples)
- test-fix-gen.md (TodoWrite Pattern with examples)
- explore-auto.md (TodoWrite Pattern)
- imitate-auto.md (TodoWrite Pattern)
- review-session-cycle.md
- review-module-cycle.md

Benefits:
- Visual hierarchy shows task relationships
- Expanded view shows detailed progress
- Collapsed view maintains clean orchestrator-level summary
- Consistent format across all multi-phase workflows
2025-11-25 19:54:33 +08:00
catlog22
2d66c1b092 refactor: update task descriptions and statuses in workflow plan for clarity 2025-11-25 19:44:24 +08:00
catlog22
93d8e79b71 feat: add comprehensive review-session-cycle command for multi-dimensional code analysis
- Introduced a new command `/workflow:review-session-cycle` for session-based code reviews across 7 dimensions.
- Implemented hybrid parallel-iterative execution to enhance review efficiency and coverage.
- Added detailed documentation outlining command usage, execution flow, and agent roles.
- Configured specialized dimensions with priority-based allocation and defined severity assessment criteria.
- Established a robust aggregation logic for identifying cross-cutting concerns and critical findings.
- Enabled real-time progress tracking through an interactive HTML dashboard.
- Included mechanisms for deep-dive analysis and remediation planning for critical issues.
2025-11-25 17:15:37 +08:00
catlog22
1e69539837 refactor: update documentation for review-cycle and test-cycle-execute workflows 2025-11-25 16:26:45 +08:00
catlog22
cd206f275e Add JSON schemas for deep-dive results and dimension analysis
- Introduced `review-deep-dive-results-schema.json` to define the structure for deep-dive iteration analysis results, including root cause analysis, remediation plans, and impact assessments.
- Added `review-dimension-results-schema.json` to outline the schema for dimension analysis results, capturing findings across various dimensions such as security and architecture, along with cross-references to related findings.
2025-11-25 16:16:11 +08:00
catlog22
d99448ffd5 feat: add syntax check priority in @test-fix-agent prompt
Enhancement:
- Added "CRITICAL: Syntax Check Priority" section in @test-fix-agent template
- Positioned before Session Paths for maximum visibility

Requirements:
- Run syntax checker (TypeScript tsc --noEmit, ESLint, etc.) BEFORE any work
- Verify zero syntax errors before proceeding
- Fix syntax errors immediately if found
- Syntax validation is MANDATORY gate - no exceptions

Scope:
- Applies to all task types (test-gen, test-fix, test-fix-iteration)
- Agent-level enforcement (not in orchestrator flow)

Rationale:
- Syntax errors must be fixed before functional testing
- Prevents cascading failures from basic syntax issues
- Reduces iteration waste on trivial syntax problems
2025-11-25 11:22:11 +08:00
catlog22
217f30044a refactor: remove parallel strategy exploration feature
Removed Features:
- Parallel Strategy Exploration (3. Enhanced Features)
- Exploratory strategy from strategy engine
- Git worktree-based parallel execution
- IMPL-fix-{N}-parallel.json task type

Strategy Engine Changes:
- Removed "Exploratory" strategy (was: stuck tests trigger)
- Updated selection logic: conservative → aggressive → surgical
- Simplified to 3 strategies (was 4)

File Structure Changes:
- Removed IMPL-fix-{N}-parallel.json from session structure
- Removed worktrees from commit content exclusions

Error Handling Changes:
- Updated stuck tests handling: "Continue with alternative strategy, document in failure report"
- No longer switches to exploratory/parallel mode

Commit Strategy Changes:
- Removed "After Parallel Exploration" commit checkpoint
- Renumbered checkpoints: 1. Success, 2. Rollback (was 1,2,3)

Documentation Changes:
- Removed Value Proposition #4 (Stuck Handling via parallel)
- Updated execution flow (removed exploratory alternatives)
- Removed Strategy-Specific Requirements for Exploratory
- Removed Best Practices #6 (Parallel Exploration)
- Applied user changes: removed "Simplified Structure" text, updated CLI to "gemini & codex"

Rationale: Simplify workflow by removing parallel execution complexity
Lines: 596 → 494 (-17%, total -38% from original 791)
2025-11-25 09:28:00 +08:00
catlog22
7e60e3e198 refactor: remove redundant fields from task JSON and simplify data structure 2025-11-25 09:16:04 +08:00
catlog22
783ee4b570 refactor: remove hardcoded model specification in agent invocation
Changes:
- Removed model="haiku" from @test-fix-agent parallel invocation
- Use default model selection for flexibility
- Updated comment to remove model reference

Rationale:
- Let system auto-select appropriate model
- Avoid hardcoded configuration
- Maintain flexibility for future model changes
2025-11-25 09:11:45 +08:00
catlog22
7725e733b0 refactor: simplify iteration-state.json by removing redundant fields
Based on Gemini architectural analysis (verdict: "File necessary but simplify"):

Removed Redundant Fields:
- session_id → Derive from file path or workflow-session.json
- current_iteration → Calculate as iterations.length + 1
- max_iterations → Read from task.meta.max_iterations (single source)
- stuck_tests → Calculate by analyzing iterations[].failed_tests history
- regression_detected → Calculate from consecutive pass_rate values

Retained Essential Fields:
- current_task: Active task pointer (Resume critical)
- selected_strategy: Current iteration strategy (runtime state)
- next_action: State machine next step (Resume critical)
- iterations[]: Historical log (source of truth, cannot rebuild)

Enhanced iterations[] Array:
- Added failed_tests[] to each entry (was stuck_tests at top-level)
- Removed redundant regression_detected (calculated from pass_rate)

Benefits:
- Single source of truth (no data duplication)
- Less state to maintain and synchronize
- Clearer data ownership and calculation points
- Adheres to data normalization principles

Documentation Updates:
- Added "Purpose" and "Field Descriptions" sections
- Added "Removed Redundant Fields" with derivation logic
- Updated orchestrator responsibilities (Runtime Calculations)
- Updated agent template (Orchestrator-Calculated metadata)

Impact: File remains essential for Resume capability, but now leaner and normalized.
2025-11-25 09:08:41 +08:00
catlog22
2e8fe1e77a refactor: address Gemini review recommendations
Based on comprehensive Gemini analysis (Overall: Excellent), implemented 3 improvements:

1. Clarified CLI Fallback Triggers
   - Added 4 concrete trigger conditions (invalid output, low confidence, technical failures, quality degradation)
   - Defined confidence_score threshold: < 0.4
   - Specified fallback sequence with final degraded mode

2. Detailed Parallel Exploration Operations
   - Added "Operational Lifecycle" (7-step process: setup → execute → collect → select → apply → cleanup → commit)
   - Resource considerations: 3x CPU/memory, 10min timeout per branch
   - Error handling: worktree failure fallback, partial success handling

3. Explicit Commit Strategy
   - New "Commit Strategy" section with automatic commits at 3 checkpoints
   - After successful iteration (pass rate increased)
   - After parallel exploration (winning strategy)
   - Before rollback (regression detected)
   - Updated Best Practices #2: "Automatic Commits" (no manual intervention)

Changes:
- Lines: 515 → 596 (+81 for clarity, still -25% from original 791)
- Reduced ambiguity in critical automation points
- Enhanced operational robustness documentation

Gemini Assessment: "Exceptional technical documentation", "Robust design", "Clear and comprehensive"
2025-11-24 23:16:22 +08:00
catlog22
32c9595818 feat: add universal @test-fix-agent invocation template
Enhancement:
- Add dynamic prompt template for @test-fix-agent
- Supports 3 task types: test-gen, test-fix, test-fix-iteration
- Auto-adapts based on task.meta.type via configuration maps

Template Features:
- taskTypeObjective: Task-specific goals
- taskTypeSpecificReads: Required file reads per type
- taskTypeGuidance: Execution instructions per type
- taskTypeDeliverables: Expected outputs per type
- taskTypeSuccessCriteria: Completion validation per type

Benefits:
- Orchestrator uses single template for all task types
- Claude dynamically fills in type-specific details
- Reduces duplication, maintains consistency
- Clear guidance for criticality assessment (high/medium/low)
- Progressive testing integration (affected_only vs full_suite)

Lines: +86 (429 → 515, still -35% from original 791)
2025-11-24 23:09:24 +08:00
catlog22
bb427dc639 refactor: reorganize test-cycle-execute structure for clarity
Structure Changes:
- Quick Start → What & Why → How It Works → Enhanced Features → Reference
- User-facing content first, technical details later
- 540 → 429 lines (-21%, total -46% from original 791)

Improvements:
- Usage examples at top (immediate access)
- Simplified "How It Works" section (tree diagram)
- Agent roles as table (quick reference)
- Technical details moved to Reference section
- All core features preserved

Benefits:
- New users find usage commands immediately
- Conceptual understanding before technical details
- Reference section for implementation details
- Maintains all functionality and enhancements
2025-11-24 23:05:03 +08:00
catlog22
97b2247896 feat: enhance test-cycle-execute with intelligent iteration strategies
Optimizations:
- Reduced file size: 791 → 540 lines (-32%)
- Merged redundant sections (Overview + Philosophy + Responsibility Matrix)
- Simplified JSON examples and execution flow descriptions

Enhancements:
1. Intelligent Strategy Engine
   - 4 strategies: conservative/aggressive/exploratory/surgical
   - Auto-selection based on pass rate, stuck tests, regression

2. Progressive Testing
   - Run affected tests during iterations (70-90% faster)
   - Full suite on final validation

3. Parallel Strategy Exploration
   - Trigger on stuck tests (3+ consecutive failures)
   - Git worktree-based parallel execution
   - Select best result by pass rate

Changes:
- Max iterations: 5 → 10
- CLI tools: Gemini/Qwen → Gemini/Qwen/Codex (fallback chain)
- Add strategy metadata to iteration-state.json
- Add test_execution config to fix task JSON

Impact:
- Faster iterations via progressive testing
- Better stuck situation handling via parallel exploration
- Adaptive strategy selection for complex scenarios
2025-11-24 23:02:46 +08:00
catlog22
ed7dfad0a5 docs: update README files to version 5.9.3 2025-11-24 22:09:03 +08:00
catlog22
19acaea0f9 feat: add exploration and plan JSON schemas for task context and planning v5.9.3 2025-11-24 21:57:19 +08:00
catlog22
481a716c09 docs: update workflow initialization documentation and add project metadata schema 2025-11-24 21:46:44 +08:00
catlog22
07775cda30 fix: correct spelling of 'cli-execution-agent' in documentation 2025-11-24 21:46:08 +08:00
catlog22
3acf6fcba8 docs: enhance test task generation documentation with existing test infrastructure and framework usage 2025-11-24 21:14:32 +08:00
catlog22
f798dd4172 refactor: consolidate workflow commands and add UI design templates
1. Remove deprecated task-generate.md
   - Replaced by task-generate-agent.md in previous commits
   - Clean up duplicate command documentation

2. Update ui-design-agent.md
   - Refine agent specifications and workflow integration

3. Add UI design template files
   - Create ~/.claude/workflows/cli-templates/ui-design/systems/
   - Add animation-tokens.json for animation and transition patterns
   - Add design-tokens.json for color, typography, spacing tokens
   - Add layout-templates.json for structural layout patterns
   - Modular design system management

4. Update analyze_commands.py
   - Enhance command analysis capabilities
   - Improve metadata extraction

Key improvements:
- Remove duplicate/deprecated documentation
- Modular UI design template management
- Better workflow command organization
2025-11-24 19:36:33 +08:00
catlog22
aabc6294f4 refactor: optimize test workflow commands and extract templates
1. Optimize test-task-generate.md structure
   - Simplify from 417 lines to 217 lines (~48% reduction)
   - Reference task-generate-agent.md structure for consistency
   - Enhance agent prompt with clear specifications:
     * Explicit agent configuration reference
     * Detailed TEST_ANALYSIS_RESULTS.md integration mapping
     * Complete test-fix cycle configuration
     * Clear task structure requirements (IMPL-001 test-gen, IMPL-002+ test-fix)
   - Fix format errors (remove nested code blocks in agent prompt)
   - Emphasize "planning only" nature (does NOT execute tests)

2. Refactor test-concept-enhanced.md to use cli-execute-agent
   - Simplify from 463 lines to 142 lines (~69% reduction)
   - Change from direct Gemini execution to cli-execute-agent delegation
   - Extract Gemini prompt template to separate file:
     * Create ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt
     * Use $(cat ~/.claude/...) pattern for template reference
   - Clarify responsibility separation:
     * Command: Workflow coordination and validation
     * Agent: Execute Gemini analysis and generate outputs
   - Agent generates both gemini-test-analysis.md and TEST_ANALYSIS_RESULTS.md
   - Remove verbose embedded prompts and output format descriptions

Key improvements:
- Modular template management for easier maintenance
- Clear command vs agent responsibility separation
- Consistent documentation structure across workflow commands
- Enhanced agent prompts ensure correct output generation
- Use ~/.claude paths for installed workflow location
2025-11-24 19:33:02 +08:00
catlog22
adbb2070bb docs: update action-planning-agent and task-generate-agent documentation to clarify loading strategies and steps 2025-11-24 10:47:37 +08:00
catlog22
3c9cf3a677 docs: enhance action-planning-agent and task-generate-agent documentation with progressive loading strategy and smart artifact selection 2025-11-24 10:36:06 +08:00
catlog22
ff808ed539 docs: update task-generate-agent documentation for clarity on planning document generation and execution phases 2025-11-23 22:57:43 +08:00
catlog22
99a5c75b13 docs: enhance task generation agent documentation with progressive loading strategy and smart artifact selection 2025-11-23 22:44:11 +08:00
catlog22
7453987cfe Add documentation for new CLI commands: docs-related-cli and lite-fix
- Implemented the `docs-related-cli` command for context-aware documentation generation and update for changed modules using CLI execution with tool fallback.
- Introduced the `lite-fix` command for lightweight bug diagnosis and fix workflow, featuring intelligent severity assessment and optional hotfix mode for production incidents.
2025-11-23 22:18:39 +08:00
catlog22
4bb4bdc124 refactor: migrate agents to path-based context loading
- Update action-planning-agent and task-generate-agent to load context
  via file paths instead of embedded context packages
- Streamline test-cycle-execute workflow execution
- Remove redundant content from conflict-resolution and context-gather
- Update SKILL.md and tdd-plan documentation
2025-11-23 22:06:13 +08:00
catlog22
3915f7cb35 docs: update execute.md to clarify task loading and resume mode behavior 2025-11-23 21:18:30 +08:00
catlog22
657af628fd refactor: remove performance metrics and context management details from execute.md 2025-11-23 21:13:49 +08:00
catlog22
b649360cd6 docs: update agent documentation for context package and execution responsibilities 2025-11-23 21:04:25 +08:00
catlog22
20aa0f3a0b feat: add agent-task execution rules to ensure one agent per task JSON 2025-11-23 20:37:03 +08:00
catlog22
c8dd1adc69 docs: update WORKFLOW_DECISION_GUIDE with lite-fix workflow integration
- Add Bug Fix decision branch at workflow entry point (Q0)
- Integrate lite-fix workflow into decision flowchart
  - Standard bug fix path with adaptive severity assessment
  - Hotfix mode for production incidents
  - Diagnostic fallback for unclear root causes
- Add comprehensive lite-fix documentation:
  - 6-phase workflow explanation
  - Session artifacts structure
  - Risk scoring and workflow adaptation
  - Standard vs hotfix mode comparison
- Add two new scenarios:
  - Scenario D: Standard bug fix workflow
  - Scenario E: Production hotfix workflow
- Update quick reference tables:
  - Add bug fix commands by knowledge level
  - Add bug fix stage in project lifecycle
  - Add Lite-Fix workflow mode
- Update best practices and common pitfalls
- Update version to 5.9.2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 20:16:30 +08:00
catlog22
d53e7e18db docs: update README files to version 5.9.2 with lite-fix enhancements
- Add English README.md based on Chinese version
- Update version badges to v5.9.2 in both README files
- Add Lite-Fix workflow documentation and examples
- Document session artifact structure and management
- Include lite-fix quick start examples (standard and hotfix modes)
- Align with latest lite-fix session management features

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 20:11:48 +08:00
catlog22
0207677857 feat: enhance lite-fix workflow with session folder setup and artifact management 2025-11-23 20:05:34 +08:00
catlog22
72f27fb2f8 feat: add implementation_approach command field execution mode
- Add CLI mode example to implementation_approach showing optional command field
- Document two execution modes:
  1. Default Mode (agent execution): No command field, agent interprets steps
  2. CLI Mode (command execution): With command field, uses CLI tools (codex/gemini/qwen)

- Add Implementation Approach Execution Modes section with:
  - Mode descriptions and use cases
  - Required fields for each mode
  - Command patterns for CLI mode (codex, gemini)
  - Mode selection strategy

- Simplify implementation_approach examples to use generic placeholders
- Emphasize command field is optional, agent decides based on task complexity

Benefits:
- Clear documentation of both execution patterns
- Agents understand when to use CLI tools vs direct execution
- Pattern examples show structure without over-specifying content
- Supports both autonomous agent work and CLI tool delegation

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

Co-Authored-By: Claude <noreply@anthropic.com>
v5.9.2
2025-11-23 19:42:08 +08:00