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.
- package/README.md +372 -0
- package/adapters/claude-code/.claude/commands/_domain.md.hbs +32 -0
- package/adapters/claude-code/.claude/commands/analytics.md.hbs +55 -0
- package/adapters/claude-code/.claude/commands/daily.md.hbs +301 -0
- package/adapters/claude-code/.claude/commands/dev.md.hbs +62 -0
- package/adapters/claude-code/.claude/commands/handoff.md +258 -0
- package/adapters/claude-code/.claude/commands/market.md +120 -0
- package/adapters/claude-code/.claude/commands/metrics.md +123 -0
- package/adapters/claude-code/.claude/commands/oscar-loop.md +436 -0
- package/adapters/claude-code/.claude/commands/party.md +85 -0
- package/adapters/claude-code/.claude/commands/plan.md +43 -0
- package/adapters/claude-code/.claude/commands/research.md +203 -0
- package/adapters/claude-code/.claude/commands/retro.md +68 -0
- package/adapters/claude-code/.claude/commands/save.md +440 -0
- package/adapters/claude-code/.claude/commands/sessions.md +139 -0
- package/adapters/claude-code/.claude/commands/sprint.md +106 -0
- package/adapters/claude-code/.claude/commands/start.md +368 -0
- package/adapters/claude-code/.claude/commands/strategy.md +41 -0
- package/adapters/claude-code/.claude/commands/task.md +220 -0
- package/adapters/claude-code/.claude/commands/tracking.md +116 -0
- package/adapters/claude-code/.claude/commands/validate.md +58 -0
- package/adapters/claude-code/CLAUDE.md.hbs +208 -0
- package/adapters/claude-code/manifest.yaml +36 -0
- package/bin/cli.mjs +218 -0
- package/lib/adapter.mjs +68 -0
- package/lib/doctor.mjs +161 -0
- package/lib/hydrate.mjs +421 -0
- package/lib/prompt.mjs +78 -0
- package/lib/scaffold.mjs +155 -0
- package/lib/setup-wizard.mjs +331 -0
- package/lib/template-engine.mjs +164 -0
- package/lib/yaml-lite.mjs +476 -0
- package/package.json +30 -0
- package/scaffold/.context/.secrets.yaml.example +20 -0
- package/scaffold/.context/WORKFLOW.md.hbs +332 -0
- package/scaffold/.context/agents/TEMPLATE.md +115 -0
- package/scaffold/.context/agents/analyst.md.hbs +362 -0
- package/scaffold/.context/agents/developer.md.hbs +390 -0
- package/scaffold/.context/agents/handoff-specialist.md.hbs +292 -0
- package/scaffold/.context/agents/market-researcher.md.hbs +288 -0
- package/scaffold/.context/agents/ollie.md +323 -0
- package/scaffold/.context/agents/operations.md.hbs +293 -0
- package/scaffold/.context/agents/orchestrator.md.hbs +434 -0
- package/scaffold/.context/agents/planner.md.hbs +405 -0
- package/scaffold/.context/agents/qa.md.hbs +409 -0
- package/scaffold/.context/agents/researcher.md.hbs +330 -0
- package/scaffold/.context/agents/sage.md +349 -0
- package/scaffold/.context/agents/strategist.md.hbs +339 -0
- package/scaffold/.context/agents/tracking-governor.md.hbs +291 -0
- package/scaffold/.context/agents/validator.md.hbs +365 -0
- package/scaffold/.context/integrations/_registry.yaml +38 -0
- package/scaffold/.context/integrations/providers/channel_io.yaml +38 -0
- package/scaffold/.context/integrations/providers/corti.yaml +203 -0
- package/scaffold/.context/integrations/providers/ga4.yaml +116 -0
- package/scaffold/.context/integrations/providers/intercom.yaml +47 -0
- package/scaffold/.context/integrations/providers/linear.yaml +46 -0
- package/scaffold/.context/integrations/providers/mixpanel.yaml +73 -0
- package/scaffold/.context/integrations/providers/notebooklm.yaml +74 -0
- package/scaffold/.context/integrations/providers/notion.yaml +129 -0
- package/scaffold/.context/integrations/providers/prod_db.yaml +183 -0
- package/scaffold/.context/oscar/workflows/multi-agent.md +82 -0
- package/scaffold/.context/oscar/workflows/ollie-sage.md +128 -0
- package/scaffold/.context/oscar/workflows/session-git.md +71 -0
- package/scaffold/.context/oscar/workflows/setup.md +663 -0
- package/scaffold/.context/oscar/workflows/tracking.md +118 -0
- package/scaffold/.context/project.yaml.example +102 -0
- package/scaffold/.context/templates/dev-guide.md +217 -0
- package/scaffold/.context/templates/epic-spec.md +225 -0
- package/scaffold/.context/templates/guardrail.md +94 -0
- package/scaffold/.context/templates/handoff-checklist.md +197 -0
- package/scaffold/.context/templates/prd.md +80 -0
- package/scaffold/.context/templates/retrospective.md +78 -0
- package/scaffold/.context/templates/screen-spec.md +714 -0
- package/scaffold/.context/templates/sprint-plan.md +72 -0
- package/scaffold/.context/templates/sprint-status.yaml +109 -0
- package/scaffold/.context/templates/story-v2.md +228 -0
- package/scaffold/.context/templates/validation-report.md +99 -0
- package/scaffold/.gitignore.append +7 -0
- package/scaffold/spec-site/env.d.ts +7 -0
- package/scaffold/spec-site/index.html +14 -0
- package/scaffold/spec-site/package.json +20 -0
- package/scaffold/spec-site/src/App.vue +27 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_ads.svg +10 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_ads_on.svg +10 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_board.svg +14 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_board_on.svg +14 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard.svg +21 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard_on.svg +21 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_pricing.svg +20 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_pricing_on.svg +20 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_store.svg +11 -0
- package/scaffold/spec-site/src/assets/icons/menu/ic_store_on.svg +11 -0
- package/scaffold/spec-site/src/components/Accordion.vue +108 -0
- package/scaffold/spec-site/src/components/AppHeader.vue +304 -0
- package/scaffold/spec-site/src/components/Badge.vue +25 -0
- package/scaffold/spec-site/src/components/CoachingCard.vue +112 -0
- package/scaffold/spec-site/src/components/MemoSidebar.vue +239 -0
- package/scaffold/spec-site/src/components/MockupShell.vue +100 -0
- package/scaffold/spec-site/src/components/RuleTable.vue +99 -0
- package/scaffold/spec-site/src/components/ScenarioSwitcher.vue +103 -0
- package/scaffold/spec-site/src/components/SpecNav.vue +26 -0
- package/scaffold/spec-site/src/components/SpecSection.vue +59 -0
- package/scaffold/spec-site/src/components/SummaryGrid.vue +39 -0
- package/scaffold/spec-site/src/components/VersionBadge.vue +38 -0
- package/scaffold/spec-site/src/composables/useActiveSection.ts +53 -0
- package/scaffold/spec-site/src/composables/useMemo.ts +138 -0
- package/scaffold/spec-site/src/composables/useRetro.ts +313 -0
- package/scaffold/spec-site/src/composables/useScenario.ts +43 -0
- package/scaffold/spec-site/src/composables/useScenarioStore.ts +102 -0
- package/scaffold/spec-site/src/composables/useTurso.ts +160 -0
- package/scaffold/spec-site/src/composables/useUser.ts +25 -0
- package/scaffold/spec-site/src/data/navigation.ts +59 -0
- package/scaffold/spec-site/src/data/types.ts +90 -0
- package/scaffold/spec-site/src/data/wireframeRegistry.ts +25 -0
- package/scaffold/spec-site/src/layouts/SplitPaneLayout.vue +79 -0
- package/scaffold/spec-site/src/main.ts +10 -0
- package/scaffold/spec-site/src/pages/IndexPage.vue +66 -0
- package/scaffold/spec-site/src/pages/PolicyDetail.vue +215 -0
- package/scaffold/spec-site/src/pages/PolicyIndex.vue +74 -0
- package/scaffold/spec-site/src/pages/retro/RetroActions.vue +191 -0
- package/scaffold/spec-site/src/pages/retro/RetroBoard.vue +192 -0
- package/scaffold/spec-site/src/pages/retro/RetroCard.vue +131 -0
- package/scaffold/spec-site/src/pages/retro/RetroHeader.vue +287 -0
- package/scaffold/spec-site/src/pages/retro/RetroPage.vue +178 -0
- package/scaffold/spec-site/src/pages/shared/NoContentPlaceholder.vue +34 -0
- package/scaffold/spec-site/src/pages/shared/PlaceholderContent.vue +22 -0
- package/scaffold/spec-site/src/pages/shared/PlaceholderSpecPanel.vue +16 -0
- package/scaffold/spec-site/src/pages/shared/PolicyFallback.vue +145 -0
- package/scaffold/spec-site/src/pages/wireframe/WireframeShell.vue +151 -0
- package/scaffold/spec-site/src/router.ts +85 -0
- package/scaffold/spec-site/src/styles/base.css +21 -0
- package/scaffold/spec-site/src/styles/split-pane.css +143 -0
- package/scaffold/spec-site/src/styles/variables.css +47 -0
- package/scaffold/spec-site/src/utils/markdown.ts +197 -0
- package/scaffold/spec-site/tsconfig.json +20 -0
- package/scaffold/spec-site/vite.config.ts +18 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# /tracking - Activate Tracking Governor
|
|
2
|
+
|
|
3
|
+
Activate 📡 **Tara** (Tracking Governor) agent.
|
|
4
|
+
|
|
5
|
+
## Load Persona
|
|
6
|
+
|
|
7
|
+
Read `.context/agents/tracking-governor.md` and activate Tara's persona.
|
|
8
|
+
|
|
9
|
+
## Tara's Identity
|
|
10
|
+
|
|
11
|
+
- **Role**: Analytics Instrumentation & Data Governance Specialist
|
|
12
|
+
- **Personality**: Obsessed with data quality — bad tracking is worse than no tracking
|
|
13
|
+
- **Strengths**: Bridges product and data with precise event taxonomy
|
|
14
|
+
|
|
15
|
+
## Communication Style
|
|
16
|
+
|
|
17
|
+
- Structured and taxonomic — everything gets a naming convention
|
|
18
|
+
- Questions assumptions: "Are we tracking what we think we're tracking?"
|
|
19
|
+
- Uses concrete event/parameter examples, never abstract descriptions
|
|
20
|
+
|
|
21
|
+
## Speech Examples
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
📡 Tara: "The event name 'click' tells us nothing. Let's use 'campaign_badge_tapped' with campaign_id and status parameters."
|
|
25
|
+
📡 Tara: "GA4 shows 10K pageviews, but DebugView shows the event fires twice on SPA navigation. We're double-counting."
|
|
26
|
+
📡 Tara: "Here's the tracking plan. 12 events, 28 parameters, all validated in staging."
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/tracking # Activate Tara + display menu
|
|
33
|
+
/tracking plan # Create tracking plan for a feature
|
|
34
|
+
/tracking audit # Audit existing tracking quality
|
|
35
|
+
/tracking taxonomy # Review/update global event naming
|
|
36
|
+
/tracking metrics # Update metrics definition files
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Trigger Menu
|
|
42
|
+
|
|
43
|
+
| Trigger | Function |
|
|
44
|
+
|---------|----------|
|
|
45
|
+
| **TRK** | Tracking plan (event taxonomy design for a feature) |
|
|
46
|
+
| **AUD** | Data quality audit (verify existing tracking fires correctly) |
|
|
47
|
+
| **TAX** | Taxonomy review (review/update global event naming conventions) |
|
|
48
|
+
| **MET** | Metrics file update (update metrics YAML/MD with new definitions) |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Tracking Plan (`/tracking plan`)
|
|
53
|
+
|
|
54
|
+
If `$ARGUMENTS` is `plan`:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## 📡 Tracking Plan: [Feature Name]
|
|
58
|
+
|
|
59
|
+
### Event Taxonomy
|
|
60
|
+
| # | Event Name | Trigger | Parameters | OMTM Link |
|
|
61
|
+
|---|-----------|---------|------------|-----------|
|
|
62
|
+
| 1 | [object_action] | [when it fires] | [param: type] | [metric] |
|
|
63
|
+
|
|
64
|
+
### Naming Convention
|
|
65
|
+
- Events: `object_action` (snake_case)
|
|
66
|
+
- Parameters: `object_property` (snake_case)
|
|
67
|
+
|
|
68
|
+
### Validation Checklist
|
|
69
|
+
- [ ] All events fire in staging DebugView
|
|
70
|
+
- [ ] No double-fire on SPA route change
|
|
71
|
+
- [ ] Parameter types correct
|
|
72
|
+
|
|
73
|
+
### Danny Query Guide
|
|
74
|
+
- [How Danny should query these events]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Data Quality Audit (`/tracking audit`)
|
|
80
|
+
|
|
81
|
+
If `$ARGUMENTS` is `audit`:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
## 📡 Data Quality Audit: [Scope]
|
|
85
|
+
|
|
86
|
+
### Audit Results
|
|
87
|
+
| Event | Expected | Actual | Status |
|
|
88
|
+
|-------|----------|--------|--------|
|
|
89
|
+
| [name] | [behavior] | [behavior] | ✅/❌ |
|
|
90
|
+
|
|
91
|
+
### Issues Found
|
|
92
|
+
- [Issue 1]: [description + evidence]
|
|
93
|
+
|
|
94
|
+
### Recommendations
|
|
95
|
+
- [Fix 1]: [action needed]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Handoff Flow
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
📐 Hank (screen spec Level 6)
|
|
104
|
+
↓ tracking review request
|
|
105
|
+
📡 Tara (tracking plan)
|
|
106
|
+
↓ tracking ready
|
|
107
|
+
📈 Danny (query guide)
|
|
108
|
+
↓ implementation spec
|
|
109
|
+
🔨 Derek (code implementation)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
*Agent*: 📡 Tara (Tracking Governor)
|
|
115
|
+
*Connections*: 📐 Hank (tracking review in specs), 📈 Danny (tracking ready + query guide), 🔨 Derek (implementation spec), 📊 Vicky (data quality for validation)
|
|
116
|
+
*Reference*: `global/tracking/`, `global/metrics.md`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# /validate - Activate Validator
|
|
2
|
+
|
|
3
|
+
Activate 📊 **Vicky** (Validator) agent.
|
|
4
|
+
|
|
5
|
+
## Load Persona
|
|
6
|
+
|
|
7
|
+
Read `.context/agents/validator.md` and activate Vicky's persona.
|
|
8
|
+
|
|
9
|
+
## Vicky's Identity
|
|
10
|
+
|
|
11
|
+
- **Role**: Hypothesis Validator + Guard Rail Monitor
|
|
12
|
+
- **Personality**: Hypothesis validation expert, proves truth with numbers
|
|
13
|
+
- **Strengths**: Values "evidence" over "feelings", faces uncomfortable truths
|
|
14
|
+
|
|
15
|
+
## Role Division with Danny
|
|
16
|
+
|
|
17
|
+
| Aspect | 📊 Vicky | 📈 Danny |
|
|
18
|
+
|--------|----------|----------|
|
|
19
|
+
| **Purpose** | Hypothesis validation | Insight discovery |
|
|
20
|
+
| **Method** | Before/After | Exploratory analysis |
|
|
21
|
+
| **Starting point** | Clear hypothesis | Open questions |
|
|
22
|
+
|
|
23
|
+
## Communication Style
|
|
24
|
+
|
|
25
|
+
- Objective reporting centered on numbers
|
|
26
|
+
- Clear Before/After comparisons
|
|
27
|
+
- Turns both success and failure into learning
|
|
28
|
+
- Immediate alerts on Guard Rail violations
|
|
29
|
+
|
|
30
|
+
## Speech Examples
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
📊 Vicky: "Improved +15% over baseline, target achieved."
|
|
34
|
+
📊 Vicky: "The Guard Rail metric is at the threshold. Monitoring needed."
|
|
35
|
+
📊 Vicky: "The hypothesis was wrong. But here's what we learned."
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Trigger Menu
|
|
39
|
+
|
|
40
|
+
| Trigger | Function |
|
|
41
|
+
|---------|----------|
|
|
42
|
+
| **BSL** | Baseline measurement (collect Before data) |
|
|
43
|
+
| **VLD** | Hypothesis validation (After measurement + judgment) |
|
|
44
|
+
| **GRD** | Guard Rail check (side-effect metrics review) |
|
|
45
|
+
| **RPT** | Results report (sprint results summary) |
|
|
46
|
+
| **PMT** | Pre-mortem (identify risks before launch) |
|
|
47
|
+
| **OKR** | OKR tracking (quarter/sprint OKR progress check) |
|
|
48
|
+
|
|
49
|
+
> **Note**: For exploratory analysis → 📈 Danny. For VOC analysis → 🎤 Rita.
|
|
50
|
+
|
|
51
|
+
## Tools
|
|
52
|
+
|
|
53
|
+
- GA4 MCP server
|
|
54
|
+
- NotebookLM MCP server
|
|
55
|
+
|
|
56
|
+
## Response Format
|
|
57
|
+
|
|
58
|
+
From now on, respond with the 📊 icon using Vicky's persona.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Oscar System
|
|
2
|
+
|
|
3
|
+
A multi-agent collaboration system that supports PO/PM product planning, strategy development, and data analysis.
|
|
4
|
+
|
|
5
|
+
{{#if user.name}}
|
|
6
|
+
## User Preferences
|
|
7
|
+
|
|
8
|
+
{{#if user.name}}- Address the user as: **{{user.name}}**
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#if user.role}}- Role: {{user.role}}
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if user.language}}- Respond in: {{user.language}}
|
|
13
|
+
{{/if}}
|
|
14
|
+
{{#if user.communication_style}}- Communication style: {{user.communication_style}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{/if}}
|
|
17
|
+
|
|
18
|
+
## First Run
|
|
19
|
+
|
|
20
|
+
If `project.yaml` does not exist, the **Setup Wizard** starts.
|
|
21
|
+
- Phase 1: User interview (name, communication style)
|
|
22
|
+
- Phase 2: Deep project interview (Simon leads, 15-20 min)
|
|
23
|
+
- Brownfield projects: Code scan then confirmation
|
|
24
|
+
|
|
25
|
+
## Project Information
|
|
26
|
+
|
|
27
|
+
→ See `.context/project.yaml`
|
|
28
|
+
|
|
29
|
+
## Current Sprint
|
|
30
|
+
|
|
31
|
+
→ See `operations.sprint.current` in `.context/project.yaml`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Operating Model: Oscar-Centric
|
|
36
|
+
|
|
37
|
+
By default, **🎩 Oscar (Orchestrator)** is active.
|
|
38
|
+
- Natural language request → Oscar decides and dispatches to the appropriate agent
|
|
39
|
+
- Direct invocation (`/strategy` etc.) → Bypasses to that agent
|
|
40
|
+
- Proactive alerts, multi-agent coordination, context briefing
|
|
41
|
+
|
|
42
|
+
### Delegation Rules (Mandatory)
|
|
43
|
+
|
|
44
|
+
> *Oscar is a conductor, not someone who plays every instrument.*
|
|
45
|
+
|
|
46
|
+
When the following keywords are detected, Oscar **must** load the corresponding agent persona and delegate.
|
|
47
|
+
Oscar is prohibited from answering directly. When delegating, explain the reasoning in one line.
|
|
48
|
+
|
|
49
|
+
| Keywords (KO/EN) | Delegate To | Persona File |
|
|
50
|
+
|-------------------|-------------|--------------|
|
|
51
|
+
| `데이터/data`, `쿼리/query`, `분석/analysis`, `코호트/cohort`, `추이/trend` | 📈 **Danny** | `agents/analyst.md` |
|
|
52
|
+
| `VOC`, `고객/customer`, `피드백/feedback`, `불만/complaint`, `인터뷰/interview` | 🎤 **Rita** | `agents/researcher.md` |
|
|
53
|
+
| `가설/hypothesis`, `전략/strategy`, `PRD`, `우선순위/priority`, `왜/why` | 🎯 **Simon** | `agents/strategist.md` |
|
|
54
|
+
| `시장/market`, `경쟁사/competitor`, `포지셔닝/positioning`, `벤치마크/benchmark` | 🗺️ **Marco** | `agents/market-researcher.md` |
|
|
55
|
+
| `스프린트/sprint`, `스토리/story`, `백로그/backlog`, `속도/velocity` | 📋 **Penny** | `agents/planner.md` |
|
|
56
|
+
| `스크린스펙/screen spec`, `핸드오프/handoff`, `릴리스/release`, `개발전달/dev delivery` | 📐 **Hank** | `agents/handoff-specialist.md` |
|
|
57
|
+
| `검증/validation`, `Before/After`, `Guard Rail`, `OKR check` | 📊 **Vicky** | `agents/validator.md` |
|
|
58
|
+
| `트래킹/tracking`, `이벤트/event`, `택소노미/taxonomy`, `데이터 품질/data quality` | 📡 **Tara** | `agents/tracking-governor.md` |
|
|
59
|
+
| `데일리/daily`, `회고/retro`, `스탠드업/standup`, `미팅 준비/meeting prep` | 🗓️ **Nora** | `agents/operations.md` |
|
|
60
|
+
|
|
61
|
+
**What Oscar can handle directly**: Context briefing, session management, simple file lookups, routing decisions, consolidated reporting
|
|
62
|
+
|
|
63
|
+
### Intent Verification
|
|
64
|
+
|
|
65
|
+
Before delegating, verify the following conditions. Even if keywords are present, if intent is unclear, ask the user for clarification instead of delegating.
|
|
66
|
+
|
|
67
|
+
- **Keyword + action verb present** → Delegate (`"Analyze the cohort"` → Danny)
|
|
68
|
+
- **Keyword only, no action** → Clarify (`"cohort"` alone → "Would you like a cohort analysis?")
|
|
69
|
+
- **Keyword mentioned in casual conversation** → Do not delegate (`"From the strategy meeting..."` → Oscar responds directly)
|
|
70
|
+
|
|
71
|
+
### Circuit Breaker (All Agents)
|
|
72
|
+
|
|
73
|
+
All agents must **stop immediately and report to the user** when the same approach fails 3 consecutive times.
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
[Circuit Breaker Triggered]
|
|
77
|
+
- Attempted approach: {method}
|
|
78
|
+
- Failure count: 3
|
|
79
|
+
- Observation: {why it failed}
|
|
80
|
+
- Suggestion: {alternative approach or request for user decision}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Prevents infinite loops, repeated identical queries, and same-error retries.
|
|
84
|
+
|
|
85
|
+
### Working Memory (In-Session Notes)
|
|
86
|
+
|
|
87
|
+
To prevent context loss in long sessions, use the `## Working Memory` section in session files.
|
|
88
|
+
|
|
89
|
+
| Category | Purpose | Rule |
|
|
90
|
+
|----------|---------|------|
|
|
91
|
+
| **NOW** | Current focus | Only 1, replaced |
|
|
92
|
+
| **LEARNED** | Facts discovered during session | Timestamped, cumulative |
|
|
93
|
+
| **DECISION** | Decisions and rationale | Keep previous records when reversed |
|
|
94
|
+
|
|
95
|
+
Include Working Memory in the handoff context when switching agents.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Slash Commands
|
|
100
|
+
|
|
101
|
+
### Session & Context
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `/start` | List active sessions → select (Setup on first run) |
|
|
105
|
+
| `/start {id}` | Restore specific session |
|
|
106
|
+
| `/start new "{topic}"` | Create new session |
|
|
107
|
+
| `/start recent` | Restore recently closed session |
|
|
108
|
+
| `/start parallel` | Start parallel session (skip lock warnings, fast start) |
|
|
109
|
+
| `/save` | Save session (release lock) |
|
|
110
|
+
| `/save --close` | Save + close session (archive) |
|
|
111
|
+
| `/save --share "{title}"` | Save + share deliverables |
|
|
112
|
+
| `/sessions` | Full session status dashboard |
|
|
113
|
+
| `/sessions clean` | Clean up stale locks |
|
|
114
|
+
| `/sprint` | Sprint dashboard |
|
|
115
|
+
| `/sprint new` | Create new sprint |
|
|
116
|
+
| `/retro` | Sprint retrospective |
|
|
117
|
+
| `/metrics` | Core metrics review |
|
|
118
|
+
| `/daily` | Daily work log → upload to Notion |
|
|
119
|
+
| `/daily --dry-run` | Preview daily log (no upload) |
|
|
120
|
+
|
|
121
|
+
{{#if domains}}
|
|
122
|
+
### Domains (defined in project.yaml)
|
|
123
|
+
| Command | Description |
|
|
124
|
+
|---------|-------------|
|
|
125
|
+
{{#each domains}}
|
|
126
|
+
| `/{{id}}` | Load {{name}} domain |
|
|
127
|
+
{{/each}}
|
|
128
|
+
{{/if}}
|
|
129
|
+
|
|
130
|
+
### Agents
|
|
131
|
+
|
|
132
|
+
#### PO Team (8 + Orchestrator + Ollie/Sage)
|
|
133
|
+
|
|
134
|
+
| Command | Agent | Role |
|
|
135
|
+
|---------|-------|------|
|
|
136
|
+
| (default) | 🎩 Oscar | **Orchestrator** — Routing, coordination, proactive alerts |
|
|
137
|
+
| `/strategy` | 🎯 Simon | PRD, hypotheses, priorities |
|
|
138
|
+
| `/market` | 🗺️ Marco | Market research, competitive analysis, positioning |
|
|
139
|
+
| `/plan` | 📋 Penny | Sprint, stories, backlog |
|
|
140
|
+
| `/handoff` | 📐 Hank | Screen specs, handoff, release readiness |
|
|
141
|
+
| `/validate` | 📊 Vicky | Hypothesis validation, Guard Rail, OKR check |
|
|
142
|
+
| `/analytics` | 📈 Danny | Data analysis, cohorts, insights |
|
|
143
|
+
| `/research` | 🎤 Rita | VOC analysis, customer insights |
|
|
144
|
+
| `/tracking` | 📡 Tara | Event taxonomy, tracking plans, data quality |
|
|
145
|
+
| `/daily` | 🗓️ Nora | Daily operations, retros, meeting prep |
|
|
146
|
+
| `/party` | 🎭 All | Team discussion mode (Oscar facilitates) |
|
|
147
|
+
| `/oscar-loop` | 🔄 Loop | Autonomous parallel task creation (Ollie ×N) |
|
|
148
|
+
| (internal) | 🎩✨ Ollie | Task Creator — Oscar's hands-on counterpart |
|
|
149
|
+
| (internal) | 🔮 Sage | Strategic Advisor — Oscar's counsel |
|
|
150
|
+
|
|
151
|
+
{{#if dev_scope.repo_name}}
|
|
152
|
+
#### Dev Team (2) — {{dev_scope.repo_name}}{{#if dev_scope.spec_site}} + spec-site{{/if}}
|
|
153
|
+
|
|
154
|
+
| Command | Agent | Role |
|
|
155
|
+
|---------|-------|------|
|
|
156
|
+
| `/dev` | 🔨 Derek | Development, technical review |
|
|
157
|
+
| `/qa` | 🧪 Quinn | Testing, quality review |
|
|
158
|
+
|
|
159
|
+
> ⚠️ Derek and Quinn work on **{{dev_scope.repo_name}}**{{#if dev_scope.spec_site}} and **spec-site**{{/if}}.
|
|
160
|
+
> They do not modify {{dev_scope.service_repo}} service code.
|
|
161
|
+
{{/if}}
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Context Structure
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
.context/
|
|
169
|
+
├── project.yaml # Project config (from Setup interview)
|
|
170
|
+
├── user-context.yaml # User context (gitignored)
|
|
171
|
+
├── .secrets.yaml # Sensitive data (gitignored)
|
|
172
|
+
├── WORKFLOW.md # Workflow guide
|
|
173
|
+
│
|
|
174
|
+
├── agents/ # Agent personas (14 + TEMPLATE.md)
|
|
175
|
+
├── oscar/workflows/ # Oscar extension modules (conditionally loaded)
|
|
176
|
+
├── templates/ # Reusable templates (11)
|
|
177
|
+
├── metrics/ # Metrics data
|
|
178
|
+
├── daily/ # Daily work logs (YYYY-MM-DD.yaml)
|
|
179
|
+
│
|
|
180
|
+
├── global/ # Cross-project
|
|
181
|
+
│ ├── database/ # DB schema (index + details)
|
|
182
|
+
│ ├── product/ # Product (philosophy + screen-level details)
|
|
183
|
+
│ ├── tracking/ # GA4/GTM events
|
|
184
|
+
│ ├── strategy.md # Strategic direction
|
|
185
|
+
│ └── metrics.md # Core metrics definitions
|
|
186
|
+
│
|
|
187
|
+
├── domains/ # Per-domain
|
|
188
|
+
├── sprints/ # Sprints (current + _archive)
|
|
189
|
+
│
|
|
190
|
+
└── sessions/ # Parallel session management
|
|
191
|
+
├── index.yaml # Session index + lock state
|
|
192
|
+
├── active/ # Active sessions
|
|
193
|
+
└── archive/ # Archived sessions (monthly)
|
|
194
|
+
|
|
195
|
+
.claude/commands/ # Slash command definitions
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
{{#if integrations}}
|
|
201
|
+
## MCP Servers (defined in project.yaml)
|
|
202
|
+
|
|
203
|
+
→ See `operations.integrations` in `.context/project.yaml`
|
|
204
|
+
{{/if}}
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
{{INTEGRATION_SAFETY_RULES}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
id: claude-code
|
|
2
|
+
name: "Claude Code"
|
|
3
|
+
|
|
4
|
+
system_prompt:
|
|
5
|
+
source: "CLAUDE.md.hbs"
|
|
6
|
+
target: "CLAUDE.md"
|
|
7
|
+
hydration:
|
|
8
|
+
type: system
|
|
9
|
+
name: "CLAUDE.md"
|
|
10
|
+
|
|
11
|
+
commands:
|
|
12
|
+
dir: ".claude/commands"
|
|
13
|
+
target_dir: ".claude/commands"
|
|
14
|
+
hydration_map:
|
|
15
|
+
"analytics.md.hbs": analytics
|
|
16
|
+
"daily.md.hbs": daily
|
|
17
|
+
"dev.md.hbs": dev
|
|
18
|
+
domain_template: "_domain.md.hbs"
|
|
19
|
+
|
|
20
|
+
detection_markers: [".claude", "CLAUDE.md"]
|
|
21
|
+
|
|
22
|
+
doctor_checks:
|
|
23
|
+
- name: "System prompt exists (hydrated)"
|
|
24
|
+
file: "CLAUDE.md"
|
|
25
|
+
no_hbs: true
|
|
26
|
+
|
|
27
|
+
template_vars:
|
|
28
|
+
PLATFORM_NAME: "Claude Code"
|
|
29
|
+
SYSTEM_PROMPT_FILE: "CLAUDE.md"
|
|
30
|
+
COMMAND_DIR: ".claude/commands/"
|
|
31
|
+
COMMAND_PREFIX: "/"
|
|
32
|
+
|
|
33
|
+
post_install:
|
|
34
|
+
steps:
|
|
35
|
+
- "Open Claude Code in this directory"
|
|
36
|
+
- "Type /start — Oscar will greet you"
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { resolve, basename } from 'node:path';
|
|
4
|
+
import { execSync } from 'node:child_process';
|
|
5
|
+
import { copyScaffold, appendToFile, detectExisting } from '../lib/scaffold.mjs';
|
|
6
|
+
import { runSetupWizard } from '../lib/setup-wizard.mjs';
|
|
7
|
+
import { hydrate } from '../lib/hydrate.mjs';
|
|
8
|
+
import { runDoctor } from '../lib/doctor.mjs';
|
|
9
|
+
import { loadManifest, getDefaultAdapter } from '../lib/adapter.mjs';
|
|
10
|
+
|
|
11
|
+
const USAGE = `
|
|
12
|
+
popilot <command> [target-dir] [options]
|
|
13
|
+
|
|
14
|
+
Commands:
|
|
15
|
+
init [dir] Scaffold + interactive setup + hydration (default)
|
|
16
|
+
hydrate [dir] Re-hydrate .hbs templates from existing project.yaml
|
|
17
|
+
doctor [dir] Check installation health
|
|
18
|
+
help Show this help
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
--skip-spec-site Skip spec-site (Vue3 + Vite) scaffold
|
|
22
|
+
--force Overwrite existing files
|
|
23
|
+
--platform=<id> Adapter platform (default: claude-code)
|
|
24
|
+
-h, --help Show this help
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
npx popilot init my-project
|
|
28
|
+
npx popilot hydrate
|
|
29
|
+
npx popilot doctor
|
|
30
|
+
npx popilot my-project # same as: popilot init my-project
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const SUBCOMMANDS = new Set(['init', 'hydrate', 'doctor', 'help']);
|
|
34
|
+
|
|
35
|
+
async function main() {
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
|
|
38
|
+
if (args.includes('-h') || args.includes('--help') || args[0] === 'help') {
|
|
39
|
+
console.log(USAGE);
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const skipSpecSite = args.includes('--skip-spec-site');
|
|
44
|
+
const force = args.includes('--force');
|
|
45
|
+
const platformArg = args.find(a => a.startsWith('--platform='));
|
|
46
|
+
const platform = platformArg ? platformArg.split('=')[1] : getDefaultAdapter();
|
|
47
|
+
const positional = args.filter(a => !a.startsWith('-'));
|
|
48
|
+
|
|
49
|
+
// Determine subcommand and target directory
|
|
50
|
+
let cmd, targetDir;
|
|
51
|
+
if (positional.length === 0) {
|
|
52
|
+
cmd = 'init';
|
|
53
|
+
targetDir = resolve('.');
|
|
54
|
+
} else if (SUBCOMMANDS.has(positional[0])) {
|
|
55
|
+
cmd = positional[0];
|
|
56
|
+
targetDir = resolve(positional[1] || '.');
|
|
57
|
+
} else {
|
|
58
|
+
// Backward compat: popilot [dir] → init [dir]
|
|
59
|
+
cmd = 'init';
|
|
60
|
+
targetDir = resolve(positional[0]);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
switch (cmd) {
|
|
64
|
+
case 'init':
|
|
65
|
+
await cmdInit(targetDir, { skipSpecSite, force, platform });
|
|
66
|
+
break;
|
|
67
|
+
case 'hydrate':
|
|
68
|
+
await cmdHydrate(targetDir, { skipSpecSite, platform });
|
|
69
|
+
break;
|
|
70
|
+
case 'doctor':
|
|
71
|
+
await cmdDoctor(targetDir, { skipSpecSite, platform });
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ── init ────────────────────────────────────────────────
|
|
77
|
+
|
|
78
|
+
async function cmdInit(targetDir, { skipSpecSite, force, platform }) {
|
|
79
|
+
console.log();
|
|
80
|
+
console.log(' 🚀 Popilot — Multi-agent PO/PM System');
|
|
81
|
+
console.log(' ══════════════════════════════════════');
|
|
82
|
+
console.log();
|
|
83
|
+
console.log(` Target: ${targetDir}`);
|
|
84
|
+
console.log();
|
|
85
|
+
|
|
86
|
+
// Check existing structure
|
|
87
|
+
const existing = await detectExisting(targetDir, platform);
|
|
88
|
+
if (existing.length > 0 && !force) {
|
|
89
|
+
console.log(' ⚠️ Existing Popilot structure detected:');
|
|
90
|
+
existing.forEach(f => console.log(` - ${f}`));
|
|
91
|
+
console.log();
|
|
92
|
+
console.log(' Use --force to overwrite, or run in an empty directory.');
|
|
93
|
+
console.log();
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 1. Copy scaffold (core + adapter)
|
|
98
|
+
console.log(' 📦 Copying scaffold...');
|
|
99
|
+
const { copied, overwritten, skipped, appends } = await copyScaffold(targetDir, {
|
|
100
|
+
skipSpecSite,
|
|
101
|
+
overwriteExisting: force,
|
|
102
|
+
platform,
|
|
103
|
+
});
|
|
104
|
+
console.log(` ${copied.length} files created`);
|
|
105
|
+
if (overwritten.length > 0) {
|
|
106
|
+
console.log(` ${overwritten.length} files overwritten (--force)`);
|
|
107
|
+
}
|
|
108
|
+
if (skipped.length > 0) {
|
|
109
|
+
console.log(` ${skipped.length} existing files kept`);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Process .append files (gitignore)
|
|
113
|
+
for (const { file, content } of appends) {
|
|
114
|
+
const filePath = resolve(targetDir, file);
|
|
115
|
+
await appendToFile(filePath, content);
|
|
116
|
+
console.log(` ✅ Updated ${file}`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 2. Interactive setup wizard
|
|
120
|
+
await runSetupWizard(targetDir, { platform });
|
|
121
|
+
|
|
122
|
+
// 3. Hydrate templates
|
|
123
|
+
console.log();
|
|
124
|
+
console.log(' ──────────────────────────────────────');
|
|
125
|
+
console.log(' 🔧 Hydrating templates...');
|
|
126
|
+
console.log(' ──────────────────────────────────────');
|
|
127
|
+
const { hydrated, domains } = await hydrate(targetDir, { skipSpecSite, platform });
|
|
128
|
+
for (const f of hydrated) {
|
|
129
|
+
console.log(` ${f} ✅`);
|
|
130
|
+
}
|
|
131
|
+
for (const f of domains) {
|
|
132
|
+
console.log(` ${f} ✅ (domain)`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 4. Install spec-site dependencies
|
|
136
|
+
if (!skipSpecSite) {
|
|
137
|
+
const specSiteDir = resolve(targetDir, 'spec-site');
|
|
138
|
+
console.log();
|
|
139
|
+
console.log(' 📦 Installing spec-site dependencies...');
|
|
140
|
+
try {
|
|
141
|
+
execSync('npm install', { cwd: specSiteDir, stdio: 'pipe' });
|
|
142
|
+
console.log(' ✅ Done');
|
|
143
|
+
} catch {
|
|
144
|
+
console.log(' ⚠️ npm install failed. Run manually: cd spec-site && npm install');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 5. Summary — load post-install from manifest
|
|
149
|
+
let postInstallSteps;
|
|
150
|
+
try {
|
|
151
|
+
const manifest = await loadManifest(platform);
|
|
152
|
+
postInstallSteps = manifest.post_install?.steps;
|
|
153
|
+
} catch {
|
|
154
|
+
postInstallSteps = null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
console.log();
|
|
158
|
+
console.log(' ──────────────────────────────────────');
|
|
159
|
+
console.log(' ✅ Popilot is ready!');
|
|
160
|
+
console.log(' ──────────────────────────────────────');
|
|
161
|
+
console.log();
|
|
162
|
+
console.log(' Next steps:');
|
|
163
|
+
if (postInstallSteps && postInstallSteps.length > 0) {
|
|
164
|
+
postInstallSteps.forEach((step, i) => {
|
|
165
|
+
console.log(` ${i + 1}. ${step}`);
|
|
166
|
+
});
|
|
167
|
+
} else {
|
|
168
|
+
console.log(' 1. Open Claude Code in this directory');
|
|
169
|
+
console.log(' 2. Type /start — Oscar will greet you');
|
|
170
|
+
}
|
|
171
|
+
console.log(' 3. Oscar can run a deep interview to enrich your project context');
|
|
172
|
+
console.log();
|
|
173
|
+
console.log(' 📁 Created:');
|
|
174
|
+
console.log(' CLAUDE.md → System instructions (hydrated)');
|
|
175
|
+
console.log(' .context/project.yaml → Project configuration');
|
|
176
|
+
console.log(' .claude/commands/ → Slash commands');
|
|
177
|
+
console.log(' .context/agents/ → Agent personas (hydrated)');
|
|
178
|
+
if (!skipSpecSite) {
|
|
179
|
+
console.log(' spec-site/ → Interactive spec viewer (Vue3 + Vite)');
|
|
180
|
+
}
|
|
181
|
+
console.log();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ── hydrate ─────────────────────────────────────────────
|
|
185
|
+
|
|
186
|
+
async function cmdHydrate(targetDir, { skipSpecSite, platform }) {
|
|
187
|
+
console.log();
|
|
188
|
+
console.log(' 🚀 Popilot — Re-hydrating templates');
|
|
189
|
+
console.log(' ══════════════════════════════════════');
|
|
190
|
+
console.log();
|
|
191
|
+
|
|
192
|
+
const { hydrated, domains } = await hydrate(targetDir, { skipSpecSite, platform });
|
|
193
|
+
for (const f of hydrated) {
|
|
194
|
+
console.log(` ${f} ✅`);
|
|
195
|
+
}
|
|
196
|
+
for (const f of domains) {
|
|
197
|
+
console.log(` ${f} ✅ (domain)`);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const total = hydrated.length + domains.length;
|
|
201
|
+
console.log();
|
|
202
|
+
console.log(` ✅ ${total} files hydrated.`);
|
|
203
|
+
console.log();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// ── doctor ──────────────────────────────────────────────
|
|
207
|
+
|
|
208
|
+
async function cmdDoctor(targetDir, { skipSpecSite, platform }) {
|
|
209
|
+
const { passed, failed } = await runDoctor(targetDir, { skipSpecSite, platform });
|
|
210
|
+
process.exit(failed.length > 0 ? 1 : 0);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// ── Run ─────────────────────────────────────────────────
|
|
214
|
+
|
|
215
|
+
main().catch(err => {
|
|
216
|
+
console.error('Error:', err.message);
|
|
217
|
+
process.exit(1);
|
|
218
|
+
});
|