configuration/strings/home.fragment.strings.ts

configuration/strings/home.fragment.strings.ts is a file in Bane's Lab Site. 76 lines of code and 13 definitions.

import {
    ANATOMY_SHARE,
    ANATOMY_TITLE,
    ARCHITECTURE_SHARE,
    ARCHITECTURE_TITLE,
    FAQ_SHARE,
    FAQ_TITLE,
    GRAMMAR_SHARE,
    GRAMMAR_TITLE,
    METHODOLOGY_SHARE,
    METHODOLOGY_TITLE,
    ONTOLOGY_SHARE,
    ONTOLOGY_TITLE,
} from "#configuration/strings/page.strings";
import type { HomeRowCopy } from "#types/home.types";

const ENGINEERING_LEADS = "Engineering leads";
const SOFTWARE_ARCHITECTS = "Software architects";
const LLM_ASSISTED_DEVELOPERS = "LLM-assisted developers";
const TOOL_AUTHORS = "Tool authors";
const AUDIENCE_JOIN = " · ";

const AUDIENCE_ORDER: readonly string[] = [
    ENGINEERING_LEADS,
    SOFTWARE_ARCHITECTS,
    LLM_ASSISTED_DEVELOPERS,
    TOOL_AUTHORS,
];

const audienceOf = function audienceOf(chosen: ReadonlySet<string>): string {
    return AUDIENCE_ORDER.filter((label) => chosen.has(label)).join(AUDIENCE_JOIN);
};

export const GRAMMAR_ROW: HomeRowCopy = {
    audience: audienceOf(new Set([SOFTWARE_ARCHITECTS, LLM_ASSISTED_DEVELOPERS, TOOL_AUTHORS])),
    description:
        "Pattern Abstract Grammar is a structured format for writing instructions to a model. A document declares what type of instruction it is, draws its verbs from a closed vocabulary and ends every step on a gate with checkable evidence. The page covers the grammar, its validation rules and a set of templates.",
    go: "Read the grammar",
    subtitle: GRAMMAR_SHARE.headline,
    title: GRAMMAR_TITLE,
};

export const METHODOLOGY_ROW: HomeRowCopy = {
    audience: audienceOf(new Set([ENGINEERING_LEADS, SOFTWARE_ARCHITECTS, LLM_ASSISTED_DEVELOPERS])),
    description:
        "The method itself comes in six parts that follow the order of the work, from starting a project to shipping it. Each section describes one practice, how it fails when it is missing, and a test you can run against your own work to check it.",
    go: "Read the method",
    subtitle: METHODOLOGY_SHARE.headline,
    title: METHODOLOGY_TITLE,
};

export const ARCHITECTURE_ROW: HomeRowCopy = {
    audience: audienceOf(new Set([ENGINEERING_LEADS, SOFTWARE_ARCHITECTS, LLM_ASSISTED_DEVELOPERS])),
    description:
        "The page covers software architecture for systems in which a model writes much of the code. It models a system as a graph, holds each principle as a typed record, traces each anti-pattern back to the control whose absence caused it, and derives coverage from a grid rather than from a count.",
    go: "Read the architecture",
    subtitle: ARCHITECTURE_SHARE.tagline,
    title: ARCHITECTURE_TITLE,
};

export const ONTOLOGY_ROW: HomeRowCopy = {
    audience: audienceOf(new Set([SOFTWARE_ARCHITECTS, LLM_ASSISTED_DEVELOPERS, TOOL_AUTHORS])),
    description:
        "The ontology is the data behind the architecture page, and the site's own checks read it too. It holds every principle with its relations and repairs, every defined term, every algorithm contract, and how each tension between two principles is resolved.",
    go: "Open the ontology",
    subtitle: ONTOLOGY_SHARE.tagline,
    title: ONTOLOGY_TITLE,
};

export const ANATOMY_ROW: HomeRowCopy = {
    audience: audienceOf(new Set([SOFTWARE_ARCHITECTS, LLM_ASSISTED_DEVELOPERS, TOOL_AUTHORS])),
    description:
        "The anatomy page shows the source of every part of this site, from the client to the gate that checks it, parsed on every build. Each file is shown with its syntax walk, its definitions and the calls between them, together with the diagnoses the parser ran over every tree.",
    go: "Open the anatomy",
    subtitle: ANATOMY_SHARE.tagline,
    title: ANATOMY_TITLE,
};

export const FAQ_ROW: HomeRowCopy = {
    description:
        "Here I answer the questions I am asked most often about the methodology, including where it came from and where it stops being useful.",
    go: "Read the FAQ",
    subtitle: FAQ_SHARE.tagline,
    title: FAQ_TITLE,
};