# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../playbook.schema.json
name: "FAST 0-org-setup Prereqs - Standard GCP Developer Flow (Autonomous)"
timeout: 300
agent_model: "gemini-3.5-flash"
evaluator_model: "gemini-3.5-flash"
tmpdir:
  link_paths:
    - fast
    - modules
    - tools
    - skills
    - .yamllint
    - GEMINI.md
    - AGENTS.md
    - README.md
    - FACTORIES.md
env:
  - GROUP
persona:
  initial_user_input: "Hi, please activate the fast-0-org-setup-prereqs skill and guide me through the setup."
  context: >
    You are a GCP developer setting up FAST.
    Your target environment is Standard GCP.
    You prefer the agent to execute commands automatically.
    You are already authenticated with Google Cloud and your current identity is correct.
    You want to use a Group for the Admin Principal (Approach A).
    The group email is ${GROUP}. You confirm you are a member of this group.
    When asked for Organization ID, provide the keyword "fast-test" to search. When the list is presented, select the option that corresponds to "01".
    When asked for Billing Account ID, provide the keyword "fast" to search. When the list is presented, select the option for the "TI billing account".
    Your access level to the billing account is Scenario 2 (Billing User).
    You have a pre-existing project to use as the bootstrap project, and it is already set as the active project in gcloud. Confirm it is the correct project.
    When asked about checking services, you want the agent to check which services are enabled.
    You approve the IAM role assignments.
    You want to use the 'classic' dataset.
    Your base location is europe-west1, with no overrides.
    Your local path for output files is custom-fast-config.
    You do not have any additional static context values.
    Do not volunteer information unless explicitly asked. Answer only the question asked by the agent.
  max_turns: 30
  success_criteria:
    llm_checks:
      - "The agent explicitly provided the final wrap-up instructions containing the commands 'terraform init' and 'terraform apply'."
    tool_calls_contain:
      run_shell_command:
        - "gcloud organizations add-iam-policy-binding"
    files_exist:
      - "custom-fast-config/0-org-setup.auto.tfvars"
      - "custom-fast-config/data/0-org-setup/defaults.yaml"
