Skip to content

GaZmagik/iso-24495 / skills/iso-24495-5

iso-24495-5

Flagged

Provisional sector-specific Plain Language standard for document design (based on ISO/WD 24495-5, under development). Applied when structuring complex documents so readers can find and navigate content through layout, visual hierarchy, and navigation aids.

tests/reference/build-pinned-documents.ts

View on GitHub
// Rebuild `../fixtures/pinned-documents.ts` from the documents themselves.
//
//   bun skills/iso-24495-5/tests/reference/build-pinned-documents.ts
//
// It prints the line counts and rewrites the fixture in place. Run it from the
// repository root, in the same commit as any edit to a document it covers.
//
// The fixture holds these documents whole rather than in pieces. Reviews taught
// that lesson twice over. First inside the text: a pinned phrase leaves every
// other phrase of its sentence deletable, so the expectations became whole
// blocks. Then around it: a whole block says nothing about the lines either
// side of it, and a review wrapped a pinned paragraph in image syntax so that
// it rendered as alternative text. The text was intact, the gate was green, and
// a browser showed neither.
//
// This script is checked in because the last generator was not. A reviewer
// twice said a claim about a script nobody could run was unsupported, and was
// right both times. A test runs this command, because the reviewer then found
// it broken by a missing import while the gate stayed green.

import { readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";

import { SHIPPED_DOCUMENTS } from "./shipped-documents.ts";

const REPOSITORY_ROOT = join(import.meta.dir, "..", "..", "..", "..");
// Written where told, so a check can rebuild without touching the fixture
// it is checking. A test ran this command against the fixture itself, and a
// failing run then adopted the change it had just rejected.
const FIXTURE = process.argv[2]
  ?? join(import.meta.dir, "..", "fixtures", "pinned-documents.ts");

const entries = SHIPPED_DOCUMENTS.map((file) => {
  const lines = readFileSync(join(REPOSITORY_ROOT, file), "utf8").split(/\r?\n/);
  console.log(`${file}: ${lines.length} lines`);
  const body = lines.map((line) => `    ${JSON.stringify(line)},`).join("\n");
  return `  ${JSON.stringify(file)}: [\n${body}\n  ],`;
}).join("\n");

const contents = `// Generated by ../reference/build-pinned-documents.ts. Do not edit by hand.
//
// Every line of every document this repository pins. Run the builder in the
// same commit as any edit to one of them, and read the diff here as the record
// of what a reader's page gained or lost.

export const PINNED_DOCUMENT_TEXT: Record<string, string[]> = {
${entries}
};
`;

writeFileSync(FIXTURE, contents, "utf8");
console.log(`wrote ${FIXTURE}`);
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall