When providing code returns, always use the `+-` patch format to prevent overwriting existing functions. This ensures that changes are clear and maintainable.
Catalyst Coding Standards
Follow these standards when coding in Catalyst:
Use Moose for object-oriented programming.
Keep controllers slim by moving business logic to models.
Use clear and descriptive names for actions and methods.
Implement error handling gracefully.
Testing Guidelines
Ensure that your code is thoroughly tested, including testing for both .tt templates and the underlying code. Some key points to consider:
Review .tt templates for proper syntax and ensure all necessary variables are passed correctly.
Write unit tests to validate the behavior of individual functions and methods.
Run integration tests to ensure the application components work together as expected.
Implement automated testing frameworks to catch regressions early in the development process.
Keep the documentation up-to-date and comprehensive. Ensure that all changes to the codebase are reflected in the corresponding documentation sections.
A Git workflow refers to the agreed-upon process for how developers should use Git to manage code changes, collaborate on features, and maintain the codebase. The key elements of the recommended Git workflow for this project are:
Establish a clear branching strategy:
Guidelines for when to create new feature branches:
Create a new feature branch for each new feature or bug fix. This helps in isolating changes and makes it easier to manage and review code.
Start a feature branch from the latest version of the main development branch to ensure you have the most recent updates.
Use feature branches for experimental work that might not be ready for production.
How to name branches:
Use descriptive names that reflect the purpose of the branch, such as `feature/login-page` or `bugfix/user-authentication`.
Include identifiers like ticket numbers or issue IDs if applicable, e.g., `feature/1234-login-page`.
Maintain consistency in naming conventions across the team to avoid confusion.
Managing merging back into the main development branch:
Before merging, ensure your feature branch is up-to-date with the main development branch by regularly pulling the latest changes.
Resolve any conflicts that arise during the merge process to ensure a smooth integration.
Conduct code reviews and obtain necessary approvals before merging to maintain code quality and consistency.
Use pull requests to facilitate discussion and review of the changes before they are merged into the main branch.
Guidelines for deleting or keeping a branch after merging:
Delete a branch after merging if:
The feature or bug fix is complete and no further changes are expected.
Keeping the branch would clutter the repository with obsolete branches.
Keep a branch after merging if:
Further development or bug fixes are anticipated on the same feature.
The branch serves as a reference for ongoing or related work.
Provide guidance on writing clear and informative commit messages:
Explain the purpose and scope of each change.
Document the process for submitting changes for review:
Creating pull requests.
Getting approvals from other team members.
Describe the steps for merging approved changes into the main branch:
Include any necessary testing or deployment procedures.
Emphasize the importance of keeping the codebase clean and well-organized:
Regularly remove obsolete branches and commits.
Follow the established Git workflow for the project, including regular commits with meaningful messages and the use of feature branches for new developments.
When planning your sessions, please follow these guidelines:
Please read sessionplan.tt.
Compare the current prompt and the plan you would create for it with the session plan.
Modify the current session plan to incorporate the plan you just created.
Example Prompt
When reminding the assistant, you can say: "Please follow the guidelines outlined in guidelines.tt, especially regarding the `+-` patch format for code returns and the prohibition on using placeholders in code returns."