Context
The operator proposed evaluating compact JSDoc after reviewing the one-line comments introduced in PR #18383. This is a deferred exploration, outside the two priority-zero docking epics; it does not block their completion. The unsafe comments are being corrected in #18383 using the existing multiline convention.
The Problem
Compact comments could reduce visual bulk around simple declarations, but valid JavaScript and a successful JSDoc invocation do not guarantee correct documentation metadata.
A six-case probe against the installed JSDoc CLI, followed by the exact member-processing block from buildScripts/docs/generateDocsJson.mjs, reproduced:
| Input |
Observed result |
One-line @member {String[]} cls=['alpha', 'beta'] |
Generated default becomes empty; JSDoc also treats 'beta'] as description text. |
| Same one-line array without the space |
Default still becomes empty. |
| Multiline array with comma-space |
Default is recovered, but the trailing array element still leaks into description. |
| Multiline array without spaces |
Correct complete default and no leaked description. |
One-line @member ... @protected |
@protected becomes description text; protected access is absent. |
| The two tags on separate lines |
Protected access is present. |
This is silent metadata loss, not an asserted parser crash. The probe exercised the parser and generator's member block; it did not run or render the entire documentation build.
The Architectural Reality
- Coding guidelines show multiline blocks and tags on separate lines.
buildScripts/docs/docletPipeline/runner.mjs invokes JSDoc; generateDocsJson.mjs extracts array/object defaults from the text after = up to the next newline. A one-line block has no such newline.
buildScripts/util/check-jsdoc-types.mjs checks type expressions, not preservation of defaults, descriptions or access tags. It passes the affected valid types.
- The code-line guard already excludes comment-only lines. Compact JSDoc would reduce source bulk, not earn a reduction in executable code lines or browser bundle size.
The Fix
Evaluate a small grammar and publish an explicit support decision with fixtures in one bounded change. Start with one-tag simple annotations; compare multiline controls, primitive/null defaults, arrays/objects, whitespace and multiple tags. Permit only forms that preserve the complete metadata through the actual docs pipeline. Retaining multiline syntax for unsupported cases is an acceptable outcome; a general parser rewrite is not presumed.
Contract Ledger
| Surface |
Authority |
Proposed behavior |
Fallback |
Docs |
Evidence |
| Comment formatting |
Existing guidelines + measured parser output |
Explicit supported compact subset, if justified |
Existing multiline blocks |
Coding guidelines |
Compact/multiline equivalence fixtures |
| Generated member metadata |
JSDoc and Neo docs generator |
Preserve name, type, default, description and access |
Reject or document unsupported form |
Accepted examples |
Real parser plus generator output |
Acceptance Criteria
Out of Scope
Repository-wide reformatting, runtime/API changes, Brain work, new dependency/parser architecture, or making this a prerequisite of #18303/#18304.
Avoided Traps
A comma is not the sole cause; removing spaces does not repair newline-dependent extraction. A type-lint pass is not a metadata-equivalence proof. Shorter comments are useful only if readability and documentation meaning survive.
Decision Record impact: none — existing Engine docs tooling and source conventions.
unowned-rationale: Operator-requested deferred exploration; implementation waits until the two priority-zero epics are complete.
Related and freshness
Observed in #18383. #13433 addressed JSDoc type-expression guidance and is closed; this ticket concerns comment layout and metadata fidelity.
Live latest-20-open and exact-title/all-state JSDoc sweeps checked 2026-09-06; no equivalent found. Latest 30 A2A messages across read states show no overlapping claim. Two problem-keyed Memory Core searches returned historical type/config documentation cases, not a compact-format decision. Own-assignment sweep: seven open tickets, no matching documentation-formatting lane.
Origin Session ID: 01a07609-5e09-70f0-bf2c-a27d77d1b7f2
Retrieval Hint: compact JSDoc member array default newline protected description metadata equivalence
Context
The operator proposed evaluating compact JSDoc after reviewing the one-line comments introduced in PR #18383. This is a deferred exploration, outside the two priority-zero docking epics; it does not block their completion. The unsafe comments are being corrected in #18383 using the existing multiline convention.
The Problem
Compact comments could reduce visual bulk around simple declarations, but valid JavaScript and a successful JSDoc invocation do not guarantee correct documentation metadata.
A six-case probe against the installed JSDoc CLI, followed by the exact member-processing block from
buildScripts/docs/generateDocsJson.mjs, reproduced:@member {String[]} cls=['alpha', 'beta']'beta']as description text.@member ... @protected@protectedbecomes description text; protected access is absent.This is silent metadata loss, not an asserted parser crash. The probe exercised the parser and generator's member block; it did not run or render the entire documentation build.
The Architectural Reality
buildScripts/docs/docletPipeline/runner.mjsinvokes JSDoc;generateDocsJson.mjsextracts array/object defaults from the text after=up to the next newline. A one-line block has no such newline.buildScripts/util/check-jsdoc-types.mjschecks type expressions, not preservation of defaults, descriptions or access tags. It passes the affected valid types.The Fix
Evaluate a small grammar and publish an explicit support decision with fixtures in one bounded change. Start with one-tag simple annotations; compare multiline controls, primitive/null defaults, arrays/objects, whitespace and multiple tags. Permit only forms that preserve the complete metadata through the actual docs pipeline. Retaining multiline syntax for unsupported cases is an acceptable outcome; a general parser rewrite is not presumed.
Contract Ledger
Acceptance Criteria
Out of Scope
Repository-wide reformatting, runtime/API changes, Brain work, new dependency/parser architecture, or making this a prerequisite of #18303/#18304.
Avoided Traps
A comma is not the sole cause; removing spaces does not repair newline-dependent extraction. A type-lint pass is not a metadata-equivalence proof. Shorter comments are useful only if readability and documentation meaning survive.
Decision Record impact: none — existing Engine docs tooling and source conventions.
unowned-rationale: Operator-requested deferred exploration; implementation waits until the two priority-zero epics are complete.
Related and freshness
Observed in #18383. #13433 addressed JSDoc type-expression guidance and is closed; this ticket concerns comment layout and metadata fidelity.
Live latest-20-open and exact-title/all-state JSDoc sweeps checked 2026-09-06; no equivalent found. Latest 30 A2A messages across read states show no overlapping claim. Two problem-keyed Memory Core searches returned historical type/config documentation cases, not a compact-format decision. Own-assignment sweep: seven open tickets, no matching documentation-formatting lane.
Origin Session ID: 01a07609-5e09-70f0-bf2c-a27d77d1b7f2
Retrieval Hint:
compact JSDoc member array default newline protected description metadata equivalence