@seangalie/precast 0.0.0-stage → 0.1.0

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +202 -0
  3. package/README.md +217 -2
  4. package/dist/bin.d.ts +2 -0
  5. package/dist/bin.js +3 -0
  6. package/dist/cli.d.ts +1 -0
  7. package/dist/cli.js +140 -0
  8. package/dist/collect.d.ts +17 -0
  9. package/dist/collect.js +143 -0
  10. package/dist/context.d.ts +32 -0
  11. package/dist/context.js +159 -0
  12. package/dist/errors.d.ts +8 -0
  13. package/dist/errors.js +8 -0
  14. package/dist/fnmatch.d.ts +9 -0
  15. package/dist/fnmatch.js +110 -0
  16. package/dist/generate.d.ts +17 -0
  17. package/dist/generate.js +67 -0
  18. package/dist/index.d.ts +6 -0
  19. package/dist/index.js +6 -0
  20. package/dist/output-path.d.ts +30 -0
  21. package/dist/output-path.js +84 -0
  22. package/dist/platforms.d.ts +17 -0
  23. package/dist/platforms.js +62 -0
  24. package/dist/tiers.d.ts +23 -0
  25. package/dist/tiers.js +96 -0
  26. package/package.json +44 -4
  27. package/platforms/forgejo/files/.forgejo/CODEOWNERS.tmpl +2 -0
  28. package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/01_bug_report.yml.tmpl +83 -0
  29. package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/02_feature_request.yml.tmpl +57 -0
  30. package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/03_codebase_improvement.yml.tmpl +44 -0
  31. package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/04_support_question.yml.tmpl +47 -0
  32. package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/config.yml.tmpl +13 -0
  33. package/platforms/forgejo/files/.forgejo/PULL_REQUEST_TEMPLATE.md.tmpl +49 -0
  34. package/platforms/forgejo/files/.forgejo/SETUP.md.tmpl +61 -0
  35. package/platforms/forgejo/files/.forgejo/labels.yml.tmpl +99 -0
  36. package/platforms/forgejo/files/.forgejo/scripts/check-labels.sh.tmpl +91 -0
  37. package/platforms/forgejo/files/.forgejo/scripts/sync-labels.sh.tmpl +165 -0
  38. package/platforms/forgejo/files/.forgejo/workflows/labels.yml.tmpl +45 -0
  39. package/platforms/forgejo/files/.forgejo/workflows/lint.yml.tmpl +78 -0
  40. package/platforms/forgejo/files/.forgejo/workflows/pr-labels.yml.tmpl +51 -0
  41. package/platforms/forgejo/files/.forgejo/workflows/pre-commit.yml.tmpl +24 -0
  42. package/platforms/forgejo/files/.forgejo/workflows/release.yml.tmpl +130 -0
  43. package/platforms/forgejo/files/.forgejo/workflows/renovate.yml.tmpl +61 -0
  44. package/platforms/forgejo/files/.forgejo/workflows/stale.yml.tmpl +260 -0
  45. package/platforms/forgejo/files/renovate.json +36 -0
  46. package/platforms/forgejo/platform.json +41 -0
  47. package/platforms/github/files/.github/CODEOWNERS.tmpl +2 -0
  48. package/platforms/github/files/.github/ISSUE_TEMPLATE/01_bug_report.yml.tmpl +83 -0
  49. package/platforms/github/files/.github/ISSUE_TEMPLATE/02_feature_request.yml.tmpl +57 -0
  50. package/platforms/github/files/.github/ISSUE_TEMPLATE/03_codebase_improvement.yml.tmpl +44 -0
  51. package/platforms/github/files/.github/ISSUE_TEMPLATE/04_support_question.yml.tmpl +47 -0
  52. package/platforms/github/files/.github/ISSUE_TEMPLATE/config.yml.tmpl +16 -0
  53. package/platforms/github/files/.github/PULL_REQUEST_TEMPLATE.md.tmpl +49 -0
  54. package/platforms/github/files/.github/SETUP.md.tmpl +46 -0
  55. package/platforms/github/files/.github/dependabot.yml.tmpl +75 -0
  56. package/platforms/github/files/.github/labels.yml.tmpl +103 -0
  57. package/platforms/github/files/.github/release.yml.tmpl +47 -0
  58. package/platforms/github/files/.github/workflows/ci.yml.tmpl +55 -0
  59. package/platforms/github/files/.github/workflows/codeql.yml.tmpl +63 -0
  60. package/platforms/github/files/.github/workflows/labels.yml.tmpl +34 -0
  61. package/platforms/github/files/.github/workflows/lint-workflows.yml.tmpl +75 -0
  62. package/platforms/github/files/.github/workflows/lint.yml.tmpl +69 -0
  63. package/platforms/github/files/.github/workflows/lock.yml.tmpl +46 -0
  64. package/platforms/github/files/.github/workflows/pr-labels.yml.tmpl +26 -0
  65. package/platforms/github/files/.github/workflows/pre-commit.yml.tmpl +25 -0
  66. package/platforms/github/files/.github/workflows/release.yml.tmpl +101 -0
  67. package/platforms/github/files/.github/workflows/stale.yml.tmpl +57 -0
  68. package/platforms/github/platform.json +44 -0
  69. package/platforms/gitlab/files/.gitlab/CODEOWNERS.tmpl +2 -0
  70. package/platforms/gitlab/files/.gitlab/SETUP.md.tmpl +62 -0
  71. package/platforms/gitlab/files/.gitlab/issue_templates/01_bug_report.md +18 -0
  72. package/platforms/gitlab/files/.gitlab/issue_templates/02_feature_request.md +11 -0
  73. package/platforms/gitlab/files/.gitlab/issue_templates/03_codebase_improvement.md +11 -0
  74. package/platforms/gitlab/files/.gitlab/issue_templates/04_support_question.md +12 -0
  75. package/platforms/gitlab/files/.gitlab/labels.json +122 -0
  76. package/platforms/gitlab/files/.gitlab/merge_request_templates/Default.md +14 -0
  77. package/platforms/gitlab/files/.gitlab/scripts/project.py +159 -0
  78. package/platforms/gitlab/files/.gitlab-ci.yml.tmpl +54 -0
  79. package/platforms/gitlab/platform.json +34 -0
  80. package/template/.editorconfig.tmpl +54 -0
  81. package/template/.gitattributes +107 -0
  82. package/template/.gitignore.tmpl +244 -0
  83. package/template/.pre-commit-config.yaml.tmpl +43 -0
  84. package/template/.repo/check-secrets.py +40 -0
  85. package/template/.repo/ci-checks.sh +18 -0
  86. package/template/AGENTS.md.tmpl +75 -0
  87. package/template/CHANGELOG.md.tmpl +24 -0
  88. package/template/CLAUDE.md +1 -0
  89. package/template/LICENSE +202 -0
  90. package/template/README.md.tmpl +101 -0
  91. package/template/SETUP.md.tmpl +47 -0
  92. package/template/docs/CODE_OF_CONDUCT.md +85 -0
  93. package/template/docs/CONTRIBUTING.md.tmpl +54 -0
  94. package/template/docs/SECURITY.md.tmpl +26 -0
  95. package/template/docs/SUPPORT.md.tmpl +19 -0
  96. package/template/docs/logo.svg +84 -0
  97. package/template/docs/screenshot.png +0 -0
  98. package/tiers.json +10 -0
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env python3
2
+ """Scan exactly the files selected by pre-commit, including during --all-files."""
3
+
4
+ import os
5
+ import shutil
6
+ import subprocess
7
+ import sys
8
+ import tempfile
9
+ from pathlib import Path
10
+
11
+
12
+ def scan(filenames, root=None):
13
+ root = Path.cwd() if root is None else Path(root)
14
+ with tempfile.TemporaryDirectory(prefix="pre-commit-secrets-") as temporary:
15
+ snapshot = Path(temporary)
16
+ for filename in filenames:
17
+ relative = Path(filename)
18
+ if relative.is_absolute() or ".." in relative.parts:
19
+ raise ValueError(f"Expected a repository-relative filename: {filename}")
20
+ source = root / relative
21
+ destination = snapshot / relative
22
+ destination.parent.mkdir(parents=True, exist_ok=True)
23
+ if source.is_symlink():
24
+ # Git stores the link text, not the external target's contents.
25
+ destination.write_text(os.readlink(source))
26
+ else:
27
+ shutil.copyfile(source, destination)
28
+ command = ["gitleaks", "dir", "--redact", "--no-banner"]
29
+ for name, flag in ((".gitleaks.toml", "--config"), (".gitleaksignore", "--gitleaks-ignore-path")):
30
+ if (root / name).is_file():
31
+ command.extend([flag, str((root / name).resolve())])
32
+ return subprocess.run([*command, "."], cwd=snapshot, check=False).returncode
33
+
34
+
35
+ if __name__ == "__main__":
36
+ try:
37
+ sys.exit(scan(sys.argv[1:]))
38
+ except (OSError, ValueError) as error:
39
+ print(f"error: {error}", file=sys.stderr)
40
+ sys.exit(1)
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Keep hook tooling out of the project's runtime environment.
5
+ ci_tmp="$(mktemp -d)"
6
+ trap 'rm -rf "$ci_tmp"' EXIT
7
+ python3 -m venv "${ci_tmp}/venv"
8
+ # Callers can request additional tools, such as ShellCheck for actionlint's
9
+ # embedded shell checks. Generated CI only needs pre-commit itself here.
10
+ "${ci_tmp}/venv/bin/python" -m pip install --disable-pip-version-check --quiet \
11
+ pre-commit==4.7.0 "$@"
12
+ export PATH="${ci_tmp}/venv/bin:${PATH}"
13
+ export PRE_COMMIT_HOME="${PRE_COMMIT_HOME:-${ci_tmp}/pre-commit}"
14
+ # Docker steps can mount a checkout owned by the runner's host user. Trust only
15
+ # this checkout in a temporary Git configuration, leaving user settings untouched.
16
+ export GIT_CONFIG_GLOBAL="${ci_tmp}/gitconfig"
17
+ git config --global --add safe.directory "$(pwd -P)"
18
+ pre-commit run --all-files --show-diff-on-failure
@@ -0,0 +1,75 @@
1
+ # Working on @@PROJECT_NAME@@
2
+
3
+ @@TIERS slim@@
4
+ Project instructions for coding agents. Human contributors should read
5
+ [README.md](README.md). `CLAUDE.md` imports this file.
6
+ @@END_TIERS@@
7
+ @@TIERS regular full@@
8
+ Project instructions for coding agents. Human contributors should read
9
+ [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md). `CLAUDE.md` imports this file.
10
+ @@END_TIERS@@
11
+
12
+ ## Project overview
13
+
14
+ > **[?]**
15
+ > Describe the project, main languages and frameworks, and entry points.
16
+
17
+ ## Commands
18
+
19
+ > **[?]**
20
+ > Add exact install, build, test, single-test, lint, and format commands.
21
+ @@TIERS regular full@@
22
+ > Keep them consistent with `@@CI_FILE@@`.
23
+
24
+ - Automatic repository checks: `pre-commit run --all-files --show-diff-on-failure`.
25
+ - Markdown audit: `pre-commit run --hook-stage manual rumdl-check --all-files`.
26
+ - Install local hooks explicitly with `pre-commit install` after installing the
27
+ development tool. Generation never installs hooks or modifies Git settings.
28
+ @@END_TIERS@@
29
+
30
+ ## Layout
31
+
32
+ @@TIERS slim@@
33
+ - `docs/`: project images.
34
+ - `@@PLATFORM_DIR@@/`: @@PLATFORM_NAME@@ setup checklist.
35
+ @@END_TIERS@@
36
+ @@TIERS regular full@@
37
+ - `docs/`: contributing, security, support, and conduct policies and images.
38
+ - `@@PLATFORM_DIR@@/`: @@PLATFORM_NAME@@ repository configuration.
39
+ @@END_TIERS@@
40
+ - `CHANGELOG.md`: release notes in Keep a Changelog format.
41
+
42
+ > **[?]**
43
+ > Add source and test directories and identify generated files.
44
+
45
+ ## Conventions
46
+
47
+ - Follow `.editorconfig` and the project's existing code style.
48
+ - Use Conventional Commits and short branch names without type prefixes or slashes.
49
+ - Record user-visible changes under `## [Unreleased]` in `CHANGELOG.md`.
50
+ - Use Semantic Versioning and `v`-prefixed tags.
51
+ - @@AUTOMATION_NOTE@@
52
+ @@TIERS regular full@@
53
+ - @@CODEOWNERS_NOTE@@
54
+ @@END_TIERS@@
55
+
56
+ > **[?]**
57
+ > Add language versions, naming conventions, and error handling requirements.
58
+
59
+ ## Boundaries
60
+
61
+ - Never commit secrets, credentials, or `.env` files.
62
+ - Preserve unrelated working-tree and staged changes.
63
+ - Do not commit, push, merge, or rewrite history without explicit authorization.
64
+ - Leave the text of `LICENSE` unchanged.
65
+ - Exercise the actual implementation in tests. Do not weaken checks to make them pass.
66
+ - Report precisely which local, CI, and runtime checks passed or remain unverified.
67
+ @@TIERS slim@@
68
+ - Report security vulnerabilities privately, never in public issues.
69
+ @@END_TIERS@@
70
+ @@TIERS regular full@@
71
+ - Report security vulnerabilities privately; see `docs/SECURITY.md`.
72
+ @@END_TIERS@@
73
+
74
+ > **[?]**
75
+ > Add project-specific boundaries, such as schema migrations or public API changes.
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ I record notable changes to @@PROJECT_NAME@@ in this file, using
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ <!--
8
+ Use Added, Changed, Deprecated, Removed, Fixed, and Security headings as needed.
9
+ Before tagging vX.Y.Z, move the entries to ## [X.Y.Z] - YYYY-MM-DD and start
10
+ @@TIERS slim regular@@
11
+ a fresh Unreleased section.
12
+ @@END_TIERS@@
13
+ @@TIERS full@@
14
+ a fresh Unreleased section. The release automation uses that version's section.
15
+ @@END_TIERS@@
16
+ -->
17
+
18
+ ## [Unreleased]
19
+
20
+ ### Added
21
+
22
+ - Initial project scaffolding.
23
+
24
+ [unreleased]: @@HISTORY_URL@@
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,101 @@
1
+ <div align="center">
2
+
3
+ # @@PROJECT_NAME@@
4
+
5
+ @@DESCRIPTION@@
6
+
7
+ @@TIERS slim@@
8
+ [Report a bug](@@ISSUES_URL@@/new) · [Request a feature](@@ISSUES_URL@@/new) · [Get help](@@ISSUES_URL@@)
9
+ @@END_TIERS@@
10
+ @@TIERS regular full@@
11
+ [Report a bug](@@ISSUES_URL@@/new) · [Request a feature](@@ISSUES_URL@@/new) · [Get help](docs/SUPPORT.md)
12
+ @@END_TIERS@@
13
+
14
+ <img src="docs/logo.svg" alt="Project logo placeholder" width="640" height="360">
15
+
16
+ </div>
17
+
18
+ ## About
19
+
20
+ > **[?]**
21
+ > Describe what this project does, why I built it, and who it is for.
22
+
23
+ ### Screenshots
24
+
25
+ > **[?]**
26
+ > Replace `docs/screenshot.png` and add a screenshot here, or remove this section.
27
+
28
+ ### Built with
29
+
30
+ > **[?]**
31
+ > List the main languages, frameworks, and services.
32
+
33
+ ## Getting started
34
+
35
+ ### Prerequisites
36
+
37
+ > **[?]**
38
+ > List the supported platforms and required tools and versions.
39
+
40
+ ### Installation
41
+
42
+ > **[?]**
43
+ > Give the commands needed to install and run the project.
44
+
45
+ ## Usage
46
+
47
+ > **[?]**
48
+ > Show the main use cases with examples.
49
+
50
+ ## Roadmap
51
+
52
+ I track planned work and known bugs in the [issue tracker](@@ISSUES_URL@@).
53
+
54
+ ## Changelog
55
+
56
+ I record notable changes in [CHANGELOG.md](CHANGELOG.md).
57
+
58
+ ## Support
59
+
60
+ @@TIERS slim@@
61
+ Search the [issue tracker](@@ISSUES_URL@@) or open a new issue for help.
62
+ @@END_TIERS@@
63
+ @@TIERS regular full@@
64
+ See [the support guide](docs/SUPPORT.md) for help and reporting instructions.
65
+ @@END_TIERS@@
66
+
67
+ ## Contributing
68
+
69
+ @@TIERS slim@@
70
+ Please open an issue to discuss a change before sending one.
71
+ @@END_TIERS@@
72
+ @@TIERS regular full@@
73
+ Read [the contributing guide](docs/CONTRIBUTING.md) and
74
+ [code of conduct](docs/CODE_OF_CONDUCT.md) before contributing.
75
+ @@END_TIERS@@
76
+
77
+ ## Author and contributors
78
+
79
+ I maintain this project as [@@AUTHOR@@](@@NAMESPACE_URL@@).
80
+ See the [contributors](@@CONTRIBUTORS_URL@@) for the full history.
81
+
82
+ ## Security
83
+
84
+ @@TIERS slim@@
85
+ Please do not report vulnerabilities in public issues.
86
+
87
+ > **[?]**
88
+ > Give a private reporting address before publishing this project.
89
+ @@END_TIERS@@
90
+ @@TIERS regular full@@
91
+ Please report vulnerabilities privately as described in [the security policy](docs/SECURITY.md).
92
+ @@END_TIERS@@
93
+
94
+ ## License
95
+
96
+ This project uses the [Apache License 2.0](LICENSE).
97
+
98
+ ## Acknowledgements
99
+
100
+ > **[?]**
101
+ > Credit funding, related projects, and other contributions, or remove this section.
@@ -0,0 +1,47 @@
1
+ # Repository setup
2
+
3
+ I generated this repository for @@PLATFORM_NAME@@ at @@REPO_URL@@.
4
+ Generation changed local files only. It did not create a remote repository,
5
+ apply labels, enable features, configure protections, or run destination CI.
6
+
7
+ ## Content
8
+
9
+ - [ ] Fill in all `[?]` prompts in `README.md` and remove sections that do not apply.
10
+ - [ ] Replace `docs/logo.svg` and `docs/screenshot.png`.
11
+ - [ ] Fill in the overview, commands, layout, conventions, and boundaries in `AGENTS.md`.
12
+ @@TIERS regular full@@
13
+ - [ ] Fill in the development steps in `docs/CONTRIBUTING.md`.
14
+ - [ ] Set a private reporting address and supported versions in `docs/SECURITY.md`.
15
+ - [ ] Replace both `[NOTE: ...]` prompts in `docs/CODE_OF_CONDUCT.md`.
16
+ @@END_TIERS@@
17
+ - [ ] Review `CHANGELOG.md`, `.editorconfig`, `.gitignore`, and `.gitattributes`.
18
+ - [ ] Add my copyright notice in source headers or a `NOTICE` file, leaving `LICENSE` unchanged.
19
+
20
+ ## Destination
21
+
22
+ - [ ] Create an empty destination repository with the intended visibility at @@REPO_URL@@.
23
+ - [ ] Initialize this directory with Git and set the default branch to `@@DEFAULT_BRANCH@@`.
24
+ @@TIERS regular full@@
25
+ - [ ] Install pre-commit as a development tool, review `.pre-commit-config.yaml`,
26
+ then run `pre-commit install` and `pre-commit run --all-files`. Hook environments
27
+ need network access on the first run; generation itself remains offline.
28
+ - [ ] Confirm CI can run `.repo/ci-checks.sh`: Git, Bash, Python with pip/venv,
29
+ and access to the pinned hook/tool sources are required. Hook runtimes are managed
30
+ by pre-commit; no separately installed Go toolchain is required.
31
+ @@END_TIERS@@
32
+ - [ ] Review every file before committing and pushing. No master-template Git history is included.
33
+ - [ ] Set the description, topics, and access permissions on the destination.
34
+ @@TIERS regular full@@
35
+ - [ ] Review `@@PLATFORM_DIR@@/CODEOWNERS`; no owner is inferred from a group namespace.
36
+ @@END_TIERS@@
37
+ @@TIERS full@@
38
+ - [ ] @@LABEL_NOTE@@
39
+ @@END_TIERS@@
40
+ @@TIERS regular full@@
41
+ - [ ] Replace or extend `@@CI_FILE@@` with the project's real build and test commands.
42
+ - [ ] Confirm CI works before making checks required in branch protections.
43
+ @@END_TIERS@@
44
+ @@TIERS full@@
45
+ - [ ] @@EXTRA_SETUP@@
46
+ @@END_TIERS@@
47
+ - [ ] Complete `@@PLATFORM_DIR@@/SETUP.md`, then remove both checklists when finished.
@@ -0,0 +1,85 @@
1
+ # Contributor Covenant 3.0 Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We pledge to make our community welcoming, safe, and equitable for all.
6
+
7
+ We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
8
+
9
+ ## Encouraged Behaviors
10
+
11
+ While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
12
+
13
+ With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
14
+
15
+ 1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
16
+ 2. Engaging **kindly and honestly** with others.
17
+ 3. Respecting **different viewpoints** and experiences.
18
+ 4. **Taking responsibility** for our actions and contributions.
19
+ 5. Gracefully giving and accepting **constructive feedback**.
20
+ 6. Committing to **repairing harm** when it occurs.
21
+ 7. Behaving in other ways that promote and sustain the **well-being of our community**.
22
+
23
+ ## Restricted Behaviors
24
+
25
+ We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
26
+
27
+ 1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
28
+ 2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
29
+ 3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
30
+ 4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
31
+ 5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
32
+ 6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
33
+ 7. Behaving in other ways that **threaten the well-being** of our community.
34
+
35
+ ### Other Restrictions
36
+
37
+ 1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
38
+ 2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
39
+ 3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
40
+ 4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
41
+
42
+ ## Reporting an Issue
43
+
44
+ Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
45
+
46
+ When an incident does occur, it is important to report it promptly. To report a possible violation, **[NOTE: describe your means of reporting here.]**
47
+
48
+ Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
49
+
50
+ ## Addressing and Repairing Harm
51
+
52
+ **[NOTE: The remedies and repairs outlined below are suggestions based on best practices in code of conduct enforcement. If your community has its own established enforcement process, be sure to edit this section to describe your own policies.]**
53
+
54
+ If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
55
+
56
+ 1) Warning
57
+ 1) Event: A violation involving a single incident or series of incidents.
58
+ 2) Consequence: A private, written warning from the Community Moderators.
59
+ 3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
60
+ 2) Temporarily Limited Activities
61
+ 1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
62
+ 2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
63
+ 3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
64
+ 3) Temporary Suspension
65
+ 1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
66
+ 2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
67
+ 3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
68
+ 4) Permanent Ban
69
+ 1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
70
+ 2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
71
+ 3) Repair: There is no possible repair in cases of this severity.
72
+
73
+ This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
74
+
75
+ ## Scope
76
+
77
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
78
+
79
+ ## Attribution
80
+
81
+ This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
82
+
83
+ Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
84
+
85
+ For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
@@ -0,0 +1,54 @@
1
+ # Contributing
2
+
3
+ Please discuss substantial changes in the [issue tracker](@@ISSUES_URL@@) before
4
+ starting work, and follow the [code of conduct](CODE_OF_CONDUCT.md).
5
+
6
+ ## Development environment
7
+
8
+ Clone [the repository](@@REPO_URL@@), then follow these steps:
9
+
10
+ > **[?]**
11
+ > Add exact dependency installation, build, test, single-test, and lint commands.
12
+ > Keep them consistent with `AGENTS.md` and `@@CI_FILE@@`.
13
+
14
+ For the shared development checks, install pre-commit in your development environment,
15
+ then explicitly install the local hook:
16
+
17
+ ```sh
18
+ pre-commit install
19
+ pre-commit run --all-files --show-diff-on-failure
20
+ ```
21
+
22
+ The first run downloads pinned hook sources and their managed runtimes. The hooks
23
+ check conflicts, file types, case collisions, file size, secrets, EditorConfig,
24
+ shell scripts, and native Actions workflows where applicable. Markdown lint is
25
+ an optional audit: `pre-commit run --hook-stage manual rumdl-check --all-files`.
26
+ CI runs the automatic checks through `.repo/ci-checks.sh` and native lint jobs.
27
+ Forgejo/GitHub skip only the hooks already covered by their pinned native jobs;
28
+ local hooks still run the complete set.
29
+
30
+ ## Reporting issues
31
+
32
+ Search existing issues before opening a new report. Include the affected version,
33
+ environment, reproduction steps, expected result, and actual result.
34
+ Use the appropriate bug, feature, improvement, or support template.
35
+
36
+ Report vulnerabilities privately using the [security policy](SECURITY.md).
37
+
38
+ ## Proposing changes
39
+
40
+ 1. Create a short branch, such as `improve-export`, with at most three hyphen-separated words.
41
+ 2. Make a focused change and exercise the actual implementation in tests.
42
+ 3. Use Conventional Commits, such as `fix: handle empty input`.
43
+ 4. Record user-visible changes under `## [Unreleased]` in `CHANGELOG.md`.
44
+ 5. Open a [change request](@@CHANGES_URL@@) using the repository template.
45
+ @@TIERS full@@
46
+
47
+ For Forgejo and GitHub, **A label is required.** Add a label saying what kind of
48
+ change it is, such as `bugfix`, `new-feature`, or `documentation`.
49
+ The platform's PR Labels workflow lists all accepted labels. A maintainer can
50
+ apply the label if you cannot. GitLab label policy is configured in project settings.
51
+ @@END_TIERS@@
52
+
53
+ Follow `.editorconfig` and keep lint and tests passing. Describe what you changed,
54
+ why, and which checks you ran. Contributions use the project's [license](../LICENSE).