@companion-ai/feynman 0.5.2 → 0.5.4
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.
- package/.feynman/SYSTEM.md +33 -67
- package/.feynman/agents/writer.md +1 -2
- package/.feynman/themes/feynman.json +1 -1
- package/README.md +19 -71
- package/RELEASES.md +34 -0
- package/dist/cli.js +6 -16
- package/dist/pi/packages.js +1 -18
- package/dist/telemetry/posthog.js +29 -261
- package/metadata/commands.mjs +3 -2
- package/package.json +4 -13
- package/prompts/audit.md +0 -11
- package/prompts/autoresearch.md +0 -19
- package/prompts/compare.md +1 -12
- package/prompts/deepresearch.md +1 -24
- package/prompts/draft.md +1 -12
- package/prompts/lit.md +1 -12
- package/prompts/log.md +0 -11
- package/prompts/recipe.md +0 -13
- package/prompts/replicate.md +0 -11
- package/prompts/review.md +0 -13
- package/prompts/summarize.md +4 -18
- package/scripts/check-pi-rpc.mjs +2 -1
- package/skills/alpha-research/SKILL.md +1 -1
- package/skills/autoresearch/SKILL.md +1 -1
- package/skills/preview/SKILL.md +7 -20
- package/skills/session-search/SKILL.md +5 -16
package/prompts/recipe.md
CHANGED
|
@@ -4,23 +4,10 @@ args: <task-or-paper>
|
|
|
4
4
|
section: Research Workflows
|
|
5
5
|
topLevelCli: true
|
|
6
6
|
---
|
|
7
|
-
## Tool Discipline (Read First)
|
|
8
|
-
|
|
9
|
-
Tool names are literal. Use only tools visible in the current tool set.
|
|
10
|
-
|
|
11
|
-
- Search with `web_search`; do not call `search_web`, `google_search`, `google:search`, `search_google`, or `WebSearch`.
|
|
12
|
-
- Fetch URLs with `fetch_content`; do not call bare `fetch`, `WebFetch`, `read_url_content`, or pass an array as `url`. Use `urls` for multiple URLs when the tool supports it.
|
|
13
|
-
- Use visible Feynman alpha tools such as `alpha_search` when present. For shell access, call `feynman alpha ...`; do not call the user's bare global `alpha` binary.
|
|
14
|
-
- To ask the user a question, write plain chat text and wait for the next user message. Do not call `ask_user_question`, `ask_user`, `ask_followup_question`, or `user_choice`.
|
|
15
|
-
- Do not use `Task` as an agent dispatcher. Use only the visible `subagent` tool when it exists.
|
|
16
|
-
- If a tool returns `Tool not found` or `Invalid URL`, do not retry the same invalid call. Map to a canonical visible tool and valid arguments, or record the capability as blocked.
|
|
17
|
-
|
|
18
7
|
Find implementable ML training recipes for: $@
|
|
19
8
|
|
|
20
9
|
Derive a short slug from the task (lowercase, hyphens, no filler words, ≤5 words). Use this slug for all files in this run.
|
|
21
10
|
|
|
22
|
-
This is an execution request, not a request to explain the workflow. Continue immediately.
|
|
23
|
-
|
|
24
11
|
## Required artifacts
|
|
25
12
|
|
|
26
13
|
- `outputs/.plans/<slug>-recipe.md`
|
package/prompts/replicate.md
CHANGED
|
@@ -4,17 +4,6 @@ args: <paper>
|
|
|
4
4
|
section: Research Workflows
|
|
5
5
|
topLevelCli: true
|
|
6
6
|
---
|
|
7
|
-
## Tool Discipline (Read First)
|
|
8
|
-
|
|
9
|
-
Tool names are literal. Use only tools visible in the current tool set.
|
|
10
|
-
|
|
11
|
-
- Search with `web_search`; do not call `search_web`, `google_search`, `google:search`, `search_google`, or `WebSearch`.
|
|
12
|
-
- Fetch URLs with `fetch_content`; do not call bare `fetch`, `WebFetch`, `read_url_content`, or pass an array as `url`. Use `urls` for multiple URLs when the tool supports it.
|
|
13
|
-
- Use visible Feynman alpha tools such as `alpha_search` when present. For shell access, call `feynman alpha ...`; do not call the user's bare global `alpha` binary.
|
|
14
|
-
- To ask the user a question, write plain chat text and wait for the next user message. Do not call `ask_user_question`, `ask_user`, `ask_followup_question`, or `user_choice`.
|
|
15
|
-
- Do not use `Task` as an agent dispatcher. Use only the visible `subagent` tool when it exists.
|
|
16
|
-
- If a tool returns `Tool not found` or `Invalid URL`, do not retry the same invalid call. Map to a canonical visible tool and valid arguments, or record the capability as blocked.
|
|
17
|
-
|
|
18
7
|
Design a replication plan for: $@
|
|
19
8
|
|
|
20
9
|
## Workflow
|
package/prompts/review.md
CHANGED
|
@@ -4,23 +4,10 @@ args: <artifact>
|
|
|
4
4
|
section: Research Workflows
|
|
5
5
|
topLevelCli: true
|
|
6
6
|
---
|
|
7
|
-
## Tool Discipline (Read First)
|
|
8
|
-
|
|
9
|
-
Tool names are literal. Use only tools visible in the current tool set.
|
|
10
|
-
|
|
11
|
-
- Search with `web_search`; do not call `search_web`, `google_search`, `google:search`, `search_google`, or `WebSearch`.
|
|
12
|
-
- Fetch URLs with `fetch_content`; do not call bare `fetch`, `WebFetch`, `read_url_content`, or pass an array as `url`. Use `urls` for multiple URLs when the tool supports it.
|
|
13
|
-
- Use visible Feynman alpha tools such as `alpha_search` when present. For shell access, call `feynman alpha ...`; do not call the user's bare global `alpha` binary.
|
|
14
|
-
- To ask the user a question, write plain chat text and wait for the next user message. Do not call `ask_user_question`, `ask_user`, `ask_followup_question`, or `user_choice`.
|
|
15
|
-
- Do not use `Task` as an agent dispatcher. Use only the visible `subagent` tool when it exists.
|
|
16
|
-
- If a tool returns `Tool not found` or `Invalid URL`, do not retry the same invalid call. Map to a canonical visible tool and valid arguments, or record the capability as blocked.
|
|
17
|
-
|
|
18
7
|
Review this AI research artifact: $@
|
|
19
8
|
|
|
20
9
|
Derive a short slug from the artifact name (lowercase, hyphens, no filler words, ≤5 words). Use this slug for all files in this run.
|
|
21
10
|
|
|
22
|
-
This is an execution request, not a request to explain or implement the workflow instructions. Carry out the workflow with tools and durable files. Do not answer by describing the protocol, saying what you would do, or stopping after a plan.
|
|
23
|
-
|
|
24
11
|
Do not ask for confirmation. Briefly summarize the plan to the user and continue immediately unless the user explicitly asked to review the plan first.
|
|
25
12
|
|
|
26
13
|
Required artifacts:
|
package/prompts/summarize.md
CHANGED
|
@@ -4,17 +4,6 @@ args: <source> [--window-size <chars>] [--overlap <chars>] [--tier1-threshold <c
|
|
|
4
4
|
section: Research Workflows
|
|
5
5
|
topLevelCli: true
|
|
6
6
|
---
|
|
7
|
-
## Tool Discipline (Read First)
|
|
8
|
-
|
|
9
|
-
Tool names are literal. Use only tools visible in the current tool set.
|
|
10
|
-
|
|
11
|
-
- Search with `web_search`; do not call `search_web`, `google_search`, `google:search`, `search_google`, or `WebSearch`.
|
|
12
|
-
- Fetch URLs with `fetch_content`; do not call bare `fetch`, `WebFetch`, `read_url_content`, or pass an array as `url`. Use `urls` for multiple URLs when the tool supports it.
|
|
13
|
-
- Use visible Feynman alpha tools such as `alpha_search` when present. For shell access, call `feynman alpha ...`; do not call the user's bare global `alpha` binary.
|
|
14
|
-
- To ask the user a question, write plain chat text and wait for the next user message. Do not call `ask_user_question`, `ask_user`, `ask_followup_question`, or `user_choice`.
|
|
15
|
-
- Do not use `Task` as an agent dispatcher. Use only the visible `subagent` tool when it exists.
|
|
16
|
-
- If a tool returns `Tool not found` or `Invalid URL`, do not retry the same invalid call. Map to a canonical visible tool and valid arguments, or record the capability as blocked.
|
|
17
|
-
|
|
18
7
|
Summarize the following research source: $@
|
|
19
8
|
|
|
20
9
|
Derive a short slug from the source filename or URL domain (lowercase, hyphens, no filler words, ≤5 words — e.g. `attention-is-all-you-need`). Use this slug for all files in this run.
|
|
@@ -27,15 +16,12 @@ Tier 1 (below the Tier-1 threshold) is a deliberate exception: direct injection
|
|
|
27
16
|
|
|
28
17
|
## Runtime knobs (context-window controls)
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- `--
|
|
33
|
-
- `--
|
|
34
|
-
- `--tier1-threshold <chars>` or `FEYNMAN_SUMMARIZE_TIER1_THRESHOLD` (default: `8000`)
|
|
35
|
-
- `--tier2-threshold <chars>` or `FEYNMAN_SUMMARIZE_TIER2_THRESHOLD` (default: `60000`)
|
|
19
|
+
- `--window-size <chars>` (default: `6000`)
|
|
20
|
+
- `--overlap <chars>` (default: `500`)
|
|
21
|
+
- `--tier1-threshold <chars>` (default: `8000`)
|
|
22
|
+
- `--tier2-threshold <chars>` (default: `60000`)
|
|
36
23
|
|
|
37
24
|
Rules:
|
|
38
|
-
- Inline flags override environment variables.
|
|
39
25
|
- Validate `window-size > overlap` and `tier1-threshold < tier2-threshold`; if invalid, stop and report a clear configuration error.
|
|
40
26
|
- Log resolved values once per run: `[summarize] config window=<w> overlap=<o> tier1=<t1> tier2=<t2>`.
|
|
41
27
|
|
package/scripts/check-pi-rpc.mjs
CHANGED
|
@@ -12,7 +12,8 @@ const appRoot = realpathSync(resolve(feynmanBin, "..", ".."));
|
|
|
12
12
|
const home = mkdtempSync(join(tmpdir(), "feynman-rpc-"));
|
|
13
13
|
const env = { ...process.env, FEYNMAN_HOME: home, HOME: home, USERPROFILE: home, FEYNMAN_TELEMETRY: "0", PI_OFFLINE: "1" };
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// --no-themes is what ACP adapters such as pi-acp pass; Feynman must accept it.
|
|
16
|
+
const child = spawn(process.execPath, [feynmanBin, "--mode", "rpc", "--no-session", "--no-themes"], { cwd: home, env });
|
|
16
17
|
let stdout = "";
|
|
17
18
|
let stderr = "";
|
|
18
19
|
child.stderr.on("data", (chunk) => { stderr += chunk; });
|
|
@@ -5,7 +5,7 @@ description: Search, read, and query research papers via Feynman's alphaXiv-back
|
|
|
5
5
|
|
|
6
6
|
# Alpha Research CLI
|
|
7
7
|
|
|
8
|
-
Use visible Feynman alpha tools when they are available. For shell commands, use `feynman alpha ...`; do not call the user's bare global `alpha` binary because it can be stale
|
|
8
|
+
Use visible Feynman alpha tools when they are available. For shell commands, use `feynman alpha ...`; do not call the user's bare global `alpha` binary because it can be stale.
|
|
9
9
|
|
|
10
10
|
## Commands
|
|
11
11
|
|
|
@@ -7,6 +7,6 @@ description: Bounded research experiment loop that tries hypotheses, measures be
|
|
|
7
7
|
|
|
8
8
|
Run the `/autoresearch` workflow. The slash command expands the full workflow instructions in the active session; do not try to read a relative prompt-template path from the installed skill directory.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Run the benchmark through the shell and record each result, its evidence, and the keep/revert decision in the session files.
|
|
11
11
|
|
|
12
12
|
Session files: `autoresearch.md`, `autoresearch.sh`, `autoresearch.jsonl`
|
package/skills/preview/SKILL.md
CHANGED
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: preview
|
|
3
|
-
description:
|
|
3
|
+
description: Render Markdown or LaTeX research artifacts to HTML or PDF with pandoc. Use when the user wants to review a written artifact, export a report, or view a rendered document.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Preview
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Commands
|
|
11
|
-
|
|
12
|
-
| Command | Description |
|
|
13
|
-
|---------|-------------|
|
|
14
|
-
| `/preview` | Preview the most recent artifact in the browser, when available |
|
|
15
|
-
| `/preview --file <path>` | Preview a specific file, when available |
|
|
16
|
-
| `/preview-browser` | Force browser preview, when available |
|
|
17
|
-
| `/preview-pdf` | Export to PDF via pandoc + LaTeX, when available |
|
|
18
|
-
| `/preview-clear-cache` | Clear rendered preview cache, when available |
|
|
19
|
-
|
|
20
|
-
## Fallback
|
|
21
|
-
|
|
22
|
-
If the preview commands are not available, use bash:
|
|
8
|
+
Render Markdown or LaTeX artifacts with pandoc through the shell. `feynman setup preview` checks for pandoc, and `feynman doctor` reports whether it is available.
|
|
23
9
|
|
|
24
10
|
```bash
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
pandoc input.md -o output.pdf
|
|
11
|
+
pandoc outputs/<slug>.md -s -o outputs/<slug>.html # HTML
|
|
12
|
+
pandoc outputs/<slug>.md -o outputs/<slug>.pdf # PDF (needs a LaTeX engine)
|
|
13
|
+
open outputs/<slug>.html # macOS; xdg-open on Linux
|
|
29
14
|
```
|
|
15
|
+
|
|
16
|
+
Rendered HTML and PDF files are previews; the Markdown artifact stays canonical. If pandoc or a LaTeX engine is missing, say so and leave the Markdown artifact as the deliverable.
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: session-search
|
|
3
|
-
description:
|
|
3
|
+
description: Search prior Feynman session transcripts on disk. Use when the user asks about earlier research sessions, past findings, or wants to resume a prior session.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Session Search
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Interactive search
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
/search <query>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Opens the session search UI when the optional package is loaded. Supports `resume <sessionPath>` to continue a found session.
|
|
17
|
-
|
|
18
|
-
## Direct file search
|
|
19
|
-
|
|
20
|
-
Session transcripts are stored as JSONL files in `~/.feynman/sessions/`. Each line is a JSON record with `type` (session, message, model_change) and `message.content` fields.
|
|
8
|
+
Feynman stores session transcripts as JSONL files under `~/.feynman/sessions/` (or `$FEYNMAN_HOME/.feynman/sessions/`). Each line is a JSON record with a `type` (session, message, model_change) and, for messages, `message.content`.
|
|
21
9
|
|
|
22
10
|
```bash
|
|
23
|
-
grep -ril "scaling laws" ~/.feynman/sessions/
|
|
11
|
+
grep -ril "scaling laws" ~/.feynman/sessions/ # sessions that mention a topic
|
|
12
|
+
grep -il "scaling laws" -r ~/.feynman/sessions/ | xargs ls -t # newest first
|
|
24
13
|
```
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
To continue a session you found, run `feynman --session <path>` or pick it with `feynman --resume`.
|