oneie 3.6.18 → 3.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/agent-ops.md +63 -2
- package/.claude/commands/commit.md +95 -0
- package/.claude/commands/npx.md +2 -2
- package/.claude/commands/one.md +7 -1
- package/.claude/commands/push.md +113 -21
- package/.claude/commands/release.md +2 -2
- package/.claude/hooks/release-cli.sh +195 -0
- package/CLAUDE.md +119 -0
- package/README.md +778 -497
- package/package.json +1 -1
- package/.claude/agents/NEWS-QUICKSTART.md +0 -321
- package/.claude/agents/NEWS-README.md +0 -353
- package/.claude/hooks/README-knowledge-hooks.md +0 -451
- package/.claude/hooks/README-root-cleanup.md +0 -200
- package/.claude/hooks/README.md +0 -284
- package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/check-filenames.py +0 -177
- package/.claude/hooks/clean-post.py +0 -468
- package/.claude/hooks/clean-pre.py +0 -393
- package/.claude/hooks/clean-root-markdown.sh +0 -73
- package/.claude/hooks/done.py +0 -236
- package/.claude/hooks/format-hook.sh +0 -163
- package/.claude/hooks/hook-logger.sh +0 -173
- package/.claude/hooks/knowledge-post.py +0 -355
- package/.claude/hooks/knowledge-pre.py +0 -245
- package/.claude/hooks/notification-hook.sh +0 -279
- package/.claude/hooks/root-cleanup.py +0 -217
- package/.claude/hooks/security-hook.sh +0 -397
- package/.claude/hooks/tag-all-docs.py +0 -464
- package/.claude/hooks/test-validate-ontology.sh +0 -170
- package/.claude/hooks/todo.py +0 -368
- package/.claude/hooks/track-changes.sh +0 -101
- package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
- package/.claude/hooks/validate-ontology-structure.py +0 -518
- package/TESTING-ONBOARDING.md +0 -185
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
# Ontology Structure Validation Hook - Update Summary
|
|
2
|
-
|
|
3
|
-
**Date:** 2025-11-03
|
|
4
|
-
**Status:** ✅ Complete and Tested
|
|
5
|
-
**Hook:** `.claude/hooks/validate-ontology-structure.py`
|
|
6
|
-
|
|
7
|
-
## Changes Made
|
|
8
|
-
|
|
9
|
-
### 1. Enhanced Documentation Header
|
|
10
|
-
|
|
11
|
-
Added comprehensive documentation explaining:
|
|
12
|
-
- The 6-dimension ontology (groups, people, things, connections, events, knowledge)
|
|
13
|
-
- Database implementation (5 tables mapping to 6 dimensions)
|
|
14
|
-
- Expected directory structure for `/one/`
|
|
15
|
-
- Clarification that people are stored as things with `type: 'creator'`
|
|
16
|
-
|
|
17
|
-
### 2. Updated Dimension Definitions
|
|
18
|
-
|
|
19
|
-
Each dimension now includes:
|
|
20
|
-
- **Simplified aliases** (removed variants like "organisations/organizations")
|
|
21
|
-
- **Clear descriptions** aligned with ontology.md
|
|
22
|
-
- **Example files** showing what belongs in each dimension
|
|
23
|
-
- **Type counts** (66 thing types, 25 connection types, 67 event types)
|
|
24
|
-
- **Special notes** (e.g., people stored as things with role metadata)
|
|
25
|
-
|
|
26
|
-
#### Dimension Structure:
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
📁 /one/groups/
|
|
30
|
-
Hierarchical containers - friend circles → DAOs → governments
|
|
31
|
-
Examples: groups.md, revenue.md, vision.md
|
|
32
|
-
|
|
33
|
-
📁 /one/people/
|
|
34
|
-
Authorization & governance - roles, permissions, organization
|
|
35
|
-
Examples: people.md, roles.md, governance.md
|
|
36
|
-
Note: People are stored as things (type: 'creator') with role metadata
|
|
37
|
-
|
|
38
|
-
📁 /one/things/
|
|
39
|
-
All entities - users, agents, content, tokens, courses (66 types)
|
|
40
|
-
Examples: agents/, plans/, specifications/
|
|
41
|
-
|
|
42
|
-
📁 /one/connections/
|
|
43
|
-
All relationships - owns, purchased, enrolled_in (25 types)
|
|
44
|
-
Examples: protocols.md, workflow.md, integrations/
|
|
45
|
-
|
|
46
|
-
📁 /one/events/
|
|
47
|
-
All actions - created, updated, purchased, completed (67 types)
|
|
48
|
-
Examples: deployment/, releases/, test-results/
|
|
49
|
-
|
|
50
|
-
📁 /one/knowledge/
|
|
51
|
-
AI understanding - embeddings, search, RAG (labels, chunks, vectors)
|
|
52
|
-
Examples: ontology.md, architecture.md, patterns/
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 3. Added EXPECTED_STRUCTURE Constant
|
|
56
|
-
|
|
57
|
-
New constant defining what should go in each dimension directory:
|
|
58
|
-
- **groups:** Group definitions, hierarchies, vision, strategy, revenue
|
|
59
|
-
- **people:** Roles, governance, team structure, organization
|
|
60
|
-
- **things:** Entity specifications, agent definitions, plans, components
|
|
61
|
-
- **connections:** Protocols, workflows, integrations, relationships, patterns
|
|
62
|
-
- **events:** Deployment plans, release notes, test results, agent execution summaries
|
|
63
|
-
- **knowledge:** Architecture docs, implementation guides, patterns, rules, tutorials
|
|
64
|
-
|
|
65
|
-
### 4. Improved Error Messages
|
|
66
|
-
|
|
67
|
-
Enhanced error output to include:
|
|
68
|
-
- Visual separators (======= lines)
|
|
69
|
-
- Emoji indicators for each dimension (📁)
|
|
70
|
-
- Example files for each dimension
|
|
71
|
-
- Notes about special cases (e.g., people as things)
|
|
72
|
-
- Clear database implementation mapping (5 tables → 6 dimensions)
|
|
73
|
-
- Current file location and detected dimension
|
|
74
|
-
|
|
75
|
-
### 5. Created Comprehensive Test Suite
|
|
76
|
-
|
|
77
|
-
New file: `.claude/hooks/test-validate-ontology.sh`
|
|
78
|
-
|
|
79
|
-
Tests 14 scenarios:
|
|
80
|
-
- ✅ Valid files in all 6 dimensions
|
|
81
|
-
- ✅ Invalid dimension detection
|
|
82
|
-
- ✅ Invalid filename detection (uppercase, spaces, CamelCase)
|
|
83
|
-
- ✅ Files outside `/one/` are ignored
|
|
84
|
-
- ✅ All tests passing
|
|
85
|
-
|
|
86
|
-
## Ontology Alignment Verification
|
|
87
|
-
|
|
88
|
-
### ✅ Aligned with ontology.md
|
|
89
|
-
|
|
90
|
-
1. **6 Dimensions Confirmed:**
|
|
91
|
-
- groups - Hierarchical containers (friend circles → governments)
|
|
92
|
-
- people - Authorization & governance (who can do what)
|
|
93
|
-
- things - All entities (66 types)
|
|
94
|
-
- connections - All relationships (25 types)
|
|
95
|
-
- events - All actions (67 types)
|
|
96
|
-
- knowledge - AI understanding (embeddings, search, RAG)
|
|
97
|
-
|
|
98
|
-
2. **Database Implementation (5 tables):**
|
|
99
|
-
- groups table → groups dimension ✅
|
|
100
|
-
- things table → things + people dimensions ✅
|
|
101
|
-
- connections table → connections dimension ✅
|
|
102
|
-
- events table → events dimension ✅
|
|
103
|
-
- knowledge table → knowledge dimension ✅
|
|
104
|
-
|
|
105
|
-
3. **Key Insight: People as Things**
|
|
106
|
-
- People are stored in the `things` table with `type: 'creator'`
|
|
107
|
-
- The `/one/people/` directory contains role/governance docs
|
|
108
|
-
- Hook correctly notes this relationship
|
|
109
|
-
|
|
110
|
-
### ✅ Directory Structure Validation
|
|
111
|
-
|
|
112
|
-
The hook validates that all files in `/one/` follow the ontology:
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
/one/
|
|
116
|
-
├── groups/ ✅ Group definitions, vision, strategy
|
|
117
|
-
├── people/ ✅ Roles, governance, organization
|
|
118
|
-
├── things/ ✅ Entity specs, agents, plans
|
|
119
|
-
├── connections/ ✅ Protocols, workflows, integrations
|
|
120
|
-
├── events/ ✅ Deployment, releases, test results
|
|
121
|
-
└── knowledge/ ✅ Architecture, patterns, guides
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### ✅ Validation Rules
|
|
125
|
-
|
|
126
|
-
1. **File location:** Must be in one of the 6 dimension directories
|
|
127
|
-
2. **File naming:** kebab-case only (lowercase-with-hyphens.md)
|
|
128
|
-
3. **File extensions:** .md, .yaml, .yml, .json only
|
|
129
|
-
4. **Thing types:** Validates against 66 defined types
|
|
130
|
-
5. **Connection types:** Validates against 25 relationship types
|
|
131
|
-
6. **Event types:** Validates against 67 action types
|
|
132
|
-
7. **Protocol metadata:** Ensures protocols stored in metadata.protocol field
|
|
133
|
-
|
|
134
|
-
## Test Results
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
$ ./.claude/hooks/test-validate-ontology.sh
|
|
138
|
-
|
|
139
|
-
=======================================================================
|
|
140
|
-
Testing Ontology Structure Validation Hook
|
|
141
|
-
=======================================================================
|
|
142
|
-
|
|
143
|
-
Testing valid files in each dimension...
|
|
144
|
-
✅ Valid file in /one/groups/
|
|
145
|
-
✅ Valid file in /one/people/
|
|
146
|
-
✅ Valid file in /one/things/
|
|
147
|
-
✅ Valid file in /one/connections/
|
|
148
|
-
✅ Valid file in /one/events/
|
|
149
|
-
✅ Valid file in /one/knowledge/
|
|
150
|
-
|
|
151
|
-
Testing invalid dimensions...
|
|
152
|
-
✅ Invalid dimension /one/invalid/ (correctly failed)
|
|
153
|
-
✅ File directly in /one/ (correctly failed)
|
|
154
|
-
|
|
155
|
-
Testing invalid filenames...
|
|
156
|
-
✅ Uppercase filename (correctly failed)
|
|
157
|
-
✅ Spaces in filename (correctly failed)
|
|
158
|
-
✅ CamelCase filename (correctly failed)
|
|
159
|
-
|
|
160
|
-
Testing files outside /one (should be ignored)...
|
|
161
|
-
✅ File in /web (correctly ignored)
|
|
162
|
-
✅ File in /backend (correctly ignored)
|
|
163
|
-
✅ File in root (correctly ignored)
|
|
164
|
-
|
|
165
|
-
=======================================================================
|
|
166
|
-
Test Summary
|
|
167
|
-
=======================================================================
|
|
168
|
-
Total tests: 14
|
|
169
|
-
Passed: 14
|
|
170
|
-
Failed: 0
|
|
171
|
-
|
|
172
|
-
✅ All tests passed!
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Usage
|
|
176
|
-
|
|
177
|
-
### Manual Testing
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Test the hook manually
|
|
181
|
-
python3 .claude/hooks/validate-ontology-structure.py <<EOF
|
|
182
|
-
{
|
|
183
|
-
"hook_event_name": "PostToolUse",
|
|
184
|
-
"tool_name": "Write",
|
|
185
|
-
"tool_input": {
|
|
186
|
-
"file_path": "/path/to/file.md",
|
|
187
|
-
"content": "# Test content"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
EOF
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Run Test Suite
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
# Run all tests
|
|
197
|
-
./.claude/hooks/test-validate-ontology.sh
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Integration with Claude Code
|
|
201
|
-
|
|
202
|
-
The hook automatically runs when:
|
|
203
|
-
- Using the `Write` tool on files in `/one/`
|
|
204
|
-
- Using the `Edit` tool on files in `/one/`
|
|
205
|
-
- Using the `MultiEdit` tool on files in `/one/`
|
|
206
|
-
|
|
207
|
-
Files outside `/one/` are ignored and not validated.
|
|
208
|
-
|
|
209
|
-
## Benefits
|
|
210
|
-
|
|
211
|
-
1. **Enforces ontology structure** - Prevents misplaced documentation
|
|
212
|
-
2. **Maintains consistency** - All files follow kebab-case naming
|
|
213
|
-
3. **Educates developers** - Clear error messages explain the ontology
|
|
214
|
-
4. **Automated validation** - Catches errors before they're committed
|
|
215
|
-
5. **Comprehensive testing** - 14 test cases ensure reliability
|
|
216
|
-
6. **Non-intrusive** - Only validates `/one/` directory, ignores others
|
|
217
|
-
|
|
218
|
-
## Future Enhancements
|
|
219
|
-
|
|
220
|
-
Potential improvements for future iterations:
|
|
221
|
-
|
|
222
|
-
1. **Auto-fix mode** - Automatically move misplaced files to correct dimensions
|
|
223
|
-
2. **Content validation** - Deeper validation of file contents against schemas
|
|
224
|
-
3. **Integration with git hooks** - Pre-commit validation
|
|
225
|
-
4. **VS Code extension** - Real-time validation in editor
|
|
226
|
-
5. **Documentation links** - Suggest relevant ontology docs based on errors
|
|
227
|
-
|
|
228
|
-
## Files Modified
|
|
229
|
-
|
|
230
|
-
- `.claude/hooks/validate-ontology-structure.py` - Updated validation logic and error messages
|
|
231
|
-
|
|
232
|
-
## Files Created
|
|
233
|
-
|
|
234
|
-
- `.claude/hooks/test-validate-ontology.sh` - Comprehensive test suite
|
|
235
|
-
- `.claude/hooks/validate-ontology-structure-summary.md` - This summary document
|
|
236
|
-
|
|
237
|
-
## Conclusion
|
|
238
|
-
|
|
239
|
-
The ontology validation hook is now fully aligned with the 6-dimension ontology specification in `/one/knowledge/ontology.md`. It enforces proper directory structure, validates file naming conventions, and provides clear, educational error messages that help developers understand the ontology structure.
|
|
240
|
-
|
|
241
|
-
**Status: ✅ Production Ready**
|
|
242
|
-
|
|
243
|
-
All tests passing. Hook is active and validating files in `/one/` directory.
|