---
name: cloudflare-codacy-release-readiness
description: Assess and prepare any repository for selectable Cloudflare capabilities and Codacy quality controls, generate provider profiles, and design preview-to-production release gates. Use for cross-repository rollout, repository branch preparation, CI/CD readiness, or correlating GitHub, Cloudflare, Codacy, and error-tracking evidence.
---

# Cloudflare and Codacy Release Readiness

Prepare both providers for every repository while enabling only capabilities that fit the stack.

## Provider rule

Every repository receives Cloudflare and Codacy readiness assessments, selected and rejected capabilities, required secret names and permission scopes, activation and rollback steps, cost or plan constraints, and read/write tool boundaries.

`NOT_APPLICABLE_TO_CAPABILITY` applies to a single capability, not to the entire provider.

## Inventory first

Before remote tools or changes:

1. read repository instructions and inspect Git status;
2. identify stack, runtime, build, tests, coverage, deployment, artifacts, infrastructure, and generated code;
3. inspect existing CI and provider configuration;
4. list secret names and environments without reading values;
5. identify Cloudflare and Codacy connections;
6. identify licensing, privacy, customer, and redistribution constraints.

Run the generator in dry-run mode:

```bash
python cloudflare-codacy-release-readiness/scripts/bootstrap_provider_profiles.py \
  --repo-root /path/to/repository
```

Use `--write` only after reviewing the proposed classification.

## Generated profile

The generator prepares:

```text
.agentic/providers/cloudflare.yaml
.agentic/providers/codacy.yaml
docs/cloudflare-integration.md
docs/codacy-integration.md
```

Do not create Wrangler, `.codacy`, scanner, workflow, secret, or deployment configuration unless the repository needs it and the change is approved. Use [references/provider-profile.schema.json](references/provider-profile.schema.json) and the example manifests as contracts.

## Cloudflare selection

Use `$cloudflare-agent-bootstrap` for agent and MCP setup.

- Web/PWA: Pages or Workers, previews, DNS, WAF, Turnstile, caching, logs.
- Backend: DNS, edge proxy, WAF, API Shield, rate limiting, Tunnel, Access, logs.
- Android, desktop, Java binary, .NET, Unity, or IL2CPP: R2 artifacts, signed update metadata, documentation, protected test releases, or a separate backend.
- Infrastructure: Terraform or Pulumi, DNS, Zero Trust, Tunnel, Access, policy, and drift checks.

Never force a runtime migration to Workers merely to satisfy readiness.

## Codacy selection

Use `$codacy-repository-bootstrap` for Cloud, CLI, client-side tools, Skills, MCP, coverage, and gates. Use `$codacy-guardrails-enforcer` for IDE analysis and troubleshooting.

Codacy complements native repository checks. Unsupported stacks retain best-of-breed local tools and required CI checks.

## Release pipeline

1. format and generated-file checks;
2. lint and static analysis;
3. compile or typecheck;
4. tests and coverage;
5. SAST, dependency, secret, IaC, and container scans;
6. Codacy changed findings and quality gate;
7. Cloudflare configuration validation;
8. Cloudflare preview deployment;
9. smoke, accessibility, performance, and authorized DAST tests;
10. artifact signing, SBOM, and provenance where relevant;
11. protected production approval;
12. post-deployment logs, analytics, error tracking, and rollback check.

## Incident correlation

Normalize provider, repository, commit, branch, pull request, deployment, environment, tool, rule or issue, severity, file, line, fingerprint, timestamps, status, and evidence URL.

Correlate Cloudflare build/deployment, Cloudflare logs, Bugsink-compatible runtime issues, GitHub commit/PR, Codacy findings/coverage, local reproduction, fix branch, preview verification, and reviewed PR.

## Write risk classes

- **Class 0:** inventory, docs, logs, findings, coverage, build status, diffs.
- **Class 1:** reversible repository-local profiles, docs, tests, and preview-only workflow changes.
- **Class 2:** preview deployment, Codacy reanalysis, draft PR, temporary test resource.
- **Class 3:** production deployment, DNS, WAF, Access, secrets, account settings, finding suppression, weaker standards, resource deletion.

Classes 2 and 3 require explicit approval. Class 3 requires a rollback plan first.

## Branch rollout

Use `chore/agentic-quality-stack-2026q3` or a repository-specific equivalent. Do not make production or provider-account changes from the branch. Include profiles, only selected CI capabilities, activation and rollback checklists, test evidence, and unresolved plan or credential requirements.

## Verification

```bash
python -m unittest discover \
  -s cloudflare-codacy-release-readiness/tests \
  -p 'test_*.py'
```

Validate every changed `SKILL.md` with the repository skill-validation tooling.

## Report format

Return repository inventory, both readiness matrices, selected/rejected capabilities, changed files, secret names and minimum scopes, pipeline and approvals, tests and preview evidence, activation and rollback steps, and cost/plan/support/privacy/licensing blockers.
