egehan 0.0.0-stage → 0.1.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 (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -2
  3. package/assets/dictionary/narratives.en.json +660 -0
  4. package/assets/dictionary/narratives.tr.json +660 -0
  5. package/assets/schema/egehan-report.schema.json +354 -0
  6. package/assets/spec/rules.json +272 -0
  7. package/assets/templates/egehan-book.html +2027 -0
  8. package/assets/templates/hook.sh +41 -0
  9. package/dist/artifacts.d.ts +21 -0
  10. package/dist/artifacts.js +32 -0
  11. package/dist/capsule/capsule.d.ts +35 -0
  12. package/dist/capsule/capsule.js +123 -0
  13. package/dist/capsule/storage.d.ts +15 -0
  14. package/dist/capsule/storage.js +52 -0
  15. package/dist/cli/commands/capsule.d.ts +20 -0
  16. package/dist/cli/commands/capsule.js +94 -0
  17. package/dist/cli/commands/generate.d.ts +23 -0
  18. package/dist/cli/commands/generate.js +47 -0
  19. package/dist/cli/commands/hook.d.ts +14 -0
  20. package/dist/cli/commands/hook.js +120 -0
  21. package/dist/cli/commands/init.d.ts +16 -0
  22. package/dist/cli/commands/init.js +92 -0
  23. package/dist/cli/commands/stats.d.ts +14 -0
  24. package/dist/cli/commands/stats.js +112 -0
  25. package/dist/cli/main.d.ts +3 -0
  26. package/dist/cli/main.js +167 -0
  27. package/dist/cli/output.d.ts +26 -0
  28. package/dist/cli/output.js +87 -0
  29. package/dist/cli/prompt.d.ts +21 -0
  30. package/dist/cli/prompt.js +63 -0
  31. package/dist/config/config.d.ts +51 -0
  32. package/dist/config/config.js +160 -0
  33. package/dist/detect/projectType.d.ts +34 -0
  34. package/dist/detect/projectType.js +95 -0
  35. package/dist/engine/buildReport.d.ts +32 -0
  36. package/dist/engine/buildReport.js +188 -0
  37. package/dist/engine/chapters.d.ts +20 -0
  38. package/dist/engine/chapters.js +33 -0
  39. package/dist/engine/classifier.d.ts +21 -0
  40. package/dist/engine/classifier.js +119 -0
  41. package/dist/engine/conventional.d.ts +15 -0
  42. package/dist/engine/conventional.js +137 -0
  43. package/dist/engine/datetime.d.ts +47 -0
  44. package/dist/engine/datetime.js +100 -0
  45. package/dist/engine/milestones.d.ts +6 -0
  46. package/dist/engine/milestones.js +109 -0
  47. package/dist/engine/narrator.d.ts +71 -0
  48. package/dist/engine/narrator.js +189 -0
  49. package/dist/engine/prepare.d.ts +36 -0
  50. package/dist/engine/prepare.js +46 -0
  51. package/dist/engine/privacy.d.ts +45 -0
  52. package/dist/engine/privacy.js +110 -0
  53. package/dist/engine/pulse.d.ts +17 -0
  54. package/dist/engine/pulse.js +205 -0
  55. package/dist/engine/templating.d.ts +40 -0
  56. package/dist/engine/templating.js +64 -0
  57. package/dist/engine/types.d.ts +205 -0
  58. package/dist/engine/types.js +9 -0
  59. package/dist/git/logReader.d.ts +37 -0
  60. package/dist/git/logReader.js +133 -0
  61. package/dist/git/repository.d.ts +14 -0
  62. package/dist/git/repository.js +61 -0
  63. package/dist/git/runGit.d.ts +21 -0
  64. package/dist/git/runGit.js +74 -0
  65. package/dist/hooks/block.d.ts +27 -0
  66. package/dist/hooks/block.js +62 -0
  67. package/dist/hooks/manager.d.ts +47 -0
  68. package/dist/hooks/manager.js +153 -0
  69. package/dist/index.d.ts +34 -0
  70. package/dist/index.js +26 -0
  71. package/dist/pipeline.d.ts +35 -0
  72. package/dist/pipeline.js +80 -0
  73. package/dist/renderers/html.d.ts +6 -0
  74. package/dist/renderers/html.js +117 -0
  75. package/dist/renderers/markdown.d.ts +4 -0
  76. package/dist/renderers/markdown.js +168 -0
  77. package/dist/spec/assets.d.ts +14 -0
  78. package/dist/spec/assets.js +98 -0
  79. package/dist/spec/dictionary.d.ts +100 -0
  80. package/dist/spec/dictionary.js +39 -0
  81. package/dist/spec/rules.d.ts +191 -0
  82. package/dist/spec/rules.js +15 -0
  83. package/dist/version.d.ts +2 -0
  84. package/dist/version.js +20 -0
  85. package/package.json +55 -4
@@ -0,0 +1,354 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/BedirhanGurler/egehan/schema/egehan-report.schema.json",
4
+ "title": "Egehan Chronicle Report",
5
+ "description": "The canonical, implementation-independent output of the Egehan story engine. Every renderer (Markdown, HTML, IDE status bar) and every engine (Node, .NET) speaks this document and nothing else. Two engines producing byte-identical reports for the same repository is the project's core correctness guarantee.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "generator", "project", "config", "range", "totals", "authors", "chapters", "entries", "pulse", "milestones"],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "description": "Semantic version of this schema. Renderers must refuse a major version they do not understand.",
12
+ "type": "string",
13
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
14
+ },
15
+ "generator": { "$ref": "#/$defs/generator" },
16
+ "project": { "$ref": "#/$defs/project" },
17
+ "config": { "$ref": "#/$defs/config" },
18
+ "range": { "$ref": "#/$defs/range" },
19
+ "totals": { "$ref": "#/$defs/totals" },
20
+ "authors": { "type": "array", "items": { "$ref": "#/$defs/author" } },
21
+ "chapters": { "type": "array", "items": { "$ref": "#/$defs/chapter" } },
22
+ "entries": { "type": "array", "items": { "$ref": "#/$defs/entry" } },
23
+ "pulse": { "$ref": "#/$defs/pulse" },
24
+ "milestones": { "type": "array", "items": { "$ref": "#/$defs/milestone" } },
25
+ "capsule": {
26
+ "description": "Optional sealed time capsule. Present only when the user explicitly created one. The plaintext never appears in this document.",
27
+ "oneOf": [{ "$ref": "#/$defs/capsule" }, { "type": "null" }]
28
+ }
29
+ },
30
+
31
+ "$defs": {
32
+ "isoDateTime": {
33
+ "type": "string",
34
+ "description": "ISO-8601 timestamp retaining its original UTC offset, e.g. 2026-03-14T03:18:42+03:00. The offset is load-bearing: it is what makes 'midnight oil' mean midnight where the developer actually was.",
35
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
36
+ },
37
+ "isoDate": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
38
+ "sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
39
+ "nonNegativeInt": { "type": "integer", "minimum": 0 },
40
+ "ratio": { "type": "number", "minimum": 0, "maximum": 1 },
41
+ "language": { "type": "string", "enum": ["tr", "en"] },
42
+ "tone": { "type": "string", "enum": ["poetic", "minimalist", "humorous"] },
43
+ "category": {
44
+ "type": "string",
45
+ "enum": ["birth", "first-steps", "growing-pains", "midnight-oil", "milestone", "evolution"]
46
+ },
47
+ "commitType": {
48
+ "type": "string",
49
+ "enum": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert", "merge", "unknown"]
50
+ },
51
+ "projectFlavor": {
52
+ "type": "string",
53
+ "enum": ["frontend", "mobile", "backend", "systems", "library"]
54
+ },
55
+
56
+ "generator": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["name", "version", "platform", "specVersion", "generatedAt"],
60
+ "properties": {
61
+ "name": { "type": "string", "const": "egehan" },
62
+ "version": { "type": "string", "description": "Version of the CLI that produced this report." },
63
+ "platform": { "type": "string", "enum": ["node", "dotnet"] },
64
+ "specVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
65
+ "dictionaryVersion": { "type": "string" },
66
+ "generatedAt": {
67
+ "$ref": "#/$defs/isoDateTime",
68
+ "description": "The only field in this document allowed to depend on wall-clock time. Conformance comparisons between engines must exclude it."
69
+ }
70
+ }
71
+ },
72
+
73
+ "project": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["name", "detectedTypes", "flavor"],
77
+ "properties": {
78
+ "name": { "type": "string", "minLength": 1 },
79
+ "dedication": {
80
+ "description": "Free-text note the repository owner chose to place at the top of their own chronicle. Always opt-in, never generated.",
81
+ "type": ["string", "null"]
82
+ },
83
+ "detectedTypes": {
84
+ "type": "array",
85
+ "items": { "type": "string" },
86
+ "description": "Identifiers from rules.json → projectTypes.detectors, highest priority first."
87
+ },
88
+ "flavor": { "$ref": "#/$defs/projectFlavor" },
89
+ "defaultBranch": { "type": ["string", "null"] },
90
+ "remoteHost": {
91
+ "type": ["string", "null"],
92
+ "description": "Host only (e.g. github.com). Never the full remote URL, which can embed credentials."
93
+ }
94
+ }
95
+ },
96
+
97
+ "config": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["language", "tone", "redactEmails", "anonymizeAuthors"],
101
+ "properties": {
102
+ "language": { "$ref": "#/$defs/language" },
103
+ "tone": { "$ref": "#/$defs/tone" },
104
+ "redactEmails": { "type": "boolean" },
105
+ "anonymizeAuthors": { "type": "boolean" },
106
+ "includeMergeCommits": { "type": "boolean" },
107
+ "theme": { "type": "string", "enum": ["auto", "light", "dark"] }
108
+ }
109
+ },
110
+
111
+ "range": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["firstCommitAt", "lastCommitAt", "days"],
115
+ "properties": {
116
+ "since": { "type": ["string", "null"], "description": "Raw --since argument as given by the user (tag, date or revision)." },
117
+ "until": { "type": ["string", "null"] },
118
+ "firstCommitAt": { "$ref": "#/$defs/isoDateTime" },
119
+ "lastCommitAt": { "$ref": "#/$defs/isoDateTime" },
120
+ "days": { "$ref": "#/$defs/nonNegativeInt", "description": "Inclusive count of local calendar days spanned by the range." },
121
+ "truncated": { "type": "boolean", "description": "True when limits.maxCommitsPerRun capped the scan." }
122
+ }
123
+ },
124
+
125
+ "totals": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": ["commits", "authors", "insertions", "deletions", "filesTouched", "tags"],
129
+ "properties": {
130
+ "commits": { "$ref": "#/$defs/nonNegativeInt" },
131
+ "authors": { "$ref": "#/$defs/nonNegativeInt" },
132
+ "insertions": { "$ref": "#/$defs/nonNegativeInt" },
133
+ "deletions": { "$ref": "#/$defs/nonNegativeInt" },
134
+ "filesTouched": { "$ref": "#/$defs/nonNegativeInt", "description": "Distinct file paths touched across the range." },
135
+ "tags": { "$ref": "#/$defs/nonNegativeInt" },
136
+ "mergeCommits": { "$ref": "#/$defs/nonNegativeInt" },
137
+ "byCategory": {
138
+ "type": "object",
139
+ "additionalProperties": { "$ref": "#/$defs/nonNegativeInt" },
140
+ "propertyNames": { "$ref": "#/$defs/category" }
141
+ },
142
+ "byType": {
143
+ "type": "object",
144
+ "additionalProperties": { "$ref": "#/$defs/nonNegativeInt" },
145
+ "propertyNames": { "$ref": "#/$defs/commitType" }
146
+ }
147
+ }
148
+ },
149
+
150
+ "author": {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": ["id", "displayName", "commits", "insertions", "deletions", "firstCommitAt", "lastCommitAt"],
154
+ "properties": {
155
+ "id": { "type": "string", "description": "Stable identifier derived from the author's identity, safe to use as a DOM id." },
156
+ "displayName": { "type": "string" },
157
+ "emailHash": {
158
+ "type": ["string", "null"],
159
+ "description": "Truncated SHA-256 of the lowercased e-mail, for avatar seeding and identity merging. The raw address is never emitted."
160
+ },
161
+ "email": {
162
+ "type": ["string", "null"],
163
+ "description": "Raw address. Populated only when the user explicitly disabled redaction."
164
+ },
165
+ "commits": { "$ref": "#/$defs/nonNegativeInt" },
166
+ "insertions": { "$ref": "#/$defs/nonNegativeInt" },
167
+ "deletions": { "$ref": "#/$defs/nonNegativeInt" },
168
+ "firstCommitAt": { "$ref": "#/$defs/isoDateTime" },
169
+ "lastCommitAt": { "$ref": "#/$defs/isoDateTime" }
170
+ }
171
+ },
172
+
173
+ "conventional": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": ["type", "breaking", "inferred"],
177
+ "properties": {
178
+ "type": { "$ref": "#/$defs/commitType" },
179
+ "scope": { "type": ["string", "null"] },
180
+ "breaking": { "type": "boolean" },
181
+ "inferred": {
182
+ "type": "boolean",
183
+ "description": "True when the type came from keyword fallback rather than an explicit conventional prefix."
184
+ }
185
+ }
186
+ },
187
+
188
+ "entry": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": ["sha", "shortSha", "authorId", "authoredAt", "localHour", "localWeekday", "subject", "cleanSubject", "conventional", "tags", "stats", "category", "secondaryCategories", "narrative", "isMerge"],
192
+ "properties": {
193
+ "sha": { "$ref": "#/$defs/sha" },
194
+ "shortSha": { "type": "string", "pattern": "^[0-9a-f]{7,12}$" },
195
+ "parents": { "type": "array", "items": { "$ref": "#/$defs/sha" } },
196
+ "authorId": { "type": "string" },
197
+ "authoredAt": { "$ref": "#/$defs/isoDateTime" },
198
+ "committedAt": { "$ref": "#/$defs/isoDateTime" },
199
+ "tzOffsetMinutes": { "type": "integer", "minimum": -1080, "maximum": 1080 },
200
+ "localHour": { "type": "integer", "minimum": 0, "maximum": 23 },
201
+ "localWeekday": { "type": "integer", "minimum": 0, "maximum": 6, "description": "0 = Monday, per rules.json → time.weekStartsOn." },
202
+ "subject": { "type": "string", "description": "Raw commit subject, untouched." },
203
+ "cleanSubject": { "type": "string", "description": "Human-readable subject after prefix, ticket and punctuation cleanup." },
204
+ "conventional": { "$ref": "#/$defs/conventional" },
205
+ "tags": { "type": "array", "items": { "type": "string" } },
206
+ "stats": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": ["filesCount", "insertions", "deletions"],
210
+ "properties": {
211
+ "filesCount": { "$ref": "#/$defs/nonNegativeInt" },
212
+ "insertions": { "$ref": "#/$defs/nonNegativeInt" },
213
+ "deletions": { "$ref": "#/$defs/nonNegativeInt" },
214
+ "sizeBucket": { "type": "string", "enum": ["touch", "small", "medium", "large", "epic"] }
215
+ }
216
+ },
217
+ "category": { "$ref": "#/$defs/category" },
218
+ "secondaryCategories": { "type": "array", "items": { "$ref": "#/$defs/category" } },
219
+ "narrative": { "type": "string", "description": "The generated sentence. Deterministic for a given (sha, language, tone, dictionaryVersion)." },
220
+ "isMerge": { "type": "boolean" },
221
+ "variantIndex": { "$ref": "#/$defs/nonNegativeInt", "description": "Which template variant was selected. Emitted to make determinism auditable." }
222
+ }
223
+ },
224
+
225
+ "chapter": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": ["id", "category", "title", "narrative", "from", "to", "entryShas", "stats"],
229
+ "properties": {
230
+ "id": { "type": "string" },
231
+ "category": { "$ref": "#/$defs/category" },
232
+ "title": { "type": "string" },
233
+ "narrative": { "type": "string", "description": "Chapter-level summary sentence, generated from aggregate statistics." },
234
+ "from": { "$ref": "#/$defs/isoDateTime" },
235
+ "to": { "$ref": "#/$defs/isoDateTime" },
236
+ "entryShas": { "type": "array", "items": { "$ref": "#/$defs/sha" }, "minItems": 1 },
237
+ "stats": {
238
+ "type": "object",
239
+ "additionalProperties": false,
240
+ "required": ["commits", "insertions", "deletions", "filesCount"],
241
+ "properties": {
242
+ "commits": { "$ref": "#/$defs/nonNegativeInt" },
243
+ "insertions": { "$ref": "#/$defs/nonNegativeInt" },
244
+ "deletions": { "$ref": "#/$defs/nonNegativeInt" },
245
+ "filesCount": { "$ref": "#/$defs/nonNegativeInt" },
246
+ "authorIds": { "type": "array", "items": { "type": "string" } }
247
+ }
248
+ }
249
+ }
250
+ },
251
+
252
+ "pulse": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "required": ["chronotype", "chronotypeLabel", "hourHistogram", "weekdayHistogram", "busiestHour", "busiestWeekday", "creationRatio", "longestStreak", "currentStreak"],
256
+ "properties": {
257
+ "chronotype": {
258
+ "type": "string",
259
+ "enum": ["night-owl", "early-architect", "daylight-builder", "evening-craftsman", "balanced-rhythm"]
260
+ },
261
+ "chronotypeLabel": { "type": "string", "description": "Localized label, resolved from the dictionary." },
262
+ "hourHistogram": {
263
+ "type": "array",
264
+ "items": { "$ref": "#/$defs/nonNegativeInt" },
265
+ "minItems": 24,
266
+ "maxItems": 24
267
+ },
268
+ "weekdayHistogram": {
269
+ "type": "array",
270
+ "items": { "$ref": "#/$defs/nonNegativeInt" },
271
+ "minItems": 7,
272
+ "maxItems": 7
273
+ },
274
+ "busiestHour": { "type": "integer", "minimum": 0, "maximum": 23 },
275
+ "busiestWeekday": { "type": "integer", "minimum": 0, "maximum": 6 },
276
+ "creationRatio": { "$ref": "#/$defs/ratio", "description": "insertions / (insertions + deletions). High means building, low means refining." },
277
+ "avgChangedLines": { "type": "number", "minimum": 0 },
278
+ "medianChangedLines": { "type": "number", "minimum": 0 },
279
+ "longestStreak": { "$ref": "#/$defs/streak" },
280
+ "currentStreak": { "$ref": "#/$defs/streak" },
281
+ "monthlyActivity": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "object",
285
+ "additionalProperties": false,
286
+ "required": ["month", "commits", "insertions", "deletions"],
287
+ "properties": {
288
+ "month": { "type": "string", "pattern": "^\\d{4}-\\d{2}$" },
289
+ "commits": { "$ref": "#/$defs/nonNegativeInt" },
290
+ "insertions": { "$ref": "#/$defs/nonNegativeInt" },
291
+ "deletions": { "$ref": "#/$defs/nonNegativeInt" }
292
+ }
293
+ }
294
+ },
295
+ "narrative": { "type": "string", "description": "Localized prose summary of the pulse." }
296
+ }
297
+ },
298
+
299
+ "streak": {
300
+ "type": "object",
301
+ "additionalProperties": false,
302
+ "required": ["days"],
303
+ "properties": {
304
+ "days": { "$ref": "#/$defs/nonNegativeInt" },
305
+ "from": { "oneOf": [{ "$ref": "#/$defs/isoDate" }, { "type": "null" }] },
306
+ "to": { "oneOf": [{ "$ref": "#/$defs/isoDate" }, { "type": "null" }] }
307
+ }
308
+ },
309
+
310
+ "milestone": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "required": ["kind", "at", "label"],
314
+ "properties": {
315
+ "kind": {
316
+ "type": "string",
317
+ "enum": ["first-commit", "commit-count", "release-tag", "anniversary", "streak", "midnight-fix", "architectural-leap"]
318
+ },
319
+ "at": { "$ref": "#/$defs/isoDateTime" },
320
+ "label": { "type": "string" },
321
+ "value": { "type": ["number", "string", "null"] },
322
+ "sha": { "oneOf": [{ "$ref": "#/$defs/sha" }, { "type": "null" }] },
323
+ "narrative": { "type": "string" }
324
+ }
325
+ },
326
+
327
+ "capsule": {
328
+ "type": "object",
329
+ "additionalProperties": false,
330
+ "required": ["mode", "unlockDate", "algorithm", "salt", "iv", "ciphertext"],
331
+ "properties": {
332
+ "mode": { "type": "string", "const": "sealed" },
333
+ "unlockDate": { "$ref": "#/$defs/isoDate" },
334
+ "authorLabel": { "type": ["string", "null"] },
335
+ "hint": { "type": ["string", "null"], "description": "Optional passphrase hint. Stored in cleartext — the CLI warns about this." },
336
+ "algorithm": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": ["kdf", "kdfHash", "iterations", "cipher"],
340
+ "properties": {
341
+ "kdf": { "type": "string", "const": "PBKDF2" },
342
+ "kdfHash": { "type": "string", "const": "SHA-256" },
343
+ "iterations": { "type": "integer", "minimum": 100000 },
344
+ "cipher": { "type": "string", "const": "AES-256-GCM" }
345
+ }
346
+ },
347
+ "salt": { "type": "string", "contentEncoding": "base64" },
348
+ "iv": { "type": "string", "contentEncoding": "base64" },
349
+ "ciphertext": { "type": "string", "contentEncoding": "base64", "description": "Includes the GCM authentication tag appended to the ciphertext." },
350
+ "createdAt": { "$ref": "#/$defs/isoDateTime" }
351
+ }
352
+ }
353
+ }
354
+ }
@@ -0,0 +1,272 @@
1
+ {
2
+ "$comment": "EGEHAN ENGINE CONTRACT — single source of truth. Both the Node and the .NET engines MUST read their thresholds from this file. Never inline these numbers in implementation code: a drift between the two engines is a bug, and packages/core-spec/fixtures/ exists to prove it.",
3
+ "specVersion": "1.0.0",
4
+ "schemaVersion": "1.0.0",
5
+
6
+ "determinism": {
7
+ "$comment": "The same commit must always produce the same sentence, on every machine, in every runtime, forever.",
8
+ "hashPrefixLength": 8,
9
+ "hashRadix": 16,
10
+ "selectionFormula": "variantIndex = parseInt(sha.toLowerCase().substring(0, hashPrefixLength), hashRadix) % variants.length",
11
+ "shaNormalization": "lowercase-hex-40",
12
+ "groupSelectionSource": "sha-of-first-commit-in-group",
13
+ "noRandomness": true,
14
+ "noWallClockInOutput": [
15
+ "generator.generatedAt is the ONLY field allowed to carry generation time",
16
+ "all other values must be derived from repository data alone"
17
+ ]
18
+ },
19
+
20
+ "git": {
21
+ "$comment": "Encoding flags are mandatory on every invocation. Turkish characters (ğ, ü, ş, ı, ö, ç) must survive on Windows, macOS and Linux alike.",
22
+ "mandatoryFlags": [
23
+ "-c", "i18n.logOutputEncoding=UTF-8",
24
+ "-c", "core.quotepath=false",
25
+ "-c", "log.showSignature=false"
26
+ ],
27
+ "recordSeparator": "\u001e",
28
+ "fieldSeparator": "\u001f",
29
+ "logFields": ["H", "h", "P", "an", "ae", "aI", "cI", "s", "b"],
30
+ "tagSource": "for-each-ref",
31
+ "$tagSourceComment": "Tags are read with `git for-each-ref refs/tags`, not from the %D decoration in the log. An annotated tag's own object name is not the commit's, so %D-based parsing silently loses annotated releases — which are exactly the ones a project bothers to annotate.",
32
+ "numstatMode": "--numstat",
33
+ "followMerges": false,
34
+ "commitOrdering": ["author-date-ascending", "commit-date-ascending", "sha-ascending"],
35
+ "$commitOrderingComment": "git log returns topological order, which is not chronological: a rebase, a cherry-pick or a skewed clock can place a commit before one it was authored after. Fix clustering and streak counting both depend on chronological order, so the engine re-sorts by author date with an explicit, total tie-break. Without the tie-break two commits sharing a timestamp could land in either order and the two engines would disagree.",
36
+ "maxSubjectLength": 200
37
+ },
38
+
39
+ "time": {
40
+ "mode": "author-local",
41
+ "$comment": "Local hour is derived from the commit's own ISO-8601 author date including its recorded UTC offset. Converting to UTC or to the reader's timezone would destroy the 'midnight oil' story, which is the whole point.",
42
+ "weekStartsOn": 1,
43
+ "dayBoundary": "local-midnight"
44
+ },
45
+
46
+ "conventionalCommits": {
47
+ "pattern": "^\\s*(?<type>[A-Za-z]+)\\s*(?:\\((?<scope>[^()]{0,80})\\))?\\s*(?<breaking>!)?\\s*:\\s*(?<subject>.+)$",
48
+ "revertPattern": "^\\s*[Rr]evert\\b",
49
+ "mergePattern": "^\\s*(?:Merge|Birle[sş]tir)\\b",
50
+ "typeAliases": {
51
+ "feature": "feat",
52
+ "features": "feat",
53
+ "add": "feat",
54
+ "bugfix": "fix",
55
+ "hotfix": "fix",
56
+ "bug": "fix",
57
+ "patch": "fix",
58
+ "documentation": "docs",
59
+ "doc": "docs",
60
+ "performance": "perf",
61
+ "tests": "test",
62
+ "testing": "test",
63
+ "refactoring": "refactor",
64
+ "chores": "chore",
65
+ "styling": "style",
66
+ "deps": "chore",
67
+ "init": "feat"
68
+ },
69
+ "keywordFallbackOrder": ["fix", "feat", "perf", "test", "docs", "refactor", "style", "build", "ci", "chore"],
70
+ "$keywordFallbackOrderComment": "Explicit, because object key order is not a portable guarantee: .NET's Dictionary gives no ordering, so an engine iterating the keywordFallback map directly could classify a subject differently from the Node engine. The order is part of the contract, not an implementation detail.",
71
+ "keywordFallback": {
72
+ "$comment": "Applied only when the subject carries no conventional prefix. Case-insensitive, diacritic-sensitive, whole-word match on the lowercased subject. Turkish and English keywords both count — the tool must be useful in repositories that never adopted Conventional Commits.",
73
+ "fix": ["fix", "fixed", "fixes", "bug", "bugfix", "hotfix", "patch", "repair", "resolve", "resolved", "hata", "hatasi", "hatası", "duzelt", "düzelt", "duzeltme", "düzeltme", "onar", "cozuldu", "çözüldü", "giderildi"],
74
+ "feat": ["add", "added", "adds", "new", "implement", "implemented", "introduce", "feature", "support", "create", "ekle", "eklendi", "yeni", "olustur", "oluştur", "gelistir", "geliştir", "destek"],
75
+ "docs": ["readme", "docs", "documentation", "changelog", "comment", "dokuman", "doküman", "belge", "aciklama", "açıklama"],
76
+ "test": ["test", "tests", "spec", "coverage", "e2e", "unit", "testler"],
77
+ "perf": ["perf", "performance", "optimize", "optimized", "optimization", "faster", "speed", "cache", "performans", "hizlandir", "hızlandır", "iyilestir", "iyileştir"],
78
+ "refactor": ["refactor", "refactored", "cleanup", "clean up", "rename", "renamed", "restructure", "simplify", "tidy", "duzenle", "düzenle", "temizle", "sadelestir", "sadeleştir", "yeniden"],
79
+ "style": ["format", "formatted", "lint", "prettier", "eslint", "whitespace", "indent", "bicim", "biçim"],
80
+ "build": ["build", "bundle", "webpack", "vite", "rollup", "compile", "derle", "paketle"],
81
+ "ci": ["ci", "pipeline", "workflow", "action", "actions", "deploy", "release", "publish", "docker", "yayinla", "yayınla"],
82
+ "chore": ["bump", "upgrade", "update", "deps", "dependency", "dependencies", "version", "merge", "wip", "guncelle", "güncelle", "surum", "sürüm"]
83
+ },
84
+ "subjectCleanup": {
85
+ "stripPrefixPattern": "^\\s*(?:[A-Za-z]+)\\s*(?:\\([^()]{0,80}\\))?\\s*!?\\s*:\\s*",
86
+ "stripTicketPattern": "(?:\\s+#\\d+|\\s*\\[[A-Z][A-Z0-9]{1,9}-\\d+\\]|\\s*\\(#\\d+\\))\\s*$",
87
+ "stripTrailingPeriod": true,
88
+ "collapseWhitespace": true,
89
+ "capitalizeFirstLetter": false,
90
+ "capitalizationLocale": "report-language",
91
+ "$capitalizeFirstLetterComment": "Off by default, and the default is the interesting part. Every narrative template quotes the subject (\u00abu2026\u00bb), and a quotation keeps the casing it was written with — upper-casing it produced \"V0.1.0\" from a release commit and, worse, \"\u0130nitial commit\" under Turkish casing rules applied to an English word. Sentence-level capitalization is handled by narrative.capitalizeFirstLetter instead, where the text really is in the report's language.",
92
+ "$capitalizationLocaleComment": "The first letter is upper-cased using the report's own language tag, not the host locale and not an invariant upcase. Turkish needs this: an invariant upcase turns \"iyileştirme\" into \"Iyileştirme\" instead of \"İyileştirme\". Determinism is preserved because the language is part of the report, so every engine upper-cases with the same tag. Everything else in this engine lowercases invariantly — only this one step is locale-aware, and only ever with the report language.",
93
+ "maxLength": 140,
94
+ "ellipsis": "…"
95
+ }
96
+ },
97
+
98
+ "narrative": {
99
+ "capitalizeFirstLetter": true,
100
+ "capitalizationLocale": "report-language",
101
+ "skipWhenFirstCharIsNotALetter": true,
102
+ "$comment": "The generated sentence is capitalized, not the commit subject. The skip rule matters: a template may begin with a date or with the quoted subject, and in both cases the first character is not a letter the engine should touch — upper-casing inside the quotation would corrupt the citation."
103
+ },
104
+
105
+ "classification": {
106
+ "$comment": "A commit is evaluated against every category; the first match in evaluationOrder becomes its primary category, the remaining matches become secondaryCategories and may contribute a narrative modifier clause.",
107
+ "evaluationOrder": ["milestone", "birth", "growing-pains", "midnight-oil", "first-steps", "evolution"],
108
+ "categories": {
109
+ "birth": {
110
+ "description": "The repository's very first commit, and the setup commits that immediately follow it.",
111
+ "firstCommitAlwaysMatches": true,
112
+ "setupWindowHours": 24,
113
+ "setupWindowAppliesToTypes": ["chore", "build", "ci", "docs", "style", "feat"]
114
+ },
115
+ "first-steps": {
116
+ "description": "Foundational work carried out before the project's first release tag.",
117
+ "requiresNoReleaseTagBefore": true,
118
+ "types": ["feat", "build", "ci", "chore", "style"]
119
+ },
120
+ "growing-pains": {
121
+ "description": "A burst of consecutive fixes, or a refactor that deletes far more than it adds.",
122
+ "clusterWindowHours": 48,
123
+ "minFixCommitsInCluster": 3,
124
+ "clusterFixTypes": ["fix", "revert"],
125
+ "refactorDeletionRatio": 1.5,
126
+ "refactorMinChangedLines": 150
127
+ },
128
+ "midnight-oil": {
129
+ "description": "Committed in the small hours, local time.",
130
+ "localHourFrom": 0,
131
+ "localHourTo": 4
132
+ },
133
+ "milestone": {
134
+ "description": "A tagged release, or a single architectural leap.",
135
+ "tagPattern": "^v?\\d+\\.\\d+\\.\\d+(?:[-+].+)?$",
136
+ "anyTagMatches": true,
137
+ "largeInsertionThreshold": 1000,
138
+ "breakingChangeMatches": true
139
+ },
140
+ "evolution": {
141
+ "description": "Steady maturation: performance, tests, documentation, routine care.",
142
+ "types": ["perf", "test", "docs", "refactor", "chore", "build", "ci", "style"],
143
+ "isFallback": true
144
+ }
145
+ },
146
+ "modifierCategories": ["midnight-oil", "growing-pains", "milestone"],
147
+ "maxModifiersPerEntry": 1
148
+ },
149
+
150
+ "chapters": {
151
+ "$comment": "Entries are grouped into chapters by consecutive runs of the same primary category, so the chronicle reads as a story rather than a list.",
152
+ "groupBy": "consecutive-primary-category",
153
+ "maxEntriesPerChapter": 40,
154
+ "maxGapHoursWithinChapter": 720,
155
+ "titleSelection": "deterministic-by-first-entry-sha"
156
+ },
157
+
158
+ "pulse": {
159
+ "$comment": "Developer Pulse. Shares are computed over all non-merge commits in range.",
160
+ "chronotypes": [
161
+ { "id": "night-owl", "hours": [22, 23, 0, 1, 2, 3, 4], "minShare": 0.28 },
162
+ { "id": "early-architect", "hours": [5, 6, 7, 8, 9], "minShare": 0.28 },
163
+ { "id": "daylight-builder", "hours": [10, 11, 12, 13, 14, 15, 16, 17], "minShare": 0.4 },
164
+ { "id": "evening-craftsman", "hours": [18, 19, 20, 21], "minShare": 0.3 }
165
+ ],
166
+ "chronotypeTieBreak": "highest-share-then-declaration-order",
167
+ "fallbackChronotype": "balanced-rhythm",
168
+ "creationRatioFormula": "insertions / max(1, insertions + deletions)",
169
+ "peakSmoothingWindow": 1,
170
+ "$peakSmoothingComment": "The busiest hour is the peak of the histogram smoothed over a circular window of this many hours on each side. Raw peaks are meaningless on small histories: with fourteen commits at fourteen different hours everything ties at one and the lowest index wins, which reported \"busiest hour 02\" for a project that commits in daylight. Smoothing finds the busiest PERIOD, which is what the question actually means.",
171
+ "streak": {
172
+ "unit": "local-calendar-day",
173
+ "minLengthToReport": 2,
174
+ "anchor": "last-commit-in-range",
175
+ "$anchorComment": "currentStreak is the run of consecutive days ending at the LAST COMMIT IN RANGE, never at today's date. Anchoring it to the wall clock would make the report change every day while the repository stayed still — breaking determinism, producing a churning git diff, and making the two engines disagree whenever they ran on different days."
176
+ },
177
+ "rounding": {
178
+ "ratioDecimals": 4,
179
+ "averageDecimals": 2,
180
+ "$comment": "Derived decimals are rounded before they enter the report. IEEE-754 gives Node and .NET the same bits, but an unrounded 0.6666666666666666 invites divergence the moment either side formats or re-serializes it, so the contract fixes the precision instead of hoping."
181
+ },
182
+ "sizeBuckets": [
183
+ { "id": "touch", "maxChangedLines": 10 },
184
+ { "id": "small", "maxChangedLines": 50 },
185
+ { "id": "medium", "maxChangedLines": 250 },
186
+ { "id": "large", "maxChangedLines": 1000 },
187
+ { "id": "epic", "maxChangedLines": null }
188
+ ]
189
+ },
190
+
191
+ "milestoneCelebrations": {
192
+ "$comment": "Events worth a gentle IDE notification. The IDE layer must fire each event at most once per repository; the generated report only states that the event occurred.",
193
+ "commitCounts": [1, 10, 50, 100, 250, 500, 1000, 2500, 5000, 10000],
194
+ "anniversaryDays": [30, 100, 365, 500, 730, 1000],
195
+ "onReleaseTag": true,
196
+ "onMidnightFix": true,
197
+ "midnightFixMilestone": "first-only",
198
+ "$midnightFixComment": "An IDE may celebrate every late-night fix, but the report's milestone strip records only the FIRST one. A project with two hundred night commits would otherwise bury its releases under two hundred identical entries.",
199
+ "onLongestStreakBroken": false,
200
+ "onStreakDays": [7, 30, 100]
201
+ },
202
+
203
+ "projectTypes": {
204
+ "$comment": "Detected from the files present in the working tree. Multiple types may match; all are reported, and the highest-priority flavor drives narrative metaphors.",
205
+ "detectors": [
206
+ { "id": "dotnet", "flavor": "backend", "priority": 70, "anyGlob": ["*.sln", "*.csproj", "*.fsproj", "*.vbproj", "src/*.csproj", "**/*.csproj"] },
207
+ { "id": "flutter", "flavor": "mobile", "priority": 90, "anyFile": ["pubspec.yaml"] },
208
+ { "id": "react-native", "flavor": "mobile", "priority": 88, "anyFile": ["metro.config.js", "metro.config.cjs", "react-native.config.js"] },
209
+ { "id": "native-mobile", "flavor": "mobile", "priority": 85, "allDirs": ["ios", "android"] },
210
+ { "id": "swift", "flavor": "mobile", "priority": 84, "anyGlob": ["*.xcodeproj", "*.xcworkspace", "Package.swift"] },
211
+ { "id": "android", "flavor": "mobile", "priority": 83, "anyFile": ["settings.gradle", "settings.gradle.kts", "app/build.gradle", "app/build.gradle.kts"] },
212
+ { "id": "frontend", "flavor": "frontend", "priority": 75, "anyFile": ["next.config.js", "next.config.mjs", "next.config.ts", "nuxt.config.ts", "vite.config.ts", "vite.config.js", "angular.json", "svelte.config.js", "astro.config.mjs", "remix.config.js"] },
213
+ { "id": "node", "flavor": "frontend", "priority": 40, "anyFile": ["package.json"] },
214
+ { "id": "python", "flavor": "backend", "priority": 65, "anyFile": ["pyproject.toml", "requirements.txt", "setup.py", "Pipfile"] },
215
+ { "id": "go", "flavor": "backend", "priority": 65, "anyFile": ["go.mod"] },
216
+ { "id": "rust", "flavor": "systems", "priority": 65, "anyFile": ["Cargo.toml"] },
217
+ { "id": "java", "flavor": "backend", "priority": 65, "anyFile": ["pom.xml", "build.gradle", "build.gradle.kts"] },
218
+ { "id": "php", "flavor": "backend", "priority": 60, "anyFile": ["composer.json"] },
219
+ { "id": "ruby", "flavor": "backend", "priority": 60, "anyFile": ["Gemfile"] },
220
+ { "id": "infra", "flavor": "systems", "priority": 50, "anyFile": ["Dockerfile", "docker-compose.yml", "docker-compose.yaml", "main.tf", "Chart.yaml"] },
221
+ { "id": "docs-only", "flavor": "library", "priority": 10, "anyFile": ["mkdocs.yml", "docusaurus.config.js"] }
222
+ ],
223
+ "fallbackFlavor": "library",
224
+ "maxDepth": 2,
225
+ "ignoreDirs": ["node_modules", ".git", "dist", "build", "bin", "obj", "vendor", ".next", ".nuxt", "target", "Pods", ".venv", "venv", "__pycache__"]
226
+ },
227
+
228
+ "privacy": {
229
+ "$comment": "The tool produces artifacts that people share publicly. Leaking a team's e-mail addresses by default would be unacceptable in any corporate repository.",
230
+ "redactEmailsByDefault": true,
231
+ "emailHashAlgorithm": "sha256",
232
+ "emailHashPrefixLength": 12,
233
+ "anonymizeAuthorFormat": "Geliştirici #{index}",
234
+ "anonymizeAuthorFormatEn": "Developer #{index}",
235
+ "neverEmit": ["raw commit body when redactEmails is on and the body matches an e-mail pattern"],
236
+ "emailPattern": "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
237
+ },
238
+
239
+ "capsule": {
240
+ "$comment": "Sealed mode only. A passphrase-free capsule would be a false promise: the ciphertext travels inside a shareable HTML file, so anything the file can decrypt by itself, any reader can decrypt too. PBKDF2 is chosen because it is the one KDF available in all three runtimes (Web Crypto, Node, .NET) — scrypt and Argon2 are not in Web Crypto.",
241
+ "mode": "sealed",
242
+ "kdf": "PBKDF2",
243
+ "kdfHash": "SHA-256",
244
+ "iterations": 600000,
245
+ "derivedKeyBits": 256,
246
+ "cipher": "AES-256-GCM",
247
+ "saltBytes": 16,
248
+ "ivBytes": 12,
249
+ "authTagBits": 128,
250
+ "encoding": "base64",
251
+ "additionalDataFormat": "egehan-capsule-v1|{unlockDate}",
252
+ "minPassphraseLength": 12,
253
+ "trackedByGitByDefault": false
254
+ },
255
+
256
+ "output": {
257
+ "embedGenerationTimeInArtifacts": false,
258
+ "$embedGenerationTimeComment": "The rendered artifacts (EGEHAN.md, egehan-chronicle.html) must not carry the moment they were generated. They are meant to be committed, and a post-commit hook that regenerates them would otherwise produce a one-line diff on every single commit forever — which is exactly the churn determinism exists to prevent. The JSON report keeps generator.generatedAt, because it is the machine format and provenance belongs there.",
259
+ "markdownFileName": "EGEHAN.md",
260
+ "htmlFileName": "egehan-chronicle.html",
261
+ "reportFileName": "egehan-report.json",
262
+ "capsuleFileName": "capsule.egehan.json",
263
+ "stateDirName": ".egehan",
264
+ "configFileName": ".egehanrc.json"
265
+ },
266
+
267
+ "limits": {
268
+ "maxCommitsPerRun": 100000,
269
+ "maxEntriesInHtml": 5000,
270
+ "warnAboveCommits": 20000
271
+ }
272
+ }