squad-kit 0.1.0 → 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,120 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.1] - 2026-04-22
11
+
12
+ ### Fixed
13
+
14
+ - **`squad new-plan --api` now handles provider rate limits (HTTP 429) properly.** Previously a 429 surfaced the generic `Run \`squad doctor\` to verify models and credentials.` hint, which is misleading — the credentials are fine, the org is just over its per-minute quota. `runPlanner` now:
15
+ - Detects 429s across Anthropic, OpenAI, and Google (new `errorKind: 'rate_limit'` on `ProviderResponse`).
16
+ - Parses `Retry-After` (seconds or HTTP-date) and Google's body-level `retryDelay` field.
17
+ - Retries **once** automatically, waiting the provider-requested time capped at 30 seconds. A new `onRateLimit(waitSec)` callback lets the UI show a "retrying in Ns" notice.
18
+ - When the retry also fails, throws a dedicated error that names the provider, summarises the wait time, and lists four concrete recovery paths: wait and retry, switch planner model (`squad config set planner`), tighten `planner.budget`, or upgrade tier (with a deep-link to each provider's limits page).
19
+ - The generic (non-429) provider-error hint now reads `Run \`squad doctor\` to diagnose, or retry — most 5xx errors are transient.`, which is accurate for the actual 5xx / network cases it covers.
20
+
21
+ ### Added
22
+
23
+ - `detectRateLimit()` and `rateLimitMessage()` in `src/planner/provider-errors.ts`. Both cover all three supported providers and are unit-tested with real-shaped 429 fixtures.
24
+
25
+ ## [0.2.0] - 2026-04-22
26
+
27
+ ### tracker-intake-fetch
28
+
29
+ **Added**
30
+
31
+ - `squad new-story --id <ID>` auto-fetches title, description, labels, and attachments (≤ 10 MB each) from the configured tracker. Supported: Jira Cloud, Azure DevOps Services.
32
+ - `.squad/secrets.yaml` as a second credential source (after environment variables) for planner keys and tracker tokens. Created with mode `0600` on POSIX; auto-added to `.gitignore`.
33
+ - `squad init` now prompts for tracker credentials when a supported tracker is chosen, and offers to save the planner key inline as an alternative to exporting an env var.
34
+ - `squad status` shows tracker type, workspace, and credential source (`env` / `secrets.yaml` / `missing`).
35
+ - `squad new-story` flags: `--no-fetch`, `--no-attachments`, `--attachment-mb <n>`.
36
+ - `squad new-story --no-tracker` — skip tracker id and fetch for a single story in a workspace that normally requires tracker ids. Interactive mode now offers "skip tracker for this story" alongside "enter id" when required.
37
+
38
+ **Changed**
39
+
40
+ - `squad new-story` accepts the feature slug as an optional positional; prompts when it is omitted in a TTY (including a picker for existing feature folders). Passing `-y` / `--yes` keeps fail-fast behaviour when the slug is missing. `CI=1` forces non-interactive mode even in a TTY.
41
+ - `squad tracker link` accepts both the story path and the tracker id as optional positionals; prompts with a story picker and id input when omitted. `-y` / `--yes` and `CI=1` force non-interactive fail-fast.
42
+ - CLI-wide: commands treat missing required input as promptable in a TTY; `-y` / `--yes` and `CI=1` opt out.
43
+ - Credential resolution order documented: env var → `.squad/secrets.yaml` → prompt → fail. Applies to both planner and tracker credentials.
44
+
45
+ **Security**
46
+
47
+ - `.squad/config.yaml` continues to reject secret-shaped keys (`apiKey`, `token`, …). Secrets live in `.squad/secrets.yaml` only.
48
+ - Auto-managed `.gitignore` block covers `.squad/secrets.yaml`, `.squad/stories/**/attachments/`, and `.squad/.trash/`.
49
+
50
+ ### Added
51
+
52
+ - `squad config` command group with `show`, `set planner`, `set tracker`, `unset planner`, `unset tracker`, and `remove-credential <section>` subcommands. Every field in `.squad/config.yaml` and `.squad/secrets.yaml` can now be edited interactively without opening a text editor.
53
+ - `squad init` on an existing workspace now offers **Reconfigure planner / Reconfigure tracker / Overwrite / Cancel** instead of silently bailing. `--force` keeps the old overwrite behaviour for scripts.
54
+
55
+ - `squad upgrade` self-update command. Detects the package manager used to install squad-kit, fetches the latest version from npm, and runs the appropriate global-install command after confirmation. Refuses dev installs and major version bumps (print-manual-guide instead).
56
+ - `squad migrate` command applies one-shot 0.1.x → 0.2.0 structural migrations (delete legacy prompts, gitignore, secrets perms, planner budget defaults, config normalisation). Idempotent; destructive by design; gated behind a confirmation prompt unless `--yes` is passed.
57
+ - `squad doctor` command: a full health check covering planner config, tracker credentials, model list probes (no completion calls), `.gitignore` managed block, `secrets.yaml` permissions, legacy `.squad/prompts/`, and `.squad/` layout. `--fix` applies non-destructive repairs only; destructive fixes belong in `squad migrate`.
58
+ - `planner.modelOverride` (per-provider) lets you pin a different plan-phase model id without editing squad-kit source.
59
+ - `pnpm verify:models` (`scripts/verify-models.ts`) probes provider model list APIs before publish so pinned ids cannot drift unnoticed.
60
+ - Clear, actionable error when the planner model returns 404 (upgrade, config override, or `squad doctor`).
61
+ - `squad status` marks the planner row with `(override)` when `modelOverride` is active for the current provider.
62
+ - Direct planner API (optional): Anthropic, OpenAI, Google. Squad calls the planner for you and writes the plan file.
63
+ - Demand-driven context: planner reads files on request via a bounded budget (file count, bytes, wall-clock).
64
+ - Interactive picker in `squad new-plan` over un-planned intakes.
65
+ - Already-planned guard with `--yes` override.
66
+ - `--api`, `--copy`, `--feature`, `--all` flags on `new-plan`.
67
+ - `squad init` asks about planner setup; `--planner <provider>` for non-interactive.
68
+ - `squad status` shows planner provider, model, and env-var presence.
69
+ - `squad list` shows which plans were generated by the API vs copy-paste.
70
+ - Visual identity: mint-green brand, custom spinner frames, banner, summary boxes, consistent prefixes across all commands.
71
+ - `squad rm` command group: `rm story`, `rm plan`, `rm feature`, each with `--dry-run`, `--trash`, `-y`, and interactive pickers. Deleting a story cascades to the matching plan file and overview row. `.squad/.trash/<timestamp>/` is now git-ignored automatically.
72
+
73
+ ### Changed
74
+
75
+ - Every user-facing error now ends with a recommended next command (for example, `Run \`squad doctor\` to diagnose`). Failures no longer dead-end users at an error string.
76
+ - `ensureGitignore` now includes `.squad/.trash/` in the managed block. Existing users will see the line appended on the next `squad doctor --fix` or any command that calls `ensureGitignore`.
77
+ - Anthropic plan model pinned to the versioned Claude API id `claude-opus-4-7` (replacing the prior alias default) and execute remains dated `claude-haiku-4-5-20251001`, per Anthropic’s model overview — run `pnpm verify:models` after changes.
78
+ - `new-plan <intake>` is now optional; omit to pick interactively.
79
+ - `--no-copy` renamed to `--no-clipboard` (old flag removed). `--copy` now forces copy-paste mode.
80
+ - Prompts (`generate-plan.md`, `intake.md`, `story-skeleton.md`) now ship entirely within the squad-kit package. Fresh installs no longer create a `.squad/prompts/` directory. Stale `.squad/prompts/` from 0.1.x installs is ignored at runtime and cleaned up by `squad migrate`.
81
+
82
+ ### Breaking changes for 0.1.x users
83
+
84
+ - 0.1.x users who upgrade should run `squad migrate` once per repo. A `.squad/prompts/` folder left from 0.1.x is deleted outright (prompts are now bundled in the squad-kit package).
85
+ - If you customised `.squad/prompts/*.md`, those customisations are no longer used. The canonical prompts are in the installed squad-kit package. To customise, fork squad-kit and patch `templates/prompts/`. (This is intentional: behaviour was inconsistent before — some commands ignored the user copy — and silent version drift was breaking workflows.)
86
+
87
+ ### Security
88
+
89
+ - Config loader rejects any YAML entry whose key looks like `apiKey`, `token`, `secret`, or `credential`.
90
+
91
+ ### Known limitations
92
+
93
+ - OpenAI and Google planner model ids in squad-kit remain provider “latest”-style names for 0.2.0; dated snapshots for those providers are planned for 0.2.1 once verified.
94
+
95
+ ### Non-goals (still deferred)
96
+
97
+ - OpenAI-compatible generic endpoint (OpenRouter, Ollama, local). Targeted for 0.3.
98
+ - `squad implement` command. Targeted for 0.3.
99
+ - MCP server, telemetry.
100
+
101
+ ## [0.1.0] - 2026-04-21
102
+
103
+ First public release.
104
+
105
+ ### Added
106
+
107
+ - `squad init` — scaffolds `.squad/` with `config.yaml`, prompt templates, and agent slash commands.
108
+ - `squad new-story <feature-slug>` — creates `.squad/stories/<feature>/<id>/intake.md` with `attachments/`.
109
+ - `squad new-plan <intake-path>` — composes the plan-generation meta-prompt inline with the intake, prints to stdout, and copies to clipboard.
110
+ - `squad status` — reports story / plan counts and next global `NN`.
111
+ - `squad list [--feature <slug>]` — table of stories and their plan state.
112
+ - `squad tracker link <story> <id>` — upserts a tracker id on an existing intake.
113
+ - Agent slash-command templates for **Claude Code**, **Cursor**, **GitHub Copilot**, and **Gemini CLI**.
114
+ - Tracker id validators for **GitHub**, **Linear**, **Jira**, and **Azure DevOps** (no API calls; format validation only).
115
+ - Plan-generation meta-prompt (`generate-plan.md`), intake template (`intake.md`), and plan skeleton reference (`story-skeleton.md`).
116
+ - Documentation: `docs/philosophy.md`, `docs/getting-started.md`, `docs/customization.md`, `docs/vs-spec-kit.md`.
117
+
118
+ [Unreleased]: https://github.com/AzmSquad/squad-kit/compare/v0.2.0...HEAD
119
+ [0.2.0]: https://github.com/AzmSquad/squad-kit/compare/v0.1.0...v0.2.0
120
+ [0.1.0]: https://github.com/AzmSquad/squad-kit/releases/tag/v0.1.0
package/README.md CHANGED
@@ -1,131 +1,164 @@
1
1
  # squad-kit
2
2
 
3
- **Plan once, execute cheap.** A 3-step SDD-style workflow CLI for AI-assisted coding: **raw story → good plan → implementation**.
3
+ [![npm version](https://img.shields.io/npm/v/squad-kit.svg)](https://www.npmjs.com/package/squad-kit)
4
+ [![CI](https://github.com/AzmSquad/Squad-Kit/actions/workflows/ci.yml/badge.svg)](https://github.com/AzmSquad/Squad-Kit/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+ [![Website](https://img.shields.io/badge/site-squad--kit.netlify.app-7cffa0?labelColor=0a0a0c)](https://squad-kit.netlify.app)
4
7
 
5
- 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.
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.netlify.app](https://squad-kit.netlify.app)** and in [`docs/`](docs/philosophy.md).
6
9
 
7
10
  ```
8
11
  .squad/
9
- ├── prompts/ # meta-prompts you can edit
10
- ├── stories/<feature>/<id>/ # intake + attachments (one per story)
11
- └── plans/<feature>/ # NN-story-<slug>.md (one per executable plan)
12
+ ├── stories/<feature>/<id>/ # intake + attachments (one per story)
13
+ └── plans/<feature>/ # NN-story-<slug>.md (one per executable plan)
12
14
  ```
13
15
 
14
- ---
16
+ ## What's new in 0.2.0
15
17
 
16
- ## Why not Spec-Kit?
18
+ - **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.
19
+ - **Tracker auto-fetch.** `squad new-story --id <ID>` pulls title, description, labels, and attachments (≤ 10 MB each) from Jira Cloud or Azure DevOps Services.
20
+ - **Secrets split.** API tokens live in `.squad/secrets.yaml` (git-ignored, `0600` on POSIX). `.squad/config.yaml` never holds secrets; the loader rejects secret-shaped keys.
21
+ - **Interactive-first UX.** Missing input prompts in a TTY; `-y` / `--yes` or `CI=1` opts out and fails fast.
22
+ - **`squad doctor`.** Full read-only health check; `--fix` for non-destructive repairs, `--json` for scripting.
23
+ - **`squad migrate`.** One-shot 0.1.x → 0.2.0 structural migrations (delete legacy `.squad/prompts/`, permissions, config normalisation). Destructive; use `--dry-run` first.
24
+ - **`squad upgrade`.** Safe npm-backed self-update (`--check` to verify only).
25
+ - **`squad config`.** `show`, `set planner` / `set tracker`, `unset …`, `remove-credential …` — edit config and secrets without hand-editing YAML.
26
+ - **`squad rm`.** `rm story` / `rm plan` / `rm feature` with `--dry-run`, `--trash`, and cascading overview updates.
27
+ - **Bundled prompts.** `generate-plan.md`, `intake.md`, and `story-skeleton.md` ship inside the npm package; upgrade the CLI to update them.
17
28
 
18
- Both aim at spec-driven development. They make different bets.
29
+ Full list in [`CHANGELOG.md`](CHANGELOG.md).
19
30
 
20
- | | squad-kit | Spec-Kit |
21
- |---|---|---|
22
- | Commands | `init`, `new-story`, `new-plan`, `status`, `list`, `tracker link` | `constitution`, `specify`, `clarify`, `plan`, `tasks`, `analyze`, `checklist`, `implement` |
23
- | `/implement` turn starts with | one plan file (~5–15 KB) | 5–7 command templates + cross-artifact reads (~15–25 KB) |
24
- | Model-tier awareness | Built into the philosophy (planner ≠ executor) | Not prescribed |
25
- | Generated artifacts per story | `intake.md`, `NN-story-<slug>.md`, overview row | `spec.md`, `plan.md`, `data-model.md`, `contracts/`, `research.md`, `quickstart.md`, `tasks.md` |
26
- | Customization | Prompts live in your repo as plain Markdown. Edit freely. | Template override stack with presets/extensions |
27
- | Runtime | Node + TypeScript, npm-distributable | Python + `uv` |
28
- | Scope | Intentionally small | Broad, with safety nets (`clarify`, `analyze`) |
31
+ ## Upgrading from 0.1.x
29
32
 
30
- Spec-Kit ships safety rails. Squad-kit ships the cheap path and gets out of the way. Pick squad-kit when your planner already produces trustworthy plans; pick Spec-Kit when you want the process to catch planning mistakes for you.
33
+ Existing squad-kit users should run two commands, once per repo:
31
34
 
32
- See [`docs/philosophy.md`](docs/philosophy.md) for the token math and [`docs/vs-spec-kit.md`](docs/vs-spec-kit.md) for the full comparison.
35
+ ```bash
36
+ pnpm add -g squad-kit@0.2.0 # or: npm install -g squad-kit@0.2.0 — or: squad upgrade
37
+ cd your-project && squad migrate
38
+ ```
33
39
 
34
- ---
40
+ `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
+
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.netlify.app/docs/migrating-from-0.1).
35
43
 
36
44
  ## Install
37
45
 
38
46
  ```bash
39
- npm install -g squad-kit
47
+ npm install -g squad-kit@0.2.0
40
48
  # or
41
- pnpm add -g squad-kit
49
+ pnpm add -g squad-kit@0.2.0
42
50
  ```
43
51
 
44
52
  Requires Node 18+.
45
53
 
46
- ---
47
-
48
54
  ## Quickstart
49
55
 
50
- In your project root:
51
-
52
56
  ```bash
53
- squad init # interactive: tracker, agents, name
54
- squad new-story auth --title "SSO support"
55
- # → edit .squad/stories/auth/sso-support/intake.md (paste title, description, criteria)
57
+ cd your-project
58
+ squad init # interactive: tracker, planner, agents, name
59
+ squad new-story auth --title "SSO support" # or: squad new-story auth --id ENG-42 to auto-fetch
60
+ # → edit .squad/stories/auth/ENG-42/intake.md
56
61
 
57
- # then, in your agent (Claude Code / Cursor / Copilot / Gemini):
58
- /squad-plan .squad/stories/auth/sso-support/intake.md
62
+ /squad-plan .squad/stories/auth/ENG-42/intake.md # in your agent (Claude / Cursor / Copilot / Gemini)
63
+ # → .squad/plans/auth/01-story-sso-support.md
59
64
 
60
- # → produces .squad/plans/auth/01-story-sso-support.md
61
-
62
- # implementation: new agent chat, attach ONLY the plan file.
63
- # a cheap model can execute it end-to-end.
65
+ # new agent chat · attach ONLY the plan file · a cheap model ships it
64
66
  ```
65
67
 
66
- No slash commands in your agent? Pipe the prompt directly:
68
+ No slash commands in your agent? Skip the meta-prompt copy-paste entirely:
67
69
 
68
70
  ```bash
69
- squad new-plan .squad/stories/auth/sso-support/intake.md # prints to stdout, copies to clipboard
71
+ squad new-plan --api # interactive picker, direct provider call, writes the plan file
70
72
  ```
71
73
 
72
- ---
74
+ Configuration, credential edits, and non-interactive flags: see [`docs/customization.md`](docs/customization.md) and `squad config show`. Full walkthrough: [`docs/getting-started.md`](docs/getting-started.md).
73
75
 
74
76
  ## Commands
75
77
 
76
78
  | Command | What it does |
77
- |---|---|
78
- | `squad init` | Bootstrap `.squad/` with prompts, config, and agent slash-commands |
79
- | `squad new-story <feature> [--id ID] [--title ...]` | Scaffold a story intake folder |
80
- | `squad new-plan <intake-path>` | Compose the plan-generation meta-prompt with the intake inlined; print to stdout + copy to clipboard |
81
- | `squad status` | Count stories/plans, show next global `NN`, warn on duplicates |
82
- | `squad list [--feature <slug>]` | Table of stories + their plan state |
83
- | `squad tracker link <story> <id>` | Attach or update a tracker id on an intake |
84
-
85
- ---
86
-
87
- ## Agent integration
79
+ | --- | --- |
80
+ | `squad init` | Scaffold `.squad/` with config, bundled prompts reference, and agent slash-commands. See [`docs/getting-started.md`](docs/getting-started.md). |
81
+ | `squad new-story [feature] [--id ID] [--title …] [--no-tracker] [--no-fetch] [--no-attachments] [--attachment-mb n]` | Create a story intake. Auto-fetches from the configured tracker when `--id` is given. |
82
+ | `squad new-plan [intake] [--api] [--copy] [--feature <slug>] [--all]` | Generate a plan from an intake. `--api` calls the configured planner; without `--api`, copy-paste mode prints the prompt to stdout and clipboard (`--no-clipboard` to skip the clipboard). |
83
+ | `squad status` | Counts, next `NN`, planner and tracker rows (including credential source). |
84
+ | `squad list [--feature <slug>]` | Table of stories and plan state. |
85
+ | `squad tracker link [story] [id]` | Attach or update a tracker id on an intake. |
86
+ | `squad config <show\|set\|unset\|remove-credential> …` | View and edit `.squad/config.yaml` and `.squad/secrets.yaml` interactively. See [`docs/customization.md`](docs/customization.md). |
87
+ | `squad rm <story\|plan\|feature> [target] [--dry-run] [--trash] [-y]` | Safely delete with cascading overview updates. |
88
+ | `squad doctor [--fix] [--json]` | Full health check; `--fix` applies non-destructive repairs. |
89
+ | `squad migrate [--dry-run] [-y]` | One-shot 0.1.x → 0.2.0 structural migrations. Destructive. |
90
+ | `squad upgrade [--check] [-y]` | Check npm and install a newer squad-kit release. |
88
91
 
89
- At `squad init` you pick which agents get native slash commands. Supported:
92
+ Deeper option lists: `squad <command> --help` and the `docs/` pages above.
90
93
 
91
- - **Claude Code** → `.claude/commands/squad-plan.md`, `.claude/commands/squad-new-story.md`
92
- - **Cursor** → `.cursor/commands/squad-*.md`
93
- - **GitHub Copilot** → `.github/prompts/squad-plan.prompt.md`
94
- - **Gemini CLI** → `.gemini/commands/squad-plan.toml`
94
+ ## Direct planner (optional)
95
95
 
96
- Unsupported agents work fine too — `squad new-plan` prints the composed prompt on stdout.
96
+ Off by default. Enable during `squad init` (answer **yes** to *Enable automatic plan generation?*) or later with `squad config set planner`. Supported providers: Anthropic, OpenAI, Google.
97
97
 
98
- ---
98
+ Credential resolution order:
99
99
 
100
- ## Trackers
100
+ 1. Provider env var (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`).
101
+ 2. `.squad/secrets.yaml` under `planner.<provider>.apiKey` (or cross-provider `SQUAD_PLANNER_API_KEY`).
102
+ 3. Interactive prompt (TTY only).
103
+ 4. Fail with a recovery hint.
101
104
 
102
- Optional. Configure in `.squad/config.yaml`:
105
+ Override the default plan-phase model without editing squad-kit:
103
106
 
104
107
  ```yaml
105
- tracker:
106
- type: linear # none | github | linear | jira | azure
107
- naming:
108
- includeTrackerId: true
109
- globalSequence: true
108
+ planner:
109
+ enabled: true
110
+ provider: anthropic
111
+ modelOverride:
112
+ anthropic: claude-opus-5-0 # riding a newer provider release early
110
113
  ```
111
114
 
112
- `--id` on `new-story` is validated against the tracker's id format (e.g. `ENG-42` for Linear, `843806` for Azure). No API calls in v0.1.
115
+ `squad status` marks the planner row `(override)` when a `modelOverride` is active. `squad doctor` probes the provider's `/v1/models` endpoint (no paid completion) and tells you what to do if the id is no longer served.
113
116
 
114
- ---
117
+ Slash commands inside your agent (`/squad-plan`) continue to work unchanged — the agent already has your repo in scope. The direct planner is an alternative path, not a replacement. For where keys live, see [Secrets](#secrets) below and [`docs/customization.md`](docs/customization.md).
115
118
 
116
- ## What's *not* in v0.1
119
+ ## Tracker auto-fetch
117
120
 
118
- We ship lean on purpose. Current non-goals:
121
+ `squad new-story <feature> --id <ID>` pulls the work item's title, description, labels, and attachments (≤ 10 MB each) straight into the intake. Supported trackers in 0.2.0: **Jira Cloud**, **Azure DevOps Services**.
119
122
 
120
- - Direct Anthropic/OpenAI API invocation (cost stays with your agent subscription)
121
- - MCP server
122
- - `/clarify`, `/analyze`, constitution-equivalent
123
- - Tracker API calls (id validation only)
124
- - Telemetry
123
+ Credentials follow the same resolution order as the planner (env → `.squad/secrets.yaml` → prompt → fail). `squad init` prompts for them when a supported tracker is selected.
124
+
125
+ Flags:
126
+
127
+ - `--no-fetch` — scaffold an empty intake; never call the tracker.
128
+ - `--no-attachments` — fetch metadata only.
129
+ - `--attachment-mb <n>` — override the 10 MB per-file cap.
130
+ - `--no-tracker` — skip the tracker id requirement for this story even when `naming.includeTrackerId: true`.
125
131
 
126
- Open to revisiting these for v0.2 based on usage.
132
+ Full example with Azure DevOps: [`docs/getting-started.md`](docs/getting-started.md).
127
133
 
128
- ---
134
+ ## Secrets
135
+
136
+ squad-kit stores settings in two files:
137
+
138
+ | File | Purpose | Git-tracked? | Editable by hand? |
139
+ | --- | --- | --- | --- |
140
+ | `.squad/config.yaml` | Project name, tracker, naming, agents, planner shape. | yes — commit it | yes, but `squad config set` is safer |
141
+ | `.squad/secrets.yaml` | Planner + tracker API tokens. | **no** — auto-ignored, `0600` on POSIX | no — use `squad config set` / `squad init` |
142
+
143
+ `config.yaml` rejects any key matching `apiKey`, `token`, `secret`, or `credential` at load time, so accidental commits fail loud. Rotate a credential with `squad config set planner` or `squad config set tracker`; remove one with `squad config remove-credential <section>`.
144
+
145
+ ## Why not Spec-Kit?
146
+
147
+ Both aim at spec-driven development. They make different bets.
148
+
149
+ | | squad-kit | Spec-Kit |
150
+ | --- | --- | --- |
151
+ | Commands | `init`, `new-story`, `new-plan`, `status`, `doctor`, `migrate`, `upgrade`, `list`, `rm`, `tracker link`, `config` | `constitution`, `specify`, `clarify`, `plan`, `tasks`, `analyze`, `checklist`, `implement` |
152
+ | `/implement` turn starts with | one plan file (~5–15 KB) | 5–7 command templates + cross-artifact reads (~15–25 KB) |
153
+ | Model-tier awareness | Built into the philosophy (planner ≠ executor) | Not prescribed |
154
+ | Generated artifacts per story | `intake.md`, `NN-story-<slug>.md`, overview row | `spec.md`, `plan.md`, `data-model.md`, `contracts/`, `research.md`, `quickstart.md`, `tasks.md` |
155
+ | Customization | Prompts ship with the CLI (fork squad-kit to change them). | Template override stack with presets/extensions |
156
+ | Runtime | Node + TypeScript, npm-distributable | Python + `uv` |
157
+ | Scope | Intentionally small | Broad, with safety nets (`clarify`, `analyze`) |
158
+
159
+ Spec-Kit ships safety rails. Squad-kit ships the cheap path and gets out of the way. Pick squad-kit when your planner already produces trustworthy plans; pick Spec-Kit when you want the process to catch planning mistakes for you.
160
+
161
+ See [`docs/philosophy.md`](docs/philosophy.md) for the token math and [`docs/vs-spec-kit.md`](docs/vs-spec-kit.md) for the full comparison.
129
162
 
130
163
  ## Tradeoffs to know
131
164
 
@@ -133,7 +166,15 @@ Open to revisiting these for v0.2 based on usage.
133
166
  - **Plans are project-coupled.** They reference real file paths. That is the point — do not expect portability between projects.
134
167
  - **Global `NN` can collide on parallel branches.** Rebase-and-renumber is the resolution. Documented in [`docs/customization.md`](docs/customization.md).
135
168
 
136
- ---
169
+ ## Non-goals for 0.2
170
+
171
+ We ship lean on purpose. Current non-goals:
172
+
173
+ - OpenAI-compatible generic endpoint (local models, OpenRouter, etc.); [Direct planner (optional)](#direct-planner-optional) covers hosted Anthropic, OpenAI, and Google
174
+ - MCP server
175
+ - `squad implement` (targeted for 0.3)
176
+ - `/clarify`, `/analyze`, constitution-equivalent
177
+ - Telemetry
137
178
 
138
179
  ## License
139
180
 
package/SECURITY.md ADDED
@@ -0,0 +1,57 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
5
+ Only the latest minor release of squad-kit receives security fixes.
6
+
7
+ | Version | Supported |
8
+ | ------- | --------- |
9
+ | 0.2.x | ✅ |
10
+ | 0.1.x | ❌ |
11
+ | < 0.1 | ❌ |
12
+
13
+ ## Reporting a vulnerability
14
+
15
+ **Please do not open a public GitHub issue for security reports.**
16
+
17
+ Email the maintainer privately at **momenysr@gmail.com** with:
18
+
19
+ - A description of the issue and its impact.
20
+ - Steps to reproduce (proof-of-concept preferred).
21
+ - Affected version(s) and environment (OS, Node version).
22
+ - Any suggested mitigation, if you have one.
23
+
24
+ You can expect:
25
+
26
+ 1. **Acknowledgement** within 72 hours.
27
+ 2. **Initial assessment** within 7 days.
28
+ 3. **Fix + coordinated disclosure** as quickly as the severity warrants — typically a patch release within 14 days for high-severity issues.
29
+
30
+ Credit will be given in the release notes unless you prefer to remain anonymous.
31
+
32
+ ## Handling credentials
33
+
34
+ squad-kit reads API tokens from (in order):
35
+
36
+ 1. **Environment variables** — `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `SQUAD_PLANNER_API_KEY` for planner; `JIRA_API_TOKEN`, `AZURE_DEVOPS_PAT`, `SQUAD_TRACKER_API_KEY` for trackers.
37
+ 2. **`.squad/secrets.yaml`** — created with mode `0600` on POSIX; always included in `.gitignore` by `squad init`.
38
+ 3. **Interactive prompt** — when the terminal is a TTY and the command needs a credential that is missing.
39
+
40
+ ### Non-goals
41
+
42
+ - `.squad/config.yaml` must never contain secrets. Loading it with a key matching `apiKey`, `api_key`, `token`, `secret`, `credential`, or `credentials` raises a loud error.
43
+ - squad-kit does not integrate with OS keychains in 0.2.0. The secrets file model is intentional: it is inspectable, excluded by ignore rules, and portable.
44
+ - Credentials are never logged. Tracker error messages redact tokens; planner provider errors do the same.
45
+
46
+ ## Scope
47
+
48
+ squad-kit is a local-only CLI. It can call **optional** network APIs (tracker fetch, direct planner) when the user enables those flows and provides credentials. It does not execute user code. Reports in scope include:
49
+
50
+ - Arbitrary file read/write outside the workspace caused by malformed input (e.g. path-traversal via feature slugs or intake paths).
51
+ - Command injection via clipboard helpers or spawned processes.
52
+ - Supply-chain concerns in shipped dependencies (`@inquirer/prompts`, `commander`, `fs-extra`, `js-yaml`, `kleur`).
53
+
54
+ Out of scope:
55
+
56
+ - Content of user-authored intakes and plans under `.squad/stories/` and `.squad/plans/` (treat as trusted project input to your agents).
57
+ - Vulnerabilities in the AI agents that consume squad-kit output (Claude Code, Cursor, Copilot, Gemini). Report those upstream.