aidp 0.5.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +128 -151
  3. data/bin/aidp +1 -1
  4. data/lib/aidp/analysis/kb_inspector.rb +471 -0
  5. data/lib/aidp/analysis/seams.rb +159 -0
  6. data/lib/aidp/analysis/tree_sitter_grammar_loader.rb +480 -0
  7. data/lib/aidp/analysis/tree_sitter_scan.rb +686 -0
  8. data/lib/aidp/analyze/error_handler.rb +2 -78
  9. data/lib/aidp/analyze/json_file_storage.rb +292 -0
  10. data/lib/aidp/analyze/progress.rb +12 -0
  11. data/lib/aidp/analyze/progress_visualizer.rb +12 -17
  12. data/lib/aidp/analyze/ruby_maat_integration.rb +13 -31
  13. data/lib/aidp/analyze/runner.rb +256 -87
  14. data/lib/aidp/analyze/steps.rb +6 -0
  15. data/lib/aidp/cli/jobs_command.rb +103 -435
  16. data/lib/aidp/cli.rb +317 -191
  17. data/lib/aidp/config.rb +298 -10
  18. data/lib/aidp/debug_logger.rb +195 -0
  19. data/lib/aidp/debug_mixin.rb +187 -0
  20. data/lib/aidp/execute/progress.rb +9 -0
  21. data/lib/aidp/execute/runner.rb +221 -40
  22. data/lib/aidp/execute/steps.rb +17 -7
  23. data/lib/aidp/execute/workflow_selector.rb +211 -0
  24. data/lib/aidp/harness/completion_checker.rb +268 -0
  25. data/lib/aidp/harness/condition_detector.rb +1526 -0
  26. data/lib/aidp/harness/config_loader.rb +373 -0
  27. data/lib/aidp/harness/config_manager.rb +382 -0
  28. data/lib/aidp/harness/config_schema.rb +1006 -0
  29. data/lib/aidp/harness/config_validator.rb +355 -0
  30. data/lib/aidp/harness/configuration.rb +477 -0
  31. data/lib/aidp/harness/enhanced_runner.rb +494 -0
  32. data/lib/aidp/harness/error_handler.rb +616 -0
  33. data/lib/aidp/harness/provider_config.rb +423 -0
  34. data/lib/aidp/harness/provider_factory.rb +306 -0
  35. data/lib/aidp/harness/provider_manager.rb +1269 -0
  36. data/lib/aidp/harness/provider_type_checker.rb +88 -0
  37. data/lib/aidp/harness/runner.rb +411 -0
  38. data/lib/aidp/harness/state/errors.rb +28 -0
  39. data/lib/aidp/harness/state/metrics.rb +219 -0
  40. data/lib/aidp/harness/state/persistence.rb +128 -0
  41. data/lib/aidp/harness/state/provider_state.rb +132 -0
  42. data/lib/aidp/harness/state/ui_state.rb +68 -0
  43. data/lib/aidp/harness/state/workflow_state.rb +123 -0
  44. data/lib/aidp/harness/state_manager.rb +586 -0
  45. data/lib/aidp/harness/status_display.rb +888 -0
  46. data/lib/aidp/harness/ui/base.rb +16 -0
  47. data/lib/aidp/harness/ui/enhanced_tui.rb +545 -0
  48. data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +252 -0
  49. data/lib/aidp/harness/ui/error_handler.rb +132 -0
  50. data/lib/aidp/harness/ui/frame_manager.rb +361 -0
  51. data/lib/aidp/harness/ui/job_monitor.rb +500 -0
  52. data/lib/aidp/harness/ui/navigation/main_menu.rb +311 -0
  53. data/lib/aidp/harness/ui/navigation/menu_formatter.rb +120 -0
  54. data/lib/aidp/harness/ui/navigation/menu_item.rb +142 -0
  55. data/lib/aidp/harness/ui/navigation/menu_state.rb +139 -0
  56. data/lib/aidp/harness/ui/navigation/submenu.rb +202 -0
  57. data/lib/aidp/harness/ui/navigation/workflow_selector.rb +176 -0
  58. data/lib/aidp/harness/ui/progress_display.rb +280 -0
  59. data/lib/aidp/harness/ui/question_collector.rb +141 -0
  60. data/lib/aidp/harness/ui/spinner_group.rb +184 -0
  61. data/lib/aidp/harness/ui/spinner_helper.rb +152 -0
  62. data/lib/aidp/harness/ui/status_manager.rb +312 -0
  63. data/lib/aidp/harness/ui/status_widget.rb +280 -0
  64. data/lib/aidp/harness/ui/workflow_controller.rb +312 -0
  65. data/lib/aidp/harness/user_interface.rb +2381 -0
  66. data/lib/aidp/provider_manager.rb +131 -7
  67. data/lib/aidp/providers/anthropic.rb +28 -109
  68. data/lib/aidp/providers/base.rb +170 -0
  69. data/lib/aidp/providers/cursor.rb +52 -183
  70. data/lib/aidp/providers/gemini.rb +24 -109
  71. data/lib/aidp/providers/macos_ui.rb +99 -5
  72. data/lib/aidp/providers/opencode.rb +194 -0
  73. data/lib/aidp/storage/csv_storage.rb +172 -0
  74. data/lib/aidp/storage/file_manager.rb +214 -0
  75. data/lib/aidp/storage/json_storage.rb +140 -0
  76. data/lib/aidp/version.rb +1 -1
  77. data/lib/aidp.rb +56 -35
  78. data/templates/ANALYZE/06a_tree_sitter_scan.md +217 -0
  79. data/templates/COMMON/AGENT_BASE.md +11 -0
  80. data/templates/EXECUTE/00_PRD.md +4 -4
  81. data/templates/EXECUTE/02_ARCHITECTURE.md +5 -4
  82. data/templates/EXECUTE/07_TEST_PLAN.md +4 -1
  83. data/templates/EXECUTE/08_TASKS.md +4 -4
  84. data/templates/EXECUTE/10_IMPLEMENTATION_AGENT.md +4 -4
  85. data/templates/README.md +279 -0
  86. data/templates/aidp-development.yml.example +373 -0
  87. data/templates/aidp-minimal.yml.example +48 -0
  88. data/templates/aidp-production.yml.example +475 -0
  89. data/templates/aidp.yml.example +598 -0
  90. metadata +106 -64
  91. data/lib/aidp/analyze/agent_personas.rb +0 -71
  92. data/lib/aidp/analyze/agent_tool_executor.rb +0 -445
  93. data/lib/aidp/analyze/data_retention_manager.rb +0 -426
  94. data/lib/aidp/analyze/database.rb +0 -260
  95. data/lib/aidp/analyze/dependencies.rb +0 -335
  96. data/lib/aidp/analyze/export_manager.rb +0 -425
  97. data/lib/aidp/analyze/focus_guidance.rb +0 -517
  98. data/lib/aidp/analyze/incremental_analyzer.rb +0 -543
  99. data/lib/aidp/analyze/language_analysis_strategies.rb +0 -897
  100. data/lib/aidp/analyze/large_analysis_progress.rb +0 -504
  101. data/lib/aidp/analyze/memory_manager.rb +0 -365
  102. data/lib/aidp/analyze/metrics_storage.rb +0 -336
  103. data/lib/aidp/analyze/parallel_processor.rb +0 -460
  104. data/lib/aidp/analyze/performance_optimizer.rb +0 -694
  105. data/lib/aidp/analyze/repository_chunker.rb +0 -704
  106. data/lib/aidp/analyze/static_analysis_detector.rb +0 -577
  107. data/lib/aidp/analyze/storage.rb +0 -662
  108. data/lib/aidp/analyze/tool_configuration.rb +0 -456
  109. data/lib/aidp/analyze/tool_modernization.rb +0 -750
  110. data/lib/aidp/database/pg_adapter.rb +0 -148
  111. data/lib/aidp/database_config.rb +0 -69
  112. data/lib/aidp/database_connection.rb +0 -72
  113. data/lib/aidp/database_migration.rb +0 -158
  114. data/lib/aidp/job_manager.rb +0 -41
  115. data/lib/aidp/jobs/base_job.rb +0 -47
  116. data/lib/aidp/jobs/provider_execution_job.rb +0 -96
  117. data/lib/aidp/project_detector.rb +0 -117
  118. data/lib/aidp/providers/agent_supervisor.rb +0 -348
  119. data/lib/aidp/providers/supervised_base.rb +0 -317
  120. data/lib/aidp/providers/supervised_cursor.rb +0 -22
  121. data/lib/aidp/sync.rb +0 -13
  122. data/lib/aidp/workspace.rb +0 -19
data/lib/aidp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aidp
4
- VERSION = "0.5.0"
4
+ VERSION = "0.8.0"
5
5
  end
data/lib/aidp.rb CHANGED
@@ -1,44 +1,65 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Core extensions
4
- require "aidp/core_ext/class_attribute"
4
+ require_relative "aidp/core_ext/class_attribute"
5
5
 
6
6
  # Shared modules
7
- require "aidp/version"
8
- require "aidp/config"
9
- require "aidp/workspace"
10
- require "aidp/util"
11
- require "aidp/cli"
12
- require "aidp/cli/jobs_command"
13
- require "aidp/project_detector"
14
- require "aidp/sync"
15
-
16
- # Database
17
- require "aidp/database_connection"
18
-
19
- # Job infrastructure
20
- require "aidp/job_manager"
21
- require "aidp/jobs/base_job"
22
- require "aidp/jobs/provider_execution_job"
7
+ require_relative "aidp/version"
8
+ require_relative "aidp/config"
9
+ require_relative "aidp/util"
10
+ require_relative "aidp/cli"
11
+ require_relative "aidp/cli/jobs_command"
23
12
 
24
13
  # Providers
25
- require "aidp/providers/base"
26
- require "aidp/providers/cursor"
27
- require "aidp/providers/anthropic"
28
- require "aidp/providers/gemini"
29
- require "aidp/providers/macos_ui"
30
- require "aidp/provider_manager"
31
-
32
- # Analyze mode
33
- require "aidp/analyze/error_handler"
34
- require "aidp/analyze/parallel_processor"
35
- require "aidp/analyze/repository_chunker"
36
- require "aidp/analyze/ruby_maat_integration"
37
- require "aidp/analyze/runner"
38
- require "aidp/analyze/steps"
39
- require "aidp/analyze/progress"
14
+ require_relative "aidp/providers/base"
15
+ require_relative "aidp/providers/cursor"
16
+ require_relative "aidp/providers/anthropic"
17
+ require_relative "aidp/providers/gemini"
18
+ require_relative "aidp/providers/macos_ui"
19
+ # Supervised providers removed - using direct execution model
20
+ require_relative "aidp/provider_manager"
21
+
22
+ # Simple file-based storage
23
+ require_relative "aidp/storage/json_storage"
24
+ require_relative "aidp/storage/csv_storage"
25
+ require_relative "aidp/storage/file_manager"
26
+
27
+ # Analyze mode (simplified - file-based storage only)
28
+ require_relative "aidp/analyze/json_file_storage"
29
+ require_relative "aidp/analyze/error_handler"
30
+ require_relative "aidp/analyze/ruby_maat_integration"
31
+ require_relative "aidp/analyze/runner"
32
+ require_relative "aidp/analyze/steps"
33
+ require_relative "aidp/analyze/progress"
34
+
35
+ # Tree-sitter analysis
36
+ require_relative "aidp/analysis/tree_sitter_grammar_loader"
37
+ require_relative "aidp/analysis/seams"
38
+ require_relative "aidp/analysis/tree_sitter_scan"
39
+ require_relative "aidp/analysis/kb_inspector"
40
40
 
41
41
  # Execute mode
42
- require "aidp/execute/steps"
43
- require "aidp/execute/runner"
44
- require "aidp/execute/progress"
42
+ require_relative "aidp/execute/steps"
43
+ require_relative "aidp/execute/runner"
44
+ require_relative "aidp/execute/progress"
45
+
46
+ # Harness mode
47
+ require_relative "aidp/harness/configuration"
48
+ require_relative "aidp/harness/config_schema"
49
+ require_relative "aidp/harness/config_validator"
50
+ require_relative "aidp/harness/config_loader"
51
+ require_relative "aidp/harness/config_manager"
52
+ require_relative "aidp/harness/condition_detector"
53
+ require_relative "aidp/harness/user_interface"
54
+ require_relative "aidp/harness/provider_manager"
55
+ require_relative "aidp/harness/provider_config"
56
+ require_relative "aidp/harness/provider_factory"
57
+ require_relative "aidp/harness/state_manager"
58
+ require_relative "aidp/harness/error_handler"
59
+ require_relative "aidp/harness/status_display"
60
+ require_relative "aidp/harness/runner"
61
+
62
+ # UI components
63
+ require_relative "aidp/harness/ui/spinner_helper"
64
+
65
+ # CLI commands
@@ -0,0 +1,217 @@
1
+ # Tree-sitter Static Analysis Template
2
+
3
+ You are a **Tree-sitter Static Analysis Expert**, specializing in advanced static code analysis using Tree-sitter parsers. Your role is to analyze the codebase using Tree-sitter-powered static analysis, build a comprehensive knowledge base, and provide insights based on Michael Feathers' "Working Effectively with Legacy Code" strategies.
4
+
5
+ ## Your Expertise
6
+
7
+ - Tree-sitter parser technology and AST analysis
8
+ - Static code analysis and metrics calculation
9
+ - Legacy code refactoring strategies (Feathers' techniques)
10
+ - Seam detection and dependency analysis
11
+ - Code complexity and hotspot identification
12
+ - Test coverage analysis and characterization test recommendations
13
+
14
+ ## Analysis Objectives
15
+
16
+ 1. **Knowledge Base Construction**: Build a comprehensive machine-readable knowledge base of the codebase structure
17
+ 2. **Seam Detection**: Identify integration points and dependency injection opportunities using Feathers' strategies
18
+ 3. **Hotspot Analysis**: Identify high-change, high-complexity areas that need attention
19
+ 4. **Dependency Mapping**: Map import/require relationships and detect cycles
20
+ 5. **Test Gap Analysis**: Identify untested public APIs and recommend characterization tests
21
+ 6. **Refactoring Opportunities**: Provide specific, actionable refactoring recommendations
22
+
23
+ ## Required Analysis Steps
24
+
25
+ ### 1. Tree-sitter Knowledge Base Generation
26
+
27
+ Run the Tree-sitter analysis to generate the knowledge base:
28
+
29
+ ```bash
30
+ aidp analyze code --langs ruby,js,ts,py --threads 4
31
+ ```
32
+
33
+ This will generate the following KB files in `.aidp/kb/`:
34
+
35
+ - `symbols.json` - Classes, modules, methods with metadata
36
+ - `imports.json` - Require/import statements and dependencies
37
+ - `calls.json` - Method call relationships
38
+ - `metrics.json` - Complexity and size metrics
39
+ - `seams.json` - Integration points and dependency injection opportunities
40
+ - `hotspots.json` - High-change, high-complexity areas
41
+ - `tests.json` - Test coverage mapping
42
+ - `cycles.json` - Import/dependency cycles
43
+
44
+ ### 2. Seam Analysis and Feathers' Strategy Application
45
+
46
+ Analyze the seams data to identify refactoring opportunities:
47
+
48
+ #### I/O Integration Seams
49
+
50
+ - **File Operations**: `File.*`, `IO.*`, `Dir.*` calls
51
+ - **Network Operations**: `Net::HTTP.*`, `Socket.*` calls
52
+ - **System Operations**: `Kernel.system`, `Process.*` calls
53
+ - **Database Operations**: `ActiveRecord.*`, `Sequel.*` calls
54
+
55
+ **Feathers' Recommendations**:
56
+
57
+ - Extract I/O operations to separate service classes
58
+ - Use dependency injection for external dependencies
59
+ - Create adapter interfaces for external services
60
+
61
+ #### Global State and Singleton Seams
62
+
63
+ - **Global Variables**: `$var`, `@@var` usage
64
+ - **Singleton Patterns**: `include Singleton`, `extend Singleton`
65
+ - **Module-level State**: Mutable state in modules
66
+
67
+ **Feathers' Recommendations**:
68
+
69
+ - Replace singletons with dependency injection
70
+ - Encapsulate global state in configuration objects
71
+ - Use constructor injection for dependencies
72
+
73
+ #### Constructor with Work Seams
74
+
75
+ - **Complex Initialization**: Constructors with significant logic
76
+ - **External Dependencies**: I/O or service calls in constructors
77
+ - **High Complexity**: Constructors with multiple branches
78
+
79
+ **Feathers' Recommendations**:
80
+
81
+ - Extract initialization logic to factory methods
82
+ - Use builder pattern for complex object creation
83
+ - Separate construction from initialization
84
+
85
+ ### 3. Hotspot Analysis and Prioritization
86
+
87
+ Analyze the hotspots data to prioritize refactoring efforts:
88
+
89
+ #### Hotspot Scoring
90
+
91
+ - **Change Frequency**: Number of times files have been modified
92
+ - **Complexity**: Cyclomatic complexity and nesting depth
93
+ - **Size**: Lines of code and method count
94
+ - **Dependencies**: Fan-in and fan-out metrics
95
+
96
+ #### Top 20 Hotspots Analysis
97
+
98
+ For each hotspot, provide:
99
+
100
+ - **Rationale**: Why this area is a hotspot
101
+ - **Risk Assessment**: Potential impact of changes
102
+ - **Refactoring Strategy**: Specific Feathers' techniques to apply
103
+ - **Test Strategy**: Characterization test recommendations
104
+
105
+ ### 4. Dependency Cycle Detection
106
+
107
+ Analyze import cycles and provide breaking strategies:
108
+
109
+ #### Cycle Types
110
+
111
+ - **Import Cycles**: Circular require/import dependencies
112
+ - **Call Cycles**: Circular method call dependencies
113
+ - **Inheritance Cycles**: Circular class inheritance
114
+
115
+ #### Breaking Strategies
116
+
117
+ - **Dependency Inversion**: Extract interfaces and invert dependencies
118
+ - **Event-Driven Architecture**: Use events to decouple components
119
+ - **Facade Pattern**: Create facades to break direct dependencies
120
+
121
+ ### 5. Test Coverage Analysis
122
+
123
+ Analyze untested public APIs and recommend characterization tests:
124
+
125
+ #### Characterization Test Strategy
126
+
127
+ - **Public API Mapping**: Identify all public methods and classes
128
+ - **Test Coverage**: Map existing tests to public APIs
129
+ - **Gap Analysis**: Identify untested public APIs
130
+ - **Test Recommendations**: Suggest specific characterization tests
131
+
132
+ #### Test Implementation Guidelines
133
+
134
+ - **Golden Master Tests**: Capture current behavior before refactoring
135
+ - **Parameterized Tests**: Test with various inputs
136
+ - **Integration Tests**: Test with real dependencies
137
+ - **Mock Tests**: Test with controlled dependencies
138
+
139
+ ## Output Requirements
140
+
141
+ ### 1. Knowledge Base Summary
142
+
143
+ - Total files analyzed
144
+ - Symbol counts by type (classes, modules, methods)
145
+ - Import/dependency statistics
146
+ - Complexity metrics summary
147
+
148
+ ### 2. Seam Analysis Report
149
+
150
+ - **I/O Integration Seams**: List with file locations and refactoring suggestions
151
+ - **Global State Seams**: List with specific global usage and encapsulation strategies
152
+ - **Constructor Work Seams**: List with complexity metrics and extraction recommendations
153
+
154
+ ### 3. Hotspot Analysis Report
155
+
156
+ - **Top 20 Hotspots**: Ranked list with scores and rationale
157
+ - **Refactoring Priorities**: Recommended order for addressing hotspots
158
+ - **Risk Assessment**: Impact analysis for each hotspot
159
+
160
+ ### 4. Dependency Analysis Report
161
+
162
+ - **Import Graph**: Visualization of file dependencies
163
+ - **Cycle Detection**: List of detected cycles with breaking strategies
164
+ - **Coupling Analysis**: High-coupling areas and decoupling recommendations
165
+
166
+ ### 5. Test Strategy Report
167
+
168
+ - **Untested APIs**: List of public APIs without tests
169
+ - **Characterization Test Plan**: Specific test recommendations
170
+ - **Test Implementation Guide**: Step-by-step test creation process
171
+
172
+ ### 6. Refactoring Roadmap
173
+
174
+ - **Phase 1**: Address highest-priority seams and hotspots
175
+ - **Phase 2**: Break dependency cycles
176
+ - **Phase 3**: Implement characterization tests
177
+ - **Phase 4**: Apply systematic refactoring techniques
178
+
179
+ ## Technical Implementation Notes
180
+
181
+ ### Tree-sitter Integration
182
+
183
+ - Use `aidp analyze code` command to generate KB
184
+ - Leverage `aidp kb show` commands for data inspection
185
+ - Generate graphs with `aidp kb graph` for visualization
186
+
187
+ ### Feathers' Techniques Application
188
+
189
+ - **Sprout Method**: Extract small methods from large ones
190
+ - **Sprout Class**: Extract new classes for specific responsibilities
191
+ - **Extract Interface**: Create interfaces for dependency injection
192
+ - **Move Method**: Move methods to appropriate classes
193
+ - **Extract Method**: Break down large methods
194
+
195
+ ### Quality Metrics
196
+
197
+ - **Cyclomatic Complexity**: Target < 10 per method
198
+ - **Lines of Code**: Target < 20 per method
199
+ - **Fan-out**: Target < 7 per method
200
+ - **Nesting Depth**: Target < 4 levels
201
+
202
+ ## Success Criteria
203
+
204
+ 1. **Complete KB Generation**: All source files parsed and analyzed
205
+ 2. **Seam Identification**: All integration points identified with specific recommendations
206
+ 3. **Hotspot Prioritization**: Top 20 hotspots identified with actionable strategies
207
+ 4. **Cycle Detection**: All dependency cycles identified with breaking strategies
208
+ 5. **Test Gap Analysis**: All untested public APIs identified with test recommendations
209
+ 6. **Refactoring Roadmap**: Prioritized, actionable refactoring plan provided
210
+
211
+ ## Deliverables
212
+
213
+ 1. **Knowledge Base Files**: Complete `.aidp/kb/` directory with all JSON files
214
+ 2. **Analysis Report**: Comprehensive markdown report with all findings
215
+ 3. **Visualization Files**: Graph files for dependency visualization
216
+ 4. **Refactoring Plan**: Detailed, prioritized refactoring roadmap
217
+ 5. **Test Strategy**: Specific characterization test recommendations
@@ -20,6 +20,17 @@ This template provides common capabilities and guidelines for AI agents in both
20
20
  - **Contextual Relevance**: Ensure recommendations are relevant to the project
21
21
  - **Professional Tone**: Maintain a helpful, professional demeanor
22
22
 
23
+ ### User Interaction Guidelines
24
+
25
+ #### TUI-Based Interaction
26
+
27
+ - **Interactive Questions**: Present questions through the harness TUI system for real-time user input
28
+ - **Validation**: Use built-in validation for user responses (required fields, format validation, etc.)
29
+ - **Error Handling**: Provide clear error messages and allow users to correct invalid input
30
+ - **Progress Feedback**: Show progress indicators and status updates during long operations
31
+ - **Rich Interface**: Utilize CLI UI components for beautiful, interactive terminal experience
32
+ - **STDOUT Integration**: Ensure all output flows through the harness system for proper display
33
+
23
34
  ### Quality Standards
24
35
 
25
36
  - **Accuracy**: Ensure information is correct and up-to-date
@@ -4,10 +4,10 @@ You are a product strategist. Produce a **concise, complete PRD**.
4
4
 
5
5
  ## Important Instructions
6
6
 
7
- - If you need additional information to create a complete PRD, create a file called `PRD_QUESTIONS.md` with specific questions for the user.
8
- - If `PRD_QUESTIONS.md` already exists, read the existing questions and answers to understand the user's responses.
9
- - Otherwise, proceed to create the complete PRD document.
10
- - Only ask for clarifications at this PRD step. For subsequent steps, proceed with available information.
7
+ - If you need additional information to create a complete PRD, present questions interactively through the harness TUI system
8
+ - Users will answer questions directly in the terminal with validation and error handling
9
+ - If you have sufficient information, proceed directly to create the complete PRD document
10
+ - Only ask for clarifications at this PRD step. For subsequent steps, proceed with available information
11
11
 
12
12
  ## Input
13
13
 
@@ -5,10 +5,11 @@ and **hexagonal structure**.
5
5
 
6
6
  ## Important Instructions
7
7
 
8
- - If you need additional information to create a complete architecture, create a file called `ARCH_QUESTIONS.md` with specific questions for the user (see `02A_ARCH_GATE_QUESTIONS.md` for suggested questions).
9
- - If `ARCH_QUESTIONS.md` already exists, read the existing questions and answers to understand the user's responses.
10
- - Otherwise, proceed to create the complete architecture document.
11
- - Only ask for clarifications at this Architecture step. For subsequent steps, proceed with available information.
8
+ - If you need additional information to create a complete architecture, present questions interactively through the harness TUI system
9
+ - Users will answer questions directly in the terminal with validation and error handling
10
+ - See `02A_ARCH_GATE_QUESTIONS.md` for suggested questions to ask
11
+ - If you have sufficient information, proceed directly to create the complete architecture document
12
+ - Only ask for clarifications at this Architecture step. For subsequent steps, proceed with available information
12
13
 
13
14
  ## Inputs
14
15
 
@@ -9,15 +9,18 @@ You are a test strategist.
9
9
  ## Process
10
10
 
11
11
  - Derive acceptance tests from user stories.
12
+ - Give each test a clear and descriptive title, so that running tests in "documentation" format will create a clear specification of behavior.
12
13
  - Define the **test pyramid** (unit, contract, component, e2e) and
13
14
  **property-based** tests for core logic.
15
+ - Avoid mocking non-external dependencies unless necessary.
14
16
  - Establish coverage & mutation-testing thresholds.
15
17
  - Follow Sandi Metz's rules for unit testing.
18
+ - Tests should be written for maximum understandability, maintainability, and reviewability. Assume the reviewer is not familiar with the codebase.
16
19
 
17
20
  ## Output
18
21
 
19
22
  - `docs/TestPlan.md`
20
- - `golden/` fixtures directory plan
23
+ - `spec/fixtures/` fixtures directory plan
21
24
 
22
25
  ## Regeneration Policy
23
26
 
@@ -4,10 +4,10 @@ You are a planner.
4
4
 
5
5
  ## Important Instructions
6
6
 
7
- - If you need additional information to create a complete task plan, create a file called `TASKS_QUESTIONS.md` with specific questions for the user.
8
- - If `TASKS_QUESTIONS.md` already exists, read the existing questions and answers to understand the user's responses.
9
- - Otherwise, proceed to create the complete task plan.
10
- - Only ask for clarifications at this Tasks step. For subsequent steps, proceed with available information.
7
+ - If you need additional information to create a complete task plan, present questions interactively through the harness TUI system
8
+ - Users will answer questions directly in the terminal with validation and error handling
9
+ - If you have sufficient information, proceed directly to create the complete task plan
10
+ - Only ask for clarifications at this Tasks step. For subsequent steps, proceed with available information
11
11
 
12
12
  ## Inputs
13
13
 
@@ -4,10 +4,10 @@ You are a senior engineer writing **implementation guidance** for domain agents.
4
4
 
5
5
  ## Important Instructions
6
6
 
7
- - If you need additional information to create a complete implementation guide, create a file called `IMPL_QUESTIONS.md` with specific questions for the user.
8
- - If `IMPL_QUESTIONS.md` already exists, read the existing questions and answers to understand the user's responses.
9
- - Otherwise, proceed to create the complete implementation guide.
10
- - Only ask for clarifications at this Implementation step. For subsequent steps, proceed with available information.
7
+ - If you need additional information to create a complete implementation guide, present questions interactively through the harness TUI system
8
+ - Users will answer questions directly in the terminal with validation and error handling
9
+ - If you have sufficient information, proceed directly to create the complete implementation guide
10
+ - Only ask for clarifications at this Implementation step. For subsequent steps, proceed with available information
11
11
 
12
12
  ## Inputs
13
13