Software configuration management: SCM (oma-scm)
Scheduling
Goal
Manage Git and software configuration management safely: commits, branches, merges, worktrees, releases, baselines, audit posture, CODEOWNERS, and Conventional Commits.
Intent signature
- User asks to commit, stage, branch, merge, rebase, cherry-pick, tag, release, resolve conflicts, manage worktrees, inspect SCM posture, or apply Conventional Commits.
- User needs safe Git operations with explicit file staging, secret awareness, and CM governance.
This skill is the single place for configuration management (CM) on a software repo and for Conventional Commits / safe staging.
When to use
- Commits: “commit this”,
/scm, message type/scope, splitting staged changes into multiple commits.
- CM / Git: branching (gitflow, GitHub Flow, GitLab Flow, trunk-based), protected branches, merge queue, merge conflicts, rebase, cherry-pick, worktrees, submodules/subtrees, tags and releases.
- Governance: issue/ADR links, breaking-change footers, changelog or release-tool alignment.
- Audit posture: signed commits, CI before merge, secret-sensitive paths.
When NOT to use
- Implementing product or application code -> use the relevant domain skill
- Debugging runtime failures without a Git or CM operation -> use
oma-debug
- Security, performance, or accessibility review -> use
oma-qa
- Planning feature requirements or decomposing work -> use
oma-pm
Expected inputs
- Git task, desired branch/commit/release operation, and affected files
- Current worktree status, staged diff, branch tracking, config files, and governance constraints
- Optional issue/ADR/PR/release context
Expected outputs
- Safe commit, branch, merge/rebase guidance, conflict plan, status accounting, or CM audit findings
- Conventional Commit message and explicit staged paths when committing
- Risk notes for shared history, secrets, CODEOWNERS, CI, and release evidence
Dependencies
- Git CLI and repository metadata
config/commit-config.yaml, config/cm-config.yaml, Conventional Commit references, onboarding-risk and CODEOWNERS playbooks
Control-flow features
- Branches by quick commit path versus full CM/governance path
- Reads Git state and diffs; may write commits, branches, tags, or conflict resolutions
- Requires explicit approval for broad staging, shared-history rewrite, production-destructive operations, or secret-risk paths
Structural Flow
Entry
- Inspect Git status, branch, staged/unstaged changes, and user intent.
- Choose Quick Path for ordinary commits or Full CM Path for governance/risky history work.
- Read commit and CM config before enforcing project-specific rules.
Scenes
- PREPARE: Determine operation type, risk, and affected files.
- ACQUIRE: Read status, diff, logs, config, ownership, and release context.
- REASON: Split changes, choose message/scope, identify CM controls and risks.
- ACT: Stage explicit paths, commit, branch, resolve, or provide CM action plan.
- VERIFY: Check status, staged diff, CI expectations, signatures, secrets, and audit evidence.
- FINALIZE: Report operation result and remaining SCM tasks.
Transitions
- If user intent is commit-only, follow Quick Path and stop after safe commit.
- If branching/history/release/governance is involved, run Full CM Path.
- If shared history rewrite is requested, require maintainer approval.
- If changes span independent features, split commits unless user requests one commit.
Failure and recovery
- If worktree is dirty in unrelated files, avoid touching unrelated changes.
- If conflicts exist, resolve markers, test, and preserve target-branch context.
- If secrets are detected or suspected, stop before staging/committing.
Exit
- Success: requested SCM operation is complete or a safe, auditable plan is delivered.
- Partial success: blockers such as conflicts, missing approval, CI, or secret risk are explicit.
Logical Operations
Actions
| Action |
SSL primitive |
Evidence |
| Read Git state |
READ |
git status, diff, log, config |
| Select SCM path |
SELECT |
Quick Path vs Full CM Path |
| Compare change scopes |
COMPARE |
Split by type/scope/feature |
| Validate commit/governance rules |
VALIDATE |
Config and CM controls |
| Stage explicit files |
CALL_TOOL |
git add <specific-files> |
| Commit or manage refs |
CALL_TOOL |
Git commit/branch/merge/rebase/tag |
| Write audit notes |
WRITE |
Commit message or CM report |
| Report result |
NOTIFY |
Final SCM summary |
Tools and instruments
- Git CLI and repository metadata
- Commit/CM config, Conventional Commit guide, CODEOWNERS playbook, onboarding-risk signals
Canonical command path
git status -sb
git diff --staged
git log --oneline -5
Stage and commit only explicit paths:
git add <specific-files>
git commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
[optional body]
EOF
)"
Resource scope
| Scope |
Resource target |
CODEBASE |
Tracked files, diffs, conflicts, CODEOWNERS |
LOCAL_FS |
Git metadata, config files, commit message temp files |
PROCESS |
Git commands and verification commands |
CREDENTIALS |
Secret-sensitive files must not be staged or committed |
Preconditions
- Repository and Git intent are identifiable.
- User has authorized the requested SCM operation.
Effects and side effects
- May stage files, create commits, branches, tags, worktrees, or history operations.
- Can affect shared repository history if unsafe commands are used, so approvals matter.
Guardrails
- Choose Quick Path for ordinary commits and Full CM Path for branching, history, release, or governance work.
- Read
config/commit-config.yaml and config/cm-config.yaml before applying project-specific commit or CM rules.
- Stage only explicit files; never use broad staging unless the user explicitly approves it.
- Do not rewrite shared history without maintainer approval.
- Never stage or commit likely-secret material.
Configuration
| File |
Role |
config/commit-config.yaml |
Conventional Commit types, branch prefixes, message rules |
config/cm-config.yaml |
CM pointers (documented process, branching model, baselines, changelog) |
Operating mode (choose first)
Quick Path (commit-focused, default)
Use this when the user intent is mainly "commit this safely."
- Follow Conventional Commits section only
- Stage explicit files only
- Validate message type/scope/length from
commit-config.yaml
- Stop after safe commit unless user asks CM/governance operations
Full CM Path (repo governance / risky history operations)
Use this when the user asks about branching strategy, merges, rebase/cherry-pick, worktrees, release refs, CODEOWNERS, or audit posture.
- Run CM workflows in order (Planning -> Identification -> Control -> Status accounting -> Verification)
- Add onboarding risk scan when inheriting or auditing a repository
- Include commit governance from Conventional Commits when creating commits
- For large-scope merge operations, use risk scoring and Ask Gate criteria from
../../workflows/scm.md
CM process map (software)
| CM function |
Intent |
Typical artefacts / actions |
| Management & planning |
Agreed rules |
CONTRIBUTING.md, SECURITY.md, cm-config.yaml |
| Configuration identification |
What is managed, naming |
Branch/tag rules, version files, .gitattributes, LFS |
| Configuration control |
Reviewed change |
PRs, checks, issue links, BREAKING CHANGE footers |
| Status accounting |
As-built truth |
main / release refs, CHANGELOG, tags, CI status |
| Verification & audit |
Evidence |
CI logs, signed commits, lockfiles / SBOM policy |
CM workflows (use before risky history operations)
1) Planning
- Read
cm-config.yaml and files listed under documented_process.
- If missing, infer from
CONTRIBUTING.md / README; state assumptions.
- Confirm branching model and whether force-push on shared branches is allowed (default: not without explicit approval).
2) Identification
- Canonical refs: default branch, release branches/tags, version sources (
package.json, etc.).
.gitattributes / LFS for binaries and generated assets.
- Branch names vs
commit-config.yaml branch_prefixes when the project uses them.
3) Control
- Small, reviewable units; align commits with PR / issue intent.
- Conflicts:
merge-base, git status, resolve markers, tests; suggest rerere when conflicts repeat.
- Worktrees:
git worktree add; merge/rebase from the target branch’s checkout; all worktrees share one object database.
- Do not rewrite shared history without maintainer approval; prefer
--force-with-lease if force-push is unavoidable.
4) Status accounting
git status -sb: branch, remote tracking, ahead/behind, merge state.
- Relate last tag / release branch to
CHANGELOG or tooling (semantic-release, release-please, changesets) if present.
5) Verification & audit
- Required CI and
merge_group when merge queue applies.
- Never stage/commit secrets (
.env, keys, raw tokens).
- Call out signed-commit expectations when the org cares about verification badges.
CODEOWNERS maintenance checklist
- Validate CODEOWNERS file exists (prefer
.github/CODEOWNERS).
- Ensure critical paths are explicitly owned (not only fallback
*).
- Ensure owners are active and mapped to current teams.
- Confirm branch protection requires CODEOWNERS review where needed.
- Flag overlapping/ambiguous rules that can hide intended owners.
Read change_governance.require_codeowners and ownership.* in cm-config.yaml when present.
6) Onboarding risk scan (optional, recommended)
Use this quick scan when joining or inheriting a repository to identify risky areas before major changes.
- High churn files in
lookback window.
- Ownership concentration / bus-factor signals.
- Bug hotspot files from fix-related history.
- Velocity trend by month.
- Revert/hotfix/emergency frequency.
Read thresholds from cm-config.yaml onboarding_metrics when present and cite caveats:
- squash merge teams can distort ownership metrics,
- weak commit labeling reduces hotspot accuracy,
- monorepo commit counts can bias subsystem interpretation.
Conventional Commits
Commit types
| Type |
Description |
Branch Prefix |
| feat |
New feature |
feature/ |
| fix |
Bug fix |
fix/ |
| refactor |
Code improvement |
refactor/ |
| docs |
Documentation changes |
docs/ |
| test |
Test additions/modifications |
test/ |
| chore |
Build, configuration, etc. |
chore/ |
| style |
Code style changes |
style/ |
| perf |
Performance improvements |
perf/ |
Commit format
<type>(<scope>): <description>
[optional body]
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
Commit workflow
Step 1: Analyze changes
git status
git diff --staged
git log --oneline -5
Step 1.5: Split by feature (if needed)
If changes span multiple features/domains, split commits by feature.
Split when: different scopes, different types, logically independent work.
Do not split when: one feature, few files (≤5), or user asked for a single commit.
Step 2: Determine type
- New capability →
feat · Bug fix → fix · Structure-only → refactor · Docs only → docs · Tests → test · Build/config → chore
Step 3: Scope
Use module/component: feat(auth):, fix(api):, or omit: chore: update dependencies
Step 4: Description
≤72 chars (per commit-config.yaml), imperative mood, lowercase start, no trailing period.
Step 5: Execute commit
Show the message, then commit with explicit paths:
git add <specific-files>
git commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
[optional body]
EOF
)"
If HEREDOC is unstable in your shell (or body is long), use file-based commit input:
git add <specific-files>
cat > /tmp/oma-commit-msg.txt <<'EOF'
<type>(<scope>): <description>
[optional body]
EOF
git commit -F /tmp/oma-commit-msg.txt
Use HEREDOC by default, and switch to -F for long or flaky terminal sessions.
References
config/commit-config.yaml
config/cm-config.yaml
resources/conventional-commits.md
resources/onboarding-risk-signals.md
resources/codeowners-playbook.md
- Observability handoff:
../oma-observability/SKILL.md §Integrations — release markers (service.version), revert baseline diff
Important notes
- NEVER
git add -A or git add . without explicit user permission.
- NEVER commit likely-secret material.
- ALWAYS stage by explicit paths; tie non-trivial CM work to the five CM rows above, even briefly.
1---2name: oma-scm3description: SCM (software configuration management) and Git: branching, merges, conflicts, worktrees, baselines, audit readiness, plus Conventional Commits and safe staging.4---5
6# Software configuration management: SCM (`oma-scm`)
7
8## Scheduling
9
10### Goal
11Manage Git and software configuration management safely: commits, branches, merges, worktrees, releases, baselines, audit posture, CODEOWNERS, and Conventional Commits.
12
13### Intent signature
14- User asks to commit, stage, branch, merge, rebase, cherry-pick, tag, release, resolve conflicts, manage worktrees, inspect SCM posture, or apply Conventional Commits.
15- User needs safe Git operations with explicit file staging, secret awareness, and CM governance.
16
17This skill is the **single** place for **configuration management (CM)** on a software repo and for **Conventional Commits** / safe staging.
18
19### When to use
20
21- **Commits:** “commit this”, `/scm`, message type/scope, splitting staged changes into multiple commits.
22- **CM / Git:** branching (gitflow, GitHub Flow, GitLab Flow, trunk-based), protected branches, merge queue, merge conflicts, rebase, cherry-pick, worktrees, submodules/subtrees, tags and releases.
23- **Governance:** issue/ADR links, breaking-change footers, changelog or release-tool alignment.
24- **Audit posture:** signed commits, CI before merge, secret-sensitive paths.
25
26### When NOT to use
27
28- Implementing product or application code -> use the relevant domain skill
29- Debugging runtime failures without a Git or CM operation -> use `oma-debug`
30- Security, performance, or accessibility review -> use `oma-qa`
31- Planning feature requirements or decomposing work -> use `oma-pm`
32
33### Expected inputs
34- Git task, desired branch/commit/release operation, and affected files
35- Current worktree status, staged diff, branch tracking, config files, and governance constraints
36- Optional issue/ADR/PR/release context
37
38### Expected outputs
39- Safe commit, branch, merge/rebase guidance, conflict plan, status accounting, or CM audit findings
40- Conventional Commit message and explicit staged paths when committing
41- Risk notes for shared history, secrets, CODEOWNERS, CI, and release evidence
42
43### Dependencies
44- Git CLI and repository metadata
45- `config/commit-config.yaml`, `config/cm-config.yaml`, Conventional Commit references, onboarding-risk and CODEOWNERS playbooks
46
47### Control-flow features
48- Branches by quick commit path versus full CM/governance path
49- Reads Git state and diffs; may write commits, branches, tags, or conflict resolutions
50- Requires explicit approval for broad staging, shared-history rewrite, production-destructive operations, or secret-risk paths
51
52## Structural Flow
53
54### Entry
551. Inspect Git status, branch, staged/unstaged changes, and user intent.
562. Choose Quick Path for ordinary commits or Full CM Path for governance/risky history work.
573. Read commit and CM config before enforcing project-specific rules.
58
59### Scenes
601. **PREPARE**: Determine operation type, risk, and affected files.
612. **ACQUIRE**: Read status, diff, logs, config, ownership, and release context.
623. **REASON**: Split changes, choose message/scope, identify CM controls and risks.
634. **ACT**: Stage explicit paths, commit, branch, resolve, or provide CM action plan.
645. **VERIFY**: Check status, staged diff, CI expectations, signatures, secrets, and audit evidence.
656. **FINALIZE**: Report operation result and remaining SCM tasks.
66
67### Transitions
68- If user intent is commit-only, follow Quick Path and stop after safe commit.
69- If branching/history/release/governance is involved, run Full CM Path.
70- If shared history rewrite is requested, require maintainer approval.
71- If changes span independent features, split commits unless user requests one commit.
72
73### Failure and recovery
74- If worktree is dirty in unrelated files, avoid touching unrelated changes.
75- If conflicts exist, resolve markers, test, and preserve target-branch context.
76- If secrets are detected or suspected, stop before staging/committing.
77
78### Exit
79- Success: requested SCM operation is complete or a safe, auditable plan is delivered.
80- Partial success: blockers such as conflicts, missing approval, CI, or secret risk are explicit.
81
82## Logical Operations
83
84### Actions
85| Action | SSL primitive | Evidence |
86|--------|---------------|----------|
87| Read Git state | `READ` | `git status`, diff, log, config |
88| Select SCM path | `SELECT` | Quick Path vs Full CM Path |
89| Compare change scopes | `COMPARE` | Split by type/scope/feature |
90| Validate commit/governance rules | `VALIDATE` | Config and CM controls |
91| Stage explicit files | `CALL_TOOL` | `git add <specific-files>` |
92| Commit or manage refs | `CALL_TOOL` | Git commit/branch/merge/rebase/tag |
93| Write audit notes | `WRITE` | Commit message or CM report |
94| Report result | `NOTIFY` | Final SCM summary |
95
96### Tools and instruments
97- Git CLI and repository metadata
98- Commit/CM config, Conventional Commit guide, CODEOWNERS playbook, onboarding-risk signals
99
100### Canonical command path
101```bash
102git status -sb
103git diff --staged
104git log --oneline -5
105```
106
107Stage and commit only explicit paths:
108```bash
109git add <specific-files>
110git commit -m "$(cat <<'EOF'
111<type>(<scope>): <description>
112
113[optional body]
114EOF
115)"
116```
117
118### Resource scope
119| Scope | Resource target |
120|-------|-----------------|
121| `CODEBASE` | Tracked files, diffs, conflicts, CODEOWNERS |
122| `LOCAL_FS` | Git metadata, config files, commit message temp files |
123| `PROCESS` | Git commands and verification commands |
124| `CREDENTIALS` | Secret-sensitive files must not be staged or committed |
125
126### Preconditions
127- Repository and Git intent are identifiable.
128- User has authorized the requested SCM operation.
129
130### Effects and side effects
131- May stage files, create commits, branches, tags, worktrees, or history operations.
132- Can affect shared repository history if unsafe commands are used, so approvals matter.
133
134### Guardrails
135
1361. Choose Quick Path for ordinary commits and Full CM Path for branching, history, release, or governance work.
1372. Read `config/commit-config.yaml` and `config/cm-config.yaml` before applying project-specific commit or CM rules.
1383. Stage only explicit files; never use broad staging unless the user explicitly approves it.
1394. Do not rewrite shared history without maintainer approval.
1405. Never stage or commit likely-secret material.
141
142### Configuration
143
144| File | Role |
145|------|------|
146| `config/commit-config.yaml` | Conventional Commit types, branch prefixes, message rules |
147| `config/cm-config.yaml` | CM pointers (documented process, branching model, baselines, changelog) |
148
149### Operating mode (choose first)
150
151### Quick Path (commit-focused, default)
152
153Use this when the user intent is mainly "commit this safely."
154
1551. Follow **Conventional Commits** section only
1562. Stage explicit files only
1573. Validate message type/scope/length from `commit-config.yaml`
1584. Stop after safe commit unless user asks CM/governance operations
159
160### Full CM Path (repo governance / risky history operations)
161
162Use this when the user asks about branching strategy, merges, rebase/cherry-pick, worktrees, release refs, CODEOWNERS, or audit posture.
163
1641. Run CM workflows in order (Planning -> Identification -> Control -> Status accounting -> Verification)
1652. Add onboarding risk scan when inheriting or auditing a repository
1663. Include commit governance from Conventional Commits when creating commits
1674. For large-scope merge operations, use risk scoring and Ask Gate criteria from `../../workflows/scm.md`
168
169### CM process map (software)
170
171| CM function | Intent | Typical artefacts / actions |
172|-------------|--------|------------------------------|
173| **Management & planning** | Agreed rules | `CONTRIBUTING.md`, `SECURITY.md`, `cm-config.yaml` |
174| **Configuration identification** | What is managed, naming | Branch/tag rules, version files, `.gitattributes`, LFS |
175| **Configuration control** | Reviewed change | PRs, checks, issue links, `BREAKING CHANGE` footers |
176| **Status accounting** | As-built truth | `main` / release refs, `CHANGELOG`, tags, CI status |
177| **Verification & audit** | Evidence | CI logs, signed commits, lockfiles / SBOM policy |
178
179### CM workflows (use before risky history operations)
180
181### 1) Planning
182
1831. Read `cm-config.yaml` and files listed under `documented_process`.
1842. If missing, infer from `CONTRIBUTING.md` / `README`; state assumptions.
1853. Confirm **branching model** and whether **force-push** on shared branches is allowed (default: not without explicit approval).
186
187### 2) Identification
188
1891. Canonical refs: default branch, release branches/tags, version sources (`package.json`, etc.).
1902. `.gitattributes` / LFS for binaries and generated assets.
1913. Branch names vs `commit-config.yaml` `branch_prefixes` when the project uses them.
192
193### 3) Control
194
1951. Small, reviewable units; align commits with PR / issue intent.
1962. **Conflicts:** `merge-base`, `git status`, resolve markers, tests; suggest `rerere` when conflicts repeat.
1973. **Worktrees:** `git worktree add`; merge/rebase from the **target branch’s** checkout; all worktrees share one object database.
1984. Do not rewrite **shared** history without maintainer approval; prefer `--force-with-lease` if force-push is unavoidable.
199
200### 4) Status accounting
201
2021. `git status -sb`: branch, remote tracking, ahead/behind, merge state.
2032. Relate last tag / release branch to `CHANGELOG` or tooling (semantic-release, release-please, changesets) if present.
204
205### 5) Verification & audit
206
2071. Required CI and `merge_group` when merge queue applies.
2082. Never stage/commit secrets (`.env`, keys, raw tokens).
2093. Call out signed-commit expectations when the org cares about verification badges.
210
211#### CODEOWNERS maintenance checklist
212
2131. Validate CODEOWNERS file exists (prefer `.github/CODEOWNERS`).
2142. Ensure critical paths are explicitly owned (not only fallback `*`).
2153. Ensure owners are active and mapped to current teams.
2164. Confirm branch protection requires CODEOWNERS review where needed.
2175. Flag overlapping/ambiguous rules that can hide intended owners.
218
219Read `change_governance.require_codeowners` and `ownership.*` in `cm-config.yaml` when present.
220
221### 6) Onboarding risk scan (optional, recommended)
222
223Use this quick scan when joining or inheriting a repository to identify risky areas before major changes.
224
2251. High churn files in `lookback` window.
2262. Ownership concentration / bus-factor signals.
2273. Bug hotspot files from fix-related history.
2284. Velocity trend by month.
2295. Revert/hotfix/emergency frequency.
230
231Read thresholds from `cm-config.yaml` `onboarding_metrics` when present and cite caveats:
232- squash merge teams can distort ownership metrics,
233- weak commit labeling reduces hotspot accuracy,
234- monorepo commit counts can bias subsystem interpretation.
235
236---
237
238### Conventional Commits
239
240### Commit types
241
242| Type | Description | Branch Prefix |
243|------|-------------|---------------|
244| feat | New feature | feature/ |
245| fix | Bug fix | fix/ |
246| refactor | Code improvement | refactor/ |
247| docs | Documentation changes | docs/ |
248| test | Test additions/modifications | test/ |
249| chore | Build, configuration, etc. | chore/ |
250| style | Code style changes | style/ |
251| perf | Performance improvements | perf/ |
252
253### Commit format
254
255```
256<type>(<scope>): <description>
257
258[optional body]
259
260Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
261```
262
263### Commit workflow
264
265#### Step 1: Analyze changes
266
267```bash
268git status
269git diff --staged
270git log --oneline -5
271```
272
273#### Step 1.5: Split by feature (if needed)
274
275If changes span multiple features/domains, **split commits by feature**.
276
277**Split when:** different scopes, different types, logically independent work.
278
279**Do not split when:** one feature, few files (≤5), or user asked for a single commit.
280
281#### Step 2: Determine type
282
283- New capability → `feat` · Bug fix → `fix` · Structure-only → `refactor` · Docs only → `docs` · Tests → `test` · Build/config → `chore`
284
285#### Step 3: Scope
286
287Use module/component: `feat(auth):`, `fix(api):`, or omit: `chore: update dependencies`
288
289#### Step 4: Description
290
291≤72 chars (per `commit-config.yaml`), imperative mood, lowercase start, no trailing period.
292
293#### Step 5: Execute commit
294
295Show the message, then commit with explicit paths:
296
297```bash
298git add <specific-files>
299git commit -m "$(cat <<'EOF'
300<type>(<scope>): <description>
301
302[optional body]
303EOF
304)"
305```
306
307If HEREDOC is unstable in your shell (or body is long), use file-based commit input:
308
309```bash
310git add <specific-files>
311cat > /tmp/oma-commit-msg.txt <<'EOF'
312<type>(<scope>): <description>
313
314[optional body]
315EOF
316git commit -F /tmp/oma-commit-msg.txt
317```
318
319Use HEREDOC by default, and switch to `-F` for long or flaky terminal sessions.
320
321## References
322
323- `config/commit-config.yaml`
324- `config/cm-config.yaml`
325- `resources/conventional-commits.md`
326- `resources/onboarding-risk-signals.md`
327- `resources/codeowners-playbook.md`
328- Observability handoff: `../oma-observability/SKILL.md` §Integrations — release markers (`service.version`), revert baseline diff
329
330### Important notes
331
332- **NEVER** `git add -A` or `git add .` without explicit user permission.
333- **NEVER** commit likely-secret material.
334- **ALWAYS** stage by explicit paths; tie non-trivial CM work to the five CM rows above, even briefly.