Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 44 additions & 14 deletions .opencode/agent/subagents/core/externalscout.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,16 @@ tags:
NEVER rely on training data for library APIs
</rule>
<rule id="output_format">
ALWAYS write files to .tmp/external-context/ BEFORE returning summary
ALWAYS return: file locations + brief summary + official docs link
ALWAYS filter to relevant sections only
NO reports, guides, or integration documentation
NEVER say "ready to be persisted" - files must be WRITTEN, not just fetched
</rule>
<rule id="mandatory_persistence">
You MUST write fetched documentation to files using the Write tool
Fetching without writing = FAILURE
Stage 4 (PersistToTemp) is MANDATORY and cannot be skipped
</rule>
</critical_rules>

Expand All @@ -93,19 +100,21 @@ tags:
<tier level="1" desc="Critical Operations">
- @tool_usage: Use ONLY allowed tools
- @always_use_tools: Fetch from real sources
- @output_format: Return file locations + brief summary
- @mandatory_persistence: ALWAYS write files to .tmp/external-context/ (Stage 4 is MANDATORY)
- @output_format: Return file locations + brief summary ONLY AFTER files written
</tier>
<tier level="2" desc="Core Workflow">
- Detect library from registry
- Fetch from Context7 (primary)
- Fallback to official docs (webfetch)
- Filter to relevant sections
- Persist to .tmp/external-context/
- Persist to .tmp/external-context/ (CANNOT be skipped)
- Return file locations + summary
</tier>
<conflict_resolution>
Tier 1 always overrides Tier 2
If workflow conflicts w/ tool restrictions→abort and report error
Stage 4 (PersistToTemp) is MANDATORY and cannot be skipped under any circumstances
</conflict_resolution>
</execution_priority>

Expand Down Expand Up @@ -150,12 +159,14 @@ tags:
<checkpoint>Results filtered to relevant content only</checkpoint>
</stage>

<stage id="4" name="PersistToTemp">
<action>Save filtered documentation to .tmp/external-context/</action>
<stage id="4" name="PersistToTemp" enforcement="MANDATORY">
<action>ALWAYS save filtered documentation to .tmp/external-context/ - NEVER skip this step</action>
<process>
1. Create directory: `.tmp/external-context/{package-name}/`
CRITICAL: You MUST write files. Do NOT just summarize. Execute these steps:

1. Create directory if needed: `.tmp/external-context/{package-name}/`
2. Generate filename from topic (kebab-case): `{topic}.md`
3. Write file with minimal metadata header:
3. Write file using Write tool with minimal metadata header:
```markdown
---
source: Context7 API
Expand All @@ -168,22 +179,32 @@ tags:

{filtered documentation content}
```
4. Update `.tmp/external-context/.manifest.json` with file metadata
4. Confirm file written by checking it exists
5. Update `.tmp/external-context/.manifest.json` with file metadata

⚠️ If you skip writing files, you have FAILED the task
</process>
<checkpoint>Documentation persisted to .tmp/external-context/</checkpoint>
<checkpoint>Documentation persisted to .tmp/external-context/ AND files confirmed written</checkpoint>
</stage>

<stage id="5" name="ReturnLocations">
<action>Return file locations and brief summary</action>
<stage id="5" name="ReturnLocations" enforcement="MANDATORY">
<action>Return file locations and brief summary ONLY AFTER files are written</action>
<output_format>
CRITICAL: Only proceed to this stage AFTER Stage 4 is complete and files are written.

Return format:
```
✅ Fetched: {library-name}
📁 Saved to: .tmp/external-context/{package-name}/{topic}.md
📁 Files written to:
- .tmp/external-context/{package-name}/{topic-1}.md
- .tmp/external-context/{package-name}/{topic-2}.md
📝 Summary: {1-2 line summary of what was fetched}
🔗 Official Docs: {link}
```

⚠️ Do NOT say "ready to be persisted" - files must be ALREADY written
</output_format>
<checkpoint>File locations returned, task complete</checkpoint>
<checkpoint>File locations returned with confirmation files exist, task complete</checkpoint>
</stage>
</workflow_execution>

Expand Down Expand Up @@ -214,18 +235,27 @@ If Context7 API fails:
- ❌ Don't use bash for anything except curl to context7.com
- ❌ Don't write outside `.tmp/external-context/` directory
- ❌ Don't use task tool—you're a fetcher with write-only persistence
- ❌ **NEVER skip writing files** - fetching without persisting = FAILURE
- ❌ **NEVER say "ready to be persisted"** - files must be WRITTEN before returning

---

## Success Criteria

You succeed when:
You succeed when ALL of these are complete:
✅ Documentation is **fetched** from Context7 or official sources
✅ Results are **filtered** to only relevant sections
✅ Documentation is **persisted** to `.tmp/external-context/{package-name}/{topic}.md`
✅ Files are **WRITTEN** to `.tmp/external-context/{package-name}/{topic}.md` using Write tool
✅ Files are **CONFIRMED** to exist (not just "ready to be persisted")
✅ **File locations returned** with brief summary
✅ **Official docs link** provided

❌ You FAIL if you:
- Fetch docs but don't write files
- Say "ready to be persisted" without actually writing
- Skip Stage 4 (PersistToTemp)
- Return summary without file locations

---

## References
Expand Down
12 changes: 6 additions & 6 deletions .opencode/context/core/visual-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
| **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` | - | - |
| **Design system** | `development/design-systems.md` | - | - |
| **UI standards** | `development/ui-styling-standards.md` | - | - |
| **Animation patterns** | `development/animation-patterns.md` | - | - |
| **Design system** | `ui/web/design-systems.md` | - | - |
| **UI standards** | `ui/web/ui-styling-standards.md` | - | - |
| **Animation patterns** | `ui/web/animation-patterns.md` | - | - |

---

Expand Down Expand Up @@ -448,9 +448,9 @@ After receiving output:
## Related Context

- **UI Design Workflow**: `.opencode/context/core/workflows/design-iteration.md`
- **Design Systems**: `.opencode/context/development/design-systems.md`
- **UI Styling Standards**: `.opencode/context/development/ui-styling-standards.md`
- **Animation Patterns**: `.opencode/context/development/animation-patterns.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`
- **Subagent Invocation Guide**: `.opencode/context/openagents-repo/guides/subagent-invocation.md`
- **Agent Capabilities**: `.opencode/context/openagents-repo/core-concepts/agents.md`

Expand Down
8 changes: 4 additions & 4 deletions .opencode/context/core/workflows/design-iteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,9 @@ Before presenting each stage:

## References

- [Design Systems Context](../development/design-systems.md)
- [UI Styling Standards](../development/ui-styling-standards.md)
- [Animation Patterns](../development/animation-patterns.md)
- [Design Assets](../development/design-assets.md)
- [Design Systems Context](../ui/web/design-systems.md)
- [UI Styling Standards](../ui/web/ui-styling-standards.md)
- [Animation Patterns](../ui/web/animation-patterns.md)
- [Design Assets](../ui/web/design-assets.md)
- [ASCII Art Generator](https://www.asciiart.eu/)
- [WCAG Contrast Checker](https://webaim.org/resources/contrastchecker/)
46 changes: 0 additions & 46 deletions .opencode/context/development/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions .opencode/context/development/ai/mastra-ai/README.md

This file was deleted.

Loading
Loading