Repository navigation
fix: make file-producing tools config-driven via memory/toolsDir - #1459
Merged
Merged
Conversation
Add OpenSpec proposal, design, tasks, and spec deltas for config-driven tool outputs. The clarify, generatePptx, generatePdf, spreadsheet, and tts tools will read config.memory.toolsDir via loadConfig() and default their output paths there. Adds a SYSTEM_PROMPT.md fallback directive. Closes #1458
Make clarify, generatePptx, generatePdf, spreadsheet, and tts read config.memory.toolsDir via loadConfig() and default their output paths there, matching the pattern used by screenshotWeb, cron, sampling, memory, and webhook. Add a SYSTEM_PROMPT.md fallback directive for future tools. Update tests and add regression coverage. Closes #1458
Archive the OpenSpec change and sync the spec deltas into openspec/specs/ for clarify-tool, config-driven-tool-outputs, and system-prompt.
Owner
Author
Implementation Audit Results: config-driven-tool-outputsGoal FulfillmentAll 7 goals from the feature goals file are implemented and verified:
Spec Compliance
Task CompletionAll 17 tasks in Quality Check
Deviations
|
The SYSTEM_PROMPT.md directive was placed as rule 11.1 under the Delivery section (rule 11 is a delivery/tone rule). It belongs in the Tool Call Discipline section as rule 29, since it governs tool output handling. Renumbered rules 30-44 and fixed the cross-reference in rule 17.
readImage now returns a formatted ToolMessage containing an image_url content block, so the LLM can see the image directly rather than just receiving base64-encoded data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make the file-producing tools (
clarify,generatePptx,generatePdf,spreadsheet,tts) config-driven viaconfig.memory.toolsDir(read throughloadConfig()), matching the pattern used byscreenshotWeb,cron,sampling,memory, andwebhook. Adds aSYSTEM_PROMPT.mdfallback directive for future tools.src/tools/clarify/index.js— default clarifications file now readsconfig.memory.toolsDir(defaultmemory/tools/), removingclarifications.mdfrom theloadContext()system-prompt concatenation.src/tools/pptx/index.js—outputPathis now optional and defaults toconfig.memory.toolsDir;validateOutputPathtraversal guard preserved.src/tools/pdf/index.js—outputPathdefaults toconfig.memory.toolsDirwhen omitted.src/tools/spreadsheet/spreadsheet.js—outputPathdefaults toconfig.memory.toolsDiringenerate/modify/export.src/tools/tts/index.js— replaces hardcoded~/voice-memos/withconfig.memory.toolsDir.prompts/SYSTEM_PROMPT.md— adds a fallback directive to save tool outputs tomemory/tools/.Type of Change
Testing
config.memory.toolsDir(ormemory/tools/fallback).loadContext()no longer includesclarifications.md.npm run test(4211 pass),npm run lint(clean),npm run coverage(91.49% line coverage maintained).Coverage
Checklist
npm run lintpassesCloses #1458