Taste.

rules that can refuse

Everything, in order

The whole library.

6 files, one after another, with the prose and the code. Nothing here is hidden behind a setting.

AGENTS.md

A taste library. Read this file and _general.md, then at most one category file.

Loading

  • This file and _general.md: always.
  • A category file: only when the work touches that category. Don't load film opinions to write a button.
  • If the work spans two categories, load both and say so.
  • _derive.md: only when running a derive.
  • taste.mjs and _transcripts/ are machinery, not reading.

Where this stops

This library is taste, not policy. The project's own rules — voice, sourcing, no third-party requests, no invented facts — are not repeated here, and this library is not a substitute for them.

Strength

  • [hard] non-negotiable. Don't violate without saying you are.
  • [soft] typical. Violating needs a reason.
  • [guess] unverified. Treat as a hypothesis to check, not a rule.
  • Unmarked and undated: weight down.

Posture

Use this library mainly to reject, not to compliment. "This is very you" is worthless; "this fails rule 3" is worth something.

  • Cite the file when rejecting: category and rule.
  • State the conflict before offering the alternative.
  • Don't smooth over tensions. If two rules fight, name the fight and pick one out loud.

Deviation

Deviate on purpose sometimes and announce it. A fully taste-matched output is an output you've already made.

Silence

When a category file is silent or missing, ask. Don't infer from an adjacent category, and don't extrapolate from a single [guess].

Conflicts

Hard beats soft. Newer beats older. A named tension beats a guess. If it's still ambiguous, ask.

Never

  • Load every file at once.
  • Describe the user back to them from the library.
  • Treat a category file as a spec to satisfy completely.
  • Invent an entry that isn't in the file.

LICENSE

To the extent possible under law, the author has waived all copyright and related or neighboring rights to this work.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Full text: https://creativecommons.org/publicdomain/zero/1.0/legalcode

No warranty. The work is provided as is, and the author is not liable for any use of it.

README.md

For the human. How to derive, maintain and retire files in this directory.

What this is

A personal taste spec, one file per category, read by coding agents so they stop guessing what you like. Categories are earned, not declared.

When to derive a new category

  • You've had a real, specific reaction to a real thing in it, recently.
  • You can name peak loves and adjacent failures without looking them up.
  • A project of yours actually needs it.

When not to

  • You're filling out a directory. Twenty thin files are worse than four good ones.
  • You're writing what you wish you liked.
  • The category is adjacent to one you already have — extend that one instead.

Earned

derive refuses a slug that is not on this list, so the reason for a category lives here rather than in the interview.

  • example — 2026-01-01. Replace this line when you have a real one; the date and the reason are the point.

A category that stops being used moves to ## Retired in its own file and off this list.

The ritual

  1. Run _derive.md for the category. Two or three sittings, not one.
  2. Write the file from the transcript only. Every claim cites something said or is marked [guess].
  3. Read it back a day later and delete anything that describes anyone.
  4. Anti-patterns must be at least as long as the needs. If they aren't, the interview stopped early — go back, don't pad.

Maintenance

  • Date every file: Derived: and Read-back: in the header. A read-back date in the past stops publish --check until you write Read-back: done <date>. If a date is unknown, record the bound rather than invent one.
  • Retire by moving to a ## Retired section with the reason. Don't delete silently — a changed mind is data.
  • A claim you reversed goes to ## Changed my mind with the date, the old claim and what replaced it.
  • Prune one file a month. If nothing in it survives the read, retire the file.
  • Re-derive rather than append forever.

Signs it's failing

  • You're writing entries without having had the reaction.
  • An agent produces something on-brand and you're bored by it.
  • The files agree with each other more every month.
  • Maintaining this costs more than the projects do. Then delete files.

Structure

AGENTS.md and _general.md always loaded, one category file on demand, _derive.md for the interview. Category filenames are lowercase and singular in topic: tv.md, games.md, writing.md, ui.md. Each header carries Derived: and Read-back:.

_general.md holds rules that at least two category files support, each tagged with the categories it came from. A rule with one source stays in that category.

taste.mjs is the two commands. _transcripts/ holds the dated interviews every claim is written from.

Using it from another project

Point the agent at the directory and it will read AGENTS.md. To make it installable as a skill, add a SKILL.md with a name of your own:

---
name: my-taste
description: Read this library before making a build decision, when asked whether something fits, or when deriving a new taste category.
---

Read `AGENTS.md`, then `_general.md`, then at most one category file.

The name has to be yours. Two skills called taste inside one agent collide, so this template does not ship one.

Publishing

Optional. publish writes a compiled page into a site directory of your choosing; --check fails when the site differs from the library, when the public blocks contain third person or strength markers, when the review date has passed, or while a Read-back: date is in the past.

Set PIPEFORGE_DIR (or edit PIPE in taste.mjs) to point it at a site. If you never publish, delete the command.

What goes public is _general.md minus the internal source tags and the notes section, the ## Public section of each category, and nothing else. Transcripts, behaviour and named people stay private.

_derive.md

Interview protocol. Produces taste/[category].md. Run only when README says the category is earned.

Method: peak loves -> specific moments -> adjacent counter-examples -> behaviour -> outliers -> a hypothesis the user corrects -> the tension -> the cut.

Interviewer rules

  • Never accept a genre word. Push to a moment.
  • One question at a time. Wait. Don't stack.
  • From phase 4, hold a hypothesis out loud and ask where it's wrong.
  • When corrected, chase the correction for two questions. Never defend.
  • Keep verbatim phrases and quote them in the output.
  • Don't compliment. React only when the model changes.
  • If an answer could apply to anyone, say so and re-ask.
  • If the question is refused — "i dont understand", "example?" — change the object of the question. Do not repeat it in the same words.
  • If an abstract ask comes back as "anything specific?", give examples of the shape being asked for, not guesses about the answer.
  • Mark every claim [hard], [soft] or [guess]. Uncited means [guess].

Phases

  1. Peak, not library: three to five with the most hours. Which is furthest ahead?
  2. The moment: what were they doing ten minutes before it clicked; what does doing it well look like; what absence would hurt most.
  3. Counter-examples: three in the same genre they wanted to like and couldn't; moment or drift; which is closest to something loved, and the single difference. This phase earns its keep — force adjacency.
  4. Behaviour: when, how long, alone or not, what ends it, do they return. Then state the hypothesis. Ask where it's wrong. Chase.
  5. Outliers: something loved that doesn't fit. What does it give that the pattern doesn't. Different appetite, or same one delivered differently.
  6. Tensions: two answers that pull against each other. Don't resolve. Ask which wins.
  7. The cut: rank the needs, what gets sacrificed first, what absence makes it not their thing.

Output

Profile, needs, hard rules, anti-patterns with the counter-examples as named evidence, aesthetics, tensions, open questions, "never for this category". Anti-patterns at least as long as the needs.

Header carries Derived: and Read-back:; the read-back is the date one day later, and only becomes Read-back: done <date> after the deletions happen.

A claim reversed during or after the interview goes to ## Changed my mind with the date, the old claim and the replacement. It does not get quietly overwritten.

Self-check

Every claim cited or [guess]? An outlier and a tension? Anti-patterns long enough? Anything that could describe anyone? Would this file let an agent reject an idea? Is the Read-back: date set?

Never

  • Ask for a library list.
  • Take the first answer to "what's your favourite".
  • Smooth a contradiction.
  • Write the file from phases 1-2 alone.

_general.md

Rules that hold across more than one category. A rule supported by one category belongs in that category.

Drawn from: nothing yet. Add a rule only when a second category argues for it.

Never for this file

  • A rule only one category supports. Put it back.
  • A rule that could describe any careful maker.

Notes for me

  • Each rule is tagged [from: a, b] with the categories that support it.
  • Unmarked entries read as [soft] until re-checked.
  • This section is not published.

taste.mjs

#!/usr/bin/env node
/**
 * taste — the two verbs that are code.
 *
 *   node taste.mjs derive <category>    scaffold a transcript, then run _derive.md
 *   node taste.mjs publish              compile taste.md and social.md into pipeforge
 *   node taste.mjs publish --check      re-compile and diff; fails on drift
 *   node taste.mjs publish --review     keep the text, move the review date
 *
 * `taste build` is not here. It is a reading protocol, described in SKILL.md.
 *
 * Publish is deterministic: bodies are compiled from the library with no dates
 * in them, and dates live only in the provenance comment. Re-running publish
 * with an unchanged library writes nothing.
 */

import { createHash } from "node:crypto";
import { access, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
import { homedir } from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";

const HERE = path.dirname(fileURLToPath(import.meta.url));
const PIPE = process.env.PIPEFORGE_DIR || path.join(homedir(), "Documents", "pipeforge");

const REVIEW_DAYS = 90;

const META = new Set(["AGENTS.md", "README.md", "SKILL.md"]);

/** Written first line of every published file. Dates are provenance, not content. */
const HEADER =
  /^<!-- generated by taste publish; do not edit; derived: (\d{4}-\d{2}-\d{2}); review: (\d{4}-\d{2}-\d{2}); body-sha256: ([0-9a-f]{64}) -->\n\n/;

function sha256(text) {
  return createHash("sha256").update(text, "utf8").digest("hex");
}

function today() {
  const now = new Date();
  const pad = (value) => String(value).padStart(2, "0");
  return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;
}

function addDays(iso, days) {
  const date = new Date(`${iso}T00:00:00Z`);
  date.setUTCDate(date.getUTCDate() + days);
  return date.toISOString().slice(0, 10);
}

/**
 * A category header carries `Read-back: <date>` until the day-later read has
 * happened, then `Read-back: done <date>`. A date in the past that is still
 * pending is a draft being published early. Files that predate the convention
 * have no line and are left alone rather than retro-failed.
 */
function readBack(source) {
  const match = source.match(/^Read-back:[ \t]*(.+)$/m);
  if (!match) return { state: "unrecorded" };
  const value = match[1].trim();
  if (/^done\b/i.test(value)) return { state: "done" };
  if (/^\d{4}-\d{2}-\d{2}$/.test(value)) return { state: "due", date: value };
  return { state: "unknown", value };
}

/**
 * README's "## Earned" list is the gate. Categories are earned, not declared,
 * and the list is the only place that says which. Returns the reason text, or
 * null when the category is not on it.
 */
function earnedReason(readme, category) {
  const section = readme.split(/^## Earned$/m)[1];
  if (!section) return null;
  const block = section.split(/^## /m)[0];
  const line = block.match(new RegExp(`^-\\s+\`${category}\`\\s*[—–-]?\\s*(.*)$`, "m"));
  return line ? line[1].trim() : null;
}

async function exists(file) {
  try {
    await access(file);
    return true;
  } catch {
    return false;
  }
}

async function read(file) {
  return readFile(path.join(HERE, file), "utf8");
}

function readSection(source, title) {
  const start = source.match(new RegExp(`^## ${title}\\s*$`, "m"));
  if (!start) return "";
  const rest = source.slice(start.index + start[0].length);
  const next = rest.search(/^## /m);
  return (next === -1 ? rest : rest.slice(0, next)).trim();
}

function dropSection(source, title) {
  const start = source.match(new RegExp(`^## ${title}\\s*$`, "m"));
  if (!start) return source;
  const rest = source.slice(start.index);
  const next = rest.slice(1).search(/^## /m);
  const end = next === -1 ? source.length : start.index + 1 + next;
  return (source.slice(0, start.index) + source.slice(end)).trim();
}

function stripTitle(source) {
  return source.replace(/^#[^\n]*\n+/, "");
}

/**
 * Category files are written for an agent and carry bookkeeping an outside
 * reader does not need: source tags and the "never for this file" note. Strength
 * markers stay, because which parts are checked is the point.
 */
function stripForPublic(source) {
  return dropSection(dropSection(source, "Never for this file"), "Notes for me")
    // A tag on its own line goes with its newline; an inline tag goes with its
    // backticks. Doing the standalone case first keeps list items joined.
    .replace(/\n[ \t]*`?\[from:[^\]]+\]`?[ \t]*(?=\n)/g, "")
    .replace(/[ \t]*`?\[from:[^\]]+\]`?/g, "")
    .replace(/[ \t]+$/gm, "")
    .replace(/\n{3,}/g, "\n\n")
    .trim();
}

function titleCase(word) {
  return word.charAt(0).toUpperCase() + word.slice(1);
}

async function categories() {
  const files = (await readdir(HERE))
    .filter((file) => file.endsWith(".md") && !file.startsWith("_") && !META.has(file))
    .sort();

  const published = [];
  const skipped = [];

  for (const file of files) {
    const source = await read(file);
    const body = readSection(source, "Public");
    if (!body) {
      skipped.push(file);
      continue;
    }
    const name = source.match(/^Category:\s*([^.\n]+)/m)?.[1].trim() || file.replace(/\.md$/, "");
    published.push({ file, name: titleCase(name), body, readBack: readBack(source) });
  }

  return { published, skipped };
}

function composeTaste({ general, published }) {
  const names = published.map((category) => category.name);
  const list =
    names.length === 1
      ? names[0]
      : `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;

  const sections = published
    .map((category) => `## ${category.name}\n\n${category.body}`)
    .join("\n\n");

  // General sits one level under the page: its rules are subsections, like each
  // category's entries.
  const generalBody = general.replace(/^## /gm, "### ");

  return `# Taste

A summary of a private taste library. The rules and the counter-examples are
here; the interviews, the behaviour data and anything that names a person stay
private.

It is grounds for refusal, not a description to live up to. If you are working
with me and a direction fails one of these, say which one and move on.

Categories so far: ${list}.

A category is added when it has been earned, not to fill a list.

If you want to work on something, [say so](/social). The same link is at the
bottom, if you got here by reading instead.

## How to read this

- [hard] is not negotiable. [soft] needs a reason. [guess] is unverified and is
  a question to ask, not a rule to apply.
- Silence is not permission. If something is not covered here, ask me.
- One deliberate violation per project is allowed, and it has to be announced.
- A rejection needs a rule cited. "This fails the runs-not-saves rule" is
  useful; "this is not quite my thing" is not.

## General

${generalBody}

${sections}

## What is not here

The full category files, the interview transcripts and the behaviour data stay
private. What is published is the criteria and the current state, not the record.

The template that builds this page is public: [Taste](https://taste.pipeforge.org).

## How to reach me

[How to reach me](/social) says what I am open to and what to put in the
message.
`;
}

async function compile() {
  const general = stripForPublic(stripTitle(await read("_general.md")));
  const { published, skipped } = await categories();
  const social = (await read("_social.md")).trim() + "\n";

  return {
    taste: composeTaste({ general, published }),
    social,
    skipped,
    published,
    publicText: published.map((category) => category.body).join("\n\n"),
  };
}

/**
 * The published text is authored in a private file written about the owner, so
 * third person and bookkeeping leak easily. Fail loudly rather than publish a
 * voice that sounds like a consultant.
 */
function lint(label, text) {
  const issues = [];
  const banned = [
    [/\[from:/, "internal source tag"],
    [/\[(hard|soft|guess)\]/, "strength marker"],
    [/\bthe user\b/i, "third person"],
    [/\bthe owner\b/i, "third person"],
    [/\.md\b/, "file reference"],
    [/\bTODO\b/, "unfinished note"],
  ];
  for (const [pattern, reason] of banned) {
    if (pattern.test(text)) issues.push(`${label}: contains a ${reason} (${pattern.source})`);
  }
  return issues;
}

function normalize(body) {
  return `${body.trim()}\n`;
}

/** Site-relative links in a published body. External URLs need the network. */
function internalLinks(source) {
  return [
    ...new Set(
      [...source.matchAll(/\[[^\]]*\]\(([^)\s]+)\)/g)]
        .map((match) => match[1])
        .filter((href) => href.startsWith("/"))
        .map((href) => href.split("#")[0].split("?")[0])
        .filter(Boolean),
    ),
  ];
}

/**
 * Every internal link in _social.md has to land on a page the site actually
 * built. A retired project left in "Working on" is the failure this catches.
 */
async function unresolvedLinks(source) {
  const dist = path.join(PIPE, "dist");
  if (!(await exists(dist))) return null;
  const missing = [];
  for (const href of internalLinks(source)) {
    const rel = href.replace(/^\/+|\/+$/g, "");
    const candidates =
      rel === ""
        ? ["index.html"]
        : [path.join(rel, "index.html"), `${rel}.html`, rel];
    let found = false;
    for (const candidate of candidates) {
      if (await exists(path.join(dist, candidate))) {
        found = true;
        break;
      }
    }
    if (!found) missing.push(href);
  }
  return missing;
}

function render(record, derived) {
  const head = `<!-- generated by taste publish; do not edit; derived: ${derived}; review: ${addDays(
    derived,
    REVIEW_DAYS,
  )}; body-sha256: ${sha256(record.body)} -->\n\n`;
  return head + record.body;
}

function parse(source) {
  const match = source.match(HEADER);
  if (!match) return null;
  return {
    derived: match[1],
    review: match[2],
    sha: match[3],
    body: source.slice(match[0].length),
  };
}

function firstDifference(expected, actual) {
  const a = expected.split("\n");
  const b = actual.split("\n");
  for (let index = 0; index < Math.max(a.length, b.length); index += 1) {
    if (a[index] !== b[index]) {
      return `line ${index + 1}\n  published: ${JSON.stringify(b[index] ?? "(nothing)")}\n  compiled:  ${JSON.stringify(a[index] ?? "(nothing)")}`;
    }
  }
  return "bodies differ only in trailing whitespace";
}

async function publish(argv) {
  const check = argv.includes("--check");
  const review = argv.includes("--review");

  if (!(await exists(PIPE))) {
    throw new Error(`PIPEFORGE_DIR is not a directory: ${PIPE}`);
  }

  const { taste, social, skipped, published, publicText } = await compile();
  for (const file of skipped) {
    console.warn(`note: ${file} has no "## Public" section; not published.`);
  }

  const records = [
    { file: path.join(PIPE, "content", "taste.md"), body: normalize(taste) },
    { file: path.join(PIPE, "content", "social.md"), body: normalize(social) },
  ];

  // A voice leak is a reason not to write at all, not a warning.
  const problems = [...lint("public blocks", publicText), ...lint("social", social)];

  const missing = await unresolvedLinks(await read("_social.md"));
  if (missing === null) {
    console.warn("note: the site is not built (no dist); social links were not checked.");
  } else {
    for (const href of missing) {
      problems.push(`social: link ${href} does not resolve to a built page; fix the project or drop it`);
    }
  }

  // A draft is allowed to sit in the library; it is not allowed on the site.
  for (const category of published) {
    if (category.readBack.state !== "due" || category.readBack.date >= today()) continue;
    const message = `${category.file}: read-back was due ${category.readBack.date} and has not happened. Read it back, delete anything that describes a person, then set "Read-back: done ${today()}".`;
    if (check) problems.push(message);
    else console.warn(`warn: ${message}`);
  }

  if (problems.length > 0) {
    for (const problem of problems) console.error(`fail: ${problem}`);
    process.exitCode = 1;
    return;
  }

  for (const record of records) {
    const relative = path.relative(PIPE, record.file);
    const current = (await exists(record.file)) ? await readFile(record.file, "utf8") : null;
    const parsed = current ? parse(current) : null;

    if (check) {
      if (!current) {
        problems.push(`${relative}: not published yet`);
        continue;
      }
      if (!parsed) {
        problems.push(`${relative}: missing the provenance comment; publish again`);
        continue;
      }
      if (sha256(parsed.body) !== parsed.sha) {
        problems.push(`${relative}: body was edited by hand; change the library and publish`);
        continue;
      }
      if (normalize(parsed.body) !== record.body) {
        problems.push(`${relative}: differs from a fresh compile\n  ${firstDifference(record.body, normalize(parsed.body))}`);
      }
      if (today() > parsed.review) {
        problems.push(`${relative}: review date ${parsed.review} has passed; re-read it, then publish --review`);
      }
      continue;
    }

    if (review && current) {
      const next = render({ body: normalize(parsed?.body ?? record.body) }, today());
      if (next === current) {
        console.log(`${relative}: already reviewed today.`);
      } else {
        await writeFile(record.file, next);
        console.log(`${relative}: review moved to ${addDays(today(), REVIEW_DAYS)}.`);
      }
      continue;
    }

    if (parsed && parsed.sha === sha256(record.body)) {
      console.log(`${relative}: unchanged.`);
      continue;
    }

    await writeFile(record.file, render(record, today()));
    console.log(`${relative}: written.`);
  }

  if (problems.length > 0) {
    for (const problem of problems) console.error(`fail: ${problem}`);
    process.exitCode = 1;
  } else if (check) {
    console.log("ok: published files match the library.");
  }
}

async function derive(category) {
  if (!/^[a-z][a-z0-9-]*$/.test(category)) {
    throw new Error(`"${category}" is not a category slug (lowercase, hyphens).`);
  }

  const earned = earnedReason(await read("README.md"), category);
  if (earned === null) {
    throw new Error(
      `"${category}" is not earned. Add it to README.md "## Earned" with the date and reason, or extend an existing category instead.`,
    );
  }

  const dir = path.join(HERE, "_transcripts");
  await mkdir(dir, { recursive: true });

  const date = today();
  const file = path.join(dir, `${category}-${date}.md`);
  if (await exists(file)) throw new Error(`${file} already exists. Continue in it.`);

  await writeFile(
    file,
    `# derive: ${category} — ${date}

Protocol: ../_derive.md. Questions come from there, one at a time.

Rules while transcribing: verbatim answers, no tidying, no summary in place of a
quote, and every claim marked [hard], [soft] or [guess]. Uncited means [guess].
The category file is written from this transcript in a later sitting, not here.

Why this category is earned (README.md, "When to derive"):
${earned}

Transcript starts here.

## Phase 1 — peak, not library

## Phase 2 — the moment

## Phase 3 — counter-examples

## Phase 4 — behaviour

## Phase 5 — outliers

## Phase 6 — tensions

## Phase 7 — the cut

## Read-back

Written to ../${category}.md on:
`,
  );

  console.log(`created ${path.relative(process.cwd(), file) || file}`);
  console.log("next: run _derive.md one question at a time, then write the category file from it.");
}

async function walk(root, prefix = "") {
  const entries = (await readdir(path.join(root, prefix), { withFileTypes: true })).sort(
    (a, b) => a.name.localeCompare(b.name),
  );
  const files = [];
  for (const entry of entries) {
    const relative = path.join(prefix, entry.name);
    if (entry.isDirectory()) files.push(...(await walk(root, relative)));
    else if (entry.isFile()) files.push(relative);
  }
  return files;
}

/**
 * The template is a copy of the docs plus the tool itself. It never contains a
 * category, a transcript or the social file, because those are the library and
 * the library is personal.
 */
async function writeTemplate(dest) {
  const src = path.join(HERE, "template");
  if (!(await exists(src))) throw new Error("this copy has no template/ directory beside taste.mjs");
  const files = await walk(src);
  for (const file of files) {
    const target = path.join(dest, file);
    await mkdir(path.dirname(target), { recursive: true });
    await writeFile(target, await readFile(path.join(src, file)));
  }
  await writeFile(path.join(dest, "taste.mjs"), await readFile(path.join(HERE, "taste.mjs")));
  console.log(`created ${path.relative(process.cwd(), dest) || dest} (${files.length + 1} files)`);
  console.log("next: edit README.md ## Earned, then node taste.mjs derive <category>");
}

const [verb, argument] = process.argv.slice(2);

try {
  if (verb === "derive") await derive(argument);
  else if (verb === "template") await writeTemplate(argument || "taste-template");
  else if (verb === "publish") await publish(process.argv.slice(2));
  else {
    console.log(`taste

  node taste.mjs derive <category>    scaffold a transcript
  node taste.mjs template [dir]       write a copyable library into dir
  node taste.mjs publish              compile into the site
  node taste.mjs publish --check      fail when the site differs from the library
  node taste.mjs publish --review     move the review date, keep the text
`);
    process.exitCode = verb ? 1 : 0;
  }
} catch (error) {
  console.error(`error: ${error.message}`);
  process.exitCode = 1;
}