Run product-flow manual tests in parallel Docker containers, one per flow. Use when asked to smoke test, run manual tests, or validate product flows.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Run product-flows/ flows in parallel Docker containers. If $ARGUMENTS is given, run only those numbered flows; otherwise determine which flows are out of sync (Step 0.5) and run only those.
Detect the repo root:
git rev-parse --show-toplevelAll paths below use REPO_ROOT as a placeholder — substitute the actual path.
Run the build script from the repo root:
bash REPO_ROOT/product-flows/build.shIf build.sh exits non-zero, bail immediately with the message: "Build failed — aborting smoke test." Do not proceed.
After build.sh completes, verify the binary exists:
ls REPO_ROOT/product-flows/.build/ns2If the binary is missing, bail immediately with: "Binary not found at product-flows/.build/ns2 — aborting."
The built binary at REPO_ROOT/product-flows/.build/ns2 is compiled for the container OS (Linux). For host-side ns2 commands in subsequent steps, use the system ns2 binary (i.e. just ns2 — it is on PATH).
If $ARGUMENTS was given, the flows to run are exactly those numbered flows — skip the rest of this step.
Otherwise, run spec sync scoped to the product-flows directory to find out-of-sync flows:
ns2 spec sync product-flows/ 2>&1Parse the output for lines matching [error] spec product-flows/NN- or [warning] spec product-flows/NN- and extract the two-digit flow numbers. These are the stale flows to run.
Check whether ANTHROPIC_API_KEY is set:
echo ${ANTHROPIC_API_KEY:-}If the output is empty, ANTHROPIC_API_KEY is unset. Any flow whose Prerequisites section contains [Requires: ANTHROPIC_API_KEY] must be marked SKIPPED — do not start a container for it.
For each flow being run (and not SKIPPED), start a detached container before spawning any subagents. Container names follow the pattern ns2-flow-NN where NN is the two-digit flow number.
docker run -d \
--name ns2-flow-NN \
-v REPO_ROOT/product-flows/.build/ns2:/usr/local/bin/ns2:ro \
-v REPO_ROOT/.env:/tmp/ns2-host.env:ro \
-v REPO_ROOT/product-flows/fixtures:/fixtures:ro \
ns2-test tail -f /dev/nullIf docker run returns non-zero for a given flow, mark that flow CRITICAL, record the error, and do not spawn a subagent for it. Still run cleanup for it at the end.
After all containers are started, spawn one subagent per non-SKIPPED, non-CRITICAL flow. Spawn them all at the same time — do not wait for one to finish before starting the next. Each container has its own network namespace, so port 9876 does not conflict between flows.
Each subagent receives:
.spec.md filens2-flow-03)docker exec <container-name> bash -c '...'. Do not run commands on the host. The Setup section lists the setup commands in plain form. Wrap each line in docker exec <container-name> bash -c '...' before running. Lines that chain environment setup with a long command (e.g. set -a; . /tmp/ns2-host.env; ...) must be wrapped as a single docker exec call.Each subagent follows the flow file exactly:
docker exec <container-name> bash -c '...'docker exec ns2-flow-NN bash -c '...' for every commandEach subagent returns:
Verdict definitions:
If a failure is in testable business logic, the subagent writes a failing unit test that reproduces it. If the failure is integration-only (CLI output format, server behaviour), it notes that instead.
Subagents note anything anomalous that isn't captured by the acceptance criteria — unexpected output, timing that seems fragile, behaviour that passes today but looks load-bearing for a later flow, systemic signals (e.g. "turns are created faster than timestamp granularity can distinguish"). These become Observations in the per-flow report, separate from pass/fail. The goal is to surface latent issues before they become failures in a later flow.
Subagents also note Workflow Snags — friction that made the flow harder to execute or verify than it should have been. Examples: no way to wait for session completion without polling, opaque output that required workarounds to inspect, missing CLI commands that would have made a step straightforward, log output that was absent when a failure occurred.
Wait for every spawned subagent to finish before proceeding.
For each flow that returned PASS, run:
ns2 spec verify product-flows/NN-name.spec.mdThis stamps the current timestamp into the flow's verified field, recording that the flow was run and passed against the current codebase. List each verify result in the Container Cleanup Status section.
If the binary is not available, skip this step with a note.
For every flow that had a container started (including CRITICAL flows), run:
docker rm -f ns2-flow-NNRun cleanup for each container regardless of that flow's outcome. Record whether each removal succeeded or failed — this populates the Container Cleanup Status section of the report.
Print the following sections in order.
| Flow | Name | Passed | Failed | Verdict |
|---|
For each FAIL or CRITICAL flow, list every failed criterion with actual vs expected output.
List anything noted across all flows — even from flows that passed. Surface latent issues and anomalous behaviour.
List friction points that made testing harder or reduced visibility. These are improvement signals for the developer environment and tooling, not product bugs.
Confirm whether each container was successfully removed and whether each passing flow was verified. Format:
| Container | Removed | Verified |
|---|---|---|
| ns2-flow-01 | yes | yes |
| ns2-flow-02 | yes | yes |
| ... | ... | ... |
If any removal failed, list the error. If verify was skipped (binary unavailable), note that in the Verified column.
drufball/ns2
24a215b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.