{
  "version": "4.0.0-package-index-release-plan",
  "policy": "Codex may prepare package-index materials and checks, but TestPyPI/PyPI uploads require a named human maintainer.",
  "package": {
    "name": "software-grimoire",
    "current_version": "3.0.0",
    "source": "pyproject.toml",
    "upload_status": "not-uploaded-human-required"
  },
  "preflight_checks": [
    "python3 scripts/bootstrap_project.py",
    "python3 scripts/validate_data.py",
    "python3 scripts/check_package_publish_workflow.py",
    "python3 -m pytest",
    "python3 scripts/check_package.py",
    "python3 scripts/check_package_index.py --index pypi --dry-run --write-report tmp/package-index-smoke-dry-run.json",
    "quarto render",
    "python3 scripts/smoke_public_site.py --write-report tmp/package-index-smoke.json"
  ],
  "build_commands": [
    "rm -rf dist",
    "python3 -m build",
    "python3 -m twine check dist/*"
  ],
  "trusted_publishing_workflow": {
    "path": ".github/workflows/publish-package.yml",
    "trigger": "workflow_dispatch",
    "authentication": "PyPI Trusted Publishing via GitHub OIDC",
    "required_permissions": [
      "id-token: write"
    ],
    "environments": [
      "testpypi",
      "pypi"
    ],
    "manual_confirmation": "publish software-grimoire",
    "post_publish_reports": [
      "tmp/package-index-smoke-testpypi.json",
      "tmp/package-index-smoke-pypi.json"
    ]
  },
  "testpypi_upload": {
    "human_required": true,
    "command": "gh workflow run .github/workflows/publish-package.yml -f index=testpypi -f version=3.0.0 -f confirmation='publish software-grimoire'",
    "post_upload_check": "python3 scripts/check_package_index.py --index testpypi --write-report examples/adoption/package-index-smoke.json"
  },
  "pypi_upload": {
    "human_required": true,
    "command": "gh workflow run .github/workflows/publish-package.yml -f index=pypi -f version=3.0.0 -f confirmation='publish software-grimoire'",
    "post_upload_check": "python3 scripts/check_package_index.py --index pypi --write-report examples/adoption/package-index-smoke.json"
  },
  "evidence_rules": [
    "Do not mark package-index release complete before a human performs upload.",
    "Do not count local wheel install as package-index availability.",
    "Configure PyPI/TestPyPI Trusted Publisher entries before dispatching the publish workflow.",
    "Commit examples/adoption/package-index-smoke.json only after the checker installs the uploaded version from the selected public index.",
    "Record TestPyPI/PyPI URL, uploader, date, installed version, and post-upload smoke output after upload."
  ]
}
