Console.Format targets terminal styling, not a document renderer.
Console markup format
Platform spec feature
Console markup format
Spec standingStandard
-
Only the tested markup subset is normative.
Context
Decision
Rule Detail Scope Tested sigils and markdown subset only Non-goal Full CommonMark compliance Consequences
New syntax requires tests before Standard promotion.
Verification anchors
FormatMarkdownTests.bd;Format/Scan.bd. -
Bracket color tags map to fixed palette names.
Context
Arbitrary RGB in markup v1 would bypass capability downgrade rules.
Decision
Rule Detail Tags [red]-style names map to fixed paletteRGB Not supported inside markup v1 Consequences
Authors use Ansi builders for advanced color outside markup.
Verification anchors
FormatAttributesTests.bd.
- Contracts and edge cases Markup parsing rules and rendering requirements.
- Design model Markup syntax layers and render pipeline overview.
- Examples Console markup usage for CLI output.
- Flow and algorithm Recursive descent rendering for console markup.
- Verification and traceability Markup golden tests and module anchors.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
What this feature specifies
Console.Format turns console markup (lightweight sigils and markdown subset) into UTF-8 strings containing optional ANSI sequences. Parsing lives in Console.Format.Scan and Console.Format.Markdown; attributes map through Console.Format.Attributes and Ansi.StyleChain.
Contract statement
Format(text)must use styled rendering whenConsole.ShouldStyle()is true (alias ofShouldEmitAnsi()).RenderPlainmust never emit escapes.- Supported sigils in v1 include bracket color tags (
[red]),**bold**,__underline__, and related scan rules covered by tests. - Rendered output must pass through capability gating before syscall write (via
Ansi.Escape.WhenEnabled/EmitCsi).
Implementation anchors
compiler/corelib/packages/console/src/Console/Format.bdcompiler/corelib/packages/console/src/Console/Format/Markdown.bd,Attributes.bd,Scan.bd- Tests:
FormatMarkdownTests.bd,FormatAttributesTests.bd
Decisions
Section titled “Decisions”No open decisions. Closed choices are normative ADRs under adr/ (D-CORE-TERM-0030, D-CORE-TERM-0031); use the reader ADRs tab for expandable detail.
Articles
- Markup is not full CommonMarkOnly the tested markup subset is normative.
- Contracts and edge casesMarkup parsing rules and rendering requirements.
- Design modelMarkup syntax layers and render pipeline overview.
- ExamplesConsole markup usage for CLI output.
- Flow and algorithmRecursive descent rendering for console markup.
- Verification and traceabilityMarkup golden tests and module anchors.