Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ git clone --depth 1 https://github.com/gntrs/workflow.git ~/.claude/workflow

## you are working on this repo itself

markdown skills, one rules file, two installers and six scripts (the size probe, its runner, the brand check, the ref reader, the ref check, the recorder). no build.
markdown skills, one rules file, two installers and seven scripts (the size probe, its runner, the brand check, the ref reader, the ref check, the recorder, the palette maker). no build.

- skills live in `skills/<name>/SKILL.md`, depth in `skills/<name>/references/`. frontmatter `name` matches the folder.
- `rules/RULES.md` is always on. a skill never contradicts it. nothing tells the reader to edit an installed file: what is personal goes in `~/.claude/RULES.local.md` (template in `setup/RULES.local.md`).
Expand All @@ -26,6 +26,7 @@ markdown skills, one rules file, two installers and six scripts (the size probe,
- after changing `tools/responsive-probe.js`, run `node tools/probe-test.mjs` (needs playwright with chromium: `npx playwright install chromium`, or point `PLAYWRIGHT_MODULE` at an installed copy) and show it still catches the planted cases.
- after changing `tools/brand-check.mjs`, run `node tools/brand-check.mjs --self-test` and show every line passes.
- after changing `tools/ref-read.mjs` or `tools/ref-check.mjs`, run their `--self-test` and show every line passes. ref-read's needs playwright like the probe runner.
- after changing `skills/palette/palette.mjs`, run `node skills/palette/palette.mjs --self-test` and show every line passes. node only.
- after changing `tools/record.mjs`, run `node tools/record.mjs --self-test` and show every line passes. it needs playwright like the probe runner, and ffmpeg for the mp4 lines (without it, those check the webm fallback).
- after changing an installer, run `bash scripts/test-install.sh` (and `bash scripts/test-install.sh ps1` where `pwsh` exists). it installs into throwaway homes: fresh, an upgrade from old commits, with edits, uninstall. a new behavior gets a case there. keep `install.sh` and `install.ps1` doing the same thing.
- `npm ci && npm test` runs the check, the installer cases and every tool self test. playwright is pinned in `package.json`.
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

newest first. the installer prints the version it had and the one it wrote.

## 1.2.0

- **`/palette`, four colors from one.** give it a hex and it returns an accent, a soft tint and a dark, each step made with the golden ratio: the hue turned by 137.5 degrees, the saturation cut by 61.8%, the brightness multiplied by 0.382. `skills/palette/palette.mjs` does the math and prints the text color for each one and the contrast between every pair, so you see which ones can carry text. the result is a proposal you pick from. `--css` and `--json` for the output.

## 1.1.1

- the readme says what this is in one line under the hero, so the page has words before "install".
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ once per repo. private notes in `.claude/` that never get committed. [skills/ini

optional. one notes vault every repo writes to, tidied while you're away. [skills/brain](skills/brain/SKILL.md) · [skills/dream](skills/dream/SKILL.md)

### /palette &lt;hex&gt;

one color in, four out: an accent, a soft tint and a dark, each made with the golden ratio. it prints the contrast between every pair, so you see which can carry text. [skills/palette](skills/palette/SKILL.md)

### house rules

these load on their own:
Expand Down
2 changes: 1 addition & 1 deletion SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ check these yourself and say what you found, in one short block. do not ask abou
- os and shell, total ram, free disk.
- whether `git`, `gh`, `node`, `docker` (and whether a docker vm is running), `python3`, `bun` and the `claude` cli exist.
- `git config --global user.name` and `user.email`. none set: add a question for the name and email their commits go out as.
- what is already in `~/.claude/`: `CLAUDE.md`, `RULES.md`, `RULES.local.md`, `settings.json`, any skill folder with the same name as one of ours (`cook`, `bbq`, `deep`, `ship`, `status`, `review`, `initiate`, `design`, `write`, `playbook`, `brain`, `dream`), and whether pstack is already installed (`claude plugin list`).
- what is already in `~/.claude/`: `CLAUDE.md`, `RULES.md`, `RULES.local.md`, `settings.json`, any skill folder with the same name as one of ours (`cook`, `bbq`, `deep`, `ship`, `status`, `review`, `initiate`, `design`, `palette`, `write`, `playbook`, `brain`, `dream`), and whether pstack is already installed (`claude plugin list`).
- an earlier install: `bash ~/.claude/workflow/install.sh --status` says which version is there and which files they edited.

then one message, numbered, each question with the default you will use if they say "you decide":
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.2.0
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $Stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
$Backup = Join-Path (Join-Path $Claude 'workflow-backups') $Stamp
$VersionFile = Join-Path $Src 'VERSION'
$Version = if (Test-Path $VersionFile) { (Get-Content $VersionFile -TotalCount 1 -Encoding UTF8).Trim() } else { 'unknown' }
$Ours = 'bbq','brain','cook','deep','design','dream','initiate','playbook','review','ship','status','write'
$Ours = 'bbq','brain','cook','deep','design','dream','initiate','palette','playbook','review','ship','status','write'
$script:Did = @(); $script:Skipped = @(); $script:Moved = @()
$script:NewMan = [ordered]@{}

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MANIFEST="$CLAUDE_DIR/workflow-manifest"
STAMP="$(date +%Y%m%d-%H%M%S)"
BACKUP="$CLAUDE_DIR/workflow-backups/$STAMP"
VERSION="$(cat "$SRC/VERSION" 2>/dev/null || echo unknown)"
OURS="bbq brain cook deep design dream initiate playbook review ship status write"
OURS="bbq brain cook deep design dream initiate palette playbook review ship status write"
did=() skipped=() moved=()
NEWMAN="$(mktemp)"; trap 'rm -f "$NEWMAN"' EXIT

Expand Down
1 change: 1 addition & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ to install it for someone: `git clone --depth 1 https://github.com/gntrs/workflo
- [status](skills/status/SKILL.md): done, pushed, merged, in five lines
- [initiate](skills/initiate/SKILL.md): prepare a repo for agents
- [design](skills/design/SKILL.md): front end method: only brand elements and real products, the element kit, the right or wrong board, the review loop, the size sweep
- [palette](skills/palette/SKILL.md): four colors from one by the golden ratio, with the contrast between each pair measured
- [write](skills/write/SKILL.md): prose for humans
- [playbook](skills/playbook/SKILL.md): swarm shapes, debugging, research, mistake ledger
- [brain](skills/brain/SKILL.md), [dream](skills/dream/SKILL.md): optional notes vault
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "workflow",
"version": "1.1.1",
"version": "1.2.0",
"private": true,
"description": "let him /cook: agent skills, rules and tools for Claude Code",
"license": "MIT",
"type": "module",
"scripts": {
"check": "bash scripts/check.sh",
"test:install": "bash scripts/test-install.sh",
"test:tools": "node tools/brand-check.mjs --self-test && node tools/ref-check.mjs --self-test && node tools/probe-test.mjs --self-test && node tools/ref-read.mjs --self-test && node tools/record.mjs --self-test",
"test:tools": "node tools/brand-check.mjs --self-test && node skills/palette/palette.mjs --self-test && node tools/ref-check.mjs --self-test && node tools/probe-test.mjs --self-test && node tools/ref-read.mjs --self-test && node tools/record.mjs --self-test",
"test": "npm run check && npm run test:install && npm run test:tools"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions skills/cook/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ never commit, push, open a pr, merge or deploy without the user's yes that speci
| after a push they approved | any post push step the repo's `.claude/CLAUDE.md` names (a rebuild, a restart), from the pushed tree |
| "is this the best outcome" | `/review` |
| "hack it together", "quick prototype", a hackathon | `/bbq` |
| "build a palette", "what goes with this color" | `/palette` |
53 changes: 53 additions & 0 deletions skills/palette/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: palette
description: Four colors from one, by the golden ratio. A main color in, an accent, a soft tint and a dark out, with the text color for each and the contrast between every pair measured. A proposal for the user to pick from. Invoke on "/palette <hex>", "build a palette", "what goes with this color", "i only have one color".
---

# palette

one color in, four out. every step uses one number, the golden ratio (1.618), so there is little to tune. it is a starting point the user picks from, never a decision made for them.

a brand that already names its colors wins. this is for when the user has one color and asks what goes with it. it does not replace `design`'s way of finding a look: with no brand, `design` still asks and shows real looks first, and these four colors are one thing to put in front of the user there.

## the method

work in hsb (hue, saturation, brightness), the model every color picker shows.

1. **main.** the one color you have. read its hue on the wheel. `#00B2A9` is hue 177, saturation 100, brightness 70.
2. **accent.** turn the hue back by the golden angle, 137.5 degrees. `360 / 1.618 = 222.5`, `360 - 222.5 = 137.5`, so `177 - 137.5 = 39.5`. under zero, add 360. keep the saturation.
3. **complementary.** the main hue again, the saturation cut by 61.8% (multiply it by 0.382), the brightness set to 81. a soft tint for large areas.
4. **contrast.** the main hue and saturation, the brightness multiplied by 0.382. `70 x 0.382 = 27`. a dark for type and for shapes that sit on the tint.

from `#00B2A9` that gives complementary `#80CFCB` and contrast `#004541`. the accent is hue 39.5: `#F29F00` once its brightness is lifted to 95, `#B37600` at the main color's 70. see below.

where the numbers come from: 1.618 is the ratio, 0.618 and 0.382 are the two parts it cuts a whole into, and 137.5 is the same cut made on a circle. 81 is given by the method with no rule behind it. 50 x 1.618 happens to land there.

## run it

```
node ~/.claude/skills/palette/palette.mjs '#00B2A9'
node ~/.claude/skills/palette/palette.mjs '#00B2A9' --accent-brightness 95
node ~/.claude/skills/palette/palette.mjs '#00B2A9' --css
node ~/.claude/skills/palette/palette.mjs '#00B2A9' --json
```

it prints the four colors with their hue, saturation and brightness, the text color to use on each, then the contrast ratio between every pair and whether that pair can carry text. `--css` prints four custom properties named after the four roles, `--json` the same data for a script. node only, no install.

text on each: the palette's own dark or tint if it reaches 4.5 on that color, else whichever of white and black measures higher.

values are rounded the way a picker shows them, hue to half a degree, saturation and brightness to a whole percent, so the output matches the method done by hand. the main color is never changed.

## what the method does not decide

- **how bright the accent is.** the method fixes its hue and nothing else. the script keeps the main color's brightness. the worked example above lifts the accent to 95 by eye, which is what `--accent-brightness 95` reproduces. pick it looking at the two colors side by side.
- **whether text is readable.** the golden ratio says nothing about that, so the script measures it. read the lines it prints: 4.5 or more carries text, 3 to 4.5 carries large text only, under 3 carries none. main and accent side by side are usually under 3: use them as shapes next to each other, never as text on each other.
- **a gray, a near black or a white main.** it has no hue to speak of, so the wheel has nothing to turn and the four colors come out as one. the script refuses a saturation under 5 or a brightness under 10 and says so. pick a color.
- **which contrast brightness.** the method multiplies the main color's brightness, not the tint's. a very dark main gives a contrast near black, which is fine for type and useless as a second surface.
- **the name.** complementary here means the soft partner of the main color. it is not the opposite side of the wheel.

## using the result

- it is a proposal. show the user the four swatches side by side on a real surface before any of it goes into a token file. they say yes, or they move one. in a brand file it goes in as proposed, not chosen, until they do.
- main and accent are two hues. `design` holds to one accent and gives a second hue a job or drops it. so the user picks which of the two is the accent, and the other gets a job (a surface, a data series, an illustration) or is left out.
- the four names are this method's, not a token vocabulary. mapped to the roles `design` uses: the complementary is a ground or a surface, the contrast is ink, one of main and accent is the accent, and the "text on each" line for it is its accent ink. rename them when they go into the project's tokens.
- once picked, the colors live where the project keeps them. the script is not run again on every build.
Loading
Loading