core-conventions
Skill0 starsChanged 7 months agoMITView on GitHub
Use this skill when writing or reviewing Python code in TTA.dev. Covers the package manager (uv), type hint standards, primitives usage, anti-patterns to avoid, state management, and LLM provider strategy. Invoke when the user says "write code", "review code", "add a feature", or asks about conventions or standards.
- Reads credentials
- Installs packages
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/tta-dev.mdcCursor rule
- build-test-verifySkill
- core-conventionsSkill
- create-atomic-noteSkill
- create-pull-requestSkill
- git-commitSkill
- sdd-workflowSkill
- self-review-checklistSkill
- session-startSkill
- build-test-verifySkill
- create-agentSkill
- create-atomic-noteSkill
- create-pull-requestSkill
- Feature DevelopmentSkill
- git-commitSkill
- Incident ResponseSkill
- Package ReleaseSkill
- sdd-workflowSkill
- self-review-checklistSkill
- session-startSkill
- ttadev-llmSkill
- ttadev-primitivesSkill
The file
Files
Core Conventions (TTA.dev)
Non-negotiable standards for all code in the TTA.dev repository.
Package Manager
Always use uv, never pip or poetry.
uv add package-name # Add dependency
uv sync --all-extras # Sync all dependencies
uv run pytest -v # Run via uvPython Version & Types
- Python 3.12+ required
str | NonenotOptional[str]dict[str, Any]notDict[str, Any]- Google-style docstrings on all public functions
Primitives — Always Use Them
# ✅ Use primitives
workflow = RetryPrimitive(primitive=api_call, max_retries=3)
# ❌ Never write manual retry/timeout loops
for attempt in range(3): # WRONG
try: ...Anti-Patterns
| ❌ Don't | ✅ Do | |
try/except retry loops | RetryPrimitive | |
asyncio.wait_for() | TimeoutPrimitive | |
| Manual caching dicts | CachePrimitive | |
| Global variables for state | WorkflowContext | |
pip install | uv add | |
Optional[str] | `str | None` |
from primitives.X | from ttadev.primitives.X |
State Management
Pass state via WorkflowContext, never global variables:
context = WorkflowContext(workflow_id="demo")
result = await workflow.execute(input_data, context)LLM Provider Strategy
Always use get_llm_client() — never hardcode a model or base URL.
from ttadev.workflows.llm_provider import get_llm_client
cfg = get_llm_client()
# cfg.base_url, cfg.model, cfg.api_key, cfg.providerProvider hierarchy for TTA.dev apps (automatic, zero config required):
- Ollama — default, always available, no API key needed (
qwen2.5:7b) - OpenRouter
:free— ifOPENROUTER_API_KEYis set - Paid models — if a paid key is configured
Never use nvidia/nemotron-3-super-120b-a12b:free — it is a reasoning-only
model that returns content: null. Any code reading response.content will crash.
Deep Reference
- Primitives API & patterns:
docs/agent-guides/primitives-patterns.md - Python standards:
docs/agent-guides/python-standards.md - LLM provider strategy:
docs/agent-guides/llm-provider-strategy.md - TODO management:
docs/agent-guides/todo-management.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

