fix: project_create — make GitHub mirror opt-in (mirror_to_github, default false) #17

Closed
opened 2026-05-18 21:44:16 +00:00 by mathias · 0 comments
Owner

Summary

project_create currently always creates a GitHub repo and configures a push mirror.
With the revised ADR (infra #34), GitHub mirror should be opt-in only.
Default behaviour: Gitea repo only.

Change

Add optional mirror_to_github parameter (default: false):

type ProjectArgs struct {
    Name            string `json:"name"`
    Description     string `json:"description"`
    Hypothesis      string `json:"hypothesis"`
    Folder          string `json:"folder"`
    Stack           string `json:"stack"`
    Private         bool   `json:"private"`
    MirrorToGitHub  bool   `json:"mirror_to_github,omitempty"` // default: false
}

When mirror_to_github: false (default):

  • Skip create_github_repo step
  • Skip mirror step
  • reached only contains: [create_repo, infra_commit, issue]
  • github_url is empty string in output

When mirror_to_github: true (explicit opt-in):

  • Full existing flow: create Gitea repo + GitHub repo + mirror + infra + issue

When to use mirror_to_github: true

Only for open source projects intended for public community:

  • hyperguild-style platform tools
  • template repos
  • Public experiments

Never for: client projects, business logic, infra, personal experiments.

Update tool descriptor

Document the parameter and default clearly in the tool description so claude.ai
sessions understand what they're opting into.

next_steps output

When mirror_to_github: false, next_steps should reflect Gitea-only workflow:

cd ~/dev/<folder>/<name>
git clone http://gitea.d-ma.be/mathias/<name>
cd <name>
# start Claude Code

Acceptance criteria

  • mirror_to_github param added with default false
  • When false: GitHub steps skipped, output reflects Gitea-only
  • When true: existing full flow unchanged
  • Tool descriptor updated
  • Tests cover both paths
  • Committed directly to main (TBD)
  • infra #34 (ADR: Gitea as true master)
  • hyperguild #11 (e2e test findings)
  • hyperguild #14 (infra branch vs main + SOPS)
## Summary `project_create` currently always creates a GitHub repo and configures a push mirror. With the revised ADR (infra #34), GitHub mirror should be opt-in only. Default behaviour: Gitea repo only. ## Change Add optional `mirror_to_github` parameter (default: false): ```go type ProjectArgs struct { Name string `json:"name"` Description string `json:"description"` Hypothesis string `json:"hypothesis"` Folder string `json:"folder"` Stack string `json:"stack"` Private bool `json:"private"` MirrorToGitHub bool `json:"mirror_to_github,omitempty"` // default: false } ``` When `mirror_to_github: false` (default): - Skip `create_github_repo` step - Skip `mirror` step - `reached` only contains: `[create_repo, infra_commit, issue]` - `github_url` is empty string in output When `mirror_to_github: true` (explicit opt-in): - Full existing flow: create Gitea repo + GitHub repo + mirror + infra + issue ## When to use mirror_to_github: true Only for open source projects intended for public community: - hyperguild-style platform tools - template repos - Public experiments Never for: client projects, business logic, infra, personal experiments. ## Update tool descriptor Document the parameter and default clearly in the tool description so claude.ai sessions understand what they're opting into. ## next_steps output When `mirror_to_github: false`, next_steps should reflect Gitea-only workflow: ``` cd ~/dev/<folder>/<name> git clone http://gitea.d-ma.be/mathias/<name> cd <name> # start Claude Code ``` ## Acceptance criteria - [ ] `mirror_to_github` param added with default false - [ ] When false: GitHub steps skipped, output reflects Gitea-only - [ ] When true: existing full flow unchanged - [ ] Tool descriptor updated - [ ] Tests cover both paths - [ ] Committed directly to main (TBD) ## Related - infra #34 (ADR: Gitea as true master) - hyperguild #11 (e2e test findings) - hyperguild #14 (infra branch vs main + SOPS)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/hyperguild#17