# Commit Procedure

After all changes have been applied and validation passes:

## Stage source files and generated skills

Stage each modified source file explicitly, plus the generated skill files.
Do **not** stage:
- `README.adoc` (auto-generated — will be regenerated by CI)
- `AGENTS.md` (auto-generated — will be regenerated by CI)

```bash
git add \
  AGENTS-source.adoc \
  README-source.adoc \
  docs/attributes.adoc \
  docs/CONTRIBUTING-source.adoc \
  docs/gesinn-it-docs-master-pub \
  .github/workflows/build-docs.yml \
  .claude/skills/ \
  .agents/skills/
```

Note: `.claude/CLAUDE.md`, `.github/instructions/`, and `{src,libs,tests,.github}/AGENTS.md`
are generated by CI and not committed manually — they will appear after the first CI run.

Verify the staged diff looks correct:

```bash
git diff --staged --stat
```

## Commit message template

Do **not** append a `Co-Authored-By:` trailer — the commit message must not contain any agent attribution lines.

```
chore(docs): migrate to gesinn-it-docs-master-pub v2 snippet paths

Update all AsciiDoc include:: paths to the v2 scoped subdirectory structure.
Remove shared boilerplate from AGENTS-source.adoc (now in skills).
Add skills generation to build-docs.yml, driven by :project_type: attribute.

Old: snippets/{scope}/coding-conventions-*.adoc, ci-*.adoc
New: snippets/{scope}/conventions/*.adoc, execution/*.adoc, procedures/*.adoc
```

## Checklist before pushing

- [ ] Validation grep returns zero matches (see `06-validation.md`)
- [ ] No `include::` of shared snippets remains in `AGENTS-source.adoc`
- [ ] `.claude/skills/` is populated and staged (or will be built by CI)
- [ ] `build-docs.yml` contains the skills build step
- [ ] `build-docs.yml` contains the `Create CLAUDE.md` step
- [ ] `build-docs.yml` contains the `Build instructions` step
- [ ] Commit step uses `EndBug/add-and-commit@v10`
- [ ] No generated files (`README.adoc`, `AGENTS.md`) are staged
- [ ] Submodule pointer is updated to v2
- [ ] CI passes after push
