opencastle 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencastle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Write your AI config once, for every assistant and every teammate: compiles instructions, agents, skills, commands and MCP servers for Claude Code, Copilot, Cursor, Windsurf, OpenCode, Codex and Antigravity, shared across your team's repositories.",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,6 @@ The project's own instructions win: the Project Context loaded with these, the r
|
|
|
15
15
|
- **Fail visibly** — surface errors; never swallow an exception.
|
|
16
16
|
- **Comments say why**, not what.
|
|
17
17
|
- **Git.** Never push to `main`: every change goes through a branch and a pull request (**git-workflow**).
|
|
18
|
-
- **
|
|
18
|
+
- **Memory: the team's or the user's.** Read `.opencastle/LESSONS-LEARNED.md` before you start, and open the lessons that match your task. What you confirm that is true for anyone working in this repository, record as a lesson the moment you confirm it: a fix after a failure, a convention or decision the code does not show, a tool's or service's quirk, a correction the user gives about the code (**self-improvement**). What is about the user (their preferences, role, habits, machine) stays in your own memory. Never both.
|
|
19
19
|
|
|
20
20
|
<!-- End of Coding Standards -->
|
|
@@ -36,4 +36,4 @@ Implement the change the user gave with this command — a feature, a roadmap it
|
|
|
36
36
|
|
|
37
37
|
- Commit on a feature branch and open a pull request; never push to `main` (**git-workflow**). Link the tracker issue when there is one.
|
|
38
38
|
- Report what changed (files), how you verified it, what is still open, and anything you noticed outside the task, with its file and line.
|
|
39
|
-
-
|
|
39
|
+
- Something you confirmed that is true for anyone working here, such as a fix after a failure or a convention the code does not show: record it as a lesson (**self-improvement**).
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: self-improvement
|
|
3
|
-
description: "
|
|
3
|
+
description: "Keeps the team's memory: decides whether what you learned belongs to the team or to the user, records the team's as lessons in .opencastle/lessons/ with npx opencastle lesson, and re-verifies and graduates them. Use when you confirm something true for anyone working in the repository (a fix after a failure, a convention, a decision, a quirk, a correction about the code), before work past lessons may cover, when doctor reports a lesson's cited code changed, or when the lessons index grows long."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Self-Improvement
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Lessons are the team's memory. A lesson is a file in `.opencastle/lessons/`, committed with the change you made, so the team reviews it in that pull request; `.opencastle/LESSONS-LEARNED.md` is the index every agent reads first, rewritten from those files by every sync — never edit it by hand.
|
|
9
|
+
|
|
10
|
+
## The team's or the user's
|
|
11
|
+
|
|
12
|
+
Decide when you learn it, not later. Nobody sorts memories afterwards.
|
|
13
|
+
|
|
14
|
+
| It is about | Where it goes | For example |
|
|
15
|
+
|-------------|---------------|-------------|
|
|
16
|
+
| The project: true for anyone working in this repository | A lesson, as soon as you have confirmed it | `pnpm build` fails without `CI=1` set; every migration ships with a down file; the staging API allows 10 requests a second; the user says "we never use default exports" |
|
|
17
|
+
| The user: true for them, wherever they work | Your own memory, never a lesson | They want short answers; they use fish; their role; their editor; paths on their machine |
|
|
18
|
+
| Every repository in the organisation | A lesson here, whose problem says it holds in every repository; it graduates into the baseline's skill (below) | The company's deploy pipeline needs a manual approval; an internal service's API contract |
|
|
19
|
+
| This task only | Nowhere | A one-off workaround; a guess you have not confirmed |
|
|
20
|
+
|
|
21
|
+
- Confirmed means the fix worked, the code shows it, or the user said so. A suspicion is not a lesson.
|
|
22
|
+
- A correction from the user: about the code or the project, a lesson; about how they want you to work with them, your memory.
|
|
23
|
+
- One place only. Never save the same thing as a lesson and in your own memory.
|
|
24
|
+
- When unsure whether a teammate's agent would need it, ask: would it have saved them time on this repository? Yes: a lesson.
|
|
9
25
|
|
|
10
26
|
## Record a lesson
|
|
11
27
|
|
|
@@ -39,7 +55,7 @@ rg -i "CRON_SECRET" .opencastle/lessons/ || true
|
|
|
39
55
|
|
|
40
56
|
## Graduate lessons
|
|
41
57
|
|
|
42
|
-
Every agent reads every active lesson before every task, so a lesson that has proven itself belongs in the skill or instruction file it is about, where only the agents that need it read it. `doctor` warns when the index passes about 2,000 tokens. Candidates: older than 60 days and still true, a problem two lessons describe,
|
|
58
|
+
Every agent reads every active lesson before every task, so a lesson that has proven itself belongs in the skill or instruction file it is about, where only the agents that need it read it. `doctor` warns when the index passes about 2,000 tokens. Candidates: older than 60 days and still true, a problem two lessons describe, `severity: high`, or one that holds in every repository.
|
|
43
59
|
|
|
44
60
|
1. Rewrite it as a rule or an example in that file, beside the rules it belongs with — a rule, not an incident report, and no new file. A lesson that holds in every repository belongs in the skill it is about in the organisation's baseline: change it there, and once the baseline version carrying it is installed here, archive it.
|
|
45
61
|
2. `npx opencastle lesson archive <id> --into <that file>`, or `--into skills/<name>` for a skill the baseline gives this repository. The lesson keeps its file and moves to the index's Archived section; never delete one.
|