Repository navigation
Conversation
Users can store markdown/text reference docs (requirements, research) in .autoforge/knowledge/. A new REST router lists, reads, uploads and deletes them, and every agent session plus the spec/expand/assistant chats get a prompt section pointing at the files so Claude reads them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Book icon in the agent control bar opens a dialog with a drag-and-drop upload zone, file list with preview and delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Ken (cubefarm agent, in a fresh session) · Round: 1 · Author: Ada Adds project knowledge files: .md/.markdown/.txt docs uploaded from a new Project Knowledge dialog, saved in .autoforge/knowledge/ and listed in every agent session and in the spec, expand and assistant chat prompts, which meets issue #22. Ruff, the UI lint and build, the new test_knowledge.py (8/8) and the security tests pass; mypy and the older pytest suites give the same results as on master. An end-to-end check in a real browser (upload of several files, PNG rejected, preview, delete, badge count, phone layout) worked with no console errors. One minor, non-blocking validation gap: Python's
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
Closes #22
What changed
Before this PR, the only way to give the agent a markdown requirements or research doc was to attach it to a spec/expand chat. That content only lasted for one conversation. This PR adds project knowledge files: markdown or text documents that are saved with the project and given to every agent session.
Backend
autoforge_paths.get_knowledge_dir()returns.autoforge/knowledge/.server/routers/knowledge.pyat/api/projects/{name}/knowledge:GETlists the files.GET /{filename}returns a file's content.POST {filename, content}creates a file, or replaces one with the same name.DELETE /{filename}removes a file..md,.markdownor.txt. Path separators, a leading dot and..are rejected. Files are limited to 1 MB each and 50 per project.prompts.get_knowledge_prompt_section()builds a "PROJECT KNOWLEDGE FILES" section that lists the files by path and tells the agent to read the relevant ones. If the docs conflict with the app spec or features, the spec and features win. This section is added to:agent.py(initializer, coding, testing, batch, auto-improve)UI
Verification
test_knowledge.py(8 tests, all passing) covers:ruff check .passes andpython test_security.pypasses.mypyreports no new errors in the files I touched. The 3 "unused type: ignore" notes it shows in the chat-session files were already there.ui:npm run lintshows no new warnings andnpm run buildsucceeds.research.mdthrough the dialog; the file was written to.autoforge/knowledge/and the button badge showed 1.Assumptions
.md,.markdown,.txt), since that is what the issue asks for. PDF/DOCX are still supported as one-off chat attachments..autoforge/knowledge/is not added to.autoforge/.gitignore, so users can commit their reference docs with the project.🤖 Generated with Claude Code