farmwork 1.1.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -17
- package/package.json +1 -1
- package/src/doctor.js +26 -5
- package/src/init.js +1070 -9
- package/src/status.js +8 -0
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",
|
|
@@ -565,6 +573,25 @@ Run these in order for a complete development cycle:
|
|
|
565
573
|
| **I dont want to do this idea...** | Reject idea → move from GARDEN to COMPOST |
|
|
566
574
|
| **remove this feature...** | Archive feature idea to COMPOST |
|
|
567
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 |
|
|
568
595
|
|
|
569
596
|
---
|
|
570
597
|
|
|
@@ -619,6 +646,101 @@ Runs all inspection agents in parallel, then dry run quality gates. No push.
|
|
|
619
646
|
4. Add to \`_AUDIT/COMPOST.md\` with reason
|
|
620
647
|
5. Remove from GARDEN.md if it was there
|
|
621
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
|
+
|
|
622
744
|
---
|
|
623
745
|
|
|
624
746
|
## Plan Mode Protocol
|
|
@@ -686,9 +808,11 @@ async function createFarmhouseMd(cwd, answers) {
|
|
|
686
808
|
|
|
687
809
|
| Metric | Count |
|
|
688
810
|
|--------|-------|
|
|
689
|
-
| Commands |
|
|
690
|
-
| Agents |
|
|
691
|
-
|
|
|
811
|
+
| Commands | 2 |
|
|
812
|
+
| Agents | 15 |
|
|
813
|
+
| Office Docs | 3 |
|
|
814
|
+
| Research Docs | 0 |
|
|
815
|
+
| Justfile Recipes | 11 |
|
|
692
816
|
| Unit Tests | 0 |
|
|
693
817
|
| E2E Tests | 0 |
|
|
694
818
|
| Completed Issues | 0 |
|
|
@@ -706,6 +830,7 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
|
|
|
706
830
|
| Command | Description |
|
|
707
831
|
|---------|-------------|
|
|
708
832
|
| \`/push\` | Clean, lint, test, build, commit, push, update metrics |
|
|
833
|
+
| \`/office\` | Interactive strategy and UX command - updates CORE_LOOP, ONBOARDING, USER_GUIDE |
|
|
709
834
|
|
|
710
835
|
---
|
|
711
836
|
|
|
@@ -724,6 +849,10 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
|
|
|
724
849
|
| \`i18n-locale-translator\` | Translate UI text to locales |
|
|
725
850
|
| \`storybook-maintainer\` | Create/update Storybook stories |
|
|
726
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 |
|
|
727
856
|
|
|
728
857
|
---
|
|
729
858
|
|
|
@@ -753,6 +882,20 @@ All Claude Code commands and agents are documented, phrase triggers are tested a
|
|
|
753
882
|
| \`let's plan this idea...\` | Graduate idea to _PLANS/ |
|
|
754
883
|
| \`compost this...\` | Move idea to COMPOST.md |
|
|
755
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
|
+
|
|
756
899
|
---
|
|
757
900
|
|
|
758
901
|
## Issue Tracking (\`.beads/\`)
|
|
@@ -860,9 +1003,11 @@ _None currently_
|
|
|
860
1003
|
const gardenContent = `# Idea Garden
|
|
861
1004
|
|
|
862
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".
|
|
863
1007
|
|
|
864
1008
|
**Last Updated:** ${today}
|
|
865
1009
|
**Active Ideas:** 0
|
|
1010
|
+
**Wilting Ideas:** 0
|
|
866
1011
|
|
|
867
1012
|
---
|
|
868
1013
|
|
|
@@ -876,16 +1021,40 @@ _None currently_
|
|
|
876
1021
|
|
|
877
1022
|
---
|
|
878
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
|
+
|
|
879
1033
|
## Ideas
|
|
880
1034
|
|
|
881
1035
|
_No ideas planted yet. Start with "I have an idea for..."_
|
|
882
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
|
+
|
|
883
1045
|
---
|
|
884
1046
|
|
|
885
1047
|
## Graduated to Plans
|
|
886
1048
|
|
|
887
1049
|
| Idea | Plan | Date |
|
|
888
1050
|
|------|------|------|
|
|
1051
|
+
|
|
1052
|
+
---
|
|
1053
|
+
|
|
1054
|
+
## Implemented
|
|
1055
|
+
|
|
1056
|
+
| Idea | Plan | Completed |
|
|
1057
|
+
|------|------|-----------|
|
|
889
1058
|
`;
|
|
890
1059
|
|
|
891
1060
|
await fs.writeFile(path.join(cwd, "_AUDIT", "GARDEN.md"), gardenContent);
|
|
@@ -894,9 +1063,11 @@ _No ideas planted yet. Start with "I have an idea for..."_
|
|
|
894
1063
|
const compostContent = `# Idea Compost
|
|
895
1064
|
|
|
896
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".
|
|
897
1067
|
|
|
898
1068
|
**Last Updated:** ${today}
|
|
899
1069
|
**Composted Ideas:** 0
|
|
1070
|
+
**Auto-Composted:** 0
|
|
900
1071
|
|
|
901
1072
|
---
|
|
902
1073
|
|
|
@@ -913,11 +1084,228 @@ _No ideas planted yet. Start with "I have an idea for..."_
|
|
|
913
1084
|
## Composted Ideas
|
|
914
1085
|
|
|
915
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
|
+
-->
|
|
916
1094
|
`;
|
|
917
1095
|
|
|
918
1096
|
await fs.writeFile(path.join(cwd, "_AUDIT", "COMPOST.md"), compostContent);
|
|
919
1097
|
}
|
|
920
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);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
921
1309
|
async function createJustfile(cwd, answers) {
|
|
922
1310
|
const content = `# ${answers.projectName} - Farmwork
|
|
923
1311
|
# Run \`just --list\` to see all commands
|
|
@@ -957,6 +1345,10 @@ audit:
|
|
|
957
1345
|
plans:
|
|
958
1346
|
@echo "{{project_root}}/_PLANS" && cd {{project_root}}/_PLANS
|
|
959
1347
|
|
|
1348
|
+
# Go to research folder
|
|
1349
|
+
research:
|
|
1350
|
+
@echo "{{project_root}}/_RESEARCH" && cd {{project_root}}/_RESEARCH
|
|
1351
|
+
|
|
960
1352
|
# Go to commands folder
|
|
961
1353
|
commands:
|
|
962
1354
|
@echo "{{project_root}}/.claude/commands" && cd {{project_root}}/.claude/commands
|
|
@@ -1016,12 +1408,52 @@ Maintains \`_AUDIT/FARMHOUSE.md\` - the living document tracking all systems and
|
|
|
1016
1408
|
|
|
1017
1409
|
## Instructions
|
|
1018
1410
|
|
|
1411
|
+
### Step 1: Gather Metrics
|
|
1019
1412
|
1. Count commands: \`ls -1 .claude/commands/*.md | wc -l\`
|
|
1020
1413
|
2. Count agents: \`ls -1 .claude/agents/*.md | wc -l\`
|
|
1021
1414
|
3. Count tests: \`find . -name "*.test.*" | wc -l\`
|
|
1022
1415
|
4. Count completed issues: \`bd list --status closed | wc -l\`
|
|
1023
|
-
|
|
1024
|
-
|
|
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
|
|
1025
1457
|
|
|
1026
1458
|
## Output Format
|
|
1027
1459
|
|
|
@@ -1031,9 +1463,20 @@ Maintains \`_AUDIT/FARMHOUSE.md\` - the living document tracking all systems and
|
|
|
1031
1463
|
### Metrics Updated
|
|
1032
1464
|
- Commands: X total
|
|
1033
1465
|
- Agents: X total
|
|
1466
|
+
- Research Docs: X total
|
|
1034
1467
|
- Tests: X files
|
|
1035
1468
|
- Completed Issues: X total
|
|
1036
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
|
+
|
|
1037
1480
|
### Score: X/10
|
|
1038
1481
|
\`\`\`
|
|
1039
1482
|
`,
|
|
@@ -1206,7 +1649,7 @@ Use when adding new components or when existing components change significantly.
|
|
|
1206
1649
|
`,
|
|
1207
1650
|
"idea-gardener.md": `---
|
|
1208
1651
|
name: idea-gardener
|
|
1209
|
-
description: Manage the Idea Garden and Compost - add, graduate, or
|
|
1652
|
+
description: Manage the Idea Garden and Compost - add, graduate, reject, or generate ideas
|
|
1210
1653
|
tools: Read, Edit, Glob, Grep
|
|
1211
1654
|
model: opus
|
|
1212
1655
|
---
|
|
@@ -1221,25 +1664,512 @@ Manages \`_AUDIT/GARDEN.md\` and \`_AUDIT/COMPOST.md\` for idea lifecycle tracki
|
|
|
1221
1664
|
1. Parse the idea title from user input
|
|
1222
1665
|
2. Ask user for short description and key bullet points
|
|
1223
1666
|
3. Add to GARDEN.md under ## Ideas section with format:
|
|
1667
|
+
\`\`\`markdown
|
|
1224
1668
|
### [Idea Title]
|
|
1669
|
+
**Planted:** YYYY-MM-DD
|
|
1225
1670
|
[Short description]
|
|
1226
1671
|
- Bullet point 1
|
|
1227
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).
|
|
1228
1678
|
|
|
1229
1679
|
### Graduate an Idea (from "let's plan this idea...")
|
|
1230
1680
|
1. Find idea in GARDEN.md
|
|
1231
1681
|
2. Create plan file in _PLANS/ using plan mode
|
|
1232
1682
|
3. Move idea to "Graduated to Plans" table with date and plan link
|
|
1233
1683
|
4. Remove from ## Ideas section
|
|
1684
|
+
5. Update "Active Ideas" count
|
|
1234
1685
|
|
|
1235
1686
|
### Compost an Idea (from "compost this..." / "I dont want...")
|
|
1236
1687
|
1. Find idea in GARDEN.md (or accept new rejection)
|
|
1237
1688
|
2. Ask for rejection reason
|
|
1238
|
-
3. Add to COMPOST.md with
|
|
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
|
+
\`\`\`
|
|
1239
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
|
|
1240
1733
|
|
|
1241
1734
|
## Output Format
|
|
1242
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
|
+
\`\`\`
|
|
1243
2173
|
`,
|
|
1244
2174
|
};
|
|
1245
2175
|
|
|
@@ -1379,6 +2309,137 @@ Show a summary:
|
|
|
1379
2309
|
path.join(cwd, ".claude", "commands", "push.md"),
|
|
1380
2310
|
pushCommand,
|
|
1381
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
|
+
);
|
|
1382
2443
|
}
|
|
1383
2444
|
|
|
1384
2445
|
async function createSettings(cwd, answers) {
|
|
@@ -1423,7 +2484,7 @@ async function createSettings(cwd, answers) {
|
|
|
1423
2484
|
|
|
1424
2485
|
async function createProduceConfig(cwd, answers) {
|
|
1425
2486
|
const config = {
|
|
1426
|
-
version: "1.
|
|
2487
|
+
version: "1.2.0",
|
|
1427
2488
|
projectName: answers.projectName,
|
|
1428
2489
|
commands: {
|
|
1429
2490
|
test: answers.testCommand,
|
|
@@ -1434,7 +2495,7 @@ async function createProduceConfig(cwd, answers) {
|
|
|
1434
2495
|
storybook: answers.includeStorybook || false,
|
|
1435
2496
|
i18n: answers.includeI18n || false,
|
|
1436
2497
|
},
|
|
1437
|
-
audits: ["FARMHOUSE", "SECURITY", "PERFORMANCE", "ACCESSIBILITY", "CODE_QUALITY", "TESTS", "GARDEN", "COMPOST"],
|
|
2498
|
+
audits: ["FARMHOUSE", "SECURITY", "PERFORMANCE", "ACCESSIBILITY", "CODE_QUALITY", "TESTS", "GARDEN", "COMPOST", "RESEARCH"],
|
|
1438
2499
|
};
|
|
1439
2500
|
|
|
1440
2501
|
if (answers.includeStorybook) {
|