@shipfast-ai/shipfast 0.6.1 → 1.0.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/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. 14 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,298 @@ 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.
23
+ AI dev tools fight context rot by generating **more** context — 15+ markdown files per phase, 31 agents, 50+ commands. That's bureaucracy.
18
24
 
19
- ShipFast flips the model:
20
-
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 status # Show installed runtimes + brain stats
69
+ shipfast update # Update + re-detect runtimes
70
+ shipfast uninstall # Remove from all AI tools
71
+ shipfast help # Show all commands
58
72
  ```
59
73
 
60
74
  ---
61
75
 
62
- ## Commands
76
+ ## How It Works
77
+
78
+ 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.
63
79
 
64
- ### `/sf-do` The One Command
80
+ ### 1. Plan Phase
65
81
 
66
82
  ```
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
83
+ /sf-plan Add Stripe billing with webhooks
70
84
  ```
71
85
 
72
- That's it. ShipFast analyzes your request, classifies intent and complexity, selects the right workflow depth, and executes autonomously.
86
+ Spawns two agents in fresh contexts:
73
87
 
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.
88
+ **Scout** — Researches the codebase. Finds relevant files, functions, consumers. Tags findings with confidence levels: [VERIFIED], [CITED], [ASSUMED].
78
89
 
79
- ### `/sf-status` Progress Dashboard
90
+ **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
91
 
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
- ```
92
+ Tasks are stored in brain.db. No PLAN.md files.
88
93
 
89
- ### `/sf-undo` — Safe Rollback
94
+ ### 2. Execute
90
95
 
91
96
  ```
92
- /sf-undo # Shows recent tasks, pick one
93
- /sf-undo task:auth:1 # Undo specific task
97
+ /sf-do
94
98
  ```
95
99
 
96
- Uses `git revert` for committed work, stash-based rollback for uncommitted.
100
+ Reads tasks from brain.db and executes them.
101
+
102
+ **Trivial tasks** (fix a typo, add an import) — executes inline. No agents, no planning. ~3K tokens.
103
+
104
+ **Medium tasks** (add a component, refactor a module) — one Builder agent with all tasks batched. ~15K tokens.
105
+
106
+ **Complex tasks** (new feature across multiple files) — **per-task Builder agents with fresh context each.** No accumulated garbage between tasks. Each Builder:
97
107
 
98
- ### `/sf-config` Configuration
108
+ 1. Reads files + greps for consumers of anything it'll change
109
+ 2. Implements following existing patterns
110
+ 3. Runs build/typecheck — fixes errors before committing
111
+ 4. Commits with conventional format
112
+ 5. Updates task status in brain.db
113
+
114
+ After all tasks: Critic reviews the diff. Scribe records decisions and learnings to brain.db.
115
+
116
+ ### 3. Verify
99
117
 
100
118
  ```
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)
119
+ /sf-verify
104
120
  ```
105
121
 
106
- ### `/sf-brain` Query Knowledge Graph
122
+ Separate verification in fresh context:
123
+
124
+ - **3-level artifact validation**: exists → substantive (not stubs) → wired (imported and used)
125
+ - **Data flow tracing**: components receive real data, not hardcoded empty arrays
126
+ - **Consumer integrity**: removed exports have zero remaining consumers
127
+ - **Stub detection**: TODO, FIXME, placeholder, empty handlers, console.log, debugger
128
+ - **Build verification**: runs build command, reports pass/fail
129
+
130
+ Scores: PASS / PASS_WITH_WARNINGS / FAIL with specific failure details.
131
+
132
+ ### 4. Discuss (when needed)
107
133
 
108
134
  ```
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
135
+ /sf-discuss Add authentication
114
136
  ```
115
137
 
116
- ### `/sf-learn`Teach Patterns
138
+ Detects ambiguity before planning (zero LLM tokens rule-based):
139
+
140
+ - **WHERE**: No file paths mentioned
141
+ - **WHAT**: No behavior described
142
+ - **HOW**: Multiple approaches possible
143
+ - **RISK**: Touches auth/payment/data
144
+ - **SCOPE**: Broad request with conjunctions
145
+
146
+ Asks 2-5 targeted questions. Stores answers as locked decisions in brain.db. Never asks the same question twice (even across sessions).
147
+
148
+ ### 5. Ship
117
149
 
118
150
  ```
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
151
+ /sf-ship
122
152
  ```
123
153
 
124
- Learnings start at 0.8 confidence, boost on reuse, decay with time.
154
+ Creates branch, generates PR description from brain.db (decisions, tasks, changes), pushes, outputs PR link.
125
155
 
126
- ---
156
+ ### 6. Repeat → Complete → Next Milestone
127
157
 
128
- ## Architecture
158
+ ```
159
+ /sf-discuss Phase 2
160
+ /sf-plan Phase 2: Payment webhooks
161
+ /sf-do
162
+ /sf-verify
163
+ /sf-ship
164
+ ...
165
+ /sf-milestone complete
166
+ /sf-milestone new v2.0
167
+ ```
168
+
169
+ Or for simple tasks, skip the ceremony:
129
170
 
130
171
  ```
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
- +---------------------------------------------------+
172
+ /sf-do fix the login bug
141
173
  ```
142
174
 
143
- ### Brain (SQLite)
175
+ ShipFast auto-detects complexity and runs the right workflow.
176
+
177
+ ---
178
+
179
+ ## Why Fresh Context Matters
144
180
 
145
- All project state lives in `.shipfast/brain.db`. Zero markdown files.
181
+ 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.
146
182
 
147
- | Table | Purpose | Replaces |
183
+ ShipFast solves this:
184
+
185
+ | Phase | Agent | Context |
148
186
  |---|---|---|
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 |
187
+ | Research | Scout (Haiku) | Fresh only brain.db context |
188
+ | Planning | Architect (Sonnet) | Fresh Scout findings + brain.db |
189
+ | Execution | Builder (Sonnet) × N | Fresh per task task plan + brain.db |
190
+ | Review | Critic (Haiku) | Fresh git diff only |
191
+ | Documentation | Scribe (Haiku) | Fresh session summary |
192
+
193
+ Each agent starts clean. No accumulated garbage. Quality stays consistent from first task to last.
194
+
195
+ ---
157
196
 
158
- Auto-indexed on first run. Incremental re-indexing on file changes (~100ms).
197
+ ## Brain (SQLite Knowledge Graph)
159
198
 
160
- ### Autopilot
199
+ All state lives in `.shipfast/brain.db`. Zero markdown files.
161
200
 
162
- Zero-cost routing (no LLM tokens):
201
+ | Table | What it stores |
202
+ |---|---|
203
+ | `nodes` | Functions, types, classes, components (auto-extracted) |
204
+ | `edges` | Import/call/dependency relationships + git co-change patterns |
205
+ | `decisions` | Compact Q&A pairs (~40 tokens each, not ~500 like markdown) |
206
+ | `learnings` | Error→fix patterns with confidence scoring |
207
+ | `tasks` | Execution history with commit SHAs |
208
+ | `requirements` | REQ-IDs mapped to phases for tracing |
209
+ | `checkpoints` | Git stash refs for rollback |
210
+ | `hot_files` | Most frequently changed files from git history |
163
211
 
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)
212
+ **Incremental indexing**: only re-indexes changed files (~300ms). Deleted files auto-cleaned.
167
213
 
168
- ### Agents
214
+ **MCP Server**: brain.db is exposed as structured MCP tools — `brain_stats`, `brain_search`, `brain_decisions`, `brain_learnings`, etc. LLMs call these instead of improvising SQL.
169
215
 
170
- 5 composable agents replace 31 specialized ones:
216
+ ---
217
+
218
+ ## Agents
219
+
220
+ 5 composable agents replace 31 specialized ones. Same behavioral rules, 90% fewer tokens.
171
221
 
172
- | Agent | Role | Default Model | Typical Cost |
222
+ | Agent | Role | Model | Key Rules |
173
223
  |---|---|---|---|
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 |
224
+ | **Scout** | Research | Haiku | Confidence tagging, 12-call limit, architecture mapping, consumer lists |
225
+ | **Architect** | Planning | Sonnet | Goal-backward, exact file paths, consumer checks, scope prohibition, must-haves |
226
+ | **Builder** | Execution | Sonnet | Impact analysis before every change, per-task build verify, 3-attempt limit, deviation tracking, threat scan |
227
+ | **Critic** | Review | Haiku | 3 depths (quick/standard/deep), import graph tracing, consumer integrity check |
228
+ | **Scribe** | Documentation | Haiku | Records decisions + learnings to brain.db via sqlite3, PR descriptions |
229
+
230
+ ### Builder's Rule Zero
231
+
232
+ Before deleting, removing, or modifying ANY function, type, or export:
179
233
 
180
- Each gets a tiny base prompt (~200 tokens) + targeted context from brain.db.
234
+ ```bash
235
+ grep -r "functionName" --include="*.ts" --include="*.tsx" .
236
+ ```
237
+
238
+ If other files use it → update them or keep it. **NEVER remove without checking consumers.** This single rule prevents 80% of refactoring bugs.
181
239
 
182
240
  ---
183
241
 
184
- ## Token Efficiency
242
+ ## Commands
185
243
 
186
- ### Blast Radius Context (not full files)
244
+ ### Core Workflow
187
245
 
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
- ```
246
+ | Command | What it does |
247
+ |---|---|
248
+ | `/sf-do <task>` | Execute a task. Auto-detects complexity: trivial → medium → complex |
249
+ | `/sf-plan <task>` | Research (Scout) + Plan (Architect). Stores tasks in brain.db |
250
+ | `/sf-verify` | Verify completed work: artifacts, data flow, stubs, build, consumers |
251
+ | `/sf-discuss <task>` | Detect ambiguity, ask targeted questions, lock decisions |
200
252
 
201
- ### Compressed Decisions
253
+ ### Projects
202
254
 
203
- ```
204
- GSD STATE.md (~500 tokens per decision):
205
- "After discussing with the user, we decided to use jose..."
255
+ | Command | What it does |
256
+ |---|---|
257
+ | `/sf-project <desc>` | Decompose large project into phases with REQ-ID tracing |
258
+ | `/sf-milestone [complete\|new]` | Complete current milestone or start next version |
206
259
 
207
- brain.db (~40 tokens per decision):
208
- Q: "JWT library?" -> "jose — Edge+Node, good TS types"
209
- ```
260
+ ### Shipping
261
+
262
+ | Command | What it does |
263
+ |---|---|
264
+ | `/sf-ship` | Create branch, push, output PR link with auto-generated description |
265
+
266
+ ### Session
267
+
268
+ | Command | What it does |
269
+ |---|---|
270
+ | `/sf-status` | Show brain stats, tasks, checkpoints, version |
271
+ | `/sf-resume` | Resume from previous session (loads state from brain.db) |
272
+ | `/sf-undo [task-id]` | Rollback a completed task via git revert |
210
273
 
211
- ### Model Tiering
274
+ ### Knowledge
212
275
 
213
- 60% of LLM calls use Haiku (cheapest tier). Only Builder and Architect use Sonnet. Configurable per-agent.
276
+ | Command | What it does |
277
+ |---|---|
278
+ | `/sf-brain <query>` | Query knowledge graph: files, decisions, learnings, hot files |
279
+ | `/sf-learn <pattern>` | Teach a reusable pattern (persists across sessions) |
280
+
281
+ ### Config
282
+
283
+ | Command | What it does |
284
+ |---|---|
285
+ | `/sf-config` | View or set model tiers and preferences |
286
+ | `/sf-help` | Show all commands with workflows |
287
+
288
+ ---
289
+
290
+ ## Workflows
291
+
292
+ ```
293
+ Simple: /sf-do fix the typo in header
294
+ Standard: /sf-plan add dark mode → /sf-do → /sf-verify
295
+ Complex: /sf-project Build billing → /sf-discuss → /sf-plan → /sf-do → /sf-verify → /sf-ship
296
+ ```
214
297
 
215
298
  ---
216
299
 
217
300
  ## Self-Improving Memory
218
301
 
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)
302
+ ShipFast gets cheaper and smarter every session:
303
+
304
+ 1. **First time** doing X full pipeline (scout + architect + builder + critic)
305
+ 2. **Second time** skip scout + architect (brain has the patterns)
306
+ 3. **Third time** skip critic too (high confidence learnings)
307
+
308
+ 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
309
 
225
310
  ---
226
311
 
227
312
  ## Configuration
228
313
 
229
- Default model tiers (configurable with `/sf-config`):
314
+ Model tiers per agent (configurable with `/sf-config`):
230
315
 
231
316
  ```
232
317
  Scout: haiku (reading is cheap)
@@ -238,6 +323,29 @@ Scribe: haiku (writing commit msgs is simple)
238
323
 
239
324
  ---
240
325
 
326
+ ## Supported Languages
327
+
328
+ 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.
329
+
330
+ 50+ directories skipped (node_modules, dist, target, __pycache__, .venv, Pods, etc.) sourced from GitHub's official gitignore templates.
331
+
332
+ 25+ lock files skipped (package-lock.json, Cargo.lock, poetry.lock, go.sum, etc.).
333
+
334
+ ---
335
+
336
+ ## Uninstalling
337
+
338
+ ```bash
339
+ shipfast uninstall
340
+ npm uninstall -g @shipfast-ai/shipfast
341
+ ```
342
+
343
+ Auto-detects and removes from all runtimes. Cleans settings.json hooks.
344
+
345
+ ---
346
+
241
347
  ## License
242
348
 
243
349
  MIT
350
+
351
+ Inspired by [Get Shit Done](https://github.com/gsd-build/get-shit-done). Built from scratch.