xiaohongshu
xiaohongshu
integrate-playground
Systematic workflow and API reference for integrating Streamlit playground with vrp-toolkit modules. Use when developing playground features, connecting UI to vrp-toolkit APIs, or encountering API signature mismatches. Provides interface mapping table, contract test integration, and troubleshooti...
Full skill instructions
Token-efficient workflow for connecting Streamlit playground UI to vrp-toolkit backend APIs.
Developing playground features requires knowing exact API signatures of vrp-toolkit modules. Without reference documentation, this requires repeatedly reading source code (consuming thousands of tokens per integration) and leads to API mismatch errors.
This skill provides:
Before writing any integration code:
Example:
Need: Generate synthetic map
API: RealMap(n_r: int, n_c: int, dist_function: Callable, dist_params: Dict)
Common mistake: ❌ Don't use num_customers, use n_c
If uncertain about API behavior:
contracts/ directorypytest contracts/test_<feature>.py -vExample:
pytest contracts/test_realmap_api.py -v
# See test_realmap_initialization() for usage example
Follow the mapping table exactly:
# ✅ Correct: Use exact signature from mapping table
np.random.seed(seed) # For reproducibility
real_map = RealMap(
n_r=num_restaurants,
n_c=num_customers,
dist_function=np.random.uniform,
dist_params={'low': 0, 'high': 100}
)
# ❌ Wrong: Assumed API
real_map = RealMap(
num_customers=num_customers,
num_restaurants=num_restaurants,
area_size=100,
seed=seed
)
Data access pattern:
__init__, not via .generate() method.demand_table, .order_table, .time_matrixCommon error patterns:
try:
instance = PDPTWInstance(
order_table=order_table,
distance_matrix=real_map.distance_matrix,
time_matrix=order_gen.time_matrix,
robot_speed=1.0
)
except TypeError as e:
st.error(f"API mismatch: {e}")
st.info("Check interface_mapping.md for correct parameters")
When adding new playground feature:
Create test in contracts/test_<feature>.py
Test should verify:
Add test reference to interface_mapping.md
Template:
# contracts/test_new_feature.py
def test_api_signature():
"""Verifies API matches interface_mapping.md"""
# Test exact parameters...
def test_reproducibility():
"""Same seed produces same result"""
np.random.seed(42)
result1 = generate_feature()
np.random.seed(42)
result2 = generate_feature()
assert result1 == result2
See api_signatures.md for:
See contract_tests.md for:
See troubleshooting.md for:
❌ Don't assume API signatures
❌ Don't repeatedly read source code
❌ Don't call non-existent methods
.demand_table, not .generate()❌ Don't skip contract tests for complex integrations
When vrp-toolkit API changes:
contracts/pytest contracts/ -vWhen adding new playground features:
contracts/Without this skill:
With this skill:
Savings: ~5700 tokens (87% reduction)
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience