원클릭으로
lore-spec
Create and manage L0 prescriptive design specs before writing code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create and manage L0 prescriptive design specs before writing code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | lore-spec |
| description | Create and manage L0 prescriptive design specs before writing code |
| category | ai-context |
在写代码之前,先写下设计意图。L0 是 Lore 的 prescriptive 层——不是记录"代码是什么",而是记录"代码应该是什么"。
| L3 (Process) | L0 (Spec) | |
|---|---|---|
| 内容 | 已发生的决策和原因 | 尚未实现的设计意图 |
| 来源 | 对话中自动提取 | 人工主动编写 |
| 时机 | 代码之后 | 代码之前 |
| 格式 | 描述性(发生了什么) | 规定性(应该怎么做) |
如果 modules/ 存在:
modules/_index.md 列出已知模块/lore-modularize 发现模块如果 modules/ 不存在:
specs/ 目录(暂不支持模块)支持的 Spec 类型:
1. api-design — API 设计(端点、请求、响应、错误码)
2. data-model — 数据模型(实体、字段、关系)
3. flow-design — 流程设计(状态机、业务流程)
4. interface-contract — 接口契约(模块间调用约定)
在 modules/<module>/specs/ 下创建 <type>-<name>.md>:
# Spec: {{API Name / Feature Name}}
> Type: {{api-design / data-model / flow-design / interface-contract}}
> Module: {{module-name}}
> Author: {{author}}
> Created: {{YYYY-MM-DD}}
> Status: draft ← draft | proposed | approved | implemented | superseded
## Design Intent
{{描述设计目标和约束,不是实现细节}}
## Spec Details
{{具体规格,视类型而定}}
### API Design
- Endpoint: POST /api/...
- Request: {{schema}}
- Response: {{schema}}
- Errors: {{error codes}}
### Data Model
- Entity: {{name}}
- Fields: {{field list}}
- Relationships: {{relations}}
### Flow Design
- Entry: {{trigger}}
- States: {{state list}}
- Transitions: {{transitions}}
## Implementation Checklist
- [ ] 基础结构已创建
- [ ] 核心逻辑实现
- [ ] 测试覆盖
- [ ] 文档更新
## Notes
{{额外说明}}
当 spec 状态变为 implemented 时:
modules/<module>/increments/ 作为 incrementimplemented## Post-Implementation
从本 spec 提炼的知识:
- [DECISION] {{设计决策}}
- 来源: spec/{{spec-name}}.md
- confidence: high(经过设计评审)
创建新 spec:
/spec create order api-design order-creation
→ 创建 modules/order/specs/api-design-order-creation.md
列出模块的所有 specs:
/spec list order
→ 输出所有 order specs 及状态
将 spec 状态从 draft → proposed → approved:
/spec approve order/api-design-order-creation
→ 状态更新为 approved
标记 spec 为已实现,并提取知识:
/spec implement order/api-design-order-creation
→ 状态改为 implemented
→ 生成 increment
废弃 spec:
/spec drop order/api-design-order-creation
→ 状态改为 superseded
创建时:
+ Spec created: modules/order/specs/api-design-order-creation.md
Status: draft
Next: /spec approve order/api-design-order-creation
状态变更时:
+ Spec updated: order/api-design-order-creation
draft → approved
实施时:
+ Spec implemented: order/api-design-order-creation
+ Increment created: modules/order/increments/YYYY-MM-DD_spec-implemented.md
+ 1 decision extracted
Automatically discover modules and partition knowledge into modular structure
Compile knowledge increments into project snapshot with conflict detection
Auto-scan project structure and sync L1 knowledge layer with codebase
Compress knowledge window by merging, deduping, and summarizing buffer entries
Manage L2 constraint layer - knowledge stabilization, protection, and indexing
Flush knowledge buffer into versioned increment files with source tracing