diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index d5941bc..e9952b0 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "fstack", "description": "Federico Mastrini's agent skills for everyday software engineering work.", - "version": "0.17.2", + "version": "0.18.0", "author": { "name": "Federico Mastrini", "url": "https://fedemas.dev" diff --git a/README.md b/README.md index 80eca29..e172aaa 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **A short stack of agent skills for everyday software engineering work.** [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-D97757?style=flat-square)](https://www.fedemas.dev/fstack) -[![Version](https://img.shields.io/badge/version-0.17.2-B4A7E5?style=flat-square)](.claude-plugin/plugin.json) +[![Version](https://img.shields.io/badge/version-0.18.0-B4A7E5?style=flat-square)](.claude-plugin/plugin.json) [![License: MIT](https://img.shields.io/badge/license-MIT-93D3BB?style=flat-square)](LICENSE) @@ -33,6 +33,7 @@ fstack turns everyday engineering workflows into skills your coding agent runs e | UX | [ux-brainstorm](skills/ux-brainstorm/SKILL.md) · [ux-stress-test](skills/ux-stress-test/SKILL.md) · [design-system](skills/design-system/SKILL.md) | | Building | [implement](skills/implement/SKILL.md) · [implement-issue](skills/implement-issue/SKILL.md) · [test-driven-development](skills/test-driven-development/SKILL.md) | | Code quality | [code-review](skills/code-review/SKILL.md) · [receiving-code-review](skills/receiving-code-review/SKILL.md) · [comment-sweep](skills/comment-sweep/SKILL.md) | +| Agent instructions | [writing-for-agents](skills/writing-for-agents/SKILL.md) | | Pull requests | [pr-open](skills/pr-open/SKILL.md) · [pr-ship](skills/pr-ship/SKILL.md) · [pr-babysit](skills/pr-babysit/SKILL.md) · [resolve-merge-conflicts](skills/resolve-merge-conflicts/SKILL.md) | ## 📦 Install diff --git a/gemini-extension.json b/gemini-extension.json index 536b85a..a87c0b5 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,5 +1,5 @@ { "name": "fstack", - "version": "0.17.2", + "version": "0.18.0", "description": "Federico Mastrini's agent skills for everyday software engineering work." } diff --git a/plugin.json b/plugin.json index 7fee5fa..fb238c3 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "fstack", - "version": "0.17.2", + "version": "0.18.0", "description": "Federico Mastrini's agent skills for everyday software engineering work.", "author": { "name": "Federico Mastrini", diff --git a/skills/writing-for-agents/SKILL.md b/skills/writing-for-agents/SKILL.md new file mode 100644 index 0000000..123f3c0 --- /dev/null +++ b/skills/writing-for-agents/SKILL.md @@ -0,0 +1,60 @@ +--- +name: writing-for-agents +description: Use when writing, editing, or reviewing text an AI agent will read and act on, such as a SKILL.md, an AGENTS.md or CLAUDE.md, a system prompt, a subagent brief, or a tool description, or when the user asks why an agent ignores its instructions or wants one of those files trimmed or tightened. +--- + +# Writing for agents + +Your reader is a capable model. It already knows most of what you could tell it, it reads every line, and it tries to obey each one. So every line costs twice: the tokens to read it and the effort to follow it. Instructions an agent didn't need still make it reason longer and do worse. + +## 1. Keep only lines that change behavior + +Test each line: would the agent get this wrong without it? Keep the line only when the answer is yes. Lines that pass: + +- facts it can't find on its own: conventions, environment quirks, decisions and the reasons behind them, places where the project departs from the usual default; +- exact commands, names, and limits for fragile steps; +- what done looks like, and when to stop. + +Cut the rest: + +- What the agent can discover: directory tours, file lists, what the code already says. Point to `src/billing/charge.ts:42` instead of copying code; copies go stale. +- Advice it already follows ("handle errors appropriately", "follow best practices"). Write the specific pattern, edge case, or convention it stood in for, or delete it. +- Anything tied to a date or a passing phase ("until the migration ends"). State the rule as it stands now; move retired guidance into an "Old patterns" section only if agents still meet the old code. + +Facts that contradict a reasonable assumption ("tests need `TZ=UTC`", "the staging DB is shared with QA") are usually the most valuable lines in the file. Collect them under a Gotchas heading, and add one each time you correct an agent. + +## 2. Phrase each rule + +- **Say what to do.** "Write flowing prose paragraphs" works better than "don't use markdown": a prohibition names the thing to avoid and leaves the agent guessing at the alternative. Keep a negative only for a safety rule with no positive form. +- **Give the reason for any rule that isn't obvious.** The agent generalizes from the reason. "No ellipses" covers one case; "no ellipses, because a text-to-speech engine reads this aloud" also covers the cases you didn't list. +- **Write in a calm voice.** Capitals and "CRITICAL: you MUST" make current models apply the rule everywhere, including where it doesn't fit. Write "Use X when Y", and replace blanket fallbacks ("if in doubt, use X") with the real condition. +- **Match strictness to the cost of a mistake.** A fragile or irreversible step gets the exact command, to run as written. A step with many good answers gets the goal and a heuristic. Set the level for each part separately: rigid if-else trees break on the first unlisted case, and vague guidance guides nothing. +- **One term per concept, one default per choice.** Pick "field" and keep it; a switch to "box" reads as a different thing. Name one recommended tool and one fallback for when it fails, rather than a menu. +- **One source of truth.** Rules that contradict each other make the agent spend its reasoning reconciling them, and it may pick the wrong one. Merge duplicates, and when two rules can collide, say which wins. +- **Exact names.** Fully qualified tool names (`server:tool`), forward-slash paths, and the dependencies the text assumes are installed. + +## 3. Shape the document + +- Put background, instructions, examples, and inputs under separate headings or XML tags, so the agent can tell a rule from data. +- Teach a pattern with 3 to 5 short, varied examples rather than a long list of edge-case rules, each in an `` tag. +- For an output format, give a template and say whether it is strict or a starting point. +- Keep the main file short (a SKILL.md well under 500 lines) and move detail into files linked straight from it, one level deep, each with its trigger: "read `references/api-errors.md` when the API returns a non-200 status". Agents often read only the top of a long file, so a reference over 100 lines opens with a table of contents. +- Put long input documents first and the task or question last. + +## 4. Per kind of text + +- **Skill description**: the agent picks among many skills from this text alone. It says when to use the skill: the situations and the words users actually type, with specific key terms. How the skill works belongs in the body. Stay under 1,024 characters, and single-quote the value when it contains ` #`, which YAML reads as the start of a comment. +- **Subagent brief**: the subagent knows only what the brief says. Give the goal and why it matters, what is already ruled out, the sources and tools to use, the scope it must stay inside, the return format, and how much effort the task deserves (a lookup takes a few tool calls). Vague briefs produce duplicated work and gaps. +- **AGENTS.md or CLAUDE.md**: write it by hand; generated ones lowered task success and raised cost. Name the commands and tools you want used, since agents reach for whatever the file mentions, and mention only those. +- **Tool description**: write it for a new hire: what the tool does, when to pick it over its siblings, unambiguous parameter names (`user_id`, not `user`), and a shared prefix for related tools. Error messages say what to fix and show a valid input. +- **Anything that lets an agent act**: say when to stop and hand back, which actions run freely (local and reversible), and which wait for confirmation (destructive, or touching shared systems). + +## 5. Check before you hand it over + +1. Read it as the agent would: two rules that conflict, a step without a done condition, a term used two ways. +2. Search it for capitals used for emphasis, "never" and "don't" rules, generic advice, rules said twice, and dates. Rewrite each as in step 2. +3. Ask of every remaining line whether the agent would get the task wrong without it, and cut each line that fails. + +For a skill or prompt that will run often, test it as well. Run the task without it first to see what the agent actually gets wrong, write about three scenarios, and write the least text that fixes them. Then read the agent's step-by-step transcript, not only its final output, to find lines it ignored or over-applied. For a skill description, try about 20 requests, half of them near-misses that should not trigger it. + +When you rewrite someone else's text, keep the meaning of every rule you keep. End your reply with a short list of what you cut and why, and of anything you added or loosened, so they can restore a line that mattered or reject one they never asked for. diff --git a/skills/writing-for-agents/agents/openai.yaml b/skills/writing-for-agents/agents/openai.yaml new file mode 100644 index 0000000..22635b5 --- /dev/null +++ b/skills/writing-for-agents/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Writing for Agents" + short_description: "Write prompts, skills, and briefs agents follow" diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/case.yaml b/skills/writing-for-agents/evals/briefs-research-subagent/case.yaml new file mode 100644 index 0000000..63ffa76 --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/case.yaml @@ -0,0 +1,8 @@ +schema_version: "1.1" +name: briefs-research-subagent +expected_outcome: | + The run writes a brief and does not do the search itself. The brief states the goal and why + (find every caller of /v1/payments so the endpoint can be switched off), names both sources + (services/ code and logs/gateway/ access logs), says what to return in a set format (each + calling service with the evidence: file and line, or log lines and counts), keeps the subagent + read-only, and says when it is done. It is written in a calm voice without capitals for emphasis. diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/01-goal-and-reason.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/01-goal-and-reason.md new file mode 100644 index 0000000..dcdcad9 --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/01-goal-and-reason.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief states the goal and the reason: find every service that still calls /v1/payments so the endpoint can be switched off. diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/02-names-both-sources.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/02-names-both-sources.md new file mode 100644 index 0000000..297ef6e --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/02-names-both-sources.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief names both sources the subagent should use: the code in services/ and the gateway access logs in logs/gateway/. diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/03-return-format.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/03-return-format.md new file mode 100644 index 0000000..5fe6766 --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/03-return-format.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief specifies a return format, listing per calling service the evidence (such as file and line for code, and matching log lines or request counts for logs). diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/04-read-only-scope.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/04-read-only-scope.md new file mode 100644 index 0000000..df4ee3c --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/04-read-only-scope.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief sets a scope limit: the subagent only reads and searches, and changes no code, config, or the endpoint itself. diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/05-done-condition.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/05-done-condition.md new file mode 100644 index 0000000..22f0015 --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/05-done-condition.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief says when the subagent is done or how far to go (for example, once every service in services/ and the 30 days of logs are checked), or how much effort the task deserves. diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/graders/06-no-caps-emphasis.md b/skills/writing-for-agents/evals/briefs-research-subagent/graders/06-no-caps-emphasis.md new file mode 100644 index 0000000..c144baa --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/graders/06-no-caps-emphasis.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The brief contains no capital letters for emphasis (IMPORTANT, MUST, NEVER, CRITICAL in capitals). diff --git a/skills/writing-for-agents/evals/briefs-research-subagent/prompt.md b/skills/writing-for-agents/evals/briefs-research-subagent/prompt.md new file mode 100644 index 0000000..d68a4ba --- /dev/null +++ b/skills/writing-for-agents/evals/briefs-research-subagent/prompt.md @@ -0,0 +1,8 @@ +--- +tags: [writing-for-agents] +max_turns: 30 +timeout_seconds: 600 +allowed_tools: [Read, Glob, Grep, Skill, Write, Edit, Bash] +--- + +i want to hand this off to a subagent: find out which of our services still call the deprecated /v1/payments endpoint, so we can switch it off at the end of the month. the code is in services/ (about 40 services, mixed go and typescript) and the api gateway access logs for the last 30 days are in logs/gateway/. write the brief i should give it. just the brief, don't run it diff --git a/skills/writing-for-agents/evals/drafts-release-skill/case.yaml b/skills/writing-for-agents/evals/drafts-release-skill/case.yaml new file mode 100644 index 0000000..98c01f3 --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/case.yaml @@ -0,0 +1,9 @@ +schema_version: "1.1" +name: drafts-release-skill +expected_outcome: | + The run writes skills/release/SKILL.md. Its frontmatter description says when to use the skill + with the phrases users type (cut a release, ship a version, publish the new version) and leaves + the steps to the body. The body gives the exact commands, stops and reports when pnpm test or + pnpm build fails, and asks the user to confirm before the irreversible steps (pushing the tag and + running pnpm publish), saying why. It is short, written in a calm voice without capitals for + emphasis, and carries no generic advice. diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/01-description-has-trigger-phrases.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/01-description-has-trigger-phrases.md new file mode 100644 index 0000000..74e2d8e --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/01-description-has-trigger-phrases.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +skills/release/SKILL.md has YAML frontmatter with a name and a description, and the description says when to use the skill using phrases like "cut a release", "ship 2.4.0", or "publish the new version". diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/02-description-triggers-only.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/02-description-triggers-only.md new file mode 100644 index 0000000..9a731c0 --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/02-description-triggers-only.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md description gives the trigger situations and phrases only; it does not summarize the release steps (bump, test, tag, publish, post). diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/03-confirms-before-publish.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/03-confirms-before-publish.md new file mode 100644 index 0000000..216ea45 --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/03-confirms-before-publish.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md has the agent ask the user to confirm before running `pnpm publish` and says why (a publish cannot be undone). diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/04-stops-on-failed-checks.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/04-stops-on-failed-checks.md new file mode 100644 index 0000000..91cba00 --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/04-stops-on-failed-checks.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md has the agent stop and report, without tagging or publishing, when `pnpm test` or `pnpm build` fails. diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/05-exact-commands.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/05-exact-commands.md new file mode 100644 index 0000000..f4542fd --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/05-exact-commands.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md gives the exact commands for the fragile steps: `pnpm test`, `pnpm build`, the tag (vX.Y.Z), pushing the commit and tag, and `pnpm publish --access public`. diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/06-no-caps-emphasis.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/06-no-caps-emphasis.md new file mode 100644 index 0000000..02ecc3a --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/06-no-caps-emphasis.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md contains no capital letters for emphasis (IMPORTANT, MUST, NEVER, ALWAYS, CRITICAL in capitals). diff --git a/skills/writing-for-agents/evals/drafts-release-skill/graders/07-no-generic-advice.md b/skills/writing-for-agents/evals/drafts-release-skill/graders/07-no-generic-advice.md new file mode 100644 index 0000000..4869a3b --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/graders/07-no-generic-advice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The SKILL.md contains no generic advice lines such as "follow best practices", "be careful", or "ensure quality". diff --git a/skills/writing-for-agents/evals/drafts-release-skill/prompt.md b/skills/writing-for-agents/evals/drafts-release-skill/prompt.md new file mode 100644 index 0000000..00efe26 --- /dev/null +++ b/skills/writing-for-agents/evals/drafts-release-skill/prompt.md @@ -0,0 +1,8 @@ +--- +tags: [writing-for-agents] +max_turns: 30 +timeout_seconds: 600 +allowed_tools: [Read, Glob, Grep, Skill, Write, Edit, Bash] +--- + +make a skill so agents can do our npm release. steps: bump the version in package.json and add a CHANGELOG.md entry, run `pnpm test` and `pnpm build`, commit, tag vX.Y.Z, push the commit and the tag, then `pnpm publish --access public` (a publish can't be undone, we got burned once), then post the changelog entry in the #releases channel. people ask for it like "cut a release", "ship 2.4.0", "publish the new version". save it to skills/release/SKILL.md diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/case.yaml b/skills/writing-for-agents/evals/trims-bloated-agents-md/case.yaml new file mode 100644 index 0000000..360f498 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/case.yaml @@ -0,0 +1,14 @@ +schema_version: "1.1" +name: trims-bloated-agents-md +expected_outcome: | + The run rewrites AGENTS.md in place. It drops the project description and the directory tour + (agents can discover both) and the generic advice (clean code, best practices, handle errors, + readable code, always write tests). It names one package manager, pnpm, which matches + package.json's packageManager, and the npm line is gone. It keeps every fact an agent couldn't + guess: TZ=UTC for the date tests, pnpm db:reset only against the local database on + localhost:5433, the migration command and the rule against editing merged migrations, named + exports, and leaving legacy/ alone with its reason (customers run v1 on their own servers). The + Jest-to-Vitest timeline becomes a plain "use Vitest" rule. Capitals for emphasis are gone. The + final reply says what was cut and why. +context: + scaffold_script: place-files.sh diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/files/AGENTS.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/files/AGENTS.md new file mode 100644 index 0000000..dce90b1 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/files/AGENTS.md @@ -0,0 +1,55 @@ +# AGENTS.md + +## About this project + +Tallybook is a web application for small businesses to track invoices, expenses and payments. It is built with TypeScript, React and Node.js. The frontend uses Vite and the backend uses Express with a PostgreSQL database. We care a lot about quality and we want our code to be clean and easy to read. + +## Project structure + +``` +apps/ + web/ # React frontend + api/ # Express backend +packages/ + ui/ # shared React components + db/ # database schema and migrations + utils/ # shared helpers +scripts/ # dev scripts +legacy/ # old v1 invoice exporter +``` + +- `apps/web/src/pages` contains the pages +- `apps/web/src/components` contains the components +- `apps/api/src/routes` contains the API routes +- `packages/db/migrations` contains the migrations + +## General rules + +IMPORTANT!!! You MUST ALWAYS write clean, maintainable, well-tested code and follow best practices at all times. + +- Always handle errors appropriately. +- Make sure the code is readable. +- Use npm to install dependencies. +- Don't use default exports. +- Write meaningful commit messages. + +## Testing + +- Until the end of Q1 2025 we are migrating from Jest to Vitest. New tests should use Vitest, old Jest tests will be converted. +- Run the tests with `pnpm test`. +- The date-formatting tests fail on machines that are not in UTC, so run them with `TZ=UTC pnpm test`. +- Always write tests for your code. + +## Database + +- CRITICAL: `pnpm db:reset` drops every table. Only run it against the local docker database (DATABASE_URL pointing at localhost:5433), never against staging. +- Migrations live in `packages/db/migrations`. Create a new one with `pnpm --filter db migrate:new `; never edit a migration that is already merged. + +## Packages + +- ALWAYS use pnpm. NEVER use npm or yarn. +- Don't use default exports!!! + +## Legacy + +- NEVER EVER touch anything in `legacy/`. It is the v1 invoice exporter that two enterprise customers still run on their own servers, and any change has to be shipped to them by hand. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/files/package.json b/skills/writing-for-agents/evals/trims-bloated-agents-md/files/package.json new file mode 100644 index 0000000..de561e3 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/files/package.json @@ -0,0 +1,12 @@ +{ + "name": "tallybook", + "private": true, + "packageManager": "pnpm@9.12.0", + "scripts": { + "dev": "vite", + "test": "vitest run", + "lint": "eslint .", + "typecheck": "tsc --noEmit", + "db:reset": "tsx scripts/db-reset.ts" + } +} diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/01-drops-directory-tour.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/01-drops-directory-tour.md new file mode 100644 index 0000000..fa15b68 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/01-drops-directory-tour.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md no longer contains the directory tree or the list of which folder holds pages, components, routes and migrations as a tour (a single path inside a rule, such as the migrations folder, is fine). diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/02-drops-generic-advice.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/02-drops-generic-advice.md new file mode 100644 index 0000000..f2891bf --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/02-drops-generic-advice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md no longer contains generic advice: no lines like "write clean, maintainable code", "follow best practices", "handle errors appropriately", "make sure the code is readable", or "always write tests". diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/03-no-caps-emphasis.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/03-no-caps-emphasis.md new file mode 100644 index 0000000..1e7f92a --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/03-no-caps-emphasis.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md uses no capital letters for emphasis: none of IMPORTANT, MUST, ALWAYS, NEVER, CRITICAL, or NEVER EVER written in capitals, and no "!!!". diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/04-pnpm-only.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/04-pnpm-only.md new file mode 100644 index 0000000..fb9ab85 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/04-pnpm-only.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md tells agents to use pnpm and contains no instruction to use npm, so the npm-versus-pnpm contradiction is gone. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/05-keeps-gotchas.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/05-keeps-gotchas.md new file mode 100644 index 0000000..4799d1d --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/05-keeps-gotchas.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md keeps both gotchas with their exact commands: the date tests need `TZ=UTC pnpm test` (or TZ=UTC), and `pnpm db:reset` drops every table and runs only against the local database on localhost:5433. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/06-keeps-migration-rules.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/06-keeps-migration-rules.md new file mode 100644 index 0000000..256647f --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/06-keeps-migration-rules.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md keeps the migration rules: create one with `pnpm --filter db migrate:new `, and merged migrations stay unedited. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/07-keeps-legacy-reason.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/07-keeps-legacy-reason.md new file mode 100644 index 0000000..00c3744 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/07-keeps-legacy-reason.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md keeps the legacy/ rule together with its reason (enterprise customers run the v1 exporter on their own servers and changes ship to them by hand). diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/08-vitest-without-timeline.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/08-vitest-without-timeline.md new file mode 100644 index 0000000..d31cdbe --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/08-vitest-without-timeline.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md says to use Vitest for tests without the "until the end of Q1 2025" migration timeline. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/09-named-exports-once.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/09-named-exports-once.md new file mode 100644 index 0000000..3fae4d0 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/09-named-exports-once.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The rewritten AGENTS.md states the default-export rule once, phrased as what to do (use named exports) rather than as a prohibition. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/10-reply-lists-cuts.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/10-reply-lists-cuts.md new file mode 100644 index 0000000..70c7782 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/graders/10-reply-lists-cuts.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: trace +weight: 1 +--- + +The final reply lists what was removed from the file and why, so the user can restore a line. diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/place-files.sh b/skills/writing-for-agents/evals/trims-bloated-agents-md/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/skills/writing-for-agents/evals/trims-bloated-agents-md/prompt.md b/skills/writing-for-agents/evals/trims-bloated-agents-md/prompt.md new file mode 100644 index 0000000..f7fd4dc --- /dev/null +++ b/skills/writing-for-agents/evals/trims-bloated-agents-md/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [writing-for-agents] +max_turns: 30 +timeout_seconds: 600 +allowed_tools: [Read, Glob, Grep, Skill, Write, Edit, Bash] +--- + +our AGENTS.md keeps growing and the agents seem to ignore half of it anyway. can you rewrite it so it actually works? edit the file in place + +Input files: AGENTS.md, package.json