Skip to content

Instantly share code, notes, and snippets.

@vossisboss
Created March 26, 2026 20:54
Show Gist options
  • Select an option

  • Save vossisboss/af9458e61e61668a97176a5226b4760d to your computer and use it in GitHub Desktop.

Select an option

Save vossisboss/af9458e61e61668a97176a5226b4760d to your computer and use it in GitHub Desktop.
An agent skill for creating a test version of the Wagtail bakery demo for testing features and packages
name build-wagtail-test-site
description Plan and build a Wagtail test project for testing
license MIT

Build Wagtail Test Site

Overview

A skill to create a temporary local Wagtail test project using the Wagtail Bakery demo as test content.

Methodology

Goals

  • Create a local venv environment
  • Install a version of the Wagtail bakery demo from https://github.com/wagtail/bakerydemo that is compatible with the version of Wagtail requested for the test project
  • Install the included test data fixture from the Wagtail bakery demo so that the project has test data
  • Create a report for the user that tells them which version of Python they need to use on their local machine for the test environment to function properly

Guardrails

  • Use tags in the Wagtail Bakery GitHub repository instead of releases to determine which version of the bakerydemo to use
  • Make no changes or updates to the Wagtail bakery demo code
  • Do not analyze the Wagtail bakery demo code for issues or changes
  • Do not install a new version of Python using uv python install or any other mechanism — if the required Python version is unavailable, report this to the user and stop
  • Consult the release notes for the requested Wagtail version at https://docs.wagtail.org/en/stable/releases/index.html

Input

To detect from the context or request from the user if unclear:

  • Target version for Wagtail. Default: assume "latest", fetch the release schedule and check which version is latest based on the current date.
  • Current dependencies management tool: uv Default: uv

Reference data sources

Always fetch latest information from the official Wagtail docs if possible.

Combine it with project-specific information:

  • Guidance for contributors.
  • Upgrade considerations / test plans / documentation on customizations.
  • Implementation details in the code, in particular Python files.

Reporting

Creating a good test project is important and it’s critical you provide clear information to the user throughout building the test project with clear requests for any extra input. And as a comprehensive report at the end.

  • Use text formatting if supported (tables, lists, Markdown links)
  • Link directly to release notes and other documentation pages where relevant.
  • When sharing docs references in reporting, make sure to link to the HTML pages (.html, not .html.md for developer docs; and remove /markdown/ from user guide URLs).
  • Report on both your methodology, and the outcome.
  • Use artifacts in addition to messages if supported.

Commit and pull request strategy

Do not create commits or pull requests for this test project unless requested by the user.

Quality Assurance

Options to check that the test project works correctly:

  • Project linting passes
  • Project test suite passes
  • No unapplied migrations
  • Django check framework passes
  • Any other automated or manual checks documented for the project (test plans? upgrade considerations?)
  • If supported by your AI harness: running the server and manually navigating the site/app to do manual checks.

Look for any deprecation warnings coming from Wagtail in particular.

Definition of done

To adapt from the specifics of the project:

  • Test project created in a new directory call bakery-test
  • All migrations have been run
  • Initial data has been loaded
  • A report has been created for the user to tell them which version of Python they should use to launch the test project

Steps

Create virtual environment

  • Create a directory called bakery-test
  • Create a virtual environment within bakery-test using uv venv (e.g. uv venv --python 3.12 if a specific version is required)
  • Activate the virtual environment (or use uv run / uv pip commands which auto-detect the local venv)

Download the correct version of the Wagtail Bakery demo

  • Determine the target Wagtail version ("latest" or a specific version number)
  • If the target Wagtail version is 6.4 or older, fetch Bakery Demo Tags, find the tag matching the target version, then clone it using git clone --branch <tag-name> --depth 1 https://github.com/wagtail/bakerydemo — note that --branch accepts tag names, not just branch names
  • If the target Wagtail version is 6.5+, clone the main branch of https://github.com/wagtail/bakerydemo

Install the Wagtail Bakery demo in the virtual environment

  • Follow the instructions in the [README] to install the Wagtail Bakery demo, substituting uv pip install for any pip install commands and uv pip install -r for any pip install -r commands
  • If the version of Python required is not compatible, recreate the venv with the correct version: uv venv --python <version>, then prompt the user to ensure that Python version is available on their machine

Note any warnings or errors for the user. Those might indicate further actions needed for the upgrades to be successful. You may need to move to the subsequent steps to resolve them.

Create Python version report

  • Check the release notes for the requseted version of Wagtail to determine which versions of Python are supported
  • Provide a report telling the user which version of Python is necessary to run the test project, and note they can pin it locally with uv python pin <version> if using uv for their own projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment