Scaffold archipy bdd
Scaffold Behave BDD layout for an ArchiPy app (feature, steps, ScenarioContext, pool manager, environment, optional testcontainers). Use when adding acceptance tests under features/.From its SKILL.md
npx -y skills add SyntaxArc/archipy-plugin --skill scaffold-archipy-bddAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.4 KB, as published. Nobody here has run it
Scaffold ArchiPy BDD
Before writing files
Ask the user for:
- Feature name / file stem (e.g.
user_registration) - Mode: mocks only vs infra (
@needs-*+ testcontainers)
Prefer ArchiPy
uv add "archipy[behave]"
# infra mode also:
uv add "archipy[testcontainers]"
Generate
Under project root (create shared files only if missing):
features/
├── <name>.feature
├── steps/
│ └── <name>_steps.py
├── scenario_context.py # always — adapt from ArchiPy pattern
├── scenario_context_pool_manager.py # always — Singleton pool
├── environment.py # always — behave hooks
├── test_helpers.py # always — get_current_scenario_context
└── test_containers.py # infra mode only — ContainerManager + needed containers
.env.test # infra mode — REDIS__IMAGE, POSTGRES__IMAGE, …
Model after ArchiPy features/ + docs tutorial (consumer-slim — no library gRPC/Temporal special cases unless the app
needs them).
Copy templates from reference/, adapt package imports, create only if missing:
| Destination | Template |
|---|---|
features/scenario_context.py | reference/scenario_context.py |
features/scenario_context_pool_manager.py | reference/scenario_context_pool_manager.py |
features/test_helpers.py | reference/test_helpers.py |
features/environment.py | reference/environment.py |
Uncomment / wire ContainerManager in environment.py when mode is infra.
features/test_containers.py (infra mode)
Copy pattern from ArchiPy features/test_containers.py, not the full multi-service registry:
TAG_CONTAINER_MAP(needs-redis→redis, …)ContainerManagerwithregister,get_container,start_containers,extract_containers_from_tags,stop_all- Only register containers the app actually tests (e.g. one
RedisTestContainerSingleton that startsRedisContainer, patchesBaseConfig.global_config().REDIS)
Do not paste ArchiPy’s entire container catalogue or gRPC test servers.
Feature + steps
- Gherkin source of truth; tag infra
@needs-redis/@needs-postgres/ … - Steps:
get_current_scenario_context(context)orcontext.scenario_context_pool.get_context(context.scenario.id) - Mocks mode: inject
RedisMockinto scenario context — no Docker - Skip infra:
uv run behave --tags=~@needs-redis
Constraints
- Behave only (not pytest) as primary style.
- No shared mutable globals across scenarios.
- Dispose context after each scenario;
stop_allafter feature/all when using containers. - Consumer apps: slim templates — library
environment.pygRPC/Temporal blocks are ArchiPy-core specific.