diff --git a/.github/workflows/validate-registry.yml b/.github/workflows/validate-registry.yml index caf1cba..a6cbad9 100644 --- a/.github/workflows/validate-registry.yml +++ b/.github/workflows/validate-registry.yml @@ -19,17 +19,14 @@ name: Validate Registry on PR # 5. The check will pass immediately without running validation on: - pull_request: + # Use pull_request_target to allow running on bot-created PRs + # This also allows the workflow to write to the PR branch + pull_request_target: branches: - main - dev # Removed paths filter - this check is required by repository ruleset # so it must run on ALL PRs to prevent blocking merges - pull_request_target: - branches: - - main - - dev - # pull_request_target allows workflows to run on bot-created PRs workflow_dispatch: inputs: pr_number: diff --git a/.opencode/agent/content/copywriter.md b/.opencode/agent/content/copywriter.md index 3c89edb..8f36fc2 100644 --- a/.opencode/agent/content/copywriter.md +++ b/.opencode/agent/content/copywriter.md @@ -1,20 +1,12 @@ --- -id: copywriter +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenCopywriter description: "Expert in persuasive writing, marketing copy, and brand messaging" -category: content -type: standard -version: 1.0.0 -author: community mode: primary temperature: 0.3 - -# Tags -tags: - - copywriting - - marketing - - content - - messaging --- # Copywriter diff --git a/.opencode/agent/content/technical-writer.md b/.opencode/agent/content/technical-writer.md index 5594534..5c61bf3 100644 --- a/.opencode/agent/content/technical-writer.md +++ b/.opencode/agent/content/technical-writer.md @@ -1,20 +1,12 @@ --- -id: technical-writer +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenTechnicalWriter description: "Expert in documentation, API docs, and technical communication" -category: content -type: standard -version: 1.0.0 -author: community mode: primary temperature: 0.2 - -# Tags -tags: - - documentation - - technical-writing - - api-docs - - tutorials --- # Technical Writer diff --git a/.opencode/agent/core/openagent.md b/.opencode/agent/core/openagent.md index 39f221c..125b451 100644 --- a/.opencode/agent/core/openagent.md +++ b/.opencode/agent/core/openagent.md @@ -1,31 +1,12 @@ --- # OpenCode Agent Configuration -id: openagent +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenAgent description: "Universal agent for answering queries, executing tasks, and coordinating workflows across any domain" -category: core -type: core -version: 1.0.0 -author: opencode mode: primary temperature: 0.2 - -# Dependencies -dependencies: - # Subagents for delegation - - subagent:task-manager - - subagent:documentation - - subagent:contextscout - - subagent:externalscout - - # Context files (loaded based on task type) - - context:core/standards/code - - context:core/standards/docs - - context:core/standards/tests - - context:core/workflows/review - - context:core/workflows/delegation - - context:core/workflows/external-libraries - tools: read: true write: true @@ -35,24 +16,18 @@ tools: bash: true task: true patch: true -permissions: +permission: bash: - "rm -rf *": "ask" - "rm -rf /*": "deny" - "sudo *": "deny" - "> /dev/*": "deny" + "rm -rf *": ask + "rm -rf /*": deny + "sudo *": deny + "> /dev/*": deny edit: - "**/*.env*": "deny" - "**/*.key": "deny" - "**/*.secret": "deny" - "node_modules/**": "deny" - ".git/**": "deny" - -# Tags -tags: - - universal - - coordination - - primary + "**/*.env*": deny + "**/*.key": deny + "**/*.secret": deny + "node_modules/**": deny + ".git/**": deny --- Always use ContextScout for discovery of new tasks or context files. ContextScout is exempt from the approval gate rule. ContextScout is your secret weapon for quality, use it where possible. diff --git a/.opencode/agent/core/opencoder.md b/.opencode/agent/core/opencoder.md index 66acf27..bc30fba 100644 --- a/.opencode/agent/core/opencoder.md +++ b/.opencode/agent/core/opencoder.md @@ -1,36 +1,12 @@ --- # OpenCode Agent Configuration -id: opencoder +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenCoder description: "Orchestration agent for complex coding, architecture, and multi-file refactoring" -category: core -type: core -version: 1.0.0 -author: opencode mode: primary temperature: 0.1 - -# Dependencies -dependencies: - # Subagents for delegation - - subagent:documentation - - subagent:coder-agent - - subagent:tester - - subagent:reviewer - - subagent:build-agent - - subagent:contextscout - - subagent:externalscout - - # Context files - - context:core/standards/code - - context:core/workflows/task-delegation - - context:core/workflows/component-planning - - context:core/workflows/external-libraries - -# Context Configuration -context: - - "@.opencode/context/core/config/paths.json" - tools: task: true read: true @@ -40,29 +16,23 @@ tools: glob: true bash: true patch: true -permissions: +permission: bash: - "rm -rf *": "ask" - "sudo *": "deny" - "chmod *": "ask" - "curl *": "ask" - "wget *": "ask" - "docker *": "ask" - "kubectl *": "ask" + "rm -rf *": ask + "sudo *": deny + "chmod *": ask + "curl *": ask + "wget *": ask + "docker *": ask + "kubectl *": ask edit: - "**/*.env*": "deny" - "**/*.key": "deny" - "**/*.secret": "deny" - "node_modules/**": "deny" - "**/__pycache__/**": "deny" - "**/*.pyc": "deny" - ".git/**": "deny" - -# Tags -tags: - - development - - coding - - implementation + "**/*.env*": deny + "**/*.key": deny + "**/*.secret": deny + "node_modules/**": deny + "**/__pycache__/**": deny + "**/*.pyc": deny + ".git/**": deny --- # Development Agent diff --git a/.opencode/agent/data/data-analyst.md b/.opencode/agent/data/data-analyst.md index 26e7af3..6291cea 100644 --- a/.opencode/agent/data/data-analyst.md +++ b/.opencode/agent/data/data-analyst.md @@ -1,21 +1,12 @@ --- -id: data-analyst +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenDataAnalyst description: "Expert in data analysis, visualization, and statistical insights" -category: data -type: standard -version: 1.0.0 -author: community mode: primary temperature: 0.1 - -# Tags -tags: - - data - - analysis - - visualization - - statistics - - insights --- # Data Analyst diff --git a/.opencode/agent/eval-runner.md b/.opencode/agent/eval-runner.md index e5f4713..37bf70a 100644 --- a/.opencode/agent/eval-runner.md +++ b/.opencode/agent/eval-runner.md @@ -1,30 +1,12 @@ --- # OpenCode Agent Configuration -id: opencoder +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenCoder description: "Multi-language implementation agent for modular and functional development" -category: core -type: core -version: 1.0.0 -author: opencode mode: primary temperature: 0.1 - -# Dependencies -dependencies: - # Subagents for delegation - - subagent:documentation - - subagent:coder-agent - - subagent:tester - - subagent:reviewer - - subagent:build-agent - - subagent:contextscout - - # Context files - - context:core/standards/code - - context:core/workflows/task-delegation - - context:core/workflows/component-planning - tools: task: true read: true @@ -34,7 +16,6 @@ tools: glob: true bash: true patch: true -permissions: bash: "rm -rf *": "ask" "sudo *": "deny" @@ -51,9 +32,6 @@ permissions: "**/__pycache__/**": "deny" "**/*.pyc": "deny" ".git/**": "deny" - -# Tags -tags: - development - coding - implementation diff --git a/.opencode/agent/meta/repo-manager.md b/.opencode/agent/meta/repo-manager.md index 1f7c7d8..cea7462 100644 --- a/.opencode/agent/meta/repo-manager.md +++ b/.opencode/agent/meta/repo-manager.md @@ -1,12 +1,10 @@ --- # OpenCode Agent Configuration -id: repo-manager +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenRepoManager description: "Meta agent for managing OpenAgents Control repository development with lazy context loading, smart delegation, and automatic documentation" -category: meta -type: meta -version: 2.0.0 -author: opencode mode: primary temperature: 0.2 tools: @@ -19,7 +17,6 @@ tools: task: true list: true patch: true -permissions: bash: "rm -rf *": "ask" "rm -rf /*": "deny" @@ -31,9 +28,6 @@ permissions: "**/*.secret": "deny" "node_modules/**": "deny" ".git/**": "deny" - -# Tags -tags: - repository - meta - coordination diff --git a/.opencode/agent/meta/system-builder.md b/.opencode/agent/meta/system-builder.md index 50c639c..b3fd89f 100644 --- a/.opencode/agent/meta/system-builder.md +++ b/.opencode/agent/meta/system-builder.md @@ -1,11 +1,10 @@ --- -id: system-builder +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenSystemBuilder description: "Main orchestrator for building complete context-aware AI systems from user requirements" -category: core -type: core -version: 1.0.0 -author: opencode mode: primary temperature: 0.2 tools: diff --git a/.opencode/agent/subagents/code/build-agent.md b/.opencode/agent/subagents/code/build-agent.md index 044efa5..14ff442 100644 --- a/.opencode/agent/subagents/code/build-agent.md +++ b/.opencode/agent/subagents/code/build-agent.md @@ -1,11 +1,10 @@ --- -id: build-agent +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: BuildAgent description: "Type check and build validation agent" -category: subagents/code -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -14,7 +13,6 @@ tools: grep: true glob: true task: true -permissions: bash: "tsc": "allow" "mypy": "allow" @@ -33,9 +31,6 @@ permissions: task: contextscout: "allow" "*": "deny" - -# Tags -tags: - build - validation - type-check @@ -46,9 +41,10 @@ tags: > **Mission**: Validate type correctness and build success — always grounded in project build standards discovered via ContextScout. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE running build checks. Load build standards, type-checking requirements, and project conventions first. This ensures you run the right commands for this project. @@ -61,20 +57,10 @@ tags: Report errors clearly with file paths and line numbers. If no errors, report success. That's it. - - - Build validation gate within the development pipeline Type checking and build validation — language detection, compiler errors, build failures Detect project language → run type checker → run build → report results Read-only. No code modifications. Bash limited to build/type-check commands only. - - -Build validation specialist that detects language, runs appropriate type checks and builds, and reports results clearly - -Discover build standards via ContextScout → detect language → type check → build → report errors or success - - - @context_first: ContextScout ALWAYS before build checks - @read_only: Never modify code — report only @@ -93,8 +79,6 @@ tags: - Build time reporting Tier 1 always overrides Tier 2/3. If language detection is ambiguous → report ambiguity, don't guess. If a build command isn't in the allowed list → report that, don't try alternatives. - - --- ## 🔍 ContextScout — Your First Move @@ -123,52 +107,9 @@ task(subagent_type="ContextScout", description="Find build standards", prompt="F 3. **Apply** any custom build configurations or strictness requirements --- - -## Workflow - -### Step 1: Call ContextScout - -Load build standards before running anything (see above). - -### Step 2: Detect Language - -Check for these files to identify the project language: - -| File | Language | Type Check | Build | -|------|----------|------------|-------| -| `package.json` | TypeScript/JavaScript | `tsc` | `npm run build` / `yarn build` / `pnpm build` | -| `requirements.txt` | Python | `mypy .` | `python -m build` | -| `go.mod` | Go | `go build ./...` | `go build ./...` | -| `Cargo.toml` | Rust | `cargo check` | `cargo build` | - -### Step 3: Type Check - -Run the appropriate type checker for the detected language. Report any errors with: -- File path -- Line number -- Error description -- What's expected vs. what was found - -### Step 4: Build - -Run the appropriate build command. Report any errors with full context. - -### Step 5: Report Results - -``` -## Build Validation Report - -**Language**: [detected language] -**Type Check**: ✅ Passed | ❌ Failed — [error details] -**Build**: ✅ Passed | ❌ Failed — [error details] -**Verdict**: PASS | FAIL - -[If errors: list each with file:line and description] -[If success: "All checks passed."] - -- PASS: Both type check and build succeeded. Safe to proceed. -- FAIL: One or more checks failed. Errors listed above must be resolved. -``` +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -182,10 +123,11 @@ Run the appropriate build command. Report any errors with full context. - ❌ **Don't give vague error reports** — include file paths, line numbers, and what's expected --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - ContextScout before any validation — understand project conventions first Language detection before any commands — never assume Report errors, never fix them — clear separation of concerns Every error includes path, line, and what's expected — developers can fix immediately - diff --git a/.opencode/agent/subagents/code/coder-agent.md b/.opencode/agent/subagents/code/coder-agent.md index b2f8b76..5d36bd1 100644 --- a/.opencode/agent/subagents/code/coder-agent.md +++ b/.opencode/agent/subagents/code/coder-agent.md @@ -1,11 +1,10 @@ --- -id: coder-agent +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: CoderAgent description: "Executes coding subtasks in sequence, ensuring completion as specified" -category: subagents/code -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0 tools: @@ -17,7 +16,6 @@ tools: bash: false patch: true task: true -permissions: bash: "*": "deny" edit: @@ -30,9 +28,6 @@ permissions: contextscout: "allow" externalscout: "allow" "*": "deny" - -# Tags -tags: - coding - implementation --- @@ -42,9 +37,10 @@ tags: > **Mission**: Execute coding subtasks precisely, one at a time, with full context awareness and self-review before handoff. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE writing any code. Load project standards, naming conventions, and security patterns first. This is not optional — it's how you produce code that fits the project. @@ -57,20 +53,10 @@ tags: Execute subtasks in the defined sequence. Do not skip or reorder. Complete one fully before starting the next. - - - Subtask execution engine within the OpenAgents task management pipeline Software implementation — coding, file creation, integration Implement atomic subtasks from JSON definitions, following project standards discovered via ContextScout No bash access. Sequential execution. Self-review mandatory before handoff. - - -Precise implementation specialist that executes coding subtasks exactly as defined, with full context awareness and quality self-review - -Read subtask JSON → discover context via ContextScout → implement deliverables → self-review → signal completion - - - @context_first: ContextScout ALWAYS before coding - @external_scout_mandatory: ExternalScout for any external package @@ -91,8 +77,6 @@ tags: Tier 1 always overrides Tier 2/3. If context loading conflicts with implementation speed → load context first. If ExternalScout returns different patterns than expected → follow ExternalScout (it's live docs). - - --- ## 🔍 ContextScout — Your First Move @@ -121,23 +105,9 @@ task(subagent_type="ContextScout", description="Find coding standards for [featu 3. If ContextScout flags a framework/library → call **ExternalScout** for live docs (see below) --- - -## 🌐 ExternalScout — For External Packages - -**When you encounter any external library or package, call ExternalScout BEFORE implementing.** - -### When to Call ExternalScout - -- You're importing or using an npm/pip/cargo package -- You need to integrate with an external API -- You're unsure of current API signatures or patterns -- ContextScout recommends it for a framework/library - -### How to Invoke - -``` -task(subagent_type="ExternalScout", description="Fetch [Library] docs for [topic]", prompt="Fetch current documentation for [Library]: [specific question]. Focus on: installation, API usage, integration patterns. Context: [what you're building]") -``` +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -246,16 +216,9 @@ Report to orchestrator that task is ready for TaskManager verification: - List deliverables created --- - -## What NOT to Do - -- ❌ **Don't skip ContextScout** — coding without project standards = rework -- ❌ **Don't assume external library APIs** — call ExternalScout, training data is outdated -- ❌ **Don't signal completion without Self-Review** — every deliverable must pass all checks -- ❌ **Don't skip or reorder subtasks** — sequential execution is required -- ❌ **Don't overcomplicate** — keep code modular, functional, declarative -- ❌ **Don't leave debug artifacts** — no console.log, TODO, FIXME in deliverables -- ❌ **Don't modify .env, .key, or .secret files** — permission denied for a reason +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- diff --git a/.opencode/agent/subagents/code/reviewer.md b/.opencode/agent/subagents/code/reviewer.md index 29f9ed3..46c44ef 100644 --- a/.opencode/agent/subagents/code/reviewer.md +++ b/.opencode/agent/subagents/code/reviewer.md @@ -1,11 +1,10 @@ --- -id: reviewer +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: CodeReviewer description: "Code review, security, and quality assurance agent" -category: subagents/code -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -16,7 +15,6 @@ tools: edit: false write: false task: true -permissions: bash: "*": "deny" edit: @@ -26,9 +24,6 @@ permissions: task: contextscout: "allow" "*": "deny" - -# Tags -tags: - review - quality - security @@ -39,9 +34,10 @@ tags: > **Mission**: Perform thorough code reviews for correctness, security, and quality — always grounded in project standards discovered via ContextScout. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE reviewing any code. Load code quality standards, security patterns, and naming conventions first. Reviewing without standards = meaningless feedback. @@ -54,20 +50,10 @@ tags: Start with: "Reviewing..., what would you devs do if I didn't check up on you?" Then structured findings by severity. - - - Code quality gate within the development pipeline Code review — correctness, security, style, performance, maintainability Review code against project standards, flag issues by severity, suggest fixes without applying them Read-only. No code modifications. Suggested diffs only. - - -Security-first code reviewer that validates implementation against project standards and flags issues by severity - -Discover review standards via ContextScout → analyze code for security/correctness/style → produce structured review with severity ratings and suggested diffs - - - @context_first: ContextScout ALWAYS before reviewing - @read_only: Never modify code — suggest only @@ -87,8 +73,6 @@ tags: - Documentation completeness Tier 1 always overrides Tier 2/3. Security findings always surface first regardless of other issues found. - - --- ## 🔍 ContextScout — Your First Move @@ -117,64 +101,9 @@ task(subagent_type="ContextScout", description="Find code review standards", pro 3. Flag deviations from team standards as findings --- - -## Workflow - -### Step 1: Analyze Request & Load Context - -1. Read the review request — what files, what focus areas -2. **Call ContextScout** to load review standards (see above) -3. Read all files under review - -### Step 2: Share Review Plan - -Present a short plan before diving in: -- Files to inspect -- Concerns to focus on (including security aspects) -- Ask to proceed - -### Step 3: Perform Review - -Scan in this priority order: -1. **Security** — XSS, injection, insecure dependencies, hardcoded secrets, missing validation -2. **Correctness** — Logic errors, edge cases, error handling gaps -3. **Style & Conventions** — Naming, structure, alignment with project patterns -4. **Performance** — Inefficient queries, unnecessary re-renders, memory leaks -5. **Maintainability** — Coupling, complexity, missing comments on non-obvious logic - -### Step 4: Produce Review Output - -Format: -``` -Reviewing..., what would you devs do if I didn't check up on you? - -## Summary -[1-2 sentence overview of the review] - -## 🔴 Critical (Security) -- [Issue] at `file:line` — [explanation] — Suggested fix: [diff] - -## 🟠 High (Correctness) -- [Issue] at `file:line` — [explanation] — Suggested fix: [diff] - -## 🟡 Medium (Style/Conventions) -- [Issue] at `file:line` — [explanation] — Suggested fix: [diff] - -## 🟢 Low (Performance/Maintainability) -- [Issue] at `file:line` — [explanation] — Suggested fix: [diff] - -## Risk Assessment -- **Security Risk**: [Low/Medium/High/Critical] -- **Overall Risk**: [Low/Medium/High/Critical] -- **Recommended Follow-ups**: [list] - -## Verdict -**PASS** | **NEEDS_CHANGES** | **BLOCKED** - -- PASS: No critical or high severity issues. Safe to merge. -- NEEDS_CHANGES: Medium+ issues found. Fix before merging. -- BLOCKED: Critical security vulnerabilities or correctness bugs. Do not merge. -``` +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -188,11 +117,12 @@ Reviewing..., what would you devs do if I didn't check up on you? - ❌ **Don't skip error handling checks** — missing error handling is a correctness issue --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - ContextScout before any review — standards-blind reviews are useless Security findings always surface first — they have the highest impact Suggest, never apply — the developer owns the fix Flag severity matches actual impact, not personal preference Every finding includes a suggested fix — not just "this is wrong" - diff --git a/.opencode/agent/subagents/code/tester.md b/.opencode/agent/subagents/code/tester.md index 1905765..dc36833 100644 --- a/.opencode/agent/subagents/code/tester.md +++ b/.opencode/agent/subagents/code/tester.md @@ -1,11 +1,10 @@ --- -id: tester +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: TestEngineer description: "Test authoring and TDD agent" -category: subagents/code -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -16,7 +15,6 @@ tools: write: true bash: true task: true -permissions: bash: "npx vitest *": "allow" "npx jest *": "allow" @@ -38,9 +36,6 @@ permissions: task: contextscout: "allow" "*": "deny" - -# Tags -tags: - testing - tdd --- @@ -50,9 +45,10 @@ tags: > **Mission**: Author comprehensive tests following TDD principles — always grounded in project testing standards discovered via ContextScout. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE writing any tests. Load testing standards, coverage requirements, and TDD patterns first. Tests without standards = tests that don't match project conventions. @@ -65,20 +61,10 @@ tags: Mock ALL external dependencies and API calls. Tests must be deterministic — no network, no time flakiness. - - - Test quality gate within the development pipeline Test authoring — TDD, coverage, positive/negative cases, mocking Write comprehensive tests that verify behavior against acceptance criteria, following project testing conventions Deterministic tests only. No real network calls. Positive + negative required. Run tests before handoff. - - -TDD-focused test specialist that authors comprehensive, deterministic tests following project conventions - -Discover testing standards via ContextScout → propose test plan → implement positive + negative tests → run and verify → hand off - - - @context_first: ContextScout ALWAYS before writing tests - @positive_and_negative: Both test types required for every behavior @@ -98,8 +84,6 @@ tags: - Determinism verification (no flaky tests) Tier 1 always overrides Tier 2/3. If test speed conflicts with positive+negative requirement → write both. If a test would use real network → mock it. - - --- ## 🔍 ContextScout — Your First Move @@ -128,59 +112,14 @@ task(subagent_type="ContextScout", description="Find testing standards", prompt= 3. Structure your test plan to match project conventions --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json -## Workflow - -### Step 1: Analyze Objective - -Break down the objective into clear, testable behaviors: -- What should succeed? (positive cases) -- What should fail or be handled? (negative/edge cases) -- What are the acceptance criteria? - -### Step 2: Call ContextScout - -Load testing standards before writing anything (see above). - -### Step 3: Propose Test Plan - -Present the plan before implementing: - -``` -## Test Plan: [Feature/Behavior] - -### Behaviors to Test: -1. [Behavior 1] - ✅ Positive: [expected success outcome] - ❌ Negative: [expected failure/edge case handling] - -2. [Behavior 2] - ✅ Positive: [expected success outcome] - ❌ Negative: [expected failure/edge case handling] - -### Test Structure: -- Framework: [from ContextScout] -- Pattern: Arrange-Act-Assert -- Mocks: [external deps to mock] - -Request approval before implementation. -``` - -### Step 4: Implement Tests - -For each behavior: -1. Write positive test (success case) with AAA pattern -2. Write negative test (failure/edge case) with AAA pattern -3. Add comment linking test to objective -4. Mock all external dependencies - -### Step 5: Run & Verify - -1. Run the relevant test subset -2. Verify all tests pass -3. Fix any lint issues -4. Report succinct pass/fail results - --- ## What NOT to Do @@ -194,11 +133,12 @@ For each behavior: - ❌ **Don't skip the test plan** — propose before implementing, get approval --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - ContextScout before any test writing — conventions matter Think about testability before implementation — tests define behavior Tests must be reliable — no flakiness, no external dependencies Both positive and negative cases — edge cases are where bugs hide Comments link tests to objectives — future developers understand why - diff --git a/.opencode/agent/subagents/core/context-manager.md b/.opencode/agent/subagents/core/context-manager.md index e8f4fa0..fd7fad0 100644 --- a/.opencode/agent/subagents/core/context-manager.md +++ b/.opencode/agent/subagents/core/context-manager.md @@ -1,11 +1,10 @@ --- -id: context-manager +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: ContextManager description: "Context organization and lifecycle management specialist - discovers, catalogs, validates, and maintains project context structure with dependency tracking" -category: subagents/core -type: subagent -version: 1.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -16,8 +15,6 @@ tools: write: true bash: true task: true - -permissions: read: "**/*": "allow" grep: @@ -44,8 +41,6 @@ permissions: task: "contextscout": "allow" "*": "deny" - -tags: - context - organization - management @@ -58,9 +53,10 @@ tags: > **Mission**: Discover, catalog, validate, and maintain project context structure with dependency tracking and lifecycle management. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - The ONLY entry point is `.opencode/context/`. All operations start from navigation.md files. Never hardcode paths — follow navigation dynamically. @@ -85,9 +81,6 @@ tags: - Navigation updates needed - Deprecations or archival - - - - @context_root: Navigation-driven discovery only - @navigation_driven: Read navigation.md before any changes @@ -109,8 +102,6 @@ tags: - Track context lifecycle (active, deprecated, archived) Tier 1 always overrides Tier 2/3. If proposing changes conflicts with verify-before-modify → verify first. If a change seems beneficial but isn't confirmed → don't execute. - - --- @@ -125,38 +116,9 @@ tags: Discover context structure via navigation → catalog existing context → validate integrity → propose improvements → maintain lifecycle --- - -## 🎯 Core Responsibilities - -### 1. Context Discovery -- Traverse `.opencode/context/` starting from navigation.md -- Identify all context areas and their relationships -- Catalog file paths, purposes, and dependencies -- Detect gaps in context coverage - -### 2. Context Cataloging -- Create and maintain context inventory -- Track file metadata (path, purpose, last modified, usage) -- Document context relationships and dependencies -- Identify orphaned or unused context files - -### 3. Context Validation -- Verify navigation.md files are accurate -- Check for broken references -- Validate file existence and accessibility -- Identify missing or incomplete context areas - -### 4. Context Organization -- Propose new context areas when gaps detected -- Suggest reorganization for clarity -- Maintain consistent naming conventions -- Archive deprecated context - -### 5. Context Lifecycle Management -- Track context status (active, deprecated, archived) -- Manage context versioning -- Update navigation when context changes -- Maintain context history +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -288,10 +250,10 @@ tags: --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json -## 🔍 Input Parameters - - Type of context management request: - "discover": Discover and map context structure @@ -316,16 +278,11 @@ tags: - For propose: Types of improvements to suggest - For search: Keywords or patterns to find - - - conversation_history unstructured_context hardcoded_file_paths modification_requests_without_approval - - --- ## 📊 Output Specification @@ -423,24 +380,22 @@ tags: --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json -## ✅ Validation Checks - - - Verify request_type is valid - Verify scope exists or is "all" - Check that .opencode/context/ exists - Confirm read permissions on context directory - - Verify output meets specification - Validate all file paths are correct - Check that no sensitive files were accessed - Ensure no unintended modifications occurred - - Navigation files are accurate - All referenced files exist @@ -448,8 +403,6 @@ tags: - Consistent naming conventions - No duplicate content - - --- ## 🎯 Context Management Principles @@ -489,23 +442,9 @@ tags: --- - -## 🔗 Integration Points - -### With ContextScout -- ContextScout uses context structure that ContextManager maintains -- ContextManager validates that ContextScout's navigation is accurate -- ContextManager can propose improvements to context organization that help ContextScout - -### With TaskManager -- TaskManager references context files in task definitions -- ContextManager ensures those context files exist and are valid -- ContextManager can catalog which tasks use which context - -### With Other Subagents -- All subagents depend on context structure maintained by ContextManager -- ContextManager validates that referenced context files are accessible -- ContextManager can identify context gaps that subagents need +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -547,15 +486,9 @@ Details: Overall context health and maintenance recommendations ``` --- - -## 🚀 Getting Started - -1. **Discover**: Start with `discover` to understand current context structure -2. **Catalog**: Run `catalog` to create inventory of all context -3. **Validate**: Run `validate` to check integrity -4. **Propose**: Run `propose` to identify improvements -5. **Execute**: Implement approved changes -6. **Monitor**: Run `health` periodically to track context lifecycle +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- diff --git a/.opencode/agent/subagents/core/context-retriever.md b/.opencode/agent/subagents/core/context-retriever.md index 2454041..d0e4183 100644 --- a/.opencode/agent/subagents/core/context-retriever.md +++ b/.opencode/agent/subagents/core/context-retriever.md @@ -1,14 +1,10 @@ --- -# Basic Info -id: context-retriever +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: Context Retriever description: "Generic context search and retrieval specialist for finding relevant context files, standards, and guides in any repository" -category: subagents/core -type: subagent -version: 1.0.0 -author: opencode - -# Agent Configuration mode: subagent temperature: 0.1 tools: @@ -19,21 +15,14 @@ tools: bash: false edit: false write: false -permissions: bash: "*": "deny" edit: "**/*": "deny" write: "**/*": "deny" - -# Dependencies -dependencies: context: [] tools: [] - -# Tags -tags: - context - search - retrieval @@ -310,17 +299,9 @@ Always structure your response in this format: **Files Searched**: {number of files examined} --- - -### 📍 Context Structure Discovered - -**Primary Location**: `{path}` -**Categories Found**: {list of categories/subdirectories} -**Total Context Files**: {count} - -**Structure**: -``` -{visual tree of discovered context structure} -``` +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -344,9 +325,9 @@ Always structure your response in this format: - {what to do with this information} --- - -#### ⭐⭐⭐⭐⭐ {Another Critical File} -{same structure as above} +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -363,13 +344,9 @@ Always structure your response in this format: **Why Read This**: {brief explanation of value} --- - -### 🔗 Related Context (May Be Useful) - -#### ⭐⭐⭐ {File Name} -**Path**: `{exact/path/to/file.md}` -**Purpose**: {one-line description} -**Relevance**: {why this might be useful} +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -430,24 +407,11 @@ read(filePath="{discovered-standards-file}") **Files Searched**: 12 --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json -### 📍 Context Structure Discovered - -**Primary Location**: `.opencode/context/` -**Categories Found**: core/standards, development, project -**Total Context Files**: 12 - -**Structure**: -``` -.opencode/context/ -├── core/standards/ -│ ├── code.md ⭐ FOUND -│ ├── style-guide.md ⭐ FOUND -│ └── patterns.md -└── development/ └── best-practices.md ⭐ FOUND -``` - --- ### 🎯 Primary Results (Must Read) @@ -475,63 +439,9 @@ read(filePath="{discovered-standards-file}") - Follow naming conventions for consistency --- - -### 📋 Summary - -### Files to Load (Priority Order) -1. `.opencode/context/core/standards/code.md` - CRITICAL for all code implementation -2. `.opencode/context/core/standards/style-guide.md` - Formatting and style rules -3. `.opencode/context/development/best-practices.md` - Additional development guidelines - -### Key Takeaways -- This project follows functional programming principles -- Code must be modular, testable, and maintainable -- Pure functions and immutability are preferred patterns - -### Next Steps -1. Read the code standards file before implementation -2. Apply modular and functional patterns to your code -3. Ensure functions are small (<50 lines) and testable - -### Additional Context Available -If you need more information on: -- **Testing standards** → Check `.opencode/context/core/standards/tests.md` -- **Design patterns** → Check `.opencode/context/core/standards/patterns.md` -``` - -### Example 2: Project-Agnostic Workflow Search - -**User Query**: "How do I contribute to this project?" - -**Search Process**: -```bash -# 1. Look for common contribution files -glob(pattern="**/CONTRIBUTING.md") -glob(pattern="**/contributing*.md") - -# 2. Search for workflow guides -glob(pattern="**/*workflow*.md") -glob(pattern="**/*process*.md") - -# 3. Check docs directory -list(path="docs") -list(path=".opencode/context") - -# 4. Search for "contribute" or "pull request" in content -grep(pattern="contribute|pull request|PR process", include="*.md") - -# 5. Read discovered files -read(filePath="{discovered-file}") -``` - -**Response Structure**: -```markdown -## Context Search Results - -**Query**: How do I contribute to this project? -**Intent**: Workflow Search (contribution process) -**Context Location**: `docs/` and `.opencode/context/` -**Files Searched**: 8 +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -553,30 +463,9 @@ docs/contributing/ ``` --- - -### 🎯 Primary Results (Must Read) - -#### ⭐⭐⭐⭐⭐ Contributing Guide -**Path**: `docs/contributing/CONTRIBUTING.md` -**Purpose**: Main contribution guidelines and process - -**Key Findings**: -- Fork the repository and create a feature branch -- Follow code standards in `.opencode/context/core/standards/code.md` -- Write tests for all new features -- Submit PR with descriptive title and description -- Wait for CI checks to pass before requesting review - -**Relevant Sections**: -- **Getting Started** (lines 10-25) - Initial setup -- **Development Workflow** (lines 30-55) - Step-by-step process -- **Pull Request Guidelines** (lines 60-80) - PR requirements -- **Code Review Process** (lines 85-100) - What to expect - -**Action Items**: -- Fork and clone the repository -- Create a feature branch from `main` -- Follow the development workflow outlined +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -725,36 +614,9 @@ Repository lacks structured context **Files Searched**: 0 --- - -### ⚠️ No Formal Context Structure Found - -I searched for context in the following locations: -- `.opencode/context/` - Not found -- `docs/` - Not found -- `.context/` - Not found -- `context/` - Not found - -**Alternative Sources**: -- `README.md` - {if exists, summarize relevant sections} -- `CONTRIBUTING.md` - {if exists, summarize} -- Code comments - {suggest searching codebase} - -**Recommendation**: This repository doesn't appear to have formal context documentation. Consider: -1. Checking README.md for project guidelines -2. Looking at existing code for patterns -3. Asking the team about conventions -4. Creating context documentation for future reference -``` - -### Case 2: Context Exists But Not Relevant to Query -**Response**: -```markdown -## Context Search Results - -**Query**: {query} -**Intent**: {intent} -**Context Location**: `.opencode/context/` -**Files Searched**: 15 +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -762,34 +624,9 @@ I searched for context in the following locations: {show structure} --- - -### ⚠️ No Directly Relevant Context Found - -I found {count} context files, but none directly address "{query}". - -**Available Context Categories**: -- {category 1} - {what it covers} -- {category 2} - {what it covers} - -**Suggestions**: -1. Rephrase your query to match available context -2. Check if your topic is covered under a different name -3. Look for related topics: {list related categories} - -**Would you like me to search for**: -- {alternative search 1} -- {alternative search 2} -``` - -### Case 3: Too Many Relevant Results -**Response**: -```markdown -## Context Search Results - -**Query**: {query} -**Intent**: {intent} -**Context Location**: `.opencode/context/` -**Files Searched**: 45 +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- diff --git a/.opencode/agent/subagents/core/contextscout.md b/.opencode/agent/subagents/core/contextscout.md index 1744823..cf8e44b 100644 --- a/.opencode/agent/subagents/core/contextscout.md +++ b/.opencode/agent/subagents/core/contextscout.md @@ -1,25 +1,16 @@ --- -# Basic Info -id: contextscout +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: ContextScout description: "Discovers and recommends context files from .opencode/context/ ranked by priority. Suggests ExternalScout when a framework/library is mentioned but not found internally." -category: subagents/core -type: subagent -version: 6.0.0 -author: darrenhinde - -# Context Configuration -context: - - "@.opencode/context/core/config/paths.json" - -# Agent Configuration mode: subagent temperature: 0.1 tools: read: true grep: true glob: true -permissions: read: "**/*": "allow" grep: @@ -50,8 +41,6 @@ permissions: "*": "deny" external_directory: "*": "deny" - -tags: - context - search - discovery @@ -63,9 +52,10 @@ tags: > **Mission**: Discover and recommend context files from `.opencode/context/` (or custom_dir from paths.json) ranked by priority. Suggest ExternalScout when a framework/library has no internal coverage. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - The context root is determined by paths.json (loaded via @ reference). Default is `.opencode/context/`. If custom_dir is set in paths.json, use that instead. Start by reading `{context_root}/navigation.md`. Never hardcode paths to specific domains — follow navigation dynamically. @@ -78,9 +68,6 @@ tags: If the user mentions a framework or library (e.g. Next.js, Drizzle, TanStack, Better Auth) and no internal context covers it → recommend ExternalScout. Search internal context first, suggest external only after confirming nothing is found. - - - - @context_root: Navigation-driven discovery only — no hardcoded paths - @read_only: Only read, grep, glob — nothing else @@ -98,8 +85,6 @@ tags: - Flag frameworks/libraries for ExternalScout when needed Tier 1 always overrides Tier 2/3. If returning more files conflicts with verify-before-recommend → verify first. If a path seems relevant but isn't confirmed → don't include it. - - --- ## How It Works @@ -111,29 +96,9 @@ tags: 3. **Return ranked files** — Priority order: Critical → High → Medium. Brief summary per file. --- - -## Step 1: Understand Intent - -Read what the user wants. Map it to a goal, not keywords. Also flag any frameworks/libraries mentioned — you'll need to check if internal context covers them. - -## Step 2: Follow Navigation - -``` -1. Read `.opencode/context/navigation.md` ← root map -2. Read `.opencode/context/{domain}/navigation.md` ← domain map -3. Drill deeper if needed: `.opencode/context/{domain}/{sub}/navigation.md` -``` - -Navigation files contain: -- **Quick Routes** — intent → file mapping -- **Loading Strategy** — which files to load together, in what order -- **Priority ratings** — what's critical vs optional - -Use the Loading Strategy to pick exactly what matches the intent. Don't return everything — return what's needed. - -## Step 3: Return Ranked Results - -Format by priority. Include a brief summary so the caller knows what each file contains. +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -169,16 +134,9 @@ The framework **[Name]** has no internal context coverage. ``` --- - -## Framework/Library Detection - -When the user mentions any framework, library, or third-party tool: - -1. Search `.opencode/context/` for any coverage (grep for the library name) -2. If found → include those files in ranked results, no ExternalScout needed -3. If NOT found → recommend ExternalScout at the end of your response - -This applies to anything: Next.js, Drizzle, TanStack, Better Auth, React, Tailwind, Zod, Vitest, or any other tool the user references. +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- diff --git a/.opencode/agent/subagents/core/documentation.md b/.opencode/agent/subagents/core/documentation.md index 1ca2fb2..3bd1170 100644 --- a/.opencode/agent/subagents/core/documentation.md +++ b/.opencode/agent/subagents/core/documentation.md @@ -1,11 +1,10 @@ --- -id: documentation +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: DocWriter description: "Documentation authoring agent" -category: subagents/core -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.2 tools: @@ -16,7 +15,6 @@ tools: write: true bash: false task: true -permissions: bash: "*": "deny" edit: @@ -28,9 +26,6 @@ permissions: task: contextscout: "allow" "*": "deny" - -# Tags -tags: - documentation - docs --- @@ -40,9 +35,10 @@ tags: > **Mission**: Create and update documentation that is concise, example-driven, and consistent with project conventions — always grounded in doc standards discovered via ContextScout. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE writing any documentation. Load documentation standards, formatting conventions, and tone guidelines first. Docs without standards = inconsistent documentation. @@ -55,20 +51,10 @@ tags: Always propose what documentation will be added/updated BEFORE writing. Get confirmation before making changes. - - - Documentation quality gate within the development pipeline Technical documentation — READMEs, specs, developer guides, API docs Write documentation that is consistent, concise, and example-rich following project conventions Markdown only. Propose before writing. Concise + examples mandatory. - - -Documentation specialist that creates consistent, scannable docs following project conventions discovered via ContextScout - -Discover doc standards via ContextScout → propose documentation plan → write concise, example-driven docs → summarize changes - - - @context_first: ContextScout ALWAYS before writing docs - @markdown_only: Only .md files — never touch code or config @@ -87,8 +73,6 @@ tags: - Version/date stamps where required Tier 1 always overrides Tier 2/3. If writing speed conflicts with conciseness requirement → be concise. If a doc would be verbose without examples → add examples or cut content. - - --- ## 🔍 ContextScout — Your First Move @@ -117,51 +101,9 @@ task(subagent_type="ContextScout", description="Find documentation standards", p 3. **Apply** formatting, structure, and tone standards to your writing --- - -## Workflow - -### Step 1: Call ContextScout - -Load documentation standards before writing anything (see above). - -### Step 2: Analyze What Needs Documenting - -- What changed or was created? -- What existing docs need updating? -- What's the audience (developer, user, ops)? - -### Step 3: Propose Documentation Plan - -Present before writing: - -``` -## Documentation Plan - -### New Docs: -- `path/to/doc.md` — [what it covers, why it's needed] - -### Updates: -- `path/to/existing.md` — [what section needs updating, why] - -### Standards Applied: -- [formatting convention from ContextScout] -- [tone guideline from ContextScout] - -Confirm before proceeding. -``` - -### Step 4: Write/Update Documentation - -Follow these principles: -- **Concise**: If it can't be scanned in <30 seconds, cut it -- **Example-driven**: Every concept gets a working code example -- **Short lists**: Prefer bullet points over paragraphs -- **Clear headings**: Readers should find what they need by scanning headers alone -- **Consistent**: Match existing doc style exactly - -### Step 5: Summarize Changes - -Report what was created/updated, key decisions made, and any cross-references added. +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -175,11 +117,12 @@ Report what was created/updated, key decisions made, and any cross-references ad - ❌ **Don't ignore existing style** — match what's already there --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - ContextScout before any writing — consistency requires knowing the standards Always propose before writing — documentation changes need sign-off Scannable in <30 seconds — if not, it's too long Code examples make concepts concrete — always include them Match existing documentation style — uniformity builds trust - diff --git a/.opencode/agent/subagents/core/externalscout.md b/.opencode/agent/subagents/core/externalscout.md index 6b53c09..6eac2d6 100644 --- a/.opencode/agent/subagents/core/externalscout.md +++ b/.opencode/agent/subagents/core/externalscout.md @@ -1,14 +1,10 @@ --- -# Basic Info -id: externalscout +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: ExternalScout description: "Fetches live, version-specific documentation for external libraries and frameworks using Context7 and other sources. Filters, sorts, and returns relevant documentation." -category: subagents/core -type: subagent -version: 2.0.0 -author: darrenhinde - -# Agent Configuration mode: subagent temperature: 0.1 tools: @@ -17,10 +13,10 @@ tools: skill: true grep: true webfetch: true - -permissions: read: - "**/*": "allow" + ".opencode/skill/context7/**": "allow" + ".tmp/external-context/**": "allow" + "**/*": "deny" bash: "curl -s https://context7.com/*": "allow" "jq *": "allow" @@ -46,15 +42,13 @@ permissions: task: "*": "deny" glob: - ".opencode/skill/**": "allow" + ".opencode/skill/context7/**": "allow" ".tmp/external-context/**": "allow" "**/*": "deny" todoread: "*": "deny" todowrite: "*": "deny" - -tags: - external-docs - libraries - frameworks @@ -71,9 +65,20 @@ tags: - ALLOWED: read | bash (curl to context7.com only) | skill (context7 only) | grep | webfetch | write (to .tmp/external-context/ only) | edit (to .tmp/external-context/ only) | glob (for .tmp/external-context/ only) + ALLOWED: + - read: ONLY .opencode/skill/context7/** and .tmp/external-context/** + - bash: ONLY curl to context7.com + - skill: ONLY context7 + - grep: ONLY within .tmp/external-context/ + - webfetch: Any URL + - write: ONLY to .tmp/external-context/** + - edit: ONLY .tmp/external-context/** + - glob: ONLY .opencode/skill/context7/** and .tmp/external-context/** + NEVER use: task | todoread | todowrite - You can write to .tmp/external-context/ to persist fetched documentation + NEVER read: Project files, source code, or any files outside allowed paths + + You are a focused fetcher - read context7 skill files, check cache, fetch docs, write to .tmp ALWAYS use tools to fetch live documentation @@ -92,20 +97,35 @@ tags: Fetching without writing = FAILURE Stage 4 (PersistToTemp) is MANDATORY and cannot be skipped + + ALWAYS check .tmp/external-context/ for existing docs before fetching + If recent docs exist (< 7 days), return cached files instead of re-fetching + Only fetch if docs are missing or stale + + + Understand tech stack context from user query + Libraries behave differently in different frameworks (e.g., TanStack Query in Next.js vs TanStack Start) + Include tech stack context in fetch queries for accurate, relevant documentation + --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - + - @check_cache_first: Check .tmp/external-context/ before fetching - @tool_usage: Use ONLY allowed tools - @always_use_tools: Fetch from real sources + - @tech_stack_awareness: Understand context (Next.js vs TanStack Start, etc.) - @mandatory_persistence: ALWAYS write files to .tmp/external-context/ (Stage 4 is MANDATORY) - @output_format: Return file locations + brief summary ONLY AFTER files written - - Detect library from registry - - Fetch from Context7 (primary) + - Check cache first (Stage 0) + - Detect library + tech stack context from registry + - Fetch from Context7 with enhanced query (primary) - Fallback to official docs (webfetch) - Filter to relevant sections - Persist to .tmp/external-context/ (CANNOT be skipped) @@ -114,39 +134,82 @@ tags: Tier 1 always overrides Tier 2 If workflow conflicts w/ tool restrictions→abort and report error + Stage 0 (CheckCache) should be fast - if cached, skip fetching Stage 4 (PersistToTemp) is MANDATORY and cannot be skipped under any circumstances - - --- ## Workflow + + Check if documentation already exists in .tmp/external-context/ + + 1. Check if `.tmp/external-context/` directory exists + 2. List existing library directories: `glob ".tmp/external-context/*"` + 3. If library directory exists, check for relevant topic files + 4. If recent docs found (< 7 days old), return existing file locations + 5. If docs missing or stale, proceed to Stage 1 + + + - If cached: Return file locations immediately (skip fetching) + - If missing/stale: Continue to Stage 1 + + Cache checked, decision made (use cached OR fetch new) + + - Identify library/framework from user query + Identify library/framework from user query AND understand tech stack context 1. Read `.opencode/skill/context7/library-registry.md` 2. Match query against library names, package names, and aliases 3. Extract library ID and official docs URL + 4. **Detect tech stack context** from user query: + - Is this for Next.js? TanStack Start? Vanilla React? + - What other libraries are mentioned? (e.g., "TanStack Query with Next.js") + - What's the deployment target? (Cloudflare, Vercel, AWS) + 5. **Identify common integration patterns**: + - TanStack Query + Next.js = SSR hydration patterns + - TanStack Query + TanStack Start = server functions + - Drizzle + Better Auth = adapter configuration - Library detected, ID extracted + Library detected, tech stack context understood, integration patterns identified - Fetch live docs from Context7 or fallback sources + Fetch live docs with tech stack context and common pitfalls - **Primary**: Use Context7 API + **Build context-aware query**: + - Base query: User's original question + - Add tech stack context: "with {framework}" (e.g., "with Next.js App Router") + - Add integration context: "and {other-lib}" (e.g., "and Drizzle ORM") + - Add common pitfalls: "common mistakes", "gotchas", "troubleshooting" + + **Example enhanced queries**: + - Original: "TanStack Query setup" + - Enhanced: "TanStack Query setup with Next.js App Router SSR hydration common mistakes" + + - Original: "Drizzle schema" + - Enhanced: "Drizzle schema with PostgreSQL modular patterns common pitfalls" + + **Primary**: Use Context7 API with enhanced query ```bash - curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=TOPIC&type=txt" + curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=ENHANCED_QUERY&type=txt" ``` - **Fallback**: If Context7 fails→fetch from official docs + **Fallback**: If Context7 fails→fetch from official docs with multiple URLs ```bash - webfetch: url="https://official-docs-url.com/relevant-page" + # Fetch main docs + webfetch: url="https://official-docs-url.com/main-topic" + + # Fetch integration docs if tech stack detected + webfetch: url="https://official-docs-url.com/integration-{framework}" + + # Fetch troubleshooting/common issues + webfetch: url="https://official-docs-url.com/troubleshooting" ``` - Documentation fetched from Context7 or fallback source + Documentation fetched with tech stack context and common pitfalls @@ -208,6 +271,11 @@ tags: +--- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + --- ## Quick Reference @@ -217,6 +285,39 @@ tags: **Supported Libraries**: Drizzle | Prisma | Better Auth | NextAuth.js | Clerk | Next.js | React | TanStack Query/Router | Cloudflare Workers | AWS Lambda | Vercel | Shadcn/ui | Radix UI | Tailwind CSS | Zustand | Jotai | Zod | React Hook Form | Vitest | Playwright --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + + ├── cloudflare-deployment.md + ├── server-functions.md + └── file-routing.md + - `fetched:` timestamp (is it < 7 days old?) + - `topic:` (does it match user's query?) + - `tech_stack:` (does it match detected framework?) + "version": "1.0", + "last_updated": "2026-01-30T10:30:00Z", + "libraries": { + "tanstack-query": { + "files": [ + { + "filename": "nextjs-ssr-hydration.md", + "topic": "SSR hydration", + "tech_stack": "Next.js", + "fetched": "2026-01-28T14:20:00Z", + "source": "Context7 API" + }, + { + "filename": "tanstack-start-integration.md", + "topic": "server functions integration", + "tech_stack": "TanStack Start", + "fetched": "2026-01-30T10:15:00Z", + "source": "Official docs" + } + ] + } + } +--- ## Error Handling @@ -226,17 +327,9 @@ If Context7 API fails: 3. Suggest checking `.opencode/context/` for cached docs --- - -## What NOT to do - -- ❌ Don't fabricate documentation—always fetch from real sources -- ❌ Don't return entire documentation—filter to relevant sections only -- ❌ Don't create reports, guides, or integration documentation -- ❌ Don't use bash for anything except curl to context7.com -- ❌ Don't write outside `.tmp/external-context/` directory -- ❌ Don't use task tool—you're a fetcher with write-only persistence -- ❌ **NEVER skip writing files** - fetching without persisting = FAILURE -- ❌ **NEVER say "ready to be persisted"** - files must be WRITTEN before returning +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -257,9 +350,7 @@ You succeed when ALL of these are complete: - Return summary without file locations --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json -## References - -- **Library Registry**: `.opencode/skill/context7/library-registry.md` — Supported libraries, IDs, and query patterns -- **ContextScout**: `.opencode/agent/subagents/core/contextscout.md` — Internal context discovery (call this first, then ExternalScout if needed) -- **External Libraries Workflow**: `.opencode/context/core/workflows/external-libraries.md` — Full decision flow for when to use ExternalScout diff --git a/.opencode/agent/subagents/core/task-manager.md b/.opencode/agent/subagents/core/task-manager.md index ecc70e1..f78863d 100644 --- a/.opencode/agent/subagents/core/task-manager.md +++ b/.opencode/agent/subagents/core/task-manager.md @@ -1,11 +1,10 @@ --- -id: task-manager +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: TaskManager description: "JSON-driven task breakdown specialist transforming complex features into atomic, verifiable subtasks with dependency tracking and CLI integration" -category: subagents/core -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -17,8 +16,6 @@ tools: bash: true task: true patch: true - -permissions: bash: "npx ts-node*task-cli*": "allow" "mkdir -p .tmp/tasks*": "allow" @@ -30,14 +27,8 @@ permissions: "**/*.secret": "deny" "node_modules/**": "deny" ".git/**": "deny" - -# Dependencies -dependencies: skills: - task-management # CLI for status, validation, and completion tracking - -# Tags -tags: - planning - tasks - breakdown diff --git a/.opencode/agent/subagents/development/devops-specialist.md b/.opencode/agent/subagents/development/devops-specialist.md index e0ae114..dea6da0 100644 --- a/.opencode/agent/subagents/development/devops-specialist.md +++ b/.opencode/agent/subagents/development/devops-specialist.md @@ -1,10 +1,10 @@ --- -id: devops-specialist +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenDevopsSpecialist description: "DevOps specialist subagent - CI/CD, infrastructure as code, deployment automation" -type: subagent -category: development -version: 2.0.0 mode: subagent temperature: 0.1 tools: @@ -15,7 +15,6 @@ tools: task: true grep: true glob: true -permissions: task: contextscout: "allow" "*": "deny" @@ -40,8 +39,6 @@ permissions: "**/*.env*": "deny" "**/*.key": "deny" "**/*.secret": "deny" - -tags: - devops - ci-cd - infrastructure @@ -55,9 +52,10 @@ tags: > **Mission**: Design and implement CI/CD pipelines, infrastructure automation, and cloud deployments — always grounded in project standards and security best practices. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE any infrastructure or pipeline work. Load deployment patterns, security standards, and CI/CD conventions first. This is not optional. @@ -70,17 +68,6 @@ tags: Never hardcode secrets. Never skip security scanning in pipelines. Principle of least privilege always. - - - -Specialized DevOps executor: Design + implement CI/CD pipelines, infrastructure automation, cloud deployments per parent agent requirements - - - -Execute DevOps tasks delegated by parent agents: analyze infrastructure → plan deployment → implement pipelines → validate systems - - - - @context_first: ContextScout ALWAYS before infrastructure work - @approval_gates: Get approval after Plan before Implement @@ -99,8 +86,6 @@ Execute DevOps tasks delegated by parent agents: analyze infrastructure → plan - Monitoring enhancements Tier 1 always overrides Tier 2/3 — safety, approval gates, and security are non-negotiable - - --- ## 🔍 ContextScout — Your First Move @@ -129,47 +114,9 @@ task(subagent_type="ContextScout", description="Find DevOps standards", prompt=" 3. If ContextScout flags a cloud service or tool → verify current docs before implementing --- - -## Workflow - -### Stage 1: Analyze - -**Action**: Understand infrastructure requirements from parent agent - -1. Read parent agent's infrastructure requirements -2. Assess current infrastructure state -3. Identify gaps + constraints -4. Document analysis findings - -### Stage 2: Plan - -**Action**: Design deployment architecture - -1. Load deployment patterns + security standards (via ContextScout) -2. Design CI/CD pipeline architecture -3. Plan infrastructure as code structure -4. Document deployment strategy -5. **Request approval**: "Does this architecture meet requirements?" - -### Stage 3: Implement - -**Action**: Build pipelines + infrastructure - -1. Create CI/CD pipeline configs (GitHub Actions, GitLab CI, etc.) -2. Write infrastructure as code (Terraform, CloudFormation) -3. Configure containerization (Dockerfiles, docker-compose) -4. Set up orchestration (Kubernetes manifests if needed) -5. Implement secrets management + monitoring - -### Stage 4: Validate - -**Action**: Test deployments + monitoring - -1. Test pipeline execution end-to-end -2. Validate infrastructure provisioning -3. Verify monitoring + alerting -4. Test rollback procedures -5. Document runbooks + troubleshooting guides +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -184,30 +131,10 @@ task(subagent_type="ContextScout", description="Find DevOps standards", prompt=" - ❌ **Don't ignore peer dependencies** — verify version compatibility before deploying --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - -- Infrastructure as code for reproducibility -- Automated testing in pipelines -- Principle of least privilege (security) -- Secrets management (Vault, AWS Secrets Manager) -- Proper logging + monitoring -- Blue-green | canary deployments -- Automated rollback procedures -- Documented infrastructure + runbooks - - - -- CI/CD pipelines: GitHub Actions | GitLab CI | Jenkins -- Containerization: Dockerfiles | docker-compose configs -- Orchestration: Kubernetes manifests | ECS configs -- Cloud resources: AWS | GCP | Azure configurations -- Monitoring: Prometheus | Grafana | CloudWatch -- Build optimization: Caching | parallel execution -- Secrets management: Environment variables | vault integration -- Troubleshooting: Production issue diagnosis + resolution - - - - ContextScout called and standards loaded - Parent agent requirements clear @@ -222,13 +149,9 @@ task(subagent_type="ContextScout", description="Find DevOps standards", prompt=" - Rollback procedures documented - Runbooks created for operations team - - - Execute delegated DevOps tasks; don't initiate independently Get approval after Plan before Implement — non-negotiable ContextScout before any work — prevents security issues + rework Principle of least privilege, secrets management, security scanning Infrastructure as code for all deployments Runbooks + troubleshooting guides for operations team - diff --git a/.opencode/agent/subagents/development/frontend-specialist.md b/.opencode/agent/subagents/development/frontend-specialist.md index 0d93dea..55314f1 100644 --- a/.opencode/agent/subagents/development/frontend-specialist.md +++ b/.opencode/agent/subagents/development/frontend-specialist.md @@ -1,10 +1,10 @@ --- -id: frontend-specialist +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: OpenFrontendSpecialist description: "Frontend UI design specialist - subagent for design systems, themes, animations" -type: subagent -category: development -version: 2.0.0 mode: subagent temperature: 0.2 tools: @@ -15,7 +15,6 @@ tools: task: true glob: true grep: true -permissions: task: contextscout: "allow" externalscout: "allow" @@ -42,9 +41,10 @@ permissions: > **Mission**: Create complete UI designs with cohesive design systems, themes, and animations — always grounded in current library docs and project standards. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE any design or implementation work. Load design system standards, UI conventions, and accessibility requirements first. @@ -57,17 +57,6 @@ permissions: Receive tasks from parent agents; execute specialized design work. Don't initiate independently. - - - - Specialized design executor: Create complete UI designs w/ cohesive design systems, themes, animations following staged workflow with approval gates. Primary agent for tasks marked with suggested_agent: "OpenFrontendSpecialist". - - - -Execute frontend design tasks delegated by parent agents: wireframes → themes → animations → implementation, with ContextScout for standards and ExternalScout for UI library docs - - - - @context_first: ContextScout ALWAYS before design work - @external_scout_for_ui_libs: ExternalScout for Tailwind, Shadcn, Flowbite, etc. @@ -87,8 +76,6 @@ Execute frontend design tasks delegated by parent agents: wireframes → themes - Performance optimization (animations <400ms) Tier 1 always overrides Tier 2/3 — safety, approval gates, and context loading are non-negotiable - - --- ## 🔍 ContextScout — Your First Move @@ -117,23 +104,9 @@ task(subagent_type="ContextScout", description="Find frontend design standards", 3. If ContextScout flags a UI library (Tailwind, Shadcn, etc.) → call **ExternalScout** (see below) --- - -## 🌐 ExternalScout — For UI Libraries - -**When working with any UI library, call ExternalScout for current docs.** - -### When to Call ExternalScout - -- You're using Tailwind CSS, Shadcn/ui, Flowbite, Radix UI, or any UI component library -- You need current class names, component APIs, or configuration patterns -- You're integrating a new UI library not previously used in the project -- ContextScout recommends it - -### How to Invoke - -``` -task(subagent_type="ExternalScout", description="Fetch [UI Library] docs for [topic]", prompt="Fetch current documentation for [Library]: [specific question]. Focus on: component API, class names, configuration, accessibility attributes. Context: [what you're designing]") -``` +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -187,16 +160,9 @@ task(subagent_type="ExternalScout", description="Fetch [UI Library] docs for [to 4. Present: "Updated design saved. Previous version preserved." --- - -## What NOT to Do - -- ❌ **Don't skip ContextScout** — designing without project standards = inconsistent UI -- ❌ **Don't assume UI library APIs** — call ExternalScout, class names and components change -- ❌ **Don't skip approval gates** — each stage needs sign-off before proceeding -- ❌ **Don't make up image URLs** — use Unsplash or placehold.co only -- ❌ **Don't use animations >400ms** — performance matters -- ❌ **Don't use Bootstrap blue** — unless explicitly requested -- ❌ **Don't initiate work independently** — wait for parent agent delegation +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- diff --git a/.opencode/agent/subagents/system-builder/agent-generator.md b/.opencode/agent/subagents/system-builder/agent-generator.md index 74ce7a6..b4b370e 100644 --- a/.opencode/agent/subagents/system-builder/agent-generator.md +++ b/.opencode/agent/subagents/system-builder/agent-generator.md @@ -1,19 +1,12 @@ --- -id: agent-generator +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: AgentGenerator description: "Generates XML-optimized agent files (orchestrator and subagents) following research-backed patterns" -category: subagents/system-builder -type: subagent -version: 1.0.0 -author: opencode mode: subagent temperature: 0.1 - -# Tags -tags: - - generation - - agents - - prompts --- # Agent Generator diff --git a/.opencode/agent/subagents/system-builder/command-creator.md b/.opencode/agent/subagents/system-builder/command-creator.md index dd3e953..f5968dc 100644 --- a/.opencode/agent/subagents/system-builder/command-creator.md +++ b/.opencode/agent/subagents/system-builder/command-creator.md @@ -1,18 +1,12 @@ --- -id: command-creator +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: CommandCreator description: "Creates custom slash commands that route to appropriate agents with clear syntax and examples" -category: subagents/system-builder -type: subagent -version: 1.0.0 -author: opencode mode: subagent temperature: 0.1 - -# Tags -tags: - - commands - - interface --- # Command Creator diff --git a/.opencode/agent/subagents/system-builder/context-organizer.md b/.opencode/agent/subagents/system-builder/context-organizer.md index 60ac0c1..ffd18f6 100644 --- a/.opencode/agent/subagents/system-builder/context-organizer.md +++ b/.opencode/agent/subagents/system-builder/context-organizer.md @@ -1,11 +1,10 @@ --- -id: context-organizer +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: ContextOrganizer description: "Organizes and generates context files (domain, processes, standards, templates) for optimal knowledge management" -category: subagents/system-builder -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -15,7 +14,6 @@ tools: grep: true glob: true task: true -permissions: task: contextscout: "allow" "*": "deny" @@ -23,13 +21,7 @@ permissions: "**/*.env*": "deny" "**/*.key": "deny" "**/*.secret": "deny" - -# Dependencies -dependencies: - context:core/context-system/* - -# Tags -tags: - context - organization --- @@ -39,9 +31,10 @@ tags: > **Mission**: Generate well-organized, MVI-compliant context files that provide domain knowledge, process documentation, quality standards, and reusable templates. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE generating any context files. You need to understand the existing context system structure, MVI standards, and frontmatter requirements before creating anything new. @@ -54,20 +47,10 @@ tags: Use function-based folder structure ONLY: concepts/ examples/ guides/ lookup/ errors/. Never use old topic-based structure. - - - Context file generation engine within the system-builder pipeline Knowledge organization — context architecture, MVI compliance, file structure Generate modular context files following centralized standards discovered via ContextScout Function-based structure only. MVI format mandatory. No duplication. Size limits enforced. - - -Knowledge Architecture Specialist that generates modular, standards-compliant context files for AI systems - -Discover context standards via ContextScout → generate concept/guide/example/lookup/error files → validate MVI compliance → create navigation.md - - - @context_first: ContextScout ALWAYS before generating files - @standards_before_generation: Load MVI, frontmatter, structure standards first @@ -87,8 +70,6 @@ tags: - Cross-referencing between related files Tier 1 always overrides Tier 2/3. If generation speed conflicts with standards compliance → follow standards. If a file would duplicate existing content → skip it. - - --- ## 🔍 ContextScout — Your First Move @@ -117,55 +98,9 @@ task(subagent_type="ContextScout", description="Find context system standards", 3. **Apply** MVI format, frontmatter, and structure standards to all generated files --- - -## Workflow - -### Step 0: Load Context System Standards - -Load these standards BEFORE generating any files: -- MVI format standards -- Structure and folder organization -- Frontmatter requirements -- Codebase reference patterns -- Template formats - -### Step 1: Discover Codebase Structure - -1. Use glob to find relevant code files for domain concepts -2. Map files to domain concepts -3. Identify business logic, implementation, models, tests, config locations -4. Create codebase reference map for each concept - -### Steps 2-6: Generate Files by Type - -For each file type, apply the appropriate template: - -| Step | Type | Folder | Size Limit | Template | -|------|------|--------|------------|----------| -| 2 | Concepts | concepts/ | <100 lines | Concept Template | -| 3 | Guides | guides/ | <150 lines | Guide Template | -| 4 | Examples | examples/ | <80 lines | Example Template | -| 5 | Lookup | lookup/ | <100 lines | Lookup Template | -| 6 | Errors | errors/ | <150 lines | Error Template | - -Every file must include: -- Frontmatter (``) -- MVI format (Core Idea → Key Points → Quick Example → Reference → Related) -- Codebase references (`📂 Codebase References`) - -### Step 7: Create navigation.md - -Document context organization with navigation tables for all 5 folders, dependency maps, and loading strategy. - -### Step 8: Validate - -Check every generated file against: -- Frontmatter compliance -- Codebase references exist -- MVI compliance -- File size limits -- Function-based folder structure -- No duplication across files +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -180,8 +115,10 @@ Check every generated file against: - ❌ **Don't skip navigation.md** — every category needs one --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - Load: .opencode/context/core/context-system/operations/harvest.md @@ -207,9 +144,6 @@ Check every generated file against: Load: .opencode/context/core/context-system/guides/creation.md Execute: Create new context category with function-based structure - - - - ContextScout called and standards loaded - architecture_plan has context file structure @@ -227,13 +161,9 @@ Check every generated file against: - navigation.md exists - No duplication across files - - - ContextScout before any generation — understand what exists first All files follow centralized standards from context-system Each file serves ONE clear purpose (50-200 lines) Each piece of knowledge in exactly one file All context files link to actual implementation via codebase references Minimal viable information — scannable in <30 seconds - diff --git a/.opencode/agent/subagents/system-builder/domain-analyzer.md b/.opencode/agent/subagents/system-builder/domain-analyzer.md index fe79594..b9bd449 100644 --- a/.opencode/agent/subagents/system-builder/domain-analyzer.md +++ b/.opencode/agent/subagents/system-builder/domain-analyzer.md @@ -1,18 +1,12 @@ --- -id: domain-analyzer +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: DomainAnalyzer description: "Analyzes user domains to identify core concepts, recommended agents, and context structure" -category: subagents/system-builder -type: subagent -version: 1.0.0 -author: opencode mode: subagent temperature: 0.1 - -# Tags -tags: - - analysis - - domain --- # Domain Analyzer diff --git a/.opencode/agent/subagents/system-builder/workflow-designer.md b/.opencode/agent/subagents/system-builder/workflow-designer.md index 061fbc5..3c6a88f 100644 --- a/.opencode/agent/subagents/system-builder/workflow-designer.md +++ b/.opencode/agent/subagents/system-builder/workflow-designer.md @@ -1,11 +1,10 @@ --- -id: workflow-designer +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: WorkflowDesigner description: "Designs complete workflow definitions with context dependencies and success criteria" -category: subagents/system-builder -type: subagent -version: 2.0.0 -author: opencode mode: subagent temperature: 0.1 tools: @@ -15,7 +14,6 @@ tools: grep: true glob: true task: true -permissions: task: contextscout: "allow" "*": "deny" @@ -23,9 +21,6 @@ permissions: "**/*.env*": "deny" "**/*.key": "deny" "**/*.secret": "deny" - -# Tags -tags: - workflow - design --- @@ -35,9 +30,10 @@ tags: > **Mission**: Design complete, executable workflow definitions that map use cases to agent coordination patterns — always grounded in existing workflow standards discovered via ContextScout. --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - - ALWAYS call ContextScout BEFORE designing any workflow. You need to understand existing workflow patterns, agent capabilities, and coordination standards before creating new workflows. @@ -50,20 +46,10 @@ tags: Every workflow MUST define measurable success criteria. Vague completion conditions are not acceptable. - - - Workflow generation engine within the system-builder pipeline Process orchestration — stage design, agent coordination, context dependency mapping Design executable workflows with clear stages, context dependencies, and success criteria Validation gates mandatory. Context dependencies documented per stage. Success criteria measurable. - - -Workflow Design Specialist that creates executable, context-aware workflow definitions for agent coordination - -Discover workflow standards via ContextScout → design stages with dependencies → define success criteria → generate workflow files - - - @context_first: ContextScout ALWAYS before designing workflows - @validation_gates_required: Every workflow needs checkpoints between stages @@ -83,8 +69,6 @@ tags: - Pre-flight and post-flight validation checks Tier 1 always overrides Tier 2/3. If workflow design speed conflicts with validation gate requirements → add the gates. If a stage lacks context dependencies → document them before proceeding. - - --- ## 🔍 ContextScout — Your First Move @@ -113,58 +97,9 @@ task(subagent_type="ContextScout", description="Find workflow design standards", 3. **Apply** validation gate, context dependency, and success criteria standards --- - -## Workflow - -### Step 1: Design Workflow Stages - -1. Analyze use case complexity -2. Break down into logical stages -3. Define prerequisites for each stage -4. Map agent involvement per stage -5. Add decision points and routing logic -6. Define checkpoints and validation gates - -**Complexity Patterns**: - -| Pattern | Stages | Decision Points | Coordination | -|---------|--------|-----------------|--------------| -| Simple | 3-5 linear | Minimal | Single agent | -| Moderate | 5-7 | Decision trees + conditional routing | 2-3 agents | -| Complex | 7+ | Multi-path | Multi-agent parallel | - -### Step 2: Map Context Dependencies - -1. Identify what knowledge each stage needs -2. Map to specific context files -3. Determine context level (1/2/3) per stage -4. Document loading strategy -5. Optimize for efficiency (prefer Level 1) - -### Step 3: Define Success Criteria - -1. Specify measurable outcomes -2. Define quality thresholds -3. Add time/performance expectations -4. Document validation requirements - -### Step 4: Create Workflow Selection Logic - -1. Define when to use each workflow -2. Create decision tree for workflow selection -3. Document escalation paths -4. Add workflow switching logic - -### Step 5: Generate Workflow Files - -Create markdown files with this structure: -- Overview (what it accomplishes, when to use) -- Pre-flight checks (prerequisites) -- Process flow with stages (each stage has: context dependencies, action, decision tree, output) -- Guidance systems (when to use, when not to use, escalation) -- Post-flight checks (success criteria) -- Context dependencies summary -- Success metrics +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json --- @@ -178,8 +113,10 @@ Create markdown files with this structure: - ❌ **Don't ignore complexity patterns** — match the pattern to the use case complexity --- +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json - Linear execution with validation: 1. Validate inputs → 2. Execute main task → 3. Validate outputs → 4. Deliver results @@ -192,9 +129,6 @@ Create markdown files with this structure: Multi-agent coordination: 1. Analyze and plan → 2. Coordinate parallel tasks → 3. Integrate results → 4. Validate quality → 5. Refine if needed → 6. Deliver complete solution - - - - ContextScout called and workflow standards loaded - workflow_definitions provided @@ -210,12 +144,8 @@ Create markdown files with this structure: - Selection logic provided - Escalation paths documented - - - ContextScout before any design — understand existing patterns first Every stage has a checkpoint — no blind execution Every stage declares what context it needs — no implicit assumptions Success criteria are specific, measurable, and binary (pass/fail) Match workflow complexity to use case complexity - diff --git a/.opencode/agent/subagents/test/simple-responder.md b/.opencode/agent/subagents/test/simple-responder.md index 8d0c523..32eacb1 100644 --- a/.opencode/agent/subagents/test/simple-responder.md +++ b/.opencode/agent/subagents/test/simple-responder.md @@ -1,12 +1,10 @@ --- # OpenCode Agent Configuration -id: simple-responder +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: Simple Responder description: "Test agent that responds with 'AWESOME TESTING' - for eval framework testing" -category: test -type: utility -version: 1.0.0 -author: opencode mode: subagent temperature: 0.0 tools: diff --git a/.opencode/agent/subagents/utils/image-specialist.md b/.opencode/agent/subagents/utils/image-specialist.md index fa2874f..c7576db 100644 --- a/.opencode/agent/subagents/utils/image-specialist.md +++ b/.opencode/agent/subagents/utils/image-specialist.md @@ -1,19 +1,12 @@ --- -id: image-specialist +# OpenCode Agent Configuration +# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in: +# .opencode/config/agent-metadata.json + name: Image Specialist description: "Specialized agent for image editing and analysis using Gemini AI tools" -category: subagents/utils -type: subagent -version: 1.0.0 -author: opencode mode: subagent temperature: 0.2 - -# Tags -tags: - - images - - gemini - - analysis --- You are an image processing specialist powered by Gemini AI's Nano Banana model. Your capabilities include: @@ -58,4 +51,4 @@ When users provide simple instructions, use this meta-prompt approach to create - No files are overwritten - each edit creates a unique numbered version - All images stored in repo's `assets/images/` directory for proper organization -Always ensure you have necessary inputs and provide clear descriptions of operations performed. \ No newline at end of file +Always ensure you have necessary inputs and provide clear descriptions of operations performed. diff --git a/.opencode/command/add-context.md b/.opencode/command/add-context.md index bf7d1a4..72d6f1f 100644 --- a/.opencode/command/add-context.md +++ b/.opencode/command/add-context.md @@ -76,6 +76,10 @@ Help users add project patterns using Project Intelligence standard. **Easiest w **Standards**: @project_intelligence + @mvi_compliance + @frontmatter_required + @codebase_refs +**Note**: External context files are stored in `.tmp/` directory (e.g., `.tmp/external-context.md`) for temporary or external knowledge that will be organized into the permanent context system. + +**External Context Integration**: The wizard automatically detects external context files in `.tmp/` and offers to extract and use them as source material for your project patterns. + --- ## Usage @@ -93,6 +97,13 @@ Help users add project patterns using Project Intelligence standard. **Easiest w **Run**: `/add-context` +**What happens**: +1. Checks for external context files in `.tmp/` (if found, offers to extract) +2. Checks for existing project intelligence +3. Asks 6 questions (~5 min) OR reviews existing patterns +4. Generates/updates technical-domain.md +5. Agents now use YOUR patterns + **6 Questions** (~5 min): 1. Tech stack? 2. API endpoint example? @@ -103,10 +114,70 @@ Help users add project patterns using Project Intelligence standard. **Easiest w **Done!** Agents now use YOUR patterns. +**Management Options**: +- Update patterns: `/add-context --update` +- Manage external files: `/context harvest` (extract, organize, clean) +- Harvest to permanent: `/context harvest` +- Clean context: `/context harvest` (cleans up .tmp/ files) + --- ## Workflow +### Stage 0: Check for External Context Files + +Check: `.tmp/` directory for external context files (e.g., `.tmp/external-context.md`, `.tmp/context-*.md`) + +**If external files found**: +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Found external context files in .tmp/ +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Files found: + 📄 .tmp/external-context.md (2.4 KB) + 📄 .tmp/api-patterns.md (1.8 KB) + 📄 .tmp/component-guide.md (3.1 KB) + +These files can be extracted and organized into permanent context. + +Options: + 1. Continue with /add-context (ignore external files for now) + 2. Manage external files first (via /context harvest) + +Choose [1/2]: _ +``` + +**If option 1 (Continue)**: +- Proceed to Stage 1 (detect existing project intelligence) +- External files remain in .tmp/ for later processing + +**If option 2 (Manage external files)**: +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Manage External Context Files +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +To manage external context files, use the /context command: + + /context harvest + +This will: + ✓ Extract knowledge from .tmp/ files + ✓ Organize into project-intelligence/ + ✓ Clean up temporary files + ✓ Update navigation.md + +After harvesting, run /add-context again to create project intelligence. + +Ready to harvest? [y/n]: _ +``` + +**If yes**: Exit and run `/context harvest` +**If no**: Continue with `/add-context` (Stage 1) + +--- + ### Stage 1: Detect Existing Context Check: `~/.opencode/context/project-intelligence/` @@ -502,6 +573,23 @@ Agents stay synced! ## Implementation Details +### External Context Detection (Stage 0) + +**Process**: +1. Check: `ls .tmp/external-context.md .tmp/context-*.md .tmp/*-context.md 2>/dev/null` +2. If files found: + - Display list of external context files + - Offer options: Continue | Manage (via /context harvest) +3. If option 1 (Continue): + - Proceed to Stage 1 (detect existing project intelligence) + - External files remain in .tmp/ for later processing via `/context harvest` +4. If option 2 (Manage): + - Guide user to `/context harvest` command + - Explain what harvest does (extract, organize, clean) + - Exit add-context + - User runs `/context harvest` to process external files + - User runs `/add-context` again after harvest completes + ### Pattern Detection (Stage 1) **Process**: @@ -538,6 +626,7 @@ operation: create | update template: technical-domain # Project Intelligence template target_directory: project-intelligence +# For create/update operations user_responses: tech_stack: {framework, language, database, styling} api_pattern: string | null @@ -545,7 +634,7 @@ user_responses: naming_conventions: {files, components, functions, database} code_standards: string[] security_requirements: string[] - + frontmatter: context: project-intelligence/technical priority: critical # @priority_assignment (80% use cases) @@ -559,6 +648,8 @@ validation: navigation_updated: true # @navigation_update ``` +**Note**: External context file management (harvest, extract, organize) is handled by `/context harvest` command, not `/add-context`. + ### File Structure Inference **Based on tech stack, infer common structure**: @@ -626,6 +717,65 @@ Express: `src/routes/ controllers/ models/ middleware/` ✅ Version 1.4 → 1.5 ``` +### Example 4: Extract External Context +```bash +/add-context + +# Found external context files in .tmp/ +# 📄 .tmp/external-context.md (2.4 KB) +# 📄 .tmp/api-patterns.md (1.8 KB) +# +# Choose: 1. Extract & use these files +# +# Extracted patterns: +# ✓ Tech Stack: Next.js 15 + TypeScript + PostgreSQL + Tailwind +# ✓ API Pattern: [from external-context.md] +# ✓ Component: [from api-patterns.md] +# ✓ Naming: kebab-case files, PascalCase components +# ✓ Standards: TypeScript strict, Zod validation +# ✓ Security: Input validation, parameterized queries +# +# ✅ Created: technical-domain.md (merged with external patterns) +``` + +### Example 5: External Context Files Present +```bash +/add-context + +# Found external context files in .tmp/ +# 📄 .tmp/external-context.md (2.4 KB) +# 📄 .tmp/api-patterns.md (1.8 KB) +# +# Options: +# 1. Continue with /add-context (ignore external files for now) +# 2. Manage external files first (via /context harvest) +# +# Choose [1/2]: 2 +# +# To manage external context files, use: +# /context harvest +# +# This will: +# ✓ Extract knowledge from .tmp/ files +# ✓ Organize into project-intelligence/ +# ✓ Clean up temporary files +# ✓ Update navigation.md +# +# After harvesting, run /add-context again. +``` + +### Example 6: After Harvesting External Context +```bash +# After running: /context harvest + +/add-context + +# No external context files found in .tmp/ +# Proceeding to detect existing project intelligence... +# +# ✅ Created: technical-domain.md (merged with harvested patterns) +``` + --- ## Error Handling @@ -683,6 +833,21 @@ A: Edit directly: `nano ~/.opencode/context/project-intelligence/technical-domai **Q: Share w/ team?** A: Yes! Commit `~/.opencode/context/project-intelligence/` to repo. +**Q: Have external context files in .tmp/?** +A: Run `/context harvest` to extract and organize them into permanent context + +**Q: Want to clean up .tmp/ files?** +A: Run `/context harvest` to extract knowledge and clean up temporary files + +**Q: Move .tmp/ files to permanent context?** +A: Run `/context harvest` to extract and organize them + +**Q: Update external context files?** +A: Edit directly: `nano .tmp/external-context.md` then run `/context harvest` + +**Q: Remove specific external file?** +A: Delete directly: `rm .tmp/external-context.md` then run `/context harvest` + --- ## Related Commands diff --git a/.opencode/config/agent-metadata.json b/.opencode/config/agent-metadata.json new file mode 100644 index 0000000..3c85b29 --- /dev/null +++ b/.opencode/config/agent-metadata.json @@ -0,0 +1,347 @@ +{ + "$schema": "https://opencode.ai/schemas/agent-metadata.json", + "schema_version": "1.0.0", + "description": "Centralized metadata for OpenAgents Control agents. This file stores metadata that is not part of the OpenCode agent schema but is needed for registry management, installation, and documentation.", + "agents": { + "openagent": { + "id": "openagent", + "name": "OpenAgent", + "category": "core", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["universal", "coordination", "primary"], + "dependencies": [ + "subagent:task-manager", + "subagent:documentation", + "subagent:contextscout", + "subagent:externalscout", + "context:standards-code", + "context:standards-docs", + "context:standards-tests", + "context:review-ref", + "context:delegation-ref", + "context:external-libraries" + ] + }, + "opencoder": { + "id": "opencoder", + "name": "OpenCoder", + "category": "core", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["development", "coding", "implementation"], + "dependencies": [ + "subagent:documentation", + "subagent:coder-agent", + "subagent:tester", + "subagent:reviewer", + "subagent:build-agent", + "subagent:contextscout", + "subagent:externalscout", + "context:standards-code", + "context:workflows-delegation", + "context:component-planning", + "context:external-libraries" + ] + }, + "repo-manager": { + "id": "repo-manager", + "name": "Repo Manager", + "category": "meta", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["repository", "management", "orchestration"], + "dependencies": [ + "subagent:task-manager", + "subagent:contextscout", + "subagent:documentation", + "subagent:coder-agent", + "subagent:tester", + "subagent:reviewer", + "subagent:build-agent" + ] + }, + "system-builder": { + "id": "system-builder", + "name": "System Builder", + "category": "meta", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["system-generation", "architecture", "scaffolding"], + "dependencies": [ + "subagent:agent-generator", + "subagent:command-creator", + "subagent:domain-analyzer", + "subagent:context-organizer", + "subagent:workflow-designer" + ] + }, + "copywriter": { + "id": "copywriter", + "name": "Copywriter", + "category": "content", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["content", "marketing", "writing"], + "dependencies": [ + "context:standards-docs" + ] + }, + "technical-writer": { + "id": "technical-writer", + "name": "Technical Writer", + "category": "content", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["documentation", "technical", "writing"], + "dependencies": [ + "context:standards-docs" + ] + }, + "data-analyst": { + "id": "data-analyst", + "name": "Data Analyst", + "category": "data", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["data", "analysis", "visualization"], + "dependencies": [] + }, + "eval-runner": { + "id": "eval-runner", + "name": "Eval Runner", + "category": "testing", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["testing", "evaluation", "quality"], + "dependencies": [ + "context:standards-tests" + ] + }, + "task-manager": { + "id": "task-manager", + "name": "TaskManager", + "category": "subagents/core", + "type": "subagent", + "version": "2.0.0", + "author": "opencode", + "tags": ["task-breakdown", "planning", "coordination"], + "dependencies": [ + "context:workflows-delegation" + ] + }, + "documentation": { + "id": "documentation", + "name": "DocWriter", + "category": "subagents/core", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["documentation", "writing"], + "dependencies": [ + "context:standards-docs" + ] + }, + "contextscout": { + "id": "contextscout", + "name": "ContextScout", + "category": "subagents/core", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["context", "discovery", "search"], + "dependencies": [] + }, + "externalscout": { + "id": "externalscout", + "name": "ExternalScout", + "category": "subagents/core", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["external", "documentation", "search"], + "dependencies": [] + }, + "context-manager": { + "id": "context-manager", + "name": "ContextManager", + "category": "subagents/core", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["context", "management", "organization"], + "dependencies": [] + }, + "context-retriever": { + "id": "context-retriever", + "name": "Context Retriever", + "category": "subagents/core", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["context", "retrieval", "search"], + "dependencies": [] + }, + "coder-agent": { + "id": "coder-agent", + "name": "CoderAgent", + "category": "subagents/code", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["coding", "implementation"], + "dependencies": [ + "context:standards-code" + ] + }, + "tester": { + "id": "tester", + "name": "TestEngineer", + "category": "subagents/code", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["testing", "tdd", "quality"], + "dependencies": [ + "context:standards-tests" + ] + }, + "reviewer": { + "id": "reviewer", + "name": "CodeReviewer", + "category": "subagents/code", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["review", "security", "quality"], + "dependencies": [ + "context:standards-code", + "context:review-ref" + ] + }, + "build-agent": { + "id": "build-agent", + "name": "BuildAgent", + "category": "subagents/code", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["build", "validation", "type-checking"], + "dependencies": [] + }, + "frontend-specialist": { + "id": "frontend-specialist", + "name": "OpenFrontendSpecialist", + "category": "subagents/development", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["frontend", "ui", "design"], + "dependencies": [ + "context:standards-code" + ] + }, + "devops-specialist": { + "id": "devops-specialist", + "name": "OpenDevopsSpecialist", + "category": "subagents/development", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["devops", "ci-cd", "infrastructure"], + "dependencies": [] + }, + "agent-generator": { + "id": "agent-generator", + "name": "AgentGenerator", + "category": "subagents/system-builder", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["generation", "agents", "scaffolding"], + "dependencies": [] + }, + "command-creator": { + "id": "command-creator", + "name": "CommandCreator", + "category": "subagents/system-builder", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["commands", "generation", "scaffolding"], + "dependencies": [] + }, + "domain-analyzer": { + "id": "domain-analyzer", + "name": "DomainAnalyzer", + "category": "subagents/system-builder", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["analysis", "domain", "architecture"], + "dependencies": [] + }, + "context-organizer": { + "id": "context-organizer", + "name": "ContextOrganizer", + "category": "subagents/system-builder", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["context", "organization", "structure"], + "dependencies": [] + }, + "workflow-designer": { + "id": "workflow-designer", + "name": "WorkflowDesigner", + "category": "subagents/system-builder", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["workflow", "design", "architecture"], + "dependencies": [] + }, + "image-specialist": { + "id": "image-specialist", + "name": "Image Specialist", + "category": "subagents/utils", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["images", "editing", "generation"], + "dependencies": [] + }, + "simple-responder": { + "id": "simple-responder", + "name": "Simple Responder", + "category": "subagents/test", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["testing", "evaluation"], + "dependencies": [] + } + }, + "defaults": { + "agent": { + "version": "1.0.0", + "author": "opencode", + "type": "agent", + "tags": [] + }, + "subagent": { + "version": "1.0.0", + "author": "opencode", + "type": "subagent", + "tags": [] + } + } +} diff --git a/.opencode/context/core/config/navigation.md b/.opencode/context/core/config/navigation.md new file mode 100644 index 0000000..5f39382 --- /dev/null +++ b/.opencode/context/core/config/navigation.md @@ -0,0 +1,37 @@ +# Core Configuration + +**Purpose**: Configuration standards and patterns for the context system + +--- + +## Structure + +``` +core/config/ +├── navigation.md (this file) +└── [configuration files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View configuration** | `../config/` | +| **Core standards** | `../standards/navigation.md` | +| **System guides** | `../system/navigation.md` | + +--- + +## By Type + +**Configuration Files** → Settings and configuration patterns for the context system + +--- + +## Related Context + +- **Core Standards** → `../standards/navigation.md` +- **Core System** → `../system/navigation.md` +- **Core Navigation** → `../navigation.md` diff --git a/.opencode/context/core/context-system/navigation.md b/.opencode/context/core/context-system/navigation.md new file mode 100644 index 0000000..cfac584 --- /dev/null +++ b/.opencode/context/core/context-system/navigation.md @@ -0,0 +1,46 @@ +# Context System + +**Purpose**: Documentation for the context system architecture and operations + +--- + +## Structure + +``` +core/context-system/ +├── navigation.md (this file) +├── operations/ +│ └── [operational guides] +├── guides/ +│ └── [how-to guides] +├── standards/ +│ └── [standards and templates] +└── [overview files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **Understand context system** | `../context-system.md` | +| **Operations & procedures** | `./operations/` | +| **Implementation guides** | `./guides/` | +| **Standards & templates** | `./standards/navigation.md` | + +--- + +## By Type + +**Operations** → How to operate and maintain the context system +**Guides** → Step-by-step guides for working with context +**Standards** → Templates and standards for context files + +--- + +## Related Context + +- **Core Navigation** → `../navigation.md` +- **Core Standards** → `../standards/navigation.md` +- **Core System** → `../system/navigation.md` diff --git a/.opencode/context/core/system/navigation.md b/.opencode/context/core/system/navigation.md new file mode 100644 index 0000000..ddca186 --- /dev/null +++ b/.opencode/context/core/system/navigation.md @@ -0,0 +1,38 @@ +# Core System + +**Purpose**: System guides and paths for core operations + +--- + +## Structure + +``` +core/system/ +├── navigation.md (this file) +└── [system guides and paths] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **System guides** | `./` | +| **Core standards** | `../standards/navigation.md` | +| **Context system** | `../context-system/navigation.md` | + +--- + +## By Type + +**System Guides** → Operational guides for core systems +**Paths** → System paths and directory structures + +--- + +## Related Context + +- **Core Navigation** → `../navigation.md` +- **Context System** → `../context-system/navigation.md` +- **Core Standards** → `../standards/navigation.md` diff --git a/.opencode/context/core/workflows/design-iteration.md b/.opencode/context/core/workflows/design-iteration.md index d0383d6..bfc0724 100644 --- a/.opencode/context/core/workflows/design-iteration.md +++ b/.opencode/context/core/workflows/design-iteration.md @@ -14,20 +14,263 @@ A structured 4-stage workflow for creating and iterating on UI designs. This pro --- +## When to Use This Workflow + +### Delegate to OpenFrontendSpecialist When: + +**✅ STRONGLY RECOMMENDED** to delegate for: +- **New UI/UX design work** - Landing pages, dashboards, app interfaces +- **Design system creation** - Component libraries, theme systems, style guides +- **Complex layouts** - Multi-column grids, responsive designs, intricate structures +- **Visual polish** - Animations, transitions, micro-interactions +- **Brand-focused work** - Marketing pages, product showcases, hero sections +- **Accessibility-critical UI** - Forms, navigation, interactive components + +**Why delegate?** +- OpenFrontendSpecialist follows the 4-stage design workflow (Layout → Theme → Animation → Implementation) +- Ensures thoughtful design decisions with approval gates +- Produces polished, accessible, production-ready UI +- Handles responsive design, OKLCH colors, semantic HTML +- Creates single-file HTML prototypes for quick iteration + +### Execute Directly When: + +**⚠️ Simple cases only**: +- Minor text/content updates to existing UI +- Small CSS tweaks (colors, spacing, fonts) +- Adding simple utility classes +- Updating existing component props +- Bug fixes in existing UI code + +### Delegation Pattern + +```javascript +// For UI design work +task( + subagent_type="OpenFrontendSpecialist", + description="Design {feature} UI", + prompt="Design a {feature} following the 4-stage workflow: + + Requirements: + - {requirement 1} + - {requirement 2} + + Context: {what this UI is for} + + Follow the design iteration workflow: + 1. Layout (ASCII wireframe) + 2. Theme (design system, colors) + 3. Animation (micro-interactions) + 4. Implementation (single HTML file) + + Request approval between each stage." +) +``` + +### Example Scenarios + +| Scenario | Action | Why | +|----------|--------|-----| +| "Create a landing page for our SaaS product" | ✅ Delegate to OpenFrontendSpecialist | Complex UI design, needs 4-stage workflow | +| "Design a user dashboard with charts" | ✅ Delegate to OpenFrontendSpecialist | Complex layout, visual design, interactions | +| "Build a component library with our brand" | ✅ Delegate to OpenFrontendSpecialist | Design system work, requires theme expertise | +| "Fix button color from blue to green" | ⚠️ Execute directly | Simple CSS change | +| "Update hero text content" | ⚠️ Execute directly | Content update only | + +--- + +## Design Plan File (MANDATORY) + +**CRITICAL**: Before starting any design work, create a persistent design plan file. + +**Location**: `.tmp/design-plans/{project-name}-{feature-name}.md` + +**Purpose**: +- Preserve design decisions across stages +- Allow user to review and edit the plan +- Maintain context for subagent calls +- Track design evolution and iterations + +**When to Create**: +- BEFORE Stage 1 (Layout Design) +- After understanding user requirements +- Before any design work begins + +**Template**: +```markdown +--- +project: {project-name} +feature: {feature-name} +created: {ISO timestamp} +updated: {ISO timestamp} +status: in_progress +current_stage: layout +--- + +# Design Plan: {Feature Name} + +## User Requirements +{What the user asked for - verbatim or close paraphrase} + +## Design Goals +- {goal 1} +- {goal 2} +- {goal 3} + +## Target Audience +{Who will use this UI} + +## Technical Constraints +- Framework: {Next.js, React, etc.} +- Responsive: {Yes/No} +- Accessibility: {WCAG level} +- Browser support: {Modern, IE11+, etc.} + +--- + +## Stage 1: Layout Design + +### Status +- [ ] Layout planned +- [ ] ASCII wireframe created +- [ ] User approved + +### Layout Structure +{ASCII wireframe will be added here} + +### Component Breakdown +{Component list will be added here} + +### User Feedback +{User comments and requested changes} + +--- + +## Stage 2: Theme Design + +### Status +- [ ] Design system selected +- [ ] Color palette chosen +- [ ] Typography defined +- [ ] User approved + +### Theme Details +{Theme specifications will be added here} + +### User Feedback +{User comments and requested changes} + +--- + +## Stage 3: Animation Design + +### Status +- [ ] Micro-interactions defined +- [ ] Animation timing set +- [ ] User approved + +### Animation Details +{Animation specifications will be added here} + +### User Feedback +{User comments and requested changes} + +--- + +## Stage 4: Implementation + +### Status +- [ ] HTML structure complete +- [ ] CSS applied +- [ ] Animations implemented +- [ ] User approved + +### Output Files +- HTML: {file path} +- CSS: {file path} +- Assets: {file paths} + +### User Feedback +{Final comments and requested changes} + +--- + +## Design Evolution + +### Iteration 1 +- Date: {timestamp} +- Changes: {what changed} +- Reason: {why it changed} + +### Iteration 2 +- Date: {timestamp} +- Changes: {what changed} +- Reason: {why it changed} +``` + +**Workflow Integration**: +1. **Create plan file** → Write to `.tmp/design-plans/{name}.md` +2. **Each stage** → Update plan file with decisions and user feedback +3. **User approval** → Edit plan file with approved decisions +4. **User requests changes** → Edit plan file with feedback, iterate +5. **Subagent calls** → Pass plan file path for context preservation +6. **Completion** → Plan file contains full design history + +**Benefits**: +- ✅ Context preserved across subagent calls +- ✅ User can review and edit plan directly +- ✅ Design decisions documented +- ✅ Easy to iterate and refine +- ✅ Full design history tracked + +--- + ## Workflow Stages +### Stage 0: Create Design Plan (MANDATORY FIRST STEP) + +**Purpose**: Create persistent plan file before any design work + +**Process**: +1. Understand user requirements +2. Identify design goals and constraints +3. Create plan file at `.tmp/design-plans/{project-name}-{feature-name}.md` +4. Populate with user requirements and goals +5. Present plan file location to user +6. Proceed to Stage 1 + +**Deliverable**: Design plan file created and initialized + +**Example**: +``` +✅ Design plan created: .tmp/design-plans/saas-landing-page.md + +You can review and edit this file at any time. All design decisions will be tracked here. + +Ready to proceed to Stage 1 (Layout Design)? +``` + +**Approval Gate**: "Plan file created. Ready to start layout design?" + +--- + ### Stage 1: Layout Design **Purpose**: Define the structure and component hierarchy before visual design **Process**: -1. Analyze user requirements -2. Identify core UI components -3. Plan layout structure and responsive behavior -4. Create ASCII wireframe -5. Present to user for approval +1. Read design plan file from `.tmp/design-plans/{name}.md` +2. Analyze user requirements from plan +3. Identify core UI components +4. Plan layout structure and responsive behavior +5. Create ASCII wireframe +6. **Update plan file** with layout structure and component breakdown +7. Present to user for approval +8. **Update plan file** with user feedback and approval status -**Deliverable**: ASCII wireframe with component breakdown +**Deliverable**: +- ASCII wireframe with component breakdown +- Updated plan file with Stage 1 complete **Example Output**: @@ -106,14 +349,20 @@ Mobile (< 768px): **Purpose**: Define colors, typography, spacing, and visual style **Process**: -1. Choose design system (neo-brutalism, modern dark, custom) -2. Select color palette (avoid Bootstrap blue unless requested) -3. Choose typography (Google Fonts) -4. Define spacing and shadows -5. Generate theme CSS file -6. Present theme to user for approval +1. Read design plan file from `.tmp/design-plans/{name}.md` +2. Review approved layout from Stage 1 +3. Choose design system (neo-brutalism, modern dark, custom) +4. Select color palette (avoid Bootstrap blue unless requested) +5. Choose typography (Google Fonts) +6. Define spacing and shadows +7. Generate theme CSS file +8. **Update plan file** with theme specifications +9. Present theme to user for approval +10. **Update plan file** with user feedback and approval status -**Deliverable**: CSS theme file saved to `design_iterations/theme_N.css` +**Deliverable**: +- CSS theme file saved to `design_iterations/theme_N.css` +- Updated plan file with Stage 2 complete **Theme Selection Criteria**: @@ -155,13 +404,19 @@ Key Design Decisions: **Purpose**: Define micro-interactions and transitions **Process**: -1. Identify key interactions (hover, click, scroll) -2. Define animation timing and easing -3. Plan loading states and transitions -4. Document animations using micro-syntax -5. Present animation plan to user for approval +1. Read design plan file from `.tmp/design-plans/{name}.md` +2. Review approved theme from Stage 2 +3. Identify key interactions (hover, click, scroll) +4. Define animation timing and easing +5. Plan loading states and transitions +6. Document animations using micro-syntax +7. **Update plan file** with animation specifications +8. Present animation plan to user for approval +9. **Update plan file** with user feedback and approval status -**Deliverable**: Animation specification in micro-syntax format +**Deliverable**: +- Animation specification in micro-syntax format +- Updated plan file with Stage 3 complete **Example Output**: @@ -203,15 +458,21 @@ linkHover: 250ms ease-out [underline 0→100%] **Purpose**: Generate complete HTML file with all components **Process**: -1. Build individual UI components -2. Integrate theme CSS -3. Add animations and interactions -4. Combine into single HTML file -5. Test responsive behavior -6. Save to design_iterations folder -7. Present to user for review +1. Read design plan file from `.tmp/design-plans/{name}.md` +2. Review all approved decisions from Stages 1-3 +3. Build individual UI components +4. Integrate theme CSS +5. Add animations and interactions +6. Combine into single HTML file +7. Test responsive behavior +8. Save to design_iterations folder +9. **Update plan file** with output file paths +10. Present to user for review +11. **Update plan file** with user feedback and final approval status -**Deliverable**: Complete HTML file with embedded or linked CSS +**Deliverable**: +- Complete HTML file with embedded or linked CSS +- Updated plan file with Stage 4 complete and all output files documented **File Organization**: @@ -592,6 +853,143 @@ This preserves the previous version for reference." --- +## Handling Plan File Edits and Iterations + +### User Edits Plan File Directly + +**Scenario**: User opens `.tmp/design-plans/{name}.md` and makes changes + +**Process**: +1. User edits plan file (changes requirements, adds constraints, modifies goals) +2. User notifies agent: "I've updated the plan file" +3. Agent reads updated plan file +4. Agent identifies what changed +5. Agent proposes how to incorporate changes +6. Agent updates affected stages + +**Example**: +``` +User: "I've updated the plan file - changed the color scheme to dark mode" + +Agent: +✅ Read updated plan: .tmp/design-plans/saas-landing-page.md + +Changes detected: +- Color scheme: Light → Dark mode +- Primary color: Blue → Purple + +This affects: +- Stage 2 (Theme) - needs regeneration +- Stage 4 (Implementation) - needs CSS update + +Would you like me to: +1. Regenerate theme with dark mode +2. Update implementation with new theme +``` + +### Iteration Within a Stage + +**Scenario**: User requests changes during a stage + +**Process**: +1. Agent presents stage output (e.g., layout wireframe) +2. User requests changes: "Make the hero section taller" +3. Agent updates plan file with feedback +4. Agent makes changes +5. Agent updates plan file with new iteration +6. Agent presents updated output + +**Example**: +``` +Stage 1 - Layout Design + +Agent: [presents wireframe] + +User: "Make the hero section taller and move CTA above the fold" + +Agent: +✅ Updated plan file with feedback +✅ Revised layout wireframe +✅ Updated plan file with Iteration 2 + +[presents updated wireframe] +``` + +### Tracking Iterations in Plan File + +**Format**: +```markdown +## Design Evolution + +### Iteration 1 - Initial Layout +- Date: 2026-01-30T10:00:00Z +- Stage: Layout +- Changes: Initial wireframe created +- User feedback: "Hero section too short, CTA below fold" + +### Iteration 2 - Revised Layout +- Date: 2026-01-30T10:15:00Z +- Stage: Layout +- Changes: Increased hero height from 400px to 600px, moved CTA above fold +- User feedback: "Perfect! Approved." +- Status: ✅ Approved + +### Iteration 3 - Theme Adjustment +- Date: 2026-01-30T10:30:00Z +- Stage: Theme +- Changes: Changed from light to dark mode, primary color blue → purple +- User feedback: "Love the dark mode!" +- Status: ✅ Approved +``` + +### Subagent Context Preservation + +**Problem**: Subagents lose context between calls + +**Solution**: Always pass plan file path + +**Pattern**: +```javascript +// When delegating to subagent +task( + subagent_type="OpenFrontendSpecialist", + description="Implement Stage 4", + prompt="Load design plan from .tmp/design-plans/saas-landing-page.md + + Read the plan file for: + - All approved decisions from Stages 1-3 + - User requirements and constraints + - Design evolution and iterations + + Implement Stage 4 (Implementation) following all approved decisions. + + Update the plan file with: + - Output file paths + - Implementation status + - Any issues encountered" +) +``` + +### Plan File as Single Source of Truth + +**Benefits**: +- ✅ All design decisions in one place +- ✅ User can review and edit anytime +- ✅ Subagents have full context +- ✅ Design history preserved +- ✅ Easy to iterate and refine +- ✅ No context loss between stages + +**Best Practices**: +- Always read plan file at start of each stage +- Update plan file after every user interaction +- Track all iterations with timestamps +- Document user feedback verbatim +- Mark approved decisions clearly +- Pass plan file path to all subagents + +--- + ## Quality Checklist Before presenting each stage: diff --git a/.opencode/context/core/workflows/task-delegation.md b/.opencode/context/core/workflows/task-delegation.md index ec19bb6..4c3bac9 100644 --- a/.opencode/context/core/workflows/task-delegation.md +++ b/.opencode/context/core/workflows/task-delegation.md @@ -150,10 +150,133 @@ When TaskManager creates subtask JSONs, it MUST follow these rules: | **CoderAgent** | subtask JSON (`context_files` + `reference_files` + `external_context`) | Loads standards, references source files, reads external docs, implements | | **TestEngineer** | session `context.md` path (passed in prompt) | Knows what standards were applied, reads external context, writes tests accordingly | | **CodeReviewer** | session `context.md` path (passed in prompt) | Knows what standards were applied, reviews against them, considers external context | +| **OpenFrontendSpecialist** | session `context.md` path (passed in prompt) | Follows 4-stage design workflow (Layout → Theme → Animation → Implementation) | **Key**: - TestEngineer and CodeReviewer should ALWAYS receive the session context path when delegated. This way they review against the same standards that were used during implementation — not whatever they independently discover. - All agents should read `external_context` files to understand external library patterns and requirements — this avoids re-fetching and ensures consistency. +- **OpenFrontendSpecialist should be used for UI/UX design work** - See `workflows/design-iteration.md` for when to delegate vs execute directly. + +--- + +## When to Delegate to Specialists + +### OpenFrontendSpecialist - UI/UX Design + +**✅ STRONGLY RECOMMENDED to delegate when:** +- Creating new UI/UX designs (landing pages, dashboards, app interfaces) +- Building design systems (component libraries, themes, style guides) +- Complex layouts requiring responsive design +- Visual polish work (animations, transitions, micro-interactions) +- Brand-focused pages (marketing, product showcases) +- Accessibility-critical UI (forms, navigation, interactive components) + +**Delegation pattern:** +```javascript +task( + subagent_type="OpenFrontendSpecialist", + description="Design {feature} UI", + prompt="Load context from .tmp/sessions/{session-id}/context.md + + Design a {feature} following the 4-stage workflow: + + CRITICAL: Create design plan file at .tmp/design-plans/{project}-{feature}.md BEFORE starting + + Stages: + 1. Stage 0: Create design plan file (MANDATORY FIRST) + 2. Stage 1: Layout (ASCII wireframe) → Update plan file + 3. Stage 2: Theme (design system, colors) → Update plan file + 4. Stage 3: Animation (micro-interactions) → Update plan file + 5. Stage 4: Implementation (single HTML file) → Update plan file + + Requirements: + - {requirement 1} + - {requirement 2} + + Plan file preserves context across stages and allows user to review/edit. + Request approval between each stage. + Update plan file after each stage and user feedback." +) +``` + +**Why delegate?** +- Follows structured 4-stage design workflow with approval gates +- Produces polished, accessible, production-ready UI +- Handles responsive design, OKLCH colors, semantic HTML +- Creates single-file HTML prototypes for quick iteration + +**See**: `workflows/design-iteration.md` for full workflow details + +### TestEngineer - Test Authoring + +**Delegate when:** +- Writing comprehensive test suites +- TDD workflows (tests before implementation) +- Complex test scenarios (edge cases, error handling) +- Integration tests across multiple components + +**Delegation pattern:** +```javascript +task( + subagent_type="TestEngineer", + description="Write tests for {feature}", + prompt="Load context from .tmp/sessions/{session-id}/context.md + + Write comprehensive tests for {feature} + + Files to test: + - {file 1} + - {file 2} + + Follow test coverage standards from context." +) +``` + +### CodeReviewer - Quality Assurance + +**Delegate when:** +- Reviewing complex implementations +- Security-critical code review +- Pre-merge quality checks +- Architecture validation + +**Delegation pattern:** +```javascript +task( + subagent_type="CodeReviewer", + description="Review {feature} implementation", + prompt="Load context from .tmp/sessions/{session-id}/context.md + + Review {feature} implementation against standards + + Files to review: + - {file 1} + - {file 2} + + Focus on: security, performance, maintainability" +) +``` + +### CoderAgent - Focused Implementation + +**Delegate when:** +- Implementing atomic subtasks from TaskManager +- Isolated feature work (single component/module) +- Following specific implementation specs + +**Delegation pattern:** +```javascript +task( + subagent_type="CoderAgent", + description="Implement {subtask}", + prompt="Load context from .tmp/sessions/{session-id}/context.md + + Implement subtask: {subtask description} + + Follow the implementation spec exactly. + Mark subtask as complete when done." +) +``` --- diff --git a/.opencode/context/openagents-repo/blueprints/navigation.md b/.opencode/context/openagents-repo/blueprints/navigation.md new file mode 100644 index 0000000..e0571f3 --- /dev/null +++ b/.opencode/context/openagents-repo/blueprints/navigation.md @@ -0,0 +1,37 @@ +# OpenAgents Blueprints + +**Purpose**: Blueprint templates and patterns for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/blueprints/ +├── navigation.md (this file) +└── [blueprint files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View blueprints** | `./` | +| **Core concepts** | `../core-concepts/navigation.md` | +| **Examples** | `../examples/navigation.md` | + +--- + +## By Type + +**Blueprints** → Template patterns for OpenAgents implementations + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Core Concepts** → `../core-concepts/navigation.md` +- **Examples** → `../examples/navigation.md` diff --git a/.opencode/context/openagents-repo/concepts/navigation.md b/.opencode/context/openagents-repo/concepts/navigation.md new file mode 100644 index 0000000..a982da5 --- /dev/null +++ b/.opencode/context/openagents-repo/concepts/navigation.md @@ -0,0 +1,38 @@ +# OpenAgents Concepts + +**Purpose**: Core concepts and ideas for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/concepts/ +├── navigation.md (this file) +└── [concept files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View concepts** | `./` | +| **Core concepts** | `../core-concepts/navigation.md` | +| **Guides** | `../guides/navigation.md` | + +--- + +## By Type + +**Concepts** → Foundational concepts for OpenAgents +**Core Concepts** → Deep dives into core ideas + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Core Concepts** → `../core-concepts/navigation.md` +- **Guides** → `../guides/navigation.md` diff --git a/.opencode/context/openagents-repo/core-concepts/agent-metadata.md b/.opencode/context/openagents-repo/core-concepts/agent-metadata.md new file mode 100644 index 0000000..472a535 --- /dev/null +++ b/.opencode/context/openagents-repo/core-concepts/agent-metadata.md @@ -0,0 +1,528 @@ + +# Core Concept: Agent Metadata System + +**Purpose**: Understanding the centralized metadata system for OpenAgents Control +**Priority**: CRITICAL - Load this before working with agent metadata + +--- + +## What Is the Agent Metadata System? + +The agent metadata system separates **OpenCode-compliant agent configuration** from **OpenAgents Control registry metadata**. This solves the problem of OpenCode validation errors when agents contain fields that aren't part of the OpenCode agent schema. + +**Key Principle**: Agent frontmatter contains ONLY valid OpenCode fields. All other metadata lives in a centralized file. + +--- + +## The Problem We Solved + +### Before (Validation Errors) + +Agent frontmatter contained fields that OpenCode doesn't recognize: + +```yaml +--- +id: opencoder # ❌ Not valid OpenCode field +name: OpenCoder # ❌ Not valid OpenCode field +category: core # ❌ Not valid OpenCode field +type: core # ❌ Not valid OpenCode field +version: 1.0.0 # ❌ Not valid OpenCode field +author: opencode # ❌ Not valid OpenCode field +tags: [development, coding] # ❌ Not valid OpenCode field +dependencies: [] # ❌ Not valid OpenCode field +description: "..." # ✅ Valid OpenCode field +mode: primary # ✅ Valid OpenCode field +temperature: 0.1 # ✅ Valid OpenCode field +tools: {...} # ✅ Valid OpenCode field +permission: {...} # ✅ Valid OpenCode field +--- +``` + +**Result**: OpenCode validation errors: +``` +Extra inputs are not permitted, field: 'id', value: 'opencoder' +Extra inputs are not permitted, field: 'category', value: 'core' +Extra inputs are not permitted, field: 'type', value: 'core' +... (9 validation errors) +``` + +### After (Clean Separation) + +**Agent frontmatter** (`.opencode/agent/core/opencoder.md`): +```yaml +--- +# Metadata stored in: .opencode/config/agent-metadata.json +description: "Orchestration agent for complex coding, architecture, and multi-file refactoring" +mode: primary +temperature: 0.1 +tools: {...} +permission: {...} +--- +``` + +**Centralized metadata** (`.opencode/config/agent-metadata.json`): +```json +{ + "agents": { + "opencoder": { + "id": "opencoder", + "name": "OpenCoder", + "category": "core", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": ["development", "coding", "implementation"], + "dependencies": [ + "subagent:documentation", + "subagent:coder-agent", + "context:core/standards/code" + ] + } + } +} +``` + +**Result**: ✅ No validation errors, clean separation of concerns + +--- + +## Valid OpenCode Agent Fields + +Based on [OpenCode documentation](https://opencode.ai/docs/agents/), these are the ONLY valid frontmatter fields: + +### Required Fields +- `description` - When to use this agent (required) +- `mode` - Agent type: `primary`, `subagent`, or `all` (defaults to `all`) + +### Optional Fields +- `model` - Model override (e.g., `anthropic/claude-sonnet-4-20250514`) +- `temperature` - Response randomness (0.0-1.0) +- `maxSteps` - Max agentic iterations +- `disable` - Set to `true` to disable agent +- `prompt` - Custom prompt file path (e.g., `{file:./prompts/build.txt}`) +- `hidden` - Hide from @ autocomplete (subagents only) +- `tools` - Tool access configuration +- `permission` - Permission rules for tools + +### Example Valid Frontmatter + +```yaml +--- +description: "Code review agent with security focus" +mode: subagent +model: anthropic/claude-sonnet-4-20250514 +temperature: 0.1 +tools: + read: true + grep: true + glob: true + write: false + edit: false +permission: + bash: + "*": ask + "git *": allow + edit: deny +--- +``` + +--- + +## Centralized Metadata File + +**Location**: `.opencode/config/agent-metadata.json` + +### Schema + +```json +{ + "$schema": "https://opencode.ai/schemas/agent-metadata.json", + "schema_version": "1.0.0", + "description": "Centralized metadata for OpenAgents Control agents", + "agents": { + "agent-id": { + "id": "agent-id", + "name": "Agent Name", + "category": "core|development|content|data|product|learning|meta", + "type": "agent|subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["tag1", "tag2"], + "dependencies": [ + "subagent:subagent-id", + "context:path/to/context" + ] + } + }, + "defaults": { + "agent": { + "version": "1.0.0", + "author": "opencode", + "type": "agent", + "tags": [] + }, + "subagent": { + "version": "1.0.0", + "author": "opencode", + "type": "subagent", + "tags": [] + } + } +} +``` + +### Metadata Fields + +| Field | Required | Description | Example | +|-------|----------|-------------|---------| +| `id` | Yes | Unique identifier (kebab-case) | `"opencoder"` | +| `name` | Yes | Display name | `"OpenCoder"` | +| `category` | Yes | Agent category | `"core"` | +| `type` | Yes | Component type | `"agent"` or `"subagent"` | +| `version` | Yes | Version number | `"1.0.0"` | +| `author` | Yes | Author identifier | `"opencode"` | +| `tags` | No | Discovery tags | `["development", "coding"]` | +| `dependencies` | No | Component dependencies | `["subagent:tester"]` | + +--- + +## How It Works + +### 1. Agent Creation + +When creating a new agent: + +**Step 1**: Create agent file with ONLY valid OpenCode fields + +```bash +# Create agent file +touch .opencode/agent/category/my-agent.md +``` + +```yaml +--- +description: "My agent description" +mode: subagent +temperature: 0.2 +tools: + read: true + write: true +--- + +# Agent prompt content here +``` + +**Step 2**: Add metadata to `.opencode/config/agent-metadata.json` + +```json +{ + "agents": { + "my-agent": { + "id": "my-agent", + "name": "My Agent", + "category": "development", + "type": "subagent", + "version": "1.0.0", + "author": "opencode", + "tags": ["custom", "helper"], + "dependencies": ["context:core/standards/code"] + } + } +} +``` + +**Step 3**: Run auto-detect to update registry + +```bash +./scripts/registry/auto-detect-components.sh --auto-add +``` + +The auto-detect script: +1. Reads frontmatter from agent file (description, mode, etc.) +2. Reads metadata from `agent-metadata.json` (id, name, tags, dependencies) +3. Merges both into registry.json entry + +### 2. Auto-Detect Integration + +The auto-detect script (`scripts/registry/auto-detect-components.sh`) has been enhanced to: + +1. **Extract frontmatter** - Read description from agent file +2. **Lookup metadata** - Check `agent-metadata.json` for agent ID +3. **Merge data** - Combine frontmatter + metadata +4. **Update registry** - Write complete entry to registry.json + +**Code snippet** (from auto-detect script): + +```bash +# Check if agent-metadata.json exists and merge metadata from it +local metadata_file="$REPO_ROOT/.opencode/config/agent-metadata.json" +if [ -f "$metadata_file" ] && command -v jq &> /dev/null; then + # Try to find metadata for this agent ID + local metadata_entry + metadata_entry=$(jq -r ".agents[\"$id\"] // empty" "$metadata_file" 2>/dev/null) + + if [ -n "$metadata_entry" ] && [ "$metadata_entry" != "null" ]; then + # Merge name, tags, dependencies from metadata + # ... + fi +fi +``` + +### 3. Registry Output + +The registry.json entry contains merged data: + +```json +{ + "id": "opencoder", + "name": "OpenCoder", + "type": "agent", + "path": ".opencode/agent/core/opencoder.md", + "description": "Orchestration agent for complex coding...", + "category": "core", + "tags": ["development", "coding", "implementation"], + "dependencies": [ + "subagent:documentation", + "subagent:coder-agent", + "context:core/standards/code" + ] +} +``` + +--- + +## Workflow + +### Adding a New Agent + +```bash +# 1. Create agent file (OpenCode-compliant frontmatter only) +vim .opencode/agent/category/my-agent.md + +# 2. Add metadata entry +vim .opencode/config/agent-metadata.json + +# 3. Update registry +./scripts/registry/auto-detect-components.sh --auto-add + +# 4. Validate +./scripts/registry/validate-registry.sh +``` + +### Updating Agent Metadata + +**To update OpenCode configuration** (tools, permissions, temperature): +```bash +# Edit agent file frontmatter +vim .opencode/agent/category/my-agent.md +``` + +**To update registry metadata** (tags, dependencies, version): +```bash +# Edit metadata file +vim .opencode/config/agent-metadata.json + +# Re-run auto-detect +./scripts/registry/auto-detect-components.sh --auto-add +``` + +### Updating Dependencies + +**Add a dependency**: +```json +{ + "agents": { + "my-agent": { + "dependencies": [ + "subagent:tester", + "context:core/standards/code", + "subagent:new-dependency" // ← Add here + ] + } + } +} +``` + +Then run: +```bash +./scripts/registry/auto-detect-components.sh --auto-add +./scripts/registry/validate-registry.sh +``` + +--- + +## Benefits + +### ✅ OpenCode Compliance +- Agent frontmatter contains ONLY valid OpenCode fields +- No validation errors from OpenCode +- Agents work correctly with OpenCode CLI + +### ✅ Registry Compatibility +- Registry still has all metadata (id, name, category, tags, dependencies) +- Auto-detect script merges frontmatter + metadata +- Backward compatible with existing tools + +### ✅ Single Source of Truth +- Metadata centralized in one file +- Easy to update dependencies across multiple agents +- Clear separation: OpenCode config vs. registry metadata + +### ✅ Maintainability +- Update dependencies in one place +- Consistent metadata across all agents +- Easy to add new metadata fields + +### ✅ Validation +- OpenCode validates frontmatter (no extra fields) +- Registry validator checks dependencies exist +- Clear error messages when metadata is missing + +--- + +## Migration Guide + +### Migrating Existing Agents + +**Step 1**: Identify agents with extra fields + +```bash +# Find agents with invalid OpenCode fields +grep -r "^id:\|^name:\|^category:\|^type:\|^version:\|^author:\|^tags:\|^dependencies:" .opencode/agent/ +``` + +**Step 2**: Extract metadata to `agent-metadata.json` + +For each agent: +1. Copy `id`, `name`, `category`, `type`, `version`, `author`, `tags`, `dependencies` to metadata file +2. Remove these fields from agent frontmatter +3. Keep ONLY valid OpenCode fields in frontmatter + +**Step 3**: Update registry + +```bash +# Remove old entries +jq 'del(.components.agents[] | select(.id == "agent-id"))' registry.json > tmp.json && mv tmp.json registry.json + +# Re-add with new metadata +./scripts/registry/auto-detect-components.sh --auto-add +``` + +**Step 4**: Validate + +```bash +./scripts/registry/validate-registry.sh +``` + +--- + +## Best Practices + +### Agent Frontmatter + +✅ **DO**: +- Keep frontmatter minimal (only OpenCode fields) +- Add comment pointing to metadata file +- Use consistent formatting + +❌ **DON'T**: +- Add custom fields to frontmatter +- Duplicate metadata in both places +- Skip the metadata file + +### Metadata File + +✅ **DO**: +- Keep metadata file in version control +- Update metadata when adding/removing dependencies +- Use consistent naming (kebab-case for IDs) +- Document why dependencies exist + +❌ **DON'T**: +- Forget to update metadata when creating agents +- Leave orphaned entries (agents that don't exist) +- Skip validation after updates + +### Dependencies + +✅ **DO**: +- Declare ALL dependencies (subagents, contexts) +- Use correct format: `type:id` +- Validate dependencies exist in registry + +❌ **DON'T**: +- Reference components without declaring dependency +- Use invalid dependency formats +- Forget to update when dependencies change + +--- + +## Troubleshooting + +### OpenCode Validation Errors + +**Problem**: `Extra inputs are not permitted, field: 'id'` + +**Solution**: Remove invalid fields from agent frontmatter, add to metadata file + +```bash +# 1. Edit agent file - remove id, name, category, type, version, author, tags, dependencies +vim .opencode/agent/category/agent.md + +# 2. Add to metadata file +vim .opencode/config/agent-metadata.json + +# 3. Update registry +./scripts/registry/auto-detect-components.sh --auto-add +``` + +### Missing Metadata + +**Problem**: Auto-detect can't find metadata for agent + +**Solution**: Add entry to `agent-metadata.json` + +```json +{ + "agents": { + "agent-id": { + "id": "agent-id", + "name": "Agent Name", + "category": "core", + "type": "agent", + "version": "1.0.0", + "author": "opencode", + "tags": [], + "dependencies": [] + } + } +} +``` + +### Registry Out of Sync + +**Problem**: Registry has old metadata + +**Solution**: Remove entry and re-run auto-detect + +```bash +# Remove old entry +jq 'del(.components.agents[] | select(.id == "agent-id"))' registry.json > tmp.json && mv tmp.json registry.json + +# Re-add with current metadata +./scripts/registry/auto-detect-components.sh --auto-add +``` + +--- + +## Related Files + +- **OpenCode Agent Docs**: https://opencode.ai/docs/agents/ +- **Registry System**: `.opencode/context/openagents-repo/core-concepts/registry.md` +- **Adding Agents**: `.opencode/context/openagents-repo/guides/adding-agent.md` +- **Dependencies**: `.opencode/context/openagents-repo/quality/registry-dependencies.md` + +--- + +**Last Updated**: 2026-01-31 +**Version**: 1.0.0 diff --git a/.opencode/context/openagents-repo/core-concepts/navigation.md b/.opencode/context/openagents-repo/core-concepts/navigation.md new file mode 100644 index 0000000..02fbcc7 --- /dev/null +++ b/.opencode/context/openagents-repo/core-concepts/navigation.md @@ -0,0 +1,37 @@ +# OpenAgents Core Concepts + +**Purpose**: Deep-dive documentation on core OpenAgents Control concepts + +--- + +## Structure + +``` +openagents-repo/core-concepts/ +├── navigation.md (this file) +└── [core concept files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View core concepts** | `./` | +| **Concepts** | `../concepts/navigation.md` | +| **Guides** | `../guides/navigation.md` | + +--- + +## By Type + +**Core Concepts** → In-depth documentation on fundamental OpenAgents ideas + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Concepts** → `../concepts/navigation.md` +- **Guides** → `../guides/navigation.md` diff --git a/.opencode/context/openagents-repo/errors/navigation.md b/.opencode/context/openagents-repo/errors/navigation.md new file mode 100644 index 0000000..e0c4a47 --- /dev/null +++ b/.opencode/context/openagents-repo/errors/navigation.md @@ -0,0 +1,38 @@ +# OpenAgents Errors + +**Purpose**: Common errors and troubleshooting for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/errors/ +├── navigation.md (this file) +└── [error documentation] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View errors** | `./` | +| **Guides** | `../guides/navigation.md` | +| **Quality** | `../quality/navigation.md` | + +--- + +## By Type + +**Errors** → Common errors and how to fix them +**Troubleshooting** → Solutions for common issues + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Guides** → `../guides/navigation.md` +- **Quality** → `../quality/navigation.md` diff --git a/.opencode/context/openagents-repo/examples/navigation.md b/.opencode/context/openagents-repo/examples/navigation.md new file mode 100644 index 0000000..af1741e --- /dev/null +++ b/.opencode/context/openagents-repo/examples/navigation.md @@ -0,0 +1,38 @@ +# OpenAgents Examples + +**Purpose**: Example implementations and use cases for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/examples/ +├── navigation.md (this file) +└── [example files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View examples** | `./` | +| **Guides** | `../guides/navigation.md` | +| **Blueprints** | `../blueprints/navigation.md` | + +--- + +## By Type + +**Examples** → Working examples of OpenAgents implementations +**Use Cases** → Real-world use cases and patterns + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Guides** → `../guides/navigation.md` +- **Blueprints** → `../blueprints/navigation.md` diff --git a/.opencode/context/openagents-repo/guides/navigation.md b/.opencode/context/openagents-repo/guides/navigation.md new file mode 100644 index 0000000..78ec414 --- /dev/null +++ b/.opencode/context/openagents-repo/guides/navigation.md @@ -0,0 +1,39 @@ +# OpenAgents Guides + +**Purpose**: Step-by-step guides for working with OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/guides/ +├── navigation.md (this file) +└── [guide files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **Adding agents** | `./adding-agent.md` | +| **Testing subagents** | `./testing-subagents.md` | +| **View all guides** | `./` | + +--- + +## By Type + +**Implementation Guides** → How to implement features +**Agent Guides** → How to work with agents +**Testing Guides** → How to test implementations + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Examples** → `../examples/navigation.md` +- **Core Concepts** → `../core-concepts/navigation.md` diff --git a/.opencode/context/openagents-repo/lookup/navigation.md b/.opencode/context/openagents-repo/lookup/navigation.md new file mode 100644 index 0000000..9696a94 --- /dev/null +++ b/.opencode/context/openagents-repo/lookup/navigation.md @@ -0,0 +1,38 @@ +# OpenAgents Lookup + +**Purpose**: Quick reference and lookup tables for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/lookup/ +├── navigation.md (this file) +└── [lookup reference files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View lookups** | `./` | +| **Guides** | `../guides/navigation.md` | +| **Core Concepts** | `../core-concepts/navigation.md` | + +--- + +## By Type + +**Quick Reference** → Fast lookup tables and commands +**Checklists** → Verification and validation checklists + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Guides** → `../guides/navigation.md` +- **Core Concepts** → `../core-concepts/navigation.md` diff --git a/.opencode/context/openagents-repo/plugins/navigation.md b/.opencode/context/openagents-repo/plugins/navigation.md new file mode 100644 index 0000000..8befc6e --- /dev/null +++ b/.opencode/context/openagents-repo/plugins/navigation.md @@ -0,0 +1,40 @@ +# OpenAgents Plugins + +**Purpose**: Plugin architecture and documentation for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/plugins/ +├── navigation.md (this file) +├── context/ +│ └── [context plugin files] +└── [plugin files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **Context plugin** | `./context/` | +| **View plugins** | `./` | +| **Guides** | `../guides/navigation.md` | + +--- + +## By Type + +**Context Plugin** → Context system plugin documentation +**Plugin Architecture** → How plugins work in OpenAgents + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Guides** → `../guides/navigation.md` +- **Core Concepts** → `../core-concepts/navigation.md` diff --git a/.opencode/context/openagents-repo/quality/navigation.md b/.opencode/context/openagents-repo/quality/navigation.md new file mode 100644 index 0000000..9fd58fc --- /dev/null +++ b/.opencode/context/openagents-repo/quality/navigation.md @@ -0,0 +1,39 @@ +# OpenAgents Quality + +**Purpose**: Quality assurance and standards for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/quality/ +├── navigation.md (this file) +└── [quality documentation] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View quality docs** | `./` | +| **Guides** | `../guides/navigation.md` | +| **Errors** | `../errors/navigation.md` | + +--- + +## By Type + +**Quality Standards** → Standards for code quality +**Testing** → Testing requirements and patterns +**Validation** → Validation procedures + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Guides** → `../guides/navigation.md` +- **Errors** → `../errors/navigation.md` diff --git a/.opencode/context/openagents-repo/templates/navigation.md b/.opencode/context/openagents-repo/templates/navigation.md new file mode 100644 index 0000000..147c3d0 --- /dev/null +++ b/.opencode/context/openagents-repo/templates/navigation.md @@ -0,0 +1,38 @@ +# OpenAgents Templates + +**Purpose**: Template files and patterns for OpenAgents Control + +--- + +## Structure + +``` +openagents-repo/templates/ +├── navigation.md (this file) +└── [template files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View templates** | `./` | +| **Blueprints** | `../blueprints/navigation.md` | +| **Guides** | `../guides/navigation.md` | + +--- + +## By Type + +**Templates** → Reusable template files +**Patterns** → Common patterns and structures + +--- + +## Related Context + +- **OpenAgents Navigation** → `../navigation.md` +- **Blueprints** → `../blueprints/navigation.md` +- **Guides** → `../guides/navigation.md` diff --git a/.opencode/context/to-be-consumed/claude-code-docs/navigation.md b/.opencode/context/to-be-consumed/claude-code-docs/navigation.md new file mode 100644 index 0000000..9e1628e --- /dev/null +++ b/.opencode/context/to-be-consumed/claude-code-docs/navigation.md @@ -0,0 +1,36 @@ +# Claude Code Documentation + +**Purpose**: External documentation for Claude Code to be integrated into main context + +--- + +## Structure + +``` +to-be-consumed/claude-code-docs/ +├── navigation.md (this file) +└── [external documentation files] +``` + +--- + +## Quick Routes + +| Task | Path | +|------|------| +| **View docs** | `./` | +| **To-be-consumed** | `../navigation.md` | + +--- + +## By Type + +**External Docs** → Documentation from external sources +**To Be Integrated** → Content awaiting integration into main context + +--- + +## Related Context + +- **To-be-consumed Navigation** → `../navigation.md` +- **Development** → `../../development/navigation.md` diff --git a/registry.json b/registry.json index 7ca1294..19210fc 100644 --- a/registry.json +++ b/registry.json @@ -11,62 +11,6 @@ }, "components": { "agents": [ - { - "id": "opencoder", - "name": "OpenCoder", - "type": "agent", - "path": ".opencode/agent/core/opencoder.md", - "legacy_path": ".opencode/agent/opencoder.md", - "aliases": [ - "opencoder" - ], - "description": "Specialized development agent for complex coding, architecture, and multi-file refactoring", - "tags": [ - "development", - "architecture", - "coding", - "refactoring" - ], - "dependencies": [ - "context:standards-code", - "context:component-planning", - "subagent:build-agent", - "subagent:coder-agent", - "subagent:contextscout", - "subagent:documentation", - "subagent:reviewer", - "subagent:task-manager", - "subagent:tester" - ], - "category": "core" - }, - { - "id": "openagent", - "name": "OpenAgent", - "type": "agent", - "path": ".opencode/agent/core/openagent.md", - "legacy_path": ".opencode/agent/openagent.md", - "aliases": [ - "openagent" - ], - "description": "Universal agent for answering queries, executing tasks, and coordinating workflows across any domain", - "tags": [ - "universal", - "flexible", - "coordination" - ], - "dependencies": [ - "context:standards-code", - "context:standards-docs", - "context:standards-tests", - "context:workflows-delegation", - "context:workflows-review", - "subagent:contextscout", - "subagent:documentation", - "subagent:task-manager" - ], - "category": "essential" - }, { "id": "system-builder", "name": "OpenSystemBuilder", @@ -139,6 +83,57 @@ "tags": [], "dependencies": [], "category": "meta" + }, + { + "id": "opencoder", + "name": "OpenCoder", + "type": "agent", + "path": ".opencode/agent/core/opencoder.md", + "description": "Orchestration agent for complex coding, architecture, and multi-file refactoring", + "tags": [ + "development", + "coding", + "implementation" + ], + "dependencies": [ + "subagent:documentation", + "subagent:coder-agent", + "subagent:tester", + "subagent:reviewer", + "subagent:build-agent", + "subagent:contextscout", + "subagent:externalscout", + "context:standards-code", + "context:workflows-delegation", + "context:component-planning", + "context:external-libraries" + ], + "category": "core" + }, + { + "id": "openagent", + "name": "OpenAgent", + "type": "agent", + "path": ".opencode/agent/core/openagent.md", + "description": "Universal agent for answering queries, executing tasks, and coordinating workflows across any domain", + "tags": [ + "universal", + "coordination", + "primary" + ], + "dependencies": [ + "subagent:task-manager", + "subagent:documentation", + "subagent:contextscout", + "subagent:externalscout", + "context:standards-code", + "context:standards-docs", + "context:standards-tests", + "context:review-ref", + "context:delegation-ref", + "context:external-libraries" + ], + "category": "core" } ], "subagents": [ @@ -405,6 +400,22 @@ "tags": [], "dependencies": [], "category": "test" + }, + { + "id": "context-manager", + "name": "ContextManager", + "type": "subagent", + "path": ".opencode/agent/subagents/core/context-manager.md", + "description": "Context organization and lifecycle management specialist - discovers, catalogs, validates, and maintains project context structure with dependency tracking", + "tags": [ + "context", + "organization", + "management", + "lifecycle", + "catalog" + ], + "dependencies": [], + "category": "core" } ], "commands": [ @@ -453,6 +464,26 @@ ], "category": "essential" }, + { + "id": "add-context", + "name": "Add Context", + "type": "command", + "path": ".opencode/command/add-context.md", + "description": "Interactive wizard to add project patterns using Project Intelligence standard", + "tags": [ + "context", + "onboarding", + "project-intelligence", + "wizard" + ], + "dependencies": [ + "subagent:context-organizer", + "context:mvi", + "context:frontmatter", + "context:project-intelligence" + ], + "category": "essential" + }, { "id": "clean", "name": "Clean Project", @@ -1436,16 +1467,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/system-builder-templates/navigation.md", - "description": "System Builder Templates", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "scroll-animation-prompts", "name": "Scroll Animation Prompts", @@ -1456,16 +1477,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/ui/web/design/navigation.md", - "description": "Web Design Patterns", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "building-scrollytelling-pages", "name": "Building Scrollytelling Pages", @@ -1496,36 +1507,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/ui/web/navigation.md", - "description": "Web UI Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/ui/terminal/navigation.md", - "description": "Terminal UI Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/ui/navigation.md", - "description": "UI Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "written-content", "name": "Written Content", @@ -1536,16 +1517,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/content-creation/formats/navigation.md", - "description": "Content Formats Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "video-content", "name": "Video Content", @@ -1586,16 +1557,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/content-creation/workflows/navigation.md", - "description": "Content Workflows Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "content-matrix", "name": "Content Matrix", @@ -1626,36 +1587,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/content-creation/navigation.md", - "description": "Content Creation Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/content-creation/examples/navigation.md", - "description": "Content Examples Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/content-creation/principles/navigation.md", - "description": "Content Principles Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "hooks", "name": "Hooks", @@ -1676,16 +1607,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/core/workflows/navigation.md", - "description": "Core Workflows Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "feature-breakdown", "name": "Feature Breakdown", @@ -1730,16 +1651,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/core/navigation.md", - "description": "Core Context Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "changelog", "name": "Changelog", @@ -1800,16 +1711,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/core/standards/navigation.md", - "description": "Core Standards Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "documentation", "name": "Documentation", @@ -1830,26 +1731,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/frontend/navigation.md", - "description": "Frontend Development Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/integration/navigation.md", - "description": "Integration Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "ui-navigation", "name": "Ui Navigation", @@ -1860,26 +1741,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/navigation.md", - "description": "Development Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/backend/navigation.md", - "description": "Backend Development Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "backend-navigation", "name": "Backend Navigation", @@ -1890,76 +1751,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/principles/navigation.md", - "description": "Development Principles Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/infrastructure/navigation.md", - "description": "Infrastructure Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/data/navigation.md", - "description": "Data Layer Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/learning/navigation.md", - "description": "Learning Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/navigation.md", - "description": "Context Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/product/navigation.md", - "description": "Product Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/project/navigation.md", - "description": "Project Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "subagent-framework-maps", "name": "Subagent Framework Maps", @@ -1980,16 +1771,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/openagents-repo/navigation.md", - "description": "OpenAgents Control Repository Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "testing-subagents", "name": "Testing Subagents", @@ -2030,16 +1811,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/data/navigation.md", - "description": "Data Context", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "testing-subagents-approval", "name": "Testing Subagents Approval", @@ -2078,16 +1849,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/core/task-management/navigation.md", - "description": "Task Management Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "splitting-tasks", "name": "Splitting Tasks", @@ -2128,16 +1889,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/ai/mastra-ai/navigation.md", - "description": "MAStra AI Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "modular-building", "name": "Modular Building", @@ -2238,36 +1989,6 @@ "dependencies": [], "category": "standard" }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/ai/navigation.md", - "description": "AI Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/frameworks/navigation.md", - "description": "Frameworks Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, - { - "id": "navigation", - "name": "Navigation", - "type": "context", - "path": ".opencode/context/development/frameworks/tanstack-start/navigation.md", - "description": "Tanstack Start Navigation", - "tags": [], - "dependencies": [], - "category": "standard" - }, { "id": "building-cli-compact", "name": "Building Cli Compact", @@ -2613,6 +2334,632 @@ "context:adding-skill" ], "category": "standard" + }, + { + "id": "core-navigation", + "name": "Navigation: CORE", + "type": "context", + "path": ".opencode/context/core/navigation.md", + "description": "Navigation guide for core", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-standards-navigation", + "name": "Navigation: CORE STANDARDS", + "type": "context", + "path": ".opencode/context/core/standards/navigation.md", + "description": "Navigation guide for core standards", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-workflows-navigation", + "name": "Navigation: CORE WORKFLOWS", + "type": "context", + "path": ".opencode/context/core/workflows/navigation.md", + "description": "Navigation guide for core workflows", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-context-system-navigation", + "name": "Navigation: CORE CONTEXT SYSTEM", + "type": "context", + "path": ".opencode/context/core/context-system/navigation.md", + "description": "Navigation guide for core context system", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-system-navigation", + "name": "Navigation: CORE SYSTEM", + "type": "context", + "path": ".opencode/context/core/system/navigation.md", + "description": "Navigation guide for core system", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-task-management-navigation", + "name": "Navigation: CORE TASK MANAGEMENT", + "type": "context", + "path": ".opencode/context/core/task-management/navigation.md", + "description": "Navigation guide for core task management", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "core-config-navigation", + "name": "Navigation: CORE CONFIG", + "type": "context", + "path": ".opencode/context/core/config/navigation.md", + "description": "Navigation guide for core config", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-navigation", + "name": "Navigation: DEVELOPMENT", + "type": "context", + "path": ".opencode/context/development/navigation.md", + "description": "Navigation guide for development", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-ai-navigation", + "name": "Navigation: DEVELOPMENT AI", + "type": "context", + "path": ".opencode/context/development/ai/navigation.md", + "description": "Navigation guide for development ai", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-backend-navigation", + "name": "Navigation: DEVELOPMENT BACKEND", + "type": "context", + "path": ".opencode/context/development/backend/navigation.md", + "description": "Navigation guide for development backend", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-data-navigation", + "name": "Navigation: DEVELOPMENT DATA", + "type": "context", + "path": ".opencode/context/development/data/navigation.md", + "description": "Navigation guide for development data", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-frameworks-navigation", + "name": "Navigation: DEVELOPMENT FRAMEWORKS", + "type": "context", + "path": ".opencode/context/development/frameworks/navigation.md", + "description": "Navigation guide for development frameworks", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-frontend-navigation", + "name": "Navigation: DEVELOPMENT FRONTEND", + "type": "context", + "path": ".opencode/context/development/frontend/navigation.md", + "description": "Navigation guide for development frontend", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-principles-navigation", + "name": "Navigation: DEVELOPMENT PRINCIPLES", + "type": "context", + "path": ".opencode/context/development/principles/navigation.md", + "description": "Navigation guide for development principles", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-integration-navigation", + "name": "Navigation: DEVELOPMENT INTEGRATION", + "type": "context", + "path": ".opencode/context/development/integration/navigation.md", + "description": "Navigation guide for development integration", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "development-infrastructure-navigation", + "name": "Navigation: DEVELOPMENT INFRASTRUCTURE", + "type": "context", + "path": ".opencode/context/development/infrastructure/navigation.md", + "description": "Navigation guide for development infrastructure", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "ui-navigation", + "name": "Navigation: UI", + "type": "context", + "path": ".opencode/context/ui/navigation.md", + "description": "Navigation guide for ui", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "ui-web-navigation", + "name": "Navigation: UI WEB", + "type": "context", + "path": ".opencode/context/ui/web/navigation.md", + "description": "Navigation guide for ui web", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "ui-terminal-navigation", + "name": "Navigation: UI TERMINAL", + "type": "context", + "path": ".opencode/context/ui/terminal/navigation.md", + "description": "Navigation guide for ui terminal", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "ui-web-design-navigation", + "name": "Navigation: UI WEB DESIGN", + "type": "context", + "path": ".opencode/context/ui/web/design/navigation.md", + "description": "Navigation guide for ui web design", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-navigation", + "name": "Navigation: OPENAGENTS REPO", + "type": "context", + "path": ".opencode/context/openagents-repo/navigation.md", + "description": "Navigation guide for openagents repo", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-core-concepts-navigation", + "name": "Navigation: OPENAGENTS REPO CORE CONCEPTS", + "type": "context", + "path": ".opencode/context/openagents-repo/core-concepts/navigation.md", + "description": "Navigation guide for openagents repo core concepts", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-guides-navigation", + "name": "Navigation: OPENAGENTS REPO GUIDES", + "type": "context", + "path": ".opencode/context/openagents-repo/guides/navigation.md", + "description": "Navigation guide for openagents repo guides", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-examples-navigation", + "name": "Navigation: OPENAGENTS REPO EXAMPLES", + "type": "context", + "path": ".opencode/context/openagents-repo/examples/navigation.md", + "description": "Navigation guide for openagents repo examples", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-lookup-navigation", + "name": "Navigation: OPENAGENTS REPO LOOKUP", + "type": "context", + "path": ".opencode/context/openagents-repo/lookup/navigation.md", + "description": "Navigation guide for openagents repo lookup", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-concepts-navigation", + "name": "Navigation: OPENAGENTS REPO CONCEPTS", + "type": "context", + "path": ".opencode/context/openagents-repo/concepts/navigation.md", + "description": "Navigation guide for openagents repo concepts", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-errors-navigation", + "name": "Navigation: OPENAGENTS REPO ERRORS", + "type": "context", + "path": ".opencode/context/openagents-repo/errors/navigation.md", + "description": "Navigation guide for openagents repo errors", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-blueprints-navigation", + "name": "Navigation: OPENAGENTS REPO BLUEPRINTS", + "type": "context", + "path": ".opencode/context/openagents-repo/blueprints/navigation.md", + "description": "Navigation guide for openagents repo blueprints", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-plugins-navigation", + "name": "Navigation: OPENAGENTS REPO PLUGINS", + "type": "context", + "path": ".opencode/context/openagents-repo/plugins/navigation.md", + "description": "Navigation guide for openagents repo plugins", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-quality-navigation", + "name": "Navigation: OPENAGENTS REPO QUALITY", + "type": "context", + "path": ".opencode/context/openagents-repo/quality/navigation.md", + "description": "Navigation guide for openagents repo quality", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "openagents-repo-templates-navigation", + "name": "Navigation: OPENAGENTS REPO TEMPLATES", + "type": "context", + "path": ".opencode/context/openagents-repo/templates/navigation.md", + "description": "Navigation guide for openagents repo templates", + "tags": [ + "navigation", + "guide" + ], + "dependencies": [], + "category": "navigation" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/system-builder-templates/navigation.md", + "description": "Overview of available templates for generating context-aware AI systems", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/content-creation/formats/navigation.md", + "description": "Content Formats Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/content-creation/workflows/navigation.md", + "description": "Content Workflows Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/content-creation/navigation.md", + "description": "Content Creation Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/content-creation/examples/navigation.md", + "description": "Content Examples Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/content-creation/principles/navigation.md", + "description": "Content Principles Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/tasks/schemas/navigation.md", + "description": "Task Schemas", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/to-be-consumed/claude-code-docs/navigation.md", + "description": "Claude Code Documentation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "context-paths", + "name": "Context Paths", + "type": "context", + "path": ".opencode/context/core/system/context-paths.md", + "description": "Additional Context File Paths", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "when-to-delegate", + "name": "When To Delegate", + "type": "context", + "path": ".opencode/context/development/frontend/when-to-delegate.md", + "description": "When to Delegate to Frontend Specialist", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "react-patterns", + "name": "React Patterns", + "type": "context", + "path": ".opencode/context/development/frontend/react/react-patterns.md", + "description": "React Patterns & Best Practices", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/development/frontend/react/navigation.md", + "description": "React Development", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/development/ai/mastra-ai/navigation.md", + "description": "MAStra AI Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/development/frameworks/tanstack-start/navigation.md", + "description": "Tanstack Start Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/learning/navigation.md", + "description": "Learning Context", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/navigation.md", + "description": "Context Navigation", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/product/navigation.md", + "description": "Product Context", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/project/navigation.md", + "description": "Project Context", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "npm-publishing", + "name": "Npm Publishing", + "type": "context", + "path": ".opencode/context/openagents-repo/guides/npm-publishing.md", + "description": "NPM Publishing Guide", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "github-issues-workflow", + "name": "Github Issues Workflow", + "type": "context", + "path": ".opencode/context/openagents-repo/guides/github-issues-workflow.md", + "description": "Guide: GitHub Issues and Project Board Workflow", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "navigation", + "name": "Navigation", + "type": "context", + "path": ".opencode/context/data/navigation.md", + "description": "Data Context", + "tags": [], + "dependencies": [], + "category": "standard" + }, + { + "id": "agent-metadata", + "name": "Agent Metadata", + "type": "context", + "path": ".opencode/context/openagents-repo/core-concepts/agent-metadata.md", + "description": "...\\\" # ✅ Valid OpenCode field", + "tags": [ + "development", + "coding" + ], + "dependencies": [], + "category": "standard" } ], "config": [ @@ -2657,6 +3004,7 @@ "subagent:documentation", "skill:task-management", "command:context", + "command:add-context", "command:clean", "tool:env", "context:essential-patterns", @@ -2696,6 +3044,7 @@ "command:commit", "command:test", "command:context", + "command:add-context", "command:clean", "command:optimize", "command:validate-repo", @@ -2706,7 +3055,6 @@ "context:quick-start", "context:core/*", "context:project-intelligence/*", - "context:to-be-consumed/*", "context:adding-skill", "context:ui/*", "context:development/*", @@ -2718,7 +3066,8 @@ "context:clean-code", "context:api-design", "config:env-example", - "config:readme" + "config:readme", + "context:openagents-repo/*" ] }, "business": { @@ -2735,6 +3084,7 @@ "subagent:image-specialist", "skill:task-management", "command:context", + "command:add-context", "command:clean", "command:prompt-enhancer", "tool:env", @@ -2745,7 +3095,6 @@ "context:quick-start", "context:core/*", "context:project-intelligence/*", - "context:to-be-consumed/*", "context:adding-skill", "config:env-example", "config:readme" @@ -2775,6 +3124,7 @@ "command:test", "command:commit", "command:context", + "command:add-context", "command:clean", "command:optimize", "command:prompt-enhancer", @@ -2789,7 +3139,6 @@ "context:quick-start", "context:core/*", "context:project-intelligence/*", - "context:to-be-consumed/*", "context:adding-skill", "context:ui/*", "context:development/*", @@ -2801,7 +3150,8 @@ "context:clean-code", "context:api-design", "config:env-example", - "config:readme" + "config:readme", + "context:openagents-repo/*" ] }, "advanced": { @@ -2836,6 +3186,7 @@ "command:test", "command:commit", "command:context", + "command:add-context", "command:clean", "command:optimize", "command:prompt-enhancer", @@ -2882,7 +3233,7 @@ } }, "metadata": { - "lastUpdated": "2026-01-12", + "lastUpdated": "2026-01-31", "schemaVersion": "1.0.0" }, "subagents": { diff --git a/scripts/registry/auto-detect-components.sh b/scripts/registry/auto-detect-components.sh index d659f1c..8925381 100755 --- a/scripts/registry/auto-detect-components.sh +++ b/scripts/registry/auto-detect-components.sh @@ -366,6 +366,11 @@ extract_metadata_from_file() { local tags="" local dependencies="" + # Generate ID from filename first (needed for metadata lookup) + local filename + filename=$(basename "$file" .md) + id=$(echo "$filename" | tr '[:upper:]' '[:lower:]' | tr ' ' '-') + # Try to extract from frontmatter (YAML) if grep -q "^---$" "$file" 2>/dev/null; then # Extract description from frontmatter @@ -447,14 +452,44 @@ extract_metadata_from_file() { description=$(grep -m 1 "^# " "$file" | sed 's/^# //' || echo "") fi - # Generate ID from filename - local filename - filename=$(basename "$file" .md) - id=$(echo "$filename" | tr '[:upper:]' '[:lower:]' | tr ' ' '-') - # Generate name from filename (capitalize words) name=$(echo "$filename" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2))}1') + # Check if agent-metadata.json exists and merge metadata from it + local metadata_file="$REPO_ROOT/.opencode/config/agent-metadata.json" + if [ -f "$metadata_file" ] && command -v jq &> /dev/null; then + # Try to find metadata for this agent ID + local metadata_entry + metadata_entry=$(jq -r ".agents[\"$id\"] // empty" "$metadata_file" 2>/dev/null) + + if [ -n "$metadata_entry" ] && [ "$metadata_entry" != "null" ]; then + # Override name if present in metadata + local meta_name + meta_name=$(echo "$metadata_entry" | jq -r '.name // empty' 2>/dev/null) + if [ -n "$meta_name" ] && [ "$meta_name" != "null" ]; then + name="$meta_name" + fi + + # Merge tags (prefer frontmatter, fallback to metadata) + if [ -z "$tags" ]; then + local meta_tags + meta_tags=$(echo "$metadata_entry" | jq -r '.tags // [] | join(",")' 2>/dev/null) + if [ -n "$meta_tags" ] && [ "$meta_tags" != "null" ]; then + tags="$meta_tags" + fi + fi + + # Merge dependencies (prefer frontmatter, fallback to metadata) + if [ -z "$dependencies" ]; then + local meta_deps + meta_deps=$(echo "$metadata_entry" | jq -r '.dependencies // [] | join(",")' 2>/dev/null) + if [ -n "$meta_deps" ] && [ "$meta_deps" != "null" ]; then + dependencies="$meta_deps" + fi + fi + fi + fi + echo "${id}|${name}|${description}|${tags}|${dependencies}" }