Files
Thomas Ricouard 2464aee421 Trim Build macOS plugin prompts (#263)
## Summary
- normalize the Build macOS Apps plugin starter prompt to the current
plugin prompt-array contract
- shorten the plugin-level prompt and all macOS skill trigger
descriptions so discovery metadata stays compact
- defer detailed sidebar/split-view and window modifier examples into
references while keeping skill entrypoints focused

## Why
`build-macos-apps` could not be scored by `plugin-eval` while its
manifest starter prompt was still a string. After that prompt shape was
normalized, the static report showed both trigger and invocation budget
failures driven by long skill trigger metadata and detailed examples in
always-loaded `SKILL.md` entrypoints.

This PR keeps the same macOS skill inventory and routing terms, but
moves detailed examples out of the entrypoint path where they can be
loaded only when the task needs them.

## Impact
Build macOS Apps keeps its existing workflows while its starter prompt
metadata matches the current plugin contract, trigger descriptions are
smaller, and high-detail SwiftUI/window examples live in references
instead of always-loaded skill bodies.

## plugin-eval report progression
The same local report command was used throughout:

```sh
cd plugins/plugin-eval
node ./scripts/plugin-eval.js analyze ../build-macos-apps --format markdown
```

Before the manifest prompt was normalized, `plugin-eval` could not emit
a scored report because the string-shaped `defaultPrompt` hit:

```text
((intermediate value) || []).join is not a function
```

| State | Score | Risk | Checks | Trigger | Invoke | Deferred | Active |
Total |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| First scored report after starter-prompt shape normalization | 67 / D
| high | 2 fail, 1 warn, 2 info | 899 | 15529 | 7722 | 16428 | 24150 |
| After compacting all Build macOS skill descriptions | 77 / C | high |
1 fail, 2 warn, 2 info | 464 | 15092 | 7722 | 15556 | 23278 |
| Final after deferring sidebar/split and window API examples | 86 / B |
medium | 0 fail, 3 warn, 2 info | 464 | 14291 | 8507 | 14755 | 23262 |

The final report clears the trigger and invocation budget failures.
Remaining warnings are static budget warnings for trigger, invoke, and
deferred text.

## Validation
- `node ./scripts/plugin-eval.js analyze ../build-macos-apps --format
markdown`
- `git diff --check`
2026-05-27 16:26:24 +02:00
..
2026-04-08 11:27:37 -07:00
2026-04-08 11:27:37 -07:00

Build macOS Apps Plugin

This plugin packages macOS-first development workflows in plugins/build-macos-apps.

It currently includes these skills:

  • build-run-debug
  • test-triage
  • signing-entitlements
  • swiftpm-macos
  • packaging-notarization
  • swiftui-patterns
  • liquid-glass
  • window-management
  • appkit-interop
  • view-refactor
  • telemetry

What It Covers

  • discovering local Xcode workspaces, projects, and Swift packages
  • building and running macOS apps with shell-first desktop workflows
  • creating one project-local script/build_and_run.sh entrypoint and wiring .codex/environments/environment.toml so the Codex app Run button works
  • implementing native macOS SwiftUI scenes, menus, settings, toolbars, and multiwindow flows
  • adopting modern macOS Liquid Glass and design-system guidance with standard SwiftUI structures, toolbars, search, controls, and custom glass surfaces
  • tailoring SwiftUI windows with title/toolbar styling, material-backed container backgrounds, minimize/restoration behavior, default and ideal placement, borderless window style, and launch behavior
  • bridging into AppKit for representables, responder-chain behavior, panels, and other desktop-only needs
  • refactoring large macOS view files toward stable scene, selection, and command structure
  • adding lightweight Logger / os.Logger instrumentation for windows, sidebars, menu commands, and menu bar actions
  • reading and verifying runtime events with Console, log stream, and process logs
  • triaging failing unit, integration, and UI-hosted macOS tests
  • debugging launch failures, crashes, linker problems, and runtime regressions
  • inspecting signing identities, entitlements, hardened runtime, and Gatekeeper issues
  • preparing packaging and notarization workflows for distribution

What It Does Not Cover

  • iOS, watchOS, or tvOS simulator control
  • desktop UI automation
  • App Store Connect release management
  • pixel-perfect visual design or design-system generation

Plugin Structure

The plugin lives at:

  • plugins/build-macos-apps/

with this shape:

  • .codex-plugin/plugin.json

    • required plugin manifest
    • defines plugin metadata and points Codex at the plugin contents
  • agents/

    • plugin-level agent metadata
    • currently includes agents/openai.yaml for the OpenAI surface
  • commands/

    • reusable workflow entrypoints for common macOS development tasks
  • skills/

    • the actual skill payload
    • each skill keeps the normal skill structure (SKILL.md, optional agents/, references/, assets/, scripts/)

Notes

This plugin is currently skills-first at the plugin level. It does not ship a plugin-local .mcp.json, matching the public plugins/build-ios-apps shape.

The default posture is shell-first. Unlike the iOS build plugin, this plugin does not assume simulator tooling or touch-driven UI inspection for its main workflows. The core execution model leans on xcodebuild, swift, open, lldb, codesign, spctl, plutil, and log stream, with a compact desktop UI layer for native SwiftUI scene design, AppKit interop, and macOS-specific refactoring.