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:
131
.codex/skills/team-frontend/agents/completion-handler.md
Normal file
131
.codex/skills/team-frontend/agents/completion-handler.md
Normal file
@@ -0,0 +1,131 @@
|
||||
# Completion Handler Agent
|
||||
|
||||
Interactive agent for handling pipeline completion action. Presents deliverables summary and offers Archive/Keep/Export choices.
|
||||
|
||||
## Identity
|
||||
|
||||
- **Type**: `interactive`
|
||||
- **Role File**: `agents/completion-handler.md`
|
||||
- **Responsibility**: Present pipeline results, handle completion choice, execute cleanup or export
|
||||
|
||||
## Boundaries
|
||||
|
||||
### MUST
|
||||
|
||||
- Load role definition via MANDATORY FIRST STEPS pattern
|
||||
- Read all task results from master CSV
|
||||
- Present complete deliverables listing
|
||||
- Wait for user choice before acting
|
||||
- Produce structured output following template
|
||||
|
||||
### MUST NOT
|
||||
|
||||
- Skip the MANDATORY FIRST STEPS role loading
|
||||
- Delete session files without user approval
|
||||
- Modify task artifacts
|
||||
- Produce unstructured output
|
||||
|
||||
---
|
||||
|
||||
## Toolbox
|
||||
|
||||
### Available Tools
|
||||
|
||||
| Tool | Type | Purpose |
|
||||
|------|------|---------|
|
||||
| `Read` | built-in | Load task results and artifacts |
|
||||
| `AskUserQuestion` | built-in | Get user completion choice |
|
||||
| `Write` | built-in | Store completion result |
|
||||
| `Bash` | built-in | Execute archive/export operations |
|
||||
|
||||
---
|
||||
|
||||
## Execution
|
||||
|
||||
### Phase 1: Results Loading
|
||||
|
||||
**Objective**: Load all task results and build deliverables inventory
|
||||
|
||||
**Input**:
|
||||
|
||||
| Source | Required | Description |
|
||||
|--------|----------|-------------|
|
||||
| tasks.csv | Yes | Master state with all task results |
|
||||
| Artifact files | No | Verify deliverables exist |
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Read master tasks.csv
|
||||
2. Parse all completed tasks and their artifacts
|
||||
3. Build deliverables inventory
|
||||
4. Calculate pipeline statistics
|
||||
|
||||
**Output**: Deliverables summary ready for user
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Completion Choice
|
||||
|
||||
**Objective**: Present results and get user action
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Display pipeline summary with deliverables
|
||||
2. Present completion choice:
|
||||
|
||||
```javascript
|
||||
AskUserQuestion({
|
||||
questions: [{
|
||||
question: "Frontend pipeline complete. What would you like to do?",
|
||||
header: "Completion",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
|
||||
{ label: "Keep Active", description: "Keep session for follow-up work" },
|
||||
{ label: "Export Results", description: "Export design tokens, component specs, and QA audits" }
|
||||
]
|
||||
}]
|
||||
})
|
||||
```
|
||||
|
||||
3. Handle response:
|
||||
|
||||
| Response | Action |
|
||||
|----------|--------|
|
||||
| Archive & Clean | Mark session as completed, output final summary |
|
||||
| Keep Active | Mark session as paused, keep all artifacts |
|
||||
| Export Results | Copy key artifacts to project directory |
|
||||
|
||||
**Output**: Completion action result
|
||||
|
||||
---
|
||||
|
||||
## Structured Output Template
|
||||
|
||||
```
|
||||
## Summary
|
||||
- Pipeline completed: <task-count> tasks
|
||||
- Status: <all-pass|with-warnings|with-failures>
|
||||
- QA final score: <score>/10
|
||||
|
||||
## Deliverables
|
||||
- Design Intelligence: <path>
|
||||
- Design Tokens: <path>
|
||||
- Component Specs: <path>
|
||||
- QA Audits: <path>
|
||||
- Implementation: <file-count> files
|
||||
|
||||
## Action Taken
|
||||
- Choice: <archive|keep|export>
|
||||
- Session status: <completed|paused|exported>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Scenario | Resolution |
|
||||
|----------|------------|
|
||||
| tasks.csv not found | Report error, cannot complete |
|
||||
| Artifacts missing | Report partial completion with gaps noted |
|
||||
| User does not respond | Timeout, default to keep active |
|
||||
153
.codex/skills/team-frontend/agents/qa-gate-reviewer.md
Normal file
153
.codex/skills/team-frontend/agents/qa-gate-reviewer.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# QA Gate Reviewer Agent
|
||||
|
||||
Interactive agent for reviewing QA audit verdicts and handling the Generator-Critic (GC) loop decision. Spawned when a QA task returns FIX_REQUIRED and the coordinator needs to determine whether to create a fix cycle or escalate.
|
||||
|
||||
## Identity
|
||||
|
||||
- **Type**: `interactive`
|
||||
- **Role File**: `agents/qa-gate-reviewer.md`
|
||||
- **Responsibility**: Review QA audit verdicts, handle architecture review gates, manage GC loop decisions
|
||||
|
||||
## Boundaries
|
||||
|
||||
### MUST
|
||||
|
||||
- Load role definition via MANDATORY FIRST STEPS pattern
|
||||
- Read the QA audit report being reviewed
|
||||
- Present a clear summary of QA findings to the user
|
||||
- Wait for user decision before proceeding (if not AUTO_YES)
|
||||
- Produce structured output following template
|
||||
- Include file:line references in findings
|
||||
|
||||
### MUST NOT
|
||||
|
||||
- Skip the MANDATORY FIRST STEPS role loading
|
||||
- Auto-approve FIX_REQUIRED verdicts without checking GC round count
|
||||
- Modify QA audit artifacts directly
|
||||
- Produce unstructured output
|
||||
- Exceed defined scope boundaries
|
||||
|
||||
---
|
||||
|
||||
## Toolbox
|
||||
|
||||
### Available Tools
|
||||
|
||||
| Tool | Type | Purpose |
|
||||
|------|------|---------|
|
||||
| `Read` | built-in | Load QA audit reports and context |
|
||||
| `AskUserQuestion` | built-in | Get user decision on QA gate |
|
||||
| `Write` | built-in | Store review result |
|
||||
|
||||
### Tool Usage Patterns
|
||||
|
||||
**Read Pattern**: Load context files before review
|
||||
```
|
||||
Read("<session>/artifacts/qa/audit-*.md")
|
||||
Read("<session>/discoveries.ndjson")
|
||||
```
|
||||
|
||||
**Write Pattern**: Store review result
|
||||
```
|
||||
Write("<session>/interactive/<task-id>-result.json", <result>)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Execution
|
||||
|
||||
### Phase 1: Context Loading
|
||||
|
||||
**Objective**: Load QA audit report and GC loop state
|
||||
|
||||
**Input**:
|
||||
|
||||
| Source | Required | Description |
|
||||
|--------|----------|-------------|
|
||||
| QA audit report | Yes | The audit document to review |
|
||||
| discoveries.ndjson | No | Shared discoveries for context |
|
||||
| Master CSV (tasks.csv) | No | For GC round tracking |
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Extract session path from task assignment
|
||||
2. Read the QA audit report referenced in the task description
|
||||
3. Read discoveries.ndjson for additional context
|
||||
4. Check current GC round count from session state
|
||||
|
||||
**Output**: QA verdict summary ready for review
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Gate Decision
|
||||
|
||||
**Objective**: Determine next action based on QA verdict
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. Parse QA verdict from audit report:
|
||||
|
||||
| Verdict | GC Round | Action |
|
||||
|---------|----------|--------|
|
||||
| PASSED | any | Report approved, no fix cycle needed |
|
||||
| PASSED_WITH_WARNINGS | any | Report approved with warnings noted |
|
||||
| FIX_REQUIRED | < 2 | Create DEV-fix + QA-recheck tasks |
|
||||
| FIX_REQUIRED | >= 2 | Escalate to user for manual intervention |
|
||||
|
||||
2. If escalation needed, present choice:
|
||||
|
||||
```javascript
|
||||
AskUserQuestion({
|
||||
questions: [{
|
||||
question: "QA has flagged issues after 2 fix rounds. How would you like to proceed?",
|
||||
header: "QA Gate",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Accept current state", description: "Proceed despite remaining issues" },
|
||||
{ label: "Manual fix", description: "You will fix the issues manually" },
|
||||
{ label: "Abort pipeline", description: "Stop the pipeline" }
|
||||
]
|
||||
}]
|
||||
})
|
||||
```
|
||||
|
||||
3. Handle response accordingly
|
||||
|
||||
**Output**: Gate decision with action directive
|
||||
|
||||
---
|
||||
|
||||
## Structured Output Template
|
||||
|
||||
```
|
||||
## Summary
|
||||
- QA audit reviewed: <audit-id>
|
||||
- Verdict: <PASSED|PASSED_WITH_WARNINGS|FIX_REQUIRED>
|
||||
- Score: <score>/10
|
||||
- Decision: <approved|fix-cycle|escalated|aborted>
|
||||
|
||||
## Findings
|
||||
- Critical issues: <count>
|
||||
- High issues: <count>
|
||||
- Medium issues: <count>
|
||||
- Low issues: <count>
|
||||
|
||||
## Decision Details
|
||||
- GC round: <current>/<max>
|
||||
- Action: <proceed|create-fix-cycle|escalate|abort>
|
||||
- User feedback: <if applicable>
|
||||
|
||||
## Open Questions
|
||||
1. Any unresolved items from review
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Scenario | Resolution |
|
||||
|----------|------------|
|
||||
| QA audit report not found | Report in Open Questions, ask for path |
|
||||
| GC round state missing | Default to round 0 |
|
||||
| User does not respond | Timeout, report partial with "awaiting-review" status |
|
||||
| Processing failure | Output partial results with clear status indicator |
|
||||
Reference in New Issue
Block a user