@shipfast-ai/shipfast 1.4.0 → 1.5.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/commands/sf/do.md CHANGED
@@ -124,6 +124,14 @@ Pipeline: scout → architect → builder → critic (acceleration: partial, 35%
124
124
 
125
125
  If `.shipfast/brain.db` does not exist, tell user to run `shipfast init` first.
126
126
 
127
+ **Fresh project detection**: Check if brain.db has any decisions:
128
+ `brain_decisions: { action: list }`
129
+ If zero decisions AND the task is complex (not a simple fix):
130
+ - This is a fresh project — run 1 quick discovery round before planning
131
+ - Ask 2-4 questions about: PROBLEM (what does this solve?), USERS (who uses it?), BOUNDARIES (what's v1?), TECH (if no existing code detected)
132
+ - Store answers as locked decisions. Then continue with normal pipeline.
133
+ - This prevents building on wrong assumptions for fresh projects.
134
+
127
135
  **Crash recovery**: Check for stale lock file:
128
136
  ```bash
129
137
  [ -f .shipfast/lock ] && cat .shipfast/lock
@@ -22,15 +22,99 @@ Cross-phase context (decisions, learnings, conventions) carries forward automati
22
22
 
23
23
  <process>
24
24
 
25
+ ## Step 0: Project Discovery (REQUIRED before planning)
26
+
27
+ You are a senior technical discovery lead. Your job is to understand this project deeply enough to write complete requirements — every API endpoint, every data model, every user flow, every edge case.
28
+
29
+ Read the user's description. Then identify what you DON'T know.
30
+
31
+ ### Coverage framework — you MUST understand ALL 10 categories before proceeding:
32
+
33
+ 1. **PROBLEM** — What pain point does this solve? For whom?
34
+ 2. **USERS** — Who uses it? What are their distinct needs/roles?
35
+ 3. **CORE FLOW** — What is the primary user journey? (step by step)
36
+ 4. **DATA** — What data is created, stored, queried? Relationships?
37
+ 5. **BOUNDARIES** — What is v1? What is explicitly NOT v1?
38
+ 6. **TECH** — Stack decisions (or detect from existing code via package.json/Cargo.toml/etc.)
39
+ 7. **AUTH** — Who can do what? Access control model?
40
+ 8. **INTEGRATIONS** — External services, APIs, third-party dependencies?
41
+ 9. **CONSTRAINTS** — Timeline, team, budget, compliance, performance?
42
+ 10. **RISKS** — What could go wrong? What's the hardest part?
43
+
44
+ ### How to ask:
45
+
46
+ - Ask 2-4 questions per round using AskUserQuestion
47
+ - Make questions specific to THIS project — not generic templates
48
+ - Use multiple choice when there are known options, free text when open-ended
49
+ - NEVER ask questions the description already answers
50
+ - NEVER ask generic questions like "what's your vision?" — be specific to what's missing
51
+
52
+ ### Sufficiency check (after each round):
53
+
54
+ Score each category: CLEAR (user answered) / ASSUMED (safe default) / UNKNOWN (gap).
55
+
56
+ - 8+ categories CLEAR or ASSUMED → STOP asking, proceed to Step 1
57
+ - 6-7 clear → one more round targeting gaps
58
+ - <6 clear after Round 2 → ask: "I still have gaps in [X, Y, Z]. Clarify or should I assume?"
59
+ - After Round 4 → STOP regardless, list all assumptions, proceed
60
+
61
+ ### Safe assumptions (don't need to ask):
62
+
63
+ The LLM CAN assume when: tech choice has 80%+ market default (e.g., PostgreSQL for web apps), existing codebase already uses it, or user mentioned a related technology that implies it.
64
+
65
+ The LLM MUST ask about: business logic decisions, integration choices, scope boundaries, anything with security/compliance implications.
66
+
67
+ ### User escape hatches:
68
+
69
+ - "enough" / "just build it" / "start" → STOP immediately, proceed with assumptions
70
+ - "I don't know" / "decide for me" → use safe default, mark as ASSUMED
71
+ - "come back to this later" → mark as UNKNOWN, flag in requirements as TBD
72
+
73
+ ### Hard limits (prevent infinite loops):
74
+
75
+ - Maximum 4 rounds (16 questions total)
76
+ - Round 1 is REQUIRED. Rounds 2-4 are optional.
77
+ - NEVER re-ask something already answered or locked in brain.db
78
+
79
+ ### Store discoveries:
80
+
81
+ After each round, store answers as locked decisions:
82
+ `brain_decisions: { action: add, question: [what was asked], decision: [user's answer], reasoning: "Discovery phase", phase: "discovery", tags: "[CATEGORY]" }`
83
+
84
+ When assumptions are made, also store them:
85
+ `brain_decisions: { action: add, question: [category], decision: "[ASSUMED] [default]", reasoning: "Safe default — user did not specify", phase: "discovery", tags: "[CATEGORY],assumed" }`
86
+
87
+ ### Present summary before proceeding:
88
+
89
+ ```
90
+ Discovery Complete — [N] decisions locked
91
+
92
+ CLEAR:
93
+ PROBLEM: [summary]
94
+ USERS: [summary]
95
+ TECH: [summary]
96
+ ...
97
+
98
+ ASSUMED (override with /sf-brain decisions):
99
+ DATABASE: PostgreSQL (market default)
100
+ AUTH: JWT (implied by "API")
101
+
102
+ UNKNOWN (flagged as TBD in requirements):
103
+ CONSTRAINTS: Timeline not specified
104
+ ```
105
+
106
+ Use AskUserQuestion: "Discovery complete. Proceed to research + planning?"
107
+ If no → user can add more context or override assumptions.
108
+
109
+ ---
110
+
25
111
  ## Step 1: Understand the Project
26
112
 
27
- Read the user's project description. If brain.db exists, load:
28
- - Existing tech stack context
113
+ Load all discovery decisions from brain.db. If brain.db has existing context, also load:
114
+ - Tech stack context
29
115
  - Previous decisions
30
116
  - Codebase conventions
31
117
 
32
- If the project description is ambiguous, run the ambiguity detection from /sf-discuss first.
33
-
34
118
  ## Step 1.5: Parallel Domain Research (for new/complex projects)
35
119
 
36
120
  If the project involves unfamiliar technology or external integrations, launch **up to 4 Scout agents in parallel** to research:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipfast-ai/shipfast",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Autonomous context-engineered development system with SQLite brain. 5 agents, 20 commands, per-task fresh context, 70-90% fewer tokens.",
5
5
  "bin": {
6
6
  "shipfast": "bin/install.js"