docs: update AGENT.md to adopt Atlassian Feature Branch Workflow
This commit is contained in:
@@ -4,15 +4,18 @@ alwaysOn: true
|
|||||||
always_on: true
|
always_on: true
|
||||||
glob: "*"
|
glob: "*"
|
||||||
---
|
---
|
||||||
## Branching & Conflict Resolution Strategy (GitHub Flow)
|
## Git Feature Branch Workflow
|
||||||
|
|
||||||
This project strictly follows the **GitHub Flow**. All development happens in short-lived feature branches branched off from `main`. Direct commits to `main` are prohibited.
|
This project strictly follows the **Git Feature Branch Workflow** (as defined by [Atlassian](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow)).
|
||||||
|
The core idea is that all feature development should take place in a dedicated branch instead of the `main` branch.
|
||||||
|
|
||||||
### 1. Development Workflow
|
### 1. Development Workflow
|
||||||
1. **Branch Creation:** Create a descriptive branch from the latest `main` state:
|
1. **Never Commit to Main:** Direct commits to `main` are strictly prohibited. `main` must always be stable and deployable.
|
||||||
`git checkout main && git pull && git checkout -b feature/your-feature-name`
|
2. **Branch Creation:** Create a descriptive branch from the latest `main` state (e.g., `feature/animated-menu-items` or `issue-#1061`):
|
||||||
2. **Atomic Commits:** Make small, logical, and self-contained commits.
|
`git checkout main && git pull origin main && git checkout -b feature/your-feature-name`
|
||||||
3. **Push & Pull Request:** Push the branch and open a Pull Request (PR) against `main` for review.
|
3. **Atomic Commits:** Make small, logical, and self-contained commits to your feature branch.
|
||||||
|
4. **Push & Pull Request:** Push the feature branch to the remote repository and open a Pull Request (PR) against `main`. PRs act as a forum for discussing the feature and performing code reviews before it is merged.
|
||||||
|
5. **Merge & Close:** Once approved, the feature branch is merged into `main` and then deleted. (You can use the `close_feature` skill for this).
|
||||||
|
|
||||||
### 2. Merge Conflict Policy
|
### 2. Merge Conflict Policy
|
||||||
When multiple features are developed simultaneously, `main` might advance before your PR is merged, causing a merge conflict. **The author of the pending PR is solely responsible for resolving conflicts.**
|
When multiple features are developed simultaneously, `main` might advance before your PR is merged, causing a merge conflict. **The author of the pending PR is solely responsible for resolving conflicts.**
|
||||||
|
|||||||
Reference in New Issue
Block a user