Strict code review guidelines for AgentScope LLM application framework, covering lazy loading, security, testing, documentation standards, and Git conventions.
Conduct strict code review for the AgentScope framework. Each requirement has a priority level:
When reviewing code changes in the AgentScope codebase, evaluate against these criteria:
#### [MUST] Lazy Loading
```python
def get_xxx_cls() -> "MyClass":
from xxx import BaseClass
class MyClass(BaseClass): ...
return MyClass
```
#### [SHOULD] Code Conciseness
After understanding the code intent:
#### [MUST] Encapsulation Standards
#### [MUST] Comment Standards
All comments and documentation must be in **English**.
All classes and methods require complete docstrings following this template:
```python
def func(a: str, b: int | None = None) -> str:
"""{description}
Args:
a (`str`):
The argument a
b (`int | None`, optional):
The argument b
Returns:
`str`:
The return str
"""
```
For special content, use reStructuredText syntax:
```python
class MyClass:
"""xxx
`Example link <https://xxx>`_
.. note:: Example note
.. tip:: Example tip
.. important:: Example important info
.. code-block:: python
def hello_world():
print("Hello world!")
"""
```
#### [MUST] Pre-commit Checks
#### [MUST] PR Title
Follow Conventional Commits format:
1. Check lazy loading compliance for all third-party imports
2. Scan for security vulnerabilities (hardcoded credentials, injection risks)
3. Verify unit tests exist for new features
4. Validate all docstrings follow the template exactly
5. Confirm pre-commit checks pass (or have valid exception)
6. Verify PR title follows Conventional Commits format
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/agentscope-code-review-bcwp37/raw