Conversation
Add 'opencode' as a new CodingAgent type with corresponding RenderMode, artefact paths (.opencode/commands/, .opencode/skills/), and render mode order before AGENTS_MD so that when both are enabled, AGENTS.md output supersedes OpenCode's via last-write-wins merge. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…file rendering Implement OpenCodeDeployer extending SingleFileDeployer: - Standards rendered as sections in AGENTS.md (single-file) - Commands rendered as individual files in .opencode/commands/ (content as-is) - Skills rendered as multi-file directories in .opencode/skills/ Register deployer in CodingAgentDeployerRegistry and add AGENTS.md path to AgentConfiguration. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ection - Detect OpenCode when .opencode/ directory exists - Add OpenCode to selectable agents list with display name 'OpenCode' Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add OpenCode as a selectable agent in the organization distribution settings with display name 'OpenCode', defaulting to unchecked. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…and UI labels - Export OpenCodeDeployer from coding-agent package index - Add opencode → AGENTS.md mapping in GitFileUtils - Add 'OpenCode' label to DeploymentsHistory and RunDistributionBody Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e agent - Integration tests covering recipe (commands as-is) and standards (AGENTS.md sections) - Update manage-ai-agents.mdx with OpenCode entry - Update artifact-rendering.mdx with OpenCode standards, commands, and skills locations Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Recipes index in AGENTS.md is no longer supported. Remove the code that cleared the 'Packmind recipes' section from OpenCodeDeployer.deployRecipes() and generateFileUpdatesForRecipes(), and update tests accordingly. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Remove stripFrontmatter() before diffing so changes to frontmatter fields (description, agent, model, subtask) are detected by playbook diff. This applies to all agent command formats — files without frontmatter are unaffected; files with frontmatter (OpenCode, Claude Code, GitHub Copilot) now correctly surface metadata-only changes. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ode and agents_md are active Add an explicit guard in DeployerService that filters out OpenCode's AGENTS.md write when agents_md is also in the active agents list (Rule 9). Previously the correct behavior only happened as a side effect of RENDER_MODE_ORDER iteration order. Add tests for the dual-active scenario in both aggregateStandardsDeployments and aggregateArtifactRendering. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…test descriptions Add integration test asserting OpenCode skill deployment produces .opencode/skills/<slug>/SKILL.md at the correct path. Also remove rule number references from DeployerService test descriptions. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ff tests - Fix wrong SELECTABLE_AGENTS index comment in configAgentsHandler.spec.ts - Add OpenCode command fixture with all 4 valid frontmatter fields (description, agent, model, subtask) in OpenCodeDeployer.spec.ts - Update DiffArtefactsUseCase tests to reflect full content diff behavior: frontmatter-only changes are now correctly detected Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
OpenCode writes standards to AGENTS.md (single-file), so it cannot parse standards individually — returns null like gitlab_duo. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…t spec Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Greptile SummaryThis PR adds OpenCode as a supported AI coding agent, wiring it end-to-end through the type system, deployer pipeline, CLI, and frontend settings UI. Standards are rendered into Confidence Score: 5/5Safe to merge — no functional defects found; all remaining feedback is style/cleanup. All logic paths for the new agent (standards, commands, skills, removal, cleanup, dual-active suppression) are covered by unit and integration tests. The one comment is a P2 code-duplication style suggestion that does not affect correctness. packages/coding-agent/src/infra/repositories/opencode/OpenCodeDeployer.ts — minor loop duplication between deployArtifacts and generateFileUpdatesForRecipes Important Files Changed
Sequence DiagramsequenceDiagram
participant DS as DeployerService
participant OCD as OpenCodeDeployer
participant SFD as SingleFileDeployer (super)
participant Git as GitPort
DS->>OCD: deployStandards(standards, gitRepo, target)
OCD->>SFD: deployStandards(standards, gitRepo, target)
SFD-->>OCD: {createOrUpdate:[{path:AGENTS.md, sections:[...]}]}
OCD-->>DS: FileUpdates (AGENTS.md sections)
DS->>OCD: deployArtifacts(recipes, standards, skills)
OCD->>SFD: deployArtifacts(recipes, standards)
SFD-->>OCD: {createOrUpdate:[{path:AGENTS.md, sections:[clear-recipes, standards]}]}
OCD->>OCD: build commandFileUpdates (.opencode/commands/*.md)
OCD->>SFD: generateFileUpdatesForSkills(skills)
SFD-->>OCD: {createOrUpdate:[{path:.opencode/skills/*/SKILL.md}]}
OCD-->>DS: merged FileUpdates (AGENTS.md + commands + skills)
Note over DS: Rule 9: if agents_md also active…
DS->>DS: suppressOpenCodeAgentsMdIfAgentsMdActive()
Note over DS: filter AGENTS.md from opencode updates
Reviews (4): Last reviewed commit: "💄 refactor(ui): sort agent lists alphab..." | Re-trigger Greptile |
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
…istingFilesFromGit Both opencode and agents_md map to AGENTS.md, causing a redundant fetch where the second overwrites the first in the map. Deduplicate by file path before the loop to avoid the unnecessary git call and remove the implicit dependency on fetch order. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@greptile update your review |
Applies to both the frontend Distribution Rendering settings and the CLI config agents selection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>



Summary
Add OpenCode as a supported AI coding agent in Packmind, enabling standards, commands, and skills deployment for OpenCode users.
AGENTS.md(shared withagents_md, with explicit supersedence rule).opencode/commands/.opencode/skills/Type of Change
Affected Components
types,coding-agent,deploymentsChanges
opencodetoCodingAgent,MultiFileCodingAgent, selectable agents, and artefact path mappingsOpenCodeDeployer— hybrid single-file/multi-file deployer: standards inAGENTS.md, commands and skills in.opencode/directoriesDeployerService,GitFileUtils, and rendering exportsparseStandardMd, anddiffcommandsopencodeandagents_mdare active,agents_mdownsAGENTS.md; OpenCode writes are filtered outAGENTS.md;fetchExistingFilesFromGitnow deduplicates by file path before fetchingCommandDiffStrategy— compare full file content instead of stripping frontmatter, so OpenCode field changes are visible toplaybook diffTesting
Test Details:
OpenCodeDeployer.spec.ts— standards, commands, skills rendering with frontmatterDeployerService.spec.ts— dual-active scenario (opencode + agents_md) for both standards and artifactsopencode-deployment.spec.ts— integration test for skill deploymentCommandDiffStrategy.spec.ts— body diff, frontmatter-only diff, no-frontmatter file, missing local fileTODO List