ATLAS Framework
A structured methodology for AI-assisted development built on the GOTCHA 6-layer architecture.
When to Use This Skill
Use this skill when:
- - Building full-stack applications
- Creating agentic workflows
- Setting up AI assistant frameworks
- Designing data systems or databases
- Planning integrations with external services
The GOTCHA Framework (6 Layers)
GOT (The Engine):
- - Goals (
goals/) — What needs to happen (process definitions) - Orchestration — The AI manager that coordinates execution
- Tools (
tools/) — Deterministic scripts that do the actual work
CHA (The Context):
- - Context (
context/) — Reference material and domain knowledge - Hard prompts (
hardprompts/) — Reusable instruction templates - Args (
args/) — Behavior settings that shape how the system acts
Why GOTCHA?
LLMs are probabilistic (educated guesses). Business logic is deterministic (must work the same way every time). This structure bridges that gap through separation of concerns:
- - Push reliability into deterministic code (tools)
- Push flexibility and reasoning into the LLM (orchestration)
- Push process clarity into goals
- Push behavior settings into args files
- Push domain knowledge into context layer
ATLAS Workflow (5 Steps)
Use this when building applications:
| Step | Phase | What You Do |
|---|
| A | Architect | Define problem, users, success metrics |
| T |
Trace | Data schema, integrations map, stack proposal |
|
L | Link | Validate ALL connections before building |
|
A | Assemble | Build with layered architecture |
|
S | Stress-test | Test functionality, error handling |
For production builds, also add:
- - V — Validate (security, input sanitization, edge cases, unit tests)
- M — Monitor (logging, observability, alerts)
A — Architect
Purpose: Know exactly what you're building before touching code.
Answer these questions:
- 1. What problem does this solve? (One sentence)
- Who is this for? (Specific user, not "everyone")
- What does success look like? (Measurable outcome)
- What are the constraints? (Budget, time, technical requirements)
T — Trace
Purpose: Design before building.
- 1. Data Schema — Define source of truth BEFORE building
- Integrations Map — List every external connection (service, purpose, auth type, MCP available?)
- Technology Stack — Propose database, backend, frontend
- Edge Cases — Document what could break (rate limits, token expiry, timeouts)
L — Link
Purpose: Validate ALL connections BEFORE building.
CODEBLOCK0
A — Assemble
Purpose: Build with proper architecture.
Build order:
- 1. Database schema first
- Backend API routes second
- Frontend UI last
Follow GOTCHA separation:
- - Frontend — UI components, user interactions
- Backend — API routes, business logic, validation
- Database — Schema, migrations, indexes
S — Stress-test
Purpose: Test before shipping.
- - Functional Testing — All buttons work, data saves/retrieves, navigation works
- Integration Testing — API calls succeed, MCP operations work, auth persists
- Edge Case Testing — Invalid input handled, empty states display, network errors show feedback
File Structure
CODEBLOCK1
Memory System
The framework includes a persistent memory system for cross-session continuity.
Loading Memory
At session start, load memory context:
- - Read
memory/MEMORY.md for curated long-term facts - Read today's log: INLINECODE6
- Read yesterday's log for continuity
Memory Types
- -
fact — Objective information - INLINECODE8 — User preferences
- INLINECODE9 — Something that happened
- INLINECODE10 — Learned pattern
- INLINECODE11 — Something to do
- INLINECODE12 — Connection between entities
Search Capabilities
- - Keyword search
- Semantic search
- Hybrid search (best results)
Anti-Patterns (What NOT To Do)
- 1. Building before designing — End up rewriting everything
- Skipping connection validation — Hours wasted on broken integrations
- No data modeling — Schema changes cascade into UI rewrites
- No testing — Ship broken code, lose trust
- Hardcoding everything — No flexibility for changes
Guardrails
- - Always check
tools/manifest.md before writing new scripts - Verify tool output format before chaining into another tool
- Don't assume APIs support batch operations — check first
- When a workflow fails mid-execution, preserve intermediate outputs before retrying
- Read the full goal before starting a task — don't skim
First Run Initialization
On first session in a new environment:
- 1. Check if
memory/MEMORY.md exists - If missing, create the folder structure:
-
memory/logs/
-
data/
- 3. Create
MEMORY.md with template - Initialize SQLite databases for memory and activity tracking
Continuous Improvement Loop
Every failure strengthens the system:
- 1. Identify what broke and why
- Fix the tool script
- Test until it works reliably
- Update the goal with new knowledge
- Next time → automatic success
ATLAS框架
一种基于GOTCHA六层架构的AI辅助开发结构化方法论。
何时使用此技能
在以下场景中使用此技能:
- - 构建全栈应用
- 创建智能体工作流
- 搭建AI助手框架
- 设计数据系统或数据库
- 规划与外部服务的集成
GOTCHA框架(六层)
GOT(引擎):
- - 目标(goals/)——需要完成什么(流程定义)
- 编排(Orchestration)——协调执行的AI管理器
- 工具(tools/)——执行实际工作的确定性脚本
CHA(上下文):
- - 上下文(context/)——参考资料和领域知识
- 硬提示(hardprompts/)——可复用的指令模板
- 参数(args/)——塑造系统行为方式的行为设置
为什么选择GOTCHA?
大语言模型是概率性的(有根据的猜测)。业务逻辑是确定性的(每次必须以相同方式运行)。这种结构通过关注点分离弥合了这一差距:
- - 将可靠性推入确定性代码(工具)
- 将灵活性和推理推入大语言模型(编排)
- 将流程清晰度推入目标
- 将行为设置推入参数文件
- 将领域知识推入上下文层
ATLAS工作流(五步)
在构建应用时使用:
| 步骤 | 阶段 | 操作内容 |
|---|
| A | 架构设计 | 定义问题、用户、成功指标 |
| T |
追踪 | 数据模式、集成映射、技术栈方案 |
|
L | 链接 | 构建前验证所有连接 |
|
A | 组装 | 使用分层架构构建 |
|
S | 压力测试 | 测试功能、错误处理 |
对于生产构建,还需添加:
- - V——验证(安全性、输入清理、边界情况、单元测试)
- M——监控(日志记录、可观测性、告警)
A——架构设计
目的: 在接触代码之前确切了解要构建的内容。
回答以下问题:
- 1. 这解决了什么问题?(一句话)
- 这是为谁设计的?(特定用户,而非所有人)
- 成功是什么样子的?(可衡量的结果)
- 有哪些约束条件?(预算、时间、技术要求)
T——追踪
目的: 构建前先设计。
- 1. 数据模式——在构建前定义数据源
- 集成映射——列出每个外部连接(服务、用途、认证类型、是否支持MCP)
- 技术栈——提出数据库、后端、前端方案
- 边界情况——记录可能出问题的地方(速率限制、令牌过期、超时)
L——链接
目的: 在构建前验证所有连接。
[ ] 数据库连接已测试
[ ] 所有API密钥已验证
[ ] MCP服务器响应正常
[ ] OAuth流程正常工作
[ ] 环境变量已设置
[ ] 速率限制已了解
A——组装
目的: 使用正确的架构进行构建。
构建顺序:
- 1. 先建数据库模式
- 再建后端API路由
- 最后建前端UI
遵循GOTCHA分离原则:
- - 前端——UI组件、用户交互
- 后端——API路由、业务逻辑、验证
- 数据库——模式、迁移、索引
S——压力测试
目的: 发布前进行测试。
- - 功能测试——所有按钮正常工作、数据保存/检索正常、导航正常
- 集成测试——API调用成功、MCP操作正常、认证持久化
- 边界情况测试——无效输入得到处理、空状态正确显示、网络错误有反馈
文件结构
project/
├── goals/ — 流程定义(要实现什么)
├── tools/ — 执行脚本(按工作流组织)
├── args/ — 行为设置(YAML/JSON)
├── context/ — 领域知识和参考资料
├── hardprompts/ — 可复用的指令模板
├── memory/ — 持久化记忆系统
├── .tmp/ — 临时工作(可丢弃)
├── .env — API密钥 + 环境变量
└── CLAUDE.md — 系统指令文件
记忆系统
该框架包含一个用于跨会话连续性的持久化记忆系统。
加载记忆
在会话开始时,加载记忆上下文:
- - 读取 memory/MEMORY.md 获取精选的长期事实
- 读取今日日志:memory/logs/YYYY-MM-DD.md
- 读取昨日日志以保持连续性
记忆类型
- - fact(事实)——客观信息
- preference(偏好)——用户偏好
- event(事件)——发生的事件
- insight(洞察)——学到的模式
- task(任务)——待办事项
- relationship(关系)——实体间的联系
搜索能力
反模式(不该做的事)
- 1. 先构建后设计——最终重写所有内容
- 跳过连接验证——在损坏的集成上浪费数小时
- 没有数据建模——模式变更级联导致UI重写
- 没有测试——发布有缺陷的代码,失去信任
- 硬编码一切——缺乏变更灵活性
护栏
- - 在编写新脚本前始终检查 tools/manifest.md
- 在链接到另一个工具前验证工具输出格式
- 不要假设API支持批量操作——先检查
- 当工作流中途失败时,在重试前保留中间输出
- 在开始任务前阅读完整目标——不要草率浏览
首次运行初始化
在新环境中首次会话时:
- 1. 检查 memory/MEMORY.md 是否存在
- 如果缺失,创建文件夹结构:
- memory/logs/
- data/
- 3. 使用模板创建 MEMORY.md
- 初始化用于记忆和活动追踪的SQLite数据库
持续改进循环
每次失败都会增强系统:
- 1. 识别出问题所在及原因
- 修复工具脚本
- 测试直至可靠运行
- 用新知识更新目标
- 下次→自动成功