oneie 3.4.2 ā 3.6.0
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-director.md +902 -22
- package/.claude/agents/agent-onboard-example-output.md +600 -0
- package/.claude/agents/agent-onboard.md +576 -0
- package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
- package/.claude/commands/one.md +411 -10
- package/.claude/commands/release.md +64 -3
- package/CLAUDE.md +55 -69
- package/dist/commands/init.d.ts +5 -6
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +101 -101
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/installation-setup.d.ts +24 -1
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +85 -1
- package/dist/utils/installation-setup.js.map +1 -1
- package/dist/utils/launch-claude.d.ts +6 -0
- package/dist/utils/launch-claude.d.ts.map +1 -0
- package/dist/utils/launch-claude.js +51 -0
- package/dist/utils/launch-claude.js.map +1 -0
- package/dist/utils/validation.d.ts +48 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +73 -0
- package/dist/utils/validation.js.map +1 -0
- package/folders.yaml +1 -1
- package/one/.obsidian/app.json +8 -0
- package/one/.obsidian/appearance.json +1 -0
- package/one/.obsidian/community-plugins.json +3 -0
- package/one/.obsidian/core-plugins.json +33 -0
- package/one/.obsidian/plugins/easy-bake/main.js +361 -0
- package/one/.obsidian/plugins/easy-bake/manifest.json +11 -0
- package/one/.obsidian/plugins/easy-bake/styles.css +10 -0
- package/one/.obsidian/workspace.json +240 -0
- package/one/connections/workflow-onboarding.md +683 -0
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
- package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
- package/one/events/DEPLOYMENT.md +178 -0
- package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
- package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
- package/one/events/HANDOFF.md +313 -0
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
- package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
- package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
- package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
- package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
- package/one/events/SHOP-BUILD-STATUS.md +114 -0
- package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
- package/one/events/agent-director-enhancement-summary.md +386 -0
- package/one/events/agent-onboard-implementation-summary.md +457 -0
- package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
- package/one/events/landing-page-generator.md +458 -0
- package/one/events/onboarding-implementation-complete.md +505 -0
- package/one/events/release.md +254 -0
- package/one/events/separate-implementation-status.md +537 -0
- package/one/groups/nine-padle-contents.baked.md +1252 -0
- package/one/groups/nine-padle-contents.md +6 -0
- package/one/knowledge/100-inference-quick-reference.md +431 -0
- package/one/knowledge/agent-onboard-usage.md +612 -0
- package/one/knowledge/cli-claude-handoff.md +718 -0
- package/one/knowledge/installation-folders.md +45 -1
- package/one/knowledge/ontology-blog.yaml +31 -0
- package/one/knowledge/ontology-cheatsheet.md +591 -0
- package/one/knowledge/ontology-community.yaml +42 -0
- package/one/knowledge/ontology-core-universal.md +722 -0
- package/one/knowledge/ontology-core.yaml +50 -0
- package/one/knowledge/ontology-courses.yaml +53 -0
- package/one/knowledge/ontology-creator.md +376 -0
- package/one/knowledge/ontology-developer-guide.md +789 -0
- package/one/knowledge/ontology-education.md +920 -0
- package/one/knowledge/ontology-index.md +354 -0
- package/one/knowledge/ontology-migration-guide.md +811 -0
- package/one/knowledge/ontology-minimal.yaml +1 -1
- package/one/knowledge/ontology-portfolio.yaml +31 -0
- package/one/knowledge/ontology-quickstart.md +576 -0
- package/one/knowledge/ontology-shop.yaml +121 -0
- package/one/knowledge/ontology-tokens.yaml +32 -0
- package/one/knowledge/ontology-tutorial.md +434 -0
- package/one/knowledge/ontology-video-script.md +890 -0
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
- package/one/things/docs/ecommerce/QUICK-START.md +368 -0
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
- package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
- package/one/things/docs/ecommerce/demo.astro +309 -0
- package/one/things/plans/agent-director-100-inference-plans.md +410 -0
- package/one/things/plans/dual-website-strategy.md +612 -0
- package/one/things/plans/feature-based-sites.md +821 -0
- package/one/things/plans/multi-ontology-architecture.md +836 -0
- package/one/things/plans/onboarding.md +32 -0
- package/one/things/plans/separate.md +15 -17
- package/one/things/plans/start-new.md +738 -0
- package/one/things/templates.md +254 -0
- package/one/things/todo.md +23 -5
- package/package.json +2 -2
- package/one/things/claude/hooks/agent-hook-manager.js +0 -525
- package/one/things/claude/hooks/agent-load-balancer.js +0 -271
- package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
- package/one/things/claude/hooks/cascade-feedback.js +0 -297
- package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
- package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
- package/one/things/claude/hooks/file-organization-engine.js +0 -427
- package/one/things/claude/hooks/file-organization-monitor.js +0 -269
- package/one/things/claude/hooks/hook-config-manager.js +0 -202
- package/one/things/claude/hooks/hook-orchestrator.js +0 -662
- package/one/things/claude/hooks/hook-performance-report.js +0 -120
- package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
- package/one/things/claude/hooks/memory-optimizer.js +0 -510
- package/one/things/claude/hooks/ontology-compliance.js +0 -394
- package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
- package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
- package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
- package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
- package/one/things/claude/hooks/simple-load-balancer.js +0 -238
- package/one/things/claude/hooks/startup-optimizer.js +0 -625
- package/one/things/claude/hooks/story-scoring-system.js +0 -445
- package/one/things/claude/hooks/story-validation-engine.js +0 -473
- package/one/things/claude/hooks/structure-synchronizer.js +0 -194
- package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
- package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
- package/one/things/claude/hooks/trinity-validation-system.js +0 -392
- package/one/things/plans/organizations-to-groups.md +0 -705
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Trinity Validation System
|
|
5
|
-
* Comprehensive validation and maintenance for the .claude/.one/one trinity structure
|
|
6
|
-
* Part of Mission-1: Trinity Harmonization
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { readFileSync, existsSync, writeFileSync, readdirSync, statSync } from 'fs';
|
|
10
|
-
import { join, basename, dirname, extname, relative } from 'path';
|
|
11
|
-
import { execSync } from 'child_process';
|
|
12
|
-
|
|
13
|
-
const TRINITY_VALIDATION_CONFIG = {
|
|
14
|
-
structure: {
|
|
15
|
-
claude: {
|
|
16
|
-
path: '.claude',
|
|
17
|
-
required_dirs: ['agents', 'commands', 'hooks'],
|
|
18
|
-
optional_dirs: [],
|
|
19
|
-
file_types: ['.js', '.json', '.md'],
|
|
20
|
-
purpose: 'Claude Code Integration & Execution'
|
|
21
|
-
},
|
|
22
|
-
platform: {
|
|
23
|
-
path: '.one',
|
|
24
|
-
required_dirs: ['agents', 'workflows', 'templates', 'tasks', 'checklists', 'tools', 'data'],
|
|
25
|
-
optional_dirs: ['playbooks', 'stories', 'teams', 'missions', 'ontology', 'infrastructure', 'hooks'],
|
|
26
|
-
file_types: ['.md', '.yaml', '.yml', '.json'],
|
|
27
|
-
purpose: 'Immutable Platform Foundation'
|
|
28
|
-
},
|
|
29
|
-
user: {
|
|
30
|
-
path: 'one',
|
|
31
|
-
required_dirs: ['missions', 'stories'],
|
|
32
|
-
optional_dirs: ['playbooks', 'guides', 'prompts', 'research', 'tests', 'docs', 'architecture', 'brand', 'assets', 'data', 'archive'],
|
|
33
|
-
file_types: ['.md', '.yaml', '.yml', '.json', '.js', '.css', '.html', '.png', '.jpg', '.jpeg', '.gif', '.svg'],
|
|
34
|
-
purpose: 'Active User Workspace'
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
quality_gates: {
|
|
39
|
-
file_organization: {
|
|
40
|
-
max_misplaced_files: 0,
|
|
41
|
-
required_compliance_score: 4.0,
|
|
42
|
-
naming_convention_adherence: 0.95
|
|
43
|
-
},
|
|
44
|
-
structure_integrity: {
|
|
45
|
-
required_directories_present: 1.0,
|
|
46
|
-
directory_purpose_alignment: 1.0,
|
|
47
|
-
cross_trinity_harmony: 0.98
|
|
48
|
-
},
|
|
49
|
-
automation_health: {
|
|
50
|
-
hook_functionality: 1.0,
|
|
51
|
-
real_time_monitoring: true,
|
|
52
|
-
auto_correction_rate: 0.95
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Comprehensive Trinity Validation System
|
|
59
|
-
*/
|
|
60
|
-
class TrinityValidationSystem {
|
|
61
|
-
constructor() {
|
|
62
|
-
this.validationResults = {
|
|
63
|
-
claude: { score: 0, issues: [], files: 0 },
|
|
64
|
-
platform: { score: 0, issues: [], files: 0 },
|
|
65
|
-
user: { score: 0, issues: [], files: 0 },
|
|
66
|
-
overall: { score: 0, total_files: 0, organized_files: 0 }
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Main validation execution
|
|
72
|
-
*/
|
|
73
|
-
async validateTrinityStructure() {
|
|
74
|
-
console.log('šÆ Trinity Validation System Activated');
|
|
75
|
-
console.log('š Comprehensive validation of .claude/.one/one structure...\n');
|
|
76
|
-
|
|
77
|
-
// Validate each trinity
|
|
78
|
-
await this.validateTrinity('claude');
|
|
79
|
-
await this.validateTrinity('platform');
|
|
80
|
-
await this.validateTrinity('user');
|
|
81
|
-
|
|
82
|
-
// Cross-trinity harmony analysis
|
|
83
|
-
this.validateCrossTrinityHarmony();
|
|
84
|
-
|
|
85
|
-
// Generate comprehensive report
|
|
86
|
-
this.generateValidationReport();
|
|
87
|
-
|
|
88
|
-
return this.validationResults;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Validates individual trinity structure
|
|
93
|
-
*/
|
|
94
|
-
async validateTrinity(trinityKey) {
|
|
95
|
-
const config = TRINITY_VALIDATION_CONFIG.structure[trinityKey];
|
|
96
|
-
const trinityPath = join(process.cwd(), config.path);
|
|
97
|
-
|
|
98
|
-
console.log(`š Validating ${config.path}/ - ${config.purpose}`);
|
|
99
|
-
|
|
100
|
-
if (!existsSync(trinityPath)) {
|
|
101
|
-
this.validationResults[trinityKey].issues.push(`ā Missing trinity directory: ${config.path}/`);
|
|
102
|
-
this.validationResults[trinityKey].score = 0;
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Validate required directories
|
|
107
|
-
const missingDirs = this.validateRequiredDirectories(trinityPath, config);
|
|
108
|
-
if (missingDirs.length > 0) {
|
|
109
|
-
this.validationResults[trinityKey].issues.push(`š Missing directories: ${missingDirs.join(', ')}`);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Validate file organization
|
|
113
|
-
const orgResults = this.validateFileOrganization(trinityPath, config);
|
|
114
|
-
this.validationResults[trinityKey].files = orgResults.total_files;
|
|
115
|
-
this.validationResults[trinityKey].issues.push(...orgResults.issues);
|
|
116
|
-
|
|
117
|
-
// Calculate trinity score
|
|
118
|
-
this.validationResults[trinityKey].score = this.calculateTrinityScore(trinityKey);
|
|
119
|
-
|
|
120
|
-
console.log(`ā
${config.path}/: ${this.validationResults[trinityKey].score.toFixed(1)}/5.0 stars`);
|
|
121
|
-
console.log(`š Files: ${this.validationResults[trinityKey].files}`);
|
|
122
|
-
|
|
123
|
-
if (this.validationResults[trinityKey].issues.length > 0) {
|
|
124
|
-
console.log(`ā ļø Issues: ${this.validationResults[trinityKey].issues.length}`);
|
|
125
|
-
}
|
|
126
|
-
console.log('');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Validates required directories exist
|
|
131
|
-
*/
|
|
132
|
-
validateRequiredDirectories(trinityPath, config) {
|
|
133
|
-
const missingDirs = [];
|
|
134
|
-
|
|
135
|
-
config.required_dirs.forEach(dir => {
|
|
136
|
-
const dirPath = join(trinityPath, dir);
|
|
137
|
-
if (!existsSync(dirPath)) {
|
|
138
|
-
missingDirs.push(dir);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
return missingDirs;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Validates file organization within trinity
|
|
147
|
-
*/
|
|
148
|
-
validateFileOrganization(trinityPath, config) {
|
|
149
|
-
const results = {
|
|
150
|
-
total_files: 0,
|
|
151
|
-
organized_files: 0,
|
|
152
|
-
issues: []
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
try {
|
|
156
|
-
const items = this.getAllFiles(trinityPath);
|
|
157
|
-
results.total_files = items.length;
|
|
158
|
-
|
|
159
|
-
items.forEach(filePath => {
|
|
160
|
-
const relativePath = relative(trinityPath, filePath);
|
|
161
|
-
const ext = extname(filePath);
|
|
162
|
-
|
|
163
|
-
// Validate file type
|
|
164
|
-
if (!config.file_types.includes(ext)) {
|
|
165
|
-
results.issues.push(`š« Unexpected file type '${ext}' in ${relativePath}`);
|
|
166
|
-
} else {
|
|
167
|
-
results.organized_files++;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Validate naming convention
|
|
171
|
-
const filename = basename(filePath, ext);
|
|
172
|
-
if (!this.validateFilename(filename)) {
|
|
173
|
-
results.issues.push(`š Non-standard naming: ${relativePath}`);
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
} catch (error) {
|
|
178
|
-
results.issues.push(`ā Error scanning directory: ${error.message}`);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return results;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Gets all files recursively from directory
|
|
186
|
-
*/
|
|
187
|
-
getAllFiles(dirPath, files = []) {
|
|
188
|
-
try {
|
|
189
|
-
const items = readdirSync(dirPath);
|
|
190
|
-
|
|
191
|
-
items.forEach(item => {
|
|
192
|
-
const fullPath = join(dirPath, item);
|
|
193
|
-
const stat = statSync(fullPath);
|
|
194
|
-
|
|
195
|
-
if (stat.isDirectory()) {
|
|
196
|
-
this.getAllFiles(fullPath, files);
|
|
197
|
-
} else {
|
|
198
|
-
files.push(fullPath);
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
} catch (error) {
|
|
202
|
-
// Directory not accessible
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return files;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Validates filename against naming conventions
|
|
210
|
-
*/
|
|
211
|
-
validateFilename(filename) {
|
|
212
|
-
// Kebab-case validation
|
|
213
|
-
const kebabCase = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
214
|
-
return kebabCase.test(filename);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Validates cross-trinity harmony
|
|
219
|
-
*/
|
|
220
|
-
validateCrossTrinityHarmony() {
|
|
221
|
-
console.log('š Validating Cross-Trinity Harmony...');
|
|
222
|
-
|
|
223
|
-
// Check for consistent directory structures
|
|
224
|
-
const claudeDirs = this.getDirectories('.claude');
|
|
225
|
-
const platformDirs = this.getDirectories('.one');
|
|
226
|
-
const userDirs = this.getDirectories('one');
|
|
227
|
-
|
|
228
|
-
// Find common directories
|
|
229
|
-
const commonDirs = claudeDirs.filter(dir =>
|
|
230
|
-
platformDirs.includes(dir) || userDirs.includes(dir)
|
|
231
|
-
);
|
|
232
|
-
|
|
233
|
-
if (commonDirs.length === 0) {
|
|
234
|
-
this.validationResults.overall.issues = this.validationResults.overall.issues || [];
|
|
235
|
-
this.validationResults.overall.issues.push('ā ļø No common directory patterns found across trinity');
|
|
236
|
-
} else {
|
|
237
|
-
console.log(`ā
Common directories: ${commonDirs.join(', ')}`);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// Validate synchronized structure patterns
|
|
241
|
-
const structureScore = this.calculateStructureHarmonyScore();
|
|
242
|
-
console.log(`šÆ Structure Harmony: ${structureScore.toFixed(1)}/5.0 stars\n`);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Gets directories in a path
|
|
247
|
-
*/
|
|
248
|
-
getDirectories(path) {
|
|
249
|
-
try {
|
|
250
|
-
if (!existsSync(path)) return [];
|
|
251
|
-
|
|
252
|
-
return readdirSync(path).filter(item => {
|
|
253
|
-
const itemPath = join(path, item);
|
|
254
|
-
return statSync(itemPath).isDirectory();
|
|
255
|
-
});
|
|
256
|
-
} catch (error) {
|
|
257
|
-
return [];
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Calculates structure harmony score
|
|
263
|
-
*/
|
|
264
|
-
calculateStructureHarmonyScore() {
|
|
265
|
-
const totalIssues = Object.values(this.validationResults)
|
|
266
|
-
.reduce((sum, result) => sum + (result.issues?.length || 0), 0);
|
|
267
|
-
|
|
268
|
-
if (totalIssues === 0) return 5.0;
|
|
269
|
-
if (totalIssues <= 3) return 4.5;
|
|
270
|
-
if (totalIssues <= 6) return 4.0;
|
|
271
|
-
if (totalIssues <= 10) return 3.5;
|
|
272
|
-
return 3.0;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Calculates individual trinity score
|
|
277
|
-
*/
|
|
278
|
-
calculateTrinityScore(trinityKey) {
|
|
279
|
-
const result = this.validationResults[trinityKey];
|
|
280
|
-
const issues = result.issues.length;
|
|
281
|
-
|
|
282
|
-
if (issues === 0) return 5.0;
|
|
283
|
-
if (issues <= 2) return 4.5;
|
|
284
|
-
if (issues <= 4) return 4.0;
|
|
285
|
-
if (issues <= 6) return 3.5;
|
|
286
|
-
return 3.0;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Generates comprehensive validation report
|
|
291
|
-
*/
|
|
292
|
-
generateValidationReport() {
|
|
293
|
-
console.log('š Trinity Validation Report');
|
|
294
|
-
console.log('ā'.repeat(50));
|
|
295
|
-
|
|
296
|
-
// Trinity scores
|
|
297
|
-
Object.entries(this.validationResults).forEach(([key, result]) => {
|
|
298
|
-
if (key === 'overall') return;
|
|
299
|
-
|
|
300
|
-
const config = TRINITY_VALIDATION_CONFIG.structure[key];
|
|
301
|
-
console.log(`${config.path.padEnd(8)} ā ā${result.score.toFixed(1)} ā š${result.files.toString().padStart(3)} files ā ${config.purpose}`);
|
|
302
|
-
|
|
303
|
-
if (result.issues.length > 0) {
|
|
304
|
-
result.issues.slice(0, 3).forEach(issue => {
|
|
305
|
-
console.log(` ā ā ā ${issue}`);
|
|
306
|
-
});
|
|
307
|
-
if (result.issues.length > 3) {
|
|
308
|
-
console.log(` ā ā ā ...and ${result.issues.length - 3} more`);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
// Overall statistics
|
|
314
|
-
const totalFiles = Object.values(this.validationResults)
|
|
315
|
-
.reduce((sum, result) => sum + (result.files || 0), 0);
|
|
316
|
-
|
|
317
|
-
const avgScore = Object.entries(this.validationResults)
|
|
318
|
-
.filter(([key]) => key !== 'overall')
|
|
319
|
-
.reduce((sum, [, result]) => sum + result.score, 0) / 3;
|
|
320
|
-
|
|
321
|
-
const totalIssues = Object.values(this.validationResults)
|
|
322
|
-
.reduce((sum, result) => sum + (result.issues?.length || 0), 0);
|
|
323
|
-
|
|
324
|
-
console.log('ā'.repeat(50));
|
|
325
|
-
console.log(`š Overall Score: ā${avgScore.toFixed(1)}/5.0 stars`);
|
|
326
|
-
console.log(`š Total Files: ${totalFiles}`);
|
|
327
|
-
console.log(`šÆ Issues Found: ${totalIssues}`);
|
|
328
|
-
|
|
329
|
-
if (avgScore >= 4.0) {
|
|
330
|
-
console.log('\nš Trinity structure harmony achieved!');
|
|
331
|
-
console.log('⨠Beautiful organization maintained across all directories');
|
|
332
|
-
} else {
|
|
333
|
-
console.log('\nš§ Trinity structure needs attention');
|
|
334
|
-
console.log('š See one/docs/harmonized-structure-design.md for guidance');
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Update overall results
|
|
338
|
-
this.validationResults.overall = {
|
|
339
|
-
score: avgScore,
|
|
340
|
-
total_files: totalFiles,
|
|
341
|
-
issues_count: totalIssues,
|
|
342
|
-
harmony_achieved: avgScore >= 4.0
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Exports validation results for monitoring
|
|
348
|
-
*/
|
|
349
|
-
exportValidationResults() {
|
|
350
|
-
const reportPath = join(process.cwd(), 'one/docs/trinity-validation-report.json');
|
|
351
|
-
|
|
352
|
-
const report = {
|
|
353
|
-
timestamp: new Date().toISOString(),
|
|
354
|
-
mission: 'Mission-1: Trinity Harmonization',
|
|
355
|
-
results: this.validationResults,
|
|
356
|
-
quality_gates: TRINITY_VALIDATION_CONFIG.quality_gates,
|
|
357
|
-
next_validation: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString() // 24 hours
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
try {
|
|
361
|
-
writeFileSync(reportPath, JSON.stringify(report, null, 2));
|
|
362
|
-
console.log(`\nš Validation report saved: ${reportPath}`);
|
|
363
|
-
} catch (error) {
|
|
364
|
-
console.log(`ā ļø Could not save validation report: ${error.message}`);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
return report;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Main execution
|
|
373
|
-
*/
|
|
374
|
-
async function main() {
|
|
375
|
-
const validator = new TrinityValidationSystem();
|
|
376
|
-
const results = await validator.validateTrinityStructure();
|
|
377
|
-
const report = validator.exportValidationResults();
|
|
378
|
-
|
|
379
|
-
// Exit with appropriate code
|
|
380
|
-
if (results.overall.harmony_achieved) {
|
|
381
|
-
process.exit(0);
|
|
382
|
-
} else {
|
|
383
|
-
process.exit(1);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// Execute if called directly
|
|
388
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
389
|
-
main();
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export { TrinityValidationSystem };
|