Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:37:27 +08:00
commit 37774aa937
131 changed files with 31137 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
---
name: ln-332-task-reviewer
description: Reviews completed tasks (To Review) and moves them to Done or To Rework. Zero tolerance: all issues fixed now.
---
# Task Reviewer
Reviews a single task in To Review and decides Done vs To Rework with immediate fixes or clear rework notes.
## Purpose & Scope
- Load full task and parent Story; understand AC, context, and Technical Approach.
- Check architecture, correctness, configuration hygiene, docs, and tests.
- For test tasks, verify risk-based limits and priority (≤15) per planner template.
- Update only this task: accept (Done) or send back (To Rework) with explicit reasons and fix suggestions tied to best practices.
## Workflow (concise)
1) **Select task:** Use provided ID or pick from To Review list. Detect type (label "tests" -> test task, else implementation/refactor).
2) **Read context:** Full task + parent Story; load affected components/docs; review diffs if available.
3) **Review checks:**
- Approach matches Technical Approach or better (documented rationale).
- No hardcoded creds/URLs/magic numbers; config in env/config.
- Error handling/logging sane; layering respected; reuse existing components.
- Docs updated where required.
- Tests updated/run: for impl/refactor ensure affected tests adjusted; for test tasks check counts (E2E 2-5, Integration 0-8, Unit 0-15, total 10-28) and Priority ≤15, no framework/DB tests.
4) **Decision:**
- If only nits: apply minor fixes and set Done.
- If issues remain: set To Rework with comment explaining why (best-practice ref) and how to fix.
5) **Update:** Set task status (Done or To Rework) in Linear; move task in kanban accordingly; add review comment with findings/actions.
## Critical Rules
- One task at a time; do not touch others.
- Zero tolerance: no deferring issues; either fix now or send back with guidance.
- Keep language of the task (EN/RU) in comments/edits.
- If test-task limits/priority violated -> To Rework with guidance.
- Never leave task Done if any unresolved issue exists.
## Definition of Done
- Task and parent Story fully read; type identified.
- Review checklist completed; docs/tests/config verified.
- Decision applied: Done (minor fixes applied) or To Rework (issues + fix guidance).
- Linear status and kanban updated for this task; review comment posted with reasons and suggested fixes.
## Reference Files
- Test tasks: `../ln-350-story-test-planner/references/test_task_template.md`, `../ln-350-story-test-planner/references/risk_based_testing_guide.md`
- Kanban format: `docs/tasks/kanban_board.md`
---
Version: 4.0.0 (Condensed review flow and zero-tolerance guidance)
Last Updated: 2025-11-26

View File

@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ln-332-task-reviewer - State Diagram</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="../shared/css/diagram.css">
</head>
<body>
<div class="container">
<header>
<h1>🔍 ln-332-task-reviewer</h1>
<p class="subtitle">Task Reviewer - State Diagram</p>
</header>
<div class="info-box">
<h3>📋 Overview</h3>
<ul>
<li><strong>Purpose:</strong> Review tasks (To Review → Done/Rework) distinguishing test/implementation</li>
<li><strong>3 Verdicts:</strong> Accept ✅ / Minor Fixes 🔧 / Needs Rework ❌</li>
<li><strong>Checks:</strong> Universal (Architecture, DRY, KISS, YAGNI, Docs, Security) + Task Type-Specific</li>
</ul>
</div>
<div class="diagram-container">
<div class="mermaid">
graph TD
Start([Start: Review Task]) --> Phase1[Phase 1: Discovery<br/>Team ID auto-discovery]
Phase1 --> Phase2[Phase 2: Preparation<br/>Load task To Review + diffs<br/>Determine type: test/implementation]
Phase2 --> Phase3[Phase 3: Review Checklist]
subgraph Checklist [Review Checks]
C1[3.1: Universal Checks<br/>Architecture DRY KISS YAGNI<br/>Docs Security Quality<br/>No Legacy Code]
C1 --> C2[3.2: Task Type-Specific Checks<br/>If test task: test limits 10-28<br/>Priority ≥15 scenarios<br/>NO performance/load tests]
end
Phase3 --> C1
C2 --> Phase4
Phase4[Phase 4: Verdict & Update]
Phase4 --> Verdict{Verdict?}
Verdict -->|Accept ✅| Accept[Update checkboxes<br/>To Review → Done<br/>Update kanban + Commit]
Verdict -->|Minor Fixes 🔧| MinorFixes[Apply fixes<br/>To Review → Done<br/>Update kanban + Commit]
Verdict -->|Needs Rework ❌| Rework[Feedback comment<br/>To Review → To Rework<br/>Update kanban NO commit]
Accept --> End([End])
MinorFixes --> End
Rework --> End
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef processing fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
classDef error fill:#FFCDD2,stroke:#C62828,stroke-width:2px
class Phase1,Phase2 discovery
class Phase3,C1,C2,Phase4 processing
class Verdict decision
class Accept,MinorFixes action
class Rework error
</div>
</div>
<footer>
<p>ln-332-task-reviewer | Chat prefix: 🔍 [REVIEWER]</p>
</footer>
</div>
<script>
mermaid.initialize({ startOnLoad: true, theme: 'default', flowchart: { useMaxWidth: true, htmlLabels: true, curve: 'basis' } });
</script>
</body>
</html>