diff --git a/plugins/oz-harness-support/README.md b/plugins/oz-harness-support/README.md index 3f7b645..4c3ee29 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 [`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 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..01191c8 --- /dev/null +++ b/plugins/oz-harness-support/skills/factory-files/references/default-automations.md @@ -0,0 +1,36 @@ +# Default integration automations + +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 + +- 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 + +Each dotted name below is `provider.event`. + +| Integration | Seeded automation | Events and filters | +| --- | --- | --- | +| 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`. 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. + +## Validation + +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.