docs: make the docs rule followable by the people it addresses
Two problems with the rule added earlier today, both found by asking what it means for the beta rather than whether to automate it. green-tea is public and green-tea-docs was private, so CONTRIBUTING.md — read by external contributors — pointed them at a repository that answered 404 and asked them to change a page they could not see. The repository is now public, which is what makes the rule possible at all; nothing in it was ever private, since the history came from this repository's own website/ directory. And "in the same pull request" cannot be done: a pull request does not span two repositories. It is a companion pull request, linked to the first, and both documents now say so. Added the escape hatch the rule was missing. A contributor who does not want to write the docs change can say so and a maintainer writes it — what this line exists to prevent is an API change nobody mentions, not an unwritten page, and a rule with no honest way out gets ignored rather than followed. Neither the automation decision nor the accepted risk changes. The link check stays rejected on the measurement recorded in the trust-release plan. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -80,4 +80,4 @@ GitHub does not run workflows on fork pull requests until a maintainer approves
|
||||
- Comments carry reasoning the code cannot show. When editing a block, keep them; if one explains an ordering or a version floor, it is load-bearing.
|
||||
- A new option or method on a public interface has to change `src/app/types.ts` too. An implementation that grows a parameter alone is unreachable for anyone consuming the package.
|
||||
- Behaviour that differs between runtimes must be explicit. An "unavailable here" is fine; silently accepting an option that does nothing is a bug.
|
||||
- New public API needs a note in `README.md` **and a matching change in the documentation repository**, [green-tea-docs](https://github.com/Expressive-Tea/green-tea-docs). Since the split, nothing here imports those pages and nothing fails when they disagree with this code — the CI job that used to build them is gone. That makes this the only thing standing between a rename and a guide that quietly documents a version nobody can install.
|
||||
- New public API needs a note in `README.md` **and a companion pull request to the documentation repository**, [green-tea-docs](https://github.com/Expressive-Tea/green-tea-docs) — separate, because a pull request cannot span two repositories. Since the split, nothing here imports those pages and nothing fails when they disagree with this code — the CI job that used to build them is gone. That makes this the only thing standing between a rename and a guide that quietly documents a version nobody can install.
|
||||
+1
-1
@@ -148,7 +148,7 @@ npm run build
|
||||
- `complexity:check` caps the cognitive complexity of every function in `src/`. What it measures is how much you have to hold in your head to follow a function from top to bottom, and it charges nesting more heavily than branching: a condition inside a closure inside a function costs several times what the same condition costs at the top level. Going over the threshold is not a verdict on your code — it means one function has grown to ask too much of whoever reads it next. The fix is nearly always to lift a nested closure out to module scope, where its branches are charged once instead of three times over. Raising `COMPLEXITY_MAX` is not the fix, even though the script suggests it.
|
||||
- Keep runtime dependencies at zero beyond `reflect-metadata`.
|
||||
- A new option or method on a public interface has to change that interface too. An implementation that grows a parameter without `src/app/types.ts` growing it as well is unreachable for anyone consuming the package.
|
||||
- New public API needs a doc note in `README.md`, **and the page that documents it in [green-tea-docs](https://github.com/Expressive-Tea/green-tea-docs) updated in the same pull request.** The documentation site used to be built by this repository's CI, so a stale page broke the build; it is now a separate repository that imports nothing from here, and nothing fails when the two disagree. Issue #18 happened when the two still lived together, which is the reason this line exists rather than a hope.
|
||||
- New public API needs a doc note in `README.md`, **and a companion pull request to [green-tea-docs](https://github.com/Expressive-Tea/green-tea-docs) updating the page that documents it.** It is a second pull request because a pull request cannot span two repositories — link the two to each other so a reviewer can see both. The documentation site used to be built by this repository's CI, so a stale page broke the build; it is now a separate repository that imports nothing from here, and nothing fails when the two disagree. Issue #18 happened when the two still lived together, which is the reason this line exists rather than a hope. If you would rather not write the docs change, say so in your pull request and a maintainer will — an unmentioned API change is the failure this line exists to prevent, not an unwritten page.
|
||||
- If your change only works on one runtime, say so in the pull request. green-tea runs on Node, Deno, Bun and the edge, and behavior that quietly differs between them is treated as a bug — an explicit "not available here" is fine, silence is not.
|
||||
|
||||
On GitHub, workflows do not run on pull requests from forks until a maintainer approves them, so your first push may sit without any checks for a while. That is not a rejection.
|
||||
|
||||
Reference in new issue
Block a user