{
  "purpose": "Automates the creation and maintenance of software-catalog.yaml files and ensures Jenkinsfiles have the correct 'Publish Software Catalog Definition' stage for multiple repositories.",
  "prompt_configuration_workflow": {
    "yaml_file_naming": {
      "file_name": "software-catalog.yaml",
      "skip_if_exists": true,
      "jenkinsfile_update_if_needed": true,
      "sample_yaml": {
        "apiVersion": "v3",
        "kind": "service",
        "metadata": {
          "name": "ows-moneyhub",
          "description": "Financial data aggregation and management service for The Orchard",
          "owner": "customer-accounting",
          "tags": ["public:false"]
        },
        "spec": {
          "type": "web"
        }
      }
    },
    "name_extraction": "Set 'name' field in YAML based on the 'Repo' column in GitHub Repository Ownership.csv.",
    "owner_extraction": "Set 'owner' field in YAML based on the 'Owner' column in GitHub Repository Ownership.csv. If update requested, set to specified value.",
    "description_extraction": "Fill 'description' field using repo description or README if possible.",
    "jenkinsfile_stage": {
      "publish_stage": {
        "stage": "Deploy to Prod",
        "step": "datadogSoftwareCatalogPublish()",
        "location": "immediately after prod deployment step",
        "requirements": "Direct step, not inside a script block"
      },
      "validate_stage": {
        "stage": "Validate Software Catalog Definition",
        "location": "immediately after Compliance Checks",
        "step": "datadogSoftwareCatalogValidate()"
      },
      "no_change_if_exists": true
    },
    "branching_and_prs": {
      "branch_name": "add-software-catalog-yaml",
      "pr_per_repo": true,
      "squash_commits": true
    },
    "supported_repos": {
      "source_csv": "GitHub Repository Ownership.csv",
      "pr_limit": 10,
      "csv_update_column": "Copilot Pull request created",
      "skip_if_pr_exists": true
    }
  },
  "how_to_use": [
    "Provide the repo names and any specific requirements (e.g., public/private, owner, description).",
    "The agent will: Extract CODEOWNERS and repo context.",
    "Generate or update the YAML file.",
    "Update the Jenkinsfile if needed.",
    "Create a branch and open a PR.",
    "Ensure all changes are squashed into one commit."
  ]
}

