oneie 3.6.18 โ†’ 3.6.21

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.
Files changed (58) hide show
  1. package/.claude/agents/agent-ops.md +63 -2
  2. package/.claude/commands/commit.md +95 -0
  3. package/.claude/commands/npx.md +2 -2
  4. package/.claude/commands/one.md +7 -1
  5. package/.claude/commands/push.md +113 -21
  6. package/.claude/commands/release.md +2 -2
  7. package/.claude/hooks/release-cli.sh +195 -0
  8. package/CLAUDE.md +131 -12
  9. package/README.md +778 -497
  10. package/one/groups/one.md +1 -1
  11. package/one/knowledge/architecture-frontend.md +5 -0
  12. package/one/knowledge/archived/ontology.old.md +1 -1
  13. package/one/knowledge/develop/design.md +364 -0
  14. package/one/knowledge/develop/index.md +145 -0
  15. package/one/knowledge/metadata-system.md +1 -1
  16. package/one/knowledge/ontology-engineering.md +1 -1
  17. package/one/knowledge/ontology.md +1 -1
  18. package/one/knowledge/patterns/design/index.md +160 -0
  19. package/one/knowledge/quick-start-ontology-mapping.md +773 -0
  20. package/one/knowledge/todo-template.md +100 -100
  21. package/one/knowledge/todo.md +100 -100
  22. package/one/people/anthony-o-connell.md +3 -3
  23. package/one/things/master-workflow-plan.md +2 -2
  24. package/one/things/plans/execution-strategy.md +243 -243
  25. package/one/things/plans/wave1-specialist-assignments.md +1 -1
  26. package/one/things/todo-ai.md +100 -100
  27. package/one/things/todo-assignment.md +21 -21
  28. package/one/things/todo-effects.md +100 -100
  29. package/one/things/todo-frontend-effects.md +100 -100
  30. package/one/things/todo-master-plan.md +1 -1
  31. package/one/things/todo-sequence.md +1 -1
  32. package/package.json +1 -1
  33. package/.claude/agents/NEWS-QUICKSTART.md +0 -321
  34. package/.claude/agents/NEWS-README.md +0 -353
  35. package/.claude/hooks/README-knowledge-hooks.md +0 -451
  36. package/.claude/hooks/README-root-cleanup.md +0 -200
  37. package/.claude/hooks/README.md +0 -284
  38. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  39. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  40. package/.claude/hooks/check-filenames.py +0 -177
  41. package/.claude/hooks/clean-post.py +0 -468
  42. package/.claude/hooks/clean-pre.py +0 -393
  43. package/.claude/hooks/clean-root-markdown.sh +0 -73
  44. package/.claude/hooks/done.py +0 -236
  45. package/.claude/hooks/format-hook.sh +0 -163
  46. package/.claude/hooks/hook-logger.sh +0 -173
  47. package/.claude/hooks/knowledge-post.py +0 -355
  48. package/.claude/hooks/knowledge-pre.py +0 -245
  49. package/.claude/hooks/notification-hook.sh +0 -279
  50. package/.claude/hooks/root-cleanup.py +0 -217
  51. package/.claude/hooks/security-hook.sh +0 -397
  52. package/.claude/hooks/tag-all-docs.py +0 -464
  53. package/.claude/hooks/test-validate-ontology.sh +0 -170
  54. package/.claude/hooks/todo.py +0 -368
  55. package/.claude/hooks/track-changes.sh +0 -101
  56. package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
  57. package/.claude/hooks/validate-ontology-structure.py +0 -518
  58. package/TESTING-ONBOARDING.md +0 -185
@@ -1,451 +0,0 @@
1
- # Knowledge Tagging Hooks - 6-Dimension Ontology
2
-
3
- ## Overview
4
-
5
- The knowledge tagging hooks automatically map all created/modified artifacts to the **6-dimension ontology**. This enables:
6
-
7
- - ๐Ÿ“Š Automatic ontology dimension mapping (groups, people, things, connections, events, knowledge)
8
- - ๐Ÿท๏ธ Semantic labeling aligned with Reality-as-DSL architecture
9
- - ๐Ÿ” RAG-ready artifact indexing for AI agent learning
10
- - ๐Ÿ“ˆ Knowledge tracking per inference (Cycle 1-100)
11
- - ๐Ÿง  Complete audit trail of created knowledge
12
- - ๐ŸŽฏ Guided documentation paths for each dimension
13
-
14
- ## The 6-Dimension Ontology
15
-
16
- **Version:** 3.0.0 (Reality as DSL)
17
-
18
- Every artifact created in ONE Platform maps to one of these 6 dimensions:
19
-
20
- ```
21
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
22
- โ”‚ 1. GROUPS โ”‚
23
- โ”‚ Multi-tenant isolation with hierarchical nesting โ”‚
24
- โ”‚ โ†’ /one/groups/ or /<installation-name>/ โ”‚
25
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
26
- โ†“
27
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
28
- โ”‚ 2. PEOPLE โ”‚
29
- โ”‚ Authorization & governance (roles, permissions) โ”‚
30
- โ”‚ โ†’ /one/people/ โ”‚
31
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
32
- โ†“
33
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
34
- โ”‚ 3. THINGS โ”‚
35
- โ”‚ All entities (66+ types) - users, products, courses, agents โ”‚
36
- โ”‚ โ†’ /one/things/, /backend/, /web/ โ”‚
37
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
38
- โ†“
39
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
40
- โ”‚ 4. CONNECTIONS โ”‚
41
- โ”‚ All relationships (25+ types) - owns, purchased, enrolled_in โ”‚
42
- โ”‚ โ†’ /one/connections/ โ”‚
43
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
44
- โ†“
45
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
46
- โ”‚ 5. EVENTS โ”‚
47
- โ”‚ All actions & state changes - created, updated, purchased โ”‚
48
- โ”‚ โ†’ /one/events/ โ”‚
49
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
50
- โ†“
51
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
52
- โ”‚ 6. KNOWLEDGE โ”‚
53
- โ”‚ Labels, embeddings, vectors powering RAG & semantic search โ”‚
54
- โ”‚ โ†’ /one/knowledge/, /test/ โ”‚
55
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
56
- ```
57
-
58
- **Reference:** `/one/knowledge/ontology.md` (Complete specification)
59
-
60
- ## How It Works
61
-
62
- ### Pre-Hook: `knowledge-pre.py`
63
-
64
- Runs **before** Write/Edit operations to validate and guide ontology mapping:
65
-
66
- 1. โœ… Maps artifact to correct ontology dimension
67
- 2. ๐Ÿ—บ๏ธ Shows documentation paths for the dimension
68
- 3. ๐Ÿท๏ธ Prepares semantic labels (dimension:*, artifact:*, etc.)
69
- 4. ๐Ÿ“‹ Displays ontology structure with highlighted dimension
70
- 5. โš ๏ธ Skips temporary and generated files
71
-
72
- **Example Output:**
73
- ```
74
- ๐Ÿ“š Knowledge Pre-Hook - 6-Dimension Ontology
75
- Artifact: EntityList.tsx
76
- Type: code
77
- Dimension: THINGS
78
- Docs: /one/things/ or /one/knowledge/ontology.md#things
79
- Labels: dimension:things, components, ui, frontend
80
- โ†’ Will be tagged in knowledge dimension after creation
81
-
82
- 6-Dimension Ontology:
83
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
84
- โ”‚ 1. GROUPS - Multi-tenant โ”‚
85
- โ”‚ 2. PEOPLE - Authorization โ”‚
86
- โ”‚ 3. THINGS - Entities โ”‚ โ† HERE
87
- โ”‚ 4. CONNECTIONS - Relationships โ”‚
88
- โ”‚ 5. EVENTS - Actions โ”‚
89
- โ”‚ 6. KNOWLEDGE - Labels & embeddings โ”‚
90
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
91
- ```
92
-
93
- ### Post-Hook: `knowledge-post.py`
94
-
95
- Runs **after** Write/Edit operations to create knowledge entries:
96
-
97
- 1. ๐Ÿ“ Creates knowledge entry with ontology dimension mapping
98
- 2. ๐Ÿท๏ธ Tags with semantic labels (dimension:*, artifact:*, technology:*, etc.)
99
- 3. ๐Ÿ”— Links to current inference context (Cycle 1-100)
100
- 4. ๐Ÿ’พ Saves to daily knowledge log (~/.claude/knowledge-log/)
101
- 5. ๐Ÿ” Generates content hash for versioning
102
- 6. ๐Ÿ“Š Tracks ontology version (3.0.0)
103
-
104
- **Example Output:**
105
- ```
106
- โœจ Knowledge Tagged - 6-Dimension Ontology
107
- Artifact: EntityList.tsx
108
- Type: code
109
- Dimension: THINGS
110
- Labels: dimension:things, components, ui, frontend
111
- Inference: 22/100
112
- Hash: a3f9d2c1b4e5f6a7
113
- โ†’ Logged to: knowledge-2025-11-03.jsonl
114
-
115
- 6-Dimension Ontology:
116
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
117
- โ”‚ 1. GROUPS - Multi-tenant โ”‚
118
- โ”‚ 2. PEOPLE - Authorization โ”‚
119
- โ”‚ 3. THINGS - Entities โ”‚ โœ“ Captured
120
- โ”‚ 4. CONNECTIONS - Relationships โ”‚
121
- โ”‚ 5. EVENTS - Actions โ”‚
122
- โ”‚ 6. KNOWLEDGE - Labels & embeddings โ”‚
123
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
124
- ```
125
-
126
- ## Knowledge Entry Structure
127
-
128
- Each knowledge entry is saved as JSON with ontology dimension mapping:
129
-
130
- ```json
131
- {
132
- "type": "knowledge_item",
133
- "artifact_type": "code",
134
- "ontology_dimension": "things",
135
- "file_path": "/Users/toc/Server/ONE/web/src/components/EntityList.tsx",
136
- "file_name": "EntityList.tsx",
137
- "labels": [
138
- "dimension:things",
139
- "components",
140
- "ui",
141
- "frontend",
142
- "artifact:code"
143
- ],
144
- "content_hash": "a3f9d2c1b4e5f6a7",
145
- "created_at": "2025-11-03T21:30:45.123456",
146
- "inference_number": 22,
147
- "feature": "Entity Management",
148
- "organization": "Default Org",
149
- "created_by_role": "platform_owner",
150
- "content_preview": "import { useQuery } from 'convex/react'...",
151
- "metadata": {
152
- "file_size": 1234,
153
- "directory": "/Users/toc/Server/ONE/web/src/components",
154
- "extension": ".tsx",
155
- "ontology_version": "3.0.0"
156
- }
157
- }
158
- ```
159
-
160
- ## Ontology Dimension Mapping
161
-
162
- The hooks automatically map file paths to ontology dimensions:
163
-
164
- | Dimension | File Paths | Labels |
165
- |-----------|-----------|--------|
166
- | **GROUPS** | `/one/groups/`, `/<installation>/`, `/groups/` | `dimension:groups`, `multi-tenancy`, `isolation` |
167
- | **PEOPLE** | `/one/people/` | `dimension:people`, `authorization`, `governance`, `roles` |
168
- | **THINGS** | `/one/things/`, `/backend/`, `/web/` | `dimension:things`, `entities`, `schema`, `mutations`, `queries` |
169
- | **CONNECTIONS** | `/one/connections/` | `dimension:connections`, `relationships`, `patterns` |
170
- | **EVENTS** | `/one/events/` | `dimension:events`, `actions`, `audit-trail` |
171
- | **KNOWLEDGE** | `/one/knowledge/`, `/test/` | `dimension:knowledge`, `documentation`, `patterns`, `testing` |
172
-
173
- ## Semantic Label Taxonomy
174
-
175
- Labels follow ontology governance prefixes:
176
-
177
- - **dimension:*** - Ontology dimension (groups, people, things, connections, events, knowledge)
178
- - **artifact:*** - Artifact type (code, documentation, test, config, design)
179
- - **technology:*** - Technology stack (react, convex, astro, typescript)
180
- - **pattern:*** - Implementation pattern (crud, event-logging, service)
181
- - **topic:*** - Domain topic (education, commerce, finance)
182
-
183
- **Example Labels:**
184
- - `dimension:things` - Maps to THINGS dimension
185
- - `artifact:code` - TypeScript/JavaScript code
186
- - `technology:react` - React component
187
- - `pattern:crud` - CRUD operations pattern
188
- - `topic:education` - Education domain
189
-
190
- ## Artifact Types
191
-
192
- The hooks recognize 5 artifact types:
193
-
194
- | Type | Extensions | Labels |
195
- |------|-----------|--------|
196
- | **code** | .py, .ts, .tsx, .js, .jsx, .astro, .json, .yaml | `artifact:code` |
197
- | **documentation** | .md, .mdx, .txt | `artifact:documentation` |
198
- | **test** | .test.ts, .spec.ts, etc. | `artifact:test` |
199
- | **config** | .json, .yaml, .yml, .toml, .ini | `artifact:config` |
200
- | **design** | .fig, .sketch, .svg, .png, .jpg | `artifact:design` |
201
-
202
- ## Smart Path Mapping
203
-
204
- Labels are automatically generated based on file path and ontology dimension:
205
-
206
- | Path Pattern | Dimension | Auto Labels |
207
- |-------------|-----------|-------------|
208
- | `/one/groups` | GROUPS | `dimension:groups`, `ontology`, `multi-tenancy` |
209
- | `/one/people` | PEOPLE | `dimension:people`, `ontology`, `authorization`, `governance` |
210
- | `/one/things` | THINGS | `dimension:things`, `ontology`, `entities`, `specifications` |
211
- | `/backend/convex/schema` | THINGS | `dimension:things`, `schema`, `entities`, `backend` |
212
- | `/backend/convex/mutations` | THINGS | `dimension:things`, `mutations`, `write-operations` |
213
- | `/backend/convex/queries` | THINGS | `dimension:things`, `queries`, `read-operations` |
214
- | `/backend/convex/services` | THINGS | `dimension:things`, `services`, `business-logic` |
215
- | `/web/src/components` | THINGS | `dimension:things`, `components`, `ui`, `frontend` |
216
- | `/web/src/pages` | THINGS | `dimension:things`, `pages`, `routing`, `frontend` |
217
- | `/one/connections` | CONNECTIONS | `dimension:connections`, `ontology`, `relationships` |
218
- | `/one/events` | EVENTS | `dimension:events`, `ontology`, `actions`, `audit-trail` |
219
- | `/one/knowledge` | KNOWLEDGE | `dimension:knowledge`, `ontology`, `documentation` |
220
- | `/test` | KNOWLEDGE | `dimension:knowledge`, `testing`, `quality`, `validation` |
221
-
222
- ## Installation Folders (Multi-Tenancy)
223
-
224
- Installation-specific artifacts map to the GROUPS dimension:
225
-
226
- | Path Pattern | Dimension | Labels |
227
- |-------------|-----------|--------|
228
- | `/<installation-name>/` | GROUPS | `dimension:groups`, `installation`, `organization` |
229
- | `/<installation>/groups/<group-slug>/` | GROUPS | `dimension:groups`, `group-specific`, `team` |
230
-
231
- **Example:** `/acme/knowledge/brand-guide.md` โ†’ `dimension:groups`, `installation`, `organization`
232
-
233
- ## Knowledge Logs
234
-
235
- Knowledge entries are saved to `~/.claude/knowledge-log/` as daily JSONL files:
236
-
237
- ```
238
- ~/.claude/knowledge-log/
239
- โ”œโ”€โ”€ knowledge-2025-11-03.jsonl
240
- โ”œโ”€โ”€ knowledge-2025-11-02.jsonl
241
- โ””โ”€โ”€ knowledge-2025-11-01.jsonl
242
- ```
243
-
244
- Each line is a complete JSON knowledge entry. This format enables:
245
-
246
- - ๐Ÿ“Š Easy aggregation and analysis
247
- - ๐Ÿ” Fast searching with grep/jq
248
- - ๐Ÿ“ˆ Knowledge growth tracking per dimension
249
- - ๐Ÿง  RAG corpus building for AI agents
250
- - ๐ŸŽฏ Ontology dimension coverage metrics
251
-
252
- ## Inference Context Integration
253
-
254
- The hooks integrate with the inference tracking system:
255
-
256
- - ๐Ÿ“ Current inference number (1-100)
257
- - ๐ŸŽฏ Feature being implemented
258
- - ๐Ÿข Organization context
259
- - ๐Ÿ‘ค Person role (platform_owner, org_owner, etc.)
260
-
261
- **State File:** `.claude/state/inference.json`
262
-
263
- This links every knowledge artifact back to:
264
- 1. The inference that created it (1-100)
265
- 2. The feature being implemented
266
- 3. The organization context
267
- 4. The person role (authorization dimension)
268
-
269
- ## Filtering Rules
270
-
271
- The hooks **skip** tagging for:
272
-
273
- - โŒ Temporary files (`/tmp/`, `/.temp/`)
274
- - โŒ Generated files (`/_generated/`, `/node_modules/`)
275
- - โŒ Non-recognized artifact types
276
- - โŒ Non-Write/Edit operations (Read, Bash, etc.)
277
-
278
- ## Usage Example
279
-
280
- When you create a new component:
281
-
282
- ```typescript
283
- // Write: web/src/components/TokenBalance.tsx
284
- import { useQuery } from 'convex/react';
285
- export function TokenBalance({ userId }) { ... }
286
- ```
287
-
288
- **Pre-Hook Output:**
289
- ```
290
- ๐Ÿ“š Knowledge Pre-Hook - 6-Dimension Ontology
291
- Artifact: TokenBalance.tsx
292
- Type: code
293
- Dimension: THINGS
294
- Docs: /one/things/ or /one/knowledge/ontology.md#things
295
- Labels: dimension:things, components, ui, frontend
296
- โ†’ Will be tagged in knowledge dimension after creation
297
-
298
- 6-Dimension Ontology:
299
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
300
- โ”‚ 1. GROUPS - Multi-tenant โ”‚
301
- โ”‚ 2. PEOPLE - Authorization โ”‚
302
- โ”‚ 3. THINGS - Entities โ”‚ โ† HERE
303
- โ”‚ 4. CONNECTIONS - Relationships โ”‚
304
- โ”‚ 5. EVENTS - Actions โ”‚
305
- โ”‚ 6. KNOWLEDGE - Labels & embeddings โ”‚
306
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
307
- ```
308
-
309
- **Post-Hook Output:**
310
- ```
311
- โœจ Knowledge Tagged - 6-Dimension Ontology
312
- Artifact: TokenBalance.tsx
313
- Type: code
314
- Dimension: THINGS
315
- Labels: dimension:things, components, ui, frontend
316
- Inference: 22/100
317
- Hash: b8c3d4e5f6a7b8c9
318
- โ†’ Logged to: knowledge-2025-11-03.jsonl
319
-
320
- 6-Dimension Ontology:
321
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
322
- โ”‚ 1. GROUPS - Multi-tenant โ”‚
323
- โ”‚ 2. PEOPLE - Authorization โ”‚
324
- โ”‚ 3. THINGS - Entities โ”‚ โœ“ Captured
325
- โ”‚ 4. CONNECTIONS - Relationships โ”‚
326
- โ”‚ 5. EVENTS - Actions โ”‚
327
- โ”‚ 6. KNOWLEDGE - Labels & embeddings โ”‚
328
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
329
- ```
330
-
331
- ## Querying Knowledge Logs
332
-
333
- Use `jq` to query knowledge logs by dimension:
334
-
335
- ```bash
336
- # All artifacts created today
337
- cat ~/.claude/knowledge-log/knowledge-$(date +%Y-%m-%d).jsonl | jq .
338
-
339
- # All THINGS dimension artifacts
340
- cat ~/.claude/knowledge-log/*.jsonl | jq 'select(.ontology_dimension == "things")'
341
-
342
- # All GROUPS dimension artifacts (multi-tenancy)
343
- cat ~/.claude/knowledge-log/*.jsonl | jq 'select(.ontology_dimension == "groups")'
344
-
345
- # All code artifacts
346
- cat ~/.claude/knowledge-log/*.jsonl | jq 'select(.artifact_type == "code")'
347
-
348
- # All artifacts for inference 22
349
- cat ~/.claude/knowledge-log/*.jsonl | jq 'select(.inference_number == 22)'
350
-
351
- # All frontend components (THINGS dimension)
352
- cat ~/.claude/knowledge-log/*.jsonl | jq 'select(.labels | contains(["dimension:things", "components", "frontend"]))'
353
-
354
- # Count by ontology dimension
355
- cat ~/.claude/knowledge-log/*.jsonl | jq -r '.ontology_dimension' | sort | uniq -c
356
-
357
- # Ontology coverage (which dimensions have artifacts)
358
- cat ~/.claude/knowledge-log/*.jsonl | jq -r '.ontology_dimension' | sort | uniq
359
- ```
360
-
361
- ## Integration with 6-Dimension Ontology
362
-
363
- These hooks implement **Dimension 6: Knowledge** while mapping all artifacts to their correct dimension:
364
-
365
- ```
366
- 1. GROUPS โ†’ Multi-tenant isolation (installation folders)
367
- 2. PEOPLE โ†’ Authorization & roles (who can do what)
368
- 3. THINGS โ†’ Entities (backend, frontend, schema)
369
- 4. CONNECTIONS โ†’ Relationships (how things relate)
370
- 5. EVENTS โ†’ Actions (what happened when)
371
- 6. KNOWLEDGE โ†’ ๐ŸŸข Labels + embeddings + vectors (YOU ARE HERE)
372
- ```
373
-
374
- Every artifact created is:
375
- 1. โœ… Mapped to correct **ontology dimension** (1-6)
376
- 2. ๐Ÿท๏ธ Tagged with **semantic labels** (dimension:*, artifact:*, etc.)
377
- 3. ๐Ÿ”— Linked to **inference context** (Cycle 1-100)
378
- 4. ๐Ÿ“Š Indexed for **RAG search** (embeddings ready)
379
- 5. ๐ŸŽฏ Guided to **dimension docs** (ontology alignment)
380
-
381
- ## Benefits
382
-
383
- - **98% AI code generation accuracy** - Agents learn from ontology-aligned knowledge
384
- - **Pattern convergence** - All features map to same 6 dimensions
385
- - **Semantic search** - Find similar implementations by dimension and labels
386
- - **Ontology governance** - Ensure all artifacts align with reality model
387
- - **Knowledge compounding** - Each feature makes the next more accurate
388
-
389
- ## Future Enhancements
390
-
391
- Planned improvements:
392
-
393
- - ๐Ÿง  Auto-generate embeddings with OpenAI/Anthropic
394
- - ๐Ÿ” Vector search across all dimensions
395
- - ๐Ÿ“Š Knowledge dashboard visualization by dimension
396
- - ๐Ÿค– RAG-powered code search by ontology dimension
397
- - ๐Ÿ“ˆ Ontology coverage metrics (which dimensions need work)
398
- - ๐Ÿ”— Link artifacts to related things via thingKnowledge junction
399
- - ๐ŸŽฏ Dimension-specific documentation generation
400
-
401
- ## Troubleshooting
402
-
403
- ### Hooks not running?
404
-
405
- Check that hooks are executable:
406
- ```bash
407
- chmod +x .claude/hooks/knowledge-*.py
408
- ```
409
-
410
- ### Knowledge logs not created?
411
-
412
- Ensure directory exists:
413
- ```bash
414
- mkdir -p ~/.claude/knowledge-log
415
- ```
416
-
417
- ### Want to test hooks manually?
418
-
419
- ```bash
420
- # Test pre-hook
421
- echo '{"hook_event_name":"PreToolUse","tool_name":"Write","tool_input":{"file_path":"/Users/toc/Server/ONE/web/src/components/Test.tsx"}}' | python3 .claude/hooks/knowledge-pre.py
422
-
423
- # Test post-hook
424
- echo '{"hook_event_name":"PostToolUse","tool_name":"Write","tool_input":{"file_path":"/Users/toc/Server/ONE/web/src/components/Test.tsx","content":"test content"}}' | python3 .claude/hooks/knowledge-post.py
425
- ```
426
-
427
- ### Want to disable temporarily?
428
-
429
- Remove from `.claude/settings.local.json`:
430
- ```json
431
- // Remove these blocks
432
- {
433
- "type": "command",
434
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/knowledge-pre.py",
435
- "timeout": 5
436
- }
437
- ```
438
-
439
- ## See Also
440
-
441
- - **`validate-ontology-structure.py`**: Validates 6-dimension ontology structure
442
- - **`todo.py`**: Inference context tracking (Cycle 1-100)
443
- - **`done.py`**: Marks inferences complete
444
- - **`/one/knowledge/ontology.md`**: Complete 6-dimension ontology spec (Version 3.0.0)
445
- - **`/one/knowledge/todo.md`**: 100-inference execution sequence
446
-
447
- ---
448
-
449
- **Built with clarity, simplicity, and infinite scale in mind.**
450
-
451
- The 6-dimension ontology models reality itself. These hooks ensure every artifact aligns with that reality.
@@ -1,200 +0,0 @@
1
- # Root Cleanup Hook - 6-Dimension Ontology Alignment
2
-
3
- **Purpose:** Automatically moves misplaced documentation files from the root directory to the appropriate `/one/<dimension>/` directory based on the 6-dimension ontology.
4
-
5
- ## 6-Dimension Ontology
6
-
7
- The ONE platform organizes all documentation and data according to six fundamental dimensions:
8
-
9
- 1. **groups** - Hierarchical containers (organizations, teams, communities)
10
- 2. **people** - Authorization & governance (roles, users, governance)
11
- 3. **things** - Entities (specs, plans, components, agents)
12
- 4. **connections** - Relationships (protocols, workflows, integrations)
13
- 5. **events** - Actions & state changes (deployments, releases, reports)
14
- 6. **knowledge** - Labels & learning (architecture, patterns, rules, guides)
15
-
16
- ## Approved Root Files
17
-
18
- Only these files are allowed to remain in the root directory:
19
-
20
- - `README.md` - Platform overview and quick start
21
- - `LICENSE.md` - Legal terms and conditions
22
- - `SECURITY.md` - Security policy and vulnerability reporting
23
- - `CLAUDE.md` - Claude Code instructions
24
- - `AGENTS.md` - AI agent coordination and rules
25
-
26
- All other markdown and text files will be moved to appropriate dimension directories.
27
-
28
- ## Classification Logic
29
-
30
- The hook uses intelligent pattern matching to classify files:
31
-
32
- ### Groups Dimension
33
- **Keywords:** group, organization, org-, team, community, hierarchy
34
- **Examples:** `team-structure.md`, `organization-chart.md`
35
-
36
- ### People Dimension
37
- **Keywords:** role, user, people, governance, authorization, auth, permission
38
- **Examples:** `user-roles.md`, `governance-model.md`
39
-
40
- ### Things Dimension
41
- **Keywords:** spec, plan, component, agent, feature, implementation, design, blueprint
42
- **Examples:** `feature-spec.md`, `agent-clean.md`, `component-design.md`
43
-
44
- ### Connections Dimension
45
- **Keywords:** protocol, workflow, integration, connection, api, sync, communication
46
- **Examples:** `api-integration.md`, `workflow-automation.md`
47
-
48
- ### Events Dimension
49
- **Keywords:** deploy, release, report, audit, summary, event, log, history, status
50
- **Examples:** `deployment-report.md`, `audit-summary.md`, `release-notes.md`
51
-
52
- ### Knowledge Dimension
53
- **Keywords:** guide, pattern, rule, architecture, knowledge, best-practice, convention
54
- **Examples:** `architecture-guide.md`, `best-practices.md`, `patterns.md`
55
-
56
- **Default:** Files that don't match any pattern are moved to `events/` as general reports.
57
-
58
- ## Usage
59
-
60
- ### Manual Execution
61
- ```bash
62
- python3 .claude/hooks/root-cleanup.py
63
- ```
64
-
65
- ### Automatic Execution
66
- The hook runs automatically:
67
- - When triggered by Claude Code workflows
68
- - During release processes
69
- - As part of git pre-commit hooks (if configured)
70
-
71
- ## Features
72
-
73
- ### 1. Intelligent Classification
74
- Uses filename pattern matching and content preview (first 500 chars) to determine the best dimension for each file.
75
-
76
- ### 2. Duplicate Handling
77
- If a file with the same name already exists in the target directory, the hook appends a numeric suffix (`_1`, `_2`, etc.) to avoid conflicts.
78
-
79
- ### 3. Installation Folder Protection
80
- The hook automatically ignores installation-specific folders:
81
- - Standard folders: `web/`, `backend/`, `apps/`, `cli/`, `scripts/`, `node_modules/`
82
- - Installation folders: `one-inc/`, `nine-padel/`, `onei-ie/`, `one.ie/`
83
-
84
- ### 4. Detailed Reporting
85
- After execution, the hook provides:
86
- - Count of files moved per dimension
87
- - Reason for each classification
88
- - List of approved files kept in root
89
- - Summary of the 6-dimension structure
90
-
91
- ## Example Output
92
-
93
- ```
94
- ======================================================================
95
- ๐Ÿงน ROOT CLEANUP - 6-Dimension Ontology Alignment
96
- ======================================================================
97
-
98
- โœ… Moved 8 files to dimension directories:
99
-
100
- ๐Ÿ“ /one/things/ (4 files)
101
- โ€ข ALIGNMENT_AUDIT_QUALITY_AGENT.md
102
- โ””โ”€ Thing/entity specification
103
- โ€ข IMPLEMENTATION_STATUS.md
104
- โ””โ”€ Thing/entity specification
105
-
106
- ๐Ÿ“ /one/events/ (4 files)
107
- โ€ข ALIGNMENT_SUMMARY.md
108
- โ””โ”€ Event/report content
109
- โ€ข AUDIT-ONTOLOGY-ALIGNMENT.md
110
- โ””โ”€ Event/report content
111
-
112
- โœ… Kept 5 essential files in root:
113
- โ€ข AGENTS.md
114
- โ€ข CLAUDE.md
115
- โ€ข LICENSE.md
116
- โ€ข README.md
117
- โ€ข SECURITY.md
118
-
119
- ======================================================================
120
- ๐Ÿ“– Approved root files: README.md, LICENSE.md, SECURITY.md,
121
- CLAUDE.md, AGENTS.md
122
-
123
- ๐Ÿ“ 6 Dimensions: groups, people, things, connections, events, knowledge
124
- ======================================================================
125
- ```
126
-
127
- ## Testing
128
-
129
- The hook includes comprehensive classification tests:
130
-
131
- ```bash
132
- # Test classification logic
133
- python3 -c "
134
- exec(open('.claude/hooks/root-cleanup.py').read())
135
- test_files = [
136
- ('team-structure.md', 'groups'),
137
- ('user-roles.md', 'people'),
138
- ('feature-spec.md', 'things'),
139
- ('api-integration.md', 'connections'),
140
- ('deployment-report.md', 'events'),
141
- ('architecture-guide.md', 'knowledge'),
142
- ]
143
- for filename, expected in test_files:
144
- dim, reason = classify_file(filename)
145
- print(f'{filename} โ†’ {dim} (expected: {expected})')
146
- "
147
- ```
148
-
149
- ## Benefits
150
-
151
- 1. **Consistent Organization** - All documentation follows the 6-dimension ontology
152
- 2. **Clean Root** - Only essential files remain in root directory
153
- 3. **Automatic Classification** - No manual sorting required
154
- 4. **Safe Operations** - Protects approved files and installation folders
155
- 5. **Clear Reporting** - Understand what was moved and why
156
- 6. **Ontology Compliance** - Enforces architectural standards
157
-
158
- ## Maintenance
159
-
160
- ### Adding New Keywords
161
- Edit the `classify_file()` function to add new classification patterns:
162
-
163
- ```python
164
- # Add new keywords for a dimension
165
- if any(word in lower for word in ["existing", "keywords", "new_keyword"]):
166
- return ("dimension", "Reason for classification")
167
- ```
168
-
169
- ### Updating Approved Files
170
- Modify the `ALLOWED_ROOT_FILES` set:
171
-
172
- ```python
173
- ALLOWED_ROOT_FILES = {
174
- "README.md",
175
- "LICENSE.md",
176
- # Add new approved files here
177
- }
178
- ```
179
-
180
- ### Adding Installation Folders
181
- Update the `INSTALLATION_FOLDERS` set:
182
-
183
- ```python
184
- INSTALLATION_FOLDERS = {
185
- "web", "backend",
186
- # Add new installation folders here
187
- }
188
- ```
189
-
190
- ## Related Documentation
191
-
192
- - `/one/knowledge/ontology.md` - Complete 6-dimension ontology specification
193
- - `CLAUDE.md` - Root directory file policy
194
- - `.claude/hooks/` - Other automation hooks
195
-
196
- ---
197
-
198
- **Version:** 2.0.0 (6-Dimension Aligned)
199
- **Last Updated:** 2025-11-03
200
- **Maintainer:** Clean Agent