clckernel 1.2.19 → 2.0.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.
Files changed (78) hide show
  1. package/.agents/skills/clckernel_cli/SKILL.md +23 -6
  2. package/.agents/skills/clckernel_cli/reference/audit.md +13 -3
  3. package/.agents/skills/clckernel_cli/reference/commit.md +1 -1
  4. package/.agents/skills/clckernel_cli/reference/doctor.md +5 -3
  5. package/.agents/skills/clckernel_cli/reference/feature.md +3 -3
  6. package/.agents/skills/clckernel_cli/reference/guard.md +48 -12
  7. package/.agents/skills/clckernel_cli/reference/phase.md +6 -3
  8. package/.agents/skills/clckernel_cli/reference/start.md +14 -4
  9. package/.agents/skills/clckernel_cli/reference/test.md +1 -1
  10. package/.agents/skills/clckernel_cli/reference/update.md +19 -19
  11. package/CHANGELOG.md +244 -0
  12. package/LICENSE +21 -0
  13. package/README.es.md +280 -51
  14. package/README.md +274 -50
  15. package/bin/cli.js +8 -0
  16. package/package.json +12 -2
  17. package/src/adapters/agent-os.js +161 -84
  18. package/src/adapters/astro.js +8 -6
  19. package/src/adapters/base.js +23 -38
  20. package/src/adapters/django.js +14 -13
  21. package/src/adapters/fastapi.js +16 -15
  22. package/src/adapters/go.js +11 -9
  23. package/src/adapters/laravel.js +12 -10
  24. package/src/adapters/nextjs.js +7 -5
  25. package/src/adapters/rails.js +13 -11
  26. package/src/adapters/rust.js +11 -9
  27. package/src/catalog.js +58 -49
  28. package/src/config.js +38 -240
  29. package/src/detector.js +243 -44
  30. package/src/doctor.js +18 -9
  31. package/src/generator.js +734 -302
  32. package/src/gitignore.js +60 -14
  33. package/src/index.js +257 -18
  34. package/src/io.js +409 -0
  35. package/src/known-hashes.json +309 -0
  36. package/src/onboarding.js +15 -0
  37. package/src/technologies/detector.js +1 -1
  38. package/src/technologies/guards/_shared.js +1 -1
  39. package/src/ui.js +233 -40
  40. package/src/updater.js +271 -38
  41. package/tools/_changes.js +279 -0
  42. package/tools/_changes.py +233 -0
  43. package/tools/_config.js +294 -0
  44. package/tools/_config.py +271 -0
  45. package/tools/_yaml.py +489 -0
  46. package/tools/audit.js +511 -111
  47. package/tools/audit.py +506 -128
  48. package/tools/celery_guard.py +13 -35
  49. package/tools/check_a11y.js +8 -28
  50. package/tools/check_api_contracts.js +13 -39
  51. package/tools/check_architecture.js +35 -44
  52. package/tools/check_architecture.py +172 -105
  53. package/tools/check_custom.js +108 -61
  54. package/tools/check_custom.py +108 -271
  55. package/tools/check_data_files.js +88 -0
  56. package/tools/check_db_efficiency.py +80 -65
  57. package/tools/check_hitl.js +112 -69
  58. package/tools/check_links.js +138 -0
  59. package/tools/check_migrations.py +143 -94
  60. package/tools/check_performance.js +35 -44
  61. package/tools/check_placeholders.js +104 -0
  62. package/tools/check_responsive.js +8 -28
  63. package/tools/check_scope.py +40 -31
  64. package/tools/check_seo.js +8 -28
  65. package/tools/check_skills.js +158 -0
  66. package/tools/check_storybook.js +8 -21
  67. package/tools/check_symlinks.js +40 -22
  68. package/tools/check_ui_reuse.js +17 -29
  69. package/tools/docker_guard.py +19 -41
  70. package/tools/postgres_guard.py +15 -36
  71. package/tools/redis_guard.py +13 -35
  72. package/tools/scan_secrets.js +134 -67
  73. package/tools/scan_secrets.py +163 -72
  74. package/tools/verify_tdd.js +867 -0
  75. package/tools/verify_tdd.py +407 -165
  76. package/tools/yaml.js +404 -132
  77. package/tools/check_domain_data.js +0 -100
  78. package/tools/check_test_calendar_sync.js +0 -111
@@ -1,100 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Domain Data Integrity & Clean State Guard
4
- * Validates domain deliverables (content.json, calendar.json, voc.json)
5
- * to ensure valid JSON structure and clean creation state (no fake hallucinated metrics on pending posts).
6
- * Self-contained: uses only Node.js built-ins.
7
- *
8
- * @param {string} targetDir - Directory to scan (defaults to cwd)
9
- * @returns {{ exitCode: number, skipped: boolean, name: string, data: object }}
10
- */
11
- const check = async function checkDomainData(targetDir) {
12
- const fs = require('fs');
13
- const path = require('path');
14
-
15
- const dir = targetDir || process.cwd();
16
- const searchDirs = [
17
- dir,
18
- path.join(dir, 'output'),
19
- path.join(dir, 'content-calendar'),
20
- path.join(dir, 'data')
21
- ];
22
-
23
- const jsonFiles = [];
24
- for (const sDir of searchDirs) {
25
- if (fs.existsSync(sDir)) {
26
- try {
27
- const files = fs.readdirSync(sDir);
28
- for (const file of files) {
29
- if (file.endsWith('.json') && !file.includes('package') && !file.includes('tsconfig')) {
30
- jsonFiles.push(path.join(sDir, file));
31
- }
32
- }
33
- } catch {}
34
- }
35
- }
36
-
37
- if (jsonFiles.length === 0) {
38
- return {
39
- exitCode: 0,
40
- skipped: true,
41
- name: 'check_domain_data',
42
- data: { violations: [], message: 'No domain data JSON files to validate' }
43
- };
44
- }
45
-
46
- const violations = [];
47
- for (const file of jsonFiles) {
48
- try {
49
- const raw = fs.readFileSync(file, 'utf-8');
50
- const data = JSON.parse(raw);
51
-
52
- // Clean Creation State Check: If array of posts/calendar entries
53
- const entries = Array.isArray(data) ? data : (data.posts || data.items || data.calendar || []);
54
- if (Array.isArray(entries)) {
55
- for (let i = 0; i < entries.length; i++) {
56
- const item = entries[i];
57
- if (item && (item.status === 'pending' || item.status === 'draft')) {
58
- // Check if metrics are falsely pre-filled with non-null numbers
59
- if (item.metrics && typeof item.metrics === 'object') {
60
- const fakeMetrics = Object.entries(item.metrics).filter(([_, val]) => typeof val === 'number' && val > 0);
61
- if (fakeMetrics.length > 0) {
62
- violations.push({
63
- file: path.relative(dir, file),
64
- message: `Entry #${i + 1} (${item.title || item.id || 'draft'}) has pre-filled fake metrics on pending/draft post`
65
- });
66
- }
67
- }
68
- }
69
- }
70
- }
71
- } catch (err) {
72
- violations.push({
73
- file: path.relative(dir, file),
74
- message: `JSON syntax or structural error: ${err.message}`
75
- });
76
- }
77
- }
78
-
79
- const exitCode = violations.length > 0 ? 1 : 0;
80
- return {
81
- exitCode,
82
- skipped: false,
83
- name: 'check_domain_data',
84
- data: {
85
- violations,
86
- message: violations.length > 0
87
- ? `${violations.length} domain data integrity violation(s) found`
88
- : 'All domain deliverables & state data verified'
89
- }
90
- };
91
- };
92
-
93
- module.exports = check;
94
-
95
- if (require.main === module) {
96
- check(process.argv[2]).then(result => {
97
- console.log(JSON.stringify(result, null, 2));
98
- process.exit(result.exitCode);
99
- });
100
- }
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Test Calendar Parity & Auto-Sync Guard
4
- * Ensures that any modification made to the calendar engine (templates/content-calendar/)
5
- * is immediately synchronized to the test calendar harness (tests/).
6
- * Self-contained: uses only Node.js built-ins.
7
- *
8
- * @param {string} targetDir - Directory to scan (defaults to cwd)
9
- * @returns {{ exitCode: number, skipped: boolean, name: string, data: object }}
10
- */
11
- const check = async function checkTestCalendarSync(targetDir) {
12
- const fs = require('fs');
13
- const path = require('path');
14
-
15
- const dir = targetDir || process.cwd();
16
- const templateDir = path.join(dir, 'templates', 'content-calendar');
17
- const testDir = path.join(dir, 'tests');
18
-
19
- if (!fs.existsSync(templateDir) || !fs.existsSync(testDir)) {
20
- return {
21
- exitCode: 0,
22
- skipped: true,
23
- name: 'check_test_calendar_sync',
24
- data: { violations: [], message: 'No templates/content-calendar or tests/ directory found' }
25
- };
26
- }
27
-
28
- const syncPairs = [
29
- { src: path.join(templateDir, 'index.html'), dest: path.join(testDir, 'index.html'), label: 'index.html' },
30
- { src: path.join(templateDir, 'data.js'), dest: path.join(testDir, 'data.js'), label: 'data.js' },
31
- { src: path.join(templateDir, 'data.js'), dest: path.join(testDir, 'mock-data.js'), label: 'mock-data.js' }
32
- ];
33
-
34
- const syncedFiles = [];
35
- const violations = [];
36
-
37
- for (const pair of syncPairs) {
38
- if (!fs.existsSync(pair.src)) continue;
39
-
40
- let needsSync = false;
41
- if (!fs.existsSync(pair.dest)) {
42
- needsSync = true;
43
- } else {
44
- const srcBuf = fs.readFileSync(pair.src);
45
- const destBuf = fs.readFileSync(pair.dest);
46
- if (!srcBuf.equals(destBuf)) {
47
- needsSync = true;
48
- }
49
- }
50
-
51
- if (needsSync) {
52
- try {
53
- fs.copyFileSync(pair.src, pair.dest);
54
- syncedFiles.push(pair.label);
55
- } catch (err) {
56
- violations.push({
57
- file: pair.label,
58
- message: `Failed to synchronize ${pair.label}: ${err.message}`
59
- });
60
- }
61
- }
62
- }
63
-
64
- // Also verify mock-content.json has channelProfiles if data.js has it
65
- const dataJsPath = path.join(templateDir, 'data.js');
66
- const mockContentPath = path.join(testDir, 'mock-content.json');
67
- if (fs.existsSync(dataJsPath) && fs.existsSync(mockContentPath)) {
68
- try {
69
- const dataJsContent = fs.readFileSync(dataJsPath, 'utf-8');
70
- if (dataJsContent.includes('"channelProfiles"') && !fs.readFileSync(mockContentPath, 'utf-8').includes('"channelProfiles"')) {
71
- // Hydrate channelProfiles from data.js
72
- const match = dataJsContent.match(/"channelProfiles":\s*\{[\s\S]*?\n\s{4}\}/);
73
- if (match) {
74
- let mockJson = fs.readFileSync(mockContentPath, 'utf-8');
75
- mockJson = mockJson.replace(/"pillarMix":\s*\{[\s\S]*?\n\s{4}\}/, (m) => `${m},\n ${match[0]}`);
76
- fs.writeFileSync(mockContentPath, mockJson, 'utf-8');
77
- syncedFiles.push('mock-content.json');
78
- }
79
- }
80
- } catch (e) {
81
- // non-fatal
82
- }
83
- }
84
-
85
- const exitCode = violations.length > 0 ? 1 : 0;
86
- const message = violations.length > 0
87
- ? `Failed to sync ${violations.length} test calendar files`
88
- : (syncedFiles.length > 0
89
- ? `Auto-synchronized ${syncedFiles.length} test calendar file(s): ${syncedFiles.join(', ')}`
90
- : 'Test calendar is 100% in sync with templates/content-calendar');
91
-
92
- return {
93
- exitCode,
94
- skipped: false,
95
- name: 'check_test_calendar_sync',
96
- data: {
97
- violations,
98
- syncedFiles,
99
- message
100
- }
101
- };
102
- };
103
-
104
- module.exports = check;
105
-
106
- if (require.main === module) {
107
- check(process.argv[2]).then(result => {
108
- console.log(JSON.stringify(result, null, 2));
109
- process.exit(result.exitCode);
110
- });
111
- }