Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ by `./sync-agents`.

## Targets

- **Package products** ([`Package.swift`](Package.swift)) — **StuffCore** ([`Shared/StuffCore/Sources/`](Shared/StuffCore/Sources/)), **LifecycleKit** ([`Shared/LifecycleKit/Sources/`](Shared/LifecycleKit/Sources/)), **LogKit** ([`Shared/LogKit/Sources/`](Shared/LogKit/Sources/), the logging facade), **LogViewerUI** ([`Shared/LogViewerUI/Sources/`](Shared/LogViewerUI/Sources/), the generic SwiftUI log viewer), and **SwiftDataInspector** ([`Shared/SwiftDataInspector/Sources/`](Shared/SwiftDataInspector/Sources/), the generic SwiftData browser) under [`Shared/`](Shared/); **WhereCore** / **WhereUI** / **WhereTesting** under [`Where/`](Where/); **ForemanCore** ([`Foreman/ForemanCore/Sources/`](Foreman/ForemanCore/Sources/), the only **macOS-only** package library) under [`Foreman/`](Foreman/).
- **Tuist targets** ([`Project.swift`](Project.swift)) — **Where** app ([`Where/Where/`](Where/Where/)), **RegionViewer** ([`Where/RegionViewer/`](Where/RegionViewer/), a thin standalone **Mac Catalyst** host for the WhereUI region-map developer tool — the only target with a `.macCatalyst` destination), **Foreman** ([`Foreman/Foreman/`](Foreman/Foreman/), the **native-macOS** menu bar app that runs Cursor local agent workers per repo), **StuffTestHost** ([`Shared/StuffTestHost/`](Shared/StuffTestHost/)), **WhereTests** (app tests, no host), hosted **\*Tests** bundles (**StuffCoreTests**, **LifecycleKitTests**, **LogKitTests**, **LogViewerUITests**, **SwiftDataInspectorTests**, **WhereCoreTests**, **WhereUITests**) that depend on **StuffTestHost** + **WhereTesting** + the relevant package product, and the hostless macOS bundle **ForemanCoreTests**.
- **Package products** ([`Package.swift`](Package.swift)) — **StuffCore** ([`Shared/StuffCore/Sources/`](Shared/StuffCore/Sources/)), **LifecycleKit** ([`Shared/LifecycleKit/Sources/`](Shared/LifecycleKit/Sources/)), **LogKit** ([`Shared/LogKit/Sources/`](Shared/LogKit/Sources/), the logging facade), **LogViewerUI** ([`Shared/LogViewerUI/Sources/`](Shared/LogViewerUI/Sources/), the generic SwiftUI log viewer), and **SwiftDataInspector** ([`Shared/SwiftDataInspector/Sources/`](Shared/SwiftDataInspector/Sources/), the generic SwiftData browser) under [`Shared/`](Shared/); **WhereCore** / **WhereUI** / **WhereTesting** under [`Where/`](Where/); **ForemanCore** ([`Foreman/ForemanCore/Sources/`](Foreman/ForemanCore/Sources/), the only **macOS-only** package library, which processes a generated-symbol `Resources/Localizable.xcstrings`) under [`Foreman/`](Foreman/).
- **Tuist targets** ([`Project.swift`](Project.swift)) — **Where** app ([`Where/Where/`](Where/Where/)), **RegionViewer** ([`Where/RegionViewer/`](Where/RegionViewer/), a thin standalone **Mac Catalyst** host for the WhereUI region-map developer tool — the only target with a `.macCatalyst` destination), **Foreman** ([`Foreman/Foreman/`](Foreman/Foreman/), the **native-macOS** menu bar app that runs Cursor local agent workers per repo; its user-facing copy is a generated-symbol `Resources/Localizable.xcstrings` via `STRING_CATALOG_GENERATE_SYMBOLS`), **StuffTestHost** ([`Shared/StuffTestHost/`](Shared/StuffTestHost/)), **WhereTests** (app tests, no host), hosted **\*Tests** bundles (**StuffCoreTests**, **LifecycleKitTests**, **LogKitTests**, **LogViewerUITests**, **SwiftDataInspectorTests**, **WhereCoreTests**, **WhereUITests**) that depend on **StuffTestHost** + **WhereTesting** + the relevant package product, and the hostless macOS bundle **ForemanCoreTests**.
- Add SPM library targets in `Package.swift` and wire apps/tests in `Project.swift` (see existing `unitTests` helper; macOS test bundles are declared directly, like `ForemanCoreTests`). A new module also ships a root `README.md` and `AGENTS.md` — see [Per-module docs](#per-module-docs).
- **CI schemes**: the workspace mixes iOS and macOS targets, which no single xcodebuild destination can build, so CI runs two explicit shared schemes — **Stuff-iOS-Tests** (all iOS bundles) and **Foreman-macOS-Tests** (Foreman app + ForemanCoreTests). New iOS test bundles must be added to the `Stuff-iOS-Tests` scheme in `Project.swift` or CI won't run them.

Expand Down
20 changes: 20 additions & 0 deletions Foreman/Foreman/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ formatting, global conventions) and ForemanCore's
- Every previewable view ships a `#Preview` using `PreviewSupport` fixtures
(temp-directory backed; never the real config or `~/Development`).

## Localization

All user-facing copy lives in
[`Resources/Localizable.xcstrings`](Resources/Localizable.xcstrings) and is
referenced through Xcode 26's **generated symbols** (the
`STRING_CATALOG_GENERATE_SYMBOLS` build setting, set on the target in
[`Project.swift`](../../Project.swift)) — e.g. `Text(.toolbarRescan)`,
`Button(.commonSave)`, `.help(.toolbarRescanHelp)`,
`Text(.statusFailedReason(reason: …))`. There is **no** hand-written `Strings`
enum (unlike WhereUI). Add the key to the catalog first (a manual entry with a
stable dotted key like `toolbar.rescan`), then reference the generated symbol;
a missing key is a compile error. Interpolated strings use named placeholders
(`%(pid)lld`, `%(message)@`) so the symbol is a function with typed arguments.

Proper nouns stay literal — the app name **"Foreman"** (`navigationTitle`,
`NSWindow.title`, the icon's accessibility description) and the **"cursor-agent"**
CLI name. Dynamic data (repo names, paths, pids, upstream
`error.localizedDescription`, the command preview) is passed as arguments into
placeholder symbols, never added as catalog keys.

## Hard-won platform lessons (don't undo)

- **The status item is AppKit (`NSStatusItem` + a reused `NSWindow`), not
Expand Down
9 changes: 9 additions & 0 deletions Foreman/Foreman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ small editor sheet that commits only on **Save** (Cancel or Escape discards).
from the current scan directory are pruned; settings for other scan
directories are kept and re-apply when you switch back.

## Localization

All of Foreman's on-screen copy lives in
[`Resources/Localizable.xcstrings`](Resources/Localizable.xcstrings) and is
referenced through Xcode 26's type-safe generated symbols (the
`STRING_CATALOG_GENERATE_SYMBOLS` build setting) — the views hold no English
literals, so retitling a button is a one-line catalog edit. The app name and
the `cursor-agent` command stay as-is.

## Limitations

- The sleep assertion blocks *idle* sleep only (like `caffeinate -i`); closing
Expand Down
Loading
Loading