pma-go

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Go Project Implementation Guide

Go项目实现指南

Use this skill together with
/pma
.
/pma
controls workflow, approval, and task tracking; this guide defines the implementation baseline after approval.
Keep this entry file lean. Load only the reference packs needed for the task.
请将本指南与
/pma
配合使用。
/pma
负责管控工作流、审批和任务追踪;本指南定义了审批通过后的实现基线。
请保持此入口文件简洁,仅加载任务所需的参考包。

Scope

适用范围

For PMA-managed Go backends, API services, and CLI applications.
Not for embedded targets, library-only modules without binaries, or non-PMA projects.
适用于PMA管理的Go后端、API服务和CLI应用。
不适用于嵌入式目标、无二进制文件的纯库模块,或非PMA项目。

Loading Order

加载顺序

  1. Always load
    references/baseline.md
    first.
  2. Load
    references/config-and-data.md
    for config layering, validation, sqlc, pgx, GORM, and migrations.
  3. Load
    references/http-and-runtime.md
    for handlers, middleware, logging, observability, and shutdown.
  4. Load
    references/delivery.md
    for lint, tests, task runners, security review, CI, and Git workflow.
  1. 始终优先加载
    references/baseline.md
  2. 如需了解分层配置、校验、sqlc、pgx、GORM和数据迁移,请加载
    references/config-and-data.md
  3. 如需了解处理器、中间件、日志、可观测性和服务关停,请加载
    references/http-and-runtime.md
  4. 如需了解代码检查、测试、任务执行器、安全评审、CI和Git工作流,请加载
    references/delivery.md

Quick Routing

快速跳转

  • New service or CLI setup:
    references/baseline.md
  • koanf config, env mapping, DB access, migrations, repository boundaries:
    references/config-and-data.md
  • HTTP server, response envelopes, auth middleware, slog, tracing, shutdown:
    references/http-and-runtime.md
  • quality gates, lint, tests, Taskfile, security checklist, CI, PR readiness:
    references/delivery.md
  • 新建服务或CLI初始化:
    references/baseline.md
  • koanf配置、环境变量映射、数据库访问、数据迁移、仓储边界:
    references/config-and-data.md
  • HTTP服务器、响应封装、鉴权中间件、slog、链路追踪、服务关停:
    references/http-and-runtime.md
  • 质量门禁、代码检查、测试、Taskfile、安全检查清单、CI、PR就绪标准:
    references/delivery.md

Reference Packs

参考包

  • references/baseline.md
    Stack defaults, quality gates, layout, conventions, error model, and code quality standards.
  • references/config-and-data.md
    Config layering with koanf, validation, sqlc plus pgx, GORM alternative, and migration rules.
  • references/http-and-runtime.md
    Router structure, handler patterns, middleware, logging, observability, and graceful shutdown.
  • references/delivery.md
    Lint config, testing, task runner expectations, security checks, CI, and Git conventions.
If the repo already diverges from these defaults, make the divergence explicit and apply it consistently across code, docs, and CI.
  • references/baseline.md
    技术栈默认配置、质量门禁、项目结构、规约、错误模型和代码质量标准。
  • references/config-and-data.md
    基于koanf的分层配置、校验、sqlc+pgx、GORM替代方案,以及数据迁移规则。
  • references/http-and-runtime.md
    路由结构、处理器模式、中间件、日志、可观测性和优雅关停。
  • references/delivery.md
    代码检查配置、测试、任务执行器要求、安全检查、CI和Git规约。
如果代码库已经偏离这些默认配置,请明确标注差异点,并在代码、文档和CI中统一应用。