Refine OpenClaw payloads and reorganize docs

This commit is contained in:
zhuyongxin
2026-03-26 10:20:07 +08:00
parent cecf4d3ae7
commit 27fe1e8882
155 changed files with 8999 additions and 87 deletions
+49 -20
View File
@@ -1,4 +1,4 @@
# Content Extract MCP
# Content Extract MCP
Python MCP scaffold for article content extraction, structured summary validation, deterministic filtering, and Markdown sink output.
@@ -18,16 +18,16 @@ The server exposes three tools:
Validate an LLM summary result:
```bash
validate-llm-result outputs/result.json --extracted outputs/read-flow-2026.extracted.json
validate-llm-result outputs/reference/summary/result.json --extracted outputs/reference/extracted/read-flow-2026.extracted.json
```
Run the minimal extraction-to-summary loop:
```bash
python scripts/run_summary_loop.py ^
--extracted outputs/read-flow-2026.extracted.json ^
--prompt outputs/llm-summary-prompt.txt ^
--output outputs/result.json
--extracted outputs/reference/extracted/read-flow-2026.extracted.json ^
--prompt outputs/prompts/llm-summary-prompt.txt ^
--output outputs/reference/summary/result.loop.json
```
Pull FreshRSS entries and map them into normalized `item` objects:
@@ -41,8 +41,8 @@ python scripts/pull_freshrss_items.py --limit 5
The script writes:
- `outputs/freshrss.raw.json`
- `outputs/freshrss.items.json`
- `outputs/freshrss/raw/freshrss.raw.json`
- `outputs/freshrss/items/freshrss.items.json`
Pull FreshRSS entries and run content extraction for each mapped item:
@@ -55,37 +55,66 @@ python scripts/run_freshrss_extract.py --limit 1
The script writes:
- `outputs/freshrss.raw.json`
- `outputs/freshrss.items.json`
- `outputs/freshrss.extracted.json`
- `outputs/freshrss/raw/freshrss.raw.json`
- `outputs/freshrss/items/freshrss.items.json`
- `outputs/freshrss/extracted/freshrss.extracted.json`
Run deterministic filter rules against a structured summary result:
```bash
python scripts/run_filter_rules.py ^
--summary outputs/result.json ^
--extracted outputs/read-flow-2026.extracted.json ^
--output outputs/filter-decision.json
--summary outputs/reference/summary/result.loop.json ^
--extracted outputs/reference/extracted/read-flow-2026.extracted.json ^
--output outputs/reference/filter/filter-decision.json
```
You can optionally pass a context file to inject interest topics or source tags:
```bash
python scripts/run_filter_rules.py ^
--summary outputs/result.json ^
--extracted outputs/read-flow-2026.extracted.json ^
--context outputs/filter-context.json ^
--output outputs/filter-decision.with-context.json
--summary outputs/reference/summary/result.loop.json ^
--extracted outputs/reference/extracted/read-flow-2026.extracted.json ^
--context outputs/reference/filter/filter-context.json ^
--output outputs/reference/filter/filter-decision.with-context.json
```
Write a filtered result into the Markdown sink:
```bash
python scripts/run_markdown_sink.py ^
--summary outputs/result.json ^
--extracted outputs/read-flow-2026.extracted.json ^
--filter outputs/filter-decision.json
--summary outputs/reference/summary/result.loop.json ^
--extracted outputs/reference/extracted/read-flow-2026.extracted.json ^
--filter outputs/reference/filter/filter-decision.json
```
The script writes markdown notes under `knowledge-base/`.
Build an internal `ArticleCandidateRecord` and a slim `OpenClawCandidateInput`:
```bash
python scripts/run_article_candidate.py ^
--summary outputs/reference/summary/result.loop.json ^
--extracted outputs/reference/extracted/read-flow-2026.extracted.json ^
--filter outputs/reference/filter/filter-decision.json ^
--section-hint tools_and_workflows
```
The script writes by default:
- `outputs/reference/candidates/article-candidate-record.json`
- `outputs/reference/candidates/openclaw-candidate-input.json`
Build a batch OpenClaw delivery payload:
```bash
python scripts/build_openclaw_delivery.py ^
--input-dir outputs/freshrss/candidates/batch ^
--sort-by-rank ^
--date 2026-03-25
```
The script writes by default:
- `outputs/reference/candidates/openclaw-delivery-payload.json`
Output layout details live in `outputs/README.md`.