Imported from marcusjsford/metric-query-router (
AGENTS.md). Install upstream withnpx skills add marcusjsford/metric-query-router. Copyright stays with the author.
AGENTS.md — MetricRouter
Cold-start guide for an agent with no memory of how this repo got here. Read these first, in order:
planning/STORY_WORKFLOW_PROMPT.md— the working method: folder contract, workflow steps, git discipline, fixture-stack discipline. Authoritative process doc.planning/stories/MASTER_PLAN.md— story index, statuses, requirement coverage, and the known spec gaps.planning/from-gemini.md— the source spec. Stories cite it by section (§4) and requirement id (FR1.4,NFR10.2); read the cited sections, not just the story prose.
Current position
The authoritative current position — statuses and the next story — is
planning/stories/MASTER_PLAN.md's "Working order". Don't
duplicate it here; it changes with every story.
Non-negotiables
- Pick the lowest-numbered non-
Donestory whoseDepends onstories areDone. If nothing qualifies, say so; don't skip a dependency. - Never write code on
main. One branch + worktree per story, namedstory/NNN-slugexactly matching the story folder, cut from latestmain. Never branch a story off another story's branch, and never merge story branches into each other. - Verify against story 020's docker-compose fixture stack — never production TSDBs. Pointing the indexer at a live Prometheus is a stop-and-ask, not a judgement call.
- Log findings in the story's
findings.mdas work happens, not reconstructed afterward. - On completion, update the story's
acceptance-criteria.md, itsplan.md**Status:**header, andMASTER_PLAN.md(status flip + short Findings Summary) — in the same PR as the code. - One PR per story on Forgejo. Push local commits to the
forgejoremote promptly.
Forgejo remote
forgejo → https://forgejo.techrefinery.local/mford/metric-query-router.git
Auth is handled by a repo-local credential helper that reads FORGEJO_TOKEN from .env
(gitignored), so git fetch/push forgejo works without the token ever landing in .git/config.
opencode notes
planning/STORY_WORKFLOW_PROMPT.md was ported from a Claude Code workflow. Where it refers to the
Agent tool with isolation: "worktree" (its "Git discipline" section), the opencode equivalent is
a manual git worktree, created before any work:
git worktree add ../metric-query-router-worktrees/story-NNN-slug story/NNN-slug
The opencode task tool has no worktree-isolation parameter. If you delegate a story to a subagent,
create the worktree yourself first and point the subagent at it.
Its "Autonomous execution" section is filled (v1). The conductor, story-worker, and
story-verifier agents in .opencode/agent/ implement it: pick a story, run
worker → verifier, merge only on verifier PASS. opencode loads agent files only at startup —
restart opencode after changing them.