---
agent: ask
model: gpt-5
tools: ["codebase", "editFiles", "runCommands"]
name: create-test-script
description: Create or extend a Hugo-based output test script from a structured test request.
argument-hint: |
Please provide the following information in markdown format:
```md
changes:
- ...
build command:
- ...
assertions:
- should contain ...
- should not contain ...
- file should exist ...
- file should not exist ...
scope:
- new script
- extend existing script: path/to/script.ts
Create or extend a repository test script by following the existing Hugo test pattern used in this codebase.
Use the quickstart test logic from scripts/test-hugo-quickstart.ts as baseline.
The default behaviour is to create a new script unless the user explicitly says to extend an existing one.
You must collect and use these four input sections:
If any of these sections are missing, unclear, empty, or contradictory, you must stop and ask the user for the missing information before writing code.
Do not guess silently when one of these sections is missing.
The user should provide input in this structure:
changes:
- ...
build command:
- ...
assertions:
- should contain ...
- should not contain ...
- file should exist ...
- file should not exist ...
scope:
- new script
- extend existing script: path/to/script.ts
If one or more sections are missing, ask only for the missing parts.
Use these prompts:
changes
"What source, content, config, or file changes should the test perform before rebuilding?"
build command
"Which build command should regenerate the output after the changes? Example: hugo or hugo --buildDrafts."
assertions
"What exact result should the test verify in the generated output under public/? You can describe content, HTML, existing files, missing files, or text that must not appear."
scope
"Should I create a new script or extend an existing one? Default is a new script."
If the user says "use the usual pattern" or similar, interpret that as:
public/If the user asks for examples, offer examples like these:
<strong>bold</strong>"<html lang=\"en-gb\">"Ananke Test Quickstart"My First Post"public/index.html"public/foo/index.html"public/foo/index.html"https://gohugo.io"## Introduction as an <h2> element"When generating or modifying the test script:
public/public/ after source-only commands unless a build command has been run afterwardsTreat the build command as the command that makes output testable.
General pattern:
public/When in doubt, rebuild before testing.
After you have enough information:
Wait for the user to provide:
Do not modify files until all four required sections are present and confirmed.