post-friction-lesson
Skill0 starsChanged 7 months agoMITView on GitHub
Record a friction point in docs/lessons.md when something about this repo's structure, tooling, or conventions surprised you or caused a mistake. Use after you recover from confusion, before starting the next task. This is the cheapest adaptation mechanism and always appropriate — even if no rule or structural change follows.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-browser-mcpSkill
- add-packageSkill
- add-visual-lintingSkill
- mine-ast-grep-rulesSkill
- propose-ast-grep-ruleSkill
- versionSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Always, when any of these happen:
- Very specific: line 52
Pause: Don't log a lesson mid-problem.
- Distinctive: line 56
Write the entry: Keep it tight — one short paragraph per section.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
post-friction-lesson
Appends a dated entry to docs/lessons.md. This is the first-line adaptation mechanism: whenever something in the repo confuses you, caused a mistake, or took longer than it should have, log it.
When to use this skill
Always, when any of these happen:
- You made the same mistake twice in one session
- A rule fired and you had to re-read its
note:to understand it - You searched for code and didn't find it where you expected
- The check command told you something was wrong in a way that wasn't actionable
- A convention in
docs/conventions.mdwasn't enforced and you violated it - You hand-copied from an existing package instead of running the scaffolder (and it caused a problem)
When NOT to use this skill
- Bugs in the code you're writing (those belong in the code or its commit message)
- External library issues (those belong upstream)
- Preferences that aren't mistakes ("I wish prettier did X")
The entry format
docs/lessons.md is append-only. Add a new entry at the top under the date heading:
## 2026-04-17
### Lesson: <short title>
**What happened:** <one or two sentences about the confusion>
**What fixed it:** <what resolved the confusion>
**Potential next step:**
- [ ] rule: <propose an ast-grep rule if the pattern will repeat>
- [ ] doc: <add a sentence to docs/conventions.md or docs/architecture.md>
- [ ] structure: <open an ADR if the layout itself is wrong>
- [x] no action needed — just noting it
**Related:** <link to PR, commit, rule id, or "none">Steps
- Pause. Don't log a lesson mid-problem. Finish the current task, verify with
pnpm check, then circle back. - Read the last few entries in
docs/lessons.mdbefore writing yours. If the same lesson is already there with a different framing, update the existing entry rather than adding a duplicate (bump its date in the heading, add to "What fixed it"). - Write the entry. Keep it tight — one short paragraph per section. A lesson that takes five minutes to read won't get read.
- Choose a next step.
- No action needed is a valid choice. Some friction is just mine-sweeping, and logging it is enough.
- Rule is right when the pattern will repeat and is structurally detectable. Use the
propose-ast-grep-ruleskill next turn. - Doc is right when the convention exists but wasn't discoverable. Add the missing sentence.
- Structure is right when the repo layout itself was wrong. Open an ADR at
docs/decisions/<next-number>-<slug>.md.
- Commit the lesson. Even if you're in the middle of other work, lessons get committed separately. Commit message:
lesson: <short title>.
Why this matters
Silently working around confusion is how a codebase gets hostile. The LLM eats extra context figuring out the weird thing, the human never notices because it looked fine, and six months later nobody remembers why there's a third way to do something that two of the ways already cover.
Logging friction takes thirty seconds. Over a year it compounds into a repo that knows its own shape.
Examples
Good entry:
## 2026-04-17
### Lesson: scaffolder doesn't create the tsconfig reference entry
**What happened:** Ran `pnpm scaffold:package foo`, then ran `pnpm check` and got "Referenced project 'packages/foo' could not be found." in the root tsconfig error output.
**What fixed it:** Manually added `{ "path": "packages/foo" }` to the `references` array in `tsconfig.json`.
**Potential next step:**
- [x] bug: fix `tools/scaffold/package.ts` to update the root tsconfig references array
**Related:** none yetBad entry (too vague, no action):
## 2026-04-17
### Lesson: tsconfig was confusing
tsconfig was confusing today.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

