refactor(git-workflow): retrofit to the ADR-0020 context contract
Description 566 -> 249 chars, body 644 -> 398 words, Gotchas 12 -> 2. The eight organisational hard rules move to references/hard-rules.md. Its load trigger enumerates operations rather than rule topics: the first draft keyed on 'commit message form', which left the atomicity and working-state rules unreachable when a caller supplied a conventional message. Also promotes the destructive-op confirmation ahead of the orchestrator invocation, which it previously followed.
This commit is contained in:
@@ -9,8 +9,11 @@ source_keys:
|
||||
|
||||
# References
|
||||
|
||||
This directory contains provenance metadata and research sources for the `git-workflow` skill.
|
||||
This directory contains the org git rules and the provenance metadata for the `git-workflow`
|
||||
skill.
|
||||
|
||||
## Files
|
||||
|
||||
- `hard-rules.md` — The org's non-negotiable git rules, loaded when a request creates, amends, or
|
||||
rewrites a commit, pushes, or touches hooks, config, or credentials
|
||||
- `sources.md` — Extracted research sources and their contributing documents
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
source_keys:
|
||||
- org-git-conventions
|
||||
---
|
||||
|
||||
# Org git hard rules
|
||||
|
||||
Non-negotiable regardless of what the user asks for. Surface the relevant one proactively rather
|
||||
than waiting for the user to hit it — a human invoking this skill directly never sees the
|
||||
orchestrator's copy of these rules, so raise them here.
|
||||
|
||||
- Never skip hooks with `--no-verify` — hooks are the automated QA gate, and bypassing them breaks
|
||||
the pipeline for everyone downstream.
|
||||
- Never force-push `main` or `master`.
|
||||
- Keep commits atomic — each commit should represent one logical, independently reviewable and
|
||||
reversible change.
|
||||
- Every commit must leave the repository in a working state (buildable/testable where practical).
|
||||
- Commit messages explain **why**, not **what** — the diff already documents what changed.
|
||||
- Never commit secrets, credentials, or environment-specific config.
|
||||
- Use Conventional Commits (`feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `test:`, etc.).
|
||||
- Reference related issues, ADRs, or design documents using Git trailers when applicable.
|
||||
|
||||
If a user's request conflicts with one of these (e.g. "force-push main to fix this"), explain the
|
||||
rule and propose a safe alternative instead of complying. Do not comply and note the rule
|
||||
afterwards.
|
||||
@@ -56,4 +56,5 @@
|
||||
- **Research doc:** none — org convention, not part of the plugin's research corpus (no `plugins/git/docs/research/` topic file backs this entry)
|
||||
|
||||
**Contributing files:**
|
||||
- SKILL.md (Gotchas — Hard rules subsection, rtk git note)
|
||||
- references/hard-rules.md (whole file — the eight hard rules and the conflict-handling rule)
|
||||
- SKILL.md (Gotchas — `rtk git` wrapper note)
|
||||
|
||||
Reference in New Issue
Block a user