chore: remove development files from tracking
Remove development-specific files and directories from git tracking: - .vscode/settings.json (IDE config) - claudedocs/ (development documentation) - scripts/ (development scripts) - v6-open-items.md (development notes) - OPENCODE_INTEGRATION_SUMMARY.md (development summary) These files are now gitignored to prevent accidental commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
30e7e99c6a
commit
c2c23454c1
|
|
@ -32,6 +32,7 @@ Thumbs.db
|
||||||
.windsurf/
|
.windsurf/
|
||||||
.trae/
|
.trae/
|
||||||
.bmad*/.cursor/
|
.bmad*/.cursor/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# AI assistant files
|
# AI assistant files
|
||||||
CLAUDE.md
|
CLAUDE.md
|
||||||
|
|
@ -55,6 +56,10 @@ sample-project/*
|
||||||
flattened-codebase.xml
|
flattened-codebase.xml
|
||||||
*.stats.md
|
*.stats.md
|
||||||
.internal-docs/
|
.internal-docs/
|
||||||
|
claudedocs/
|
||||||
|
scripts/
|
||||||
|
v6-open-items.md
|
||||||
|
OPENCODE_INTEGRATION_SUMMARY.md
|
||||||
#UAT template testing output files
|
#UAT template testing output files
|
||||||
tools/template-test-generator/test-scenarios/
|
tools/template-test-generator/test-scenarios/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
{
|
|
||||||
"chat.agent.enabled": true,
|
|
||||||
"chat.agent.maxRequests": 15,
|
|
||||||
"github.copilot.chat.agent.runTasks": true,
|
|
||||||
"chat.mcp.discovery.enabled": {
|
|
||||||
"claude-desktop": true,
|
|
||||||
"windsurf": true,
|
|
||||||
"cursor-global": true,
|
|
||||||
"cursor-workspace": true
|
|
||||||
},
|
|
||||||
"github.copilot.chat.agent.autoFix": true,
|
|
||||||
"chat.tools.autoApprove": false,
|
|
||||||
"cSpell.words": [
|
|
||||||
"Agentic",
|
|
||||||
"atlasing",
|
|
||||||
"Biostatistician",
|
|
||||||
"bmad",
|
|
||||||
"Cordova",
|
|
||||||
"customresourcedefinitions",
|
|
||||||
"dashboarded",
|
|
||||||
"Decisioning",
|
|
||||||
"eksctl",
|
|
||||||
"elicitations",
|
|
||||||
"filecomplete",
|
|
||||||
"fintech",
|
|
||||||
"fluxcd",
|
|
||||||
"frontmatter",
|
|
||||||
"gamedev",
|
|
||||||
"gitops",
|
|
||||||
"implementability",
|
|
||||||
"Improv",
|
|
||||||
"inclusivity",
|
|
||||||
"ingressgateway",
|
|
||||||
"istioctl",
|
|
||||||
"metroidvania",
|
|
||||||
"NACLs",
|
|
||||||
"nodegroup",
|
|
||||||
"platformconfigs",
|
|
||||||
"Playfocus",
|
|
||||||
"playtesting",
|
|
||||||
"pointerdown",
|
|
||||||
"pointerup",
|
|
||||||
"Polyrepo",
|
|
||||||
"replayability",
|
|
||||||
"roguelike",
|
|
||||||
"roomodes",
|
|
||||||
"Runbook",
|
|
||||||
"runbooks",
|
|
||||||
"Shardable",
|
|
||||||
"Softlock",
|
|
||||||
"solutioning",
|
|
||||||
"speedrunner",
|
|
||||||
"substep",
|
|
||||||
"tekton",
|
|
||||||
"tilemap",
|
|
||||||
"tileset",
|
|
||||||
"tmpl",
|
|
||||||
"Trae",
|
|
||||||
"VNET"
|
|
||||||
],
|
|
||||||
"json.schemas": [
|
|
||||||
{
|
|
||||||
"fileMatch": ["package.json"],
|
|
||||||
"url": "https://json.schemastore.org/package.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fileMatch": [".vscode/settings.json"],
|
|
||||||
"url": "vscode://schemas/settings/folder"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
||||||
"[javascript]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[json]": {
|
|
||||||
"editor.defaultFormatter": "vscode.json-language-features"
|
|
||||||
},
|
|
||||||
"[yaml]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[markdown]": {
|
|
||||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
|
||||||
},
|
|
||||||
"yaml.format.enable": false,
|
|
||||||
"editor.codeActionsOnSave": {
|
|
||||||
"source.fixAll.eslint": "explicit"
|
|
||||||
},
|
|
||||||
"editor.rulers": [140],
|
|
||||||
"[xml]": {
|
|
||||||
"editor.defaultFormatter": "redhat.vscode-xml"
|
|
||||||
},
|
|
||||||
"xml.format.maxLineWidth": 140
|
|
||||||
}
|
|
||||||
|
|
@ -1,267 +0,0 @@
|
||||||
# OpenCode Integration for BMAD Method V6-alpha
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
Successfully implemented OpenCode integration for BMAD Method V6 following the V6 installer architecture patterns.
|
|
||||||
|
|
||||||
## ⚠️ IMPORTANT: Fork-Only Feature
|
|
||||||
|
|
||||||
**This OpenCode integration is a fork-specific feature and is NOT included in the published npm package.**
|
|
||||||
|
|
||||||
### Using OpenCode (Local Development Only)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# ✅ CORRECT - Use local development version
|
|
||||||
node tools/cli/bmad-cli.js install
|
|
||||||
# or
|
|
||||||
npm run dev:install
|
|
||||||
|
|
||||||
# ❌ WRONG - Downloads published version WITHOUT OpenCode
|
|
||||||
npx bmad-method install
|
|
||||||
```
|
|
||||||
|
|
||||||
**See `docs/V6_LOCAL_DEVELOPMENT.md` for complete instructions on using the local development version.**
|
|
||||||
|
|
||||||
## What Was Done
|
|
||||||
|
|
||||||
### 1. Added Missing Dependency
|
|
||||||
|
|
||||||
**File**: `package.json`
|
|
||||||
|
|
||||||
- Added `comment-json: ^4.2.5` to dependencies
|
|
||||||
- Required for parsing JSONC files with comments
|
|
||||||
|
|
||||||
### 2. Implemented OpenCode Installer
|
|
||||||
|
|
||||||
**File**: `tools/cli/installers/lib/ide/opencode.js`
|
|
||||||
**Lines**: 590 lines of code
|
|
||||||
|
|
||||||
Implemented full-featured OpenCode installer with:
|
|
||||||
|
|
||||||
#### Core Features
|
|
||||||
|
|
||||||
- ✅ Detects existing `opencode.json` or `opencode.jsonc` files
|
|
||||||
- ✅ Creates minimal configuration if none exists
|
|
||||||
- ✅ Idempotent merges - safe to run multiple times
|
|
||||||
- ✅ Agent injection with file references: `{file:./.bmad-core/agents/<id>.md}`
|
|
||||||
- ✅ Command/task injection with file references
|
|
||||||
- ✅ Collision detection and warnings
|
|
||||||
- ✅ Expansion pack support with auto-discovery
|
|
||||||
|
|
||||||
#### Configuration Options
|
|
||||||
|
|
||||||
- ✅ Optional agent prefix: `bmad-` (e.g., `bmad-dev` instead of `dev`)
|
|
||||||
- ✅ Optional command prefix: `bmad:tasks:` (e.g., `bmad:tasks:create-doc`)
|
|
||||||
- ✅ Forced prefixes for expansion pack agents/commands
|
|
||||||
|
|
||||||
#### Documentation Generation
|
|
||||||
|
|
||||||
- ✅ Generates/updates `AGENTS.md` for system prompt memory
|
|
||||||
- ✅ Includes agent directory table with whenToUse descriptions
|
|
||||||
- ✅ Lists available tasks with source file links
|
|
||||||
- ✅ Provides usage instructions
|
|
||||||
|
|
||||||
#### Metadata Extraction
|
|
||||||
|
|
||||||
- ✅ Extracts `whenToUse` from agent YAML blocks
|
|
||||||
- ✅ Extracts `Purpose` from task files
|
|
||||||
- ✅ Cleans and summarizes descriptions for readability
|
|
||||||
|
|
||||||
### 3. Architecture Compliance
|
|
||||||
|
|
||||||
The implementation follows V6 patterns by:
|
|
||||||
|
|
||||||
- ✅ Extending `BaseIdeSetup` class
|
|
||||||
- ✅ Implementing required methods: `setup()`, `detect()`, `cleanup()`
|
|
||||||
- ✅ Implementing optional `collectConfiguration()` for user preferences
|
|
||||||
- ✅ Using shared utilities from `bmad-artifacts.js`
|
|
||||||
- ✅ Auto-discovery by IDE manager (no manual registration needed)
|
|
||||||
- ✅ Supporting `selectedModules` filtering
|
|
||||||
- ✅ Handling `preCollectedConfig` for non-interactive mode
|
|
||||||
|
|
||||||
## How It Works
|
|
||||||
|
|
||||||
### Installation Flow
|
|
||||||
|
|
||||||
1. **Configuration Collection** (if interactive):
|
|
||||||
- Prompts user for prefix preferences
|
|
||||||
- Stores choices for later use
|
|
||||||
|
|
||||||
2. **Setup Execution**:
|
|
||||||
- Detects or creates `opencode.json`/`opencode.jsonc`
|
|
||||||
- Adds BMAD `core-config.yaml` to `instructions` array
|
|
||||||
- Adds expansion pack configs to `instructions`
|
|
||||||
- Iterates through agents and creates entries:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"agent": {
|
|
||||||
"bmad-dev": {
|
|
||||||
"prompt": "{file:./.bmad-core/agents/dev.md}",
|
|
||||||
"mode": "all",
|
|
||||||
"tools": { "write": true, "edit": true, "bash": true },
|
|
||||||
"description": "Code implementation, debugging, refactoring..."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
- Iterates through tasks and creates command entries
|
|
||||||
- Generates/updates `AGENTS.md`
|
|
||||||
|
|
||||||
3. **Output**:
|
|
||||||
- Summary of agents/commands added/updated/skipped
|
|
||||||
- Created configuration file location
|
|
||||||
- AGENTS.md generation confirmation
|
|
||||||
|
|
||||||
### Example Output Structure
|
|
||||||
|
|
||||||
**opencode.jsonc**:
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
{
|
|
||||||
"$schema": "https://opencode.ai/config.json",
|
|
||||||
"instructions": [".bmad-core/core-config.yaml", ".bmad-core/modules/bmm/config.yaml"],
|
|
||||||
"agent": {
|
|
||||||
"bmad-dev": {
|
|
||||||
"prompt": "{file:./.bmad-core/agents/dev.md}",
|
|
||||||
"mode": "all",
|
|
||||||
"tools": { "write": true, "edit": true, "bash": true },
|
|
||||||
"description": "Code implementation, debugging, refactoring...",
|
|
||||||
},
|
|
||||||
"bmad-orchestrator": {
|
|
||||||
"prompt": "{file:./.bmad-core/agents/bmad-orchestrator.md}",
|
|
||||||
"mode": "primary",
|
|
||||||
"tools": { "write": true, "edit": true, "bash": true },
|
|
||||||
"description": "Workflow coordination, multi-agent tasks...",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"command": {
|
|
||||||
"bmad:tasks:create-doc": {
|
|
||||||
"template": "{file:./.bmad-core/tasks/create-doc.md}",
|
|
||||||
"description": "Generate comprehensive technical documentation",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**AGENTS.md** (excerpt):
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
<!-- BEGIN: BMAD-AGENTS-OPENCODE -->
|
|
||||||
|
|
||||||
# BMAD-METHOD Agents and Tasks (OpenCode)
|
|
||||||
|
|
||||||
## How To Use With OpenCode
|
|
||||||
|
|
||||||
- Run `opencode` in this project directory
|
|
||||||
- OpenCode will read your `opencode.json` or `opencode.jsonc` configuration
|
|
||||||
- Reference agents by their ID in your prompts (e.g., "As dev, implement...")
|
|
||||||
|
|
||||||
## Agents
|
|
||||||
|
|
||||||
| Title | ID | When To Use |
|
|
||||||
| ------------ | ----------------- | ---------------------------------------------- |
|
|
||||||
| Dev | dev | Code implementation, debugging, refactoring... |
|
|
||||||
| Orchestrator | bmad-orchestrator | Workflow coordination... |
|
|
||||||
|
|
||||||
<!-- END: BMAD-AGENTS-OPENCODE -->
|
|
||||||
```
|
|
||||||
|
|
||||||
## Key Design Decisions
|
|
||||||
|
|
||||||
### 1. File References vs. File Copying
|
|
||||||
|
|
||||||
Unlike most V6 IDEs that copy agent/task files to IDE-specific directories, OpenCode uses **file references**. This:
|
|
||||||
|
|
||||||
- Reduces duplication
|
|
||||||
- Ensures single source of truth
|
|
||||||
- Allows runtime updates without reinstallation
|
|
||||||
- Matches OpenCode's design philosophy
|
|
||||||
|
|
||||||
### 2. Prefix Strategy
|
|
||||||
|
|
||||||
- **Core agents/tasks**: Optional prefixes (user choice)
|
|
||||||
- **Expansion pack agents/tasks**: Forced prefixes to avoid collisions
|
|
||||||
- Pattern: `bmad-{module}-{name}` for agents, `bmad:{module}:{name}` for tasks
|
|
||||||
|
|
||||||
### 3. Mode Assignment
|
|
||||||
|
|
||||||
- Orchestrator agents (name contains "orchestrator"): `mode: "primary"`
|
|
||||||
- All other agents: `mode: "all"`
|
|
||||||
- Follows OpenCode's agent activation model
|
|
||||||
|
|
||||||
### 4. Collision Handling
|
|
||||||
|
|
||||||
- Detects existing entries by checking if they reference BMAD files
|
|
||||||
- Skips non-BMAD entries with warning
|
|
||||||
- Updates BMAD-managed entries safely
|
|
||||||
- Suggests enabling prefixes if collisions occur
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
The implementation has been:
|
|
||||||
|
|
||||||
- ✅ Structured following V6 architecture patterns
|
|
||||||
- ✅ Auto-discovered by IDE manager
|
|
||||||
- ✅ Dependency added and installed
|
|
||||||
- ⏳ End-to-end testing pending (requires full bmad installation)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Interactive (will prompt for prefix preferences)
|
|
||||||
npx bmad install -i opencode
|
|
||||||
|
|
||||||
# Programmatic (with pre-collected config)
|
|
||||||
npx bmad install -i opencode --config '{"useAgentPrefix":true,"useCommandPrefix":true}'
|
|
||||||
```
|
|
||||||
|
|
||||||
### Refresh After Updates
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad install -f -i opencode
|
|
||||||
```
|
|
||||||
|
|
||||||
### Cleanup
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad uninstall -i opencode
|
|
||||||
```
|
|
||||||
|
|
||||||
## Comparison: V4 vs V6 Implementation
|
|
||||||
|
|
||||||
| Aspect | V4 (tools/installer) | V6 (tools/cli) |
|
|
||||||
| ----------------- | ----------------------- | -------------------------------- |
|
|
||||||
| Architecture | Monolithic ide-setup.js | Modular per-IDE files |
|
|
||||||
| Discovery | Hardcoded switch cases | Auto-discovery via manager |
|
|
||||||
| Dependencies | Separate package.json | Shared root package.json |
|
|
||||||
| Agent discovery | Custom methods | Shared bmad-artifacts.js |
|
|
||||||
| Config collection | Inline prompts | Dedicated collectConfiguration() |
|
|
||||||
| Module support | Manual tracking | selectedModules parameter |
|
|
||||||
| Cleanup | Basic removal | Surgical BMAD-only removal |
|
|
||||||
|
|
||||||
## Files Changed
|
|
||||||
|
|
||||||
1. **package.json** - Added `comment-json` dependency
|
|
||||||
2. **package-lock.json** - Updated with new dependency
|
|
||||||
3. **tools/cli/installers/lib/ide/opencode.js** - NEW: Full implementation (590 lines)
|
|
||||||
4. **docs/opencode-integration.md** - NEW: User documentation
|
|
||||||
5. **docs/V6_INSTALLER_ARCHITECTURE.md** - NEW: Architecture reference (from exploration)
|
|
||||||
6. **docs/V6_INSTALLER_QUICK_REFERENCE.md** - NEW: Quick reference (from exploration)
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
1. **End-to-End Testing**: Test full installation flow with real project
|
|
||||||
2. **Documentation**: Update main README with OpenCode support
|
|
||||||
3. **CI/CD**: Add OpenCode to automated test matrix
|
|
||||||
4. **Examples**: Create sample `opencode.jsonc` configurations
|
|
||||||
5. **Migration Guide**: Document V4 → V6 OpenCode migration if needed
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- Implementation is **production-ready** and follows all V6 architectural patterns
|
|
||||||
- Auto-discovery ensures no manual registration needed
|
|
||||||
- Fully reversible via cleanup method
|
|
||||||
- Supports all V6 features: modules, expansion packs, selective installation
|
|
||||||
- Maintains compatibility with OpenCode's expected configuration format
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
# Critical Installer Modification Reference
|
|
||||||
|
|
||||||
**Date**: 2025-10-19
|
|
||||||
**File**: `tools/cli/installers/lib/core/installer.js`
|
|
||||||
**Lines**: 913-916
|
|
||||||
**Backup Branch**: backup-before-pull-20251019-021553
|
|
||||||
|
|
||||||
## Modification Code
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Skip workflow instructions.md files to preserve user customizations
|
|
||||||
if (file.includes('workflows/') && file.endsWith('instructions.md')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Insertion Point
|
|
||||||
|
|
||||||
This code MUST be inserted in the `copyDirectoryWithFiltering()` method, immediately after the config.yaml skip block:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Skip config.yaml templates - we'll generate clean ones with actual values
|
|
||||||
if (file === 'config.yaml' || file.endsWith('/config.yaml')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ← INSERT THE 4-LINE MODIFICATION HERE
|
|
||||||
|
|
||||||
const sourceFile = path.join(sourcePath, file);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
- Prevents workflow instructions.md files from being overwritten during updates
|
|
||||||
- Essential for teachflow module to be detected by ModuleManager.listAvailable()
|
|
||||||
- Without this, user customizations in workflow instructions are lost
|
|
||||||
|
|
||||||
## Verification Command
|
|
||||||
|
|
||||||
```bash
|
|
||||||
grep -A 2 "Skip workflow instructions" tools/cli/installers/lib/core/installer.js
|
|
||||||
```
|
|
||||||
|
|
||||||
Expected output:
|
|
||||||
|
|
||||||
```
|
|
||||||
// Skip workflow instructions.md files to preserve user customizations
|
|
||||||
if (file.includes('workflows/') && file.endsWith('instructions.md')) {
|
|
||||||
continue;
|
|
||||||
```
|
|
||||||
|
|
@ -1,380 +0,0 @@
|
||||||
# OpenCode Integration - Fork Modification Reference
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This document serves as the authoritative reference for preserving the OpenCode integration during upstream merges. OpenCode support is a **fork-specific feature** not present in the upstream BMAD-METHOD repository.
|
|
||||||
|
|
||||||
## ⚠️ CRITICAL: Fork-Only Feature
|
|
||||||
|
|
||||||
**OpenCode integration exists ONLY in this fork and will NEVER be published to npm.**
|
|
||||||
|
|
||||||
- The published npm package `bmad-method@6.0.0-alpha.0` does NOT include OpenCode
|
|
||||||
- Running `npx bmad-method install` will download the published version WITHOUT OpenCode
|
|
||||||
- You MUST use local development commands to access OpenCode functionality
|
|
||||||
|
|
||||||
**See**: `docs/V6_LOCAL_DEVELOPMENT.md` for complete local development instructions.
|
|
||||||
|
|
||||||
## Critical Information
|
|
||||||
|
|
||||||
- **Modification Type**: Additive (new files + dependency)
|
|
||||||
- **Risk Level**: Low-Medium (new files unlikely to conflict, dependency may need verification)
|
|
||||||
- **Recovery Method**: Restore from backup branch
|
|
||||||
- **Serena Memory**: `CRITICAL-opencode-fork-integration`
|
|
||||||
- **Development Requirement**: Must use local CLI execution (not npx)
|
|
||||||
|
|
||||||
## Files Affected
|
|
||||||
|
|
||||||
### 1. New Files (Additive)
|
|
||||||
|
|
||||||
#### `tools/cli/installers/lib/ide/opencode.js`
|
|
||||||
|
|
||||||
- **Lines**: 602 (entire file)
|
|
||||||
- **Purpose**: OpenCode IDE installer implementation
|
|
||||||
- **Status**: Must be present for OpenCode functionality
|
|
||||||
|
|
||||||
**Verification**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
test -f tools/cli/installers/lib/ide/opencode.js && echo "✅ Present" || echo "❌ MISSING"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout <backup-branch> -- tools/cli/installers/lib/ide/opencode.js
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `OPENCODE_INTEGRATION_SUMMARY.md`
|
|
||||||
|
|
||||||
- **Lines**: 231 (entire file)
|
|
||||||
- **Purpose**: Implementation documentation and architecture details
|
|
||||||
- **Status**: Documentation only (optional but recommended to preserve)
|
|
||||||
|
|
||||||
**Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout <backup-branch> -- OPENCODE_INTEGRATION_SUMMARY.md
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Modified Files
|
|
||||||
|
|
||||||
#### `package.json`
|
|
||||||
|
|
||||||
- **Modification**: Added `comment-json` dependency
|
|
||||||
- **Location**: `dependencies` section
|
|
||||||
- **Code**:
|
|
||||||
```json
|
|
||||||
"comment-json": "^4.2.5",
|
|
||||||
```
|
|
||||||
- **Purpose**: Required for parsing JSONC files with comments
|
|
||||||
|
|
||||||
**Verification**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
grep -q '"comment-json"' package.json && echo "✅ Present" || echo "❌ MISSING"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Manual Recovery** (if needed):
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
// ... other dependencies ...
|
|
||||||
"comment-json": "^4.2.5"
|
|
||||||
// ... more dependencies ...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Verification Checklist
|
|
||||||
|
|
||||||
Run these commands **after every upstream merge**:
|
|
||||||
|
|
||||||
### ✅ Quick Verification (30 seconds)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. File existence
|
|
||||||
test -f tools/cli/installers/lib/ide/opencode.js && echo "✅ opencode.js" || echo "❌ opencode.js MISSING"
|
|
||||||
|
|
||||||
# 2. Dependency check
|
|
||||||
grep -q '"comment-json"' package.json && echo "✅ comment-json" || echo "❌ comment-json MISSING"
|
|
||||||
```
|
|
||||||
|
|
||||||
### ✅ Thorough Verification (1 minute)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 3. Runtime IDE discovery check
|
|
||||||
node -e "
|
|
||||||
const {IdeManager} = require('./tools/cli/installers/lib/ide/manager');
|
|
||||||
const manager = new IdeManager();
|
|
||||||
const ides = manager.getAvailableIdes();
|
|
||||||
const opencode = ides.find(i => i.value === 'opencode');
|
|
||||||
if (opencode) {
|
|
||||||
console.log('✅ OpenCode discoverable:', opencode.name);
|
|
||||||
console.log(' Preferred:', opencode.preferred ? 'Yes' : 'No');
|
|
||||||
} else {
|
|
||||||
console.log('❌ OpenCode NOT in IDE list');
|
|
||||||
console.log('Available IDEs:', ides.map(i => i.value).join(', '));
|
|
||||||
}
|
|
||||||
"
|
|
||||||
|
|
||||||
# 4. Dependency installation check
|
|
||||||
npm list comment-json 2>/dev/null && echo "✅ comment-json installed" || echo "⚠️ Run: npm install"
|
|
||||||
```
|
|
||||||
|
|
||||||
### ✅ Full Integration Test (2 minutes)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 5. Test OpenCode installer can be instantiated
|
|
||||||
node -e "
|
|
||||||
const {OpenCodeSetup} = require('./tools/cli/installers/lib/ide/opencode');
|
|
||||||
const setup = new OpenCodeSetup();
|
|
||||||
console.log('✅ OpenCode installer instantiated');
|
|
||||||
console.log(' Name:', setup.name);
|
|
||||||
console.log(' Display Name:', setup.displayName);
|
|
||||||
"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Recovery Procedures
|
|
||||||
|
|
||||||
### Scenario 1: opencode.js Missing
|
|
||||||
|
|
||||||
**Symptoms**:
|
|
||||||
|
|
||||||
- File check fails
|
|
||||||
- IDE manager doesn't list OpenCode
|
|
||||||
- Error when trying to install with OpenCode
|
|
||||||
|
|
||||||
**Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Find latest backup branch
|
|
||||||
BACKUP=$(git branch -a | grep backup-before | tail -1 | xargs)
|
|
||||||
|
|
||||||
# 2. Restore the file
|
|
||||||
git checkout $BACKUP -- tools/cli/installers/lib/ide/opencode.js
|
|
||||||
|
|
||||||
# 3. Verify
|
|
||||||
test -f tools/cli/installers/lib/ide/opencode.js && echo "✅ Restored"
|
|
||||||
|
|
||||||
# 4. Stage and commit
|
|
||||||
git add tools/cli/installers/lib/ide/opencode.js
|
|
||||||
git commit -m "chore: restore OpenCode integration after upstream merge"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Scenario 2: comment-json Dependency Missing
|
|
||||||
|
|
||||||
**Symptoms**:
|
|
||||||
|
|
||||||
- OpenCode installer throws "Cannot find module 'comment-json'" error
|
|
||||||
- IDE manager shows warning about loading OpenCode
|
|
||||||
|
|
||||||
**Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Option A: Restore from backup
|
|
||||||
BACKUP=$(git branch -a | grep backup-before | tail -1 | xargs)
|
|
||||||
git checkout $BACKUP -- package.json
|
|
||||||
|
|
||||||
# Option B: Manual edit
|
|
||||||
# Add to package.json dependencies:
|
|
||||||
# "comment-json": "^4.2.5",
|
|
||||||
|
|
||||||
# Then install
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# Verify
|
|
||||||
npm list comment-json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Scenario 3: Both Files Missing (Complete Loss)
|
|
||||||
|
|
||||||
**Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Find backup branch
|
|
||||||
BACKUP=$(git branch -a | grep backup-before | tail -1 | xargs)
|
|
||||||
echo "Using backup: $BACKUP"
|
|
||||||
|
|
||||||
# 2. Restore all OpenCode files
|
|
||||||
git checkout $BACKUP -- \
|
|
||||||
tools/cli/installers/lib/ide/opencode.js \
|
|
||||||
OPENCODE_INTEGRATION_SUMMARY.md \
|
|
||||||
package.json
|
|
||||||
|
|
||||||
# 3. Install dependencies
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# 4. Verify everything
|
|
||||||
bash -c '
|
|
||||||
test -f tools/cli/installers/lib/ide/opencode.js && echo "✅ opencode.js" || echo "❌ Failed"
|
|
||||||
grep -q comment-json package.json && echo "✅ dependency" || echo "❌ Failed"
|
|
||||||
npm list comment-json >/dev/null 2>&1 && echo "✅ installed" || echo "❌ Failed"
|
|
||||||
'
|
|
||||||
|
|
||||||
# 5. Stage and commit
|
|
||||||
git add tools/cli/installers/lib/ide/opencode.js OPENCODE_INTEGRATION_SUMMARY.md package.json package-lock.json
|
|
||||||
git commit -m "chore: restore complete OpenCode integration after upstream merge
|
|
||||||
|
|
||||||
- Restored tools/cli/installers/lib/ide/opencode.js
|
|
||||||
- Restored comment-json dependency
|
|
||||||
- Restored documentation
|
|
||||||
|
|
||||||
Fork-specific feature not present in upstream."
|
|
||||||
```
|
|
||||||
|
|
||||||
## Integration with Merge Workflow
|
|
||||||
|
|
||||||
### Pre-Merge Checklist
|
|
||||||
|
|
||||||
Before merging upstream changes:
|
|
||||||
|
|
||||||
1. ✅ Run quick verification to confirm OpenCode is present
|
|
||||||
2. ✅ Verify backup branch will be created
|
|
||||||
3. ✅ Note current commit hash for reference
|
|
||||||
|
|
||||||
### Post-Merge Checklist
|
|
||||||
|
|
||||||
After merging upstream changes:
|
|
||||||
|
|
||||||
1. ✅ Run quick verification
|
|
||||||
2. ✅ If any checks fail, run recovery procedures
|
|
||||||
3. ✅ Run thorough verification
|
|
||||||
4. ✅ Test basic functionality (optional)
|
|
||||||
|
|
||||||
### Testing OpenCode After Merge
|
|
||||||
|
|
||||||
**CRITICAL**: Do NOT use `npx bmad-method` to test - it downloads the published version!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# ✅ CORRECT - Test with local version
|
|
||||||
cd /path/to/test/project
|
|
||||||
node /path/to/BMAD-METHOD/tools/cli/bmad-cli.js install
|
|
||||||
|
|
||||||
# Or use npm script from BMAD-METHOD directory
|
|
||||||
npm run dev:install
|
|
||||||
|
|
||||||
# Verify OpenCode appears in IDE selection menu
|
|
||||||
# Verify opencode.json/opencode.jsonc is created correctly
|
|
||||||
```
|
|
||||||
|
|
||||||
**See**: `docs/V6_LOCAL_DEVELOPMENT.md` for complete testing guide. 5. ✅ Update Serena memory with merge date
|
|
||||||
|
|
||||||
### Workflow Integration
|
|
||||||
|
|
||||||
The `bmad/workflows/merge-upstream/` workflow includes OpenCode checks:
|
|
||||||
|
|
||||||
**Step 7.5** (added to existing workflow):
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: 'Verify OpenCode Integration'
|
|
||||||
action: 'Run OpenCode verification commands'
|
|
||||||
verification:
|
|
||||||
- 'File existence check'
|
|
||||||
- 'Dependency check'
|
|
||||||
- 'IDE manager discovery check'
|
|
||||||
on_failure:
|
|
||||||
- 'Alert about missing OpenCode integration'
|
|
||||||
- 'Provide recovery instructions'
|
|
||||||
- 'Link to this reference document'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Architecture Details
|
|
||||||
|
|
||||||
### How OpenCode Integration Works
|
|
||||||
|
|
||||||
1. **Auto-Discovery**: IDE manager scans `tools/cli/installers/lib/ide/` for `.js` files
|
|
||||||
2. **Class Instantiation**: Each file exports a class extending `BaseIdeSetup`
|
|
||||||
3. **Registration**: Manager calls constructor which sets `this.name = 'opencode'`
|
|
||||||
4. **Availability**: OpenCode appears in IDE selection list
|
|
||||||
|
|
||||||
### Why It's Low-Risk
|
|
||||||
|
|
||||||
- **New file**: Doesn't modify existing upstream code
|
|
||||||
- **Self-contained**: All logic in one file
|
|
||||||
- **Auto-discovery**: No manual registration needed
|
|
||||||
- **Dependency**: Only one new dependency, isolated in package.json
|
|
||||||
|
|
||||||
### Potential Conflicts
|
|
||||||
|
|
||||||
⚠️ **Unlikely but possible**:
|
|
||||||
|
|
||||||
1. **Upstream adds OpenCode**: Compare implementations, merge if needed
|
|
||||||
2. **package.json conflicts**: Manually preserve `comment-json` entry
|
|
||||||
3. **IDE manager changes**: Verify auto-discovery still works
|
|
||||||
|
|
||||||
## Testing Commands
|
|
||||||
|
|
||||||
### Quick Functionality Test
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Create a test project and verify OpenCode can be selected
|
|
||||||
mkdir -p /tmp/opencode-test
|
|
||||||
cd /tmp/opencode-test
|
|
||||||
npm init -y
|
|
||||||
|
|
||||||
# Note: Full interactive install test would require user input
|
|
||||||
# So we just verify the installer can be loaded
|
|
||||||
node -e "
|
|
||||||
const {OpenCodeSetup} = require('$PWD/tools/cli/installers/lib/ide/opencode');
|
|
||||||
const setup = new OpenCodeSetup();
|
|
||||||
console.log('✅ OpenCode installer loads successfully');
|
|
||||||
console.log('Name:', setup.name);
|
|
||||||
"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Maintenance Notes
|
|
||||||
|
|
||||||
### When to Update This Document
|
|
||||||
|
|
||||||
- After any changes to OpenCode implementation
|
|
||||||
- After successful upstream merges (update "Last Verified" in Serena memory)
|
|
||||||
- If recovery procedures change
|
|
||||||
- If new verification methods are discovered
|
|
||||||
|
|
||||||
### Version History
|
|
||||||
|
|
||||||
- **2025-10-20**: Initial creation with OpenCode integration
|
|
||||||
- **Commit**: b3975f6
|
|
||||||
|
|
||||||
## Quick Reference Card
|
|
||||||
|
|
||||||
**Files to Watch**:
|
|
||||||
|
|
||||||
- ✅ `tools/cli/installers/lib/ide/opencode.js` (must exist)
|
|
||||||
- ✅ `"comment-json": "^4.2.5"` in package.json
|
|
||||||
|
|
||||||
**Quick Check**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
test -f tools/cli/installers/lib/ide/opencode.js && \
|
|
||||||
grep -q comment-json package.json && \
|
|
||||||
echo "✅ All good" || echo "❌ Needs recovery"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Quick Recovery**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
BACKUP=$(git branch -a | grep backup-before | tail -1 | xargs)
|
|
||||||
git checkout $BACKUP -- tools/cli/installers/lib/ide/opencode.js package.json
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Related Documentation
|
|
||||||
|
|
||||||
- **Serena Memory**: `.serena/memories/CRITICAL-opencode-fork-integration.md`
|
|
||||||
- **Implementation Details**: `OPENCODE_INTEGRATION_SUMMARY.md`
|
|
||||||
- **Merge Workflow**: `bmad/workflows/merge-upstream/instructions.md`
|
|
||||||
- **User Documentation**: `docs/opencode-integration.md` (if exists)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Last Updated**: 2025-10-20
|
|
||||||
**Maintained By**: Fork maintainers
|
|
||||||
**Upstream Status**: Not present in upstream BMAD-METHOD
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# BMAD Method Install Script
|
|
||||||
# Changes to the BMAD-METHOD directory and runs the install command
|
|
||||||
|
|
||||||
BMAD_DIR="/home/sallvain/dev/tools/BMAD-METHOD"
|
|
||||||
|
|
||||||
cd "$BMAD_DIR" || {
|
|
||||||
echo "Error: Could not change to directory $BMAD_DIR"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Pulling latest changes..."
|
|
||||||
git pull || {
|
|
||||||
echo "Warning: Git pull failed, continuing with install anyway..."
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Running BMAD install from $BMAD_DIR..."
|
|
||||||
npm run install:bmad
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
# v6 Pending Items
|
|
||||||
|
|
||||||
## Needed before Alpha → Beta
|
|
||||||
|
|
||||||
Aside from stability and bug fixes found during the alpha period - the main focus will be on the following:
|
|
||||||
|
|
||||||
- NPX installer
|
|
||||||
- github pipelines, branch protection, vulnerability scanners
|
|
||||||
- subagent injections reenabled
|
|
||||||
- Solutioning Architecture
|
|
||||||
- is not asking for advanced elicitation
|
|
||||||
- the order of the document needs to rework the start to first align on what type of project architecture it is
|
|
||||||
- the architect put out some other not asked for documents as part of the final step
|
|
||||||
- the architect started dumping out the epic 1 tech spec with way too much prescriptive code in it
|
|
||||||
- both the PRD and the solutioning process need to work in more of the questioning before dumping out a section (this might be happening since so much is already known from the brief though)
|
|
||||||
- the UX Agent ux-spec process needs updates to be MUCH more interactive
|
|
||||||
- the UX agent needs to be given commands to generate comps or mock ups in HTML - it works really well, just need to make it an actual thing the agent offers to do
|
|
||||||
|
|
||||||
--- done ---
|
|
||||||
|
|
||||||
- Done - Brownfield v6 integrated into the workflow.
|
|
||||||
- Done - Full workflow single file tracking.
|
|
||||||
- Done - BoMB Tooling included with module install
|
|
||||||
- Done - All project levels (0 through 4) manual flows validated through workflow phase 1-4 for greenfield and brownfield
|
|
||||||
- Done - bmm existing project scanning and integration with workflow phase 0-4 improvements
|
|
||||||
- DONE: Single Agent web bundler finalized - run `npm run bundle'
|
|
||||||
- DONE: 4->v6 upgrade installer fixed.
|
|
||||||
- DONE: v6->v6 updates will no longer remove custom content. so if you have a new agent you created for example anywhere under the bmad folder, updates will no longer remove them.
|
|
||||||
- DONE: if you modify an installed file and upgrade, the file will be saved as a .bak file and the installer will inform you.
|
|
||||||
- DONE: Game Agents comms style WAY to over the top - reduced a bit.
|
|
||||||
- DONE: need to nest subagents for better organization.
|
|
||||||
- DONE: Quick note on BMM v6 Flow
|
|
||||||
- DONE: CC SubAgents installed to sub-folders now.
|
|
||||||
- DONE: Qwen TOML update.
|
|
||||||
- DONE: Diagram alpha BMM flow. - added to src/modules/bmm/workflows/
|
|
||||||
- DONE: Fix Redoc task to BMB.
|
|
||||||
- DONE: Team Web Bundler functional
|
|
||||||
- DONE: Agent improvement to loading instruction insertion and customization system overhaul
|
|
||||||
- DONE: Stand along agents now will install to bmad/agents and are able to be compiled by the installer also
|
|
||||||
|
|
||||||
## Needed before Beta → v0 release
|
|
||||||
|
|
||||||
Once the alpha is stabilized and we switch to beta, work on v4.x will freeze and the beta will merge to main. The NPX installer will still install v4 by default, but people will be able to npm install the beta version also.
|
|
||||||
|
|
||||||
- Orchestration tracking works consistently across all workflow phases on BMM module
|
|
||||||
- Single Reference Architecture
|
|
||||||
- Module repository and submission process defined
|
|
||||||
- Final polished documentation and user guide for each module
|
|
||||||
- Final polished documentation for overall project architecture
|
|
||||||
- MCP Injections based on installation selection
|
|
||||||
- sub agent optimization
|
|
||||||
- TDD Workflow Integration
|
|
||||||
- BMad-Master BMad-Init workflow will be a single entrypoint agent command that will set the user on the correct path and workflow. BMad-Init will become very powerful in the future, empowering the BMad Master to be a full orchestrator across any current or future module.
|
|
||||||
|
|
||||||
## Late Beta or Post v0 official release items
|
|
||||||
|
|
||||||
- Installer offers installation of vetted community modules
|
|
||||||
- DevOps Module
|
|
||||||
- Security Module
|
|
||||||
- Further BoMB improvements
|
|
||||||
- 2-3 functional Reference Architecture Project Scaffolds and community contribution process defined
|
|
||||||
-
|
|
||||||
Loading…
Reference in New Issue