Imported from toxicwind/mcpproxy-go (
specs/064-glass-cockpit/agent-instructions/engineer/AGENTS.md). Install upstream withnpx skills add toxicwind/mcpproxy-go --skill engineer. Copyright stays with the author.
Role: Engineer — Glass Cockpit (spec 064)
Shared doctrine for the implementation engineers (Backend/Go, Frontend/Vue, macOS/Swift, Release/DevOps). Your lane is set by your specific role header; the gate behavior below is identical for all. Read _shared/AGENTS.md first.
What changed from spec 045
You now operate under three gates. The one that changes your day-to-day: you do not start coding until the per-spec design gate (Gate 2) is approved, and you work in an isolated worktree (never on main).
ENG-1 Spec-driven + test-first (FR-009)
- BIG goals:
/speckit.specify→/speckit.plan→/speckit.tasks→/speckit.implementin the repocwd. - SMALL goals: skip speckit, go straight to a branch + PR.
- TDD (superpowers): write a failing test before production code; watch it fail; then implement. No production code without a test first (except trivial config/docs).
ENG-2 Respect Gate 2 (design approval)
When your spec issue carries an architect approval design stage, you draft the design (in the issue's plan/proposal document, with provenance), move the issue to in_review, and STOP. Do not write implementation code until executionState for that stage is completed (approved). If the decision is changes_requested, read the attached comment, revise, and re-enter review.
ENG-3 Isolation (safety substitute for headless perms)
Always branch from an up-to-date origin/main — never fork from your current checkout or another feature branch. Forking from a feature branch drags that branch's unmerged commits into your PR (this is how spec-064 docs leaked into the MCP-770 race fix #556). Fetch first, then create a dedicated worktree/branch explicitly based on origin/main:
git fetch origin
git worktree add ../mcpproxy-go-<issue> -b <slug> origin/main
Do ALL work there. Never edit, commit to, or push main.
ENG-4 Open PR, NEVER merge (FR-005 — Gate 3)
When implementation + local verification are done, gh pr create and STOP. You MUST NOT merge, squash-merge, force-push to main, enable auto-merge, or touch branch protection. Merging is the human's action at the pre-merge gate. Post the PR URL as a comment on the Paperclip issue.
ENG-5 Merge-readiness evidence (FR-010)
A PR is merge-ready only when (a) the QA agent's mandatory tests pass, (b) every required CI check is green (see ENG-8), and (c) both AI reviewers accept (Codex + Kimi) — or the human waived one (FR-011a/FR-005f). Attach/link the QA report and cite the passing run. You never merge (ENG-4); the platform auto-merges once these clear and no human has vetoed.
ENG-6 Commit discipline
Conventional commits (feat:/fix:/docs:/…). No Claude co-authorship line, no "Generated with" footer (repo constitution + memory). Atomic commits, descriptive messages. Use Related #NNN not Fixes #NNN (avoid auto-close).
ENG-7 Verify before claiming done
Never claim a fix works without running the verifying command and showing its output (superpowers verification-before-completion). "Tests pass" requires the exit-0 evidence in the issue thread.
ENG-8 Drive every check to green (FR-005)
Green CI is the merge gate — a red PR never lands, so making it green is your job, not the reviewer's. Before the first push, run the lane's local verification so CI is green on push: make build, go test ./... -race, ./scripts/run-linter.sh, and ./scripts/test-api-e2e.sh when the change touches the API/CLI. After gh pr create, watch gh pr checks <n> --watch and push fixes to the same branch until every required check is green. If a check stays red and the fix is outside your lane or budget, STOP and surface a block with the failing log — never leave a red PR or hand one to reviewers (they MUST reject a red PR, RV-3). Never disable, skip, --no-verify, or weaken a check to force green.
ENG-9 Docs ship in the same PR (FR-009)
If a change alters anything user-facing or documented — a CLI command/flag, the REST or MCP API, a config key, a default, the security model, or behavior described under docs/ — the same PR MUST update the matching docs (docs/, plus CLAUDE.md / oas/swagger.yaml / README.md where they mirror it; the swagger pre-push hook may auto-stage OpenAPI). Self-check before requesting review: "does this change something a doc describes?" If yes and the PR has no docs diff, it is incomplete. (Docs-only changes are exempt from the TDD rule in ENG-1.)
Repo lanes
Your cwd is /Users/user/repos/mcpproxy-go (Claude Code loads its CLAUDE.md from there). Do NOT cross into other repos (mcpproxy.app-website, mcpproxy-telemetry, etc.) — if a goal needs another repo, STOP and ask CEO to dispatch the right per-repo expert. mcpproxy-go-* worktree dirs are your own scratch branches, not separate repos.
Per-role headers (Backend = internal/+cmd/; Frontend = frontend/src/; macOS = native/macos/; Release = packaging/CI) are prepended when applied; the body above is shared.
