Skip to content

GaZmagik/iso-24495 / skills/iso-24495-4

iso-24495-4

Verified

Provisional task skill for organisational plain language implementation (based on ISO/CD 24495-4, committee draft). Activates for plain language gap analysis, policy drafting, review workflow design, and organisational readiness for the future published standard. Does not activate for ordinary writing, rewriting, or reviewing of individual documents.

FileKindSize
SKILL.mdskill md5.2 KB
agents/openai.yamlconfig300 B
assets/gap-report-template.mdmarkdown1.3 KB
references/evidence-map.mdmarkdown1.4 KB
references/interview-guide.mdmarkdown1.4 KB
references/maturity-model.mdmarkdown2.7 KB
scripts/audit-corpus-cli.tsscript109 B
scripts/audit-corpus.tsscript50.8 KB
scripts/audit-evidence-cli.tsscript111 B
scripts/audit-evidence.tsscript3.1 KB
scripts/generate-report-cli.tsscript112 B
scripts/generate-report.tsscript5.0 KB
scripts/lib/lexicon.tsscript88.8 KB
scripts/lib/parse.tsscript49.8 KB
scripts/lib/types.tsscript1.6 KB
scripts/score-maturity-cli.tsscript111 B
scripts/score-maturity.tsscript2.3 KB
tests/audit-corpus.test.tsscript24.6 KB
tests/audit-evidence.test.tsscript1.4 KB
tests/behaviour-contract.test.tsscript111.1 KB
tests/cli.test.tsscript26.0 KB
tests/fixtures/answers.sample.jsonconfig880 B
tests/fixtures/corpus/average-heavy.mdmarkdown1.6 KB
tests/fixtures/corpus/code-fenced.mdmarkdown320 B
tests/fixtures/corpus/dense-paragraphs.mdmarkdown362 B
tests/fixtures/corpus/good-policy.mdmarkdown201 B
tests/fixtures/corpus/headings-broken.mdmarkdown115 B
tests/fixtures/corpus/legalese-sample.mdmarkdown226 B
tests/fixtures/corpus/long-sentences.mdmarkdown656 B
tests/fixtures/difficult/every-rule.mdmarkdown2.1 KB
tests/fixtures/difficult/us-foia-statute.mdmarkdown770 B
tests/fixtures/known-good/SOURCES.mdmarkdown3.7 KB
tests/fixtures/known-good/consumer-rights.mdmarkdown174 B
tests/fixtures/known-good/govuk-universal-credit.mdmarkdown1.1 KB
tests/fixtures/known-good/international-english.mdmarkdown206 B
tests/fixtures/known-good/names-and-measures.mdmarkdown161 B
tests/fixtures/known-good/public-service.mdmarkdown225 B
tests/fixtures/known-good/technical-guide.mdmarkdown208 B
tests/fixtures/known-good/warning.mdmarkdown127 B
tests/fixtures/reference-blocks.tsscript67.0 KB
tests/fixtures/repo-level0/docs/notes.mdmarkdown81 B
tests/fixtures/repo-level2/.github/PULL_REQUEST_TEMPLATE.mdmarkdown69 B
tests/fixtures/repo-level2/.github/workflows/text-lint.ymlconfig179 B
tests/fixtures/repo-level2/docs/plain-language-policy.mdmarkdown109 B
tests/fixtures/repo-level2/glossary.mdmarkdown89 B
tests/fixtures/repo-level2/training/introduction.mdmarkdown96 B
tests/generate-report.test.tsscript5.4 KB
tests/reference/README.mdmarkdown1.6 KB
tests/reference/build-fixture.tsscript8.1 KB
tests/reference/shapes.tsscript6.4 KB
tests/robustness.test.tsscript2.4 KB
tests/score-maturity.test.tsscript1.4 KB
tests/text-audit.test.tsscript11.0 KB

tests/generate-report.test.ts

View on GitHub
import { describe, expect, test } from "bun:test";
import { join } from "node:path";
import { auditCorpus } from "../scripts/audit-corpus.ts";
import { auditEvidence } from "../scripts/audit-evidence.ts";
import { generateReport } from "../scripts/generate-report.ts";
import { scoreMaturity } from "../scripts/score-maturity.ts";

const FIXTURES = join(import.meta.dir, "fixtures");
const findings = auditCorpus(join(FIXTURES, "corpus"));
const evidence = auditEvidence(join(FIXTURES, "repo-level2"));
const answers = await Bun.file(join(FIXTURES, "answers.sample.json")).json();
const maturity = scoreMaturity(answers);
const NOW = "2026-08-11T14:00:00.000Z";

/** Named in the failure, because a difference of 45 lines needs a reason. */
const REPORT_MUST_MATCH =
  "the report changed. Read the diff as what a reader gains or loses, and update this only when that is what you meant.";

describe("generateReport", () => {
  test("the report contains every required section", () => {
    const { report } = generateReport({ findings, evidence, maturity, state: null, now: NOW });
    for (const heading of ["## Maturity", "## Evidence", "## Corpus findings", "## Limitations"]) {
      expect(report).toContain(heading);
    }
  });

  test("the report declares its provisional basis", () => {
    const { report } = generateReport({ findings, evidence, maturity, state: null, now: NOW });
    expect(report).toContain("ISO/CD 24495-4");
    expect(report.toLowerCase()).toContain("provisional");
  });

  // The whole report, line for line.
  //
  // Four checks tried to describe what the report must not do: no word
  // "certified", then no comment opener, then no less-than sign, then no
  // image syntax. A review walked past each in turn, and the last two also
  // refused output the generator legitimately produces, because a second
  // evidence path is separated with a break tag.
  //
  // Describing a document by what it may not contain was the mistake. This
  // is what it does contain, on fixed inputs and a fixed clock, checked
  // against a renderer when it was written down. Comparing the next report
  // with the one that was reviewed needs no renderer here.
  //
  // Every earlier survivor fails against this: a comment or a hidden div
  // around the body, the disclaimer as an image caption or a reference
  // definition, a maturity level replaced by a literal, a count replaced by
  // zero, and a reversed sentence about text quality. The four tests this
  // replaces each checked one of those and missed the rest.
  test("the report is exactly this document", () => {
    const { report } = generateReport({ findings, evidence, maturity, state: null, now: NOW });
    expect(report.split(/\r?\n/), REPORT_MUST_MATCH).toEqual([
    "# Plain Language Gap Analysis",
    "",
    "> Provisional: this analysis is based on the public scope of ISO/CD 24495-4 (committee draft, unpublished). It is not a compliance statement and confers no certification. Audit date: 2026-08-11T14:00:00.000Z.",
    "",
    "## Maturity",
    "",
    "| Dimension | Level | Blocking criteria |",
    "|-----------|-------|-------------------|",
    "| governance | 2 | resourced-mandated |",
    "| capability | 1 | training-delivered |",
    "| process | 2 | signoff-gates |",
    "| measurement | 0 | corpus-baseline-taken |",
    "| culture | 1 | leadership-champions |",
    "",
    "Overall maturity (weakest dimension): **0**.",
    "",
    "## Evidence",
    "",
    "| Artefact category | Found | Paths |",
    "|-------------------|-------|-------|",
    "| policy | yes | docs/plain-language-policy.md |",
    "| review-workflow | yes | .github/PULL_REQUEST_TEMPLATE.md |",
    "| automated-checks | yes | .github/workflows/text-lint.yml |",
    "| training | yes | training/introduction.md |",
    "| glossary | yes | glossary.md |",
    "",
    "## Corpus findings",
    "",
    "| Rule | Violations |",
    "|------|------------|",
    "| sentence-average | 1 |",
    "| paragraph-length | 1 |",
    "| heading-depth | 2 |",
    "| legalese | 5 |",
    "| sentence-length | 2 |",
    "",
    "Corpus metrics are proxies for the Measurement dimension only. Text quality alone never raises a maturity level.",
    "",
    "## Limitations",
    "",
    "- The underlying standard is an unpublished committee draft; criteria may change.",
    "- Text heuristics are English-centric and approximate.",
    "- Maturity levels reflect the evidence supplied; absent evidence scores as absent.",
    "- A human reviewer must validate this report before the organisation acts on it.",
    "",
    ]);
  });

  test("a first run creates state with one timestamped snapshot", () => {

    const { state } = generateReport({ findings, evidence, maturity, state: null, now: NOW });
    expect(state.snapshots).toHaveLength(1);
    expect(state.snapshots[0].timestamp).toBe(NOW);
    expect(state.snapshots[0].totals["legalese"]).toBe(5);
  });

  test("a later run appends a snapshot without rewriting history", () => {
    const first = generateReport({ findings, evidence, maturity, state: null, now: NOW }).state;
    const LATER = "2026-11-01T09:00:00.000Z";
    const { state, report } = generateReport({ findings, evidence, maturity, state: first, now: LATER });
    expect(state.snapshots).toHaveLength(2);
    expect(state.snapshots[0]).toEqual(first.snapshots[0]);
    expect(state.snapshots[1].timestamp).toBe(LATER);
    expect(report).toContain("## Trend");
  });
});
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: 323kUpdated 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