[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80749":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":16,"compositeScore":17,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":13,"starSnapshotCount":13,"syncStatus":15,"lastSyncTime":25,"discoverSource":26},80749,"deep-research-pipeline","hamletlg\u002Fdeep-research-pipeline","hamletlg",null,"Python",43,6,41,0,1,2,3,2.54,false,"main",true,[],"2026-06-12 02:04:06","# Deep Research Report Pipeline — Automation Kit\n\nThis folder contains the complete automation kit for producing deep research reports\non any topic using Hermes Agent. It was derived from the actual workflow used to\nproduce *\"The State of Artificial Intelligence in Europe: A 2026 Report\"*.\n\n## Directory Structure\n\n```\ndeep-research-pipeline\u002F\n├── README.md                          ← You are here\n├── docs\u002F                              ← Analysis & blueprints\n│   ├── workflow_analysis.md           ← Pipeline reconstruction\n│   └── automation_blueprint.md        ← Templates & orchestrator\n├── templates\u002F                         ← Reusable prompt templates (topic-agnostic)\n│   ├── reusable_pass_prompt_template.md\n│   ├── prompt_to_produce_pass_prompt_from_template.txt\n│   └── prompt_files\u002F                  ← Parameterized stage prompts\n│       ├── initial.md                 ← Stage 1: Initial research\n│       ├── assessment.md              ← Stage 2: Quality assessment\n│       ├── cleanup.md                 ← Stage 7: Cleanup\n│       └── meta_prompt.txt            ← Meta-prompt generator\n├── scripts\u002F                           ← Python scripts\n│   ├── orchestrator.py                ← Full pipeline orchestrator\n│   ├── generate_charts.py             ← Chart generation (matplotlib)\n│   └── integrate_charts.py            ← Chart insertion into document\n├── config\u002F                            ← Pipeline configuration\n│   └── cron_job_config.yaml           ← Cron job definitions for chaining\n├── references\u002F                      ← Reference materials (skill copies, source docs)\n│   └── deep-research-framework\u002F     ← Copy of the deep-research-framework skill\n│       └── SKILL.md                 ← The methodology that drives this pipeline\n└── case-studies\u002F                    ← Example case studies\n    └── european-ai-2026\u002F              ← The Europe report (example)\n        ├── artifacts\u002F                 ← Report versions, charts, exports\n        ├── analysis\u002F                  ← Quality assessment, improvement plan\n        ├── prompts\u002F                   ← Original prompts used\n        └── pass-prompts\u002F              ← Generated pass prompts\n```\n\n## The Foundation: Deep-Research-Framework Skill\n\nThe entire pipeline is built on the `deep-research-framework` skill (a copy of which is\navailable in `references\u002Fdeep-research-framework\u002FSKILL.md`). This skill defines the 10-component\nquality methodology that drives every stage of the pipeline — from the initial research persona\nand PICO framing, through the source quality hierarchy, to the quality assessment criteria\nused in Stage 2.\n\nThe skill is kept as a reference copy in this folder so the pipeline is fully self-contained:\nyou can reproduce the workflow on any machine without depending on the installed skill set.\n\n## Quick Start\n\n```bash\n# Run the full pipeline for a new topic\npython3 scripts\u002Forchestrator.py \\\n  --topic \"Your Research Topic\" \\\n  --output-dir \u002Fpath\u002Fto\u002Foutput \\\n  --passes 4\n\n# Dry run to see what would happen\npython3 scripts\u002Forchestrator.py \\\n  --topic \"Your Research Topic\" \\\n  --output-dir \u002Fpath\u002Fto\u002Foutput \\\n  --dry-run\n```\n\nThe pipeline consists of **9 sessions across 7 logical stages**:\n\n```\nSession 1:  Initial Research → report.md\nSession 2:  Quality Assessment → assessment.md + improvement_plan.md\nSession 3A: Pass 1 Meta-Prompt → pass_1_prompt.md\nSession 3B: Pass 1 Execute → pass1 report\nSession 4A: Pass 2 Meta-Prompt → pass_2_prompt.md\nSession 4B: Pass 2 Execute → pass2 report\nSession 5A: Pass 3 Meta-Prompt → pass_3_prompt.md\nSession 5B: Pass 3 Execute → pass3 report + charts\nSession 6A: Pass 4 Meta-Prompt → pass_4_prompt.md\nSession 6B: Pass 4 Execute → final report\nSession 7:  Cleanup → clean report + exports\n```\n\n### The Key Innovation: Two-Level Automation\n\nFor each improvement pass, there are **two separate Hermes sessions**:\n\n1. **Meta-Prompt Generation** — Reads the reusable template + improvement plan,\n   extracts tasks for the specified pass number, and generates a complete pass prompt.\n   This is the `prompt_to_produce_pass_prompt_from_template.txt` command.\n\n2. **Pass Execution** — Reads the generated prompt + current document, executes\n   the tasks, and produces the revised document.\n\nThis means **no pre-written prompt files are needed**. The improvement plan is the\nsingle source of truth. If you update the plan, all pass prompts regenerate automatically.\n\n## How to Use\n\n### Option A: Python Orchestrator (Recommended)\n\n```bash\npython3 scripts\u002Forchestrator.py \\\n  --topic \"Your Research Topic\" \\\n  --output-dir \u002Fpath\u002Fto\u002Foutput \\\n  --template-path templates\u002Freusable_pass_prompt_template.md \\\n  --meta-prompt-path templates\u002Fprompt_to_produce_pass_prompt_from_template.txt \\\n  --passes 4\n```\n\n### Option B: Cron Job Chaining\n\n1. Import the cron job definitions from `config\u002Fcron_job_config.yaml`\n2. Replace `{TOPIC}`, `{OUTPUT_DIR}`, `{TEMPLATE_PATH}`, and `{PLAN_PATH}` with actual values\n3. Run the jobs in sequence using `context_from` to chain them\n\n### Option C: Manual Execution\n\n1. Run Session 1 with `templates\u002Fprompt_files\u002Finitial.md`\n2. Run Session 2 with `templates\u002Fprompt_files\u002Fassessment.md`\n3. For each pass N (1-4):\n   a. Run the meta-prompt with `templates\u002Fprompt_to_produce_pass_prompt_from_template.txt`\n   b. Run the pass with the generated `pass_{n}_prompt.md`\n4. Run Session 7 with `templates\u002Fprompt_files\u002Fcleanup.md`\n\n## Customization\n\nTo customize for different topics:\n\n1. **Replace the topic** — Change `{TOPIC}` in the prompt files\n2. **Adjust research parameters** — Modify depth, source mix, time period, etc.\n3. **Customize chart generation** — Edit `scripts\u002Fgenerate_charts.py` for topic-specific charts\n4. **Adjust cleanup rules** — Modify `templates\u002Fprompt_files\u002Fcleanup.md` for topic-specific cleanup\n5. **Add\u002Fremove passes** — Change `--passes` in the orchestrator or adjust the cron config\n\n## Files You'll Need to Create for Each New Topic\n\n| File | How to Create |\n|------|---------------|\n| `{TOPIC}.md` | Run Session 1 (initial research) |\n| `assessment.md` | Run Session 2 (quality assessment) |\n| `improvement_plan.md` | Generated by Session 2 |\n| `pass_{n}_prompt.md` | Generated by meta-prompt for each pass N |\n| `pass_{n}_report.md` | Generated by pass execution for each pass N |\n| `report_clean.md` | Generated by Session 7 (cleanup) |\n\n## Key Design Decisions\n\n1. **Fresh sessions per pass** — Each session is completely isolated. No cross-session\n   memory dependency. This respects the context limit (up to 180K).\n\n2. **Two-level automation** — Pass prompts are generated at runtime from the template\n   and improvement plan. No pre-written prompts needed.\n\n3. **Sequential execution** — Passes run in order because each pass builds on the\n   previous one.\n\n4. **Improvement plan is the single source of truth** — If you update the plan, all\n   pass prompts regenerate automatically.\n\n## Lessons Learned\n\n1. The two-level automation is the key insight — separating prompt generation from\n   prompt execution means no pre-written prompts are needed.\n\n2. The meta-prompt is the most reusable artifact — `prompt_to_produce_pass_prompt_from_template.txt`\n   is a generic, parameterized command that works for any pass number.\n\n3. The 4-pass strategy works — Separating concerns (methodology → prose → visualization → QA)\n   produced a significantly better result than trying to fix everything at once.\n\n4. Self-contained prompts are essential — Every pass execution session successfully\n   read all three input files and produced the correct output.\n\n5. Quality assessment is the bottleneck — Stage 2 produced the improvement plan that\n   guided all subsequent work. A poor assessment would have led to poor improvements.\n\n6. Chart integration is mechanical — The `integrate_charts.py` script proved that chart\n   insertion is a deterministic operation that can be automated.\n\n7. Cleanup is topic-specific — The diagnosis of what to remove from the final report\n   depends on the internal artifacts generated, which vary by topic and research depth.\n\n## File Flow Diagram\n\n```\ntopic + parameters\n        │\n        ▼\n┌─────────────────────────────────────────────────────────────┐\n│  STAGE 1: INITIAL RESEARCH                                  │\n│  hermes-cli run --prompt-file templates\u002Fprompt_files\u002Finitial.md       │\n│  Output: report_\u003Ctopic>.md                                  │\n└─────────────────────────────────────────────────────────────┘\n        │\n        ▼\n┌─────────────────────────────────────────────────────────────┐\n│  STAGE 2: QUALITY ASSESSMENT                                │\n│  hermes-cli run --prompt-file templates\u002Fprompt_files\u002Fassessment.md    │\n│  Output: assessment.md + improvement_plan.md                │\n└─────────────────────────────────────────────────────────────┘\n        │\n        ▼\n┌─────────────────────────────────────────────────────────────┐\n│  STAGE 3-6: IMPROVEMENT PASSES (x4)                         │\n│  For each pass N:                                           │\n│    hermes-cli run --prompt-file templates\u002Fprompt_to_produce_pass...   │\n│    hermes-cli run --prompt-file pass_{n}_prompt.md          │\n│  Output: report_\u003Ctopic>_pass{1-4}.md                        │\n│         charts\u002F (if applicable)                             │\n└─────────────────────────────────────────────────────────────┘\n        │\n        ▼\n┌─────────────────────────────────────────────────────────────┐\n│  STAGE 7: CLEANUP                                           │\n│  hermes-cli run --prompt-file templates\u002Fprompt_files\u002Fcleanup.md       │\n│  Output: report_\u003Ctopic>_clean.md                            │\n│         report_\u003Ctopic>.docx                                 │\n│         report_\u003Ctopic>.pdf                                  │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## License\n\nThis automation kit is derived from the actual workflow used to produce the\n*\"State of AI in Europe\"* report. It is provided as-is for reuse and customization.\n","Deep Research Pipeline 是一个用于自动生成深度研究报告的自动化工具包。它基于 Hermes Agent 构建，能够处理从初始研究到最终报告生成的全过程。项目采用 Python 编写，包含一系列可重用的提示模板和多个阶段的脚本，如数据图表生成与插入文档等，确保了报告制作流程的高度自动化。其核心功能包括多阶段质量评估、图表自动生成及整合，并支持通过配置文件定义定时任务以实现链式执行。此项目特别适用于需要定期产出高质量专题研究报告的场景，比如行业分析、市场调研等领域。","2026-06-11 04:01:53","CREATED_QUERY"]