codexspec 0.5.0__tar.gz → 0.5.2__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 (59) hide show
  1. {codexspec-0.5.0 → codexspec-0.5.2}/PKG-INFO +1 -1
  2. {codexspec-0.5.0 → codexspec-0.5.2}/pyproject.toml +1 -1
  3. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/translator.py +10 -5
  4. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/generate-spec.md +28 -7
  5. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/pr.md +5 -3
  6. {codexspec-0.5.0 → codexspec-0.5.2}/.gitignore +0 -0
  7. {codexspec-0.5.0 → codexspec-0.5.2}/LICENSE +0 -0
  8. {codexspec-0.5.0 → codexspec-0.5.2}/README.md +0 -0
  9. {codexspec-0.5.0 → codexspec-0.5.2}/codexspec-icon.svg +0 -0
  10. {codexspec-0.5.0 → codexspec-0.5.2}/codexspec-logo-dark.svg +0 -0
  11. {codexspec-0.5.0 → codexspec-0.5.2}/codexspec-logo-light.svg +0 -0
  12. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/bash/check-i18n-completeness.sh +0 -0
  13. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/bash/check-i18n-structure.sh +0 -0
  14. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/bash/check-prerequisites.sh +0 -0
  15. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/bash/common.sh +0 -0
  16. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/bash/create-new-feature.sh +0 -0
  17. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/powershell/check-prerequisites.ps1 +0 -0
  18. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/powershell/common.ps1 +0 -0
  19. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/powershell/create-new-feature.ps1 +0 -0
  20. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/python/README.md +0 -0
  21. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/python/claude_ctl.py +0 -0
  22. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/python/claude_monitor.py +0 -0
  23. {codexspec-0.5.0 → codexspec-0.5.2}/scripts/python/notify_telegram.py +0 -0
  24. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/__init__.py +0 -0
  25. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/commands/__init__.py +0 -0
  26. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/commands/installer.py +0 -0
  27. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/i18n.py +0 -0
  28. {codexspec-0.5.0 → codexspec-0.5.2}/src/codexspec/idea.md +0 -0
  29. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/analyze.md +0 -0
  30. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/check-i18n-semantics.md +0 -0
  31. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/checklist.md +0 -0
  32. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/clarify.md +0 -0
  33. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/commit-staged.md +0 -0
  34. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/constitution.md +0 -0
  35. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/implement-tasks.md +0 -0
  36. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/plan-to-tasks.md +0 -0
  37. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/review-plan.md +0 -0
  38. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/review-spec.md +0 -0
  39. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/review-tasks.md +0 -0
  40. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/spec-to-plan.md +0 -0
  41. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/specify.md +0 -0
  42. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/tasks-to-issues.md +0 -0
  43. {codexspec-0.5.0 → codexspec-0.5.2}/templates/commands/translate-docs.md +0 -0
  44. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/checklist-template.md +0 -0
  45. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/constitution-template.md +0 -0
  46. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/plan-template-detailed.md +0 -0
  47. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/plan-template-simple.md +0 -0
  48. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/spec-template-detailed.md +0 -0
  49. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/spec-template-simple.md +0 -0
  50. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/tasks-template-detailed.md +0 -0
  51. {codexspec-0.5.0 → codexspec-0.5.2}/templates/docs/tasks-template-simple.md +0 -0
  52. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/de.json +0 -0
  53. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/en.json +0 -0
  54. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/es.json +0 -0
  55. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/fr.json +0 -0
  56. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/ja.json +0 -0
  57. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/ko.json +0 -0
  58. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/pt-BR.json +0 -0
  59. {codexspec-0.5.0 → codexspec-0.5.2}/templates/translations/zh-CN.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexspec
3
- Version: 0.5.0
3
+ Version: 0.5.2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codexspec"
3
- version = "0.5.0"
3
+ version = "0.5.2"
4
4
  description = "CodexSpec - A Spec-Driven Development (SDD) toolkit for Claude Code"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -282,8 +282,8 @@ def extract_frontmatter_fields(content: str) -> dict[str, Optional[str]]:
282
282
  result["description"] = desc_match.group(1).strip()
283
283
 
284
284
  # Extract argument-hint (can be multiline with |)
285
- # First try multiline format with |
286
- hint_match = re.search(r"^argument-hint:\s*\|\s*\n((?: .+\n?)+)", frontmatter, re.MULTILINE)
285
+ # First try multiline format with | (supports empty lines)
286
+ hint_match = re.search(r"^argument-hint:\s*\|\s*\n((?: .+\n?|\s*\n)+)", frontmatter, re.MULTILINE)
287
287
  if hint_match:
288
288
  # Remove leading indentation from multiline strings
289
289
  hint_content = hint_match.group(1)
@@ -325,11 +325,16 @@ def apply_translations_to_template(content: str, translations: dict) -> str:
325
325
  # Check if original hint is multiline (uses |)
326
326
  if re.search(r"^argument-hint:\s*\|", content, re.MULTILINE):
327
327
  # Build new multiline content with proper indentation
328
+ # Only add indentation to non-empty lines
328
329
  hint_lines = new_hint.split("\n")
329
- indented_hint = "\n ".join(hint_lines)
330
- # Replace multiline hint - match the entire multiline block
330
+ indented_lines = [(" " + line) if line else "" for line in hint_lines]
331
+ indented_hint = "\n".join(indented_lines)
332
+ # Replace multiline hint - match the entire multiline block (supports empty lines)
331
333
  content = re.sub(
332
- r"(argument-hint:\s*\|)\s*\n((?: .+\n?)+)", rf"\g<1>\n {indented_hint}\n", content, flags=re.MULTILINE
334
+ r"(argument-hint:\s*\|)\s*\n((?: .+\n?|\s*\n)+)",
335
+ rf"\g<1>\n{indented_hint}\n",
336
+ content,
337
+ flags=re.MULTILINE,
333
338
  )
334
339
  else:
335
340
  # Replace single-line hint (with or without quotes)
@@ -23,12 +23,33 @@ You are now acting as a "Requirement Compiler". Execute the following operations
23
23
 
24
24
  ### Steps
25
25
 
26
- 1. **Determine Feature ID**: List directories in `.codexspec/specs/` using `ls` command to find existing spec directories (each spec is a directory named `{NNN}-{feature-name}/`). Determine the next sequential number (e.g., if `001-*` directory exists, use `002-`).
26
+ 1. **Determine Feature ID**: Generate a unique prefix using timestamp + random suffix:
27
27
 
28
- > **IMPORTANT**: Do NOT use Glob to detect existing specs - Glob only matches files, not directories. Use `ls` or `Bash` tool instead.
28
+ ```bash
29
+ # Get current timestamp
30
+ TIMESTAMP=$(date +"%Y-%m%d-%H%M")
29
31
 
30
- 2. **Create Feature Directory**: Create a new directory `.codexspec/specs/{NNN}-{feature-name}/` where:
31
- - `NNN` is the sequential number (001, 002, etc.)
32
+ # Generate 2-character random suffix from [a-z0-9]
33
+ RANDOM_SUFFIX=$(head /dev/urandom | LC_ALL=C tr -dc 'a-z0-9' | head -c 2)
34
+
35
+ # Full prefix: 16 characters (e.g., "2025-0321-1430k7")
36
+ PREFIX="${TIMESTAMP}${RANDOM_SUFFIX}"
37
+ ```
38
+
39
+ **Format Specification**:
40
+ - `YYYY`: 4-digit year (e.g., 2025)
41
+ - `MM`: 2-digit month (01-12)
42
+ - `DD`: 2-digit day (01-31)
43
+ - `HH`: 2-digit hour (00-23)
44
+ - `MM`: 2-digit minute (00-59)
45
+ - `{random}`: 2 random characters from [a-z0-9] (36 characters, 1296 combinations)
46
+
47
+ > **Format**: `{YYYY-MMDD-HHMM}{random}-{feature-name}`
48
+ > **Example**: `2025-0321-1430k7-user-authentication`
49
+ > **Regex**: `^\d{4}-\d{4}-\d{4}[a-z0-9]{2}-[a-z0-9-]+$`
50
+
51
+ 2. **Create Feature Directory**: Create a new directory `.codexspec/specs/{YYYY-MMDD-HHMM}{random}-{feature-name}/` where:
52
+ - `{YYYY-MMDD-HHMM}{random}` is the 16-character unique prefix (e.g., `2025-0321-1430k7`)
32
53
  - `feature-name` is a kebab-case description of the feature
33
54
 
34
55
  3. **Generate spec.md**: Create a comprehensive specification document including:
@@ -46,7 +67,7 @@ You are now acting as a "Requirement Compiler". Execute the following operations
46
67
 
47
68
  5. **Auto-Review Generated Spec**: After saving the spec, automatically run the review process:
48
69
  - Execute the same quality checks as `/codexspec:review-spec`
49
- - Generate a review report at `.codexspec/specs/{NNN}-{feature-name}/review-spec.md`
70
+ - Generate a review report at `.codexspec/specs/{YYYY-MMDD-HHMM}{random}-{feature-name}/review-spec.md`
50
71
  - If issues are found, present a summary and ask if user wants to fix them now or proceed
51
72
 
52
73
  ### Spec Template Structure
@@ -107,9 +128,9 @@ Before saving, verify:
107
128
 
108
129
  ### Output
109
130
 
110
- Save the specification to: `.codexspec/specs/{NNN}-{feature-name}/spec.md`
131
+ Save the specification to: `.codexspec/specs/{YYYY-MMDD-HHMM}{random}-{feature-name}/spec.md`
111
132
 
112
- A review report will also be generated at: `.codexspec/specs/{NNN}-{feature-name}/review-spec.md`
133
+ A review report will also be generated at: `.codexspec/specs/{YYYY-MMDD-HHMM}{random}-{feature-name}/review-spec.md`
113
134
 
114
135
  > [!IMPORTANT]
115
136
  > This command should be called after `/codexspec:specify` has clarified all requirements. It focuses on document generation, not requirement exploration.
@@ -71,7 +71,7 @@ By default, spec.md is **NOT** used. Use `--spec` to enable SDD workflow integra
71
71
  | Value | Behavior |
72
72
  |-------|----------|
73
73
  | (not specified) | No spec integration, generate from git only |
74
- | `001-auth` | Use `.codexspec/specs/001-auth/spec.md` |
74
+ | `2025-0321-1430k7-auth` | Use `.codexspec/specs/2025-0321-1430k7-auth/spec.md` |
75
75
  | `path/to/spec.md` | Use specified spec.md file path |
76
76
 
77
77
  **When to use**:
@@ -121,10 +121,12 @@ Only when `--spec` is provided, read spec.md for Context section.
121
121
 
122
122
  ### Spec Resolution
123
123
 
124
- 1. If `--spec` is a number like `001`, resolve to `.codexspec/specs/001-*/spec.md`
125
- 2. If `--spec` is a directory name like `001-auth`, resolve to `.codexspec/specs/001-auth/spec.md`
124
+ 1. If `--spec` is a partial prefix like `2025-0321`, resolve to `.codexspec/specs/2025-0321*/spec.md`
125
+ 2. If `--spec` is a full directory name like `2025-0321-1430k7-auth`, resolve to `.codexspec/specs/2025-0321-1430k7-auth/spec.md`
126
126
  3. If `--spec` is a path, use directly
127
127
 
128
+ > **Note**: Legacy sequential format directories (e.g., `001-feature`) are also supported for backward compatibility.
129
+
128
130
  ### Content Extraction (Best-Effort)
129
131
 
130
132
  Extract content from spec.md with priority order:
File without changes
File without changes
File without changes
File without changes