development-companion

Harness-neutral development process, roles, and skills for AI coding agents.

Packages

Package details

skill

Install development-companion from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:development-companion
Package
development-companion
Version
1.8.2
Published
Nov 22, 2026
Downloads
1,320/mo · 512/wk
Author
rockmadehome
License
MIT
Types
skill
Size
453.8 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "skills": [
    "./skills"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Development Companion

One installable development process for AI coding agents: 13 roles, 18 skills, and a CLI that adapts the same canonical base to OpenCode, Claude Code, Codex, Pi, and other harnesses.

npx development-companion@latest init

devcomp init detects the repository and harness, installs the process, and leaves your existing AGENTS.md and CLAUDE.md intact unless you choose otherwise.

Run devcomp doctor from the repository opened by the agent. If you work in a nested repository, install there too: its own AGENTS.md and agent configuration may take precedence. init --yes preserves existing rules; doctor fails when those rules do not activate the process. Ask the harness agent to merge existing rules, or use init --rules handoff for a backed-up, explicitly pending merge. --rules append remains available for compatible rules.

Why

Coding agents are powerful but inconsistent. Each harness has its own rules file, skill format, and subagent mechanism. Copying prompts between them creates drift: one harness gets the latest review checklist, another keeps an outdated one.

Development Companion separates the process from the harness:

Layer Responsibility
Process Discovery, architecture, security, QA, UX, delivery, deployment, closure.
Roles Who decides, who delivers, and who verifies.
Skills How each discipline is executed, with evidence.
CLI Detects, installs, adapts, and diagnoses.

The same canonical content is installed everywhere. Adapters only translate paths and formats.

Install

New or existing repository

npx development-companion@latest init
# or
npm create development-companion@latest

Useful flags:

npx development-companion init . \
  --harness opencode \
  --profile web \
  --rules append \
  --branching trunk-based \
  --docs local \
  --memory engram
Flag Effect
--harness <name> Force the adapter; auto detects it.
--profile <name> web, backend, mobile, desktop, cross-platform, full.
--skills <a,b> Add specific skills.
--rules keep|append|handoff|replace Policy for existing rules; handoff backs up AGENTS.md for agent-led merge.
--branching <name> gitflow, gitlab-flow, trunk-based, github-flow, custom.
--docs local|tracked Keep design docs local or version them in docs/companion/.
--memory engram|none Recommend Engram for cross-session memory.
--mode copy|symlink How skills are installed.
--dry-run Print the plan without writing.
--yes Non-interactive; rules default to keep.

Rules are never overwritten silently

If AGENTS.md or CLAUDE.md already exists, the CLI asks:

  • keep — leave the file untouched;
  • append — add a managed block, preserving your rules;
  • handoff — back up AGENTS.md under .companion/local/rules-backup/, write a pending-merge notice and the process block; doctor fails until an agent merges project-specific rules and removes the notice. Existing CLAUDE.md is kept.
  • replace — replace the file, with explicit confirmation and a local backup; AGENTS.md still requires a reviewed merge of the original before work begins.

The managed block is delimited by <!-- development-companion:start --> and <!-- development-companion:end -->, so updates are idempotent.

Commands

Command Purpose
devcomp init [dir] Install the process, skills, roles, rules, runtime adapter, and manifest.
devcomp add <skill|role|profile> <name> Add content to an existing install.
devcomp setup opencode --global Install the OpenCode runtime adapter for every project.
devcomp scaffold [dir] Generate the TypeScript reference monorepo.
devcomp doctor [dir] Check content, the coordinator binding, the runtime gates (plan, scope, destructive), scope lock, feature flow, and the config gate.
devcomp update [dir] Refresh framework content, bindings, plugin, and OpenCode config.

The process

New in 1.8.2: one approval covers every named specialist in the plan. The Coordinator presents both the development and complete test plans before delegating. A query is answered without specialists and a small change uses one writer and a short brief.

Since 1.7.0: the primary is the coordinator agent (default_agent: coordinator); it cannot edit product code or run shell, so it must frame, ask for approval and delegate. A runtime plugin injects the canonical process in every session, including child repositories. Approval is natural language; there is no magic phrase. devcomp update migrates existing installations.

The process exists to ship working software, not to produce documents. It is a loop:

0 Bootstrap
  → 1 Frame (one page, 30–60 min)
  → 2 Walking skeleton (end-to-end, fakes allowed)
  → 3 Slice loop (build → test → demo → next)
  → 4 Verify (security + QA, continuous)
  → 5 Release
  → 6 Close

Planning artifacts are living notes written just in time, not phase gates. The first commit lands before the second design document. See core/process.md and the incremental-delivery skill.

For a small change, the process collapses to the workflow in core/workflow.md.

Working modes and feature plan

Mode Use for Minimum artifact Agents Authorization
Query Question, explanation, read-only investigation None Coordinator only None
Small change Confined, low-risk fix Brief with Aprobado:, Agent: and Scope: One writer One plan approval
Feature New capability or behavior change Feature plan with Development plan and Test plan Named specialists after approval One plan approval
Bug Reproducible failure Reproduction + failing test + fix + regression One writer (+ QA if critical) Short brief with Aprobado/Scope
Refactor No behavior change Baseline tests + reversible steps One writer Short brief with Aprobado/Scope
Incident Production down, data or security Stabilize first; postmortem after Coordinator + SRE/security Coordinator talks to the user

A feature plan is user-visible. The template (templates/artifacts/11-feature-plan.md) contains scope and non-goals, a top-level Scope:, approach and trade-offs, Development plan, Test plan with Golden Paths, Dark Paths, app setup and execution, real versus simulated dependencies, user participation, evidence, risks and rollback. A small change uses 01-operational-brief.md with its own Aprobado:, Agent: and Scope:. The Coordinator replaces only Aprobado: after the user approves. Every delegation carries Plan: <path> and Scope: <globs> equal to or narrower than the plan.

After approval the plan is the execution contract: the Coordinator verifies each report and continues to the end-to-end path without asking for routine confirmation. It pauses only for a catastrophic or irreversible operation, data loss, critical security, a requirement conflict, or an invalidated plan. A feature is not closed until the agreed end-to-end path runs and every must-pass case has evidence. A blocked or unrun check is not a pass.

Specialists execute only their step and touch only files inside Scope. An unrequested improvement is a scope violation: report it, do not implement it. Read-only roles may write their own reports under the planning directory; their binding denies product edits. Known destructive operations (file deletion, database drops or truncation, volume or infrastructure destruction) require the user's explicit authorization, separate from the plan approval; shell writes remain a residual risk.

Roles

Role Primary question
Coordinator What is the smallest approved slice, which role owns it, and what evidence closes it?
Team Lead What is the shortest path to a verified delivery?
Architect What boundaries and trade-offs make this correct and evolvable?
Cybersecurity Engineer What can be attacked, and what evidence proves the control works?
QA Engineer How could this fail, and what proves it does not?
Frontend Engineer Is the interface accessible, fast, and maintainable?
Backend Engineer Are the API, data, and failure modes correct and secure?
Mobile Engineer Does it respect the device, store, and offline reality?
Desktop Windows Engineer Does it install, integrate, and update natively on Windows?
Desktop macOS Engineer Is it sandboxed, signed, and notarized correctly?
Desktop Linux Engineer Does it respect distributions, Wayland/X11, and packaging?
Multiplatform Engineer Is the core shared and the edge adapted per platform?
SRE Engineer Is it deployed, observable, and recoverable?

Role contracts live in core/roles/. The CLI installs them to .companion/roles/ and generates native bindings where the harness supports subagents. The canonical principles, process, workflow, quality gates, and guidelines are installed in .companion/core/. The generated rules and agent bindings reference these files.

Orchestration in OpenCode

devcomp init/update installs a coordinator primary agent and sets default_agent: coordinator in opencode.json. The coordinator can read, search, ask and write frames under plannification/ or .companion/local/; it cannot edit product code or run shell. The installed bindings send managed delegations through the runtime permission hook. The active plugin denies missing approval and allows the plan's named specialists without a prompt per invocation. Never treat a native prompt as plan approval: if one appears after approval, check the plugin, binding and explicit permission overrides. build remains available only as an explicit user escape hatch (--agent build or an agent switch).

The plugin at .opencode/plugins/devcomp/index.ts (with gates.mjs) searches upward for the nearest .companion/config.json and injects the five canonical files at runtime. It fixes the child repository case: OpenCode discovers the meta-repo config, bindings and plugins, but relative instructions do not resolve below the child project root. It also enforces:

  • Plan gate: a delegation needs Plan: <path> and Scope: <globs>; the plan must exist inside the workspace, be at least 200 characters, declare a top-level Scope:, include Test/Verification/Evidence content, and carry an affirmative Aprobado:. A plan with a development table requires Step: and a row whose Step and declared agent match; a table-less brief names its single specialist in Agent:. The delegation Scope: must be equal to or narrower than the plan.
  • Scope gate: edit, write, patch, apply_patch and multiedit must stay inside the recorded Scope of the child session. Read-only roles write only their report paths (.companion/local/**, plannification/**, docs/companion/**); they cannot rewrite the bound approved plan. Shell writes are a documented residual risk and the diff review is the other layer.
  • Session approval: include exactly one standalone Plan: <workspace-relative path> line in the Coordinator's approval request. A natural-language response approves that path and revision, not an arbitrary next delegation. Only the Aprobado: line may change afterward. A new path, material change or rejection requires fresh approval. Approval is session-local and lost on reload; do not use --auto for this workflow.
  • Destructive guard: known file-deletion, database-drop/truncation, volume and infrastructure patterns resolve to ask, even after an "always" approval. The message is generic and never prints secrets. Shell writes remain a residual risk and need the user's explicit authorization.

devcomp setup opencode --global installs the same adapter under ~/.config/opencode/plugins/devcomp/; with --force it backs up and removes the legacy single-file devcomp.ts adapter. A global adapter no-ops when the project has its own copy, and doctor fails if a legacy global file coexists with it. A direct specialist session (--agent backend-engineer) has no parent delegation and is not scope-gated; it is an explicit escape hatch, like build. In OpenCode v2.3.2 the execute catalog does not expose subagent, so nested delegation is not available; re-test on upgrades.

The Coordinator leads an operational conversation (scope and observable acceptance) and a technical conversation (choices, trade-offs, golden and dark paths). It presents the plan and asks for approval in natural language. Specialists return findings, evidence and a scope confirmation. Local notes capture approvals and handoffs; Engram retains verified durable knowledge when enabled and available. See core/guidelines/coordination.md.

Agent modes

Mode Primary agent Use
Coordinated coordinator Default for every project; the coordinator frames, asks, delegates and verifies.
Explicit escape hatch build A routine change the user chooses to run directly; not the default and not a coordinator shortcut.

Migrating an existing install:

  1. Run devcomp update <project> --dry-run to see what would be installed or backed up and replaced without changing the repository. Resolve any pending AGENTS.md merge or invalid OpenCode configuration before retrying.
  2. Run devcomp update <project> (without --keep). It refreshes managed content, including OpenCode bindings, the runtime plugin (index.ts + gates.mjs) and config. Project rules outside the managed block and unknown OpenCode config keys are preserved. The command prints the unique backup directory under .companion/local/update-backups/ for any replacements. Review those files and the project diff before using the install.
  3. Run devcomp setup opencode --global once per machine; if a legacy single-file adapter is present, rerun with --force so it is backed up to devcomp.ts.bak and removed before the gated adapter is installed. The plugin no-ops in workspaces without .companion/config.json.
  4. Start a new OpenCode session; an existing session keeps its previous agent. doctor verifies the static setup; real behavior is verified in the new session.
  5. Re-present any pending plan using the new format, including Agent: in a short brief. Approve once and check that two named specialists edit inside their scopes without per-subagent prompts. Then try a delegation without Plan: and an edit outside Scope; both must be rejected. Try a destructive command and check that a known destructive pattern asks even after an "always" approval; shell writes still need an explicit authorization.

devcomp update replaces framework-owned content by default. Use --keep only for a manual merge; it preserves bindings and the OpenCode config but also preserves stale behavior. Do not use a blanket update as a shortcut around reviewing local customizations.

To recover a customization, locate its original relative path inside the printed backup and merge it into the current file, or restore a local-only file that was removed from a managed skill. To roll back the update, restore replaced paths from that backup and review newly installed paths separately using the preview or Git diff. Keep backups private. The updater does not read or back up .env files and stops if one is inside a directory it would replace.

The runtime is the enforcement layer: prompts, scopes and permissions are installed by the CLI, and the plugin makes the flow observable. A session can still opt out explicitly with build; that is a user decision, not a silent fallback.

Skills and profiles

Process skills are installed always:

project-discovery, architecture-design, test-strategy, ux-design, delivery-orchestration, security-review, deployment-sre, development-workflow, incremental-delivery, code-review.

Domain skills are installed by profile:

Profile Skills
web frontend, backend
backend backend
mobile mobile, frontend
desktop desktop + Windows/macOS/Linux
cross-platform multiplatform, desktop, frontend
full all domain skills

Every skill is self-contained and follows the Agent Skills specification.

For UI design the agent offers local HTML/SVG, an existing Figma MCP, or FigCraft CLI if available. The CLI does not install third-party tools or handle Figma tokens. The ux-design skill explains how to find the official FigCraft CLI download, create editable files and exercise a clickable prototype in Play before approving the design.

Harness support

Tier Harnesses Commitment
1 OpenCode, Claude Code, Codex, Pi Installation targets; behavioral validation required per release
2 Cursor, Gemini CLI, Copilot CLI, Windsurf, Cline Best-effort, generated
3 Any harness that reads AGENTS.md or accepts a prompt pack Generic fallback

Adapters are data: rules file, skills directory, agent directory, and limitations. Installation checks do not prove that a model followed the workflow. Claude Code and Codex provide specialist bindings but do not automatically start in a team-lead role; invoke it explicitly when orchestration is needed. Pi has no native subagents and must run the role workflow in one session or through a user-supplied extension. Validate real agent behavior in each harness before claiming process compliance.

Local design documents

By default, discovery, architecture, test plans, evidence, and reports live in .companion/local/, which is ignored by git. The manifest, installed core documents, roles, and skills can be tracked; the design notes remain local unless opted in.

If you want the design to travel with the repository:

npx development-companion init . --docs tracked

That moves the artifacts to docs/companion/.

This configured path overrides default .companion/local/ examples in role and skill files.

Memory: Engram (optional)

The process works without memory. If Engram is available, it stores decisions, findings, and session summaries between sessions. devcomp doctor detects it and prints the setup steps for your harness. The files remain the source of truth.

Security rules built in

  • Never read .env values. Only key names and presence checks.
  • Evidence per finding: file and snippet, command and output, request, CVE, or screenshot.
  • No secrets in the repository, logs, screenshots, or reports.
  • Least privilege for subagents; read-only reviewers where the harness allows it.
  • Scope lock on implementation subagents; out-of-scope findings are reported, not shipped.
  • Explicit authorization for destructive operations, separate from the plan approval; the runtime forces the prompt for known patterns even after an "always" approval, and shell writes remain a residual risk.
  • UI reviewed with screenshots at desktop and mobile widths, using a vision-capable model.

Scaffold

devcomp scaffold generates a TypeScript reference monorepo:

  • apps/web: React + Vite;
  • apps/api: Node + Fastify;
  • packages/domain, application, contracts;
  • PostgreSQL in Docker;
  • Vitest and Playwright;
  • a runnable walking skeleton, not business logic.

The domain has no framework or infrastructure imports. Ports and adapters keep the implementation replaceable.

Develop this package

npm test
npm run pack:check
node bin/devcomp.mjs --help

Requirements: Node >= 22. No runtime dependencies, no postinstall, no telemetry.

End-to-end framework test

The expense tracker is a repeatable E2E fixture for the framework itself:

DC_E2E_ITERATION=01 node scripts/e2e-expense.mjs

It deletes ~/repos/dc-e2e-expense, installs the published package with npx, runs init, doctor, and scaffold, copies the expense app, and runs unit, API, component, and Playwright tests. Screenshots, command logs, process artifacts, and report.md are written to plannification/validation/e2e-expense/<iteration>/ (gitignored). The workdir stays for inspection; the next run deletes it.

This exercises installation and a prebuilt app fixture; it does not launch a coding agent or prove it followed instructions. Behavioral validation requires separate agent sessions.

Repository layout

bin/            CLI entrypoint
src/            CLI implementation
core/           principles, process, quality gates, roles, guidelines
skills/         Agent Skills
templates/      rules and artifact templates
adapters/       harness metadata and guides
test/           CLI tests

License

MIT. See LICENSE.