Background
Today Pull-SDLC.ai.ps1 exposes a -SetupGitHubSsh switch (added in #164) that:
- Generates an ed25519 SSH keypair and configures
ssh-agent.
- Writes three global
url.insteadOf rewrites so all GitHub traffic is silently forced through ssh.github.com:443.
- Sets
gh config git_protocol = ssh.
- Uploads the public key to GitHub.
Per follow-up discussion to #169, this is wrong on two axes:
- The protocol is not the script's business. Whether a developer uses HTTPS, SSH-22, or SSH-443 is a per-machine / per-user choice and should not be touched by an instructions-sync script.
- GitHub-specific framing is too narrow. The pieces a fresh repo actually wants pre-configured are
.gitignore and .gitattributes -- git configuration, not GitHub configuration.
Proposed direction
Replace -SetupGitHubSsh with -SetupGit (or similar). Scope:
- Configure
.gitignore (already partially handled via the first-sync scaffolding -- decide whether -SetupGit re-runs that on demand or duplicates).
- Configure
.gitattributes (recently removed in commit f7d1f13 -- decide whether it returns under this switch, and if so what content).
- Do not touch SSH keys,
ssh-agent, url.insteadOf, or gh git_protocol.
Open design questions
- Naming:
-SetupGit vs. -Init vs. -Bootstrap vs. another.
.gitattributes reintroduction: should this switch re-create it? Under what name (.gitattributes directly, or .gitattributes.template like before)? With what content?
.gitignore overlap: today the script scaffolds .gitignore on first sync via union-merge from upstream. Does -SetupGit re-run that, or is it strictly for additional config not handled by the existing first-sync flow?
- Removal of
-SetupGitHubSsh: delete outright (breaking), or keep as a deprecated alias for one release that prints a deprecation warning before doing nothing?
- Idempotency contract: same
[skip]/[add]/[del] line format as today?
Acceptance criteria (placeholder until design questions resolve)
-SetupGit configures repo-level git scaffolding only -- no SSH, no global git config, no gh config mutations.
-SetupGitHubSsh is removed or deprecated per decision on Q4.
Invoke-SetupGitHubSsh and supporting helpers (Get-GitHubSshKeyPath, Test-GitHubSshAgentRunning, Get-GhGitProtocol, etc.) are removed unless still referenced.
- Tests updated to match.
Related
Background
Today
Pull-SDLC.ai.ps1exposes a-SetupGitHubSshswitch (added in #164) that:ssh-agent.url.insteadOfrewrites so all GitHub traffic is silently forced throughssh.github.com:443.gh config git_protocol = ssh.Per follow-up discussion to #169, this is wrong on two axes:
.gitignoreand.gitattributes-- git configuration, not GitHub configuration.Proposed direction
Replace
-SetupGitHubSshwith-SetupGit(or similar). Scope:.gitignore(already partially handled via the first-sync scaffolding -- decide whether-SetupGitre-runs that on demand or duplicates)..gitattributes(recently removed in commitf7d1f13-- decide whether it returns under this switch, and if so what content).ssh-agent,url.insteadOf, orgh git_protocol.Open design questions
-SetupGitvs.-Initvs.-Bootstrapvs. another..gitattributesreintroduction: should this switch re-create it? Under what name (.gitattributesdirectly, or.gitattributes.templatelike before)? With what content?.gitignoreoverlap: today the script scaffolds.gitignoreon first sync via union-merge from upstream. Does-SetupGitre-run that, or is it strictly for additional config not handled by the existing first-sync flow?-SetupGitHubSsh: delete outright (breaking), or keep as a deprecated alias for one release that prints a deprecation warning before doing nothing?[skip]/[add]/[del]line format as today?Acceptance criteria (placeholder until design questions resolve)
-SetupGitconfigures repo-level git scaffolding only -- no SSH, no globalgit config, nogh configmutations.-SetupGitHubSshis removed or deprecated per decision on Q4.Invoke-SetupGitHubSshand supporting helpers (Get-GitHubSshKeyPath,Test-GitHubSshAgentRunning,Get-GhGitProtocol, etc.) are removed unless still referenced.Related
-SetupGitHubSshand the drift nudge.