Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hyp ai rules_en.md

maoxiaoyue edited this page May 14, 2026 · 1 revision

hyp ai-rules — Generate AI Tool Config Files

v0.8.5+ This command is a new feature added in HypGo v0.8.5 and is not available in v0.8.1.

Generate configuration files for all major AI coding tools in one step, so any AI tool understands HypGo conventions immediately.

Usage

hyp ai-rules # Generate all config files
hyp ai-rules --only agents,gemini # Specific tools only
hyp ai-rules --dry-run # Preview without writing
hyp ai-rules --dir ./myproject # Specify project root

Flags

Flag Description Default
--only Comma-separated target list All (5 targets)
--dir Project root directory .
--dry-run Preview without writing false

Generated Files

File AI Tool
AGENTS.md Codex CLI, Cursor, Continue.dev, Aider, OpenHands
GEMINI.md Google Gemini CLI / AI Studio
.github/copilot-instructions.md GitHub Copilot
.cursor/rules/hypgo.mdc Cursor (with frontmatter)
.windsurf/rules/hypgo.md Windsurf (max 6,000 chars)

Config File Contents

Each file includes:

  • Framework name, version, Go version
  • Project structure (pkg/, cmd/hyp/, .hyp/)
  • Key conventions: Schema-first routes, Typed Errors, Contract Testing
  • Build/Test commands
  • AI collaboration tips (read .hyp/context.yaml first, use hyp impact)
  • Route table (if .hyp/context.yaml exists)
  • Diff-log instruction (if hyp diff-log --on is enabled)

Overwrite Safety

Each auto-generated file starts with <!-- auto-generated by hyp ai-rules -->.

State Behavior
File doesn't exist Create
Has marker Overwrite
No marker (manually created) Skip

Recommended Workflow

hyp context -o .hyp/context.yaml # 1. Generate manifest first
hyp ai-rules # 2. Generate config files (includes route table)

Why Is This Essential?

Without these files, AI tools start from scratch every session, wasting thousands of tokens. With config files, AI immediately knows your conventions and route structure.

Related Commands

  • hyp context — Generate manifest (ai-rules reads it)

Detailed Documentation

HypGo

繁體中文 | English


中文文件

設計文件

套件

AI 協作工具鏈

CLI 命令


English Docs

Design Docs

Packages

AI Collaboration Toolchain

CLI Commands

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /