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 the context needed for the DISTILL wave - requirements, architecture, and existing test patterns.
Assistant
Good, comprehensive docs exist. Let me read the key files needed to design acceptance tests.
Assistant
Now let me read the existing intent-node acceptance tests to follow the exact same patterns.
Assistant
Now I have everything needed. Let me also check the remaining intent milestone tests for patterns, then create the acceptance test suite.
Assistant
I have all the context needed. Now I'll create the full acceptance test suite. Let me create all files in parallel.
Assistant
Now write the documentation files.
Assistant
Now let me verify the test kit compiles correctly by checking for import issues.
Assistant
These are all pre-existing project-wide type errors (not from my new files). The policy test files themselves don't show any errors. Let me verify specifically.
Assistant
No type errors in the policy-node test files. Now let me dispatch the review agent.
Assistant
DISTILL wave complete. Here's the summary:
Policy Node Acceptance Tests Created
Files Created (6)
Test suite (
tests/acceptance/policy-node/):policy-test-kit.ts— Domain helpers extending intent-test-kit (createPolicy, activatePolicy, deprecatePolicy, loadActivePolicies, simulatePolicyGateResult, etc.)walking-skeleton.test.ts— 2 E2E paths: deny blocks intent; empty set passes throughmilestone-1-schema-and-lifecycle.test.ts— 8 tests: schema enforcement, lifecycle transitions, graph edges, version immutabilitymilestone-2-policy-gate-evaluation.test.ts— 7 tests: graph traversal loading, deny short-circuit, veto override, backward compatmilestone-3-audit-and-authorization.test.ts— 7 tests: policy trace, audit events, missing field handling, authorization model, AND-joined conditions
Assistant
Review completed: APPROVED by the acceptance designer reviewer.
Scores: GWT format 10/10, Coverage completeness 10/10, Business language 9/10, Happy path bias 9/10, Priority validation 9/10.
All design mandates pass (hexagonal boundary, business language, user journeys). All 10 user stories and 12 acceptance criteria covered across 24 scenarios.
Minor non-blocking recommendations:
- Add predicate evaluator unit tests in
app/tests/unitduring DELIVER - Consider explicit dedup test for policy linked via both governing and protects edges
- Intermediate lifecycle state
testingdeferred (spec allows but not required)
The suite is ready for handoff to nw-software-crafter (DELIVER wave). Implementation order: schema migration → types → predicate evaluator → policy queries → policy gate → authorizer integration → audit extensions.
- Add predicate evaluator unit tests in
- User
Summary for Handoff
Approval Decision: APPROVED
The policy-node acceptance test suite (DISTILL wave output) is production-ready for the DELIVER wave. All acceptance criteria are satisfied, user stories are covered, and the testing architecture aligns with project mandates (hexagonal boundary, business language, user journey focus).
Key Files Under Review:
- User
/context context
- User
commit
Assistant
I'll commit only the new DISTILL wave files (the deletions and
.nwave/des-config.jsonchange appear to be from a prior session).Assistant
Committed
6bf075de— 7 files, 1945 insertions. The remaining unstaged changes (deletions + config) are from prior work and were left untouched.- User
/context context