diff --git a/.feynman/SYSTEM.md b/.feynman/SYSTEM.md index 19a6fcc..4dac626 100644 --- a/.feynman/SYSTEM.md +++ b/.feynman/SYSTEM.md @@ -15,6 +15,8 @@ Operating rules: - Never answer a latest/current question from arXiv or alpha-backed paper search alone. - For AI model or product claims, prefer official docs/vendor pages plus recent web sources over old papers. - Use the installed Pi research packages for broader web/PDF access, document parsing, citation workflows, background processes, memory, session recall, and delegated subtasks when they reduce friction. +- You are running inside the Feynman/Pi runtime with filesystem tools, package tools, and configured extensions. Do not claim you are only a static model, that you cannot write files, or that you cannot use tools unless you attempted the relevant tool and it failed. +- If a tool, package, source, or network route is unavailable, record the specific failed capability and still write the requested durable artifact with a clear `Blocked / Unverified` status instead of stopping with chat-only prose. - Feynman ships project subagents for research work. Prefer the `researcher`, `writer`, `verifier`, and `reviewer` subagents for larger research tasks when decomposition clearly helps. - Use subagents when decomposition meaningfully reduces context pressure or lets you parallelize evidence gathering. For detached long-running work, prefer background subagent execution with `clarify: false, async: true`. - For deep research, act like a lead researcher by default: plan first, use hidden worker batches only when breadth justifies them, synthesize batch results, and finish with a verification pass. @@ -44,6 +46,7 @@ Operating rules: - When citing papers from alpha-backed tools, prefer direct arXiv or alphaXiv links and include the arXiv ID. - Default toward delivering a concrete artifact when the task naturally calls for one: reading list, memo, audit, experiment log, or draft. - For user-facing workflows, produce exactly one canonical durable Markdown artifact unless the user explicitly asks for multiple deliverables. +- If a workflow requests a durable artifact, verify the file exists on disk before the final response. If complete evidence is unavailable, save a partial artifact that explicitly marks missing checks as `blocked`, `unverified`, or `not run`. - Do not create extra user-facing intermediate markdown files just because the workflow has multiple reasoning stages. - Treat HTML/PDF preview outputs as temporary render artifacts, not as the canonical saved result. - Intermediate task files, raw logs, and verification notes are allowed when they materially reduce context pressure or improve auditability. diff --git a/README.md b/README.md index a4728e5..38f567f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ curl -fsSL https://feynman.is/install | bash irm https://feynman.is/install.ps1 | iex ``` -The one-line installer fetches the latest tagged release. To pin a version, pass it explicitly, for example `curl -fsSL https://feynman.is/install | bash -s -- 0.2.22`. +The one-line installer fetches the latest tagged release. To pin a version, pass it explicitly, for example `curl -fsSL https://feynman.is/install | bash -s -- 0.2.23`. The installer downloads a standalone native bundle with its own Node.js runtime. diff --git a/package-lock.json b/package-lock.json index 34891b7..8ae97c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@companion-ai/feynman", - "version": "0.2.22", + "version": "0.2.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@companion-ai/feynman", - "version": "0.2.22", + "version": "0.2.23", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index eab0666..e61e1f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@companion-ai/feynman", - "version": "0.2.22", + "version": "0.2.23", "description": "Research-first CLI agent built on Pi and alphaXiv", "license": "MIT", "type": "module", diff --git a/prompts/deepresearch.md b/prompts/deepresearch.md index c49e7e2..6030bae 100644 --- a/prompts/deepresearch.md +++ b/prompts/deepresearch.md @@ -53,6 +53,8 @@ Also save the plan with `memory_remember` (type: `fact`, key: `deepresearch.-draft.md` yourself as a blocked report with: +- what was requested, +- which capabilities failed, +- what evidence was and was not gathered, +- a proposed source-gathering plan, +- no invented sources or results. + ## 5. Write the report Once evidence is sufficient, YOU write the full research brief directly. Do not delegate writing to another agent. Read the research files, synthesize the findings, and produce a complete document: @@ -190,6 +199,7 @@ Before you stop, verify on disk that all of these exist: - `outputs/.provenance.md` or `papers/.provenance.md` provenance sidecar Do not stop at `-brief.md` alone. If the cited brief exists but the promoted final output or provenance sidecar does not, create them before responding. +If full verification could not be completed, still create the final deliverable and provenance sidecar with `Verification: BLOCKED` or `PASS WITH NOTES` and list the missing checks. Never end with only an explanation in chat. ## Background execution diff --git a/scripts/install/install.ps1 b/scripts/install/install.ps1 index 107aeda..6eb640d 100644 --- a/scripts/install/install.ps1 +++ b/scripts/install/install.ps1 @@ -110,7 +110,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.22 + & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.23 "@ } diff --git a/scripts/install/install.sh b/scripts/install/install.sh index b7861df..abb1bec 100644 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -261,7 +261,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - curl -fsSL https://feynman.is/install | bash -s -- 0.2.22 + curl -fsSL https://feynman.is/install | bash -s -- 0.2.23 EOF exit 1 fi diff --git a/tests/content-policy.test.ts b/tests/content-policy.test.ts index b195b9d..cf1ad52 100644 --- a/tests/content-policy.test.ts +++ b/tests/content-policy.test.ts @@ -57,3 +57,15 @@ test("research writing prompts forbid fabricated results and unproven figures", assert.match(draftPrompt, /placeholder or proposed experimental plan/i); assert.match(draftPrompt, /source-backed quantitative data/i); }); + +test("deepresearch workflow requires durable artifacts even when blocked", () => { + const systemPrompt = readFileSync(join(repoRoot, ".feynman", "SYSTEM.md"), "utf8"); + const deepResearchPrompt = readFileSync(join(repoRoot, "prompts", "deepresearch.md"), "utf8"); + + assert.match(systemPrompt, /Do not claim you are only a static model/i); + assert.match(systemPrompt, /write the requested durable artifact/i); + assert.match(deepResearchPrompt, /Do not stop after planning/i); + assert.match(deepResearchPrompt, /degraded mode/i); + assert.match(deepResearchPrompt, /Verification: BLOCKED/i); + assert.match(deepResearchPrompt, /Never end with only an explanation in chat/i); +}); diff --git a/website/public/install b/website/public/install index b7861df..abb1bec 100644 --- a/website/public/install +++ b/website/public/install @@ -261,7 +261,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - curl -fsSL https://feynman.is/install | bash -s -- 0.2.22 + curl -fsSL https://feynman.is/install | bash -s -- 0.2.23 EOF exit 1 fi diff --git a/website/public/install.ps1 b/website/public/install.ps1 index 107aeda..6eb640d 100644 --- a/website/public/install.ps1 +++ b/website/public/install.ps1 @@ -110,7 +110,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.22 + & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.23 "@ } diff --git a/website/src/content/docs/getting-started/installation.md b/website/src/content/docs/getting-started/installation.md index 1d5bfb0..c3d4a06 100644 --- a/website/src/content/docs/getting-started/installation.md +++ b/website/src/content/docs/getting-started/installation.md @@ -117,13 +117,13 @@ These installers download the bundled `skills/` and `prompts/` trees plus the re The one-line installer already targets the latest tagged release. To pin an exact version, pass it explicitly: ```bash -curl -fsSL https://feynman.is/install | bash -s -- 0.2.22 +curl -fsSL https://feynman.is/install | bash -s -- 0.2.23 ``` On Windows: ```powershell -& ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.22 +& ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.23 ``` ## Post-install setup