Skip to content

Replace scanners.json with plugins.json and load plugins only from it - #117

Open
MrLesk wants to merge 1 commit into
mainfrom
task-568-plugins-json
Open

MrLesk wants to merge 1 commit into
mainfrom
task-568-plugins-json

Conversation

@MrLesk

@MrLesk MrLesk commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Implements TASK-568. Plugins are now explicit. groma/plugins.json replaces scanners.json, with a scanners section (same entries and validation as before) and a workSources section. Nothing loads unless the file lists it, so groma.md no longer calls the Backlog.md CLI just because it is on the PATH.

The Backlog adapter becomes an installable package like the scanners, with found, missing or blocked readiness and a version check. New groma plugin add|list|remove|install|update commands manage every kind, and the scanner commands keep working. The web and terminal settings group plugins by kind, and groma init records Backlog.md when you choose it. There is no migration code, as AGENTS.md asks: this repository's scanners.json is converted, and so is the one test fixture that had one.

A Codex agent (GPT-6.1 Sol) built this live during the Devoxx Belgium keynote on 9 October, working TASK-568 in one checkout it shared with five other agents. This branch holds only this task's changes: I matched every changed line to the agent session that wrote it and rebuilt the task on a fresh branch from main. groma/plugins.json is regenerated from main's scanner list, because the demo branch had kept only the TypeScript scanner.

TASK-561 (icon packs, #118) builds on this plugin system and is stacked on this PR.

Acceptance criteria, as the agent left them

  • /plugins.json holds a scanners and a workSources section; scanner entries keep today's fields and validation, plugin ids are lowercase kebab-case, and the format is documented.
  • No plugin loads without an entry: with no workSources entry, groma.md never runs the Backlog.md CLI, even when it is on the PATH, and a second work-source entry is refused with a clear message.
  • A listed work source resolves from npm, a local folder or git, reports found, missing or blocked with a reason, passes the groma.md version check, and is installed or restored when missing the same way a missing scanner is; the Backlog adapter's readiness also reports whether the backlog CLI is present and how to install it.
  • groma plugin add, list, remove, install and update manage scanners and work sources; groma scanner add and the other scanner commands keep working; the web and terminal settings list plugins by kind.
  • Choosing Backlog.md during groma init adds the work source to plugins.json, nothing reads scanners.json any more, and this repository's groma/plugins.json lists its scanners and the Backlog work source.
  • Docs, agent guides and .github/workflows/architecture.yml refer to plugins.json.

Validation

On stage the agents were told not to install, build or run tests, so these are the first runs of this code.

  • bun run typecheck passes.
  • biome lint: no errors. Two new cognitive-complexity warnings, in config.ts and the web scanner settings.
  • Node tests: 16 pass. Bun suite: 779 pass, 51 skip, 0 fail. The 3 extra passes are the new work-source selection tests.
  • Main locally: 16 Node tests pass; Bun suite 776 pass, 51 skip, 0 fail. The skips are scanners whose toolchains are missing on this Mac.
  • Not checked by hand: the browser settings screen, and a fresh groma init that chooses Backlog.md.
  • The agent could not inspect MrLesk/groma.md-action, so whether the Action reads scanners.json is still open.

Overlap with the other PRs from this run

src/viewers/web/map-session.ts is shared with the plans (#120), playback (#121) and metrics (#123) PRs, and src/cli.ts with the criticality PR (#122). Each adds separate lines. If this lands after the criticality PR (#122), groma lint should switch from the Backlog adapter to loadWorkSource, as that agent's final version did.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T09:20:44.279914Z 3b9be40 PR opened
🔒 Security Review ✅ Completed 2026-10-09T09:19:39.831303Z 3b9be40 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Groma architecture comparison

Changes Added Modified Removed
Components 1 12 0
Relationships 0 2 0

Open before / after comparison

Compared 7b9f3c0 (merge base) → 3b9be40.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b9be4053f

ℹ️ 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".

Comment thread src/init-command.ts
dependencies: InitCommandDependencies,
): Promise<void> {
if (status === 'initialized' || status === 'unchanged') return
if ((await readScannerConfig(repositoryRoot)).workSources?.length) return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Report initialization failures for selected Backlog sources

When plugins.json already selects Backlog and initializeAvailableBacklog returns failed, this early return prevents the following failure branch from showing its error. Consequently, a rerun of interactive groma init reports successful completion even though the selected work source could not be initialized; handle failed before short-circuiting an existing selection.

Useful? React with 👍 / 👎.

if (config.useGitignore !== undefined && typeof config.useGitignore !== 'boolean') {
throw new Error(`${sourceFilename} useGitignore must be true or false`)
}
const workSources = configuredWorkSources(config.workSources, sourceFilename)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject IDs shared across plugin kinds

A hand-authored plugins.json can give a scanner the valid ID backlog while also selecting the backlog work source, because the duplicate-ID check below only iterates scanners after workSources is parsed. The settings and management APIs identify entries only by ID—removePlugin('backlog'), for example, always removes the work source first—so the scanner row cannot be managed reliably; validate IDs across both sections as the add commands already do.

Useful? React with 👍 / 👎.

Comment thread src/view-host.ts
options: StartViewerOptions = {},
): Promise<TerminalViewer> {
const workSource = options.workSource ?? backlogPlugin.create(repositoryRoot)
const workSource = await workSourceSession(repositoryRoot, options.workSource)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove documentation of the embedded Backlog default

The hosts now load a work source only through plugins.json, but the unchanged product documentation still says they use an embedded Backlog plugin by default (docs/viewers/creating-a-plugin.md:70-77, docs/viewers/index.md:37-42, docs/product-model.md:356-366, and docs/scanners/index.md:82-84). A developer following those pages will expect Backlog tasks whenever the CLI is installed, which directly contradicts this change's opt-in behavior; update these descriptions to explain explicit selection.

AGENTS.md reference: AGENTS.md:L80-L82

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
github-pages — 3b9be405 Deployed Oct 9, 2026 by MrLesk via deploy #184
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