native macOS codings agent orchestrator
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add project documentation and Swift coding guidelines

- Add AGENTS.md with build commands and architecture overview
- Symlink CLAUDE.md to AGENTS.md for AI agent compatibility
- Add comprehensive Swift/SwiftUI coding conventions in docs/
- Remove explicit spacing values in sidebar views per guidelines

khoi 00eddd5e ce271c95

+83 -5
+13
AGENTS.md
··· 1 + ## Build Commands 2 + 3 + ```bash 4 + open supacode.xcodeproj 5 + ``` 6 + 7 + ## Architecture 8 + 9 + Supacode is a orchestrator for running multiple coding agents in parallel, using GhosttyKit as underlying terminal. 10 + 11 + ## Code Guidelines 12 + 13 + See ./docs/swift-rules.md for Swift coding conventions.
+1
CLAUDE.md
··· 1 + AGENTS.md
+65
docs/swift-rules.md
··· 1 + # Agent guide for Swift and SwiftUI 2 + 3 + This repository contains an Xcode project written with Swift and SwiftUI. Please follow the guidelines below so that the development experience is built on modern, safe API usage. 4 + 5 + 6 + ## Role 7 + 8 + You are a **Senior iOS Engineer**, specializing in SwiftUI, and related frameworks. Your code must always adhere to Apple's Human Interface Guidelines and App Review guidelines. 9 + 10 + 11 + ## Core instructions 12 + 13 + - Target macOS 26.0 or later. (Yes, it definitely exists.) 14 + - Swift 6.2 or later, using modern Swift concurrency. 15 + - SwiftUI backed up by `@Observable` classes for shared data. 16 + - Do not introduce third-party frameworks without asking first. 17 + - Avoid UIKit unless requested. 18 + 19 + 20 + ## Swift instructions 21 + 22 + - Always mark `@Observable` classes with `@MainActor`. 23 + - Assume strict Swift concurrency rules are being applied. 24 + - Prefer Swift-native alternatives to Foundation methods where they exist, such as using `replacing("hello", with: "world")` with strings rather than `replacingOccurrences(of: "hello", with: "world")`. 25 + - Prefer modern Foundation API, for example `URL.documentsDirectory` to find the app’s documents directory, and `appending(path:)` to append strings to a URL. 26 + - Never use C-style number formatting such as `Text(String(format: "%.2f", abs(myNumber)))`; always use `Text(abs(change), format: .number.precision(.fractionLength(2)))` instead. 27 + - Prefer static member lookup to struct instances where possible, such as `.circle` rather than `Circle()`, and `.borderedProminent` rather than `BorderedProminentButtonStyle()`. 28 + - Never use old-style Grand Central Dispatch concurrency such as `DispatchQueue.main.async()`. If behavior like this is needed, always use modern Swift concurrency. 29 + - Filtering text based on user-input must be done using `localizedStandardContains()` as opposed to `contains()`. 30 + - Avoid force unwraps and force `try` unless it is unrecoverable. 31 + 32 + 33 + ## SwiftUI instructions 34 + 35 + - Always use `foregroundStyle()` instead of `foregroundColor()`. 36 + - Always use `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`. 37 + - Always use the `Tab` API instead of `tabItem()`. 38 + - Never use `ObservableObject`; always prefer `@Observable` classes instead. 39 + - Never use the `onChange()` modifier in its 1-parameter variant; either use the variant that accepts two parameters or accepts none. 40 + - Never use `onTapGesture()` unless you specifically need to know a tap’s location or the number of taps. All other usages should use `Button`. 41 + - Never use `Task.sleep(nanoseconds:)`; always use `Task.sleep(for:)` instead. 42 + - Never use `UIScreen.main.bounds` to read the size of the available space. 43 + - Do not break views up using computed properties; place them into new `View` structs instead. 44 + - Do not force specific font sizes; prefer using Dynamic Type instead. 45 + - Use the `navigationDestination(for:)` modifier to specify navigation, and always use `NavigationStack` instead of the old `NavigationView`. 46 + - If using an image for a button label, always specify text alongside like this: `Button("Tap me", systemImage: "plus", action: myButtonAction)`. 47 + - When rendering SwiftUI views, always prefer using `ImageRenderer` to `UIGraphicsImageRenderer`. 48 + - Don’t apply the `fontWeight()` modifier unless there is good reason. If you want to make some text bold, always use `bold()` instead of `fontWeight(.bold)`. 49 + - Do not use `GeometryReader` if a newer alternative would work as well, such as `containerRelativeFrame()` or `visualEffect()`. 50 + - When making a `ForEach` out of an `enumerated` sequence, do not convert it to an array first. So, prefer `ForEach(x.enumerated(), id: \.element.id)` instead of `ForEach(Array(x.enumerated()), id: \.element.id)`. 51 + - When hiding scroll view indicators, use the `.scrollIndicators(.hidden)` modifier rather than using `showsIndicators: false` in the scroll view initializer. 52 + - Place view logic into view models or similar, so it can be tested. 53 + - Avoid `AnyView` unless it is absolutely required. 54 + - Avoid specifying hard-coded values for padding and stack spacing unless requested. 55 + - Avoid using UIKit colors in SwiftUI code. 56 + 57 + ## Project structure 58 + 59 + - Use a consistent project structure, with folder layout determined by app features. 60 + - Follow strict naming conventions for types, properties, methods, and SwiftData models. 61 + - Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file. 62 + - Write unit tests for core application logic. 63 + - Only write UI tests if unit tests are not possible. 64 + - Add code comments and documentation comments as needed. 65 + - If the project requires secrets such as API keys, never include them in the repository.
+4 -5
supacode/ContentView.swift
··· 57 57 private struct RepoHeaderRow: View { 58 58 let name: String 59 59 let initials: String 60 - 60 + 61 61 var body: some View { 62 - HStack(spacing: 10) { 62 + HStack { 63 63 ZStack { 64 64 Circle() 65 65 .fill(.secondary.opacity(0.2)) ··· 79 79 let detail: String 80 80 81 81 var body: some View { 82 - HStack(alignment: .top, spacing: 8) { 82 + HStack(alignment: .firstTextBaseline) { 83 83 Image(systemName: "arrow.triangle.branch") 84 84 .font(.caption) 85 85 .foregroundStyle(.secondary) 86 - .padding(.top, 2) 87 86 VStack(alignment: .leading, spacing: 2) { 88 87 Text(name) 89 88 Text(detail) ··· 102 101 103 102 private struct EmptyStateView: View { 104 103 var body: some View { 105 - VStack(spacing: 10) { 104 + VStack { 106 105 Image(systemName: "tray") 107 106 .font(.title2) 108 107 Text("Open a project or worktree")