| name | narrative-discover |
| spec-version | 2 |
| context | main |
| allowed-tools | ["Read","Write","Edit","Glob","Grep","Agent"] |
| argument-hint | [--topic <topic>] |
| description | 콘텐츠 기회 발견 워크플로우 — detector 위임 + A/B/C 판정으로 저작 소재 등록. Use when the user says "콘텐츠 기회", "글감 찾기", or "뭘 쓸까".
|
/narrative:discover
대화/작업에서 저작 가능한 콘텐츠 기회를 감지하고, A/B/C 판정으로 등록 여부를 결정하는 워크플로우.
패턴: Sequential (scan → detect → judge → register)
WHY
콘텐츠 기회 감지는 detector 에이전트의 전문 영역이지만, 판정(A/B/C)과 등록은 워크플로우 레벨의 판단이다. 에이전트는 신호를 감지하고 스코어링하는 데 집중하고, 감지 결과를 기반으로 저작 진입 여부를 결정하는 것은 스킬이 사용자와 함께 수행한다.
이 분리를 통해:
- detector는 감지 전문성에 집중 (격리 컨텍스트)
- 판정 기준 변경이 에이전트 수정 없이 스킬에서 가능
- 사용자가 판정 과정에 개입하여 감지 품질을 교정
KNOWLEDGE REFS
| 참조 | 역할 | 로드 시점 |
|---|
workspace/squads/narrative/vault/knowledge/pipelines.md | 4 파이프라인 정의 — 기회가 어떤 파이프라인으로 연결되는지 | Step: judge |
workspace/squads/narrative/vault/knowledge/quality-standards.md | QTSP 품질 기준 — 기회의 잠재 품질 판단 | Step: judge |
workspace/squads/narrative/vault/knowledge/initiative-narrative-guide.md | Initiative 서사 가이드 — Initiative 기반 기회의 서사 구조 판단 | Step: detect |
workspace/squads/narrative/records/README.md | 기회 기록 형식 — discoveries/ 기록 포맷 | Step: register |
STATE
scan_context: null
detector_output: null
judgments: []
registrations: []
STEPS
Step 1: Scan — 맥락 수집
스캔 대상을 결정하고 detector에 전달할 맥락을 수집한다.
입력 경로 2가지:
| 경로 | 트리거 | 수집 대상 |
|---|
| 암시적 | /narrative:discover (인자 없이) | 현재 대화 맥락, 최근 작업 (git log --oneline -10), active initiatives 상태 |
| 명시적 | /narrative:discover --topic <topic> | 사용자 지정 주제 + 관련 맥락 탐색 |
Output: scan_context (conversations, recent_commits, initiative_status, explicit_topic)
Step 2: Detect — detector 에이전트 위임
scan_context를 detector 에이전트에 전달하여 콘텐츠 기회를 감지한다.
- 위임 대상:
workspace/squads/narrative/agents/detector.md
- 전달 컨텍스트: scan_context
- 반환: DetectorOutput (opportunities[] with signal, confidence, suggested_pipeline)
detector는 4가지 신호를 기반으로 기회를 스코어링:
- 패턴 반복: 같은 주제가 3+ 맥락에서 등장
- 비하인드 스토리: 실패/피벗/의외의 발견
- 실패/피벗: 방향 전환의 과정 자체가 콘텐츠
- 외부 공유 가치: 다른 사람에게 유용한 방법론/도구
Step 3: Judge — A/B/C 판정
detector가 반환한 기회 목록을 사용자에게 제시하고, 각 기회에 대해 A/B/C를 판정한다.
제시 포맷 (기회당):
[signal] title (confidence: 0.XX)
근거: evidence
추천 파이프라인: suggested_pipeline
→ 판정: A / B / C ?
기회가 0건이면 "감지된 기회 없음"으로 종료.
Step 4: Register — 판정 결과 반영
판정 결과에 따라 등록/기록을 수행한다.
| 판정 | 액션 |
|---|
| A | workspace/squads/narrative/data/content.json에 item 추가 (status: idea) + records/discoveries/YYYY-MM-DD.md Spotted 섹션 기록 + /narrative:write 안내 |
| B | workspace/squads/narrative/data/content.json에 item 추가 (status: idea) + records/discoveries/YYYY-MM-DD.md Queued 섹션 기록 |
| C | records/discoveries/YYYY-MM-DD.md Spotted 섹션에 기각 기록만 |
records/discoveries/ 기록 형식:
### [signal] title
- **confidence**: 0.XX
- **evidence**: ...
- **suggested_pipeline**: derived | new | update | chain
- **judgment**: A | B | C
- **action**: 등록완료 | 보류등록 | 기각
JUDGMENT
A/B/C 판정 기준
| 판정 | 조건 | 액션 |
|---|
| A (즉시 저작) | confidence >= 0.7 + 소재 충분 + 사용자 동의 | content.json 등록 + /narrative:write 안내 |
| B (등록 보류) | confidence >= 0.4 또는 소재 부족 | content.json 등록 (idea) + records/ 기록 |
| C (기각) | confidence < 0.4 또는 사용자 기각 | records/discoveries/ 기록만 |
판정 보조 기준:
- 소재 충분성: evidence가 구체적이고, 3문단 이상의 서사를 구성할 수 있는가?
- 파이프라인 적합성: suggested_pipeline이 기존 파이프라인(derived/new/update/chain)에 매핑되는가?
- QTSP 잠재 점수: quality-standards.md 기준으로 T(주제 선명도), S(서사 매력), P(실용 가치) 중 2개 이상 충족?
사용자 오버라이드: 사용자는 confidence와 무관하게 판정을 변경할 수 있다. 사용자 판정이 최종.
AGENT DELEGATION
| Step | 에이전트 | 전달 컨텍스트 |
|---|
| detect | workspace/squads/narrative/agents/detector.md | scan_context (conversations, recent_commits, initiative_status, explicit_topic) |
FLOW
flowchart TD
Start["입력: /narrative:discover"] --> Scan["scan\n맥락 수집"]
Scan --> Detect[["detect\ndetector 에이전트 위임"]]
Detect --> Judge{"judge\nA/B/C 판정"}
Judge -->|"기회 0건"| End["종료"]
Judge -->|"A: 즉시 저작"| Register["register\n판정 결과 반영"]
Judge -->|"B: 등록 보류"| Register
Judge -->|"C: 기각"| Register
Register --> End
nodes:
- id: scan
type: auto
entry: true
summary: "스캔 맥락 수집 — 대화/작업/initiative에서 detector 입력 구성"
input: [current_conversation, explicit_topic]
output: [scan_context]
- id: detect
type: agent
agent: workspace/squads/narrative/agents/detector.md
summary: "detector 에이전트 위임 — 콘텐츠 기회 감지 + 스코어링"
input: [scan_context]
output: [detector_output]
- id: judge
type: human
summary: "감지된 기회 목록을 사용자에게 제시하고 A/B/C 판정"
input: [detector_output]
output: [judgments]
judgment:
- condition: "감지된 기회 0건"
next: end
type: gate
- condition: "사용자가 confidence 오버라이드"
next: register
type: override
- id: register
type: auto
summary: "판정 결과에 따라 content.json 등록 + records/ 기록"
input: [judgments, detector_output]
output: [registration_summary]
triggers:
- target: "narrative:write"
condition: "A 판정 항목 존재 시"
- id: end
type: auto
summary: "워크플로우 종료 — 등록 결과 요약 제시"
edges:
- from: scan → to: detect
- from: detect → to: judge
- from: judge → to: register
- from: register → to: end
V-01~V-07 검증
| 규칙 | 결과 |
|---|
| V-01: 모든 노드에 id, type, summary | OK — 5개 노드 모두 충족 |
| V-02: agent 노드에 agent 필드 | OK — detect 노드에 agent 경로 명시 |
| V-03: judgment.next가 유효한 노드 id | OK — end, register 모두 존재 |
| V-04: edge의 from/to가 유효한 노드 id | OK — scan, detect, judge, register, end 모두 존재 |
| V-05: 도달 불가능한 노드 없음 | OK — scan(entry)에서 모든 노드 도달 가능 |
| V-06: 출구 없는 루프 없음 | OK — 루프 없음 |
| V-07: 병렬 엣지 합류점 | OK — 병렬 없음 |