darrenhinde 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois
..
archive 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois
ARCHITECTURE-REVIEW.md 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois
BUILD-PLAN.md 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois
CORRECTED-ARCHITECTURE.md 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois
README.md 782236184d ๐Ÿ“ docs: enhance prompter functionality and improve documentation clarity il y a 10 mois

README.md

NexusAgent Planning - Final Documentation

Status: READY TO BUILD
Date: 2025-10-29
Architecture: Approved & Simplified


๐Ÿ“‹ Active Planning Documents

1. CORRECTED-ARCHITECTURE.md

The fundamental constraint and solution:

  • โœ… Agents MUST stay in tool-specific folders (.opencode/agent/)
  • โœ… Context CAN be shared (.nexusagent/context/)
  • โœ… Governance CAN be shared (.nexusagent/governance/)
  • โœ… Reference pattern: @../.nexusagent/context/file.md

Read this first - explains why the architecture is structured this way.


2. ARCHITECTURE-REVIEW.md

Comprehensive validation against guide documents:

  • โœ… Validates alignment with BUILDING-CONTEXT-AWARE-SYSTEMS.md
  • โœ… Validates alignment with DATA-GOVERNANCE-AGENT-SYSTEM.md
  • โœ… Multi-tool adaptability analysis
  • โœ… Simplification recommendations
  • โœ… Build approach recommendations

Read this second - confirms the approach is sound and provides guidance.


3. BUILD-PLAN.md

Simple status document:

  • Current status: READY TO BUILD
  • Final architecture diagram
  • What we're building
  • Build order

Read this last - quick reference for current status.


๐ŸŽฏ The Final Architecture

project/
โ”œโ”€โ”€ .nexusagent/                 # SHAREABLE (tool-agnostic)
โ”‚   โ”œโ”€โ”€ context/                # Domain knowledge (any tool reads)
โ”‚   โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ domain/
โ”‚   โ”‚   โ”œโ”€โ”€ processes/
โ”‚   โ”‚   โ””โ”€โ”€ standards/
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ governance/             # Data governance (any tool reads)
โ”‚       โ”œโ”€โ”€ metadata-index.json
โ”‚       โ”œโ”€โ”€ workflow-state.json
โ”‚       โ””โ”€โ”€ tmp/
โ”‚
โ””โ”€โ”€ .opencode/                   # TOOL-SPECIFIC (OpenCode)
    โ”œโ”€โ”€ agent/                  # OpenCode agents (MUST be here)
    โ”‚   โ”œโ”€โ”€ main-orchestrator.md
    โ”‚   โ”œโ”€โ”€ context-provider.md
    โ”‚   โ””โ”€โ”€ subagents/
    โ”‚       โ”œโ”€โ”€ quality-validator.md
    โ”‚       โ””โ”€โ”€ lifecycle-manager.md
    โ”‚
    โ””โ”€โ”€ command/                # OpenCode commands (MUST be here)
        โ””โ”€โ”€ validate-context.md

How Agents Reference Shared Context

<!-- .opencode/agent/main-orchestrator.md -->

**Load shared context:**
@../.nexusagent/context/core/essential-patterns.md
@../.nexusagent/context/standards/quality-criteria.md

**Read governance data:**
Read: ../.nexusagent/governance/metadata-index.json

๐Ÿš€ What We're Building

Repository Structure

nexus/
โ”œโ”€โ”€ install.sh              # Simple installer
โ”œโ”€โ”€ profiles/
โ”‚   โ””โ”€โ”€ default/           # Full system (not "basic")
โ”‚       โ”œโ”€โ”€ nexusagent/
โ”‚       โ”‚   โ”œโ”€โ”€ context/
โ”‚       โ”‚   โ””โ”€โ”€ governance/
โ”‚       โ””โ”€โ”€ opencode/
โ”‚           โ”œโ”€โ”€ agent/
โ”‚           โ””โ”€โ”€ command/
โ””โ”€โ”€ README.md

Installation Creates

~/nexus/install.sh

# Creates in project:
.nexusagent/               # Shared resources
โ”œโ”€โ”€ context/              # From profile
โ””โ”€โ”€ governance/           # From profile

.opencode/                 # OpenCode integration
โ”œโ”€โ”€ agent/                # From profile
โ””โ”€โ”€ command/              # From profile

๐Ÿ“– Foundation Guides

Located in parent directory (.Building/):

  1. BUILDING-CONTEXT-AWARE-SYSTEMS.md (2000+ lines)

    • Directory structure patterns
    • XML prompt engineering
    • 3-level context system
    • Orchestrator design
    • Subagent patterns
    • Workflow templates
  2. DATA-GOVERNANCE-AGENT-SYSTEM.md (2000+ lines)

    • Dual metadata system (JSON + XML)
    • Explicit context passing (request files)
    • Context Management Agent
    • Governance subagents (4 types)
    • Workflow state machine
    • Quality validation (6 dimensions)
  3. UNIFIED-ARCHITECTURE.md

    • How both systems work together

These are THE SOURCE OF TRUTH - follow them exactly.


โœ… Key Decisions

1. Start Simple

  • โœ… ONE profile (default) with FULL functionality
  • โŒ NOT three profiles (basic/governance/content)
  • โœ… Let context grow organically with use

2. Follow Guides Exactly

  • โœ… XML prompt structure (Context โ†’ Role โ†’ Task โ†’ Instructions โ†’ Output)
  • โœ… 3-level context system (Isolated โ†’ Filtered โ†’ Full)
  • โœ… Dual metadata (JSON primary, XML secondary)
  • โœ… Request ID protocol (explicit context passing)
  • โœ… 6 quality dimensions

3. Adaptive by Design

  • โœ… Context in .nexusagent/ (any tool can read)
  • โœ… Agents in .opencode/ (tool-specific)
  • โœ… Document how to add Claude/Cursor support
  • โœ… Progressive enhancement (OpenCode first, others optional)

4. Production Ready

  • โœ… Works out of the box
  • โœ… Handles real projects
  • โœ… Maintains quality automatically
  • โœ… Grows with user's needs
  • โœ… Thoroughly documented

๐Ÿ“ฆ Archived Documents

Moved to archive/ folder:

  • 00-MASTER-PLAN.md - Early planning, superseded
  • 01-TECHNICAL-SPECIFICATION.md - Details now in guides
  • 02-MULTI-TOOL-INTEGRATION.md - Covered in ARCHITECTURE-REVIEW
  • 03-SIMPLIFIED-ARCHITECTURE.md - Superseded by CORRECTED-ARCHITECTURE
  • FINAL-ARCHITECTURE-DECISION.md - Merged into current docs
  • PROJECT-STRUCTURE.md - Will be generated from actual build

These are kept for historical reference but are no longer active.


๐ŸŽฌ Next Steps

  1. โœ… Planning complete
  2. โœ… Architecture validated
  3. โœ… Guides aligned
  4. โœ… Simplified to single profile
  5. โžก๏ธ Ready to build

Start with: Create repository structure in nexus/


๐Ÿ“Š Build Phases

Phase 1: Repository Structure (Day 1)

  • Create nexus/ directory
  • Create install.sh
  • Create profiles/default/ structure

Phase 2: Shared Context Layer (Days 2-3)

  • Build profiles/default/nexusagent/context/
  • Core patterns, standards, templates
  • Tool-agnostic markdown files

Phase 3: Shared Governance Layer (Day 4)

  • Build profiles/default/nexusagent/governance/
  • JSON templates (metadata-index, workflow-state)
  • Tmp structure

Phase 4: OpenCode Agents (Days 5-10)

  • Build profiles/default/opencode/agent/
  • Main orchestrator (3-level context)
  • Context provider
  • Governance subagents

Phase 5: OpenCode Commands (Day 11)

  • Build profiles/default/opencode/command/
  • Validation command
  • Workflow commands

Phase 6: Test & Document (Days 12-14)

  • Test installation
  • Test all agents
  • Write comprehensive README
  • Create examples

๐ŸŽฏ Success Criteria

Installation:

  • One command installs full system
  • Creates correct directory structure
  • Files are in correct locations

Functionality:

  • Main orchestrator works
  • 3-level context allocation works
  • Quality validation works
  • Lifecycle management works
  • Request ID protocol works

Documentation:

  • Clear installation guide
  • Agent usage examples
  • Adaptation guide (for other tools)
  • Troubleshooting guide

Quality:

  • Follows guide patterns exactly
  • No deviations from proven architecture
  • Production-ready code
  • Comprehensive error handling

๐Ÿ’ก Key Insights

What Makes This Work

  1. Separation of Concerns

    • Intelligence (.nexusagent/) = tool-agnostic
    • Execution (.opencode/) = tool-specific
    • Clean boundary
  2. Progressive Enhancement

    • Works perfectly with OpenCode (primary)
    • Other tools can read shared context (optional)
    • No maintenance burden
  3. Proven Patterns

    • Both guides are battle-tested
    • No need to invent new approaches
    • Follow them exactly
  4. Production Focus

    • Not a demo or example
    • Real system for real projects
    • Quality built-in from day one

๐Ÿ“ž Questions?

Review the three active documents in order:

  1. CORRECTED-ARCHITECTURE.md (why)
  2. ARCHITECTURE-REVIEW.md (validation)
  3. BUILD-PLAN.md (status)

Then refer to foundation guides for implementation details.