For development setup, integration tests, and PR guidelines, see the root CONTRIBUTING.md.
This file covers patterns for AI agents working on the codebase.
- Branch from
mainand keep one logical change per branch - Do not commit directly to
mainunless explicitly instructed; prefer PRs - Prefer
git worktree addfor parallel tasks; remove withgit worktree removewhen done - Rebase on
mainbefore merging; avoid merge commits - Commit small, coherent changes; no WIP commits on shared branches
- Use concise, present-tense commit messages that match repo style
- Never commit secrets or local config files (keys,
.env,.asc/config.json)
make format # Format code
make lint # Check for issues
make test # Run all tests
git diff # Review changes before staging- Command implementations live in
internal/cli/<domain>packages - Each domain exposes a top-level
XCommand() *ffcli.Command cmd/only contains the root entry point; do not add wrapper files- Register top-level commands in
internal/cli/registry/registry.go(order matters) - Shared CLI helpers go in
internal/cli/shared(useshared_wrappers.goas needed)
- Add or extend a domain package in
internal/cli/<domain> - Implement a command factory (e.g.,
XCommand() *ffcli.Command) - Register it in
internal/cli/registry/registry.go - Write tests in the domain package (or
internal/cli/cmdtestfor root-level tests) - Update README.md with usage examples
- Add method to
internal/asc/client.go - Add types for request/response structs
- Add helper functions for table/markdown output
- Create command in
internal/cli/<domain>to expose the endpoint - Write HTTP client tests with mocked responses
- If endpoint tests are repetitive, group the request-wiring cases, but keep at least one representative non-empty decode assertion and one representative output-structure assertion where formatting is user-facing
Tag releases with plain semver like 0.1.0 (no v prefix).
Before tagging a release, verify:
# 1. All tests pass
make test
# 2. Audit help output for all parent commands
for cmd in auth analytics finance apps app-tags testflight builds versions \
feedback crashes localizations \
build-localizations sandbox submit xcode-cloud reviews; do
echo "=== $cmd ===" && ./asc $cmd --help 2>&1
done
# 3. Check for duplicate sections (should see SUBCOMMANDS only once per command)
# 4. Verify bold formatting renders correctlyCommon issues to check:
- No duplicate "Subcommands:" sections (don't list subcommands in LongHelp; DefaultUsageFunc handles it)
- All flags have descriptions
- Examples are up to date