Skip to content

Add Augment Enterprise Rules#2

Open
rafaeltuelho wants to merge 1 commit intomainfrom
add-augment-enterprise-rules
Open

Add Augment Enterprise Rules#2
rafaeltuelho wants to merge 1 commit intomainfrom
add-augment-enterprise-rules

Conversation

@rafaeltuelho
Copy link
Copy Markdown
Member

Description

This PR adds enterprise-wide Augment Code rules to standardize development practices across our organization.

Rules Included

  • Agent Tool Calls (): Agent tool call tracking and rules file usage reporting
  • Backend Rules (): Python 3 best practices including type hints, uv package manager, and API design patterns
  • Coding Standards (): Code style, formatting, and automated linters configuration
  • Docs (): Documentation update requirements for code changes
  • Documentation Rules (): Comprehensive docstrings and documentation standards for all public APIs
  • Frontend Rules (): TypeScript strict mode, React best practices, and CSS standards
  • Logging Rules (): Log levels, structured logging, and best practices
  • REST API Rules (): REST API best practices with OpenAPI/Swagger documentation
  • Security Rules (): Input validation, sanitization, and security best practices

Benefits

  • Consistent code quality across all projects
  • Better AI-assisted development with Augment Agent
  • Standardized best practices for security, documentation, and logging
  • Improved code review efficiency

Next Steps

After merging this PR, Augment Agent will automatically use these rules when providing code suggestions and reviews for this repository.

Questions?

Please review the individual rules files for detailed guidelines and examples.

This commit adds enterprise-wide Augment Code rules to standardize
development practices across the organization.

Rules included:
- agent_tool_calls.md - Agent tool call tracking and rules file usage reporting
- backend-rules.md - Python 3 best practices and type hints
- coding-standards.md - Code style, formatting, and automated linters
- docs.md - Documentation update requirements for code changes
- documentation-rules.md - Comprehensive docstrings and documentation standards
- frontend-rules.md - TypeScript strict mode and React best practices
- logging-rules.md - Log levels and structured logging standards
- rest-api-rules.md - REST API best practices with OpenAPI documentation
- security-rules.md - Input validation and security best practices

These rules will help Augment Agent provide better, more consistent
code suggestions aligned with our organizational standards.
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Comment augment review to trigger a new review at any time.

<div>
<h3>{name}</h3>
<p>{email}</p>
{onEdit && <button onClick={() => onEdit(email)}>Edit</button>}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onEdit prop is typed as (userId: string) => void but the example calls onEdit(email), which mismatches the intended argument and could confuse readers; consider aligning the call with the declared parameter.

🤖 Was this useful? React with 👍 or 👎

}

# Add extra fields if present
if hasattr(record, "extra"):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Python logging, keys passed via extra={...} are added as top-level attributes on LogRecord, not under record.extra; as written, the hasattr(record, "extra") check means those extra fields won’t be included.

🤖 Was this useful? React with 👍 or 👎

return payload
except jwt.ExpiredSignatureError:
return None
except jwt.JWTError:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jwt.JWTError is from python-jose, but this example imports jwt (PyJWT); with PyJWT you’d typically catch jwt.InvalidTokenError (or similar), otherwise this exception block won’t execute.

🤖 Was this useful? React with 👍 or 👎

detail="User with this email already exists"
)
new_user = await db.create_user(user)
return UserResponse.from_orm(new_user)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example declares pydantic>=2.0.0 but uses UserResponse.from_orm(...) and an inner Config class; in Pydantic v2, from_orm is replaced and configuration uses model_config, so this may be misleading for readers.

🤖 Was this useful? React with 👍 or 👎

Comment thread .augment/rules/docs.md
type: "agent_requested"
---

- Whenever performing a change that needs to be reflected in the project's documentation, make sure to update the relevant documentation (`.md` files) files as well. No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor wording: "documentation (.md files) files" repeats the word "files"; removing the duplication would improve clarity.

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant