Add test coverage checklist, report template, and stack matrix for ecommerce project

- Created a test coverage checklist to ensure comprehensive testing of backend and frontend components.
- Added a test report template to standardize reporting on test execution results and gaps.
- Introduced a test stack matrix to guide the selection of testing tools and frameworks for backend and frontend.
- Established a skill for repairing failing tests, including a failure triage checklist and a test repair template.
- Documented recommended MCP stack for ecommerce development with FastAPI and React/Next.js.
- Developed a detailed README outlining the project structure, agent capabilities, and recommended workflows.
- Compiled a comprehensive workflow guide detailing step-by-step commands for project setup, testing, and SEO implementation.
This commit is contained in:
ВяткинАртём
2026-05-20 18:09:24 +03:00
parent 5699670ea0
commit 2817cf8dc6
96 changed files with 2987 additions and 2888 deletions
@@ -0,0 +1,52 @@
# CODE-REVIEW.md Template
## 1. Review Scope
- Reviewed repository or area
- Config files inspected
- Runtime and toolchain assumptions
## 2. Executive Summary
- Overall quality assessment
- Highest-risk areas
- Biggest maintainability concerns
## 3. Findings
### Critical
- Findings
### High
- Findings
### Medium
- Findings
### Low
- Findings
## 4. Python Quality Notes
- Type system and strictness
- Tooling alignment
- Dependency hygiene
- Modern Python usage
## 5. React and Frontend Notes
- Readability and maintainability
- State and effects
- Performance-sensitive areas
- Modern framework usage
## 6. Configuration and Tooling Notes
- pyproject quality rules
- frontend config quality
- gaps and inconsistencies
## 7. Testing and Risk Gaps
- Missing tests
- weak assertions
- release risks
## 8. Recommended Fix Order
- Immediate blockers
- short-term fixes
- structural cleanup
@@ -0,0 +1,50 @@
# Project Review Checklist
## Architecture and maintainability
- Module boundaries are clear.
- Cross-layer dependencies are controlled.
- The code does not hide business logic in the wrong layer.
- Naming is precise and stable.
- Public interfaces are coherent.
## Python backend
- Type coverage and strictness align with project configuration.
- Async and I/O boundaries are explicit and safe.
- Data validation and domain modeling are coherent.
- Error handling is consistent.
- Dependency usage is justified and clean.
- Imports, complexity, and dead code align with configured linters.
- Modern Python features are used when they improve the code and match the configured interpreter version.
## React or Next.js frontend
- Components are readable and easy to modify.
- State ownership is clear.
- Derived state and side effects are not overcomplicated.
- Data fetching and caching strategy are coherent.
- Accessibility, loading states, empty states, and error states are covered.
- Expensive renders, unstable props, and unnecessary abstractions are avoided.
- Newer framework features are used where they meaningfully improve code quality and are supported by the installed version.
## Performance and optimization
- Hot paths are identified.
- No obvious over-fetching or over-rendering.
- Expensive work is not repeated without reason.
- Assets and bundles are handled sensibly.
## Dependency and configuration hygiene
- Dependencies match actual imports and usage.
- Dev and runtime dependencies are separated properly.
- Tooling configuration is coherent.
- The code follows the quality rules implied by the configuration files.
## Security and reliability
- Sensitive flows are validated.
- Auth and permission checks are consistent.
- Dangerous defaults are avoided.
- Error handling does not leak implementation details.
## Testing and verification
- Tests cover high-risk business flows.
- Assertions are meaningful.
- Cleanup and fixture behavior are reliable.
- Gaps in test coverage are identified honestly.
@@ -0,0 +1,26 @@
# Python Quality Matrix
## Configuration detection
- Read `pyproject.toml` first.
- Detect the configured Python version.
- Detect `mypy`, `ty`, `ruff`, `deptry`, `pytest`, and formatter configuration.
## Review rules
- If `mypy` is configured, check the actual options before judging missing annotations or strictness violations.
- If `ty` is configured, use its configured expectations and error model.
- If both exist, respect whichever toolchain the project clearly treats as authoritative, and flag inconsistent duplication.
- If `ruff` is configured, review for meaningful rule violations, not cosmetic churn.
- If `deptry` is configured, verify dependency placement, unused dependencies, and hidden transitive reliance.
## Modern Python usage
- Use modern typing syntax only when the configured Python version supports it.
- Prefer `typing.Self`, `typing.TypeAliasType`, `typing.override`, `collections.abc` imports, `match`, `enum.StrEnum`, dataclass slots, and other newer features only when they improve clarity and compatibility.
- Do not suggest a newer language feature that the configured interpreter cannot run.
## Common harsh checks
- Weak or missing type boundaries.
- Hidden `Any` spread.
- Async misuse.
- Leaky ORM or transport models.
- Overly dynamic code that defeats static analysis.
- Wrong dependency classification.
@@ -0,0 +1,28 @@
# React Review Matrix
## Configuration detection
- Read `package.json`, `tsconfig.json`, ESLint config, framework config, and build setup.
- Detect React version, Next.js version, TypeScript version, and testing setup.
## Readability rules
- Components should be easy to scan.
- Props should be explicit and well named.
- Business logic should not be buried in JSX noise.
- Avoid deeply nested conditional rendering when a clearer structure would help.
- Prefer predictable state flow over clever abstractions.
## Modern React usage
- Use modern React and framework features only when the installed version supports them and they improve maintainability.
- Check whether newer APIs such as `useEffectEvent`, transitions, server components, or framework-native data loading would simplify the code.
- Do not insist on `useMemo` or `useCallback` unless they are justified.
- Avoid stale patterns if the installed version provides a clearer and safer replacement.
## Harsh review checks
- Unclear ownership of state.
- Effect misuse.
- Derived state bugs.
- Excessive prop drilling when a better structure exists.
- Over-componentization that hurts readability.
- Poor separation between UI, data, and business rules.
- Missing loading, empty, and error states.
- Avoidable render churn and unstable object creation in hot paths.
@@ -0,0 +1,24 @@
# Severity Rubric
## Critical
- Likely to cause broken behavior, data loss, security issues, or severe production instability.
- Major architecture flaw affecting core flows.
## High
- Strong risk of bugs, regressions, maintainability collapse, or significant performance issues.
- Serious mismatch with configured quality rules.
## Medium
- Clear quality issue or missed optimization that should be fixed, but not an immediate release blocker.
## Low
- Smaller maintainability issues, cleanup, or polish items.
## Finding format
- Severity
- Area
- Location
- Problem
- Why it matters
- Recommended fix
- Confidence or assumptions when relevant