diff --git a/workflows/write-tests.yaml b/workflows/write-tests.yaml index 05e3411..e6d9223 100644 --- a/workflows/write-tests.yaml +++ b/workflows/write-tests.yaml @@ -48,12 +48,16 @@ params: nodes: write_tests: name: "Write tests from spec" + reference_branches: + - repo_url: "{{ repo_url }}" + branch: main + name: main prompt: | You are writing a test suite from a spec file. Tests are the contract — they will be run against an agent's implementation. Write them now, before the implementation exists. ## Spec file - Read the spec at `{{ spec_file }}` in the cloned repo at `/workspace/project/`. + Read the spec at `/workspace/reference/main/{{ spec_file }}`. {% if task_description %} ## Additional context @@ -65,7 +69,7 @@ nodes: 2. For each requirement, write at least one test function named `test__`. 3. Cover edge cases explicitly — empty inputs, boundary values, error paths. 4. Add property-based tests (Hypothesis) where the requirement involves ranges or invariants. - 5. Write tests to `{{ test_output_dir }}` — one file per logical group (mirrors spec sections). + 5. Write tests to `/workspace/project/{{ test_output_dir }}` — one file per logical group (mirrors spec sections). 6. Use `{{ test_framework }}` conventions. Tests should fail immediately (no implementation exists). 7. Do NOT write any implementation code. Only test files. @@ -82,11 +86,15 @@ nodes: review_coverage: name: "Review test coverage" depends_on: [write_tests] + reference_branches: + - repo_url: "{{ repo_url }}" + branch: main + name: main prompt: | You are reviewing the coverage of a freshly written test suite against its spec. ## Spec file - Read the spec at `{{ spec_file }}` in the cloned repo at `/workspace/project/`. + Read the spec at `/workspace/reference/main/{{ spec_file }}`. ## Test summary written by the previous agent <>