whale-igniter 1.2.1 → 1.2.3

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="./brand/lockup.svg" alt="Whale Igniter" width="640">
2
+ <img src="https://cdn.jsdelivr.net/npm/whale-igniter@1.2.1/brand/lockup.svg" alt="Whale Igniter" width="640">
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -9,332 +9,123 @@
9
9
  <img alt="local first" src="https://img.shields.io/badge/local--first-agent%20memory-%230034D3?labelColor=%23F2ECE1&style=flat-square">
10
10
  </p>
11
11
 
12
- **CLI-first operational intelligence for AI-assisted product workflows.**
12
+ **Local-first project memory for AI agents.**
13
13
 
14
- Whale gives your project a machine-readable memory so AI agents like
15
- Claude Code, Codex, Cursor and Copilot understand your design system,
16
- conventions and decisions from the first commit without you having
17
- to re-explain everything every session.
14
+ Whale Igniter gives your repo a structured memory: design foundations,
15
+ components, decisions, refinements and generated agent context. It is
16
+ CLI-first, deterministic by default, and works with Codex, Claude Code,
17
+ Cursor, Copilot and any MCP client.
18
18
 
19
- > AI-native, not AI-dependent. The core is deterministic and runs
20
- > offline. AI is an enrichment layer — opt-in via API key, or via the
21
- > built-in MCP server.
22
-
23
- ---
24
-
25
- ## Install
19
+ ## Quick Start
26
20
 
27
21
  ```bash
28
- npm install -g whale-igniter
29
- # or use it directly without installing
30
22
  npx whale-igniter ignite my-app
23
+ cd my-app
24
+ npx whale-igniter remember
25
+ npx whale-igniter check
31
26
  ```
32
27
 
33
- Requires Node 20 or newer.
34
-
35
- Whale's executable is `whale`:
28
+ Install globally if you want the shorter `whale` command:
36
29
 
37
30
  ```bash
38
- whale --version
31
+ npm install -g whale-igniter
39
32
  whale ignite my-app
40
33
  ```
41
34
 
42
- ---
43
-
44
- ## The two-minute version
35
+ Requires Node 20 or newer.
45
36
 
46
- ```bash
47
- # Brand new project
48
- whale ignite my-app
37
+ ## What It Creates
49
38
 
50
- # Existing React + Tailwind codebase
51
- cd my-existing-app
52
- whale adopt
53
- whale adopt review # accept/reject scanner proposals
39
+ ```text
40
+ my-app/
41
+ ├── whale.config.json
42
+ ├── CLAUDE.md
43
+ ├── intelligence/
44
+ │ ├── components.json
45
+ │ ├── decisions.json
46
+ │ └── refinements.json
47
+ └── llm-wiki/
54
48
  ```
55
49
 
56
- Either path produces a `CLAUDE.md` at the project root plus a
57
- `llm-wiki/` folder. Open the project in Claude Code (or any AI
58
- assistant) and it picks up the context automatically.
59
-
60
- ---
61
-
62
- ## What Whale does
63
-
64
- ### 1. Bootstraps AI context for new projects
65
-
66
- `whale ignite` creates a workspace with foundations, a config, the
67
- intelligence stores, and a fully-generated `CLAUDE.md`. Three modes:
68
- opinionated default, `--minimal` skeleton, or `--interactive` wizard.
69
-
70
- ### 2. Adopts existing projects
71
-
72
- `whale adopt` parses your React/Tailwind source with a real AST, infers
73
- foundations (grid, radii, palette), detects components, and stages
74
- proposals you can review and accept. Idempotent — re-runs don't
75
- duplicate or overwrite your decisions.
76
-
77
- ### 3. Records operational context as you work
50
+ `intelligence/*.json` is the source of truth. Markdown files are rendered
51
+ from it so agents always read current project state.
78
52
 
79
- Three structured stores capture what would otherwise live in your head:
53
+ ## Core Commands
80
54
 
81
- - **`intelligence/components.json`** component catalog
82
- - **`intelligence/decisions.json`** architectural and product decisions
83
- - **`intelligence/refinements.json`** approved exceptions to the system
84
-
85
- Every write auto-regenerates `CLAUDE.md` so agents always read current state.
86
-
87
- ### 4. Surfaces accountable insights
88
-
89
- `whale insights` runs deterministic analyzers over your stores and code:
90
- refinement clusters, decision tension, orphan components, token drift,
91
- grid drift, catalog coverage gaps. No AI in the loop local,
92
- explainable, machine-checkable.
93
-
94
- ### 5. Generates code that respects your foundations
95
-
96
- `whale create component Card --variants primary,outline` produces a
97
- typed React component using your actual grid, radii, and accent color.
98
- No invented values. Auto-registers in the catalog.
99
-
100
- ### 6. Bridges to any AI agent (Selene)
101
-
102
- Three composable commands — `describe`, `audit`, `suggest` — package
103
- your full project context into a structured prompt. They work three ways:
104
-
105
- - **Prompt mode** (default, offline): writes the prompt to clipboard;
106
- paste into Claude/ChatGPT/Cursor; paste response back with
107
- `whale selene apply`.
108
- - **API mode** (opt-in): if `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`
109
- is set, Whale calls the provider directly and auto-applies the result.
110
- Transparent fallback to prompt mode on any failure.
111
- - **MCP mode** (new in v1.0): Whale exposes its capabilities as MCP
112
- tools that Claude Code, Cursor, Zed and any MCP client use natively.
113
-
114
- ### 7. Stays in sync automatically
115
-
116
- `whale watch` regenerates `CLAUDE.md` and the wiki when your foundations
117
- or stores change. Plays well with pre-commit hooks and CI.
118
-
119
- ---
55
+ | Command | Use it when you want to... |
56
+ | --- | --- |
57
+ | `whale ignite my-app` | Create a new Whale workspace |
58
+ | `whale adopt` | Scan an existing React/Tailwind project |
59
+ | `whale remember` | Regenerate agent context and wiki |
60
+ | `whale check` | Run validation and project insights |
61
+ | `whale improve` | Ask Selene for improvement suggestions |
62
+ | `whale explain` | Generate docs and AI-readable context |
63
+ | `whale team` | See active operating roles/packs |
64
+ | `whale create component Hero` | Generate a typed React component |
65
+ | `whale mcp config --client cursor` | Configure an MCP client |
120
66
 
121
- ## MCP server
67
+ ## Operating Roles
122
68
 
123
- The most powerful integration in v1.0. Wire Whale into your AI tool:
69
+ Whale includes five operating roles as packs:
124
70
 
125
71
  ```bash
126
- whale mcp config --client claude-code
127
- # Prints the JSON snippet for ~/Library/Application Support/Claude/claude_desktop_config.json
72
+ whale team add atlas # product strategy
73
+ whale team add forge # implementation architecture
74
+ whale team add scribe # documentation
75
+ whale team add lighthouse # quality checks
76
+ whale team add selene # AI suggestions and audits
128
77
  ```
129
78
 
130
- Once configured, the agent gets tools like:
131
-
132
- - `whale_project_overview` — read foundations, packs, counts in one call
133
- - `whale_list_components` — see what already exists before creating duplicates
134
- - `whale_list_decisions` — understand why the project is structured this way
135
- - `whale_register_component` — record components the agent creates
136
- - `whale_record_decision` — record non-obvious choices as they happen
137
- - `whale_validate`, `whale_insights` — check state mid-session
138
-
139
- Available client snippets: `--client claude-code | cursor | zed | raw`.
140
-
141
- ---
142
-
143
- ## Command reference
144
-
145
- | Command | What it does |
146
- | --- | --- |
147
- | `whale ignite [name]` | Bootstrap a workspace. Flags: `--interactive`, `--minimal`. |
148
- | `whale adopt [target]` | Scan an existing project and stage proposals. |
149
- | `whale adopt review` | Walk through pending proposals interactively. |
150
- | `whale adopt status` | List proposals without entering review. |
151
- | `whale sync` | Regenerate CLAUDE.md + wiki from `intelligence/*.json`. |
152
- | `whale remember` | Friendly alias for `sync`: update project memory for AI assistants. |
153
- | `whale check` | Friendly health check: run `validate` and then `insights`. |
154
- | `whale improve` | Friendly Selene entry point: suggest project-wide improvements. |
155
- | `whale explain` | Friendly docs entry point: generate reports and wiki/context. |
156
- | `whale team` | Show active and available AI teammates. |
157
- | `whale team add <name>` | Add atlas, forge, scribe, lighthouse, or selene as an AI teammate. |
158
- | `whale watch` | Auto-regenerate on changes. Flags: `--once`, `--verbose`, `--debounce`. |
159
- | `whale validate` | Run validators. Non-zero exit on errors. |
160
- | `whale insights` | Local analyzers + recommendations. Flags: `--json`, `--category`, `--min-severity`. |
161
- | `whale refine "<note>"` | Record a validator override. |
162
- | `whale decision` | Record an architectural / product decision. |
163
- | `whale component add <name>` | Register a component. |
164
- | `whale create component <name>` | Generate a typed component scaffold. |
165
- | `whale selene describe <component>` | AI-assisted catalog description. |
166
- | `whale selene audit <file>` | AI-assisted audit against foundations. |
167
- | `whale selene suggest` | AI-suggested patterns and decisions. |
168
- | `whale selene apply <kind>` | Apply pasted LLM response. |
169
- | `whale selene status` | Show provider state, mode, cache. |
170
- | `whale mcp serve` | Start the MCP server on stdio. |
171
- | `whale mcp config` | Print client configuration snippets. |
172
- | `whale docs` | Generate human-facing reports. |
79
+ They are not autonomous background agents. They are structured project
80
+ roles and instructions that help the agent you already use work with
81
+ better context.
173
82
 
174
- ---
83
+ ## AI Bridge
175
84
 
176
- ## Project structure
85
+ Selene packages your project context into structured prompts, or calls an
86
+ API when `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is configured.
177
87
 
88
+ ```bash
89
+ whale selene status
90
+ whale selene suggest --focus all
91
+ whale selene audit src/components/Hero.tsx
178
92
  ```
179
- my-app/
180
- ├── whale.config.json foundations, packs, AI targets
181
- ├── CLAUDE.md AI entry point (auto-generated)
182
- ├── AGENTS.md if "codex" in aiTargets
183
- ├── .cursorrules if "cursor" in aiTargets
184
- ├── intelligence/ source of truth (JSON)
185
- │ ├── refinements.json
186
- │ ├── decisions.json
187
- │ └── components.json
188
- ├── llm-wiki/ rendered view (markdown)
189
- │ ├── FOUNDATIONS.md
190
- │ ├── CONVENTIONS.md
191
- │ ├── DECISIONS.md
192
- │ ├── COMPONENTS.md
193
- │ └── WORKFLOWS.md
194
- └── .whale/ runtime caches and Selene stash
195
- └── selene/
196
- ├── cache/
197
- └── *.prompt.md / *.response.md
198
- ```
199
-
200
- **JSON is the source of truth. Markdown is rendered.** Edit a JSON
201
- store by hand, run `whale sync` (or have `whale watch` running), and
202
- everything else catches up.
203
93
 
204
- ---
94
+ Without an API key, Selene runs in prompt mode and prints/copies a prompt
95
+ you can paste into Claude, ChatGPT, Cursor or Codex.
205
96
 
206
- ## Selene configuration
97
+ ## MCP
207
98
 
208
- Optional block in `whale.config.json` for API mode:
209
-
210
- ```json
211
- {
212
- "selene": {
213
- "provider": "anthropic",
214
- "model": "claude-sonnet-4-6",
215
- "temperature": 0.2,
216
- "maxTokens": 1500,
217
- "autoCall": true,
218
- "confirmCost": false,
219
- "noCache": false
220
- }
221
- }
99
+ ```bash
100
+ whale mcp config --client claude-code
101
+ whale mcp config --client cursor
102
+ whale mcp config --client zed
222
103
  ```
223
104
 
224
- Everything is optional. With no config and no key, Selene runs in
225
- prompt mode forever. Adding a key (env or here) flips it to API mode.
226
- Set `autoCall: false` to keep prompt mode even with a key available.
227
-
228
- ---
229
-
230
- ## Presentation
231
-
232
- Whale's terminal output is built on a semantic UI layer: commands describe
233
- *intent* (success, warning, section header, key/value pair) and the active
234
- theme decides what each intent looks like. One result is that the same
235
- command produces premium output in a real terminal and clean, grep-friendly
236
- output in CI.
237
-
238
- Three environment variables control presentation:
239
-
240
- | Variable | Effect |
241
- | --- | --- |
242
- | `WHALE_PLAIN=1` | Disable color *and* Unicode glyphs. The output becomes ASCII-only and grep-friendly. Recommended for CI logs and pipelines. |
243
- | `WHALE_UNICODE=0` | Keep color, fall back to ASCII glyphs (`*`, `v`, `x`, `->`). Useful for terminals that render color but mangle Unicode. |
244
- | `NO_COLOR=1` / `FORCE_COLOR=0` | Standard environment overrides — chalk respects them, so does Whale. |
245
-
246
- In normal terminals Whale auto-detects capabilities and uses Unicode + color.
247
- In non-TTY contexts (piping, CI, scripts) it strips both automatically. You
248
- don't need to opt in unless you want to override the default.
249
-
250
- ---
251
-
252
- ## Brand kit
253
-
254
- Whale ships its identity assets in `brand/` so the GitHub README, npm page,
255
- demos and future splash surfaces all speak the same visual language.
256
-
257
- ### Palette
105
+ MCP exposes project overview, components, decisions, refinements,
106
+ validation, insights and write tools to compatible AI clients.
258
107
 
259
- | Token | Hex | Role |
260
- | --- | --- | --- |
261
- | `--wi-royal` | `#0034D3` | Primary ink, mark body, headings |
262
- | `--wi-paper` | `#F2ECE1` | Page background, knockout fill |
263
- | `--wi-sky` | `#99CCFF` | Soft accent and fills |
264
- | `--wi-deep` | `#003087` | Dark surface and on-light text |
265
-
266
- ### Typography
108
+ ## Brand Tokens
267
109
 
268
110
  ```css
111
+ --wi-royal: #0034D3;
112
+ --wi-paper: #F2ECE1;
113
+ --wi-sky: #99CCFF;
114
+ --wi-deep: #003087;
115
+
269
116
  --wi-font-display: "Special Elite", ui-monospace, monospace;
270
117
  --wi-font-mono: "JetBrains Mono", ui-monospace, monospace;
271
118
  ```
272
119
 
273
- - **Display** `Special Elite`, used for the wordmark and expressive headings.
274
- - **Mono** — `JetBrains Mono`, used for CLI surfaces and code samples.
275
-
276
- ### Assets
277
-
278
- | File | Use |
279
- | --- | --- |
280
- | `brand/logo.svg` | Primary mark |
281
- | `brand/wordmark.svg` | Wordmark only |
282
- | `brand/lockup.svg` | Mark + wordmark for README and docs |
283
- | `brand/logo-on-paper.svg` | Mark on paper background |
284
- | `brand/logo-on-royal.svg` | Knockout mark on royal |
285
- | `brand/favicon.svg` | Light favicon |
286
- | `brand/favicon-dark.svg` | Dark favicon |
287
-
288
- ---
289
-
290
- ## CI usage
291
-
292
- ```yaml
293
- - run: npx whale-igniter validate . # exits non-zero on errors
294
- - run: npx whale-igniter sync # ensure CLAUDE.md is current
295
- - run: git diff --exit-code # fail if sync produced uncommitted changes
296
- ```
297
-
298
- This turns "is the AI context current?" into a checkable property of
299
- the repo. Combine with `whale insights --json --min-severity warning`
300
- for automated quality reports.
301
-
302
- ---
303
-
304
- ## Design principles
305
-
306
- 1. **CLI-first.** Whale is a CLI and the MCP server. No dashboard, no SaaS.
307
- 2. **Local-first.** Intelligence lives in your repo, in git. No accounts.
308
- 3. **AI-native, not AI-dependent.** Core works offline. AI is opt-in at
309
- every level.
310
- 4. **Source of truth in JSON; rendered views in Markdown.** One direction.
311
- 5. **Idempotent everywhere.** Re-running adopt, sync, watch, or
312
- register doesn't duplicate or corrupt anything.
313
- 6. **Honest fallbacks.** API down? Falls back to prompt mode. Scan
314
- fails? Insights skip orphan/drift but still run. Watcher recursive
315
- not supported? Falls back to non-recursive. The user is never stuck.
316
-
317
- ---
318
-
319
- ## What v1.2 doesn't do (and why)
320
-
321
- - **Vue / Svelte parsing.** Scanner is React + Tailwind only. Other
322
- frameworks need their own parsers; that's post-v1.0.
323
- - **Hosted SaaS.** Whale is a tool, not a service. By design.
324
- - **Real-time team sync.** Today everything is local + git. Team
325
- workflows happen through PRs against `intelligence/*.json`.
326
- - **Generic linting.** ESLint and Stylelint exist. Whale only checks
327
- what's tied to operational context.
328
-
329
- See [docs/ROADMAP.md](docs/ROADMAP.md) for what's planned next.
330
-
331
- ---
120
+ Brand assets ship in `brand/` and are included in the npm package.
332
121
 
333
- ## License
122
+ ## Links
334
123
 
335
- MIT. See [LICENSE](LICENSE).
124
+ - Roadmap: [`docs/ROADMAP.md`](docs/ROADMAP.md)
125
+ - Package: [npmjs.com/package/whale-igniter](https://www.npmjs.com/package/whale-igniter)
126
+ - License: MIT
336
127
 
337
128
  <p align="center">
338
- <img src="./brand/logo.svg" alt="" width="44"><br>
339
- <sub><b>Whale Igniter</b> · local-first project memory for AI agents</sub>
129
+ <img src="https://cdn.jsdelivr.net/npm/whale-igniter@1.2.1/brand/logo.svg" alt="" width="44"><br>
130
+ <sub><b>Whale Igniter</b> · map the project before the agent moves</sub>
340
131
  </p>
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = "1.2.1";
1
+ export const PACKAGE_VERSION = "1.2.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whale-igniter",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "CLI-first operational intelligence. Bootstraps and adopts AI-readable project context so agents like Claude Code, Codex and Cursor understand your design system from the first commit. Includes an MCP server, a file watcher, deterministic insights, and an opt-in AI bridge (Selene).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",