From a4562b61012249e1d9c74f1c77ab2e0d21e55636 Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:20:40 +0000 Subject: [PATCH 1/3] Mirror default Factory automation authoring guidance Port the integration defaults reference and skill entry point from warp; record the targeted mirror revision without resyncing unrelated skill files. --- plugins/oz-harness-support/README.md | 7 +- .../skills/factory-files/SKILL.md | 4 + .../references/default-automations.md | 121 ++++++++++++++++++ 3 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 plugins/oz-harness-support/skills/factory-files/references/default-automations.md diff --git a/plugins/oz-harness-support/README.md b/plugins/oz-harness-support/README.md index 3f7b645..8b8fa07 100644 --- a/plugins/oz-harness-support/README.md +++ b/plugins/oz-harness-support/README.md @@ -24,10 +24,13 @@ The plugin ships skills the agent uses to talk to the Oz platform: ### factory-files is a mirror -`skills/factory-files` is a byte-for-byte copy of +`skills/factory-files` was initially copied from `resources/bundled/skills/factory-files` in [warpdotdev/warp](https://github.com/warpdotdev/warp), mirrored at commit -`f6f4ceac8`. Warp bundles that skill for its own clients; Claude Code loads +`f6f4ceac8`. The default-automation reference and its entry-point instruction +are refreshed from [`26f22851b`](https://github.com/warpdotdev/warp/commit/26f22851bee5a51741f8c57f9c742fa7505f38d8); +this is not a full resync of the remaining skill files. +Warp bundles that skill for its own clients; Claude Code loads filesystem skills from this plugin instead, so it is copied here rather than resolved from a bundle. Change it in `warpdotdev/warp` and re-mirror; edits made here are lost on the next sync. diff --git a/plugins/oz-harness-support/skills/factory-files/SKILL.md b/plugins/oz-harness-support/skills/factory-files/SKILL.md index abe549d..d885247 100644 --- a/plugins/oz-harness-support/skills/factory-files/SKILL.md +++ b/plugins/oz-harness-support/skills/factory-files/SKILL.md @@ -57,6 +57,10 @@ unless the user asks you to normalize the tree. after an Agent's or Automation's closing `---` fence is its prompt; a Scorer's body is its rubric. Never fold either into frontmatter. 3. Prefer the smallest edit that satisfies the request. +4. Before creating or repairing an integration's communication automation, + read [the default automations](references/default-automations.md). Start + from the Factory's existing seeded listeners, not a generic webhook or + another integration's bot identity. ## Author against the server's schema Read the tree's `schemaVersion` from `factory.yaml`; a tree that omits it is diff --git a/plugins/oz-harness-support/skills/factory-files/references/default-automations.md b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md new file mode 100644 index 0000000..4b44be1 --- /dev/null +++ b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md @@ -0,0 +1,121 @@ +# Default integration automations + +Use these defaults when asked to let people communicate with a Factory from +an integration. They are recommended listeners, not a copy of the schema. +Fetch the target server's schema and validate the resulting tree as described +in `../SKILL.md`; a parser pass does not prove an integration will deliver. + +## Before adding a listener + +- Inspect the Factory's existing automations, declared integrations, connected + accounts, and intended repositories, teams, projects, or channels. Repair or + reuse an existing listener rather than adding a duplicate. +- Preserve seeded names, scopes, and prompt bodies unless the request changes + them. Omit `agent` to route to the MAIN/FOREMAN agent, as the defaults do. + Intake defaults have empty prompt bodies; do not invent a task that + overrides the incoming user's request. +- A declared integration, a connected provider account, and an enabled matching + automation are separate prerequisites. Do not promise that tagging works + merely because an account is connected. Report missing setup rather than + broadening filters to work around it. +- Defaults depend on the integrations and routing scopes selected at creation. + Do not add every row below to every Factory. Confirm missing scope or identity + values instead of copying another Factory's values. Custom workflows may use + other events; they are not replacements for the default intake listeners. + +## Communication defaults + +Each dotted name below is `provider.event`. + +| Integration | Seeded automation | Events and filters | +| --- | --- | --- | +| Slack | `Slack DMs` and `Slack app mentions` | Separate listeners for `slack.message_dm` and `slack.app_mention`, each with `filter: {}`. These events already target the Factory's Slack app; do not substitute a workspace-wide `message_posted` listener. | +| Linear | `Linear agent sessions` | `linear.agent_session_created`, with a non-empty inclusive `team_ids` list for the selected Linear teams. The `teams` name alias is also available; do not declare both. | +| Jira | `Jira agent sessions` | `jira.agent_session_created`, with a non-empty inclusive `project_keys` list, such as `[APP]`. Use Jira project keys, not numeric IDs or the Factory alias. | +| Microsoft Teams | `teams-app-mentions` | `teams.app_mention`, one trigger per Graph team, with that team's `team_ids` and selected `channel_ids`. Both scopes are non-empty. | +| GitLab | `GitLab bot mentions` | `gitlab.bot_mentioned`, authored with `filter: {}`. The server supplies the Factory's service-account `mentioned` matcher; do not commit or guess it. Requires the workspace's GitLab automation capability. | +| Azure DevOps | `Azure DevOps mentions and assignments` | Three triggers: `azure_devops.pull_request_mentioned` with selected repository GUIDs in `repos`, plus `azure_devops.work_item_mentioned` and `azure_devops.work_item_assigned` with `filter: {}`. Preserve this canonical name and complete shape: the server binds omitted `mentioned`/`assignees` to the ready Factory identity. Requires Azure DevOps identity and webhook setup. | +| GitHub | `GitHub mentions and assignments` | Four triggers: `github.issue_mentioned`, `github.pull_request_mentioned`, `github.issue_assigned`, and `github.pull_request_assigned`. See identity and scope rules below. | + +For Linear and Jira communication, use the agent-session event rather than +trying to reconstruct mentions or delegation from issue/comment webhooks. + +## GitHub identity and routing + +GitHub Factory communication uses the **Factory account**, not the legacy +cloud-agent account or the app's display name. Resolve the target server's +accepted Factory handles from its seeded automation or configuration: + +- Production currently accepts `warp` and legacy `warp-factory`. +- Staging currently uses `warp-staging-factory`. +- Filter values are bare logins, without `@` or `[bot]`. Do not substitute + `warp-agent`, `warp-agent-staging`, or a Slack app mention. + +Every default GitHub trigger carries inclusive `repos` for the Factory's +selected `owner/repo` repositories and `labels` for its own canonical +`factory:` label. Reuse the actual Factory label; do not copy another +Factory's alias. Mention events additionally filter `mentioned` on the +accepted Factory handles; assignment events instead filter `assignees`. +Keep all four events: PR mentions alone miss issues and assignments. + +For example, the staging mention/assignment listener for an illustrative +Factory with alias `example` and repository `acme/service` is: + +```markdown +--- +enabled: true +triggers: + - provider: github + event: issue_mentioned + filter: + repos: [acme/service] + labels: ["factory:example"] + mentioned: [warp-staging-factory] + - provider: github + event: pull_request_mentioned + filter: + repos: [acme/service] + labels: ["factory:example"] + mentioned: [warp-staging-factory] + - provider: github + event: issue_assigned + filter: + repos: [acme/service] + labels: ["factory:example"] + assignees: [warp-staging-factory] + - provider: github + event: pull_request_assigned + filter: + repos: [acme/service] + labels: ["factory:example"] + assignees: [warp-staging-factory] +--- +``` + +Do not replace this with `pull_request_commented` plus a keyword or a +`pull_request_review_submitted` listener: those are different workflows. + +### Other seeded GitHub follow-ups + +These also use the same repository and Factory-label scopes: + +- `GitHub PR closed or merged`: `pull_request_closed` and + `pull_request_merged`. +- `GitHub PR labeled`: `pull_request_labeled`. +- `GitHub issue labeled`: `issue_labeled` and `issue_created` so an issue + created with the label is included. +- `GitHub PR review submitted`: `pull_request_review_submitted`. + +The closed/merged, PR-labeled, and review-submitted defaults carry dedicated +prompt bodies; preserve them when repairing triggers. The issue-labeled +default, like mention/assignment intake, has an empty body. + +## Source of truth + +Defaults and environment identities can change independently of this bundled +skill. Prefer the target Factory's current seeded configuration. When source +is available, verify against warp-server's +[`logic/factorysource/defaults/automations.go`](https://github.com/warpdotdev/warp-server/blob/develop/logic/factorysource/defaults/automations.go), +`logic/factorysource/defaults/azure_devops_automation.go`, and +`config/github.go` plus the target environment's configuration. The target +server's schema remains authoritative for accepted events and filter fields. From d2e402deb33acbb0260554ee9f926e5b5469f15a Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:29:24 +0000 Subject: [PATCH 2/3] Mirror concise self-contained automation defaults --- plugins/oz-harness-support/README.md | 2 +- .../references/default-automations.md | 131 ++++-------------- 2 files changed, 29 insertions(+), 104 deletions(-) diff --git a/plugins/oz-harness-support/README.md b/plugins/oz-harness-support/README.md index 8b8fa07..a8201b7 100644 --- a/plugins/oz-harness-support/README.md +++ b/plugins/oz-harness-support/README.md @@ -28,7 +28,7 @@ The plugin ships skills the agent uses to talk to the Oz platform: `resources/bundled/skills/factory-files` in [warpdotdev/warp](https://github.com/warpdotdev/warp), mirrored at commit `f6f4ceac8`. The default-automation reference and its entry-point instruction -are refreshed from [`26f22851b`](https://github.com/warpdotdev/warp/commit/26f22851bee5a51741f8c57f9c742fa7505f38d8); +are refreshed from [`9378e40fe`](https://github.com/warpdotdev/warp/commit/9378e40fe2178c54a942d9a4740c37bc9db8fbff); this is not a full resync of the remaining skill files. Warp bundles that skill for its own clients; Claude Code loads filesystem skills from this plugin instead, so it is copied here rather than diff --git a/plugins/oz-harness-support/skills/factory-files/references/default-automations.md b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md index 4b44be1..52c247d 100644 --- a/plugins/oz-harness-support/skills/factory-files/references/default-automations.md +++ b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md @@ -1,27 +1,17 @@ # Default integration automations -Use these defaults when asked to let people communicate with a Factory from -an integration. They are recommended listeners, not a copy of the schema. -Fetch the target server's schema and validate the resulting tree as described -in `../SKILL.md`; a parser pass does not prove an integration will deliver. +Use these defaults to create or repair communication automations. Other Factory +agents do not have access to `warp-server` and cannot inspect its seeded +automations, so keep this reference self-contained. ## Before adding a listener -- Inspect the Factory's existing automations, declared integrations, connected - accounts, and intended repositories, teams, projects, or channels. Repair or - reuse an existing listener rather than adding a duplicate. -- Preserve seeded names, scopes, and prompt bodies unless the request changes - them. Omit `agent` to route to the MAIN/FOREMAN agent, as the defaults do. - Intake defaults have empty prompt bodies; do not invent a task that - overrides the incoming user's request. -- A declared integration, a connected provider account, and an enabled matching - automation are separate prerequisites. Do not promise that tagging works - merely because an account is connected. Report missing setup rather than - broadening filters to work around it. -- Defaults depend on the integrations and routing scopes selected at creation. - Do not add every row below to every Factory. Confirm missing scope or identity - values instead of copying another Factory's values. Custom workflows may use - other events; they are not replacements for the default intake listeners. +- Reuse existing listeners; preserve their names, scopes, and prompt bodies + unless asked to change them. Defaults omit `agent` and use MAIN/FOREMAN. +- Add only the requested integration's listeners. Confirm unknown scopes and + identities; do not copy another Factory's values or add duplicate listeners. +- A declared integration, connected account, and enabled matching automation + are separate prerequisites. Report missing setup rather than widening filters. ## Communication defaults @@ -29,93 +19,28 @@ Each dotted name below is `provider.event`. | Integration | Seeded automation | Events and filters | | --- | --- | --- | -| Slack | `Slack DMs` and `Slack app mentions` | Separate listeners for `slack.message_dm` and `slack.app_mention`, each with `filter: {}`. These events already target the Factory's Slack app; do not substitute a workspace-wide `message_posted` listener. | -| Linear | `Linear agent sessions` | `linear.agent_session_created`, with a non-empty inclusive `team_ids` list for the selected Linear teams. The `teams` name alias is also available; do not declare both. | -| Jira | `Jira agent sessions` | `jira.agent_session_created`, with a non-empty inclusive `project_keys` list, such as `[APP]`. Use Jira project keys, not numeric IDs or the Factory alias. | -| Microsoft Teams | `teams-app-mentions` | `teams.app_mention`, one trigger per Graph team, with that team's `team_ids` and selected `channel_ids`. Both scopes are non-empty. | -| GitLab | `GitLab bot mentions` | `gitlab.bot_mentioned`, authored with `filter: {}`. The server supplies the Factory's service-account `mentioned` matcher; do not commit or guess it. Requires the workspace's GitLab automation capability. | -| Azure DevOps | `Azure DevOps mentions and assignments` | Three triggers: `azure_devops.pull_request_mentioned` with selected repository GUIDs in `repos`, plus `azure_devops.work_item_mentioned` and `azure_devops.work_item_assigned` with `filter: {}`. Preserve this canonical name and complete shape: the server binds omitted `mentioned`/`assignees` to the ready Factory identity. Requires Azure DevOps identity and webhook setup. | -| GitHub | `GitHub mentions and assignments` | Four triggers: `github.issue_mentioned`, `github.pull_request_mentioned`, `github.issue_assigned`, and `github.pull_request_assigned`. See identity and scope rules below. | +| Slack | `Slack DMs` and `Slack app mentions` | Separate `slack.message_dm` and `slack.app_mention` listeners, each with `filter: {}`, targeting the Factory's Slack app. | +| Linear | `Linear agent sessions` | `linear.agent_session_created` with non-empty inclusive `team_ids` (or the `teams` name alias, not both). | +| Jira | `Jira agent sessions` | `jira.agent_session_created` with non-empty inclusive `project_keys`, using Jira project keys, not numeric IDs. | +| Microsoft Teams | `teams-app-mentions` | `teams.app_mention`, one trigger per Graph team with non-empty inclusive `team_ids` and `channel_ids`. | +| GitLab | `GitLab bot mentions` | `gitlab.bot_mentioned` with `filter: {}`. The server supplies `mentioned`; do not author it. Requires the workspace's GitLab automation capability. | +| Azure DevOps | `Azure DevOps mentions and assignments` | `azure_devops.pull_request_mentioned` with repository GUIDs in `repos`, plus `azure_devops.work_item_mentioned` and `azure_devops.work_item_assigned` with `filter: {}`. Keep this name and all three triggers so the server binds omitted `mentioned`/`assignees` to the ready Factory identity. Requires identity and webhook setup. | +| GitHub | `GitHub mentions and assignments` | `github.issue_mentioned`, `github.pull_request_mentioned`, `github.issue_assigned`, and `github.pull_request_assigned`. Apply the filters below. | -For Linear and Jira communication, use the agent-session event rather than -trying to reconstruct mentions or delegation from issue/comment webhooks. +Use these native intake events, not generic comment or message listeners. ## GitHub identity and routing -GitHub Factory communication uses the **Factory account**, not the legacy -cloud-agent account or the app's display name. Resolve the target server's -accepted Factory handles from its seeded automation or configuration: +All four triggers use inclusive `repos` for the selected `owner/repo` +repositories and `labels` for the Factory's own canonical `factory:` +label. Mention events also use `mentioned`; assignment events use `assignees`. +Both match the Factory account's bare logins, without `@` or `[bot]`: +production currently accepts `warp` and legacy `warp-factory`; staging uses +`warp-staging-factory`. Do not use legacy cloud-agent handles or app display +names. Confirm the Factory account for other deployments. -- Production currently accepts `warp` and legacy `warp-factory`. -- Staging currently uses `warp-staging-factory`. -- Filter values are bare logins, without `@` or `[bot]`. Do not substitute - `warp-agent`, `warp-agent-staging`, or a Slack app mention. +## Validation -Every default GitHub trigger carries inclusive `repos` for the Factory's -selected `owner/repo` repositories and `labels` for its own canonical -`factory:` label. Reuse the actual Factory label; do not copy another -Factory's alias. Mention events additionally filter `mentioned` on the -accepted Factory handles; assignment events instead filter `assignees`. -Keep all four events: PR mentions alone miss issues and assignments. - -For example, the staging mention/assignment listener for an illustrative -Factory with alias `example` and repository `acme/service` is: - -```markdown ---- -enabled: true -triggers: - - provider: github - event: issue_mentioned - filter: - repos: [acme/service] - labels: ["factory:example"] - mentioned: [warp-staging-factory] - - provider: github - event: pull_request_mentioned - filter: - repos: [acme/service] - labels: ["factory:example"] - mentioned: [warp-staging-factory] - - provider: github - event: issue_assigned - filter: - repos: [acme/service] - labels: ["factory:example"] - assignees: [warp-staging-factory] - - provider: github - event: pull_request_assigned - filter: - repos: [acme/service] - labels: ["factory:example"] - assignees: [warp-staging-factory] ---- -``` - -Do not replace this with `pull_request_commented` plus a keyword or a -`pull_request_review_submitted` listener: those are different workflows. - -### Other seeded GitHub follow-ups - -These also use the same repository and Factory-label scopes: - -- `GitHub PR closed or merged`: `pull_request_closed` and - `pull_request_merged`. -- `GitHub PR labeled`: `pull_request_labeled`. -- `GitHub issue labeled`: `issue_labeled` and `issue_created` so an issue - created with the label is included. -- `GitHub PR review submitted`: `pull_request_review_submitted`. - -The closed/merged, PR-labeled, and review-submitted defaults carry dedicated -prompt bodies; preserve them when repairing triggers. The issue-labeled -default, like mention/assignment intake, has an empty body. - -## Source of truth - -Defaults and environment identities can change independently of this bundled -skill. Prefer the target Factory's current seeded configuration. When source -is available, verify against warp-server's -[`logic/factorysource/defaults/automations.go`](https://github.com/warpdotdev/warp-server/blob/develop/logic/factorysource/defaults/automations.go), -`logic/factorysource/defaults/azure_devops_automation.go`, and -`config/github.go` plus the target environment's configuration. The target -server's schema remains authoritative for accepted events and filter fields. +Fetch the target server's schema and validate the tree as described in +`../SKILL.md`. These are recommended defaults, not a schema copy; parser +validation does not prove integration setup or event delivery. From c81ffa2010ae4777a7c669b0b2ab2439e79ac83c Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:33:28 +0000 Subject: [PATCH 3/3] Mirror GitHub guidance within the defaults table --- plugins/oz-harness-support/README.md | 2 +- .../factory-files/references/default-automations.md | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/oz-harness-support/README.md b/plugins/oz-harness-support/README.md index a8201b7..4c3ee29 100644 --- a/plugins/oz-harness-support/README.md +++ b/plugins/oz-harness-support/README.md @@ -28,7 +28,7 @@ The plugin ships skills the agent uses to talk to the Oz platform: `resources/bundled/skills/factory-files` in [warpdotdev/warp](https://github.com/warpdotdev/warp), mirrored at commit `f6f4ceac8`. The default-automation reference and its entry-point instruction -are refreshed from [`9378e40fe`](https://github.com/warpdotdev/warp/commit/9378e40fe2178c54a942d9a4740c37bc9db8fbff); +are refreshed from [`1119be67a`](https://github.com/warpdotdev/warp/commit/1119be67a8d9574418bf0f2a2cbdca127551ccfe); this is not a full resync of the remaining skill files. Warp bundles that skill for its own clients; Claude Code loads filesystem skills from this plugin instead, so it is copied here rather than diff --git a/plugins/oz-harness-support/skills/factory-files/references/default-automations.md b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md index 52c247d..01191c8 100644 --- a/plugins/oz-harness-support/skills/factory-files/references/default-automations.md +++ b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md @@ -25,20 +25,10 @@ Each dotted name below is `provider.event`. | Microsoft Teams | `teams-app-mentions` | `teams.app_mention`, one trigger per Graph team with non-empty inclusive `team_ids` and `channel_ids`. | | GitLab | `GitLab bot mentions` | `gitlab.bot_mentioned` with `filter: {}`. The server supplies `mentioned`; do not author it. Requires the workspace's GitLab automation capability. | | Azure DevOps | `Azure DevOps mentions and assignments` | `azure_devops.pull_request_mentioned` with repository GUIDs in `repos`, plus `azure_devops.work_item_mentioned` and `azure_devops.work_item_assigned` with `filter: {}`. Keep this name and all three triggers so the server binds omitted `mentioned`/`assignees` to the ready Factory identity. Requires identity and webhook setup. | -| GitHub | `GitHub mentions and assignments` | `github.issue_mentioned`, `github.pull_request_mentioned`, `github.issue_assigned`, and `github.pull_request_assigned`. Apply the filters below. | +| GitHub | `GitHub mentions and assignments` | `github.issue_mentioned`, `github.pull_request_mentioned`, `github.issue_assigned`, and `github.pull_request_assigned`. All four triggers use inclusive `repos` for the selected `owner/repo` repositories and `labels` for the Factory's own canonical `factory:` label. Mention events also use `mentioned`; assignment events use `assignees`. Both match the Factory account's bare logins, without `@` or `[bot]`: production currently accepts `warp` and legacy `warp-factory`; staging uses `warp-staging-factory`. Do not use legacy cloud-agent handles or app display names. Confirm the Factory account for other deployments. | Use these native intake events, not generic comment or message listeners. -## GitHub identity and routing - -All four triggers use inclusive `repos` for the selected `owner/repo` -repositories and `labels` for the Factory's own canonical `factory:` -label. Mention events also use `mentioned`; assignment events use `assignees`. -Both match the Factory account's bare logins, without `@` or `[bot]`: -production currently accepts `warp` and legacy `warp-factory`; staging uses -`warp-staging-factory`. Do not use legacy cloud-agent handles or app display -names. Confirm the Factory account for other deployments. - ## Validation Fetch the target server's schema and validate the tree as described in