This ledger tracks the standards debt that remains after installing the verbatim TypeScript Code Standards Editor's Edition artifact.
Passing npm run code-dojo:verify means the repository did not grow the
currently tracked standards debt. It does not mean the repository fully adheres
to the standards.
npm run code-dojo:ci remains the local full-proof lane when a change needs
the standards checks plus build, typecheck, workspace lint, ESLint, and tests.
npm run code-dojo:debt is the source of truth for the aggregate Code Dojo
debt count.
The count is intentionally rule-based, not file-unique. A file can count once for file/context debt and again for code-size debt because those are separate standards violations.
Current count:
| Source | Count | Meaning |
|---|---|---|
| File/context baseline | 12 | Files over the Code Dojo context threshold. |
| Mock-ban baseline | 0 | Existing test mock/spy violations. |
| Code-size baseline | 0 | Files over 500 lines; none exceed the 1000-line hard limit. |
| ESLint baseline | 0 | Type-aware ESLint findings after the WF-160 focused cleanup pass. |
| Total | 12 | Aggregate Code Dojo standards debt. |
WF-165 tranches A through E split twenty-five double-counted roots into focused
modules behind their existing public entrypoints. Tranche A lowers file/context
debt from 37 to 32, code-size debt from 25 to 20, and aggregate debt
from 62 to 52. Tranche B lowers those counts to 27, 15, and 42.
Tranche C lowers them again to 22, 10, and 32. Tranche D lowers them to
17, 5, and 22. Tranche E reaches 12, 0, and 12, completing the
goalpost's required reduction from its original 62 count without weakening a
threshold.
Tranche E preserves the TUI runtime, table, framed-app, DOGFOOD application,
and DOGFOOD story public entrypoints as focused module families. The story
catalog retains all 42 ordered story definitions, while its split
localization lineage falls from 1,453 to 1,427 raw strings and the complete
DOGFOOD baseline falls from 2,343 to 2,317. Missing Markdown localizations
hold at 78.
WF-164 tranche B splits 24 more production and repository-tooling
entrypoints into focused modules while keeping their public import paths stable.
The file/context baseline falls from 61 to 37; the code-size baseline falls
from 26 to 25; mock-ban and ESLint debt remain 0; and aggregate debt
falls from 87 to 62. Together, DX-050 tranches A and B remove the required
50 counted violations from the 112 goalpost without weakening a threshold
or introducing a new runtime import cycle.
DX-050 tranche A splits 25 production and repository-tooling entrypoints into
focused modules while preserving their public import paths as compatibility
facades. The file/context baseline falls from 86 to 61; code-size debt holds
at 26; mock-ban and ESLint debt remain 0; and aggregate debt falls from
112 to 87. This was the first half of the goalpost completed by WF-164.
WF-163 applies responsibility-preserving extractions across examples, core,
TUI, Node, i18n tooling, benchmarks, and repository scripts. Public entrypoints
remain stable facades while focused helpers move below the file/context
threshold. The file/context baseline falls from 136 to 86; mock-ban and
ESLint debt remain 0; code-size debt holds at 26, including 3 hard-limit
files; and aggregate Code Dojo debt falls from 162 to 112.
WF-162 splits the remaining oversized deterministic test/support files from the
WF-161 tranche and applies Project Big Extraction to declaration-boundary core,
TUI, and standard-block modules. Public import paths remain facades, while
implementation and test helpers move into sub-150-line part modules. This lowers
file/context debt from 217 to 136, code-size debt from 45 to 26, and
aggregate Code Dojo debt from 262 to 162.
WF-161 splits 91 over-threshold deterministic test/spec files into grouped
sub-spec files that each stay under the Code Dojo file/context thresholds. Nine
of those original spec files were also over the 500 line code-size ratchet.
This lowers file/context debt from 308 to 217, code-size debt from 54 to
45, and aggregate Code Dojo debt from 362 to 262 without changing product
behavior.
BE-001 starts Project Big Extraction by turning
examples/docs/dogfood-blocks.ts from a 2,637 line / 92,020 byte hard-limit
monolith into a 97 line / 3,740 byte compatibility facade backed by focused
sub-150-line modules. This removes dogfood-blocks.ts from both the
file/context and code-size baselines, lowers hard-limit code-size files from
4 to 3, and lowers aggregate Code Dojo debt from 364 to 362. This is an
interim structural reduction; it does not by itself satisfy the 50-violation
goalpost burndown policy.
WF-160 clears the final ESLint and mock-ban baselines while removing 22
file/context entries through focused type extraction, test-support extraction,
and behavior-preserving test splits. Node IO and create-app CLI tests now use
observable fake writers/platform seams instead of process spies, pipeline tests
observe rebuild behavior through an explicit callback, and the PR review status
script uses validator-backed parsing instead of caller-chosen generics. The
aggregate Code Dojo ceiling falls from 414 to 364, and the next target is
314 or lower.
WF-159 lowers ESLint debt from 57 to 6 by making the i18n runtime boundary
return unknown catalog values instead of caller-chosen unchecked generics,
tightening localization interpolation, replacing scattered non-null and unsafe
test assertions with typed guards, cleaning theme token access and deprecated
barrel exports, and preserving active-binding malformed-input coverage through
an explicit runtime invocation helper. The aggregate Code Dojo ceiling falls
from 465 to 414. Per the operator's temporary waiver for touched-file size
ratchets during this slice, existing file/context entries for touched
legacy-large files were refreshed without adding new counted file/context or
code-size violations; existing code-size ceilings for the touched i18n runtime
files were refreshed as well.
WF-158 lowers ESLint debt from 110 to 57 by cleaning focused form,
DOGFOOD, benchmark, TUI command/file/panel/status, progress, smoke, text
wrapping, component fallback, DAG overload, and runtime viewport clusters. The
aggregate Code Dojo ceiling falls from 518 to 465. Per the operator's
temporary waiver for touched-file size ratchets during this slice, existing
file/context entries for touched legacy-large files were refreshed without
adding new counted file/context or code-size violations.
WF-157 lowers ESLint debt from 162 to 110 by cleaning focused i18n
catalog/freezing boundaries, MCP docs example coercion, TUI key/navigation,
drawer, motion, notification, pager, split-pane, runtime-support, subapp, and
example bootstrap clusters. The aggregate Code Dojo ceiling falls from 570 to
518. Per the operator's temporary waiver for touched-file size ratchets
during this slice, existing file/context entries for touched legacy-large files
were refreshed without adding new counted file/context or code-size violations.
WF-156 lowers ESLint debt from 215 to 162 by cleaning focused TUI runtime,
notification, list, DAG, layout, timer, grapheme, block-tree, create-app CLI,
release-readiness, release metadata, and canary smoke-runner clusters. The
aggregate Code Dojo ceiling falls from 623 to 570. Per the operator's
temporary waiver for touched-file size ratchets during this slice, existing
file/context and code-size entries for touched legacy-large files were refreshed
without adding new counted file/context or code-size violations.
WF-155 lowered ESLint debt from 266 to 215 by cleaning focused Storybook,
counter fixture, TUI app, focus-area, collection-surface, surface primitive,
split-editor, i18n localization, and Node IO clusters while keeping touched
file/context ceilings flat or lower. The aggregate Code Dojo ceiling falls from
674 to 623.
WF-155 also keeps breaking up the oversized DOGFOOD app entrypoint by extracting
standard block docs, live block preview rendering, and Theme Inspector state
into sub-150-line modules. examples/docs/app.ts remains counted debt, but it
falls from 4,165 physical lines / 147,799 bytes to 3,306 physical lines /
114,890 bytes in this pass, and DOGFOOD raw-string debt falls from 2,415 to
2,373 without increasing any per-file baseline.
Every met repo goalpost must reduce the aggregate Code Dojo debt count by at least 50 violations until the count reaches zero.
This is additive. It does not replace:
- touched-file cleanup rules
- file/context ratchets
- mock-ban ratchets
- code-size ratchets
- DOGFOOD localization ratchets
- CI, review, release, or merge-readiness gates
When fewer than 50 violations remain, the next met goalpost must reduce the count to zero.
The current ceiling is encoded in package.json:
npm run code-dojo:debt
The encoded ceiling is 12. WF-165 began at 62 and reaches its required
12-or-lower goalpost without resetting the denominator between tranches.
At a goalpost or bounded-tranche boundary:
- Remove or formally justify standards debt.
- Run
npm run code-dojo:debt. - Lower the
--maxvalue in thecode-dojo:debtpackage script to the measured result. A bounded tranche does not reset the active goalpost's required 50-violation reduction. - Update this ledger's current count and next target.
- Run
npm run code-dojo:verify.
Do not raise the ceiling without explicit design-review justification.