2.6 KiB
2.6 KiB
AGENTS.md (iOS)
Scope
Instructions for work under /Users/buzzert/src/sybil-2/ios.
Build + Run
- Preferred build command:
just build just buildwill:- generate
Sybil.xcodeprojwithxcodegenif missing, - build scheme
SybilforiPhone 16esimulator.
- generate
- Preferred test command:
just test just testruns the Swift package tests throughxcodebuild teston theiPhone 16eiOS simulator fromios/Packages/Sybil.just testdisables Xcode parallel testing because the current async view-model tests use timing-sensitive selection tasks.- Do not use plain
swift testfor this package; it runs as host macOS and hits a deployment mismatch withMarkdownUI. - If
xcbeautifyis installed it is used automatically; otherwise rawxcodebuildoutput is used.
Simulator Workflow
- Run the app in the simulator with
just runfrom/Users/buzzert/src/sybil-2/ios. just runboots theiPhone 16esimulator if needed, builds with a stable derived data path, installsSybil.app, and launches bundle idnet.buzzert.sybil2.- Capture a simulator screenshot with
just screenshotfrom/Users/buzzert/src/sybil-2/ios; it writesbuild/sybil-screenshot.pngby default. - To choose a screenshot path, run
just screenshot path=build/name.png. - The underlying screenshot command is
xcrun simctl io booted screenshot <path>and requires a booted simulator.
App Structure
- App target entry:
/Users/buzzert/src/sybil-2/ios/Apps/Sybil/Sources/SybilApp.swift - Shared iOS app code lives in Swift package:
/Users/buzzert/src/sybil-2/ios/Packages/Sybil/Sources/Sybil
- Main UI root:
SplitView.swift - Networking + SSE client:
SybilAPIClient.swift - State coordinator:
SybilViewModel.swift
Product Expectations
- Keep the iOS design aligned to the web app dark aesthetic (no light mode support required).
- Preserve these core features:
- conversation/search list,
- streaming chat transcript,
- streaming search results + answer,
- settings screen for API URL and token.
- Markdown rendering currently uses
MarkdownUIvia SwiftPM.
API Contract
- iOS client must follow docs in:
/Users/buzzert/src/sybil-2/docs/api/rest.md/Users/buzzert/src/sybil-2/docs/api/streaming-chat.md
- If backend contract changes (request/response shapes, SSE events, auth semantics), update docs in the same change.
Practical Notes
- Default API URL is
http://127.0.0.1:8787(configurable in-app). - The iOS client preserves an explicit
/apibase path for proxied deployments. - Provider fallback models:
- OpenAI:
gpt-4.1-mini - Anthropic:
claude-3-5-sonnet-latest - xAI:
grok-3-mini - Hermes Agent:
hermes-agent
- OpenAI: