feat(opencode): add JSON-only integration and compact AGENTS.md generator (#570)
* feat: add OpenCode integration implementation plan for BMAD-METHOD * installer(opencode): add OpenCode target metadata in install.config.yaml * chore(deps): add comment-json for JSONC parsing in OpenCode integration * feat(installer/opencode): implement setupOpenCode with minimal instructions merge and BMAD-managed agents/commands * feat(installer): add OpenCode (SST) to IDE selector and CLI --ide help * fix(opencode): align generated opencode.json(c) with schema (instructions as strings; agent.prompt; command.template; remove unsupported fields) * feat(installer): enhance OpenCode setup with agent selection and prefix options * fix: update configuration file references from `bmad-core/core-config.yaml` to `.bmad-core/core-config.yaml` across multiple agent and task files for consistency and clarity. * refactor: streamline OpenCode configuration prompts and normalize instruction paths for agents and tasks * feat: add tools property to agent definitions for enhanced functionality. Otherwise opencode consders the subagents as readonly * feat: add extraction of 'whenToUse' from agents markdown files for improved agent configuration in opencode * feat: enhance task purpose extraction from markdown files with improved parsing and cleanup logic * feat: add collision warnings for non-BMAD-managed agent and command keys during setup * feat: generate and update AGENTS.md for OpenCode integration with agent and task details * feat: add compact AGENTS.md generator and JSON-only integration for OpenCode * chore(docs): remove completed OpenCode integration implementation plans * feat: enable default prefixes for agent and command keys to avoid collisions * fix: remove unnecessary line breaks in 'whenToUse' descriptions for QA agents to mathc the rest of the agents definitions and improve programatic parsing of whenToUse prop * fix: update OpenCode references to remove 'SST' for consistency across documentation and configuration * fix: update agent mode from 'subagent' to 'all' for consistency in agent definitions * fix: consolidate 'whenToUse' description format for clarity and consistent parsing
This commit is contained in:
40
PR-opencode-agents-generator.md
Normal file
40
PR-opencode-agents-generator.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# feat(opencode): compact AGENTS.md generator and JSON-only integration
|
||||
|
||||
## What
|
||||
|
||||
Add JSON-only OpenCode integration and a compact AGENTS.md generator (no large embeds; clickable file links) with idempotent merges for BMAD instructions, agents, and commands.
|
||||
|
||||
## Why
|
||||
|
||||
Keep OpenCode config schema‑compliant and small, avoid key collisions, and provide a readable agents/tasks index without inflating AGENTS.md.
|
||||
|
||||
## How
|
||||
|
||||
- Ensure `.bmad-core/core-config.yaml` in `instructions`
|
||||
- Merge only selected packages’ agents/commands into opencode.json file
|
||||
- Orchestrators `mode: primary`; all agents enable `write`, `edit`, `bash`
|
||||
- Descriptions from `whenToUse`/task `Purpose` with sanitization + fallbacks
|
||||
- Explicit warnings for non‑BMAD collisions; AGENTS.md uses a strict 3‑column table with links
|
||||
|
||||
## Testing
|
||||
|
||||
- Run: `npx bmad-method install -f -i opencode`
|
||||
- Verify: `opencode.json[c]` updated/created as expected, `AGENTS.md` OpenCode section is compact with links
|
||||
- Pre‑push checks:
|
||||
|
||||
```bash
|
||||
npm run pre-release
|
||||
# or individually
|
||||
npm run validate
|
||||
npm run format:check
|
||||
npm run lint
|
||||
# if anything fails
|
||||
npm run fix
|
||||
# or
|
||||
npm run format
|
||||
npm run lint:fix
|
||||
```
|
||||
|
||||
Fixes #<issue-number>
|
||||
|
||||
Targets: `next` branch
|
||||
Reference in New Issue
Block a user