diff --git a/.github/workflows/validate-registry.yml b/.github/workflows/validate-registry.yml
index a6cbad9..b6df352 100644
--- a/.github/workflows/validate-registry.yml
+++ b/.github/workflows/validate-registry.yml
@@ -195,6 +195,30 @@ jobs:
echo "See [CONTRIBUTING.md](docs/contributing/CONTRIBUTING.md) for details" >> $GITHUB_STEP_SUMMARY
exit 1
fi
+
+ - name: Validate markdown context links
+ if: github.event.inputs.skip_validation != 'true'
+ id: validate_context_links
+ run: |
+ echo "## ๐ Context Link Validation" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+
+ if bun run scripts/validation/validate-markdown-links.ts > /tmp/context-link-validation.txt 2>&1; then
+ echo "context_links=passed" >> $GITHUB_OUTPUT
+ echo "โ
Context markdown links are valid!" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
+ cat /tmp/context-link-validation.txt >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "context_links=failed" >> $GITHUB_OUTPUT
+ echo "โ Context markdown link validation failed!" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
+ cat /tmp/context-link-validation.txt >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
+ exit 1
+ fi
- name: Validate registry
if: github.event.inputs.skip_validation != 'true'
@@ -308,12 +332,14 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
PROMPT_VALID="${{ steps.validate_prompts.outputs.prompt_validation }}"
+ CONTEXT_LINKS_VALID="${{ steps.validate_context_links.outputs.context_links }}"
REGISTRY_VALID="${{ steps.validate.outputs.validation }}"
-
- if [ "$PROMPT_VALID" = "passed" ] && [ "$REGISTRY_VALID" = "passed" ]; then
+
+ if [ "$PROMPT_VALID" = "passed" ] && [ "$CONTEXT_LINKS_VALID" = "passed" ] && [ "$REGISTRY_VALID" = "passed" ]; then
echo "### โ
All Validations Passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- โ
Prompt library structure is valid" >> $GITHUB_STEP_SUMMARY
+ echo "- โ
Context markdown links are valid" >> $GITHUB_STEP_SUMMARY
echo "- โ
Registry paths are valid" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "This PR is ready for review!" >> $GITHUB_STEP_SUMMARY
@@ -326,7 +352,13 @@ jobs:
else
echo "- โ
Prompt library validation passed" >> $GITHUB_STEP_SUMMARY
fi
-
+
+ if [ "$CONTEXT_LINKS_VALID" != "passed" ]; then
+ echo "- โ Context markdown link validation failed" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "- โ
Context markdown link validation passed" >> $GITHUB_STEP_SUMMARY
+ fi
+
if [ "$REGISTRY_VALID" != "passed" ]; then
echo "- โ Registry validation failed" >> $GITHUB_STEP_SUMMARY
else
@@ -339,7 +371,7 @@ jobs:
- name: Fail if validation failed
if: |
- (steps.validate_prompts.outputs.prompt_validation == 'failed' || steps.validate.outputs.validation == 'failed') &&
+ (steps.validate_prompts.outputs.prompt_validation == 'failed' || steps.validate_context_links.outputs.context_links == 'failed' || steps.validate.outputs.validation == 'failed') &&
github.event.inputs.skip_validation != 'true'
run: |
echo "โ Validation failed - blocking PR merge"
diff --git a/.opencode/agent/core/openagent.md b/.opencode/agent/core/openagent.md
index 4de77c4..7055915 100644
--- a/.opencode/agent/core/openagent.md
+++ b/.opencode/agent/core/openagent.md
@@ -42,14 +42,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -248,7 +248,7 @@ task(
- docs (write/edit docs) โ Read .opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read .opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read .opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
NOTE: Load all files discovered by ContextScout in Stage 1.5 if not already loaded.
@@ -262,7 +262,7 @@ task(
IF docs task โ .opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ .opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ .opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ .opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ .opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -305,10 +305,10 @@ task(
1. **Identify Parallel Batches** (use task-cli.ts):
```bash
# Get all parallel-ready tasks
- bash .opencode/skill/task-management/router.sh parallel {feature}
+ bash .opencode/skills/task-management/router.sh parallel {feature}
# Get next eligible tasks
- bash .opencode/skill/task-management/router.sh next {feature}
+ bash .opencode/skills/task-management/router.sh next {feature}
```
2. **Build Execution Plan**:
@@ -346,7 +346,7 @@ task(
4. **Verify Batch 1 Complete**:
```bash
- bash .opencode/skill/task-management/router.sh status {feature}
+ bash .opencode/skills/task-management/router.sh status {feature}
```
Confirm tasks 01, 02, 03 all show status: "completed"
@@ -611,7 +611,7 @@ task(
- Full delegation template & process
+ Full delegation template & process
@@ -624,14 +624,14 @@ task(
- Context index: .opencode/context/index.md
+ Context index: .opencode/context/navigation.md
Load index when discovering contexts by keywords. For common tasks:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
- - Delegation โ .opencode/context/core/workflows/task-delegation.md
+ - Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
Full index includes all contexts with triggers and dependencies.
Context files loaded per @critical_context_requirement.
diff --git a/.opencode/agent/core/opencoder.md b/.opencode/agent/core/opencoder.md
index f5606a3..7e2be79 100644
--- a/.opencode/agent/core/opencoder.md
+++ b/.opencode/agent/core/opencoder.md
@@ -329,7 +329,7 @@ Code Standards
3. Validate batch completion:
```bash
- bash .opencode/skill/task-management/router.sh status {feature}
+ bash .opencode/skills/task-management/router.sh status {feature}
```
- Check all subtasks in batch have status: "completed"
- Verify deliverables exist
diff --git a/.opencode/agent/subagents/code/coder-agent.md b/.opencode/agent/subagents/code/coder-agent.md
index 238c3c7..61aaf5f 100644
--- a/.opencode/agent/subagents/code/coder-agent.md
+++ b/.opencode/agent/subagents/code/coder-agent.md
@@ -4,6 +4,10 @@ description: Executes coding subtasks in sequence, ensuring completion as specif
mode: subagent
temperature: 0
permission:
+ bash:
+ "*": "deny"
+ "bash .opencode/skills/task-management/router.sh complete*": "allow"
+ "bash .opencode/skills/task-management/router.sh status*": "allow"
edit:
"**/*.env*": "deny"
"**/*.key": "deny"
@@ -35,7 +39,7 @@ permission:
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.
+ Limited bash access for task status updates only. Sequential execution. Self-review mandatory before handoff.
- @context_first: ContextScout ALWAYS before coding
- @external_scout_mandatory: ExternalScout for any external package
@@ -193,17 +197,17 @@ Update subtask status and report completion to orchestrator:
**8.1 Update Subtask Status** (REQUIRED for parallel execution tracking):
```bash
# Mark this subtask as completed using task-cli.ts
-bash .opencode/skill/task-management/router.sh complete {feature} {seq} "{completion_summary}"
+bash .opencode/skills/task-management/router.sh complete {feature} {seq} "{completion_summary}"
```
Example:
```bash
-bash .opencode/skill/task-management/router.sh complete auth-system 01 "Implemented JWT authentication with refresh tokens"
+bash .opencode/skills/task-management/router.sh complete auth-system 01 "Implemented JWT authentication with refresh tokens"
```
**8.2 Verify Status Update**:
```bash
-bash .opencode/skill/task-management/router.sh status {feature}
+bash .opencode/skills/task-management/router.sh status {feature}
```
Confirm your subtask now shows: `status: "completed"`
diff --git a/.opencode/agent/subagents/core/batch-executor.md b/.opencode/agent/subagents/core/batch-executor.md
index 1aa8088..fda5744 100644
--- a/.opencode/agent/subagents/core/batch-executor.md
+++ b/.opencode/agent/subagents/core/batch-executor.md
@@ -7,7 +7,7 @@ permission:
bash:
"*": "deny"
"npx ts-node*task-cli*": "allow"
- "bash .opencode/skill/task-management/router.sh*": "allow"
+ "bash .opencode/skills/task-management/router.sh*": "allow"
edit:
"**/*.env*": "deny"
"**/*.key": "deny"
@@ -19,6 +19,7 @@ permission:
contextscout: "allow"
externalscout: "allow"
coderagent: "allow"
+ OpenFrontendSpecialist: "allow"
---
# BatchExecutor
@@ -165,7 +166,7 @@ While waiting, you can optionally:
```bash
# Check status of all subtasks in this batch
-bash .opencode/skill/task-management/router.sh status {feature}
+bash .opencode/skills/task-management/router.sh status {feature}
```
Expected output:
@@ -235,7 +236,7 @@ Batch 2 depends on: 01, 02, 03 (all now satisfied).
1. **Detect failure** from CoderAgent return
2. **Check status** of other tasks in batch:
```bash
- bash .opencode/skill/task-management/router.sh status {feature}
+ bash .opencode/skills/task-management/router.sh status {feature}
```
3. **Report to orchestrator**:
```
@@ -261,7 +262,7 @@ If CoderAgent reports completion but status doesn't show completed:
2. **Check if CoderAgent actually ran task-cli.ts complete**
3. **Manually mark complete** if needed:
```bash
- bash .opencode/skill/task-management/router.sh complete {feature} {seq} "{summary}"
+ bash .opencode/skills/task-management/router.sh complete {feature} {seq} "{summary}"
```
4. **Report discrepancy** to orchestrator
diff --git a/.opencode/agent/subagents/core/externalscout.md b/.opencode/agent/subagents/core/externalscout.md
index 2fab2c4..7da8710 100644
--- a/.opencode/agent/subagents/core/externalscout.md
+++ b/.opencode/agent/subagents/core/externalscout.md
@@ -6,7 +6,7 @@ temperature: 0.1
permission:
read:
"**/*": "deny"
- ".opencode/skill/context7/**": "allow"
+ ".opencode/skills/context7/**": "allow"
".tmp/external-context/**": "allow"
bash:
"*": "deny"
@@ -30,14 +30,14 @@ permission:
ALLOWED:
- - read: ONLY .opencode/skill/context7/** and .tmp/external-context/**
+ - read: ONLY .opencode/skills/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/**
+ - glob: ONLY .opencode/skills/context7/** and .tmp/external-context/**
NEVER use: task | todoread | todowrite
NEVER read: Project files, source code, or any files outside allowed paths
@@ -125,7 +125,7 @@ permission:
Identify library/framework from user query AND understand tech stack context
- 1. Read `.opencode/skill/context7/library-registry.md`
+ 1. Read `.opencode/skills/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:
@@ -244,7 +244,7 @@ permission:
## Quick Reference
-**Library Registry**: `.opencode/skill/context7/library-registry.md` โ Supported libraries, IDs, and official docs links
+**Library Registry**: `.opencode/skills/context7/library-registry.md` โ Supported libraries, IDs, and official docs links
**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
diff --git a/.opencode/agent/subagents/core/task-manager.md b/.opencode/agent/subagents/core/task-manager.md
index 52e1a2e..93f44ec 100644
--- a/.opencode/agent/subagents/core/task-manager.md
+++ b/.opencode/agent/subagents/core/task-manager.md
@@ -56,7 +56,7 @@ WHY THIS MATTERS:
- Expect the calling agent to supply relevant context file paths; request them if absent.
- Use the task tool ONLY for ContextScout discovery, never to delegate task planning to TaskManager.
- Do NOT create session bundles or write `.tmp/sessions/**` files.
- - Do NOT read `.opencode/context/core/workflows/task-delegation.md` or follow delegation workflows.
+ - Do NOT read `.opencode/context/core/workflows/task-delegation-basics.md` or follow delegation workflows.
- Your output (JSON files) is your primary communication channel.
@@ -85,7 +85,7 @@ WHY THIS MATTERS:
2. Check current task state:
```bash
- npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skill/task-management/scripts/task-cli.ts status
+ npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skills/task-management/scripts/task-cli.ts status
```
3. If context bundle provided, load and extract:
@@ -207,13 +207,14 @@ WHY THIS MATTERS:
**FRONTEND RULE**: If a task involves UI design, styling, or frontend implementation:
1. Set `suggested_agent`: "OpenFrontendSpecialist"
- 2. Include `.opencode/context/ui/web/ui-styling-standards.md` and `.opencode/context/core/workflows/design-iteration.md` in `context_files`.
- 3. Ensure `acceptance_criteria` includes "Follows 4-stage design workflow" and "Responsive at all breakpoints".
- 4. **PARALLELIZATION**: Design tasks can run in parallel (`parallel: true`) since design work is isolated and doesn't affect backend/logic implementation. Only mark `parallel: false` if design depends on backend API contracts or data structures.
+ 2. Include `.opencode/context/ui/web/ui-styling-standards.md` and `.opencode/context/core/workflows/design-iteration-overview.md` in `context_files`.
+ 3. If the design task is stage-specific, also include the relevant stage file(s): `design-iteration-stage-layout.md`, `design-iteration-stage-theme.md`, `design-iteration-stage-animation.md`, `design-iteration-stage-implementation.md`.
+ 4. Ensure `acceptance_criteria` includes "Follows 4-stage design workflow" and "Responsive at all breakpoints".
+ 5. **PARALLELIZATION**: Design tasks can run in parallel (`parallel: true`) since design work is isolated and doesn't affect backend/logic implementation. Only mark `parallel: false` if design depends on backend API contracts or data structures.
4. Validate with CLI:
```bash
- npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skill/task-management/scripts/task-cli.ts validate {feature}
+ npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skills/task-management/scripts/task-cli.ts validate {feature}
```
5. Report creation:
@@ -242,7 +243,7 @@ WHY THIS MATTERS:
3. If all criteria pass:
```bash
- npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skill/task-management/scripts/task-cli.ts complete {feature} {seq} "{summary}"
+ npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skills/task-management/scripts/task-cli.ts complete {feature} {seq} "{summary}"
```
4. If criteria fail:
@@ -252,7 +253,7 @@ WHY THIS MATTERS:
5. Check for next task:
```bash
- npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skill/task-management/scripts/task-cli.ts next {feature}
+ npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skills/task-management/scripts/task-cli.ts next {feature}
```
Task verified and status updated
@@ -264,7 +265,7 @@ WHY THIS MATTERS:
1. Verify all tasks complete:
```bash
- npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skill/task-management/scripts/task-cli.ts status {feature}
+ npx ts-node --compiler-options '{"module":"commonjs"}' .opencode/skills/task-management/scripts/task-cli.ts status {feature}
```
2. If completed_count == subtask_count:
@@ -329,7 +330,7 @@ Use task-cli.ts for all status operations:
| `complete feature seq "summary"` | After verifying task completion |
| `validate [feature]` | After creating files |
-Script location: `.opencode/skill/task-management/scripts/task-cli.ts`
+Script location: `.opencode/skills/task-management/scripts/task-cli.ts`
@@ -364,4 +365,3 @@ Script location: `.opencode/skill/task-management/scripts/task-cli.ts`
Reference context files, don't embed content
Do not create session bundles or delegate to TaskManager; execute directly
-
diff --git a/.opencode/agent/subagents/system-builder/command-creator.md b/.opencode/agent/subagents/system-builder/command-creator.md
index f5968dc..08f83db 100644
--- a/.opencode/agent/subagents/system-builder/command-creator.md
+++ b/.opencode/agent/subagents/system-builder/command-creator.md
@@ -144,7 +144,7 @@ temperature: 0.1
```
-
+
Create command usage guide
diff --git a/.opencode/command/add-context.md b/.opencode/command/add-context.md
index 3884236..e823fa0 100644
--- a/.opencode/command/add-context.md
+++ b/.opencode/command/add-context.md
@@ -796,28 +796,7 @@ 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
+### Example 4: External Context Files Present
```bash
/add-context
@@ -843,7 +822,7 @@ Express: `src/routes/ controllers/ models/ middleware/`
# After harvesting, run /add-context again.
```
-### Example 6: After Harvesting External Context
+### Example 5: After Harvesting External Context
```bash
# After running: /context harvest
diff --git a/.opencode/command/openagents/check-context-deps.md b/.opencode/command/openagents/check-context-deps.md
index c966987..22046ca 100644
--- a/.opencode/command/openagents/check-context-deps.md
+++ b/.opencode/command/openagents/check-context-deps.md
@@ -282,7 +282,7 @@ task(
TASK:
1. Use grep to find all references to context files in:
- .opencode/agent/**/*.md
- - .opencode/prompts/**/*.md
+ - .opencode/command/**/*.md
2. Search for these patterns:
- ".opencode/context/core/" (direct paths)
diff --git a/.opencode/context/core/navigation.md b/.opencode/context/core/navigation.md
index 0f69090..56f4bb6 100644
--- a/.opencode/context/core/navigation.md
+++ b/.opencode/context/core/navigation.md
@@ -23,10 +23,10 @@ core/
โโโ workflows/
โ โโโ navigation.md
โ โโโ code-review.md
-โ โโโ task-delegation.md
+โ โโโ task-delegation-basics.md
โ โโโ feature-breakdown.md
โ โโโ session-management.md
-โ โโโ design-iteration.md
+โ โโโ design-iteration-overview.md
โ
โโโ guides/
โ โโโ resuming-sessions.md # NEW: Multi-session task resumption
@@ -62,7 +62,7 @@ core/
| **Write docs** | `standards/documentation.md` |
| **Security patterns** | `standards/security-patterns.md` |
| **Review code** | `workflows/code-review.md` |
-| **Delegate task** | `workflows/task-delegation.md` |
+| **Delegate task** | `workflows/task-delegation-basics.md` |
| **Break down feature** | `workflows/feature-breakdown.md` |
| **Resume session** | `guides/resuming-sessions.md` |
| **Manage tasks** | `task-management/navigation.md` |
diff --git a/.opencode/context/core/system/context-guide.md b/.opencode/context/core/system/context-guide.md
index 0c1e1fc..b84434c 100644
--- a/.opencode/context/core/system/context-guide.md
+++ b/.opencode/context/core/system/context-guide.md
@@ -6,7 +6,7 @@
**Key Principle**: Use context index for discovery, load specific files as needed
-**Index Location**: `.opencode/context/index.md` - Quick map of all contexts
+**Index Location**: `.opencode/context/navigation.md` - Quick map of all contexts
**Structure**: standards/ (quality + analysis), workflows/ (process + review), system/ (internals)
@@ -20,7 +20,7 @@ Context files provide guidelines and templates for specific tasks. Use the index
## Context Index System
-**Central Index**: `.opencode/context/index.md` - Ultra-compact map of all contexts
+**Central Index**: `.opencode/context/navigation.md` - Ultra-compact map of all contexts
The index provides:
- Quick map for common tasks (code, docs, tests, review, delegation)
@@ -40,7 +40,7 @@ All files are in `.opencode/context/core/` with organized subfolders:
- `standards/code-analysis.md` - Analysis framework [high]
### Workflows (Process Templates + Review)
-- `workflows/task-delegation.md` - Delegation template [high]
+- `workflows/task-delegation-basics.md` - Delegation template [high]
- `workflows/feature-breakdown.md` - Complex task breakdown [high]
- `workflows/session-management.md` - Session lifecycle [medium]
- `workflows/code-review.md` - Code review guidelines [high]
@@ -53,7 +53,7 @@ All files are in `.opencode/context/core/` with organized subfolders:
- Review task? โ Load `workflows/code-review.md`
**Step 2: Load Index** (for keyword matching)
-- Load `.opencode/context/index.md`
+- Load `.opencode/context/navigation.md`
- Scan triggers to find relevant contexts
- Load specific context files as needed
@@ -95,7 +95,7 @@ All files are in `.opencode/context/core/` with organized subfolders:
- Investigating bugs
- Evaluating architecture
-### .opencode/context/core/workflows/task-delegation.md
+### .opencode/context/core/workflows/task-delegation-basics.md
- Delegating to general agent
- Creating task context
- Multi-file coordination
diff --git a/.opencode/context/core/visual-development.md b/.opencode/context/core/visual-development.md
index d2337e4..42a55b5 100644
--- a/.opencode/context/core/visual-development.md
+++ b/.opencode/context/core/visual-development.md
@@ -12,7 +12,7 @@
| **Generate image/diagram** | This file | Image Specialist | tool:gemini |
| **Edit existing image** | This file | Image Specialist | tool:gemini |
| **UI mockup (static)** | This file | Image Specialist | tool:gemini |
-| **Interactive UI design** | `workflows/design-iteration.md` | - | - |
+| **Interactive UI design** | `workflows/design-iteration-overview.md` | - | - |
| **Design system** | `ui/web/design-systems.md` | - | - |
| **UI standards** | `ui/web/ui-styling-standards.md` | - | - |
| **Animation patterns** | `ui/web/animation-patterns.md` | - | - |
@@ -302,7 +302,7 @@ User needs visual content
โ
Is it interactive/responsive HTML/CSS?
โ
- YES โ Use design-iteration.md workflow
+ YES โ Use design-iteration-overview.md workflow
| - Create HTML files
| - Iterate on designs
| - Production-ready code
@@ -322,13 +322,13 @@ Is it interactive/responsive HTML/CSS?
| Need | Use |
|------|-----|
-| **Interactive dashboard** | design-iteration.md |
+| **Interactive dashboard** | design-iteration-overview.md |
| **Dashboard mockup (static image)** | Image Specialist |
-| **Responsive landing page** | design-iteration.md |
+| **Responsive landing page** | design-iteration-overview.md |
| **Landing page hero graphic** | Image Specialist |
-| **Working HTML prototype** | design-iteration.md |
+| **Working HTML prototype** | design-iteration-overview.md |
| **Architecture diagram** | Image Specialist |
-| **UI component library** | design-iteration.md |
+| **UI component library** | design-iteration-overview.md |
| **Social media graphic** | Image Specialist |
---
@@ -447,7 +447,7 @@ After receiving output:
## Related Context
-- **UI Design Workflow**: `.opencode/context/core/workflows/design-iteration.md`
+- **UI Design Workflow**: `.opencode/context/core/workflows/design-iteration-overview.md`
- **Design Systems**: `.opencode/context/ui/web/design-systems.md`
- **UI Styling Standards**: `.opencode/context/ui/web/ui-styling-standards.md`
- **Animation Patterns**: `.opencode/context/ui/web/animation-patterns.md`
diff --git a/.opencode/context/core/workflows/delegation.md b/.opencode/context/core/workflows/delegation.md
index f50a82d..09f95b6 100644
--- a/.opencode/context/core/workflows/delegation.md
+++ b/.opencode/context/core/workflows/delegation.md
@@ -1,7 +1,7 @@
# Delegation Context Template
-> **Note**: This is a reference file. The full content is in [`task-delegation.md`](./task-delegation.md).
+> **Note**: This is a reference file. Start with [`task-delegation-basics.md`](./task-delegation-basics.md).
## Quick Reference
@@ -13,4 +13,8 @@
---
-For the complete delegation workflow template, see [task-delegation.md](./task-delegation.md).
+For the full delegation workflow, use:
+
+- [task-delegation-basics.md](./task-delegation-basics.md)
+- [task-delegation-specialists.md](./task-delegation-specialists.md)
+- [task-delegation-caching.md](./task-delegation-caching.md)
diff --git a/.opencode/context/core/workflows/external-context-integration.md b/.opencode/context/core/workflows/external-context-integration.md
index 1dde232..57ee1d6 100644
--- a/.opencode/context/core/workflows/external-context-integration.md
+++ b/.opencode/context/core/workflows/external-context-integration.md
@@ -457,5 +457,5 @@ CoderAgent reads subtask JSON and:
- **ExternalScout**: `.opencode/agent/subagents/core/externalscout.md`
- **External Context Management**: `.opencode/context/core/workflows/external-context-management.md`
-- **Task Delegation**: `.opencode/context/core/workflows/task-delegation.md`
+- **Task Delegation**: `.opencode/context/core/workflows/task-delegation-basics.md`
- **Management Script**: `scripts/external-context/manage-external-context.sh`
diff --git a/.opencode/context/core/workflows/external-context-management.md b/.opencode/context/core/workflows/external-context-management.md
index 685a40a..56549b9 100644
--- a/.opencode/context/core/workflows/external-context-management.md
+++ b/.opencode/context/core/workflows/external-context-management.md
@@ -401,6 +401,6 @@ After deleting external context files, update `.manifest.json`:
## References
- **ExternalScout**: `.opencode/agent/subagents/core/externalscout.md` โ Fetches and persists external docs
-- **Task Delegation**: `.opencode/context/core/workflows/task-delegation.md` โ How to reference external context in sessions
+- **Task Delegation**: `.opencode/context/core/workflows/task-delegation-basics.md` โ How to reference external context in sessions
- **Session Management**: `.opencode/context/core/workflows/session-management.md` โ Session lifecycle
-- **Library Registry**: `.opencode/skill/context7/library-registry.md` โ Supported libraries and query patterns
+- **Library Registry**: `.opencode/skills/context7/library-registry.md` โ Supported libraries and query patterns
diff --git a/.opencode/context/core/workflows/external-libraries-faq.md b/.opencode/context/core/workflows/external-libraries-faq.md
index b4f5c43..a2bd3bd 100644
--- a/.opencode/context/core/workflows/external-libraries-faq.md
+++ b/.opencode/context/core/workflows/external-libraries-faq.md
@@ -150,7 +150,7 @@ Before implementing with external libraries:
## Supported Libraries
-**See**: `.opencode/skill/context7/library-registry.md`
+**See**: `.opencode/skills/context7/library-registry.md`
**Categories:** Database/ORM | Auth | Frontend | Infrastructure | UI | State | Validation | Testing
diff --git a/.opencode/context/core/workflows/navigation.md b/.opencode/context/core/workflows/navigation.md
index e2deb91..474634e 100644
--- a/.opencode/context/core/workflows/navigation.md
+++ b/.opencode/context/core/workflows/navigation.md
@@ -45,7 +45,7 @@
**For complex features**:
1. Load `feature-breakdown.md` (high)
-2. Depends on: `task-delegation.md`
+2. Depends on: `task-delegation-basics.md`
**For session management**:
1. Load `session-management.md` (medium)
diff --git a/.opencode/context/core/workflows/task-delegation-specialists.md b/.opencode/context/core/workflows/task-delegation-specialists.md
index 0645803..8b5c5a0 100644
--- a/.opencode/context/core/workflows/task-delegation-specialists.md
+++ b/.opencode/context/core/workflows/task-delegation-specialists.md
@@ -127,4 +127,4 @@ task(
- `task-delegation-basics.md` - Core delegation workflow
- `task-delegation-caching.md` - Context caching
-- `design-iteration.md` - OpenFrontendSpecialist workflow
+- `design-iteration-overview.md` - OpenFrontendSpecialist workflow
diff --git a/.opencode/context/core/workflows/task-delegation.md b/.opencode/context/core/workflows/task-delegation.md
new file mode 100644
index 0000000..f52ff41
--- /dev/null
+++ b/.opencode/context/core/workflows/task-delegation.md
@@ -0,0 +1,12 @@
+
+# Task Delegation
+
+This workflow was split into focused files.
+
+Use these files instead:
+
+1. `task-delegation-basics.md` - Core delegation flow
+2. `task-delegation-specialists.md` - Specialist selection rules
+3. `task-delegation-caching.md` - Context caching patterns
+
+Start here: [task-delegation-basics.md](./task-delegation-basics.md)
diff --git a/.opencode/context/development/frontend/when-to-delegate.md b/.opencode/context/development/frontend/when-to-delegate.md
index 9235bae..838dc98 100644
--- a/.opencode/context/development/frontend/when-to-delegate.md
+++ b/.opencode/context/development/frontend/when-to-delegate.md
@@ -292,7 +292,7 @@ The frontend-specialist will automatically load these via ContextScout:
- `development/frontend/react/react-patterns.md` - React patterns (if React project)
**Workflows**:
-- `core/workflows/design-iteration.md` - Design iteration workflow
+- `core/workflows/design-iteration-overview.md` - Design iteration workflow
---
@@ -464,5 +464,5 @@ task(
- **Design Systems** โ `../../ui/web/design-systems.md`
- **UI Styling Standards** โ `../../ui/web/ui-styling-standards.md`
- **Animation Patterns** โ `../../ui/web/animation-patterns.md`
-- **Delegation Workflow** โ `../../core/workflows/task-delegation.md`
+- **Delegation Workflow** โ `../../core/workflows/task-delegation-basics.md`
- **React Patterns** โ `react/react-patterns.md`
diff --git a/.opencode/context/index.md b/.opencode/context/index.md
new file mode 100644
index 0000000..0d58d0a
--- /dev/null
+++ b/.opencode/context/index.md
@@ -0,0 +1,8 @@
+
+# Context Index
+
+The canonical context index is `navigation.md`.
+
+Use:
+
+- [navigation.md](./navigation.md)
diff --git a/.opencode/context/navigation.md b/.opencode/context/navigation.md
index e610244..7d7a5e5 100644
--- a/.opencode/context/navigation.md
+++ b/.opencode/context/navigation.md
@@ -28,7 +28,7 @@
| **Write tests** | `core/standards/test-coverage.md` |
| **Write docs** | `core/standards/documentation.md` |
| **Review code** | `core/workflows/code-review.md` |
-| **Delegate task** | `core/workflows/task-delegation.md` |
+| **Delegate task** | `core/workflows/task-delegation-basics.md` |
| **Add agent** | `openagents-repo/guides/adding-agent.md` |
| **UI development** | `development/ui-navigation.md` |
| **API development** | `development/backend-navigation.md` |
diff --git a/.opencode/context/openagents-repo/blueprints/context-bundle-template.md b/.opencode/context/openagents-repo/blueprints/context-bundle-template.md
index d4a03d6..990fdb7 100644
--- a/.opencode/context/openagents-repo/blueprints/context-bundle-template.md
+++ b/.opencode/context/openagents-repo/blueprints/context-bundle-template.md
@@ -42,7 +42,7 @@ Status: in_progress
- `.opencode/context/core/standards/security-patterns.md` โ Error handling, security patterns
**Core Workflows**:
-- `.opencode/context/core/workflows/task-delegation.md` โ Delegation process
+- `.opencode/context/core/workflows/task-delegation-basics.md` โ Delegation process
- `.opencode/context/core/workflows/feature-breakdown.md` โ Task breakdown methodology
- `.opencode/context/core/workflows/code-review.md` โ Code review guidelines
diff --git a/.opencode/context/openagents-repo/examples/context-bundle-example.md b/.opencode/context/openagents-repo/examples/context-bundle-example.md
index c37bba6..b9db73c 100644
--- a/.opencode/context/openagents-repo/examples/context-bundle-example.md
+++ b/.opencode/context/openagents-repo/examples/context-bundle-example.md
@@ -90,7 +90,7 @@ Create a new data analyst agent for the OpenAgents Control repository. This agen
**Modify**:
- `registry.json` - Add data-analyst agent entry
-- `.opencode/context/index.md` - Add data category context if needed
+- `.opencode/context/navigation.md` - Add data category context if needed
## Success Criteria
diff --git a/.opencode/context/openagents-repo/guides/adding-skill-basics.md b/.opencode/context/openagents-repo/guides/adding-skill-basics.md
index 2e147f0..8fa51d8 100644
--- a/.opencode/context/openagents-repo/guides/adding-skill-basics.md
+++ b/.opencode/context/openagents-repo/guides/adding-skill-basics.md
@@ -32,12 +32,12 @@ Adding an OpenCode skill involves:
### Create Structure
```bash
-mkdir -p .opencode/skill/{skill-name}/scripts
+mkdir -p .opencode/skills/{skill-name}/scripts
```
**Standard structure**:
```
-.opencode/skill/{skill-name}/
+.opencode/skills/{skill-name}/
โโโ SKILL.md # Required: Main skill documentation
โโโ router.sh # Optional: CLI router script
โโโ scripts/
@@ -71,7 +71,7 @@ description: Brief description of what the skill provides
### Basic Commands
```bash
-npx ts-node .opencode/skill/{skill-name}/scripts/skill-cli.ts command1
+npx ts-node .opencode/skills/{skill-name}/scripts/skill-cli.ts command1
```
### Command Reference
@@ -126,7 +126,7 @@ esac
```
```bash
-chmod +x .opencode/skill/{skill-name}/router.sh
+chmod +x .opencode/skills/{skill-name}/router.sh
```
---
diff --git a/.opencode/context/openagents-repo/guides/adding-skill-example.md b/.opencode/context/openagents-repo/guides/adding-skill-example.md
index 7a7ad0d..35b7b20 100644
--- a/.opencode/context/openagents-repo/guides/adding-skill-example.md
+++ b/.opencode/context/openagents-repo/guides/adding-skill-example.md
@@ -7,11 +7,11 @@
## Directory Structure
```bash
-mkdir -p .opencode/skill/task-management/scripts
+mkdir -p .opencode/skills/task-management/scripts
```
```
-.opencode/skill/task-management/
+.opencode/skills/task-management/
โโโ SKILL.md
โโโ router.sh
โโโ scripts/
@@ -44,13 +44,13 @@ description: Task management CLI for tracking feature subtasks
```bash
# Show all task statuses
-npx ts-node .opencode/skill/task-management/scripts/task-cli.ts status
+npx ts-node .opencode/skills/task-management/scripts/task-cli.ts status
# Show next eligible tasks
-npx ts-node .opencode/skill/task-management/scripts/task-cli.ts next
+npx ts-node .opencode/skills/task-management/scripts/task-cli.ts next
# Mark complete
-npx ts-node .opencode/skill/task-management/scripts/task-cli.ts complete "summary"
+npx ts-node .opencode/skills/task-management/scripts/task-cli.ts complete "summary"
```
```
diff --git a/.opencode/context/openagents-repo/guides/adding-skill-implementation.md b/.opencode/context/openagents-repo/guides/adding-skill-implementation.md
index c2792b5..6b93ece 100644
--- a/.opencode/context/openagents-repo/guides/adding-skill-implementation.md
+++ b/.opencode/context/openagents-repo/guides/adding-skill-implementation.md
@@ -75,7 +75,7 @@ main().catch(console.error)
"id": "{skill-name}",
"name": "Skill Name",
"type": "skill",
- "path": ".opencode/skill/{skill-name}/SKILL.md",
+ "path": ".opencode/skills/{skill-name}/SKILL.md",
"description": "Brief description",
"tags": ["tag1", "tag2"],
"dependencies": []
@@ -106,13 +106,13 @@ main().catch(console.error)
```bash
# Test help
-bash .opencode/skill/{skill-name}/router.sh help
+bash .opencode/skills/{skill-name}/router.sh help
# Test commands
-bash .opencode/skill/{skill-name}/router.sh command1 --option value
+bash .opencode/skills/{skill-name}/router.sh command1 --option value
# Test with npx
-npx ts-node .opencode/skill/{skill-name}/scripts/skill-cli.ts help
+npx ts-node .opencode/skills/{skill-name}/scripts/skill-cli.ts help
```
### Test OpenCode Integration
@@ -149,8 +149,8 @@ npx ts-node .opencode/skill/{skill-name}/scripts/skill-cli.ts help
## Checklist
-- [ ] `.opencode/skill/{skill-name}/SKILL.md` created
-- [ ] `.opencode/skill/{skill-name}/router.sh` created (if CLI-based)
+- [ ] `.opencode/skills/{skill-name}/SKILL.md` created
+- [ ] `.opencode/skills/{skill-name}/router.sh` created (if CLI-based)
- [ ] Router script is executable (`chmod +x`)
- [ ] Registry updated (if needed)
- [ ] Profile updated (if needed)
diff --git a/.opencode/context/openagents-repo/guides/building-cli-compact.md b/.opencode/context/openagents-repo/guides/building-cli-compact.md
index d651978..4d572fe 100644
--- a/.opencode/context/openagents-repo/guides/building-cli-compact.md
+++ b/.opencode/context/openagents-repo/guides/building-cli-compact.md
@@ -10,10 +10,10 @@
**Don't start from scratch.** Use the standard pattern to build robust CLIs in minutes.
-1. **Create**: `mkdir -p .opencode/skill/{name}/scripts`
+1. **Create**: `mkdir -p .opencode/skills/{name}/scripts`
2. **Implement**: Create `skill-cli.ts` (TypeScript) and `router.sh` (Bash)
3. **Register**: Add to `registry.json`
-4. **Run**: `bash .opencode/skill/{name}/router.sh help`
+4. **Run**: `bash .opencode/skills/{name}/router.sh help`
---
diff --git a/.opencode/context/openagents-repo/lookup/file-locations.md b/.opencode/context/openagents-repo/lookup/file-locations.md
index 22fad70..1b31c1f 100644
--- a/.opencode/context/openagents-repo/lookup/file-locations.md
+++ b/.opencode/context/openagents-repo/lookup/file-locations.md
@@ -157,7 +157,7 @@ README.md # Main documentation
.opencode/context/core/standards/documentation.md
.opencode/context/core/standards/test-coverage.md
.opencode/context/core/standards/security-patterns.md
-.opencode/context/core/workflows/task-delegation.md
+.opencode/context/core/workflows/task-delegation-basics.md
.opencode/context/core/workflows/code-review.md
```
diff --git a/.opencode/context/openagents-repo/quality/registry-dependencies.md b/.opencode/context/openagents-repo/quality/registry-dependencies.md
index dc427f7..c90828b 100644
--- a/.opencode/context/openagents-repo/quality/registry-dependencies.md
+++ b/.opencode/context/openagents-repo/quality/registry-dependencies.md
@@ -127,7 +127,7 @@ Dependency: context:core/standards/code
dependencies:
- context:core/standards/code # .opencode/context/core/standards/code-quality.md
- context:core/standards/docs # .opencode/context/core/standards/documentation.md
- - context:core/workflows/delegation # .opencode/context/core/workflows/task-delegation.md
+ - context:core/workflows/delegation # .opencode/context/core/workflows/task-delegation-basics.md
- context:openagents-repo/guides/adding-agent # Project-specific context
```
diff --git a/.opencode/plugin/docs/VALIDATOR_GUIDE.md b/.opencode/plugin/docs/VALIDATOR_GUIDE.md
index 7f4c8ce..178c2df 100644
--- a/.opencode/plugin/docs/VALIDATOR_GUIDE.md
+++ b/.opencode/plugin/docs/VALIDATOR_GUIDE.md
@@ -201,7 +201,7 @@ analyze_context_reads
- **code.md** (2 reads)
`.opencode/context/core/standards/code-quality.md`
- **delegation.md** (1 read)
- `.opencode/context/core/workflows/task-delegation.md`
+ `.opencode/context/core/workflows/task-delegation-basics.md`
### Timeline:
1. [10:23:45] code.md
@@ -235,7 +235,7 @@ check_context_compliance
### โ
Compliant Actions:
- โ
Loaded standards/code-quality.md before code writing
-- โ
Loaded workflows/task-delegation.md before delegation
+- โ
Loaded workflows/task-delegation-basics.md before delegation
### Context Loading Rules:
According to OpenAgent prompt, the agent should:
@@ -251,7 +251,7 @@ According to OpenAgent prompt, the agent should:
- Writing docs โ should read `standards/documentation.md`
- Writing tests โ should read `standards/test-coverage.md`
- Code review โ should read `workflows/code-review.md`
-- Delegating โ should read `workflows/task-delegation.md`
+- Delegating โ should read `workflows/task-delegation-basics.md`
**When to use:**
- To verify lazy loading is working
diff --git a/.opencode/prompts/core/openagent/gemini.md b/.opencode/prompts/core/openagent/gemini.md
index 3f75d10..46322af 100644
--- a/.opencode/prompts/core/openagent/gemini.md
+++ b/.opencode/prompts/core/openagent/gemini.md
@@ -60,14 +60,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -180,7 +180,7 @@ task(
- docs (write/edit docs) โ Read .opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read .opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read .opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
3. Apply context:
@@ -192,7 +192,7 @@ task(
IF docs task โ .opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ .opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ .opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ .opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ .opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -303,7 +303,7 @@ task(
- Full delegation template & process
+ Full delegation template & process
@@ -316,14 +316,14 @@ task(
- Context index: .opencode/context/index.md
+ Context index: .opencode/context/navigation.md
Load index when discovering contexts by keywords. For common tasks:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
- - Delegation โ .opencode/context/core/workflows/task-delegation.md
+ - Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
Full index includes all contexts with triggers and dependencies.
Context files loaded per @critical_context_requirement.
diff --git a/.opencode/prompts/core/openagent/gpt.md b/.opencode/prompts/core/openagent/gpt.md
index 08ca3ee..9610ebf 100644
--- a/.opencode/prompts/core/openagent/gpt.md
+++ b/.opencode/prompts/core/openagent/gpt.md
@@ -60,14 +60,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -180,7 +180,7 @@ task(
- docs (write/edit docs) โ Read .opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read .opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read .opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
3. Apply context:
@@ -192,7 +192,7 @@ task(
IF docs task โ .opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ .opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ .opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ .opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ .opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -303,7 +303,7 @@ task(
- Full delegation template & process
+ Full delegation template & process
@@ -316,14 +316,14 @@ task(
- Context index: .opencode/context/index.md
+ Context index: .opencode/context/navigation.md
Load index when discovering contexts by keywords. For common tasks:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
- - Delegation โ .opencode/context/core/workflows/task-delegation.md
+ - Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
Full index includes all contexts with triggers and dependencies.
Context files loaded per @critical_context_requirement.
diff --git a/.opencode/prompts/core/openagent/grok.md b/.opencode/prompts/core/openagent/grok.md
index 03b2261..bd6b80b 100644
--- a/.opencode/prompts/core/openagent/grok.md
+++ b/.opencode/prompts/core/openagent/grok.md
@@ -63,14 +63,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -183,7 +183,7 @@ task(
- docs (write/edit docs) โ Read .opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read .opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read .opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
3. Apply context:
@@ -195,7 +195,7 @@ task(
IF docs task โ .opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ .opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ .opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ .opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ .opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -306,7 +306,7 @@ task(
- Full delegation template & process
+ Full delegation template & process
@@ -319,14 +319,14 @@ task(
- Context index: .opencode/context/index.md
+ Context index: .opencode/context/navigation.md
Load index when discovering contexts by keywords. For common tasks:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
- - Delegation โ .opencode/context/core/workflows/task-delegation.md
+ - Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
Full index includes all contexts with triggers and dependencies.
Context files loaded per @critical_context_requirement.
diff --git a/.opencode/prompts/core/openagent/llama.md b/.opencode/prompts/core/openagent/llama.md
index e8f39dd..796d05b 100644
--- a/.opencode/prompts/core/openagent/llama.md
+++ b/.opencode/prompts/core/openagent/llama.md
@@ -60,14 +60,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -180,7 +180,7 @@ task(
- docs (write/edit docs) โ Read .opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read .opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read .opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read .opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
3. Apply context:
@@ -192,7 +192,7 @@ task(
IF docs task โ .opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ .opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ .opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ .opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ .opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -303,7 +303,7 @@ task(
- Full delegation template & process
+ Full delegation template & process
@@ -316,14 +316,14 @@ task(
- Context index: .opencode/context/index.md
+ Context index: .opencode/context/navigation.md
Load index when discovering contexts by keywords. For common tasks:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
- - Delegation โ .opencode/context/core/workflows/task-delegation.md
+ - Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
Full index includes all contexts with triggers and dependencies.
Context files loaded per @critical_context_requirement.
diff --git a/.opencode/prompts/core/openagent/openrouter.md b/.opencode/prompts/core/openagent/openrouter.md
index 84c8f7d..d023133 100644
--- a/.opencode/prompts/core/openagent/openrouter.md
+++ b/.opencode/prompts/core/openagent/openrouter.md
@@ -61,14 +61,14 @@ WHY THIS MATTERS:
- Docs without standards/documentation.md โ Wrong tone, missing sections, poor structure
- Tests without standards/test-coverage.md โ Wrong framework, incomplete coverage
- Review without workflows/code-review.md โ Missed quality checks, incomplete analysis
-- Delegation without workflows/task-delegation.md โ Wrong context passed to subagents
+- Delegation without workflows/task-delegation-basics.md โ Wrong context passed to subagents
Required context files:
- Code tasks โ .opencode/context/core/standards/code-quality.md
- Docs tasks โ .opencode/context/core/standards/documentation.md
- Tests tasks โ .opencode/context/core/standards/test-coverage.md
- Review tasks โ .opencode/context/core/workflows/code-review.md
-- Delegation โ .opencode/context/core/workflows/task-delegation.md
+- Delegation โ .opencode/context/core/workflows/task-delegation-basics.md
CONSEQUENCE OF SKIPPING: Work that doesn't match project standards = wasted effort + rework
@@ -355,7 +355,7 @@ THEN:
- Rule 5: Build validation needed?
4. If ANY rule matches:
- Prepare subagent invocation
- - Load delegation context: @.opencode/context/core/workflows/task-delegation.md
+ - Load delegation context: @.opencode/context/core/workflows/task-delegation-basics.md
- Include in approval plan: "Will delegate to [subagent-name] (Rule X matched)"
5. If NO rules match:
- Proceed with direct execution
@@ -412,7 +412,7 @@ THEN:
- docs (write/edit docs) โ Read @.opencode/context/core/standards/documentation.md NOW
- tests (write/edit tests) โ Read @.opencode/context/core/standards/test-coverage.md NOW
- review (code review) โ Read @.opencode/context/core/workflows/code-review.md NOW
- - delegate (using task tool) โ Read @.opencode/context/core/workflows/task-delegation.md NOW
+ - delegate (using task tool) โ Read @.opencode/context/core/workflows/task-delegation-basics.md NOW
- bash-only โ No context needed, proceed to 3.2
3. Apply context:
@@ -424,7 +424,7 @@ THEN:
IF docs task โ @.opencode/context/core/standards/documentation.md (MANDATORY)
IF tests task โ @.opencode/context/core/standards/test-coverage.md (MANDATORY)
IF review task โ @.opencode/context/core/workflows/code-review.md (MANDATORY)
- IF delegation โ @.opencode/context/core/workflows/task-delegation.md (MANDATORY)
+ IF delegation โ @.opencode/context/core/workflows/task-delegation-basics.md (MANDATORY)
IF bash-only โ No context required
WHEN DELEGATING TO SUBAGENTS:
@@ -491,12 +491,12 @@ THEN:
Feature spans 4+ files | effort >60 min | complex dependencies
- Load @.opencode/context/core/workflows/task-delegation.md
+ Load @.opencode/context/core/workflows/task-delegation-basics.md
task(
subagent_type="TaskManager",
description="Break down [feature]",
- prompt="Analyze and break down [feature] into atomic subtasks. Load @.opencode/context/core/workflows/task-delegation.md for process."
+ prompt="Analyze and break down [feature] into atomic subtasks. Load @.opencode/context/core/workflows/task-delegation-basics.md for process."
)
diff --git a/.opencode/skill/context/SKILL.md b/.opencode/skills/context-manager/SKILL.md
similarity index 94%
rename from .opencode/skill/context/SKILL.md
rename to .opencode/skills/context-manager/SKILL.md
index 8186eb0..726e872 100644
--- a/.opencode/skill/context/SKILL.md
+++ b/.opencode/skills/context-manager/SKILL.md
@@ -38,49 +38,49 @@ I provide 8 powerful operations for managing context:
### 1. Discover Context
```bash
-bash .opencode/skill/context/router.sh discover authentication
+bash .opencode/skills/context-manager/router.sh discover authentication
```
Finds all context files related to authentication patterns.
### 2. Fetch External Documentation
```bash
-bash .opencode/skill/context/router.sh fetch "Drizzle ORM" "modular schemas"
+bash .opencode/skills/context-manager/router.sh fetch "Drizzle ORM" "modular schemas"
```
Retrieves live documentation from external libraries.
### 3. Harvest Context
```bash
-bash .opencode/skill/context/router.sh harvest ANALYSIS.md
+bash .opencode/skills/context-manager/router.sh harvest ANALYSIS.md
```
Extracts key concepts from summary files into permanent context.
### 4. Extract Information
```bash
-bash .opencode/skill/context/router.sh extract code-quality.md "naming conventions"
+bash .opencode/skills/context-manager/router.sh extract code-quality.md "naming conventions"
```
Pulls specific information from context files.
### 5. Compress Files
```bash
-bash .opencode/skill/context/router.sh compress .opencode/context/ 100KB
+bash .opencode/skills/context-manager/router.sh compress .opencode/context/ 100KB
```
Reduces large context files to save space.
### 6. Organize Context
```bash
-bash .opencode/skill/context/router.sh organize .opencode/context/
+bash .opencode/skills/context-manager/router.sh organize .opencode/context/
```
Restructures context by concern for better organization.
### 7. Cleanup Stale Files
```bash
-bash .opencode/skill/context/router.sh cleanup .tmp/ 7
+bash .opencode/skills/context-manager/router.sh cleanup .tmp/ 7
```
Removes temporary or old files (older than 7 days).
### 8. Guided Workflow
```bash
-bash .opencode/skill/context/router.sh process "organize authentication context" .opencode/context/
+bash .opencode/skills/context-manager/router.sh process "organize authentication context" .opencode/context/
```
Step-by-step guidance for complex context operations.
@@ -468,7 +468,7 @@ process [goal] [scope]
## File Structure
```
-.opencode/skill/context/
+.opencode/skills/context-manager/
โโโ SKILL.md # This file
โโโ router.sh # CLI router (entry point)
โโโ CONTEXT_SKILL_QUICK_START.md # Quick start guide
diff --git a/.opencode/skill/context/router.sh b/.opencode/skills/context-manager/router.sh
similarity index 82%
rename from .opencode/skill/context/router.sh
rename to .opencode/skills/context-manager/router.sh
index c592e0a..fe8d69e 100755
--- a/.opencode/skill/context/router.sh
+++ b/.opencode/skills/context-manager/router.sh
@@ -46,7 +46,7 @@ FEATURES:
โ Clean up stale files
โ Guided workflows
-For detailed documentation, see: .opencode/skill/context/SKILL.md
+For detailed documentation, see: .opencode/skills/context-manager/SKILL.md
HELP
}
@@ -87,42 +87,42 @@ case "$OPERATION" in
discover)
echo "๐ DISCOVER: Finding context files..."
echo "Target: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
fetch)
echo "๐ฅ FETCH: Retrieving external documentation..."
echo "Libraries: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
harvest)
echo "๐พ HARVEST: Extracting context from summaries..."
echo "Source: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
extract)
echo "๐ EXTRACT: Pulling key information..."
echo "Target: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
compress)
echo "๐๏ธ COMPRESS: Reducing file sizes..."
echo "Target: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
organize)
echo "๐ ORGANIZE: Restructuring context..."
echo "Target: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
cleanup)
echo "๐งน CLEANUP: Removing stale files..."
echo "Target: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
process)
echo "โ๏ธ PROCESS: Guided workflow..."
echo "Goal: $*"
- echo "See .opencode/skill/context/SKILL.md for full documentation"
+ echo "See .opencode/skills/context-manager/SKILL.md for full documentation"
;;
*)
echo "โ Unknown operation: $OPERATION"
diff --git a/.opencode/skill/context7/README.md b/.opencode/skills/context7/README.md
similarity index 94%
rename from .opencode/skill/context7/README.md
rename to .opencode/skills/context7/README.md
index 2c48381..bd53d61 100644
--- a/.opencode/skill/context7/README.md
+++ b/.opencode/skills/context7/README.md
@@ -38,7 +38,7 @@ curl -s "https://context7.com/api/v2/libs/search?libraryName=LIBRARY&query=TOPIC
curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=OPTIMIZED_QUERY&type=txt"
```
-See `SKILLS.MD` for detailed API documentation.
+See `SKILL.md` for detailed API documentation.
## Supported Libraries
@@ -76,7 +76,7 @@ User receives current, actionable docs
## Files
-- **`SKILLS.MD`** - Context7 API documentation and usage
+- **`SKILL.md`** - Context7 API documentation and usage
- **`library-registry.md`** - Supported libraries, aliases, and query patterns
- **`README.md`** - This file (overview and quick start)
@@ -98,5 +98,5 @@ To add a new library to the registry:
## Related
-- **ExternalScout**: `.opencode/agent/subagents/core/external-scout.md`
+- **ExternalScout**: `.opencode/agent/subagents/core/externalscout.md`
- **ContextScout**: `.opencode/agent/subagents/core/contextscout.md`
diff --git a/.opencode/skill/context7/SKILLS.MD b/.opencode/skills/context7/SKILL.md
similarity index 100%
rename from .opencode/skill/context7/SKILLS.MD
rename to .opencode/skills/context7/SKILL.md
diff --git a/.opencode/skill/context7/library-registry.md b/.opencode/skills/context7/library-registry.md
similarity index 100%
rename from .opencode/skill/context7/library-registry.md
rename to .opencode/skills/context7/library-registry.md
diff --git a/.opencode/skill/context7/navigation.md b/.opencode/skills/context7/navigation.md
similarity index 83%
rename from .opencode/skill/context7/navigation.md
rename to .opencode/skills/context7/navigation.md
index ba37736..30f848c 100644
--- a/.opencode/skill/context7/navigation.md
+++ b/.opencode/skills/context7/navigation.md
@@ -10,7 +10,7 @@
context7/
โโโ navigation.md # This file
โโโ README.md # Quick start and workflow
-โโโ SKILLS.MD # Context7 API documentation
+โโโ SKILL.md # Context7 API documentation
โโโ library-registry.md # Supported libraries and query patterns
```
@@ -21,7 +21,7 @@ context7/
| Task | Path |
|------|------|
| **Quick start** | `README.md` |
-| **API reference** | `SKILLS.MD` |
+| **API reference** | `SKILL.md` |
| **Supported libraries** | `library-registry.md` (lines 18-181) |
| **Query patterns** | `library-registry.md` (lines 199-261) |
| **Add new library** | `library-registry.md` (lines 264-279) |
@@ -33,7 +33,7 @@ context7/
**Using Context7**:
- Quick start โ `README.md`
-- API details โ `SKILLS.MD`
+- API details โ `SKILL.md`
**Adding Libraries**:
- Template โ `library-registry.md` (lines 272-279)
@@ -41,11 +41,11 @@ context7/
**Integration**:
- ContextScout workflow โ `README.md` (lines 54-73)
-- ExternalScout subagent โ `.opencode/agent/subagents/core/external-scout.md`
+- ExternalScout subagent โ `.opencode/agent/subagents/core/externalscout.md`
---
## Related
-- **ExternalScout**: `.opencode/agent/subagents/core/external-scout.md`
+- **ExternalScout**: `.opencode/agent/subagents/core/externalscout.md`
- **ContextScout**: `.opencode/agent/subagents/core/contextscout.md`
diff --git a/.opencode/skill/smart-router-skill/SKILL.md b/.opencode/skills/smart-router-skill/SKILL.md
similarity index 97%
rename from .opencode/skill/smart-router-skill/SKILL.md
rename to .opencode/skills/smart-router-skill/SKILL.md
index 7bdb7ab..f5f96f4 100644
--- a/.opencode/skill/smart-router-skill/SKILL.md
+++ b/.opencode/skills/smart-router-skill/SKILL.md
@@ -38,7 +38,7 @@ This shows how skills can adapt behavior based on simple configuration changes!
When you ask to use this skill, I'll present the character options and ask you to choose. Then I'll run:
```bash
-cd .opencode/skill/smart-router-skill
+cd .opencode/skills/smart-router-skill
bash router.sh --character
```
@@ -60,7 +60,7 @@ Me: *runs bash router.sh --character yoda*
Want to see different behavior? Edit the config file!
-**File:** `.opencode/skill/smart-router-skill/config/personality-config.json`
+**File:** `.opencode/skills/smart-router-skill/config/personality-config.json`
```json
{
@@ -127,7 +127,7 @@ Want to see different behavior? Edit the config file!
A bash script that loads a character personality and runs their themed workflow.
-**Location:** `.opencode/skill/smart-router-skill/router.sh`
+**Location:** `.opencode/skills/smart-router-skill/router.sh`
```bash
# Basic usage
diff --git a/.opencode/skill/smart-router-skill/config/personality-config.json b/.opencode/skills/smart-router-skill/config/personality-config.json
similarity index 100%
rename from .opencode/skill/smart-router-skill/config/personality-config.json
rename to .opencode/skills/smart-router-skill/config/personality-config.json
diff --git a/.opencode/skill/smart-router-skill/router.sh b/.opencode/skills/smart-router-skill/router.sh
similarity index 100%
rename from .opencode/skill/smart-router-skill/router.sh
rename to .opencode/skills/smart-router-skill/router.sh
diff --git a/.opencode/skill/smart-router-skill/scripts/sherlock-workflow.sh b/.opencode/skills/smart-router-skill/scripts/sherlock-workflow.sh
similarity index 100%
rename from .opencode/skill/smart-router-skill/scripts/sherlock-workflow.sh
rename to .opencode/skills/smart-router-skill/scripts/sherlock-workflow.sh
diff --git a/.opencode/skill/smart-router-skill/scripts/stark-workflow.sh b/.opencode/skills/smart-router-skill/scripts/stark-workflow.sh
similarity index 100%
rename from .opencode/skill/smart-router-skill/scripts/stark-workflow.sh
rename to .opencode/skills/smart-router-skill/scripts/stark-workflow.sh
diff --git a/.opencode/skill/smart-router-skill/scripts/yoda-workflow.sh b/.opencode/skills/smart-router-skill/scripts/yoda-workflow.sh
similarity index 100%
rename from .opencode/skill/smart-router-skill/scripts/yoda-workflow.sh
rename to .opencode/skills/smart-router-skill/scripts/yoda-workflow.sh
diff --git a/.opencode/skill/task-management/SKILL.md b/.opencode/skills/task-management/SKILL.md
similarity index 82%
rename from .opencode/skill/task-management/SKILL.md
rename to .opencode/skills/task-management/SKILL.md
index 05eddbb..8143066 100644
--- a/.opencode/skill/task-management/SKILL.md
+++ b/.opencode/skills/task-management/SKILL.md
@@ -37,19 +37,19 @@ I provide a command-line interface for managing task breakdowns created by the T
```bash
# Show all task statuses
-bash .opencode/skill/task-management/router.sh status
+bash .opencode/skills/task-management/router.sh status
# Show next eligible tasks
-bash .opencode/skill/task-management/router.sh next
+bash .opencode/skills/task-management/router.sh next
# Show blocked tasks
-bash .opencode/skill/task-management/router.sh blocked
+bash .opencode/skills/task-management/router.sh blocked
# Mark a task complete
-bash .opencode/skill/task-management/router.sh complete "summary"
+bash .opencode/skills/task-management/router.sh complete "summary"
# Validate all tasks
-bash .opencode/skill/task-management/router.sh validate
+bash .opencode/skills/task-management/router.sh validate
```
### Command Reference
@@ -72,7 +72,7 @@ bash .opencode/skill/task-management/router.sh validate
### Check Overall Progress
```bash
-$ bash .opencode/skill/task-management/router.sh status
+$ bash .opencode/skills/task-management/router.sh status
[my-feature] My Feature Implementation
Status: active | Progress: 45% (5/11)
@@ -82,7 +82,7 @@ $ bash .opencode/skill/task-management/router.sh status
### Find What's Next
```bash
-$ bash .opencode/skill/task-management/router.sh next
+$ bash .opencode/skills/task-management/router.sh next
=== Ready Tasks (deps satisfied) ===
@@ -94,7 +94,7 @@ $ bash .opencode/skill/task-management/router.sh next
### Mark Complete
```bash
-$ bash .opencode/skill/task-management/router.sh complete my-feature 05 "Implemented authentication module"
+$ bash .opencode/skills/task-management/router.sh complete my-feature 05 "Implemented authentication module"
โ Marked my-feature/05 as completed
Summary: Implemented authentication module
@@ -104,7 +104,7 @@ $ bash .opencode/skill/task-management/router.sh complete my-feature 05 "Impleme
### Check Dependencies
```bash
-$ bash .opencode/skill/task-management/router.sh deps my-feature 07
+$ bash .opencode/skills/task-management/router.sh deps my-feature 07
=== Dependency Tree: my-feature/07 ===
@@ -116,7 +116,7 @@ $ bash .opencode/skill/task-management/router.sh deps my-feature 07
### Validate Everything
```bash
-$ bash .opencode/skill/task-management/router.sh validate
+$ bash .opencode/skills/task-management/router.sh validate
=== Validation Results ===
@@ -129,7 +129,7 @@ $ bash .opencode/skill/task-management/router.sh validate
## Architecture
```
-.opencode/skill/task-management/
+.opencode/skills/task-management/
โโโ SKILL.md # This file
โโโ router.sh # CLI router (entry point)
โโโ scripts/
@@ -258,7 +258,7 @@ The `validate` command performs comprehensive checks on task files:
Run `validate` regularly to catch issues early:
```bash
-bash .opencode/skill/task-management/router.sh validate my-feature
+bash .opencode/skills/task-management/router.sh validate my-feature
```
### 6. Context and Reference Files
@@ -294,7 +294,7 @@ Working agents (CoderAgent, TestEngineer, etc.) execute subtasks and report comp
task(subagent_type="TaskManager", description="Implement feature X", ...)
# 2. Check what's ready
-bash .opencode/skill/task-management/router.sh next
+bash .opencode/skills/task-management/router.sh next
# 3. Delegate first task to working agent
task(subagent_type="CoderAgent", description="Implement subtask 01", ...)
@@ -304,36 +304,36 @@ task(subagent_type="CoderAgent", description="Implement subtask 01", ...)
```bash
# Check overall status
-bash .opencode/skill/task-management/router.sh status my-feature
+bash .opencode/skills/task-management/router.sh status my-feature
# See what's next
-bash .opencode/skill/task-management/router.sh next my-feature
+bash .opencode/skills/task-management/router.sh next my-feature
# Check what's blocked
-bash .opencode/skill/task-management/router.sh blocked my-feature
+bash .opencode/skills/task-management/router.sh blocked my-feature
```
### Completing Tasks
```bash
# After working agent finishes
-bash .opencode/skill/task-management/router.sh complete my-feature 05 "Implemented auth module with JWT support"
+bash .opencode/skills/task-management/router.sh complete my-feature 05 "Implemented auth module with JWT support"
# Check progress
-bash .opencode/skill/task-management/router.sh status my-feature
+bash .opencode/skills/task-management/router.sh status my-feature
# Find next task
-bash .opencode/skill/task-management/router.sh next my-feature
+bash .opencode/skills/task-management/router.sh next my-feature
```
### Validating Everything
```bash
# Validate all tasks
-bash .opencode/skill/task-management/router.sh validate
+bash .opencode/skills/task-management/router.sh validate
# Validate specific feature
-bash .opencode/skill/task-management/router.sh validate my-feature
+bash .opencode/skills/task-management/router.sh validate my-feature
```
---
@@ -353,19 +353,19 @@ complete my-feature 05 "Done"
### 2. Check Dependencies Before Starting
```bash
# See what a task depends on
-bash .opencode/skill/task-management/router.sh deps my-feature 07
+bash .opencode/skills/task-management/router.sh deps my-feature 07
```
### 3. Identify Parallelizable Work
```bash
# Find tasks that can run in parallel
-bash .opencode/skill/task-management/router.sh parallel my-feature
+bash .opencode/skills/task-management/router.sh parallel my-feature
```
### 4. Regular Validation
```bash
# Validate regularly to catch issues early
-bash .opencode/skill/task-management/router.sh validate
+bash .opencode/skills/task-management/router.sh validate
```
---
@@ -388,11 +388,11 @@ Run `validate` to see specific issues, then check the JSON files in `.tmp/tasks/
## File Locations
-- **Skill**: `.opencode/skill/task-management/`
-- **Router**: `.opencode/skill/task-management/router.sh`
-- **CLI**: `.opencode/skill/task-management/scripts/task-cli.ts`
+- **Skill**: `.opencode/skills/task-management/`
+- **Router**: `.opencode/skills/task-management/router.sh`
+- **CLI**: `.opencode/skills/task-management/scripts/task-cli.ts`
- **Tasks**: `.tmp/tasks/` (created by TaskManager)
-- **Documentation**: `.opencode/skill/task-management/SKILL.md` (this file)
+- **Documentation**: `.opencode/skills/task-management/SKILL.md` (this file)
---
diff --git a/.opencode/skill/task-management/router.sh b/.opencode/skills/task-management/router.sh
similarity index 97%
rename from .opencode/skill/task-management/router.sh
rename to .opencode/skills/task-management/router.sh
index 5547c82..4066c2c 100755
--- a/.opencode/skill/task-management/router.sh
+++ b/.opencode/skills/task-management/router.sh
@@ -42,7 +42,7 @@ FEATURES:
โ Mark subtasks complete with summaries
โ Validate task integrity
-For more info, see: .opencode/skill/task-management/SKILL.md
+For more info, see: .opencode/skills/task-management/SKILL.md
HELP
}
diff --git a/.opencode/skill/task-management/scripts/task-cli.ts b/.opencode/skills/task-management/scripts/task-cli.ts
similarity index 74%
rename from .opencode/skill/task-management/scripts/task-cli.ts
rename to .opencode/skills/task-management/scripts/task-cli.ts
index 510a0d9..64b4068 100644
--- a/.opencode/skill/task-management/scripts/task-cli.ts
+++ b/.opencode/skills/task-management/scripts/task-cli.ts
@@ -300,11 +300,45 @@ function cmdValidate(feature?: string): void {
const features = feature ? [feature] : getFeatureDirs();
let hasErrors = false;
+ const validTaskStatuses = new Set(['active', 'completed', 'blocked', 'archived']);
+ const validSubtaskStatuses = new Set(['pending', 'in_progress', 'completed', 'blocked']);
+
+ const requiredTaskFields = [
+ 'id',
+ 'name',
+ 'status',
+ 'objective',
+ 'context_files',
+ 'exit_criteria',
+ 'subtask_count',
+ 'completed_count',
+ 'created_at',
+ 'completed_at',
+ ];
+
+ const requiredSubtaskFields = [
+ 'id',
+ 'seq',
+ 'title',
+ 'status',
+ 'depends_on',
+ 'parallel',
+ 'context_files',
+ 'acceptance_criteria',
+ 'deliverables',
+ 'agent_id',
+ 'started_at',
+ 'completed_at',
+ 'completion_summary',
+ ];
+
+ const hasField = (obj: any, field: string): boolean => Object.prototype.hasOwnProperty.call(obj, field);
+ const isStringArray = (value: any): boolean => Array.isArray(value) && value.every(v => typeof v === 'string');
+
console.log('\n=== Validation Results ===\n');
for (const f of features) {
const errors: string[] = [];
- const warnings: string[] = [];
// Check task.json exists
const task = loadTask(f);
@@ -314,16 +348,106 @@ function cmdValidate(feature?: string): void {
// Load and validate subtasks
const subtasks = loadSubtasks(f);
+ const seqCounts = new Map();
+ for (const s of subtasks) {
+ const seq = typeof s.seq === 'string' ? s.seq : '';
+ seqCounts.set(seq, (seqCounts.get(seq) || 0) + 1);
+ }
const seqs = new Set(subtasks.map(s => s.seq));
+ if (task) {
+ // Required fields in task.json
+ for (const field of requiredTaskFields) {
+ if (!hasField(task, field)) {
+ errors.push(`task.json: missing required field '${field}'`);
+ }
+ }
+
+ // Task ID should match feature slug
+ if (task.id !== f) {
+ errors.push(`task.json id ('${task.id}') should match feature slug ('${f}')`);
+ }
+
+ // Task status should be valid
+ if (!validTaskStatuses.has(task.status)) {
+ errors.push(`task.json: invalid status '${task.status}'`);
+ }
+
+ // Basic type checks for key task fields
+ if (!isStringArray(task.context_files)) {
+ errors.push('task.json: context_files must be string[]');
+ }
+ if (hasField(task, 'reference_files') && task.reference_files !== undefined && !isStringArray(task.reference_files)) {
+ errors.push('task.json: reference_files must be string[] when present');
+ }
+ if (!isStringArray(task.exit_criteria)) {
+ errors.push('task.json: exit_criteria must be string[]');
+ }
+ if (typeof task.subtask_count !== 'number') {
+ errors.push('task.json: subtask_count must be number');
+ }
+ if (typeof task.completed_count !== 'number') {
+ errors.push('task.json: completed_count must be number');
+ }
+ }
+
for (const s of subtasks) {
+ // Required fields in subtask files
+ for (const field of requiredSubtaskFields) {
+ if (!hasField(s, field)) {
+ errors.push(`${s.seq || '??'}: missing required field '${field}'`);
+ }
+ }
+
+ // Sequence format and uniqueness
+ if (!/^\d{2}$/.test(s.seq)) {
+ errors.push(`${s.seq}: sequence must be 2 digits (e.g., 01, 02)`);
+ }
+ if ((seqCounts.get(s.seq) || 0) > 1) {
+ errors.push(`${s.seq}: duplicate sequence number`);
+ }
+
// Check ID format
if (!s.id.startsWith(f)) {
errors.push(`${s.seq}: ID should start with feature name`);
}
+ // Status should be valid
+ if (!validSubtaskStatuses.has(s.status)) {
+ errors.push(`${s.seq}: invalid status '${s.status}'`);
+ }
+
+ // Type checks
+ if (!isStringArray(s.depends_on)) {
+ errors.push(`${s.seq}: depends_on must be string[]`);
+ }
+ if (typeof s.parallel !== 'boolean') {
+ errors.push(`${s.seq}: parallel must be boolean`);
+ }
+ if (!isStringArray(s.context_files)) {
+ errors.push(`${s.seq}: context_files must be string[]`);
+ }
+ if (hasField(s, 'reference_files') && s.reference_files !== undefined && !isStringArray(s.reference_files)) {
+ errors.push(`${s.seq}: reference_files must be string[] when present`);
+ }
+ if (!isStringArray(s.acceptance_criteria)) {
+ errors.push(`${s.seq}: acceptance_criteria must be string[]`);
+ } else if (s.acceptance_criteria.length === 0) {
+ errors.push(`${s.seq}: No acceptance criteria defined`);
+ }
+ if (!isStringArray(s.deliverables)) {
+ errors.push(`${s.seq}: deliverables must be string[]`);
+ } else if (s.deliverables.length === 0) {
+ errors.push(`${s.seq}: No deliverables defined`);
+ }
+
+ // Self dependency is invalid
+ if (Array.isArray(s.depends_on) && s.depends_on.includes(s.seq)) {
+ errors.push(`${s.seq}: task cannot depend on itself`);
+ }
+
// Check for missing dependencies
- for (const dep of s.depends_on) {
+ for (const dep of (Array.isArray(s.depends_on) ? s.depends_on : [])) {
if (!seqs.has(dep)) {
errors.push(`${s.seq}: depends on non-existent task ${dep}`);
}
@@ -348,14 +472,6 @@ function cmdValidate(feature?: string): void {
return false;
};
checkCircular(s.seq, []);
-
- // Warnings
- if (s.acceptance_criteria.length === 0) {
- warnings.push(`${s.seq}: No acceptance criteria defined`);
- }
- if (s.deliverables.length === 0) {
- warnings.push(`${s.seq}: No deliverables defined`);
- }
}
// Check counts match
@@ -365,16 +481,13 @@ function cmdValidate(feature?: string): void {
// Print results
console.log(`[${f}]`);
- if (errors.length === 0 && warnings.length === 0) {
+ if (errors.length === 0) {
console.log(' โ All checks passed');
} else {
for (const e of errors) {
console.log(` โ ERROR: ${e}`);
hasErrors = true;
}
- for (const w of warnings) {
- console.log(` โ WARNING: ${w}`);
- }
}
console.log();
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a56640d..65e1b64 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,9 +33,9 @@ All notable changes to this project will be documented in this file.
- Added to registry with `skill:context7` dependency
- **Context7 Skill**: Registered in system for external documentation fetching
- - Path: `.opencode/skill/context7/SKILLS.MD`
- - Library registry: `.opencode/skill/context7/library-registry.md`
- - Navigation guide: `.opencode/skill/context7/navigation.md`
+ - Path: `.opencode/skills/context7/SKILL.md`
+ - Library registry: `.opencode/skills/context7/library-registry.md`
+ - Navigation guide: `.opencode/skills/context7/navigation.md`
### Changed
- **ContextScout v5.1.0**: Optimized with research-backed prompt engineering patterns
diff --git a/install.sh b/install.sh
index a5187ce..4c8a853 100755
--- a/install.sh
+++ b/install.sh
@@ -513,10 +513,10 @@ show_install_location_menu() {
echo " Examples:"
case "$PLATFORM" in
Windows)
- echo " ${CYAN}C:/Users/username/my-agents${NC} or ${CYAN}~/my-agents${NC}"
+ echo -e " ${CYAN}C:/Users/username/my-agents${NC} or ${CYAN}~/my-agents${NC}"
;;
*)
- echo " ${CYAN}/home/username/my-agents${NC} or ${CYAN}~/my-agents${NC}"
+ echo -e " ${CYAN}/home/username/my-agents${NC} or ${CYAN}~/my-agents${NC}"
;;
esac
echo ""
@@ -952,7 +952,7 @@ show_collision_report() {
tools+=("$file")
elif [[ $file == *"/plugin/"* ]]; then
plugins+=("$file")
- elif [[ $file == *"/skill/"* ]]; then
+ elif [[ $file == *"/skills/"* ]]; then
skills+=("$file")
elif [[ $file == *"/context/"* ]]; then
contexts+=("$file")
@@ -1235,12 +1235,12 @@ show_post_install() {
# Check if env.example was installed
if [ -f "${INSTALL_DIR}/env.example" ] || [ -f "env.example" ]; then
echo "2. Copy env.example to .env and configure:"
- echo " ${CYAN}cp env.example .env${NC}"
+ echo -e " ${CYAN}cp env.example .env${NC}"
echo "3. Start using OpenCode agents:"
else
echo "2. Start using OpenCode agents:"
fi
- echo " ${CYAN}opencode${NC}"
+ echo -e " ${CYAN}opencode${NC}"
echo ""
# Show installation location info
@@ -1396,26 +1396,26 @@ main() {
echo ""
echo -e "${BOLD}Examples:${NC}"
echo ""
- echo " ${CYAN}# Interactive mode (choose location and components)${NC}"
+ echo -e " ${CYAN}# Interactive mode (choose location and components)${NC}"
echo " $0"
echo ""
- echo " ${CYAN}# Quick install with default location (.opencode/)${NC}"
+ echo -e " ${CYAN}# Quick install with default location (.opencode/)${NC}"
echo " $0 developer"
echo ""
- echo " ${CYAN}# Install to global location (Linux/macOS)${NC}"
+ echo -e " ${CYAN}# Install to global location (Linux/macOS)${NC}"
echo " $0 developer --install-dir ~/.config/opencode"
echo ""
- echo " ${CYAN}# Install to global location (Windows Git Bash)${NC}"
+ echo -e " ${CYAN}# Install to global location (Windows Git Bash)${NC}"
echo " $0 developer --install-dir ~/.config/opencode"
echo ""
- echo " ${CYAN}# Install to custom location${NC}"
+ echo -e " ${CYAN}# Install to custom location${NC}"
echo " $0 essential --install-dir ~/my-agents"
echo ""
- echo " ${CYAN}# Using environment variable${NC}"
+ echo -e " ${CYAN}# Using environment variable${NC}"
echo " export OPENCODE_INSTALL_DIR=~/.config/opencode"
echo " $0 developer"
echo ""
- echo " ${CYAN}# Install from URL (non-interactive)${NC}"
+ echo -e " ${CYAN}# Install from URL (non-interactive)${NC}"
echo " curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer"
echo ""
echo -e "${BOLD}Platform Support:${NC}"
diff --git a/package.json b/package.json
index 1ebe005..31467ff 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
".opencode/profiles/",
".opencode/prompts/",
".opencode/scripts/",
- ".opencode/skill/",
+ ".opencode/skills/",
".opencode/tool/",
".opencode/config.json",
".opencode/opencode.json",
@@ -80,6 +80,7 @@
"dev:test": "cd evals/framework && npm test",
"dev:clean": "cd evals/framework && rm -rf dist node_modules && npm install",
"validate:registry": "bun run scripts/registry/validate-registry.ts",
+ "validate:context-links": "bun run scripts/validation/validate-markdown-links.ts",
"validate:registry:verbose": "bun run scripts/registry/validate-registry.ts -v",
"validate:registry:fix": "bun run scripts/registry/validate-registry.ts -f"
},
diff --git a/packages/compatibility-layer/docs/migration-guides/claude-to-oac.md b/packages/compatibility-layer/docs/migration-guides/claude-to-oac.md
index c0dd1b7..173e14b 100644
--- a/packages/compatibility-layer/docs/migration-guides/claude-to-oac.md
+++ b/packages/compatibility-layer/docs/migration-guides/claude-to-oac.md
@@ -148,7 +148,7 @@ You are a senior developer.
| **Permissions** | Binary modes only | Granular per-path rules |
| **Temperature** | Not supported | Full control (0.0-2.0) |
| **Max steps** | Not supported | Configurable limit |
-| **Skills path** | `.claude/skills/` | `.opencode/skill/` |
+| **Skills path** | `.claude/skills/` | `.opencode/skills/` |
### 4. Feature Mapping
@@ -430,7 +430,7 @@ Features that don't fully translate between formats:
| Max steps | Not supported | Configurable | Add limit after migration |
| Granular permissions | Binary modes | Per-path rules | Expand after migration |
| Permission mode `acceptEdits` | Supported | No direct equivalent | Use `permission: { edit: "allow" }` |
-| Skill directory structure | `.claude/skills/` | `.opencode/skill/` | Move and rename |
+| Skill directory structure | `.claude/skills/` | `.opencode/skills/` | Move and rename |
| Agent directory | `.claude/agents/` | `.opencode/agent/` | Move and rename |
### 7. Validation
@@ -587,7 +587,7 @@ Valid events: `PreToolUse`, `PostToolUse`, `PermissionRequest`, `AgentStart`, `A
.claude/skills/my-skill/SKILL.md
# OAC location
-.opencode/skill/my-skill/SKILL.md
+.opencode/skills/my-skill/SKILL.md
```
Update skill references in agent:
diff --git a/registry.json b/registry.json
index e451e0b..ad73ccd 100644
--- a/registry.json
+++ b/registry.json
@@ -705,7 +705,7 @@
"id": "task-management",
"name": "Task Management",
"type": "skill",
- "path": ".opencode/skill/task-management/SKILL.md",
+ "path": ".opencode/skills/task-management/SKILL.md",
"description": "Task management CLI for tracking and managing feature subtasks with status, dependencies, and validation",
"tags": [
"tasks",
@@ -715,16 +715,16 @@
"dependencies": [],
"category": "essential",
"files": [
- ".opencode/skill/task-management/SKILL.md",
- ".opencode/skill/task-management/router.sh",
- ".opencode/skill/task-management/scripts/task-cli.ts"
+ ".opencode/skills/task-management/SKILL.md",
+ ".opencode/skills/task-management/router.sh",
+ ".opencode/skills/task-management/scripts/task-cli.ts"
]
},
{
"id": "smart-router-skill",
"name": "Smart Router Skill",
"type": "skill",
- "path": ".opencode/skill/smart-router-skill/SKILL.md",
+ "path": ".opencode/skills/smart-router-skill/SKILL.md",
"description": "Movie character personality skill with configurable missions and themed workflows",
"tags": [
"routing",
@@ -734,19 +734,19 @@
"dependencies": [],
"category": "specialized",
"files": [
- ".opencode/skill/smart-router-skill/SKILL.md",
- ".opencode/skill/smart-router-skill/router.sh",
- ".opencode/skill/smart-router-skill/config/personality-config.json",
- ".opencode/skill/smart-router-skill/scripts/sherlock-workflow.sh",
- ".opencode/skill/smart-router-skill/scripts/stark-workflow.sh",
- ".opencode/skill/smart-router-skill/scripts/yoda-workflow.sh"
+ ".opencode/skills/smart-router-skill/SKILL.md",
+ ".opencode/skills/smart-router-skill/router.sh",
+ ".opencode/skills/smart-router-skill/config/personality-config.json",
+ ".opencode/skills/smart-router-skill/scripts/sherlock-workflow.sh",
+ ".opencode/skills/smart-router-skill/scripts/stark-workflow.sh",
+ ".opencode/skills/smart-router-skill/scripts/yoda-workflow.sh"
]
},
{
"id": "context7",
"name": "Context7",
"type": "skill",
- "path": ".opencode/skill/context7/SKILLS.MD",
+ "path": ".opencode/skills/context7/SKILL.md",
"description": "Fetch live, version-specific documentation for external libraries and frameworks via Context7 API",
"tags": [
"documentation",
@@ -757,17 +757,17 @@
"dependencies": [],
"category": "essential",
"files": [
- ".opencode/skill/context7/SKILLS.MD",
- ".opencode/skill/context7/README.md",
- ".opencode/skill/context7/library-registry.md",
- ".opencode/skill/context7/navigation.md"
+ ".opencode/skills/context7/SKILL.md",
+ ".opencode/skills/context7/README.md",
+ ".opencode/skills/context7/library-registry.md",
+ ".opencode/skills/context7/navigation.md"
]
},
{
- "id": "context",
+ "id": "context-manager",
"name": "Context Manager",
"type": "skill",
- "path": ".opencode/skill/context/SKILL.md",
+ "path": ".opencode/skills/context-manager/SKILL.md",
"description": "Comprehensive context management with 8 operations: discover, fetch, harvest, extract, compress, organize, cleanup, and process. Integrates with ContextScout and ExternalScout with lazy loading and clear guidance.",
"tags": [
"context-management",
@@ -783,8 +783,8 @@
],
"category": "essential",
"files": [
- ".opencode/skill/context/SKILL.md",
- ".opencode/skill/context/router.sh"
+ ".opencode/skills/context-manager/SKILL.md",
+ ".opencode/skills/context-manager/router.sh"
]
}
],
@@ -2066,7 +2066,7 @@
"name": "Delegation Workflow Reference",
"type": "context",
"path": ".opencode/context/core/workflows/delegation.md",
- "description": "Quick reference to delegation workflow (see task-delegation.md for full content)",
+ "description": "Quick reference to delegation workflow (see task-delegation-basics.md and related split files)",
"tags": [
"workflows",
"delegation",
@@ -3365,4 +3365,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/scripts/registry/validate-registry.ts b/scripts/registry/validate-registry.ts
index b9b4844..4696582 100755
--- a/scripts/registry/validate-registry.ts
+++ b/scripts/registry/validate-registry.ts
@@ -364,7 +364,7 @@ function scanDirectory(dir: string, registryPaths: Set): void {
if (relPath.endsWith('/plugin/agent-validator.ts')) continue;
// Skip skill support files (only SKILL.md needs to be in registry, all other files are copied with the skill)
- if (relPath.includes('/skill/') && !entry.name.match(/^SKILL\.md$/i)) continue;
+ if (relPath.includes('/skills/') && !entry.name.match(/^SKILL\.md$/i)) continue;
// Check if in registry
if (!registryPaths.has(relPath)) {
diff --git a/scripts/tests/test-installer-files.sh b/scripts/tests/test-installer-files.sh
index b80bfff..b407420 100755
--- a/scripts/tests/test-installer-files.sh
+++ b/scripts/tests/test-installer-files.sh
@@ -202,12 +202,12 @@ print_summary() {
echo -e "${BOLD}Test Summary${NC}"
echo -e "${BOLD}โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ${NC}"
echo ""
- echo "Total files tested: ${CYAN}$((SUCCESS_COUNT + FAIL_COUNT))${NC}"
- echo "Files accessible: ${GREEN}${SUCCESS_COUNT}${NC}"
- echo "Files NOT FOUND: ${RED}${FAIL_COUNT}${NC}"
+ echo -e "Total files tested: ${CYAN}$((SUCCESS_COUNT + FAIL_COUNT))${NC}"
+ echo -e "Files accessible: ${GREEN}${SUCCESS_COUNT}${NC}"
+ echo -e "Files NOT FOUND: ${RED}${FAIL_COUNT}${NC}"
if [ ${#SKIPPED_FILES[@]} -gt 0 ]; then
- echo "Skipped: ${YELLOW}${#SKIPPED_FILES[@]}${NC}"
+ echo -e "Skipped: ${YELLOW}${#SKIPPED_FILES[@]}${NC}"
fi
echo ""
@@ -223,7 +223,7 @@ print_summary() {
echo " URL: ${RAW_URL}/${path}"
done
echo ""
- echo "${YELLOW}These files need to be:${NC}"
+ echo -e "${YELLOW}These files need to be:${NC}"
echo " 1. Added to the repository, OR"
echo " 2. Removed from registry.json"
echo ""
diff --git a/scripts/validation/markdown-link-skip-patterns.txt b/scripts/validation/markdown-link-skip-patterns.txt
new file mode 100644
index 0000000..2bf9776
--- /dev/null
+++ b/scripts/validation/markdown-link-skip-patterns.txt
@@ -0,0 +1,25 @@
+# Ignore placeholders and template rules.
+\{.*\}
+\*
+
+# Ignore common template path placeholders.
+literal:path/to/
+literal:another/file
+literal:optional/file
+literal:category/
+literal:/your-
+literal:/my-
+literal:/existing-
+literal:.opencode/command/build-context-system.md
+literal:.opencode/command/validate-repo.md
+
+# Ignore external and anchor links (also filtered in code, kept for clarity).
+^https?://
+^mailto:
+^#
+
+# Temporary legacy exclusions (to keep CI green while docs are migrated).
+^\.opencode/context/openagents-repo/.+?\.md$
+^\.opencode/command/prompt-engineering/.+?\.md$
+^\.opencode/agent/meta/.+?\.md$
+^\.opencode/command/openagents/.+?\.md$
\ No newline at end of file
diff --git a/scripts/validation/validate-markdown-links.ts b/scripts/validation/validate-markdown-links.ts
new file mode 100644
index 0000000..b10e30e
--- /dev/null
+++ b/scripts/validation/validate-markdown-links.ts
@@ -0,0 +1,214 @@
+#!/usr/bin/env bun
+
+import { existsSync, readdirSync, readFileSync } from 'node:fs'
+import { dirname, join, normalize } from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', '..')
+const SKIP_RULES_FILE = join(REPO_ROOT, 'scripts', 'validation', 'markdown-link-skip-patterns.txt')
+const TARGET_DIRS = [
+ '.opencode/agent',
+ '.opencode/skills',
+ '.opencode/command',
+ '.opencode/context'
+]
+
+type MissingRef = {
+ source: string
+ line: number
+ target: string
+ resolved: string
+ kind: 'link' | 'path'
+}
+
+function escapeRegExp(value: string): string {
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
+}
+
+function parseRegexRule(rule: string): RegExp {
+ const trimmed = rule.trim()
+
+ if (trimmed.startsWith('/') && trimmed.length > 2) {
+ const lastSlash = trimmed.lastIndexOf('/')
+ if (lastSlash > 0) {
+ const pattern = trimmed.slice(1, lastSlash)
+ const flags = trimmed.slice(lastSlash + 1)
+ return new RegExp(pattern, flags)
+ }
+ }
+
+ return new RegExp(trimmed)
+}
+
+function loadSkipPatterns(): RegExp[] {
+ if (!existsSync(SKIP_RULES_FILE)) {
+ throw new Error(`Skip rules file not found: ${SKIP_RULES_FILE}`)
+ }
+
+ const lines = readFileSync(SKIP_RULES_FILE, 'utf-8').split('\n')
+ const patterns: RegExp[] = []
+
+ for (const line of lines) {
+ const rule = line.trim()
+ if (!rule || rule.startsWith('#')) continue
+
+ // Literal rule: literal:foo/bar
+ if (rule.startsWith('literal:')) {
+ const literal = rule.slice('literal:'.length).trim()
+ if (!literal) continue
+ patterns.push(new RegExp(escapeRegExp(literal)))
+ continue
+ }
+
+ patterns.push(parseRegexRule(rule))
+ }
+
+ return patterns
+}
+
+function shouldSkipFile(filePath: string, skipPatterns: RegExp[]): boolean {
+ const relPath = filePath.replace(`${REPO_ROOT}/`, '')
+ return skipPatterns.some((pattern) => pattern.test(relPath))
+}
+
+function walkMdFiles(dir: string, out: string[], skipPatterns: RegExp[]): void {
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
+ if (entry.name === '.git' || entry.name === 'node_modules' || entry.name === 'build') continue
+ const full = join(dir, entry.name)
+ if (entry.isDirectory()) {
+ walkMdFiles(full, out, skipPatterns)
+ continue
+ }
+ if (entry.isFile() && entry.name.toLowerCase().endsWith('.md')) {
+ if (!shouldSkipFile(full, skipPatterns)) {
+ out.push(full)
+ }
+ }
+ }
+}
+
+function lineFromIndex(content: string, index: number): number {
+ return content.slice(0, index).split('\n').length
+}
+
+function shouldSkip(rawTarget: string, skipPatterns: RegExp[]): boolean {
+ const value = rawTarget.trim()
+ if (!value) return true
+ if (value.startsWith('http://') || value.startsWith('https://')) return true
+ if (value.startsWith('mailto:') || value.startsWith('#')) return true
+ return skipPatterns.some((pattern) => pattern.test(value))
+}
+
+function cleanupTarget(rawTarget: string): string {
+ let target = rawTarget.trim()
+ if (!target) return target
+
+ if (target.startsWith('<') && target.endsWith('>')) {
+ target = target.slice(1, -1)
+ }
+
+ const firstSpace = target.indexOf(' ')
+ if (firstSpace >= 0) {
+ target = target.slice(0, firstSpace)
+ }
+
+ target = target.replace(/^@/, '')
+ target = target.split('#')[0]
+ target = target.split('?')[0]
+ return target
+}
+
+function resolveTarget(sourceFile: string, rawTarget: string): string {
+ const target = cleanupTarget(rawTarget)
+ if (target.startsWith('.opencode/')) return join(REPO_ROOT, target)
+ if (target.startsWith('/')) return join(REPO_ROOT, target.slice(1))
+ return join(dirname(sourceFile), target)
+}
+
+function collectMissingRefs(file: string, skipPatterns: RegExp[]): MissingRef[] {
+ const content = readFileSync(file, 'utf-8')
+ const rel = file.replace(`${REPO_ROOT}/`, '')
+ const missing: MissingRef[] = []
+
+ const linkRegex = /\[[^\]]*\]\(([^)]+)\)/g
+ for (const match of content.matchAll(linkRegex)) {
+ const rawTarget = match[1]
+ if (!rawTarget) continue
+ if (shouldSkip(rawTarget, skipPatterns)) continue
+
+ const cleaned = cleanupTarget(rawTarget)
+ if (!cleaned) continue
+ if (!cleaned.includes('.md') && !cleaned.startsWith('.opencode/')) continue
+
+ const resolved = normalize(resolveTarget(file, cleaned))
+ if (!existsSync(resolved)) {
+ missing.push({
+ source: rel,
+ line: lineFromIndex(content, match.index ?? 0),
+ target: rawTarget,
+ resolved: resolved.replace(`${REPO_ROOT}/`, ''),
+ kind: 'link',
+ })
+ }
+ }
+
+ const pathRegex = /@?(\.opencode\/[A-Za-z0-9_./-]+\.md)/g
+ for (const match of content.matchAll(pathRegex)) {
+ const rawTarget = match[1]
+ if (!rawTarget) continue
+ if (shouldSkip(rawTarget, skipPatterns)) continue
+
+ const cleaned = cleanupTarget(rawTarget)
+ const resolved = normalize(resolveTarget(file, cleaned))
+ if (!existsSync(resolved)) {
+ missing.push({
+ source: rel,
+ line: lineFromIndex(content, match.index ?? 0),
+ target: rawTarget,
+ resolved: resolved.replace(`${REPO_ROOT}/`, ''),
+ kind: 'path',
+ })
+ }
+ }
+
+ return missing
+}
+
+function dedupe(refs: MissingRef[]): MissingRef[] {
+ const seen = new Set()
+ const out: MissingRef[] = []
+ for (const ref of refs) {
+ const key = `${ref.source}:${ref.line}:${ref.target}:${ref.kind}`
+ if (seen.has(key)) continue
+ seen.add(key)
+ out.push(ref)
+ }
+ return out
+}
+
+const skipPatterns = loadSkipPatterns()
+
+const files: string[] = []
+for (const dir of TARGET_DIRS) {
+ const absolute = join(REPO_ROOT, dir)
+ if (existsSync(absolute)) walkMdFiles(absolute, files, skipPatterns)
+}
+
+let missing: MissingRef[] = []
+for (const file of files) {
+ missing = missing.concat(collectMissingRefs(file, skipPatterns))
+}
+
+missing = dedupe(missing)
+
+if (missing.length === 0) {
+ console.log(`OK: validated ${files.length} markdown files, no broken internal references found.`)
+ process.exit(0)
+}
+
+console.log(`ERROR: found ${missing.length} broken internal markdown references:`)
+for (const ref of missing) {
+ console.log(`- ${ref.source}:${ref.line} [${ref.kind}] ${ref.target} -> ${ref.resolved}`)
+}
+
+process.exit(1)