Date: 2025-10-29
Purpose: Validate build plan against guide documents and multi-tool adaptability
✅ Current plan is sound - aligns with both guide documents
✅ Architecture is correct - agents in tool folders, shared context in .nexusagent/
⚠️ Can be simplified - reduce complexity while keeping full functionality
✅ Is adaptive - context/governance are tool-agnostic by design
| Core Concept | Guide Requirement | Current Plan | Status |
|---|---|---|---|
| Directory Structure | .opencode/agent/, .opencode/context/, .opencode/command/ |
.opencode/agent/ ✅.nexusagent/context/ ✅.opencode/command/ ✅ |
✅ ALIGNED |
| XML Prompt Structure | Context → Role → Task → Instructions → Output | Agent templates use this | ✅ ALIGNED |
| 3-Level Context System | Level 1: Isolated Level 2: Filtered Level 3: Full |
Need to implement in orchestrator | ⚠️ TODO |
| Main Orchestrator | Analyze → Route → Execute → Validate → Finalize | Need to build this workflow | ⚠️ TODO |
| Specialized Subagents | Stateless, complete instructions, explicit output | Plan includes subagents | ✅ ALIGNED |
| Context Splitting | 50-200 lines per file, modular organization | Need to apply to context files | ⚠️ TODO |
| Workflows | Reusable process definitions with XML structure | Need to create workflow templates | ⚠️ TODO |
Verdict: Architecture aligns perfectly. Implementation details need to follow guide patterns.
| Core Concept | Guide Requirement | Current Plan | Status |
|---|---|---|---|
| Dual Metadata System | JSON index (PRIMARY) + Embedded XML (SECONDARY) | Need to implement | ⚠️ TODO |
| Agent Communication | Explicit context passing via tmp files with request_id | Need to implement | ⚠️ TODO |
| Context Management Agent | Primary governance coordinator | Need to build | ⚠️ TODO |
| Governance Subagents | Quality Validator, Lifecycle Manager, Metadata Updater, Catalog Maintainer | Need to build | ⚠️ TODO |
| Workflow State Machine | workflow-state.json with locks and checkpoints | Need to implement | ⚠️ TODO |
| 6 Quality Dimensions | Accuracy, Completeness, Consistency, Timeliness, Validity, Uniqueness | Need to implement in validator | ⚠️ TODO |
Verdict: Architecture supports this. Governance profile needs to implement all components.
| Feature | OpenCode | Claude | Cursor | NexusAgent Strategy |
|---|---|---|---|---|
| Agents | .opencode/agent/*.md |
.claude/agents/ |
Rules in .cursor/ |
Tool-specific folders |
| Context | .opencode/context/ |
.claude/context/ |
Referenced in rules | .nexusagent/context/ (shared) |
| Commands | .opencode/command/*.md |
.claude/commands/*.md |
Not literal | Tool-specific folders |
| Governance | Not built-in | Not built-in | Not built-in | .nexusagent/governance/ (shared) |
| Reference Pattern | @path/to/file.md |
@path/to/file.md |
Context via prompts | @../.nexusagent/context/file.md |
┌─────────────────────────────────────────────────────────┐
│ TOOL-AGNOSTIC LAYER │
│ │
│ .nexusagent/ │
│ ├── context/ ← Plain markdown (any tool) │
│ │ ├── core/ │
│ │ ├── domain/ │
│ │ ├── processes/ │
│ │ └── standards/ │
│ │ │
│ └── governance/ ← JSON data (any tool) │
│ ├── metadata-index.json │
│ └── workflow-state.json │
│ │
└─────────────────────────────────────────────────────────┘
▲
│ Reference via @../.nexusagent/
│
┌──────────────────────┼──────────────────────┐
│ │ │
┌───▼────────┐ ┌───────▼─────┐ ┌──────────▼───┐
│ .opencode/ │ │ .claude/ │ │ .cursor/ │
│ │ │ │ │ │
│ agent/ │ │ agents/ │ │ rules/ │
│ command/ │ │ commands/ │ │ prompts/ │
│ │ │ plugins/ │ │ │
└────────────┘ └─────────────┘ └──────────────┘
OpenCode Claude AI Cursor
(PRIMARY) (Optional) (Optional)
Key Insight: The intelligence (context, governance rules, quality standards) is tool-agnostic. Only the execution layer (agents/commands) is tool-specific.
nexus/
├── scripts/install.sh
├── profiles/
│ ├── default/
│ │ ├── nexusagent/context/
│ │ └── opencode/agent/
│ ├── governance/
│ │ ├── nexusagent/context/
│ │ ├── nexusagent/governance/
│ │ └── opencode/agent/ (governance agents)
│ └── content/
│ ├── nexusagent/context/
│ └── opencode/agent/
└── docs/
Recommendation: Start with ONE profile, add others as needed.
nexus/
├── install.sh # Simple installer
├── profiles/
│ └── default/ # Start here (includes basic governance)
│ ├── nexusagent/
│ │ ├── context/
│ │ │ ├── core/
│ │ │ ├── domain/
│ │ │ └── standards/
│ │ └── governance/
│ │ ├── metadata-index.json (template)
│ │ └── workflow-state.json (template)
│ └── opencode/
│ ├── agent/
│ │ ├── main-orchestrator.md
│ │ ├── context-provider.md
│ │ └── subagents/
│ │ ├── quality-validator.md
│ │ └── lifecycle-manager.md
│ └── command/
│ └── validate-context.md
└── README.md
Phase 2 (Later): Add specialized profiles for specific domains:
profiles/content/ - Content creation agentsprofiles/devops/ - DevOps automation agentsprofiles/data-eng/ - Data engineering agentsRationale:
CORE (Always Installed):
.nexusagent/context/:
- core/essential-patterns.md # 3-level context system
- core/prompt-structure.md # XML prompt templates
- standards/quality-criteria.md # 6 quality dimensions
.nexusagent/governance/:
- metadata-index.json # Fast queries
- workflow-state.json # Workflow management
.opencode/agent/:
- main-orchestrator.md # Request analysis + routing
- context-provider.md # 3-level context allocation
- subagents/quality-validator.md # Quality checks
- subagents/lifecycle-manager.md # Lifecycle transitions
OPTIONAL (User Adds):
.nexusagent/context/:
- domain/YOUR-DOMAIN.md # User's domain knowledge
- processes/YOUR-WORKFLOW.md # User's workflows
.opencode/agent/:
- subagents/YOUR-SPECIALIST.md # User's custom agents
This gives users:
What's Shared (Tool-Agnostic):
.nexusagent/
├── context/ # Any AI can read markdown
│ ├── core/
│ │ ├── essential-patterns.md # 3-level context explained
│ │ ├── prompt-structure.md # XML structure guide
│ │ └── agent-coordination.md # How agents work together
│ ├── domain/ # User's domain knowledge
│ └── standards/ # Quality standards
│
└── governance/ # Any tool can read JSON
├── metadata-index.json # File metadata
└── workflow-state.json # Workflow state
What's Tool-Specific:
.opencode/agent/ # OpenCode agents (reference shared context)
.claude/agents/ # Claude agents (reference shared context)
.cursor/rules/ # Cursor rules (reference shared context)
Level 1: OpenCode only (what we build first)
.nexusagent/context/ # Shared context
.opencode/agent/ # OpenCode agents
Level 2: User adds Claude support (optional)
.nexusagent/context/ # Same shared context
.opencode/agent/ # OpenCode agents (existing)
.claude/agents/ # User creates Claude agents that reference same context
Level 3: User adds Cursor support (optional)
.nexusagent/context/ # Same shared context
.opencode/agent/ # OpenCode agents (existing)
.claude/agents/ # Claude agents (existing)
.cursor/rules/ # User creates Cursor rules that reference same context
Key: The intelligence (.nexusagent/) doesn't duplicate. Only execution layer varies.
Include in nexus/README.md:
# Using NexusAgent with Other AI Tools
NexusAgent's intelligence lives in `.nexusagent/` (tool-agnostic).
The agents/commands are tool-specific implementations.
## OpenCode (Built-in)
Already configured. Agents reference `@../.nexusagent/context/`
## Adding Claude Support
1. Create `.claude/agents/main-orchestrator.md`
2. Reference shared context: `@../.nexusagent/context/core/essential-patterns.md`
3. Use same governance: Read `../.nexusagent/governance/metadata-index.json`
## Adding Cursor Support
1. Create `.cursor/rules/main.cursorrules`
2. Include instruction: "Read context from ../.nexusagent/context/"
3. Reference standards from ../.nexusagent/context/standards/
## The Pattern
- Intelligence: `.nexusagent/` (shared)
- Execution: Tool-specific folders (reference shared intelligence)
Build Order:
Repository structure
nexus/
├── install.sh
├── profiles/default/
└── README.md
Shared context layer
profiles/default/nexusagent/context/
├── core/
│ ├── essential-patterns.md # 3-level context system
│ ├── prompt-structure.md # XML templates
│ └── agent-coordination.md # Communication patterns
└── standards/
└── quality-criteria.md # 6 quality dimensions
Shared governance layer
profiles/default/nexusagent/governance/
├── metadata-index.json # Template
├── workflow-state.json # Template
└── tmp/.gitkeep
OpenCode agents (minimal viable set)
profiles/default/opencode/agent/
├── main-orchestrator.md # Implements guide workflow
├── context-provider.md # 3-level context allocation
└── subagents/
├── quality-validator.md # 6 dimensions
└── lifecycle-manager.md # Basic lifecycle
OpenCode commands
profiles/default/opencode/command/
└── validate-context.md # Manual validation trigger
Installation script
#!/bin/bash
# install.sh
# Copies default profile to .nexusagent/ and .opencode/
agent/, context/, command/.nexusagent/ (tool-agnostic)@../.nexusagent/)Do:
.nexusagent/Don't:
Both guides are excellent. Don't deviate:
In every context file, add header:
<!-- .nexusagent/context/core/essential-patterns.md -->
# Essential Patterns
**Tool-Agnostic Context File**
This file can be read by OpenCode, Claude, Cursor, or any AI tool.
**Reference from agents:**
- OpenCode: `@../.nexusagent/context/core/essential-patterns.md`
- Claude: `@../.nexusagent/context/core/essential-patterns.md`
- Cursor: Include in rules: "Read ../.nexusagent/context/core/essential-patterns.md"
---
[Content here]
Don't build an example. Build a production system that:
Current Plan: ✅ Architecturally sound
Guide Alignment: ✅ Follows both guides
Simplification: ⚠️ Can start with one profile
Adaptability: ✅ Design supports multiple tools
Next Steps:
Ready to build: YES, with recommended simplifications applied.