Skip to content

/wbCheck — Exhaustive Simulation () ​

/wbCheck is the static analyzer. It validates code health (types, signatures) and documentation integrity (broken links, spelling, schema adherence) without executing anything. The hard distinction: /wbAudit finds logic and security flaws (dynamic analysis), /wbValid runs CI tests (dynamic execution), /wbCheck verifies syntactic and referential contracts (purely static). No code runs. No tests execute.

Read this if you want to know which analysis engine fires per file type, what --fix can and cannot auto-correct, and why link checking is a first-class feature for a monorepo with 50+ markdown files.


1. Role & target ​

AspectBehavior
RoleThe Static Analyzer & Compliance Checker.
TargetSource code (type checking), markdown (link checking, grammar), JSON/config (schema validation).
Cell scopeNone. /wbCheck is purely diagnostic.
Side effects allowedWith --fix: auto-correcting trivial errors (typos, basic type casts).
Side effects forbiddenModifying execution logic, running tests, altering plan state.

The "purely static" constraint means /wbCheck can run on any commit, any branch, any state — it doesn't need a running environment, installed dependencies, or a valid build. Compare to /wbValid which needs the test suite to execute, or /wbAudit which reads runtime behavior.


2. Argument resolution ​

The analysis engine is auto-selected by file extension:

FormExampleEngine fired
.js/.ts fileCommand: /wbCheck src/WBC.jsType checker — JSDoc/TypeScript type validation.
.md fileCommand: /wbCheck docs/readme.mdLink checker + grammar engine.
.json fileCommand: /wbCheck tsconfig.jsonSchema validator.
DirectoryCommand: /wbCheck src/Type checker on all .js/.ts files.
GlobCommand: /wbCheck **/*.mdLink checker across the entire doc tree.

The engine selection is deterministic — no guessing. A .js file always gets type checking; a .md file always gets link checking. To override (e.g., grammar check on a .js file's comments), use the flag to force.


3. Flag matrix ​

FlagShortcutPurpose
--fix-fAuto-corrects trivial errors (typos, basic type casts).

--fix limitations. Auto-fix handles:

  • ✅ Spelling corrections in markdown
  • ✅ Simple type widening (string | undefined when a param is optional)
  • ❌ Ambiguous type inference (won't guess between number and string)
  • ❌ Broken link rewiring (can't know where the file moved to)
  • ❌ Logic-level type errors (won't cast any to a specific type)

When --fix can't resolve an error, it leaves it in place with a ⚠️ Manual fix required annotation. The principle: auto-fix is conservative. A wrong auto-fix is worse than no fix.


4. Pipelines (the agent-native scenarios) ​

📋/wbCheck Exhaustive Simulation
Documentation integrity sweep for frontEnd/wbc-ui/core2/packages/wb-flow/templates/wbCheck frontEnd/wbc-ui/core2/packages/wb-flow/templates/**/*.md -l -g
> /wbCheck frontEnd/wbc-ui/core2/packages/wb-flow/templates/**/*.md -l -g
[SYSTEM] Initiating Documentation Integrity Sweep...
[RESOLVE] 54 markdown files found.
[LINKS] Extracting URLs...
[LINKS] Scanned 412 internal links, 23 external URLs.
✅ 398 internal links resolve correctly.
❌ 12 broken internal links:
- docs/commands/wbBroadcast/wbBroadcast_practical.md → file not found
- commands/wbWork/wbWork_examples.md → moved to docs/
...
⚠️ 2 external URLs returned non-200:
- https://github.com/wbc-ui2/issues/402 → 404 (issue was closed/deleted)
[GRAMMAR] Scanning 54 files (82,000 words)...
❌ 6 typos found:
- wbTrack_template.md:L145 — "seperately" → "separately"
- wbActOn_template.md:L89 — "occured" → "occurred"
...
[REPORT] 12 broken links, 6 typos. Run with -f to auto-fix typos.
⚠️ Note: The `frontEnd/wbc-ui/core2/packages/wb-flow/templates/` directory has 50+ markdown files with extensive cross-linking. After the v4 documentation overhaul, verify nothing is broken:

💠 Pipeline Documentation integrity sweep for frontEnd/wbc-ui/core2/packages/wb-flow/templates ​

The frontEnd/wbc-ui/core2/packages/wb-flow/templates/ directory has 50+ markdown files with extensive cross-linking. After the v4 documentation overhaul, verify nothing is broken:

💠 Pipeline Strict type gate on wb-core source ​

The team is migrating from vanilla JS to JSDoc-typed JS. Report all remaining loose types:

💠 Pipeline Auto-fix typos after grammar check ​


5. Edge cases & refusals ​

TriggerWhat /wbCheck does
--fix on an ambiguous type error⚠️ Cannot auto-fix implicit 'any' in processToken(). Manual casting required.
Empty directory (no files match glob)ℹ️ No files found matching pattern. Nothing to check.

The unifying principle: /wbCheck is the integrity layer. It answers "is the codebase internally consistent?" — do the types match, do the links resolve, is the spelling correct? It's the static complement to /wbAudit (dynamic logic) and /wbValid (dynamic tests). All three can run on the same codebase and find different classes of problems.