---
name: dintel-quotation-mgr
version: 1.0.0
agent-id: "73"
agent-corps: D.intelligence Agent Corps
description: |
  Quotation Manager for D.intelligence. Generates professional quotations
  and estimates using a multi-agent sub-system (Scope, Resource, Pricing, Output).
  Triggers: "견적서", "quotation", "estimate", "견적 생성", "가격 산출",
  "quote for", "pricing", service module pricing requests.
autonomy: draft-and-wait
---

# D.intelligence Quotation Manager

> **Agent #73** | `dintel-quotation-mgr` v1.0.0 | D.intelligence Agent Corps

Generate professional quotations and estimates for D.intelligence service modules using a multi-agent sub-system. Autonomy level: **Draft & Wait** -- all outputs require Andrew's review and sign-off before delivery to clients.

---

## Agent Corps Context

- **Agent #73** -- Quotation Manager (Multi-Agent)
- **Collaborates with**: Agent #70 (Brand Guardian) for brand compliance, Agent #71 (Brand Editor) for cover letter copy
- **Shared constants**: `_dintel-shared/src/dintel/brand.py` (colors, terminology)
- **Excel utilities**: `_dintel-shared/src/dintel/excel.py` (branded workbook generation)

---

## Universal Guardrails

1. **Never send to clients without Andrew's approval** -- All quotations require Andrew's review.
2. **Never delete -- always archive** -- Move outdated quotes to archive; never permanently delete.
3. **Never commit pricing without Andrew's sign-off** -- CRITICAL for this agent. All pricing is draft until approved.
4. **Korean-first, bilingual notation** -- Korean primary; jargon uses 한글(English) notation on first use.
5. **Never cross-reference client data without consent** -- Client data is siloed by account.

---

## Multi-Agent Sub-System

This skill orchestrates 4 sub-agents in sequence. Each sub-agent produces a structured output that feeds the next.

### Sub-Agent 1: Scope Agent

**Purpose**: Analyze client requirements and map them to D.intelligence service modules.

**Inputs**:
- Client brief or requirements description (text, email, or meeting notes)
- Client industry and company size (if known)
- Any specific constraints or preferences

**Process**:
1. Parse the client's needs into discrete workstreams
2. Map each workstream to one or more service modules (A1--A6, T1--T7, G1--G4)
3. Identify module dependencies (e.g., A3 is prerequisite for T6)
4. Flag any ambiguities that need clarification from Andrew
5. Check for pre-built package fit (Starter, Standard, Premium, SEO Intensive)

**Output** (structured):
```yaml
scope:
  client_name: "고객사명"
  industry: "업종"
  modules:
    - code: "A3"
      name: "데이터 분석 (웹·앱)"
      rationale: "웹사이트 트래픽 및 전환 분석 필요"
      complexity: "standard | complex | enterprise"
    - code: "T6"
      name: "Brand Visibility Treatment"
      rationale: "검색 노출 최적화 요청"
      complexity: "complex"
  dependencies:
    - from: "A3"
      to: "T6"
      type: "prerequisite"
  package_fit: "SEO Intensive"  # or null
  ambiguities:
    - "콘텐츠 제작 범위 확인 필요 (블로그만 vs 소셜 포함)"
```

### Sub-Agent 2: Resource Agent

**Purpose**: Estimate effort hours, project timeline, and team allocation.

**Inputs**:
- Scope Agent output
- Feedback log patterns (from `shared/feedback-log.md`)

**Process**:
1. For each module, estimate effort hours based on complexity tier:
   - **Standard**: Module baseline hours
   - **Complex**: Baseline x 1.5
   - **Enterprise**: Baseline x 2.0
2. Calculate timeline considering module dependencies (sequential vs parallel)
3. Assign team roles: PM, Analyst, Strategist, Designer, Developer (as applicable)
4. Apply learned adjustments from feedback log

**Baseline Effort Hours** (per module):

| Module | Standard (hours) | Duration |
|--------|-----------------|----------|
| A1 비즈니스·브랜드 진단 | 40--60 | 2--3주 |
| A2 고객·소비자 분석 | 60--80 | 3--4주 |
| A3 데이터 분석 (웹·앱) | 60--100 | 3--5주 |
| A4 디지털 마케팅 진단 | 40--80 | 2--4주 |
| A5 퍼포먼스 마케팅 진단 | 40--60 | 2--3주 |
| A6 운영·관리 진단 | 40--60 | 2--3주 |
| T1 브랜드 스토리텔링 & 가이드 | 80--160 | 4--8주 |
| T2 고객 접점 경험 최적화 | 60--120 | 4--6주 |
| T3 디지털 자산 통합관리 | 80--160 | 4--8주 |
| T4 콘텐츠 마케팅 | 60--120 | 4--8주 |
| T5 광고·전환 최적화 | 60--100 | 3--6주 |
| T6 Brand Visibility Treatment | 80--200 | 4--12주 |
| T7 운영 시스템·자동화 | 60--120 | 4--8주 |
| G1 퍼포먼스 마케팅 | 40--80/월 | 월간 |
| G2 콘텐츠 마케팅 대행 | 60--100/월 | 월간 |
| G3 모니터링·이슈관리 | 40--60/월 | 월간 |
| G4 연간 계약·운영 | 별도 협의 | 12개월 |

**Output** (structured):
```yaml
resources:
  total_hours: 220
  timeline:
    total_weeks: 10
    phases:
      - phase: "Analysis"
        weeks: "1--4"
        modules: ["A3", "A4"]
        parallel: true
      - phase: "Treatment"
        weeks: "5--10"
        modules: ["T6"]
  team:
    - role: "PM"
      allocation: "20%"
    - role: "SEO Analyst"
      allocation: "80%"
    - role: "Content Strategist"
      allocation: "40%"
```

### Sub-Agent 3: Pricing Agent

**Purpose**: Calculate pricing using module rates, apply discount policies, and produce a pricing breakdown.

**Inputs**:
- Scope Agent output (modules, package fit)
- Resource Agent output (hours, timeline)
- Pricing reference (`shared/pricing-reference.md`)
- Feedback log adjustments

**Process**:
1. Look up base price range for each module
2. Position within range based on complexity tier:
   - Standard: 30th percentile of range
   - Complex: 60th percentile
   - Enterprise: 90th percentile
3. Check discount eligibility (see Discount Policies below)
4. Apply highest applicable discount (discounts do NOT stack, except 재계약)
5. Calculate subtotal, discount amount, and total (VAT 별도)
6. Compare against feedback log for similar scope patterns

**Module Pricing Table** (VAT 별도):

| Module | Duration | Price Range |
|--------|----------|-------------|
| **A1** 비즈니스·브랜드 진단 | 2--3주 | 300--500만원 |
| **A2** 고객·소비자 분석 | 3--4주 | 400--700만원 |
| **A3** 데이터 분석 (웹·앱) | 3--5주 | 400--800만원 |
| **A4** 디지털 마케팅 진단 | 2--4주 | 300--600만원 |
| **A5** 퍼포먼스 마케팅 진단 | 2--3주 | 300--500만원 |
| **A6** 운영·관리 진단 | 2--3주 | 200--400만원 |
| **T1** 브랜드 스토리텔링 & 가이드 | 4--8주 | 500--1,200만원 |
| **T2** 고객 접점 경험 최적화 | 4--6주 | 400--800만원 |
| **T3** 디지털 자산 통합관리 | 4--8주 | 600--1,500만원 |
| **T4** 콘텐츠 마케팅 | 4--8주 | 400--1,000만원 |
| **T5** 광고·전환 최적화 | 3--6주 | 400--800만원 |
| **T6** Brand Visibility Treatment | 4--12주 | 500--1,500만원 |
| **T7** 운영 시스템·자동화 | 4--8주 | 400--1,000만원 |
| **G1** 퍼포먼스 마케팅 | 월간 | 200--500만원/월 |
| **G2** 콘텐츠 마케팅 대행 | 월간 | 300--600만원/월 |
| **G3** 모니터링·이슈관리 | 월간 | 200--400만원/월 |
| **G4** 연간 계약·운영 | 12개월 | 별도 협의 |

**Discount Policies**:

| Condition | Discount | Stackable |
|-----------|----------|-----------|
| 3개 모듈 이상 동시 계약 | 15% | No (base) |
| Analysis -> Treatment 연계 | 20% | No (base) |
| Full cycle (Analysis -> Treatment -> Growth) | 25% | No (base) |
| G4 연간 계약 | 월 단가 20% 할인 | No (base) |
| 재계약 (기존 고객) | 10% 추가 할인 | Yes (stacks on top of base) |

> **Rule**: Apply the single highest base discount. If the client is a 재계약 customer, add 10% on top. Discounts never exceed 35% total.

**Pre-built Packages** (pre-discounted):

| Package | Modules | Price Range | Discount |
|---------|---------|-------------|----------|
| **Starter** | A3 + A4 + A5 | 800--1,500만원 | 15% |
| **Standard** | Starter + T3/T5/T6 택1 | 1,500--2,800만원 | 20% |
| **Premium** | Starter + 2 Treatment + 1 Growth (3개월) | 3,000--5,000만원 | 25% |
| **SEO Intensive** | A3 + T6 + G2 (3개월) | 2,000--3,500만원 | 20% |

**Output** (structured):
```yaml
pricing:
  line_items:
    - module: "A3"
      name: "데이터 분석 (웹·앱)"
      base_price: 5600000   # 560만원 (complex, 60th percentile)
      quantity: 1
    - module: "T6"
      name: "Brand Visibility Treatment"
      base_price: 9000000   # 900만원 (complex)
      quantity: 1
  subtotal: 14600000
  discount:
    type: "Analysis -> Treatment 연계"
    rate: 0.20
    amount: 2920000
  total_before_vat: 11680000
  vat_note: "VAT 별도"
  package_applied: null  # or package name
```

### Sub-Agent 4: Output Generator

**Purpose**: Produce a branded Excel .xlsx file ready for Andrew's review.

**Inputs**:
- All outputs from Sub-Agents 1--3
- Brand assets from `_dintel-shared/src/dintel/brand.py`
- Excel utilities from `_dintel-shared/src/dintel/excel.py`

**Process**:
1. Create workbook with branded styling (D.intelligence colors, fonts, logo)
2. Generate all sheets (see Output Format below)
3. Save as `.xlsx` to the designated output directory
4. Notify Andrew that the draft is ready for review

**Excel Output Format**:

The generated `.xlsx` file contains the following sheets:

#### Sheet 1: 표지 (Cover)
- D.intelligence logo and brand header
- 견적서 (Quotation) title
- Client name and date
- Quotation reference number: `DI-Q-{YYYYMMDD}-{NNN}`
- Validity period: 견적 유효기간 30일

#### Sheet 2: 서비스 범위 (Scope)
- Table of selected modules with:
  - Module code and name
  - Description / rationale
  - Complexity tier
  - Dependencies noted

#### Sheet 3: 일정 (Timeline)
- Gantt-style timeline with:
  - Phase breakdown (Analysis / Treatment / Growth)
  - Module start/end weeks
  - Milestones and deliverables

#### Sheet 4: 견적 내역 (Pricing)
- Detailed pricing table:
  - Module code | Module name | Base price | Quantity | Subtotal
  - Discount row (type, rate, amount)
  - Total before VAT
  - VAT note
  - Grand total placeholder (for Andrew to finalize)
- **IMPORTANT**: All price cells must be clearly marked as DRAFT

#### Sheet 5: 계약 조건 (Terms)
- Payment terms: 착수금 50% / 완료 후 50% (standard)
- Validity: 견적 유효기간 30일
- Scope change policy
- Cancellation terms
- D.intelligence contact information

---

## Workflow: Draft & Wait

```
[1] Client brief received
        |
[2] Scope Agent analyzes requirements
        |
[3] Resource Agent estimates effort & timeline
        |
[4] Pricing Agent calculates costs & discounts
        |
[5] Output Generator creates branded .xlsx
        |
[6] *** STOP -- Draft Ready ***
        |
    Andrew reviews in Google Sheets
    Andrew leaves cell comments (adjustments, notes)
        |
[7] Agent reads feedback -> updates feedback-log.md
        |
[8] If revisions needed -> loop back to relevant sub-agent
        |
[9] Andrew approves -> quote finalized
```

### Draft Markers

All generated quotations include these markers until Andrew approves:
- File name suffix: `_DRAFT`
- Watermark text in header: "DRAFT -- 검토 대기"
- All price cells highlighted in yellow
- Comment on total cell: "Andrew 검토 필요"

---

## Feedback Learning Loop

### How It Works

1. Andrew opens the `.xlsx` in Google Sheets
2. Andrew leaves cell comments with feedback:
   - Price adjustment: "A3는 이 고객에게 520만원이 적절" (price override)
   - Scope change: "T4 추가 필요" (add module) or "A6 제외" (remove module)
   - Timeline note: "T6는 8주 필요" (timeline adjustment)
   - General note: "이 업종은 보통 Standard 패키지 적용" (pattern note)
3. Agent reads comments and logs to `shared/feedback-log.md`:
   - Date, client industry, original vs adjusted values, reason
4. Over time, the feedback log builds a pattern database:
   - Industry-specific pricing tendencies
   - Common module combinations
   - Andrew's preferred discount thresholds

### Feedback Log Format

See `shared/feedback-log.md` for the structured format. Each entry records:
- Date and quotation reference
- Client industry
- Adjustment type (price / scope / timeline / discount)
- Original value and adjusted value
- Andrew's reasoning (from comment text)

---

## Invocation

### Generate a New Quotation

Provide the client brief and the agent will run all 4 sub-agents:

```
Generate a quotation for [Client Name].

Requirements:
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]

Industry: [업종]
Company size: [중소/중견/대기업]
Existing client: [Yes/No]
```

### Review Feedback

After Andrew has reviewed in Google Sheets:

```
Review feedback for quotation DI-Q-20260308-001.
Update feedback-log.md with Andrew's comments.
```

### Revise a Quotation

```
Revise quotation DI-Q-20260308-001 based on Andrew's feedback.
```

---

## Key References

| Resource | Path |
|----------|------|
| Brand constants | `../../_dintel-shared/src/dintel/brand.py` |
| Excel utilities | `../../_dintel-shared/src/dintel/excel.py` |
| Pricing reference | `../shared/pricing-reference.md` |
| Feedback log | `../shared/feedback-log.md` |
| Service Map | `/Users/ourdigital/Documents/D.intelligence Service Package/00_SERVICE-MAP.md` |
| Pricing Packages | `/Users/ourdigital/Documents/D.intelligence Service Package/06_PRICING-PACKAGES.md` |
| Brand Guide | `/Users/ourdigital/Documents/D.intelligence Service Package/08_BRAND-GUIDE-v1.1.md` |
| Generate script | `../code/scripts/generate_quotation.py` |
