git 5.0.5 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/CONTRIBUTING.md +209 -164
  4. data/LICENSE +1 -1
  5. data/README.md +205 -138
  6. data/git.gemspec +77 -17
  7. data/lib/git/command_line/base.rb +1 -2
  8. data/lib/git/commands/base.rb +1 -1
  9. data/lib/git/commands/cat_file/raw.rb +8 -7
  10. data/lib/git/configuring.rb +56 -0
  11. data/lib/git/log.rb +19 -0
  12. data/lib/git/repository/branching.rb +79 -5
  13. data/lib/git/repository/logging.rb +35 -11
  14. data/lib/git/repository/object_operations.rb +22 -1
  15. data/lib/git/version.rb +1 -1
  16. metadata +33 -122
  17. data/.claude/commands/address-copilot-reviews.md +0 -14
  18. data/.claude/settings.json +0 -16
  19. data/.claude/skills +0 -1
  20. data/.commitlintrc.yml +0 -38
  21. data/.dockerignore +0 -27
  22. data/.github/copilot-instructions.md +0 -30
  23. data/.github/hooks/bin-setup-on-worktree.json +0 -11
  24. data/.github/hooks/run-bin-setup-once.sh +0 -20
  25. data/.github/issue_template.md +0 -15
  26. data/.github/prompts/iteratively-address-copilot-reviews.prompt.md +0 -188
  27. data/.github/pull_request_template.md +0 -21
  28. data/.github/skills/breaking-change-analysis/SKILL.md +0 -99
  29. data/.github/skills/ci-cd-troubleshooting/SKILL.md +0 -264
  30. data/.github/skills/command-implementation/REFERENCE.md +0 -994
  31. data/.github/skills/command-implementation/SKILL.md +0 -230
  32. data/.github/skills/command-test-conventions/SKILL.md +0 -664
  33. data/.github/skills/command-yard-documentation/SKILL.md +0 -434
  34. data/.github/skills/dependency-management/SKILL.md +0 -72
  35. data/.github/skills/development-workflow/SKILL.md +0 -512
  36. data/.github/skills/facade-implementation/REFERENCE.md +0 -837
  37. data/.github/skills/facade-implementation/SKILL.md +0 -269
  38. data/.github/skills/facade-test-conventions/SKILL.md +0 -391
  39. data/.github/skills/facade-yard-documentation/SKILL.md +0 -435
  40. data/.github/skills/make-skill-template/SKILL.md +0 -226
  41. data/.github/skills/pr-readiness-review/SKILL.md +0 -205
  42. data/.github/skills/project-context/SKILL.md +0 -306
  43. data/.github/skills/pull-request-review/SKILL.md +0 -168
  44. data/.github/skills/rebase/SKILL.md +0 -148
  45. data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +0 -131
  46. data/.github/skills/release-management/SKILL.md +0 -125
  47. data/.github/skills/resolve-feedback/SKILL.md +0 -288
  48. data/.github/skills/review-arguments-dsl/CHECKLIST.md +0 -788
  49. data/.github/skills/review-arguments-dsl/SKILL.md +0 -214
  50. data/.github/skills/review-cross-command-consistency/SKILL.md +0 -139
  51. data/.github/skills/reviewing-skills/SKILL.md +0 -214
  52. data/.github/skills/rspec-unit-testing-standards/SKILL.md +0 -685
  53. data/.github/skills/tdd-refactor-step/SKILL.md +0 -236
  54. data/.github/skills/test-debugging/SKILL.md +0 -161
  55. data/.github/skills/yard-documentation/SKILL.md +0 -981
  56. data/.github/skills/yard-documentation/element-rules.md +0 -162
  57. data/.github/skills-deprecated/README.md +0 -21
  58. data/.github/skills-deprecated/extract-command-from-lib/SKILL.md +0 -487
  59. data/.github/skills-deprecated/extract-facade-from-base-lib/KEYWORD_ARG_REMEDIATION.md +0 -22
  60. data/.github/skills-deprecated/extract-facade-from-base-lib/SKILL.md +0 -600
  61. data/.github/skills-deprecated/review-backward-compatibility/SKILL.md +0 -275
  62. data/.github/workflows/continuous_integration.yml +0 -343
  63. data/.github/workflows/enforce_conventional_commits.yml +0 -35
  64. data/.github/workflows/experimental_continuous_integration.yml +0 -59
  65. data/.github/workflows/release.yml +0 -52
  66. data/.github/workflows/warm_bundler_caches.yml +0 -82
  67. data/.gitignore +0 -30
  68. data/.husky/commit-msg +0 -1
  69. data/.husky/pre-commit +0 -13
  70. data/.release-please-config.json +0 -36
  71. data/.release-please-manifest.json +0 -3
  72. data/.rspec +0 -2
  73. data/.rubocop.yml +0 -37
  74. data/.rubocop_todo.yml +0 -30
  75. data/.yard-lint.yml +0 -75
  76. data/CLAUDE.md +0 -11
  77. data/Gemfile +0 -22
  78. data/Rakefile +0 -41
  79. data/docker/test/Dockerfile +0 -32
  80. data/docker/test/docker-compose.yml +0 -0
  81. data/package.json +0 -10
  82. data/redesign/1_architecture_existing.md +0 -102
  83. data/redesign/2_architecture_redesign.md +0 -449
  84. data/redesign/3_architecture_implementation.md +0 -1623
  85. data/redesign/Phase 4 - Step A.md +0 -366
  86. data/redesign/Phase 4 - Step B.md +0 -921
  87. data/redesign/Phase 4 - Step C.md +0 -833
  88. data/redesign/beta_release.md +0 -107
  89. data/redesign/branch_parse_refactor_plan.md +0 -163
  90. data/redesign/c1a-public-api-scope.tsv +0 -256
  91. data/redesign/c1c2_audit.md +0 -566
  92. data/redesign/c1c2_bucket6_lib_orphans.md +0 -626
  93. data/redesign/config_design.rb +0 -501
  94. data/redesign/index.md +0 -34
  95. data/redesign/info_object_migration_plan.md +0 -126
  96. data/redesign/integration_test_analysis.md +0 -521
  97. data/redesign/phase-4-step-b-test-audit.tsv +0 -485
  98. data/redesign/remote_refactor_plan.md +0 -164
  99. data/redesign/reverse_dependencies.sql +0 -44
  100. data/tasks/gem_tasks.rake +0 -14
  101. data/tasks/npm_tasks.rake +0 -7
  102. data/tasks/rspec.rake +0 -111
  103. data/tasks/rubocop.rake +0 -5
  104. data/tasks/test_gem.rake +0 -12
  105. data/tasks/yard.rake +0 -57
@@ -1,230 +0,0 @@
1
- ---
2
- name: command-implementation
3
- description: "Scaffolds new and reviews existing Git::Commands::* classes with unit tests, integration tests, and YARD docs using the Base architecture. Use when creating a new command class from scratch, updating an existing command class, or reviewing a command class for correctness."
4
- ---
5
-
6
- # Command Implementation
7
-
8
- Scaffold new and review existing `Git::Commands::Base` command classes, unit tests,
9
- integration tests, and YARD docs.
10
-
11
- ## Contents
12
-
13
- - [Contents](#contents)
14
- - [Related skills](#related-skills)
15
- - [Input](#input)
16
- - [Command source code](#command-source-code)
17
- - [Command test code](#command-test-code)
18
- - [Git documentation for the git command](#git-documentation-for-the-git-command)
19
- - [Reference](#reference)
20
- - [Workflow](#workflow)
21
- - [Output](#output)
22
-
23
- ## Related skills
24
-
25
- Additional related skills:
26
-
27
- - [Review Arguments DSL](../review-arguments-dsl/SKILL.md) — verify every DSL entry
28
- is correct and complete
29
- - [Command YARD Documentation](../command-yard-documentation/SKILL.md) — verify
30
- documentation completeness and formatting
31
- - [RSpec Unit Testing Standards](../rspec-unit-testing-standards/SKILL.md) — baseline
32
- RSpec rules all generated unit specs must comply with
33
- - [Command Test Conventions](../command-test-conventions/SKILL.md) — conventions for
34
- writing and reviewing unit and integration tests for command classes
35
- - [Review Cross-Command Consistency](../review-cross-command-consistency/SKILL.md) —
36
- sibling consistency within a command family
37
- - [Facade Implementation](../facade-implementation/SKILL.md) — the v5.0.0 facade
38
- layer (`Git::Repository::*`) that calls these command classes; new facade
39
- wiring goes into a `Git::Repository::*` facade module rather than directly into
40
- the command class
41
-
42
- ## Input
43
-
44
- The user provides the target `Git::Commands::*` class name and the git subcommand (or
45
- subcommand + sub-action) it wraps. The agent gathers the following.
46
-
47
- ### Command source code
48
-
49
- Read the command class from `lib/git/commands/{command}.rb` or, for subcommands,
50
- `lib/git/commands/{command}/{subcommand}.rb`. For subcommands, also read the
51
- namespace module at `lib/git/commands/{command}.rb` which lists all sibling
52
- subcommands and provides the module-level documentation.
53
-
54
- Skip this step when scaffolding a new command (the file does not exist yet).
55
-
56
- ### Command test code
57
-
58
- Read unit tests matching `spec/unit/git/commands/{command}/**/*_spec.rb`. Use these as
59
- supplemental evidence when tracing the verification chain (Ruby call → bound
60
- argument → expected git CLI). Coverage completeness is assessed by the
61
- [Command Test Conventions](../command-test-conventions/SKILL.md) skill.
62
-
63
- Skip this step when scaffolding a new command (the file does not exist yet).
64
-
65
- ### Git documentation for the git command
66
-
67
- - **Latest-version online command documentation**
68
-
69
- Read the **entire** official git documentation online man page for the command
70
- for the latest version of git. This version will be used as the primary
71
- authority for DSL completeness, including the options to include in the
72
- DSL, argument names, aliases, ordering, etc.
73
- Fetch this version from the URL `https://git-scm.com/docs/git-{command}`
74
- (this URL always serves the latest release).
75
-
76
- - **Minimum-version online command documentation**
77
-
78
- Read the **entire** official git documentation online man page for the command for
79
- the `Git::MINIMUM_GIT_VERSION` version of git. This will be used only for
80
- command-introduction and `requires_git_version` decisions. Fetch this version from
81
- URL `https://git-scm.com/docs/git-{command}/{version}`.
82
-
83
- Do **not** scaffold from local `git <command> -h` output — the installed Git
84
- version is unknown and may differ from the latest supported version. Local help should
85
- NOT be used even as a supplemental check.
86
-
87
- ## Reference
88
-
89
- See [REFERENCE.md](REFERENCE.md) for the full reference covering:
90
-
91
- - Files to generate
92
- - Single class vs. sub-command namespace (when to split, naming, templates)
93
- - Architecture contract and structural requirements
94
- - Command template (Base pattern)
95
- - `#call` override guidance (when to override, stdin feeding, action-option patterns)
96
- - `Base#with_stdin` mechanics
97
- - Options completeness (version conventions, execution-model conflicts)
98
- - `end_of_options` placement rules
99
- - Exit status guidance
100
- - Facade delegation and policy options
101
- - Internal compatibility contract
102
- - Phased rollout requirements
103
- - Common failures
104
-
105
- Subagents load REFERENCE.md directly during the workflow steps that need it.
106
-
107
- ## Workflow
108
-
109
- This skill supports three modes. Determine which mode applies before starting:
110
-
111
- - **Scaffold** — creating a new command class from scratch. Follow all steps.
112
- - **Update** — adding options to an existing command class: skip steps 2, 3a, 3b,
113
- and 3c (the class and test files already exist). Start from step 1, then proceed
114
- directly to 3d → 3e → 3f → 4 → 5.
115
- - **Review** — auditing an existing command class for correctness (no changes).
116
- Follow all steps but produce findings instead of code.
117
-
118
- 1. **Gather input** — collect the target class name and git subcommand from
119
- the [Input](#input), then fetch the latest-version and minimum-version
120
- git documentation per [Git documentation for the git
121
- command](#git-documentation-for-the-git-command).
122
-
123
- 2. **Determine class structure** *(scaffold mode only)* — decide between a single
124
- class and a sub-command namespace per [Single class vs. sub-command
125
- namespace](REFERENCE.md#single-class-vs-sub-command-namespace).
126
-
127
- 3. **For each command / sub-command class**, repeat steps 3a–3f:
128
-
129
- a. **Scaffold the command class (subagent)** *(scaffold mode only)* — delegate
130
- to a subagent: load [REFERENCE.md](REFERENCE.md) and the
131
- [YARD Documentation](../yard-documentation/SKILL.md) skill, then generate
132
- `lib/git/commands/{command}.rb` using the [Command
133
- template](REFERENCE.md#command-template-base-pattern). Populate the
134
- `arguments do` block with all options from the latest-version docs per
135
- [Options completeness](REFERENCE.md#options-completeness--consult-the-latest-version-docs-first),
136
- applying the [Execution-model conflicts](REFERENCE.md#execution-model-conflicts),
137
- [`end_of_options` placement](REFERENCE.md#end_of_options-placement), and
138
- [Exit status guidance](REFERENCE.md#exit-status-guidance) rules. Pass the
139
- fetched git documentation to the subagent.
140
-
141
- Steps 3b and 3c may run **in parallel** (they produce independent files).
142
-
143
- b. **Scaffold unit tests (subagent)** *(scaffold mode only)* — delegate to a
144
- subagent: load **[Command Test
145
- Conventions](../command-test-conventions/SKILL.md)** (which loads [RSpec Unit
146
- Testing Standards](../rspec-unit-testing-standards/SKILL.md)), then generate
147
- `spec/unit/git/commands/{command}_spec.rb` following the unit test
148
- conventions. Fix all findings, then repeat the review until clean.
149
-
150
- c. **Scaffold integration tests (subagent)** *(scaffold mode only)* — delegate
151
- to a subagent: load **[Command Test
152
- Conventions](../command-test-conventions/SKILL.md)**, then generate
153
- `spec/integration/git/commands/{command}_spec.rb` following the integration
154
- test conventions. Fix all findings, then repeat the review until clean.
155
-
156
- d. **Review Arguments DSL (subagent)** — delegate to a subagent: load and
157
- apply **[Review Arguments DSL](../review-arguments-dsl/SKILL.md)** (and its
158
- [CHECKLIST.md](../review-arguments-dsl/CHECKLIST.md)) against the
159
- `arguments do` block. Fix all findings, then repeat the review until clean.
160
- **Complete this step before starting steps 3e–3f** — DSL corrections change
161
- the CLI arguments that tests and YARD docs must reflect.
162
-
163
- Steps 3e and 3f may run **in parallel** (they review independent file sets).
164
-
165
- e. **Review Command Tests (subagent)** — delegate to a subagent: load and
166
- apply **[Command Test Conventions](../command-test-conventions/SKILL.md)** against
167
- the unit and integration spec files. Fix all findings, then repeat the
168
- review until clean.
169
-
170
- f. **Review YARD Documentation (subagent)** — delegate to a subagent: load
171
- and apply **[Command YARD Documentation](../command-yard-documentation/SKILL.md)**
172
- against the command class. Fix all findings, then repeat the review until
173
- clean.
174
-
175
- 4. **Review class shape and declarations** — load
176
- [REFERENCE.md](REFERENCE.md) and verify against the
177
- [Architecture contract](REFERENCE.md#architecture-contract), [`#call` override
178
- guidance](REFERENCE.md#call-override-guidance), [Exit status
179
- guidance](REFERENCE.md#exit-status-guidance), [`requires_git_version`
180
- convention](REFERENCE.md#requires_git_version-convention), [Internal compatibility
181
- contract](REFERENCE.md#internal-compatibility-contract), and [Common
182
- failures](REFERENCE.md#common-failures). Additionally:
183
-
184
- - For **scaffold** and **update** modes: write or update the
185
- `Git::Repository::*` facade method per [Facade delegation and policy
186
- options](REFERENCE.md#facade-delegation-and-policy-options).
187
- - For **migration PRs**: verify [Phased rollout
188
- requirements](REFERENCE.md#phased-rollout-requirements).
189
-
190
- 5. **Run quality gates** — discover the prerequisite tasks for
191
- `default` and run them sequentially, fixing failures before
192
- advancing:
193
-
194
- ```bash
195
- bundle exec ruby -e "require 'rake'; load 'Rakefile'; puts Rake::Task['default'].prerequisites"
196
- ```
197
-
198
- Run each listed task **individually** in order via `bundle exec rake <task>`
199
- (one task per invocation — never combine multiple tasks in a single command).
200
- On failure, fix the issue and re-run that same task. Once it passes, continue
201
- to the next task. After all tasks pass, if any task required a fix during this
202
- cycle, start a new cycle from the first task using the same one-at-a-time
203
- approach. Keep cycling until every task passes on its first attempt with no
204
- fixes needed.
205
-
206
- ## Output
207
-
208
- For **scaffold** and **update** modes, produce:
209
-
210
- 1. **Command class** — `lib/git/commands/{command}.rb` (and optionally the namespace
211
- module file for the first command in a namespace)
212
- 2. **Unit tests** — `spec/unit/git/commands/{command}_spec.rb`
213
- 3. **Integration tests** — `spec/integration/git/commands/{command}_spec.rb`
214
- 4. **Facade delegation** — updated `Git::Repository::*` facade method in `lib/git/repository/<topic>.rb`
215
- 5. **All quality gates pass** — RSpec, RuboCop, YARD, and build all green
216
-
217
- For **review** mode, produce:
218
-
219
- | Check | Status | Issue |
220
- | --- | --- | --- |
221
- | Base inheritance | Pass/Fail | ... |
222
- | arguments DSL | Pass/Fail | ... |
223
- | call shim | Pass/Fail | ... |
224
- | allow_exit_status usage | Pass/Fail | ... |
225
- | requires_git_version | Pass/Fail | ... |
226
- | output parsing absent | Pass/Fail | ... |
227
- | compatibility contract | Pass/Fail | ... |
228
-
229
- Then list required fixes and indicate whether the migration slice is safe to merge
230
- under phased-rollout rules.