Production Readiness Report
Run a structured production-readiness check by analyzing a code repository and pre-filling the questionnaire as far as evidence allows. Inspect Helm charts, deployment configuration, CI/CD definitions, dependencies, and reliability patterns to produce a human-editable draft report.
Arguments
service-or-system (required): Service, repository, or system identifier being reviewed
--repo-root <path> (optional): Repository root to analyze (default: current working directory)
--output <path> (optional): Output file for the report (default: production-readiness-report.md)
--comment (optional): Post the final assessment to the active PR as a comment
Core Rules
- Questionnaire is mandatory. Load it only from the fixed path resolution in this skill; if not readable, stop with an error.
- This skill is evidence collection only. Do not rate answers and do not generate recommendations.
- Every answer must be link-backed. Use direct code/doc/dashboard links with line-level references whenever possible; avoid unsupported claims.
- Preserve structure and format. Keep original section/question order and use header-based Question/Answer blocks (no tables).
- Show data quality in title color only using inline LaTeX. Amber for incomplete data, red for cannot answer, no color for successful answers.
- Process section by section. Complete one section at a time to keep context bounded.
- Use strongest available evidence source. Prefer repository config; if missing, check library defaults; if still missing, run Confluence fallback searches before concluding insufficient evidence.
- Record gaps explicitly. Missing data or unverifiable claims must be documented in
Notes for Human Editor.
- Use Grafana verification when available. If Grafana tools are available, search dashboards and validate alert-related metrics from dashboard/panel queries.
- Run tool preflight before analysis. Check Confluence and Grafana tool availability first, and warn the user if either is unavailable.
- Detect repository shape before analysis. Determine whether the target is a monorepo or single-service repository.
- Confirm monorepo scope with user. If monorepo, ask whether to review one service or all services before continuing.
Process
1. Parse Inputs and Set Defaults
- Read
service-or-system
- Resolve optional flags
- Set
REPO_ROOT default to current directory
- Set
OUTPUT_FILE default to production-readiness-report.md
1.0 Detect Repository Shape and Confirm Scope
Before any questionnaire/evidence work:
- Detect whether
REPO_ROOT appears to be:
- a single-service repository, or
- a monorepo with multiple service/application directories.
Monorepo indicators can include multiple deployable service folders, multiple independent build/test configs, workspace files, or multiple chart/app roots.
If monorepo is detected:
- List the detected services/applications (with paths) in the scoping prompt.
- Pause and confirm scope with the user:
- review a specific service only, or
- review all services.
- Do not continue until scope is confirmed.
- Use the confirmed scope as the analysis target and state it in the report
Scope section.
1.1 Tool Availability Preflight
Before loading questionnaire or analyzing evidence:
- Check whether Confluence tools are available.
- Check whether Grafana tools are available.
If either toolset is unavailable:
- Warn the user immediately that Confluence and Grafana access are required for a higher-quality report.
- Continue the report generation with available sources, but explicitly note reduced evidence quality in the draft.
2. Load the Current Questionnaire
Resolve the questionnaire path in this exact order:
resources/production-readiness-questionnaire.md (relative to this skill directory)
.claude/skills/production-readiness-report/resources/production-readiness-questionnaire.md (relative to repository root)
.cursor/skills/production-readiness-report/resources/production-readiness-questionnaire.md (relative to repository root)
Set QUESTIONNAIRE_PATH to the first existing path and read it.
Before proceeding, explicitly verify that QUESTIONNAIRE_PATH exists and is readable.
This local file is the source of truth used by the skill at runtime.
Refresh workflow (maintainers):
- Fetch the latest questionnaire from your team-approved source.
- Update
resources/production-readiness-questionnaire.md with the latest question set.
3. Normalize Questions into Entries
Convert the questionnaire into structured entries with stable identifiers:
id: short key (PRR-001, PRR-002, ...)
section: questionnaire section name
question: exact question text
answer: evidence-backed draft answer
evidence: list of concrete references
notes: context for human editor
3.1 Questionnaire Source
Read all questions and section names from:
resources/production-readiness-questionnaire.md
4. Analyze Repository and Gather Evidence
Analyze REPO_ROOT first, then map findings to questionnaire answers.
4.0 Section-by-Section Execution
Process sections sequentially:
- Load one section and its questions.
- Gather evidence only for that section.
- Draft answers for that section.
- Append section output to the report.
- Move to the next section.
Do not load/analyze all sections at once.
4.1 Helm and Kubernetes Deployment Analysis
Inspect Helm and K8s manifests, including:
Chart.yaml, values.yaml, values-*.yaml, templates in templates/
- workload rollout/deployment objects and deployment strategy details
- analysis templates/steps, canary/stable service configuration
- readiness/liveness/startup probes
- resource requests/limits, autoscaling, PDB, disruption settings
- ingress/service exposure and TLS configuration
4.2 Configuration and Operations Artifacts
Inspect operational and platform configuration:
- CI/CD pipelines (prioritize
.circleci/config.yml and .github/workflows/*.yml / GitHub Actions; use other systems only if those are not present)
- alerting/monitoring config (Prometheus rules, SLO files, dashboards as code)
- runbooks and docs (
runbook, playbook, incident, on-call, README)
- backup/restore and disaster recovery documents
- logging setup and field mappings (logger config, middleware, serializers)
4.2.1 Runbook Verification via Confluence
For runbook-related questions:
- If Confluence tools are available, verify runbooks in Confluence (page existence, title relevance, and reachable links).
- Start from links found in repository/docs/alerts, then search Confluence with terms derived from service name, alert name, and runbook intent.
- If direct links are missing, use targeted Confluence search that matches the question context (for example runbook label + service/team keywords).
- Record Confluence page links as evidence.
- If Confluence validation is not possible, explicitly note that tool/access was unavailable and list what was attempted.
4.2.2 Grafana Dashboard and Alert Metric Verification
For monitoring/alert/SLO questions:
- If Grafana tools are available, search for relevant dashboards (service name, alert name, metric name).
- Retrieve panel queries and validate that alert-related metrics exist and match expected dimensions/windows where possible.
- Use panel/query evidence as supporting references.
- If Grafana tools are not available, note that explicitly and continue with repository/Confluence evidence.
Logging validation source:
resources/standard-log-fields-checklist.md
https://commercetools.atlassian.net/wiki/spaces/CLT/pages/111392689/Standard+Log+Management+Fields
4.3 Dependency and Reliability Pattern Analysis
Inspect dependency manifests and infer reliability patterns:
- language/package files (
package.json, go.mod, pom.xml, requirements*.txt, etc.)
- infrastructure dependencies (datastores, queues, cache, external APIs)
- patterns indicating retries, backoff, circuit breaking, timeouts, connection pooling
- rate limiting, fairness, traffic isolation, or multi-tenancy controls
- load/chaos test assets (
k6, locust, chaos, stress, performance suites)
4.3.2 Test Coverage Collection (DEP-07)
For the test coverage question:
- Attempt to collect a numeric coverage percentage by executing tests with coverage first.
- Primary approach:
- Detect the project test command and coverage command from repository scripts/config.
- Run tests with coverage enabled.
- Parse resulting coverage output/artifacts to extract the percentage.
- If tests cannot be run (missing dependencies, unsupported runtime, excessive runtime, or failing setup), fall back to passive evidence sources in this order:
- Coverage report artifacts/files in repo (for example
coverage.xml, lcov.info, coverage-summary.json, Cobertura/Jacoco outputs).
- CI workflow outputs/artifacts (CircleCI or GitHub Actions logs/artifacts with coverage).
- Coverage badges or documented coverage values in README/docs.
- If multiple values are found, report the most recent source and mention others in notes.
- Include line-anchored evidence links whenever possible.
- If test execution was attempted, include the exact command run and outcome in evidence/notes.
- If no percentage can be found, state that explicitly and list what command/artifact is needed to produce it.
4.3.1 Configuration Defaults Fallback
For configuration-related questions:
- First, search service/repository configuration (manifests, env vars, values files, app config).
- If configuration is not explicitly set, identify which library/framework provides the behavior.
- Inspect the library source (or official docs when source is unavailable) to find the default value/behavior.
- Record evidence links to the exact default definition (code constant, option struct default, docs page).
- In the answer, explicitly state whether the value is:
- explicitly configured by the service, or
- inherited from library defaults.
4.4 Answering Policy (Best-Effort Pre-Fill)
For each question:
- Fill with the best answer supported by evidence found in repository artifacts.
- If evidence is incomplete, provide the best current answer and explicitly list what is missing.
- If no reliable evidence exists, leave answer as
Insufficient evidence from repository and list required follow-up evidence.
- Never claim runtime behavior unless backed by config, tests, docs, or links.
- Include at least one clickable/linkable reference per compliance claim (repo file link, document URL, dashboard URL).
- For code evidence, include precise line references whenever possible (single line or line range).
- For configuration answers, include whether value comes from explicit config or library default.
- For SLO questions (
CTX-02 and related monitoring questions), if explicit SLO definitions are absent but alert rules are present, derive implicit SLOs from alert thresholds and timing windows.
- When using implicit SLOs, calculate numeric SLO targets (for example
99.9% and "3 nines", 99.99% and "4 nines") instead of descriptive statements only.
- Mark inferred values explicitly and include exact alert rule links, threshold values, window durations, and calculation steps.
- Use
resources/slo-calculation.md as the default derivation method for implicit SLO calculations.
- If local evidence is missing, run Confluence fallback searches before concluding unresolved.
- Set the question title color based on data quality rules:
- Amber title: some evidence exists but data is incomplete (use inline LaTeX, for example
$\color{orange}{\text{...}}$).
- Red title: cannot answer from available evidence (use inline LaTeX, for example
$\color{red}{\text{...}}$).
- Plain title: question answered with sufficient evidence.
4.4.3 Confluence Fallback Search (When Local Evidence Is Missing)
When repository and library-default evidence are insufficient:
- Use Confluence search tools to look for supporting evidence before moving on.
- Run multiple searches with equivalent terms for the same question (at least 3 variants).
- Build equivalent terms from:
- service/system name variants
- question keywords and synonyms
- domain terms (runbook, SLO, alert, on-call, backup, rollback, etc.)
- Prefer specific page retrieval after search hits are found, and extract direct evidence links.
- Record attempted search terms and result links in
Notes for Human Editor.
- Only mark as unresolved after these searches are attempted.
4.4.2 Implicit SLO Derivation from Alerts
When explicit SLO definitions are not found:
Read and follow resources/slo-calculation.md.
Use its formulas/assumptions to derive implied SLO, error budget, burn-rate context, and budget consumption.
Inspect alert rules for error-rate, latency, availability, and burn-rate conditions.
Extract the measurable target implied by each rule (for example error-rate limit) and its evaluation window.
Convert those into explicit inferred SLO values:
- availability/error budget percentage (for example
99.95%)
- "nines" representation (for example
3 nines, 4 nines)
- corresponding error budget percentage (for example
0.05%)
Keep inferred SLOs separate from explicit SLOs and label each as Inferred from alerts.
Provide evidence links to each source alert rule and timer/window expression used.
4.4.1 Special Rule for MON-05
For MON-05 ("Does logging follow the standard log management fields?"), structure the answer with explicit field coverage:
- Fields Present: list every detected standard field and where it is produced/mapped.
- Fields Missing: list every expected standard field not found.
- Field Mapping Details: include aliases/transformations (for example
time -> timestamp) and where that mapping is defined.
- Source of Value: for each field, state whether it is explicitly configured or inherited from library defaults.
- Evidence Links: include direct links for each present/missing/mapped claim.
Do not provide a generic summary for MON-05; always provide full present/missing field breakdown.
5. Produce the Draft Report
Create a markdown report with this structure:
# Production Readiness Check Draft: <service-or-system>
## Draft Status
**Status:** Draft - requires human review and editing
**Reviewed On:** <UTC timestamp>
**Questionnaire Source:** <url or file path>
## Scope
- Repository analyzed: <repo-root>
- Coverage notes: <what was inspected>
## Questions and Proposed Answers
### <Section Name 1>
#### <QUESTION-ID> - <Original Question Text>
**Answer:** <proposed answer>
**Evidence Links:**
- <repo-file-link#L123-L140>
- <repo-file-link#L220>
**Notes for Human Editor:** <notes>
<!-- For DEP-07 use this expanded answer body -->
**Answer:**
- **Coverage Percentage:** `<value>%` (or `Not found`)
- **Coverage Scope:** <unit/instructions if available, e.g. lines/branches/files>
- **Source:** <coverage file, CI run, or badge/doc source>
<!-- For MON-05 use this expanded answer body -->
**Answer:**
- **Fields Present:**
- `<field-name>` — <where/how found>
- **Fields Missing:**
- `<field-name>` — <expected but not found>
- **Field Mapping Details:**
- `<source-field> -> <standard-field>` — <where mapping is defined>
- **Source of Value:**
- `<field-name>` — explicit config | library default
<!-- For SLO questions (for example CTX-02) when explicit SLOs are missing -->
**Answer:**
- **Explicit SLOs Found:** <yes/no>
- **Inferred SLOs from Alerts:**
- `<slo-dimension>` — `<slo-percentage>` (`<nines>`) — error budget `<error-budget-percentage>` over window `<duration>` (`Inferred from alerts`)
- **Derivation Inputs:**
- Alert: `<alert name>` — threshold `<value>` — window `<duration>`
- **Calculation:**
- `<show formula and numeric conversion from threshold/window to SLO percentage and nines; reference method from resources/slo-calculation.md>`
#### $\color{orange}{\text{<QUESTION-ID> - <Original Question Text>}}$
**Answer:** <best current answer with missing data called out>
**Evidence Links:**
- <repo-file-link#L123-L140>
**Notes for Human Editor:** <what data is missing and where to get it>
#### $\color{red}{\text{<QUESTION-ID> - <Original Question Text>}}$
**Answer:** Insufficient evidence from repository
**Evidence Links:**
- <optional partial link with line reference if available>
**Notes for Human Editor:** <why it cannot be answered and what external source is required>
### <Section Name 2>
#### <QUESTION-ID> - <Original Question Text>
**Answer:** <proposed answer>
**Evidence Links:**
- <repo-file-link#L88-L96>
**Notes for Human Editor:** <notes>
Write to --output path (or default path).
6. Post to PR (Optional)
Only if --comment is provided:
- Detect active PR context with
gh pr view
- Post a concise comment containing:
- Draft generated notice
- Link/path to full draft report
- Request for human review/edit
Output Format
Always return:
- Draft generation status
- Count of questions with evidence vs questions needing more evidence
- Path to generated draft report
- Explicit note that recommendations are handled by
production-readiness-review
Guidelines
Question Fidelity
- Preserve the exact wording of questionnaire items
- Do not merge/split questions unless the source explicitly groups them
- Keep section names unchanged
- Keep section order and question order unchanged
Evidence Quality
- Prefer primary artifacts (manifests, pipeline configs, alert definitions)
- If evidence is verbal or inferred, label it explicitly and lower confidence
- Avoid "looks good" statements without references
- For logging field compliance, require code-level proof; if an internal library is used, verify its implementation in GitHub.
- Use link-based evidence (repository URL or document URL), not plain text claims.
- Prefer links with line anchors/ranges for repository evidence whenever available.
Repository-First Expectation
- Start with repository analysis before asking follow-up questions
- Prioritize Helm and deployment config as primary truth for runtime behavior
- Use dependencies and reliability code patterns to pre-fill operational answers
- Ask the user only for gaps that cannot be inferred from repository evidence
Handling Missing Questionnaire File
- If neither of these paths exists, stop immediately with an error:
resources/production-readiness-questionnaire.md
.claude/skills/production-readiness-report/resources/production-readiness-questionnaire.md
.cursor/skills/production-readiness-report/resources/production-readiness-questionnaire.md
- Do not proceed with synthetic questions.
- Do not ask the user to provide questionnaire content manually.
Examples
# Analyze current repository with local questionnaire source
/production-readiness-report checkout-service --repo-root .
# Analyze a specific repository path and write custom report path
/production-readiness-report checkout-service --repo-root ../my-service --output ./reports/checkout-prr.md
# Run report generation and post summary to PR
/production-readiness-report checkout-service --repo-root . --comment
1---2name: production-readiness-report3description: Analyze a repository and pre-fill a local production-readiness questionnaire using evidence from charts/manifests, deployment/config files, dependencies, and reliability patterns. Use before go-live or readiness reviews.4---56# Production Readiness Report78Run a structured production-readiness check by analyzing a code repository and pre-filling the questionnaire as far as evidence allows. Inspect Helm charts, deployment configuration, CI/CD definitions, dependencies, and reliability patterns to produce a human-editable draft report.910## Arguments1112- `service-or-system` (required): Service, repository, or system identifier being reviewed13- `--repo-root <path>` (optional): Repository root to analyze (default: current working directory)14- `--output <path>` (optional): Output file for the report (default: `production-readiness-report.md`)15- `--comment` (optional): Post the final assessment to the active PR as a comment1617## Core Rules18191. **Questionnaire is mandatory.** Load it only from the fixed path resolution in this skill; if not readable, stop with an error.202. **This skill is evidence collection only.** Do not rate answers and do not generate recommendations.213. **Every answer must be link-backed.** Use direct code/doc/dashboard links with line-level references whenever possible; avoid unsupported claims.224. **Preserve structure and format.** Keep original section/question order and use header-based Question/Answer blocks (no tables).235. **Show data quality in title color only using inline LaTeX.** Amber for incomplete data, red for cannot answer, no color for successful answers.246. **Process section by section.** Complete one section at a time to keep context bounded.257. **Use strongest available evidence source.** Prefer repository config; if missing, check library defaults; if still missing, run Confluence fallback searches before concluding insufficient evidence.268. **Record gaps explicitly.** Missing data or unverifiable claims must be documented in `Notes for Human Editor`.279. **Use Grafana verification when available.** If Grafana tools are available, search dashboards and validate alert-related metrics from dashboard/panel queries.2810. **Run tool preflight before analysis.** Check Confluence and Grafana tool availability first, and warn the user if either is unavailable.2911. **Detect repository shape before analysis.** Determine whether the target is a monorepo or single-service repository.3012. **Confirm monorepo scope with user.** If monorepo, ask whether to review one service or all services before continuing.3132## Process3334### 1. Parse Inputs and Set Defaults3536- Read `service-or-system`37- Resolve optional flags38- Set `REPO_ROOT` default to current directory39- Set `OUTPUT_FILE` default to `production-readiness-report.md`4041### 1.0 Detect Repository Shape and Confirm Scope4243Before any questionnaire/evidence work:4445- Detect whether `REPO_ROOT` appears to be:46 - a **single-service repository**, or47 - a **monorepo** with multiple service/application directories.4849Monorepo indicators can include multiple deployable service folders, multiple independent build/test configs, workspace files, or multiple chart/app roots.5051If monorepo is detected:5253- List the detected services/applications (with paths) in the scoping prompt.54- Pause and confirm scope with the user:55 - review a specific service only, or56 - review all services.57- Do not continue until scope is confirmed.58- Use the confirmed scope as the analysis target and state it in the report `Scope` section.5960### 1.1 Tool Availability Preflight6162Before loading questionnaire or analyzing evidence:6364- Check whether Confluence tools are available.65- Check whether Grafana tools are available.6667If either toolset is unavailable:6869- Warn the user immediately that Confluence and Grafana access are required for a higher-quality report.70- Continue the report generation with available sources, but explicitly note reduced evidence quality in the draft.7172### 2. Load the Current Questionnaire7374Resolve the questionnaire path in this exact order:75761. `resources/production-readiness-questionnaire.md` (relative to this skill directory)772. `.claude/skills/production-readiness-report/resources/production-readiness-questionnaire.md` (relative to repository root)783. `.cursor/skills/production-readiness-report/resources/production-readiness-questionnaire.md` (relative to repository root)7980Set `QUESTIONNAIRE_PATH` to the first existing path and read it.8182Before proceeding, explicitly verify that `QUESTIONNAIRE_PATH` exists and is readable.8384This local file is the source of truth used by the skill at runtime.8586Refresh workflow (maintainers):8788- Fetch the latest questionnaire from your team-approved source.89- Update `resources/production-readiness-questionnaire.md` with the latest question set.9091### 3. Normalize Questions into Entries9293Convert the questionnaire into structured entries with stable identifiers:9495- `id`: short key (`PRR-001`, `PRR-002`, ...)96- `section`: questionnaire section name97- `question`: exact question text98- `answer`: evidence-backed draft answer99- `evidence`: list of concrete references100- `notes`: context for human editor101102### 3.1 Questionnaire Source103104Read all questions and section names from:105106- `resources/production-readiness-questionnaire.md`107108### 4. Analyze Repository and Gather Evidence109110Analyze `REPO_ROOT` first, then map findings to questionnaire answers.111112### 4.0 Section-by-Section Execution113114Process sections sequentially:1151161. Load one section and its questions.1172. Gather evidence only for that section.1183. Draft answers for that section.1194. Append section output to the report.1205. Move to the next section.121122Do not load/analyze all sections at once.123124#### 4.1 Helm and Kubernetes Deployment Analysis125126Inspect Helm and K8s manifests, including:127128- `Chart.yaml`, `values.yaml`, `values-*.yaml`, templates in `templates/`129- workload rollout/deployment objects and deployment strategy details130- analysis templates/steps, canary/stable service configuration131- readiness/liveness/startup probes132- resource requests/limits, autoscaling, PDB, disruption settings133- ingress/service exposure and TLS configuration134135#### 4.2 Configuration and Operations Artifacts136137Inspect operational and platform configuration:138139- CI/CD pipelines (prioritize `.circleci/config.yml` and `.github/workflows/*.yml` / GitHub Actions; use other systems only if those are not present)140- alerting/monitoring config (Prometheus rules, SLO files, dashboards as code)141- runbooks and docs (`runbook`, `playbook`, `incident`, `on-call`, `README`)142- backup/restore and disaster recovery documents143- logging setup and field mappings (logger config, middleware, serializers)144145#### 4.2.1 Runbook Verification via Confluence146147For runbook-related questions:148149- If Confluence tools are available, verify runbooks in Confluence (page existence, title relevance, and reachable links).150- Start from links found in repository/docs/alerts, then search Confluence with terms derived from service name, alert name, and runbook intent.151- If direct links are missing, use targeted Confluence search that matches the question context (for example runbook label + service/team keywords).152- Record Confluence page links as evidence.153- If Confluence validation is not possible, explicitly note that tool/access was unavailable and list what was attempted.154155#### 4.2.2 Grafana Dashboard and Alert Metric Verification156157For monitoring/alert/SLO questions:158159- If Grafana tools are available, search for relevant dashboards (service name, alert name, metric name).160- Retrieve panel queries and validate that alert-related metrics exist and match expected dimensions/windows where possible.161- Use panel/query evidence as supporting references.162- If Grafana tools are not available, note that explicitly and continue with repository/Confluence evidence.163164Logging validation source:165166- `resources/standard-log-fields-checklist.md`167- `https://commercetools.atlassian.net/wiki/spaces/CLT/pages/111392689/Standard+Log+Management+Fields`168169#### 4.3 Dependency and Reliability Pattern Analysis170171Inspect dependency manifests and infer reliability patterns:172173- language/package files (`package.json`, `go.mod`, `pom.xml`, `requirements*.txt`, etc.)174- infrastructure dependencies (datastores, queues, cache, external APIs)175- patterns indicating retries, backoff, circuit breaking, timeouts, connection pooling176- rate limiting, fairness, traffic isolation, or multi-tenancy controls177- load/chaos test assets (`k6`, `locust`, `chaos`, `stress`, performance suites)178179#### 4.3.2 Test Coverage Collection (`DEP-07`)180181For the test coverage question:182183- Attempt to collect a numeric coverage percentage by executing tests with coverage first.184- Primary approach:185 1. Detect the project test command and coverage command from repository scripts/config.186 2. Run tests with coverage enabled.187 3. Parse resulting coverage output/artifacts to extract the percentage.188- If tests cannot be run (missing dependencies, unsupported runtime, excessive runtime, or failing setup), fall back to passive evidence sources in this order:189 1. Coverage report artifacts/files in repo (for example `coverage.xml`, `lcov.info`, `coverage-summary.json`, Cobertura/Jacoco outputs).190 2. CI workflow outputs/artifacts (CircleCI or GitHub Actions logs/artifacts with coverage).191 3. Coverage badges or documented coverage values in README/docs.192- If multiple values are found, report the most recent source and mention others in notes.193- Include line-anchored evidence links whenever possible.194- If test execution was attempted, include the exact command run and outcome in evidence/notes.195- If no percentage can be found, state that explicitly and list what command/artifact is needed to produce it.196197#### 4.3.1 Configuration Defaults Fallback198199For configuration-related questions:200201- First, search service/repository configuration (manifests, env vars, values files, app config).202- If configuration is not explicitly set, identify which library/framework provides the behavior.203- Inspect the library source (or official docs when source is unavailable) to find the default value/behavior.204- Record evidence links to the exact default definition (code constant, option struct default, docs page).205- In the answer, explicitly state whether the value is:206 - explicitly configured by the service, or207 - inherited from library defaults.208209#### 4.4 Answering Policy (Best-Effort Pre-Fill)210211For each question:212213- Fill with the best answer supported by evidence found in repository artifacts.214- If evidence is incomplete, provide the best current answer and explicitly list what is missing.215- If no reliable evidence exists, leave answer as `Insufficient evidence from repository` and list required follow-up evidence.216- Never claim runtime behavior unless backed by config, tests, docs, or links.217- Include at least one clickable/linkable reference per compliance claim (repo file link, document URL, dashboard URL).218- For code evidence, include precise line references whenever possible (single line or line range).219- For configuration answers, include whether value comes from explicit config or library default.220- For SLO questions (`CTX-02` and related monitoring questions), if explicit SLO definitions are absent but alert rules are present, derive **implicit SLOs** from alert thresholds and timing windows.221- When using implicit SLOs, calculate numeric SLO targets (for example `99.9%` and "3 nines", `99.99%` and "4 nines") instead of descriptive statements only.222- Mark inferred values explicitly and include exact alert rule links, threshold values, window durations, and calculation steps.223- Use `resources/slo-calculation.md` as the default derivation method for implicit SLO calculations.224- If local evidence is missing, run Confluence fallback searches before concluding unresolved.225- Set the question title color based on data quality rules:226 - Amber title: some evidence exists but data is incomplete (use inline LaTeX, for example `$\color{orange}{\text{...}}$`).227 - Red title: cannot answer from available evidence (use inline LaTeX, for example `$\color{red}{\text{...}}$`).228 - Plain title: question answered with sufficient evidence.229230#### 4.4.3 Confluence Fallback Search (When Local Evidence Is Missing)231232When repository and library-default evidence are insufficient:233234- Use Confluence search tools to look for supporting evidence before moving on.235- Run multiple searches with equivalent terms for the same question (at least 3 variants).236- Build equivalent terms from:237 - service/system name variants238 - question keywords and synonyms239 - domain terms (runbook, SLO, alert, on-call, backup, rollback, etc.)240- Prefer specific page retrieval after search hits are found, and extract direct evidence links.241- Record attempted search terms and result links in `Notes for Human Editor`.242- Only mark as unresolved after these searches are attempted.243244#### 4.4.2 Implicit SLO Derivation from Alerts245246When explicit SLO definitions are not found:247248- Read and follow `resources/slo-calculation.md`.249- Use its formulas/assumptions to derive implied SLO, error budget, burn-rate context, and budget consumption.250251- Inspect alert rules for error-rate, latency, availability, and burn-rate conditions.252- Extract the measurable target implied by each rule (for example error-rate limit) and its evaluation window.253- Convert those into explicit inferred SLO values:254 - availability/error budget percentage (for example `99.95%`)255 - "nines" representation (for example `3 nines`, `4 nines`)256 - corresponding error budget percentage (for example `0.05%`)257- Keep inferred SLOs separate from explicit SLOs and label each as `Inferred from alerts`.258- Provide evidence links to each source alert rule and timer/window expression used.259260#### 4.4.1 Special Rule for `MON-05`261262For `MON-05` ("Does logging follow the standard log management fields?"), structure the answer with explicit field coverage:263264- **Fields Present:** list every detected standard field and where it is produced/mapped.265- **Fields Missing:** list every expected standard field not found.266- **Field Mapping Details:** include aliases/transformations (for example `time -> timestamp`) and where that mapping is defined.267- **Source of Value:** for each field, state whether it is explicitly configured or inherited from library defaults.268- **Evidence Links:** include direct links for each present/missing/mapped claim.269270Do not provide a generic summary for `MON-05`; always provide full present/missing field breakdown.271272### 5. Produce the Draft Report273274Create a markdown report with this structure:275276```markdown277# Production Readiness Check Draft: <service-or-system>278279## Draft Status280281**Status:** Draft - requires human review and editing282**Reviewed On:** <UTC timestamp>283**Questionnaire Source:** <url or file path>284285## Scope286287- Repository analyzed: <repo-root>288- Coverage notes: <what was inspected>289290## Questions and Proposed Answers291292### <Section Name 1>293294#### <QUESTION-ID> - <Original Question Text>295296**Answer:** <proposed answer>297**Evidence Links:**298299- <repo-file-link#L123-L140>300- <repo-file-link#L220>301 **Notes for Human Editor:** <notes>302303<!-- For DEP-07 use this expanded answer body -->304305**Answer:**306307- **Coverage Percentage:** `<value>%` (or `Not found`)308- **Coverage Scope:** <unit/instructions if available, e.g. lines/branches/files>309- **Source:** <coverage file, CI run, or badge/doc source>310311<!-- For MON-05 use this expanded answer body -->312313**Answer:**314315- **Fields Present:**316 - `<field-name>` — <where/how found>317- **Fields Missing:**318 - `<field-name>` — <expected but not found>319- **Field Mapping Details:**320 - `<source-field> -> <standard-field>` — <where mapping is defined>321- **Source of Value:**322 - `<field-name>` — explicit config | library default323324<!-- For SLO questions (for example CTX-02) when explicit SLOs are missing -->325326**Answer:**327328- **Explicit SLOs Found:** <yes/no>329- **Inferred SLOs from Alerts:**330 - `<slo-dimension>` — `<slo-percentage>` (`<nines>`) — error budget `<error-budget-percentage>` over window `<duration>` (`Inferred from alerts`)331- **Derivation Inputs:**332 - Alert: `<alert name>` — threshold `<value>` — window `<duration>`333- **Calculation:**334 - `<show formula and numeric conversion from threshold/window to SLO percentage and nines; reference method from resources/slo-calculation.md>`335336#### $\color{orange}{\text{<QUESTION-ID> - <Original Question Text>}}$337338**Answer:** <best current answer with missing data called out>339**Evidence Links:**340341- <repo-file-link#L123-L140>342 **Notes for Human Editor:** <what data is missing and where to get it>343344#### $\color{red}{\text{<QUESTION-ID> - <Original Question Text>}}$345346**Answer:** Insufficient evidence from repository347**Evidence Links:**348349- <optional partial link with line reference if available>350 **Notes for Human Editor:** <why it cannot be answered and what external source is required>351352### <Section Name 2>353354#### <QUESTION-ID> - <Original Question Text>355356**Answer:** <proposed answer>357**Evidence Links:**358359- <repo-file-link#L88-L96>360 **Notes for Human Editor:** <notes>361```362363Write to `--output` path (or default path).364365### 6. Post to PR (Optional)366367Only if `--comment` is provided:3683691. Detect active PR context with `gh pr view`3702. Post a concise comment containing:371 - Draft generated notice372 - Link/path to full draft report373 - Request for human review/edit374375## Output Format376377Always return:3783791. Draft generation status3802. Count of questions with evidence vs questions needing more evidence3813. Path to generated draft report3824. Explicit note that recommendations are handled by `production-readiness-review`383384## Guidelines385386### Question Fidelity387388- Preserve the exact wording of questionnaire items389- Do not merge/split questions unless the source explicitly groups them390- Keep section names unchanged391- Keep section order and question order unchanged392393### Evidence Quality394395- Prefer primary artifacts (manifests, pipeline configs, alert definitions)396- If evidence is verbal or inferred, label it explicitly and lower confidence397- Avoid "looks good" statements without references398- For logging field compliance, require code-level proof; if an internal library is used, verify its implementation in GitHub.399- Use link-based evidence (repository URL or document URL), not plain text claims.400- Prefer links with line anchors/ranges for repository evidence whenever available.401402### Repository-First Expectation403404- Start with repository analysis before asking follow-up questions405- Prioritize Helm and deployment config as primary truth for runtime behavior406- Use dependencies and reliability code patterns to pre-fill operational answers407- Ask the user only for gaps that cannot be inferred from repository evidence408409### Handling Missing Questionnaire File410411- If neither of these paths exists, stop immediately with an error:412 - `resources/production-readiness-questionnaire.md`413 - `.claude/skills/production-readiness-report/resources/production-readiness-questionnaire.md`414 - `.cursor/skills/production-readiness-report/resources/production-readiness-questionnaire.md`415- Do not proceed with synthetic questions.416- Do not ask the user to provide questionnaire content manually.417418## Examples419420```bash421# Analyze current repository with local questionnaire source422/production-readiness-report checkout-service --repo-root .423```424425```bash426# Analyze a specific repository path and write custom report path427/production-readiness-report checkout-service --repo-root ../my-service --output ./reports/checkout-prr.md428```429430```bash431# Run report generation and post summary to PR432/production-readiness-report checkout-service --repo-root . --comment433```