codexspec 0.3.3__tar.gz → 0.3.4__tar.gz

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 (36) hide show
  1. {codexspec-0.3.3 → codexspec-0.3.4}/PKG-INFO +27 -2
  2. {codexspec-0.3.3 → codexspec-0.3.4}/README.md +26 -1
  3. {codexspec-0.3.3 → codexspec-0.3.4}/pyproject.toml +1 -1
  4. {codexspec-0.3.3 → codexspec-0.3.4}/src/codexspec/__init__.py +68 -3
  5. {codexspec-0.3.3 → codexspec-0.3.4}/src/codexspec/i18n.py +5 -0
  6. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/commit-staged.md +13 -4
  7. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/commit.md +18 -4
  8. {codexspec-0.3.3 → codexspec-0.3.4}/.gitignore +0 -0
  9. {codexspec-0.3.3 → codexspec-0.3.4}/LICENSE +0 -0
  10. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/bash/check-prerequisites.sh +0 -0
  11. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/bash/common.sh +0 -0
  12. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/bash/create-new-feature.sh +0 -0
  13. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/powershell/check-prerequisites.ps1 +0 -0
  14. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/powershell/common.ps1 +0 -0
  15. {codexspec-0.3.3 → codexspec-0.3.4}/scripts/powershell/create-new-feature.ps1 +0 -0
  16. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/analyze.md +0 -0
  17. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/checklist.md +0 -0
  18. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/clarify.md +0 -0
  19. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/constitution.md +0 -0
  20. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/generate-spec.md +0 -0
  21. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/implement-tasks.md +0 -0
  22. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/plan-to-tasks.md +0 -0
  23. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/review-plan.md +0 -0
  24. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/review-spec.md +0 -0
  25. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/review-tasks.md +0 -0
  26. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/spec-to-plan.md +0 -0
  27. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/specify.md +0 -0
  28. {codexspec-0.3.3 → codexspec-0.3.4}/templates/commands/tasks-to-issues.md +0 -0
  29. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/checklist-template.md +0 -0
  30. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/constitution-template.md +0 -0
  31. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/plan-template-detailed.md +0 -0
  32. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/plan-template-simple.md +0 -0
  33. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/spec-template-detailed.md +0 -0
  34. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/spec-template-simple.md +0 -0
  35. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/tasks-template-detailed.md +0 -0
  36. {codexspec-0.3.3 → codexspec-0.3.4}/templates/docs/tasks-template-simple.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexspec
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: CodexSpec - A Spec-Driven Development (SDD) toolkit for Claude Code
5
5
  Project-URL: Homepage, https://github.com/Zts0hg/codexspec
6
6
  Project-URL: Repository, https://github.com/Zts0hg/codexspec
@@ -364,6 +364,7 @@ The implementation follows **conditional TDD workflow**:
364
364
  | Option | Description |
365
365
  |--------|-------------|
366
366
  | `--set-lang`, `-l` | Set the output language |
367
+ | `--set-commit-lang`, `-c` | Set the commit message language (defaults to output language) |
367
368
  | `--list-langs` | List all supported languages |
368
369
 
369
370
  ### Slash Commands
@@ -553,13 +554,33 @@ codexspec init my-project --lang ja
553
554
  # View current configuration
554
555
  codexspec config
555
556
 
556
- # Change language setting
557
+ # Change output language setting
557
558
  codexspec config --set-lang zh-CN
558
559
 
560
+ # Set commit messages to English (while keeping output in Chinese)
561
+ codexspec config --set-commit-lang en
562
+
559
563
  # List supported languages
560
564
  codexspec config --list-langs
561
565
  ```
562
566
 
567
+ ### Commit Message Language
568
+
569
+ You can configure a different language for commit messages than the output language:
570
+
571
+ ```bash
572
+ # Use Chinese for interactions but English for commit messages
573
+ codexspec config --set-lang zh-CN
574
+ codexspec config --set-commit-lang en
575
+ ```
576
+
577
+ **Language priority for commit messages:**
578
+ 1. `language.commit` setting (if specified)
579
+ 2. `language.output` (fallback)
580
+ 3. `"en"` (default)
581
+
582
+ **Note:** The commit type (feat, fix, docs, etc.) and scope always remain in English. Only the description part uses the configured language.
583
+
563
584
  ### Configuration File
564
585
 
565
586
  The `.codexspec/config.yml` file stores language settings:
@@ -571,6 +592,10 @@ language:
571
592
  # Output language for Claude interactions and generated documents
572
593
  output: "zh-CN"
573
594
 
595
+ # Commit message language (defaults to output language)
596
+ # Set to "en" for English commit messages regardless of output language
597
+ commit: "zh-CN"
598
+
574
599
  # Template language - keep as "en" for compatibility
575
600
  templates: "en"
576
601
 
@@ -326,6 +326,7 @@ The implementation follows **conditional TDD workflow**:
326
326
  | Option | Description |
327
327
  |--------|-------------|
328
328
  | `--set-lang`, `-l` | Set the output language |
329
+ | `--set-commit-lang`, `-c` | Set the commit message language (defaults to output language) |
329
330
  | `--list-langs` | List all supported languages |
330
331
 
331
332
  ### Slash Commands
@@ -515,13 +516,33 @@ codexspec init my-project --lang ja
515
516
  # View current configuration
516
517
  codexspec config
517
518
 
518
- # Change language setting
519
+ # Change output language setting
519
520
  codexspec config --set-lang zh-CN
520
521
 
522
+ # Set commit messages to English (while keeping output in Chinese)
523
+ codexspec config --set-commit-lang en
524
+
521
525
  # List supported languages
522
526
  codexspec config --list-langs
523
527
  ```
524
528
 
529
+ ### Commit Message Language
530
+
531
+ You can configure a different language for commit messages than the output language:
532
+
533
+ ```bash
534
+ # Use Chinese for interactions but English for commit messages
535
+ codexspec config --set-lang zh-CN
536
+ codexspec config --set-commit-lang en
537
+ ```
538
+
539
+ **Language priority for commit messages:**
540
+ 1. `language.commit` setting (if specified)
541
+ 2. `language.output` (fallback)
542
+ 3. `"en"` (default)
543
+
544
+ **Note:** The commit type (feat, fix, docs, etc.) and scope always remain in English. Only the description part uses the configured language.
545
+
525
546
  ### Configuration File
526
547
 
527
548
  The `.codexspec/config.yml` file stores language settings:
@@ -533,6 +554,10 @@ language:
533
554
  # Output language for Claude interactions and generated documents
534
555
  output: "zh-CN"
535
556
 
557
+ # Commit message language (defaults to output language)
558
+ # Set to "en" for English commit messages regardless of output language
559
+ commit: "zh-CN"
560
+
536
561
  # Template language - keep as "en" for compatibility
537
562
  templates: "en"
538
563
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codexspec"
3
- version = "0.3.3"
3
+ version = "0.3.4"
4
4
  description = "CodexSpec - A Spec-Driven Development (SDD) toolkit for Claude Code"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -159,6 +159,12 @@ def config(
159
159
  "-l",
160
160
  help="Set the output language (e.g., en, zh-CN, ja)",
161
161
  ),
162
+ set_commit_lang: Optional[str] = typer.Option(
163
+ None,
164
+ "--set-commit-lang",
165
+ "-c",
166
+ help="Set the commit message language (defaults to output language)",
167
+ ),
162
168
  list_langs: bool = typer.Option(
163
169
  False,
164
170
  "--list-langs",
@@ -172,9 +178,10 @@ def config(
172
178
  settings such as the output language for internationalization.
173
179
 
174
180
  Examples:
175
- codexspec config # Show current configuration
176
- codexspec config --set-lang zh-CN # Set language to Chinese
177
- codexspec config --list-langs # List supported languages
181
+ codexspec config # Show current configuration
182
+ codexspec config --set-lang zh-CN # Set language to Chinese
183
+ codexspec config --set-commit-lang en # Set commit messages to English
184
+ codexspec config --list-langs # List supported languages
178
185
  """
179
186
  # Handle list languages
180
187
  if list_langs:
@@ -237,6 +244,64 @@ def config(
237
244
  raise typer.Exit(1)
238
245
  return
239
246
 
247
+ # Handle set commit language
248
+ if set_commit_lang:
249
+ normalized = normalize_locale(set_commit_lang)
250
+ if not is_supported_language(normalized):
251
+ console.print(
252
+ f"[yellow]Warning: '{set_commit_lang}' is not in the list of commonly supported languages.[/yellow]"
253
+ )
254
+ console.print(
255
+ "It may still work if Claude supports it. "
256
+ "Run [cyan]codexspec config --list-langs[/cyan] to see supported languages."
257
+ )
258
+
259
+ # Read existing config
260
+ config_content = config_file.read_text(encoding="utf-8")
261
+
262
+ # Update or add commit language setting
263
+ lines = config_content.split("\n")
264
+ new_lines = []
265
+ in_language_section = False
266
+ found_commit = False
267
+ output_indent = 2 # Default indent for language section
268
+
269
+ for i, line in enumerate(lines):
270
+ if line.strip().startswith("language:"):
271
+ in_language_section = True
272
+ new_lines.append(line)
273
+ elif in_language_section and line.strip().startswith("output:"):
274
+ output_indent = len(line) - len(line.lstrip())
275
+ new_lines.append(line)
276
+ elif in_language_section and line.strip().startswith("commit:"):
277
+ # Update existing commit line
278
+ indent = len(line) - len(line.lstrip())
279
+ new_lines.append(" " * indent + f'commit: "{normalized}"')
280
+ found_commit = True
281
+ in_language_section = False
282
+ elif in_language_section and (
283
+ line.strip().startswith("templates:")
284
+ or (not line.strip().startswith(" ") and line.strip() and not line.strip().startswith("#"))
285
+ ):
286
+ # We've reached templates or another section without finding commit
287
+ # Insert commit before templates
288
+ if not found_commit:
289
+ new_lines.append(" " * output_indent + f'commit: "{normalized}"')
290
+ found_commit = True
291
+ new_lines.append(line)
292
+ in_language_section = False
293
+ else:
294
+ new_lines.append(line)
295
+
296
+ # If we never found a place to add commit, append it after output
297
+ if not found_commit and in_language_section:
298
+ new_lines.append(" " * output_indent + f'commit: "{normalized}"')
299
+
300
+ config_file.write_text("\n".join(new_lines), encoding="utf-8")
301
+ lang_name = get_language_name(normalized)
302
+ console.print(f"[green]Commit message language set to:[/green] {normalized} ({lang_name})")
303
+ return
304
+
240
305
  # Display current configuration
241
306
  console.print(
242
307
  Panel(
@@ -176,6 +176,11 @@ language:
176
176
  # Common values: en, zh-CN, zh-TW, ja, ko, es, fr, de, pt, ru
177
177
  output: "{language}"
178
178
 
179
+ # Commit message language - language for git commit messages
180
+ # Defaults to output language if not specified
181
+ # Set to "en" for English commit messages regardless of output language
182
+ commit: "{language}"
183
+
179
184
  # Template language - keep as "en" for best compatibility
180
185
  # All command templates are in English and translated dynamically
181
186
  templates: "en"
@@ -5,11 +5,17 @@ allowed-tools: Bash(git diff:*), Bash(git commit:*)
5
5
 
6
6
  ## Language Preference
7
7
 
8
- **IMPORTANT**: Before proceeding, read the project's language configuration from `.codexspec/config.yml`.
9
- - If `language.output` is set to a language other than "en", respond and generate all content in that language
10
- - If not configured or set to "en", use English as default
8
+ **IMPORTANT**: Before generating commit messages, read the project's language configuration from `.codexspec/config.yml`.
9
+
10
+ **Commit message language priority**:
11
+ 1. If `language.commit` is set, use that language for the commit message description
12
+ 2. Otherwise, use `language.output` as fallback
13
+ 3. If neither is configured, default to English
14
+
15
+ **Note**:
16
+ - The commit type (feat, fix, docs, etc.) and scope should always remain in English
17
+ - Only the description part should use the configured language
11
18
  - Technical terms (e.g., API, JWT, OAuth) may remain in English when appropriate
12
- - All user-facing messages, questions, and generated documents should use the configured language
13
19
 
14
20
  ## Instructions
15
21
 
@@ -19,6 +25,9 @@ allowed-tools: Bash(git diff:*), Bash(git commit:*)
19
25
  - Format: `type(scope): description`
20
26
  - Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
21
27
  - If the project has a `CLAUDE.md` with custom commit conventions, follow those instead
28
+ - **DO NOT** include any AI attribution in the commit message
29
+ - Do not add `Co-Authored-By` lines or any references to AI tools/agents
30
+ - The commit message should focus solely on describing the changes
22
31
 
23
32
  3. Present the generated commit message to the user and ask for confirmation.
24
33
 
@@ -5,11 +5,22 @@ allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git branch:*), Bash(gi
5
5
 
6
6
  ## Language Preference
7
7
 
8
- **IMPORTANT**: Before proceeding, read the project's language configuration from `.codexspec/config.yml`.
9
- - If `language.output` is set to a language other than "en", respond and generate all content in that language
10
- - If not configured or set to "en", use English as default
8
+ **IMPORTANT**: Before generating commit messages, read the project's language configuration from `.codexspec/config.yml`.
9
+
10
+ **Commit message language priority**:
11
+ 1. If `language.commit` is set, use that language for the commit message description
12
+ 2. Otherwise, use `language.output` as fallback
13
+ 3. If neither is configured, default to English
14
+
15
+ **Note**:
16
+ - The commit type (feat, fix, docs, etc.) and scope should always remain in English
17
+ - Only the description part should use the configured language
11
18
  - Technical terms (e.g., API, JWT, OAuth) may remain in English when appropriate
12
- - All user-facing messages, commit messages, and interactions should use the configured language
19
+
20
+ **Examples**:
21
+ - `output: "zh-CN"` + `commit: "en"` → Chinese interactions, English commits
22
+ - `output: "zh-CN"` + `commit: "zh-CN"` → Chinese for both
23
+ - `output: "zh-CN"` + no `commit` setting → Chinese for both (fallback)
13
24
 
14
25
  ## Git Context Collection
15
26
 
@@ -53,6 +64,9 @@ Generate commit messages following **Conventional Commits** specification:
53
64
  - If the project has a `CLAUDE.md` with custom commit conventions, follow those instead
54
65
  - For breaking changes, include `BREAKING CHANGE:` in the commit body
55
66
  - Keep the description concise and in imperative mood (e.g., "add feature" not "added feature")
67
+ - **DO NOT** include any AI attribution in the commit message
68
+ - Do not add `Co-Authored-By` lines or any references to AI tools/agents
69
+ - The commit message should focus solely on describing the changes
56
70
 
57
71
  ## Session Context Awareness
58
72
 
File without changes
File without changes