Skip to content

feat(v2): sidebar lists additional rule directories configured via cli.json #85

Description

@frap129

Parent

#80

What to build

The TUI plugin honours the same additionalRuleDirectories option from the CLI plugin cli.json config, so the sidebar shows the rules it will actually load. Extra directories that live inside the project are listed under Project, and anything outside it under Global — the same project/global split the sidebar already draws for built-in locations, now decided by project-root containment instead of a .opencode/rules prefix.

Acceptance criteria

  • The TUI plugin entry parses additionalRuleDirectories from its own plugin options once at setup and hands the parsed entries to the sidebar.
  • The sidebar resolves those entries against the session's project root at load time, not at setup time, so it reflects the directory the session is actually in.
  • With no project root, relative entries are skipped while absolute and ~/-prefixed entries still load.
  • Sidebar scope classification uses project-root containment with a separator boundary, so a path that merely shares a string prefix with the project root is not treated as inside it, and an extra directory under the project classifies as Project while anything outside classifies as Global.
  • Malformed options leave the sidebar showing exactly what it shows today — no crash, no empty sidebar.
  • TUI data tests cover scope classification for built-in, in-project extra, outside-project extra, and prefix-collision paths, plus sidebar loading with and without a project root.
  • The README notes the option works from cli.json as well as opencode.jsonc, with the same .agents/rules example.
  • aube run lint, aubx tsc --noEmit and aube run test:run are green.

Blocked by

#83

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agentv2Part of the opencode v2 migration effort

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions