docs: put the docs-drift rule where a contributor reads it
Task 4.4's obligation was to state the risk the docs split opens, and the first pass met it in the two places that publish rather than the two that govern: both READMEs. The core README's copy sits in "Docs & development", a section a user reads and a contributor about to rename a decorator does not. AGENTS.md and CONTRIBUTING.md both already carried "New public API needs a note in README.md". Both were written before the split and neither was updated for it, so the two documents actually read mid-change said nothing about the new repository — the rule existed everywhere except where it applies. Both now name green-tea-docs and carry the reason, because a rule without one is the first thing dropped when a change is nearly finished. #18 is that reason, and it happened while the two still lived in the same repository. Neither automated option was built, and the plan now records which is worth building and why: a link check against the published package targets #18's real failure mode — a page naming a decorator, a createApp option or a method that no longer exists — and needs only the identifiers in the pages' code blocks compared against the package's exports. It catches lies rather than staleness. A docs job triggered from core releases is weaker: it fires after the API has already shipped. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+10
-2
No files matched your search
+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`.
|
||||
- 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.
|
||||
- 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