commitwise 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
commitwise/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__='0.1.3'
1
+ __version__='0.1.4'
commitwise/ai/base.py CHANGED
@@ -7,21 +7,44 @@ class AIEngine(ABC):
7
7
  """
8
8
 
9
9
  default_prompt: str = """
10
- You are generating a git commit message.
10
+ You are generating a Git commit message.
11
11
 
12
- Rules:
13
- - Output ONLY the commit message text.
14
- - Do NOT include explanations.
15
- - Do NOT include markdown.
16
- - Do NOT include code fences.
17
- - Do NOT include phrases like "Here is" or "This commit message".
12
+ STRICT RULES:
13
+ - Output ONLY the commit message text.
14
+ - Do NOT include explanations, markdown, code fences, or extra text.
15
+ - Do NOT say things like "Here is" or "This commit message".
18
16
 
19
- Format:
20
- - First line: short imperative summary (max 72 chars)
21
- - Blank line
22
- - Optional detailed description
17
+ FORMAT:
18
+ 1. Use Conventional Commits format:
19
+ <type>(<optional scope>): <short imperative summary>
20
+
21
+ 2. Allowed types:
22
+ feat, fix, refactor, docs, test, chore
23
+
24
+ 3. The first line:
25
+ - Must be imperative (e.g. add, fix, refactor, remove)
26
+ - Must be concise and clear
27
+ - Must be at most 72 characters
28
+
29
+ 4. If a body is needed:
30
+ - Leave exactly one blank line after the title
31
+ - Each line MUST start with "- "
32
+ - Describe WHAT changed (not why)
33
+ - Keep lines short and scannable
34
+
35
+ 5. Do NOT invent changes.
36
+ - Only describe what is present in the staged diff.
37
+
38
+ EXAMPLE OUTPUT:
39
+
40
+ refactor(ai): centralize and enforce strict commit prompt
41
+
42
+ - move AI commit prompt to base AIEngine
43
+ - enforce clean, git-ready output rules
44
+ - remove duplicated prompt logic from AI engines
45
+
46
+ STAGED DIFF:
23
47
 
24
- Staged diff:
25
48
  """
26
49
 
27
50
  def __init__(self, prompt: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commitwise
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Generate clean git commit messages from files or AI
5
5
  Author-email: Abolfazl Hassan Zade <abolfazl.hassanzade.81@gmail.com>
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- commitwise/__init__.py,sha256=8_G4YrdBQ1Ef7UHLldfRRevGRQbycmzx48cOx_z7H_U,19
1
+ commitwise/__init__.py,sha256=Xrz0EUwWpxrSR-X3O-Nw0Kt1zy_W_Q6GvyVJPrqok1U,19
2
2
  commitwise/ai_source.py,sha256=BD79fQQb654AaKmHH2_JzVidzwUEHd55ny5aO0e5vtU,1417
3
3
  commitwise/cli.py,sha256=TiGYUgeoKF70IHLNNMJVTB6MkDJCkmpctOvEgbnHtpg,1418
4
4
  commitwise/cli_utils.py,sha256=QN2N8JaNQ9hLFXTGZPCKwjJ4wK5sTljNLEuOttYU-yc,2285
@@ -6,11 +6,11 @@ commitwise/config.py,sha256=Jovf7YfV0N8CFz2jBns_UBAgfuO8un8fivezNFGSbYc,253
6
6
  commitwise/file_source.py,sha256=3pzFAsFYyXQSLQrfr_YGA5GAV-vtUP5Co4YhG-XOhnc,751
7
7
  commitwise/git_utils.py,sha256=BvccuWoBbJzblWaEnCeCiXKD2eE6mIc1Z5vwGcCzNHE,2110
8
8
  commitwise/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- commitwise/ai/base.py,sha256=v7DoQLPOeYmOfVXtvMtDWVS7DBMOGQylDv_dvScXkBk,929
9
+ commitwise/ai/base.py,sha256=XYEzORaAiKvMd8tYRKqE_eE2D3iK2zXK3dXl5rJxNCs,1737
10
10
  commitwise/ai/local_engine.py,sha256=YwiusAokL_t0PiJ53gf8IAJGynHrEYAv0Cyy_QpdnpM,1007
11
11
  commitwise/ai/openai_engine.py,sha256=8_xErkmsjzXyNwlPVgrlwxumt2y5ZhhWYo1I9nUKpqE,1006
12
- commitwise-0.1.3.dist-info/METADATA,sha256=kQQAbKx2rAZrY6O5EGkgZbTd4Vyn8OS0AXeYKZpTyzQ,3249
13
- commitwise-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- commitwise-0.1.3.dist-info/entry_points.txt,sha256=WUow9mgob_PQfVpk5QuVpoWXYnALsOar3NCyDWJCQuk,51
15
- commitwise-0.1.3.dist-info/top_level.txt,sha256=8uL7do0ZoZw67O5fzMSxbqQcJkMH3OHeHhONQuS3D88,11
16
- commitwise-0.1.3.dist-info/RECORD,,
12
+ commitwise-0.1.4.dist-info/METADATA,sha256=60LLPGcaO7Gdb45YdZcgiCCXlFdnIs6FZFBjH6-jib0,3249
13
+ commitwise-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ commitwise-0.1.4.dist-info/entry_points.txt,sha256=WUow9mgob_PQfVpk5QuVpoWXYnALsOar3NCyDWJCQuk,51
15
+ commitwise-0.1.4.dist-info/top_level.txt,sha256=8uL7do0ZoZw67O5fzMSxbqQcJkMH3OHeHhONQuS3D88,11
16
+ commitwise-0.1.4.dist-info/RECORD,,