chore: add dev branch policy to AGENTS.md
- Document that dev is the default working branch - main is reserved for stable/production merges only
This commit is contained in:
@@ -85,6 +85,13 @@ Before completion, report:
|
||||
|
||||
Do not claim completion without verification evidence.
|
||||
|
||||
## Git branch policy
|
||||
|
||||
- **Default working branch:** `dev` — all commits and pushes target `dev` unless the user explicitly requests otherwise.
|
||||
- `main` is the stable/production branch; merge to `main` only when explicitly instructed.
|
||||
- After committing, push to `origin/dev`.
|
||||
- If `dev` does not exist locally, create it from `main` or fetch it from origin.
|
||||
|
||||
## Git workflow
|
||||
|
||||
### Auto-commit on spec completion
|
||||
|
||||
@@ -50,7 +50,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
||||
branch,
|
||||
path: filePath,
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
const data = response.data;
|
||||
if (data.is_binary) {
|
||||
@@ -100,7 +100,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
||||
branch,
|
||||
path: filePath,
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
const data = response.data;
|
||||
if (data.is_binary) {
|
||||
@@ -157,7 +157,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
||||
commit_message: message,
|
||||
author_name: user.name || "User",
|
||||
author_email: user.email || "user@example.com",
|
||||
}
|
||||
},
|
||||
);
|
||||
setOriginalContent(content);
|
||||
setMode("view");
|
||||
@@ -210,24 +210,27 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
||||
{filePath?.split("/").map((part, i, arr) => (
|
||||
<span key={i}>
|
||||
{part}
|
||||
{i < arr.length - 1 && (
|
||||
<span className="breadcrumb-sep">/</span>
|
||||
)}
|
||||
{i < arr.length - 1 && <span className="breadcrumb-sep">/</span>}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className={styles.fileActions}>
|
||||
{fileStatus && (
|
||||
<span className={`git-status-badge ${fileStatus}`} title={fileStatus}>
|
||||
{fileStatus === "modified" ? "M" : fileStatus === "added" ? "A" : fileStatus === "deleted" ? "D" : "?"}
|
||||
<span
|
||||
className={`git-status-badge ${fileStatus}`}
|
||||
title={fileStatus}
|
||||
>
|
||||
{fileStatus === "modified"
|
||||
? "M"
|
||||
: fileStatus === "added"
|
||||
? "A"
|
||||
: fileStatus === "deleted"
|
||||
? "D"
|
||||
: "?"}
|
||||
</span>
|
||||
)}
|
||||
{mode === "view" && !isBinary && (
|
||||
<button
|
||||
className="btn-primary"
|
||||
onClick={handleEdit}
|
||||
type="button"
|
||||
>
|
||||
<button className="btn-primary" onClick={handleEdit} type="button">
|
||||
<Icon name="edit" size="sm" />
|
||||
Edit
|
||||
</button>
|
||||
|
||||
@@ -78,7 +78,13 @@ export type IconName =
|
||||
| "arrow-left"
|
||||
| "undo";
|
||||
|
||||
const iconMap: Record<IconName, React.ComponentType<{ size?: number | string; weight?: "thin" | "light" | "regular" | "bold" | "fill" | "duotone" }>> = {
|
||||
const iconMap: Record<
|
||||
IconName,
|
||||
React.ComponentType<{
|
||||
size?: number | string;
|
||||
weight?: "thin" | "light" | "regular" | "bold" | "fill" | "duotone";
|
||||
}>
|
||||
> = {
|
||||
dashboard: House,
|
||||
projects: Folder,
|
||||
repositories: GitBranch,
|
||||
|
||||
@@ -198,7 +198,11 @@ export const RepoWorkspace = () => {
|
||||
)}
|
||||
<main className="workspace-main">
|
||||
{selectedRepoId && (
|
||||
<FileEditor projectId={projectId!} repoId={selectedRepoId} gitStatus={gitStatus} />
|
||||
<FileEditor
|
||||
projectId={projectId!}
|
||||
repoId={selectedRepoId}
|
||||
gitStatus={gitStatus}
|
||||
/>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user