Full grading rubric

Use a shared set of heuristics to score template quality consistently across Astryx usage, icons, CSS, layout, metadata, images, and code quality.

Understand the score

Template rubric 1.4 scores seven categories for 100 points. Aim for 100; B (75) is the publication floor, not the target. Each category below lists its weight. Never award points for anything you did not inspect.

GradeScoreMeaning
A90-100Exemplary. Copy-ready with no known quality problems.
B75-89Good. Minor issues may remain, but the template is usable.
C60-74Needs work before publication.
D40-59Poor. Significant rewrites are needed.
F0-39Failing. The template teaches or produces bad patterns.

Keep improving while a deduction has a reasonable fix. A score below 100 is fine only when the remaining tradeoff is intentional and recorded. A template is not ready if the copied file fails to build or a required asset is missing, whatever its score.

Version 1.4 counts public integration components as Astryx components and grades assets and imports after the copy. Record the version with every score so results stay comparable.

Astryx component purity: 30 points

Count every JSX opening tag in the copied .tsx source. An Astryx element is a component imported from @astryxdesign/core or from a public component export of the integration package. A raw HTML element is any lowercase intrinsic JSX tag. Count occurrences, not only unique tag names.

Do not count fragments or a PascalCase helper defined in the same file. Inspect that helper and count the raw HTML inside it. For each raw element, decide whether it is necessary because Astryx has no equivalent, or unnecessary because an Astryx component can replace it.

Raw HTML elementsPoints
030
1-2, all necessary25
1-2, any unnecessary20
3-515
6-108
11-204
21 or more0
Raw HTML useAstryx replacement
div for layoutVStack, HStack, Card, Section, or Center
div for a gridGrid
span or p for textText
h1 through h6Heading level={N}
buttonButton or IconButton
aLink
In-page nav or asideLayoutPanel in the start slot
header or mainLayoutHeader or LayoutContent in Layout
ul, ol, or liList and ListItem
input, textarea, or selectThe matching Astryx form control
table, tr, or tdTable
hrDivider
dialogDialog
details or summaryCollapsible
  • Do not deduct for an img when no general Astryx image component fits and its source passes the Image handling category.
  • Do not deduct for a form that wraps FormLayout to provide native submission semantics.
  • Do not deduct for input type="hidden" when it carries native form state.

Icon purity: 15 points

Count raw icon markup in the copied file. astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-icons shows how to render icons through Astryx instead.

  • Count every raw svg, path, circle, rect, line, polyline, polygon, ellipse, or g used as an icon.
  • Count an inline SVG component defined in the template.
  • Count an icon component rendered directly instead of through Icon or an Astryx icon prop.
Raw SVG icon instancesPoints
015
1-210
3-55
6 or more0

Custom CSS: 15 points

Prefer Astryx component props and design tokens. Count individual CSS properties inside stylex.create and inline style objects. Count each className and stylex.props use once. Do not count Astryx props such as gap, padding, variant, size, color, level, columns, contentPadding, or height.

Custom style declarationsPoints
015
1-3, all justified because no Astryx alternative exists12
1-3, any unjustified because an Astryx prop exists8
4-105
11-202
21 or more0

This category scores styles authored in the copied source. A package stylesheet is graded through its effect on portability and the rendered app, not as a way to hide custom declarations from this count.

Layout and structure: 15 points

Page templates

  1. Use Layout or Center as the page root. A template whose category starts with Shell - uses AppShell because global chrome is its purpose.
  2. Outside a Shell - template, leave global navigation to the host app. Put in-page navigation in a LayoutPanel and page headings in LayoutHeader.
  3. Use Grid with columns={{minWidth: 280}} for responsive collections. Do not fix the column count or rebuild the grid in raw CSS.
  4. Use Center for centered content instead of custom flexbox workarounds.
  5. Render one page from one source file. Links may be inert examples, but the template does not create nested routes or router integration.
Page conditionPoints
Correct root, responsive grids, proper centering, and one page15
Valid root with a smaller issue such as fixed columns or multi-page behavior8
Wrong root for the category, a raw layout root, or no Astryx root0

Block templates

  1. Do not wrap a block in AppShell. A block renders inside a preview or page container.
  2. Keep the block focused on one pattern or component usage.
  3. Keep the composition substantial enough to teach the pattern and small enough to adapt. About 20-100 lines is the normal range.
Block conditionPoints
No AppShell, one focused pattern, and a reasonable length15
A smaller focus or length issue10
Wrapped in AppShell or deeply unfocused0

Doc metadata: 10 points

Score field accuracy for 6 points, the description for 3 points, and naming for 1 point. Read the source and doc together. A field that exists but disagrees with the source is not complete.

Fields: 6 points

Field conditionPoints
All applicable fields are present and accurate6
All fields are present with one inaccuracy4
One required field is missing2
Two or more required fields are missing, or no doc exists0

Description: 3 points

A strong description covers four slots: the archetype, the job someone does, the structural or behavioral differentiator, and the alternate words people may search. Use at least six distinct content words after removing generic words such as page, screen, app, view, and component names. Describe the reusable shape, not only the sample data.

Description conditionPoints
All four slots, 6 or more distinct content words, and clear separation from sibling templates3
Names and differentiates the pattern but misses one slot or leaves a synonym implicit2
Generic, repeats component names, or describes only the sample data1
Missing or restates the name0

Naming: 1 point

The id follows astryx docs cli/integrations/building-blocks/templates/start-a-template, displayName is readable, and a browsable page has a specific category (astryx docs cli/integrations/building-blocks/templates/document-the-template/page-template). Slug length is guidance, not a scored condition.

Naming conditionPoints
Id, display name, and applicable category follow the convention1
Any naming or category requirement is missed0

Image handling: 5 points

Inspect every image reference in the copied file against astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-images-media.

Image conditionPoints
No image is needed, or every image still works after copy and the demo-placeholder behavior is intentional5
One optional demo image is missing in preview, or a placeholder service remains2
An essential image breaks after copy, uses a package-relative path, or depends on an inaccessible URL0

Code quality: 10 points

Award 2 points for each condition. Grade the copied file, not only the package source.

ConditionPointsHow to verify
Correct client boundary2use client is the first executable statement when hooks, event handlers, or browser APIs require it. A static template does not add it without need.
Default export2The copied file has one default-exported React component.
Self-contained imports2Every import resolves from the copied location through React, a public Astryx path, a public integration-package export, or an app dependency the template explicitly requires.
Realistic example data2Content has realistic names, amounts, dates, lengths, and states instead of lorem ipsum or numbered placeholders.
No dead code2There are no unused imports or variables, commented-out blocks, or helpers that are never called.