opencastle 1.9.0 → 1.10.1
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/README.md +28 -14
- package/bin/cli.mjs +2 -2
- package/dist/cli/adapters/claude-code.d.ts +7 -2
- package/dist/cli/adapters/claude-code.d.ts.map +1 -1
- package/dist/cli/adapters/claude-code.js +13 -2
- package/dist/cli/adapters/claude-code.js.map +1 -1
- package/dist/cli/adapters/rules-dir-base.d.ts.map +1 -1
- package/dist/cli/adapters/rules-dir-base.js +12 -2
- package/dist/cli/adapters/rules-dir-base.js.map +1 -1
- package/dist/cli/adapters/rules-dir-base.test.js +3 -1
- package/dist/cli/adapters/rules-dir-base.test.js.map +1 -1
- package/dist/cli/adapters/vscode.d.ts.map +1 -1
- package/dist/cli/adapters/vscode.js +12 -2
- package/dist/cli/adapters/vscode.js.map +1 -1
- package/dist/cli/ci.d.ts +8 -0
- package/dist/cli/ci.d.ts.map +1 -1
- package/dist/cli/ci.js +24 -17
- package/dist/cli/ci.js.map +1 -1
- package/dist/cli/convoy/findings.js +3 -2
- package/dist/cli/convoy/findings.js.map +1 -1
- package/dist/cli/docs-accuracy.test.js +4 -4
- package/dist/cli/docs-accuracy.test.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +9 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lesson.js +3 -2
- package/dist/cli/lesson.js.map +1 -1
- package/dist/cli/lessons-rules.d.ts +45 -0
- package/dist/cli/lessons-rules.d.ts.map +1 -0
- package/dist/cli/lessons-rules.js +130 -0
- package/dist/cli/lessons-rules.js.map +1 -0
- package/dist/cli/lessons-rules.test.d.ts +2 -0
- package/dist/cli/lessons-rules.test.d.ts.map +1 -0
- package/dist/cli/lessons-rules.test.js +65 -0
- package/dist/cli/lessons-rules.test.js.map +1 -0
- package/dist/cli/memory-hooks.d.ts +51 -0
- package/dist/cli/memory-hooks.d.ts.map +1 -0
- package/dist/cli/memory-hooks.js +200 -0
- package/dist/cli/memory-hooks.js.map +1 -0
- package/dist/cli/memory-hooks.test.d.ts +2 -0
- package/dist/cli/memory-hooks.test.d.ts.map +1 -0
- package/dist/cli/memory-hooks.test.js +83 -0
- package/dist/cli/memory-hooks.test.js.map +1 -0
- package/dist/cli/memory-sources.d.ts.map +1 -1
- package/dist/cli/memory-sources.js +3 -2
- package/dist/cli/memory-sources.js.map +1 -1
- package/dist/cli/promote-command.test.js +40 -10
- package/dist/cli/promote-command.test.js.map +1 -1
- package/dist/cli/promote.d.ts.map +1 -1
- package/dist/cli/promote.js +41 -11
- package/dist/cli/promote.js.map +1 -1
- package/dist/cli/remove.d.ts.map +1 -1
- package/dist/cli/remove.js +27 -0
- package/dist/cli/remove.js.map +1 -1
- package/dist/cli/status.d.ts +0 -5
- package/dist/cli/status.d.ts.map +1 -1
- package/dist/cli/status.js +2 -24
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/sync-check.d.ts +1 -1
- package/dist/cli/sync-check.d.ts.map +1 -1
- package/dist/cli/sync-check.js +27 -2
- package/dist/cli/sync-check.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +17 -0
- package/dist/cli/update.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/adapters/claude-code.ts +15 -2
- package/src/cli/adapters/rules-dir-base.test.ts +3 -1
- package/src/cli/adapters/rules-dir-base.ts +11 -2
- package/src/cli/adapters/vscode.ts +11 -2
- package/src/cli/ci.ts +23 -16
- package/src/cli/convoy/findings.ts +2 -2
- package/src/cli/docs-accuracy.test.ts +4 -4
- package/src/cli/init.ts +10 -0
- package/src/cli/lesson.ts +2 -2
- package/src/cli/lessons-rules.test.ts +71 -0
- package/src/cli/lessons-rules.ts +128 -0
- package/src/cli/memory-hooks.test.ts +102 -0
- package/src/cli/memory-hooks.ts +207 -0
- package/src/cli/memory-sources.ts +3 -2
- package/src/cli/promote-command.test.ts +43 -10
- package/src/cli/promote.ts +37 -11
- package/src/cli/remove.ts +22 -0
- package/src/cli/status.ts +2 -28
- package/src/cli/sync-check.ts +30 -3
- package/src/cli/update.ts +17 -0
- package/src/orchestrator/instructions/general.instructions.md +1 -1
- package/src/orchestrator/prompts/implement-feature.prompt.md +1 -1
- package/src/orchestrator/skills/self-improvement/SKILL.md +14 -13
|
@@ -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
|
-
- 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:
|
|
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: save it as about the project (**self-improvement**).
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: self-improvement
|
|
3
|
-
description: "Keeps the team's memory:
|
|
3
|
+
description: "Keeps the team's memory: where what you learned goes (your memory, shared with the team when it is about the project, or a lesson in .opencastle/lessons/), and how lessons are cited, re-verified and graduated. 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), when you touch a lesson copied from memory, 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
|
-
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
|
|
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, and Claude Code, VS Code, Cursor and Windsurf load a copy of it before every task; both are rewritten from the lesson files — never edit them by hand.
|
|
9
9
|
|
|
10
10
|
## The team's or the user's
|
|
11
11
|
|
|
12
|
-
Decide when you learn it,
|
|
12
|
+
Decide when you learn it, by how you save it. Nobody sorts memories afterwards.
|
|
13
13
|
|
|
14
|
-
|
|
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 |
|
|
14
|
+
In Claude Code and VS Code, save it in your own memory as you normally do. When the session ends, OpenCastle copies what is about the project into a lesson, and leaves what is about the user. In any other assistant, record what is about the project as a lesson yourself (below).
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
| It is about | Save it as | For example |
|
|
17
|
+
|-------------|------------|-------------|
|
|
18
|
+
| The project: true for anyone working in this repository | About the project (a correction, a project note, a pointer to where something lives) | `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" |
|
|
19
|
+
| The user: true for them, wherever they work | About the user. It stays theirs and never becomes a lesson | They want short answers; they use fish; their role; their editor; paths on their machine |
|
|
20
|
+
| Every repository in the organisation | About the project, saying 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 |
|
|
21
|
+
| This task only | Nothing | A one-off workaround; a guess you have not confirmed |
|
|
22
|
+
|
|
23
|
+
- Confirmed means the fix worked, the code shows it, or the user said so. A suspicion is not worth saving.
|
|
24
|
+
- A correction from the user: about the code or the project, it is about the project; about how they want you to work with them, it is about the user.
|
|
25
|
+
- A lesson copied from memory is category `general`, severity `medium`, and cites nothing. When your task touches one, set them in its file, and cite the code with `npx opencastle lesson verify <id> --cite <path>`.
|
|
25
26
|
|
|
26
27
|
## Record a lesson
|
|
27
28
|
|