Files
hunfabric/tools/skill-turn-harness/playbooks/playbook.schema.json
Ludovico Magnocavallo 81f72e8068 Add FAST Prerequisites Skill and Gemini Skill Test Harness (#3979)
* initial version of a FAST pre-install skill

* first round of testing

* Update fast-0-org-setup-prereqs skill with improved UX and local path handling

- Add explicit lockout warning and stop condition if the user is not a member of the provided Admin Principal group.
- Streamline bootstrap project selection to only prompt for an override if the active gcloud project is rejected.
- Restrict dataset discovery strictly to the `fast/stages/0-org-setup/datasets/` directory.
- Improve location handling by referencing `defaults.schema.json` for Standard GCP and auto-configuring fixed regions for GCD.
- Add comprehensive `local_path` management: prompt for customization, create directories, move `defaults.yaml` to the local data folder, and symlink `0-org-setup.auto.tfvars` back to the stage directory.

* add testing scenarios, implement initial changes for scenario 2

* move skills

* move to a skills/fast subfolder

* Refactor fast-0-org-setup prereqs skill

* Add skill-turn-harness utility tool

* Use relative markdown links for skill references

* Use descriptive titles for markdown links in skill references

* Add descriptions to each phase in the prerequisites workflow map

* Use backslash for markdown line breaks in skill map

* Update README security warning to mention default .gitignore

* shebang

* Update fast prereqs skill rules to force sequential question flow and refine harness tool with proper ctrl+c handling and slugified log paths

* Move playbook-gcp-dev.yaml to fast/prerequisites/gcp-dev.yaml and update fast prerequisites

* docs(skill-turn-harness): detail autonomous pond testing approach

* docs(skill-turn-harness): add final_state_checks to pond architecture and update toc

* Refine fast prereqs SKILL and gcp-dev playbook to strictly align with one-question-at-a-time rule

* feat(skill-turn-harness): update playbook schema for autonomous persona mode

* feat(skill-turn-harness): implement autonomous persona testing mode and fallback logic

* docs(skill-turn-harness): document the three modes of testing and update ToC

* implement timeout, schema validation, configurable cli

* chore: remove accidentally committed log files

* chore: ignore logs directory

* feat(skill-harness): implement tool execution interception, configurable workspace, and modularized validation

* feat(skill-harness): add model configuration and update README

* fix(skill-harness): automatically inject -y flag to gemini commands

* docs(skill-harness): add TODO.md with analysis for skill environment dependencies

* feat(skill-harness): add working_dir support and clean up fixtures

- Implement working_dir in harness to run tests in specific directories.
- Rename test fixtures and playbooks to be more descriptive.
- Add E2E test for working_dir.
- Apply code quality improvements to harness.py (imports, linting).
- Update README with working directory considerations and usage notes.
- Update phase3-bootstrap-and-iam.md skill doc to add execution rule against creating temp scripts.

* fix: capture customer_id and respect relative paths

* Implement isolated temp workspace sandboxing with symlinks in test harness

* Configure GCD manual autonomous playbook and align Phase 3/4 steps order

* Fix linting and schema tests failures

- Add missing license headers to tools/skill-turn-harness files.

- Fix trailing spaces and newlines in playbooks.

- Ignore tools directory in schema tests workflow.

TAG=agy

CONV=1bb75453-c3e2-448b-bae9-8e332a068012

* Fix Python formatting with yapf

TAG=agy

CONV=1bb75453-c3e2-448b-bae9-8e332a068012

* Refactor skill-turn-harness to use Antigravity SDK

- Migrated harness from gemini-cli subprocesses to Antigravity SDK.
- Implemented real-time step streaming and console logging.
- Added color-coded terminal output (dark gray headers, blue inputs, pink outputs).
- Collapsed excessive newlines in streamed thoughts.
- Excluded harness codebase from workspace copy to prevent agent cheating.
- Enabled skills folder copy to resolve agent lookup loops.
- Added key validation and CLI --debug flag.

* Fix autonomous turn layout: print Turn ID before execution

- Moved the [Autonomous Turn X] header print to before running the agent turn.
- This groups the real-time thinking and tool calls under the correct Turn ID block, instead of displaying them before the label.

* Remove obsolete .log.md from prerequisites skill directory
2026-05-22 17:16:54 +00:00

168 lines
5.0 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the playbook."
},
"agent_model": {
"type": "string",
"description": "The model the Gemini CLI should use (e.g., gemini-2.5-pro)."
},
"evaluator_model": {
"type": "string",
"description": "The model the test harness uses to grade the test and simulate the user (e.g., gemini-2.5-flash)."
},
"tmpdir": {
"type": "object",
"description": "Configuration for running in a temporary isolated workspace with optional symlinks.",
"properties": {
"link_paths": {
"type": "array",
"description": "Relative paths to symlink from the host repository (current CWD) into the temporary workspace.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds for each CLI invocation.",
"default": 60,
"minimum": 1
},
"env": {
"type": "array",
"description": "A list of environment variable names required by this playbook. These will be substituted in the steps and persona context.",
"items": {
"type": "string"
}
},
"steps": {
"type": "array",
"description": "The deterministic sequence of interactions between the user and the agent.",
"items": {
"type": "object",
"properties": {
"user_input": {
"type": "string",
"description": "The simulated input provided by the user."
},
"expected_outcome": {
"type": "string",
"description": "The expected response or behavior from the agent to evaluate against."
}
},
"required": [
"user_input",
"expected_outcome"
],
"additionalProperties": false
}
},
"persona": {
"type": "object",
"description": "Configuration for the autonomous LLM-simulated user.",
"properties": {
"initial_user_input": {
"type": "string",
"description": "The first input to send to the agent when starting in pure autonomous mode. Variables are interpolated."
},
"context": {
"type": "string",
"description": "Freeform instructions and knowledge base for the simulated user. Variables are interpolated."
},
"max_turns": {
"type": "integer",
"description": "The maximum number of conversation turns allowed in autonomous mode before forcing a failure.",
"default": 10,
"minimum": 1
},
"success_criteria": {
"type": "object",
"description": "The conditions that must be met for the autonomous flow to be considered complete and successful.",
"properties": {
"llm_checks": {
"type": "array",
"description": "Semantic checks evaluated by the LLM (e.g., 'The agent printed a final configuration summary').",
"items": {
"type": "string"
}
},
"flow_contains": {
"type": "array",
"description": "Literal strings that must appear somewhere in the combined CLI stdout.",
"items": {
"type": "string"
}
},
"files_exist": {
"type": "array",
"description": "A list of file paths (relative to the workspace) that must exist.",
"items": {
"type": "string"
}
},
"files_contain": {
"type": "object",
"description": "A mapping of file paths to a list of strings that must be found within them.",
"patternProperties": {
".*": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"tool_calls_contain": {
"type": "object",
"description": "A mapping of tool names to a list of strings that must be found within their arguments.",
"patternProperties": {
".*": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
}
},
"required": [
"context",
"success_criteria"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"anyOf": [
{
"required": ["steps"]
},
{
"required": ["persona"]
}
],
"if": {
"not": {
"required": ["steps"]
}
},
"then": {
"properties": {
"persona": {
"required": ["context", "success_criteria", "initial_user_input"]
}
}
},
"additionalProperties": false
}