Skip to content

docs: add AGENTS.md guidance and align README/DocC with current API - #79

Open
RTsta wants to merge 1 commit into
masterfrom
feat/agents-md-documentation
Open

RTsta wants to merge 1 commit into
masterfrom
feat/agents-md-documentation

Conversation

@RTsta

@RTsta RTsta commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a root AGENTS.md plus nested AGENTS.md files (Sources/Networking/Core/, Sources/Networking/Modifiers/, NetworkingSampleApp/) and a new CONTRIBUTING.md, so AI coding agents (and human contributors) get accurate, in-repo guidance on this package's architecture constraints, public-API compatibility rules, and build/test/lint commands instead of having to reverse-engineer them from the source.
  • Excludes the two nested AGENTS.md files from the SwiftPM target's resources (Package.swift) so they don't trigger unhandled-resource warnings.
  • Brings README.md and the DocC overview (Sources/Networking/Documentation.docc/Documentation.md) in line with the current public API: corrected code samples (DownloadAPIManager/UploadAPIManager init, MultipartFormData, stateStream/progressStream signatures), documents NetworkingActor isolation and the lack of shared manager instances, the StatusCodeProcessor.shared default, the auth-refresh-manager recursion pitfall, and the invalidateUrlSession() / setResponseProvider(_:) recovery flow — none of which were previously documented and were only discoverable by reading the implementation.
  • Updates the "Prefer one long-lived manager, call invalidateSession(shouldFinishTasks:)" guidance consistently across the doc comments in DownloadAPIManager.swift and UploadAPIManager.swift.

Why

The docs had drifted from the implementation (stale code samples, undocumented actor isolation and default-processor behavior), which is exactly the kind of gap that causes an agent — or a new contributor — to write plausible-looking code that's actually wrong (e.g. dropping StatusCodeProcessor.shared when overriding responseProcessors:, or looping an authorization interceptor into its own refresh call). This PR closes that gap and adds the AGENTS.md/CONTRIBUTING.md layer so future agent-assisted changes start from ground truth.

Every constraint added to the AGENTS.md/CONTRIBUTING.md files was verified directly against the source before being written, not just inferred from prior docs.

Structure and content were informed by these write-ups on writing effective agent instruction files:

Test plan

  • swift build — confirm no unhandled-resource warning for the nested AGENTS.md files
  • swift test / CI-parity macOS check pass
  • Spot-check updated README/DocC code samples compile against current public API
  • ./generate_docs.sh if DocC output needs regenerating

🤖 Generated with Claude Code

@RTsta
RTsta marked this pull request as ready for review September 21, 2026 10:12
Base automatically changed from fix/xcode27-min-deployment to master September 30, 2026 07:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant