greatestworks: Instructions file for GitHub Copilot

.github/instructions/gw.instructions.md

greatestworks gw.instructions.md is an instructions file for GitHub Copilot from phuhao00/greatestworks. It costs 2,438 tokens per session, scanned A, original, MIT.

Project-specific instructions for an AI collaborator working on GreatestWorks, a Go-based game system with several services. They describe its architecture, code organization, databases, communication methods, and required workflow.

In plain words
What is it for?
Use them when planning, coding, reviewing, or testing GreatestWorks changes, including work involving Go services, MongoDB, Redis, protocols, containers, and integration tests.
Why use it?
They give an agent the project context and conventions needed to make changes that fit the existing system.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is phuhao00/greatestworks's own configuration. It tells GitHub Copilot how to work on greatestworks itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything greatestworks configures →

Reuse

Borrowing it

Nothing to install: this file belongs to phuhao00/greatestworks. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/phuhao00/greatestworks/main/.github/instructions/gw.instructions.md
Clone the repo
git clone --depth 1 https://github.com/phuhao00/greatestworks

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for greatestworks gw.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/phuhao00/greatestworks/gw.svg)](https://agentmods.dev/instructions/phuhao00/greatestworks/gw)
Your own site
<a href="https://agentmods.dev/instructions/phuhao00/greatestworks/gw"><img src="https://agentmods.dev/badge/instructions/phuhao00/greatestworks/gw.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,438 This file is loaded in full into every session.
When invoked 2,438 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02438 $0.02438
Opus 5 $0.01219 $0.01219
Sonnet 5 $0.00488 $0.00488
Haiku 4.5 $0.00244 $0.00244

Measured 5d ago against content hash cee3a42c0b55, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

greatestworks gw.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/gw.instructions.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GreatestWorks 项目 AI 协作说明(必读)

本文件为 AI 与协作者在本仓库中进行代码生成、变更评审与文档撰写时的统一约束与上下文指引。请严格遵循以下规范,确保改动与项目架构、风格和运行形态保持一致。

工作流程补充要求

每次开始编写新功能或进行较大改动时,需先列出本次开发的 todo list(任务清单),明确拆分为具体、可执行的小步骤,并在开发过程中逐项完成和勾选。todo list 应包含:

  • 主要功能点拆解(如领域模型、应用服务、接口适配、配置变更等)
  • 相关协议/配置/文档同步
  • 单元测试与集成验证
  • 变更影响面评估与回滚方案

todo list 可在 PR 描述、评论或协作工具中展示,便于团队成员跟进进度与评审。

项目上下文速览

  • 语言与版本:Go 1.24(见 go.mod
  • 架构风格:DDD(领域驱动)+ 分层架构 + 微服务
  • 服务与入口:
    • 认证服务:cmd/auth-service/main.go(HTTP: 8080)
    • 网关服务:cmd/gateway-service/main.go(TCP: 9090)
    • 游戏服务:cmd/game-service/main.go(Go 原生 RPC: 8081)
    • 其他服务:cmd/scene/main.gocmd/replication/main.go(保留/扩展)
  • 配置位置:configs/*.yaml(支持 dev/prod/docker 等环境示例)
  • 数据存储:MongoDB(主存储)+ Redis(缓存)
  • 协议与通信:
    • 客户端 → 认证:HTTP
    • 客户端 → 网关:TCP(自定义二进制协议,参考 internal/networkproto/
    • 网关 ↔ 游戏:Go 原生 RPC
  • 协议定义:根目录 proto/*.proto(以及 internal/proto/* 目录结构),存在独立 proto 模块替换:replace github.com/phuhao00/greatestworks-proto => ../greatestworks-proto
  • 压测/集成测试工具:tools/simclient(支持 E2E/压测/功能验证场景)
  • 容器与脚本:Dockerfiledocker-compose.ymlscripts/*Makefile

代码组织与分层约定(DDD)

  • 领域层:internal/domain/*
    • 聚合根/实体/值对象仅暴露必要行为,字段使用小写私有化,保持不变式。
    • 领域服务仅聚焦业务规则,不做基础设施细节。
    • 领域事件放在 internal/domain/events
  • 应用层:internal/application/*
    • 命令/查询处理器与应用服务;通过 services.ServiceRegistry 进行装配。
    • 面向用例编排,不直接依赖具体基础设施实现,依赖接口。
  • 基础设施层:internal/infrastructure/*
    • 持久化、缓存、消息、日志、配置、网络等适配与实现。
    • 仓储实现放于 infrastructure/persistence/*,接口在领域层定义。
  • 接口层:internal/interfaces/{http,tcp,rpc}/*
    • 将传输协议与应用层解耦;在此完成 DTO/协议消息 ↔ 领域模型映射。

新增功能时遵循“自内向外”原则:先领域模型与用例,再接口适配与基础设施实现,最后编排到入口服务。

依赖与模块策略

  • 优先使用标准库与现有依赖,不轻易新增第三方库;如需新增必须:
    1. 说明动机与替代方案;2) 版本固定并最小化;3) 兼容 Go 1.24。
  • 修改依赖后执行 go mod tidy 保持清洁;不要引入需要 CGO 的库(跨平台/容器化负担)。
  • 保留并尊重 go.mod 中的 replace github.com/phuhao00/greatestworks-proto,该仓库用于统一管理协议代码;不要在本仓库内随意复制粘贴生成代码覆盖。

协议与兼容性(Proto/TCP)

  • 修改 .proto 前务必确认兼容性策略:
    • 仅追加字段,避免复用/更改现有 tag;删除请改为 reserved
    • 变更需同步网关与游戏服务的处理逻辑,保持向后兼容。
  • 生成代码:优先使用 scripts/generate_proto.bat(Windows)或 scripts/generate_proto.sh(Unix);不要手工在 internal/proto 下散落生成物。
  • TCP 二进制协议格式固定(见 README);非兼容性变更需评审并更新 internal/network 与模拟客户端映射。

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 148 lines · 2,438 tokens per session scan A cee3a42c0b55

Subscribe to this mod's changes

greatestworks gw.instructions.md is an instructions file published in the GitHub repository phuhao00/greatestworks (290 stars, last pushed 10mo ago), licensed MIT. It adds 2,438 tokens to every session, about $0.0122 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens