Skip to article
SpiroChette
Category · pkms
Reserved panel

Future content type.

pkms · Altitude A3

Reading with altitude

Sort notes by how far they sit from the code, so each one answers one kind of question.

Published
2026-11-20
Updated
2026-11-26
Altitude
A3
Repo
github.com/withastro/astro
pkmsaimarkdown

Sample article for theme testing (provisional). 02-Content replaces it.

Notes drift. A page that starts as a question picks up a design, then a command, then a stack trace, and by the end nobody can say what it is for. Altitude is a label that pins each note to one level, so a reader knows what kind of answer to expect before reading it.

Four altitudes

Each level answers a different question. The labels are short so they fit in a kicker.

Altitude Focus Question it answers Typical output Who reads it first How often it changes
A1 Intent Why are we doing this at all? Questions and goals Owner Rarely
A2 Structure What are the parts and how do they meet? Components and boundaries Architect Per release
A3 Method How will each part be built? Approach and steps Developer Per work package
A4 Implementation What exactly runs? Code and configuration Reviewer Every commit

Note — A note can link to notes at other altitudes. It should not contain them.

Choosing a level

Ask what a reader would do with the note. If they would decide something, it is A1 or A2. If they would build something, it is A3. If they would run or paste something, it is A4.

When a note spans two levels

Split it. Two short notes that each answer one question are easier to find and to trust than one long note that answers two.

Tip — Put the altitude in the note’s front matter, so a list or a search can filter on it.

Code in notes

An A4 note is mostly code. The block below declares a file name and highlights the line that matters.

note-schema.ts
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';

const notes = defineCollection({
  loader: glob({ base: './notes', pattern: '**/*.md' }),
  schema: z.object({
    title: z.string(),
    altitude: z.enum(['A1', 'A2', 'A3', 'A4']).optional(),
  }),
});

Showing a change

When a note records a fix, show it as a diff rather than two separate blocks.

read-tags.ts
export function readTags(value: unknown): string[] {
  const tags = value as string[]; 
  const tags = Array.isArray(value) ? value.filter((t) => typeof t === 'string') : []; 
  return tags;
}

A long command

bash
echo "This sentence is deliberately much longer than the column, so the code block has to scroll sideways while the article keeps its width."

Warning — Never paste a secret into a note, even an A4 one. Point to where the secret lives instead.

Keeping notes honest

A note is only as good as its last check. Each one carries the date it was published and, when it changes, the date it was updated. A reader who sees an old date knows to verify before relying on it.

Review A4 notes most often: they rot fastest, because the code they describe keeps moving. A1 notes change least; when one does change, every note below it deserves a look.

Links between levels are the useful part. An A1 note points down to the A2 notes that serve it; an A3 note points up to the structure it implements and down to the code that implements it. Following those links is how a reader climbs or descends.

Retiring a note

When a note no longer matches reality, either fix it or retire it. A retired note keeps its address and says where its replacement lives, so old links still lead somewhere.

Summary

Pick one altitude per note, say which one in the front matter, and link across levels instead of mixing them. The rest of the system — search, tags, review — works better once every note knows what it is for.