squad-kit 0.2.2 → 0.4.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/CHANGELOG.md +92 -1
- package/README.md +21 -7
- package/dist/cli.js +1303 -410
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/claude-code/squad-plan.md +1 -0
- package/templates/agents/copilot/squad-plan.prompt.md +2 -0
- package/templates/agents/cursor/squad-plan.md +1 -0
- package/templates/agents/gemini/squad-plan.toml +2 -0
- package/templates/prompts/generate-plan.md +3 -0
- package/templates/prompts/intake.md +11 -8
- package/templates/prompts/story-skeleton.md +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,94 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0] — 2026-04-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `planner.maxOutputTokens` in merged config (default **16384** tokens per model round).
|
|
15
|
+
- Interactive `squad new-plan --api` prompt when a planner limit is hit: continue (extends read/context/time/round/output budgets for that run) or stop, with a short billing note up front.
|
|
16
|
+
- Incomplete API plans save as `*.partial.md` plus YAML `squad-kit-plan-status: partial`; the CLI exits with code **2** when planning did not finish cleanly (no stack trace for that path).
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- New plan files are named from the **story folder id** (`NN-story-<id-slug>.md`) instead of slugging the title hint, so paths stay short; `00-overview.md` still carries the human title.
|
|
21
|
+
- Intake scaffolding fills more fields from fetched tracker issues (Azure / Jira) when `squad new-story` pulls work item data.
|
|
22
|
+
- Agent `squad-plan` templates remind editors not to overwrite the first-line `<!-- squad-kit: … -->` plan metadata comment.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- `squad list` reads `generated by` metadata from the first matching `<!-- squad-kit: … -->` line in the first lines of a plan file, not only line 1.
|
|
27
|
+
- `findPlanFor` prefers a non-`.partial.md` plan when both exist for the same story id.
|
|
28
|
+
|
|
29
|
+
### Site
|
|
30
|
+
|
|
31
|
+
- Added `robots.txt` and small head metadata tweaks on the Astro site.
|
|
32
|
+
|
|
33
|
+
## [0.3.0] — 2026-04-24
|
|
34
|
+
|
|
35
|
+
### Why this release
|
|
36
|
+
|
|
37
|
+
squad-kit 0.2.2 stabilised rate-limit handling with retries and a softer `squad doctor` warning.
|
|
38
|
+
That made failures loud but didn't reduce the underlying token spend: every planning turn
|
|
39
|
+
re-sent the cumulative transcript, so costs scaled roughly quadratically with the number of
|
|
40
|
+
tool calls. On Anthropic Tier 1 with Opus, that made non-trivial plans structurally infeasible.
|
|
41
|
+
|
|
42
|
+
0.3.0 adds **prompt caching end-to-end** across Anthropic, OpenAI, and Google. Expected savings
|
|
43
|
+
on a typical 10-turn run: ~70% fewer billed input tokens, and — critically on Anthropic —
|
|
44
|
+
cached reads don't count the same against your per-minute quota. Tier 1 Opus users should find
|
|
45
|
+
moderate plans work where they previously hit 429 from turn 7 onward.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Anthropic explicit prompt caching via `cache_control: { type: 'ephemeral' }` on the system
|
|
50
|
+
prompt and the most recent tool-result block each turn (cache TTL rolls forward).
|
|
51
|
+
- OpenAI and Google implicit prefix caching (no config required; activated by the stable-prefix
|
|
52
|
+
refactor below).
|
|
53
|
+
- `planner.cache.enabled` config knob (default `true`). Configure via `squad config set planner`.
|
|
54
|
+
- Run-summary line: `cache hit 68% (22.4k read / 32.9k total)` every `squad new-plan --api` run.
|
|
55
|
+
- `squad doctor` now checks `planner cache effectiveness`, reading `.squad/.last-run.json`.
|
|
56
|
+
- `.squad/.last-run.json` persistence of planner run stats (git-ignored, per-user).
|
|
57
|
+
- `Usage.cacheCreationTokens` and `Usage.cacheReadTokens` on every provider response.
|
|
58
|
+
- Deterministic request-body builders (`buildAnthropicBody`, `buildOpenAIBody`, `buildGoogleBody`)
|
|
59
|
+
exposed for testing; dev-mode warning when a turn mutates the cacheable prefix.
|
|
60
|
+
- Copy-paste mode (`squad new-plan --copy`) now writes the composed prompt to
|
|
61
|
+
`.squad/.last-copy-prompt.md` and prints a compact summary (mode · story · file · size · est
|
|
62
|
+
tokens · clipboard status) instead of dumping the full 5–10 KB prompt into the terminal.
|
|
63
|
+
- Clipboard fallbacks for Linux (`xsel` in addition to `xclip`) and Termux
|
|
64
|
+
(`termux-clipboard-set`). Headless Linux / SSH sessions now surface an actionable reason in
|
|
65
|
+
the summary ("no display server detected — install xclip or xsel, or use the saved file")
|
|
66
|
+
instead of silently skipping.
|
|
67
|
+
- `squad config set planner` and `squad config set tracker` print a "▸ Next:" block so users
|
|
68
|
+
know what to run next (`squad doctor` → `squad new-story` → `squad new-plan`).
|
|
69
|
+
- `squad tracker link` and `squad migrate` also print "▸ Next:" guidance.
|
|
70
|
+
- Managed `.gitignore` block now covers `.squad/.last-run.json` and `.squad/.last-copy-prompt.md`.
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- System prompt no longer embeds timestamps, random IDs, or absolute host paths (these
|
|
75
|
+
cache-busted the prefix on every turn).
|
|
76
|
+
- `squad doctor` Anthropic Tier 1 Opus warning softened from "you will hit ITPM" to "tight but
|
|
77
|
+
viable with caching on."
|
|
78
|
+
- `squad config set planner` no longer prompts for `planner.modelOverride`. The interactive
|
|
79
|
+
flow is shorter and less intimidating; power users can still set the override directly in
|
|
80
|
+
`.squad/config.yaml` (documented in `docs/customization.md`).
|
|
81
|
+
- `copyToClipboard()` now returns a structured `{ ok, tool?, reason? }` result instead of a
|
|
82
|
+
bare boolean, so callers can explain failures to the user.
|
|
83
|
+
|
|
84
|
+
### Known limitations
|
|
85
|
+
|
|
86
|
+
- Google `cachedContents` explicit API not implemented (implicit caching is sufficient for
|
|
87
|
+
single-run CLI use).
|
|
88
|
+
- No cross-run persistence of cache stats yet — doctor only reads the most recent run.
|
|
89
|
+
- No automatic context compression when transcripts exceed ~50 KB. Caching helps but doesn't
|
|
90
|
+
solve the long-horizon case. 0.4.0 candidate.
|
|
91
|
+
- Anthropic 1-hour cache TTL (`ttl: "1h"`) not used — default 5-minute TTL covers single-run.
|
|
92
|
+
|
|
93
|
+
### Migration
|
|
94
|
+
|
|
95
|
+
See `docs/migrating-from-0.1.md` §9 "Upgrading from 0.2.x to 0.3.0" for the full path. Short
|
|
96
|
+
version: `squad upgrade` and you're done. Caching is on by default; no config edits required.
|
|
97
|
+
|
|
10
98
|
## [0.2.2] - 2026-04-22
|
|
11
99
|
|
|
12
100
|
### Fixed
|
|
@@ -128,6 +216,9 @@ First public release.
|
|
|
128
216
|
- Plan-generation meta-prompt (`generate-plan.md`), intake template (`intake.md`), and plan skeleton reference (`story-skeleton.md`).
|
|
129
217
|
- Documentation: `docs/philosophy.md`, `docs/getting-started.md`, `docs/customization.md`, `docs/vs-spec-kit.md`.
|
|
130
218
|
|
|
131
|
-
[Unreleased]: https://github.com/AzmSquad/squad-kit/compare/v0.
|
|
219
|
+
[Unreleased]: https://github.com/AzmSquad/squad-kit/compare/v0.3.0...HEAD
|
|
220
|
+
[0.3.0]: https://github.com/AzmSquad/Squad-Kit/releases/tag/v0.3.0
|
|
221
|
+
[0.2.2]: https://github.com/AzmSquad/squad-kit/compare/v0.2.1...v0.2.2
|
|
222
|
+
[0.2.1]: https://github.com/AzmSquad/squad-kit/compare/v0.2.0...v0.2.1
|
|
132
223
|
[0.2.0]: https://github.com/AzmSquad/squad-kit/compare/v0.1.0...v0.2.0
|
|
133
224
|
[0.1.0]: https://github.com/AzmSquad/squad-kit/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://squad-kit.com">
|
|
3
|
+
<img src="https://squad-kit.com/logo-wordmark.svg?v=2" alt="squad-kit logo" width="360">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/squad-kit"><img src="https://img.shields.io/npm/v/squad-kit.svg" alt="npm version"></a>
|
|
9
|
+
<a href="https://github.com/AzmSquad/Squad-Kit/actions/workflows/ci.yml"><img src="https://github.com/AzmSquad/Squad-Kit/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
11
|
+
<a href="https://squad-kit.com"><img src="https://img.shields.io/badge/site-squad--kit.com-7cffa0?labelColor=0a0a0c" alt="Website"></a>
|
|
12
|
+
</p>
|
|
7
13
|
|
|
8
|
-
**Plan once, execute cheap.** A 3-step SDD-style workflow CLI for AI-assisted coding: **raw story → good plan → implementation**. Your expensive model plans once. A cheap model executes many times. Squad-kit owns the folder conventions, the plan meta-prompt, and the agent slash-commands so the token cost goes where it pays off. Deeper product notes live on **[squad-kit.
|
|
14
|
+
**Plan once, execute cheap.** A 3-step SDD-style workflow CLI for AI-assisted coding: **raw story → good plan → implementation**. Your expensive model plans once. A cheap model executes many times. Squad-kit owns the folder conventions, the plan meta-prompt, and the agent slash-commands so the token cost goes where it pays off. Deeper product notes live on **[squad-kit.com](https://squad-kit.com)** and in [`docs/`](docs/philosophy.md).
|
|
9
15
|
|
|
10
16
|
```
|
|
11
17
|
.squad/
|
|
@@ -13,6 +19,11 @@
|
|
|
13
19
|
└── plans/<feature>/ # NN-story-<slug>.md (one per executable plan)
|
|
14
20
|
```
|
|
15
21
|
|
|
22
|
+
## What's new in 0.3.0
|
|
23
|
+
|
|
24
|
+
- **Prompt caching** across Anthropic, OpenAI, and Google — ~70% fewer billed input tokens on
|
|
25
|
+
a typical planning run, and Anthropic Tier 1 ITPM pressure roughly 5× lower.
|
|
26
|
+
|
|
16
27
|
## What's new in 0.2.0
|
|
17
28
|
|
|
18
29
|
- **Direct planner.** `squad new-plan --api` runs Anthropic, OpenAI, or Google from your terminal and writes the plan file. Demand-driven context keeps tokens bounded.
|
|
@@ -39,7 +50,7 @@ cd your-project && squad migrate
|
|
|
39
50
|
|
|
40
51
|
`squad migrate` deletes the now-unused `.squad/prompts/` directory, appends the managed `.gitignore` block, tightens `.squad/secrets.yaml` permissions to `0600`, and normalises `.squad/config.yaml`. It is idempotent but destructive — run it with `--dry-run` first if you forked the prompt files.
|
|
41
52
|
|
|
42
|
-
Full upgrade walkthrough, including what-if scenarios and how to recover customised prompts: [migration guide (repo)](docs/migrating-from-0.1.md) · [migration guide (site)](https://squad-kit.
|
|
53
|
+
Full upgrade walkthrough, including what-if scenarios and how to recover customised prompts: [migration guide (repo)](docs/migrating-from-0.1.md) · [migration guide (site)](https://squad-kit.com/docs/migrating-from-0.1).
|
|
43
54
|
|
|
44
55
|
## Install
|
|
45
56
|
|
|
@@ -108,6 +119,8 @@ Override the default plan-phase model without editing squad-kit:
|
|
|
108
119
|
planner:
|
|
109
120
|
enabled: true
|
|
110
121
|
provider: anthropic
|
|
122
|
+
cache:
|
|
123
|
+
enabled: true # default; turn off via squad config set planner
|
|
111
124
|
modelOverride:
|
|
112
125
|
anthropic: claude-opus-5-0 # riding a newer provider release early
|
|
113
126
|
```
|
|
@@ -165,6 +178,7 @@ See [`docs/philosophy.md`](docs/philosophy.md) for the token math and [`docs/vs-
|
|
|
165
178
|
- **Quality depends on the planning model.** squad-kit has no safety-net commands. Use a strong model for `new-plan`.
|
|
166
179
|
- **Plans are project-coupled.** They reference real file paths. That is the point — do not expect portability between projects.
|
|
167
180
|
- **Global `NN` can collide on parallel branches.** Rebase-and-renumber is the resolution. Documented in [`docs/customization.md`](docs/customization.md).
|
|
181
|
+
- **Anthropic Tier 1 + Opus** shares a tight input-token-per-minute bucket. **0.3.0** enables prompt caching by default so typical multi-turn plans stay viable; see [Prompt caching](docs/customization.md#prompt-caching) in the customization docs.
|
|
168
182
|
|
|
169
183
|
## Non-goals for 0.2
|
|
170
184
|
|