Briefing generator

From lowtidebuild/stock-analysis-agent · View interactive version

Briefing generator is an AI agent skill from the GitHub repository lowtidebuild/stock-analysis-agent. **Role**: Step 8 (Mode A) — Generate the Mode A Quick Briefing HTML file from analysis-result.json.

How to use this skill

Skill file

Briefing Generator — SKILL.md

Role: Step 8 (Mode A) — Generate the Mode A Quick Briefing HTML file from analysis-result.json.

Triggered by: CLAUDE.md after Analyst Agent (Step 7) completes for Mode A

Reads: run-local analysis-result.json

Writes: output/reports/{ticker}_A_{lang}_{YYYY-MM-DD}.html

References: references/analysis-framework-briefing.md, references/html-template.md (this directory), scripts/render-briefing.py


Instructions

Step 8A.1 — Load Analysis Data

Read run-local analysis-result.json. Extract:

Step 8A.2 — Generate HTML

Build a self-contained HTML file using TailwindCSS via CDN. Structure:

<!DOCTYPE html>
<html lang="{lang}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{ticker} Quick Briefing — {date}</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
</head>
<body class="bg-gray-950 text-gray-100 min-h-screen">
Part 1 — Verdict Card

Layout: compact card with dark background, max-width 800px centered.

┌─────────────────────────────────────────────┐
│  {Company Name} ({TICKER})     {Exchange}    │
│  {Price} {change} ({change%})   {Date}       │
├─────────────────────────────────────────────┤
│  "{One-line thesis}"                         │
│                                              │
│  ┌──────────┐  ┌──────────┐                 │
│  │ VERDICT  │  │ R/R Score│                 │
│  │ {verdict}│  │  {score} │                 │
│  └──────────┘  └──────────┘                 │
│                                              │
│  ┌─────┐ ┌─────┐ ┌─────┐                   │
│  │KPI 1│ │KPI 2│ │KPI 3│                   │
│  │value│ │value│ │value│                   │
│  │[tag]│ │[tag]│ │[tag]│                   │
│  └─────┘ └─────┘ └─────┘                   │
│                                              │
│  🐂 Bull: {target} ({return%}) — {assumption}│
│  📊 Base: {target} ({return%}) — {assumption}│
│  🐻 Bear: {target} ({return%}) — {assumption}│
│                                              │
│  ⚠️ {Top risk with mechanism}                │
│                                              │
│  📅 Next: {catalyst} ({date})                │
│  → Action: {action signal}                   │
└─────────────────────────────────────────────┘

Color scheme (from dashboard-generator color-system.md):

Part 2 — Event Timeline

Vertical timeline layout with a center line:

┌─────────────────────────────────────────────┐
│  ◀ Past 90 Days                              │
│                                              │
│  ●─── {date} {event} {significance badge}    │
│       {1-sentence narrative}                 │
│  ●─── {date} {event}                         │
│       {narrative}                            │
│  ...                                         │
│                                              │
│  ══════ YOU ARE HERE ═════════════════════   │
│  {price} | R/R {score} | {verdict}           │
│                                              │
│  ●─── {date} {event} {significance badge}    │
│       {narrative + leading indicator}        │
│  ●─── {date} {event}                         │
│  ...                                         │
│                                              │
│  Forward 90 Days ▶                           │
│                                              │
│  {Pattern detection note if available}       │
└─────────────────────────────────────────────┘

Timeline node styling:

Footer

Footer requirements:

Step 8A.3 — Write File

Write to: output/reports/{ticker}_A_{lang}_{YYYY-MM-DD}.html

For scripted rerenders inside the critic patch loop, use:

python .claude/skills/briefing-generator/scripts/render-briefing.py \
  --input output/runs/{run_id}/{ticker}/analysis-result.json \
  --output output/reports/{ticker}_A_{lang}_{YYYY-MM-DD}.html

Step 8A.4 — Chat Summary

After writing file, output to chat:

=== {TICKER} Quick Briefing ===
Verdict: {verdict} | R/R Score: {score} ({interpretation})
Action: {action signal}

→ HTML: output/reports/{ticker}_A_{lang}_{date}.html
→ "자세히 분석해줘" for full Mode C dashboard

Completion Check

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.