@lcvbeek/patina 0.1.0 → 0.3.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/LICENSE +21 -0
- package/README.md +204 -77
- package/dist/commands/apply.d.ts +16 -0
- package/dist/commands/apply.d.ts.map +1 -1
- package/dist/commands/apply.js +110 -43
- package/dist/commands/apply.js.map +1 -1
- package/dist/commands/capture.d.ts +3 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +21 -16
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +6 -5
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +18 -5
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +78 -92
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/layers.d.ts +18 -1
- package/dist/commands/layers.d.ts.map +1 -1
- package/dist/commands/layers.js +82 -59
- package/dist/commands/layers.js.map +1 -1
- package/dist/commands/migrate.d.ts +2 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +188 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/onboard.d.ts +21 -0
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/onboard.js +33 -32
- package/dist/commands/onboard.js.map +1 -1
- package/dist/commands/run.d.ts +51 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +66 -15
- package/dist/commands/run.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/claude.d.ts.map +1 -1
- package/dist/lib/claude.js +20 -14
- package/dist/lib/claude.js.map +1 -1
- package/dist/lib/git.d.ts +2 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js +9 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/lint.d.ts +21 -0
- package/dist/lib/lint.d.ts.map +1 -0
- package/dist/lib/lint.js +57 -0
- package/dist/lib/lint.js.map +1 -0
- package/dist/lib/parser.d.ts +10 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +15 -6
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/storage.d.ts +69 -4
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +173 -0
- package/dist/lib/storage.js.map +1 -1
- package/package.json +12 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leo van Beek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
# Patina
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@lcvbeek/patina)
|
|
6
|
+
[](./LICENSE)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Patina is what forms naturally when you keep working with AI. Each retro
|
|
9
|
+
cycle deposits a thin layer — captured moments, reflection answers, Claude's
|
|
10
|
+
synthesis, a proposed instruction change. Over time, `patina.md` builds up
|
|
11
|
+
into something with real depth: a working record of how your team uses AI,
|
|
12
|
+
versioned in git, shared by everyone including new hires.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Patina helps you observe what's working, trim what isn't, and keep your context tight.
|
|
12
15
|
|
|
13
16
|
---
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## How it works
|
|
16
19
|
|
|
17
|
-
```
|
|
20
|
+
```text
|
|
18
21
|
patina capture # anyone on the team, anytime
|
|
19
22
|
→ records a notable moment to .patina/captures/
|
|
20
23
|
→ committed to the repo, visible to everyone
|
|
@@ -34,6 +37,46 @@ Next session, the whole team works from an updated set of shared instructions.
|
|
|
34
37
|
|
|
35
38
|
---
|
|
36
39
|
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- Node.js 18+
|
|
43
|
+
- Access to Claude via one of:
|
|
44
|
+
- **Claude Code CLI** (recommended) — install at
|
|
45
|
+
[claude.ai/code](https://claude.ai/code), authenticate once, and Patina
|
|
46
|
+
uses it automatically. Respects your existing plan including Claude Max.
|
|
47
|
+
- **Anthropic API key** — set `ANTHROPIC_API_KEY` in your environment.
|
|
48
|
+
Patina falls back to this if the CLI isn't found.
|
|
49
|
+
Billed separately per token.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install -g @lcvbeek/patina
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## First run
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd your-project
|
|
69
|
+
patina init # set up scaffolding
|
|
70
|
+
patina run # answer onboarding questions
|
|
71
|
+
patina diff # review proposed changes
|
|
72
|
+
patina buff # apply the changes
|
|
73
|
+
git commit -m "First patina layer"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If you have no prior Claude Code session data, `patina run` will still work — your answers are the primary input for the first cycle.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
37
80
|
## Commands
|
|
38
81
|
|
|
39
82
|
| Command | What it does |
|
|
@@ -42,8 +85,9 @@ Next session, the whole team works from an updated set of shared instructions.
|
|
|
42
85
|
| `patina capture [text]` | Capture a notable moment while it's fresh — feeds into the next retro |
|
|
43
86
|
| `patina run` | Full retro session — auto-ingests logs, loads captures, asks reflection questions, calls Claude for synthesis |
|
|
44
87
|
| `patina diff` | Review the proposed instruction change from the last `patina run` |
|
|
45
|
-
| `patina buff` | Apply the pending diff to `patina.md` (`patina apply` also works) |
|
|
46
|
-
| `patina status` | Show metrics: token spend, rework rate, tool usage, trends across cycles |
|
|
88
|
+
| `patina buff` | Apply the pending diff to `patina.md` or spoke file (`patina apply` also works) |
|
|
89
|
+
| `patina status` | Show metrics: token spend, rework rate, tool usage, trends across cycles. Shows a breakdown by project so you can verify which repos are being included |
|
|
90
|
+
| `patina layers` | Visualise the patina you've built — one ASCII layer per retro cycle. Shows 5 most recent by default; use `-n 10` for more or `-n 0` for all |
|
|
47
91
|
| `patina ingest` | Manually parse Claude Code logs (optional — `patina run` does this automatically) |
|
|
48
92
|
|
|
49
93
|
### patina capture
|
|
@@ -56,140 +100,223 @@ patina capture # interactive mode
|
|
|
56
100
|
|
|
57
101
|
Tags: `near-miss` / `went-well` / `frustration` / `pattern` / `other`
|
|
58
102
|
|
|
59
|
-
Captures are written to `.patina/captures/` as individual JSON files
|
|
103
|
+
Captures are written to `.patina/captures/` as individual JSON files
|
|
104
|
+
(one per capture, to avoid merge conflicts) and committed to the repo.
|
|
105
|
+
Author is read from `git config user.name`.
|
|
106
|
+
|
|
107
|
+
### patina ingest
|
|
108
|
+
|
|
109
|
+
By default, only sessions from the **current project** are ingested — Patina derives the project slug from your working directory and matches it against `~/.claude/projects/`. This keeps metrics clean and prevents unrelated tools or automation from polluting your data.
|
|
110
|
+
|
|
111
|
+
To include sessions from additional repos (e.g. a backend and frontend that share the same patina), add partial slug patterns to `.patina/config.json`:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"include": ["my-backend-repo", "my-frontend-repo"]
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Patterns are matched as substrings against the project slug, so they work across machines with different home directories. `config.json` is committed — it's a team decision, not a personal one.
|
|
120
|
+
|
|
121
|
+
Run `patina status` to see a breakdown by project and confirm what's being counted.
|
|
60
122
|
|
|
61
123
|
---
|
|
62
124
|
|
|
63
|
-
##
|
|
125
|
+
## Team retros
|
|
64
126
|
|
|
65
|
-
|
|
127
|
+
Patina works for a single developer, but it's designed for teams. The `patina.md` constitution, cycle reports, and captures all live in git — everyone shares the same document, and anyone can contribute a capture.
|
|
66
128
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
129
|
+
To include teammates' session data in a retro:
|
|
130
|
+
|
|
131
|
+
1. Each person runs `patina ingest` on their machine before the retro
|
|
132
|
+
2. They commit and push their session files from `.patina/sessions/`
|
|
133
|
+
3. Everyone pulls
|
|
134
|
+
4. Whoever runs `patina run` gets the full team's sessions in the synthesis
|
|
135
|
+
|
|
136
|
+
Sessions are gitignored by default. To opt in, remove `.patina/sessions/` from your `.gitignore`. Sessions are UUID-named JSON files (~500 bytes each) with no conversation content — safe to commit, no merge conflicts.
|
|
137
|
+
|
|
138
|
+
If your team prefers not to commit sessions to the production repo, a future `dataDir` config option will let you point session storage at a dedicated repo instead.
|
|
75
139
|
|
|
76
140
|
---
|
|
77
141
|
|
|
78
|
-
## What
|
|
142
|
+
## What gets committed
|
|
143
|
+
|
|
144
|
+
`.patina/` is partially tracked:
|
|
79
145
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
146
|
+
| Path | Committed | Why |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `.patina/patina.md` | Yes | The shared AI operating document (slim core) |
|
|
149
|
+
| `.patina/config.json` | Yes | Project include list — team decision, shared across machines |
|
|
150
|
+
| `.patina/context/` | Yes | Spoke files — extended context loaded on demand |
|
|
151
|
+
| `.patina/cycles/` | Yes | Each layer — full cycle reports |
|
|
152
|
+
| `.patina/captures/` | Yes | In-the-moment observations from anyone on the team |
|
|
153
|
+
| `.patina/sessions/` | Optional | Session metadata from all team members — safe to commit, UUID-named so no merge conflicts |
|
|
154
|
+
| `.patina/metrics.json` | No | Derived from sessions, not a source of truth |
|
|
155
|
+
| `.patina/pending-diff.json` | No | Ephemeral — consumed by `patina buff` |
|
|
83
156
|
|
|
84
157
|
---
|
|
85
158
|
|
|
86
159
|
## What `patina.md` is
|
|
87
160
|
|
|
88
|
-
Your team's AI operating constitution.
|
|
161
|
+
Your team's AI operating constitution. The slim core (~50 lines) has
|
|
162
|
+
sections for working agreements, a behavior contract, and hard guardrails —
|
|
163
|
+
always loaded into every Claude Code session. Extended sections (autonomy
|
|
164
|
+
map, incident log, eval framework, cycle history) live in
|
|
165
|
+
`.patina/context/` as spoke files loaded on demand.
|
|
89
166
|
|
|
90
|
-
|
|
167
|
+
`patina buff` routes proposed changes to the correct file.
|
|
168
|
+
The file is yours — edit it directly whenever you want. Patina treats it
|
|
169
|
+
as the source of truth for how your team works with AI and passes it to
|
|
170
|
+
Claude during synthesis.
|
|
91
171
|
|
|
92
172
|
### How agents read it
|
|
93
173
|
|
|
94
174
|
`patina init` adds the following line to your project's `CLAUDE.md` (creating it if it doesn't exist):
|
|
95
175
|
|
|
96
|
-
```
|
|
176
|
+
```text
|
|
97
177
|
@.patina/patina.md
|
|
98
178
|
```
|
|
99
179
|
|
|
100
|
-
Claude Code's `@filename` import syntax means every Claude Code session in
|
|
101
|
-
|
|
102
|
-
|
|
180
|
+
Claude Code's `@filename` import syntax means every Claude Code session in
|
|
181
|
+
the project automatically gets the contents of `patina.md` — no manual
|
|
182
|
+
copying needed. When `patina buff` updates `patina.md`, Claude picks up the
|
|
183
|
+
change in the next session.
|
|
103
184
|
|
|
104
185
|
---
|
|
105
186
|
|
|
106
|
-
##
|
|
187
|
+
## Privacy
|
|
107
188
|
|
|
108
189
|
Everything stays local. No data leaves your machine except what you choose to send to Claude via the `claude` CLI during `patina run`.
|
|
109
190
|
|
|
110
191
|
What gets ingested from your Claude Code logs:
|
|
192
|
+
|
|
111
193
|
- Session timestamps and project names
|
|
112
194
|
- Estimated token counts
|
|
113
195
|
- Tool call names and frequencies
|
|
114
196
|
- Whether a session contained rework (detected heuristically from the JSONL)
|
|
115
197
|
|
|
116
198
|
What is never sent to Claude:
|
|
199
|
+
|
|
117
200
|
- Raw session content or conversation transcripts
|
|
118
201
|
- Anything outside `.patina/`
|
|
119
202
|
|
|
120
203
|
---
|
|
121
204
|
|
|
122
|
-
##
|
|
205
|
+
## How is this different from Claude Code's `/insights`?
|
|
123
206
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
207
|
+
`/insights` produces a personal HTML report in `~/.claude/` — useful
|
|
208
|
+
analysis, but it belongs to one person and doesn't persist between sessions.
|
|
209
|
+
Patina produces `patina.md`, a structured document that lives in your repo,
|
|
210
|
+
is versioned with git, and accumulates layers across cycles. The goal isn't
|
|
211
|
+
better analysis — it's a shared artifact your team actually owns and
|
|
212
|
+
maintains together.
|
|
128
213
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Early software
|
|
217
|
+
|
|
218
|
+
This is v0.3.0. It works, but expect rough edges:
|
|
219
|
+
|
|
220
|
+
- The `claude` CLI call in `patina run` has a 120-second timeout; if Claude
|
|
221
|
+
is slow the command will fail (your reflection answers are saved to
|
|
222
|
+
`.patina/pending-reflection.json` so you can retry without re-answering)
|
|
223
|
+
- Session ingestion parses Claude Code's JSONL format — if Anthropic changes
|
|
224
|
+
that format, ingestion will break
|
|
225
|
+
- Token estimates are heuristic, not exact
|
|
226
|
+
|
|
227
|
+
If something breaks or the instruction diff Claude produces is bad, that's useful signal. Open an issue or message me directly.
|
|
132
228
|
|
|
133
229
|
---
|
|
134
230
|
|
|
135
|
-
##
|
|
231
|
+
## Context architecture
|
|
136
232
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
233
|
+
Patina uses a **hub+spoke** model to keep agent context lean:
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
.patina/
|
|
237
|
+
patina.md ← slim core (~50 lines, ~500 tokens). Always loaded.
|
|
238
|
+
context/
|
|
239
|
+
autonomy-detail.md ← full autonomy map with routine scenarios
|
|
240
|
+
incident-log.md ← past agent incidents
|
|
241
|
+
eval-framework.md ← eval criteria and pass thresholds
|
|
242
|
+
cycle-history.md ← retro cycle history
|
|
243
|
+
opportunity-backlog.md ← improvement ideas
|
|
141
244
|
```
|
|
142
245
|
|
|
143
|
-
|
|
246
|
+
The **core** (`patina.md`) contains only the highest-value content: working
|
|
247
|
+
agreements, a behavior contract, and hard guardrails. It's loaded into
|
|
248
|
+
every Claude Code session via `@.patina/patina.md` in `CLAUDE.md`.
|
|
144
249
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
250
|
+
**Spoke files** hold content that's useful during specific activities
|
|
251
|
+
(debugging, testing, retro reviews) but would waste tokens if loaded every
|
|
252
|
+
session. Agents can read them on demand when relevant — the core includes a
|
|
253
|
+
comment index pointing to each spoke file.
|
|
148
254
|
|
|
149
|
-
|
|
255
|
+
`patina buff` automatically routes proposed changes to the correct file
|
|
256
|
+
based on section number. `patina migrate` splits an existing monolithic
|
|
257
|
+
`patina.md` into the hub+spoke layout.
|
|
150
258
|
|
|
151
|
-
|
|
152
|
-
alias patina="npx tsx /path/to/patina/src/index.ts"
|
|
153
|
-
```
|
|
259
|
+
### Why this matters
|
|
154
260
|
|
|
155
|
-
|
|
261
|
+
Context pollution reduces model precision. Anthropic's research shows that
|
|
262
|
+
the smallest high-signal token set produces the best results. By keeping the
|
|
263
|
+
always-loaded core under 80 lines / 3,200 chars, Patina ensures the
|
|
264
|
+
constitution never becomes a tax on your agent's performance — even after
|
|
265
|
+
dozens of retro cycles.
|
|
266
|
+
|
|
267
|
+
The synthesis prompt enforces this: proposed instructions must be imperative,
|
|
268
|
+
apply to >50% of sessions, and not duplicate existing entries. Stale entries
|
|
269
|
+
are flagged for removal each cycle.
|
|
156
270
|
|
|
157
271
|
---
|
|
158
272
|
|
|
159
|
-
##
|
|
273
|
+
## Design decisions
|
|
160
274
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
patina init # creates .patina/ and patina.md
|
|
164
|
-
patina run # first cycle — answer the reflection questions
|
|
165
|
-
patina diff # review what Claude proposed
|
|
166
|
-
patina buff # apply the change
|
|
167
|
-
git add .patina/patina.md .patina/cycles/ .patina/captures/
|
|
168
|
-
git commit -m "First patina cycle"
|
|
169
|
-
```
|
|
275
|
+
<details>
|
|
276
|
+
<summary><b>Why <code>patina.md</code> instead of editing CLAUDE.md directly?</b></summary>
|
|
170
277
|
|
|
171
|
-
|
|
278
|
+
`patina.md` is a structured format Patina can reliably parse, section-match,
|
|
279
|
+
and append to. `patina init` wires it into your `CLAUDE.md` via
|
|
280
|
+
`@.patina/patina.md`, so agents always get the latest version. Keeping it
|
|
281
|
+
separate means Patina never risks corrupting your hand-written `CLAUDE.md`
|
|
282
|
+
content.
|
|
172
283
|
|
|
173
|
-
|
|
284
|
+
</details>
|
|
174
285
|
|
|
175
|
-
|
|
286
|
+
<details>
|
|
287
|
+
<summary><b>Why hub+spoke instead of one file?</b></summary>
|
|
176
288
|
|
|
177
|
-
|
|
289
|
+
A monolithic `patina.md` grows unboundedly as cycles accumulate. After 10+
|
|
290
|
+
cycles, sections like incident log and cycle history add hundreds of tokens
|
|
291
|
+
that are rarely relevant. The hub+spoke model keeps always-loaded context at
|
|
292
|
+
~500 tokens while preserving all data in spoke files for when it's needed.
|
|
293
|
+
See [Context architecture](#context-architecture) for details.
|
|
178
294
|
|
|
179
|
-
|
|
180
|
-
- Session ingestion parses Claude Code's JSONL format — if Anthropic changes that format, ingestion will break
|
|
181
|
-
- Token estimates are heuristic, not exact
|
|
295
|
+
</details>
|
|
182
296
|
|
|
183
|
-
|
|
297
|
+
<details>
|
|
298
|
+
<summary><b>Why the <code>claude</code> CLI instead of the API directly?</b></summary>
|
|
184
299
|
|
|
185
|
-
|
|
300
|
+
No separate API key needed — it respects your existing Claude Code
|
|
301
|
+
authentication and model access. If you don't have the CLI, set
|
|
302
|
+
`ANTHROPIC_API_KEY` and Patina falls back to the SDK.
|
|
303
|
+
|
|
304
|
+
</details>
|
|
305
|
+
|
|
306
|
+
<details>
|
|
307
|
+
<summary><b>Why six reflection questions?</b></summary>
|
|
186
308
|
|
|
187
|
-
|
|
309
|
+
The reflection questions supplement sparse log data and give Claude
|
|
310
|
+
qualitative signal the JSONL doesn't contain — what felt frustrating, what
|
|
311
|
+
nearly went wrong. Both matter for the synthesis. The first cycle asks 9
|
|
312
|
+
onboarding questions instead, to establish your baseline agreements.
|
|
188
313
|
|
|
189
|
-
|
|
314
|
+
</details>
|
|
190
315
|
|
|
191
|
-
|
|
316
|
+
<details>
|
|
317
|
+
<summary><b>Why individual capture files instead of one file?</b></summary>
|
|
192
318
|
|
|
193
|
-
|
|
319
|
+
Multiple teammates capturing on the same day would produce merge conflicts
|
|
320
|
+
in a single file. One JSON file per capture means clean parallel commits.
|
|
194
321
|
|
|
195
|
-
|
|
322
|
+
</details>
|
package/dist/commands/apply.d.ts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the section header in patina.md and insert the diff text after it.
|
|
3
|
+
* Falls back to appending at the end of the section if the header isn't found exactly.
|
|
4
|
+
*/
|
|
5
|
+
export declare function applyDiffToDoc(content: string, section: string, diffText: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Update the Retro Cycle History table.
|
|
8
|
+
* Operates on the cycle-history spoke file content (not the core patina.md).
|
|
9
|
+
* Keeps at most CYCLE_HISTORY_CAP rows — oldest rows are dropped when the cap
|
|
10
|
+
* is exceeded. Full cycle detail is preserved in .patina/cycles/.
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateCycleHistory(content: string, insight: string, changeDesc: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Update the cycle history spoke file on disk.
|
|
15
|
+
*/
|
|
16
|
+
export declare function updateCycleHistoryFile(cwd: string, insight: string, changeDesc: string): void;
|
|
1
17
|
export declare function applyCommand(): Promise<void>;
|
|
2
18
|
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA+DzF;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CA6C/F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAc7F;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA4HlD"}
|