NW-DISTILL: Acceptance Test Creation and Business Validation Wave: DISTILL (wave 5 of 6)…
- User
NW-DISTILL: Acceptance Test Creation and Business Validation
Wave: DISTILL (wave 5 of 6) | Agent: Quinn (nw-acceptance-designer)
Overview
Create E2E acceptance tests from requirements|architecture|infrastructure design using Given-When-Then format. Produces executable specifications bridging business requirements and technical implementation. Infrastructure design from DEVOP informs test environment setup.
Interactive Decision Points
Decision 1: Feature Scope
Question: What is the scope of this feature? Options:
- Core feature -- primary application functionality
- Extension -- modular add-on or integration
- Bug fix -- regression tests for a known defect
Decision 2: Test Framework
Question: Which test framework to use? Options:
- pytest-bdd -- Python BDD framework
- Cucumber -- Ruby/JS BDD framework
- SpecFlow -- .NET BDD framework
- Custom -- user provides details
Decision 3: Integration Approach
Question: How should integration tests connect to services? Options:
- Real services -- test against actual running services
- Test containers -- ephemeral containers for dependencies
- Mocks for external only -- real internal, mocked external services
Decision 4: Infrastructure Testing
Question: Should acceptance tests cover infrastructure concerns? Options:
- Yes -- include CI/CD validation, deployment smoke tests
- No -- functional acceptance tests only
Context Files Required
- docs/feature/{feature-name}/discuss/requirements.md | user-stories.md
- docs/feature/{feature-name}/design/architecture-design.md | component-boundaries.md | technology-stack.md
- docs/feature/{feature-name}/deliver/* (infrastructure design from DEVOP)
Rigor Profile Integration
Before dispatching the acceptance designer, read rigor config from
.nwave/des-config.json(key:rigor). If absent, use standard defaults.agent_model: Pass asmodelparameter to Task tool. If"inherit", omitmodel(inherits from session).
Agent Invocation
Assistant
Let me gather all the required context files first.
Assistant
Good, ADRs 026-030 exist. Now let me read all the files. I'll read them in parallel batches.
Assistant
Now let me read the remaining context files - requirements, UX journeys, and architecture design.
Assistant
Now let me read the remaining UX and feature design files.
Assistant
Now let me read the existing acceptance test patterns and remaining UX journey feature files.
Assistant
Let me read an existing acceptance test and the test kit to understand the patterns.
Assistant
I now have all the context needed. Let me make the DISTILL decisions based on what I've read:
- Feature scope: Core feature (primary application functionality)
- Test framework: Custom — bun:test with
acceptance-test-kit.ts(the project's existing pattern) - Integration approach: Real services — tests use real SurrealDB with isolated namespace/database
- Infrastructure testing: No — functional acceptance tests only
Now dispatching the acceptance designer agent with the full context.
Assistant
The acceptance designer agent has completed the DISTILL wave. Here's a summary:
DISTILL Wave Complete: Agent Learnings
Test Files Created (8 files)
File Tests Status tests/acceptance/agent-learnings/learning-test-kit.ts-- Test helpers tests/acceptance/agent-learnings/walking-skeleton.test.ts2 Enabled tests/acceptance/agent-learnings/milestone-1-schema-and-queries.test.ts11 - User
/context context
- User
- NOTE: LLM-based intent classification (for the 0.75-0.90 ambiguous zone) requires
- mocking. These tests focus on the deterministic similarity thresholds and the
- fail-open/hard-block behaviors that don't require LLM calls.
why? all other acceptance tests use llm
Assistant
Good catch. Let me read the current milestone-6 file and an existing test that uses LLM calls to understand the pattern.
Assistant
You're right. The observer-llm-reasoning tests call real LLMs with no mocking. The collision detection tests should do the same — use real embeddings and real LLM intent classification. Let me fix this.
Assistant
Now I see the full picture. The tests use
fakeLearningEmbeddinginstead of real embeddings and dodge LLM calls entirely. Let me rewrite milestone-6 to use real embeddings and real LLM classification, following the observer-llm-reasoning pattern.First, I'll add a real embedding helper to the test kit, then rewrite milestone-6.
Assistant
Now add the real embedding helper, replacing the fake one:
Assistant
Now rewrite milestone-6 to use real LLM calls:
Assistant
Now update the test-scenarios.md to reflect the changes:
Assistant
Fixed. The changes:
-
learning-test-kit.ts— AddedgenerateEmbedding(),generateEmbeddings(),createTestLearningWithEmbedding(),createTestPolicyWithEmbedding(),createTestDecisionWithEmbedding()that use the real embedding model viatestAI.embeddingModel. RemovedfakeLearningEmbedding. -
milestone-6-collision-detection.test.ts— Fully rewritten:- All collision tests use real embeddings from the embedding model
- LLM intent classification tests use semantically meaningful text pairs (e.g., "Always use PostgreSQL" vs "Use MySQL, PostgreSQL is not permitted") so the real LLM produces predictable classifications
- Removed the defensive "mocking" comment
- Added 2 new scenarios: LLM reinforcement classification, priority weighting (human > agent)
- Total: 11 scenarios (up from 9), matching the observer-llm-reasoning pattern
-
test-scenarios.md— Updated M6 inventory to reflect the 11 real-LLM scenarios.
-
- User
/context context
- User
commit
Assistant
Committed
b008124f— 11 files, 3117 lines. All DISTILL wave artifacts for agent learnings.