2.9 KiB
2.9 KiB
name, description, version, category
| name | description | version | category |
|---|---|---|---|
| agent-workflows | Subagent delegation patterns using Gitea as communication hub — research tasks post findings as issue comments, code tasks push and create PRs. | 1.0.0 | workflows |
Agent Workflows with Gitea Communication Hub
Overview
Subagents work autonomously but communicate through Gitea issues and PRs. This creates an auditable thread of work that the user supervises asynchronously.
Communication Protocol
- Research tasks → findings posted as issue comments
- Code tasks → tool pushed, PR created, summary posted as issue comment
- User feedback → replies on Gitea trigger next phase of work
Workflow Types
Research Task
- Explore ~/repositories/kugetsu
- Run
opencode runfor deep research - Write findings to
/tmp/findings-{issue}.md - Display with
cat /tmp/findings-{issue}.md - Post as issue comment via curl
- Ask follow-up questions for user
Code Task
- Explore ~/repositories/kugetsu
- Create tool/script, commit to new branch
- Push branch, create PR via API
- Post PR link + summary as issue comment
Gitea API Reference
Token: YOUR_GITEA_TOKEN (replace with your actual token)
Post Issue Comment
curl -X POST "https://git.example.com/api/v1/repos/{owner}/{repo}/issues/{N}/comments" \
-H "Authorization: token YOUR_GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d @/tmp/findings-{N}.md
Create Pull Request
curl -X POST "https://git.example.com/api/v1/repos/{owner}/{repo}/pulls" \
-H "Authorization: token YOUR_GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"...","body":"...","head":"branch","base":"main"}'
Critical Rules
- Use terminal() for curl — API tools may not be available in subagent context
- Write to file first — then
curl ... -d @/tmp/findings-{N}.md - Always verify —
curl ... && echo SUCCESS || echo FAILED - If curl fails — output findings so Hermes can post manually
- Replace placeholders —
git.example.com,YOUR_GITEA_TOKEN,{owner},{repo}
Delegation Template
When calling delegate_task, include this skill and structure:
{
"goal": "Work on Issue #{N}: {title}\n\nSteps:\n1. Explore ~/repositories/kugetsu\n2. Run opencode research on {specific question}\n3. Write findings to /tmp/findings-{N}.md\n4. cat /tmp/findings-{N}.md\n5. Post as issue comment via curl\n6. Ask 2-3 follow-up questions\n\nReplace: git.example.com, YOUR_GITEA_TOKEN, {owner}, {repo}, {N}",
"skills": ["agent-workflows"],
"toolsets": ["terminal"]
}
Branch Naming
- Research/docs:
docs/issue-{N}-{short-title} - Fixes/tools:
fix/issue-{N}-{short-title}
Install
# Symlink
ln -s ~/repositories/kugetsu/.hermes/skills/agent-workflows ~/.hermes/skills/agent-workflows
# Or copy
cp -r ~/repositories/kugetsu/.hermes/skills/agent-workflows ~/.hermes/skills/