Skip to content

Strengthen agent rules from APIError porting learnings#14

Merged
parthban-db merged 3 commits into
mainfrom
parthban-db/stack/update-agent-metadata-3
Feb 27, 2026
Merged

Strengthen agent rules from APIError porting learnings#14
parthban-db merged 3 commits into
mainfrom
parthban-db/stack/update-agent-metadata-3

Conversation

@parthban-db
Copy link
Copy Markdown
Contributor

@parthban-db parthban-db commented Feb 26, 2026

🥞 Stacked PR

Use this link to review incremental changes.


What changes are proposed in this pull request?

Gaps found during the APIError porting PR (#13) where repeated back-and-forth was needed. These rule updates make the expectations explicit so future agents get it right on the first pass.

  • porting.mdc — Add critical thinking section (don't blindly copy Go code that exists only because of Go language requirements like Unwrap()), factory functions vs constructors (use factory when Go returns nil), no Go references in code or comments.
  • testing.mdc — Never silently skip assertions (use expect.fail() not return), test all outputs (don't skip "obvious" fields), use real types for expected values (not anonymous objects), preserve existing test structure (don't rename fields or restructure committed tests).
  • typescript.mdc — @private JSDoc pattern for internal methods, API surface minimization (only export from index.ts what consumers need).
  • CLAUDE.md — Stay in scope (don't change logic you weren't asked to change), match existing patterns (check committed code before inventing new conventions), strengthen the requirement for authoritative sources.

How is this tested?

N/A — metadata only, no runtime changes.

@parthban-db parthban-db marked this pull request as ready for review February 26, 2026 22:08
Comment thread .agent/rules/porting.mdc Outdated
@parthban-db parthban-db force-pushed the parthban-db/stack/update-agent-metadata-3 branch from 5238189 to c92ac91 Compare February 27, 2026 14:42
@parthban-db parthban-db force-pushed the parthban-db/stack/update-agent-metadata-3 branch from bc72883 to 12ad915 Compare February 27, 2026 14:45
@parthban-db parthban-db added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit d071588 Feb 27, 2026
12 checks passed
@parthban-db parthban-db deleted the parthban-db/stack/update-agent-metadata-3 branch May 12, 2026 15:37
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.

2 participants