Skip to content

feat(fran-mora/plandex): add Plandex AI coding agent module - #876

Open
fran-mora wants to merge 3 commits into
coder:mainfrom
fran-mora:feat/add-plandex-module
Open

feat(fran-mora/plandex): add Plandex AI coding agent module#876
fran-mora wants to merge 3 commits into
coder:mainfrom
fran-mora:feat/add-plandex-module

Conversation

@fran-mora

Copy link
Copy Markdown

Summary

Adds the fran-mora namespace and a v1 plandex module that installs and configures the Plandex CLI in a Coder workspace. Plandex is an open-source CLI AI coding agent (Go, ~12k stars); this module fills a gap alongside the existing claude-code, aider, codex, opencode, goose, copilot, and cursor-cli modules.

Module shape mirrors claude-code:

  • Wraps Plandex's official installer (https://plandex.ai/install.sh); supports pinned versions via the upstream PLANDEX_VERSION env var.
  • Sets API-key env vars for OpenAI / Anthropic / Google / OpenRouter (each marked sensitive). Each coder_env resource is gated on the corresponding key being non-empty.
  • Optional plandex_api_host for self-hosted Plandex servers.
  • Optional workdir; auto-creates it if missing.
  • Uses coder-utils for script orchestration per AGENTS.md guidance, with module data under \$HOME/.coder-modules/fran-mora/plandex/ per the standard data layout.
  • Exposes the scripts output for downstream coder_script ordering via coder exp sync.

v1 ships CLI install only. Full agentapi web-UI integration is deferred until upstream coder/agentapi adds a plandex type; the README documents BYO-launcher via coder_app in the meantime.

The placeholder icon at .icons/plandex.svg and the namespace avatar are intentionally simple — happy to swap for an official asset if you have a preferred source.

Test plan

  • terraform validate (from module dir) — pass
  • terraform test -verbose — 11/11 pass (defaults, workdir trim, version pinning, install toggle, individual + multiple provider keys creating expected coder_env resources, self-hosted host, custom scripts, custom icon)
  • bun run fmt — clean (no diff produced)
  • go build ./cmd/readmevalidation && ./readmevalidation — pass (24 contributor profiles, 79 modules, 33 templates all valid)
  • git diff --stat reviewed — only the 7 new files; no stray edits to existing code

Description of AI Usage

I used Claude Code to scaffold this module against the existing claude-code template, adapt it for Plandex's installer shape, write the test cases, and verify locally. All review comments are mine to address.

Adds the fran-mora namespace and a v1 module that installs and
configures the Plandex CLI in a Coder workspace. Plandex
(https://plandex.ai) is an open-source CLI AI coding agent; this
module fills a gap alongside the existing claude-code, aider, codex,
opencode, goose, copilot, and cursor-cli modules.

Module shape mirrors claude-code:

- Wraps Plandex's official installer; supports pinned versions via
  the upstream PLANDEX_VERSION env var.
- Sets API-key env vars for OpenAI, Anthropic, Google, and OpenRouter
  (each marked sensitive). Each coder_env resource is gated on the
  corresponding key being non-empty.
- Optional plandex_api_host for self-hosted Plandex servers.
- Optional workdir; auto-creates it if missing.
- Uses coder-utils for script orchestration per AGENTS.md guidance,
  with module data under \$HOME/.coder-modules/fran-mora/plandex/ per
  the standard data layout.
- Exposes the scripts output for downstream coder_script ordering via
  coder exp sync.

v1 ships CLI install only. Full agentapi web-UI integration is
deferred until upstream coder/agentapi adds a plandex type; the
README documents BYO-launcher via coder_app in the meantime.

Local validation:
- terraform validate: pass
- terraform test: 11/11 pass
- bun run fmt: clean
- ./readmevalidation: pass (24 contributors, 79 modules, 33 templates)
@DevelopmentCats

DevelopmentCats commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Awesome! @fran-mora Thank you for the contributon I will give this a test and a full review and we should be able to get this merged in 😄

@matifali

Copy link
Copy Markdown
Member

Full agentapi web-UI integration is deferred until upstream coder/agentapi adds a plandex type;

@fran-mora agentAPI is now deprecated, as are Coder Tasks. So the module should be scoped to only install and optionally configure auth for the agent.

@bpmct

bpmct commented Aug 26, 2026

Copy link
Copy Markdown
Member

/scorecard

@github-actions

Copy link
Copy Markdown
Contributor

Module Scorecard Check

fran-mora/plandex: first scorecard, 60 / 100

No specific score is required to contribute, but modules with higher scores are more likely to be approved by the Coder team and widely used.

Full scorecard for this PR
Presentation & Onboarding Agent Integration Credential Hygiene Restricted-Environment Readiness Engineering Quality Overall
12 / 17 10 / 25 10 / 20 15 / 20 8 / 10 60 / 100
Drilldown

Presentation & Onboarding — 12 / 17

Criterion Max Score Notes
Configuration-mode examples 12 12 README provides examples for standalone mode with launcher app, version pinning, self-hosted server, skip-install mode, and downstream script serialization. Each example is clear with sensible defaults.
Visual preview 5 0 No image, GIF, or video in README. Icon reference does not count.

Agent Integration — 10 / 25

Criterion Max Score Notes
AI governance 10 0 No documentation of Coder AI Gateway or Agent Firewall support. Module only configures provider API keys directly.
Dashboard entry point 5 5 README "Standalone mode with a launcher app" example shows complete coder_app configuration with command that launches Plandex REPL.
Session continuity 5 0 No documentation of resuming existing sessions or using persistent session managers (tmux, screen, boo).
Managed configuration 5 5 Module manages Plandex configuration via environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENROUTER_API_KEY, PLANDEX_API_HOST) and workdir setup.

Credential Hygiene — 10 / 20

Criterion Max Score Notes
Secrets marked sensitive 16 8 All API key variables (openai_api_key, anthropic_api_key, google_api_key, openrouter_api_key) are marked sensitive = true in main.tf. However, README examples inline literal placeholder keys like openai_api_key = "sk-..." and anthropic_api_key = "sk-ant-...", capping score at half.
Non-hardcoded auth path 4 2 README mentions self-hosted Plandex server option via plandex_api_host, which could enable alternative auth flows, but no explicit documentation of OAuth, IAM, or AI Gateway patterns. Partial credit for server flexibility.

Restricted-Environment Readiness — 15 / 20

Criterion Max Score Notes
Mirrorable artifact source 5 0 Install script hardcodes curl -sL https://plandex.ai/install.sh. No module variable overrides this download URL. Version pinning via plandex_version does not provide URL override capability.
Bring-your-own binary 10 10 README "Skip the installer" example documents install_plandex = false to skip installation when Plandex is pre-baked into the image. Module only configures env vars in this mode.
Egress transparency 3 1.5 Troubleshooting section mentions the installer writes to /usr/local/bin/plandex or $HOME/.local/bin/plandex, and install script shows https://plandex.ai/install.sh endpoint. No dedicated section enumerating all external endpoints (Plandex Cloud API, provider APIs at runtime). Scattered mentions earn half.
Runs without sudo 2 2 Install script (install.sh.tftpl) never invokes sudo. It relies on Plandex's official installer which falls back to $HOME/.local/bin when sudo is unavailable. Script adds paths to shell profiles and creates symlinks without requiring root.

Engineering Quality — 8 / 10

Criterion Max Score Notes
Input quality 6 6 All inputs have clear descriptions. Sensible defaults: install_plandex = true, plandex_version = "latest", empty strings for optional API keys. No validation blocks present, but inputs are straightforward enough that validation is not critical.
Test coverage 4 2 main.tftest.hcl covers defaults, workdir trimming, version pinning, install toggle, env resource creation logic, and custom scripts. Tests are plan-only and verify variable/local logic. No TypeScript or end-to-end tests for actual Plandex installation or runtime behavior. Half credit for Terraform-only coverage.

Overall — 60 / 100

Raw 55 / 92 → round(55 / 92 × 100) = 60

Tip

You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".


Scored against SCORECARD.md with claude-sonnet-4-5. Language-model scores are advisory.

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.

4 participants