Skip to content

feat(agent): let the assistant save project rules for future documents - #96

Merged
Rl0007 merged 1 commit into
mainfrom
feat/agent-project-rules
Oct 6, 2026
Merged

Rl0007 merged 1 commit into
mainfrom
feat/agent-project-rules

Conversation

@Rl0007

@Rl0007 Rl0007 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
  1. When you told the assistant "use this for future documents in this project", it agreed but saved nothing, so the next chat or document ignored it.
  2. The assistant can now save that rule to the project's context prompt. It asks you to confirm first, the card shows the exact rule and the project, and the rule is added as a new line without touching what is already there. Users who can't edit the project get a clear refusal.

You can visit a project's chat, ask it to remember a rule for future documents, then open Project Settings to see the rule in the context prompt.

Fixes #42

Verification
  • New wikify/tests/test_agent_project_rule.py (8 tests, real DB): appends below existing text, works on an empty prompt, multi-line rule saved as one line, read-only user refused, unreadable project reported as not found without leaking its name, confirm card holds the call and quotes the rule and project, saved rule reaches the agent context. Red before the tool existed (module import failed), green after.
  • Agent test modules (write, agent, polish, content) green; full suite on the devbox: 493 run, 482 pass, 11 skip, 0 fail (the 11 skips are the corpus-only golden questions).
  • Devbox e2e via bench execute, LLM stubbed: on the Uncategorized project the unapproved turn emitted the confirm card and left the prompt empty; the approved turn saved - [test] Use the categories ..., which then appeared under "Project context:" in the agent's system prompt. Field restored afterwards.
  • Reviewer findings fixed (read permission on the lookup, one-line rules). Approval is still by tool name only, as for every confirm-gated tool, so the re-issued call could differ from the card; that predates this change.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@Rl0007
Rl0007 force-pushed the feat/agent-project-rules branch from b69548a to af83a70 Compare October 6, 2026 05:01

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@Rl0007
Rl0007 merged commit beac275 into main Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the assistant save "use this for future documents" rules to the project

1 participant