The constructor already accepts tmplOwner and tmplName as parameters — good design — but the template choice is baked into the binary at startup. There is no way to create an agent project (template-go-agent) without modifying the code.
Required for
hyperguild new-project needs to select template at call time:
go-web → template-go-web
go-agent → template-go-agent
Future: go-ml, go-service, etc.
Fix
Add a template_name parameter to the tool's input schema:
// InputSchema addition"template_name":{"type":"string","enum":["template-go-web","template-go-agent"],"description":"Template repo name to generate from. Defaults to template-go-web.","default":"template-go-web"}
The tool resolves the template owner from config (stays mathias), but template name comes from the call argument. Default to template-go-web for backwards compatibility.
Alternatively: make template_owner and template_name both configurable via env vars (TEMPLATE_OWNER, TEMPLATE_NAME) with the current hardcoded values as defaults, and the tool input schema overrides at call time.
Recommended: input schema approach — more flexible, no restart needed to switch templates.
Defaults to template-go-web if not specified (backwards compatible)
template-go-agent works when specified (requires that repo to have content first — see local-dev #5)
main.go no longer hardcodes template name
Existing tests pass; new test covers template_name=template-go-agent
Related
local-dev #5: add go-agent stack to new-project.sh (template-go-agent must be populated first)
hyperguild #10: project-webhook composite tool (calls this tool)
## Problem
`create_project_from_template` is hardcoded to use `template-go-web` as the template source in `cmd/gitea-mcp/main.go`:
```go
tools.NewCreateProjectFromTemplate(giteaClient, ownerAllow, "mathias", "template-go-web")
```
The constructor already accepts `tmplOwner` and `tmplName` as parameters — good design — but the template choice is baked into the binary at startup. There is no way to create an agent project (`template-go-agent`) without modifying the code.
## Required for
`hyperguild new-project` needs to select template at call time:
- `go-web` → `template-go-web`
- `go-agent` → `template-go-agent`
- Future: `go-ml`, `go-service`, etc.
## Fix
Add a `template_name` parameter to the tool's input schema:
```go
// InputSchema addition
"template_name": {
"type": "string",
"enum": ["template-go-web", "template-go-agent"],
"description": "Template repo name to generate from. Defaults to template-go-web.",
"default": "template-go-web"
}
```
The tool resolves the template owner from config (stays `mathias`), but template name comes from the call argument. Default to `template-go-web` for backwards compatibility.
Alternatively: make `template_owner` and `template_name` both configurable via env vars (`TEMPLATE_OWNER`, `TEMPLATE_NAME`) with the current hardcoded values as defaults, and the tool input schema overrides at call time.
**Recommended: input schema approach** — more flexible, no restart needed to switch templates.
## Acceptance criteria
- [ ] `create_project_from_template` accepts optional `template_name` param
- [ ] Defaults to `template-go-web` if not specified (backwards compatible)
- [ ] `template-go-agent` works when specified (requires that repo to have content first — see local-dev #5)
- [ ] `main.go` no longer hardcodes template name
- [ ] Existing tests pass; new test covers `template_name=template-go-agent`
## Related
- local-dev #5: add go-agent stack to new-project.sh (template-go-agent must be populated first)
- hyperguild #10: project-webhook composite tool (calls this tool)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
create_project_from_templateis hardcoded to usetemplate-go-webas the template source incmd/gitea-mcp/main.go:The constructor already accepts
tmplOwnerandtmplNameas parameters — good design — but the template choice is baked into the binary at startup. There is no way to create an agent project (template-go-agent) without modifying the code.Required for
hyperguild new-projectneeds to select template at call time:go-web→template-go-webgo-agent→template-go-agentgo-ml,go-service, etc.Fix
Add a
template_nameparameter to the tool's input schema:The tool resolves the template owner from config (stays
mathias), but template name comes from the call argument. Default totemplate-go-webfor backwards compatibility.Alternatively: make
template_ownerandtemplate_nameboth configurable via env vars (TEMPLATE_OWNER,TEMPLATE_NAME) with the current hardcoded values as defaults, and the tool input schema overrides at call time.Recommended: input schema approach — more flexible, no restart needed to switch templates.
Acceptance criteria
create_project_from_templateaccepts optionaltemplate_nameparamtemplate-go-webif not specified (backwards compatible)template-go-agentworks when specified (requires that repo to have content first — see local-dev #5)main.gono longer hardcodes template nametemplate_name=template-go-agentRelated