-
Notifications
You must be signed in to change notification settings - Fork 1
docs: document GitHub template workflow #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
michaelmwu
wants to merge
1
commit into
main
Choose a base branch
from
michaelmwu/template-repo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+162
−13
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # GitHub Template Usage | ||
|
|
||
| 508 Devkit is marked as a GitHub template repository, but it is still a | ||
| pick-and-choose reference repo. GitHub templates copy the default-branch file | ||
| tree into a new repository. That generated repository should be treated as a | ||
| bootstrap workspace, not as the final project shape. | ||
|
|
||
| ## Intended Flow | ||
|
|
||
| 1. Create a new repository from the GitHub `Use this template` button. | ||
| 2. Make the first project PR a template selection pass. | ||
| 3. Keep the root hygiene files that apply to most software repos. | ||
| 4. Select only the language stacks and extras that match the project. | ||
| 5. Delete unselected examples, placeholder workflows, and docs that no longer | ||
| describe the project. | ||
| 6. Rename package names, env defaults, service names, and documentation from | ||
| devkit examples to the real product. | ||
| 7. Run the narrowest relevant checks before building product features. | ||
|
|
||
| The selection pass is part of using the template. Do not start feature work | ||
| while the repository still contains irrelevant stacks or optional extras. | ||
|
|
||
| ## Keep By Default | ||
|
|
||
| These files are broadly useful for most generated repos, with project-specific | ||
| edits: | ||
|
|
||
| - `AGENTS.md`, `CLAUDE.md`, and `.cursor/rules/`. | ||
| - `README.md`, `CONTRIBUTING.md`, `SECURITY.md`, and the docs that still match | ||
| the project. | ||
| - `scripts/` entrypoints for lint, typecheck, test, dev, Compose, and worktree | ||
| ports. | ||
| - `.env.example`, `.gitignore`, `.dockerignore`, `.editorconfig`, and | ||
| `.worktreeinclude`. | ||
| - `.github/` PR and issue templates when the project uses GitHub. | ||
|
|
||
| ## Select Explicitly | ||
|
|
||
| Keep these only when they fit the project: | ||
|
|
||
| - `stacks/typescript/` for JavaScript or TypeScript projects. | ||
| - `stacks/typescript/pnpm/` when pnpm is the chosen JavaScript package manager. | ||
| - `stacks/python/` for Python APIs, workers, packages, or tools. | ||
| - `stacks/ruby/` for Ruby, Rails, or Rack projects. | ||
| - `compose.yml` and `docker-compose.yml` only for the local infrastructure the | ||
| project actually needs. | ||
| - `extras/` directories only after confirming the workflow, owners, secrets, | ||
| permissions, and deployment needs. | ||
| - `skills/` only when the target repo wants to ship project-local agent skills. | ||
|
|
||
| ## Remove Or Rewrite | ||
|
|
||
| Before calling the generated repo ready, remove or rewrite: | ||
|
|
||
| - Unused language stacks. | ||
| - Example app/package names such as `508-devkit`, `example_api`, and | ||
| `example_shared`. | ||
| - Optional GitHub extras with placeholder owners or extra permissions. | ||
| - Docs that describe template design history instead of the generated project. | ||
| - Databases, caches, object storage, observability, or LLM env vars that the | ||
| project does not use. | ||
|
|
||
| ## Agent Prompt | ||
|
|
||
| Use this prompt immediately after creating a repository from the template: | ||
|
|
||
| ```text | ||
| This repository was generated from 508 Devkit. Do a template selection pass: | ||
| inspect the product goal and existing files, keep only the root hygiene, stacks, | ||
| extras, docs, and workflows that fit this project, delete the rest, rename all | ||
| devkit/example identifiers, and run the narrowest relevant checks. | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include “workflows” in the template-cleanup step for consistency.
Step 6 omits workflows, but the template-selection flow in
docs/github-template.mdexplicitly includes deleting unselected placeholder workflows. This mismatch can cause generated repos to keep irrelevant CI files.Suggested wording update
📝 Committable suggestion
🤖 Prompt for AI Agents