chore: add CLAUDE.md and Cursor rules for AI agent context#3
Merged
johnnichev merged 1 commit intomainfrom Mar 12, 2026
Merged
Conversation
- CLAUDE.md: comprehensive agent instructions with project overview, codebase structure, development commands, conventions, feature development checklist, release process, and common pitfalls - .cursor/rules/selectools-development.mdc: always-apply rules for code conventions, testing requirements, feature completeness checklist, and release process - .cursor/rules/selectools-providers.mdc: provider-specific rules for tool passing, streaming, message formatting, and testing - .cursor/rules/selectools-agent-core.mdc: agent loop execution flow, integration points, thread safety, and defensive patterns - .cursor/rules/selectools-testing.mdc: test organization, mock/ recording provider patterns, regression test conventions - .cursor/rules/selectools-docs.mdc: MkDocs site structure, link rules, hardcoded count locations, and documentation style Made-with: Cursor
johnnichev
added a commit
that referenced
this pull request
Mar 24, 2026
Security: - Path traversal in JsonFileSessionStore — validate session_id (#9) - Unicode homoglyph bypass in injection screening — NFKD + zero-width strip + homoglyph map (#13) Data integrity: - FileKnowledgeStore._save_all() atomic write via tmp + os.replace (#10) - JsonFileSessionStore.save() atomic write (#31) Agent core: - astream() uses self._effective_model (was self.config.model) (#1) - Sync _check_policy rejects async confirm_action with clear error (#2) - Sync _streaming_call isinstance(chunk, str) guard (#18) Providers: - FallbackProvider stream()/astream() record success after consumption, not before — circuit breaker now works for streaming (#3) - Gemini response.text ValueError catch for tool-call-only responses (#4) Tools: - aexecute() uses run_in_executor(None) shared executor (#5) - execute() awaits coroutines from async tools via asyncio.run (#6) RAG: - Hybrid search O(n²) → O(1) via text_to_key dict lookup (#7) - SQLiteVectorStore thread safety + WAL mode (#8) Evals: - OutputEvaluator catches re.error on invalid regex (#11) - JsonValidityEvaluator respects expect_json=False (#12) 16 new regression tests. Full suite: 2000 passed.
17 tasks
johnnichev
added a commit
that referenced
this pull request
Apr 12, 2026
…etection
Source: LiteLLM #13515. Azure OpenAI deployments use user-chosen names
(e.g., "prod-chat", "my-reasoning"), NOT the underlying model's family
prefix. AzureOpenAIProvider inherited _get_token_key from OpenAIProvider,
which calls `model.startswith("gpt-5")` etc. with the deployment name. An
Azure deployment of gpt-5-mini under name "prod-chat" therefore received
`max_tokens` instead of `max_completion_tokens` and hit
`BadRequestError: Unsupported parameter: 'max_tokens'`. Azure variant of
round-1 pitfall #3 — the direct OpenAI path was fixed but the Azure
subclass bypassed family detection entirely.
Fix: added `model_family: str | None = None` kwarg to
AzureOpenAIProvider.__init__. When set, overrides the deployment-name-based
family detection so users can explicitly tell selectools what family their
deployment is. Backward compatible: model_family=None falls back to the
original deployment-name prefix matching.
Usage:
AzureOpenAIProvider(
azure_deployment="prod-chat", # user-chosen deployment name
model_family="gpt-5", # underlying family
)
3 regression tests in tests/agent/test_regression.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.cursor/rules/— scoped rules for development conventions, provider implementation, agent core, testing patterns, and documentation standardsThese files ensure that any AI agent entering the codebase has full context on how we build, test, document, and release features.
Test plan
Made with Cursor