@shipfast-ai/shipfast 0.6.1 → 1.0.2

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
@@ -2,11 +2,17 @@
2
2
 
3
3
  # ShipFast
4
4
 
5
- **Autonomous context-engineered development system.**
5
+ **Autonomous context-engineered development system with SQLite brain.**
6
6
 
7
- **5 agents. 12 commands. SQLite brain. 70-90% less tokens than alternatives.**
7
+ **5 agents. 17 commands. Per-task fresh context. 70-90% fewer tokens.**
8
8
 
9
- Supports 14 runtimes: Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, Cursor, Windsurf, Antigravity, Augment, Trae, Qwen Code, CodeBuddy, Cline
9
+ Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, Cursor, Windsurf, Antigravity, Augment, Trae, Qwen Code, CodeBuddy, Cline
10
+
11
+ ```
12
+ npm i -g @shipfast-ai/shipfast
13
+ ```
14
+
15
+ Works on Mac, Windows, and Linux.
10
16
 
11
17
  </div>
12
18
 
@@ -14,219 +20,328 @@ Supports 14 runtimes: Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, C
14
20
 
15
21
  ## Why ShipFast?
16
22
 
17
- Traditional AI dev tools fight context rot by generating **more** context — 15+ markdown files per phase, 31 specialized agents, 50+ commands to memorize. That's bureaucracy, not engineering.
18
-
19
- ShipFast flips the model:
23
+ AI dev tools fight context rot by generating **more** context — 15+ markdown files per phase, 31 agents, 50+ commands. That's bureaucracy.
20
24
 
21
- > **Compute context on-demand. Never store what you can derive. Never ask what you can infer.**
25
+ ShipFast flips the model: **compute context on-demand from a SQLite knowledge graph.** Zero markdown files. Each phase gets fresh agent context. The brain gets smarter every session.
22
26
 
23
27
  | | Alternatives | ShipFast |
24
28
  |---|---|---|
25
- | **Commands** | 50+ | 12 |
29
+ | **Commands** | 50+ | 14 |
26
30
  | **Agents** | 31 specialized | 5 composable |
27
31
  | **Context storage** | ~15 markdown files per phase | 1 SQLite database |
28
32
  | **Tokens per feature** | 95K-150K | 3K-40K |
29
- | **Trivial task overhead** | Full ceremony | Near-zero |
30
- | **Cross-session memory** | Flat STATE.md | Weighted learnings with decay |
31
- | **Staleness detection** | None | Content hash auto-detect |
33
+ | **Complex execution** | Per-plan agents (fresh context) | Per-task agents (fresh context) |
34
+ | **Cross-session memory** | Flat STATE.md (manual) | brain.db decisions + learnings (automatic) |
32
35
  | **Learning from mistakes** | None | Self-improving with confidence scoring |
36
+ | **Codebase indexing** | 4 parallel agents, minutes | Batch indexer, <1 second |
33
37
 
34
38
  ---
35
39
 
36
- ## Install
40
+ ## Getting Started
37
41
 
38
42
  ```bash
39
43
  npm i -g @shipfast-ai/shipfast
40
44
  ```
41
45
 
42
- That's it. Auto-detects your AI tools (Claude Code, Cursor, Gemini, etc.) and installs for all of them.
43
-
44
- Then index your repo:
46
+ Auto-detects your AI tools and installs for all of them. Then index your repo:
45
47
 
46
48
  ```bash
47
49
  cd your-project
48
50
  shipfast init
49
51
  ```
50
52
 
51
- ### Commands
53
+ Verify: run `/sf-help` in your AI tool.
54
+
55
+ ### Staying Updated
56
+
57
+ ```bash
58
+ shipfast update
59
+ ```
60
+
61
+ Updates the package and re-detects runtimes (catches newly installed AI tools).
62
+
63
+ ### Terminal Commands
52
64
 
53
65
  ```bash
54
- shipfast init # index current repo into .shipfast/brain.db
55
- shipfast update # update to latest + re-detect new AI tools
56
- shipfast uninstall # remove from all AI tools
57
- shipfast help # show commands
66
+ shipfast init # Index current repo into .shipfast/brain.db
67
+ shipfast init --fresh # Full reindex (clears existing brain)
68
+ shipfast link <path> # Link another repo for cross-repo search
69
+ shipfast unlink [path] # Unlink a repo (or all)
70
+ shipfast status # Show installed runtimes + brain + links
71
+ shipfast update # Update + re-detect runtimes
72
+ shipfast uninstall # Remove from all AI tools
73
+ shipfast help # Show all commands
58
74
  ```
59
75
 
60
76
  ---
61
77
 
62
- ## Commands
78
+ ## How It Works
63
79
 
64
- ### `/sf-do` — The One Command
80
+ Already have code? `shipfast init` indexes your codebase in under 1 second functions, types, imports, git history. No parallel agents, no markdown files. Just a SQLite database.
81
+
82
+ ### 1. Plan Phase
65
83
 
66
84
  ```
67
- /sf-do Add Stripe billing with usage-based pricing
68
- /sf-do Fix the login redirect bug
69
- /sf-do Refactor the auth module to use jose
85
+ /sf-plan Add Stripe billing with webhooks
70
86
  ```
71
87
 
72
- That's it. ShipFast analyzes your request, classifies intent and complexity, selects the right workflow depth, and executes autonomously.
88
+ Spawns two agents in fresh contexts:
73
89
 
74
- **Workflow auto-selection:**
75
- - **Trivial** (typo fix, add a spinner) — Direct execute. No planning. ~2K-5K tokens.
76
- - **Medium** (add dark mode, paginate a table) — Quick plan, execute, review. ~10K-20K tokens.
77
- - **Complex** (add Stripe billing, rewrite auth) — Full pipeline. ~40K-80K tokens.
90
+ **Scout** — Researches the codebase. Finds relevant files, functions, consumers. Tags findings with confidence levels: [VERIFIED], [CITED], [ASSUMED].
78
91
 
79
- ### `/sf-status` Progress Dashboard
92
+ **Architect** — Creates a precise task list using goal-backward methodology. Starts from "what does done look like" and works backward to tasks. Each task has exact file paths, consumer lists, verify commands, and measurable done criteria.
80
93
 
81
- ```
82
- ShipFast Status
83
- ===============
84
- Brain: 342 nodes | 1,847 edges | 12 decisions | 8 learnings | 50 hot files
85
- Tasks: 1 active | 5 completed
86
- Checkpoints: 3 available
87
- ```
94
+ Tasks are stored in brain.db. No PLAN.md files.
88
95
 
89
- ### `/sf-undo` — Safe Rollback
96
+ ### 2. Execute
90
97
 
91
98
  ```
92
- /sf-undo # Shows recent tasks, pick one
93
- /sf-undo task:auth:1 # Undo specific task
99
+ /sf-do
94
100
  ```
95
101
 
96
- Uses `git revert` for committed work, stash-based rollback for uncommitted.
102
+ Reads tasks from brain.db and executes them.
103
+
104
+ **Trivial tasks** (fix a typo, add an import) — executes inline. No agents, no planning. ~3K tokens.
105
+
106
+ **Medium tasks** (add a component, refactor a module) — one Builder agent with all tasks batched. ~15K tokens.
107
+
108
+ **Complex tasks** (new feature across multiple files) — **per-task Builder agents with fresh context each.** No accumulated garbage between tasks. Each Builder:
109
+
110
+ 1. Reads files + greps for consumers of anything it'll change
111
+ 2. Implements following existing patterns
112
+ 3. Runs build/typecheck — fixes errors before committing
113
+ 4. Commits with conventional format
114
+ 5. Updates task status in brain.db
115
+
116
+ After all tasks: Critic reviews the diff. Scribe records decisions and learnings to brain.db.
97
117
 
98
- ### `/sf-config` — Configuration
118
+ ### 3. Verify
99
119
 
100
120
  ```
101
- /sf-config # Show all config
102
- /sf-config model-builder opus # Use Opus for code writing
103
- /sf-config model-critic haiku # Use Haiku for reviews (cheap)
121
+ /sf-verify
104
122
  ```
105
123
 
106
- ### `/sf-brain` Query Knowledge Graph
124
+ Separate verification in fresh context:
125
+
126
+ - **3-level artifact validation**: exists → substantive (not stubs) → wired (imported and used)
127
+ - **Data flow tracing**: components receive real data, not hardcoded empty arrays
128
+ - **Consumer integrity**: removed exports have zero remaining consumers
129
+ - **Stub detection**: TODO, FIXME, placeholder, empty handlers, console.log, debugger
130
+ - **Build verification**: runs build command, reports pass/fail
131
+
132
+ Scores: PASS / PASS_WITH_WARNINGS / FAIL with specific failure details.
133
+
134
+ ### 4. Discuss (when needed)
107
135
 
108
136
  ```
109
- /sf-brain files like auth # Find auth-related files
110
- /sf-brain what calls validateToken # Dependency tracing
111
- /sf-brain decisions # All decisions made
112
- /sf-brain hot files # Most frequently changed files
113
- /sf-brain stats # Brain statistics
137
+ /sf-discuss Add authentication
114
138
  ```
115
139
 
116
- ### `/sf-learn`Teach Patterns
140
+ Detects ambiguity before planning (zero LLM tokens rule-based):
141
+
142
+ - **WHERE**: No file paths mentioned
143
+ - **WHAT**: No behavior described
144
+ - **HOW**: Multiple approaches possible
145
+ - **RISK**: Touches auth/payment/data
146
+ - **SCOPE**: Broad request with conjunctions
147
+
148
+ Asks 2-5 targeted questions. Stores answers as locked decisions in brain.db. Never asks the same question twice (even across sessions).
149
+
150
+ ### 5. Ship
117
151
 
118
152
  ```
119
- /sf-learn react-19-refs: Use callback refs, not string refs
120
- /sf-learn tailwind-v4: Use @import not @tailwind directives
121
- /sf-learn prisma-json: Always cast JSON fields with Prisma.JsonValue
153
+ /sf-ship
122
154
  ```
123
155
 
124
- Learnings start at 0.8 confidence, boost on reuse, decay with time.
156
+ Creates branch, generates PR description from brain.db (decisions, tasks, changes), pushes, outputs PR link.
125
157
 
126
- ---
158
+ ### 6. Repeat → Complete → Next Milestone
127
159
 
128
- ## Architecture
160
+ ```
161
+ /sf-discuss Phase 2
162
+ /sf-plan Phase 2: Payment webhooks
163
+ /sf-do
164
+ /sf-verify
165
+ /sf-ship
166
+ ...
167
+ /sf-milestone complete
168
+ /sf-milestone new v2.0
169
+ ```
170
+
171
+ Or for simple tasks, skip the ceremony:
129
172
 
130
173
  ```
131
- +---------------------------------------------------+
132
- | Layer 1: BRAIN (SQLite Knowledge Graph) |
133
- | .shipfast/brain.db — auto-indexed, queryable |
134
- +---------------------------------------------------+
135
- | Layer 2: AUTOPILOT (Intent Router) |
136
- | Rule-based classification — zero LLM cost |
137
- +---------------------------------------------------+
138
- | Layer 3: SWARM (5 Composable Agents) |
139
- | Scout, Architect, Builder, Critic, Scribe |
140
- +---------------------------------------------------+
174
+ /sf-do fix the login bug
141
175
  ```
142
176
 
143
- ### Brain (SQLite)
177
+ ShipFast auto-detects complexity and runs the right workflow.
178
+
179
+ ---
180
+
181
+ ## Why Fresh Context Matters
182
+
183
+ Context rot is the #1 quality killer. As the context window fills with file reads, error messages, and previous task artifacts, Claude's output quality degrades.
144
184
 
145
- All project state lives in `.shipfast/brain.db`. Zero markdown files.
185
+ ShipFast solves this:
146
186
 
147
- | Table | Purpose | Replaces |
187
+ | Phase | Agent | Context |
148
188
  |---|---|---|
149
- | `nodes` | Functions, types, classes, components | codebase-mapper agents |
150
- | `edges` | Import/call/dependency graph | manual dependency tracking |
151
- | `decisions` | Compact Q&A pairs (~40 tokens each) | STATE.md (~500 tokens each) |
152
- | `learnings` | Self-improving patterns with confidence | nothing (GSD doesn't learn) |
153
- | `tasks` | Execution history with commit SHAs | PLAN.md + VERIFICATION.md |
154
- | `checkpoints` | Git stash refs for rollback | nothing (GSD can't undo) |
155
- | `token_usage` | Per-agent spending tracker | nothing (GSD doesn't track) |
156
- | `hot_files` | Git-derived change frequency | nothing |
189
+ | Research | Scout (Haiku) | Fresh only brain.db context |
190
+ | Planning | Architect (Sonnet) | Fresh Scout findings + brain.db |
191
+ | Execution | Builder (Sonnet) × N | Fresh per task task plan + brain.db |
192
+ | Review | Critic (Haiku) | Fresh git diff only |
193
+ | Documentation | Scribe (Haiku) | Fresh session summary |
157
194
 
158
- Auto-indexed on first run. Incremental re-indexing on file changes (~100ms).
195
+ Each agent starts clean. No accumulated garbage. Quality stays consistent from first task to last.
159
196
 
160
- ### Autopilot
197
+ ---
161
198
 
162
- Zero-cost routing (no LLM tokens):
199
+ ## Brain (SQLite Knowledge Graph)
163
200
 
164
- 1. **Intent** Regex matching: fix, feature, refactor, test, ship, perf, security, etc.
165
- 2. **Complexity** — Heuristic: word count + conjunction count + area count
166
- 3. **Workflow** — Auto-select: trivial (direct) / medium (quick) / complex (full)
201
+ All state lives in `.shipfast/brain.db`. Zero markdown files.
167
202
 
168
- ### Agents
203
+ | Table | What it stores |
204
+ |---|---|
205
+ | `nodes` | Functions, types, classes, components (auto-extracted) |
206
+ | `edges` | Import/call/dependency relationships + git co-change patterns |
207
+ | `decisions` | Compact Q&A pairs (~40 tokens each, not ~500 like markdown) |
208
+ | `learnings` | Error→fix patterns with confidence scoring |
209
+ | `tasks` | Execution history with commit SHAs |
210
+ | `requirements` | REQ-IDs mapped to phases for tracing |
211
+ | `checkpoints` | Git stash refs for rollback |
212
+ | `hot_files` | Most frequently changed files from git history |
213
+ | `architecture` | Auto-computed layers from import graph (zero hardcoding) |
214
+ | `folders` | Directory roles auto-detected from import patterns |
169
215
 
170
- 5 composable agents replace 31 specialized ones:
216
+ **Incremental indexing**: only re-indexes changed files (~300ms). Deleted files auto-cleaned.
171
217
 
172
- | Agent | Role | Default Model | Typical Cost |
173
- |---|---|---|---|
174
- | **Scout** | Read code, find files, fetch docs | Haiku | ~3K tokens |
175
- | **Architect** | Plan tasks, order dependencies | Sonnet | ~5K tokens |
176
- | **Builder** | Write code, run tests, commit | Sonnet | ~8K tokens |
177
- | **Critic** | Review diffs for bugs/security | Haiku | ~2K tokens |
178
- | **Scribe** | Record decisions, write PR desc | Haiku | ~1K tokens |
218
+ **MCP Server**: brain.db is exposed as 17 structured MCP tools. LLMs call these instead of improvising SQL.
219
+
220
+ ---
221
+
222
+ ## Architecture Intelligence
223
+
224
+ ShipFast auto-derives architecture layers from the import graph **zero hardcoded folder patterns**. Works with any project structure, any language.
225
+
226
+ **How it works**:
227
+ 1. BFS from entry points (files nothing imports) assigns layer depth
228
+ 2. Fuzzy import resolution handles `@/`, `~/`, and alias paths
229
+ 3. Folder roles detected from aggregate import/export ratios
230
+ 4. Recomputed on every `shipfast init` (instant)
231
+
232
+ **What it produces**:
179
233
 
180
- Each gets a tiny base prompt (~200 tokens) + targeted context from brain.db.
234
+ - **Layer 0** (entry): files nothing imports pages, routes, App.tsx
235
+ - **Layer 1-N** (deeper): each layer imported by the layer above
236
+ - **Leaf layer**: files that import nothing — types, constants
237
+ - **Folder roles**: entry (imports many), shared (imported by many), consumer, leaf, foundation
238
+
239
+ **Why it matters**: Scout knows which layer a file lives in. Builder knows to check upstream consumers before modifying a shared layer. Critic can detect skip-layer violations. Verifier traces data flow from entry to data source.
240
+
241
+ All exposed as MCP tools: `brain_arch_layers`, `brain_arch_folders`, `brain_arch_file`, `brain_arch_data_flow`, `brain_arch_most_connected`.
181
242
 
182
243
  ---
183
244
 
184
- ## Token Efficiency
245
+ ## Agents
185
246
 
186
- ### Blast Radius Context (not full files)
247
+ 5 composable agents replace 31 specialized ones. Same behavioral rules, 90% fewer tokens.
187
248
 
188
- ```sql
189
- -- Instead of loading 20 full files (~15K tokens),
190
- -- load only the dependency subgraph (~500 tokens)
191
- WITH RECURSIVE affected AS (
192
- SELECT id FROM nodes WHERE file_path IN (...)
193
- UNION
194
- SELECT e.target FROM edges e
195
- JOIN affected a ON e.source = a.id
196
- WHERE depth < 3
197
- )
198
- SELECT signature FROM nodes JOIN affected ...
199
- ```
249
+ | Agent | Role | Model | Key Rules |
250
+ |---|---|---|---|
251
+ | **Scout** | Research | Haiku | Confidence tagging, 12-call limit, architecture mapping, consumer lists |
252
+ | **Architect** | Planning | Sonnet | Goal-backward, exact file paths, consumer checks, scope prohibition, must-haves |
253
+ | **Builder** | Execution | Sonnet | Impact analysis before every change, per-task build verify, 3-attempt limit, deviation tracking, threat scan |
254
+ | **Critic** | Review | Haiku | 3 depths (quick/standard/deep), import graph tracing, consumer integrity check |
255
+ | **Scribe** | Documentation | Haiku | Records decisions + learnings to brain.db via sqlite3, PR descriptions |
200
256
 
201
- ### Compressed Decisions
257
+ ### Builder's Rule Zero
202
258
 
203
- ```
204
- GSD STATE.md (~500 tokens per decision):
205
- "After discussing with the user, we decided to use jose..."
259
+ Before deleting, removing, or modifying ANY function, type, or export:
206
260
 
207
- brain.db (~40 tokens per decision):
208
- Q: "JWT library?" -> "jose — Edge+Node, good TS types"
261
+ ```bash
262
+ grep -r "functionName" --include="*.ts" --include="*.tsx" .
209
263
  ```
210
264
 
211
- ### Model Tiering
265
+ If other files use it → update them or keep it. **NEVER remove without checking consumers.** This single rule prevents 80% of refactoring bugs.
266
+
267
+ ---
268
+
269
+ ## Commands
270
+
271
+ ### Core Workflow
212
272
 
213
- 60% of LLM calls use Haiku (cheapest tier). Only Builder and Architect use Sonnet. Configurable per-agent.
273
+ | Command | What it does |
274
+ |---|---|
275
+ | `/sf-do <task>` | Execute a task. Auto-detects complexity: trivial → medium → complex |
276
+ | `/sf-plan <task>` | Research (Scout) + Plan (Architect). Stores tasks in brain.db |
277
+ | `/sf-check-plan` | Verify plan before execution: scope, consumers, deps, STRIDE threats |
278
+ | `/sf-verify` | Verify completed work: artifacts, data flow, stubs, build, consumers |
279
+ | `/sf-discuss <task>` | Detect ambiguity, ask targeted questions, lock decisions |
280
+
281
+ ### Projects
282
+
283
+ | Command | What it does |
284
+ |---|---|
285
+ | `/sf-project <desc>` | Decompose large project into phases with REQ-ID tracing + 4 parallel researchers |
286
+ | `/sf-milestone [complete\|new]` | Complete current milestone or start next version |
287
+ | `/sf-workstream <action>` | Parallel feature branches: create, list, switch, complete |
288
+
289
+ ### Shipping
290
+
291
+ | Command | What it does |
292
+ |---|---|
293
+ | `/sf-ship` | Create branch, push, output PR link with auto-generated description |
294
+
295
+ ### Session
296
+
297
+ | Command | What it does |
298
+ |---|---|
299
+ | `/sf-status` | Show brain stats, tasks, checkpoints, version |
300
+ | `/sf-resume` | Resume from previous session (loads state from brain.db) |
301
+ | `/sf-undo [task-id]` | Rollback a completed task via git revert |
302
+
303
+ ### Knowledge
304
+
305
+ | Command | What it does |
306
+ |---|---|
307
+ | `/sf-brain <query>` | Query knowledge graph: files, decisions, learnings, hot files |
308
+ | `/sf-learn <pattern>` | Teach a reusable pattern (persists across sessions) |
309
+ | `/sf-map` | Generate codebase report: architecture layers, hot files, co-change clusters |
310
+
311
+ ### Config
312
+
313
+ | Command | What it does |
314
+ |---|---|
315
+ | `/sf-config` | View or set model tiers and preferences |
316
+ | `/sf-help` | Show all commands with workflows |
317
+
318
+ ---
319
+
320
+ ## Workflows
321
+
322
+ ```
323
+ Simple: /sf-do fix the typo in header
324
+ Standard: /sf-plan add dark mode → /sf-check-plan → /sf-do → /sf-verify
325
+ Complex: /sf-project Build billing → /sf-discuss → /sf-plan → /sf-check-plan → /sf-do → /sf-verify → /sf-ship
326
+ ```
214
327
 
215
328
  ---
216
329
 
217
330
  ## Self-Improving Memory
218
331
 
219
- 1. Task fails -> pattern + error recorded in `learnings` table
220
- 2. Next similar task -> learning injected into Builder context
221
- 3. Learning helps -> confidence increases (max 1.0)
222
- 4. Learning unused for 30 days -> auto-pruned
223
- 5. Users teach directly with `/sf-learn` (starts at 0.8 confidence)
332
+ ShipFast gets cheaper and smarter every session:
333
+
334
+ 1. **First time** doing X full pipeline (scout + architect + builder + critic)
335
+ 2. **Second time** skip scout + architect (brain has the patterns)
336
+ 3. **Third time** skip critic too (high confidence learnings)
337
+
338
+ Learnings are confidence-weighted (0.0-1.0). Boost on successful reuse. Auto-prune after 30 days of non-use. Users teach directly with `/sf-learn`.
224
339
 
225
340
  ---
226
341
 
227
342
  ## Configuration
228
343
 
229
- Default model tiers (configurable with `/sf-config`):
344
+ Model tiers per agent (configurable with `/sf-config`):
230
345
 
231
346
  ```
232
347
  Scout: haiku (reading is cheap)
@@ -238,6 +353,29 @@ Scribe: haiku (writing commit msgs is simple)
238
353
 
239
354
  ---
240
355
 
356
+ ## Supported Languages
357
+
358
+ 22 languages indexed: JavaScript, TypeScript, Rust, Python, Go, Java, Kotlin, Swift, C, C++, Ruby, PHP, Dart, Elixir, Scala, Zig, Lua, R, Julia, C#, F#, Vue/Svelte/Astro.
359
+
360
+ 50+ directories skipped (node_modules, dist, target, __pycache__, .venv, Pods, etc.) sourced from GitHub's official gitignore templates.
361
+
362
+ 25+ lock files skipped (package-lock.json, Cargo.lock, poetry.lock, go.sum, etc.).
363
+
364
+ ---
365
+
366
+ ## Uninstalling
367
+
368
+ ```bash
369
+ shipfast uninstall
370
+ npm uninstall -g @shipfast-ai/shipfast
371
+ ```
372
+
373
+ Auto-detects and removes from all runtimes. Cleans settings.json hooks.
374
+
375
+ ---
376
+
241
377
  ## License
242
378
 
243
379
  MIT
380
+
381
+ Inspired by [Get Shit Done](https://github.com/gsd-build/get-shit-done). Built from scratch.