@kulapard/pi-caveman 0.5.0 → 0.6.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/AGENTS.md CHANGED
@@ -4,27 +4,27 @@ Project memory. Non-obvious only.
4
4
 
5
5
  ## Architecture (do not rebuild)
6
6
 
7
- - `extensions/caveman.ts` = Pi extension. `extensions/caveman-core.ts` = pure SDK-free logic (`normalizeMode`, `modeInstructions`, `VALID_MODES`, regexes). Unit-testable without fake SDK.
8
- - Mode state **session + project-scoped**: `pi.appendEntry("caveman-mode", …)`
9
- restores from `ctx.sessionManager.getBranch()` on `session_start`; since
10
- v0.4.3 `extensions/caveman-state.ts` also reads/writes `.pi/caveman-mode.json`
11
- in the project directory. A session entry overrides the project default; a
12
- project without a state file falls back to `off`. No global/env default.
13
- - Activation = `before_agent_start` appends `modeInstructions(mode)`. Statusline = `ctx.ui.setStatus("caveman", …)` guarded by `hasUI`.
14
- - Extension `modeInstructions` = **canonical** activator. `skills/caveman/SKILL.md` = fallback for hosts loading skills but not extension. Both active → model sees both rule sets; intentional redundancy, no de-dupe.
7
+ - `extensions/caveman.ts` = Pi extension. `extensions/caveman-core.ts` holds SDK-free logic (`normalizeMode`, `modeInstructions`, `VALID_MODES`, regexes). Testable without fake SDK.
8
+ - Mode state **session + project-scoped**: `pi.appendEntry("caveman-mode", …)` restores from `ctx.sessionManager.getBranch()` on `session_start`; since v0.4.3 `extensions/caveman-state.ts` reads/writes `.pi/caveman-mode.json`. Session entry overrides project default; missing state file → `off`. No global/env default.
9
+ - `before_agent_start` appends `modeInstructions(mode)`. Statusline = `ctx.ui.setStatus("caveman", …)` guarded by `hasUI`.
10
+ - Extension `modeInstructions` = **canonical** activator. `skills/caveman/SKILL.md` = fallback when extension not loaded. Both active → model sees both rule sets; intentional redundancy, no de-dupe.
15
11
  - Pi 0.80.2 has **no `agents/` subagent mechanism**. `agents/cavecrew-*.md` = reference personas only; cavecrew optional/out-of-scope.
16
12
 
17
13
  ## Invariants
18
14
 
19
- - **SDK import `import type` only** in `extensions/*.ts`. JS tests run via `--experimental-strip-types`, erases type-only imports. Value import from `@earendil-works/pi-coding-agent` breaks tests — `tests/extension.test.mjs` asserts this.
20
- - **Verbatim preservation**: caveman-compress never changes code blocks, inline code, URLs, paths, commands, exact error strings. Self-validate against original. Mismatch unfixable → restore from `.original` backup created in same invocation (stale backups rejected before compression).
21
- - `caveman-compress` is **prompt-only**: Pi agent compresses with own model + file tools, driven by `SKILL.md`. No Python, no external model CLI. Coverage = `tests/compress-docs.test.mjs`.
15
+ - **SDK import `import type` only** in `extensions/*.ts`. JS tests use `--experimental-strip-types`, erases type-only imports. Value import from `@earendil-works/pi-coding-agent` breaks tests — `tests/extension.test.mjs` asserts this.
16
+ - **Verbatim preservation**: caveman-compress never changes code blocks, inline code, URLs, paths, commands, exact error strings. Self-validate against original. Mismatch unfixable → restore from `.original` backup created in same invocation; stale backups rejected before compression.
17
+ - `caveman-compress` **prompt-only**: Pi agent compresses with own model + file tools, driven by `SKILL.md`. No Python, no external model CLI. Coverage = `tests/compress-docs.test.mjs`.
22
18
  - `/caveman-compress` supports `--force`: overwrites existing `.original.<ext>` backup instead of aborting.
23
19
 
20
+ ## Releases
21
+
22
+ Tag push triggers npm publish via `.github/workflows/publish.yml`. On release, create GitHub Release with same tag; paste matching `CHANGELOG.md` section into notes.
23
+
24
24
  ## Changelog
25
25
 
26
- Every notable change update `CHANGELOG.md` under `[Unreleased]`. Before finishing, run `npm run changelog:check`. CI runs same check on every PR.
26
+ Every notable change `CHANGELOG.md` `[Unreleased]`. Before finish, run `npm run changelog:check`. CI runs same check per PR.
27
27
 
28
- - `npm test` runs `pretest` (`npm run typecheck` → `tsc --noEmit`), then `node --test tests/**/*.test.mjs`. Typecheck failures fail test run.
28
+ - `npm test` = `pretest` (`npm run typecheck` → `tsc --noEmit`), then `node --test tests/**/*.test.mjs`. Typecheck failures fail test run.
29
29
  - Node `--test` glob expanded by runner, not shell. Directory-recursion `--test tests/` does **not** work on current Node — keep glob.
30
30
  - Tests are **phantom-reference guards** (`tests/stats-docs.test.mjs`, `tests/cavecrew-docs.test.mjs`, `tests/compress-docs.test.mjs`): docs must not mention Claude-Code hooks layer, plugin install path, `⛏` badge, Claude-only subagent presets, broken asset paths. Do not reintroduce.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2026-06-29
11
+
12
+ ### Added
13
+
14
+ - Release notes reminder: when tagging a release, also create a GitHub Release with the same tag and paste the relevant `CHANGELOG.md` section into the release notes.
15
+
16
+ ### Changed
17
+
18
+ - Statusline no longer appends `ctx:XX%`; shows only `caveman:<mode>`.
19
+ - Re-compressed `AGENTS.md` with `/caveman-compress --force` to reduce session token load.
20
+
21
+ ### Repository
22
+
23
+ - `.gitignore` now excludes `.pi/caveman-mode.json` (project-scoped mode state).
24
+
10
25
  ## [0.5.0] - 2026-06-29
11
26
 
12
27
  ### Added
@@ -122,7 +137,8 @@ port of [caveman](https://github.com/JuliusBrussee/caveman).
122
137
  token, automatic provenance, a tag-equals-version guard, and a concurrency
123
138
  group).
124
139
 
125
- [Unreleased]: https://github.com/kulapard/pi-caveman/compare/v0.5.0...HEAD
140
+ [Unreleased]: https://github.com/kulapard/pi-caveman/compare/v0.6.0...HEAD
141
+ [0.6.0]: https://github.com/kulapard/pi-caveman/compare/v0.5.0...v0.6.0
126
142
  [0.5.0]: https://github.com/kulapard/pi-caveman/compare/v0.4.2...v0.5.0
127
143
  [0.4.2]: https://github.com/kulapard/pi-caveman/compare/v0.4.1...v0.4.2
128
144
  [0.4.1]: https://github.com/kulapard/pi-caveman/compare/v0.4.0...v0.4.1
package/README.md CHANGED
@@ -116,8 +116,7 @@ default, and a project without a state file falls back to `off`.
116
116
  ## Statusline indicator
117
117
 
118
118
  When a UI is attached, the statusline shows the active mode as
119
- `caveman:<mode>` (for example `caveman:ultra`), and appends live context usage
120
- as `ctx:XX%` when Pi provides it. When caveman is off the indicator is cleared.
119
+ `caveman:<mode>` (for example `caveman:ultra`). When caveman is off the indicator is cleared.
121
120
 
122
121
  ## Compression vs. upstream MCP shrink
123
122
 
@@ -32,13 +32,7 @@ export default function cavemanExtension(pi: ExtensionAPI) {
32
32
 
33
33
  function setStatus(ctx?: ExtensionContext) {
34
34
  if (!ctx?.hasUI) return;
35
- const usage = ctx.getContextUsage?.();
36
- const suffix =
37
- usage?.percent != null ? ` ctx:${Math.round(usage.percent)}%` : "";
38
- ctx.ui.setStatus(
39
- "caveman",
40
- mode === "off" ? undefined : `caveman:${mode}${suffix}`,
41
- );
35
+ ctx.ui.setStatus("caveman", mode === "off" ? undefined : `caveman:${mode}`);
42
36
  }
43
37
 
44
38
  function persistMode(nextMode: StoredMode, ctx?: ExtensionContext) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kulapard/pi-caveman",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Caveman for Pi: ultra-compressed agent output that preserves technical substance. Six intensity modes, slash commands, natural-language activation, and a session statusline.",
5
5
  "type": "module",
6
6
  "license": "MIT",