git 4.3.2 → 5.0.0.beta.1
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.
- checksums.yaml +4 -4
- data/.github/copilot-instructions.md +67 -2705
- data/.github/pull_request_template.md +3 -1
- data/.github/skills/breaking-change-analysis/SKILL.md +102 -0
- data/.github/skills/ci-cd-troubleshooting/SKILL.md +264 -0
- data/.github/skills/command-implementation/REFERENCE.md +993 -0
- data/.github/skills/command-implementation/SKILL.md +229 -0
- data/.github/skills/command-test-conventions/SKILL.md +660 -0
- data/.github/skills/command-yard-documentation/SKILL.md +426 -0
- data/.github/skills/dependency-management/SKILL.md +72 -0
- data/.github/skills/development-workflow/SKILL.md +506 -0
- data/.github/skills/extract-command-from-lib/SKILL.md +487 -0
- data/.github/skills/extract-facade-from-base-lib/SKILL.md +586 -0
- data/.github/skills/facade-implementation/REFERENCE.md +840 -0
- data/.github/skills/facade-implementation/SKILL.md +260 -0
- data/.github/skills/facade-test-conventions/SKILL.md +380 -0
- data/.github/skills/facade-yard-documentation/SKILL.md +429 -0
- data/.github/skills/make-skill-template/SKILL.md +176 -0
- data/.github/skills/pr-readiness-review/SKILL.md +185 -0
- data/.github/skills/project-context/SKILL.md +313 -0
- data/.github/skills/pull-request-review/SKILL.md +168 -0
- data/.github/skills/refactor-command-to-commandlineresult/SKILL.md +131 -0
- data/.github/skills/release-management/SKILL.md +125 -0
- data/.github/skills/review-arguments-dsl/CHECKLIST.md +788 -0
- data/.github/skills/review-arguments-dsl/SKILL.md +214 -0
- data/.github/skills/review-backward-compatibility/SKILL.md +275 -0
- data/.github/skills/review-cross-command-consistency/SKILL.md +139 -0
- data/.github/skills/reviewing-skills/SKILL.md +189 -0
- data/.github/skills/rspec-unit-testing-standards/SKILL.md +639 -0
- data/.github/skills/tdd-refactor-step/SKILL.md +236 -0
- data/.github/skills/test-debugging/SKILL.md +160 -0
- data/.github/skills/yard-documentation/SKILL.md +793 -0
- data/.github/workflows/continuous_integration.yml +3 -2
- data/.github/workflows/enforce_conventional_commits.yml +1 -1
- data/.github/workflows/experimental_continuous_integration.yml +2 -2
- data/.github/workflows/release.yml +3 -4
- data/.gitignore +8 -0
- data/.husky/pre-commit +13 -0
- data/.release-please-manifest.json +1 -1
- data/.rspec +3 -0
- data/.rubocop.yml +7 -3
- data/.rubocop_todo.yml +23 -5
- data/.yardopts +1 -0
- data/CHANGELOG.md +0 -40
- data/CONTRIBUTING.md +694 -53
- data/README.md +17 -5
- data/Rakefile +61 -9
- data/commitlint.test +4 -0
- data/git.gemspec +14 -8
- data/lib/git/args_builder.rb +0 -8
- data/lib/git/base.rb +486 -410
- data/lib/git/branch.rb +380 -43
- data/lib/git/branch_delete_failure.rb +31 -0
- data/lib/git/branch_delete_result.rb +63 -0
- data/lib/git/branch_info.rb +178 -0
- data/lib/git/branches.rb +130 -24
- data/lib/git/command_line/base.rb +245 -0
- data/lib/git/command_line/capturing.rb +249 -0
- data/lib/git/command_line/result.rb +96 -0
- data/lib/git/command_line/streaming.rb +194 -0
- data/lib/git/command_line.rb +43 -322
- data/lib/git/command_line_result.rb +4 -88
- data/lib/git/commands/add.rb +131 -0
- data/lib/git/commands/am/abort.rb +43 -0
- data/lib/git/commands/am/apply.rb +252 -0
- data/lib/git/commands/am/continue.rb +43 -0
- data/lib/git/commands/am/quit.rb +43 -0
- data/lib/git/commands/am/retry.rb +47 -0
- data/lib/git/commands/am/show_current_patch.rb +64 -0
- data/lib/git/commands/am/skip.rb +42 -0
- data/lib/git/commands/am.rb +33 -0
- data/lib/git/commands/apply.rb +237 -0
- data/lib/git/commands/archive/list_formats.rb +46 -0
- data/lib/git/commands/archive.rb +140 -0
- data/lib/git/commands/arguments.rb +3510 -0
- data/lib/git/commands/base.rb +403 -0
- data/lib/git/commands/branch/copy.rb +94 -0
- data/lib/git/commands/branch/create.rb +173 -0
- data/lib/git/commands/branch/delete.rb +80 -0
- data/lib/git/commands/branch/list.rb +162 -0
- data/lib/git/commands/branch/move.rb +94 -0
- data/lib/git/commands/branch/set_upstream.rb +86 -0
- data/lib/git/commands/branch/show_current.rb +49 -0
- data/lib/git/commands/branch/unset_upstream.rb +57 -0
- data/lib/git/commands/branch.rb +34 -0
- data/lib/git/commands/cat_file/batch.rb +364 -0
- data/lib/git/commands/cat_file/filtered.rb +105 -0
- data/lib/git/commands/cat_file/raw.rb +210 -0
- data/lib/git/commands/cat_file.rb +49 -0
- data/lib/git/commands/checkout/branch.rb +151 -0
- data/lib/git/commands/checkout/files.rb +115 -0
- data/lib/git/commands/checkout.rb +38 -0
- data/lib/git/commands/checkout_index.rb +105 -0
- data/lib/git/commands/clean.rb +100 -0
- data/lib/git/commands/clone.rb +240 -0
- data/lib/git/commands/commit.rb +272 -0
- data/lib/git/commands/commit_tree.rb +100 -0
- data/lib/git/commands/config_option_syntax/add.rb +83 -0
- data/lib/git/commands/config_option_syntax/get.rb +117 -0
- data/lib/git/commands/config_option_syntax/get_all.rb +115 -0
- data/lib/git/commands/config_option_syntax/get_color.rb +91 -0
- data/lib/git/commands/config_option_syntax/get_color_bool.rb +93 -0
- data/lib/git/commands/config_option_syntax/get_regexp.rb +115 -0
- data/lib/git/commands/config_option_syntax/get_urlmatch.rb +102 -0
- data/lib/git/commands/config_option_syntax/list.rb +107 -0
- data/lib/git/commands/config_option_syntax/remove_section.rb +74 -0
- data/lib/git/commands/config_option_syntax/rename_section.rb +78 -0
- data/lib/git/commands/config_option_syntax/replace_all.rb +104 -0
- data/lib/git/commands/config_option_syntax/set.rb +114 -0
- data/lib/git/commands/config_option_syntax/unset.rb +89 -0
- data/lib/git/commands/config_option_syntax/unset_all.rb +89 -0
- data/lib/git/commands/config_option_syntax.rb +56 -0
- data/lib/git/commands/describe.rb +155 -0
- data/lib/git/commands/diff.rb +656 -0
- data/lib/git/commands/diff_files.rb +518 -0
- data/lib/git/commands/diff_index.rb +496 -0
- data/lib/git/commands/fetch.rb +352 -0
- data/lib/git/commands/fsck.rb +136 -0
- data/lib/git/commands/gc.rb +132 -0
- data/lib/git/commands/grep.rb +338 -0
- data/lib/git/commands/init.rb +99 -0
- data/lib/git/commands/log.rb +632 -0
- data/lib/git/commands/ls_files.rb +191 -0
- data/lib/git/commands/ls_remote.rb +155 -0
- data/lib/git/commands/ls_tree.rb +131 -0
- data/lib/git/commands/maintenance/register.rb +75 -0
- data/lib/git/commands/maintenance/run.rb +104 -0
- data/lib/git/commands/maintenance/start.rb +66 -0
- data/lib/git/commands/maintenance/stop.rb +55 -0
- data/lib/git/commands/maintenance/unregister.rb +79 -0
- data/lib/git/commands/maintenance.rb +31 -0
- data/lib/git/commands/merge/abort.rb +44 -0
- data/lib/git/commands/merge/continue.rb +44 -0
- data/lib/git/commands/merge/quit.rb +46 -0
- data/lib/git/commands/merge/start.rb +245 -0
- data/lib/git/commands/merge.rb +28 -0
- data/lib/git/commands/merge_base.rb +86 -0
- data/lib/git/commands/mv.rb +77 -0
- data/lib/git/commands/name_rev.rb +114 -0
- data/lib/git/commands/pull.rb +377 -0
- data/lib/git/commands/push.rb +246 -0
- data/lib/git/commands/read_tree.rb +149 -0
- data/lib/git/commands/remote/add.rb +91 -0
- data/lib/git/commands/remote/get_url.rb +66 -0
- data/lib/git/commands/remote/list.rb +54 -0
- data/lib/git/commands/remote/prune.rb +61 -0
- data/lib/git/commands/remote/remove.rb +52 -0
- data/lib/git/commands/remote/rename.rb +69 -0
- data/lib/git/commands/remote/set_branches.rb +63 -0
- data/lib/git/commands/remote/set_head.rb +82 -0
- data/lib/git/commands/remote/set_url.rb +71 -0
- data/lib/git/commands/remote/set_url_add.rb +61 -0
- data/lib/git/commands/remote/set_url_delete.rb +64 -0
- data/lib/git/commands/remote/show.rb +71 -0
- data/lib/git/commands/remote/update.rb +72 -0
- data/lib/git/commands/remote.rb +42 -0
- data/lib/git/commands/repack.rb +277 -0
- data/lib/git/commands/reset.rb +147 -0
- data/lib/git/commands/rev_parse.rb +297 -0
- data/lib/git/commands/revert/abort.rb +45 -0
- data/lib/git/commands/revert/continue.rb +57 -0
- data/lib/git/commands/revert/quit.rb +47 -0
- data/lib/git/commands/revert/skip.rb +44 -0
- data/lib/git/commands/revert/start.rb +153 -0
- data/lib/git/commands/revert.rb +29 -0
- data/lib/git/commands/rm.rb +114 -0
- data/lib/git/commands/show.rb +632 -0
- data/lib/git/commands/show_ref/exclude_existing.rb +120 -0
- data/lib/git/commands/show_ref/exists.rb +78 -0
- data/lib/git/commands/show_ref/list.rb +145 -0
- data/lib/git/commands/show_ref/verify.rb +120 -0
- data/lib/git/commands/show_ref.rb +42 -0
- data/lib/git/commands/stash/apply.rb +75 -0
- data/lib/git/commands/stash/branch.rb +65 -0
- data/lib/git/commands/stash/clear.rb +41 -0
- data/lib/git/commands/stash/create.rb +58 -0
- data/lib/git/commands/stash/drop.rb +67 -0
- data/lib/git/commands/stash/list.rb +39 -0
- data/lib/git/commands/stash/pop.rb +78 -0
- data/lib/git/commands/stash/push.rb +103 -0
- data/lib/git/commands/stash/show.rb +149 -0
- data/lib/git/commands/stash/store.rb +63 -0
- data/lib/git/commands/stash.rb +38 -0
- data/lib/git/commands/status.rb +169 -0
- data/lib/git/commands/symbolic_ref/delete.rb +68 -0
- data/lib/git/commands/symbolic_ref/read.rb +95 -0
- data/lib/git/commands/symbolic_ref/update.rb +76 -0
- data/lib/git/commands/symbolic_ref.rb +38 -0
- data/lib/git/commands/tag/create.rb +139 -0
- data/lib/git/commands/tag/delete.rb +55 -0
- data/lib/git/commands/tag/list.rb +143 -0
- data/lib/git/commands/tag/verify.rb +71 -0
- data/lib/git/commands/tag.rb +26 -0
- data/lib/git/commands/update_ref/batch.rb +140 -0
- data/lib/git/commands/update_ref/delete.rb +92 -0
- data/lib/git/commands/update_ref/update.rb +106 -0
- data/lib/git/commands/update_ref.rb +42 -0
- data/lib/git/commands/version.rb +52 -0
- data/lib/git/commands/worktree/add.rb +140 -0
- data/lib/git/commands/worktree/list.rb +64 -0
- data/lib/git/commands/worktree/lock.rb +58 -0
- data/lib/git/commands/worktree/management_base.rb +51 -0
- data/lib/git/commands/worktree/move.rb +66 -0
- data/lib/git/commands/worktree/prune.rb +67 -0
- data/lib/git/commands/worktree/remove.rb +63 -0
- data/lib/git/commands/worktree/repair.rb +76 -0
- data/lib/git/commands/worktree/unlock.rb +47 -0
- data/lib/git/commands/worktree.rb +43 -0
- data/lib/git/commands/write_tree.rb +68 -0
- data/lib/git/commands.rb +89 -0
- data/lib/git/detached_head_info.rb +54 -0
- data/lib/git/diff.rb +297 -7
- data/lib/git/diff_file_numstat_info.rb +29 -0
- data/lib/git/diff_file_patch_info.rb +134 -0
- data/lib/git/diff_file_raw_info.rb +127 -0
- data/lib/git/diff_info.rb +169 -0
- data/lib/git/diff_path_status.rb +78 -19
- data/lib/git/diff_result.rb +32 -0
- data/lib/git/diff_stats.rb +59 -14
- data/lib/git/dirstat_info.rb +86 -0
- data/lib/git/errors.rb +65 -2
- data/lib/git/execution_context/global.rb +56 -0
- data/lib/git/execution_context/repository.rb +147 -0
- data/lib/git/execution_context.rb +482 -0
- data/lib/git/file_ref.rb +74 -0
- data/lib/git/fsck_object.rb +9 -9
- data/lib/git/fsck_result.rb +1 -1
- data/lib/git/lib.rb +1606 -1028
- data/lib/git/log.rb +15 -2
- data/lib/git/object.rb +92 -22
- data/lib/git/parsers/branch.rb +224 -0
- data/lib/git/parsers/cat_file.rb +111 -0
- data/lib/git/parsers/diff.rb +585 -0
- data/lib/git/parsers/fsck.rb +133 -0
- data/lib/git/parsers/grep.rb +42 -0
- data/lib/git/parsers/ls_tree.rb +58 -0
- data/lib/git/parsers/stash.rb +208 -0
- data/lib/git/parsers/tag.rb +257 -0
- data/lib/git/remote.rb +133 -9
- data/lib/git/repository/branching.rb +572 -0
- data/lib/git/repository/committing.rb +191 -0
- data/lib/git/repository/configuring.rb +156 -0
- data/lib/git/repository/diffing.rb +775 -0
- data/lib/git/repository/inspecting.rb +153 -0
- data/lib/git/repository/logging.rb +247 -0
- data/lib/git/repository/merging.rb +295 -0
- data/lib/git/repository/object_operations.rb +1101 -0
- data/lib/git/repository/path_resolver.rb +207 -0
- data/lib/git/repository/remote_operations.rb +753 -0
- data/lib/git/repository/shared_private.rb +51 -0
- data/lib/git/repository/staging.rb +390 -0
- data/lib/git/repository/stashing.rb +107 -0
- data/lib/git/repository/status_operations.rb +180 -0
- data/lib/git/repository/worktree_operations.rb +159 -0
- data/lib/git/repository.rb +264 -1
- data/lib/git/stash.rb +85 -4
- data/lib/git/stash_info.rb +104 -0
- data/lib/git/stashes.rb +130 -13
- data/lib/git/status.rb +224 -18
- data/lib/git/tag_delete_failure.rb +31 -0
- data/lib/git/tag_delete_result.rb +63 -0
- data/lib/git/tag_info.rb +105 -0
- data/lib/git/version.rb +109 -2
- data/lib/git/version_constraint.rb +81 -0
- data/lib/git/worktree.rb +120 -5
- data/lib/git/worktrees.rb +107 -7
- data/lib/git.rb +114 -18
- data/redesign/1_architecture_existing.md +54 -18
- data/redesign/2_architecture_redesign.md +365 -46
- data/redesign/3_architecture_implementation.md +1451 -54
- data/tasks/gem_tasks.rake +4 -0
- data/tasks/npm_tasks.rake +7 -0
- data/tasks/rspec.rake +48 -0
- data/tasks/test.rake +13 -1
- data/tasks/yard.rake +34 -7
- metadata +349 -20
- data/lib/git/index.rb +0 -6
- data/lib/git/path.rb +0 -38
- data/lib/git/working_directory.rb +0 -6
- /data/{release-please-config.json → .release-please-config.json} +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
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 there rather than into `Git::Lib`
|
|
40
|
+
|
|
41
|
+
## Input
|
|
42
|
+
|
|
43
|
+
The user provides the target `Git::Commands::*` class name and the git subcommand (or
|
|
44
|
+
subcommand + sub-action) it wraps. The agent gathers the following.
|
|
45
|
+
|
|
46
|
+
### Command source code
|
|
47
|
+
|
|
48
|
+
Read the command class from `lib/git/commands/{command}.rb` or, for subcommands,
|
|
49
|
+
`lib/git/commands/{command}/{subcommand}.rb`. For subcommands, also read the
|
|
50
|
+
namespace module at `lib/git/commands/{command}.rb` which lists all sibling
|
|
51
|
+
subcommands and provides the module-level documentation.
|
|
52
|
+
|
|
53
|
+
Skip this step when scaffolding a new command (the file does not exist yet).
|
|
54
|
+
|
|
55
|
+
### Command test code
|
|
56
|
+
|
|
57
|
+
Read unit tests matching `spec/unit/git/commands/{command}/**/*_spec.rb`. Use these as
|
|
58
|
+
supplemental evidence when tracing the verification chain (Ruby call → bound
|
|
59
|
+
argument → expected git CLI). Coverage completeness is assessed by the
|
|
60
|
+
[Command Test Conventions](../command-test-conventions/SKILL.md) skill.
|
|
61
|
+
|
|
62
|
+
Skip this step when scaffolding a new command (the file does not exist yet).
|
|
63
|
+
|
|
64
|
+
### Git documentation for the git command
|
|
65
|
+
|
|
66
|
+
- **Latest-version online command documentation**
|
|
67
|
+
|
|
68
|
+
Read the **entire** official git documentation online man page for the command
|
|
69
|
+
for the latest version of git. This version will be used as the primary
|
|
70
|
+
authority for DSL completeness, including the options to include in the
|
|
71
|
+
DSL, argument names, aliases, ordering, etc.
|
|
72
|
+
Fetch this version from the URL `https://git-scm.com/docs/git-{command}`
|
|
73
|
+
(this URL always serves the latest release).
|
|
74
|
+
|
|
75
|
+
- **Minimum-version online command documentation**
|
|
76
|
+
|
|
77
|
+
Read the **entire** official git documentation online man page for the command for
|
|
78
|
+
the `Git::MINIMUM_GIT_VERSION` version of git. This will be used only for
|
|
79
|
+
command-introduction and `requires_git_version` decisions. Fetch this version from
|
|
80
|
+
URL `https://git-scm.com/docs/git-{command}/{version}`.
|
|
81
|
+
|
|
82
|
+
Do **not** scaffold from local `git <command> -h` output — the installed Git
|
|
83
|
+
version is unknown and may differ from the latest supported version. Local help should
|
|
84
|
+
NOT be used even as a supplemental check.
|
|
85
|
+
|
|
86
|
+
## Reference
|
|
87
|
+
|
|
88
|
+
See [REFERENCE.md](REFERENCE.md) for the full reference covering:
|
|
89
|
+
|
|
90
|
+
- Files to generate
|
|
91
|
+
- Single class vs. sub-command namespace (when to split, naming, templates)
|
|
92
|
+
- Architecture contract and structural requirements
|
|
93
|
+
- Command template (Base pattern)
|
|
94
|
+
- `#call` override guidance (when to override, stdin feeding, action-option patterns)
|
|
95
|
+
- `Base#with_stdin` mechanics
|
|
96
|
+
- Options completeness (version conventions, execution-model conflicts)
|
|
97
|
+
- `end_of_options` placement rules
|
|
98
|
+
- Exit status guidance
|
|
99
|
+
- Facade delegation and policy options
|
|
100
|
+
- Internal compatibility contract
|
|
101
|
+
- Phased rollout requirements
|
|
102
|
+
- Common failures
|
|
103
|
+
|
|
104
|
+
Subagents load REFERENCE.md directly during the workflow steps that need it.
|
|
105
|
+
|
|
106
|
+
## Workflow
|
|
107
|
+
|
|
108
|
+
This skill supports three modes. Determine which mode applies before starting:
|
|
109
|
+
|
|
110
|
+
- **Scaffold** — creating a new command class from scratch. Follow all steps.
|
|
111
|
+
- **Update** — adding options to an existing command class: skip steps 2, 3a, 3b,
|
|
112
|
+
and 3c (the class and test files already exist). Start from step 1, then proceed
|
|
113
|
+
directly to 3d → 3e → 3f → 4 → 5.
|
|
114
|
+
- **Review** — auditing an existing command class for correctness (no changes).
|
|
115
|
+
Follow all steps but produce findings instead of code.
|
|
116
|
+
|
|
117
|
+
1. **Gather input** — collect the target class name and git subcommand from
|
|
118
|
+
the [Input](#input), then fetch the latest-version and minimum-version
|
|
119
|
+
git documentation per [Git documentation for the git
|
|
120
|
+
command](#git-documentation-for-the-git-command).
|
|
121
|
+
|
|
122
|
+
2. **Determine class structure** *(scaffold mode only)* — decide between a single
|
|
123
|
+
class and a sub-command namespace per [Single class vs. sub-command
|
|
124
|
+
namespace](REFERENCE.md#single-class-vs-sub-command-namespace).
|
|
125
|
+
|
|
126
|
+
3. **For each command / sub-command class**, repeat steps 3a–3f:
|
|
127
|
+
|
|
128
|
+
a. **Scaffold the command class (subagent)** *(scaffold mode only)* — delegate
|
|
129
|
+
to a subagent: load [REFERENCE.md](REFERENCE.md) and the
|
|
130
|
+
[YARD Documentation](../yard-documentation/SKILL.md) skill, then generate
|
|
131
|
+
`lib/git/commands/{command}.rb` using the [Command
|
|
132
|
+
template](REFERENCE.md#command-template-base-pattern). Populate the
|
|
133
|
+
`arguments do` block with all options from the latest-version docs per
|
|
134
|
+
[Options completeness](REFERENCE.md#options-completeness--consult-the-latest-version-docs-first),
|
|
135
|
+
applying the [Execution-model conflicts](REFERENCE.md#execution-model-conflicts),
|
|
136
|
+
[`end_of_options` placement](REFERENCE.md#end_of_options-placement), and
|
|
137
|
+
[Exit status guidance](REFERENCE.md#exit-status-guidance) rules. Pass the
|
|
138
|
+
fetched git documentation to the subagent.
|
|
139
|
+
|
|
140
|
+
Steps 3b and 3c may run **in parallel** (they produce independent files).
|
|
141
|
+
|
|
142
|
+
b. **Scaffold unit tests (subagent)** *(scaffold mode only)* — delegate to a
|
|
143
|
+
subagent: load **[Command Test
|
|
144
|
+
Conventions](../command-test-conventions/SKILL.md)** (which loads [RSpec Unit
|
|
145
|
+
Testing Standards](../rspec-unit-testing-standards/SKILL.md)), then generate
|
|
146
|
+
`spec/unit/git/commands/{command}_spec.rb` following the unit test
|
|
147
|
+
conventions. Fix all findings, then repeat the review until clean.
|
|
148
|
+
|
|
149
|
+
c. **Scaffold integration tests (subagent)** *(scaffold mode only)* — delegate
|
|
150
|
+
to a subagent: load **[Command Test
|
|
151
|
+
Conventions](../command-test-conventions/SKILL.md)**, then generate
|
|
152
|
+
`spec/integration/git/commands/{command}_spec.rb` following the integration
|
|
153
|
+
test conventions. Fix all findings, then repeat the review until clean.
|
|
154
|
+
|
|
155
|
+
d. **Review Arguments DSL (subagent)** — delegate to a subagent: load and
|
|
156
|
+
apply **[Review Arguments DSL](../review-arguments-dsl/SKILL.md)** (and its
|
|
157
|
+
[CHECKLIST.md](../review-arguments-dsl/CHECKLIST.md)) against the
|
|
158
|
+
`arguments do` block. Fix all findings, then repeat the review until clean.
|
|
159
|
+
**Complete this step before starting steps 3e–3f** — DSL corrections change
|
|
160
|
+
the CLI arguments that tests and YARD docs must reflect.
|
|
161
|
+
|
|
162
|
+
Steps 3e and 3f may run **in parallel** (they review independent file sets).
|
|
163
|
+
|
|
164
|
+
e. **Review Command Tests (subagent)** — delegate to a subagent: load and
|
|
165
|
+
apply **[Command Test Conventions](../command-test-conventions/SKILL.md)** against
|
|
166
|
+
the unit and integration spec files. Fix all findings, then repeat the
|
|
167
|
+
review until clean.
|
|
168
|
+
|
|
169
|
+
f. **Review YARD Documentation (subagent)** — delegate to a subagent: load
|
|
170
|
+
and apply **[Command YARD Documentation](../command-yard-documentation/SKILL.md)**
|
|
171
|
+
against the command class. Fix all findings, then repeat the review until
|
|
172
|
+
clean.
|
|
173
|
+
|
|
174
|
+
4. **Review class shape and declarations** — load
|
|
175
|
+
[REFERENCE.md](REFERENCE.md) and verify against the
|
|
176
|
+
[Architecture contract](REFERENCE.md#architecture-contract), [`#call` override
|
|
177
|
+
guidance](REFERENCE.md#call-override-guidance), [Exit status
|
|
178
|
+
guidance](REFERENCE.md#exit-status-guidance), [`requires_git_version`
|
|
179
|
+
convention](REFERENCE.md#requires_git_version-convention), [Internal compatibility
|
|
180
|
+
contract](REFERENCE.md#internal-compatibility-contract), and [Common
|
|
181
|
+
failures](REFERENCE.md#common-failures). Additionally:
|
|
182
|
+
|
|
183
|
+
- For **scaffold** and **update** modes: write or update the
|
|
184
|
+
`Git::Lib` method per [Facade delegation and policy
|
|
185
|
+
options](REFERENCE.md#facade-delegation-and-policy-options).
|
|
186
|
+
- For **migration PRs**: verify [Phased rollout
|
|
187
|
+
requirements](REFERENCE.md#phased-rollout-requirements).
|
|
188
|
+
|
|
189
|
+
5. **Run quality gates** — discover the prerequisite tasks for
|
|
190
|
+
`default:parallel` and run them sequentially, fixing failures before
|
|
191
|
+
advancing:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
bundle exec ruby -e "require 'rake'; load 'Rakefile'; puts Rake::Task['default:parallel'].prerequisites"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Run each listed task **individually** in order via `bundle exec rake <task>`
|
|
198
|
+
(one task per invocation — never combine multiple tasks in a single command).
|
|
199
|
+
On failure, fix the issue and re-run that same task. Once it passes, continue
|
|
200
|
+
to the next task. After all tasks pass, if any task required a fix during this
|
|
201
|
+
cycle, start a new cycle from the first task using the same one-at-a-time
|
|
202
|
+
approach. Keep cycling until every task passes on its first attempt with no
|
|
203
|
+
fixes needed.
|
|
204
|
+
|
|
205
|
+
## Output
|
|
206
|
+
|
|
207
|
+
For **scaffold** and **update** modes, produce:
|
|
208
|
+
|
|
209
|
+
1. **Command class** — `lib/git/commands/{command}.rb` (and optionally the namespace
|
|
210
|
+
module file for the first command in a namespace)
|
|
211
|
+
2. **Unit tests** — `spec/unit/git/commands/{command}_spec.rb`
|
|
212
|
+
3. **Integration tests** — `spec/integration/git/commands/{command}_spec.rb`
|
|
213
|
+
4. **Facade delegation** — updated `Git::Lib` method in `lib/git/lib.rb`
|
|
214
|
+
5. **All quality gates pass** — rspec, minitest, rubocop, and yard all green
|
|
215
|
+
|
|
216
|
+
For **review** mode, produce:
|
|
217
|
+
|
|
218
|
+
| Check | Status | Issue |
|
|
219
|
+
| --- | --- | --- |
|
|
220
|
+
| Base inheritance | Pass/Fail | ... |
|
|
221
|
+
| arguments DSL | Pass/Fail | ... |
|
|
222
|
+
| call shim | Pass/Fail | ... |
|
|
223
|
+
| allow_exit_status usage | Pass/Fail | ... |
|
|
224
|
+
| requires_git_version | Pass/Fail | ... |
|
|
225
|
+
| output parsing absent | Pass/Fail | ... |
|
|
226
|
+
| compatibility contract | Pass/Fail | ... |
|
|
227
|
+
|
|
228
|
+
Then list required fixes and indicate whether the migration slice is safe to merge
|
|
229
|
+
under phased-rollout rules.
|