Plan›Bug

plan

Bug

Bug report with structured reproduction steps and severity tracking

Install

  1. Add the package: npm install @refrakt-md/plan
  2. Add it to the plugins array in refrakt.config.json: "plugins": ["@refrakt-md/plan"]

About the plugin and its runes

Source

import { createContentModelSchema, slotSections } from '@refrakt-md/runes';
import type { EmitsDeclaration } from '@refrakt-md/runes';
import { VALID_STATUS, VALID_SEVERITY } from '../commands/enums.js';

export const bugEmits = {
	rune: 'bug',
	tag: 'article',
	properties: {
		id: '',
		status: 'reported',
		severity: 'major',
		assignee: '',
		milestone: '',
		source: '',
		pr: '',
		tags: '',
		created: { from: ['attrs.created', 'file.created'], default: '' },
		modified: { from: ['attrs.modified', 'file.modified'], default: '' },
	},
	slots: {
		title: { as: 'region', el: 'header' },
		blurb: { from: 'description', as: 'region', omitWhenEmpty: true },
		intro: { as: 'region', omitWhenEmpty: true, role: 'body' },
		body: { from: 'sections', as: 'region' },
	},
} satisfies EmitsDeclaration;

export const bugSections = slotSections(bugEmits);

export const bug = createContentModelSchema({
	provides: ['prose'],
	attributes: {
		id: { type: String, required: true, description: 'Unique identifier.' },
		status: {
			type: String,
			required: false,
			matches: [...VALID_STATUS.bug],
			description:
				'Current status: reported, confirmed, in-progress, fixed, wontfix, or duplicate.',
		},
		severity: {
			type: String,
			required: false,
			matches: [...VALID_SEVERITY],
			description: 'Impact level: critical, major, minor, or cosmetic.',
		},
		assignee: { type: String, required: false, description: 'Person or agent working on this.' },
		milestone: { type: String, required: false, description: 'Milestone for the fix.' },
		source: {
			type: String,
			required: false,
			description: 'Comma-separated IDs of specs or decisions this item implements.',
		},
		pr: {
			type: String,
			required: false,
			description:
				'Comma-separated PR references that fixed this bug (e.g. "refrakt-md/refrakt#142").',
		},
		tags: { type: String, required: false, description: 'Comma-separated labels.' },
		created: {
			type: String,
			required: false,
			description: 'Creation date (ISO 8601). Defaults to file creation date from git.',
		},
		modified: {
			type: String,
			required: false,
			description: 'Last modified date (ISO 8601). Defaults to file modification date from git.',
		},
	},
	contentModel: () => ({
		type: 'sections' as const,
		sectionHeading: 'heading:2',
		fields: [
			{ name: 'title', match: 'heading', optional: false },
			{ name: 'description', match: 'paragraph', optional: true, greedy: true },
			{ name: 'intro', match: 'any', optional: true, greedy: true },
		],
		sectionModel: {
			type: 'sequence' as const,
			fields: [{ name: 'body', match: 'any', optional: true, greedy: true }],
		},
		knownSections: {
			'Steps to Reproduce': {
				alias: ['Reproduction', 'Steps', 'Repro'],
			},
			Expected: {
				alias: ['Expected Behaviour'],
			},
			Actual: {
				alias: ['Actual Behaviour'],
			},
			Environment: {
				alias: ['Env'],
			},
			'Blocked by': {
				alias: ['Depends On', 'Requires', 'Deps', 'Needs', 'Dependencies'],
			},
			Blocks: {
				alias: ['Unblocks', 'Enables', 'Required By'],
			},
		},
	}),
	emits: bugEmits,
});

View plugins/plan/src/tags/bug.ts on GitHub

A defect report, with its reproduction steps, expected and actual behaviour, severity and status. It is separate from a work item because a bug has its own sections and status values.

Confirmed bug

A bug confirmed with reproduction steps and environment details.

{% bug id="BUG-9201" status="confirmed" severity="major" %}
# Showcase bleed breaks with overflow:hidden parent

## Steps to Reproduce
1. Create a feature section with a parent that has `overflow: hidden`
2. Add a showcase with `bleed="top"` inside the feature
3. Observe the rendered output

## Expected
Showcase extends above the section boundary with visible displacement.

## Actual
Showcase is clipped at the section edge.

## Environment
- Browser: Chrome 122, Firefox 124
- Theme: default
- refrakt.md: v0.4.2
{% /bug %}
<article data-rune="bug" data-rune-fields="{&quot;id&quot;:&quot;BUG-9201&quot;,&quot;status&quot;:&quot;confirmed&quot;,&quot;severity&quot;:&quot;major&quot;,&quot;assignee&quot;:&quot;&quot;,&quot;milestone&quot;:&quot;&quot;,&quot;source&quot;:&quot;&quot;,&quot;pr&quot;:&quot;&quot;,&quot;tags&quot;:&quot;&quot;,&quot;created&quot;:&quot;2026-11-11&quot;,&quot;modified&quot;:&quot;2026-11-11&quot;}">
  <header data-name="title">
    <h1 id="showcase-bleed-breaks-with-overflowhidden-parent">Showcase bleed breaks with overflow:hidden parent</h1>
  </header>
  <div data-name="body">
    <section data-name="steps-to-reproduce">
      <h2 id="steps-to-reproduce" data-known-section="Steps to Reproduce">Steps to Reproduce</h2>
      <ol>
        <li>
          Create a feature section with a parent that has
          <code>overflow: hidden</code>
        </li>
        <li>
          Add a showcase with
          <code>bleed=&quot;top&quot;</code>
          inside the feature
        </li>
        <li>Observe the rendered output</li>
      </ol>
    </section>
    <section data-name="expected">
      <h2 id="expected" data-known-section="Expected">Expected</h2>
      <p>Showcase extends above the section boundary with visible displacement.</p>
    </section>
    <section data-name="actual">
      <h2 id="actual" data-known-section="Actual">Actual</h2>
      <p>Showcase is clipped at the section edge.</p>
    </section>
    <section data-name="environment">
      <h2 id="environment" data-known-section="Environment">Environment</h2>
      <ul>
        <li>Browser: Chrome 122, Firefox 124</li>
        <li>Theme: default</li>
        <li>refrakt.md: v0.4.2</li>
      </ul>
    </section>
  </div>
</article>
BUG-9201confirmed

Showcase bleed breaks with overflow:hidden parent

Steps to Reproduce

  1. Create a feature section with a parent that has overflow: hidden
  2. Add a showcase with bleed="top" inside the feature
  3. Observe the rendered output

Expected

Showcase extends above the section boundary with visible displacement.

Actual

Showcase is clipped at the section edge.

Environment

  • Browser: Chrome 122, Firefox 124
  • Theme: default
  • refrakt.md: v0.4.2
<article class="rf-bug rf-bug--BUG-9201 rf-bug--confirmed rf-bug--major" data-id="BUG-9201" data-status="confirmed" data-severity="major" data-assignee="" data-milestone="" data-source="" data-pr="" data-tags="" data-created="2026-11-11" data-modified="2026-11-11" data-rune="bug" data-density="full">
  <div data-name="eyebrow" data-zone="eyebrow" data-zone-layout="bar" class="rf-bug__eyebrow">
    <span data-meta-type="id" data-field="id">BUG-9201</span>
    <span data-meta-type="status" data-meta-sentiment="caution" data-align="end" data-field="status">confirmed</span>
  </div>
  <header data-name="title" class="rf-bug__title" data-section="title">
    <h1 id="showcase-bleed-breaks-with-overflowhidden-parent">Showcase bleed breaks with overflow:hidden parent</h1>
  </header>
  <dl data-name="metadata" data-zone="metadata" data-zone-layout="definition-list" class="rf-bug__metadata">
    <div data-name="row" data-field="severity" class="rf-bug__row">
      <dt data-meta-label="">Severity</dt>
      <dd>
        <span data-meta-type="category" data-meta-sentiment="caution">major</span>
      </dd>
    </div>
    <div data-name="row" data-field="created" class="rf-bug__row">
      <dt data-meta-label="">Created</dt>
      <dd>
        <time data-meta-type="temporal" datetime="2026-11-11">2026-11-11</time>
      </dd>
    </div>
    <div data-name="row" data-field="modified" class="rf-bug__row">
      <dt data-meta-label="">Modified</dt>
      <dd>
        <time data-meta-type="temporal" datetime="2026-11-11">2026-11-11</time>
      </dd>
    </div>
  </dl>
  <div data-name="body" class="rf-bug__body" data-section="body">
    <section data-name="steps-to-reproduce" class="rf-bug__steps-to-reproduce">
      <h2 id="steps-to-reproduce" data-known-section="Steps to Reproduce">Steps to Reproduce</h2>
      <ol>
        <li>
          Create a feature section with a parent that has 
          <code>overflow: hidden</code>
        </li>
        <li>
          Add a showcase with 
          <code>bleed=&quot;top&quot;</code>
           inside the feature
        </li>
        <li>Observe the rendered output</li>
      </ol>
    </section>
    <section data-name="expected" class="rf-bug__expected">
      <h2 id="expected" data-known-section="Expected">Expected</h2>
      <p>Showcase extends above the section boundary with visible displacement.</p>
    </section>
    <section data-name="actual" class="rf-bug__actual">
      <h2 id="actual" data-known-section="Actual">Actual</h2>
      <p>Showcase is clipped at the section edge.</p>
    </section>
    <section data-name="environment" class="rf-bug__environment">
      <h2 id="environment" data-known-section="Environment">Environment</h2>
      <ul>
        <li>Browser: Chrome 122, Firefox 124</li>
        <li>Theme: default</li>
        <li>refrakt.md: v0.4.2</li>
      </ul>
    </section>
  </div>
</article>

How Markdown is read

You writeIt becomes
A headingThe bug's title
The paragraphs right after itThe bug's lead
Anything else before the first ##, such as a code block, a list or a tableAn intro above the sections
A ## headingA named section; the content up to the next ## is its body
## Steps to Reproduce, ## Expected, ## Actual, ## EnvironmentThe standard bug sections; aliases such as ## Repro or ## Env count as the same section

Critical bug

A critical severity bug requiring immediate attention.

{% bug id="BUG-9305" status="reported" severity="critical" %}
# Build fails when no rune packages configured

## Steps to Reproduce
1. Create a new refrakt project
2. Remove all entries from packages array
3. Run `npm run build`

## Expected
Build succeeds with only core runes.

## Actual
Build crashes with undefined reference error.
{% /bug %}
<article data-rune="bug" data-rune-fields="{&quot;id&quot;:&quot;BUG-9305&quot;,&quot;status&quot;:&quot;reported&quot;,&quot;severity&quot;:&quot;critical&quot;,&quot;assignee&quot;:&quot;&quot;,&quot;milestone&quot;:&quot;&quot;,&quot;source&quot;:&quot;&quot;,&quot;pr&quot;:&quot;&quot;,&quot;tags&quot;:&quot;&quot;,&quot;created&quot;:&quot;2026-11-11&quot;,&quot;modified&quot;:&quot;2026-11-11&quot;}">
  <header data-name="title">
    <h1 id="build-fails-when-no-rune-packages-configured">Build fails when no rune packages configured</h1>
  </header>
  <div data-name="body">
    <section data-name="steps-to-reproduce">
      <h2 id="steps-to-reproduce" data-known-section="Steps to Reproduce">Steps to Reproduce</h2>
      <ol>
        <li>Create a new refrakt project</li>
        <li>Remove all entries from packages array</li>
        <li>
          Run
          <code>npm run build</code>
        </li>
      </ol>
    </section>
    <section data-name="expected">
      <h2 id="expected" data-known-section="Expected">Expected</h2>
      <p>Build succeeds with only core runes.</p>
    </section>
    <section data-name="actual">
      <h2 id="actual" data-known-section="Actual">Actual</h2>
      <p>Build crashes with undefined reference error.</p>
    </section>
  </div>
</article>
BUG-9305reported

Build fails when no rune packages configured

Steps to Reproduce

  1. Create a new refrakt project
  2. Remove all entries from packages array
  3. Run npm run build

Expected

Build succeeds with only core runes.

Actual

Build crashes with undefined reference error.

<article class="rf-bug rf-bug--BUG-9305 rf-bug--reported rf-bug--critical" data-id="BUG-9305" data-status="reported" data-severity="critical" data-assignee="" data-milestone="" data-source="" data-pr="" data-tags="" data-created="2026-11-11" data-modified="2026-11-11" data-rune="bug" data-density="full">
  <div data-name="eyebrow" data-zone="eyebrow" data-zone-layout="bar" class="rf-bug__eyebrow">
    <span data-meta-type="id" data-field="id">BUG-9305</span>
    <span data-meta-type="status" data-meta-sentiment="neutral" data-align="end" data-field="status">reported</span>
  </div>
  <header data-name="title" class="rf-bug__title" data-section="title">
    <h1 id="build-fails-when-no-rune-packages-configured">Build fails when no rune packages configured</h1>
  </header>
  <dl data-name="metadata" data-zone="metadata" data-zone-layout="definition-list" class="rf-bug__metadata">
    <div data-name="row" data-field="severity" class="rf-bug__row">
      <dt data-meta-label="">Severity</dt>
      <dd>
        <span data-meta-type="category" data-meta-sentiment="negative">critical</span>
      </dd>
    </div>
    <div data-name="row" data-field="created" class="rf-bug__row">
      <dt data-meta-label="">Created</dt>
      <dd>
        <time data-meta-type="temporal" datetime="2026-11-11">2026-11-11</time>
      </dd>
    </div>
    <div data-name="row" data-field="modified" class="rf-bug__row">
      <dt data-meta-label="">Modified</dt>
      <dd>
        <time data-meta-type="temporal" datetime="2026-11-11">2026-11-11</time>
      </dd>
    </div>
  </dl>
  <div data-name="body" class="rf-bug__body" data-section="body">
    <section data-name="steps-to-reproduce" class="rf-bug__steps-to-reproduce">
      <h2 id="steps-to-reproduce" data-known-section="Steps to Reproduce">Steps to Reproduce</h2>
      <ol>
        <li>Create a new refrakt project</li>
        <li>Remove all entries from packages array</li>
        <li>
          Run 
          <code>npm run build</code>
        </li>
      </ol>
    </section>
    <section data-name="expected" class="rf-bug__expected">
      <h2 id="expected" data-known-section="Expected">Expected</h2>
      <p>Build succeeds with only core runes.</p>
    </section>
    <section data-name="actual" class="rf-bug__actual">
      <h2 id="actual" data-known-section="Actual">Actual</h2>
      <p>Build crashes with undefined reference error.</p>
    </section>
  </div>
</article>

Attributes

AttributeTypeRequiredDescription
idstring✓Unique identifier.
status"reported" | "confirmed" | "in-progress" | "fixed" | "wontfix" | "duplicate"—Current status: reported, confirmed, in-progress, fixed, wontfix, or duplicate.
severity"critical" | "major" | "minor" | "cosmetic"—Impact level: critical, major, minor, or cosmetic.
assigneestring—Person or agent working on this.
milestonestring—Milestone for the fix.
sourcestring—Comma-separated IDs of specs or decisions this item implements.
prstring—Comma-separated PR references that fixed this bug (e.g. "refrakt-md/refrakt#142").
tagsstring—Comma-separated labels.
createdstring—Creation date (ISO 8601). Defaults to file creation date from git.
modifiedstring—Last modified date (ISO 8601). Defaults to file modification date from git.

Universal attributes

bg

The background layer: image, video, gradient, flat overlay wash and legibility scrim, in a single injected layer behind the rune's content.

AttributeTypeRequiredDescription
bgstring—Background preset applied to this block
bg-fromstring—Gradient start colour — a semantic token name (→ var(--rf-color-*))
bg-gradient"to-t" | "to-b" | "to-l" | "to-r" | "to-tr" | "to-br" | "to-bl" | "to-tl"—Gradient direction (bounded named set)
bg-gradient-type"linear" | "radial" | "conic"—Gradient type
bg-tostring—Gradient end colour — a semantic token name
bg-viastring—Optional middle gradient stop — a semantic token name
scrim"top" | "bottom" | "left" | "right" | "none"—Scrim direction (heaviest edge); presence turns the scrim on, "none" opts out of the default cover scrim
scrim-blur"none" | "sm" | "md" | "lg"—Frost scrim blur amount
scrim-strength"sm" | "md" | "lg"—Gradient scrim strength
scrim-tone"dark" | "light"—Whether the scrim darkens (for light text) or lightens (for dark text)
scrim-type"gradient" | "frost"—Scrim treatment: gradient (default) or frost (backdrop blur)
dropcap

Per-instance drop-cap opt-in.

AttributeTypeRequiredDescription
dropcapboolean—Style the opening letter of a prose body as a drop cap. Honoured only when the body reads as prose; ignored otherwise.
elevation

How far the rune sits off the page, from sunken to overlay. The theme decides what each step looks like.

AttributeTypeRequiredDescription
elevation"sunken" | "flush" | "flat" | "raised" | "floating" | "overlay" | "none" | "sm" | "md" | "lg"—Surface depth, from sunken to overlay. Deprecated: none, sm, md and lg (read as flat, raised, raised and floating)
inset

Internal padding override.

AttributeTypeRequiredDescription
inset"flush" | "tight" | "default" | "loose" | "breathe"—Inner padding of this block
motion

Scroll-reveal entrance. You choose its character; the theme decides how it moves.

AttributeTypeRequiredDescription
reveal"none" | "fade" | "slide" | "scale" | "blur"—Scroll-reveal entrance character (none|fade|slide|scale|blur); the theme owns the choreography
staggerboolean—Cascade this block's items in as it reveals (no-op on single-child runes)
prominence

Header emphasis. Scales a rune's header, or its featured quotation; the theme decides the type size for each step.

AttributeTypeRequiredDescription
prominence"quiet" | "normal" | "prominent" | "display" | "marquee"—Emphasis of a page-section header or a featured quotation (only on runes that have one)
reading

Editorial register for body text. You pick the register; the theme decides how it looks.

AttributeTypeRequiredDescription
reading"fine" | "ui" | "prose"—Reading register for this block’s body: fine | ui | prose. The theme sets how each one looks.
spacing

Block-level rhythm override.

AttributeTypeRequiredDescription
spacing"flush" | "tight" | "default" | "loose" | "breathe"—Vertical spacing above and below this block
substrate

Generated pattern fills behind the content, drawn by the theme.

AttributeTypeRequiredDescription
substrate"dots" | "grid" | "lines" | "cross" | "checker" | "none"—Generated surface pattern
substrate-fill"inherit" | "inset"—Surface fill the pattern sits on (full colour stays with tint)
substrate-opacity"sm" | "md" | "lg"—Pattern ink strength
substrate-size"sm" | "md" | "lg"—Pattern cell size
substrate-target"self" | "media"—Which surface the pattern fills (overrides the rune/theme default)
tint

Per-rune colour override: a named tint from the theme registry, with inline per-token overrides layered on top.

AttributeTypeRequiredDescription
tintstring—Color tint preset applied to this block
tint-mode"auto" | "dark" | "light"—Whether the tint adapts to auto, dark, or light mode
width

The track a block rune occupies.

AttributeTypeRequiredDescription
width"compact" | "narrow" | "content" | "wide" | "full"—Maximum width constraint for this block
Not availableWhy
framethis rune declares neither a `frameTarget` nor a media section