Skip to content

feat(config): add per-repository configuration scopes - #1117

Open
j-token wants to merge 2 commits into
PrimeIntellect-ai:mainfrom
j-token:feat/config-scopes
Open

feat(config): add per-repository configuration scopes#1117
j-token wants to merge 2 commits into
PrimeIntellect-ai:mainfrom
j-token:feat/config-scopes

Conversation

@j-token

@j-token j-token commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • add a project harness scope stored under <project>/.prime/agent/harness/
  • resolve project settings and system prompt files from the repository root
  • add contextFiles controls for global and ancestor instruction discovery
  • let rlmMaxDepth use project settings and support /rlm-max-depth --project
  • replace the harness Python API global_ flag with scope="local" | "project" | "global"

Daemon compatibility

This is capability-gated by config_scopes and updates the daemon schema revision to 15. Clients retain the legacy boolean request for older daemons; project scope reports an explicit error when the daemon does not support it.

Note

Add project-repository configuration scope to harness refinement, RLM max depth, and context file settings

  • Introduces a project scope (alongside existing local and global) for harness state, refinement history, and RLM max depth, stored under <repo-root>/.prime/agent/.
  • /refine now accepts --project in addition to --global; the Python refine.run() API replaces global_=True with scope="project"|"global"|"local".
  • Harness state merging now overlays three scopes (global < project < local) instead of two; mergeHarnessStates and related helpers are updated accordingly.
  • Adds contextFiles settings (enabled, global, ancestors) controllable per scope, with new UI toggles in the interactive settings panel and AGENTS.md/CLAUDE.md discovery respecting these flags.
  • Daemon protocol bumped to schema revision 15 with a new config_scopes server capability; clients connecting to older daemons will receive a clear error when requesting project scope.
  • getProjectDir / getProjectConfigDir helpers resolve the project root by walking ancestors for .prime/agent or .git, explicitly excluding the home directory.
  • Risk: global_=True kwargs are no longer accepted by get_harness_state and related Python APIs; callers must migrate to scope="global"; bootstrap schema incremented to 9, requiring a venv rebuild.

Macroscope summarized f83974f.

j-token and others added 2 commits August 10, 2026 11:58
…r repository

Adds a project config scope alongside the global one so per-repository settings
and per-user settings stop mixing:

- Harness state gains a project store in <project>/.prime/agent/harness/, merged
  as global < project < local and selectable with /refine --project,
  refine.run(scope="project"), and rlm.harness.*(scope="project"). Project
  refinements are recorded next to their store so they can be rolled back from a
  later session in the same repository.
- rlmMaxDepth is read from project settings before global settings, and
  /rlm-max-depth accepts --project alongside --global.
- contextFiles settings can disable AGENTS.md/CLAUDE.md discovery, drop the
  global AGENTS.md, or stop the walk above the project root, with /settings
  toggles for the first two.
- Project settings, SYSTEM.md, and APPEND_SYSTEM.md resolve against the project
  root (nearest .prime/agent directory, else the repository root), so running
  from a subdirectory uses the repository's configuration. The home directory is
  never treated as a project.

The harness Python API takes scope="local"|"project"|"global" instead of
global_=True; the bootstrap schema is bumped so existing kernel venvs rebuild.

Daemon: adds the config_scopes server capability and schema revision 15. Clients
fall back to the legacy boolean flag on older daemons and fail loudly when
project scope is requested.
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.

1 participant