popilot 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +372 -0
  2. package/adapters/claude-code/.claude/commands/_domain.md.hbs +32 -0
  3. package/adapters/claude-code/.claude/commands/analytics.md.hbs +55 -0
  4. package/adapters/claude-code/.claude/commands/daily.md.hbs +301 -0
  5. package/adapters/claude-code/.claude/commands/dev.md.hbs +62 -0
  6. package/adapters/claude-code/.claude/commands/handoff.md +258 -0
  7. package/adapters/claude-code/.claude/commands/market.md +120 -0
  8. package/adapters/claude-code/.claude/commands/metrics.md +123 -0
  9. package/adapters/claude-code/.claude/commands/oscar-loop.md +436 -0
  10. package/adapters/claude-code/.claude/commands/party.md +85 -0
  11. package/adapters/claude-code/.claude/commands/plan.md +43 -0
  12. package/adapters/claude-code/.claude/commands/research.md +203 -0
  13. package/adapters/claude-code/.claude/commands/retro.md +68 -0
  14. package/adapters/claude-code/.claude/commands/save.md +440 -0
  15. package/adapters/claude-code/.claude/commands/sessions.md +139 -0
  16. package/adapters/claude-code/.claude/commands/sprint.md +106 -0
  17. package/adapters/claude-code/.claude/commands/start.md +368 -0
  18. package/adapters/claude-code/.claude/commands/strategy.md +41 -0
  19. package/adapters/claude-code/.claude/commands/task.md +220 -0
  20. package/adapters/claude-code/.claude/commands/tracking.md +116 -0
  21. package/adapters/claude-code/.claude/commands/validate.md +58 -0
  22. package/adapters/claude-code/CLAUDE.md.hbs +208 -0
  23. package/adapters/claude-code/manifest.yaml +36 -0
  24. package/bin/cli.mjs +218 -0
  25. package/lib/adapter.mjs +68 -0
  26. package/lib/doctor.mjs +161 -0
  27. package/lib/hydrate.mjs +421 -0
  28. package/lib/prompt.mjs +78 -0
  29. package/lib/scaffold.mjs +155 -0
  30. package/lib/setup-wizard.mjs +331 -0
  31. package/lib/template-engine.mjs +164 -0
  32. package/lib/yaml-lite.mjs +476 -0
  33. package/package.json +30 -0
  34. package/scaffold/.context/.secrets.yaml.example +20 -0
  35. package/scaffold/.context/WORKFLOW.md.hbs +332 -0
  36. package/scaffold/.context/agents/TEMPLATE.md +115 -0
  37. package/scaffold/.context/agents/analyst.md.hbs +362 -0
  38. package/scaffold/.context/agents/developer.md.hbs +390 -0
  39. package/scaffold/.context/agents/handoff-specialist.md.hbs +292 -0
  40. package/scaffold/.context/agents/market-researcher.md.hbs +288 -0
  41. package/scaffold/.context/agents/ollie.md +323 -0
  42. package/scaffold/.context/agents/operations.md.hbs +293 -0
  43. package/scaffold/.context/agents/orchestrator.md.hbs +434 -0
  44. package/scaffold/.context/agents/planner.md.hbs +405 -0
  45. package/scaffold/.context/agents/qa.md.hbs +409 -0
  46. package/scaffold/.context/agents/researcher.md.hbs +330 -0
  47. package/scaffold/.context/agents/sage.md +349 -0
  48. package/scaffold/.context/agents/strategist.md.hbs +339 -0
  49. package/scaffold/.context/agents/tracking-governor.md.hbs +291 -0
  50. package/scaffold/.context/agents/validator.md.hbs +365 -0
  51. package/scaffold/.context/integrations/_registry.yaml +38 -0
  52. package/scaffold/.context/integrations/providers/channel_io.yaml +38 -0
  53. package/scaffold/.context/integrations/providers/corti.yaml +203 -0
  54. package/scaffold/.context/integrations/providers/ga4.yaml +116 -0
  55. package/scaffold/.context/integrations/providers/intercom.yaml +47 -0
  56. package/scaffold/.context/integrations/providers/linear.yaml +46 -0
  57. package/scaffold/.context/integrations/providers/mixpanel.yaml +73 -0
  58. package/scaffold/.context/integrations/providers/notebooklm.yaml +74 -0
  59. package/scaffold/.context/integrations/providers/notion.yaml +129 -0
  60. package/scaffold/.context/integrations/providers/prod_db.yaml +183 -0
  61. package/scaffold/.context/oscar/workflows/multi-agent.md +82 -0
  62. package/scaffold/.context/oscar/workflows/ollie-sage.md +128 -0
  63. package/scaffold/.context/oscar/workflows/session-git.md +71 -0
  64. package/scaffold/.context/oscar/workflows/setup.md +663 -0
  65. package/scaffold/.context/oscar/workflows/tracking.md +118 -0
  66. package/scaffold/.context/project.yaml.example +102 -0
  67. package/scaffold/.context/templates/dev-guide.md +217 -0
  68. package/scaffold/.context/templates/epic-spec.md +225 -0
  69. package/scaffold/.context/templates/guardrail.md +94 -0
  70. package/scaffold/.context/templates/handoff-checklist.md +197 -0
  71. package/scaffold/.context/templates/prd.md +80 -0
  72. package/scaffold/.context/templates/retrospective.md +78 -0
  73. package/scaffold/.context/templates/screen-spec.md +714 -0
  74. package/scaffold/.context/templates/sprint-plan.md +72 -0
  75. package/scaffold/.context/templates/sprint-status.yaml +109 -0
  76. package/scaffold/.context/templates/story-v2.md +228 -0
  77. package/scaffold/.context/templates/validation-report.md +99 -0
  78. package/scaffold/.gitignore.append +7 -0
  79. package/scaffold/spec-site/env.d.ts +7 -0
  80. package/scaffold/spec-site/index.html +14 -0
  81. package/scaffold/spec-site/package.json +20 -0
  82. package/scaffold/spec-site/src/App.vue +27 -0
  83. package/scaffold/spec-site/src/assets/icons/menu/ic_ads.svg +10 -0
  84. package/scaffold/spec-site/src/assets/icons/menu/ic_ads_on.svg +10 -0
  85. package/scaffold/spec-site/src/assets/icons/menu/ic_board.svg +14 -0
  86. package/scaffold/spec-site/src/assets/icons/menu/ic_board_on.svg +14 -0
  87. package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard.svg +21 -0
  88. package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard_on.svg +21 -0
  89. package/scaffold/spec-site/src/assets/icons/menu/ic_pricing.svg +20 -0
  90. package/scaffold/spec-site/src/assets/icons/menu/ic_pricing_on.svg +20 -0
  91. package/scaffold/spec-site/src/assets/icons/menu/ic_store.svg +11 -0
  92. package/scaffold/spec-site/src/assets/icons/menu/ic_store_on.svg +11 -0
  93. package/scaffold/spec-site/src/components/Accordion.vue +108 -0
  94. package/scaffold/spec-site/src/components/AppHeader.vue +304 -0
  95. package/scaffold/spec-site/src/components/Badge.vue +25 -0
  96. package/scaffold/spec-site/src/components/CoachingCard.vue +112 -0
  97. package/scaffold/spec-site/src/components/MemoSidebar.vue +239 -0
  98. package/scaffold/spec-site/src/components/MockupShell.vue +100 -0
  99. package/scaffold/spec-site/src/components/RuleTable.vue +99 -0
  100. package/scaffold/spec-site/src/components/ScenarioSwitcher.vue +103 -0
  101. package/scaffold/spec-site/src/components/SpecNav.vue +26 -0
  102. package/scaffold/spec-site/src/components/SpecSection.vue +59 -0
  103. package/scaffold/spec-site/src/components/SummaryGrid.vue +39 -0
  104. package/scaffold/spec-site/src/components/VersionBadge.vue +38 -0
  105. package/scaffold/spec-site/src/composables/useActiveSection.ts +53 -0
  106. package/scaffold/spec-site/src/composables/useMemo.ts +138 -0
  107. package/scaffold/spec-site/src/composables/useRetro.ts +313 -0
  108. package/scaffold/spec-site/src/composables/useScenario.ts +43 -0
  109. package/scaffold/spec-site/src/composables/useScenarioStore.ts +102 -0
  110. package/scaffold/spec-site/src/composables/useTurso.ts +160 -0
  111. package/scaffold/spec-site/src/composables/useUser.ts +25 -0
  112. package/scaffold/spec-site/src/data/navigation.ts +59 -0
  113. package/scaffold/spec-site/src/data/types.ts +90 -0
  114. package/scaffold/spec-site/src/data/wireframeRegistry.ts +25 -0
  115. package/scaffold/spec-site/src/layouts/SplitPaneLayout.vue +79 -0
  116. package/scaffold/spec-site/src/main.ts +10 -0
  117. package/scaffold/spec-site/src/pages/IndexPage.vue +66 -0
  118. package/scaffold/spec-site/src/pages/PolicyDetail.vue +215 -0
  119. package/scaffold/spec-site/src/pages/PolicyIndex.vue +74 -0
  120. package/scaffold/spec-site/src/pages/retro/RetroActions.vue +191 -0
  121. package/scaffold/spec-site/src/pages/retro/RetroBoard.vue +192 -0
  122. package/scaffold/spec-site/src/pages/retro/RetroCard.vue +131 -0
  123. package/scaffold/spec-site/src/pages/retro/RetroHeader.vue +287 -0
  124. package/scaffold/spec-site/src/pages/retro/RetroPage.vue +178 -0
  125. package/scaffold/spec-site/src/pages/shared/NoContentPlaceholder.vue +34 -0
  126. package/scaffold/spec-site/src/pages/shared/PlaceholderContent.vue +22 -0
  127. package/scaffold/spec-site/src/pages/shared/PlaceholderSpecPanel.vue +16 -0
  128. package/scaffold/spec-site/src/pages/shared/PolicyFallback.vue +145 -0
  129. package/scaffold/spec-site/src/pages/wireframe/WireframeShell.vue +151 -0
  130. package/scaffold/spec-site/src/router.ts +85 -0
  131. package/scaffold/spec-site/src/styles/base.css +21 -0
  132. package/scaffold/spec-site/src/styles/split-pane.css +143 -0
  133. package/scaffold/spec-site/src/styles/variables.css +47 -0
  134. package/scaffold/spec-site/src/utils/markdown.ts +197 -0
  135. package/scaffold/spec-site/tsconfig.json +20 -0
  136. package/scaffold/spec-site/vite.config.ts +18 -0
@@ -0,0 +1,116 @@
1
+ id: ga4
2
+ name: "Google Analytics 4"
3
+ category: analytics
4
+ description: "Event-based user behavior analysis"
5
+
6
+ mcp:
7
+ server_name: "ga4"
8
+ tools: [run_report, run_realtime_report]
9
+
10
+ setup_questions:
11
+ - key: property_id
12
+ label: "GA4 Property ID"
13
+ type: string
14
+ required: true
15
+ example: "462897329"
16
+
17
+ agent_prompts:
18
+ analyst: |
19
+ ### GA4 MCP
20
+
21
+ ```
22
+ Purpose: Event-based behavioral data analysis
23
+ property_id: {{config.property_id}}
24
+ ```
25
+
26
+ #### Common Patterns
27
+
28
+ **1. Cohort Retention (Monthly Signups)**
29
+ ```javascript
30
+ run_report({
31
+ property_id: "{{config.property_id}}",
32
+ date_ranges: [{ start_date: "90daysAgo", end_date: "yesterday" }],
33
+ dimensions: ["firstUserSourceMedium", "cohort", "cohortNthDay"],
34
+ metrics: ["cohortActiveUsers", "cohortTotalUsers"]
35
+ })
36
+ ```
37
+
38
+ **2. Segment-level Behavior Comparison**
39
+ ```javascript
40
+ run_report({
41
+ property_id: "{{config.property_id}}",
42
+ date_ranges: [{ start_date: "30daysAgo", end_date: "yesterday" }],
43
+ dimensions: ["userType", "pagePath"],
44
+ metrics: ["activeUsers", "screenPageViews", "averageSessionDuration"]
45
+ })
46
+ ```
47
+
48
+ **3. Anomaly Detection (Daily Trends)**
49
+ ```javascript
50
+ run_report({
51
+ property_id: "{{config.property_id}}",
52
+ date_ranges: [{ start_date: "30daysAgo", end_date: "yesterday" }],
53
+ dimensions: ["date"],
54
+ metrics: ["activeUsers", "newUsers", "eventCount"],
55
+ order_bys: [{ dimension: { dimension_name: "date" }, desc: false }]
56
+ })
57
+ ```
58
+
59
+ validator: |
60
+ ### GA4 MCP ⭐ Core Tool
61
+ ```
62
+ Purpose: Event data queries, funnel analysis, metric measurement
63
+ property_id: {{config.property_id}}
64
+ ```
65
+
66
+ #### Common Query Patterns
67
+
68
+ **1. Event Count Query**
69
+ ```javascript
70
+ run_report({
71
+ property_id: "{{config.property_id}}",
72
+ date_ranges: [{ start_date: "7daysAgo", end_date: "yesterday" }],
73
+ dimensions: ["eventName"],
74
+ metrics: ["eventCount"]
75
+ })
76
+ ```
77
+
78
+ **2. Funnel Analysis (By Page)**
79
+ ```javascript
80
+ run_report({
81
+ property_id: "{{config.property_id}}",
82
+ date_ranges: [{ start_date: "7daysAgo", end_date: "yesterday" }],
83
+ dimensions: ["pagePath"],
84
+ metrics: ["screenPageViews", "activeUsers"]
85
+ })
86
+ ```
87
+
88
+ **3. Specific Event Details**
89
+ ```javascript
90
+ run_report({
91
+ property_id: "{{config.property_id}}",
92
+ date_ranges: [{ start_date: "7daysAgo", end_date: "yesterday" }],
93
+ dimensions: ["eventName", "customEvent:campaign_id"],
94
+ metrics: ["eventCount"],
95
+ dimension_filter: {
96
+ filter: { field_name: "eventName", string_filter: { match_type: 1, value: "click_action_guide" }}
97
+ }
98
+ })
99
+ ```
100
+
101
+ **4. Daily Trends**
102
+ ```javascript
103
+ run_report({
104
+ property_id: "{{config.property_id}}",
105
+ date_ranges: [{ start_date: "14daysAgo", end_date: "yesterday" }],
106
+ dimensions: ["date", "eventName"],
107
+ metrics: ["eventCount"],
108
+ order_bys: [{ dimension: { dimension_name: "date" }, desc: false }]
109
+ })
110
+ ```
111
+
112
+ command_prompts:
113
+ analytics: |
114
+ - **GA4 MCP Server** (Event data analysis)
115
+
116
+ footer_tool_line: "GA4 MCP"
@@ -0,0 +1,47 @@
1
+ id: intercom
2
+ name: "Intercom"
3
+ category: customer_feedback
4
+ description: "Customer support, messaging, VOC analysis"
5
+
6
+ mcp:
7
+ server_name: "intercom"
8
+ tools: [list_conversations, get_conversation, search_contacts]
9
+
10
+ setup_questions:
11
+ - key: app_id
12
+ label: "Intercom App ID"
13
+ type: string
14
+ required: true
15
+ example: "abc123"
16
+
17
+ agent_prompts:
18
+ validator: |
19
+ ### Intercom API (VOC Analysis)
20
+ ```
21
+ Purpose: CS conversation analysis, VOC insight extraction
22
+ app_id: {{config.app_id}}
23
+ ```
24
+
25
+ #### VOC Analysis Patterns
26
+ ```javascript
27
+ // Retrieve recently closed conversations
28
+ list_conversations({
29
+ state: "closed",
30
+ per_page: 50,
31
+ sort_field: "updated_at",
32
+ sort_order: "desc"
33
+ })
34
+
35
+ // Retrieve specific conversation details
36
+ get_conversation({ id: "{conversation_id}" })
37
+ ```
38
+
39
+ researcher: |
40
+ ### Intercom API (VOC Collection)
41
+ ```
42
+ Purpose: Customer conversation collection, complaint pattern identification
43
+ app_id: {{config.app_id}}
44
+ Integration: Vicky collects → Rita interprets
45
+ ```
46
+
47
+ footer_tool_line: "Intercom API"
@@ -0,0 +1,46 @@
1
+ id: linear
2
+ name: "Linear"
3
+ category: pm_tool
4
+ description: "Issue tracking, project management, roadmap"
5
+
6
+ mcp:
7
+ server_name: "linear"
8
+ tools: [list_issues, create_issue, update_issue, list_projects]
9
+
10
+ setup_questions:
11
+ - key: team_id
12
+ label: "Linear Team ID"
13
+ type: string
14
+ required: true
15
+ example: "TEAM-123"
16
+
17
+ agent_prompts:
18
+ strategist: |
19
+ ### Linear MCP
20
+ ```
21
+ Purpose: Issue management, roadmap integration
22
+ team_id: {{config.team_id}}
23
+ Usage:
24
+ - list_issues: View issue list
25
+ - create_issue: Create new issue
26
+ - list_projects: View project status
27
+ ```
28
+
29
+ planner: |
30
+ ### Linear MCP
31
+ ```
32
+ Purpose: Sprint issue management, story creation
33
+ team_id: {{config.team_id}}
34
+ Usage:
35
+ - list_issues: View sprint issues
36
+ - create_issue: Create new issue
37
+ - update_issue: Update status
38
+ ```
39
+
40
+ command_prompts:
41
+ daily: |
42
+ ### Linear Issue Sync
43
+
44
+ Automatically collects issues completed today from Linear and reflects them in the daily work log.
45
+
46
+ footer_tool_line: "Linear MCP"
@@ -0,0 +1,73 @@
1
+ id: mixpanel
2
+ name: "Mixpanel"
3
+ category: analytics
4
+ description: "Product analytics, funnels, retention"
5
+
6
+ mcp:
7
+ server_name: "mixpanel"
8
+ tools: [query_jql, get_funnel, get_retention]
9
+
10
+ setup_questions:
11
+ - key: project_id
12
+ label: "Mixpanel Project ID"
13
+ type: string
14
+ required: true
15
+ example: "2843271"
16
+ - key: api_secret
17
+ label: "Mixpanel API Secret (see secrets.yaml)"
18
+ type: string
19
+ required: false
20
+
21
+ agent_prompts:
22
+ analyst: |
23
+ ### Mixpanel MCP
24
+ ```
25
+ Purpose: Product analytics, funnel analysis, retention analysis
26
+ project_id: {{config.project_id}}
27
+ ```
28
+
29
+ #### Common Patterns
30
+
31
+ **1. Event Trend Analysis**
32
+ ```javascript
33
+ query_jql({
34
+ project_id: "{{config.project_id}}",
35
+ from_date: "2026-02-01",
36
+ to_date: "2026-02-28",
37
+ event: "page_view"
38
+ })
39
+ ```
40
+
41
+ **2. Funnel Analysis**
42
+ ```javascript
43
+ get_funnel({
44
+ project_id: "{{config.project_id}}",
45
+ from_date: "2026-02-01",
46
+ to_date: "2026-02-28",
47
+ steps: ["sign_up", "onboarding_complete", "first_purchase"]
48
+ })
49
+ ```
50
+
51
+ **3. Retention Analysis**
52
+ ```javascript
53
+ get_retention({
54
+ project_id: "{{config.project_id}}",
55
+ from_date: "2026-01-01",
56
+ to_date: "2026-02-28",
57
+ born_event: "sign_up",
58
+ event: "page_view"
59
+ })
60
+ ```
61
+
62
+ validator: |
63
+ ### Mixpanel MCP
64
+ ```
65
+ Purpose: Hypothesis validation data queries, A/B test analysis
66
+ project_id: {{config.project_id}}
67
+ ```
68
+
69
+ command_prompts:
70
+ analytics: |
71
+ - **Mixpanel MCP Server** (Product analytics, funnels, retention)
72
+
73
+ footer_tool_line: "Mixpanel MCP"
@@ -0,0 +1,74 @@
1
+ id: notebooklm
2
+ name: "NotebookLM"
3
+ category: ai_research
4
+ description: "AI-powered customer/user insight exploration"
5
+
6
+ mcp:
7
+ server_name: "notebooklm"
8
+ tools: [ask_question, list_notebooks, select_notebook]
9
+
10
+ setup_questions:
11
+ - key: notebook_name
12
+ label: "Active notebook name"
13
+ type: string
14
+ required: false
15
+ example: "my-notebook"
16
+
17
+ agent_prompts:
18
+ researcher: |
19
+ ### NotebookLM MCP ⭐ Core Tool
20
+ ```
21
+ Purpose: Customer insights, interview data, domain knowledge
22
+ Active notebook: {{config.notebook_name}}
23
+ ```
24
+
25
+ #### Common Question Patterns
26
+
27
+ **1. Pain Point Discovery**
28
+ ```javascript
29
+ ask_question({
30
+ question: "What are the biggest pain points customers experience when using the service?",
31
+ session_id: "existing_session" // Maintain session
32
+ })
33
+ ```
34
+
35
+ **2. Needs Validation**
36
+ ```javascript
37
+ ask_question({
38
+ question: "Customers mentioned wanting a 'service that makes decisions for them' — what specific decisions do they want?",
39
+ session_id: "existing_session"
40
+ })
41
+ ```
42
+
43
+ **3. Workflow Understanding**
44
+ ```javascript
45
+ ask_question({
46
+ question: "In what order do customers use the key features, and what do they look at?",
47
+ session_id: "existing_session"
48
+ })
49
+ ```
50
+
51
+ strategist: |
52
+ ### NotebookLM MCP
53
+ ```
54
+ Purpose: Customer insights, market research
55
+ Active notebook: {{config.notebook_name}}
56
+ Usage:
57
+ - ask_question: Ask insight questions based on customer VOC
58
+ - Maintain sessions for in-depth exploration
59
+ ```
60
+
61
+ #### Usage Example
62
+ ```
63
+ 🎯 Simon: "Let me check 'core feature improvement needs' on NotebookLM."
64
+ → ask_question({ question: "What are the most frequently mentioned pain points by customers regarding core features?" })
65
+ ```
66
+
67
+ validator: |
68
+ ### NotebookLM MCP
69
+ ```
70
+ Purpose: Customer insights, qualitative feedback analysis
71
+ Active notebook: {{config.notebook_name}}
72
+ ```
73
+
74
+ footer_tool_line: "NotebookLM MCP"
@@ -0,0 +1,129 @@
1
+ id: notion
2
+ name: "Notion"
3
+ category: pm_tool
4
+ description: "Task management, document management, roadmap"
5
+
6
+ mcp:
7
+ server_name: "notion"
8
+ tools: [notion-task-list, notion-task-create, notion-task-update, notion-task-update-status, notion-task-add-log, notion-task-my-sprint, notion-search, notion-fetch, notion-create-pages, notion-update-page]
9
+
10
+ setup_questions:
11
+ - key: workspace
12
+ label: "Notion workspace name"
13
+ type: string
14
+ required: false
15
+ example: "My Workspace"
16
+ - key: daily_page_id
17
+ label: "Daily work log parent page ID"
18
+ type: string
19
+ required: false
20
+ example: "abc123..."
21
+
22
+ agent_prompts:
23
+ strategist: |
24
+ ### Notion MCP
25
+ ```
26
+ Purpose: PRD lookup/creation, roadmap integration
27
+ Usage:
28
+ - notion-search: Search existing PRDs
29
+ - notion-fetch: Retrieve specific documents
30
+ - notion-create-pages: Create new PRDs
31
+ ```
32
+
33
+ #### Usage Example
34
+ ```
35
+ 🎯 Simon: "Let me search for the competitive analysis document on Notion."
36
+ → notion-search({ query: "competitive analysis" })
37
+ ```
38
+
39
+ planner: |
40
+ ### Notion MCP
41
+ ```
42
+ Purpose: Sprint document management, story creation
43
+ Usage:
44
+ - notion-search: Search sprint documents
45
+ - notion-fetch: Retrieve specific stories
46
+ - notion-create-pages: Create new stories
47
+ - notion-update-page: Update progress status
48
+ ```
49
+
50
+ ### Usage Example
51
+ ```
52
+ 📋 Penny: "Let me check the current sprint document."
53
+ → notion-fetch({ id: "Sprint-51-PRD-link" })
54
+
55
+ 📋 Penny: "I'll create a new story."
56
+ → notion-create-pages({ parent: {page_id: "..."}, pages: [...] })
57
+ ```
58
+
59
+ command_prompts:
60
+ daily: |
61
+ ### Notion Page Check and Creation
62
+
63
+ **Parent page**: `{{config.daily_page_id}}` (Daily work log)
64
+
65
+ 1. Check if a child page with today's date title exists under the parent page
66
+ 2. Create new if not found, update if exists
67
+
68
+ ### Notion Upload
69
+
70
+ ```javascript
71
+ mcp__notion__notion-create-pages({
72
+ parent: { page_id: "{{config.daily_page_id}}" },
73
+ pages: [{
74
+ properties: { title: "{YYYY-MM-DD}" },
75
+ content: "{formatted markdown}"
76
+ }]
77
+ })
78
+ ```
79
+
80
+ workflow_rules:
81
+ - content: |
82
+ ## MCP Usage Guide
83
+
84
+ ### Notion MCP
85
+
86
+ You can manage tasks and view/create documents using Notion MCP.
87
+
88
+ | Tool | Purpose |
89
+ |------|---------|
90
+ | `notion-task-my-sprint` | View my sprint tasks |
91
+ | `notion-task-list` | View all task list |
92
+ | `notion-task-create` | Create new task |
93
+ | `notion-task-update` | Update task |
94
+ | `notion-task-update-status` | Change status only |
95
+ | `notion-task-add-log` | Add progress log |
96
+
97
+ User/Sprint mapping: See `.secrets.yaml`
98
+
99
+ ---
100
+
101
+ ## Story → Notion Task Upload
102
+
103
+ ### Overview
104
+
105
+ ```
106
+ spec-site (Source of Truth) → Notion (Execution Tracking)
107
+ Story Spec (Detailed Plan) → Task (Progress Management)
108
+ ```
109
+
110
+ ### Mapping Rules
111
+
112
+ | Story Section | Notion Task Section |
113
+ |---------------|---------------------|
114
+ | User Story | **Goal** (As a / I want / So that) |
115
+ | Acceptance Criteria (AC) | **Goal** (AC list summary) |
116
+ | Task Breakdown | **To-Do List** (checkboxes) |
117
+ | Expected Outcome | **Expected Outcome on Completion** |
118
+
119
+ ### Task Property Rules
120
+
121
+ | Property | Value | Example |
122
+ |----------|-------|---------|
123
+ | Title | `[Epic-Story] Title` | `[E-01-S-03] Dashboard Filtering` |
124
+ | Tags | Sprint, Epic, Area, Priority | `S52`, `E-02`, `FE`, `P1` |
125
+ | Assignee | `.secrets.yaml` userId | Assignee ID |
126
+ | Sprint | `.secrets.yaml` sprintId | Sprint page ID |
127
+ | Priority | P0→High, P1→Medium, P2→Low | `Medium` |
128
+
129
+ footer_tool_line: "Notion MCP"
@@ -0,0 +1,183 @@
1
+ id: prod_db
2
+ name: "Production Database"
3
+ category: database
4
+ description: "Direct queries on production/snapshot DB"
5
+
6
+ mcp:
7
+ server_name: "{{config.mcp_name}}"
8
+ tools: [query]
9
+
10
+ setup_questions:
11
+ - key: mcp_name
12
+ label: "Production DB MCP server name"
13
+ type: string
14
+ required: true
15
+ example: "prod_service_db"
16
+ - key: snapshot_mcp_name
17
+ label: "Snapshot DB MCP server name"
18
+ type: string
19
+ required: false
20
+ example: "snapshot_service_db"
21
+ - key: tunnel_script
22
+ label: "Port forwarding/tunnel script path"
23
+ type: string
24
+ required: false
25
+ example: "bash scripts/port-forward.sh"
26
+ - key: caution
27
+ label: "Heavy table warning list (table name, risk level, reason)"
28
+ type: object_list
29
+ required: false
30
+ fields: [table, risk, reason]
31
+ example:
32
+ - table: SettlementMargin
33
+ risk: "🔴 Very High"
34
+ reason: "DELETE-INSERT ETL repeated, very heavy"
35
+ - key: rules
36
+ label: "DB usage rules summary"
37
+ type: string
38
+ required: false
39
+ example: "WHERE + indexed column + LIMIT required. Unconditional COUNT(*) prohibited"
40
+
41
+ agent_prompts:
42
+ analyst: |
43
+ ### DB Selection Guide ⭐ Important
44
+
45
+ **Two databases are available:**
46
+
47
+ | DB | MCP Name | Port | Purpose | Data Point-in-Time |
48
+ |----|----------|------|---------|---------------------|
49
+ | **Snapshot DB** | `{{config.snapshot_mcp_name}}` | 33306 | General analysis, exploration | Early morning snapshot (previous day's closing data) |
50
+ | **Production DB** | `{{config.mcp_name}}` | 13306 | Only when real-time needed | Real-time |
51
+
52
+ #### 🎯 Selection Guide
53
+
54
+ ```
55
+ ✅ Use Snapshot DB (default, recommended)
56
+ - Cohort analysis, segment analysis
57
+ - Trend analysis (data up to yesterday)
58
+ - Exploratory analysis
59
+ - Heavy queries have no production impact
60
+
61
+ ⚠️ Use Production DB (only when needed)
62
+ - When "today's" data is absolutely required
63
+ - Real-time monitoring
64
+ - Debugging issues that occurred today
65
+ ```
66
+
67
+ #### 🔌 Port Forwarding Required Before DB Access
68
+
69
+ The tunneling script must be **run in a separate terminal first**:
70
+
71
+ ```bash
72
+ # Run the script within the project (opens 3 tunnels simultaneously)
73
+ {{config.tunnel_script}}
74
+ ```
75
+
76
+ Ports opened after execution:
77
+ | Environment | DB | Local Port |
78
+ |-------------|-----|-----------|
79
+ | Production | Service DB | `13306` |
80
+ | Production | Scrap DB | `23306` |
81
+ | Test | Service DB (Snapshot) | `33306` |
82
+
83
+ > **Note**: DB queries must be executed while the port forwarding session is already open.
84
+ > To terminate: `Ctrl+C`
85
+
86
+ #### ⚠️ Important: Heavy Table Precautions
87
+
88
+ **The following tables require special care:**
89
+
90
+ | Table | Risk Level | Reason |
91
+ |-------|------------|--------|
92
+ {{#each config.caution}}
93
+ | `{{this.table}}` | {{this.risk}} | {{this.reason}} |
94
+ {{/each}}
95
+
96
+ **Prohibited:**
97
+ ```sql
98
+ {{#each config.caution}}
99
+ -- ❌ Absolutely prohibited: Full Table Scan
100
+ SELECT * FROM {{this.table}};
101
+ SELECT * FROM {{this.table}} WHERE name LIKE '%search_term%';
102
+ SELECT COUNT(*) FROM {{this.table}}; -- Unconditional count
103
+
104
+ -- ❌ Absolutely prohibited: Unindexed conditions
105
+ SELECT * FROM {{this.table}} WHERE some_unindexed_column = 'value';
106
+ {{/each}}
107
+ ```
108
+
109
+ **Safe query patterns:**
110
+ ```sql
111
+ -- ✅ Safe: Conditions on indexed columns (user_id, created_at, etc.)
112
+ SELECT * FROM [table]
113
+ WHERE user_id = 123
114
+ AND created_at >= '2026-01-01'
115
+ LIMIT 100;
116
+
117
+ -- ✅ Safe: Sampling
118
+ SELECT * FROM [table]
119
+ WHERE user_id = 123
120
+ ORDER BY created_at DESC
121
+ LIMIT 50;
122
+ ```
123
+
124
+ **Pre-query checklist:**
125
+ - [ ] Is there an indexed column in the WHERE clause?
126
+ - [ ] Is LIMIT applied?
127
+ - [ ] For risky tables, proceed with extra caution
128
+
129
+ command_prompts:
130
+ analytics: |
131
+ - **Prod DB MCP Server** (Direct Service DB queries)
132
+
133
+ ### Port Forwarding Required Before DB Access
134
+
135
+ ```bash
136
+ {{{config.tunnel_script}}}
137
+ ```
138
+
139
+ > Connects via local ports.
140
+
141
+ ## DB Precautions
142
+
143
+ The tables below store ETL results with frequent DELETE-INSERT operations and are **very heavy**. Full scan absolutely prohibited!
144
+
145
+ | Table | Risk Level | Reason |
146
+ |-------|------------|--------|
147
+ {{#each config.caution}}
148
+ | `{{this.table}}` | {{this.risk}} | {{this.reason}} |
149
+ {{/each}}
150
+
151
+ **Safe query rules:**
152
+ - WHERE clause with indexed columns (user_id, created_at, etc.)
153
+ - LIMIT required
154
+ - Unconditional COUNT(*) prohibited
155
+
156
+ safety_rules:
157
+ - content: |
158
+ ## DB Precautions
159
+
160
+ → See `operations.integrations.prod_db.caution` in `.context/project.yaml`
161
+
162
+ workflow_rules:
163
+ - content: |
164
+ ## DB Usage Precautions
165
+
166
+ ### Heavy Table Warnings
167
+
168
+ | Table | Precautions |
169
+ |-------|-------------|
170
+ {{#each config.caution}}
171
+ | `{{this.table}}` | {{this.risk}} {{this.reason}} |
172
+ {{/each}}
173
+
174
+ **Rules:** {{config.rules}}
175
+
176
+ caution_list: |
177
+ | Table | Risk Level | Reason |
178
+ |-------|------------|--------|
179
+ {{#each config.caution}}
180
+ | `{{this.table}}` | {{this.risk}} | {{this.reason}} |
181
+ {{/each}}
182
+
183
+ footer_tool_line: "Snapshot DB MCP (`{{config.snapshot_mcp_name}}`), Production DB MCP (`{{config.mcp_name}}`)"