Skip to content

feat(setup): add @fro.bot/systematic as bundled versioned tool#409

Merged
marcusrbrown merged 1 commit intomainfrom
feat/add-systematic-plugin
Mar 30, 2026
Merged

feat(setup): add @fro.bot/systematic as bundled versioned tool#409
marcusrbrown merged 1 commit intomainfrom
feat/add-systematic-plugin

Conversation

@marcusrbrown
Copy link
Copy Markdown
Collaborator

Summary

  • Register the Systematic plugin (@fro.bot/systematic@2.1.0) in OpenCode's config during setup so the agent has access to structured engineering workflows (brainstorming, planning, code review, etc.) in CI
  • Follow the versioned-tool pattern: single-source-of-truth version constant → action input fallback → Renovate auto-update
  • Wire the plugin into OPENCODE_CONFIG_CONTENT.plugins array with dedup logic (user version pins win)

Changes

Version tracking (versioned-tool pattern)

  • src/shared/constants.tsDEFAULT_SYSTEMATIC_VERSION = '2.1.0'
  • .github/renovate.json5 — npm customManager + packageRule for @fro.bot/systematic

Action input

  • action.yamlsystematic-version input (no hardcoded default)
  • src/harness/config/inputs.ts — Parse with DEFAULT_SYSTEMATIC_VERSION fallback
  • src/shared/types.tssystematicVersion added to ActionInputs

Data flow wiring

  • src/services/setup/types.tssystematicVersion added to SetupInputs
  • src/features/agent/server.ts — Added to EnsureOpenCodeOptions, passed through
  • src/harness/phases/bootstrap.ts — Passes inputs.systematicVersion downstream

Plugin registration

  • src/services/setup/setup.ts — Appends @fro.bot/systematic@{version} to OPENCODE_CONFIG_CONTENT plugins array after user config merge (deduped by @fro.bot/systematic prefix so user overrides are respected)

Tests & docs

  • src/services/setup/setup.test.ts — Updated fixture + 3 ciConfig assertions
  • src/features/agent/opencode.test.ts — Updated 2 call sites
  • README.md — Added systematic-version to inputs table

Verification

  • 1087 tests pass
  • 0 lint errors
  • Type check clean
  • dist/ rebuilt and in sync

Register the Systematic plugin (v2.1.0) in OpenCode's config during
setup so the agent has access to structured engineering workflows in CI.

- Pin DEFAULT_SYSTEMATIC_VERSION in constants.ts (single source of truth)
- Add systematic-version action input with constant fallback
- Wire version through ActionInputs → SetupInputs → OPENCODE_CONFIG_CONTENT
- Append @fro.bot/systematic@{version} to plugins array (deduped)
- Add Renovate customManager + packageRule for automated npm updates
- Update tests and README
Copy link
Copy Markdown
Owner

@fro-bot fro-bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This PR correctly implements the @fro.bot/systematic plugin as a bundled versioned tool following the established versioned-tool pattern. The implementation is clean, well-tested, and follows all project conventions.

✅ Implementation Checklist

Version Tracking (versioned-tool pattern)

  • DEFAULT_SYSTEMATIC_VERSION = '2.1.0' added to src/shared/constants.ts as single source of truth
  • Renovate customManager correctly added with npm datasource for @fro.bot/systematic
  • PackageRule includes @fro.bot/systematic with semanticCommitType: 'build'

Action Input

  • systematic-version input in action.yaml correctly omits hardcoded default (lets inputs.ts handle fallback)
  • Input parsing in inputs.ts correctly falls back to DEFAULT_SYSTEMATIC_VERSION
  • systematicVersion added to ActionInputs and SetupInputs types

Data Flow

  • Clean propagation: bootstrap → server → setup.ts
  • EnsureOpenCodeOptions interface updated appropriately

Plugin Registration Logic

const systematicPlugin = `@fro.bot/systematic@${inputs.systematicVersion}`
const hasSystematic = rawPlugins.some((p) => typeof p === 'string' && p.startsWith('@fro.bot/systematic'))
if (!hasSystematic) {
  ciConfig.plugins = [...rawPlugins, systematicPlugin]
}

This correctly:

  • Appends Systematic plugin only when not already present
  • Respects user-provided version pins (user wins on dedup)
  • Uses version from systematicVersion input with fallback to constant

Tests

  • inputs.test.ts: Tests for default and custom systematic-version input
  • setup.test.ts: 3 comprehensive tests for plugin registration:
    1. Baseline config includes Systematic plugin
    2. User config merges correctly (user values win)
    3. User-provided Systematic plugin preserved (no duplicate)

Documentation

  • README inputs table correctly updated with default version reference

Verification

  • ✅ 1090 tests pass
  • ✅ TypeScript check clean
  • ✅ 0 lint errors (34 pre-existing warnings unrelated to this PR)
  • dist/ in sync (no uncommitted changes)

Key Strengths

  1. Pattern adherence - Follows the versioned-tool pattern exactly (constant → input fallback → Renovate)
  2. User override support - Users can pin their own version via systematic-version input
  3. Correct deduplication - startsWith('@fro.bot/systematic') correctly matches any version
  4. No breaking changes - Plugin is appended to config, existing plugin arrays preserved

No issues found. Approving.


Run Summary
Field Value
Event pull_request
Repository fro-bot/agent
Run ID 23723698033
Cache hit
Session ses_2c3b27f46ffepvMtbqHho3oH3W

@marcusrbrown marcusrbrown merged commit 8c14668 into main Mar 30, 2026
10 of 17 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.

2 participants