@chrono-meta/fh-gate 1.4.16 → 1.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: field-harvest-detail
3
+ description: Detail reference for field-harvest — Mode A detection/PR bash and candidate list format, Mode B hub-locate/skip-ledger/session-template blocks. Load when executing a specific step.
4
+ load: on-demand
5
+ ---
6
+
7
+ # field-harvest — Detail Reference
8
+
9
+ > Load when executing a specific step. SKILL.md contains mode selection, the session-end auto-trigger conditions, classification criteria, trigger tables, guards, the UAP pass, and Done When.
10
+
11
+ ---
12
+
13
+ ## §ModeA-Blocks
14
+
15
+ ### Step 0 — Field project path detection (3-level priority)
16
+
17
+ ```bash
18
+ # Priority 1: Read FH auto_project_mapping.md
19
+ cat .claude/rules/auto_project_mapping.md 2>/dev/null | grep -E "path:|project:" | head -10
20
+
21
+ # Priority 2: Auto-discover git repos in common development directories
22
+ find "$HOME/projects" "$HOME/dev" "$HOME/workspace" "$HOME/PycharmProjects" \
23
+ -maxdepth 2 -name ".git" -type d 2>/dev/null \
24
+ | sed 's|/.git||' \
25
+ | grep -v "forge-harness\|harness_framework" \
26
+ | head -10
27
+
28
+ # Priority 3: Scan parent directory of current cwd
29
+ find "$(dirname "$(pwd)")" -maxdepth 1 -name ".git" -type d 2>/dev/null \
30
+ | sed 's|/.git||'
31
+ ```
32
+
33
+ List discovered repos to user and ask to select target. If 0 repos found, prompt for direct path input.
34
+
35
+ ### Step 1 — Recent commit scan
36
+
37
+ ```bash
38
+ cd "$FIELD_PATH"
39
+ git log --oneline --since="<N> days ago" --no-merges
40
+ ```
41
+
42
+ ### Step 2 — Classification commands
43
+
44
+ ```bash
45
+ # Commit detail check
46
+ git show <hash> --stat
47
+ git show <hash> -- "*.md" "*.py" "*.sh" | head -100
48
+ ```
49
+
50
+ First classify by commit message + changed file patterns → read diff for detail when needed.
51
+
52
+ ### Step 3 — Candidate list presentation format
53
+
54
+ ```
55
+ field-harvest results — <project name> (within <N> days)
56
+
57
+ Scanned: <total commits>
58
+ FH absorption candidates: <N>
59
+
60
+ Candidate list:
61
+ ┌─────────────────────────────────────────────────────┐
62
+ │ [1] <commit hash> "<commit message>" │
63
+ │ Type: <workflow pattern / feedback rule / ...> │
64
+ │ Absorption location: plugins/fh-meta/skills/<X>/ │
65
+ │ Impact: ★★★ (applicable across projects) │
66
+ ├─────────────────────────────────────────────────────┤
67
+ │ [2] ... │
68
+ └─────────────────────────────────────────────────────┘
69
+
70
+ Field-only (skipped): <M>
71
+
72
+ → Absorb to FH via PR? [all / select number / skip]
73
+ ```
74
+
75
+ ### Step 4 — PR creation bash
76
+
77
+ ```bash
78
+ cd "$FH_ROOT"
79
+ git checkout -b harvest/"$FIELD_PROJECT"-"$YYYYMMDD"
80
+
81
+ # Apply approved patterns
82
+ # - Update skill SKILL.md
83
+ # - Update .claude/rules/
84
+ # - Update templates/
85
+
86
+ git add -A
87
+ git commit -m "harvest($FIELD_PROJECT): $PATTERN_SUMMARY — $FIELD_COMMIT_HASH absorbed"
88
+ git push origin harvest/"$FIELD_PROJECT"-"$YYYYMMDD"
89
+
90
+ gh pr create \
91
+ --title "harvest: $FIELD_PROJECT pattern absorption ($DATE)" \
92
+ --body "..."
93
+ ```
94
+
95
+ PR body includes: original field commit hash + link, absorbed pattern summary, application location (which skill/rule), expected cross-project impact.
96
+
97
+ ---
98
+
99
+ ## §ModeB-Blocks
100
+
101
+ ### Step 0-B — Locate hub path (3-level priority)
102
+
103
+ ```bash
104
+ # Priority 1: FH environment variables (set in ~/.zshrc)
105
+ echo "${FH_DIR:-${CC_HUB_DIR:-}}"
106
+
107
+ # Priority 2: Auto-discover hub candidates near home
108
+ find ~ -maxdepth 3 -name "tracks" -type d 2>/dev/null \
109
+ | grep -E "(forge-harness|knowledge-hub)" | head -3
110
+
111
+ # Priority 3: Ask user
112
+ ```
113
+
114
+ Track subdirectory: field projects → `tracks/{project-name}/` · external collaborations → `tracks/external/{name}/`
115
+
116
+ ### Step 0-B.1 — Detection-skip inline-grep
117
+
118
+ Bind the three paths from earlier Mode B steps: `HUB_PATH` = the hub root from Step 0-B, `TRACK` = the track subdirectory chosen above, `FIELD_PATH` = the field project cwd from Step 0.
119
+
120
+ ```bash
121
+ # Stateless inline-grep: collect hashes already present in hub session files,
122
+ # then filter today's field commits against them.
123
+ LOGGED=$(grep -rhoE '\b[0-9a-f]{7,40}\b' "$HUB_PATH/tracks/$TRACK/" 2>/dev/null | sort -u)
124
+
125
+ git -C "$FIELD_PATH" log --oneline --since="today" --no-merges \
126
+ --author="$(git -C "$FIELD_PATH" config user.name)" \
127
+ | while read -r hash rest; do
128
+ # skip if this hash is already logged in any hub session file
129
+ echo "$LOGGED" | grep -q "^${hash}" && continue
130
+ echo "$hash $rest"
131
+ done
132
+ ```
133
+
134
+ ### Step 1-B — Session work scan
135
+
136
+ ```bash
137
+ cd <field-project-path>
138
+ # raw scan — then pass through the Step 0-B.1 skip ledger before use
139
+ git log --oneline --since="today" --no-merges --author="$(git config user.name)"
140
+ git status --short # uncommitted changes
141
+ ```
142
+
143
+ ### Step 3-B — Session markdown template
144
+
145
+ ```markdown
146
+ # Session YYYY-MM-DD — <Slug>
147
+
148
+ ## Context
149
+ <Initial problem inferred from first commit>
150
+
151
+ ## Solution
152
+ <What was implemented — aggregated from commits>
153
+
154
+ ## Commits
155
+ 1. `<hash>` — <message>
156
+
157
+ ## Next Session
158
+ <Parsed from TODO/FIXME, or user-supplied>
159
+
160
+ ## Key Learnings
161
+ <Patterns discovered — user-supplied or inferred>
162
+
163
+ ## FH Backport Points (Optional)
164
+ <If patterns worth meta-skill/rule promotion>
165
+
166
+ ---
167
+ **Tags**: #<project> #<topic>
168
+ ```
169
+
170
+ Filename: `session_YYYY_MM_DD_<slug>.md`
171
+
172
+ ### Step 4-B — Hub commit bash
173
+
174
+ ```bash
175
+ cd <hub-path>
176
+ # Write session file
177
+ git add tracks/<track>/session_$(date +%Y_%m_%d)_<slug>.md
178
+ git commit -m "session: <title> (<project> <date>)
179
+
180
+ Co-Authored-By: Claude <noreply@anthropic.com>"
181
+ ```
182
+
183
+ ### Step 5-B — Confirmation format
184
+
185
+ ```
186
+ ✅ Session logged to knowledge hub
187
+ 📝 tracks/<track>/session_YYYY_MM_DD_<slug>.md
188
+ 🔀 Commit: <hash> — push? (y/n)
189
+ ```
@@ -38,6 +38,8 @@ Priority:
38
38
 
39
39
  Report detection result in one line. Example: `🔑 Using Claude Sonnet` / `🔑 Engine: /deep-research (built-in)`
40
40
 
41
+ On first run without an API key, output the environment setup guide (format in §Output-Formats).
42
+
41
43
  ---
42
44
 
43
45
  ## Step 0.5. Operator Intake (speculative-interview arm — walled channels)
@@ -47,157 +49,47 @@ On **cadence-triggered** runs (7d), ask the operator one line before collecting:
47
49
  > *"이번 주에 본 벽 뒤 소스(YouTube·LinkedIn·X 등 기계가 못 닿는 링크/요약)가 있으면 던져 주세요 — triage해서 기록합니다. 없으면 그냥 진행할게요."*
48
50
 
49
51
  - Operator may skip — zero pressure; the autonomous arms (Step 1) run regardless.
50
- - Why: walled channels return 403 to machine fetch — **the operator is the only wide-net sensor
51
- for them**. This arm turns ad-hoc link-throwing into a scheduled intake (manual-validated n=2).
52
- - Received sources route to the sister-asset/triage flow with its **lightweight path**: C-tier
53
- (territory already covered) = one-paragraph entry only; full cross-audit reserved for A/B-tier.
54
- Partial wall-bypass is allowed first: try WebSearch + secondary sources before declaring unfetchable.
55
- - **Video sources (local/laptop only — cloud VMs typically 403 on video hosts)**: resolve a
56
- *video-harvest* capability via the Sidecar Engine Resolution Protocol
57
- (`multi_model_sidecar_strategy.md`) — probe by **capability, not engine name**. A CLI that is a
58
- valid sidecar for other tasks is not automatically a video-harvest engine.
59
- **Tier 1 — a natively multimodal CLI that ingests the URL directly**: probe for one, then route
60
- to it (pre-EOL example invocation: `gemini --skip-trust -p "{URL}"` → timestamped summary). ⚠️
61
- **the direct `gemini` CLI is being sunset (vendor EOL 2026-06-18)** — after that probe `agy` (the
62
- Antigravity router-shell successor, same class) or the Gemini API; see
63
- `multi_model_sidecar_strategy.md §Binary names churn`. A coding-agent CLI with **no native
64
- video/transcript access** (e.g. `codex`) cannot do this — it burns tokens, recovers only
65
- metadata (title), then asks for a pasted transcript; do not route video to it. Agentic
66
- router-shells (`agy`) get approval-mode first.
67
- **Tier 3** (Tier 2 = router-shell / Gemini API, see the protocol) **— conditional fallback (not
68
- guaranteed)**: `yt-dlp --write-auto-subs --skip-download` then summarize the transcript — fine
69
- for talk-style content. **Probe the environment first**:
70
- `yt-dlp --version && python3 -c "import curl_cffi" && command -v ffmpeg` — Tier 3 needs all three
71
- (`yt-dlp`, `curl_cffi` impersonation target, `ffmpeg`), and the timedtext endpoint may return
72
- HTTP 429; if the probe fails, fall through rather than assuming it works. Unresolvable (cloud, no sidecar; or all tiers blocked) →
73
- operator summary remains the path, as today.
52
+ - Why: walled channels return 403 to machine fetch — **the operator is the only wide-net sensor for them**. This arm turns ad-hoc link-throwing into a scheduled intake (manual-validated n=2).
53
+ - Received sources route to the sister-asset/triage flow with its **lightweight path**: C-tier (territory already covered) = one-paragraph entry only; full cross-audit reserved for A/B-tier. Partial wall-bypass is allowed first: try WebSearch + secondary sources before declaring unfetchable.
54
+ - **Video sources (local/laptop only — cloud VMs typically 403 on video hosts)**: probe by **capability, not engine name** via the Sidecar Engine Resolution Protocol. Tier 1 = natively multimodal CLI ingesting the URL directly (⚠️ direct `gemini` CLI EOL 2026-06-18 — probe `agy` or the Gemini API after); never route video to a coding-agent CLI without native video access (it burns tokens and recovers only metadata). Tier 3 = `yt-dlp` transcript fallback, **conditional** — probe the environment first, never assume it works. Unresolvable → operator summary remains the path.
55
+
56
+ > **Detail**: See `SKILL_detail.md §Video-Harvest` full tier ladder, probe commands, EOL/router-shell notes read when a video source needs harvesting.
74
57
 
75
58
  ---
76
59
 
77
60
  ## Step 1. Data Collection
78
61
 
79
- ### HackerNews (Algolia API)
80
-
81
- Collect latest stories by keyword. Via `curl`:
82
-
83
- ```bash
84
- for KW in "AI agent" "LLM harness" "Claude" "multi-agent" "context engineering"; do
85
- curl -s --max-time 8 \
86
- "https://hn.algolia.com/api/v1/search?query=$(echo $KW | tr ' ' '+')&tags=story&hitsPerPage=5&numericFilters=points>10"
87
- done
88
- ```
89
-
90
- Collection criteria: score > 10, keyword-relevant items only. Max 15 items.
91
-
92
- ### arxiv
93
-
94
- ```bash
95
- for Q in "multi-agent LLM" "AI software testing" "context engineering agents"; do
96
- curl -s --max-time 8 \
97
- "https://export.arxiv.org/api/query?search_query=all:${Q// /+}&max_results=2&sortBy=submittedDate&sortOrder=descending"
98
- done
99
- ```
100
-
101
- Max 6 items.
102
-
103
- ### TLDR AI (RSS)
104
-
105
- ```bash
106
- curl -s --max-time 8 "https://tldr.tech/api/rss/ai"
107
- ```
108
-
109
- Parse `<item>` → title + link. Max 5 items.
110
-
111
- ### The Batch — deeplearning.ai (HTML scraping)
62
+ Collect from four sources (bash per source in §Collection-Bash):
112
63
 
113
- ```bash
114
- curl -s --max-time 10 -L "https://www.deeplearning.ai/the-batch/"
115
- ```
116
-
117
- Extract `"title":"..."` + `"slug":"issue-\d+"` pattern URL: `https://www.deeplearning.ai/the-batch/{slug}/`. Max 5 items.
64
+ | Source | Method | Cap |
65
+ |---|---|---|
66
+ | HackerNews | Algolia API, score > 10, keyword-relevant | 15 items |
67
+ | arxiv | export API, latest by submittedDate | 6 items |
68
+ | TLDR AI | RSS, title + link | 5 items |
69
+ | The Batch (deeplearning.ai) | HTML scraping, title + issue slug | 5 items |
118
70
 
119
71
  Report progress: `📡 HN 15 items · arxiv 5 items · TLDR 5 items · Batch 5 items collected`
120
72
 
73
+ > **Detail**: See `SKILL_detail.md §Collection-Bash` — curl commands per source with parsing notes — read when executing Step 1.
74
+
121
75
  ---
122
76
 
123
77
  ## Step 2. Synthesis
124
78
 
125
- ### With Anthropic API
126
-
127
- Prompt:
128
-
129
- ```
130
- You are an AI harness engineering expert.
131
- Analyze the collected external data below and extract insights
132
- directly relevant to forge-harness (FH) operations and improvement.
133
-
134
- FH Context:
135
- - FH = AI collaboration meta-harness (skill · plugin · agent system)
136
- - Core skills: steel-quench, harness-doctor, sim-conductor,
137
- agent-composer, apex-review
138
- - Areas of interest: multi-agent orchestration, context engineering,
139
- self-check gate, frontier cross-diagnosis
140
-
141
- [Insert collected data]
142
-
143
- Output format:
144
- ## This Week's Frontier Highlights (max 3)
145
- **[Title]** — FH connection point in one sentence
146
-
147
- ## FH Immediate Application Candidates
148
- 2-3 specific ideas
149
-
150
- ## Warning Signals
151
- Noise or excessive complexity alerts (if any)
152
-
153
- Length: within 400 characters. Start directly with content, no preamble.
154
- ```
155
-
156
- ### WebSearch Mode (no API key)
157
-
158
- Search directly with WebSearch tool, then synthesize in context:
79
+ - **With Anthropic API**: run the synthesis prompt (full prompt in §Synthesis-Prompt) — outputs This Week's Frontier Highlights (max 3) / FH Immediate Application Candidates (2-3) / Warning Signals, within 400 characters, no preamble.
80
+ - **WebSearch mode (no API key)**: search directly with the WebSearch tool, then synthesize in context (queries in §Synthesis-Prompt).
159
81
 
160
- ```
161
- Search: "AI agent harness 2025 site:news.ycombinator.com"
162
- Search: "multi-agent LLM orchestration latest"
163
- ```
82
+ > **Detail**: See `SKILL_detail.md §Synthesis-Prompt` — full API prompt with FH context block, WebSearch queries — read when executing Step 2.
164
83
 
165
84
  ---
166
85
 
167
86
  ## Step 3. Output
168
87
 
169
- Print synthesis result in the conversation:
170
-
171
- ```markdown
172
- ## 🔭 FH Frontier Digest — YYYY-MM-DD
173
-
174
- 🔑 [Engine used: Claude Sonnet / WebSearch]
88
+ Print the synthesis result in the conversation (format in §Output-Formats): engine line + Highlights + Immediate Application Candidates + Warning Signals + collection stats.
175
89
 
176
- ## This Week's Frontier Highlights
177
- ...
90
+ **With `--save` flag**: save to `digests/frontier_{today}.md` (path priority: FH install path → `~/.claude/frontier-digest/digests/` → cwd; details in §Output-Formats). After saving: `✅ Saved: {path}`
178
91
 
179
- ## FH Immediate Application Candidates
180
- ...
181
-
182
- ## Warning Signals
183
- ...
184
-
185
- ---
186
- 📊 Collected: HN N items · arxiv N items · TLDR N items · Batch N items | [View sources →]
187
- ```
188
-
189
- ### With --save flag
190
-
191
- ```python
192
- # Save path priority
193
- # 1. FH install path digests/
194
- # 2. ~/.claude/frontier-digest/digests/
195
- # 3. current cwd/digests/
196
-
197
- path = f"digests/frontier_{today}.md"
198
- ```
199
-
200
- After saving: `✅ Saved: {path}`
92
+ > **Detail**: See `SKILL_detail.md §Output-Formats` — conversation output template, save path priority, fh_signal file format, env setup guide — read when executing Steps 3–4.
201
93
 
202
94
  ---
203
95
 
@@ -219,26 +111,7 @@ Immediately after Step 3 output, if **"FH Immediate Application Candidates"** ha
219
111
 
220
112
  **→ When to use [4] persona-innovator**: Frontier candidates contain new architectural patterns, naming opportunities, or design frames not yet in FH vocabulary. persona-innovator compares the external signal against existing FH assets and proposes concrete naming/framing actions. Runs as Mode E (external scan) with the frontier candidates as input context.
221
113
 
222
- If user selects [3], create signal file in this format:
223
-
224
- ```markdown
225
- ---
226
- date: YYYY-MM-DD
227
- source: frontier-digest
228
- engine: [Claude Sonnet / WebSearch]
229
- ---
230
-
231
- # FH Improvement Signal — YYYY-MM-DD
232
-
233
- ## Sources
234
- HN N items + arxiv N items collected
235
-
236
- ## Immediate Application Candidates
237
- [Copy Step 2 "FH Immediate Application Candidates" items here]
238
-
239
- ## Processing Status
240
- - [ ] Pending review
241
- ```
114
+ If user selects [3], create the signal file (format in §Output-Formats).
242
115
 
243
116
  ### 4-b. Connected Project Improvement Suggestion (when context detected)
244
117
 
@@ -258,23 +131,6 @@ When running `/frontier-digest --chain`:
258
131
 
259
132
  ---
260
133
 
261
- ## Environment Setup Guide (initial notice)
262
-
263
- When running `/frontier-digest` for the first time without API key set:
264
-
265
- ```
266
- 🔑 No API key detected — running in WebSearch mode.
267
-
268
- For more precise synthesis:
269
- Anthropic: export ANTHROPIC_API_KEY=sk-ant-xxx
270
-
271
- To save key permanently (~/.cc_secrets pattern):
272
- echo 'export ANTHROPIC_API_KEY=sk-ant-xxx' > ~/.cc_secrets
273
- chmod 600 ~/.cc_secrets
274
- ```
275
-
276
- ---
277
-
278
134
  ## Done When
279
135
 
280
136
  | Condition | Completion |
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: frontier-digest-detail
3
+ description: Detail reference for frontier-digest — collection bash per source, synthesis prompt, video-harvest tier detail, output/save/signal formats. Load when executing a specific step.
4
+ load: on-demand
5
+ ---
6
+
7
+ # frontier-digest — Detail Reference
8
+
9
+ > Load when executing a specific step. SKILL.md contains triggers, engine priority, operator intake rules, mode selection, chaining logic, guards, and Done When.
10
+
11
+ ---
12
+
13
+ ## §Collection-Bash
14
+
15
+ ### HackerNews (Algolia API)
16
+
17
+ ```bash
18
+ for KW in "AI agent" "LLM harness" "Claude" "multi-agent" "context engineering"; do
19
+ curl -s --max-time 8 \
20
+ "https://hn.algolia.com/api/v1/search?query=$(echo $KW | tr ' ' '+')&tags=story&hitsPerPage=5&numericFilters=points>10"
21
+ done
22
+ ```
23
+
24
+ Collection criteria: score > 10, keyword-relevant items only. Max 15 items.
25
+
26
+ ### arxiv
27
+
28
+ ```bash
29
+ for Q in "multi-agent LLM" "AI software testing" "context engineering agents"; do
30
+ curl -s --max-time 8 \
31
+ "https://export.arxiv.org/api/query?search_query=all:${Q// /+}&max_results=2&sortBy=submittedDate&sortOrder=descending"
32
+ done
33
+ ```
34
+
35
+ Max 6 items.
36
+
37
+ ### TLDR AI (RSS)
38
+
39
+ ```bash
40
+ curl -s --max-time 8 "https://tldr.tech/api/rss/ai"
41
+ ```
42
+
43
+ Parse `<item>` → title + link. Max 5 items.
44
+
45
+ ### The Batch — deeplearning.ai (HTML scraping)
46
+
47
+ ```bash
48
+ curl -s --max-time 10 -L "https://www.deeplearning.ai/the-batch/"
49
+ ```
50
+
51
+ Extract `"title":"..."` + `"slug":"issue-\d+"` pattern → URL: `https://www.deeplearning.ai/the-batch/{slug}/`. Max 5 items.
52
+
53
+ Report progress: `📡 HN 15 items · arxiv 5 items · TLDR 5 items · Batch 5 items collected`
54
+
55
+ ---
56
+
57
+ ## §Video-Harvest — Tier Detail (Step 0.5)
58
+
59
+ Resolve a *video-harvest* capability via the Sidecar Engine Resolution Protocol (`multi_model_sidecar_strategy.md`) — probe by **capability, not engine name**. A CLI that is a valid sidecar for other tasks is not automatically a video-harvest engine.
60
+
61
+ - **Tier 1 — a natively multimodal CLI that ingests the URL directly**: probe for one, then route to it (pre-EOL example invocation: `gemini --skip-trust -p "{URL}"` → timestamped summary). ⚠️ **the direct `gemini` CLI is being sunset (vendor EOL 2026-06-18)** — after that probe `agy` (the Antigravity router-shell successor, same class) or the Gemini API; see `multi_model_sidecar_strategy.md §Binary names churn`. A coding-agent CLI with **no native video/transcript access** (e.g. `codex`) cannot do this — it burns tokens, recovers only metadata (title), then asks for a pasted transcript; do not route video to it. Agentic router-shells (`agy`) get approval-mode first.
62
+ - **Tier 2** = router-shell / Gemini API (see the protocol).
63
+ - **Tier 3 — conditional fallback (not guaranteed)**: `yt-dlp --write-auto-subs --skip-download` then summarize the transcript — fine for talk-style content. **Probe the environment first**: `yt-dlp --version && python3 -c "import curl_cffi" && command -v ffmpeg` — Tier 3 needs all three (`yt-dlp`, `curl_cffi` impersonation target, `ffmpeg`), and the timedtext endpoint may return HTTP 429; if the probe fails, fall through rather than assuming it works.
64
+ - Unresolvable (cloud, no sidecar; or all tiers blocked) → operator summary remains the path, as today.
65
+
66
+ ---
67
+
68
+ ## §Synthesis-Prompt
69
+
70
+ ### With Anthropic API
71
+
72
+ ```
73
+ You are an AI harness engineering expert.
74
+ Analyze the collected external data below and extract insights
75
+ directly relevant to forge-harness (FH) operations and improvement.
76
+
77
+ FH Context:
78
+ - FH = AI collaboration meta-harness (skill · plugin · agent system)
79
+ - Core skills: steel-quench, harness-doctor, sim-conductor,
80
+ agent-composer, apex-review
81
+ - Areas of interest: multi-agent orchestration, context engineering,
82
+ self-check gate, frontier cross-diagnosis
83
+
84
+ [Insert collected data]
85
+
86
+ Output format:
87
+ ## This Week's Frontier Highlights (max 3)
88
+ **[Title]** — FH connection point in one sentence
89
+
90
+ ## FH Immediate Application Candidates
91
+ 2-3 specific ideas
92
+
93
+ ## Warning Signals
94
+ Noise or excessive complexity alerts (if any)
95
+
96
+ Length: within 400 characters. Start directly with content, no preamble.
97
+ ```
98
+
99
+ ### WebSearch Mode (no API key)
100
+
101
+ Search directly with WebSearch tool, then synthesize in context:
102
+
103
+ ```
104
+ Search: "AI agent harness 2025 site:news.ycombinator.com"
105
+ Search: "multi-agent LLM orchestration latest"
106
+ ```
107
+
108
+ ---
109
+
110
+ ## §Output-Formats
111
+
112
+ ### Step 3 — Conversation output
113
+
114
+ ```markdown
115
+ ## 🔭 FH Frontier Digest — YYYY-MM-DD
116
+
117
+ 🔑 [Engine used: Claude Sonnet / WebSearch]
118
+
119
+ ## This Week's Frontier Highlights
120
+ ...
121
+
122
+ ## FH Immediate Application Candidates
123
+ ...
124
+
125
+ ## Warning Signals
126
+ ...
127
+
128
+ ---
129
+ 📊 Collected: HN N items · arxiv N items · TLDR N items · Batch N items | [View sources →]
130
+ ```
131
+
132
+ ### --save path priority
133
+
134
+ ```python
135
+ # Save path priority
136
+ # 1. FH install path digests/
137
+ # 2. ~/.claude/frontier-digest/digests/
138
+ # 3. current cwd/digests/
139
+
140
+ path = f"digests/frontier_{today}.md"
141
+ ```
142
+
143
+ After saving: `✅ Saved: {path}`
144
+
145
+ ### Step 4 [3] — fh_signal file format
146
+
147
+ ```markdown
148
+ ---
149
+ date: YYYY-MM-DD
150
+ source: frontier-digest
151
+ engine: [Claude Sonnet / WebSearch]
152
+ ---
153
+
154
+ # FH Improvement Signal — YYYY-MM-DD
155
+
156
+ ## Sources
157
+ HN N items + arxiv N items collected
158
+
159
+ ## Immediate Application Candidates
160
+ [Copy Step 2 "FH Immediate Application Candidates" items here]
161
+
162
+ ## Processing Status
163
+ - [ ] Pending review
164
+ ```
165
+
166
+ ### Environment setup guide (first run, no API key)
167
+
168
+ ```
169
+ 🔑 No API key detected — running in WebSearch mode.
170
+
171
+ For more precise synthesis:
172
+ Anthropic: export ANTHROPIC_API_KEY=sk-ant-xxx
173
+
174
+ To save key permanently (~/.cc_secrets pattern):
175
+ echo 'export ANTHROPIC_API_KEY=sk-ant-xxx' > ~/.cc_secrets
176
+ chmod 600 ~/.cc_secrets
177
+ ```