Skip to content

Commit 2b65447

Browse files
committed
feat: add brief output mode for user-ready summaries
1 parent a05545d commit 2b65447

6 files changed

Lines changed: 327 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,45 @@ jobs:
4444
'warnings': ['w'], 'errors': []
4545
})
4646
assert compact['summary_source'] == 'arxiv_abstract'
47+
brief = mod.as_brief({
48+
'paper_id': 'x',
49+
'title': 'Test Paper',
50+
'status': 'ok',
51+
'source_used': 'alphaxiv+arxiv',
52+
'summary_source': 'alphaxiv_report',
53+
'best_summary': 'This paper introduces a retrieval-augmented planner for long-horizon tasks. It addresses brittle multi-step planning in dynamic environments. The method combines a planner, a verifier, and a memory cache. It uses iterative self-correction with retrieved demonstrations.',
54+
'alphaxiv_status': 'available',
55+
'arxiv_status': 'available',
56+
'resolved_alphaxiv_url': 'u1',
57+
'resolved_arxiv_url': 'u2',
58+
'alphaxiv_report': 'This paper introduces a retrieval-augmented planner for long-horizon tasks. It addresses brittle multi-step planning in dynamic environments. The method combines a planner, a verifier, and a memory cache. It uses iterative self-correction with retrieved demonstrations.',
59+
'alphaxiv_description': '',
60+
'arxiv_abstract': 'This paper introduces a retrieval-augmented planner for long-horizon tasks.',
61+
'warnings': [],
62+
'errors': [],
63+
})
64+
assert 'Paper: Test Paper (x)' in brief
65+
assert 'Problem solved:' in brief
66+
assert 'Core method:' in brief
67+
assert 'Source: alphaXiv report. Confidence: higher.' in brief
68+
brief_fallback = mod.as_brief({
69+
'paper_id': 'y',
70+
'title': 'Fallback Paper',
71+
'status': 'ok',
72+
'source_used': 'arxiv',
73+
'summary_source': 'arxiv_abstract',
74+
'best_summary': 'We study efficient adaptation for vision models. The problem is updating large models under tight compute budgets. Our method trains a low-rank adapter and freezes the backbone.',
75+
'alphaxiv_status': 'thin',
76+
'arxiv_status': 'available',
77+
'resolved_alphaxiv_url': 'u1',
78+
'resolved_arxiv_url': 'u2',
79+
'alphaxiv_report': '',
80+
'alphaxiv_description': 'Short overview only.',
81+
'arxiv_abstract': 'We study efficient adaptation for vision models. The problem is updating large models under tight compute budgets. Our method trains a low-rank adapter and freezes the backbone.',
82+
'warnings': ['AlphaXiv page fetched, but only a short overview was available.'],
83+
'errors': [],
84+
})
85+
assert 'Source: arXiv abstract fallback. Confidence: basic (alphaXiv: thin).' in brief_fallback
86+
assert 'Worth reading? Abstract-first; alphaXiv was thin, so this brief relies on arXiv.' in brief_fallback
4787
print('offline normalization smoke test ok')
4888
PY

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ All notable changes to this repository will be documented in this file.
66

77
- Ongoing documentation and release polish.
88

9+
## [v0.3.1] - 2026-03-13
10+
11+
### Added
12+
13+
- `--format brief` for a deterministic, compact, user-facing paper brief
14+
15+
### Changed
16+
17+
- documented the new brief mode and its arXiv-first fallback behavior when alphaXiv is thin or unavailable
18+
919
## [v0.3.0] - 2026-03-13
1020

1121
### Added

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ In those cases, use this skill as a fast first-pass filter, then inspect the ori
4545
- fetch alphaXiv overview pages when available
4646
- extract embedded overview / report fields
4747
- fall back to the arXiv abstract when alphaXiv is thin or unavailable
48-
- return structured output in JSON or Markdown
48+
- return structured output in JSON, Markdown, verbose text, or a compact user-facing brief
4949

5050
## Quick examples
5151

@@ -73,19 +73,19 @@ python3 scripts/alphaxiv_lookup.py 'https://www.alphaxiv.org/overview/2603.07612
7373
python3 scripts/alphaxiv_lookup.py '2603.07612' --format json-compact
7474
```
7575

76-
### Plain-text brief
76+
### Plain-text detail view
7777

7878
```bash
7979
python3 scripts/alphaxiv_lookup.py '2603.07612' --format text
8080
```
8181

82-
### Increase timeout for slow upstreams
82+
### Compact user-facing brief
8383

8484
```bash
85-
python3 scripts/alphaxiv_lookup.py '2603.07612' --format json --timeout 40
85+
python3 scripts/alphaxiv_lookup.py '2603.07612' --format brief
8686
```
8787

88-
### Adjust timeout for flaky upstreams
88+
### Increase timeout for slow upstreams
8989

9090
```bash
9191
python3 scripts/alphaxiv_lookup.py '2603.07612' --format json --timeout 40
@@ -109,6 +109,19 @@ The JSON output may include:
109109
- `arxiv_abstract`
110110
- `notes`
111111

112+
## `--format brief`
113+
114+
`--format brief` emits a deterministic, compact paper brief meant to be pasted directly to a user. It uses only retrieved fields and keeps working when alphaXiv is thin or unavailable by leaning on the arXiv fallback.
115+
116+
Structure:
117+
118+
- paper title + id
119+
- one-line takeaway
120+
- problem solved
121+
- core method
122+
- worth reading verdict
123+
- source / confidence hint
124+
112125
## Repository layout
113126

114127
- `SKILL.md` — skill instructions and trigger guidance
@@ -125,6 +138,7 @@ The JSON output may include:
125138
- Technical skill slug remains `alphaxiv-paper-lookup`
126139
- If alphaXiv fetch fails, is rate-limited, or has only a thin overview, the workflow falls back to arXiv as needed
127140
- The JSON output now exposes `status`, `source_used`, `summary_source`, `best_summary`, `alphaxiv_status`, `arxiv_status`, `warnings`, and `errors` for easier downstream handling
141+
- `--format brief` prefers the best retrieved summary, but can still produce a useful user-facing brief from the arXiv abstract alone
128142
- AlphaXiv is treated as a shortcut, not a replacement for reading the full paper when exact details matter
129143

130144
## License

SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Prefer alphaXiv first because it often exposes an AI-generated overview that is
1919
- Use `--format json` for full structured output.
2020
- Use `--format json-compact` when you want a smaller machine-friendly payload.
2121
- Use `--format text` for a clean plain-text brief.
22+
- Use `--format brief` for a concise user-ready brief.
2223
3. Read the returned fields in this priority order:
2324
- `best_summary`
2425
- `alphaxiv_report`

dist/alphaxiv-paper-lookup.skill

1.76 KB
Binary file not shown.

0 commit comments

Comments
 (0)