ara-cli 0.1.9.62__py3-none-any.whl → 0.1.9.63__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.

Potentially problematic release.


This version of ara-cli might be problematic. Click here for more details.

@@ -128,7 +128,10 @@ def list_tags_action(args):
128
128
  tag_classifier = args.include_classifier
129
129
 
130
130
  tag_extractor = TagExtractor()
131
- tags = tag_extractor.extract_tags(include_classifier=tag_classifier)
131
+ tags = tag_extractor.extract_tags(
132
+ include_classifier=tag_classifier,
133
+ filtered_extra_column=getattr(args, "filtered_extra_column", False)
134
+ )
132
135
 
133
136
  if args.json:
134
137
  output = json.dumps({"tags": tags})
@@ -121,6 +121,7 @@ def list_tags_parser(subparsers):
121
121
  tags_parser = subparsers.add_parser("list-tags", help="Show tags")
122
122
  tags_parser.add_argument("--json", "-j", help="Output tags as JSON", action=argparse.BooleanOptionalAction)
123
123
  tags_parser.add_argument("--include-classifier", choices=classifiers, help="Show tags for an artefact type")
124
+ tags_parser.add_argument("--filtered-extra-column", action="store_true", help="Filter tags for extra column")
124
125
 
125
126
 
126
127
  def add_chat_arguments(chat_parser):
@@ -83,26 +83,38 @@ def construct_prompt(artefact_type, reason, file_path, artefact_text):
83
83
 
84
84
  prompt = (
85
85
  f"Correct the following {artefact_type} artefact to fix the issue: {reason}. "
86
- f"Provide the complete, corrected artefact. Don't change the artefact's content, "
87
- f"just fix the pydantic model errors. You should follow the name of the file "
88
- f"from its path {file_path} for naming the arteafact's title. The current artefact is:\n{artefact_text}"
86
+ "Provide the complete, corrected artefact. Do not reformulate the artefact, "
87
+ "just fix the pydantic model errors, use correct grammar. "
88
+ "Do not remove comments. "
89
+ "You should follow the name of the file "
90
+ f"from its path {file_path} for naming the arteafact's title. "
91
+ "You are not allowed to use file extention in the artefact title. "
92
+ "You are not allowed to modify, delete or add tags. "
93
+ "User tag should be '@user_<username>'. The pydantic model already provides the '@user_' prefix. "
94
+ "So you should be careful to not make it @user_user_<username>. "
89
95
  )
90
96
 
91
97
  if artefact_type == ArtefactType.task:
92
98
  prompt += (
93
- "\nFor task artefacts, if the action items looks like template or empty "
99
+ "For task artefacts, if the action items looks like template or empty "
94
100
  "then just delete those action items."
95
- "\nFor user tag it should be '@user_{username}'. So you should be careful to "
96
- "not make it @user_user_{username}"
97
101
  )
98
102
 
103
+ prompt += (
104
+ "\nThe current artefact is:\n"
105
+ "```\n"
106
+ f"{artefact_text}\n"
107
+ "```"
108
+ )
109
+
99
110
  return prompt
100
111
 
101
112
 
102
113
  def run_agent(prompt, artefact_class):
103
114
  from pydantic_ai import Agent
104
-
105
- agent = Agent(model="openai:gpt-4o",
115
+ # gpt-4o
116
+ # anthropic:claude-3-7-sonnet-20250219
117
+ agent = Agent(model="gpt-4o",
106
118
  result_type=artefact_class, instrument=True)
107
119
  result = agent.run_sync(prompt)
108
120
  return result.data
@@ -179,7 +179,7 @@ class Artefact(BaseModel, ABC):
179
179
  )
180
180
  description: Optional[str] = Field(
181
181
  default=None,
182
- description="Optional further description to understand the artefact. It is strongly recommended to add a description to every artefact."
182
+ description="Optional further description to understand the artefact. The description should summerize the core intention of the artefact and give additional valuable information about the artefact."
183
183
  )
184
184
 
185
185
  @property
@@ -33,9 +33,14 @@ class BusinessgoalIntent(Intent):
33
33
  return v
34
34
 
35
35
  def serialize(self):
36
+ from ara_cli.artefact_models.serialize_helper import as_a_serializer
37
+
36
38
  lines = []
39
+
40
+ as_a_line = as_a_serializer(self.as_a)
41
+
37
42
  lines.append(f"In order to {self.in_order_to}")
38
- lines.append(f"As a {self.as_a}")
43
+ lines.append(as_a_line)
39
44
  lines.append(f"I want {self.i_want}")
40
45
 
41
46
  return "\n".join(lines)
@@ -34,9 +34,14 @@ class EpicIntent(Intent):
34
34
  return v
35
35
 
36
36
  def serialize(self):
37
+ from ara_cli.artefact_models.serialize_helper import as_a_serializer
38
+
37
39
  lines = []
40
+
41
+ as_a_line = as_a_serializer(self.as_a)
42
+
38
43
  lines.append(f"In order to {self.in_order_to}")
39
- lines.append(f"As a {self.as_a}")
44
+ lines.append(as_a_line)
40
45
  lines.append(f"I want {self.i_want}")
41
46
 
42
47
  return "\n".join(lines)
@@ -34,8 +34,13 @@ class FeatureIntent(Intent):
34
34
  return v
35
35
 
36
36
  def serialize(self):
37
+ from ara_cli.artefact_models.serialize_helper import as_a_serializer
38
+
37
39
  lines = []
38
- lines.append(f"As a {self.as_a}")
40
+
41
+ as_a_line = as_a_serializer(self.as_a)
42
+
43
+ lines.append(as_a_line)
39
44
  lines.append(f"I want to {self.i_want_to}")
40
45
  lines.append(f"So that {self.so_that}")
41
46
 
@@ -59,9 +64,9 @@ class FeatureIntent(Intent):
59
64
  as_a = line[len(as_a_prefix):].strip()
60
65
  if line.startswith(as_a_prefix_alt) and not as_a:
61
66
  as_a = line[len(as_a_prefix_alt):].strip()
62
- elif line.startswith(i_want_to_prefix) and not i_want_to:
67
+ if line.startswith(i_want_to_prefix) and not i_want_to:
63
68
  i_want_to = line[len(i_want_to_prefix):].strip()
64
- elif line.startswith(so_that_prefix) and not so_that:
69
+ if line.startswith(so_that_prefix) and not so_that:
65
70
  so_that = line[len(so_that_prefix):].strip()
66
71
  index += 1
67
72
 
@@ -33,9 +33,14 @@ class KeyfeatureIntent(Intent):
33
33
  return v
34
34
 
35
35
  def serialize(self):
36
+ from ara_cli.artefact_models.serialize_helper import as_a_serializer
37
+
36
38
  lines = []
39
+
40
+ as_a_line = as_a_serializer(self.as_a)
41
+
37
42
  lines.append(f"In order to {self.in_order_to}")
38
- lines.append(f"As a {self.as_a}")
43
+ lines.append(as_a_line)
39
44
  lines.append(f"I want {self.i_want}")
40
45
 
41
46
  return "\n".join(lines)
@@ -0,0 +1,18 @@
1
+ def as_a_serializer(as_a):
2
+ role = as_a.strip()
3
+
4
+ exceptions_for_a = ('user', 'university', 'one-time', 'european', 'unit')
5
+ exceptions_for_an = ('hour', 'honest', 'heir')
6
+ role_lower = role.lower()
7
+ as_a_prefix = ""
8
+
9
+ if any(role_lower.startswith(e) for e in exceptions_for_a):
10
+ as_a_prefix = "As a"
11
+ elif any(role_lower.startswith(e) for e in exceptions_for_an):
12
+ as_a_prefix = "As an"
13
+ elif role_lower.startswith(('a', 'e', 'i', 'o', 'u')):
14
+ as_a_prefix = "As an"
15
+ else:
16
+ as_a_prefix = "As a"
17
+
18
+ return f"{as_a_prefix} {role}"
@@ -33,9 +33,14 @@ class UserstoryIntent(Intent):
33
33
  return v
34
34
 
35
35
  def serialize(self):
36
+ from ara_cli.artefact_models.serialize_helper import as_a_serializer
37
+
36
38
  lines = []
39
+
40
+ as_a_line = as_a_serializer(self.as_a)
41
+
37
42
  lines.append(f"In order to {self.in_order_to}")
38
- lines.append(f"As a {self.as_a}")
43
+ lines.append(as_a_line)
39
44
  lines.append(f"I want {self.i_want}")
40
45
 
41
46
  return "\n".join(lines)
ara_cli/artefact_scan.py CHANGED
@@ -25,6 +25,8 @@ def find_invalid_files(classified_artefact_info, classifier):
25
25
  for artefact_info in classified_artefact_info[classifier]:
26
26
  if "templates/" in artefact_info["file_path"]:
27
27
  continue
28
+ if ".data" in artefact_info["file_path"]:
29
+ continue
28
30
  is_valid, reason = check_file(artefact_info["file_path"], artefact_class)
29
31
  if not is_valid:
30
32
  invalid_files.append((artefact_info["file_path"], reason))
ara_cli/tag_extractor.py CHANGED
@@ -6,7 +6,7 @@ class TagExtractor:
6
6
  def __init__(self, file_system=None):
7
7
  self.file_system = file_system or os
8
8
 
9
- def extract_tags(self, navigate_to_target=False, include_classifier=None):
9
+ def extract_tags(self, navigate_to_target=False, include_classifier=None, filtered_extra_column=False):
10
10
  from ara_cli.template_manager import DirectoryNavigator
11
11
  from ara_cli.artefact_reader import ArtefactReader
12
12
 
@@ -21,11 +21,36 @@ class TagExtractor:
21
21
 
22
22
  unique_tags = set()
23
23
 
24
- for artefact_list in artefacts.values():
25
- for artefact in artefact_list:
26
- user_tags = [f"user_{tag}" for tag in artefact.users]
27
- tags = [tag for tag in (artefact.tags + [artefact.status] + user_tags) if tag is not None]
28
- unique_tags.update(tags)
24
+ if filtered_extra_column:
25
+ status_tags = {"to-do", "in-progress", "review", "done", "closed"}
26
+ filtered_artefacts = []
27
+
28
+ for artefact_list in artefacts.values():
29
+ for artefact in artefact_list:
30
+ tags = artefact.tags + \
31
+ [artefact.status] if artefact.status else artefact.tags
32
+ tag_set = set(tag for tag in tags if tag is not None)
33
+ if not tag_set & status_tags:
34
+ filtered_artefacts.append(artefact)
35
+
36
+ for artefact in filtered_artefacts:
37
+ tags = [tag for tag in (
38
+ artefact.tags + [artefact.status]) if tag is not None]
39
+ for tag in tags:
40
+ if (
41
+ tag in status_tags
42
+ or tag.startswith("priority_")
43
+ or tag.startswith("user_")
44
+ ):
45
+ continue
46
+ unique_tags.add(tag)
47
+
48
+ else:
49
+ for artefact_list in artefacts.values():
50
+ for artefact in artefact_list:
51
+ user_tags = [f"user_{tag}" for tag in artefact.users]
52
+ tags = [tag for tag in (artefact.tags + [artefact.status] + user_tags) if tag is not None]
53
+ unique_tags.update(tags)
29
54
 
30
55
  sorted_tags = sorted(unique_tags)
31
56
  return sorted_tags
ara_cli/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # version.py
2
- __version__ = "0.1.9.62" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
2
+ __version__ = "0.1.9.63" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ara_cli
3
- Version: 0.1.9.62
3
+ Version: 0.1.9.63
4
4
  Requires-Dist: litellm
5
5
  Requires-Dist: llama-index
6
6
  Requires-Dist: llama-index-llms-openai
@@ -1,9 +1,9 @@
1
1
  ara_cli/__init__.py,sha256=0zl7IegxTid26EBGLav_fXZ4CCIV3H5TfAoFQiOHjvg,148
2
2
  ara_cli/__main__.py,sha256=Z6XYWRLceIoZPvfC-X9EXouSZdtFOOe84kKVWJGA4r4,1861
3
- ara_cli/ara_command_action.py,sha256=a2NP1cfWnqSkWWGFG_7iMkIkkOTYd83e_kWzdNyKDTI,19618
4
- ara_cli/ara_command_parser.py,sha256=qsPo1nsln-vdQUGykH2Zaa3-f1gqcf3c-td0WwSn4r0,17067
3
+ ara_cli/ara_command_action.py,sha256=SfWcXsLjaUdOpME2qJJ0pcCSXKY5M-zbSyj0W3u_8h4,19709
4
+ ara_cli/ara_command_parser.py,sha256=aRxqKr0-pAuI45IuM-H4-ouc101h1_xTuEVJHXocPV0,17182
5
5
  ara_cli/ara_config.py,sha256=_Arkr-b9XnrNHbBlFKb9tAo3OmdP4ZZiWvbY9m6Sbo0,4178
6
- ara_cli/artefact_autofix.py,sha256=If9a7C6B2i7hpyquQ4pDGCUtXvmHVhFkjF2I0QtqaLg,4533
6
+ ara_cli/artefact_autofix.py,sha256=kkmf9hhvxqYicAm4kUDxFD1LoTr8KSPI5l12KRoZvqw,4900
7
7
  ara_cli/artefact_creator.py,sha256=mkxKHkVIK2GdmUrKHAjKvhq66eg21S3x_cvK1ZA9DPw,5964
8
8
  ara_cli/artefact_deleter.py,sha256=Co4wwCH3yW8H9NrOq7_2p5571EeHr0TsfE-H8KqoOfY,1900
9
9
  ara_cli/artefact_fuzzy_search.py,sha256=XAvoiRafd1u21uKbX5-bow7hdq7uiLLy1KtxHNAFbCk,1337
@@ -11,7 +11,7 @@ ara_cli/artefact_link_updater.py,sha256=itMS_Z64jE8bBly9WA01z8PqkBeNW6ntTO7ryMeC
11
11
  ara_cli/artefact_lister.py,sha256=jhk4n4eqp7hDIq07q43QzS7-36BM3OfZ4EABxCeOGcw,4764
12
12
  ara_cli/artefact_reader.py,sha256=qNaMPWShmWtDU5LLdh9efFB27djI4NAoq6zEFwdTd38,6983
13
13
  ara_cli/artefact_renamer.py,sha256=loIn1DF9kVnjhH7wP1v5qUvt3s0uKeWXuQPrHXenQGE,4025
14
- ara_cli/artefact_scan.py,sha256=bIk_xa_nB2oQHjBeYChwHwHIxo5hDjYhzq-KWCWmUFE,1879
14
+ ara_cli/artefact_scan.py,sha256=7PH7TE2B2Py7wGQxl7EYM3r6Fr9kVLAFtNErP0QRoXM,1950
15
15
  ara_cli/chat.py,sha256=7xTtPEDk052_wmIzoti7GavEJ1vpRxe5c084WQ1C7dg,28617
16
16
  ara_cli/classifier.py,sha256=zWskj7rBYdqYBGjksBm46iTgVU5IIf2PZsJr4qeiwVU,1878
17
17
  ara_cli/codefusionretriever.py,sha256=fCHgXdIBRzkVAnapX-KI2NQ44XbrrF4tEQmn5J6clUI,1980
@@ -28,23 +28,24 @@ ara_cli/prompt_extractor.py,sha256=gidrCI8wTLfPL0ktqiXyPeGdQEB0S0sZegSOiF1Nn0Y,7
28
28
  ara_cli/prompt_handler.py,sha256=PzHoIPTAWtRleOMtprhyYlFfo59S5T_kzHHkrwL-cNU,17155
29
29
  ara_cli/prompt_rag.py,sha256=vmlt4-rSboWibwgO_KUF79TK99YXT5KXjmbD9FeWdZY,7449
30
30
  ara_cli/run_file_lister.py,sha256=XbrrDTJXp1LFGx9Lv91SNsEHZPP-PyEMBF_P4btjbDA,2360
31
- ara_cli/tag_extractor.py,sha256=R5T103Y60NppYifKV7b8KoI5kE1M66fULz6f_Fdc9VU,1081
31
+ ara_cli/tag_extractor.py,sha256=IrjX8R8pdas3_qWuDsXXnwCVDD0uUrgqjzfqTD81t3I,2173
32
32
  ara_cli/template_manager.py,sha256=YXPj2jGNDb-diIHFEK_vGJ-ZucodnXSGAPofKTnOofI,6633
33
33
  ara_cli/update_config_prompt.py,sha256=PZgNIN3dTw6p80GyX8Sp5apkAhSoykwnkEbHo3IOkUo,4571
34
- ara_cli/version.py,sha256=UDea-52RJGs95q2okzxXLTnZ6sNY38mCpNb6vavgKKU,146
34
+ ara_cli/version.py,sha256=BPYHhB5DXV3V9HaoG9jWNjJoI6MwS8Abg07dp1EjppU,146
35
35
  ara_cli/artefact_models/artefact_load.py,sha256=dNcwZDW2Dk0bts9YnPZ0ESmWD2NbsLIvl4Z-qQeGmTQ,401
36
36
  ara_cli/artefact_models/artefact_mapping.py,sha256=8aD0spBjkJ8toMAmFawc6UTUxB6-tEEViZXv2I-r88Q,1874
37
- ara_cli/artefact_models/artefact_model.py,sha256=vV-Hhtl6DwVt7qcFTnxxr_WqyTZnKtkFU-nryVnTbUg,14853
37
+ ara_cli/artefact_models/artefact_model.py,sha256=W_jxafOd7d-1SxvB2G8dKG7_rT5t-EZo1-PnvlPHqso,14915
38
38
  ara_cli/artefact_models/artefact_templates.py,sha256=Vd7SwoRVKNGKZmxBKS6f9FE1ThUOCqZLScu0ClPfIu8,8321
39
- ara_cli/artefact_models/businessgoal_artefact_model.py,sha256=mgLOgVRR8MrUqWX6ovcHo7octdfi8AaJiJcbrL4F9R4,4728
39
+ ara_cli/artefact_models/businessgoal_artefact_model.py,sha256=jqYFMXjWle0YW9RvcFLDBAwy61bdT5VuDT_6lTOFzMw,4853
40
40
  ara_cli/artefact_models/capability_artefact_model.py,sha256=SZqHx4O2mj4urn77Stnj4_Jxtlq3-LgBBU9SMkByppI,3079
41
- ara_cli/artefact_models/epic_artefact_model.py,sha256=KKwW-vZkdso2L-wAWNWbLfGXGQK8M4A10sldDxi8QVE,5648
41
+ ara_cli/artefact_models/epic_artefact_model.py,sha256=IadQWs6SWNcLgwvtOQWmYDyV9xLr3WwAsx-YMFan5fA,5765
42
42
  ara_cli/artefact_models/example_artefact_model.py,sha256=UXrKbaPotg1jwcrVSdCeo-XH4tTD_-U1e3giaBn5_xg,1384
43
- ara_cli/artefact_models/feature_artefact_model.py,sha256=7QgX0C5WC0QCUX29xbZFwUNaD74gb7l4PQFcA8GhULU,13125
43
+ ara_cli/artefact_models/feature_artefact_model.py,sha256=TWJ7N0P2Wd8VtpbBPwJoiDnDSbHSRPPjyDfpvA-IqYc,13238
44
44
  ara_cli/artefact_models/issue_artefact_model.py,sha256=v6CpKnkqiUh6Wch2kkEmyyW49c8ysdy1qz8l1Ft9uJA,2552
45
- ara_cli/artefact_models/keyfeature_artefact_model.py,sha256=sD4tBgQQGTZ-PcYVDb3cp81rT2SQy8kQ-V9NxRGrYu8,4126
45
+ ara_cli/artefact_models/keyfeature_artefact_model.py,sha256=a3MyAiePN9n_GTN6QkTvamdsaorwVUff6w-9CdRZSlo,4243
46
+ ara_cli/artefact_models/serialize_helper.py,sha256=0XCruO70-fyfLfTn7pnt8NrSQe79eYNUAjuQaV8K6_8,586
46
47
  ara_cli/artefact_models/task_artefact_model.py,sha256=kHMw_Tr-Ud3EeHWpRWy4jI0xFnPzGZ-FT52c5rSrT1k,3558
47
- ara_cli/artefact_models/userstory_artefact_model.py,sha256=oJ8sHX-RbqGotehfUF43xs-5TsZh8PTmEtgjUfc7lWQ,6465
48
+ ara_cli/artefact_models/userstory_artefact_model.py,sha256=u6G8wdeE2EpOsg1OPR-s8uShB4A77GfqN0vkSSuthFI,6582
48
49
  ara_cli/artefact_models/vision_artefact_model.py,sha256=KcNE3QQjyT29ZMMhCQo4pOcXKTkI6pXLvyfqoN2kuUQ,5920
49
50
  ara_cli/templates/agile.artefacts,sha256=nTA8dp98HWKAD-0qhmNpVYIfkVGoJshZqMJGnphiOsE,7932
50
51
  ara_cli/templates/template.businessgoal,sha256=3OU-y8dOCRbRsB9ovBzwFPxHSbG0dqbkok0uJnZIOd4,524
@@ -149,8 +150,8 @@ ara_cli/tests/test_list_filter.py,sha256=gSRKirTtFuhRS3QlFHqWl89WvCvAdVEnFsCWTYm
149
150
  ara_cli/tests/test_tag_extractor.py,sha256=n2xNApbDciqKO3QuaveEWSPXU1PCUa_EhxlZMrukONw,2074
150
151
  ara_cli/tests/test_template_manager.py,sha256=bRxka6cxHsCAOvXjfG8MrVO8qSZXhxW01tnph80UtNk,3143
151
152
  ara_cli/tests/test_update_config_prompt.py,sha256=vSsLvc18HZdVjVM93qXWVbJt752xTLL6VGjSVCrPufk,6729
152
- ara_cli-0.1.9.62.dist-info/METADATA,sha256=qcj03ih0hWhPZ3etcPqr99iZNELjw53lz63Q5AsG8Zo,415
153
- ara_cli-0.1.9.62.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
154
- ara_cli-0.1.9.62.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
155
- ara_cli-0.1.9.62.dist-info/top_level.txt,sha256=zzee_PwFmKqfBi9XgIunP6xy2S4TIt593CLLxenNaAE,8
156
- ara_cli-0.1.9.62.dist-info/RECORD,,
153
+ ara_cli-0.1.9.63.dist-info/METADATA,sha256=gxNdNrzLFrDWHMMskXW_kMFj0qBeoxoyFxilCHDsQiQ,415
154
+ ara_cli-0.1.9.63.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
155
+ ara_cli-0.1.9.63.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
156
+ ara_cli-0.1.9.63.dist-info/top_level.txt,sha256=zzee_PwFmKqfBi9XgIunP6xy2S4TIt593CLLxenNaAE,8
157
+ ara_cli-0.1.9.63.dist-info/RECORD,,