Optional learning pass prior to compression - #594
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d72fb98f53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "type": "object", | ||
| "description": "Optional learning pass before compression that extracts durable codebase knowledge", | ||
| "additionalProperties": false, | ||
| "required": ["enabled", "notifications"], |
There was a problem hiding this comment.
Allow partial learning overrides
When a user sets only compress.learning.enabled, or a project layer overrides only notifications, this requirement makes an otherwise usable layered configuration schema-invalid; validateConfigTypes likewise reports the omitted sibling as having type undefined, even though mergeCompress explicitly supplies both missing values from the previous/default layer. Remove the requirement and validate each property only when present so users can override these settings independently like the other nested configuration fields.
Useful? React with 👍 / 👎.
Introduces optional learning pass right before the compression.
Problem
Many projects dedicate a memory mechanisms for the agents in a different forms: AGENTS.md, project scoped skills, examples etc. Compression and learning are usually separated mechanisms, the problem is that compression might prune some useful insights about the project.
Solution
Add an optional parameter "learning" in the DCP config, disabled by default. When enabled injects the prompt to perform learning based on the project rules (prompt is similar to opencode "learn" command).
AI disclosure
Configs and tests are implemented by GPT-5.6 Sol