Skip to content

EdmondVirelle/Archetype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archetype

Context-engineered instruction templates for AI coding agents.

Universal CLAUDE.md & GEMINI.md templates optimized for minimal token consumption and maximum reasoning precision.


為 AI 編程代理打造的語境工程指令範本。

通用 CLAUDE.mdGEMINI.md 範本,以最少 token 消耗換取最高推理精度。

Why / 為什麼需要

Problem Solution
AI wastes tokens on verbose output Chain-of-Draft — each reasoning step ≤5 words
Long conversations degrade quality Document & Clear — save state, clear context, resume
AI reads entire files unnecessarily Script Delegation — run linters/tests, read output only
Context window fills up fast Memory Bank — modular @-loading, never preload all docs
Instructions drift in Gemini XML tags — structured boundaries for higher adherence
Repeated mistakes across sessions Error logs — bidirectional sync between Claude & Gemini
問題 解決方案
AI 輸出冗長浪費 token 草案鏈 (CoD) — 每步推理 ≤5 詞
長對話導致品質退化 記錄後清空 — 存狀態、清上下文、續接
AI 不必要地讀取整個檔案 腳本委派 — 跑 linter/測試,只讀輸出
語境窗口快速填滿 記憶銀行 — 按需 @ 載入,不預載
Gemini 指令漂移 XML 標記 — 結構化邊界提升依從性
跨 session 重複犯錯 錯誤日誌 — Claude 與 Gemini 雙向同步

What's Inside / 內容

Archetype/
├── CLAUDE.md           # Claude Code instruction template (Markdown)
├── GEMINI.md           # Gemini CLI instruction template (XML tags)
├── CLAUDE_ERROR.md     # Error log template (syncs → GEMINI_ERROR.md)
├── GEMINI_ERROR.md     # Error log template (syncs → CLAUDE_ERROR.md)
└── specs/              # Spec files & task_status.md live here

Usage / 使用方式

  1. Copy Archetype/ into your project root
  2. Fill in [PROJECT_NAME], [architecture], [rules], [commands]
  3. Start coding with Claude Code or Gemini CLI

  1. 複製 Archetype/ 到專案根目錄
  2. 填入 [PROJECT_NAME][architecture][rules][commands]
  3. 開始使用 Claude Code 或 Gemini CLI 開發

Core Strategies / 核心策略

Workflow (9 mandatory steps / 9 個必做步驟)

Errors → Commit → Spec → Contract → Fact-check → Delegate → DoD → Min tokens → Context hygiene

Ultrawork Protocol

EXPLORE → PLAN → EXECUTE → VERIFY → COMPLETE

100% certainty before coding. No skeleton. No demo. No "extend later".

Token Traps / Token 陷阱

Trap Fix
20+ turns /compact or /clear
Reading 1000+ lines Read target functions only
Guessing file paths Use @ exact path
Test fail loop Plan → confirm → implement

Context Thresholds / 語境閾值

Threshold Action
60k tokens or 30% window /compact (Claude) or summarize (Gemini)
5% remaining Write specs/task_status.md/clear → new session

License

MIT

About

The definitive collection of system-level protocols for Claude and Gemini. Engineered for high-performance workflows and logic-driven AI autonomy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors