jfl 0.1.1 → 0.2.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.
Files changed (112) hide show
  1. package/README.md +77 -7
  2. package/clawdbot-plugin/clawdbot.plugin.json +20 -0
  3. package/clawdbot-plugin/index.js +555 -0
  4. package/clawdbot-plugin/index.ts +582 -0
  5. package/clawdbot-skill/SKILL.md +33 -336
  6. package/clawdbot-skill/index.ts +491 -321
  7. package/clawdbot-skill/skill.json +4 -13
  8. package/dist/commands/clawdbot.d.ts +11 -0
  9. package/dist/commands/clawdbot.d.ts.map +1 -0
  10. package/dist/commands/clawdbot.js +215 -0
  11. package/dist/commands/clawdbot.js.map +1 -0
  12. package/dist/commands/gtm-process-update.d.ts +10 -0
  13. package/dist/commands/gtm-process-update.d.ts.map +1 -0
  14. package/dist/commands/gtm-process-update.js +101 -0
  15. package/dist/commands/gtm-process-update.js.map +1 -0
  16. package/dist/commands/onboard.d.ts.map +1 -1
  17. package/dist/commands/onboard.js +203 -15
  18. package/dist/commands/onboard.js.map +1 -1
  19. package/dist/commands/openclaw.d.ts +56 -0
  20. package/dist/commands/openclaw.d.ts.map +1 -0
  21. package/dist/commands/openclaw.js +700 -0
  22. package/dist/commands/openclaw.js.map +1 -0
  23. package/dist/commands/service-validate.d.ts +12 -0
  24. package/dist/commands/service-validate.d.ts.map +1 -0
  25. package/dist/commands/service-validate.js +611 -0
  26. package/dist/commands/service-validate.js.map +1 -0
  27. package/dist/commands/services-create.d.ts +15 -0
  28. package/dist/commands/services-create.d.ts.map +1 -0
  29. package/dist/commands/services-create.js +1452 -0
  30. package/dist/commands/services-create.js.map +1 -0
  31. package/dist/commands/services-sync-agents.d.ts +23 -0
  32. package/dist/commands/services-sync-agents.d.ts.map +1 -0
  33. package/dist/commands/services-sync-agents.js +207 -0
  34. package/dist/commands/services-sync-agents.js.map +1 -0
  35. package/dist/commands/services.d.ts +7 -1
  36. package/dist/commands/services.d.ts.map +1 -1
  37. package/dist/commands/services.js +347 -22
  38. package/dist/commands/services.js.map +1 -1
  39. package/dist/commands/update.js +0 -0
  40. package/dist/commands/validate-settings.d.ts +37 -0
  41. package/dist/commands/validate-settings.d.ts.map +1 -0
  42. package/dist/commands/validate-settings.js +197 -0
  43. package/dist/commands/validate-settings.js.map +1 -0
  44. package/dist/index.js +155 -60
  45. package/dist/index.js.map +1 -1
  46. package/dist/lib/agent-generator.d.ts.map +1 -1
  47. package/dist/lib/agent-generator.js +94 -1
  48. package/dist/lib/agent-generator.js.map +1 -1
  49. package/dist/lib/openclaw-registry.d.ts +48 -0
  50. package/dist/lib/openclaw-registry.d.ts.map +1 -0
  51. package/dist/lib/openclaw-registry.js +181 -0
  52. package/dist/lib/openclaw-registry.js.map +1 -0
  53. package/dist/lib/openclaw-sdk.d.ts +107 -0
  54. package/dist/lib/openclaw-sdk.d.ts.map +1 -0
  55. package/dist/lib/openclaw-sdk.js +208 -0
  56. package/dist/lib/openclaw-sdk.js.map +1 -0
  57. package/dist/lib/peer-agent-generator.d.ts +44 -0
  58. package/dist/lib/peer-agent-generator.d.ts.map +1 -0
  59. package/dist/lib/peer-agent-generator.js +286 -0
  60. package/dist/lib/peer-agent-generator.js.map +1 -0
  61. package/dist/lib/service-detector.d.ts +1 -1
  62. package/dist/lib/service-detector.d.ts.map +1 -1
  63. package/dist/lib/service-detector.js +118 -5
  64. package/dist/lib/service-detector.js.map +1 -1
  65. package/dist/lib/service-gtm.d.ts +157 -0
  66. package/dist/lib/service-gtm.d.ts.map +1 -0
  67. package/dist/lib/service-gtm.js +786 -0
  68. package/dist/lib/service-gtm.js.map +1 -0
  69. package/dist/lib/service-mcp-base.d.ts +10 -1
  70. package/dist/lib/service-mcp-base.d.ts.map +1 -1
  71. package/dist/lib/service-mcp-base.js +20 -1
  72. package/dist/lib/service-mcp-base.js.map +1 -1
  73. package/dist/mcp/service-peer-mcp.d.ts +36 -0
  74. package/dist/mcp/service-peer-mcp.d.ts.map +1 -0
  75. package/dist/mcp/service-peer-mcp.js +220 -0
  76. package/dist/mcp/service-peer-mcp.js.map +1 -0
  77. package/dist/mcp/service-registry-mcp.js +0 -0
  78. package/dist/utils/settings-validator.d.ts +4 -1
  79. package/dist/utils/settings-validator.d.ts.map +1 -1
  80. package/dist/utils/settings-validator.js +25 -1
  81. package/dist/utils/settings-validator.js.map +1 -1
  82. package/package.json +2 -1
  83. package/template/.claude/service-settings.json +32 -0
  84. package/template/.claude/settings.json +10 -0
  85. package/template/.claude/skills/end/SKILL.md +1780 -0
  86. package/template/.jfl/config.json +2 -1
  87. package/template/.mcp.json +1 -7
  88. package/template/CLAUDE.md +1042 -248
  89. package/template/CLAUDE.md.bak +1187 -0
  90. package/template/scripts/commit-gtm.sh +56 -0
  91. package/template/scripts/commit-product.sh +68 -0
  92. package/template/scripts/migrate-to-branch-sessions.sh +201 -0
  93. package/template/scripts/session/auto-commit.sh +4 -3
  94. package/template/scripts/session/jfl-doctor.sh +222 -83
  95. package/template/scripts/session/session-cleanup.sh +109 -21
  96. package/template/scripts/session/session-end.sh +26 -13
  97. package/template/scripts/session/session-init.sh +280 -98
  98. package/template/scripts/session/test-critical-infrastructure.sh +293 -0
  99. package/template/scripts/session/test-experience-level.sh +336 -0
  100. package/template/scripts/session/test-session-cleanup.sh +268 -0
  101. package/template/scripts/session/test-session-sync.sh +320 -0
  102. package/template/scripts/where-am-i.sh +78 -0
  103. package/template/templates/service-agent/.claude/settings.json +32 -0
  104. package/template/templates/service-agent/CLAUDE.md +334 -0
  105. package/template/templates/service-agent/knowledge/ARCHITECTURE.md +115 -0
  106. package/template/templates/service-agent/knowledge/DEPLOYMENT.md +199 -0
  107. package/template/templates/service-agent/knowledge/RUNBOOK.md +412 -0
  108. package/template/templates/service-agent/knowledge/SERVICE_SPEC.md +77 -0
  109. package/dist/commands/session-mgmt.d.ts +0 -33
  110. package/dist/commands/session-mgmt.d.ts.map +0 -1
  111. package/dist/commands/session-mgmt.js +0 -404
  112. package/dist/commands/session-mgmt.js.map +0 -1
@@ -27,20 +27,40 @@ Don't make users fill out forms before they can build. Let them start immediatel
27
27
 
28
28
  **Complete ALL steps before saying anything to the user.**
29
29
 
30
- **1. Verify session branch** (from hook output)
31
-
32
- **2. Run session sync:**
30
+ **1. Run session sync:**
33
31
  ```bash
34
32
  ./scripts/session/session-sync.sh
35
33
  ```
36
34
 
37
- **3. Run doctor check:**
35
+ **2. Run doctor check (ONLY for existing projects):**
36
+
37
+ **IMPORTANT: Skip doctor for fresh projects.** Detect fresh project:
38
38
  ```bash
39
- ./scripts/session/jfl-doctor.sh
39
+ # Fresh project indicators:
40
+ # - No git commits yet: git rev-list --count HEAD returns 0 or error
41
+ # - Empty knowledge docs: VISION.md has template text
42
+ # - No journal entries: .jfl/journal/ is empty
43
+
44
+ # Check if fresh
45
+ COMMIT_COUNT=$(git rev-list --count HEAD 2>/dev/null || echo "0")
46
+ if [[ "$COMMIT_COUNT" -gt "5" ]]; then
47
+ # Existing project - run doctor
48
+ ./scripts/session/jfl-doctor.sh
49
+ # Ask user before continuing
50
+ # If warnings: "Doctor found issues: [list]. Want me to fix these?"
51
+ # If clean: "Doctor check passed. Ready to continue?"
52
+ # STOP AND WAIT for user response
53
+ # If approved: ./scripts/session/jfl-doctor.sh --fix
54
+ else
55
+ # Fresh project - skip doctor
56
+ echo "Fresh project detected, skipping doctor check."
57
+ fi
40
58
  ```
41
- Note any warnings (unmerged sessions, memory not initialized).
42
59
 
43
- **4. Get unified context via MCP (REQUIRED):**
60
+ **For existing projects:** After running doctor, you MUST ask the user before continuing.
61
+ **For fresh projects:** Skip directly to step 3.
62
+
63
+ **3. Get unified context via MCP (REQUIRED):**
44
64
  ```
45
65
  Call: mcp__jfl-context__context_get
46
66
  ```
@@ -50,94 +70,78 @@ This single call returns:
50
70
  - Knowledge docs (vision, roadmap, narrative, thesis)
51
71
  - Code file headers (@purpose tags)
52
72
 
73
+ **CRITICAL: Filter cross-project context pollution.**
74
+
75
+ Context Hub may return results from OTHER projects on the machine. ALWAYS verify context matches the current project:
76
+
77
+ 1. Check the project path in journal entries
78
+ 2. If journal paths don't match current directory, IGNORE them
79
+ 3. If knowledge docs look like templates, this is a FRESH project
80
+ 4. For fresh projects: Skip context_get entirely, start foundation questions
81
+
82
+ **Example of cross-project pollution (IGNORE THIS):**
83
+ ```
84
+ Journal from: /Users/alectaggart/gatcha-toilet/.jfl/journal/...
85
+ Current project: /Users/alectaggart/case
86
+ → THESE DON'T MATCH. Ignore the journal entry.
87
+ ```
88
+
89
+ **For fresh projects (no commits, empty docs):**
90
+ - Skip context_get
91
+ - Skip doctor check
92
+ - Go straight to foundation questions (VISION, ROADMAP, etc.)
93
+
53
94
  **DO NOT read individual markdown files.** The context MCP tool aggregates everything. This is why we built Context Hub.
54
95
 
55
- **5. Show recent journal entries:**
96
+ **4. Show recent journal entries:**
56
97
  ```bash
57
98
  cat .jfl/journal/*.jsonl 2>/dev/null | tail -10
58
99
  ```
59
100
 
60
- **6. Run /hud to show project dashboard:**
101
+ **5. Run /hud to show project dashboard:**
61
102
  ```
62
103
  Invoke: /hud skill
63
104
  ```
64
105
 
65
106
  This displays the full status, pipeline, tasks, and guides next action.
66
107
 
67
- **ONLY AFTER completing all 6 steps**, respond to the user with the HUD output.
68
-
69
- **CRITICAL: Automatic Tool Invocation**
70
-
71
- **When the user asks questions, AUTOMATICALLY use the right tool:**
72
-
73
- | User Question | Auto-Invoke | Don't Ask |
74
- |---------------|-------------|-----------|
75
- | "What did we decide about X?" | `memory_search: X` | Just do it |
76
- | "When did we implement Y?" | `memory_search: Y` | Just do it |
77
- | "Why did we choose Z?" | `memory_search: Z decision` | Just do it |
78
- | "Search for pricing" | `memory_search: pricing` | Just do it |
79
- | "Show me database features" | `memory_search: database + type=feature` | Just do it |
80
- | "What files have X?" | `context_search: X` | Just do it |
81
- | "Find code about Y" | `context_search: Y` | Just do it |
82
-
83
- **The user should NEVER have to type MCP tool names.** You detect the intent and invoke automatically.
84
-
85
- **Examples:**
86
-
87
- User: "What did we decide about Service Manager?"
88
- You: *silently calls `memory_search: "Service Manager decision"`*
89
- Then: "We decided that [results from memory]..."
90
-
91
- User: "When did we fix the PID bug?"
92
- You: *silently calls `memory_search: "PID bug" with type="fix"`*
93
- Then: "We fixed the PID bug on [date]: [details]..."
94
-
95
- User: "Search for pricing decisions"
96
- You: *silently calls `memory_search: "pricing" with type="decision"`*
97
- Then: "Found 2 pricing decisions: [results]..."
98
-
99
- **Tool Selection Logic:**
108
+ **ONLY AFTER completing all 5 steps**, respond to the user with the HUD output.
100
109
 
110
+ If you need to search for something specific later:
111
+ ```
112
+ Call: mcp__jfl-context__context_search with query="your search"
101
113
  ```
102
- if question contains ("decide", "decided", "choice", "why we"):
103
- → memory_search with type="decision"
104
114
 
105
- if question contains ("when did we", "implemented", "built", "added"):
106
- → memory_search with type="feature"
115
+ ## Session Management
107
116
 
108
- if question contains ("bug", "fix", "error"):
109
- → memory_search with type="fix"
117
+ JFL automatically manages session isolation. You don't need to worry about worktrees or CD commands - it's handled for you.
110
118
 
111
- if question contains ("learn", "insight", "discovery"):
112
- → memory_search (check learned field)
119
+ ### How It Works
113
120
 
114
- if question about "files" or "code":
115
- context_search
121
+ - **Single session**: You work directly on your branch (simple, fast)
122
+ - **Multiple sessions**: JFL creates isolated worktrees automatically (prevents conflicts)
123
+ - **Auto-commit**: Work is saved every 2 minutes (prevents data loss)
124
+ - **Auto-merge**: When you finish, work merges to your working branch automatically
116
125
 
117
- if question about "current" or "now":
118
- → context_get
126
+ ### Session Branch
119
127
 
120
- else:
121
- → memory_search (general - hybrid search finds relevant)
122
- ```
128
+ Sessions branch from your working branch (default: `main`, configurable in `.jfl/config.json`):
123
129
 
124
- ### CRITICAL: Verify Session Branch
130
+ ```json
131
+ {
132
+ "working_branch": "develop"
133
+ }
134
+ ```
125
135
 
126
- **After SessionStart hook runs, verify you're on the session branch.**
136
+ Session branches are named: `session-<user>-<date>-<time>-<random>`
127
137
 
128
- The hook creates a session branch and outputs:
129
- ```
130
- ═══════════════════════════════════════════════════════════
131
- Session: session-*
132
- ═══════════════════════════════════════════════════════════
133
- ```
138
+ ### Ending a Session
134
139
 
135
- **Verify you're on session branch:**
136
- ```bash
137
- git branch --show-current
138
- ```
140
+ When user says "done", "that's it", or "/end":
141
+ - Run the `/end` skill to clean up properly
142
+ - This commits, merges, and pushes your work
139
143
 
140
- Should show `session-*`, NOT `main`.
144
+ If session crashes, uncommitted work is auto-saved via background auto-commit.
141
145
 
142
146
  ---
143
147
 
@@ -239,14 +243,21 @@ GOOD entry (useful):
239
243
  }
240
244
  ```
241
245
 
242
- ### Per-Session Journal Files
246
+ ### Per-Branch Journal Files
247
+
248
+ **Journaling works on ANY branch** - sessions, main, feature branches, anywhere.
243
249
 
244
- Each session writes to its own file to avoid merge conflicts:
250
+ Each branch writes to its own file to avoid merge conflicts:
245
251
  ```
246
- .jfl/journal/<session-id>.jsonl
252
+ .jfl/journal/<branch-name>.jsonl
247
253
  ```
248
254
 
249
- The session ID comes from your git branch name (e.g., `session-goose-20260125-0240-bea0be`).
255
+ Examples:
256
+ - Session branch: `.jfl/journal/session-goose-20260125-0240-bea0be.jsonl`
257
+ - Main branch: `.jfl/journal/main.jsonl`
258
+ - Feature branch: `.jfl/journal/feature-auth.jsonl`
259
+
260
+ The hooks automatically use your current branch name (via `git branch --show-current`).
250
261
 
251
262
  ### When to Write (MANDATORY TRIGGERS)
252
263
 
@@ -372,99 +383,56 @@ cat .jfl/journal/session-goose-20260125-xxxx.jsonl
372
383
 
373
384
  ### Integration with Memory System
374
385
 
375
- **The memory system automatically indexes all journal entries for fast semantic search.**
376
-
377
- Every journal entry you write is indexed into `.jfl/memory.db` with:
378
- - TF-IDF tokens for fast keyword search
379
- - OpenAI embeddings for semantic understanding (if OPENAI_API_KEY is set)
380
- - Metadata extraction (files, decisions, learnings)
381
-
382
- **Using Memory via MCP Tools:**
383
-
384
- When the user asks questions about past work, use the MCP tools:
385
-
386
- ```
387
- # Search for past decisions, features, or learnings
388
- Call: mcp__jfl-context__memory_search with query="pricing decision"
389
- Call: mcp__jfl-context__memory_search with query="Service Manager features" and type="feature"
390
- Call: mcp__jfl-context__memory_search with query="what did we decide about X" and maxItems=5
391
-
392
- # Get memory system status
393
- Call: mcp__jfl-context__memory_status
394
-
395
- # Add a manual memory/note
396
- Call: mcp__jfl-context__memory_add with title="Important insight" and content="..."
397
- ```
398
-
399
- **Available MCP Tools:**
400
-
401
- 1. **`memory_search`** - Search indexed journal entries
402
- - `query` (required): Search query
403
- - `type` (optional): Filter by type (feature, fix, decision, discovery, milestone)
404
- - `maxItems` (optional): Max results (default: 10)
405
- - `since` (optional): ISO date - only entries after this date
406
-
407
- 2. **`memory_status`** - Get memory system statistics
408
- - Returns: total memories, by type, date range, embedding status
409
-
410
- 3. **`memory_add`** - Manually add a memory
411
- - `title` (required): Short title
412
- - `content` (required): Full content
413
- - `tags` (optional): Array of tags
414
-
415
- **When to Use Memory Search:**
416
-
417
- Use `memory_search` when the user asks:
418
- - "What did we decide about X?"
419
- - "When did we implement Y?"
420
- - "Search for past work on Z"
421
- - "What decisions were made about pricing?"
422
- - "Show me features related to database"
423
-
424
- **Search Quality:**
386
+ The memory pipeline indexes `.jfl/journal/` automatically. Entries become searchable via:
387
+ - Memory semantic search
388
+ - PageIndex tree queries ("when did we decide X?")
389
+ - HUD recent work display
425
390
 
426
- The hybrid search combines:
427
- - **TF-IDF** (fast, keyword-based) - weighted 40%
428
- - **Embeddings** (semantic, contextual) - weighted 60%
429
-
430
- Results are scored by relevance (high/medium/low) with boosting for:
431
- - Recent entries (1.3x if < 7 days old)
432
- - Decisions (1.4x multiplier)
433
- - Features (1.2x multiplier)
391
+ ---
434
392
 
435
- **Automatic Indexing:**
393
+ ## CRITICAL: Synopsis Command (What Happened?)
436
394
 
437
- - Runs on Context Hub startup
438
- - Scans for new entries every 60 seconds
439
- - No manual reindexing needed
395
+ **When anyone asks "what happened?" or "what did X work on?" use the synopsis command.**
440
396
 
441
- **If Memory Not Initialized:**
397
+ This is the STANDARDIZED way to get work summaries. Don't manually string together git log, journal files, etc. Use this:
442
398
 
443
- The doctor script will warn and can auto-fix:
444
399
  ```bash
445
- ./scripts/session/jfl-doctor.sh --fix
446
- ```
400
+ # From project root:
401
+ cd product/packages/memory && node dist/journal/cli.js synopsis [hours] [author]
447
402
 
448
- Or manually initialize:
449
- ```bash
450
- jfl memory init
403
+ # Examples:
404
+ node dist/journal/cli.js synopsis 24 # Last 24 hours, all team
405
+ node dist/journal/cli.js synopsis 8 # Last 8 hours
406
+ node dist/journal/cli.js synopsis 24 hathbanger # What did hath do in 24 hours
407
+ node dist/journal/cli.js synopsis --author "Andrew" # Filter by git author name
451
408
  ```
452
409
 
453
- ---
410
+ ### What It Returns
454
411
 
455
- ## CRITICAL: Synopsis Command (What Happened?)
412
+ The synopsis aggregates:
413
+ 1. **Journal entries** from all sessions/worktrees
414
+ 2. **Git commits** from all branches
415
+ 3. **File headers** (@purpose, @spec, @decision tags)
416
+ 4. **Time audit** with category breakdown and multipliers
456
417
 
457
- **When anyone asks "what happened?" use synopsis:**
418
+ Output includes:
419
+ - Summary of work done (features, fixes, decisions)
420
+ - Time audit breakdown (infra vs features vs docs vs content)
421
+ - Per-team-member contribution
422
+ - Health checks (too much infra? not enough outreach?)
423
+ - Next steps from journal entries
424
+ - Incomplete/stubbed items
458
425
 
459
- ```bash
460
- cd product/packages/memory && node dist/journal/cli.js synopsis [hours] [author]
426
+ ### When to Use
461
427
 
462
- # Examples:
463
- node dist/journal/cli.js synopsis 24 # Last 24 hours
464
- node dist/journal/cli.js synopsis 24 hathbanger # Specific author
465
- ```
428
+ | Question | Command |
429
+ |----------|---------|
430
+ | "What happened today?" | `synopsis 24` |
431
+ | "What did Hath work on?" | `synopsis 48 hathbanger` |
432
+ | "What happened this week?" | `synopsis 168` |
433
+ | "Give me a status update" | `synopsis 24 --verbose` |
466
434
 
467
- Aggregates journal entries, git commits, file headers, and time audit with category breakdown.
435
+ **IMPORTANT:** Every AI should use this exact command. Do NOT try to manually piece together journal + commits + headers yourself. The synopsis command does it correctly every time.
468
436
 
469
437
  ---
470
438
 
@@ -572,6 +540,130 @@ your-product-repo/ ← SEPARATE REPO (all code lives here)
572
540
 
573
541
  ---
574
542
 
543
+ ## Contributor Setup (For JFL Developers Only)
544
+
545
+ > **Note:** This section is for people contributing to the JFL project itself.
546
+ > If you're a JFL user building your own product, skip this - you installed `jfl` from npm and it just works.
547
+
548
+ If you're contributing to JFL itself, follow this setup:
549
+
550
+ ### 1. Clone through a GTM (Recommended)
551
+
552
+ ```bash
553
+ # Create a GTM workspace
554
+ jfl init my-jfl-gtm
555
+
556
+ # During setup, add the JFL product repo as submodule:
557
+ # - Choose "Building a product"
558
+ # - Enter: https://github.com/402goose/just-fucking-launch.git
559
+ ```
560
+
561
+ ### 2. Run the dev setup script
562
+
563
+ ```bash
564
+ cd my-jfl-gtm/product
565
+ ./scripts/dev-setup.sh
566
+ ```
567
+
568
+ This will:
569
+ - Install CLI dependencies
570
+ - Link `jfl` globally from this location
571
+ - Verify everything is working
572
+
573
+ ### 3. Work in the submodule
574
+
575
+ All product code changes happen in `product/`:
576
+
577
+ ```bash
578
+ # Make changes in product/
579
+ cd product/
580
+ # ... work on code ...
581
+
582
+ # Commit to product repo
583
+ git add . && git commit -m "feature: ..." && git push
584
+
585
+ # Update GTM's reference (optional, for tracking)
586
+ cd ..
587
+ git add product && git commit -m "Update product submodule"
588
+ ```
589
+
590
+ ### Why This Matters
591
+
592
+ - **Single source of truth**: The `jfl` command points to your local jfl-cli clone
593
+ - **No sync issues**: You're not juggling multiple clones
594
+ - **GTM context available**: While building, you have the full GTM toolkit
595
+ - **Clean commits**: Product commits go to product repo, GTM commits go to GTM repo
596
+
597
+ ### CLI Location
598
+
599
+ The CLI is located at your jfl-cli clone (the parent directory of this GTM workspace).
600
+
601
+ To re-link after changes:
602
+
603
+ ```bash
604
+ # Navigate to your jfl-cli directory
605
+ cd "$(git rev-parse --show-toplevel)"
606
+ yarn build
607
+ npm link
608
+ ```
609
+
610
+ ### 4. Development Guidelines
611
+
612
+ **NEVER hardcode user-specific paths in scripts or code.**
613
+
614
+ This causes failures for other team members and creates bad UX if accidentally distributed.
615
+
616
+ **DON'T:**
617
+ ```bash
618
+ WHISPER_SERVER="/Users/alectaggart/CascadeProjects/..."
619
+ PROJECT_PATH="/Users/andrewhathaway/code/..."
620
+ ```
621
+
622
+ **DO:**
623
+ ```bash
624
+ # Use relative paths from script location
625
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
626
+ PROJECT_ROOT="$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel)"
627
+
628
+ # Use environment variables with sensible defaults
629
+ WHISPER_SERVER="${WHISPER_SERVER_PATH:-$PROJECT_ROOT/../jfl-platform/packages/whisper-server/build/whisper-stream-server}"
630
+
631
+ # Auto-detect with clear error messages
632
+ POSSIBLE_PATHS=(
633
+ "$PROJECT_ROOT/../jfl-platform/..."
634
+ "$HOME/code/goose/jfl/jfl-platform/..."
635
+ )
636
+
637
+ for path in "${POSSIBLE_PATHS[@]}"; do
638
+ if [[ -x "$path" ]]; then
639
+ WHISPER_SERVER="$path"
640
+ break
641
+ fi
642
+ done
643
+
644
+ if [[ -z "$WHISPER_SERVER" ]]; then
645
+ echo "Error: Whisper server not found."
646
+ echo "Set WHISPER_SERVER_PATH or ensure jfl-platform is at ../jfl-platform"
647
+ exit 1
648
+ fi
649
+ ```
650
+
651
+ **Path resolution best practices:**
652
+ - Compute paths relative to `__dirname` or `import.meta.url` in TypeScript/JavaScript
653
+ - Use `git rev-parse --show-toplevel` to find repo root in bash scripts
654
+ - Provide environment variable overrides for flexibility
655
+ - Show helpful error messages listing what was tried
656
+ - Test scripts on a different machine/user before committing
657
+
658
+ **Before committing scripts:**
659
+ ```bash
660
+ # Check for hardcoded paths
661
+ grep -r "Users/alectaggart\|Users/andrewhathaway" scripts/ | grep -v "## Example\|# DON'T"
662
+ # Should return nothing (except documentation examples)
663
+ ```
664
+
665
+ ---
666
+
575
667
  ## Understanding the Project Setup
576
668
 
577
669
  **Before doing any work, understand the setup:**
@@ -640,40 +732,236 @@ Once you understand their setup, save it:
640
732
 
641
733
  ## Working Modes
642
734
 
643
- | Mode | Structure | Behavior |
644
- |------|-----------|----------|
645
- | **Building Product** | `product/` submodule product repo | Code to `product/`, GTM to main repo. Commit to submodule first, then update reference. |
646
- | **GTM Only** | No code, just `knowledge/`, `content/` | Focus on content/brand/outreach. Never suggest code changes. |
647
- | **Contributor** | Has `suggestions/{name}.md` | Work within scope. Route suggestions through proper channels. |
735
+ ### Mode: Building Product
736
+
737
+ You're building the product. Code lives in the product repo (linked as submodule).
738
+
739
+ ```
740
+ this-gtm/ your-product-repo/
741
+ ├── product/ ──────────────→ ├── src/
742
+ ├── knowledge/ ├── cli/
743
+ ├── content/ ├── platform/
744
+ ├── suggestions/ └── package.json
745
+ └── CLAUDE.md
746
+ ```
747
+
748
+ **Behavior:**
749
+ - Code changes go to `product/` (commits to product repo)
750
+ - GTM changes (knowledge/, content/) stay in GTM repo
751
+ - When editing code, you're in the submodule context
752
+ - `git push` from `product/` pushes to product repo
753
+
754
+ **IMPORTANT - Code Routing:**
755
+ ```bash
756
+ # When you make code changes:
757
+ cd product/
758
+ git add . && git commit -m "feature: ..." && git push
759
+ cd ..
760
+ git add product && git commit -m "Update product submodule"
761
+ ```
762
+
763
+ If someone tries to create code files outside `product/`, warn:
764
+ ```
765
+ This looks like product code, but you're in the GTM repo.
766
+ Product code should go in the product/ submodule.
767
+ Want me to create this in product/ instead?
768
+ ```
769
+
770
+ ### Mode: GTM Only
648
771
 
649
- **Detecting mode changes:**
650
- - "I need to update the code" → Add product submodule if missing
651
- - "I'm taking over the product" → Switch to building-product mode
652
- - Update `.jfl/config.json` when mode changes
772
+ They don't touch code. Team handles product.
773
+
774
+ ```
775
+ this-repo/
776
+ ├── knowledge/ ← Strategic context
777
+ ├── content/ ← What they create
778
+ ├── product/SPEC.md ← Reference from team
779
+ └── (no code)
780
+ ```
781
+
782
+ **Behavior:**
783
+ - Never suggest code changes
784
+ - Focus on content, brand, outreach
785
+ - Reference spec but don't modify product
786
+ - Capture feedback for product team in suggestions/
787
+
788
+ ### Mode: Contributor
789
+
790
+ They have a piece of the work. Team gave them context.
791
+
792
+ ```
793
+ this-repo/
794
+ ├── product/SPEC.md ← From team
795
+ ├── knowledge/BRAND*.md ← Guidelines
796
+ └── their-work/ ← What they're doing
797
+ ```
798
+
799
+ **Behavior:**
800
+ - Work within their scope
801
+ - Don't change shared docs without flagging
802
+ - Route suggestions through proper channels
803
+ - Ask: "Should I update the spec or suggest this to the team?"
804
+
805
+ ---
806
+
807
+ ## Detecting Mode Changes
808
+
809
+ People's roles evolve. Watch for signals:
810
+
811
+ | Signal | What It Means |
812
+ |--------|---------------|
813
+ | "I need to update the code" | They need product repo access - add submodule if not present |
814
+ | "The team changed the spec" | Pull latest in product submodule |
815
+ | "I'm taking over the product" | Mode change: GTM-only → building-product (add submodule) |
816
+ | "Someone else is handling X now" | Scope narrowing, might become GTM-only |
817
+
818
+ When mode changes, update `.jfl/config.json` and confirm:
819
+ ```
820
+ Sounds like you're now handling the product directly.
821
+ Do you have a product repo? I'll add it as a submodule at product/
822
+ ```
823
+
824
+ **Adding a product repo to existing GTM:**
825
+ ```bash
826
+ git submodule add <product-repo-url> product
827
+ git commit -m "Add product submodule"
828
+ ```
653
829
 
654
830
  ---
655
831
 
656
832
  ## Starting a New Project (Foundation Empty)
657
833
 
658
- When knowledge docs are empty, pull them through foundation in order. Don't ask open-ended "What do you want to build?"
834
+ When knowledge docs are templates/empty, don't ask open-ended questions like "What do you want to build?"
835
+
836
+ **First, understand who you're talking to:**
837
+
838
+ ```
839
+ Before we dive in - what's your role?
840
+
841
+ 1. Founder (I'm building this thing)
842
+ 2. Developer (I'm building FOR someone)
843
+ 3. Marketing/Content (I'm telling the story)
844
+ 4. Sales/BD (I'm selling it)
845
+ 5. Product (I'm defining what we build)
846
+ 6. Other
847
+ ```
848
+
849
+ **Adjust based on role:**
850
+
851
+ | Role | Focus On | Don't Ask About |
852
+ |------|----------|-----------------|
853
+ | Non-technical founder | Vision, market, customers | Stack, architecture |
854
+ | Technical founder | Everything | Nothing - they can handle it |
855
+ | Developer | Implementation, specs | Business model, pricing |
856
+ | Marketing | Brand, messaging, content | Technical details |
857
+ | Sales | Pitch, objections, CRM | Code |
858
+ | Product | Features, roadmap, users | Implementation details |
859
+
860
+ **Then pull them through foundation:**
861
+
862
+ ```
863
+ Got it. Let's get your foundation set up.
864
+
865
+ What are you building and who is it for?
866
+ (2-3 sentences is fine. Send me anything - docs,
867
+ screenshots, voice notes - I'll process it.)
868
+ ```
869
+
870
+ For non-technical people, don't ask:
871
+ - "What's the stack?"
872
+ - "Next.js or something else?"
873
+ - Technical architecture questions
874
+
875
+ Instead: "I'll handle the technical side. You focus on the vision and who you're building for."
876
+
877
+ When they answer, **write it to the file immediately**:
659
878
 
660
- **Foundation checklist:**
879
+ ```python
880
+ # Update knowledge/VISION.md with what they said
881
+ # Replace placeholder content with real content
882
+ # Keep Status: EMERGENT until they explicitly nail it
883
+ ```
884
+
885
+ Then continue:
886
+
887
+ ```
888
+ Got it - saved to your VISION.md.
889
+
890
+ Next - when do you want to ship? Any key milestones?
891
+ ```
661
892
 
662
- 1. **VISION.md** - What are you building? Who is it for? What problem does it solve? One-liner?
663
- 2. **ROADMAP.md** - When do you want to ship? MVP? Phases? Hard deadlines?
664
- 3. **NARRATIVE.md** - Casual pitch? Before/after? Key words? Emotional hook?
665
- 4. **THESIS.md** - Why will YOU win? What insight? Unfair advantage? Why now?
893
+ **How to detect template vs filled:**
894
+ - Check for "Status: EMERGENT" with empty "The Vision" section
895
+ - Check for placeholder text like "{fill this in}"
896
+ - If real content exists, it's been filled
666
897
 
667
- **Key principles:**
668
- - Ask role-specific questions (don't ask non-technical founders about stack)
669
- - Write to files immediately as they answer
670
- - Provide examples/suggestions to guide them
671
- - Allow "emergent" status - vision clarifies through building
672
- - Don't skip docs - complete all four before building
898
+ **Pull them through each doc in order. Don't skip. Don't ask open-ended "what do you want to do?"**
899
+
900
+ ### VISION.md Questions:
901
+ Even if vision is "emergent", capture what they have. It evolves through building.
902
+ ```
903
+ 1. What are you building? (2-3 sentences, doesn't need to be perfect)
904
+ 2. Who is it for? (specific person, not "everyone")
905
+ 3. What problem does it solve for them?
906
+ 4. If it works perfectly, what does their life look like?
907
+ 5. What's your rough one-liner? (we can refine it later)
908
+ ```
909
+ Don't let them skip because "I haven't figured it out yet." Get SOMETHING down. It'll sharpen through building.
910
+
911
+ **For each question:**
912
+ - Give examples/suggestions based on what you know about their project
913
+ - Always offer an out: "Or if you're not sure, we can keep going and let it emerge"
914
+
915
+ Example:
916
+ ```
917
+ What's your rough one-liner?
673
918
 
674
- **After foundation:**
675
- - Check if ALL FOUR docs have real content (not templates)
676
- - Then ask: "Foundation is set. Want to work on brand/design next, or jump into building?"
919
+ Some options based on what you've told me:
920
+ - "Legal docs for founders, without the lawyer"
921
+ - "Spin up contracts in minutes, not days"
922
+ - "Your startup's legal co-pilot"
923
+
924
+ Or not sure yet? That's fine - we can refine it as we build.
925
+ ```
926
+
927
+ ### ROADMAP.md Questions:
928
+ ```
929
+ 1. When do you want to ship? (date)
930
+ 2. What's the first thing that needs to work? (MVP)
931
+ 3. What are the phases? (usually: foundation → MVP → launch → iterate)
932
+ 4. Any hard deadlines? (demo day, funding, announcement)
933
+ ```
934
+
935
+ ### NARRATIVE.md Questions:
936
+ ```
937
+ 1. How would you explain this at a party? (casual pitch)
938
+ 2. What's the before/after? (their life before vs after)
939
+ 3. What words do you want associated with this? (3-5 words)
940
+ 4. What's the emotional hook? (fear, aspiration, frustration, hope)
941
+ ```
942
+
943
+ ### THESIS.md Questions:
944
+ ```
945
+ 1. Why will YOU win? (not just anyone - you specifically)
946
+ 2. What do you know that others don't? (insight)
947
+ 3. What's your unfair advantage? (skills, access, timing)
948
+ 4. Why now? (what changed that makes this possible/needed)
949
+ ```
950
+
951
+ ### BRAND Questions (after foundation):
952
+ ```
953
+ 1. What's the vibe? (professional, playful, bold, minimal, techy, human)
954
+ 2. Any brands you admire the look of?
955
+ 3. Colors that feel right? Or colors to avoid?
956
+ 4. Any existing assets? (logo, colors already chosen)
957
+ ```
958
+
959
+ **Flow:**
960
+ 1. VISION → ROADMAP → NARRATIVE → THESIS (don't skip ANY)
961
+ 2. Check ALL FOUR before moving on
962
+ 3. Then ask: "Foundation is set. Want to work on brand/design next, or jump into building?"
963
+ 4. Write to each file as you go. Don't wait.
964
+ 5. After each doc, summarize what you captured and confirm.
677
965
 
678
966
  ---
679
967
 
@@ -681,67 +969,270 @@ When knowledge docs are empty, pull them through foundation in order. Don't ask
681
969
 
682
970
  **⚠️ ALWAYS establish brand direction before writing UI code**
683
971
 
684
- **Check for brand decisions:**
685
- 1. `knowledge/BRAND_DECISIONS.md` - finalized choices
686
- 2. `knowledge/BRAND_BRIEF.md` - brand inputs
687
- 3. `knowledge/VOICE_AND_TONE.md` - personality/feel
972
+ Before writing ANY code with visual elements (React, HTML, CSS, landing pages, forms, etc.):
973
+
974
+ **1. Check for explicit brand decisions (in order):**
975
+ ```
976
+ 1. knowledge/BRAND_DECISIONS.md - finalized choices
977
+ 2. knowledge/BRAND_BRIEF.md - brand inputs
978
+ 3. knowledge/VOICE_AND_TONE.md - personality/feel
979
+ ```
980
+
981
+ **2. If no explicit brand docs, INFER from foundation:**
982
+ ```
983
+ Read NARRATIVE.md and VISION.md to extract:
984
+ - Tone: Is it serious? Playful? Bold? Minimal?
985
+ - Audience: Who is this for? What do they expect?
986
+ - Positioning: Premium? Accessible? Techy? Human?
987
+
988
+ Example:
989
+ - "Legal docs for founders" → Professional but approachable, not stuffy
990
+ - "Self-serve" → Clean, simple, minimal friction
991
+ - Founders as audience → Modern, fast, no-nonsense
992
+ ```
993
+
994
+ **3. Confirm your inference and gather references:**
995
+ ```
996
+ Based on your vision and narrative, I'm thinking:
997
+ - Vibe: Professional but approachable (not corporate stuffy)
998
+ - Mode: Light (cleaner for legal docs)
999
+ - Colors: Neutral with one accent (trustworthy, not flashy)
1000
+
1001
+ Sound right? Or different direction?
1002
+
1003
+ Also - any sites or products you like the look/feel of?
1004
+ Drop a link or screenshot and I'll match that vibe.
1005
+ ```
1006
+
1007
+ **References to gather:**
1008
+ - **Aesthetic references:** "Any sites whose design you love?"
1009
+ - **Functional references:** "Any products that do something similar well?"
1010
+ - **Anti-references:** "Anything you've seen that you hate?"
1011
+
1012
+ Store references in `references/` folder or note links in `product/SPEC.md` under a References section.
1013
+
1014
+ If they share a link, fetch it and extract:
1015
+ - Color palette
1016
+ - Typography style
1017
+ - Layout patterns
1018
+ - Component patterns
1019
+ - Overall vibe
688
1020
 
689
- **If no explicit brand docs, INFER from foundation:**
690
- - Read NARRATIVE.md and VISION.md
691
- - Extract tone, audience, positioning
692
- - Propose direction and confirm
1021
+ **If fetch is blocked (403, timeout, etc.):**
1022
+ ```
1023
+ That site blocked my request.
1024
+
1025
+ Can you screenshot it? Or use Claude Chrome to fetch it -
1026
+ it can navigate there directly.
1027
+ ```
693
1028
 
694
- **Gather references:**
695
- - Aesthetic refs: Sites they like
696
- - Functional refs: Similar products done well
697
- - Anti-refs: What to avoid
698
- - Store in `references/` or note in `product/SPEC.md`
1029
+ If they share a screenshot, analyze it for the same.
699
1030
 
700
- **NEVER:**
701
- - Use another project's styling as default
1031
+ **4. Use the right tools to build:**
1032
+ - Run `/ui-skills` for opinionated UI constraints
1033
+ - Run `/web-interface-guidelines` for Vercel design patterns
1034
+ - Run `/rams` for accessibility review after building
1035
+
1036
+ **5. NEVER do these:**
1037
+ - Use another project's styling as a default
702
1038
  - Assume dark theme without reason
703
- - Pick random colors without basis
1039
+ - Pick random colors (green, purple, etc.) without basis
704
1040
  - Build UI "to get started" and "refine later"
705
1041
 
706
- Brand direction exists in foundation docs. Extract it, confirm it, build with intention.
1042
+ **If they say "just build something":**
1043
+ ```
1044
+ Let me infer from your docs...
1045
+
1046
+ [Read NARRATIVE + VISION, propose direction, confirm]
1047
+ ```
1048
+
1049
+ **Why this matters:** Brand direction exists in the foundation docs even if not explicit. Extract it, confirm it, then build with intention.
707
1050
 
708
1051
  ---
709
1052
 
710
1053
  ## Product Specs: The Living Build Document
711
1054
 
712
- When building a product, maintain `product/SPEC.md` as the source of truth for implementation.
1055
+ When building a product (not just content or brand work), maintain a product spec.
1056
+
1057
+ **1. Check for existing spec:**
1058
+ ```
1059
+ product/SPEC.md - main product spec
1060
+ product/[feature].md - feature-specific specs
1061
+ ```
1062
+
1063
+ **2. If no spec exists and they're building product, create one:**
1064
+
1065
+ ```markdown
1066
+ # [Product Name] - Spec
1067
+
1068
+ ## What We're Building
1069
+ {2-3 sentences - what is this?}
1070
+
1071
+ ## Who It's For
1072
+ {specific user, not "everyone"}
1073
+
1074
+ ## Core Features
1075
+ | Feature | Status | Notes |
1076
+ |---------|--------|-------|
1077
+ | {feature} | planned/building/done | |
1078
+
1079
+ ## Tech Stack
1080
+ {what we're using to build it}
713
1081
 
714
- **Template sections:** What We're Building | Who It's For | Core Features (table) | Tech Stack | Current Focus | Decisions Made (table) | Open Questions | References (table)
1082
+ ## Current Focus
1083
+ {what we're working on right now}
715
1084
 
716
- See `templates/` folder for full spec template.
1085
+ ## Decisions Made
1086
+ | Decision | Choice | Why | Date |
1087
+ |----------|--------|-----|------|
1088
+ | {decision} | {choice} | {reasoning} | |
717
1089
 
718
- **When to use:**
719
- - Before starting: Read spec for decisions already made
720
- - While building: Update feature status, add decisions, note questions
721
- - After building: Mark features done, document tech choices
1090
+ ## Open Questions
1091
+ - {things we haven't figured out yet}
722
1092
 
723
- **Spec vs Foundation:**
1093
+ ## References
1094
+ | Type | Name | Link/Note | What We Like |
1095
+ |------|------|-----------|--------------|
1096
+ | aesthetic | {site} | {url} | {what to copy} |
1097
+ | functional | {product} | {url} | {feature to emulate} |
1098
+ | anti | {site} | {url} | {what to avoid} |
1099
+ ```
1100
+
1101
+ **3. Reference the spec when building:**
1102
+ - Before starting work, read `product/SPEC.md`
1103
+ - Check what's already been decided
1104
+ - Check current focus and priorities
1105
+ - Don't re-ask questions that have answers in the spec
1106
+
1107
+ **4. Update the spec as you build:**
1108
+ - Feature completed? Update status to `done`
1109
+ - Made a decision? Add to Decisions table
1110
+ - Scope changed? Update Core Features
1111
+ - New questions? Add to Open Questions
1112
+ - Tech choice made? Update Tech Stack
1113
+
1114
+ **5. Spec vs Foundation docs:**
724
1115
  | Doc | Purpose | Updates |
725
1116
  |-----|---------|---------|
726
- | VISION.md | Why we're building | Rarely |
727
- | NARRATIVE.md | How we talk about it | Evolves |
728
- | product/SPEC.md | What we're building | Every session |
1117
+ | VISION.md | Why we're building | Rarely changes |
1118
+ | NARRATIVE.md | How we talk about it | Evolves with positioning |
1119
+ | product/SPEC.md | What we're building | Updates every session |
1120
+
1121
+ The spec is the source of truth for implementation. Keep it current.
1122
+
1123
+ **Example flow:**
1124
+ ```
1125
+ User: "Let's build the contract generator"
1126
+
1127
+ Claude: *reads product/SPEC.md*
1128
+ "Picking up from the spec - we have the basic form done,
1129
+ next up is the PDF export. The spec says we're using
1130
+ @react-pdf/renderer. Want to continue there?"
1131
+
1132
+ *after building*
1133
+ Claude: *updates product/SPEC.md*
1134
+ - PDF export: done
1135
+ - Added decision: "PDF styling matches brand colors"
1136
+ ```
1137
+
1138
+ **IMPORTANT: Don't skip to "what do you want to work on?" until foundation is COMPLETE.**
1139
+
1140
+ Before showing status/HUD or asking what to build, check:
1141
+ ```
1142
+ VISION.md - has real content? (not just template)
1143
+ ROADMAP.md - has dates and phases?
1144
+ NARRATIVE.md - has story/messaging?
1145
+ THESIS.md - has why you'll win?
1146
+ ```
1147
+
1148
+ If ANY are missing, say:
1149
+ ```
1150
+ "Before we dive in, let's finish your foundation.
1151
+ We have VISION and ROADMAP, but still need NARRATIVE and THESIS.
1152
+ These are quick - let me walk you through them."
1153
+ ```
1154
+
1155
+ Then complete the missing docs. THEN show status and ask what to build.
1156
+
1157
+ **Date handling:**
1158
+ When someone gives a date without a year (e.g., "Jan 30"):
1159
+ - If that date has passed this year → assume NEXT year
1160
+ - If that date hasn't happened yet → assume THIS year
1161
+ - Always confirm: "Jan 30, 2026 - that's X days from now. Sound right?"
1162
+
1163
+ Never assume a past date for a launch/ship date. People don't ship in the past.
1164
+
1165
+ **Then gather build context:**
1166
+
1167
+ ```
1168
+ Foundation is set. Before we build:
729
1169
 
730
- **Before building, ensure foundation is complete:**
731
- - Check VISION.md, ROADMAP.md, NARRATIVE.md, THESIS.md all have real content
732
- - If any are missing, complete them first before asking "what to build?"
733
- - Date handling: Dates without year assume future (next year if passed this year)
1170
+ 1. Any existing repos or code to build on?
1171
+ 2. References or examples you like?
1172
+ 3. [Specific question based on what they're building]
1173
+ ```
1174
+
1175
+ If they have repos/references:
1176
+ - Add as submodules: `git submodule add <url> references/<name>`
1177
+ - Or clone to `references/` folder
1178
+ - Now you have context to build smarter
1179
+
1180
+ **Check for GitHub remote:**
1181
+ ```bash
1182
+ git remote -v
1183
+ ```
1184
+
1185
+ If no remote configured, offer to create one:
1186
+ ```
1187
+ No GitHub repo yet. Want me to create one?
1188
+
1189
+ I can run:
1190
+ gh repo create [name] --private --source=. --push
1191
+
1192
+ Just let me know the name (and if you want it public or private).
1193
+ ```
1194
+
1195
+ This uses their local `gh` CLI - no platform account needed.
734
1196
 
735
1197
  ---
736
1198
 
737
1199
  ## Session Feedback
738
1200
 
739
- Every few sessions, ask: "How's JFL doing this session? (0-5)"
1201
+ Every few sessions (or at natural breakpoints), ask:
1202
+
1203
+ ```
1204
+ Quick check - how's JFL doing this session? (0-5)
1205
+
1206
+ 0 = broken/frustrating
1207
+ 3 = fine
1208
+ 5 = amazing
1209
+ ```
1210
+
1211
+ **If 0-2 (bad):**
1212
+ ```
1213
+ Sorry to hear that. What went wrong?
1214
+ (I'll log this to help improve JFL)
1215
+ ```
740
1216
 
741
- - **0-2:** Ask what went wrong, log to `.jfl/feedback.jsonl` with details
742
- - **3-5:** Log rating only
1217
+ Capture to `.jfl/feedback.jsonl`:
1218
+ ```json
1219
+ {"date": "2024-01-18", "rating": 1, "issue": "kept asking open-ended questions", "session_context": "onboarding new project"}
1220
+ ```
743
1221
 
744
- Don't ask every session - maybe every 3rd or after major milestones.
1222
+ **If 3-5 (ok/good):**
1223
+ ```
1224
+ Thanks! Keep shipping.
1225
+ ```
1226
+
1227
+ Just log the rating:
1228
+ ```json
1229
+ {"date": "2024-01-18", "rating": 5}
1230
+ ```
1231
+
1232
+ **For paid users:** Offer to share feedback with JFL team to improve the product.
1233
+ **For free users:** Stays local unless they opt-in.
1234
+
1235
+ Don't ask every session - maybe every 3rd session or after major milestones.
745
1236
 
746
1237
  Then:
747
1238
  1. Get right into building
@@ -753,15 +1244,45 @@ Then:
753
1244
 
754
1245
  ## After Planning
755
1246
 
756
- Before building, ask clarifying questions:
757
- 1. Specific question about their use case
758
- 2. Question about scope/priorities
759
- 3. Question about integrations/APIs
1247
+ If you make a plan (architecture, skill design, etc.), don't just ask "want me to build it?"
1248
+
1249
+ **Stop and ask clarifying questions first:**
1250
+
1251
+ ```
1252
+ Before I build this:
1253
+
1254
+ 1. [Specific question about their use case]
1255
+ 2. [Question about scope/priorities]
1256
+ 3. [Question about integrations/APIs]
760
1257
  4. Any references or examples to pull in?
1258
+ ```
1259
+
1260
+ **Also check the foundational docs.** If VISION.md, ROADMAP.md, etc. are empty, offer to capture what you've learned:
1261
+
1262
+ ```
1263
+ Also - your VISION.md is empty. Based on what you said,
1264
+ you're building [summary]. Want me to capture that so
1265
+ we have context for future sessions?
1266
+ ```
761
1267
 
762
- If foundation docs are empty, offer to capture what you learned into VISION.md, ROADMAP.md, etc.
1268
+ This way the docs get populated naturally through building, not through forms.
763
1269
 
764
- Accept any format: pictures, documents, voice notes, links, stream of consciousness.
1270
+ **Make it easy to share context:**
1271
+
1272
+ ```
1273
+ I'll help you work through this. Send me anything:
1274
+ - Pictures, screenshots
1275
+ - Documents, PDFs
1276
+ - Voice notes, transcripts
1277
+ - Links, references
1278
+ - Stream of consciousness
1279
+
1280
+ I'll process it and pull out what matters.
1281
+ ```
1282
+
1283
+ Don't make them structure their thoughts. Meet them where they are.
1284
+
1285
+ The plan is a draft. Refine it with them before executing. They know things you don't.
765
1286
 
766
1287
  ---
767
1288
 
@@ -814,38 +1335,121 @@ Run `/hud` to show the project dashboard.
814
1335
 
815
1336
  ## Team Configuration
816
1337
 
817
- **Owner** (full edit access - must authenticate via `jfl login`):
818
- - **Name:** {owner_name}
819
- - **GitHub Username:** {owner_github_username}
820
- - **x402 Address:** {owner_wallet_address}
1338
+ > Edit this section with your team. **JFL auth identity must match to get access.**
1339
+
1340
+ ### Owner
1341
+ <!-- The person who can edit all files directly -->
1342
+ <!-- These identities get owner access when authenticated via jfl login -->
1343
+ **Name:** {owner_name}
1344
+ **GitHub Username:** {owner_github_username}
1345
+ **x402 Address:** {owner_wallet_address}
821
1346
 
822
- **Core Team** (authenticated access):
1347
+ ### Core Team
1348
+ <!-- People with deeper access - must be authenticated -->
823
1349
  | Name | GitHub Username | x402 Address | Role |
824
1350
  |------|-----------------|--------------|------|
825
1351
  | | | | |
826
1352
 
827
- **Contributors:** Identified by `suggestions/{name}.md` file. New users onboarded as contributors.
1353
+ ### Contributors
1354
+ <!-- Everyone else routes to suggestions -->
1355
+ Contributors are identified by their `suggestions/{name}.md` file.
1356
+ New authenticated users without a suggestions file get onboarded as contributors.
828
1357
 
829
1358
  ---
830
1359
 
831
1360
  ## Onboarding Flows
832
1361
 
833
- **New Contributor:** Orient → Profile → Assign
834
- 1. Explain VISION.md and NARRATIVE.md
835
- 2. Capture their strengths, role, time commitment in `suggestions/{name}.md`
836
- 3. Assign tasks from `knowledge/TASKS.md`
1362
+ ### New Contributor (First Time)
1363
+
1364
+ Walk them through step by step:
1365
+
1366
+ ```
1367
+ Welcome to {project_name}!
1368
+
1369
+ Let me get you oriented.
1370
+ ```
1371
+
1372
+ **Step 1: The Vision**
1373
+ Read `knowledge/VISION.md` and explain:
1374
+ - What you're building
1375
+ - Why it matters
1376
+ - Ask: "Does that make sense?"
1377
+
1378
+ **Step 2: The Narrative**
1379
+ Read `knowledge/NARRATIVE.md` and explain:
1380
+ - How you tell the story
1381
+ - Key messages
1382
+ - Ask: "How does that land?"
1383
+
1384
+ **Step 3: Their Profile**
1385
+ Ask:
1386
+ ```
1387
+ Tell me about you:
1388
+
1389
+ 1. What are your strengths? (Be specific)
1390
+ 2. What role do you see yourself playing?
1391
+ 3. How much time can you give? (hours/week)
1392
+ 4. Anything you're NOT good at?
1393
+ ```
1394
+
1395
+ Save to their `suggestions/{name}.md` under `## PROFILE`.
1396
+
1397
+ **Step 4: Assign Tasks**
1398
+ Show available tasks from `knowledge/TASKS.md` or `templates/collaboration/TASKS.md`.
1399
+
1400
+ ---
1401
+
1402
+ ### Returning Contributor (Been Gone > 7 days)
1403
+
1404
+ ```
1405
+ Hey {name}. Welcome back!
1406
+
1407
+ Since you were last here:
1408
+ {list updates from knowledge/UPDATES.md or recent changes}
1409
+
1410
+ You were working on:
1411
+ {from their suggestions file}
1412
+
1413
+ Ready to continue?
1414
+ ```
1415
+
1416
+ ---
1417
+
1418
+ ### Regular Return (< 7 days)
1419
+
1420
+ Keep it quick:
1421
+ ```
1422
+ Hey {name}. {X} days to launch.
837
1423
 
838
- **Returning (> 7 days):** Show updates since last visit, remind them what they were working on
1424
+ {Show /hud dashboard}
839
1425
 
840
- **Regular (< 7 days):** Show /hud dashboard, ask what to work on
1426
+ What do you want to work on?
1427
+ ```
841
1428
 
842
1429
  ---
843
1430
 
844
1431
  ## Knowledge Sources
845
1432
 
846
- **Check VISION.md status:** If `EMERGENT` → synthesize from living docs. If `DECLARED` → use declared vision.
1433
+ ### Understanding the Vision
1434
+
1435
+ **Check VISION.md status first:**
1436
+ - If `Status: EMERGENT` → Synthesize from living docs below
1437
+ - If `Status: DECLARED` → Use the declared vision, stop synthesizing
847
1438
 
848
- **When EMERGENT, synthesize from:** Product specs GTM strategy `content/articles/` `drafts/` CRM notes `knowledge/VISION.md`
1439
+ Vision is blurry at the start and gets teased out through product development. But at some point, the founder nails it.
1440
+
1441
+ **When EMERGENT**, synthesize understanding from living docs:
1442
+
1443
+ | Priority | Document | What It Tells You |
1444
+ |----------|----------|-------------------|
1445
+ | 1 | Product specs, if any | What you're actually building |
1446
+ | 2 | GTM strategy docs | Who you're targeting and why |
1447
+ | 3 | `content/articles/` | How you explain it to the world |
1448
+ | 4 | `drafts/` | Active pitches to real people |
1449
+ | 5 | CRM notes (`./crm prep [name]`) | What resonates with real people |
1450
+ | 6 | `knowledge/VISION.md` | Pointer doc + current synthesis |
1451
+
1452
+ When someone asks "what is this?", read the living docs and synthesize. The vision crystallizes through building and selling, not through declaration.
849
1453
 
850
1454
  ### Other Strategic Docs
851
1455
 
@@ -926,26 +1530,116 @@ Claude: "Nice! Marking complete.
926
1530
 
927
1531
  ## Skills Available
928
1532
 
929
- | Skill | Purpose | Key Commands |
930
- |-------|---------|--------------|
931
- | `/hud` | Project dashboard | `(default)` full dashboard, `--compact` one-line |
932
- | `/brand-architect` | Brand creation | `(default)` full workflow, `marks`, `colors` |
933
- | `/web-architect` | Asset implementation | `audit`, `implement all` |
934
- | `/content` | Content creation | `thread [topic]`, `post [topic]`, `article [topic]`, `one-pager [topic]` |
935
- | `/video` | Founder video scripts | `idea [topic]`, `script [topic]`, `hook [topic]`, `story [exp]`, `batch [theme]` |
936
- | `/startup` | Startup guidance | `(default)` assess stage, `next`, `validate [idea]`, `mvp [idea]`, `customers`, `launch` |
1533
+ ### /hud - Project Dashboard
1534
+
1535
+ Shows timeline, phases, tasks. See `skills/hud/SKILL.md`.
1536
+
1537
+ ```
1538
+ /hud # Full dashboard
1539
+ /hud --compact # One-line status
1540
+ ```
1541
+
1542
+ ### /brand-architect - Brand Creation
1543
+
1544
+ Generates marks, colors, typography. See `skills/brand-architect/SKILL.md`.
1545
+
1546
+ ```
1547
+ /brand-architect # Full workflow
1548
+ /brand-architect marks # Just marks
1549
+ /brand-architect colors # Just colors
1550
+ ```
1551
+
1552
+ ### /web-architect - Asset Implementation
1553
+
1554
+ Generates final assets. See `skills/web-architect/SKILL.md`.
1555
+
1556
+ ```
1557
+ /web-architect audit # Check completeness
1558
+ /web-architect implement all # Generate everything
1559
+ ```
1560
+
1561
+ ### /content - Content Creation
1562
+
1563
+ Generates threads, articles, one-pagers. See `skills/content-creator/SKILL.md`.
1564
+
1565
+ ```
1566
+ /content thread [topic] # Twitter thread
1567
+ /content post [topic] # Single post
1568
+ /content article [topic] # Long-form
1569
+ /content one-pager [topic] # Print-ready summary
1570
+ ```
1571
+
1572
+ ### /video - Founder Video Content
937
1573
 
938
- See `skills/` folder for detailed documentation on each skill.
1574
+ Generates viral short-form video scripts. Based on Jun Yuh's frameworks. See `skills/founder-video/SKILL.md`.
1575
+
1576
+ ```
1577
+ /video idea [topic] # Generate concept with hook options
1578
+ /video script [topic] # Full script with shot list
1579
+ /video hook [topic] # 5 hook variations
1580
+ /video story [experience] # Extract video from your story
1581
+ /video batch [theme] # Weekly content batch (7-day plan)
1582
+ /video repurpose [source] # Rule of 7 repurposing
1583
+ /video diagnose [problem] # Fix underperforming videos
1584
+ ```
1585
+
1586
+ ### /startup - The Startup Journey
1587
+
1588
+ Startup stages from idea to scale, informed by Paul Graham + Garry Tan. See `skills/startup/SKILL.md`.
1589
+
1590
+ ```
1591
+ /startup # Where am I? What's next?
1592
+ /startup stage # Assess current stage from docs
1593
+ /startup next # The one thing to do this week
1594
+ /startup validate [idea] # PG-style idea critique
1595
+ /startup mvp [idea] # Scope to 2-week MVP
1596
+ /startup customers # How to find your first 10
1597
+ /startup launch # Launch playbook
1598
+ /startup fundraise [stage] # Fundraising by stage
1599
+ /startup pg [topic] # What would PG say?
1600
+ /startup garry [topic] # What would Garry say?
1601
+ ```
939
1602
 
940
1603
  ---
941
1604
 
942
1605
  ## The Workflow Phases
943
1606
 
944
- 1. **Foundation** - Copy templates to `knowledge/`, fill VISION/NARRATIVE/THESIS/ROADMAP
945
- 2. **Collaboration Setup** - Edit Team section, create `suggestions/` files, set up `./crm`
946
- 3. **Brand** - Fill `BRAND_BRIEF.md`, run `/brand-architect`, record decisions, run `/web-architect implement all`
947
- 4. **Content** - Use `/content` for threads/posts/articles, preview in `previews/content/`
948
- 5. **Launch** - Track with `/hud`, execute tasks, ship it
1607
+ ### Phase 1: Foundation
1608
+
1609
+ Set up strategic docs:
1610
+ 1. Copy templates from `templates/strategic/` to `knowledge/`
1611
+ 2. Fill in VISION, NARRATIVE, THESIS, ROADMAP
1612
+ 3. This informs everything else
1613
+
1614
+ ### Phase 2: Collaboration Setup
1615
+
1616
+ Configure team:
1617
+ 1. Edit Team section above with owner/team info
1618
+ 2. Create `suggestions/{name}.md` for each contributor
1619
+ 3. Set up CRM via `./crm` CLI (syncs to Google Sheets)
1620
+
1621
+ ### Phase 3: Brand
1622
+
1623
+ Create visual identity:
1624
+ 1. Fill out `knowledge/BRAND_BRIEF.md`
1625
+ 2. Run `/brand-architect`
1626
+ 3. Preview options in `previews/brand/`
1627
+ 4. Record decisions in `knowledge/BRAND_DECISIONS.md`
1628
+ 5. Run `/web-architect implement all`
1629
+
1630
+ ### Phase 4: Content
1631
+
1632
+ Generate launch content:
1633
+ 1. Use `/content` to create threads, posts, articles
1634
+ 2. Preview in `previews/content/`
1635
+ 3. Create one-pagers with PDF export
1636
+
1637
+ ### Phase 5: Launch
1638
+
1639
+ Coordinate the launch:
1640
+ 1. Track with `/hud`
1641
+ 2. Execute tasks from `knowledge/TASKS.md`
1642
+ 3. Ship it
949
1643
 
950
1644
  ---
951
1645
 
@@ -1068,4 +1762,104 @@ What's your name? I'll get you set up.
1068
1762
  4. **Context compounds** - Each session builds on the last
1069
1763
  5. **Ship it** - The goal is launch, not endless iteration
1070
1764
 
1071
- ---
1765
+ ---
1766
+
1767
+ ## INTERNAL: Template Distribution (JFL Team Only)
1768
+
1769
+ **When you make changes that should reach ALL jfl users globally, update the template repo.**
1770
+
1771
+ ### Architecture
1772
+
1773
+ ```
1774
+ jfl-template (402goose/jfl-template) ← SOURCE OF TRUTH
1775
+
1776
+ │ jfl init / jfl update pulls from here
1777
+
1778
+ ┌───┴────────────────────────────────────┐
1779
+ │ User's project │
1780
+ │ ├── CLAUDE.md │
1781
+ │ ├── .claude/settings.json │
1782
+ │ ├── scripts/session/*.sh │
1783
+ │ ├── knowledge/ │
1784
+ │ └── ... │
1785
+ └────────────────────────────────────────┘
1786
+ ```
1787
+
1788
+ ### When to Update jfl-template
1789
+
1790
+ Update the template repo when changing:
1791
+ - `CLAUDE.md` - instructions for Claude
1792
+ - `.claude/settings.json` - hooks (SessionStart, Stop, etc.)
1793
+ - `scripts/session/*.sh` - session management scripts
1794
+ - `knowledge/*.md` - default knowledge templates
1795
+ - `templates/` - doc templates
1796
+ - `.claude/skills/` - bundled skills
1797
+ - `crm` - CRM CLI wrapper
1798
+
1799
+ ### How to Update
1800
+
1801
+ **From JFL-GTM repo:**
1802
+
1803
+ ```bash
1804
+ # 1. Make changes in product/template/
1805
+ # (This is the dev copy, test here first)
1806
+
1807
+ # 2. Test the changes locally
1808
+
1809
+ # 3. Copy to jfl-template repo
1810
+ cd /tmp
1811
+ rm -rf jfl-template
1812
+ git clone git@github.com:402goose/jfl-template.git
1813
+ cd jfl-template
1814
+
1815
+ # 4. Copy updated files
1816
+ cp -r /path/to/JFL-GTM/product/template/* .
1817
+ cp -r /path/to/JFL-GTM/product/template/.[!.]* . 2>/dev/null || true
1818
+
1819
+ # 5. Commit and push
1820
+ git add -A
1821
+ git commit -m "feat: description of what changed"
1822
+ git push origin main
1823
+ ```
1824
+
1825
+ **Or use this one-liner:**
1826
+
1827
+ ```bash
1828
+ # From JFL-GTM root:
1829
+ ./scripts/sync-template.sh "commit message here"
1830
+ ```
1831
+
1832
+ ### What Happens on User Side
1833
+
1834
+ - **New users (`jfl init`)**: Get the latest template immediately
1835
+ - **Existing users (`jfl update`)**: Syncs these paths from template:
1836
+ - `CLAUDE.md`
1837
+ - `.claude/`
1838
+ - `.mcp.json`
1839
+ - `context-hub`
1840
+ - `templates/`
1841
+ - `scripts/`
1842
+
1843
+ ### Files NOT Synced on Update (preserved)
1844
+
1845
+ These are project-specific and never overwritten:
1846
+ - `knowledge/` (their filled-in docs)
1847
+ - `product/` (their product code)
1848
+ - `suggestions/`
1849
+ - `content/`
1850
+ - `previews/`
1851
+ - `.jfl/config.json`
1852
+
1853
+ ### Testing Template Changes
1854
+
1855
+ 1. Make changes in `product/template/`
1856
+ 2. Run `jfl init test-project` in /tmp to verify init works
1857
+ 3. Create a project, run `jfl update` to verify update works
1858
+ 4. If both work, sync to jfl-template repo
1859
+
1860
+ ### Remember
1861
+
1862
+ - **jfl-template is lightweight** (~500KB) - only template files
1863
+ - **jfl-platform has code** (~50MB) - packages, scripts, etc.
1864
+ - Users should NEVER clone jfl-platform just for templates
1865
+ - Keep jfl-template in sync with product/template/