Update global agent completion rules
Build / build (push) Successful in 11s

This commit is contained in:
2026-07-18 14:09:46 -05:00
parent f25b8a3836
commit e4b77a63a6
6 changed files with 27 additions and 6 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ Use `.env.local` for local secrets. Keep `.env.local` and any real token-bearing
- Add URL is enabled only when the active tab's base URL is not already in the URLs list. The user must pick either a workspace or a Gitea repo; the app infers the linked counterpart from local context. - Add URL is enabled only when the active tab's base URL is not already in the URLs list. The user must pick either a workspace or a Gitea repo; the app infers the linked counterpart from local context.
- URLs can be deleted from the URLs list. User-added URLs are removed from storage; generated known URLs are hidden through the stored deleted-base list. - URLs can be deleted from the URLs list. User-added URLs are removed from storage; generated known URLs are hidden through the stored deleted-base list.
- The Agents view lists available agent files and must allow adding, editing, and deleting persisted agents from `chrome.storage.local`. At least one agent must remain available. - The Agents view lists available agent files and must allow adding, editing, and deleting persisted agents from `chrome.storage.local`. At least one agent must remain available.
- The default `GLOBAL AGENT` is backed by `AGENTS.md` and contains agnostic handoff rules with template variables such as `{{git}}`, `{{workspace}}`, `{{url}}`, `{{baseUrl}}`, `{{profile}}`, and `{{issue}}`. - The default `GLOBAL AGENT` is backed by `AGENTS.md` and contains agnostic handoff rules with template variables such as `{{git}}`, `{{workspace}}`, `{{url}}`, `{{baseUrl}}`, `{{profile}}`, and `{{issue}}`. It must tell downstream agents to close the Gitea issue after the implementation has been pushed, and to leave a Gitea issue comment when delivery is blocked, partial, or risky.
- Add Issue is enabled only when the active tab's base URL is already in the URLs list and has a linked Gitea repo. The issue form must show the target repo, the active URL the extension believes it is attached to, let the user select an agent file and issue labels, capture visible-tab screenshots, accept multiple accumulated Gitea-friendly file attachments, and include `Chrome profile: Silma` plus the selected agent in created issue bodies. - Add Issue is enabled only when the active tab's base URL is already in the URLs list and has a linked Gitea repo. The issue form must show the target repo, the active URL the extension believes it is attached to, let the user select an agent file and issue labels, capture visible-tab screenshots, accept multiple accumulated Gitea-friendly file attachments, and include `Chrome profile: Silma` plus the selected agent in created issue bodies.
- Clicking a captured screenshot must open an expanded preview with Close, Remove, and Crop controls. The crop area should be a simple draggable/resizable box without a shaded crop fill, and the preview panel should use the available viewport without horizontal scrolling. - Clicking a captured screenshot must open an expanded preview with Close, Remove, and Crop controls. The crop area should be a simple draggable/resizable box without a shaded crop fill, and the preview panel should use the available viewport without horizontal scrolling.
- Label options for issue creation and editing are `Change Request`, `Idea`, `Tabitha`, `Orson`, `Belisarius`, `Ozymandias`, and `Ready`. - Label options for issue creation and editing are `Change Request`, `Idea`, `Tabitha`, `Orson`, `Belisarius`, `Ozymandias`, and `Ready`.
+1 -1
View File
@@ -26,7 +26,7 @@ The deployable extension output is `dist/`. Load `dist/` in Chrome as an unpacke
Static assets, including the extension icon assets, live in `public/` and are copied into `dist/` during the build. Static assets, including the extension icon assets, live in `public/` and are copied into `dist/` during the build.
The app opens in the Chrome side panel. The top icon menu includes Add URL, URLs, Gitea repos, Workspaces, Agents, Issues, and Add Issue. Add URL is enabled only for an active tab base URL that is not already in the URLs list. URLs can be deleted from the list. The Agents view manages persisted agent files, starting with `GLOBAL AGENT` from `AGENTS.md`; agents can use variables such as `{{git}}`, `{{workspace}}`, and `{{url}}` in their markdown content. Add Issue is enabled when the active tab base URL is already linked to a Gitea repo; it shows the active URL being attached, creates an issue with the selected agent and selected labels, and uploads the rendered agent file plus accumulated screenshots and files as issue assets. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll crop panel. Issues lists recent issues by creation time, defaults to open issues for the current repo, can expand to all loaded repos, has Open/Closed status checkboxes plus an empty-by-default label filter, and lets a selected issue open directly in Gitea, log a placeholder Send to Codex payload, edit subject/content/labels against that issue's repo with content-version readback verification, view attachments and comments, upload more screenshots/files directly to the issue, and add a comment with screenshots and file attachments. Clicking the selected issue row again or the detail close control collapses the detail panel. Rows can be deleted, and existing issue attachments can be deleted. The app opens in the Chrome side panel. The top icon menu includes Add URL, URLs, Gitea repos, Workspaces, Agents, Issues, and Add Issue. Add URL is enabled only for an active tab base URL that is not already in the URLs list. URLs can be deleted from the list. The Agents view manages persisted agent files, starting with `GLOBAL AGENT` from `AGENTS.md`; agents can use variables such as `{{git}}`, `{{workspace}}`, and `{{url}}` in their markdown content. The default global agent tells downstream agents to close the Gitea issue after pushing the implementation and to comment when delivery is blocked, partial, or risky. Add Issue is enabled when the active tab base URL is already linked to a Gitea repo; it shows the active URL being attached, creates an issue with the selected agent and selected labels, and uploads the rendered agent file plus accumulated screenshots and files as issue assets. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll crop panel. Issues lists recent issues by creation time, defaults to open issues for the current repo, can expand to all loaded repos, has Open/Closed status checkboxes plus an empty-by-default label filter, and lets a selected issue open directly in Gitea, log a placeholder Send to Codex payload, edit subject/content/labels against that issue's repo with content-version readback verification, view attachments and comments, upload more screenshots/files directly to the issue, and add a comment with screenshots and file attachments. Clicking the selected issue row again or the detail close control collapses the detail panel. Rows can be deleted, and existing issue attachments can be deleted.
Builds generate `public/local-context.json` from `/Users/Tabitha/.openclaw/workspace_Father`. That snapshot links known workspaces to local Gitea repos and is copied into `dist/` so the built extension is self-contained. Builds generate `public/local-context.json` from `/Users/Tabitha/.openclaw/workspace_Father`. That snapshot links known workspaces to local Gitea repos and is copied into `dist/` so the built extension is self-contained.
+2 -1
View File
@@ -40,6 +40,7 @@ Required variables:
- Add Issue is enabled only when the active tab's base URL is already in the URLs list and that URL is linked to a Gitea repo. - Add Issue is enabled only when the active tab's base URL is already in the URLs list and that URL is linked to a Gitea repo.
- The Add Issue view must show the Gitea repo that will receive the issue and the active URL the extension believes it is attached to. - The Add Issue view must show the Gitea repo that will receive the issue and the active URL the extension believes it is attached to.
- The Add Issue form must let the user select the agent file for handoff. Agents are managed in the Agents view, persisted in `chrome.storage.local`, and the initial agent is `GLOBAL AGENT` backed by `AGENTS.md`. - The Add Issue form must let the user select the agent file for handoff. Agents are managed in the Agents view, persisted in `chrome.storage.local`, and the initial agent is `GLOBAL AGENT` backed by `AGENTS.md`.
- The default `GLOBAL AGENT` rules must instruct downstream agents to close the Gitea issue after pushing the implementation and to leave a Gitea issue comment when delivery is blocked, partial, or risky.
- The Add Issue view intentionally omits the redundant view header title/description. - The Add Issue view intentionally omits the redundant view header title/description.
- Add Issue and selected issue editing expose these label options: `Change Request`, `Idea`, `Tabitha`, `Orson`, `Belisarius`, `Ozymandias`, and `Ready`. - Add Issue and selected issue editing expose these label options: `Change Request`, `Idea`, `Tabitha`, `Orson`, `Belisarius`, `Ozymandias`, and `Ready`.
- New issues default to `Change Request` selected unless the user changes the label selection. - New issues default to `Change Request` selected unless the user changes the label selection.
@@ -80,7 +81,7 @@ Required variables:
- The Agents view must allow adding, editing, and deleting agent files. - The Agents view must allow adding, editing, and deleting agent files.
- At least one agent must remain available so Add Issue always has a handoff file. - At least one agent must remain available so Add Issue always has a handoff file.
- Agent records are persisted in `silmaAide.agents`. - Agent records are persisted in `silmaAide.agents`.
- The default `GLOBAL AGENT` should remain agnostic and use template variables instead of hard-coded project paths where possible. - The default `GLOBAL AGENT` should remain agnostic and use template variables instead of hard-coded project paths where possible. The built-in persisted global agent should pick up required completion rules without replacing unrelated custom text.
## Agent Checklist ## Agent Checklist
+1 -1
View File
@@ -19,7 +19,7 @@ Important files:
Build with `npm run build`. The deployable output directory is `dist/`; load that folder in Chrome as an unpacked extension or point deployment tooling at it. Do not edit `dist/` directly. Build with `npm run build`. The deployable output directory is `dist/`; load that folder in Chrome as an unpacked extension or point deployment tooling at it. Do not edit `dist/` directly.
UI behavior: the app renders as a Chrome side panel, not a draggable window. The menu items are Add URL, URLs, Gitea Repos, Workspaces, Agents, Issues, and Add Issue. Add URL is enabled only when the active tab base URL is not already known; the user must choose either a workspace or a Gitea repo, and the app infers the linked counterpart. URLs can be deleted from the list; user-added URLs are removed from storage, while generated known URLs are hidden through stored deleted bases. The Agents view manages persisted agent files and starts with `GLOBAL AGENT` backed by `AGENTS.md`; agent markdown can use `{{git}}`, `{{repo}}`, `{{workspace}}`, `{{url}}`, `{{baseUrl}}`, `{{profile}}`, and `{{issue}}` template variables. Add Issue is enabled only when the active tab base URL is known and linked to a Gitea repo. It shows the target repo and active URL, captures visible-tab screenshots with thumbnails, accepts accumulated file attachments, lets the user select an agent file and issue labels, creates the Gitea issue with the selected labels, and uploads the rendered agent file plus all screenshots/files. The label options are Change Request, Idea, Tabitha, Orson, Belisarius, Ozymandias, and Ready; new issues default to Change Request. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll draggable/resizable crop panel. Created issue bodies include `Chrome profile: Silma` and the selected agent. Issues lists recent issues by creation time, defaults to open issues for the active URL's linked repo through an `Only current repo` checkbox, can load recent issues across all loaded repos, supports Open/Closed status multiselect filtering, has an empty-by-default label filter, and shows selected issue subject/content/label edit fields that save against the selected issue repo with Gitea content-version readback verification, a direct Open in Gitea link, a placeholder Send to Codex console log action, attachments, comment chains, direct selected-issue screenshot/file attachment uploads, and a comment form with text, screenshots, and file attachments. Clicking the selected issue row again or the detail close control collapses the detail panel. Existing issue rows can be deleted after confirmation, and existing issue attachments can be deleted. Text-entry state updates must not blur focused Add Issue, selected issue edit, Issues comment, or Agents editor controls. Gitea repos are ordered by latest default-branch commit. Workspace and URL views show established links between local workspaces, known URLs, and Gitea repos. UI behavior: the app renders as a Chrome side panel, not a draggable window. The menu items are Add URL, URLs, Gitea Repos, Workspaces, Agents, Issues, and Add Issue. Add URL is enabled only when the active tab base URL is not already known; the user must choose either a workspace or a Gitea repo, and the app infers the linked counterpart. URLs can be deleted from the list; user-added URLs are removed from storage, while generated known URLs are hidden through stored deleted bases. The Agents view manages persisted agent files and starts with `GLOBAL AGENT` backed by `AGENTS.md`; agent markdown can use `{{git}}`, `{{repo}}`, `{{workspace}}`, `{{url}}`, `{{baseUrl}}`, `{{profile}}`, and `{{issue}}` template variables. The default global agent tells downstream agents to close the Gitea issue after pushing the implementation and to leave a Gitea issue comment when delivery is blocked, partial, or risky. Add Issue is enabled only when the active tab base URL is known and linked to a Gitea repo. It shows the target repo and active URL, captures visible-tab screenshots with thumbnails, accepts accumulated file attachments, lets the user select an agent file and issue labels, creates the Gitea issue with the selected labels, and uploads the rendered agent file plus all screenshots/files. The label options are Change Request, Idea, Tabitha, Orson, Belisarius, Ozymandias, and Ready; new issues default to Change Request. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll draggable/resizable crop panel. Created issue bodies include `Chrome profile: Silma` and the selected agent. Issues lists recent issues by creation time, defaults to open issues for the active URL's linked repo through an `Only current repo` checkbox, can load recent issues across all loaded repos, supports Open/Closed status multiselect filtering, has an empty-by-default label filter, and shows selected issue subject/content/label edit fields that save against the selected issue repo with Gitea content-version readback verification, a direct Open in Gitea link, a placeholder Send to Codex console log action, attachments, comment chains, direct selected-issue screenshot/file attachment uploads, and a comment form with text, screenshots, and file attachments. Clicking the selected issue row again or the detail close control collapses the detail panel. Existing issue rows can be deleted after confirmation, and existing issue attachments can be deleted. Text-entry state updates must not blur focused Add Issue, selected issue edit, Issues comment, or Agents editor controls. Gitea repos are ordered by latest default-branch commit. Workspace and URL views show established links between local workspaces, known URLs, and Gitea repos.
Extension management rule: use the Codex Chrome extension with the Chrome profile named `Silma`. Do not use `Profile 1`. Extension management rule: use the Codex Chrome extension with the Chrome profile named `Silma`. Do not use `Profile 1`.
+1 -1
View File
@@ -56,7 +56,7 @@
} }
], ],
"repo_ordering": "Gitea repos are ordered by latest default-branch commit timestamp.", "repo_ordering": "Gitea repos are ordered by latest default-branch commit timestamp.",
"agents_behavior": "The Agents view manages persisted agent files. The initial agent is GLOBAL AGENT backed by AGENTS.md, and agent markdown supports {{git}}, {{repo}}, {{workspace}}, {{url}}, {{baseUrl}}, {{profile}}, and {{issue}} template variables.", "agents_behavior": "The Agents view manages persisted agent files. The initial agent is GLOBAL AGENT backed by AGENTS.md, and agent markdown supports {{git}}, {{repo}}, {{workspace}}, {{url}}, {{baseUrl}}, {{profile}}, and {{issue}} template variables. The default global agent tells downstream agents to close the Gitea issue after pushing the implementation and to leave a Gitea issue comment when delivery is blocked, partial, or risky; persisted built-in global agents should pick up these required completion rules without replacing unrelated custom text.",
"add_url_behavior": "The user must pick either a workspace or a Gitea repo. The app infers the linked counterpart from local context and stores the URL link in chrome.storage.local.", "add_url_behavior": "The user must pick either a workspace or a Gitea repo. The app infers the linked counterpart from local context and stores the URL link in chrome.storage.local.",
"delete_url_behavior": "URLs can be deleted from the list. User-added URLs are removed from chrome.storage.local; generated known URLs are hidden by storing their base URL in silmaAide.deletedUrlBases.", "delete_url_behavior": "URLs can be deleted from the list. User-added URLs are removed from chrome.storage.local; generated known URLs are hidden by storing their base URL in silmaAide.deletedUrlBases.",
"add_issue_behavior": "The form shows the target repo and active URL for the active known URL, lets the user select an agent file and issue labels, captures visible-tab screenshots with thumbnails, accepts accumulated file attachments, creates a Gitea issue with the selected labels, and uploads the rendered agent file plus all screenshots/files as issue assets. Label options are Change Request, Idea, Tabitha, Orson, Belisarius, Ozymandias, and Ready; new issues default to Change Request. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll draggable/resizable crop panel. Issue bodies include Chrome profile: Silma and the selected agent. The view intentionally omits the redundant Add Issue header copy.", "add_issue_behavior": "The form shows the target repo and active URL for the active known URL, lets the user select an agent file and issue labels, captures visible-tab screenshots with thumbnails, accepts accumulated file attachments, creates a Gitea issue with the selected labels, and uploads the rendered agent file plus all screenshots/files as issue assets. Label options are Change Request, Idea, Tabitha, Orson, Belisarius, Ozymandias, and Ready; new issues default to Change Request. Captured screenshots can be expanded, removed, or cropped with a wider no-horizontal-scroll draggable/resizable crop panel. Issue bodies include Chrome profile: Silma and the selected agent. The view intentionally omits the redundant Add Issue header copy.",
+21 -1
View File
@@ -74,8 +74,15 @@ Use this file as the governing handoff contract for the issue it is attached to.
- Keep changes scoped to the issue. Avoid unrelated refactors, formatting churn, and generated output unless the issue requires them. - Keep changes scoped to the issue. Avoid unrelated refactors, formatting churn, and generated output unless the issue requires them.
- Run the narrowest meaningful verification for the changed surface, then report exactly what passed or could not be run. - Run the narrowest meaningful verification for the changed surface, then report exactly what passed or could not be run.
- Do not include credentials, local-only secrets, or private tokens in comments, commits, logs, or attachments. - Do not include credentials, local-only secrets, or private tokens in comments, commits, logs, or attachments.
- After the implementation has been pushed to {{git}}, close {{issue}} in Gitea.
- If delivery is blocked, partial, or risky, leave a Gitea comment on {{issue}} with the blocker, current status, evidence, and recommended next step.
- When handing off to another agent, include current status, touched files, verification results, and any unresolved decisions.`; - When handing off to another agent, include current status, touched files, verification results, and any unresolved decisions.`;
const GLOBAL_AGENT_COMPLETION_RULES = [
"- After the implementation has been pushed to {{git}}, close {{issue}} in Gitea.",
"- If delivery is blocked, partial, or risky, leave a Gitea comment on {{issue}} with the blocker, current status, evidence, and recommended next step."
];
export const AVAILABLE_AGENTS: AgentProfile[] = [ export const AVAILABLE_AGENTS: AgentProfile[] = [
{ {
id: "global-agent", id: "global-agent",
@@ -596,13 +603,26 @@ function createScreenshotAttachment(dataUrl: string, blob: Blob): ScreenshotAtta
} }
function normalizeAgent(agent: Partial<AgentProfile>, index: number): AgentProfile { function normalizeAgent(agent: Partial<AgentProfile>, index: number): AgentProfile {
return { const normalized = {
id: agent.id || crypto.randomUUID(), id: agent.id || crypto.randomUUID(),
name: agent.name?.trim() || (index === 0 ? "GLOBAL AGENT" : "Unnamed agent"), name: agent.name?.trim() || (index === 0 ? "GLOBAL AGENT" : "Unnamed agent"),
file: agent.file?.trim() || "AGENTS.md", file: agent.file?.trim() || "AGENTS.md",
description: agent.description?.trim() || "", description: agent.description?.trim() || "",
content: agent.content?.trim() || DEFAULT_GLOBAL_AGENT_CONTENT content: agent.content?.trim() || DEFAULT_GLOBAL_AGENT_CONTENT
}; };
if (normalized.id !== AVAILABLE_AGENTS[0].id) {
return normalized;
}
const missingRules = GLOBAL_AGENT_COMPLETION_RULES.filter((rule) => !normalized.content.includes(rule));
return missingRules.length
? {
...normalized,
content: `${normalized.content.trim()}\n${missingRules.join("\n")}`
}
: normalized;
} }
function normalizeAgents(agents: AgentProfile[]): AgentProfile[] { function normalizeAgents(agents: AgentProfile[]): AgentProfile[] {