product-playbook 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.es.md +518 -0
- package/README.ja.md +519 -0
- package/README.ko.md +518 -0
- package/README.md +520 -0
- package/README.zh-CN.md +518 -0
- package/README.zh-TW.md +518 -0
- package/SKILL.md +244 -0
- package/commands/product-build.md +13 -0
- package/commands/product-dev.md +21 -0
- package/commands/product-full.md +13 -0
- package/commands/product-prd.md +14 -0
- package/commands/product-quick.md +13 -0
- package/commands/product-report.md +12 -0
- package/commands/product-revision.md +13 -0
- package/i18n/en/SKILL.md +245 -0
- package/i18n/en/commands/product-build.md +13 -0
- package/i18n/en/commands/product-dev.md +21 -0
- package/i18n/en/commands/product-full.md +13 -0
- package/i18n/en/commands/product-prd.md +14 -0
- package/i18n/en/commands/product-quick.md +13 -0
- package/i18n/en/commands/product-report.md +12 -0
- package/i18n/en/commands/product-revision.md +13 -0
- package/i18n/en/references/00-opportunity-check.md +44 -0
- package/i18n/en/references/01-strategy.md +90 -0
- package/i18n/en/references/02a-persona.md +57 -0
- package/i18n/en/references/02b-jtbd.md +125 -0
- package/i18n/en/references/02c-ost-journey.md +65 -0
- package/i18n/en/references/03-define.md +118 -0
- package/i18n/en/references/04a-prfaq.md +112 -0
- package/i18n/en/references/04b-solutions.md +269 -0
- package/i18n/en/references/04c-mvp.md +21 -0
- package/i18n/en/references/05a-northstar-aha.md +93 -0
- package/i18n/en/references/05b-pmf-gtm.md +102 -0
- package/i18n/en/references/05c-validation-spec.md +117 -0
- package/i18n/en/references/06-html-report.md +128 -0
- package/i18n/en/references/07a-handoff-core.md +152 -0
- package/i18n/en/references/07b-tasks-tickets.md +215 -0
- package/i18n/en/references/07c-architecture-setup.md +197 -0
- package/i18n/en/references/08-security-checklist.md +221 -0
- package/i18n/en/references/rules-build.md +152 -0
- package/i18n/en/references/rules-change-propagation.md +74 -0
- package/i18n/en/references/rules-commands.md +98 -0
- package/i18n/en/references/rules-context.md +291 -0
- package/i18n/en/references/rules-custom.md +63 -0
- package/i18n/en/references/rules-document-tools.md +126 -0
- package/i18n/en/references/rules-end-of-flow.md +150 -0
- package/i18n/en/references/rules-export-document.md +346 -0
- package/i18n/en/references/rules-file-integration.md +65 -0
- package/i18n/en/references/rules-full.md +66 -0
- package/i18n/en/references/rules-import-document.md +261 -0
- package/i18n/en/references/rules-product-type.md +14 -0
- package/i18n/en/references/rules-progress.md +60 -0
- package/i18n/en/references/rules-quick.md +29 -0
- package/i18n/en/references/rules-revision.md +64 -0
- package/i18n/es/SKILL.md +245 -0
- package/i18n/es/commands/product-build.md +13 -0
- package/i18n/es/commands/product-dev.md +21 -0
- package/i18n/es/commands/product-full.md +13 -0
- package/i18n/es/commands/product-prd.md +14 -0
- package/i18n/es/commands/product-quick.md +13 -0
- package/i18n/es/commands/product-report.md +12 -0
- package/i18n/es/commands/product-revision.md +13 -0
- package/i18n/es/references/00-opportunity-check.md +44 -0
- package/i18n/es/references/01-strategy.md +90 -0
- package/i18n/es/references/02a-persona.md +57 -0
- package/i18n/es/references/02b-jtbd.md +125 -0
- package/i18n/es/references/02c-ost-journey.md +65 -0
- package/i18n/es/references/03-define.md +118 -0
- package/i18n/es/references/04a-prfaq.md +114 -0
- package/i18n/es/references/04b-solutions.md +269 -0
- package/i18n/es/references/04c-mvp.md +21 -0
- package/i18n/es/references/05a-northstar-aha.md +93 -0
- package/i18n/es/references/05b-pmf-gtm.md +102 -0
- package/i18n/es/references/05c-validation-spec.md +117 -0
- package/i18n/es/references/06-html-report.md +138 -0
- package/i18n/es/references/07a-handoff-core.md +152 -0
- package/i18n/es/references/07b-tasks-tickets.md +215 -0
- package/i18n/es/references/07c-architecture-setup.md +197 -0
- package/i18n/es/references/08-security-checklist.md +221 -0
- package/i18n/es/references/rules-build.md +152 -0
- package/i18n/es/references/rules-change-propagation.md +74 -0
- package/i18n/es/references/rules-commands.md +98 -0
- package/i18n/es/references/rules-context.md +291 -0
- package/i18n/es/references/rules-custom.md +63 -0
- package/i18n/es/references/rules-document-tools.md +126 -0
- package/i18n/es/references/rules-end-of-flow.md +150 -0
- package/i18n/es/references/rules-export-document.md +346 -0
- package/i18n/es/references/rules-file-integration.md +65 -0
- package/i18n/es/references/rules-full.md +66 -0
- package/i18n/es/references/rules-import-document.md +261 -0
- package/i18n/es/references/rules-product-type.md +14 -0
- package/i18n/es/references/rules-progress.md +60 -0
- package/i18n/es/references/rules-quick.md +29 -0
- package/i18n/es/references/rules-revision.md +64 -0
- package/i18n/ja/SKILL.md +245 -0
- package/i18n/ja/commands/product-build.md +13 -0
- package/i18n/ja/commands/product-dev.md +21 -0
- package/i18n/ja/commands/product-full.md +13 -0
- package/i18n/ja/commands/product-prd.md +14 -0
- package/i18n/ja/commands/product-quick.md +13 -0
- package/i18n/ja/commands/product-report.md +12 -0
- package/i18n/ja/commands/product-revision.md +13 -0
- package/i18n/ja/references/00-opportunity-check.md +44 -0
- package/i18n/ja/references/01-strategy.md +90 -0
- package/i18n/ja/references/02a-persona.md +57 -0
- package/i18n/ja/references/02b-jtbd.md +125 -0
- package/i18n/ja/references/02c-ost-journey.md +65 -0
- package/i18n/ja/references/03-define.md +118 -0
- package/i18n/ja/references/04a-prfaq.md +111 -0
- package/i18n/ja/references/04b-solutions.md +269 -0
- package/i18n/ja/references/04c-mvp.md +21 -0
- package/i18n/ja/references/05a-northstar-aha.md +93 -0
- package/i18n/ja/references/05b-pmf-gtm.md +102 -0
- package/i18n/ja/references/05c-validation-spec.md +117 -0
- package/i18n/ja/references/06-html-report.md +126 -0
- package/i18n/ja/references/07a-handoff-core.md +152 -0
- package/i18n/ja/references/07b-tasks-tickets.md +215 -0
- package/i18n/ja/references/07c-architecture-setup.md +197 -0
- package/i18n/ja/references/08-security-checklist.md +221 -0
- package/i18n/ja/references/rules-build.md +152 -0
- package/i18n/ja/references/rules-change-propagation.md +74 -0
- package/i18n/ja/references/rules-commands.md +98 -0
- package/i18n/ja/references/rules-context.md +291 -0
- package/i18n/ja/references/rules-custom.md +63 -0
- package/i18n/ja/references/rules-document-tools.md +126 -0
- package/i18n/ja/references/rules-end-of-flow.md +150 -0
- package/i18n/ja/references/rules-export-document.md +346 -0
- package/i18n/ja/references/rules-file-integration.md +65 -0
- package/i18n/ja/references/rules-full.md +66 -0
- package/i18n/ja/references/rules-import-document.md +261 -0
- package/i18n/ja/references/rules-product-type.md +14 -0
- package/i18n/ja/references/rules-progress.md +60 -0
- package/i18n/ja/references/rules-quick.md +29 -0
- package/i18n/ja/references/rules-revision.md +64 -0
- package/i18n/ko/SKILL.md +245 -0
- package/i18n/ko/commands/product-build.md +13 -0
- package/i18n/ko/commands/product-dev.md +21 -0
- package/i18n/ko/commands/product-full.md +13 -0
- package/i18n/ko/commands/product-prd.md +14 -0
- package/i18n/ko/commands/product-quick.md +13 -0
- package/i18n/ko/commands/product-report.md +12 -0
- package/i18n/ko/commands/product-revision.md +13 -0
- package/i18n/ko/references/00-opportunity-check.md +44 -0
- package/i18n/ko/references/01-strategy.md +90 -0
- package/i18n/ko/references/02a-persona.md +57 -0
- package/i18n/ko/references/02b-jtbd.md +125 -0
- package/i18n/ko/references/02c-ost-journey.md +65 -0
- package/i18n/ko/references/03-define.md +118 -0
- package/i18n/ko/references/04a-prfaq.md +112 -0
- package/i18n/ko/references/04b-solutions.md +269 -0
- package/i18n/ko/references/04c-mvp.md +21 -0
- package/i18n/ko/references/05a-northstar-aha.md +93 -0
- package/i18n/ko/references/05b-pmf-gtm.md +102 -0
- package/i18n/ko/references/05c-validation-spec.md +117 -0
- package/i18n/ko/references/06-html-report.md +126 -0
- package/i18n/ko/references/07a-handoff-core.md +152 -0
- package/i18n/ko/references/07b-tasks-tickets.md +215 -0
- package/i18n/ko/references/07c-architecture-setup.md +197 -0
- package/i18n/ko/references/08-security-checklist.md +221 -0
- package/i18n/ko/references/rules-build.md +152 -0
- package/i18n/ko/references/rules-change-propagation.md +74 -0
- package/i18n/ko/references/rules-commands.md +98 -0
- package/i18n/ko/references/rules-context.md +291 -0
- package/i18n/ko/references/rules-custom.md +63 -0
- package/i18n/ko/references/rules-document-tools.md +126 -0
- package/i18n/ko/references/rules-end-of-flow.md +150 -0
- package/i18n/ko/references/rules-export-document.md +346 -0
- package/i18n/ko/references/rules-file-integration.md +65 -0
- package/i18n/ko/references/rules-full.md +66 -0
- package/i18n/ko/references/rules-import-document.md +261 -0
- package/i18n/ko/references/rules-product-type.md +14 -0
- package/i18n/ko/references/rules-progress.md +60 -0
- package/i18n/ko/references/rules-quick.md +29 -0
- package/i18n/ko/references/rules-revision.md +64 -0
- package/i18n/zh-CN/SKILL.md +245 -0
- package/i18n/zh-CN/commands/product-build.md +13 -0
- package/i18n/zh-CN/commands/product-dev.md +21 -0
- package/i18n/zh-CN/commands/product-full.md +13 -0
- package/i18n/zh-CN/commands/product-prd.md +14 -0
- package/i18n/zh-CN/commands/product-quick.md +13 -0
- package/i18n/zh-CN/commands/product-report.md +12 -0
- package/i18n/zh-CN/commands/product-revision.md +13 -0
- package/i18n/zh-CN/references/00-opportunity-check.md +44 -0
- package/i18n/zh-CN/references/01-strategy.md +90 -0
- package/i18n/zh-CN/references/02a-persona.md +57 -0
- package/i18n/zh-CN/references/02b-jtbd.md +125 -0
- package/i18n/zh-CN/references/02c-ost-journey.md +65 -0
- package/i18n/zh-CN/references/03-define.md +118 -0
- package/i18n/zh-CN/references/04a-prfaq.md +106 -0
- package/i18n/zh-CN/references/04b-solutions.md +269 -0
- package/i18n/zh-CN/references/04c-mvp.md +21 -0
- package/i18n/zh-CN/references/05a-northstar-aha.md +93 -0
- package/i18n/zh-CN/references/05b-pmf-gtm.md +102 -0
- package/i18n/zh-CN/references/05c-validation-spec.md +117 -0
- package/i18n/zh-CN/references/06-html-report.md +123 -0
- package/i18n/zh-CN/references/07a-handoff-core.md +152 -0
- package/i18n/zh-CN/references/07b-tasks-tickets.md +215 -0
- package/i18n/zh-CN/references/07c-architecture-setup.md +197 -0
- package/i18n/zh-CN/references/08-security-checklist.md +221 -0
- package/i18n/zh-CN/references/rules-build.md +152 -0
- package/i18n/zh-CN/references/rules-change-propagation.md +74 -0
- package/i18n/zh-CN/references/rules-commands.md +98 -0
- package/i18n/zh-CN/references/rules-context.md +291 -0
- package/i18n/zh-CN/references/rules-custom.md +63 -0
- package/i18n/zh-CN/references/rules-document-tools.md +126 -0
- package/i18n/zh-CN/references/rules-end-of-flow.md +150 -0
- package/i18n/zh-CN/references/rules-export-document.md +346 -0
- package/i18n/zh-CN/references/rules-file-integration.md +65 -0
- package/i18n/zh-CN/references/rules-full.md +66 -0
- package/i18n/zh-CN/references/rules-import-document.md +261 -0
- package/i18n/zh-CN/references/rules-product-type.md +14 -0
- package/i18n/zh-CN/references/rules-progress.md +60 -0
- package/i18n/zh-CN/references/rules-quick.md +29 -0
- package/i18n/zh-CN/references/rules-revision.md +64 -0
- package/i18n/zh-TW/SKILL.md +244 -0
- package/i18n/zh-TW/commands/product-build.md +13 -0
- package/i18n/zh-TW/commands/product-dev.md +21 -0
- package/i18n/zh-TW/commands/product-full.md +13 -0
- package/i18n/zh-TW/commands/product-prd.md +14 -0
- package/i18n/zh-TW/commands/product-quick.md +13 -0
- package/i18n/zh-TW/commands/product-report.md +12 -0
- package/i18n/zh-TW/commands/product-revision.md +13 -0
- package/i18n/zh-TW/references/00-opportunity-check.md +44 -0
- package/i18n/zh-TW/references/01-strategy.md +90 -0
- package/i18n/zh-TW/references/02a-persona.md +57 -0
- package/i18n/zh-TW/references/02b-jtbd.md +125 -0
- package/i18n/zh-TW/references/02c-ost-journey.md +65 -0
- package/i18n/zh-TW/references/03-define.md +118 -0
- package/i18n/zh-TW/references/04a-prfaq.md +106 -0
- package/i18n/zh-TW/references/04b-solutions.md +269 -0
- package/i18n/zh-TW/references/04c-mvp.md +21 -0
- package/i18n/zh-TW/references/05a-northstar-aha.md +93 -0
- package/i18n/zh-TW/references/05b-pmf-gtm.md +102 -0
- package/i18n/zh-TW/references/05c-validation-spec.md +117 -0
- package/i18n/zh-TW/references/06-html-report.md +123 -0
- package/i18n/zh-TW/references/07a-handoff-core.md +152 -0
- package/i18n/zh-TW/references/07b-tasks-tickets.md +215 -0
- package/i18n/zh-TW/references/07c-architecture-setup.md +197 -0
- package/i18n/zh-TW/references/08-security-checklist.md +221 -0
- package/i18n/zh-TW/references/rules-build.md +152 -0
- package/i18n/zh-TW/references/rules-change-propagation.md +74 -0
- package/i18n/zh-TW/references/rules-commands.md +98 -0
- package/i18n/zh-TW/references/rules-context.md +291 -0
- package/i18n/zh-TW/references/rules-custom.md +63 -0
- package/i18n/zh-TW/references/rules-document-tools.md +126 -0
- package/i18n/zh-TW/references/rules-end-of-flow.md +150 -0
- package/i18n/zh-TW/references/rules-export-document.md +346 -0
- package/i18n/zh-TW/references/rules-file-integration.md +65 -0
- package/i18n/zh-TW/references/rules-full.md +66 -0
- package/i18n/zh-TW/references/rules-import-document.md +261 -0
- package/i18n/zh-TW/references/rules-product-type.md +14 -0
- package/i18n/zh-TW/references/rules-progress.md +60 -0
- package/i18n/zh-TW/references/rules-quick.md +29 -0
- package/i18n/zh-TW/references/rules-revision.md +64 -0
- package/install.sh +418 -0
- package/package.json +41 -0
- package/references/00-opportunity-check.md +44 -0
- package/references/01-strategy.md +90 -0
- package/references/02a-persona.md +57 -0
- package/references/02b-jtbd.md +125 -0
- package/references/02c-ost-journey.md +65 -0
- package/references/03-define.md +118 -0
- package/references/04a-prfaq.md +106 -0
- package/references/04b-solutions.md +269 -0
- package/references/04c-mvp.md +21 -0
- package/references/05a-northstar-aha.md +93 -0
- package/references/05b-pmf-gtm.md +102 -0
- package/references/05c-validation-spec.md +117 -0
- package/references/06-html-report.md +123 -0
- package/references/07a-handoff-core.md +152 -0
- package/references/07b-tasks-tickets.md +215 -0
- package/references/07c-architecture-setup.md +197 -0
- package/references/08-security-checklist.md +221 -0
- package/references/rules-build.md +152 -0
- package/references/rules-change-propagation.md +74 -0
- package/references/rules-commands.md +98 -0
- package/references/rules-context.md +291 -0
- package/references/rules-custom.md +63 -0
- package/references/rules-document-tools.md +126 -0
- package/references/rules-end-of-flow.md +150 -0
- package/references/rules-export-document.md +346 -0
- package/references/rules-file-integration.md +65 -0
- package/references/rules-full.md +66 -0
- package/references/rules-import-document.md +261 -0
- package/references/rules-product-type.md +14 -0
- package/references/rules-progress.md +60 -0
- package/references/rules-quick.md +29 -0
- package/references/rules-revision.md +64 -0
- package/references/templates/prd-style.css +464 -0
- package/references/templates/report-style.css +114 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# 🔧 Framework Menu + Supplementary Commands
|
|
2
|
+
|
|
3
|
+
> Loaded when the user requests "list frameworks," "show me the available frameworks," or uses a supplementary command.
|
|
4
|
+
|
|
5
|
+
## Specify a Framework
|
|
6
|
+
|
|
7
|
+
**Two ways to trigger:**
|
|
8
|
+
|
|
9
|
+
**Method A (User directly names a framework):** Go straight into that framework's guided flow — no need to ask again.
|
|
10
|
+
|
|
11
|
+
**Method B (User says "I want to pick a framework," "list all frameworks," etc.):** Present the following menu:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
📚 Available frameworks — enter a number or name:
|
|
15
|
+
|
|
16
|
+
【Understanding Users】
|
|
17
|
+
1. JTBD (Jobs to Be Done) — Identify the job users truly want to accomplish
|
|
18
|
+
2. Persona — Build usage/task/motivation-driven user profiles
|
|
19
|
+
3. User Journey Map — Map the complete user experience journey
|
|
20
|
+
4. Continuous Discovery — Build a weekly habit of engaging with users
|
|
21
|
+
|
|
22
|
+
【Defining the Problem】
|
|
23
|
+
5. OST / Opportunity Solution Tree — Systematically link opportunities to solutions
|
|
24
|
+
6. Positioning / April Dunford — Find the real competitive arena and differentiation
|
|
25
|
+
7. HMW — Reframe pain points as design questions
|
|
26
|
+
|
|
27
|
+
【Solution Design】
|
|
28
|
+
8. Working Backwards / PR-FAQ — Start from user outcomes and work backwards to the solution
|
|
29
|
+
9. Pre-mortem — Predict and prevent failure before it happens
|
|
30
|
+
10. GEM — Growth / Engagement / Monetization three-dimensional prioritization
|
|
31
|
+
11. RICE — Quantitative feature prioritization
|
|
32
|
+
12. MVP — Define minimum viable product scope
|
|
33
|
+
|
|
34
|
+
【Strategy Layer】
|
|
35
|
+
13. Strategy / Strategy Blocks — Mission → Vision → Strategy hierarchy
|
|
36
|
+
14. DHM Model — Delight / Hard to copy / Margin-enhancing opportunity assessment
|
|
37
|
+
15. LNO Framework — Leverage / Neutral / Overhead time allocation
|
|
38
|
+
16. Empowered Teams — Empowered teams vs. feature teams
|
|
39
|
+
|
|
40
|
+
【Measurement Layer】
|
|
41
|
+
17. North Star / North Star Metric — Define the single metric representing core user value
|
|
42
|
+
18. PMF — Four levels of Product-Market Fit assessment
|
|
43
|
+
19. Sean Ellis Score — Quantify PMF enthusiasm level
|
|
44
|
+
|
|
45
|
+
【Business Layer】
|
|
46
|
+
20. Business Model & Pricing — Revenue model selection and value-based pricing alignment
|
|
47
|
+
21. GTM Strategy — Go-to-Market launch and customer acquisition strategy
|
|
48
|
+
|
|
49
|
+
【Dev Handoff】
|
|
50
|
+
22. Dev Handoff — Generate CLAUDE.md + TASKS.md + TICKETS.md to hand off to Claude Code for development
|
|
51
|
+
|
|
52
|
+
Enter a framework number or name (multiple selections allowed, separated by commas):
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Skip Discovery / Go Straight to Build
|
|
56
|
+
|
|
57
|
+
When the user says "skip user research," "problem is already known," "go straight to Develop," read `references/rules-build.md` and follow the Build Mode step sequence.
|
|
58
|
+
|
|
59
|
+
> Remind the user: "Skipping the user research phase means your solution is built on assumptions. We recommend conducting Continuous Discovery as soon as possible after execution to validate."
|
|
60
|
+
|
|
61
|
+
## Feature Extension Mode Trigger
|
|
62
|
+
|
|
63
|
+
- "Add a feature" / "I want to add a new feature" / "new feature for existing product" → triggers Feature Extension Mode (reads `references/rules-build.md` → Feature Extension Quick Path)
|
|
64
|
+
|
|
65
|
+
## Supplementary Commands
|
|
66
|
+
|
|
67
|
+
| Command | Behavior |
|
|
68
|
+
|---------|----------|
|
|
69
|
+
| `"Switch to [framework]"` | Switch immediately, preserving completed content |
|
|
70
|
+
| `"I want to change the target audience"` | Re-adjust framework priority and presentation style |
|
|
71
|
+
| `"Skip this step"` | Remind of necessity, then respect the decision and move to the next step |
|
|
72
|
+
| `"Go back to [step/framework name]"` | Return to the specified step for re-guidance (see `references/rules-change-propagation.md`) |
|
|
73
|
+
| `"Simplify"` / `"Expand"` | Condense to key points / Add in-depth analysis |
|
|
74
|
+
| `"Generate report"` | Read `references/06-html-report.md`, produce an HTML planning report |
|
|
75
|
+
| `"Generate PRD"` / `"Generate engineer docs"` | Read `references/04b-solutions.md`, integrate PR-FAQ + MVP + User Story + Pre-mortem, **automatically also generate: flowchart (Mermaid) + DB schema (Mermaid ERD) + UI wireframe (HTML)** |
|
|
76
|
+
| `"Generate flowchart"` / `"Draw me a flowchart"` | Output a flowchart in Mermaid syntax (standalone trigger) |
|
|
77
|
+
| `"Generate DB schema"` / `"Design the database"` | Output a DB schema in Mermaid ERD syntax (standalone trigger) |
|
|
78
|
+
| `"Generate UI wireframe"` / `"Draw me a wireframe"` | Output a low-fidelity UI wireframe in HTML/SVG (standalone trigger) |
|
|
79
|
+
| `"Generate presentation"` / `"Make a PPT"` | Invoke the system pptx skill |
|
|
80
|
+
| `"Adapt this document for [audience]"` | Re-organize framework highlights and language for the specified audience |
|
|
81
|
+
| `"I only have 15 minutes"` | Provide the three most critical decision questions or actions |
|
|
82
|
+
| `"Run a completeness assessment"` | Assess which areas are solid and which carry risk |
|
|
83
|
+
| `"Help me find the assumptions"` | Identify all unvalidated core assumptions |
|
|
84
|
+
| `"Run a Pre-mortem"` | Immediately run a pre-mortem on any solution |
|
|
85
|
+
| `"Generate versions for different audiences"` | Automatically produce summaries tailored to multiple audiences |
|
|
86
|
+
| `"What PMF level is this product at?"` | Determine the PMF level and explain the next milestone |
|
|
87
|
+
| `"Help me find the bottleneck"` | Analyze the biggest obstacle to achieving the Aha Moment |
|
|
88
|
+
| `"This is a revision, not a new product"` | Switch to Revision Mode (read `references/rules-revision.md`) |
|
|
89
|
+
| `"I need to convince my boss to approve"` | Switch to Boss Mode — emphasize business value and resource logic |
|
|
90
|
+
| `"Start development"` / `"Generate dev handoff package"` | Read `references/07a-handoff-core.md`, confirm tech stack, then generate the full dev handoff package |
|
|
91
|
+
| `"Set up the project"` / `"Connect to Claude Code"` | Same as above |
|
|
92
|
+
| `"Pause"` / `"Save"` / `"Do something else first"` | Save progress per `references/rules-progress.md` |
|
|
93
|
+
| `"Continue"` / `"Back to planning"` | Resume per `references/rules-progress.md` |
|
|
94
|
+
| `"Clear progress"` / `"Start over"` | Delete progress file and start from scratch |
|
|
95
|
+
| `/export [format]` | Export to specified format. format = `pdf` / `docx` / `pptx` / `html` / `md`. Read `references/rules-export-document.md`. On first use, load `references/rules-document-tools.md` first to check tools. |
|
|
96
|
+
| `/parse [file]` | Parse an uploaded document to Markdown. Supports PDF / DOCX / PPTX / images. Read `references/rules-import-document.md`. On first use, load `references/rules-document-tools.md` first to check tools. |
|
|
97
|
+
|
|
98
|
+
**Context-aware command hints**: After each step is completed, proactively suggest 2-3 of the most relevant available commands based on the current progress.
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# 📦 Product Context Accumulation Rules
|
|
2
|
+
|
|
3
|
+
> This file defines the format, read/write rules, scenario handling, and conflict resolution for `.product-context.md`.
|
|
4
|
+
> Loaded by the SKILL.md startup flow or by each mode's S1 pre-step.
|
|
5
|
+
|
|
6
|
+
## 1. File Location & Lifecycle
|
|
7
|
+
|
|
8
|
+
- **Path**: `.product-context.md` in the project root directory (same level as `.product-playbook-progress.md`)
|
|
9
|
+
- **Permanently retained**: This file is **not deleted** when the flow ends — it persists and accumulates across sessions
|
|
10
|
+
- **On first creation**, remind the user: "⚠️ We recommend adding `.product-context.md` to `.gitignore` — this file may contain sensitive product strategy information."
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 2. File Format
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
# Product Context
|
|
18
|
+
<!-- Auto-maintained by product-playbook. Do not delete. -->
|
|
19
|
+
<!-- last-updated: [ISO timestamp] -->
|
|
20
|
+
|
|
21
|
+
## Identity
|
|
22
|
+
- **Product name**: [name]
|
|
23
|
+
- **Product type**: [B2C / B2B / B2B2C / Internal tool]
|
|
24
|
+
- **One-liner**: [One-sentence description]
|
|
25
|
+
- **Target audience**: [Primary Persona summary]
|
|
26
|
+
|
|
27
|
+
## Core Strategy
|
|
28
|
+
- **Core JTBD**: [Target Customer] + wants to [Job] + in [Context]
|
|
29
|
+
- Functional: [...]
|
|
30
|
+
- Emotional: [...]
|
|
31
|
+
- Social: [...]
|
|
32
|
+
- **Positioning (April Dunford)**:
|
|
33
|
+
- Real competitive alternatives: [...]
|
|
34
|
+
- Unique attributes: [...]
|
|
35
|
+
- Core value: [...]
|
|
36
|
+
- Target market: [...]
|
|
37
|
+
- Market category: [...]
|
|
38
|
+
- **North Star Metric**: [Metric name + definition]
|
|
39
|
+
- **Aha Moment**: [Description]
|
|
40
|
+
|
|
41
|
+
## Architecture & Tech Stack
|
|
42
|
+
- **Tech stack**: [Languages, frameworks, infrastructure]
|
|
43
|
+
- **Key modules**: [List of key modules]
|
|
44
|
+
- **Data model highlights**: [Core data entities, if known]
|
|
45
|
+
|
|
46
|
+
## Decision History
|
|
47
|
+
<!-- Append-only. Add one entry each time a flow is completed. -->
|
|
48
|
+
|
|
49
|
+
### [ISO date] - [Flow type: Full/Quick/Revision/Feature Extension/Custom/Build]
|
|
50
|
+
- **Scope**: [Planning/change scope]
|
|
51
|
+
- **Key decisions**: [Major decisions]
|
|
52
|
+
- **Risks identified**: [Risks]
|
|
53
|
+
- **MVP boundary**: [What to do / What not to do]
|
|
54
|
+
- **Success metrics**: [Success metrics + target values]
|
|
55
|
+
|
|
56
|
+
## Language Preference
|
|
57
|
+
- **Installed language**: [auto-detected from .lang file or user's language]
|
|
58
|
+
- **User's preferred language**: [the language the user communicates in]
|
|
59
|
+
|
|
60
|
+
## Accumulated Insights
|
|
61
|
+
- **Known pain points**: [Pain point list, with sources]
|
|
62
|
+
- **User feedback themes**: [Feedback themes across sessions]
|
|
63
|
+
- **PMF status**: [Most recent assessment level + date]
|
|
64
|
+
- **Security posture**: [Auth/authorization methods, known vulnerabilities]
|
|
65
|
+
- **Technical debt**: [Technical debt accumulated across sessions]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 3. Three Scenario Detection
|
|
71
|
+
|
|
72
|
+
At startup (after progress file check, before mode selection), detect the state of `.product-context.md`:
|
|
73
|
+
|
|
74
|
+
| Condition | Scenario | Action |
|
|
75
|
+
|-----------|----------|--------|
|
|
76
|
+
| File exists, `Core Strategy` section has actual content (not empty / not placeholder) | **Scenario 1: Complete context** | Silently load. Display: "📦 Detected product context for **[product name]** — it will serve as the baseline for this planning session." |
|
|
77
|
+
| File does not exist | **Scenario 2: No context** | Record this state. Trigger Context Bootstrap when entering Feature Extension or Revision Mode (see Section 4) |
|
|
78
|
+
| File exists, `Core Strategy` is blank or contains only placeholders, but `Decision History` has at least one entry | **Scenario 3: Partial context** | Display a summary of known information and offer supplementation options (see Section 5) |
|
|
79
|
+
|
|
80
|
+
**Detection logic**:
|
|
81
|
+
1. Does the file exist?
|
|
82
|
+
2. Does the `Identity` section have a Product name (not a placeholder)?
|
|
83
|
+
3. Does the `Core Strategy` section have a Core JTBD (not a placeholder)? → Yes = Scenario 1
|
|
84
|
+
4. Does the `Decision History` section have any `###` entries? → Yes but 3 is No = Scenario 3
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 4. Context Bootstrap (Scenario 2 Only)
|
|
89
|
+
|
|
90
|
+
When the user enters **Feature Extension** or **Revision Mode** but there is no `.product-context.md`, insert "Step 0" before the mode's S1.
|
|
91
|
+
|
|
92
|
+
**Presentation**:
|
|
93
|
+
```
|
|
94
|
+
📦 This is your first time using the product planning tool in this project. To make the subsequent flow more efficient,
|
|
95
|
+
I'll collect some basic product information first (about 2-3 minutes). It will be saved automatically for future use.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Progressive Collection (do not ask all questions at once)
|
|
99
|
+
|
|
100
|
+
**Round 1 (required for all modes)**:
|
|
101
|
+
- What is the product called?
|
|
102
|
+
- Describe what it does in one sentence.
|
|
103
|
+
- Product type? (B2C / B2B / B2B2C / Internal tool)
|
|
104
|
+
|
|
105
|
+
**Round 2 (required for Feature Extension, optional for Revision)**:
|
|
106
|
+
- What tech stack do you use? (Languages, frameworks, databases, infrastructure)
|
|
107
|
+
- What are the key modules or services?
|
|
108
|
+
|
|
109
|
+
**Round 3 (required for Revision, optional for Feature Extension)**:
|
|
110
|
+
- Do you have DAU/MAU or retention rate data?
|
|
111
|
+
- What is the most common user feedback or complaint?
|
|
112
|
+
- Are there any known security issues or technical debt?
|
|
113
|
+
|
|
114
|
+
### Tech Stack Auto-Detection
|
|
115
|
+
|
|
116
|
+
In addition to the user's verbal input, Bootstrap can **read project files** to assist detection (read-only — does not violate the Hard Gate):
|
|
117
|
+
|
|
118
|
+
| File | Detection Content |
|
|
119
|
+
|------|------------------|
|
|
120
|
+
| `package.json` | Node.js ecosystem, frameworks, dependencies |
|
|
121
|
+
| `Cargo.toml` | Rust |
|
|
122
|
+
| `go.mod` | Go |
|
|
123
|
+
| `requirements.txt` / `pyproject.toml` | Python |
|
|
124
|
+
| `Dockerfile` / `docker-compose.yml` | Containerized architecture |
|
|
125
|
+
| Project root directory structure (`src/`, `app/`, `lib/`, etc.) | Module inference |
|
|
126
|
+
|
|
127
|
+
After detection, present in **confirmation style**:
|
|
128
|
+
```
|
|
129
|
+
I detected that your project uses:
|
|
130
|
+
- Tech stack: Next.js 14 + TypeScript + PostgreSQL + Redis
|
|
131
|
+
- Key modules: auth/, billing/, dashboard/, api/
|
|
132
|
+
Is this correct? Anything to add or correct?
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Only write to `.product-context.md` after the user confirms.
|
|
136
|
+
|
|
137
|
+
### After Bootstrap Completion
|
|
138
|
+
|
|
139
|
+
Write the collected information to `.product-context.md`, leave uncollected sections empty (using placeholders), then proceed to the mode's formal S1.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. Partial Context Handling (Scenario 3)
|
|
144
|
+
|
|
145
|
+
When `.product-context.md` exists but Core Strategy is empty, with only Decision History entries:
|
|
146
|
+
|
|
147
|
+
**Presentation**:
|
|
148
|
+
```
|
|
149
|
+
📦 I have records from your previous [N] planning sessions:
|
|
150
|
+
- Tech stack: [Known stack merged from Decision History]
|
|
151
|
+
- Previously modified modules: [Affected modules merged from Decision History]
|
|
152
|
+
- Core product strategy has not been recorded yet.
|
|
153
|
+
|
|
154
|
+
Would you like to:
|
|
155
|
+
1️⃣ Start directly (use known information, skip strategy section)
|
|
156
|
+
2️⃣ Fill in strategy information first (JTBD, Positioning, North Star Metric)
|
|
157
|
+
3️⃣ This information is incorrect — let me fix it
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Auto-rebuild attempt**: Scan all Decision History entries, extract recurring product names, tech stacks, and module names from `Affected modules`, `Scope`, and `Key decisions`, and auto-fill into `Architecture & Tech Stack`. Mark with `<!-- inferred from decision history -->` to indicate the inferred source.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 6. Context Auto-Read Rules
|
|
165
|
+
|
|
166
|
+
When loading context at each mode's S1 pre-step, **only inject relevant sections** — do not display the full file contents to the user:
|
|
167
|
+
|
|
168
|
+
| Mode + Step | Injected Context Sections |
|
|
169
|
+
|-------------|--------------------------|
|
|
170
|
+
| Feature Extension S1 | Identity, Architecture & Tech Stack, 3 most recent Decision History entries |
|
|
171
|
+
| Revision S1 | Identity, Core Strategy, Accumulated Insights (pain points, PMF, security), 3 most recent Decision History entries |
|
|
172
|
+
| Full/Quick/Build S1 | Identity only (product name, type, one-liner) |
|
|
173
|
+
| Pre-mortem in any mode | Security posture + Technical debt (from Accumulated Insights) |
|
|
174
|
+
|
|
175
|
+
**Bloat control**: Decision History defaults to injecting only the 3 most recent entries. The user can request more.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 7. Empty Sections Skip Rules
|
|
180
|
+
|
|
181
|
+
When the context file exists but some sections are empty, determine whether to skip or collect based on the **mode**:
|
|
182
|
+
|
|
183
|
+
| Section | Feature Extension | Revision Mode | Full/Quick/Build |
|
|
184
|
+
|---------|------------------|---------------|-----------------|
|
|
185
|
+
| Identity | Required (Bootstrap if missing) | Required (Bootstrap if missing) | The flow itself will produce this — no pre-loading needed |
|
|
186
|
+
| Core Strategy | **Can skip** | Required (quick Q&A collection within S1 if missing) | The flow itself will produce this |
|
|
187
|
+
| Architecture & Tech Stack | Required (Bootstrap or auto-detect if missing) | Can skip | The flow itself will produce this |
|
|
188
|
+
| Decision History | Can skip | Include if available, skip if not | The flow itself will produce this |
|
|
189
|
+
| Accumulated Insights | Can skip | Include if available, skip if not | The flow itself will produce this |
|
|
190
|
+
|
|
191
|
+
| Feature Extension | Identity (confirm only), Architecture & Tech Stack (required), Core Strategy (skip allowed) |
|
|
192
|
+
|
|
193
|
+
**Principle**: Empty sections **do not block the flow**. Only sections that are "required" for the current mode and are empty will trigger collection.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 8. Context Auto-Write Rules (Extraction at Flow End)
|
|
198
|
+
|
|
199
|
+
At the end of a flow (in sync with the end condition check in `rules-end-of-flow.md`), automatically extract context:
|
|
200
|
+
|
|
201
|
+
| Flow Type | Sections Written/Updated |
|
|
202
|
+
|-----------|-------------------------|
|
|
203
|
+
| Quick | Identity, Core Strategy (JTBD + North Star), append to Decision History |
|
|
204
|
+
| Full | **All sections** (overwrite Identity/Strategy/Insights, append to History) |
|
|
205
|
+
| Revision | Update Core Strategy (if repositioned), update Insights, append to History |
|
|
206
|
+
| Feature Extension | Merge Architecture, append to Decision History (feature-specific template) |
|
|
207
|
+
| Custom | Update sections corresponding to completed steps |
|
|
208
|
+
| Build (7 steps) | Identity, Core Strategy (partial), append to History |
|
|
209
|
+
|
|
210
|
+
### Write Strategy
|
|
211
|
+
|
|
212
|
+
| Section | Strategy | Notes |
|
|
213
|
+
|---------|----------|-------|
|
|
214
|
+
| Identity | **Overwrite with latest** | Always overwrite with the most recent flow's data |
|
|
215
|
+
| Core Strategy | **Overwrite with latest** | Same as above. Post-revision strategy replaces pre-revision strategy |
|
|
216
|
+
| Architecture & Tech Stack | **Merge** | New modules are added without deleting old ones. New tech items are appended |
|
|
217
|
+
| Decision History | **Append only** | Never delete previous entries. Append one entry each time a flow is completed |
|
|
218
|
+
| Accumulated Insights | **Merge and deduplicate** | Pain points and feedback themes are deduplicated and appended. PMF and Security are overwritten with latest values |
|
|
219
|
+
|
|
220
|
+
### Decision History Append Template
|
|
221
|
+
|
|
222
|
+
**General template**:
|
|
223
|
+
```markdown
|
|
224
|
+
### [ISO date] - [Flow type]
|
|
225
|
+
- **Scope**: [...]
|
|
226
|
+
- **Key decisions**: [...]
|
|
227
|
+
- **Risks identified**: [...]
|
|
228
|
+
- **MVP boundary**: [...]
|
|
229
|
+
- **Success metrics**: [...]
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Feature Extension template**:
|
|
233
|
+
```markdown
|
|
234
|
+
### [ISO date] - Feature Extension: [Feature name]
|
|
235
|
+
- **Problem**: [One-sentence problem statement]
|
|
236
|
+
- **Chosen solution**: [Selected solution + rationale]
|
|
237
|
+
- **Affected modules**: [Affected modules]
|
|
238
|
+
- **Scope**: [What to do / What not to touch]
|
|
239
|
+
- **Acceptance criteria**: [Acceptance criteria]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Completion Notification
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
✅ Product context has been updated in `.product-context.md` — it will be automatically loaded in your next planning session.
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 9. Conflict Resolution
|
|
251
|
+
|
|
252
|
+
### User corrects existing context
|
|
253
|
+
|
|
254
|
+
Fully allowed. User-provided corrections directly overwrite the corresponding section (latest wins).
|
|
255
|
+
|
|
256
|
+
### User-provided data conflicts with codebase
|
|
257
|
+
|
|
258
|
+
When the S1 pre-step reads both `.product-context.md` and project files (e.g., `package.json`) and finds inconsistencies:
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
⚠️ Inconsistency detected:
|
|
262
|
+
- Context records: [value from context]
|
|
263
|
+
- Project codebase: [value detected from code]
|
|
264
|
+
Which one is correct?
|
|
265
|
+
1️⃣ Use codebase as source of truth (update context)
|
|
266
|
+
2️⃣ Use context as source of truth (may be in the middle of a migration)
|
|
267
|
+
3️⃣ Both are incomplete — let me explain
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Handling principles**:
|
|
271
|
+
- **Do not auto-overwrite** — let the user decide
|
|
272
|
+
- Update `.product-context.md` after the user chooses
|
|
273
|
+
- If "in the middle of a migration" is selected, annotate in the Architecture section: `[Migrating] React → Vue 3`
|
|
274
|
+
- Log the conflict in Decision History
|
|
275
|
+
|
|
276
|
+
### New data from the flow overrides context
|
|
277
|
+
|
|
278
|
+
If data produced during a flow differs from old data in the context (e.g., Revision Mode redefines the JTBD), **flow data takes priority**. It is automatically overwritten at the end of the flow.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 10. Language Preference
|
|
283
|
+
|
|
284
|
+
When `.product-context.md` is created or updated, record the language preference in the `Language Preference` section:
|
|
285
|
+
|
|
286
|
+
- **Installed language**: Detected from the `.lang` file in the skill installation directory, or from the user's locale.
|
|
287
|
+
- **User's preferred language**: The language the user communicates in during the session.
|
|
288
|
+
|
|
289
|
+
**Loading rule**: When loading an existing `.product-context.md`, if a language preference is recorded, continue the session in that language.
|
|
290
|
+
|
|
291
|
+
**Write timing**: Language preference is written during Context Bootstrap (Section 4) or at the end of the first flow that creates the context file. It is updated whenever the user explicitly switches language mid-session.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# ✏️ Custom Mode Step Sequence
|
|
2
|
+
|
|
3
|
+
> This file is the authoritative step definition for Custom Mode. Loaded by the SKILL.md core dispatcher.
|
|
4
|
+
|
|
5
|
+
Based on the user's selected completeness level:
|
|
6
|
+
|
|
7
|
+
## 🔴 Low (Lean) — 4 Steps
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
S1. JTBD statement → load references/02b-jtbd.md
|
|
11
|
+
S2. One HMW → load references/03-define.md → 2.3
|
|
12
|
+
S3. PR-FAQ → load references/04a-prfaq.md
|
|
13
|
+
S4. North Star → load references/05a-northstar-aha.md
|
|
14
|
+
(Any step can be swapped by the user for a different framework)
|
|
15
|
+
────
|
|
16
|
+
Final Output → Product spec summary (unexecuted fields marked "Not executed")
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 🟡 Medium (Standard) — 10 Steps
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
S1. Persona Table + Persona Card → load references/02a-persona.md
|
|
23
|
+
S2. JTBD Analysis → load references/02b-jtbd.md
|
|
24
|
+
S3. Pain Point Summary Table → load references/03-define.md
|
|
25
|
+
S4. HMW Question Reframing → load references/03-define.md
|
|
26
|
+
S5. April Dunford Positioning → load references/03-define.md
|
|
27
|
+
S6. PR-FAQ → load references/04a-prfaq.md
|
|
28
|
+
S7. Parallel Solutions + MVP + Not Doing List → load references/04b-solutions.md + references/04c-mvp.md
|
|
29
|
+
S8. North Star + Three-Layer Signals + Aha Moment → load references/05a-northstar-aha.md
|
|
30
|
+
S9. PMF Level Assessment → load references/05b-pmf-gtm.md
|
|
31
|
+
S10. Product Spec Summary → load references/05c-validation-spec.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🟢 High (Comprehensive) — 16 Steps
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
S1. Strategy Blocks + Rumelt → load references/01-strategy.md
|
|
38
|
+
S2. Persona Table + Persona Card → load references/02a-persona.md
|
|
39
|
+
S3. JTBD Analysis → load references/02b-jtbd.md
|
|
40
|
+
S4. OST Opportunity Solution Tree → load references/02c-ost-journey.md
|
|
41
|
+
S5. User Journey Map → load references/02c-ost-journey.md
|
|
42
|
+
S6. Pain Point Summary Table → load references/03-define.md
|
|
43
|
+
S7. HMW + April Dunford Positioning → load references/03-define.md
|
|
44
|
+
S8. Opportunity Assessment Table → load references/03-define.md
|
|
45
|
+
S9. PR-FAQ → load references/04a-prfaq.md
|
|
46
|
+
S10. Parallel Prototypes → load references/04b-solutions.md
|
|
47
|
+
S11. Pre-mortem → load references/04b-solutions.md
|
|
48
|
+
S12. GEM + RICE → load references/04b-solutions.md
|
|
49
|
+
S13. MVP + Not Doing List → load references/04c-mvp.md
|
|
50
|
+
S14. North Star + Three-Layer Signals + Aha Moment → load references/05a-northstar-aha.md
|
|
51
|
+
S15. Hypothesis Validation Plan → load references/05c-validation-spec.md
|
|
52
|
+
S16. Product Spec Summary → load references/05c-validation-spec.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Reference Loading Rules
|
|
56
|
+
|
|
57
|
+
When entering each step, only load the corresponding reference file (do not pre-load all files). Each step above has its reference path annotated.
|
|
58
|
+
|
|
59
|
+
## Final Output Format
|
|
60
|
+
|
|
61
|
+
**Product Spec Summary** (only integrates completed steps; unexecuted fields are marked "Not executed")
|
|
62
|
+
|
|
63
|
+
Upon completion, execute end-of-flow rules per `references/rules-end-of-flow.md`.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Document Conversion Tool Dependency Management
|
|
2
|
+
|
|
3
|
+
> Loaded on first trigger of `/export` or `/parse` command.
|
|
4
|
+
|
|
5
|
+
## Dependency Tiers
|
|
6
|
+
|
|
7
|
+
| Tier | Tool | Purpose | Installation | Size |
|
|
8
|
+
|------|------|---------|-------------|------|
|
|
9
|
+
| **Core (Zero Install)** | Claude Read tool (Vision) | PDF semantic parsing | Built-in | 0 |
|
|
10
|
+
| **Core (Zero Install)** | Playwright MCP | PDF rendering | Built-in | 0 |
|
|
11
|
+
| **Basic** | pymupdf (fitz) | PDF text extraction + image rendering | `pip3 install --break-system-packages pymupdf` | ~23MB |
|
|
12
|
+
| **Basic** | pikepdf | PDF bookmark injection + metadata | `pip3 install --break-system-packages pikepdf` | ~5MB |
|
|
13
|
+
| **Extended** | pandoc | DOCX / PPTX conversion | `brew install pandoc` | ~50MB |
|
|
14
|
+
| **Fallback** | tesseract + chi_tra | Offline OCR (when Vision is unavailable) | `brew install tesseract tesseract-lang` | ~150MB |
|
|
15
|
+
| **Advanced** | python-docx | High-quality DOCX output | `pip3 install --break-system-packages python-docx` | ~5MB |
|
|
16
|
+
|
|
17
|
+
## Startup Detection Flow
|
|
18
|
+
|
|
19
|
+
When the user first triggers a document conversion feature, detect and install as needed in the following order:
|
|
20
|
+
|
|
21
|
+
### Step 1: Determine Which Tools Are Needed
|
|
22
|
+
|
|
23
|
+
| User Action | Required Tools |
|
|
24
|
+
|-------------|---------------|
|
|
25
|
+
| `/export pdf` | pymupdf + pikepdf + Playwright MCP |
|
|
26
|
+
| `/export docx` or `/export pptx` | pandoc |
|
|
27
|
+
| `/parse [PDF file]` | pymupdf (+ Claude Vision or tesseract) |
|
|
28
|
+
| `/parse [DOCX/PPTX file]` | pandoc |
|
|
29
|
+
|
|
30
|
+
### Step 2: Detect Installed Tools
|
|
31
|
+
|
|
32
|
+
Run the following Bash commands (silent detection, no output displayed):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# pymupdf
|
|
36
|
+
python3 -c "import fitz; print(fitz.version)" 2>/dev/null && echo "pymupdf: OK" || echo "pymupdf: MISSING"
|
|
37
|
+
|
|
38
|
+
# pikepdf
|
|
39
|
+
python3 -c "import pikepdf; print(pikepdf.__version__)" 2>/dev/null && echo "pikepdf: OK" || echo "pikepdf: MISSING"
|
|
40
|
+
|
|
41
|
+
# pandoc
|
|
42
|
+
which pandoc >/dev/null 2>&1 && echo "pandoc: OK" || echo "pandoc: MISSING"
|
|
43
|
+
|
|
44
|
+
# tesseract (only detect when explicitly needed)
|
|
45
|
+
which tesseract >/dev/null 2>&1 && tesseract --list-langs 2>&1 | grep -q chi_tra && echo "tesseract: OK" || echo "tesseract: MISSING"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 3: Auto-Install Missing Tools
|
|
49
|
+
|
|
50
|
+
If missing tools are detected, display the following message and install automatically:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
📦 Document conversion requires the following tools:
|
|
54
|
+
☐ [Tool name] ([purpose], [size])
|
|
55
|
+
...
|
|
56
|
+
Installing, please wait...
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Run installation commands in sequence:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# pymupdf + pikepdf (install together)
|
|
63
|
+
pip3 install --break-system-packages pymupdf pikepdf
|
|
64
|
+
|
|
65
|
+
# pandoc
|
|
66
|
+
brew install pandoc
|
|
67
|
+
|
|
68
|
+
# tesseract (only when offline OCR is needed)
|
|
69
|
+
brew install tesseract tesseract-lang
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
After installation completes, display:
|
|
73
|
+
```
|
|
74
|
+
✅ Tool installation complete, continuing...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 4: Detect Playwright MCP
|
|
78
|
+
|
|
79
|
+
Playwright MCP is a core dependency for PDF rendering. Detection method:
|
|
80
|
+
|
|
81
|
+
1. Attempt to call `mcp__plugin_playwright_playwright__browser_run_code`
|
|
82
|
+
2. If MCP is available → use normally
|
|
83
|
+
3. If MCP is unavailable (not connected) → display:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
⚠️ Playwright MCP is not connected. PDF rendering requires the Playwright browser.
|
|
87
|
+
Please do one of the following:
|
|
88
|
+
1. Start Playwright MCP (recommended)
|
|
89
|
+
2. Or run ! npx playwright install chromium to install local Chromium
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Playwright Fallback** (when MCP is unavailable):
|
|
93
|
+
|
|
94
|
+
If the user has installed local Chromium, use Bash to run a Node.js script for PDF rendering:
|
|
95
|
+
```bash
|
|
96
|
+
node -e "
|
|
97
|
+
const { chromium } = require('playwright');
|
|
98
|
+
(async () => {
|
|
99
|
+
const browser = await chromium.launch();
|
|
100
|
+
const page = await browser.newPage();
|
|
101
|
+
await page.setContent(require('fs').readFileSync('/tmp/export.html', 'utf8'));
|
|
102
|
+
await page.pdf({ path: '${OUTPUT_PATH}', format: 'A4', printBackground: true,
|
|
103
|
+
margin: { top: '1.8cm', bottom: '1.8cm', left: '2cm', right: '2cm' } });
|
|
104
|
+
await browser.close();
|
|
105
|
+
})();
|
|
106
|
+
"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Tool State Cache
|
|
110
|
+
|
|
111
|
+
First detection results are recorded in memory (to avoid repeated detection):
|
|
112
|
+
- Within the same conversation session, confirmed installed tools are not re-detected
|
|
113
|
+
- If installation fails, record the error message and retry on the next trigger
|
|
114
|
+
|
|
115
|
+
## Platform Compatibility
|
|
116
|
+
|
|
117
|
+
| Platform | pymupdf | pikepdf | pandoc | tesseract | Playwright |
|
|
118
|
+
|----------|---------|---------|--------|-----------|------------|
|
|
119
|
+
| macOS (Homebrew) | ✅ pip3 | ✅ pip3 | ✅ brew | ✅ brew | ✅ MCP/npx |
|
|
120
|
+
| Linux (apt) | ✅ pip3 | ✅ pip3 | ✅ apt | ✅ apt | ✅ MCP/npx |
|
|
121
|
+
| Windows (WSL) | ✅ pip3 | ✅ pip3 | ✅ choco | ✅ choco | ✅ MCP/npx |
|
|
122
|
+
|
|
123
|
+
Automatically select the corresponding package manager based on the user's operating system. Detection method:
|
|
124
|
+
```bash
|
|
125
|
+
[[ "$(uname)" == "Darwin" ]] && echo "macOS" || echo "Linux"
|
|
126
|
+
```
|