-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
101 lines (95 loc) · 3.97 KB
/
Copy pathcommitlint.config.cjs
File metadata and controls
101 lines (95 loc) · 3.97 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
/** @type {import('@commitlint/types').UserConfig} */
module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
headerPattern: /^(?:[^\w\s]+\s+)?(\w+)(?:\(([^)]+)\))?: (.*)$/,
headerCorrespondence: ['type', 'scope', 'subject'],
},
},
rules: {
// ── Allowed Commit Types ─────────────────────────────────────────
// Governed by: Senior Git Operations Engineer
// Ref: .claude/skills/flexycode/senior-git-operations-engineer/SKILL.md
'type-enum': [
2,
'always',
[
// Standard Conventional Commits
'feat', // ✨ New feature
'fix', // 🐛 Bug fix
'docs', // 📝 Documentation only
'style', // 🎨 Formatting, design tokens, CSS
'refactor', // ♻️ Code change that neither fixes a bug nor adds a feature
'perf', // ⚡ Performance improvement
'test', // 🧪 Adding or correcting tests
'build', // Build system or external dependencies
'ci', // 🚀 CI/CD configuration
'chore', // 🏗️ Maintenance tasks
'revert', // Reverts a previous commit
// Extended AEGIS Types (icon-prefixed convention)
'config', // 🔧 Configuration files (tsconfig, eslint, env)
'deps', // 📦 Dependency installation or updates
'security', // 🔒 Security improvements, env vars, auth
'deploy', // 🚀 Deployment, CI/CD pipeline changes
'schema', // 🗃️ Database schema, migrations
'web', // 🌐 Web portal-specific code (Next.js)
'cleanup', // 🧹 Dead code removal, file organization
'types', // 🏷️ TypeScript type definitions, interfaces
'core', // 🎯 Core domain logic, business rules
'ai', // 🤖 ML/AI related code, safety scanning
'validation', // 🛡️ Zod schemas, input validation
'data', // 💾 Seed data, fixtures, mock data
'assets', // 🖼️ Images, icons, fonts, static files
'hooks', // 🪝 Git hooks, Husky, pre-commit
'lint', // 📐 Linting rules, Prettier config
'docker', // 🐳 Docker, containers, compose files
'env', // 🔑 Environment variables, secrets config
'agent', // 🧠 AI agent skill files, prompts
'plan', // 📋 Planning documents, phase reviews
'academic', // 🎓 Academic deliverables, thesis content
'blockchain', // ⛓️ Smart contract, EVM, Foundry code
'forensic', // 🔬 Forensic engine, trace analysis
],
],
// ── Allowed Scopes (matches AEGIS workspace packages) ────────────
'scope-enum': [
2,
'always',
[
// Packages
'core',
'hacks-engine',
'skills-engine',
'forensic-engine',
// Apps
'web',
'api-gateway',
// Infrastructure & Meta
'infra',
'docker',
'deps',
'ci',
'docs',
'agents', // .claude/skills/, .gemini/
'root', // Root config files
// Phase tracking (academic alignment)
'phase-0',
'phase-1',
'phase-2',
'phase-3',
'phase-4',
'phase-5',
'phase-6',
],
],
'scope-empty': [1, 'never'], // Warn if scope is missing (encourage but don't block)
// ── Message Formatting ───────────────────────────────────────────
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-max-length': [2, 'always', 100],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'body-max-line-length': [1, 'always', 200],
},
};