repo2prod
Productionize the current repository using Repo2Prod runtime evidence
- License 许可
- MIT
- 最近更新
- 2026-09-27
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- repo2prod
- description
- Productionize the current repository using Repo2Prod runtime evidence
- user-invocable
- true
03 SKILL.md 正文
Read the following Repo2Prod state files before doing any work:
Required:
.repo2prod/evidence.json.repo2prod/runtime-manifest.json
If either required file does not exist, stop immediately and clearly report which file is missing. Do not invent data to substitute for a missing required state file.
Optional:
.repo2prod/resolved-config.json
If .repo2prod/resolved-config.json exists, read it and use it as supplemental
runtime configuration context. If it does not exist, continue normally — do not
treat its absence as an error.
Once you have read the available state files, perform the following:
-
Validate runtime assumptions — confirm that the evidence in
.repo2prod/evidence.jsonmatches the actual repository structure. Note any discrepancies. Do not assume optional missing configuration is already resolved. -
Create or minimally repair the local Docker runtime — create or update only what is needed to make the application run locally in Docker/Compose. Candidates include:
Dockerfile.dockerignorecompose.yaml.env.example
When creating or updating
.dockerignore, ensure it contains at least these three entries (preserve all existing rules, add only what is missing):.repo2prod/ .bob/ .git/These paths must never enter the Docker build context.
-
Ensure a health endpoint exists
- Look for an existing health/readiness endpoint in the application (e.g. routes or views named health, healthz, ready, status, ping).
- If one exists and it returns HTTP 200 only when the app can serve requests, reuse it. Do not create a duplicate.
- If none exists, add the smallest possible one using the project's own
framework conventions (for Django: one small view and one URL entry;
no new dependencies, no new app unless unavoidable):
- GET /health/ returns 200 with JSON
{"status": "ok"}when healthy. - If the app uses a database, the endpoint must really check it
(e.g. a trivial SELECT 1) and return 503 with
{"status": "error"}when that check fails. - No authentication, and it must work for plain GET requests (no CSRF token needed).
- It must work with the host settings used by the local container; Repo2Prod probes it from the host at 127.0.0.1.
- It must never expose secrets, env values, connection strings, stack traces, or version details.
- It must NOT be hard-coded to always return 200.
- GET /health/ returns 200 with JSON
- This step only adds or declares the endpoint. Do not change other application code in this step, and do not add or modify tests.
- Write
.repo2prod/health-endpoint.jsonin exactly this shape (expectStatusis a number):
Use{ "path": "/health/", "method": "GET", "expectStatus": 200, "checks": ["database"], "source": "existing", "files": ["<repo-relative files that define the endpoint>"] }"checks": []if no dependency is checked, and"source": "created-by-bob"if you created the endpoint.
-
Preserve working configuration — if a file already exists and is largely correct, make the smallest targeted change rather than rewriting it.
-
Do not refactor unrelated application code. Only touch runtime configuration files unless a direct source-level fix is required for the container to start. The minimal health-endpoint addition in step 3 is the only permitted source-level change in this task.
-
Never invent real external credentials. Use placeholder values in
.env.exampleand reference them incompose.yamlvia environment variable substitution. -
Never deploy to cloud. This task is for local reproducible execution only.
-
When finished, summarize:
- files changed and why
- runtime assumptions corrected
- the health endpoint path, whether it already existed or was created by this task, and what dependencies it checks
- any unresolved requirements that Repo2Prod must verify
Repo2Prod will execute and verify the runtime immediately after you finish.
04 同仓库更多 Skills
repo2prod-repair
Repair the latest Repo2Prod-observed build or runtime failure
repo2prod-ci
Generate GitHub Actions CI from the Repo2Prod verified local workflow
repo2prod
Productionize the current repository using Repo2Prod runtime evidence
repo2prod-smoke
Verify Repo2Prod integration with IBM Bob
repo2prod-repair
Repair the latest Repo2Prod-observed build or runtime failure
repo2prod-ci
Generate GitHub Actions CI from the Repo2Prod verified local workflow