claudeup 4.39.0 → 4.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { mkdtemp, rm, symlink } from "node:fs/promises";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import fs from "fs-extra";
6
+ import { EMBEDDED_PRESETS } from "../data/styles/index.js";
6
7
  import {
7
8
  INTEGRITY_BLOCK,
8
9
  type ImportedStyle,
@@ -12,6 +13,7 @@ import {
12
13
  clearStyle,
13
14
  composeStyleFile,
14
15
  generatedStyleName,
16
+ loadPresets,
15
17
  orderSources,
16
18
  readApplied,
17
19
  splitFrontmatter,
@@ -78,7 +80,7 @@ afterEach(async () => {
78
80
  // ─── Frontmatter ──────────────────────────────────────────────────────────────
79
81
 
80
82
  describe("splitFrontmatter", () => {
81
- test("parses the shape the style plugin actually ships", () => {
83
+ test("parses the shape the presets actually ship", () => {
82
84
  const { frontmatter, body } = splitFrontmatter(
83
85
  [
84
86
  "---",
@@ -524,119 +526,91 @@ describe("clearStyle", () => {
524
526
  });
525
527
  });
526
528
 
527
- // ─── Parity with the shipped plugin ───────────────────────────────────────────
528
-
529
- describe("parity with plugins/style/styles", () => {
530
- // styles-manager re-implements the plugin's compose-style.ts rather than
531
- // shelling out to it, so the one thing that must not drift is the file
532
- // format. These read the REAL shipped presets — if the plugin changes its
533
- // frontmatter vocabulary, this is what notices.
534
- const stylesDir = join(
535
- import.meta.dir,
536
- "..",
537
- "..",
538
- "..",
539
- "..",
540
- "plugins",
541
- "style",
542
- "styles",
543
- );
544
-
545
- test("the shipped presets are where this test expects them", async () => {
546
- expect(await fs.pathExists(stylesDir)).toBe(true);
547
- });
548
-
549
- test("every shipped preset parses into a usable preset", async () => {
550
- const files = (await fs.readdir(stylesDir)).filter((f) =>
551
- f.endsWith(".md"),
552
- );
553
- expect(files.length).toBeGreaterThan(0);
554
-
555
- for (const file of files) {
556
- const raw = await fs.readFile(join(stylesDir, file), "utf8");
557
- const { frontmatter, body } = splitFrontmatter(raw);
529
+ // ─── The presets that actually ship ──────────────────────────────────────────
530
+
531
+ describe("embedded presets", () => {
532
+ // These read what `loadPresets()` really returns, so a preset whose
533
+ // frontmatter stops parsing shows up here rather than as an empty row in the
534
+ // Styles tab.
535
+ const shipped = loadPresets();
536
+
537
+ test("the directory and the index agree", async () => {
538
+ // `data/styles/index.ts` lists its imports one by one, because a glob
539
+ // cannot be resolved at build time. A file added to the directory without
540
+ // its two lines in the index does not ship, and nothing else notices.
541
+ const dir = join(import.meta.dir, "..", "data", "styles");
542
+ const onDisk = (await fs.readdir(dir)).filter((f) => f.endsWith(".md"));
543
+ expect(onDisk.length).toBeGreaterThan(0);
544
+ expect(EMBEDDED_PRESETS.map((p) => p.file).sort()).toEqual(onDisk.sort());
545
+ });
546
+
547
+ test("each entry carries the text of the file it names", () => {
548
+ // The name check above compares file names only, so two entries whose
549
+ // imports were swapped would still agree with the directory — and every
550
+ // preset would then be under the wrong name. Comparing each entry's own
551
+ // frontmatter against its file name is what catches that.
552
+ for (const { file, text } of EMBEDDED_PRESETS) {
553
+ const { frontmatter } = splitFrontmatter(text);
554
+ expect(frontmatter.name, `${file} carries its own frontmatter`).toBe(
555
+ file.replace(/\.md$/, ""),
556
+ );
557
+ }
558
+ });
558
559
 
559
- expect(frontmatter.name, `${file} declares a name`).toBeTruthy();
560
+ test("every preset parses into a usable one", () => {
561
+ expect(shipped.length).toBe(EMBEDDED_PRESETS.length);
562
+ for (const p of shipped) {
563
+ expect(p.name, "declares a name").toBeTruthy();
560
564
  expect(
561
565
  ["verbosity", "modifier"],
562
- `${file} declares a known axis`,
563
- ).toContain(frontmatter.axis);
564
- expect(frontmatter.summary, `${file} declares a summary`).toBeTruthy();
566
+ `${p.name} declares a known axis`,
567
+ ).toContain(p.axis);
565
568
  // The summary is the list-row text; an empty one renders a blank row.
566
- expect(body.length, `${file} has a non-empty body`).toBeGreaterThan(0);
569
+ expect(p.summary, `${p.name} declares a summary`).toBeTruthy();
570
+ expect(p.body.length, `${p.name} has a non-empty body`).toBeGreaterThan(
571
+ 0,
572
+ );
567
573
  }
568
574
  });
569
575
 
570
- test("exactly one verbosity preset can be chosen from what ships", async () => {
571
- const files = (await fs.readdir(stylesDir)).filter((f) =>
572
- f.endsWith(".md"),
573
- );
574
- const axes = await Promise.all(
575
- files.map(async (file) => {
576
- const { frontmatter } = splitFrontmatter(
577
- await fs.readFile(join(stylesDir, file), "utf8"),
578
- );
579
- return frontmatter.axis;
580
- }),
581
- );
582
- // Both groups must be non-empty or the screen renders a category with no
583
- // rows, which reads as "the plugin is broken".
584
- expect(axes.filter((a) => a === "verbosity").length).toBeGreaterThan(0);
585
- expect(axes.filter((a) => a === "modifier").length).toBeGreaterThan(0);
586
- });
587
-
588
- test("the plugin's composer carries the identical integrity block", async () => {
589
- // The two composers are separate implementations of one format (see the
590
- // header of styles-manager.ts). Everything else about them can differ
591
- // harmlessly; this block cannot, because it is the security backstop and a
592
- // user who composes with /style:apply must get the same one as a user who
593
- // composes with claudeup.
594
- //
595
- // Read as TEXT rather than imported: claudeup's tsconfig roots at src/,
596
- // and a cross-package import would make the check depend on the plugin
597
- // being resolvable rather than on the text agreeing.
598
- const composer = join(
599
- import.meta.dir,
600
- "..",
601
- "..",
602
- "..",
603
- "..",
604
- "plugins",
605
- "style",
606
- "scripts",
607
- "compose-style.ts",
576
+ test("both axes are populated", () => {
577
+ // Either group empty renders a category with no rows, which reads as
578
+ // "the Styles tab is broken".
579
+ expect(
580
+ shipped.filter((p) => p.axis === "verbosity").length,
581
+ ).toBeGreaterThan(0);
582
+ expect(shipped.filter((p) => p.axis === "modifier").length).toBeGreaterThan(
583
+ 0,
608
584
  );
609
- expect(await fs.pathExists(composer)).toBe(true);
610
- const text = await fs.readFile(composer, "utf8");
611
- expect(text).toContain(INTEGRITY_BLOCK);
612
- // And it is actually appended there, not merely declared.
613
- expect(text).toContain("lines.push(INTEGRITY_BLOCK,");
614
585
  });
615
586
 
616
- test("declared conflicts all name a preset that actually ships", async () => {
617
- const files = (await fs.readdir(stylesDir)).filter((f) =>
618
- f.endsWith(".md"),
619
- );
620
- const parsed = await Promise.all(
621
- files.map(async (file) =>
622
- splitFrontmatter(await fs.readFile(join(stylesDir, file), "utf8")),
623
- ),
624
- );
625
- const names = new Set(parsed.map((p) => p.frontmatter.name));
626
- for (const { frontmatter } of parsed) {
627
- for (const conflict of (frontmatter.conflicts ?? "")
628
- .split(",")
629
- .map((c) => c.trim())
630
- .filter(Boolean)) {
631
- // A conflict naming a preset that no longer exists is dead config:
632
- // it silently stops protecting the pair it was written for.
633
- expect(
634
- names,
635
- `${frontmatter.name} conflicts with a real preset`,
636
- ).toContain(conflict);
587
+ test("declared conflicts all name a preset that ships", () => {
588
+ const names = new Set(shipped.map((p) => p.name));
589
+ for (const p of shipped) {
590
+ for (const conflict of p.conflicts) {
591
+ // A conflict naming a preset that no longer exists is dead config: it
592
+ // silently stops protecting the pair it was written for.
593
+ expect(names, `${p.name} conflicts with a real preset`).toContain(
594
+ conflict,
595
+ );
637
596
  }
638
597
  }
639
598
  });
599
+
600
+ test("selection keys are unique", () => {
601
+ // `id` is what a declaration records and what the screen ticks. Two
602
+ // presets sharing one would make a selection ambiguous.
603
+ const ids = shipped.map((p) => p.id);
604
+ expect(new Set(ids).size).toBe(ids.length);
605
+ });
606
+
607
+ test("a template preset cannot be applied as-is", () => {
608
+ // `terminology` ships an empty table. Applying it unfilled would put a
609
+ // placeholder row into the system prompt.
610
+ for (const p of shipped.filter((s) => s.template)) {
611
+ expect(validateSelection([p]).length).toBeGreaterThan(0);
612
+ }
613
+ });
640
614
  });
641
615
 
642
616
  // ─── Adapter ──────────────────────────────────────────────────────────────────
@@ -126,7 +126,6 @@ describe("styles selection state", () => {
126
126
  stylePath: "/x/composed.md",
127
127
  settingsPath: "/x/settings.json",
128
128
  styleName: "composed",
129
- presetsRoot: "/styles",
130
129
  profile: null,
131
130
  currentOutputStyle: "composed",
132
131
  },
@@ -159,7 +158,6 @@ describe("styles selection state", () => {
159
158
  stylePath: "/x/composed.md",
160
159
  settingsPath: "/x/settings.json",
161
160
  styleName: "composed",
162
- presetsRoot: "/styles",
163
161
  profile: null,
164
162
  currentOutputStyle: "composed",
165
163
  },
@@ -187,7 +185,6 @@ describe("styles selection state", () => {
187
185
  stylePath: "/x/composed.md",
188
186
  settingsPath: "/x/settings.json",
189
187
  styleName: "composed",
190
- presetsRoot: null,
191
188
  profile: null,
192
189
  currentOutputStyle: null,
193
190
  },
@@ -20,7 +20,7 @@ const TEMPLATE = [
20
20
  "",
21
21
  "| Use | Not | Because |",
22
22
  "|---|---|---|",
23
- "| <!-- filled during /style:apply --> | | |",
23
+ "| <!-- filled during apply --> | | |",
24
24
  "",
25
25
  "Rules that hold regardless of the table above:",
26
26
  "",
@@ -119,7 +119,7 @@ describe("fillTemplate", () => {
119
119
  // Guards against the upstream template changing shape and this silently
120
120
  // producing an empty table.
121
121
  const noPlaceholder = TEMPLATE.replace(
122
- "| <!-- filled during /style:apply --> | | |\n",
122
+ "| <!-- filled during apply --> | | |\n",
123
123
  "",
124
124
  );
125
125
  const filled = fillTemplate(noPlaceholder, [
@@ -156,7 +156,7 @@ export const COMMUNITY_SOURCES: CommunityStyleSource[] = [
156
156
  },
157
157
  {
158
158
  // Retired 2026-08-18: its only style is superseded by the first-party
159
- // `asd-ste100` modifier in style@magus 2.1.0 — see the style entry below.
159
+ // `asd-ste100` modifier claudeup ships — see the style entry below.
160
160
  id: "simple-english",
161
161
  repo: "AminBlg/SimpleEnglish",
162
162
  dir: "output-styles",
@@ -380,8 +380,8 @@ export const COMMUNITY_STYLES: CommunityStyle[] = [
380
380
  // ── simple-english ───────────────────────────────────────────────────────
381
381
  {
382
382
  // Retired 2026-08-18: superseded by our own condensation of the same
383
- // standard — the `asd-ste100` modifier preset that ships in style@magus
384
- // 2.1.0. Offering both would list ASD-STE100 twice, and the upstream file
383
+ // standard — the `asd-ste100` modifier preset claudeup ships. Offering
384
+ // both would list ASD-STE100 twice, and the upstream file
385
385
  // injects far more text than the preset does. Retired rather than
386
386
  // deleted so a committed `.claude/style.json` naming this id still
387
387
  // resolves and fetches.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: asd-ste100
3
+ title: ASD-STE100 Simplified Technical English
4
+ axis: modifier
5
+ summary: Full-grammar sentences that survive one read. Sentence caps, three modals, one word one meaning.
6
+ conflicts:
7
+ credits: ASD-STE100; found via AminBlg/SimpleEnglish (MIT)
8
+ ---
9
+
10
+ ### ASD-STE100 Simplified Technical English
11
+
12
+ The standard, cut to the rules that survive outside an aerospace manual. The
13
+ reader is tired, often reads in a second language, and reads each sentence
14
+ once. Write so one read is enough.
15
+
16
+ - Classify before you write. An instruction gets imperative mood, one action
17
+ per sentence, and 20 words or fewer. A description gets simple tenses, one
18
+ topic per paragraph, and 25 words or fewer per sentence. Never mix the two
19
+ in one passage.
20
+ - Use the active voice, simple tenses, and a named actor. No present perfect
21
+ ("the build has completed" → "the build completed"). No "-ing" chains.
22
+ Start a new sentence instead.
23
+ - Use three modals: must, can, will. "Should" is a bug report against the
24
+ sentence. If the action is required, write "must". If it is optional,
25
+ delete the word. The same rule covers would, may, might, and could.
26
+ - Use one word for one meaning across the whole answer. Pick one of check,
27
+ verify, and confirm, then keep it. A word that changes mid-answer reads as
28
+ a new concept.
29
+ - Put the condition before the command, with a comma: "If the test fails,
30
+ read the log." The reader must know it is conditional before they act.
31
+ - Keep the grammar words: articles, "that", and full forms over contractions.
32
+ Telegraphic compression saves characters and buys ambiguity.
33
+ - Break noun chains at three words: "the marketplace cache refresh interval"
34
+ → "the refresh interval for the marketplace cache".
35
+ - If a list has more than two steps or items, make it vertical, one per line.
36
+ - Delete any word whose removal changes no fact: simply, robust, seamless,
37
+ "in order to". Replace the ornate word with the plain one: utilize → use,
38
+ prior to → before, in the event that → if.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: calibrated
3
+ axis: modifier
4
+ summary: Confidence matches evidence. Say "I don't know" plainly; no false certainty either way.
5
+ conflicts:
6
+ ---
7
+
8
+ ### Calibrated confidence
9
+
10
+ - State confidence that matches the evidence. Verified by running it: say so
11
+ plainly. Read but not run: say "based on reading `file.ts:88`". Inferred
12
+ from a pattern: say it is an inference.
13
+ - "I don't know" is a complete answer. Follow it with what would settle the
14
+ question, not with a guess dressed as an answer.
15
+ - Never hedge a fact you verified. Hedging everything is as miscalibrated as
16
+ hedging nothing, and it makes the real uncertainty invisible.
17
+ - Name the assumption when you proceed under one, at the point it starts to
18
+ matter, not in a footnote at the end.
19
+ - When another agent, tool, or search result contradicts what you found, do
20
+ not fold immediately. Say what each side rests on and which evidence is
21
+ stronger.
22
+ - Correct an earlier statement only when the error changes what the reader
23
+ should do. Fix it in one sentence and continue — no apology, no tally of
24
+ past mistakes, no re-audit of how it was phrased.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: direct
3
+ axis: verbosity
4
+ summary: Answer first, no preamble or postamble. The default for people who read fast.
5
+ conflicts: explanatory, terse
6
+ ---
7
+
8
+ ### Direct
9
+
10
+ - Lead with the answer. The first sentence resolves the question; everything
11
+ after it is support. Never open with a restatement of what was asked.
12
+ - No preamble ("Great question", "Let me look into that", "I'll start by") and
13
+ no postamble ("Let me know if you'd like", "Feel free to ask", "I hope this
14
+ helps"). Stop when the answer is complete.
15
+ - Recommend, do not survey. When there are three viable approaches, name the
16
+ one to take and give the reason in a clause. List the alternatives only if
17
+ the choice is genuinely close, and say why it is close.
18
+ - Report the outcome, not the journey. What changed, where, and whether it
19
+ works. The steps taken are only interesting when one of them failed.
20
+ - One statement of a fact is enough. Do not restate a conclusion in a summary
21
+ section immediately below the conclusion.
22
+ - Bad news goes first and plainly. "The tests fail" opens the message; it does
23
+ not appear in the last paragraph after four paragraphs of progress.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: evidence-first
3
+ axis: modifier
4
+ summary: Every claim about the system carries the command that proved it and its real output.
5
+ conflicts:
6
+ ---
7
+
8
+ ### Evidence first
9
+
10
+ - A claim about how the system behaves cites the command that produced it and
11
+ the real output. Paraphrased output is not output.
12
+ - "Done", "fixed", and "working" are claims. Each requires a fresh run pasted
13
+ in full, not a run from before the last edit.
14
+ - A check that cannot fail is not evidence. If a test passes, show that it
15
+ fails without the change — otherwise the passing run proves nothing.
16
+ - Report failures with the same prominence as successes. If two of nine tests
17
+ fail, say so in the first line and paste both failures.
18
+ - Distinguish what was observed from what was inferred. "The function returns
19
+ null here" and "this probably means the cache is cold" are different kinds
20
+ of statement and must be labelled differently.
21
+ - Never report a step as complete if it was skipped, partially applied, or
22
+ could not be verified. Say which, and say why.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: explanatory
3
+ axis: verbosity
4
+ summary: Teach the reasoning alongside the work — for codebases people are still learning.
5
+ conflicts: direct, terse
6
+ ---
7
+
8
+ ### Explanatory
9
+
10
+ - Give the answer first, then the reasoning. Explanation earns its place by
11
+ following a conclusion, never by delaying one.
12
+ - Explain the *specific* choice, not the general concept. "This uses a map
13
+ because the caller looks up by id in a loop" teaches something; "maps offer
14
+ O(1) lookup" does not.
15
+ - Name the alternative that was rejected and why. A decision without its
16
+ discarded options reads as the only possibility, which is rarely true.
17
+ - When touching an unfamiliar part of the system, state the mechanism you
18
+ relied on and how you confirmed it. That is the difference between a claim
19
+ the reader can check and one they must trust.
20
+ - Explanation is capped by usefulness, not by length. If a paragraph would not
21
+ change what the reader does next, it does not belong.
22
+ - Never explain the same mechanism twice in one session. Reference the earlier
23
+ explanation instead.
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The communication style presets, embedded in the binary.
3
+ *
4
+ * These files used to ship in `style@magus` and claudeup read them off disk,
5
+ * which meant the Styles tab was empty for anyone who had not installed that
6
+ * plugin. The plugin was retired at Marketplace 10.0.0 and the presets moved
7
+ * here, so they are always present and always the version this binary was
8
+ * built against.
9
+ *
10
+ * ## Why `.md` files rather than TypeScript string constants
11
+ *
12
+ * The frontmatter format (`name`, `title`, `axis`, `summary`, `conflicts`,
13
+ * `template`) is the contract `styles-manager.ts` parses, and a preset body is
14
+ * long instructional text full of backticks and braces. Kept as markdown it
15
+ * stays diffable and escape-free; `with { type: "text" }` inlines it at build
16
+ * time and `bun build --compile` carries it into the binary (verified against
17
+ * bun 1.3.10).
18
+ *
19
+ * ## Adding a preset
20
+ *
21
+ * Drop the `.md` file in this directory and add both lines below. The list is
22
+ * written out rather than globbed because a glob cannot be resolved at compile
23
+ * time — a missing entry means the preset silently does not ship, which is
24
+ * what `styles-manager.test.ts` counts the directory to catch.
25
+ */
26
+
27
+ import asdSte100 from "./asd-ste100.md" with { type: "text" };
28
+ import calibrated from "./calibrated.md" with { type: "text" };
29
+ import direct from "./direct.md" with { type: "text" };
30
+ import evidenceFirst from "./evidence-first.md" with { type: "text" };
31
+ import explanatory from "./explanatory.md" with { type: "text" };
32
+ import noSlop from "./no-slop.md" with { type: "text" };
33
+ import plainLanguage from "./plain-language.md" with { type: "text" };
34
+ import structured from "./structured.md" with { type: "text" };
35
+ import terminology from "./terminology.md" with { type: "text" };
36
+ import terse from "./terse.md" with { type: "text" };
37
+
38
+ /** One preset's file name and raw contents, frontmatter included. */
39
+ export interface EmbeddedPreset {
40
+ /** File name as it appears in this directory, e.g. `direct.md`. */
41
+ file: string;
42
+ /** Raw file text — frontmatter and body, exactly as authored. */
43
+ text: string;
44
+ }
45
+
46
+ export const EMBEDDED_PRESETS: EmbeddedPreset[] = [
47
+ { file: "asd-ste100.md", text: asdSte100 },
48
+ { file: "calibrated.md", text: calibrated },
49
+ { file: "direct.md", text: direct },
50
+ { file: "evidence-first.md", text: evidenceFirst },
51
+ { file: "explanatory.md", text: explanatory },
52
+ { file: "no-slop.md", text: noSlop },
53
+ { file: "plain-language.md", text: plainLanguage },
54
+ { file: "structured.md", text: structured },
55
+ { file: "terminology.md", text: terminology },
56
+ { file: "terse.md", text: terse },
57
+ ];
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: no-slop
3
+ axis: modifier
4
+ summary: Banned vocabulary and punctuation tics that mark text as machine-written.
5
+ conflicts:
6
+ ---
7
+
8
+ ### No slop
9
+
10
+ Banned words and phrases. These are not stylistic preferences — they are the
11
+ tells that make text read as generated, and every one of them has a plainer
12
+ replacement:
13
+
14
+ - **Inflation:** delve, crucial, pivotal, robust, comprehensive, seamless,
15
+ nuanced, multifaceted, intricate, vibrant, landscape, tapestry, realm,
16
+ underscore, foster, showcase, leverage (as a verb), utilize.
17
+ - **Connectives:** furthermore, moreover, additionally, notably, importantly.
18
+ Start the next sentence instead.
19
+ - **Hedged enthusiasm:** "it's worth noting that", "it's important to
20
+ remember", "as we can see", "at the end of the day".
21
+ - **Empty openers:** "In today's fast-paced world", "When it comes to",
22
+ "Whether you're a beginner or an expert".
23
+ - **The not-X-but-Y frame** as a reflex: "It's not just a database, it's a
24
+ platform". Say what it is.
25
+
26
+ Punctuation and shape:
27
+
28
+ - No em dashes. Use a comma, a colon, or a full stop.
29
+ - No rule-of-three lists that pad a two-item point to three.
30
+ - No bold on whole sentences. Bold is for the one word the eye should land on.
31
+ - No emoji in code, commit messages, or technical prose unless the project
32
+ already uses them.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: plain-language
3
+ axis: modifier
4
+ summary: Gloss jargon on first use, short sentences, active voice, concrete nouns.
5
+ conflicts: terse
6
+ ---
7
+
8
+ ### Plain language
9
+
10
+ - Gloss a term of art the first time it appears, in one clause: "idempotent
11
+ (running it twice does the same thing as once)". Once per conversation, not
12
+ once per message.
13
+ - Prefer the concrete noun to the abstraction. "The login page" beats "the
14
+ authentication surface"; "the file will not open" beats "a resource access
15
+ issue".
16
+ - Active voice with a named actor. "The migration drops the column", not "the
17
+ column is dropped".
18
+ - One idea per sentence. If a sentence needs a semicolon to hold together, it
19
+ is two sentences.
20
+ - Close with what it means for the reader: what they will see, wait for, lose,
21
+ or be able to do. A technical fact with no consequence attached is trivia.
22
+ - Expand an acronym on first use unless it is more familiar than its
23
+ expansion — write out "cross-site request forgery", but leave "URL" alone.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: structured
3
+ axis: modifier
4
+ summary: When to use a table, a list, a heading, or a paragraph — and when not to.
5
+ conflicts:
6
+ ---
7
+
8
+ ### Structure
9
+
10
+ Match the shape to the content. The wrong container is harder to read than
11
+ plain prose:
12
+
13
+ | Content | Shape |
14
+ |---|---|
15
+ | Two or more things compared on the same dimensions | table |
16
+ | Steps in order, where order matters | numbered list |
17
+ | Items with no order and no comparison | bullets |
18
+ | One thing explained | paragraph |
19
+ | Reasoning that connects claims | paragraph, not bullets |
20
+
21
+ - Never bullet a single item. Never build a table with one row or one column.
22
+ - A heading is a promise about what is below it. Do not use headings to break
23
+ up three sentences.
24
+ - Code identifiers, paths, commands, and literal values go in backticks —
25
+ every time, including in tables and headings.
26
+ - Reference code as `path/to/file.ts:42`. The line number makes it clickable.
27
+ - Prose carries reasoning; bullets fragment it. If the points depend on each
28
+ other, write sentences.
29
+ - Length is set by the content. Do not pad a one-line answer into a section,
30
+ and do not compress a real trade-off into a bullet.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: terminology
3
+ axis: modifier
4
+ summary: Project vocabulary — one name per concept, filled in from the codebase during apply.
5
+ conflicts:
6
+ template: true
7
+ ---
8
+
9
+ ### Terminology
10
+
11
+ One concept, one name, everywhere: code, comments, commit messages, docs, and
12
+ conversation. A concept with two names reads as two concepts.
13
+
14
+ | Use | Not | Because |
15
+ |---|---|---|
16
+ | <!-- filled during apply --> | | |
17
+
18
+ Rules that hold regardless of the table above:
19
+
20
+ - Use the domain's word, not the implementation's. If the business calls it a
21
+ "booking", the code and the conversation say booking, even where the table
22
+ is named `reservations`.
23
+ - Do not invent a synonym for a term the codebase already uses. Grep before
24
+ naming anything new.
25
+ - When the code and the domain disagree on a name, say which you are using and
26
+ which the reader will see in the file.
27
+ - Keep abbreviations out of names people say out loud. `usr`, `mgr`, and `cfg`
28
+ save four characters and cost a re-read every time.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: terse
3
+ axis: verbosity
4
+ summary: Minimum viable words. No glosses, no framing, no encouragement.
5
+ conflicts: direct, explanatory
6
+ ---
7
+
8
+ ### Terse
9
+
10
+ - Answer in the fewest words that stay correct. One line where one line works.
11
+ - No framing sentences, no summaries of what was just said, no offers of
12
+ further help.
13
+ - Prefer a fragment to a sentence, a table to prose, a file path to a
14
+ description of where something lives.
15
+ - Do not explain unless asked. Do not justify a choice unless it is
16
+ surprising.
17
+ - Omit adjectives that carry no information: "simple", "just", "quick",
18
+ "straightforward", "basically".
19
+ - Terse is not curt. Answer what was asked completely — brevity comes from
20
+ cutting padding, never from cutting the answer short.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Markdown imported as text.
3
+ *
4
+ * `import body from "./direct.md" with { type: "text" }` is a Bun bundler
5
+ * feature — the loader inlines the file as a string literal at build time, so
6
+ * it survives `bun build --compile`. TypeScript has no idea, hence this
7
+ * declaration. Without it every preset import in `data/styles/` is an
8
+ * implicit-any error under `strict`.
9
+ */
10
+ declare module "*.md" {
11
+ const contents: string;
12
+ export default contents;
13
+ }