-
Notifications
You must be signed in to change notification settings - Fork 0
hyp ai rules_en.md
maoxiaoyue edited this page May 14, 2026
·
1 revision
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.
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
| Flag | Description | Default |
|---|---|---|
--only |
Comma-separated target list | All (5 targets) |
--dir |
Project root directory | . |
--dry-run |
Preview without writing | false |
| 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) |
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.yamlfirst, usehyp impact) - Route table (if
.hyp/context.yamlexists) - Diff-log instruction (if
hyp diff-log --onis enabled)
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 |
hyp context -o .hyp/context.yaml # 1. Generate manifest first hyp ai-rules # 2. Generate config files (includes route table)
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.
- hyp context — Generate manifest (ai-rules reads it)
設計文件
套件
- config — 設定
- context — 請求上下文
- router — 路由器
- server — 伺服器
- middleware — 中介層
- websocket — WebSocket
- hidb — 資料庫 ORM
- hidb/cassandra — Cassandra
- logger — 日誌
- json — JSON 處理
- grpc — gRPC
AI 協作工具鏈
- schema — Schema-first 路由
- manifest — 專案 Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — 智慧 Scaffold
- airules — AI Rules
CLI 命令
- hyp 總覽
- hyp new
- hyp api
- hyp run
- hyp restart
- hyp generate
- hyp migrate
- hyp context
- hyp ai-rules
- hyp chkcomment
- hyp impact
- hyp docker
- hyp health
- hyp version
- hyp difflog
Design Docs
Packages
- config — Configuration
- context — Request Context
- router — Router
- server — Server
- middleware — Middleware
- websocket — WebSocket
- hidb — Database ORM
- hidb/cassandra - Cassandra 5.0
- logger — Logger
- json — JSON
- grpc — gRPC
AI Collaboration Toolchain
- schema — Schema-first Routing
- manifest — Project Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — Smart Scaffold
- airules — AI Rules
CLI Commands