feature
End-to-end feature implementation — source, exports, tests, docs, examples, and notebook
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
End-to-end feature implementation — source, exports, tests, docs, examples, and notebook
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Run the full code quality pipeline — ruff format, ruff check, mypy, bandit
Prepare and execute a selectools release — version bump, changelog, docs, git, PyPI
Auto-fill HANDOFF.md with current session state from git, then suggest /clear for a fresh start
Autonomous hunt-and-fix loop for a single selectools module. Finds bugs, auto-applies fixes, writes regression tests, verifies with pytest. Outputs RALPH_RESULT sentinel on the last line so the orchestration script can detect convergence.
Deploy parallel QA agents to hunt for bugs across selectools. Each agent audits a different subsystem. Use for pre-release quality gates or periodic sweeps.
Cross-reference audit for stale counts, broken links, and doc drift across all files
| name | feature |
| description | End-to-end feature implementation — source, exports, tests, docs, examples, and notebook |
| argument-hint | <feature-description> |
Implement the following feature: $ARGUMENTS
grep -m1 __version__ src/selectools/__init__.pypytest tests/ --collect-only -q 2>/dev/null | tail -1ls examples/*.py | tail -1python3 -c "from selectools.trace import StepType; print(len(StepType))" 2>/dev/nullpython3 -c "from selectools.observer import AgentObserver; import inspect; print(len([m for m in dir(AgentObserver) if m.startswith('on_')]))" 2>/dev/nullBefore writing code, determine:
agent/core.py? If so, follow the execution flow:
_prepare_run → cancellation check → budget check → model selection → on_iteration_start → provider call → _process_response → guardrails → parser → policy → coherence → tool execution → post-tool cancellation check → on_iteration_endAgentConfig in agent/config.py need new fields?__init__.py need new public exports?trace.py need new StepType values? (currently 16)observer.py need new events? If so, add to ALL FOUR classes:
AgentObserver (no-op default)AsyncAgentObserver (async no-op)LoggingObserver (JSON emission via _emit())SimpleStepObserver (delegate to self._cb())AgentResult need new fields?tests/test_phase1_design_patterns.py StepType count if adding new typesNew module pattern:
"""Module docstring — one line."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Dict, List, Optional
# Lazy imports for optional deps
try:
import some_lib
except ImportError:
some_lib = None # type: ignore[assignment]
For agent loop changes — add to the shared helpers (_check_budget, _build_cancelled_result, etc.) rather than duplicating in run()/arun()/astream(). Use _RunContext to carry per-run state.
For provider caller changes — use self._effective_model (not self.config.model) throughout _provider_caller.py.
For tool changes — add flags to both Tool.__init__() in tools/base.py AND @tool() decorator in tools/decorators.py.
Add to src/selectools/__init__.py in the appropriate section.
Then apply a stability marker to every new public class or function (at the definition, not the import):
from selectools.stability import stable, beta, deprecated
@beta # first release → beta; promote to @stable in the next release
class NewFeature: ...
@deprecated(since="0.19", replacement="NewFeature")
class OldFeature: ... # keep for ≥ 2 minor versions, then remove
Quick rule: new feature in first release = @beta. Replacing an existing API = @deprecated on the old one. Mature, stable core API = @stable.
Run /lint to format and check code quality.
See /test for detailed testing patterns. Key reminders:
_DUMMY)(Message, UsageStats) tuples for controlled usage statsCreate examples/NN_feature_name.py (use next number from Live Project State above).
Every feature MUST have documentation updated before the feature is considered complete. This is not optional. Failing to update docs is the same as shipping broken code.
For EACH source file you modified or created, find the corresponding doc in docs/modules/
and update it with the new feature. Add code examples, API signatures, and "Since: vX.Y.Z".
docs/QUICKSTART.md — add a "What's New" entry if user-facingdocs/llms.txt — update module descriptions, counts, and linksdocs/index.md — update feature table and counts if applicablemkdocs.yml — update nav labels (e.g., tool counts) if changedlanding/index.html — update stats bar counts (tests, examples, models, etc.)notebooks/getting_started.ipynb — add a new step if the feature is user-facingcp CHANGELOG.md docs/CHANGELOG.md && mkdocs build
If you created new source modules, also update:
docs/llms-full.txt (regenerate with the build script)docs/ARCHITECTURE.md if it changes the system architecturedocs/MIGRATION.md if it replaces or improves on a competitor featurepytest tests/ -x -q
ALL tests must pass. No exceptions.
Run /audit to verify all counts are consistent across docs. Fix any mismatches.
Stage specific files and commit. Wait for user to approve before pushing.
response_msg.content or "" — providers can return Noneelif response_format is None: before parser — don't intercept structured output_memory_add_many() not self.memory.add_many() — ensures observer firesstream()/astream() MUST pass tools paramToolCall objects in streaming pathsthreading.Lock + refcountastream() must save/restore _system_prompt in finally block_effective_model property (not self.config.model)StreamChunk has no finished field — don't pass finished=Truebandit: mark safe SQL with # nosec B608, mark safe pass with # nosec B110