feat(fran-mora/plandex): add Plandex AI coding agent module - #876
feat(fran-mora/plandex): add Plandex AI coding agent module#876fran-mora wants to merge 3 commits into
Conversation
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)
|
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 😄 |
@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. |
|
/scorecard |
Module Scorecard Check
|
| 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.
Summary
Adds the
fran-moranamespace and a v1plandexmodule 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 existingclaude-code,aider,codex,opencode,goose,copilot, andcursor-climodules.Module shape mirrors
claude-code:https://plandex.ai/install.sh); supports pinned versions via the upstreamPLANDEX_VERSIONenv var.sensitive). Eachcoder_envresource is gated on the corresponding key being non-empty.plandex_api_hostfor self-hosted Plandex servers.workdir; auto-creates it if missing.coder-utilsfor script orchestration perAGENTS.mdguidance, with module data under\$HOME/.coder-modules/fran-mora/plandex/per the standard data layout.scriptsoutput for downstreamcoder_scriptordering viacoder exp sync.v1 ships CLI install only. Full
agentapiweb-UI integration is deferred until upstreamcoder/agentapiadds aplandextype; the README documents BYO-launcher viacoder_appin the meantime.The placeholder icon at
.icons/plandex.svgand 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) — passterraform test -verbose— 11/11 pass (defaults, workdir trim, version pinning, install toggle, individual + multiple provider keys creating expectedcoder_envresources, 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 --statreviewed — only the 7 new files; no stray edits to existing codeDescription of AI Usage
I used Claude Code to scaffold this module against the existing
claude-codetemplate, adapt it for Plandex's installer shape, write the test cases, and verify locally. All review comments are mine to address.