@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/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`
@@ -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:
@@ -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
- Support both inline flags and environment variables so users can tune context-window behavior per run or globally.
31
-
32
- - `--window-size <chars>` or `FEYNMAN_SUMMARIZE_WINDOW_CHARS` (default: `6000`)
33
- - `--overlap <chars>` or `FEYNMAN_SUMMARIZE_OVERLAP_CHARS` (default: `500`)
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
 
@@ -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
- const child = spawn(process.execPath, [feynmanBin, "--mode", "rpc", "--no-session"], { cwd: home, env });
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 or unpatched.
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
- Optional tools used when visible: `init_experiment`, `run_experiment`, `log_experiment`. Without those tools, run the benchmark through the available shell/tooling and record benchmark result, evidence, and decision in the session files.
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`
@@ -1,29 +1,16 @@
1
1
  ---
2
2
  name: preview
3
- description: Preview Markdown, LaTeX, PDF, or code artifacts when preview commands are visible, or fall back to shell/browser tools. Use when the user wants to review a written artifact, export a report, or view a rendered document.
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
- Use `/preview` only when that command is visible in the active session. If preview commands are unavailable, render or open artifacts with shell/browser tools and report that the preview package is not installed.
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
- open <file.md> # macOS — opens in default app
26
- open <file.pdf> # macOS — opens in Preview
27
- pandoc input.md -o output.html
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: Recover prior Feynman work from session transcripts. Use the optional /search command only when it is installed and visible; otherwise search local session JSONL files directly.
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
- Use the `/search` command to search prior Feynman sessions interactively only when the optional session-search package is installed and the command is visible. Otherwise, search session JSONL files directly via bash.
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
- For structured search across sessions, use the interactive `/search` command when it is visible. If it is unavailable, direct file search is the supported fallback.
15
+ To continue a session you found, run `feynman --session <path>` or pick it with `feynman --resume`.