Skip to content

Commit 1fe293b

Browse files
committed
docs(skill): add examples, edge cases, and references sections
1 parent 7644ffe commit 1fe293b

1 file changed

Lines changed: 47 additions & 1 deletion

File tree

skills/github-repo-setup/SKILL.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,50 @@ Evaluate repository compliance against contractually mandated BC Gov DevOps and
6666
- **Vulnerability SLAs**: Critical findings (24 hours), High (1 week), Medium (2 weeks), Low (next sprint).
6767

6868
## Output Format
69-
Always generate a `MATURITY_REPORT.md` file in the root of the audited repository following the schema defined in `resources/REPORT_TEMPLATE.md`. Ensure that check boxes are marked with `[x]` (Met) or `[ ]` (Not Met/Missing) and a clear, descriptive breakdown of recommendations is presented.
69+
Always generate a `MATURITY_REPORT.md` file in the root of the audited repository following the schema defined in `resources/REPORT_TEMPLATE.md`. Ensure that check boxes are marked with `[x]` (Met) or `[ ]` (Not Met/Missing) and a clear, descriptive breakdown of recommendations is presented.
70+
71+
## Examples
72+
73+
### Example 1: Assessment of a Production Microservice
74+
**Input**: Repository URL: `bcgov/my-api-service`
75+
**Process**:
76+
1. Walk repository: Find `package.json` with TypeScript, `tsconfig.json`, `renovate.json`, `.github/workflows/`, and `openshift.deploy.yml`.
77+
2. Check TypeScript strictness: Verify `strict: true` in `tsconfig.json`.
78+
3. Run `npm audit` and check for bypasses (`@ts-ignore`, `eslint-disable`).
79+
4. Inspect Renovate config: Local `renovate.json` extends `github>bcgov/renovate-config#2026.04`. Fetch inherited preset and verify effective automerge, schedule, and minimumReleaseAge.
80+
5. Examine OpenShift manifest: Confirm `readOnlyRootFilesystem: true`, `runAsNonRoot: true` in security contexts.
81+
6. Draft scorecard: 85/100 (gaps: missing PodDisruptionBudget, test coverage at 78%).
82+
7. Write report: Generate `MATURITY_REPORT.md` with actionable remediation items.
83+
84+
**Output**: `MATURITY_REPORT.md` with 9-dimension compliance checklist and Renovate inheritance analysis.
85+
86+
### Example 2: Onboarding a New Repository
87+
**Input**: Repository URL: `bcgov/experimental-frontend`
88+
**Process**:
89+
1. Analyze structure: Find React app with Jest tests, but missing `renovate.json`.
90+
2. Check TypeScript: `tsconfig.json` lacks strict mode settings.
91+
3. Inspect branch protection: No ruleset on `main` branch.
92+
4. Assess GitHub settings: Merge/rebase commits enabled (should be squash-only).
93+
5. Draft scorecard: 60/100 (high-priority gaps: branch protection, Renovate, TypeScript strictness).
94+
6. Write report with 5–7 remediation items.
95+
96+
**Output**: `MATURITY_REPORT.md` with clear Tier 1 (blocking) and Tier 2 (recommended) actions.
97+
98+
## Edge Cases
99+
100+
- **Monorepos with Multiple `tsconfig.json` Files**: Inspect root `tsconfig.json` and any workspace-level configurations. Flag inconsistencies in strictness across packages.
101+
- **Renovate Config Missing Extends**: If `renovate.json` exists but has no `extends`, note that default Renovate behavior applies (no inherited presets). Verify manual configuration is comprehensive.
102+
- **GitHub API Unavailable**: Use manual inspection (cloning repo, reading workflows, grepping code) when GitHub API tools are unavailable. Document limitations in the report.
103+
- **Non-TypeScript Repositories**: Skip TypeScript-specific rules (strict mode, `@ts-ignore`). Assess applicable language-specific linting (ESLint for JavaScript, Pylint for Python, etc.).
104+
- **Legacy Branch Names (`master`, `develop`)**: Audit still applies. Flag as a low-priority gap if org standards require `main`.
105+
- **Exempt Repositories**: Repositories that are documentation-only, archived, or experimental should be skipped with a clear note in the report.
106+
107+
## References
108+
109+
- [BC Gov DevOps Standards](https://github.com/bcgov/agent-skills/blob/main/TEAM_CHECKLIST.md) – Baseline compliance requirements.
110+
- [BC Gov Renovate Config](https://github.com/bcgov/renovate-config) – Inherited preset configurations for dependency updates.
111+
- [GitHub Branch Protection Rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) – GitHub documentation on branch rulesets.
112+
- [TypeScript Strict Mode](https://www.typescriptlang.org/tsconfig#strict) – TypeScript compiler documentation for strict checking.
113+
- [Renovate Documentation](https://docs.renovatebot.com/) – Preset inheritance, extends chains, and configuration best practices.
114+
- [MATURITY_REPORT.md Template](./resources/REPORT_TEMPLATE.md) – Structured report template for compliance scoring and remediation tracking.
115+
- [Kubernetes Security Best Practices](https://kubernetes.io/docs/concepts/security/) – Pod security standards, security contexts, and RBAC.

0 commit comments

Comments
 (0)