Reading the repo
Reading the repo
How to install on macOS
Java test automation framework for web, mobile, API, CLI, database, and desktop E2E testing with a fluent API and built-in reporting.
Saved setup from 3 h ago
Will it work on my device?
CONTRIBUTING.mdHumans: this repository is the Java 25 Maven reactor. The product guide is https://shafthq.github.io/. JDK 25 and Maven 3.9+ are required before the build below.
Agents: load AGENTS.md and follow ChaosEngine before editing. This file is contributor procedure, not a second policy manual. Skip it when the task does not change the engine.
The public user-guide source lives in ShaftHQ/shafthq.github.io.
Prefer a partial clone so Git downloads file contents on demand instead of every historical blob up front (#7547). Fork the repository if you are not a maintainer, then:
git clone --filter=blob:none https://github.com/<your-user>/SHAFT_ENGINE.git
cd SHAFT_ENGINE
git remote add upstream https://github.com/ShaftHQ/SHAFT_ENGINE.git
Maintainers can clone the canonical repository the same way:
git clone --filter=blob:none https://github.com/ShaftHQ/SHAFT_ENGINE.git
cd SHAFT_ENGINE
On a shared agent host, keep one partial clone (or bare/--reference
clone) and add a git worktree per branch. Do not create N full clones of this
repository on the same disk.
Mobile test apk/ipa fixtures are not in the tree. Fetch them once before a local mobile run:
python3 scripts/ci/fetch_mobile_test_apps.py
CI jobs that need the fixtures pass mobile-apps: 'true' to
.github/actions/setup-test-env. Do not force-add apk/ipa under those paths; the pre-push contract refuses tracked mobile fixtures (#7547 Phase 0). Generated indexes (graphify-out/) and
ChaosEngine runtime state (.chaos-engine-state/) stay gitignored; do not
commit them, and prefer one shared index per host over rebuilding per worktree.
Start every change from current main:
git fetch --prune origin
git switch main
git pull --ff-only origin main
git switch -c <short-topic-branch>
If you work from a fork, replace the pull command with:
git fetch --prune upstream
git switch main
git merge --ff-only upstream/main
git push origin main
git switch -c <short-topic-branch>
Required:
The repository includes .java-version and .sdkmanrc for version managers.
With SDKMAN:
sdk env install
sdk env
Verify the active tools before building:
java -version
mvn -version
Expected: Java reports version 25.x, and Maven reports 3.9.0 or newer.
Agent-assisted maintenance expects this third-party stack. Full install, update, and troubleshooting runbook: Agent tooling.
memory CLI — install the pin from chaos-engine/dependencies.json
(@aictx/memory@0.2.1); repo store lives in .memory/.
graphify — deterministic repository map for pre-search file selection:
py -3 -m pip install --user graphifyy==0.9.17, build with graphify .
from the repo root (cache in gitignored graphify-out/; see
tools/repository-map/README.md). Nightly auto-refresh (Windows):
tools/agent-infra/install-agent-tasks.ps1.
MCP servers (.mcp.json) — context7 starts on demand through npx.
Optional Maven Tools MCP uses a locally verified Java 25/JAR installation
discovered by the ChaosEngine installer;
default agent configuration does not start Docker.
SHAFT MCP, CLI, and skills — Change into the target project first, then install from the current working directory:
irm "https://raw.githubusercontent.com/ShaftHQ/SHAFT_ENGINE/main/scripts/mcp/install.ps1" | iex
curl -fsSL "https://raw.githubusercontent.com/ShaftHQ/SHAFT_ENGINE/main/scripts/mcp/install.sh" | bash
Claude Code plugins — installed automatically from
.claude/settings.json enabledPlugins/extraKnownMarketplaces on
first session.
PowerShell users should keep Maven -D arguments quoted as shown.
mvn clean install "-DskipTests" "-Dgpg.skip"
This compiles the reactor and installs local artifacts without running the test suite.
This repository ships its own agent skills, so an agent can follow the same conventions this guide describes instead of guessing at them. Point yours at them before it touches anything:
Read
chaos-engine/skills/chaos-engine/SKILL.mdand follow it for this task.
Most agents discover that entrypoint on their own. The agent skills map explains how the skills fit together and how each host imports them; which task sends you to which surface is stated once, in the routing table. Read the map once before your first agent-assisted change.
ReportManager; do not use System.out.println or
System.err.println in production code.target/, or local
credential files.The Docusaurus user guide is the canonical location for product, usage, architecture, migration, and maintainer documentation. In-repo module READMEs are short orientation only (purpose, use or skip, next link). Do not add product guides or a second ChaosEngine policy to this repository.
For documentation or agent-guidance changes:
py -3 scripts/ci/validate_agent_setup.py
py -3 scripts/ci/validate_documentation_boundaries.py
git diff --check
For localized code changes, run the affected test first. Always scope the run
with -Dtest= and force headless execution, so a browser-capable test cannot
open a real window on your machine:
mvn -pl shaft-engine -am test "-Dtest=TestClassName" "-DheadlessExecution=true"
Then run one compile/package pass appropriate to the change. For broad API, concurrency, build, or release changes, run targeted tests and the full compile/package command before opening a pull request.
When public JavaDocs change, also run:
mvn -pl shaft-engine javadoc:javadoc
For visual behavior changes, include image or browser evidence. Run external or credentialed cloud suites only when the required infrastructure is available and the result is necessary.
If the change affects public behavior, update the user guide in ShaftHQ/shafthq.github.io in the same delivery.
Before the engine PR is ready:
Push your branch:
git push -u origin <short-topic-branch>
Open a pull request against ShaftHQ/SHAFT_ENGINE:main.
The PR is ready for review when it includes:
target/, or credentialed cloud
output.Reviewers should be able to check out the branch, run the listed commands, and see the same result.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/ShaftHQ/SHAFT_ENGINE.git cd SHAFT_ENGINE
JDK
brew install openjdk@21
mvn install -DskipTests
mvn spring-boot:run
Generate your first project and run mvn test. Already on Maven? Add io.github.shafthq:shaft-engine (version from the Maven Central badge):
<dependency>
<groupId>io.github.shafthq</groupId>
<artifactId>shaft-engine</artifactId>
<version>${shaft.version}</version>
</dependency>
Then write the test:
SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://shafthq.github.io/")
.and().element().assertThat(By.cssSelector("h1")).isVisible();
driver.quit();
Run mvn test. The Allure report opens with every step, screenshot, and log.
No reports for macOS yet.
Opens a chat with this manual already filled in, for macOS. It uses your own account; gitmanual sends nothing.