farmwork 1.0.2 → 1.4.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/src/init.js CHANGED
@@ -324,6 +324,8 @@ export async function init(options) {
324
324
  fn: async () => {
325
325
  await fs.ensureDir(path.join(cwd, "_AUDIT"));
326
326
  await fs.ensureDir(path.join(cwd, "_PLANS"));
327
+ await fs.ensureDir(path.join(cwd, "_RESEARCH"));
328
+ await fs.ensureDir(path.join(cwd, "_OFFICE"));
327
329
  await fs.ensureDir(path.join(cwd, ".claude", "commands"));
328
330
  await fs.ensureDir(path.join(cwd, ".claude", "agents"));
329
331
  },
@@ -337,6 +339,10 @@ export async function init(options) {
337
339
  name: "Creating audit documents",
338
340
  fn: () => createAuditDocs(cwd, answers),
339
341
  },
342
+ {
343
+ name: "Setting up office",
344
+ fn: () => createOfficeDocs(cwd, answers),
345
+ },
340
346
  { name: "Laying out justfile", fn: () => createJustfile(cwd, answers) },
341
347
  { name: "Training agents", fn: () => createAgents(cwd, answers) },
342
348
  { name: "Setting up commands", fn: () => createCommands(cwd, answers) },
@@ -432,6 +438,8 @@ export async function init(options) {
432
438
  [
433
439
  "_AUDIT/",
434
440
  "_PLANS/",
441
+ "_RESEARCH/",
442
+ "_OFFICE/",
435
443
  ".claude/commands/",
436
444
  ".claude/agents/",
437
445
  "CLAUDE.md",
@@ -556,6 +564,37 @@ Run these in order for a complete development cycle:
556
564
 
557
565
  ---
558
566
 
567
+ ### Idea Phrases (Pre-Plan Stage)
568
+
569
+ | Phrase | Action |
570
+ |--------|--------|
571
+ | **I have an idea for...** | Add new idea to \`_AUDIT/GARDEN.md\` (title, description, bullets) |
572
+ | **let's plan this idea...** | Graduate idea from GARDEN → create plan in \`_PLANS/\` |
573
+ | **I dont want to do this idea...** | Reject idea → move from GARDEN to COMPOST |
574
+ | **remove this feature...** | Archive feature idea to COMPOST |
575
+ | **compost this...** | Move idea from GARDEN to COMPOST |
576
+ | **water the garden** | Generate 10 new ideas based on existing GARDEN and COMPOST |
577
+
578
+ ---
579
+
580
+ ### Research Phrases (Pre-Plan Stage)
581
+
582
+ | Phrase | Action |
583
+ |--------|--------|
584
+ | **let's research...** | Create or update research document in \`_RESEARCH/\` |
585
+ | **update research on...** | Update existing research document with fresh findings |
586
+ | **show research on...** | Display summary of existing research document |
587
+
588
+ ---
589
+
590
+ ### Office Phrases (Product Strategy & UX)
591
+
592
+ | Phrase | Action |
593
+ |--------|--------|
594
+ | **go to production** | UX production check: update ONBOARDING.md, USER_GUIDE.md, audit CORE_LOOP.md changes |
595
+
596
+ ---
597
+
559
598
  ### Farmwork Phrase Details
560
599
 
561
600
  **open the farm**
@@ -585,6 +624,125 @@ Runs all inspection agents in parallel, then dry run quality gates. No push.
585
624
 
586
625
  ---
587
626
 
627
+ ### Idea Phrase Details
628
+
629
+ **I have an idea for...**
630
+ 1. Launch \`idea-gardener\` agent
631
+ 2. Parse idea title from user input
632
+ 3. Ask for short description and bullet points
633
+ 4. Add to \`_AUDIT/GARDEN.md\` under ## Ideas section
634
+
635
+ **let's plan this idea...**
636
+ 1. Launch \`idea-gardener\` agent
637
+ 2. Find the idea in GARDEN.md
638
+ 3. Create plan in \`_PLANS/\` using plan mode
639
+ 4. Move to "Graduated to Plans" table
640
+ 5. Remove from ## Ideas section
641
+
642
+ **compost this...** / **I dont want to do this idea...**
643
+ 1. Launch \`idea-gardener\` agent
644
+ 2. Find idea in GARDEN.md (or accept new rejection)
645
+ 3. Ask for rejection reason
646
+ 4. Add to \`_AUDIT/COMPOST.md\` with reason
647
+ 5. Remove from GARDEN.md if it was there
648
+
649
+ **water the garden**
650
+ 1. Launch \`idea-gardener\` agent
651
+ 2. Read \`_AUDIT/GARDEN.md\` to understand existing ideas and themes
652
+ 3. Read \`_AUDIT/COMPOST.md\` to understand what didn't work and why
653
+ 4. Generate 10 new, creative ideas that:
654
+ - Build on or extend existing garden ideas
655
+ - Avoid patterns that led to composted ideas
656
+ - Consider the project's direction and goals
657
+ 5. Present ideas as a numbered list with title and one-line description
658
+ 6. Ask user: "Which ideas would you like to plant? (enter numbers, e.g., 1, 3, 5)"
659
+ 7. For selected ideas, add each to GARDEN.md with today's planted date
660
+
661
+ ---
662
+
663
+ ### Research Phrase Details
664
+
665
+ **let's research...**
666
+ 1. Launch \`researcher\` agent
667
+ 2. Parse research topic from user input
668
+ 3. Check for existing research in \`_RESEARCH/\`
669
+ 4. Spawn parallel subagents for:
670
+ - Documentation finder (official docs, API refs)
671
+ - Security researcher (CVEs, known issues)
672
+ - Tech stack analyzer (dependencies, compatibility)
673
+ - Community researcher (gotchas, discussions)
674
+ 5. If ref.tools MCP available: Use \`mcp__Ref__ref_search_documentation\` for docs lookup
675
+ 6. Consolidate findings into \`_RESEARCH/[TOPIC_NAME].md\`
676
+ 7. Display summary and suggest next steps
677
+
678
+ **update research on...**
679
+ 1. Launch \`researcher\` agent
680
+ 2. Find existing research document in \`_RESEARCH/\`
681
+ 3. Run targeted research refresh on specified areas
682
+ 4. Merge new findings, mark outdated info with strikethrough
683
+ 5. Update research history and Last Researched date
684
+
685
+ **show research on...**
686
+ 1. Find research document in \`_RESEARCH/\`
687
+ 2. Display summary of key findings, risks, confidence level
688
+ 3. Suggest refresh if research is aging (15+ days) or stale (30+ days)
689
+
690
+ ---
691
+
692
+ ### Office Phrase Details
693
+
694
+ **go to production**
695
+
696
+ Production readiness check from a user experience perspective. Separate from "close the farm" (which handles code quality/push).
697
+
698
+ 1. **Update ONBOARDING.md**
699
+ - Spawn \`onboarding-agent\` to scan for onboarding elements
700
+ - Check for incomplete or missing onboarding flows
701
+ - Update Last Updated date
702
+ - Add changelog entry if changes found
703
+
704
+ 2. **Update USER_GUIDE.md**
705
+ - Spawn \`user-guide-agent\` to scan for undocumented features
706
+ - Check for placeholder text or incomplete sections
707
+ - Update feature count
708
+ - Add changelog entry if changes found
709
+
710
+ 3. **Audit CORE_LOOP.md**
711
+ - Spawn \`strategy-agent\` to check if CORE_LOOP.md has changed since last production check
712
+ - If changed, add audit trail entry to Strategy Changelog
713
+ - Report strategy evolution summary
714
+
715
+ 4. **Generate Production Readiness Report**
716
+ \`\`\`
717
+ ## Production Readiness: User Experience
718
+
719
+ ### Strategy Status
720
+ - Last Updated: YYYY-MM-DD
721
+ - Changes Since Last Deploy: Yes/No
722
+ - Confidence: High/Medium/Low
723
+
724
+ ### Onboarding Status
725
+ - Elements: X documented
726
+ - Gaps: X identified
727
+ - Empty States: X complete
728
+
729
+ ### Documentation Status
730
+ - Features Documented: X
731
+ - Quick Start: Complete/Incomplete
732
+ - FAQ: X entries
733
+
734
+ ### Recommendation
735
+ [Ready for production / Needs attention: ...]
736
+ \`\`\`
737
+
738
+ 5. **Ask for Confirmation**
739
+ - "UX production check complete. Ready to proceed with deployment?"
740
+ - Wait for user confirmation before any further action
741
+
742
+ **Note:** This phrase focuses on UX readiness. Use "close the farm" for code quality gates and pushing to remote.
743
+
744
+ ---
745
+
588
746
  ## Plan Mode Protocol
589
747
 
590
748
  **CRITICAL**: When Claude enters Plan Mode, ALL plans MUST:
@@ -650,9 +808,11 @@ async function createFarmhouseMd(cwd, answers) {
650
808
 
651
809
  | Metric | Count |
652
810
  |--------|-------|
653
- | Commands | 1 |
654
- | Agents | 10 |
655
- | Justfile Recipes | 10 |
811
+ | Commands | 2 |
812
+ | Agents | 15 |
813
+ | Office Docs | 3 |
814
+ | Research Docs | 0 |
815
+ | Justfile Recipes | 11 |
656
816
  | Unit Tests | 0 |
657
817
  | E2E Tests | 0 |
658
818
  | Completed Issues | 0 |
@@ -670,6 +830,7 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
670
830
  | Command | Description |
671
831
  |---------|-------------|
672
832
  | \`/push\` | Clean, lint, test, build, commit, push, update metrics |
833
+ | \`/office\` | Interactive strategy and UX command - updates CORE_LOOP, ONBOARDING, USER_GUIDE |
673
834
 
674
835
  ---
675
836
 
@@ -687,6 +848,11 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
687
848
  | \`code-cleaner\` | Remove comments and console.logs |
688
849
  | \`i18n-locale-translator\` | Translate UI text to locales |
689
850
  | \`storybook-maintainer\` | Create/update Storybook stories |
851
+ | \`idea-gardener\` | Manage Idea Garden and Compost |
852
+ | \`researcher\` | Systematic research before planning |
853
+ | \`strategy-agent\` | Analyze core loop strategy (what/stopping/why) |
854
+ | \`onboarding-agent\` | Document onboarding elements (tours, tooltips, modals) |
855
+ | \`user-guide-agent\` | Create feature documentation for help docs |
690
856
 
691
857
  ---
692
858
 
@@ -708,6 +874,28 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
708
874
  | \`make a plan for...\` | Create plan in _PLANS/ |
709
875
  | \`let's implement...\` | Load plan, create Epic |
710
876
 
877
+ ### Idea Phrases
878
+
879
+ | Phrase | Action |
880
+ |--------|--------|
881
+ | \`I have an idea for...\` | Add idea to GARDEN.md |
882
+ | \`let's plan this idea...\` | Graduate idea to _PLANS/ |
883
+ | \`compost this...\` | Move idea to COMPOST.md |
884
+
885
+ ### Research Phrases
886
+
887
+ | Phrase | Action |
888
+ |--------|--------|
889
+ | \`let's research...\` | Research topic, save to _RESEARCH/ |
890
+ | \`update research on...\` | Refresh existing research |
891
+ | \`show research on...\` | Display research summary |
892
+
893
+ ### Office Phrases
894
+
895
+ | Phrase | Action |
896
+ |--------|--------|
897
+ | \`go to production\` | UX production check: update _OFFICE/ docs |
898
+
711
899
  ---
712
900
 
713
901
  ## Issue Tracking (\`.beads/\`)
@@ -810,6 +998,312 @@ _None currently_
810
998
 
811
999
  await fs.writeFile(path.join(cwd, "_AUDIT", audit.name), content);
812
1000
  }
1001
+
1002
+ // Create GARDEN.md (Idea nursery - custom format)
1003
+ const gardenContent = `# Idea Garden
1004
+
1005
+ > Nursery for new ideas and concepts. The pre-plan creative thinking stage.
1006
+ > Ideas older than 60 days without action will naturally compost during "open the farm".
1007
+
1008
+ **Last Updated:** ${today}
1009
+ **Active Ideas:** 0
1010
+ **Wilting Ideas:** 0
1011
+
1012
+ ---
1013
+
1014
+ ## How to Use
1015
+
1016
+ | Phrase | Action |
1017
+ |--------|--------|
1018
+ | \`I have an idea for...\` | Plant a new idea here |
1019
+ | \`let's plan this idea...\` | Graduate idea to _PLANS/ |
1020
+ | \`compost this...\` | Reject idea, move to COMPOST |
1021
+
1022
+ ---
1023
+
1024
+ ## Idea Lifecycle
1025
+
1026
+ Ideas have a natural lifecycle:
1027
+ - **Fresh** (0-44 days) - New ideas, ready to be developed
1028
+ - **Wilting** (45-60 days) - Ideas aging without action, marked with ⚠️
1029
+ - **Composted** (60+ days) - Auto-moved to COMPOST during "open the farm"
1030
+
1031
+ ---
1032
+
1033
+ ## Ideas
1034
+
1035
+ _No ideas planted yet. Start with "I have an idea for..."_
1036
+
1037
+ <!-- Idea format:
1038
+ ### [Idea Title]
1039
+ **Planted:** YYYY-MM-DD
1040
+ [Short description]
1041
+ - Bullet point 1
1042
+ - Bullet point 2
1043
+ -->
1044
+
1045
+ ---
1046
+
1047
+ ## Graduated to Plans
1048
+
1049
+ | Idea | Plan | Date |
1050
+ |------|------|------|
1051
+
1052
+ ---
1053
+
1054
+ ## Implemented
1055
+
1056
+ | Idea | Plan | Completed |
1057
+ |------|------|-----------|
1058
+ `;
1059
+
1060
+ await fs.writeFile(path.join(cwd, "_AUDIT", "GARDEN.md"), gardenContent);
1061
+
1062
+ // Create COMPOST.md (Rejected ideas archive - custom format)
1063
+ const compostContent = `# Idea Compost
1064
+
1065
+ > Archive of rejected ideas. Reference to avoid re-proposing and remember why we didn't pursue something.
1066
+ > Ideas that age 60+ days in the Garden are automatically composted during "open the farm".
1067
+
1068
+ **Last Updated:** ${today}
1069
+ **Composted Ideas:** 0
1070
+ **Auto-Composted:** 0
1071
+
1072
+ ---
1073
+
1074
+ ## How to Use
1075
+
1076
+ | Phrase | Action |
1077
+ |--------|--------|
1078
+ | \`I dont want to do this idea...\` | Reject an idea |
1079
+ | \`remove this feature...\` | Archive a feature idea |
1080
+ | \`compost this...\` | Move idea from GARDEN here |
1081
+
1082
+ ---
1083
+
1084
+ ## Composted Ideas
1085
+
1086
+ _No composted ideas yet._
1087
+
1088
+ <!-- Composted idea format:
1089
+ ### [Idea Title]
1090
+ **Composted:** YYYY-MM-DD
1091
+ **Reason:** [User's reason OR "Auto-composted: aged 60+ days without action"]
1092
+ [Original description if available]
1093
+ -->
1094
+ `;
1095
+
1096
+ await fs.writeFile(path.join(cwd, "_AUDIT", "COMPOST.md"), compostContent);
1097
+ }
1098
+
1099
+ async function createOfficeDocs(cwd, answers) {
1100
+ const today = new Date().toISOString().split("T")[0];
1101
+
1102
+ // Create CORE_LOOP.md - Strategy document
1103
+ const coreLoopContent = `# Core Loop Strategy
1104
+
1105
+ > Treat your product like a game. Define what users are doing, what's stopping them, and why they're doing it.
1106
+ > This is a living strategy document - update it as your understanding evolves.
1107
+
1108
+ **Last Updated:** ${today}
1109
+ **Status:** Initial setup
1110
+ **Confidence:** Low
1111
+
1112
+ ---
1113
+
1114
+ ## The Three Questions
1115
+
1116
+ ### 1. What are they doing?
1117
+ _What is the primary action or loop your users engage in?_
1118
+
1119
+ **Current Understanding:**
1120
+ [Describe the core user action/loop]
1121
+
1122
+ ### 2. What's stopping them?
1123
+ _What friction, obstacles, or pain points prevent users from succeeding?_
1124
+
1125
+ **Current Blockers:**
1126
+ - [Blocker 1]
1127
+ - [Blocker 2]
1128
+
1129
+ ### 3. Why are they doing it?
1130
+ _What motivates users? What's the deeper goal or reward?_
1131
+
1132
+ **User Motivation:**
1133
+ [Describe the underlying motivation]
1134
+
1135
+ ---
1136
+
1137
+ ## Core Loop Diagram
1138
+
1139
+ \`\`\`
1140
+ [Entry Point] → [Core Action] → [Reward/Feedback] → [Loop Back]
1141
+ \`\`\`
1142
+
1143
+ ---
1144
+
1145
+ ## Strategy Changelog
1146
+
1147
+ | Date | Change | Previous | Reason |
1148
+ |------|--------|----------|--------|
1149
+ | ${today} | Initial strategy setup | - | Created via farmwork init |
1150
+
1151
+ ---
1152
+
1153
+ ## Related Documents
1154
+
1155
+ - [ONBOARDING.md](./_OFFICE/ONBOARDING.md) - First-time user experience
1156
+ - [USER_GUIDE.md](./_OFFICE/USER_GUIDE.md) - Feature documentation
1157
+ `;
1158
+
1159
+ await fs.writeFile(path.join(cwd, "_OFFICE", "CORE_LOOP.md"), coreLoopContent);
1160
+
1161
+ // Create ONBOARDING.md - Onboarding tracker
1162
+ const onboardingContent = `# User Onboarding
1163
+
1164
+ > Living document for first-time user experience: tours, popups, modals, tooltips, and progressive disclosure.
1165
+ > Track what users see when they first use your product.
1166
+
1167
+ **Last Updated:** ${today}
1168
+ **Status:** Initial setup
1169
+ **Onboarding Steps:** 0
1170
+
1171
+ ---
1172
+
1173
+ ## Onboarding Flow Overview
1174
+
1175
+ \`\`\`
1176
+ [Landing] → [Signup] → [Welcome] → [First Action] → [Success Moment]
1177
+ \`\`\`
1178
+
1179
+ ---
1180
+
1181
+ ## Onboarding Elements
1182
+
1183
+ ### Welcome Experience
1184
+ _What does the user see immediately after signup/first visit?_
1185
+
1186
+ | Element | Type | Content | Status |
1187
+ |---------|------|---------|--------|
1188
+ | | | | |
1189
+
1190
+ ### Guided Tours
1191
+ _Step-by-step tours that walk users through features_
1192
+
1193
+ | Tour Name | Steps | Trigger | Status |
1194
+ |-----------|-------|---------|--------|
1195
+ | | | | |
1196
+
1197
+ ### Tooltips & Hints
1198
+ _Contextual help that appears on specific elements_
1199
+
1200
+ | Element | Tooltip Text | Trigger | Status |
1201
+ |---------|--------------|---------|--------|
1202
+ | | | | |
1203
+
1204
+ ### Modals & Popups
1205
+ _Modal dialogs that appear during onboarding_
1206
+
1207
+ | Modal Name | Purpose | Trigger | Status |
1208
+ |------------|---------|---------|--------|
1209
+ | | | | |
1210
+
1211
+ ### Empty States
1212
+ _What users see before they have data_
1213
+
1214
+ | Screen | Empty State Message | CTA | Status |
1215
+ |--------|---------------------|-----|--------|
1216
+ | | | | |
1217
+
1218
+ ---
1219
+
1220
+ ## Success Metrics
1221
+
1222
+ | Metric | Current | Target |
1223
+ |--------|---------|--------|
1224
+ | Onboarding completion rate | TBD | 80% |
1225
+ | Time to first value | TBD | < 5 min |
1226
+ | Drop-off points | TBD | Identify |
1227
+
1228
+ ---
1229
+
1230
+ ## Changelog
1231
+
1232
+ | Date | Change | Reason |
1233
+ |------|--------|--------|
1234
+ | ${today} | Initial onboarding setup | Created via farmwork init |
1235
+ `;
1236
+
1237
+ await fs.writeFile(path.join(cwd, "_OFFICE", "ONBOARDING.md"), onboardingContent);
1238
+
1239
+ // Create USER_GUIDE.md - Feature documentation
1240
+ const userGuideContent = `# User Guide
1241
+
1242
+ > Living documentation for features and how to use them.
1243
+ > Grows over time to eventually become help docs.
1244
+ > Each feature gets a short block with bullet list instructions.
1245
+
1246
+ **Last Updated:** ${today}
1247
+ **Status:** Initial setup
1248
+ **Features Documented:** 0
1249
+
1250
+ ---
1251
+
1252
+ ## Quick Start
1253
+
1254
+ _Minimal steps to get started with the product_
1255
+
1256
+ 1. [First step]
1257
+ 2. [Second step]
1258
+ 3. [Third step]
1259
+
1260
+ ---
1261
+
1262
+ ## Features
1263
+
1264
+ <!-- Feature Template:
1265
+ ### Feature Name
1266
+ Brief description of what this feature does.
1267
+
1268
+ **How to use:**
1269
+ - Step 1
1270
+ - Step 2
1271
+ - Step 3
1272
+
1273
+ **Tips:**
1274
+ - Helpful tip
1275
+
1276
+ **Related:** [Link to related feature]
1277
+ -->
1278
+
1279
+ _No features documented yet. Run \`/office\` to add features._
1280
+
1281
+ ---
1282
+
1283
+ ## Keyboard Shortcuts
1284
+
1285
+ | Shortcut | Action |
1286
+ |----------|--------|
1287
+ | | |
1288
+
1289
+ ---
1290
+
1291
+ ## FAQ
1292
+
1293
+ ### Common Questions
1294
+
1295
+ _No FAQs yet._
1296
+
1297
+ ---
1298
+
1299
+ ## Changelog
1300
+
1301
+ | Date | Change |
1302
+ |------|--------|
1303
+ | ${today} | Initial user guide setup |
1304
+ `;
1305
+
1306
+ await fs.writeFile(path.join(cwd, "_OFFICE", "USER_GUIDE.md"), userGuideContent);
813
1307
  }
814
1308
 
815
1309
  async function createJustfile(cwd, answers) {
@@ -851,6 +1345,10 @@ audit:
851
1345
  plans:
852
1346
  @echo "{{project_root}}/_PLANS" && cd {{project_root}}/_PLANS
853
1347
 
1348
+ # Go to research folder
1349
+ research:
1350
+ @echo "{{project_root}}/_RESEARCH" && cd {{project_root}}/_RESEARCH
1351
+
854
1352
  # Go to commands folder
855
1353
  commands:
856
1354
  @echo "{{project_root}}/.claude/commands" && cd {{project_root}}/.claude/commands
@@ -901,7 +1399,7 @@ async function createAgents(cwd, answers) {
901
1399
  name: the-farmer
902
1400
  description: Audit and update FARMHOUSE.md with current project metrics
903
1401
  tools: Read, Grep, Glob, Edit, Bash
904
- model: haiku
1402
+ model: opus
905
1403
  ---
906
1404
 
907
1405
  # The Farmer Agent
@@ -910,12 +1408,52 @@ Maintains \`_AUDIT/FARMHOUSE.md\` - the living document tracking all systems and
910
1408
 
911
1409
  ## Instructions
912
1410
 
1411
+ ### Step 1: Gather Metrics
913
1412
  1. Count commands: \`ls -1 .claude/commands/*.md | wc -l\`
914
1413
  2. Count agents: \`ls -1 .claude/agents/*.md | wc -l\`
915
1414
  3. Count tests: \`find . -name "*.test.*" | wc -l\`
916
1415
  4. Count completed issues: \`bd list --status closed | wc -l\`
917
- 5. Update FARMHOUSE.md with fresh metrics
918
- 6. Update score based on completeness
1416
+
1417
+ ### Step 2: Tend the Idea Garden
1418
+ Read \`_AUDIT/GARDEN.md\` and check the age of each idea:
1419
+
1420
+ 1. Parse each idea's \`**Planted:**\` date
1421
+ 2. Calculate age: today - planted date (in days)
1422
+ 3. For ideas **45-60 days old** (Wilting):
1423
+ - Add \`⚠️ WILTING\` after the idea title
1424
+ - Report these ideas in the audit summary
1425
+ 4. For ideas **over 60 days old** (Composted):
1426
+ - Move to \`_AUDIT/COMPOST.md\` with format:
1427
+ \`\`\`markdown
1428
+ ### [Idea Title]
1429
+ **Composted:** YYYY-MM-DD
1430
+ **Reason:** Auto-composted: aged 60+ days without action
1431
+ [Original description]
1432
+ \`\`\`
1433
+ - Remove from GARDEN.md
1434
+ - Update counts in both files
1435
+ 5. Update GARDEN.md header:
1436
+ - **Active Ideas:** (count of non-wilting ideas)
1437
+ - **Wilting Ideas:** (count of 45-60 day old ideas)
1438
+ - **Last Updated:** today's date
1439
+
1440
+ ### Step 3: Check Research Freshness
1441
+ Read all documents in \`_RESEARCH/\` and check their age:
1442
+
1443
+ 1. Parse each document's \`**Last Researched:**\` date
1444
+ 2. Calculate age: today - last researched date (in days)
1445
+ 3. For research **15-30 days old** (Aging):
1446
+ - Update status to "Aging" in the document
1447
+ - Report these in the audit summary
1448
+ 4. For research **over 30 days old** (Stale):
1449
+ - Update status to "Stale" in the document
1450
+ - Report these as needing refresh before use in plans
1451
+ 5. Count total research documents for FARMHOUSE metrics
1452
+
1453
+ ### Step 4: Update FARMHOUSE.md
1454
+ 1. Update metrics table (including Research Docs count)
1455
+ 2. Update score based on completeness
1456
+ 3. Add audit history entry
919
1457
 
920
1458
  ## Output Format
921
1459
 
@@ -925,9 +1463,20 @@ Maintains \`_AUDIT/FARMHOUSE.md\` - the living document tracking all systems and
925
1463
  ### Metrics Updated
926
1464
  - Commands: X total
927
1465
  - Agents: X total
1466
+ - Research Docs: X total
928
1467
  - Tests: X files
929
1468
  - Completed Issues: X total
930
1469
 
1470
+ ### Idea Garden
1471
+ - Active Ideas: X
1472
+ - Wilting Ideas: X (list titles if any)
1473
+ - Auto-Composted: X (list titles if any)
1474
+
1475
+ ### Research Library
1476
+ - Fresh: X documents
1477
+ - Aging: X documents (list titles if any)
1478
+ - Stale: X documents (list titles if any)
1479
+
931
1480
  ### Score: X/10
932
1481
  \`\`\`
933
1482
  `,
@@ -935,7 +1484,7 @@ Maintains \`_AUDIT/FARMHOUSE.md\` - the living document tracking all systems and
935
1484
  name: code-reviewer
936
1485
  description: Review code for quality, security, and maintainability
937
1486
  tools: Read, Grep, Glob, Bash
938
- model: sonnet
1487
+ model: opus
939
1488
  ---
940
1489
 
941
1490
  # Code Reviewer Agent
@@ -952,7 +1501,7 @@ Reports findings with severity (CRITICAL, HIGH, MEDIUM, LOW) and remediation ste
952
1501
  name: security-auditor
953
1502
  description: OWASP security vulnerability scanning
954
1503
  tools: Read, Grep, Glob, Edit
955
- model: haiku
1504
+ model: opus
956
1505
  ---
957
1506
 
958
1507
  # Security Auditor Agent
@@ -971,7 +1520,7 @@ Updates \`_AUDIT/SECURITY.md\` with results.
971
1520
  name: performance-auditor
972
1521
  description: Find memory leaks, unnecessary re-renders, and anti-patterns
973
1522
  tools: Read, Grep, Glob, Edit
974
- model: haiku
1523
+ model: opus
975
1524
  ---
976
1525
 
977
1526
  # Performance Auditor Agent
@@ -990,7 +1539,7 @@ Updates \`_AUDIT/PERFORMANCE.md\` with results.
990
1539
  name: code-smell-auditor
991
1540
  description: Detect DRY violations, complexity issues, naming problems, and technical debt
992
1541
  tools: Read, Grep, Glob, Edit
993
- model: haiku
1542
+ model: opus
994
1543
  ---
995
1544
 
996
1545
  # Code Smell Auditor Agent
@@ -1009,7 +1558,7 @@ Updates \`_AUDIT/CODE_QUALITY.md\` with results.
1009
1558
  name: accessibility-auditor
1010
1559
  description: WCAG 2.1 accessibility auditing for React/Next.js applications
1011
1560
  tools: Read, Grep, Glob, Edit
1012
- model: haiku
1561
+ model: opus
1013
1562
  ---
1014
1563
 
1015
1564
  # Accessibility Auditor Agent
@@ -1029,7 +1578,7 @@ Updates \`_AUDIT/ACCESSIBILITY.md\` with results.
1029
1578
  name: unused-code-cleaner
1030
1579
  description: Detect and remove unused code (imports, functions, variables)
1031
1580
  tools: Read, Write, Edit, Bash, Grep, Glob
1032
- model: haiku
1581
+ model: opus
1033
1582
  ---
1034
1583
 
1035
1584
  # Unused Code Cleaner Agent
@@ -1048,7 +1597,7 @@ Use after refactoring, when removing features, or before production deployment.
1048
1597
  name: code-cleaner
1049
1598
  description: Fast removal of comments, console.logs, and debug code while preserving JSDoc
1050
1599
  tools: Read, Edit, Glob, Grep
1051
- model: haiku
1600
+ model: opus
1052
1601
  ---
1053
1602
 
1054
1603
  # Code Cleaner Agent
@@ -1068,7 +1617,7 @@ Fast cleanup of TypeScript/JavaScript files:
1068
1617
  name: i18n-locale-translator
1069
1618
  description: Translate UI text content into English (en) and Japanese (jp) using i18n locale system
1070
1619
  tools: Read, Write, Edit, Glob, Grep
1071
- model: sonnet
1620
+ model: opus
1072
1621
  ---
1073
1622
 
1074
1623
  # i18n Locale Translator Agent
@@ -1085,7 +1634,7 @@ Use when adding new features or internationalizing existing hardcoded text.
1085
1634
  name: storybook-maintainer
1086
1635
  description: Create and update Storybook stories for UI components
1087
1636
  tools: Read, Write, Edit, Glob, Grep
1088
- model: haiku
1637
+ model: opus
1089
1638
  ---
1090
1639
 
1091
1640
  # Storybook Maintainer Agent
@@ -1097,6 +1646,530 @@ Manages Storybook stories for UI components:
1097
1646
  - Add controls for interactive props
1098
1647
 
1099
1648
  Use when adding new components or when existing components change significantly.
1649
+ `,
1650
+ "idea-gardener.md": `---
1651
+ name: idea-gardener
1652
+ description: Manage the Idea Garden and Compost - add, graduate, reject, or generate ideas
1653
+ tools: Read, Edit, Glob, Grep
1654
+ model: opus
1655
+ ---
1656
+
1657
+ # Idea Gardener Agent
1658
+
1659
+ Manages \`_AUDIT/GARDEN.md\` and \`_AUDIT/COMPOST.md\` for idea lifecycle tracking.
1660
+
1661
+ ## Commands
1662
+
1663
+ ### Plant an Idea (from "I have an idea for...")
1664
+ 1. Parse the idea title from user input
1665
+ 2. Ask user for short description and key bullet points
1666
+ 3. Add to GARDEN.md under ## Ideas section with format:
1667
+ \`\`\`markdown
1668
+ ### [Idea Title]
1669
+ **Planted:** YYYY-MM-DD
1670
+ [Short description]
1671
+ - Bullet point 1
1672
+ - Bullet point 2
1673
+ \`\`\`
1674
+ 4. Update the "Active Ideas" count in the header
1675
+ 5. Update "Last Updated" date
1676
+
1677
+ **IMPORTANT:** Always include the **Planted:** date using today's date (YYYY-MM-DD format).
1678
+
1679
+ ### Graduate an Idea (from "let's plan this idea...")
1680
+ 1. Find idea in GARDEN.md
1681
+ 2. Create plan file in _PLANS/ using plan mode
1682
+ 3. Move idea to "Graduated to Plans" table with date and plan link
1683
+ 4. Remove from ## Ideas section
1684
+ 5. Update "Active Ideas" count
1685
+
1686
+ ### Compost an Idea (from "compost this..." / "I dont want...")
1687
+ 1. Find idea in GARDEN.md (or accept new rejection)
1688
+ 2. Ask for rejection reason
1689
+ 3. Add to COMPOST.md with format:
1690
+ \`\`\`markdown
1691
+ ### [Idea Title]
1692
+ **Composted:** YYYY-MM-DD
1693
+ **Reason:** [User's reason]
1694
+ [Original description if available]
1695
+ \`\`\`
1696
+ 4. Remove from GARDEN.md if it was there
1697
+ 5. Update counts in both files
1698
+
1699
+ ### Water the Garden (from "water the garden")
1700
+ Generate fresh ideas based on the project context:
1701
+
1702
+ 1. **Read Context:**
1703
+ - Read \`_AUDIT/GARDEN.md\` - understand existing ideas, themes, what's being explored
1704
+ - Read \`_AUDIT/COMPOST.md\` - understand what was rejected and why (avoid these patterns)
1705
+ - Read \`CLAUDE.md\` - understand the project's purpose and configuration
1706
+
1707
+ 2. **Generate 10 Ideas:**
1708
+ Think creatively about ideas that:
1709
+ - Extend or complement existing garden ideas
1710
+ - Fill gaps in current thinking
1711
+ - Avoid patterns that led to rejected/composted ideas
1712
+ - Align with the project's goals and tech stack
1713
+ - Range from small enhancements to ambitious features
1714
+
1715
+ 3. **Present Ideas:**
1716
+ Display as a numbered list:
1717
+ \`\`\`
1718
+ ## Fresh Ideas for Your Garden
1719
+
1720
+ 1. **[Idea Title]** - One-line description
1721
+ 2. **[Idea Title]** - One-line description
1722
+ ... (10 total)
1723
+
1724
+ Which ideas would you like to plant? (enter numbers, e.g., 1, 3, 5)
1725
+ \`\`\`
1726
+
1727
+ 4. **Plant Selected Ideas:**
1728
+ For each selected number, add to GARDEN.md with:
1729
+ - Title from the list
1730
+ - Today's date as **Planted:** date
1731
+ - The one-line description expanded slightly
1732
+ - 2-3 bullet points about potential implementation
1733
+
1734
+ ## Output Format
1735
+ Confirm action taken and show updated file section.
1736
+ `,
1737
+ "researcher.md": `---
1738
+ name: researcher
1739
+ description: Systematic research agent - gathers documentation, risks, security concerns, and implementation insights
1740
+ tools: Read, Edit, Glob, Grep, Bash, WebFetch, Task
1741
+ model: opus
1742
+ ---
1743
+
1744
+ # Researcher Agent
1745
+
1746
+ Conducts systematic research on features, technologies, and concepts before planning.
1747
+ Creates and maintains living research documents in \`_RESEARCH/\`.
1748
+
1749
+ ## Core Capabilities
1750
+
1751
+ 1. **Parallel Research Spawning** - Spawns focused subagents for different research areas
1752
+ 2. **Documentation Discovery** - Finds official docs, API references, tutorials
1753
+ 3. **Security Analysis** - Identifies CVEs, known vulnerabilities, security best practices
1754
+ 4. **Tech Stack Analysis** - Analyzes dependencies, compatibility, bundle size
1755
+ 5. **Community Insights** - Gathers gotchas, common issues, best practices from community
1756
+ 6. **MCP Integration** - Uses ref.tools MCP when available for enhanced documentation access
1757
+
1758
+ ## Instructions
1759
+
1760
+ ### Step 1: Parse Research Request
1761
+ 1. Extract the research topic from user input after "let's research..."
1762
+ 2. Normalize topic name to SCREAMING_SNAKE_CASE for filename
1763
+ 3. Check if \`_RESEARCH/[TOPIC_NAME].md\` already exists
1764
+
1765
+ ### Step 2: Spawn Parallel Research Agents
1766
+ Create focused subtasks for parallel execution using the Task tool:
1767
+
1768
+ **Documentation Research Task:**
1769
+ - Find official documentation sites
1770
+ - Identify API references and getting started guides
1771
+ - Locate migration guides if applicable
1772
+ - If ref.tools MCP available: Query \`mcp__Ref__ref_search_documentation\` for relevant docs
1773
+
1774
+ **Security Research Task:**
1775
+ - Search for known CVEs related to the topic
1776
+ - Find security advisories
1777
+ - Identify authentication/authorization concerns
1778
+ - Research data handling best practices
1779
+ - Check for dependency vulnerabilities
1780
+
1781
+ **Tech Stack Research Task:**
1782
+ - Identify required dependencies
1783
+ - Check Node.js/browser compatibility
1784
+ - Analyze bundle size implications
1785
+ - Find TypeScript type definitions
1786
+ - Check for ESM/CJS compatibility
1787
+
1788
+ **Community Research Task:**
1789
+ - Search GitHub issues for common problems
1790
+ - Find Stack Overflow discussions
1791
+ - Identify known gotchas and edge cases
1792
+ - Gather migration experiences
1793
+ - Find performance optimization tips
1794
+
1795
+ ### Step 3: Consolidate Findings
1796
+ 1. Wait for all parallel research tasks to complete
1797
+ 2. Merge findings into structured research document
1798
+ 3. Identify conflicts or contradictions between sources
1799
+ 4. Assign confidence levels based on source quality
1800
+ 5. Highlight critical risks that require attention
1801
+
1802
+ ### Step 4: Create/Update Research Document
1803
+
1804
+ **If new research:**
1805
+ Create \`_RESEARCH/[TOPIC_NAME].md\` with this format:
1806
+
1807
+ \`\`\`markdown
1808
+ # Research: [Topic Name]
1809
+
1810
+ > Systematic research findings for informed decision-making.
1811
+ > This is a living document - updated periodically as new information emerges.
1812
+
1813
+ **Created:** YYYY-MM-DD
1814
+ **Last Researched:** YYYY-MM-DD
1815
+ **Status:** Fresh
1816
+ **Confidence:** High | Medium | Low
1817
+
1818
+ ---
1819
+
1820
+ ## Summary
1821
+
1822
+ [2-3 sentence executive summary of key findings]
1823
+
1824
+ ---
1825
+
1826
+ ## Official Documentation
1827
+
1828
+ | Resource | URL | Notes |
1829
+ |----------|-----|-------|
1830
+ | [Doc Name] | [URL] | [Key insight] |
1831
+
1832
+ ---
1833
+
1834
+ ## Tech Stack Analysis
1835
+
1836
+ ### Dependencies
1837
+ - **Package Name** - version X.X.X - [purpose/notes]
1838
+
1839
+ ### Compatibility
1840
+ | Environment | Status | Notes |
1841
+ |-------------|--------|-------|
1842
+ | Node.js | vX.X+ | [notes] |
1843
+ | Browser | [support] | [notes] |
1844
+
1845
+ ### Bundle Size / Performance
1846
+ [Analysis of size and performance implications]
1847
+
1848
+ ---
1849
+
1850
+ ## Security Concerns
1851
+
1852
+ ### Known Vulnerabilities
1853
+ | CVE/Issue | Severity | Status | Mitigation |
1854
+ |-----------|----------|--------|------------|
1855
+ | [CVE-ID] | High/Med/Low | Fixed/Open | [action] |
1856
+
1857
+ ### Security Best Practices
1858
+ - [Practice 1]
1859
+ - [Practice 2]
1860
+
1861
+ ---
1862
+
1863
+ ## Risks & Gotchas
1864
+
1865
+ ### Common Pitfalls
1866
+ 1. **[Pitfall Name]** - [Description and how to avoid]
1867
+
1868
+ ### Breaking Changes
1869
+ | Version | Change | Impact |
1870
+ |---------|--------|--------|
1871
+ | [ver] | [change] | [impact] |
1872
+
1873
+ ### Edge Cases
1874
+ - [Edge case 1]
1875
+ - [Edge case 2]
1876
+
1877
+ ---
1878
+
1879
+ ## Community Insights
1880
+
1881
+ ### GitHub Issues / Discussions
1882
+ | Issue | Topic | Resolution |
1883
+ |-------|-------|------------|
1884
+ | [#123] | [topic] | [resolution] |
1885
+
1886
+ ### Stack Overflow / Forums
1887
+ - [Key insight from community]
1888
+
1889
+ ---
1890
+
1891
+ ## Implementation Recommendations
1892
+
1893
+ ### Recommended Approach
1894
+ [Based on research, the recommended approach is...]
1895
+
1896
+ ### Alternatives Considered
1897
+ | Approach | Pros | Cons |
1898
+ |----------|------|------|
1899
+ | [Alt 1] | [pros] | [cons] |
1900
+
1901
+ ---
1902
+
1903
+ ## Related Research
1904
+
1905
+ - [Link to related _RESEARCH/ document]
1906
+ - [Link to relevant _PLANS/ document]
1907
+
1908
+ ---
1909
+
1910
+ ## Research History
1911
+
1912
+ | Date | Researcher | Areas Updated |
1913
+ |------|------------|---------------|
1914
+ | YYYY-MM-DD | researcher agent | Initial research |
1915
+ \`\`\`
1916
+
1917
+ **If updating existing research:**
1918
+ 1. Read existing document
1919
+ 2. Merge new findings with existing content
1920
+ 3. Mark outdated information with ~~strikethrough~~
1921
+ 4. Update Last Researched date
1922
+ 5. Update Status based on age (Fresh: 0-14d, Aging: 15-30d, Stale: 30+d)
1923
+ 6. Add entry to Research History table
1924
+
1925
+ ### Step 5: Integration Check
1926
+ 1. Check for related ideas in \`_AUDIT/GARDEN.md\`
1927
+ 2. Check for existing plans in \`_PLANS/\`
1928
+ 3. Add cross-references to Related Research section
1929
+ 4. Suggest next steps (plan creation, more research, etc.)
1930
+
1931
+ ## Staleness Detection
1932
+
1933
+ Research document status:
1934
+ - **Fresh** (0-14 days) - Research is current and reliable
1935
+ - **Aging** (15-30 days) - Consider refreshing for major decisions
1936
+ - **Stale** (30+ days) - Recommend updating before using for plans
1937
+
1938
+ ## Output Format
1939
+
1940
+ After research completion, display:
1941
+
1942
+ \`\`\`
1943
+ ## Research Complete: [Topic Name]
1944
+
1945
+ ### Key Findings
1946
+ - [Most important finding 1]
1947
+ - [Most important finding 2]
1948
+ - [Most important finding 3]
1949
+
1950
+ ### Critical Risks
1951
+ - [Risk 1 if any]
1952
+ - [Risk 2 if any]
1953
+
1954
+ ### Confidence: [High/Medium/Low]
1955
+
1956
+ Research document saved to: _RESEARCH/[TOPIC_NAME].md
1957
+
1958
+ Next steps:
1959
+ - [ ] Review full research document
1960
+ - [ ] "make a plan for..." to create implementation plan
1961
+ - [ ] "update research on..." to gather more information
1962
+ \`\`\`
1963
+ `,
1964
+ "strategy-agent.md": `---
1965
+ name: strategy-agent
1966
+ description: Analyze and update the core loop strategy - what users do, what stops them, why they do it
1967
+ tools: Read, Edit, Glob, Grep, Task
1968
+ model: opus
1969
+ ---
1970
+
1971
+ # Strategy Agent
1972
+
1973
+ Maintains \`_OFFICE/CORE_LOOP.md\` - the living strategy document for product thinking.
1974
+
1975
+ ## Core Responsibility
1976
+
1977
+ Treat the product like a game and answer three fundamental questions:
1978
+ 1. **What are they doing?** - The primary user action/loop
1979
+ 2. **What's stopping them?** - Friction and obstacles
1980
+ 3. **Why are they doing it?** - Underlying motivation and rewards
1981
+
1982
+ ## Instructions
1983
+
1984
+ ### When Invoked via /office
1985
+
1986
+ 1. Read \`_OFFICE/CORE_LOOP.md\` to understand current strategy
1987
+ 2. Read the codebase to understand the product (components, routes, features)
1988
+ 3. Ask the user probing questions:
1989
+ - "What's the main thing users do in your app?"
1990
+ - "Where do users get stuck or confused?"
1991
+ - "What's the 'aha moment' for users?"
1992
+ - "What brings users back?"
1993
+ 4. Update CORE_LOOP.md with insights
1994
+ 5. Add entry to Strategy Changelog table
1995
+
1996
+ ### When Checking for Production ("go to production")
1997
+
1998
+ 1. Read \`_OFFICE/CORE_LOOP.md\`
1999
+ 2. Compare current date to Last Updated date
2000
+ 3. If changed since last production push:
2001
+ - Summarize strategy changes
2002
+ - Add audit entry to changelog
2003
+ 4. Report strategy status
2004
+
2005
+ ## Output Format
2006
+
2007
+ \`\`\`
2008
+ ## Strategy Analysis
2009
+
2010
+ ### Core Loop
2011
+ [Describe the identified core loop]
2012
+
2013
+ ### Key Friction Points
2014
+ - [Friction 1]
2015
+ - [Friction 2]
2016
+
2017
+ ### User Motivation
2018
+ [Describe why users engage]
2019
+
2020
+ ### Recommendations
2021
+ - [Recommendation 1]
2022
+ - [Recommendation 2]
2023
+
2024
+ Updated _OFFICE/CORE_LOOP.md
2025
+ \`\`\`
2026
+ `,
2027
+ "onboarding-agent.md": `---
2028
+ name: onboarding-agent
2029
+ description: Identify and document onboarding elements - tours, popups, modals, tooltips, empty states
2030
+ tools: Read, Edit, Glob, Grep, Task
2031
+ model: opus
2032
+ ---
2033
+
2034
+ # Onboarding Agent
2035
+
2036
+ Maintains \`_OFFICE/ONBOARDING.md\` - tracking first-time user experience elements.
2037
+
2038
+ ## Core Responsibility
2039
+
2040
+ Identify, document, and track all onboarding-related UI elements:
2041
+ - Welcome experiences
2042
+ - Guided tours
2043
+ - Tooltips and hints
2044
+ - Modals and popups
2045
+ - Empty states
2046
+ - Progressive disclosure
2047
+
2048
+ ## Instructions
2049
+
2050
+ ### When Invoked via /office
2051
+
2052
+ 1. Read \`_OFFICE/ONBOARDING.md\` to understand current state
2053
+ 2. Scan the codebase for onboarding elements:
2054
+ - Search for: \`tour\`, \`tooltip\`, \`modal\`, \`popup\`, \`hint\`, \`onboarding\`, \`welcome\`, \`empty\`, \`first-time\`
2055
+ - Check for libraries: \`react-joyride\`, \`intro.js\`, \`shepherd.js\`, etc.
2056
+ 3. Ask the user questions:
2057
+ - "What should users see on their first visit?"
2058
+ - "What's the critical 'aha moment' you want to guide them to?"
2059
+ - "Are there any tours or tooltips currently implemented?"
2060
+ 4. Document findings in ONBOARDING.md tables
2061
+ 5. Identify gaps in onboarding coverage
2062
+ 6. Add entry to Changelog
2063
+
2064
+ ### When Checking for Production ("go to production")
2065
+
2066
+ 1. Read \`_OFFICE/ONBOARDING.md\`
2067
+ 2. Check for incomplete or missing onboarding:
2068
+ - Empty states without content
2069
+ - Key flows without guidance
2070
+ - Tooltips without text
2071
+ 3. Report onboarding readiness status
2072
+ 4. Update Last Updated date
2073
+
2074
+ ## Output Format
2075
+
2076
+ \`\`\`
2077
+ ## Onboarding Analysis
2078
+
2079
+ ### Found Elements
2080
+ - [X] Welcome modal
2081
+ - [ ] Guided tour
2082
+ - [X] Empty states (3 found)
2083
+
2084
+ ### Gaps Identified
2085
+ - No tour for main feature
2086
+ - Missing tooltip on key button
2087
+
2088
+ ### Recommendations
2089
+ - Add 3-step tour for new users
2090
+ - Create empty state for dashboard
2091
+
2092
+ Updated _OFFICE/ONBOARDING.md
2093
+ \`\`\`
2094
+ `,
2095
+ "user-guide-agent.md": `---
2096
+ name: user-guide-agent
2097
+ description: Document features and create user help documentation in bullet list format
2098
+ tools: Read, Edit, Glob, Grep, Task
2099
+ model: opus
2100
+ ---
2101
+
2102
+ # User Guide Agent
2103
+
2104
+ Maintains \`_OFFICE/USER_GUIDE.md\` - living feature documentation that grows into help docs.
2105
+
2106
+ ## Core Responsibility
2107
+
2108
+ Create and maintain user-facing documentation for features:
2109
+ - Short, scannable feature descriptions
2110
+ - Step-by-step bullet list instructions
2111
+ - Helpful tips and related features
2112
+ - Keyboard shortcuts
2113
+ - FAQ entries
2114
+
2115
+ ## Instructions
2116
+
2117
+ ### When Invoked via /office
2118
+
2119
+ 1. Read \`_OFFICE/USER_GUIDE.md\` to understand current documentation
2120
+ 2. Scan the codebase for features:
2121
+ - Identify routes and pages
2122
+ - Find user-facing components
2123
+ - Look for keyboard event handlers
2124
+ - Check for documented features in comments
2125
+ 3. Ask the user questions:
2126
+ - "What are the main features users should know about?"
2127
+ - "What questions do users commonly ask?"
2128
+ - "Are there any keyboard shortcuts?"
2129
+ 4. For each feature, create a documentation block:
2130
+ \`\`\`markdown
2131
+ ### Feature Name
2132
+ Brief description.
2133
+
2134
+ **How to use:**
2135
+ - Step 1
2136
+ - Step 2
2137
+
2138
+ **Tips:**
2139
+ - Helpful tip
2140
+ \`\`\`
2141
+ 5. Add entry to Changelog
2142
+
2143
+ ### When Checking for Production ("go to production")
2144
+
2145
+ 1. Read \`_OFFICE/USER_GUIDE.md\`
2146
+ 2. Check for completeness:
2147
+ - All major features documented?
2148
+ - Quick start section complete?
2149
+ - Any placeholder text remaining?
2150
+ 3. Report documentation status
2151
+ 4. Update Last Updated date and feature count
2152
+
2153
+ ## Output Format
2154
+
2155
+ \`\`\`
2156
+ ## User Guide Analysis
2157
+
2158
+ ### Documented Features
2159
+ - Feature A (complete)
2160
+ - Feature B (complete)
2161
+ - Feature C (needs tips)
2162
+
2163
+ ### Missing Documentation
2164
+ - Feature D (new, undocumented)
2165
+ - Keyboard shortcuts (incomplete)
2166
+
2167
+ ### Recommendations
2168
+ - Add documentation for Feature D
2169
+ - Complete keyboard shortcuts table
2170
+
2171
+ Updated _OFFICE/USER_GUIDE.md
2172
+ \`\`\`
1100
2173
  `,
1101
2174
  };
1102
2175
 
@@ -1236,6 +2309,137 @@ Show a summary:
1236
2309
  path.join(cwd, ".claude", "commands", "push.md"),
1237
2310
  pushCommand,
1238
2311
  );
2312
+
2313
+ // Create /office command
2314
+ const officeCommand = `---
2315
+ description: Interactive strategy and user experience command - updates CORE_LOOP, ONBOARDING, and USER_GUIDE
2316
+ argument-hint: [optional: focus area - strategy|onboarding|guide|all]
2317
+ allowed-tools: Read, Edit, Glob, Grep, Task
2318
+ ---
2319
+
2320
+ # Office Command
2321
+
2322
+ Interactive command for product strategy and user experience documentation.
2323
+ Updates all three \`_OFFICE/\` documents based on user answers.
2324
+
2325
+ ## Usage
2326
+
2327
+ \`\`\`
2328
+ /office # Run full office check (all areas)
2329
+ /office strategy # Focus on core loop strategy
2330
+ /office onboarding # Focus on onboarding elements
2331
+ /office guide # Focus on user documentation
2332
+ \`\`\`
2333
+
2334
+ ## Workflow
2335
+
2336
+ ### Step 1: Determine Focus Area
2337
+
2338
+ If \`$ARGUMENTS\` is provided, focus on that area:
2339
+ - \`strategy\` or \`core\` or \`loop\` → Core loop only
2340
+ - \`onboarding\` or \`tour\` or \`welcome\` → Onboarding only
2341
+ - \`guide\` or \`docs\` or \`help\` → User guide only
2342
+ - \`all\` or empty → All three areas
2343
+
2344
+ ### Step 2: Run Strategy Analysis (if applicable)
2345
+
2346
+ Spawn \`strategy-agent\` subagent to:
2347
+ 1. Read current \`_OFFICE/CORE_LOOP.md\`
2348
+ 2. Analyze the codebase to understand the product
2349
+ 3. Ask user questions about the core loop:
2350
+ - "What is the main action users take in your app?"
2351
+ - "What prevents users from succeeding?"
2352
+ - "What motivates users to return?"
2353
+ 4. Update CORE_LOOP.md with findings
2354
+ 5. Add changelog entry
2355
+
2356
+ ### Step 3: Run Onboarding Analysis (if applicable)
2357
+
2358
+ Spawn \`onboarding-agent\` subagent to:
2359
+ 1. Read current \`_OFFICE/ONBOARDING.md\`
2360
+ 2. Scan codebase for onboarding elements:
2361
+ - Tour libraries (react-joyride, shepherd.js, intro.js)
2362
+ - Modal/popup components
2363
+ - Tooltip implementations
2364
+ - Empty state components
2365
+ 3. Ask user questions:
2366
+ - "What should new users see first?"
2367
+ - "What's the key 'aha moment'?"
2368
+ - "Any existing tours or tooltips?"
2369
+ 4. Update ONBOARDING.md tables
2370
+ 5. Add changelog entry
2371
+
2372
+ ### Step 4: Run User Guide Analysis (if applicable)
2373
+
2374
+ Spawn \`user-guide-agent\` subagent to:
2375
+ 1. Read current \`_OFFICE/USER_GUIDE.md\`
2376
+ 2. Scan codebase for features:
2377
+ - Routes and pages
2378
+ - User-facing components
2379
+ - Keyboard shortcuts
2380
+ 3. Ask user questions:
2381
+ - "What are the main features?"
2382
+ - "Common user questions?"
2383
+ - "Any shortcuts to document?"
2384
+ 4. Create/update feature documentation blocks
2385
+ 5. Add changelog entry
2386
+
2387
+ ### Step 5: Generate Summary Report
2388
+
2389
+ Display a summary of all updates:
2390
+
2391
+ \`\`\`
2392
+ ## Office Update Complete
2393
+
2394
+ ### Core Loop Strategy
2395
+ - Updated: Yes/No
2396
+ - Confidence: High/Medium/Low
2397
+ - Changes: [summary of changes]
2398
+
2399
+ ### Onboarding
2400
+ - Elements Found: X
2401
+ - Gaps Identified: X
2402
+ - Changes: [summary of changes]
2403
+
2404
+ ### User Guide
2405
+ - Features Documented: X
2406
+ - Missing: X
2407
+ - Changes: [summary of changes]
2408
+
2409
+ ### Next Steps
2410
+ - [ ] Review _OFFICE/CORE_LOOP.md
2411
+ - [ ] Add missing onboarding elements
2412
+ - [ ] Document new features
2413
+ \`\`\`
2414
+
2415
+ ## Interactive Question Flow
2416
+
2417
+ The /office command uses a conversational approach:
2418
+
2419
+ 1. **Introduction**: "Let's update your product office documents. I'll ask some questions about your product strategy and user experience."
2420
+
2421
+ 2. **Strategy Questions** (if running strategy):
2422
+ - "In one sentence, what do users primarily DO in your app?"
2423
+ - "What's the biggest friction point or obstacle for users?"
2424
+ - "What's the core reward or motivation that keeps users engaged?"
2425
+
2426
+ 3. **Onboarding Questions** (if running onboarding):
2427
+ - "Describe what a new user sees on their first visit"
2428
+ - "What's the 'aha moment' you want to guide new users to?"
2429
+ - "Do you have any guided tours, tooltips, or welcome modals?"
2430
+
2431
+ 4. **Guide Questions** (if running guide):
2432
+ - "What are the top 3-5 features users should know about?"
2433
+ - "What questions do users commonly ask?"
2434
+ - "Are there keyboard shortcuts or power-user features?"
2435
+
2436
+ 5. **Confirmation**: Ask user to confirm updates before writing to files.
2437
+ `;
2438
+
2439
+ await fs.writeFile(
2440
+ path.join(cwd, ".claude", "commands", "office.md"),
2441
+ officeCommand,
2442
+ );
1239
2443
  }
1240
2444
 
1241
2445
  async function createSettings(cwd, answers) {
@@ -1280,7 +2484,7 @@ async function createSettings(cwd, answers) {
1280
2484
 
1281
2485
  async function createProduceConfig(cwd, answers) {
1282
2486
  const config = {
1283
- version: "1.0.0",
2487
+ version: "1.2.0",
1284
2488
  projectName: answers.projectName,
1285
2489
  commands: {
1286
2490
  test: answers.testCommand,
@@ -1291,7 +2495,7 @@ async function createProduceConfig(cwd, answers) {
1291
2495
  storybook: answers.includeStorybook || false,
1292
2496
  i18n: answers.includeI18n || false,
1293
2497
  },
1294
- audits: ["FARMHOUSE", "SECURITY", "PERFORMANCE", "ACCESSIBILITY", "CODE_QUALITY", "TESTS"],
2498
+ audits: ["FARMHOUSE", "SECURITY", "PERFORMANCE", "ACCESSIBILITY", "CODE_QUALITY", "TESTS", "GARDEN", "COMPOST", "RESEARCH"],
1295
2499
  };
1296
2500
 
1297
2501
  if (answers.includeStorybook) {