You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/lessons.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
# Lessons
2
2
3
-
Persistent log of corrections and insights from past sessions. Agents **must**check this file at the start of every session and append new lessons after corrections.
3
+
Persistent log of corrections and insights from past sessions. Read when relevant; **encode durable lessons in rules/skills**— this file is a staging area, not an archive.
4
4
5
-
## Format
5
+
## Rules
6
6
7
-
Each entry is a single bullet: `- **<topic>** — <lesson>`. Newest entries at the bottom.
7
+
1.**Append only durable, non-obvious corrections** — not session trivia already captured in a rule, skill, or reference doc.
8
+
2.**Prefer lifting** — when a lesson becomes policy, move it to `.agents/rules/` or the relevant skill and **delete** the bullet here (or supersede with one line pointing at the rule).
9
+
3.**Keep entries atomic** — one lesson per bullet. One sentence.
10
+
4.**No duplicates** — check before appending; merge or supersede instead.
11
+
5.**Supersede, don't accumulate** — outdated lesson → replace with a new bullet citing what changed; don't leave both.
Copy file name to clipboardExpand all lines: .agents/rules/agents-tier-system.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Genuinely cross-cutting. Apply to every turn regardless of file:
28
28
-`codemap` — STOP-before-grep
29
29
-`concise-comments` — sweep your own new comments before reporting
30
30
-`concise-reporting` — extreme concision in agent reports
31
-
-`lessons` — read at session start, append after corrections
31
+
-`lessons` — read when relevant; lift durable ones into rules/skills
32
32
-`no-bypass-hooks` — never `--no-verify` on `git commit`
33
33
-`pr-comment-fact-check` — fires the fact-check skill on PR-comment intent triggers
34
34
-`preserve-comments` — never silently delete TODOs / commented-out code
@@ -45,7 +45,7 @@ Today's Tier-2 rules:
45
45
46
46
-`agents-tier-system` (this rule) — auto-attaches when authoring under `.agents/**` or `.cursor/**`.
47
47
-`docs-governance` — primes the docs framework when authoring under `docs/**` or `.agents/**` (paired with [`docs-governance` skill](../skills/docs-governance/SKILL.md)).
48
-
-`plan-pr-inspiration-discipline` — primes plan-PR / recipe authoring with the open-spec inspection list when authoring under `docs/plans/**` or `templates/recipes/**`. The canonical inspection-sources table lives in the rule body itself (lifted from `research/non-goals-reassessment-2026-05.md § 4` in 2026-05; see [§ 7 Lifted to](../../docs/research/non-goals-reassessment-2026-05.md#7-lifted-to)).
48
+
-`plan-pr-inspiration-discipline` — primes plan-PR / recipe authoring with the open-spec inspection list when authoring under `docs/plans/**` or `templates/recipes/**`. The canonical inspection-sources table lives in the rule body itself.
|**Roadmap**| root (`roadmap.md`, single file) | Lives forever |
28
+
|**Plan**|`plans/<name>.md`|**Delete + lift** when work ships (no "Slim & keep in plans/") |
29
+
|**Audit**|`audit.md` (single) OR `audits/<topic>.md` (multi) | Substrate variants — see skill |
30
+
|**Research**|`research/<tool>.md` OR `research/<topic>-YYYY-MM.md`| Adopted → lift + **delete** (unless inbound cites require slim stub) / Rejected → status header only / Open |
31
31
32
32
## Top three disciplines
33
33
34
34
1.**Anchor preservation** — slim READMEs keep cited rule numbers and section anchors. Grep before any slim: `rg "Rule [0-9]+" docs/` and `rg "<doc-path>(#[a-z-]+)?"`.
35
35
2.**Anti-bloat meta-rule** — don't add a rule until there's content that needs it. Same for ownership-table rows.
36
-
3.**Repo-level vs in-source** — repo-wide tool evaluations + adoption (oxlint, future plugins) live in `.agents/`, not as permanent `docs/research/` files. A `docs/research/` file may motivate the adoption, but the rule + skill earn the permanent home. Per-tool tracker notes (peer-tool comparisons, adoption-candidate logs) are an anti-pattern — peer-tool framing goes off-mission fast; positioning lives in [`docs/why-codemap.md`](../../docs/why-codemap.md) and [`research/non-goals-reassessment-2026-05.md`](../../docs/research/non-goals-reassessment-2026-05.md), not in tracker files.
36
+
3.**Repo-level vs in-source** — repo-wide tool evaluations + adoption (oxlint, future plugins) live in `.agents/`, not as permanent `docs/research/` files. A `docs/research/` file may motivate the adoption, but the rule + skill earn the permanent home. Per-tool tracker notes (peer-tool comparisons, adoption-candidate logs) are an anti-pattern — peer-tool framing goes off-mission fast; positioning lives in [`docs/why-codemap.md`](../../docs/why-codemap.md), not in tracker files.
37
37
38
38
## Existence test (apply on every doc-touching PR)
39
39
40
40
A file earns its place if it meets at least one of:
41
41
42
42
1. Source code cites it (JSDoc, error message, comment grep-anchor)
43
43
2. It documents durable policy unavailable elsewhere
44
-
3. It tracks open work (audit findings, plan, roadmap items, evaluation)
description: Read lessons at session start; append after corrections
2
+
description: Read lessons when relevant; lift durable ones into rules/skills
3
3
alwaysApply: true
4
4
---
5
5
6
6
# Lessons Convention
7
7
8
8
## Rules
9
9
10
-
1.**Read at session start** — At the beginning of every conversation, read `.agents/lessons.md` to avoid repeating past mistakes.
11
-
2.**Append after corrections** — When the user corrects you or you discover a non-obvious mistake, append a bullet to the `## Lessons` section: `- **<topic>** — <lesson>`.
12
-
3.**Keep entries atomic** — One lesson per bullet. Be concise (one sentence).
13
-
4.**No duplicates** — Before appending, check if an equivalent lesson already exists.
14
-
5.**Never delete lessons** — Only add. If a lesson becomes outdated, append a new one that supersedes it.
10
+
1.**Read when relevant** — skim `.agents/lessons.md` when the task touches an area with past corrections; not a mandatory full read every session.
11
+
2.**Append only durable, non-obvious corrections** — not session trivia already in a rule, skill, or reference doc.
12
+
3.**Prefer lifting** — when a lesson becomes policy, move it to `.agents/rules/` or the relevant skill and remove the bullet here (or supersede with one line pointing at the rule).
13
+
4.**Keep entries atomic** — one lesson per bullet. One sentence.
14
+
5.**No duplicates** — merge or supersede instead of appending near-duplicates.
Copy file name to clipboardExpand all lines: .agents/skills/audit-pr-architecture/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,10 +196,10 @@ This audit follows [docs/README.md Rule 6](../../../docs/README.md) (no inventor
196
196
197
197
Once findings are shipped (or deferred to `roadmap.md`):
198
198
199
-
1.**Update Status header**: `Status: Closed (YYYY-MM-DD) — N findings shipped on commits <hash>, <hash>, <hash>; M deferred to roadmap.md § <section>.`
200
-
2.**Add to `roadmap.md` § Closed audits (pointers)** with a one-line summary.
201
-
3.**Apply [`docs-governance`](../docs-governance/SKILL.md) § Closing an audit re-derivable test.** If the audit has no source-cites, no unique policy, no rejected-alternatives rationale → digest deferred items into `roadmap.md`, then **delete the audit file** (no tombstones). Otherwise slim per the keep-criteria.
202
-
4.**Run [`docs-lifecycle-sweep`](../docs-lifecycle-sweep/SKILL.md)**if the closure changes the audit substrate (new topic file, retired old topic) so the rest of the audits/ folder stays evaluated.
199
+
1.**Update Status header** (only if the file stays): `Status: Closed (YYYY-MM-DD) — N findings shipped; M deferred to roadmap.md § <section>.` Prefer the closure PR as the durable anchor — not a growing commit-hash list in the doc body.
200
+
2.**If the audit file is deleted**, cite the shipping PR in the closure PR description — do not add tombstone rows or deleted-path recovery instructions in living docs (see [`docs/README.md` § Closing audits](../../../docs/README.md#closing-audits)).
201
+
3.**Apply [`docs-governance`](../docs-governance/SKILL.md) § Closing an audit re-derivable test.** If the audit has no source-cites, no unique policy, no rejected-alternatives rationale → digest deferred items into `roadmap.md`, then **delete the audit file** (no tombstones). Otherwise slim to cited sections only — not full findings prose.
202
+
4.**Run [`docs-lifecycle-sweep`](../docs-lifecycle-sweep/SKILL.md)**only when closure leaves other files in `docs/audits/` or `docs/research/` that fail the existence test — not as a mandatory post-step on every closure.
Copy file name to clipboardExpand all lines: .agents/skills/diagnose/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,6 @@ Required before declaring done:
111
111
-[ ] All `[DEBUG-…]` instrumentation removed (`grep` the prefix)
112
112
-[ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location)
113
113
-[ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
114
-
-[ ] If the post-mortem yields a permanent insight, append a one-line entry to [`.agents/lessons.md`](../../lessons.md)per the lessons-rule discipline
114
+
-[ ] If the post-mortem yields a permanent insight, **lift** it into `.agents/rules/` or the relevant skill; append to [`.agents/lessons.md`](../../lessons.md)only when it is not yet encoded elsewhere
115
115
116
116
**Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to [`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md) with the specifics. Make the recommendation **after** the fix is in, not before — you have more information now than when you started.
0 commit comments