Organon File Creation Workflow
Implements PROTO-ORG-6 from organon/protocols/PROTOCOLS.md. Creates valid organon files with correct placement, structure, and references.
When to Use This Skill
Use this skill when:
- Adding a new domain that needs its own ETHOS.md
- Adding a new feature organon (cross-cutting capability)
- Creating PHILOSOPHY.md for design rationale
- Creating PROTOCOL.md for step-by-step procedures
- Adding a new scope directory that needs a README.md router
Purpose: Ensure every organon file is created correctly from the start — right location, right structure, right frontmatter, right inheritance.
Context Loading
- Load templates and structure:
- Read
book-llms/templates.md (copy-paste scaffolds for each artifact type)
- Read
book-llms/scopes.md (scope classification: product, domain, feature, component)
- Read
book-llms/frontmatter-system.md (complete YAML frontmatter schema)
- Load quality standards:
- Read
book-llms/ETHOS.md (meta-organon constraints — what every organon must follow)
- Read
CLAUDE.md (project-level constraints)
- Load parent scope:
- Read the parent scope's ETHOS.md (new file must inherit, never contradict)
Steps
Step 1: Classify Scope
Determine the scope of the new file:
| Scope |
Question It Answers |
Characteristics |
| product |
"What is this project?" |
Top-level, inherits from meta-organon only |
| domain |
"What business concepts exist?" |
Bounded context, ≥3 unique concepts, own lifecycle |
| feature |
"What can users do?" |
Cross-cutting capability, used by multiple domains |
| component |
"Where is the code?" |
Code module, dependency relationships |
| methodology |
"How do we work?" |
Process documentation, separate from product |
Decision heuristic: Has ≥3 unique concepts + lifecycle → domain. Crosses multiple domains → feature. Users think in code terms → component.
Step 2: Check Parent Scope
Load the parent scope's ETHOS.md. The new file must:
- Inherit all parent constraints (never relax them)
- Add constraints specific to this scope
- Reference the parent in
inherits_from frontmatter field
Step 3: Select Template
Based on the artifact type, load the correct template from book-llms/templates.md:
| Artifact |
Template Section |
Required Sections |
| ETHOS.md |
Ethos Template |
Identity (IS/IS NOT), Invariants, Principles, Decision Heuristics |
| PHILOSOPHY.md |
Philosophy Template |
The Problem, The Bet, Design Decisions, Trade-offs |
| PROTOCOL.md |
Protocol Template |
Goal, Preconditions, Steps, Verification, Recovery |
| README.md |
README Router Template |
Contents table with paths, types, descriptions |
Step 4: Determine File Placement
Follow Pattern A (dedicated organon/ directory):
organon/
├── domains/
│ └── <domain-name>/
│ ├── ETHOS.md
│ ├── PHILOSOPHY.md
│ └── README.md
├── features/
│ └── <feature-name>/
│ ├── ETHOS.md
│ └── README.md
└── protocols/
└── PROTOCOLS.md
For product-level scope: place directly in organon/.
Step 5: Generate Frontmatter
Fill in all required fields:
---
type: [constraints|rationale|procedures|navigation]
scope: [product|domain|feature|component|methodology]
name: [kebab-case-name]
version: "1.0"
summary: [One-sentence, max 200 chars]
token_estimate: [number, ~12 tokens/line]
# Type-specific fields (e.g., invariants_count for constraints)
inherits_from: [parent-scope-names]
load_priority: [high|medium|low]
audience: [llm, human]
---
Use organon generate if available to auto-generate frontmatter scaffold.
Step 6: Write Content
Follow the template's section structure exactly:
For ETHOS.md:
- Write ≥3 IS statements (specific, not generic)
- Write ≥3 IS NOT statements (real boundaries)
- Write ≥3 invariants with enforcement mechanisms
- Write ≥3 prioritized principles (lower number wins)
- Write ≥5 decision heuristics (situation → action)
For PHILOSOPHY.md:
- Write problem statement with root causes
- Write the bet (falsifiable hypothesis)
- Write ≥5 trade-offs with rationale
- Write ≥3 alternatives considered
For PROTOCOL.md:
- Write clear goal statement
- Write ≥3 preconditions
- Write numbered steps with decision points
- Write verification checklist
- Write recovery table
For README.md:
- Keep under 100 lines (router, not content)
- Include contents table with all children
Step 7: Validate
cd packages/tools && npx organon validate <path-to-new-file>
Runs all 4 validation stages:
- Schema — frontmatter structure is valid
- Content — required sections present
- References — file paths resolve
- Relationships — inheritance chain is valid
Step 8: Check Bidirectional References
If the new file references other organon files, ensure those files reference back:
- If creating a protocol with
workflow: <name>, ensure the workflow has protocol_id matching
- If setting
inherits_from: [parent], ensure parent exists
- If setting
related_files, ensure those files exist
cd packages/tools && npx organon verify --gate triplets
Verification
Error Recovery
| Failure |
Recovery Action |
| Wrong scope classification |
Re-read book-llms/scopes.md. Apply the decision heuristic (≥3 concepts → domain, cross-cutting → feature). |
organon validate schema stage fails |
Check frontmatter against book-llms/frontmatter-system.md. Common issues: missing required field, wrong type enum value. |
organon validate content stage fails |
Re-read template from book-llms/templates.md. Add missing sections. |
| Parent scope contradiction |
Remove or weaken the contradicting constraint. Child scopes can only add, never relax. |
| Missing template section |
Re-read the template. Every section in the template is required unless explicitly marked optional. |
| Bidirectional reference broken |
Add the missing back-reference in the target file. Run organon verify --gate triplets to confirm. |
| File placed in wrong directory |
Move file to correct location per Pattern A. Update any references to the old path. |
1---2name: organon-file-creation3description: Creates new organon files (ETHOS.md, PHILOSOPHY.md, PROTOCOL.md, README.md) with correct structure, frontmatter, scope inheritance, and bidirectional references. Use when adding a new domain, feature, component, or scope that needs organon documentation. Replaces ad-hoc file creation with validated workflow.4---5
6# Organon File Creation Workflow
7
8> Implements PROTO-ORG-6 from `organon/protocols/PROTOCOLS.md`. Creates valid organon files with correct placement, structure, and references.
9
10---
11
12## When to Use This Skill
13
14Use this skill when:
15- **Adding a new domain** that needs its own ETHOS.md
16- **Adding a new feature** organon (cross-cutting capability)
17- **Creating PHILOSOPHY.md** for design rationale
18- **Creating PROTOCOL.md** for step-by-step procedures
19- **Adding a new scope directory** that needs a README.md router
20
21**Purpose:** Ensure every organon file is created correctly from the start — right location, right structure, right frontmatter, right inheritance.
22
23---
24
25## Context Loading
26
271. Load templates and structure:
28 - Read `book-llms/templates.md` (copy-paste scaffolds for each artifact type)
29 - Read `book-llms/scopes.md` (scope classification: product, domain, feature, component)
30 - Read `book-llms/frontmatter-system.md` (complete YAML frontmatter schema)
312. Load quality standards:
32 - Read `book-llms/ETHOS.md` (meta-organon constraints — what every organon must follow)
33 - Read `CLAUDE.md` (project-level constraints)
343. Load parent scope:
35 - Read the parent scope's ETHOS.md (new file must inherit, never contradict)
36
37---
38
39## Steps
40
41### Step 1: Classify Scope
42
43Determine the scope of the new file:
44
45| Scope | Question It Answers | Characteristics |
46|-------|-------------------|-----------------|
47| **product** | "What is this project?" | Top-level, inherits from meta-organon only |
48| **domain** | "What business concepts exist?" | Bounded context, ≥3 unique concepts, own lifecycle |
49| **feature** | "What can users do?" | Cross-cutting capability, used by multiple domains |
50| **component** | "Where is the code?" | Code module, dependency relationships |
51| **methodology** | "How do we work?" | Process documentation, separate from product |
52
53**Decision heuristic:** Has ≥3 unique concepts + lifecycle → domain. Crosses multiple domains → feature. Users think in code terms → component.
54
55### Step 2: Check Parent Scope
56
57Load the parent scope's ETHOS.md. The new file must:
58- **Inherit** all parent constraints (never relax them)
59- **Add** constraints specific to this scope
60- **Reference** the parent in `inherits_from` frontmatter field
61
62### Step 3: Select Template
63
64Based on the artifact type, load the correct template from `book-llms/templates.md`:
65
66| Artifact | Template Section | Required Sections |
67|----------|-----------------|-------------------|
68| ETHOS.md | Ethos Template | Identity (IS/IS NOT), Invariants, Principles, Decision Heuristics |
69| PHILOSOPHY.md | Philosophy Template | The Problem, The Bet, Design Decisions, Trade-offs |
70| PROTOCOL.md | Protocol Template | Goal, Preconditions, Steps, Verification, Recovery |
71| README.md | README Router Template | Contents table with paths, types, descriptions |
72
73### Step 4: Determine File Placement
74
75Follow Pattern A (dedicated `organon/` directory):
76
77```
78organon/
79├── domains/
80│ └── <domain-name>/
81│ ├── ETHOS.md
82│ ├── PHILOSOPHY.md
83│ └── README.md
84├── features/
85│ └── <feature-name>/
86│ ├── ETHOS.md
87│ └── README.md
88└── protocols/
89 └── PROTOCOLS.md
90```
91
92For product-level scope: place directly in `organon/`.
93
94### Step 5: Generate Frontmatter
95
96Fill in all required fields:
97
98```yaml
99---
100type: [constraints|rationale|procedures|navigation]
101scope: [product|domain|feature|component|methodology]
102name: [kebab-case-name]
103version: "1.0"
104summary: [One-sentence, max 200 chars]
105token_estimate: [number, ~12 tokens/line]
106# Type-specific fields (e.g., invariants_count for constraints)
107inherits_from: [parent-scope-names]
108load_priority: [high|medium|low]
109audience: [llm, human]
110---
111```
112
113Use `organon generate` if available to auto-generate frontmatter scaffold.
114
115### Step 6: Write Content
116
117Follow the template's section structure exactly:
118
119**For ETHOS.md:**
120- Write ≥3 IS statements (specific, not generic)
121- Write ≥3 IS NOT statements (real boundaries)
122- Write ≥3 invariants with enforcement mechanisms
123- Write ≥3 prioritized principles (lower number wins)
124- Write ≥5 decision heuristics (situation → action)
125
126**For PHILOSOPHY.md:**
127- Write problem statement with root causes
128- Write the bet (falsifiable hypothesis)
129- Write ≥5 trade-offs with rationale
130- Write ≥3 alternatives considered
131
132**For PROTOCOL.md:**
133- Write clear goal statement
134- Write ≥3 preconditions
135- Write numbered steps with decision points
136- Write verification checklist
137- Write recovery table
138
139**For README.md:**
140- Keep under 100 lines (router, not content)
141- Include contents table with all children
142
143### Step 7: Validate
144
145```bash
146cd packages/tools && npx organon validate <path-to-new-file>
147```
148
149Runs all 4 validation stages:
1501. **Schema** — frontmatter structure is valid
1512. **Content** — required sections present
1523. **References** — file paths resolve
1534. **Relationships** — inheritance chain is valid
154
155### Step 8: Check Bidirectional References
156
157If the new file references other organon files, ensure those files reference back:
158- If creating a protocol with `workflow: <name>`, ensure the workflow has `protocol_id` matching
159- If setting `inherits_from: [parent]`, ensure parent exists
160- If setting `related_files`, ensure those files exist
161
162```bash
163cd packages/tools && npx organon verify --gate triplets
164```
165
166---
167
168## Verification
169
170- [ ] `organon validate` passes all 4 stages
171- [ ] File is in the correct directory per scope classification
172- [ ] Frontmatter has all required fields (type, scope, name, version, summary, token_estimate)
173- [ ] Section headings match the template for this artifact type
174- [ ] Parent scope constraints are inherited, not contradicted
175- [ ] Bidirectional references are complete (no orphans)
176
177---
178
179## Error Recovery
180
181| Failure | Recovery Action |
182|---------|-----------------|
183| Wrong scope classification | Re-read `book-llms/scopes.md`. Apply the decision heuristic (≥3 concepts → domain, cross-cutting → feature). |
184| `organon validate` schema stage fails | Check frontmatter against `book-llms/frontmatter-system.md`. Common issues: missing required field, wrong type enum value. |
185| `organon validate` content stage fails | Re-read template from `book-llms/templates.md`. Add missing sections. |
186| Parent scope contradiction | Remove or weaken the contradicting constraint. Child scopes can only add, never relax. |
187| Missing template section | Re-read the template. Every section in the template is required unless explicitly marked optional. |
188| Bidirectional reference broken | Add the missing back-reference in the target file. Run `organon verify --gate triplets` to confirm. |
189| File placed in wrong directory | Move file to correct location per Pattern A. Update any references to the old path. |