Skip to content

Commit d229625

Browse files
committed
agent.md
1 parent 34cabc1 commit d229625

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent Guidelines
2+
3+
## Implementation principles
4+
- While implementing features, prioritize the KISS (Keep It Simple, Stupid) and YAGNI (You Aren't Gonna Need It) principles to avoid unnecessary complexity.
5+
- Maintain separation of concerns and adhere to the Single Responsibility Principle so each component has a clear, focused purpose.
6+
- Keep helper types in their own files/folders instead of nesting multiple classes/structs inside a single file.
7+
8+
## SwiftUI workflow
9+
- When implementing, reviewing, or refactoring SwiftUI Views and ViewModels, always use the `swiftui-expert-skill` guidance.
10+
- SwiftUI views should always include `#Preview` with a few state configurations.
11+
12+
## Guardrails (Behavior & Dependencies)
13+
- **When in doubt, STOP and ASK before proceeding.**
14+
15+
## Token-efficient build output
16+
- Always pipe Xcode/Swift build logs through [`xcsift`](https://github.com/ldomaradzki/xcsift) to keep transcripts small and structured.
17+
- Remember to redirect stderr to stdout (`2>&1`) so `xcsift` sees the full log stream.
18+
- Unless explicitly requested by the user, run `xcodebuild` only with `-configuration Debug` (do not run Release builds).
19+
20+
### Common commands
21+
- Basic build: `xcodebuild -project <project> -scheme <scheme> -configuration Debug build 2>&1 | xcsift`
22+
- Run tests + coverage: `xcodebuild test -enableCodeCoverage YES 2>&1 | xcsift --coverage`
23+
- Show warnings explicitly: `xcodebuild build 2>&1 | xcsift --print-warnings`
24+
- Quiet success noise: `xcodebuild build 2>&1 | xcsift --quiet`
25+
- Swift Package Manager workflows: `swift build 2>&1 | xcsift` and `swift test 2>&1 | xcsift`
26+
27+
Use the flags above (e.g., `--coverage-details`, `--coverage-path`) as needed, but keep the default JSON output unless the user asks for more detail.
28+
29+
## Fast file search
30+
- Use [`fd`](https://github.com/sharkdp/fd) for locating files—it's a fast, user-friendly alternative to `find`.
31+
- Typical commands: `fd src` (search everywhere for "src"), `fd -e ts foo` (look for TypeScript files matching "foo").
32+
- Prefer `fd` for repo-wide file discovery unless the task explicitly requires another tool.
33+
34+
## Code search
35+
- Use [`ripgrep`](https://github.com/BurntSushi/ripgrep) (`rg`) for searching within files—it is much faster than grep/ack/ag, respects `.gitignore`, and has smart defaults.
36+
- Typical commands: `rg "TODO"` (find TODOs), `rg -n --glob '!dist' pattern.swift` (search with line numbers while excluding `dist`).

0 commit comments

Comments
 (0)