Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/global-agent-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const globalAgentInstructionSourceInputs: InstructionSourceInput[] = [
"",
"Automatically rename the session when the agent runtime supports it, using a concise task- or repo-specific name that improves later coordination.",
"",
"Repo mutation must happen in a task-specific worktree under the canonical worktree root $HOME/.hasna/repos/worktrees. Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree rooted there. Never mutate shared checkouts. Normal changes are PR-first: use a branch/worktree and open or prepare a PR for landing.",
"Repo mutation must happen in a task-specific worktree at the canonical worktree path $HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name> (repo name then worktree name; do not insert a station-id or machine segment and do not place worktrees flat under the worktrees root). Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree at that path and run `repos scan` afterwards. Never mutate shared checkouts. Normal changes are PR-first: use a branch/worktree and open or prepare a PR for landing.",
"",
"Never push directly to main, default, or protected branches unless the user explicitly instructs that exact repository and exact operation. Preserve unrelated code and avoid broad cleanup that is not required for the task.",
"",
Expand Down Expand Up @@ -189,7 +189,7 @@ export const globalAgentInstructionSourceInputs: InstructionSourceInput[] = [
"2. Hasna CLIs/packages are the source of truth for their domains: todos, conversations, mementos, knowledge, projects, repos, accounts, instructions, machines, secrets, and access.",
"3. Planning and evidence belong in Todos CLI tasks and todos plans. Keep task status, comments, commits, verification commands, and handoff evidence current.",
"4. Use automatic session renaming when the agent supports it, with a concise task- or repo-specific name.",
"5. Repo mutation must happen in a task-specific worktree under the canonical worktree root $HOME/.hasna/repos/worktrees. Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree rooted there. Never mutate shared checkouts.",
"5. Repo mutation must happen in a task-specific worktree at the canonical worktree path $HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name> (repo name then worktree name; do not insert a station-id or machine segment and do not place worktrees flat under the worktrees root). Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree at that path and run `repos scan` afterwards. Never mutate shared checkouts.",
"6. PR-first landing is the default: normal changes go through a branch/worktree plus a pull request or prepared pull-request handoff.",
"7. Never push directly to main, default, or protected branches unless the user explicitly instructs that exact repo and exact operation.",
`8. ${noBrittleHardcodingRule}`,
Expand Down Expand Up @@ -262,7 +262,7 @@ export const globalAgentInstructionSourceInputs: InstructionSourceInput[] = [
"7. Act autonomously: diagnose and repair owning CLIs, packages, and workflows before asking the user; ask only for destructive, secret-bearing, or user-only decisions.",
"",
"CODE AND LANDING RULES",
"8. Repo mutation must happen in a task-specific worktree under the canonical worktree root $HOME/.hasna/repos/worktrees. Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree rooted there. Never mutate shared checkouts.",
"8. Repo mutation must happen in a task-specific worktree at the canonical worktree path $HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name> (repo name then worktree name; do not insert a station-id or machine segment and do not place worktrees flat under the worktrees root). Prefer Hasna repo/project worktree mechanisms when available; otherwise use git worktree at that path and run `repos scan` afterwards. Never mutate shared checkouts.",
"9. PR-first landing is the default: normal changes go through a branch/worktree plus a pull request or prepared pull-request handoff.",
"10. Never push directly to main, default, or protected branches unless the user explicitly instructs that exact repo and exact operation.",
`11. ${noBrittleHardcodingRule}`,
Expand Down Expand Up @@ -326,7 +326,7 @@ export const globalAgentInstructionSourceInputs: InstructionSourceInput[] = [
"",
"Render this source into Antigravity managed instruction blocks using the renderer-owned Antigravity path convention. Preserve repository and user instructions outside the managed block.",
"",
"Use Todos CLI tasks and plans as the source of truth for Antigravity work. Keep mutation in task-specific worktrees under $HOME/.hasna/repos/worktrees and use PR-first landing for normal changes.",
"Use Todos CLI tasks and plans as the source of truth for Antigravity work. Keep mutation in task-specific worktrees at $HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name> and use PR-first landing for normal changes.",
"",
"Antigravity is an active global instruction provider target. Do not create or restore Gemini as an active provider target in this source set.",
]),
Expand Down
Loading