Repository navigation
Expand file tree
/
Copy pathschema.yaml
More file actions
186 lines (148 loc) · 5.14 KB
/
Copy pathschema.yaml
File metadata and controls
186 lines (148 loc) · 5.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Repository Schema Definition
# This file defines the SCAFFOLD frontmatter and tag requirements (project-agnostic)
# For PROJECT-SPECIFIC tag rules, see project_config/tag_rules.yaml
# Janitor reads both files to validate repository health
# Python Code Files (.py in code/)
python:
# Python files use custom markdown format (not YAML frontmatter)
# YAML frontmatter can't work because it must be first line, but Python requires """ first
template: |
"""
# Module Name
**File Tags**: #type/code-file
**Inheritable Tags**: #domain/* #layer/* #pattern/*
## Purpose
Brief description of the module
## Related Documentation
- Concept: [[../obsidian/concept-file|Display]]
## Dependencies
- [[other-file.py|Display]]
"""
required_tags:
- "type/code-file"
# Two separate tag lines in Python docstrings:
# - "File Tags:" - Apply only to the .py file itself (not inherited)
# - "Inheritable Tags:" - Inherited by all AST cache nodes for functions/classes
---
# Markdown Concept Files (.md in obsidian/)
markdown-concept:
template: |
---
tags:
- type/concept
- domain/*
- layer/*
---
# Concept Name
Description of the concept...
required_tags:
- "type/concept"
---
# Markdown Pattern Files (.md in obsidian/)
markdown-pattern:
template: |
---
tags:
- type/pattern
- category/*
---
# Pattern Name
Description of the pattern...
required_tags:
- "type/pattern"
---
# Index Files (README.md, CLAUDE.md, etc.)
markdown-index:
template: |
---
tags:
- type/index
---
# Index Title
Content...
required_tags:
- "type/index"
---
# AST Cache Files (.ast.md in ast-cache/)
ast-cache:
template: |
---
tags:
- type/ast-node
- ast-type/function
source_file: ../../../code/file.py
block_marker: ^function-name
object_type: function
---
# Object Name
**Source**: [[../../../code/file.py#^marker|Source]]
required_tags:
- "type/ast-node"
---
# Auto-Generated Repository Index Files
markdown-auto-generated:
template: |
---
tags:
- type/index
- purpose/project-state # or purpose/tag-inventory
- auto-generated
---
# File Title
**Auto-generated - do not edit manually**
**Last Updated**: YYYY-MM-DD HH:MM:SS
Content...
required_tags:
- "type/index"
- "auto-generated"
---
# Tag Hierarchy Guidelines (SCAFFOLD DEFAULTS)
# These are recommendations for subdividing tags as the codebase grows
# Add project-specific tags in project_config/tag_rules.yaml
tag-hierarchies:
# Domain tags - what area of functionality
domain:
mathematics:
- "domain/mathematics" # Parent tag (always include)
- "domain/mathematics/arithmetic" # Basic operations: +, -, *, /, !
- "domain/mathematics/trigonometry" # Trig functions: sin, cos, tan, asin, acos, atan
- "domain/mathematics/exponential" # Exp/log: exp, ln, log10, log, power, sqrt, cbrt
testing:
- "domain/testing" # Parent tag (always include)
- "domain/testing/unit" # Unit tests for individual functions/classes
- "domain/testing/integration" # Integration tests for component interaction
ui:
- "domain/ui" # User interface code
automation:
- "domain/automation" # Infrastructure and build scripts
# Layer tags - architectural layer
layer:
- "layer/core" # Core business logic / domain layer
- "layer/domain" # Domain-specific implementations
- "layer/interface" # User-facing interfaces
- "layer/application" # Application orchestration
- "layer/infrastructure" # Build, deployment, tooling
- "layer/test" # Test code
# Pattern tags - design patterns in use
pattern:
strategy:
- "pattern/strategy" # Parent tag (always include)
- "pattern/strategy/function-registry" # Dictionary-based function lookup
- "pattern/strategy/delegation" # Delegating to other components
# Category tags - cross-cutting concerns
category:
- "category/unit-test" # Unit testing
- "category/code-generation" # Code generation tools
- "category/indexing" # Indexing and cataloging
- "category/analytics" # Metrics and analysis
- "category/validation" # Validation and health checks
- "category/orchestration" # Workflow orchestration
- "category/best-practices" # Best practice documentation
- "category/behavioral" # Behavioral design patterns
- "category/solid-principles" # SOLID principles
# Tagging Best Practices:
# 1. Always include parent tags when using hierarchical tags
# Example: #domain/mathematics #domain/mathematics/arithmetic
# 2. Use hierarchical tags to enable both broad and narrow searches
# 3. When a tag category reaches 15+ files, consider subdivision
# 4. AST cache files inherit all tags from their source files