You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 75e95f1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: BOOKPLAN.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
>
19
19
> One entry under [Rendering gotchas](#build-environment) has stopped applying and is the one most likely to be acted on: **"PowerShell cannot invoke `npx` directly" no longer affects `book.bat`.** That batch file calls `node`, not `npx`, and a `.bat` is interpreted by `cmd.exe` whichever shell launches it — so no `.ps1` shim is reached and the execution policy is never consulted. The paged.js and CSS Paged Media gotchas above it still hold; the forked bundle lives at `book/lib/paged.browser.js`.
20
20
>
21
-
> **Current documentation.** The two-stage pipeline, the renderer's flags and phases, and how to triage a failed render are on the site: [PDF Generation](docs/Documentation/PDF-Generation.md) and [Book Configuration](docs/Documentation/Book-Configuration.md), with the vendored-library patches in [Fixes-PagedJS.md](docs/Documentation/Fixes-PagedJS.md) and [Fixes-PDFLib.md](docs/Documentation/Fixes-PDFLib.md). The Phase 8 specification is [builder/PLAN-8.md](builder/PLAN-8.md), and the Jekyll era as a whole is recorded in [WIP.OldJekyll.md](WIP.OldJekyll.md).
21
+
> **Current documentation.** The two-stage pipeline, the renderer's flags and phases, and how to triage a failed render are on the site: [PDF Generation](docs/Documentation/PDF-Generation.md) and [Book Configuration](docs/Documentation/Book-Configuration.md), with the vendored-library patches in [Fixes-PagedJS.md](docs/Documentation/Fixes-PagedJS.md) and [Fixes-PDFLib.md](docs/Documentation/Fixes-PDFLib.md). The Phase 8 specification is [builder/PLAN-8.md](builder/PLAN-8.md).
22
22
23
23
Currently `book.bat` produces a ~1500-page PDF that is a flat concatenation of every reference page. It works, but it doesn't read like a book — no front matter, no parts, no global TOC, every chapter is `<h1>`, and "See Also" cross-references point at standalone `file://` URLs rather than jumping within the PDF.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ book.bat # renders the PDF book; run build.bat first
32
32
examples.bat # compiles the twinBASIC code samples in the pages (Windows + a twinBASIC install)
33
33
addin-test.bat # tests IDE add-ins by operating an IDE (Windows + a twinBASIC install)
34
34
ide-test.bat # tests the IDE itself by operating it (Windows + a twinBASIC install)
35
+
try-help-addin.bat # opens an IDE with the help add-in, to try it by hand (Windows + a twinBASIC install)
35
36
```
36
37
37
38
A clean `build.bat && check.bat` is the bar for "ready to commit"; add `test.bat` when the change touched anything outside `docs/`. Each wrapper names the gates it runs, in order, on [Tools and Scripts](https://docs.twinbasic.com/Documentation/Development/Tools). On Linux or macOS, run the `node` command inside each batch file directly --- they are thin wrappers. `examples.bat`, `addin-test.bat` and `ide-test.bat` are the exceptions to both: they drive the twinBASIC IDE, so they are Windows-only and deliberately outside every gate and outside CI.
Copy file name to clipboardExpand all lines: WIP.Assert.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,6 @@ The 15 members per module (identical signatures across all three):
32
32
|`SequenceEquals(Expected, Actual, [FailMessage])`| element-by-element comparison of two sequences / arrays |
33
33
|`NotSequenceEquals(Expected, Actual, [FailMessage])`| inverse of `SequenceEquals`|
34
34
35
-
Surface each member as if it were an ordinary `Sub` (e.g. `Sub AreEqual(Expected, Actual, [Message])`); the source-side `Lib "<assert{exact,strict,permissive}>"` / `Alias "#N"` / `PreserveSig` / `DeclareWide` decoration is internal pseudo-DLL plumbing and is **not**surfaced. Call out `[DebugOnly(True)]` (assertions compile out of release builds) and `[MustBeQualified(True)]` (callers must write the module name, e.g. `Strict.IsTrue(x)`).
35
+
Show each member as an ordinary `Sub` (e.g. `Sub AreEqual(Expected, Actual, [Message])`). The source-side `Lib "<assert{exact,strict,permissive}>"` / `Alias "#N"` / `PreserveSig` / `DeclareWide` decoration is internal pseudo-DLL plumbing and is **not**shown. Call out `[DebugOnly(True)]` (assertions compile out of release builds) and `[MustBeQualified(True)]` (callers must write the module name, e.g. `Strict.IsTrue(x)`).
36
36
37
-
Layout: one page per module, listing all 15 members inline under `## <Member>` headings (deep-linkable as `…/Strict#areequal`). Replicating 15 × 3 = 45 near-duplicate pages would add noise without value.
37
+
Layout: one page per module, listing all 15 members inline under `## <Member>` headings (deep-linkable as `…/Strict#areequal`). Forty-five near-duplicate pages (15 × 3) would add noise without value.
Copy file name to clipboardExpand all lines: WIP.Authoring.md
+28-31Lines changed: 28 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# twinBASIC Documentation --- Authoring a Page
2
2
3
-
The page-writing contract, split out of[WIP.md](WIP.md) so a session that is
4
-
not writing documentation does not carry it. **Read this before writing or
3
+
The page-writing contract, kept apart from[WIP.md](WIP.md) so a session that is
4
+
not writing documentation need not load it. **Read this before writing or
5
5
editing any page under `docs/`.** WIP.md keeps the placement rules, the
6
6
plain-English prose rules and the Don'ts; everything about the shape of a page
7
7
is here.
@@ -70,7 +70,7 @@ This example...
70
70
71
71
Formatting conventions:
72
72
73
-
- Heading levels: the page title is `#` (a *chapter* -- a page may legitimately have more than one). Top-level sections (Example, See Also, ...) are `##`; subsections `###`. Do **not** skip `##` with the old `# Title` -> `### Example` "house style". That pattern (h1 straight to h3) exists on many older pages only to keep GitHub's raw-markdown view at a modest heading size; it is a heading-order defect on the built site. `headingLevelNormalizePlugin` in [builder/render.mjs](builder/render.mjs) repairs those legacy pages at build time (it raises `h3`->`h2` on any page that uses h1 and h3 but no h2), so existing pages are not being churned all at once -- but new content must use correct levels, and pages that already mix `##` and `###` are left untouched. A mixed page that skips a level is a real defect the normalizer will not save you from: five were found and fixed this way, and axe's `heading-order` rule now guards the sample against more.
73
+
- Heading levels: the page title is `#` (a *chapter* -- a page may legitimately have more than one). Top-level sections (Example, See Also, ...) are `##`; subsections `###`. Do **not** skip `##` with the old `# Title` -> `### Example` "house style". That pattern (h1 straight to h3) exists on many older pages only to keep GitHub's raw-markdown view at a modest heading size; it is a heading-order defect on the built site. `headingLevelNormalizePlugin` in [builder/render.mjs](builder/render.mjs) repairs those legacy pages at build time (it raises `h3`->`h2` on any page that uses h1 and h3 but no h2), so existing pages need no mass edit -- but new content must use correct levels, and pages that already mix `##` and `###` are left untouched. A mixed page that skips a level is a real defect the normalizer does not repair; axe's `heading-order` rule guards the sample against it.
74
74
-`**...**` for keywords/literal tokens; `*...*` for placeholders/arguments.
75
75
- Code blocks use ` ```tb ` (highlighted via Shiki using the vendored `builder/twinbasic.tmLanguage.json` grammar).
76
76
- Parameter lists use the deflist `term` + `: definition` indentation pattern (NOT the MS-style markdown table).
@@ -86,8 +86,8 @@ Three keys on a package's `index.md` are **provenance for the authoring pass**.
86
86
them reaches the HTML --- `grep -r indexed_from docs/_site` returns nothing, because nothing
87
87
in `template.mjs` iterates frontmatter generically; every consumer reads a named field. The
88
88
build reads one of them, `exclude_from_docs`, for one purpose: the symbol index's count of
89
-
public symbols no page documents leaves those names out (`reportableGaps` in
90
-
[builder/symbols.mjs](builder/symbols.mjs), and`--symbol-gaps` writes the list). Leave all
89
+
public symbols that no page documents leaves those names out (`reportableGaps` in
90
+
[builder/symbols.mjs](builder/symbols.mjs);`--symbol-gaps` writes the list). Leave all
91
91
three in place.
92
92
93
93
| Key | Means |
@@ -102,8 +102,7 @@ a documentation gap.** Without them a re-index cannot tell "not yet written" fro
102
102
"deliberately omitted", which is the whole point of recording them.
103
103
104
104
The six packages carrying `indexed_from` are `AppGlobalClassObject`, `CustomControls`,
105
-
`TwinBasicAssertions`, `WinEventLogLib`, `WinNamedPipesLib` and `WinServicesLib`, all set by
106
-
the 2026-06-04 pass: `9f406eb`, `05ed96b`, `77c6a03`, `4cd4f4b`, `3429b97`, `6a68815`.
105
+
`TwinBasicAssertions`, `WinEventLogLib`, `WinNamedPipesLib` and `WinServicesLib`.
107
106
`exclude_from_docs` is on three of them (`InternalStuff`; `EventLogHelperPrivate` +
108
107
`EventLogAPIs`; `ServicesConstantsPublic`).
109
108
@@ -115,9 +114,9 @@ check was run against a build that no longer matches the package.
115
114
> yet**, covering packages beyond the six above. If you are about to document a package
116
115
> from scratch, ask first --- it may already be written and waiting to merge.
117
116
118
-
One other inert key exists, and is a different thing: `has_children` on four pages is a
119
-
just-the-docs leftover. tbdocs derives the nav tree itself and never reads it. Harmless, but
120
-
it is theme residue rather than something anyone is meant to maintain.
117
+
One other inert key is a different thing: `has_children` on four pages is a
118
+
just-the-docs leftover. tbdocs derives the nav tree itself and never reads it. Nobody
119
+
needs to maintain it.
121
120
122
121
### `symbols:` --- what a page documents, for the symbol index
123
122
@@ -302,10 +301,10 @@ claim that a permalink is referenced from source, not an obligation to update on
302
301
other changes. A reviewer looking at a `Description` string and at a reference page for the
303
302
same symbol will reach for that connection; there isn't one yet.
304
303
305
-
Related: **`[Documentation(...)]` is not a twinBASIC attribute.** It does not exist. It was
306
-
asserted in eight places, including a `tb`code sample teaching it, as the in-source consumer
307
-
of the `/tB/` URL contract. The real attribute is `[Description(...)]`, which is not that.
308
-
The IDE help system remains a genuine consumer of the permalinks.
304
+
Related: **`[Documentation(...)]` is not a twinBASIC attribute.** It does not exist. Never
305
+
present it, in prose or in a `tb` sample, as the in-source consumer of the `/tB/` URL
306
+
contract. The real attribute is `[Description(...)]`, which is not that. The IDE help
307
+
system remains a genuine consumer of the permalinks.
309
308
310
309
## Per-symbol workflow
311
310
@@ -322,7 +321,7 @@ The IDE help system remains a genuine consumer of the permalinks.
322
321
- WinNativeCommonCtls → single-file (`DTPicker`, `MonthView`, `ProgressBar`, `Slider`, `UpDown`) or folder-style (`ImageList/`, `ListView/`, `TreeView/`) when the control has sub-object companions. Module-level enums under `Enumerations/`; per-control nested enums fold onto the declaring control's page.
323
322
- Pick `<Mod>` from VBA's grouping (Information, Interaction, Strings, FileSystem, DateTime, Math, Financial, Conversion, ...) and the existing folders under `Reference/<Package>/`.
324
323
2.**Flag tB deviations** with a `> [!NOTE]` callout (see next section).
325
-
3.**Update the parent index** — turn an unlinked bullet into a link with a short blurb. Match the existing style of the page. If a new package is being added, also add a bullet to `docs/Reference/Built-In.md` (or `Default.md`) and bump the count on `docs/Reference/Packages.md` and `docs/Reference/index.md`. `Packages.md` itself only links to those two landing pages -- it does not enumerate packages, which is how `AppGlobalClassObject` went unlisted for months.
324
+
3.**Update the parent index** — turn an unlinked bullet into a link with a short blurb. Match the existing style of the page. If a new package is being added, also add a bullet to `docs/Reference/Built-In.md` (or `Default.md`) and bump the count on `docs/Reference/Packages.md` and `docs/Reference/index.md`. `Packages.md` itself only links to those two landing pages -- it does not enumerate packages.
326
325
4.**Add the page** to `Reference/Statements.md` or `Reference/Procedures and Functions.md` if it's a statement or callable and not already listed there.
327
326
5.**Run the [site integrity check](WIP.md#site-integrity-check)** after the batch and before committing.
328
327
@@ -342,12 +341,11 @@ When in doubt about a tB-specific behavior, check `docs/Features/` and `docs/Ref
342
341
343
342
**twinBASIC is in a long beta, so a superseded name is not history --- it is noise.**
344
343
Document the current API and nothing else. A reader cannot use a name that no longer
345
-
exists, cannot search for it, and has to carry two names in their head to read one snippet.
344
+
exists, cannot search for it, and would have to keep two names in mind to read one snippet.
346
345
347
-
Two CustomControls tutorials showed `Public Sub New(Serializer As SerializationInfo)` and
348
-
`Deserialize()`, each with a NOTE underneath explaining that the framework actually names
349
-
them `SerializeInfo` and `RuntimeUISrzDeserialize()`. Both pages now show the current names
350
-
and carry no note; the snippets are shorter and the reader has one name per thing.
346
+
Show the current name and no note about the old one. The CustomControls tutorials show
347
+
`SerializeInfo` and `RuntimeUISrzDeserialize()`, not the superseded `SerializationInfo`
348
+
and `Deserialize()` with a NOTE explaining the difference.
351
349
352
350
Version-skew notes earn their place when a reader may be *on* the older version --- a
353
351
behaviour that changed in a shipped BETA, where the page says which build changed it (see
@@ -368,22 +366,21 @@ reader's query `check_page_baseline` can never prefix-match. Measured:
368
366
|`check_page_baseline`|**0**|
369
367
|`check-page-baseline`| 420, as noise --- hyphens split, so it becomes three common words |
370
368
371
-
`build_dot_metrics` was 0 as well. An evaluator issued seven queries including the gate's
372
-
own filename and verbatim prose from its section, and never once saw it --- **the string a
373
-
refused developer actually has in hand is the one that found nothing.**
369
+
**The string a developer actually has in hand --- the bare script name --- is the one
370
+
that finds nothing.**
374
371
375
-
**The fix was to drop the directory prefix from the headings**, so the token becomes
372
+
**So write each script's heading without the directory prefix**, so the token is
376
373
`check_page_baseline.mjs` and the trailing wildcard reaches it. Nothing is lost from the
377
-
page: each entry's anchor is pinned with `{: #... }` so no URL moved, and the synopsis
374
+
page: each entry's anchor is pinned with `{: #... }` so no URL moves, and the synopsis
378
375
block on the next line still shows the full `node scripts/<name>.mjs`. Every script name
379
-
returns hits now, and the index grew by nothing.
376
+
returns hits this way, and the index does not grow.
380
377
381
-
**Two other fixes were measured and rejected, and both are worth not re-proposing.**
382
-
Raising `search.heading_level` to 3 --- so each `###` becomes its own entry, which is what
383
-
would give a script section its own title boost and its own anchor in the results ---
378
+
**Two other fixes were measured and rejected; do not re-propose them.**
379
+
Raising `search.heading_level` to 3 --- so each `###` becomes its own entry, which would
380
+
give a script section its own title boost and its own anchor in the results ---
384
381
**doubles the index, 3,742 entries to 7,524, and does not fix it**: the titles still carry
385
-
the `scripts/` prefix, so the bare query still misses. That is a 3.4 MB payload every page
386
-
already downloads, doubled, for nothing. Widening the tokeniser's separator to include
382
+
the `scripts/` prefix, so the bare query still misses. That doubles a 3.4 MB payload every
383
+
page already downloads, for nothing. Widening the tokeniser's separator to include
387
384
`/`, `_` and `.` is the other obvious proposal; the `check-page-baseline` row above is
388
385
what it would do to *every* path token on a site whose subject matter is `Debug.Print`
0 commit comments