diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3f4f268..956238a 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -7,7 +7,7 @@ { "name": "finding-unknowns", "source": "./", - "description": "Surface hidden requirements with small interactive HTML artifacts before, during, and after implementation." + "description": "Surface hidden requirements with small interactive HTML pages that write your next prompt." } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 8941a01..4bc6ba5 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,12 +1,20 @@ { "name": "finding-unknowns", - "description": "Surface hidden requirements with small interactive HTML artifacts — blindspot passes, interviews, design-direction pickers, tweakable plans, merge quizzes. Packaging of Thariq Shihipar's \"A Field Guide to Fable: Finding Your Unknowns\" workflow as a Claude Code skill.", - "version": "0.2.0", + "description": "Turns vague prompts into small interactive HTML pages: point at what you recognize, and the page writes your next prompt. Design directions, interviews, blindspot passes, tweakable plans, merge quizzes.", + "version": "0.3.0", "author": { "name": "droppedoutofcontext" }, - "homepage": "https://github.com/droppedoutofcontext/finding-unknowns", + "homepage": "https://droppedoutofcontext.github.io/finding-unknowns/", "repository": "https://github.com/droppedoutofcontext/finding-unknowns", "license": "MIT", - "keywords": ["skill", "unknowns", "planning", "interview", "html-artifacts", "prompting"] + "keywords": [ + "skill", + "requirements", + "planning", + "interview", + "design-directions", + "html-artifacts", + "prompting" + ] } diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ab7cdc0..d94b82b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -17,7 +17,8 @@ jobs: - name: Verify skeleton and example artifacts run: | set -e - for f in skills/finding-unknowns/assets/reply-skeleton.html docs/examples/*.html; do + node skills/finding-unknowns/scripts/verify_artifact.mjs skills/finding-unknowns/assets/reply-skeleton.html --template + for f in docs/examples/*.html; do echo "== $f" node skills/finding-unknowns/scripts/verify_artifact.mjs "$f" done diff --git a/.gitignore b/.gitignore index e43b0f9..40ddbcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +.claude/ diff --git a/CHANGELOG.md b/CHANGELOG.md index a213d9d..f7b1ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## 0.3.0 — 2026-10-27 + +### Skill +- **A gate before every artifact.** The skill now picks the cheapest channel + first: stated defaults when a wrong guess is cheap or nobody can answer, + one to three questions in chat when that settles it, an artifact only when + the answer has to be seen or the questions depend on each other. +- **Narrower trigger.** The description names when to fire and, for the first + time, when not to: small local changes, cheap tweaks, headless runs. The + essay credit moved from the description into the body. +- **Executable as written.** Script paths are absolute from the skill's base + directory; artifacts go to the host's scratch directory when it has one; + the ledger is created only after decisions are accepted, and the skill + never edits `.gitignore`, branches or commits without asking. +- **Rules 2 and 5 rewritten** shorter, and the blueprint/skeleton conflict + resolved: blueprints may add a slider, checkbox or toggle as long as it + feeds `rebuild()`. Arrow shorthand removed from the blueprints. + +### Skeleton and verifier +- **Honest copy button.** It only says "Copied" when a copy actually + happened; otherwise it leaves the text selected and says how to copy. The + three live examples got the same fix. +- **Send to chat.** When the host exposes a way for a page to post into the + chat, the skeleton shows a Send button next to Copy. +- **Skeleton bugs fixed:** a quote in a question no longer breaks the + reply; the same chip label under two directions keeps two states; quiz + answers lock after the first pick and say "Correct" or "Not quite" in text, + not only color; unanswered questions are listed as "you decide"; the reply + names the artifact it came from. +- **Dark mode and tokens.** Every skeleton color is a token, with a dark set. +- **Verifier:** catches CSS `url()`, `@import`, protocol-relative and + unquoted external URLs, XHR and WebSocket; parse-checks each script on its + own and skips JSON data blocks; requires a real `#out` textarea, a + `#copyBtn` button and the `execCommand` fallback; flags leftover skeleton + placeholders (`--template` skips that for the skeleton itself). +- **Negative evals 4–6** catch over-triggering: a small local change, a cheap + UI tweak, and a feature with two independent questions. + +### Repo +- **New hero.** A 22-second motion piece built in Remotion replaces the old + wireframe GIF: the real four-directions artifact, chips flying into the + assembled reply, the reply landing in the chat and the ledger, then four + more techniques. GIF for the README, MP4 for the site. +- **Landing page.** `docs/index.html` is now a real landing: the loop, the + three live examples with previews, the eleven techniques, the gate, + install. Light and dark, phone-width safe. Social preview image included. +- **READMEs rewritten** in English and Russian around the new framing. +- **Keyboard-accessible chips** in the skeleton and the design-directions + example, and CONTRIBUTING.md with the repo map and the CI checks. +- The Russian post kit and the old GIF/WebP moved out of the public repo. + ## 0.2.0 — 2026-07-10 ### Skill diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..fa7352b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# Contributing + +Thanks for looking under the hood. This repo is small on purpose — one skill, its blueprints, +a verifier, evals, and live examples. Here is how the pieces fit and how to check your changes. + +## Repo map + +| Path | What it is | +|------|------------| +| `skills/finding-unknowns/SKILL.md` | The skill itself: when it triggers, the rules every artifact obeys, the workflow. | +| `skills/finding-unknowns/references/techniques.md` | Eleven technique blueprints (when / what to build / what reply to assemble). | +| `skills/finding-unknowns/assets/reply-skeleton.html` | The starting skeleton every artifact adapts: reply plumbing, chips, quiz mechanics. | +| `skills/finding-unknowns/scripts/verify_artifact.mjs` | Mechanical checks an artifact must pass before it reaches the user. | +| `skills/finding-unknowns/evals/` | Adherence evals: prompts, fixtures, assertions, and the run/grade protocol. | +| `docs/` | GitHub Pages site: landing page, [live examples](https://droppedoutofcontext.github.io/finding-unknowns/), hero GIF/MP4 and social preview. | + +## Running the checks + +The only dependency is Node 20+. CI ([`verify.yml`](.github/workflows/verify.yml)) runs exactly this: + +```bash +# the skeleton (placeholders allowed) and every shipped example must pass the verifier +node skills/finding-unknowns/scripts/verify_artifact.mjs skills/finding-unknowns/assets/reply-skeleton.html --template +for f in docs/examples/*.html; do + node skills/finding-unknowns/scripts/verify_artifact.mjs "$f" +done + +# every eval fixture path must exist +node -e ' + const fs = require("fs"), path = require("path"); + const dir = "skills/finding-unknowns/evals"; + const evals = JSON.parse(fs.readFileSync(path.join(dir, "evals.json"), "utf8")).evals; + const missing = evals.flatMap(e => e.files || []).filter(f => !fs.existsSync(path.join(dir, f))); + if (missing.length) { console.error("Missing: " + missing.join(", ")); process.exit(1); } + console.log("All eval fixture paths exist.");' +``` + +Run both before opening a PR. + +## What contributions are welcome + +**A new technique.** A technique is three things, and a PR should bring all of them: + +1. A row in the "Choosing a technique" table in `SKILL.md` — phase, situation, name. +2. A blueprint in `references/techniques.md` following the existing shape: **When** (which + unknown quadrant it targets), **Build**, **Reply assembled**. If it doesn't end in an + assembled reply the user pastes back, it isn't a technique for this skill — see rule 2 + in `SKILL.md`. +3. Ideally a live example in `docs/examples/` that passes the verifier and follows the + quiet-chrome contract (rule 5): the artifact's own UI stays monochrome and plain; style + lives only inside `.preview` regions. + +**Verifier improvements.** `verify_artifact.mjs` is deliberately dependency-free (no DOM +library, no npm install). New checks should stay that way and should catch a failure mode +that actually kills the loop — a broken copy button, a dead listener, an external fetch. + +**Eval results.** The evals README describes a two-stage outcome methodology that nobody has +run at scale. If you run it — with any model — open an issue with the numbers, positive or +negative. Negative results are just as welcome; the README's claims stay only as strong as +the evidence. + +**Translations.** README translations follow the `README..md` pattern and should track +the English one's structure. The skill itself stays in English (it's read by models), but +artifacts it produces are always in the user's language — that's rule 1. + +**Evals.** Negative evals matter as much as positive ones: a technique that fires on +"rename this variable" is a bug. If you add a trigger, add a case where it must not fire. + +## Style + +- Artifacts: one self-contained HTML file, no CDNs or fetches, script at the end of body, + must open from `file://`. The verifier enforces most of this. +- Prose (skill text, blueprints, READMEs): short sentences, no arrow chains or glyph + shorthand — the same plain-prose rule the artifacts follow. +- Keep the changelog: user-visible changes get a line in `CHANGELOG.md`. + +## Releasing (maintainers) + +Bump `version` in `.claude-plugin/plugin.json`, add a `CHANGELOG.md` section, tag `vX.Y.Z`. diff --git a/README.md b/README.md index b629492..46ff501 100644 --- a/README.md +++ b/README.md @@ -2,121 +2,146 @@ # finding-unknowns -**A Claude Code skill for prompts that are not specs yet.** +**People can’t describe what they want. They recognize it instantly.** +A Claude Code skill for prompts that aren’t specs yet. Instead of guessing, Claude builds a small +interactive page. You point at what you like, and the page writes your next prompt. + +[![verify](https://github.com/droppedoutofcontext/finding-unknowns/actions/workflows/verify.yml/badge.svg)](https://github.com/droppedoutofcontext/finding-unknowns/actions/workflows/verify.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE) -[![Claude Code plugin](https://img.shields.io/badge/Claude_Code-plugin-7c6cf0)](#install) +[![Claude Code plugin](https://img.shields.io/badge/Claude_Code-plugin-17181c)](#install) [![Ideas by @trq212](https://img.shields.io/badge/ideas_by-%40trq212-1c9bf0)](https://x.com/trq212/article/2073100352921215386) **English** · [Русский](README.ru.md) -Animation: Claude shows four interface directions, the user selects the parts they like, and the artifact assembles the next prompt +A vague prompt becomes four design directions. The user takes and skips pieces, each click flies into an assembled reply, the reply is pasted back into the chat, and four more techniques play the same loop. + +**[Live examples](https://droppedoutofcontext.github.io/finding-unknowns/)** · [Install](#install) · [How it decides](#when-it-fires) ## Why -Vibe coding often fails before code generation starts. The agent receives a prompt that is missing -requirements, taste constraints, edge cases, or review criteria. It fills the gaps with defaults and -returns something that works, but is not the thing you meant. - -Typical prompts: +Agents rarely fail at writing code. They fail earlier, on a prompt that is missing requirements, +taste, edge cases or review criteria. The agent fills the gaps with defaults and returns something +that works but isn’t what you meant. -> "Make it nicer" -> "Add sharing, you decide the details" -> "Port it from this reference" -> "Am I ready to merge this?" +> “Make it look more professional.” +> “Add sharing, you decide the details.” +> “Port it from this reference.” +> “Am I ready to merge this?” -`finding-unknowns` adds a short discovery pass before expensive implementation. The agent builds a small -self-contained HTML artifact where you can choose options, confirm assumptions, mark risks, or compose a -design direction from parts. The artifact then generates the next prompt for the chat. +Asking “what style do you want?” gets a shrug. Showing four rendered directions gets an instant +answer. This skill spends a few cheap minutes on that kind of showing before the expensive build. -The loop is: +## How it works -**render → choose → assemble prompt → implement.** +1. **Render.** Claude notices the blocking unknown and builds one self-contained HTML page: + options, mocks, questions, or a quiz. +2. **Point.** You click what you recognize. Take a piece, skip a piece, pick an answer, move a slider. +3. **Paste.** The page assembles your reply as you click. Copy it back into the chat, or send it + directly where the host allows. +4. **Build.** Claude builds against the decisions you made, and records them in + `.unknowns/decisions.md` so nothing settled gets asked twice. -## Example +## Try it -If you ask "make this dashboard better", the skill should not immediately rewrite the UI. It can first -render four directions for the same screen: a calm ops console, a dense analytics view, an editorial -version, and a more terminal-like version. +Each example is exactly what the skill hands you in a session. Click through; the reply at the +bottom writes itself. -You mark: "use C's density, A's header, B's palette, definitely not D". The artifact turns that into an -implementation prompt. The agent gets concrete constraints instead of "make it better". +| | | +|---|---| +| [**Four design directions**](https://droppedoutofcontext.github.io/finding-unknowns/examples/design-directions.html) | “Make the dashboard look more professional.” Four honest answers; take and skip pieces until a fifth assembles itself. | +| [**The interview**](https://droppedoutofcontext.github.io/finding-unknowns/examples/share-link-interview.html) | “Add share-via-link, you decide the details.” Five questions ordered by architectural blast radius. | +| [**Quiz me before I merge**](https://droppedoutofcontext.github.io/finding-unknowns/examples/merge-quiz.html) | “I only skimmed the diff.” A risk-grouped report, then six questions; wrong answers point at what you skimmed. | ## Install +As a Claude Code plugin: + ```text /plugin marketplace add droppedoutofcontext/finding-unknowns /plugin install finding-unknowns@finding-unknowns ``` -Or copy the skill directly: +Or as a plain skill, for any runtime that reads `~/.claude/skills/`: -```text -cp -r skills/finding-unknowns ~/.claude/skills/ +```bash +git clone https://github.com/droppedoutofcontext/finding-unknowns +cp -r finding-unknowns/skills/finding-unknowns ~/.claude/skills/ ``` -## What's inside - -The skill picks a technique for the kind of unknown: +Then just work. The skill triggers on vague or high-stakes requests, or when you ask “what am I +missing?”, “interview me”, or “quiz me before I merge”. -- **Blindspot pass** — find hidden requirements in unfamiliar code or domains. -- **Teach me my unknowns** — teach vocabulary for taste, quality, or visual decisions. -- **Four design directions** — show rendered variants and compose a fifth direction from parts. -- **Mock before you wire** — test placement and interaction before real implementation. -- **Brainstorm on an effort axis** — sort interventions from quick win to quarter-long bet. -- **The interview** — extract architectural decisions by blast radius: storage, auth, API, failure modes. -- **Point at a reference** — verify behavior before porting a reference implementation. -- **The tweakable plan** — review the parts of a plan most likely to change, not a linear todo list. -- **Implementation notes** — record plan-vs-reality gaps during a long build. -- **The buy-in doc** — pre-answer reviewer or stakeholder objections. -- **Quiz me before I merge** — check whether you understand your own diff before merging. +## When it fires -Full rules and technique blueprints live in [`SKILL.md`](skills/finding-unknowns/SKILL.md) and -[`references/techniques.md`](skills/finding-unknowns/references/techniques.md). +An artifact costs a few minutes, so the skill first picks the cheapest channel that settles the +unknown: -## Artifact contract +| Situation | What Claude does | +|---|---| +| A wrong guess is cheap to redo, or nobody is there to answer (headless, subagent, CI) | Lists its assumptions in one line and builds | +| One to three independent questions settle it | Asks them in chat. No page | +| The answer has to be seen to be chosen, there are many interdependent questions, or you asked to be interviewed or quizzed | Builds an artifact | -Each artifact is one HTML file with no CDN, fetch, or external dependencies. It must open from `file://`, -keep all JS/CSS inline, and act as a throwaway UI for making decisions. +“Fix this typo” never gets a page. “Make the landing page look professional” does. -The required part is the assembled reply: a textarea with the next prompt and a copy button. If the -artifact does not turn user clicks into a concrete prompt diff, it does not close the loop. +## Techniques -Before handing an artifact over, the skill verifies it with: +| Phase | Technique | What you get | +|---|---|---| +| Before | **Blindspot pass** | What you couldn’t know to ask about unfamiliar code, with a prompt fix for each | +| Before | **Teach me my unknowns** | Vocabulary and live sliders for taste you can’t name yet | +| Before | **Four design directions** | Four rendered answers; compose a fifth from parts | +| Before | **Mock before you wire** | Placement and interaction tested on a throwaway mock | +| Before | **Brainstorm on an effort axis** | Interventions from this-afternoon to quarter-long bets | +| Before | **The interview** | Decisions ordered by blast radius, with a live decisions table | +| Before | **Point at a reference** | Proof you understood the reference before porting it | +| Before | **The tweakable plan** | The plan sorted by what you’re most likely to change | +| During | **Implementation notes** | Plan versus reality, logged as you build | +| After | **The buy-in doc** | Reviewer objections answered before review | +| After | **Quiz me before I merge** | Do you actually know your own diff? | -```text -node scripts/verify_artifact.mjs -``` +The rules and blueprints live in [`SKILL.md`](skills/finding-unknowns/SKILL.md) and +[`references/techniques.md`](skills/finding-unknowns/references/techniques.md). -## When not to use it +## The artifact contract -If the task is small and clear, this adds overhead. You do not need an artifact for "fix this typo" or -"rename this variable". +- One HTML file, in your language, with no CDN, fetch or external dependency. It opens from `file://`. +- Quiet chrome: color only marks your decisions. Styling lives inside the previews, which show the thing + being decided in its real or proposed look. +- Every control feeds the assembled reply. The copy button tells the truth: when a sandboxed viewer + blocks the clipboard, it leaves the text selected and says so instead of claiming success. +- Before handing it over, the skill runs a dependency-free verifier: -Use it when the cost of a wrong assumption is higher than a few minutes of discovery. +```bash +node skills/finding-unknowns/scripts/verify_artifact.mjs path/to/artifact.html +``` ## Does it work? -I ran a small eval set: four realistic tasks, four binary checks each. With the skill: **16/16**. Without -it: **3/16**. +A small eval set: seven tasks, four binary checks each. -This is not a benchmark or a big scientific claim. It is a sanity check. The value is not that the agent -magically becomes smarter; it is that the agent turns assumptions into explicit user decisions before -expensive implementation. +- **Positive evals (0–3)**, where the skill should run its loop: **16/16** with the skill, **3/16** + without. These measure adherence (did the loop happen), not whether the final result was better. + The baseline can’t pass the artifact checks by construction. +- **Negative evals (4–6)**, new in 0.3.0: a small local change, a cheap UI tweak, and a feature with + two independent questions. The skill should stay out of the way. No numbers published yet. -Evals are in [`skills/finding-unknowns/evals/`](skills/finding-unknowns/evals/). +The protocol, fixtures and an outcome-eval design nobody has run at scale yet are in +[`evals/`](skills/finding-unknowns/evals/). If you run them, please open an issue with the numbers, +whichever way they point. -## Post kit +## Contributing -Russian post draft, short versions, CTAs, and visual notes live in [`docs/post-kit.ru.md`](docs/post-kit.ru.md). +New technique blueprints, verifier checks and eval results are welcome. See +[CONTRIBUTING.md](CONTRIBUTING.md) for the repo map and the checks CI runs. ## Credits -Inspired by [Thariq Shihipar](https://x.com/trq212)'s -[`A Field Guide to Fable: Finding Your Unknowns`](https://x.com/trq212/article/2073100352921215386) and -[demo artifacts](https://thariqs.github.io/html-effectiveness/unknowns/index.html). - -This repo is an independent packaging of the workflow as a Claude Code skill. Not affiliated with Thariq -or Anthropic. MIT. +Adapted from [Thariq Shihipar](https://x.com/trq212)’s +[“A Field Guide to Fable: Finding Your Unknowns”](https://x.com/trq212/article/2073100352921215386) and +his [demo artifacts](https://thariqs.github.io/html-effectiveness/unknowns/index.html). This repo is an +independent packaging of the workflow as a Claude Code skill, not affiliated with Thariq or Anthropic. +MIT. diff --git a/README.ru.md b/README.ru.md index cb04827..1e09e30 100644 --- a/README.ru.md +++ b/README.ru.md @@ -2,121 +2,149 @@ # finding-unknowns -**Claude Code skill для случаев, когда промпт ещё не дотягивает до спеки.** +**Мы плохо описываем, чего хотим. Но сразу узнаём, когда видим.** +Скилл для Claude Code на случай, когда промпт ещё не стал спекой. Вместо того чтобы угадывать, +Claude собирает маленькую интерактивную страницу. Ты показываешь, что нравится, а страница пишет +за тебя следующий промпт. + +[![verify](https://github.com/droppedoutofcontext/finding-unknowns/actions/workflows/verify.yml/badge.svg)](https://github.com/droppedoutofcontext/finding-unknowns/actions/workflows/verify.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE) -[![Claude Code plugin](https://img.shields.io/badge/Claude_Code-plugin-7c6cf0)](#установка) +[![Claude Code plugin](https://img.shields.io/badge/Claude_Code-plugin-17181c)](#установка) [![Ideas by @trq212](https://img.shields.io/badge/ideas_by-%40trq212-1c9bf0)](https://x.com/trq212/article/2073100352921215386) [English](README.md) · **Русский** -Анимация: Claude показывает четыре направления интерфейса, пользователь выбирает понравившиеся части, а артефакт собирает следующий промпт +Расплывчатый промпт превращается в четыре направления дизайна. Пользователь берёт и отбрасывает куски, каждый клик улетает в собираемый ответ, ответ вставляется в чат, и ещё четыре техники проходят тот же цикл. + +**[Живые примеры](https://droppedoutofcontext.github.io/finding-unknowns/)** · [Установка](#установка) · [Когда срабатывает](#когда-срабатывает) ## Зачем -Вайбкодинг часто ломается не на генерации кода, а раньше: агент получает промпт, в котором не хватает -требований, taste constraints, edge cases или критериев ревью. После этого он заполняет пустоты своими -дефолтами и приносит рабочий, но не тот результат. +Агенты редко ломаются на написании кода. Они ломаются раньше: на промпте, в котором не хватает +требований, вкуса, краевых случаев или критериев ревью. Агент заполняет пробелы дефолтами и приносит +рабочий, но не тот результат. -Типичные запросы: - -> «Сделай поприятнее» +> «Сделай посолиднее» > «Добавь шеринг, детали на твоё усмотрение» > «Перенеси как в референсе» > «Я готов это мержить?» -`finding-unknowns` добавляет перед дорогой реализацией короткий discovery pass. Агент делает маленький -self-contained HTML-артефакт, где можно выбрать варианты, подтвердить assumptions, отметить риски или -собрать дизайн-направление из частей. Внизу артефакт генерирует следующий промпт для чата. +На вопрос «какой стиль хочешь?» человек пожимает плечами. Четыре отрисованных варианта он оценивает +мгновенно. Скилл тратит несколько дешёвых минут на такой показ до того, как начнётся дорогая сборка. + +## Как это работает -Петля простая: +1. **Показать.** Claude замечает, чего не хватает, и собирает один самодостаточный HTML-файл: + варианты, мок, вопросы или квиз. +2. **Ткнуть.** Ты кликаешь то, что узнаёшь. Берёшь кусок, отбрасываешь кусок, выбираешь ответ, + двигаешь слайдер. +3. **Вставить.** Страница собирает ответ по ходу кликов. Копируешь его в чат или отправляешь сразу, + если хост это позволяет. +4. **Собрать.** Claude строит по принятым решениям и записывает их в `.unknowns/decisions.md`, + чтобы решённое не спрашивать дважды. -**render → choose → assemble prompt → implement.** +## Попробуй -## Пример +Каждый пример ровно такой, какой скилл выдаёт в сессии. Прокликай: ответ внизу пишется сам. -Если попросить «сделай дашборд лучше», скилл не должен сразу переписывать интерфейс. Он может сначала -отрендерить четыре направления одного экрана: спокойную ops-консоль, плотный аналитический вид, -editorial-стиль и более терминальный вариант. +| | | +|---|---| +| [**Четыре направления дизайна**](https://droppedoutofcontext.github.io/finding-unknowns/examples/design-directions.html) | «Сделай дашборд профессиональнее». Четыре честных ответа; бери и отбрасывай куски, пока не соберётся пятый. | +| [**Интервью**](https://droppedoutofcontext.github.io/finding-unknowns/examples/share-link-interview.html) | «Добавь шеринг по ссылке, детали на твоё усмотрение». Пять вопросов в порядке архитектурного радиуса поражения. | +| [**Квиз перед мержем**](https://droppedoutofcontext.github.io/finding-unknowns/examples/merge-quiz.html) | «Я только пробежал дифф глазами». Отчёт по рискам и шесть вопросов; неверный ответ ведёт к пропущенному месту. | -Ты отмечаешь: «берём density из C, header из A, palette из B, D точно нет». Артефакт собирает это в -реализационный промпт. Агент получает не абстрактное «сделай лучше», а конкретные constraints. +Примеры на английском: скилл пишет артефакт на языке пользователя, так что в твоей сессии он будет +по-русски. ## Установка +Как плагин Claude Code: + ```text /plugin marketplace add droppedoutofcontext/finding-unknowns /plugin install finding-unknowns@finding-unknowns ``` -Либо скопируй скилл напрямую: +Или как обычный скилл, для любого рантайма, который читает `~/.claude/skills/`: -```text -cp -r skills/finding-unknowns ~/.claude/skills/ +```bash +git clone https://github.com/droppedoutofcontext/finding-unknowns +cp -r finding-unknowns/skills/finding-unknowns ~/.claude/skills/ ``` -## Что внутри +Дальше просто работай. Скилл срабатывает на расплывчатых или рискованных запросах, а ещё когда +спрашиваешь «что я упускаю?», «проинтервьюируй меня» или «проверь меня перед мержем». -Скилл выбирает технику под тип неизвестности: +## Когда срабатывает -- **Blindspot pass** — найти неизвестные требования в чужом модуле или домене. -- **Teach me my unknowns** — дать vocabulary для вкуса, качества или визуальных решений. -- **Four design directions** — показать несколько rendered вариантов и собрать fifth direction из частей. -- **Mock before you wire** — проверить placement и interaction до настоящей реализации. -- **Brainstorm on an effort axis** — разложить варианты от quick win до квартальной ставки. -- **The interview** — вытащить архитектурные решения по blast radius: storage, auth, API, failure modes. -- **Point at a reference** — сверить поведение референса перед портированием. -- **The tweakable plan** — согласовать не линейный todo-list, а места, где likely будут правки. -- **Implementation notes** — фиксировать расхождения плана с реальностью во время длинного билда. -- **The buy-in doc** — заранее ответить на objections ревьюера или стейкхолдера. -- **Quiz me before I merge** — проверить, понимаешь ли ты собственный diff перед merge. +Артефакт стоит нескольких минут, поэтому скилл сначала выбирает самый дешёвый способ снять +неизвестность: -Полные правила и шаблоны техник лежат в [`SKILL.md`](skills/finding-unknowns/SKILL.md) и -[`references/techniques.md`](skills/finding-unknowns/references/techniques.md). +| Ситуация | Что делает Claude | +|---|---| +| Ошибку дёшево переделать или некому ответить (headless, сабагент, CI) | Одной строкой перечисляет допущения и делает | +| Хватает одного–трёх независимых вопросов | Задаёт их в чате, без страницы | +| Ответ нужно увидеть, чтобы выбрать; много связанных вопросов; ты сам попросил интервью или квиз | Собирает артефакт | -## Как устроен артефакт +«Исправь опечатку» страницу не получит. «Сделай лендинг солиднее» получит. -Каждый артефакт — один HTML-файл без CDN, fetch и внешних зависимостей. Он должен открываться с `file://`, -держать весь JS/CSS внутри и работать как throwaway UI для принятия решений. +## Техники -Обязательная часть — assembled reply: textarea с готовым следующим промптом и copy button. Если артефакт -не превращает клики пользователя в конкретный prompt diff, он не закрывает loop. +| Фаза | Техника | Что получаешь | +|---|---|---| +| До | **Blindspot pass** | Что ты не мог знать о чужом коде, и правку промпта под каждый пункт | +| До | **Teach me my unknowns** | Словарь и живые слайдеры для вкуса, который пока не назвать словами | +| До | **Four design directions** | Четыре отрисованных ответа; пятый собирается из кусков | +| До | **Mock before you wire** | Размещение и взаимодействие на одноразовом моке | +| До | **Brainstorm on an effort axis** | Варианты от «за вечер» до «на квартал» | +| До | **The interview** | Решения по радиусу поражения и живая таблица решений | +| До | **Point at a reference** | Доказательство, что референс понят, до переноса | +| До | **The tweakable plan** | План, отсортированный по тому, что ты скорее всего поменяешь | +| Во время | **Implementation notes** | План против реальности, по ходу сборки | +| После | **The buy-in doc** | Возражения ревьюера закрыты до ревью | +| После | **Quiz me before I merge** | Знаешь ли ты свой собственный дифф? | -Перед тем как отдавать артефакт, скилл проверяет его через: - -```text -node scripts/verify_artifact.mjs -``` +Правила и чертежи техник: [`SKILL.md`](skills/finding-unknowns/SKILL.md) и +[`references/techniques.md`](skills/finding-unknowns/references/techniques.md). -## Когда это не нужно +## Контракт артефакта -Если задача маленькая и ясная, скилл только добавляет overhead. Для «исправь опечатку» или «переименуй -переменную» никакой artifact не нужен. +- Один HTML-файл на языке пользователя, без CDN, fetch и внешних зависимостей. Открывается из `file://`. +- Тихий интерфейс: цвет обозначает только твои решения. Стили живут внутри превью, а превью + показывает решаемую вещь в её настоящем или предлагаемом виде. +- Каждый контрол обновляет собранный ответ. Кнопка копирования не врёт: если песочница блокирует + буфер обмена, текст остаётся выделенным, и страница прямо об этом говорит. +- Перед выдачей скилл прогоняет верификатор без зависимостей: -Он полезен там, где стоимость неверного assumption выше, чем пара минут на discovery. +```bash +node skills/finding-unknowns/scripts/verify_artifact.mjs path/to/artifact.html +``` -## Проверка +## Работает ли это? -Я прогнал маленький набор evals: четыре реалистичные задачи, по четыре бинарные проверки. Со скиллом -получилось **16/16**, без него — **3/16**. +Небольшой набор эвалов: семь задач, по четыре бинарные проверки. -Это не бенчмарк и не большой научный вывод. Скорее sanity check: ценность здесь не в том, что агент -«становится умнее», а в том, что он переводит assumptions в явные решения пользователя до дорогой -реализации. +- **Позитивные (0–3)**, где скилл должен запустить цикл: **16/16** со скиллом и **3/16** без него. + Это проверка следования процессу, а не качества итогового результата: без скилла артефактных + проверок не пройти по построению. +- **Негативные (4–6)**, добавлены в 0.3.0: мелкая локальная правка, дешёвый UI-твик и фича с двумя + независимыми вопросами. Здесь скилл должен не мешать. Цифр пока нет. -Evals лежат в [`skills/finding-unknowns/evals/`](skills/finding-unknowns/evals/). +Протокол, фикстуры и дизайн outcome-эвала, который пока никто не прогонял в масштабе, лежат в +[`evals/`](skills/finding-unknowns/evals/). Прогонишь — открой issue с цифрами, в какую бы сторону +они ни указывали. -## Материалы для поста +## Контрибьютинг -Черновик поста, короткие версии, CTA и список визуалов лежат в [`docs/post-kit.ru.md`](docs/post-kit.ru.md). +Новые техники, проверки верификатора и результаты эвалов приветствуются. Карта репозитория и +проверки CI описаны в [CONTRIBUTING.md](CONTRIBUTING.md). ## Благодарности -Идея вдохновлена работой [Thariq Shihipar](https://x.com/trq212): -[`A Field Guide to Fable: Finding Your Unknowns`](https://x.com/trq212/article/2073100352921215386) и -его [демо-артефактами](https://thariqs.github.io/html-effectiveness/unknowns/index.html). - -Этот репозиторий — независимая упаковка подхода в Claude Code skill. Не аффилирован с Thariq или -Anthropic. MIT. +По мотивам эссе [Thariq Shihipar](https://x.com/trq212) +[«A Field Guide to Fable: Finding Your Unknowns»](https://x.com/trq212/article/2073100352921215386) и его +[демо-артефактов](https://thariqs.github.io/html-effectiveness/unknowns/index.html). Это независимая +упаковка подхода в скилл для Claude Code, без аффилиации с Thariq или Anthropic. MIT. diff --git a/docs/examples/design-directions.html b/docs/examples/design-directions.html index 432501b..9b201a8 100644 --- a/docs/examples/design-directions.html +++ b/docs/examples/design-directions.html @@ -28,7 +28,8 @@ .opt .why-opt{display:block;color:var(--mut);font-size:12.5px;margin-top:4px} .preview{border:1px dashed var(--line);border-radius:8px;background:#fff;overflow:hidden;margin:0 0 10px} .chip{display:inline-flex;align-items:center;gap:6px;margin:0 6px 8px 0;padding:6px 11px; - border-radius:999px;border:1.5px solid var(--line);background:#fff;font-size:12.5px;cursor:pointer} + border-radius:999px;border:1.5px solid var(--line);background:#fff; + font:inherit;font-size:12.5px;cursor:pointer} .chip .ic{font-size:11px;width:13px;text-align:center;color:var(--mut)} .chip.steal{border-color:var(--steal);background:var(--steal-bg);color:var(--steal)} .chip.skip{border-color:var(--skip);background:var(--skip-bg);color:var(--skip);text-decoration:line-through} @@ -133,11 +134,11 @@

A — ops console

- ·dark palette - ·dense KPI strip - ·status dots - ·mono numerals - ·SLA countdowns + + + + +

B — editorial

@@ -154,10 +155,10 @@

Support, week 27

integration outage on Tuesday.

- ·serif on paper - ·large sparse numbers - ·narrative caption - ·whitespace over boxes + + + +

C — card board

@@ -176,10 +177,10 @@

C — card board

- ·cards in columns - ·colored tags - ·soft shadows - ·column counts + + + +

D — terminal

@@ -196,9 +197,9 @@

D — terminal

- ·pure text - ·one accent color - ·aggressive truncation + + +
@@ -207,7 +208,7 @@

Your next message — written for you

- Copied — paste it back into the chat + Copied — paste it back into the chat
@@ -264,13 +265,21 @@

Your next message — written for you

var out = document.getElementById('out'); function done() { var el = document.getElementById('copied'); + el.textContent = el.dataset.ok || el.textContent; el.classList.add('on'); setTimeout(function () { el.classList.remove('on'); }, 2200); } function legacy() { + var ok = false; out.removeAttribute('readonly'); out.select(); - try { document.execCommand('copy'); } catch (e) { /* manual copy remains */ } - out.setAttribute('readonly', ''); done(); + try { ok = document.execCommand('copy'); } catch (e) { ok = false; } + out.setAttribute('readonly', ''); + if (ok) { done(); return; } + // copy was blocked: leave the text selected and say how to copy it + var el = document.getElementById('copied'); + out.focus(); out.select(); + el.textContent = 'Press Cmd+C or Ctrl+C to copy the selected text'; + el.classList.add('on'); } if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(out.value).then(done, legacy); diff --git a/docs/examples/merge-quiz.html b/docs/examples/merge-quiz.html index a599dd3..7d7efa6 100644 --- a/docs/examples/merge-quiz.html +++ b/docs/examples/merge-quiz.html @@ -186,7 +186,7 @@

Your verdict — written for you

- Copied — paste it back into the chat + Copied — paste it back into the chat
@@ -242,13 +242,21 @@

Your verdict — written for you

var out = document.getElementById('out'); function done() { var el = document.getElementById('copied'); + el.textContent = el.dataset.ok || el.textContent; el.classList.add('on'); setTimeout(function () { el.classList.remove('on'); }, 2200); } function legacy() { + var ok = false; out.removeAttribute('readonly'); out.select(); - try { document.execCommand('copy'); } catch (e) { /* manual copy remains */ } - out.setAttribute('readonly', ''); done(); + try { ok = document.execCommand('copy'); } catch (e) { ok = false; } + out.setAttribute('readonly', ''); + if (ok) { done(); return; } + // copy was blocked: leave the text selected and say how to copy it + var el = document.getElementById('copied'); + out.focus(); out.select(); + el.textContent = 'Press Cmd+C or Ctrl+C to copy the selected text'; + el.classList.add('on'); } if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(out.value).then(done, legacy); diff --git a/docs/examples/share-link-interview.html b/docs/examples/share-link-interview.html index d5a246e..809b821 100644 --- a/docs/examples/share-link-interview.html +++ b/docs/examples/share-link-interview.html @@ -166,7 +166,7 @@

Your next message — written for you

- Copied — paste it back into the chat + Copied — paste it back into the chat
@@ -218,13 +218,21 @@

Your next message — written for you

var out = document.getElementById('out'); function done() { var el = document.getElementById('copied'); + el.textContent = el.dataset.ok || el.textContent; el.classList.add('on'); setTimeout(function () { el.classList.remove('on'); }, 2200); } function legacy() { + var ok = false; out.removeAttribute('readonly'); out.select(); - try { document.execCommand('copy'); } catch (e) { /* manual copy remains */ } - out.setAttribute('readonly', ''); done(); + try { ok = document.execCommand('copy'); } catch (e) { ok = false; } + out.setAttribute('readonly', ''); + if (ok) { done(); return; } + // copy was blocked: leave the text selected and say how to copy it + var el = document.getElementById('copied'); + out.focus(); out.select(); + el.textContent = 'Press Cmd+C or Ctrl+C to copy the selected text'; + el.classList.add('on'); } if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(out.value).then(done, legacy); diff --git a/docs/four-directions.gif b/docs/four-directions.gif deleted file mode 100644 index 0114fa0..0000000 Binary files a/docs/four-directions.gif and /dev/null differ diff --git a/docs/hero.gif b/docs/hero.gif new file mode 100644 index 0000000..a2d8dd1 Binary files /dev/null and b/docs/hero.gif differ diff --git a/docs/hero.mp4 b/docs/hero.mp4 new file mode 100644 index 0000000..cfad1f1 Binary files /dev/null and b/docs/hero.mp4 differ diff --git a/docs/img/design-directions.jpg b/docs/img/design-directions.jpg new file mode 100644 index 0000000..130b31e Binary files /dev/null and b/docs/img/design-directions.jpg differ diff --git a/docs/img/hero-poster.jpg b/docs/img/hero-poster.jpg new file mode 100644 index 0000000..4767347 Binary files /dev/null and b/docs/img/hero-poster.jpg differ diff --git a/docs/img/merge-quiz.jpg b/docs/img/merge-quiz.jpg new file mode 100644 index 0000000..e8bb832 Binary files /dev/null and b/docs/img/merge-quiz.jpg differ diff --git a/docs/img/share-link-interview.jpg b/docs/img/share-link-interview.jpg new file mode 100644 index 0000000..b99ec44 Binary files /dev/null and b/docs/img/share-link-interview.jpg differ diff --git a/docs/index.html b/docs/index.html index c270c20..ba326ea 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,47 +3,301 @@ -finding-unknowns — live examples +finding-unknowns — Claude Code skill for vague prompts and hidden requirements + + + + + + + + + + -

finding-unknowns — live examples

-

The skill's whole thesis is that people recognize what they can't describe — so -don't read about the artifacts, click through them. Each one below is exactly what the skill hands -you in a real session, ending in a reply written for you.

- - - Four design directions - "Make the dashboard look more professional" — four honest answers; you take pieces and - reject pieces, and a fifth direction assembles itself. - - - The interview - "Add share-via-link, you decide the details" — five questions ordered by architectural - blast radius, ending in a ready-to-paste implementation prompt. - - - Quiz me before I merge - "I only skimmed the diff — am I ready to merge?" — a risk-grouped report, then six - questions; wrong answers point at the section you skimmed. - - -

From the finding-unknowns -Claude Code skill — an independent packaging of Thariq Shihipar's "A Field Guide to Fable: -Finding Your Unknowns".

+
+ +
+ +
+
+

People can’t describe what they want. They recognize it instantly.

+

A Claude Code skill for prompts that aren’t specs yet. Instead of guessing, Claude builds a small + interactive page: you point at what you like, and the page writes your next prompt for you.

+ +
+ + The four-directions artifact with a reply assembled from the user's clicks +
+
+ +
+

The loop

+
+

Render

Claude spots the unknown and builds one self-contained HTML page: options, mocks, questions, a quiz.

+

Point

You click what you recognize. Take a piece, skip a piece, pick an answer, move a slider.

+

Paste

The page assembles your reply as you go. Copy it into the chat, or send it directly where the host allows.

+

Build

Claude builds against decisions you made, and saves them to .unknowns/decisions.md so nothing is asked twice.

+
+
+ +
+

Click through the real thing

+ +
+ +
+

Eleven techniques, one loop

+
+
+

Before building

+
    +
  • Blindspot passwhat you couldn’t know to ask
  • +
  • Teach me my unknownsvocabulary for taste you can’t name
  • +
  • Four design directionscompose a fifth from parts
  • +
  • Mock before you wireplacement and interaction, cheaply
  • +
  • Brainstorm on an effort axisquick wins to quarter-long bets
  • +
  • The interviewdecisions by blast radius
  • +
  • Point at a referenceprove you understood it first
  • +
  • The tweakable plansorted by what you’ll change
  • +
+
+
+

During

+
    +
  • Implementation notesplan versus reality, logged as you go
  • +
+
+
+

After

+
    +
  • The buy-in docobjections answered before review
  • +
  • Quiz me before I mergedo you know your own diff?
  • +
+
+
+
+ +
+

It knows when to stay out of the way

+
+

Stated defaults

Cheap to redo, or nobody there to answer. Claude lists its assumptions in a line and builds.

+

A question in chat

One to three independent questions settle it. No page needed.

+

An artifact

The answer has to be seen to be chosen, or there are many questions that depend on each other.

+
+
+ +
+

Install

+
+
+
As a Claude Code plugin
+
/plugin marketplace add droppedoutofcontext/finding-unknowns
+/plugin install finding-unknowns@finding-unknowns
+ +
+
+
Or as a plain skill
+
git clone https://github.com/droppedoutofcontext/finding-unknowns
+cp -r finding-unknowns/skills/finding-unknowns ~/.claude/skills/
+ +
+
+

Then just work. The skill triggers on vague or high-stakes requests, or when you ask + “what am I missing?”, “interview me”, or “quiz me before I merge”.

+
+
+ + + + diff --git a/docs/merge-quiz.webp b/docs/merge-quiz.webp deleted file mode 100644 index c5603a0..0000000 Binary files a/docs/merge-quiz.webp and /dev/null differ diff --git a/docs/og.png b/docs/og.png new file mode 100644 index 0000000..ea571a4 Binary files /dev/null and b/docs/og.png differ diff --git a/docs/post-kit.ru.md b/docs/post-kit.ru.md deleted file mode 100644 index 1c809d1..0000000 --- a/docs/post-kit.ru.md +++ /dev/null @@ -1,143 +0,0 @@ -# Post kit: finding-unknowns - -Набор материалов для поста о `finding-unknowns`: основной черновик, короткие версии, варианты заголовков, -визуалы, CTA и чеклист перед публикацией. - -## Главный тезис - -Вайбкодинг часто ломается не на генерации кода, а на входе: промпт ещё не стал спецификацией, но агент -уже начал строить. `finding-unknowns` добавляет короткий discovery pass: отрендерить варианты, вытащить -assumptions, дать человеку выбрать и собрать из выбора следующий промпт. - -## One-liner - -`finding-unknowns` — Claude Code skill для промптов, которые ещё не дотягивают до спеки. - -## Короткий питч - -Когда пользователь пишет «сделай красивее» или «добавь фичу, детали сам», агент заполняет пустоты своими -дефолтами: storage model, UX density, edge cases, reviewer expectations. `finding-unknowns` вставляет -перед реализацией маленький self-contained HTML-артефакт: четыре дизайн-направления, мини-интервью, -кликабельный мок, tweakable plan, buy-in doc или quiz before merge. Пользователь кликает то, что попало -в цель, а артефакт пишет следующий prompt diff за него. - -## Черновик поста - -Я собрал `finding-unknowns` — Claude Code skill для промптов, которые ещё не дотягивают до спеки. - -Проблема простая: vibe coding часто ломается не на генерации кода, а на входе. Запрос беднее результата, -который человек держит в голове. Особенно в задачах вроде «сделай поприятнее», «добавь шеринг», «перенеси -как в референсе», «готово ли это к мержу?». В таких местах модель может быть сильной и всё равно -промахнуться, потому что половина важных constraints не сказана вслух. - -`finding-unknowns` меняет порядок работы. Вместо «сразу строить» агент делает короткий discovery pass: -маленький self-contained HTML-артефакт без CDN/fetch/external deps. Это может быть четыре дизайн- -направления, интервью по архитектурным решениям, кликабельный мок, план с переключаемыми альтернативами, -buy-in doc или quiz before merge. - -Идея в том, что люди плохо формулируют свои стандарты, но хорошо их узнают. Спросить «какой стиль нужен?» -часто бесполезно. Показать четыре честных варианта одного экрана — полезно: человек сразу видит, что -берет из одного, что выкидывает из другого, и какие слова ему вообще нужны. - -Главное правило скилла: артефакт не просто показывает информацию. Он пишет следующее сообщение -пользователя. Ты кликаешь steal/skip, выбираешь answers, отмечаешь risks — внизу собирается prompt diff, -который можно вставить обратно в чат. Петля такая: render → choose → assemble prompt → implement. - -Внутри сейчас 11 техник: - -- blindspot pass: найти hidden requirements до старта; -- teach me my unknowns: дать vocabulary для вкуса или качества; -- four design directions: показать rendered варианты и собрать fifth direction; -- mock before you wire: проверить placement и interaction до кода; -- brainstorm on an effort axis: разложить идеи от quick win до квартальной ставки; -- interview: собрать архитектурные решения по blast radius; -- point at a reference: доказать, что reference behavior понят до портирования; -- tweakable plan: согласовать не линейный todo-list, а likely-to-change места; -- implementation notes: фиксировать plan-vs-reality gaps; -- buy-in doc: заранее ответить на objections ревьюера или стейкхолдера; -- quiz me before I merge: проверить, понимаешь ли ты собственный diff. - -Я также прогнал маленькие evals: 4 реалистичные задачи, по 4 бинарные проверки. Со скиллом получилось -16/16, без него — 3/16. Это не доказывает «магии», выборка маленькая. Но хорошо показывает сам механизм: -модель часто и без скилла видит часть проблем, но скилл заставляет превратить их в решения пользователя -и следующий точный промпт. - -Установка: - -```text -/plugin marketplace add droppedoutofcontext/finding-unknowns -/plugin install finding-unknowns@finding-unknowns -``` - -Репозиторий: https://github.com/droppedoutofcontext/finding-unknowns - -Идея вдохновлена Thariq Shihipar и его `A Field Guide to Fable: Finding Your Unknowns`; это независимая -упаковка подхода в Claude Code skill. - -## Короткая версия - -Собрал `finding-unknowns` — Claude Code skill про один конкретный провал агентов: они начинают строить, -хотя промпт ещё не стал спецификацией. - -Вместо угадывания агент делает self-contained HTML-артефакт: четыре дизайн-направления, interview, mock, -tweakable plan, buy-in doc или quiz before merge. Пользователь кликает варианты, а артефакт собирает -следующий prompt diff. - -Идея: люди плохо формулируют стандарты, но хорошо их узнают. - -Установка: - -```text -/plugin marketplace add droppedoutofcontext/finding-unknowns -/plugin install finding-unknowns@finding-unknowns -``` - -https://github.com/droppedoutofcontext/finding-unknowns - -## Версия для X / Threads - -Собрал `finding-unknowns` — Claude Code skill для промптов, которые ещё не стали спеками. - -Он сначала делает self-contained HTML artifact: 4 design directions, interview, mock, tweakable plan или -quiz before merge. Ты кликаешь choices, он собирает prompt diff для следующего шага. - -https://github.com/droppedoutofcontext/finding-unknowns - -## Варианты заголовков - -- Finding Unknowns: discovery pass перед вайбкодингом -- Когда промпт ещё не спека -- Маленький HTML перед большим билдом -- Claude Code skill, который превращает assumptions в prompt diff -- Почему агенту иногда нужно сначала отрендерить, а не строить - -## Визуалы - -- `docs/four-directions.gif` — основной визуал для поста. Показывает технику four design directions. -- `docs/merge-quiz.webp` — дополнительный визуал для секции про post-implementation проверки. - -Рекомендуемый порядок: начать с `four-directions.gif`, потому что он быстро объясняет петлю -«показать варианты → выбрать куски → собрать следующий промпт». - -## CTA - -- Установить: - -```text -/plugin marketplace add droppedoutofcontext/finding-unknowns -/plugin install finding-unknowns@finding-unknowns -``` - -- Посмотреть README: https://github.com/droppedoutofcontext/finding-unknowns -- Перезапустить evals: `skills/finding-unknowns/evals/evals.json` -- Источник идеи: https://x.com/trq212/article/2073100352921215386 - -## Что проверить перед публикацией - -- Подставить реальную ссылку на репозиторий, если он будет опубликован не под - `droppedoutofcontext/finding-unknowns`. -- Убедиться, что marketplace-команды уже работают для публичного пользователя. -- Решить, писать ли `Claude Code skill` или более широко `agent skill`, если пост идет не только в - Claude Code-аудиторию. -- Не делать из evals слишком сильный claim: формулировать как маленький sanity check, а не benchmark. -- Упомянуть Thariq Shihipar как источник идеи и оставить ссылку на field guide. diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..41f1e62 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,7 @@ + + + https://droppedoutofcontext.github.io/finding-unknowns/2026-10-27 + https://droppedoutofcontext.github.io/finding-unknowns/examples/design-directions.html2026-10-27 + https://droppedoutofcontext.github.io/finding-unknowns/examples/share-link-interview.html2026-10-27 + https://droppedoutofcontext.github.io/finding-unknowns/examples/merge-quiz.html2026-10-27 + diff --git a/skills/finding-unknowns/SKILL.md b/skills/finding-unknowns/SKILL.md index 369a090..3b19347 100644 --- a/skills/finding-unknowns/SKILL.md +++ b/skills/finding-unknowns/SKILL.md @@ -1,17 +1,20 @@ --- name: finding-unknowns description: >- - Surface hidden requirements before building by generating small interactive - HTML artifacts — blindspot passes, interviews, design-direction pickers, - clickable mocks, tweakable plans, merge quizzes (from - Thariq Shihipar's "A Field Guide to Fable: Finding Your Unknowns"). Use - whenever a request is vague, aesthetic, or underspecified ("make it nicer", - "improve this", "add notifications", "you decide the details"), when planning - an ambiguous or architecturally risky feature, when porting a reference - implementation, when presenting a plan or brainstorm options, or before - merging/shipping a large change — even if the user never says "unknowns" or - "HTML". Also use when the user asks to be interviewed or quizzed about a - feature, or asks "what am I missing?". + Builds a small interactive HTML page the user clicks through (option cards, + steal/skip chips, sliders, a quiz) that assembles a precise reply for them + to paste back, so hidden requirements surface before expensive work. Use + when a request is underspecified AND a wrong guess is costly to redo: vague + aesthetic or quality asks about a page, screen or design ("make it look + professional", "it looks off"); a new feature with open architectural + choices ("help me pin this down before we build"); porting or matching a + reference implementation; a plan that needs sign-off; plan-vs-reality notes + during a long build the user expects to diverge; a large diff the user + admits they skimmed before merging. Also use when the user asks to be + interviewed or quizzed, or asks "what am I missing?". Do not use for small, + local or easily reversible work (speed up or refactor one function, fix a + bug, rename), when 1-3 quick questions in chat would settle it, or when no + human is there to click (headless or subagent runs). --- # Finding Your Unknowns @@ -19,40 +22,48 @@ description: >- Turn vague requests into precise prompts by surfacing what nobody has said out loud yet. Instead of guessing and building, spend a few cheap minutes on a small interactive HTML artifact that lets the user *recognize* their -requirements — then implement against a spec that actually matches what's in -their head. +requirements, then implement against a spec that matches what's in their head. +Adapted from Thariq Shihipar's essay "A Field Guide to Fable: Finding Your +Unknowns". + +All paths below are relative to this skill's base directory (shown when the +skill loads). Your working directory is the user's project, so call scripts +by absolute path: `node /scripts/verify_artifact.mjs `. ## Why this works -The map is not the territory: the prompt you received is the map; the result -the user actually wants is the territory. The gap between them is made of -unknowns, and they come in four kinds: +The prompt is the map; the result the user wants is the territory. The gap +between them is made of unknowns: | | You know it | You don't know it | |-----------------------|--------------------------------------|----------------------------------------------------| | **User knows it** | Known knowns — already in the prompt | **Unknown knowns** — the user's unstated taste, standards, house rules | -| **User doesn't know** | Known unknowns — open questions someone already noticed | **Unknown unknowns** — factors nobody has considered yet, including how good the result could even be | +| **User doesn't know** | Known unknowns — open questions someone already noticed | **Unknown unknowns** — factors nobody has considered yet | + +Quality is bottlenecked by the right-hand column. People are bad at *stating* +their standards and excellent at *recognizing* them: show four rendered +directions and they point instantly; ask "what style?" and they shrug. +Sometimes the unknown isn't a detail but a sign the problem should be solved +another way. Surface that; don't guess past it. -Result quality is bottlenecked by the right-hand column. People are bad at -*stating* their standards but excellent at *recognizing* them: show four -rendered design directions and they will point instantly; ask "what style do -you want?" and they will shrug. So the job is to build cheap interactive -artifacts that move unknowns leftward into the prompt **before** expensive -implementation — every explainer, brainstorm, interview, and prototype is a -cheap way to find out what you didn't know. +## First: defaults, chat, or artifact? -Unaccounted unknowns make a prompt fail in both directions at once: too -specific, and you follow the instructions into a wall when a pivot was the -right move; too vague, and you fill the gaps with industry-default choices -that don't fit this task. And an unknown isn't always a detail — sometimes -it's the discovery that the problem should be solved a different way -altogether. Surface that; don't guess past it. +Use the cheapest channel that settles the blocking unknown. -## When NOT to use this +1. **Proceed with stated defaults** when a wrong guess is cheap to redo (one + function, a bug fix, a copy tweak), when the user said "just do it" or + "your call", or when no human can answer (headless run, subagent, CI). + List each assumption in one line, then build. +2. **Ask in chat** when 1–3 independent questions settle it and each option + fits in a sentence. Use a question tool if the host has one. No artifact. +3. **Build an artifact** only when at least one of these holds: + - the answer has to be seen to be chosen (visual, layout, aesthetic); + - there are 4+ questions, or the questions depend on each other; + - options need side-by-side comparison; + - the user asked to be interviewed or quizzed. -If the request is already crisp and small (known knowns all the way down), -just do the work. An artifact for "fix this typo" is theater. Reach for this -skill when ambiguity × cost-of-redoing is high. +If torn between 2 and 3, pick 2, and escalate to an artifact if the answers +come back "not sure". ## Choosing a technique @@ -71,131 +82,105 @@ skill when ambiguity × cost-of-redoing is high. | Post | Large diff about to merge | Quiz me before I merge | Diagnose which quadrant is blocking you, pick the row that matches, then read -its blueprint in [references/techniques.md](references/techniques.md) before -building. +its blueprint in `references/techniques.md` before building. Two calibrations before you build: -- **Anchor on the user's starting point.** Where are they in their thinking, - and how well do they know this domain and this codebase? A blindspot pass - for a newcomer and for the module's author contain entirely different - cards. If you don't know their starting point, ask — one sentence from - them changes what you build. +- **Anchor on the user's starting point.** A blindspot pass for a newcomer + and for the module's author contain entirely different cards. If you don't + know where they stand, ask; one sentence from them changes what you build. - **Showing options only works if the user can recognize good.** If they - don't yet know what good looks like in this domain, four variations just - produce a shrug — teach the vocabulary first (Teach me my unknowns), then - show directions. + don't yet know what good looks like in this domain, teach the vocabulary + first (Teach me my unknowns), then show directions. ## Rules for every artifact -HTML, because this information is spatial — options, diffs, timelines; -markdown flattens them. Trade a document the user would skim for one they'll -actually read. +HTML, because this information is spatial: options, diffs, timelines. +Markdown flattens them. 1. **One self-contained HTML file, in the user's language.** Inline all - CSS/JS, no CDNs, no fetches — it must open from `file://` and still work - next year; put the ` diff --git a/skills/finding-unknowns/evals/README.md b/skills/finding-unknowns/evals/README.md index 7b88a29..1d2c20f 100644 --- a/skills/finding-unknowns/evals/README.md +++ b/skills/finding-unknowns/evals/README.md @@ -1,9 +1,15 @@ # Running the evals -Four realistic tasks, four binary assertions each. [`evals.json`](evals.json) +Seven realistic tasks, four binary assertions each. [`evals.json`](evals.json) holds the prompts and assertions; [`inputs/`](inputs/) holds the fixtures. `files` paths in `evals.json` are relative to this directory. +- **Evals 0–3 are positive:** the skill should fire and run its loop. +- **Evals 4–6 are negative:** a small local change, a cheap UI tweak, and a + feature with two independent questions. The skill should stay out of the + way: no artifact, at most a few questions in chat, stated defaults. They + exist to catch over-triggering, which the positive set can't see. + ## Protocol For each eval, run **two sessions** and grade both: @@ -30,8 +36,9 @@ node ../scripts/verify_artifact.mjs recognizes the situation and executes the technique correctly — most assertions require an interactive HTML artifact, which the baseline never produces because nothing tells it to. So the headline number (16/16 vs 3/16 -on Fable 5 and Opus 4.8, single run each) measures "the loop happened", not -"the result was better". Baselines often *find* the same problems; they just +on Fable 5 and Opus 4.8, single run each, evals 0–3 only) measures "the loop +happened", not "the result was better". The negative evals 4–6 were added in +0.3.0 and have no published numbers yet. Baselines often *find* the same problems; they just deliver them as a wall of text instead of decisions the user can click through. @@ -62,3 +69,6 @@ issue with the numbers, whichever way they point. - **Eval 3** (`inputs/quiz-fixture/`): the diff renames `orders.status` to `state` while deployed workers still query `status` (in-flight breakage), and quietly stops retrying 4xx responses while raising max attempts. +- **Eval 4** (`inputs/slugify-fixture/`): the `while (out.includes('--'))` + loop rescans the whole string per replacement. Any single-pass rewrite is + fine; an artifact or an interview here is a failure. diff --git a/skills/finding-unknowns/evals/evals.json b/skills/finding-unknowns/evals/evals.json index d4695b9..855cb11 100644 --- a/skills/finding-unknowns/evals/evals.json +++ b/skills/finding-unknowns/evals/evals.json @@ -6,7 +6,9 @@ "name": "vague-aesthetic-landing-redesign", "prompt": "here's my landing page (landing.html in the working directory) — it looks kinda amateur and i want it to look more professional, but honestly i'm not sure exactly what's wrong with it. can you improve it?", "expected_output": "Instead of silently rewriting the page, the agent produces a self-contained interactive HTML artifact (design directions and/or a teach-me explainer) that shows distinct visual options, lets the user select what resonates, and assembles a copyable reply/prompt from the selections.", - "files": ["inputs/landing.html"], + "files": [ + "inputs/landing.html" + ], "assertions": [ "Produces at least one self-contained interactive HTML artifact (inline CSS/JS, no external CDN/network dependencies)", "Surfaces multiple distinct visual directions or teachable visual concepts for the user to choose from, rather than committing to a single silent redesign", @@ -32,7 +34,9 @@ "name": "impl-notes-plan-vs-reality", "prompt": "Implement rate limiting in my mini-api project exactly per plan.md (fixture provided). Heads up: this is attempt #1 — I fully expect reality to disagree with the plan somewhere, and I want to be able to learn from whatever you hit.", "expected_output": "The agent implements the feature while keeping an implementation-notes artifact: the plan-vs-reality deviations (JSON config vs YAML) logged with conservative calls, the premise break (plan assumes a database, project is file-store only) surfaced prominently, and ~3 bullets for attempt #2 at the end.", - "files": ["inputs/notes-fixture/"], + "files": [ + "inputs/notes-fixture/" + ], "assertions": [ "Keeps an implementation-notes artifact (md or html) with per-deviation entries: what the plan said, what was actually true, and the conservative call made", "Logs the config JSON-vs-YAML mismatch as a deviation with a conservative call, rather than silently adapting", @@ -45,13 +49,56 @@ "name": "merge-readiness-quiz", "prompt": "I'm about to merge this change to our order-processing worker (repo/ + diff.patch provided). Honestly I only skimmed the diff. Am I ready to merge?", "expected_output": "The agent produces a self-contained interactive HTML merge-readiness report grouped by risk, ending in a ~6-question quiz whose wrong answers link back to the relevant section, covering the planted subtleties (in-flight jobs during the column rename; 4xx no longer retried), and assembling a copyable reply from the result.", - "files": ["inputs/quiz-fixture/"], + "files": [ + "inputs/quiz-fixture/" + ], "assertions": [ "Produces a self-contained interactive HTML merge-readiness report ending in a quiz (~6 questions) with pass/fail feedback", "Report is grouped by risk, not by file, and wrong answers point back to the relevant report section", "Quiz covers the planted subtleties: in-flight jobs during the status->state column rename, and 4xx responses no longer being retried", "Assembles a copyable reply: quiz outcome plus sections flagged for re-reading (or 'passed — merging')" ] + }, + { + "id": 4, + "name": "negative-small-local-change", + "prompt": "slugify in utils.js is slow, it runs on every row of our 200k-row export. can you speed it up?", + "expected_output": "A small, local, easily reversible change. The agent rewrites slugify directly (stating any assumption in a line) instead of building an artifact or running an interview.", + "files": [ + "inputs/slugify-fixture/" + ], + "assertions": [ + "Does not produce an HTML artifact", + "Does not ask the user more than one clarifying question before making the change", + "Changes slugify so it no longer does repeated full-string scans (e.g. a single regex pass or one loop)", + "Keeps the function's observable output the same for ordinary titles, or says exactly where it differs" + ] + }, + { + "id": 5, + "name": "negative-cheap-ui-tweak", + "prompt": "add a loading spinner to the submit button on the signup form", + "expected_output": "Cheap to redo, so the agent proceeds with stated defaults (or asks at most one question) and makes the change. No artifact.", + "files": [], + "assertions": [ + "Does not produce an HTML artifact", + "Either proceeds directly or asks at most one question in chat", + "States the defaults it chose (for example: disable the button while pending, keep its width stable) in a line or two", + "Does not invoke a multi-step discovery workflow (interview, design directions) for this request" + ] + }, + { + "id": 6, + "name": "few-questions-go-to-chat", + "prompt": "add CSV export to the reports page. not sure whether archived reports should be included, and I don't know if it should respect the current filters", + "expected_output": "Two independent questions with one-sentence options: the agent asks them in chat (or proposes defaults) instead of building an artifact.", + "files": [], + "assertions": [ + "Does not produce an HTML artifact", + "Asks about archived reports and current filters in chat, or states a default for each", + "Keeps the question count at three or fewer", + "Offers a recommended default for at least one of the questions" + ] } ] } diff --git a/skills/finding-unknowns/evals/inputs/slugify-fixture/utils.js b/skills/finding-unknowns/evals/inputs/slugify-fixture/utils.js new file mode 100644 index 0000000..e11bec4 --- /dev/null +++ b/skills/finding-unknowns/evals/inputs/slugify-fixture/utils.js @@ -0,0 +1,11 @@ +// Called for every row when the catalog is exported (~200k rows per run). +function slugify(title) { + let out = title.toLowerCase(); + out = out.split('').map((ch) => (/[a-z0-9]/.test(ch) ? ch : '-')).join(''); + while (out.includes('--')) out = out.replace('--', '-'); + while (out.startsWith('-')) out = out.slice(1); + while (out.endsWith('-')) out = out.slice(0, -1); + return out; +} + +module.exports = { slugify }; diff --git a/skills/finding-unknowns/references/techniques.md b/skills/finding-unknowns/references/techniques.md index 44ed772..a967d1c 100644 --- a/skills/finding-unknowns/references/techniques.md +++ b/skills/finding-unknowns/references/techniques.md @@ -3,7 +3,8 @@ Eleven blueprints, grouped by phase. Each entry: when to use it, what to build, and what reply the artifact must assemble for the user. All of them obey the global rules in SKILL.md (self-contained HTML, assembled-reply box, -impact-first ordering, quiet chrome) — except implementation notes, which is +impact-first ordering, quiet chrome) and come after its gate: if a few +questions in chat would settle it, don't build — except implementation notes, which is a file you keep, not an artifact you hand over. --- @@ -36,8 +37,8 @@ vocabulary the user lacks — color grading, typography, audio mixing, data-viz. knowns*) but no words for it. Choose this over Four design directions when the user wouldn't yet *recognize* good in this domain. -**Build:** An interactive explainer: a vocabulary ladder (term → plain-English -meaning → what changing it looks like), a live preview region with sliders +**Build:** An interactive explainer: a vocabulary ladder (each term, its +plain-English meaning, and what changing it looks like), a live preview region with sliders and/or presets so the user can *feel* each parameter, and preset chips ("filmic", "punchy", "flat"). Every slider/preset the user touches is recorded. @@ -126,7 +127,8 @@ decisions the user actually cares about under mechanical steps. **Build:** The plan **sorted by likelihood-of-tweaking**, not execution order. Uncertain choices (schema shapes, API contracts, naming) at the top, each -flagged with **toggleable alternatives** ("store as JSONB ⇄ separate table") +flagged with **toggleable alternatives** (store as a JSONB column, or as a +separate table) and annotated type interfaces. The mechanical work — migrations, wiring, boilerplate — collapsed at the bottom. @@ -147,7 +149,7 @@ what the plan said, what was actually true, the **conservative call you made** and why. Edge cases get the conservative call and you keep going; a discovery that undermines the plan's premise gets **surfaced immediately** — that unknown means the problem may need a different solution, not a workaround. -End with **a few bullets (≈3) to fold into attempt #2** (or into the user's +End with **three bullets to fold into attempt #2** (or into the user's mental model). Keep it as plain markdown in `.unknowns/notes-.md` — this is the one technique where a file beats HTML: you append to it while working, and nobody interacts with it until the end. Render an HTML @@ -180,7 +182,7 @@ objections marked. The unknown is what *they* don't know about their own change. **Build:** A merge-readiness report over the diff (grouped by risk, not by -file), ending in a **short quiz the user must pass** (≈6 questions): "what +file), ending in a **short quiz the user must pass** (about six questions): "what happens to in-flight jobs during the migration?" Wrong answers don't just say "wrong" — they **link back to the exact section** the user skimmed. diff --git a/skills/finding-unknowns/scripts/verify_artifact.mjs b/skills/finding-unknowns/scripts/verify_artifact.mjs index 733dd8a..f047333 100644 --- a/skills/finding-unknowns/scripts/verify_artifact.mjs +++ b/skills/finding-unknowns/scripts/verify_artifact.mjs @@ -1,14 +1,16 @@ #!/usr/bin/env node // Verify a finding-unknowns HTML artifact before handing it to the user. // -// Usage: node verify_artifact.mjs +// Usage: node verify_artifact.mjs [--template] // // Checks: -// 1. No external URLs (src/href/import/fetch to http[s]) — must work offline. -// 2. Inline