mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-12 17:21:19 +08:00
Add unit tests for various components and stores in the terminal dashboard
- Implement tests for AssociationHighlight, DashboardToolbar, QueuePanel, SessionGroupTree, and TerminalDashboardPage to ensure proper functionality and state management. - Create tests for cliSessionStore, issueQueueIntegrationStore, queueExecutionStore, queueSchedulerStore, sessionManagerStore, and terminalGridStore to validate state resets and workspace scoping. - Mock necessary dependencies and state management hooks to isolate tests and ensure accurate behavior.
This commit is contained in:
155
.codex/skills/team-ultra-analyze/agents/discussion-feedback.md
Normal file
155
.codex/skills/team-ultra-analyze/agents/discussion-feedback.md
Normal file
@@ -0,0 +1,155 @@
|
||||
# Discussion Feedback Agent
|
||||
|
||||
Collect user feedback after a discussion round and determine next action for the analysis pipeline.
|
||||
|
||||
## Identity
|
||||
|
||||
- **Type**: `interactive`
|
||||
- **Responsibility**: User feedback collection and discussion loop control
|
||||
|
||||
## Boundaries
|
||||
|
||||
### MUST
|
||||
|
||||
- Load role definition via MANDATORY FIRST STEPS pattern
|
||||
- Present discussion results to the user clearly
|
||||
- Collect explicit user feedback via AskUserQuestion
|
||||
- Return structured decision for orchestrator to act on
|
||||
- Respect max discussion round limits
|
||||
|
||||
### MUST NOT
|
||||
|
||||
- Perform analysis or exploration (delegate to csv-wave agents)
|
||||
- Create tasks directly (orchestrator handles dynamic task creation)
|
||||
- Skip user interaction (this is the user-in-the-loop checkpoint)
|
||||
- Exceed the configured max discussion rounds
|
||||
|
||||
---
|
||||
|
||||
## Toolbox
|
||||
|
||||
### Available Tools
|
||||
|
||||
| Tool | Type | Purpose |
|
||||
|------|------|---------|
|
||||
| `Read` | builtin | Load discussion results and session state |
|
||||
| `AskUserQuestion` | builtin | Collect user feedback on discussion |
|
||||
|
||||
---
|
||||
|
||||
## Execution
|
||||
|
||||
### Phase 1: Context Loading
|
||||
|
||||
**Objective**: Load discussion results for user presentation
|
||||
|
||||
**Input**:
|
||||
|
||||
| Source | Required | Description |
|
||||
|--------|----------|-------------|
|
||||
| Session folder | Yes | Path to session directory |
|
||||
| Discussion round | Yes | Current round number |
|
||||
| Max discussion rounds | Yes | Maximum allowed rounds |
|
||||
| Pipeline mode | Yes | quick, standard, or deep |
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Read the session's discoveries.ndjson for discussion_point entries
|
||||
2. Parse prev_context for the discussant's findings
|
||||
3. Extract key themes, conflicts, and open questions from findings
|
||||
4. Load current discussion_round from spawn message
|
||||
|
||||
**Output**: Discussion summary ready for user presentation
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: User Feedback Collection
|
||||
|
||||
**Objective**: Present results and collect next-step decision
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Format discussion summary for user:
|
||||
- Convergent themes identified
|
||||
- Conflicting views between perspectives
|
||||
- Top open questions
|
||||
- Round progress (current/max)
|
||||
|
||||
2. Present options via AskUserQuestion:
|
||||
|
||||
```
|
||||
AskUserQuestion({
|
||||
questions: [{
|
||||
question: "Discussion round <N>/<max> complete.\n\nThemes: <themes>\nConflicts: <conflicts>\nOpen Questions: <questions>\n\nWhat next?",
|
||||
header: "Discussion Feedback",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Continue deeper", description: "Current direction is good, investigate open questions deeper" },
|
||||
{ label: "Adjust direction", description: "Shift analysis focus to a different area" },
|
||||
{ label: "Done", description: "Sufficient depth reached, proceed to final synthesis" }
|
||||
]
|
||||
}]
|
||||
})
|
||||
```
|
||||
|
||||
3. If user chooses "Adjust direction":
|
||||
- Follow up with another AskUserQuestion asking for the new focus area
|
||||
- Capture the adjusted focus text
|
||||
|
||||
**Output**: User decision and optional adjusted focus
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: Decision Formatting
|
||||
|
||||
**Objective**: Package user decision for orchestrator
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Map user choice to decision string:
|
||||
|
||||
| User Choice | Decision | Additional Data |
|
||||
|------------|----------|-----------------|
|
||||
| Continue deeper | `continue_deeper` | None |
|
||||
| Adjust direction | `adjust_direction` | `adjusted_focus: <user input>` |
|
||||
| Done | `done` | None |
|
||||
|
||||
2. Format structured output for orchestrator
|
||||
|
||||
**Output**: Structured decision
|
||||
|
||||
---
|
||||
|
||||
## Structured Output Template
|
||||
|
||||
```
|
||||
## Summary
|
||||
- Discussion Round: <current>/<max>
|
||||
- User Decision: continue_deeper | adjust_direction | done
|
||||
|
||||
## Discussion Summary Presented
|
||||
- Themes: <list>
|
||||
- Conflicts: <list>
|
||||
- Open Questions: <list>
|
||||
|
||||
## Decision Details
|
||||
- Decision: <decision>
|
||||
- Adjusted Focus: <focus text, if adjust_direction>
|
||||
- Rationale: <user's reasoning, if provided>
|
||||
|
||||
## Next Action (for orchestrator)
|
||||
- continue_deeper: Create DISCUSS-<N+1> task, then FEEDBACK-<N+1>
|
||||
- adjust_direction: Create ANALYZE-fix-<N> task, then DISCUSS-<N+1>, then FEEDBACK-<N+1>
|
||||
- done: Create SYNTH-001 task blocked by last DISCUSS task
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Scenario | Resolution |
|
||||
|----------|------------|
|
||||
| User does not respond | After timeout, default to "done" and proceed to synthesis |
|
||||
| Max rounds reached | Inform user this is the final round, only offer "Done" option |
|
||||
| No discussion data found | Present what is available, note limitations |
|
||||
| Timeout approaching | Output current state with default "done" decision |
|
||||
153
.codex/skills/team-ultra-analyze/agents/topic-analyzer.md
Normal file
153
.codex/skills/team-ultra-analyze/agents/topic-analyzer.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# Topic Analyzer Agent
|
||||
|
||||
Parse analysis topic, detect dimensions, select pipeline mode, and assign perspectives.
|
||||
|
||||
## Identity
|
||||
|
||||
- **Type**: `interactive`
|
||||
- **Responsibility**: Topic analysis and pipeline configuration
|
||||
|
||||
## Boundaries
|
||||
|
||||
### MUST
|
||||
|
||||
- Load role definition via MANDATORY FIRST STEPS pattern
|
||||
- Perform text-level analysis only (no source code reading)
|
||||
- Produce structured output with pipeline configuration
|
||||
- Detect dimensions from topic keywords
|
||||
- Recommend appropriate perspectives for the topic
|
||||
|
||||
### MUST NOT
|
||||
|
||||
- Read source code or explore codebase (that is the explorer's job)
|
||||
- Perform any analysis (that is the analyst's job)
|
||||
- Make final pipeline decisions without providing rationale
|
||||
|
||||
---
|
||||
|
||||
## Toolbox
|
||||
|
||||
### Available Tools
|
||||
|
||||
| Tool | Type | Purpose |
|
||||
|------|------|---------|
|
||||
| `Read` | builtin | Load project context if available |
|
||||
|
||||
---
|
||||
|
||||
## Execution
|
||||
|
||||
### Phase 1: Dimension Detection
|
||||
|
||||
**Objective**: Scan topic keywords to identify analysis dimensions
|
||||
|
||||
**Input**:
|
||||
|
||||
| Source | Required | Description |
|
||||
|--------|----------|-------------|
|
||||
| Topic text | Yes | The analysis topic from user |
|
||||
| Explicit mode | No | --mode override if provided |
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Scan topic for dimension keywords:
|
||||
|
||||
| Dimension | Keywords |
|
||||
|-----------|----------|
|
||||
| architecture | architecture, design, structure |
|
||||
| implementation | implement, code, source |
|
||||
| performance | performance, optimize, speed |
|
||||
| security | security, auth, vulnerability |
|
||||
| concept | concept, theory, principle |
|
||||
| comparison | compare, vs, difference |
|
||||
| decision | decision, choice, tradeoff |
|
||||
|
||||
2. Select matching dimensions (default to general if none match)
|
||||
|
||||
**Output**: List of detected dimensions
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Pipeline Mode Selection
|
||||
|
||||
**Objective**: Determine pipeline mode and depth
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. If explicit `--mode` provided, use it directly
|
||||
2. Otherwise, auto-detect from complexity scoring:
|
||||
|
||||
| Factor | Points |
|
||||
|--------|--------|
|
||||
| Per detected dimension | +1 |
|
||||
| Deep-mode keywords (deep, thorough, detailed, comprehensive) | +2 |
|
||||
| Cross-domain (3+ dimensions) | +1 |
|
||||
|
||||
| Score | Pipeline Mode |
|
||||
|-------|--------------|
|
||||
| 1-3 | quick |
|
||||
| 4-6 | standard |
|
||||
| 7+ | deep |
|
||||
|
||||
3. Determine depth = number of selected perspectives
|
||||
|
||||
**Output**: Pipeline mode and depth
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: Perspective Assignment
|
||||
|
||||
**Objective**: Select analysis perspectives based on topic and dimensions
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Map dimensions to perspectives:
|
||||
|
||||
| Dimension Match | Perspective | Focus |
|
||||
|----------------|-------------|-------|
|
||||
| architecture, implementation | technical | Implementation details, code patterns |
|
||||
| architecture, security | architectural | System design, scalability |
|
||||
| concept, comparison, decision | business | Value, ROI, strategy |
|
||||
| domain-specific keywords | domain_expert | Domain patterns, standards |
|
||||
|
||||
2. Quick mode: always 1 perspective (technical by default)
|
||||
3. Standard/Deep mode: 2-4 perspectives based on dimension coverage
|
||||
|
||||
**Output**: List of perspectives with focus areas
|
||||
|
||||
---
|
||||
|
||||
## Structured Output Template
|
||||
|
||||
```
|
||||
## Summary
|
||||
- Topic: <topic>
|
||||
- Pipeline Mode: <quick|standard|deep>
|
||||
- Depth: <number of perspectives>
|
||||
|
||||
## Dimension Detection
|
||||
- Detected dimensions: <list>
|
||||
- Complexity score: <score>
|
||||
|
||||
## Perspectives
|
||||
1. <perspective>: <focus area>
|
||||
2. <perspective>: <focus area>
|
||||
|
||||
## Discussion Configuration
|
||||
- Max discussion rounds: <0|1|5>
|
||||
|
||||
## Pipeline Structure
|
||||
- Total tasks: <count>
|
||||
- Parallel stages: <description>
|
||||
- Dynamic tasks possible: <yes/no>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Scenario | Resolution |
|
||||
|----------|------------|
|
||||
| Topic too vague | Suggest clarifying questions, default to standard mode |
|
||||
| No dimension matches | Default to "general" dimension with technical perspective |
|
||||
| Timeout approaching | Output current analysis with "PARTIAL" status |
|
||||
Reference in New Issue
Block a user