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.
|
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
|
## Git workflow
|
||||||
|
|
||||||
### Auto-commit on spec completion
|
### Auto-commit on spec completion
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
|||||||
branch,
|
branch,
|
||||||
path: filePath,
|
path: filePath,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
if (data.is_binary) {
|
if (data.is_binary) {
|
||||||
@@ -100,7 +100,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
|||||||
branch,
|
branch,
|
||||||
path: filePath,
|
path: filePath,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
if (data.is_binary) {
|
if (data.is_binary) {
|
||||||
@@ -157,7 +157,7 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
|||||||
commit_message: message,
|
commit_message: message,
|
||||||
author_name: user.name || "User",
|
author_name: user.name || "User",
|
||||||
author_email: user.email || "user@example.com",
|
author_email: user.email || "user@example.com",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
setOriginalContent(content);
|
setOriginalContent(content);
|
||||||
setMode("view");
|
setMode("view");
|
||||||
@@ -210,24 +210,27 @@ export const FileEditor: React.FC<FileEditorProps> = ({
|
|||||||
{filePath?.split("/").map((part, i, arr) => (
|
{filePath?.split("/").map((part, i, arr) => (
|
||||||
<span key={i}>
|
<span key={i}>
|
||||||
{part}
|
{part}
|
||||||
{i < arr.length - 1 && (
|
{i < arr.length - 1 && <span className="breadcrumb-sep">/</span>}
|
||||||
<span className="breadcrumb-sep">/</span>
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.fileActions}>
|
<div className={styles.fileActions}>
|
||||||
{fileStatus && (
|
{fileStatus && (
|
||||||
<span className={`git-status-badge ${fileStatus}`} title={fileStatus}>
|
<span
|
||||||
{fileStatus === "modified" ? "M" : fileStatus === "added" ? "A" : fileStatus === "deleted" ? "D" : "?"}
|
className={`git-status-badge ${fileStatus}`}
|
||||||
|
title={fileStatus}
|
||||||
|
>
|
||||||
|
{fileStatus === "modified"
|
||||||
|
? "M"
|
||||||
|
: fileStatus === "added"
|
||||||
|
? "A"
|
||||||
|
: fileStatus === "deleted"
|
||||||
|
? "D"
|
||||||
|
: "?"}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{mode === "view" && !isBinary && (
|
{mode === "view" && !isBinary && (
|
||||||
<button
|
<button className="btn-primary" onClick={handleEdit} type="button">
|
||||||
className="btn-primary"
|
|
||||||
onClick={handleEdit}
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<Icon name="edit" size="sm" />
|
<Icon name="edit" size="sm" />
|
||||||
Edit
|
Edit
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -78,7 +78,13 @@ export type IconName =
|
|||||||
| "arrow-left"
|
| "arrow-left"
|
||||||
| "undo";
|
| "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,
|
dashboard: House,
|
||||||
projects: Folder,
|
projects: Folder,
|
||||||
repositories: GitBranch,
|
repositories: GitBranch,
|
||||||
|
|||||||
@@ -198,7 +198,11 @@ export const RepoWorkspace = () => {
|
|||||||
)}
|
)}
|
||||||
<main className="workspace-main">
|
<main className="workspace-main">
|
||||||
{selectedRepoId && (
|
{selectedRepoId && (
|
||||||
<FileEditor projectId={projectId!} repoId={selectedRepoId} gitStatus={gitStatus} />
|
<FileEditor
|
||||||
|
projectId={projectId!}
|
||||||
|
repoId={selectedRepoId}
|
||||||
|
gitStatus={gitStatus}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user