The user wants: "Develop a proactive backlog pruning assistant that uses heuristic scores to recommend merging, splitting, or discarding work items."
We need to create a solution. Typically this would be a software system. Possibly we need to design and implement a tool? The instruction: "Develop a proactive backlog pruning assistant that uses heuristic scores to recommend merging, splitting, or discarding work items." We need to produce something like a design document and maybe some code. As an AI, we can output a comprehensive answer: description, architecture, algorithms, implementation details, maybe sample code in a language like Python, using heuristics to score backlog items, and then recommendations.
We need to think of heuristics for backlog items: age, number of comments, dependencies, priority, estimated effort, actual effort, status, etc. Then compute a score that determines if item is stale, too big, or low value. For merging: if two items are similar or related, recommend merging. For splitting: if item is too large (high effort estimate) or has multiple distinct features, recommend splitting. For discarding: if item is very old, low priority, no activity, or low value.
We could implement a command-line tool that reads work items from a file (like CSV, JSON) and outputs recommendations. Or integrate with JIRA/other issue trackers via API. Since it's a general assistant, we can design it as a library or service.
We need to be proactive: maybe run periodically or on demand.
We'll produce: Introduction, Problem statement, System design, Heuristics, Algorithm, Implementation (maybe Python code), Usage examples, Limitations, Future enhancements.
Make it professional. Use markdown. We'll include pseudo code or actual code snippets.
We need to be careful: The user says "Develop a proactive backlog pruning assistant that uses heuristic scores to recommend merging, splitting, or discarding work items." So we need to deliver something. Since this is a text-based interface, we can provide the code and description.
Let's structure:
- Overview
- Core concepts: Backlog Item model
- Heuristic scoring: Define metrics and weights, compute a "pruning score".
- Recommendations:
- Discard: if score high (or low?) indicating low value.
- Split: if item complexity too high.
- Merge: if similarity above threshold.
- Architecture: Input source (e.g., JIRA, GitHub, CSV), processing engine, output (report, notifications).
- Implementation: Python module using pandas for data manipulation, optional JIRA integration.
- Example: Define sample data, run, show output.
- Extensibility: Adding custom heuristics, integration.
- Conclusion.
We'll provide a class BacklogItem with attributes: id, title, description, creation_date, last_updated, priority, story_points/effort, status, tags, dependencies, comments_count, etc.
Heuristics:
- Age: days since creation; older gets higher discard score? Actually older may be stale but if still open and no activity, discard. But if old and high priority, maybe keep.
- Inactivity: days since last update. High inactivity suggests discard or split? Typically items that haven't been touched for a long time may be irrelevant.
- Comment activity: low comments may indicate low interest; but some items may be simple and not need discussion. So maybe not strong.
- Dependencies: items with many dependencies might be risky; could suggest splitting or discarding if blocked.
- Effort: high effort items may be too big; recommend splitting into smaller items.
- Priority: low priority items may be candidates for discarding if they have low value.
- Similarity: compare titles/descriptions to find duplicates/similar; recommend merging.
- Epic association: if an item belongs to an epic that is no longer relevant, discard.
- Team/owner: items assigned to inactive team members might be stale.
We can assign weights to each factor and compute a score between 0-1 or something. Then define thresholds: e.g., if discard_score > 0.8 -> recommend discard. If effort > X -> recommend split. If similarity > Y -> recommend merge.
But we need a unified heuristic scoring? Could be separate. Maybe we compute a 'pruning priority' score for each item, where higher means more urgent to prune. Then based on the score and item characteristics, we decide which action.
Alternatively, we can have separate classifiers: a discard classifier, a split classifier, a merge classifier.
Simplify: For each item, compute:
-
discard_score = w1 * age_factor + w2 * inactivity_factor + w3 * priority_factor (lower priority gives higher score) + w4 * comment_factor (low comments) + w5 * dependency_factor (many dependencies?) Actually dependencies might be negative? Or we might want to discard items that have many blockers? Actually if an item is blocked for a long time, it might need attention, not discard. So discard items that are old, low priority, inactive.
-
split_score: based on effort (story points), length of description, number of distinct sections. Also maybe complexity: many dependencies? That could indicate need to split to reduce coupling.
-
merge_score: compare with other items; compute similarity to each other; then for pairs that are similar, compute a merge score based on similarity and combined effort. If above threshold, recommend merge.
We'll need to implement similarity: using text similarity (cosine on TF-IDF or word embeddings). For simplicity, use TF-IDF on titles and descriptions, compute cosine similarity. Or even use Jaccard on tags.
We'll implement a backlog manager that can be fed data. We'll produce a script that can be run.
We'll also talk about proactive: maybe run as a scheduled job (cron) or triggered on new item addition.
Now, code design:
- class BacklogItem with init.
- class BacklogPruner:
- init(self, items, config)
- compute_scores()
- get_discard_recommendations()
- get_split_recommendations()
- get_merge_recommendations()
We'll use pandas DataFrame for convenience.
Configuration: weights for heuristics, thresholds.
We'll also need to handle data input: read from CSV/JSON.
We'll produce a sample output: a report in Markdown or console.
We'll keep the code self-contained.
Potential improvements: Use machine learning to predict which items are trash, but not required.
We'll also discuss evaluation: we can use historical data to see if recommendations align with human decisions.
Now, we need to produce the answer. We'll write a detailed explanation and include code. The code should be functional but maybe not full-blown; we can use placeholder for similarity calculation.
We'll include installation instructions: pandas, scikit-learn for TF-IDF and cosine similarity.
Make sure to note that the code is a starting point.
Now, let's outline the answer:
Title: Proactive Backlog Pruning Assistant
Abstract: ...
1. Introduction: Why backlog pruning is important. Our system.
2. System Architecture: Components: Data ingestion, scoring engine, recommendation generator, reporting.
3. Data Model: Define BacklogItem attributes.
4. Heuristic Scoring:
- Discard Heuristics: Age, Inactivity, Low Priority, Low Engagement.
- Split Heuristics: High Effort, Complex Description, Multiple Themes.
- Merge Heuristics: Duplicate Detection (Similarity).
For each, explain formulas.
5. Algorithm:
- Step 1: Preprocess items (convert dates, etc.)
- Step 2: Compute discard scores, classify.
- Step 3: Compute split candidates.
- Step 4: Compute pairwise similarity, cluster similar items, propose merges.
- Step 5: Combine recommendations, avoid conflicts (e.g., item marked for discard cannot be merged).
- Step 6: Generate report.
6. Implementation:
- Python code, using pandas.
- Functions: load_data, compute_discard_score, compute_split_score, compute_merge_recommendations.
- Example usage.
7. Example: Provide sample data, show output.
8. Extensions: Integration with JIRA, notifications, continuous learning.
9. Limitations and Considerations: Subjectivity, need for fine-tuning, human in the loop.
10. Conclusion.
We'll write the code in a code block, with comments.
Now, we need to decide on specifics.
Heuristics details:
Let's define for each item:
- age_days = (today - creation_date).days
- inactivity_days = (today - last_updated).days
- priority: maybe numeric (1=high, 5=low) or categorical. We'll map to numeric.
- effort: story points or time estimate.
- comments_count
Normalize each to [0,1] based on min/max or thresholds.
Discard score:
score = w_age * (age_norm) + w_inactivity * (inactivity_norm) + w_low_priority * (1 - priority_norm) + w_low_comments * (1 - comments_norm)
But careful: age_norm: older => higher, so normalize so max gets 1. Inactivity similar.
Priority: we want low priority to increase discard score. If priority_norm is normalized to higher=better? Actually if priority is 1 (high) to 5 (low), we could invert. Use priority_norm = (priority - min)/(max - min) but this gives 0 for low? Actually if priority label: high=1, low=5, then low priority (5) is high number. That might already align: low priority = high value, so discard score should increase with priority value. So we can use priority_norm directly if normalized to 0-1 where 1 is highest priority value (i.e., low importance). So just use that.
Comments: low comments => higher discard score. So use 1 - comments_norm (if comments_norm normalized where more comments => higher). Or invert.
Set weights: maybe age:0.3, inactivity:0.3, priority:0.2, comments:0.2.
If discard_score > threshold_discard (e.g., 0.7), recommend discard.
But also consider that item might be blocked? We don't have data.
Split score:
Based on effort: high effort => higher split score. Also description length (word count) may indicate complexity. Maybe number of distinct verbs or nouns? Simpler: effort_norm (normalized to [0,1]) and length_norm. split_score = w_effort * effort_norm + w_length * length_norm. If > threshold_split (0.6) recommend split.
Also we could split into roughly equal parts; we might suggest splitting into N parts where N = ceil(effort / typical_iteration_capacity). For simplicity, if effort > 8 story points (or > 2 days) then split.
Merge score: Compute cosine similarity on title+description. For each pair, if similarity > threshold (e.g., 0.8), then consider merge. Also check if both in same status? Usually merge duplicates that are both open. Then merge score = similarity * (effort1 + effort2) maybe? Actually we want to recommend merging to reduce duplication. So if high similarity and both not already scheduled, recommend merging into the one with higher priority or earlier creation. We can produce recommendations like: "Merge item A and B".
We need to avoid duplicate recommendations: cluster similar items.
Implementation: Build similarity matrix, then find clusters using DBSCAN or simple: for each item, group with others that have similarity > threshold.
Now, for code, we need to define sample data. We'll include a small CSV in the example.
We'll use scikit-learn's TfidfVectorizer and cosine_similarity.
We'll make the code modular.
Now, write answer.
We need to be thorough and provide executable code. We'll assume Python 3.8+.
We'll also consider potential performance: for large backlog, similarity computation O(n^2) could be heavy, but we can note that.
Now, let's write the answer step by step.
We'll start with an introduction.
Then system architecture.
Then data model.
Then heuristics.
Then algorithm.
Then implementation: Python classes.
Then sample usage.
We'll include a "main" block that loads CSV, runs pruner, prints recommendations.
We'll make CSV columns: id, title, description, creation_date (ISO), last_updated_date (ISO), priority (1-5), effort (story points), status (Open, In Progress, Done, etc), tags (semicolon separated maybe), comments_count.
We'll include in the code how to parse dates.
We'll define BacklogItem class to hold attributes.
We'll define BacklogPruner class that takes list of BacklogItem.
In compute_discard_score, we need to get numeric values and normalize. We'll compute min/max across items for each metric. Or we can define fixed thresholds, e.g., age > 180 days = max? We'll use min-max normalization.
Normalization: (value - min)/(max-min). But if max==min, set to 0.
We'll compute discard_score for each.
Then split_score based on effort and description length.
For merge, compute similarity.
Let's outline code:
import pandas as pd
from datetime import datetime, timedelta
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
class BacklogItem:
def __init__(self, id, title, description, creation_date, last_updated, priority, effort, status, tags, comments_count):
self.id = id
self.title = title
self.description = description
self.creation_date = pd.to_datetime(creation_date)
self.last_updated = pd.to_datetime(last_updated)
self.priority = priority
self.effort = effort
self.status = status
self.tags = tags
self.comments_count = comments_count
# Additional computed attributes
self.discard_score = None
self.split_score = None
self.merge_candidates = [] # list of (other_item, similarity)
class BacklogPruner:
def __init__(self, items, discard_threshold=0.7, split_threshold=0.6, merge_threshold=0.8):
self.items = items
self.discard_threshold = discard_threshold
self.split_threshold = split_threshold
self.merge_threshold = merge_threshold
self.df = None # for similarity
def _normalize(self, values):
min_val = min(values)
max_val = max(values)
if max_val == min_val:
return [0.0]*len(values)
return [(v - min_val)/(max_val - min_val) for v in values]
def compute_discard_scores(self):
today = datetime.now()
age_days = [(today - item.creation_date).days for item in self.items]
inactivity_days = [(today - item.last_updated).days for item in self.items]
# For priority: assume lower number = higher priority; we want to score low priority higher for discard
# If priority is 1=High, 2=Medium, 3=Low, we can treat as numeric: higher number = low priority, so keep as is.
priority_vals = [item.priority for item in self.items]
comments_vals = [item.comments_count for item in self.items]
# Normalize each
age_norm = self._normalize(age_days)
inactivity_norm = self._normalize(inactivity_days)
priority_norm = self._normalize(priority_vals)
comments_norm = self._normalize(comments_vals)
# For comments, we want low engagement -> high discard, so invert comments_norm
comments_inv_norm = [1 - x for x in comments_norm]
# Weights (tunable)
w_age = 0.3
w_inactivity = 0.3
w_priority = 0.2
w_comments = 0.2
for i, item in enumerate(self.items):
score = (w_age * age_norm[i] +
w_inactivity * inactivity_norm[i] +
w_priority * priority_norm[i] +
w_comments * comments_inv_norm[i])
item.discard_score = score
def compute_split_scores(self):
# Use effort (story points) and description length (word count)
effort_vals = [item.effort for item in self.items]
desc_length = [len(item.description.split()) for item in self.items]
effort_norm = self._normalize(effort_vals)
length_norm = self._normalize(desc_length)
w_effort = 0.6
w_length = 0.4
for i, item in enumerate(self.items):
score = w_effort * effort_norm[i] + w_length * length_norm[i]
item.split_score = score
def compute_merge_similarity(self):
# Build corpus: title + description
corpus = [f"{item.title} {item.description}" for item in self.items]
vectorizer = TfidfVectorizer(stop_words='english')
tfidf_matrix = vectorizer.fit_transform(corpus)
similarity_matrix = cosine_similarity(tfidf_matrix)
# For each item, record candidates above threshold
n = len(self.items)
for i in range(n):
for j in range(i+1, n):
sim = similarity_matrix[i, j]
if sim >= self.merge_threshold:
self.items[i].merge_candidates.append((self.items[j], sim))
self.items[j].merge_candidates.append((self.items[i], sim))
def get_discard_candidates(self):
return [item for item in self.items if item.discard_score >= self.discard_threshold]
def get_split_candidates(self):
return [item for item in self.items if item.split_score >= self.split_threshold]
def get_merge_groups(self):
# Build graph of similar items and find connected components to propose merging clusters
# We'll use simple union-find or just cluster by similarity threshold
# For each item, we have merge_candidates list. We'll collect all items that are similar to at least one other.
# Then we find clusters: start with each item, if it has a neighbor, union.
# Simpler: create adjacency list, run DFS to get connected components.
visited = set()
components = []
# Build graph: node index -> list of neighbor indices
graph = {i: [] for i in range(len(self.items))}
for i, item in enumerate(self.items):
for other, _ in item.merge_candidates:
j = self.items.index(other)
graph[i].append(j)
for i in range(len(self.items)):
if i not in visited and graph[i]:
comp = []
stack = [i]
while stack:
node = stack.pop()
if node not in visited:
visited.add(node)
comp.append(self.items[node])
for neighbor in graph[node]:
if neighbor not in visited:
stack.append(neighbor)
if len(comp) > 1:
components.append(comp)
return components
def run(self):
self.compute_discard_scores()
self.compute_split_scores()
self.compute_merge_similarity()
# Additional: filter out items already discarded from merge and split?
# For now, just return raw candidates.
discard = self.get_discard_candidates()
split = self.get_split_candidates()
merge_groups = self.get_merge_groups()
# Remove from split and merge any items that are recommended for discard? Possibly, but we can decide.
# We can also remove from split if item is in discard? That might be logical: discard overrides split if both.
# We'll create a set of discarded item ids
discard_ids = {item.id for item in discard}
split = [item for item in split if item.id not in discard_ids]
# For merge, exclude any groups that contain discarded items? Or still merge then discard? Probably don't merge if discarding.
merge_groups = [
group for group in merge_groups
if all(item.id not in discard_ids for item in group)
]
return discard, split, merge_groups
def load_items_from_dataframe(df):
items = []
for _, row in df.iterrows():
item = BacklogItem(
id=row['id'],
title=row['title'],
description=row['description'],
creation_date=row['creation_date'],
last_updated=row['last_updated'],
priority=row['priority'],
effort=row['effort'],
status=row['status'],
tags=row['tags'],
comments_count=row['comments_count']
)
items.append(item)
return items
# Example usage
if __name__ == "__main__":
# Load data from CSV (example)
df = pd.read_csv('backlog.csv')
items = load_items_from_dataframe(df)
pruner = BacklogPruner(items, discard_threshold=0.7, split_threshold=0.6, merge_threshold=0.8)
discard, split, merge_groups = pruner.run()
# Print report
print("## Backlog Pruning Recommendations\n")
print("### Items to Consider Discarding (high prune score)")
for item in discard:
print(f"- **{item.id}**: {item.title} (Score: {item.discard_score:.2f})")
print("\n### Items to Consider Splitting (high complexity)")
for item in split:
print(f"- **{item.id}**: {item.title} (Split Score: {item.split_score:.2f}, Effort: {item.effort})")
print("\n### Potential Merges (duplicate or similar items)")
for i, group in enumerate(merge_groups):
ids = [item.id for item in group]
print(f"- Group {i+1}: Merge items {', '.join(ids)}")
for item in group:
print(f" - {item.title}")
That's a basic implementation.
We might need to handle missing fields, data types.
We'll extend with explanation.
Now, the answer should include all of this in a coherent format.
We'll also discuss how to make it proactive: can be scheduled via cron or as a service that polls the issue tracker API.
For integration with JIRA: use jira library, fetch issues, convert to BacklogItem, run pruner, then maybe add comments or transition status.
But we'll mention that as extension.
Now, let's craft the final answer.
We'll be ChatGPT, so we should output in markdown.
We'll include sections as described.
We'll start with an intro.
We'll define the problem.
We'll propose solution.
We'll then go into details.
We'll provide code with comments.
We'll also include a sample CSV structure.
We'll discuss tuning weights and thresholds.
We'll talk about limitations: heuristic-based, not perfect.
We'll mention future improvements: use ML, incorporate more signals like team velocity, market changes.
Now, let's write.
We need to be careful that code is correct-ish. We might need to import datetime.
In compute_discard_scores, we used datetime.now() but we need to import datetime. We'll fix: from datetime import datetime.
Also, note that normalizing age and inactivity: if the backlog has new items, min age might be 0, max maybe some days. Inactivity can be 0 for recently updated. So it's okay.
But we need to be cautious: If some items have very high age (years), that'll dominate. Normalization will scale them relative to others. But if we want to treat absolute thresholds, we could clamp. But fine.
Also, we need to ensure that effort is numeric; description length could be zero.
Now, the merge similarity: we used TfidfVectorizer on all titles+desc. This may be heavy for large backlogs. We can note that.
Now, the get_merge_groups: we built adjacency based on merge_candidates. That's fine. However, we need to ensure that the graph is undirected (we added both directions). That works.
But one nuance: when building graph indices, we used self.items.index(other) which is O(n). That is inefficient; we could store item index in BacklogItem, but it's okay for small. We can improve by assigning index when building items list, or using a dict mapping id to index. But for simplicity, it's fine.
Alternatively, we could directly build from the similarity matrix without storing candidates: find clusters using threshold. But the current approach is okay.
Now, we need to test with sample data. We'll include a sample CSV:
id,title,description,creation_date,last_updated,priority,effort,status,tags,comments_count
1,"User login","Add ability for users to log in using email and password","2023-01-15","2023-02-01",1,5,Open,"auth;security",12
2,"Login feature","Implement login with email/password","2023-01-20","2023-02-05",1,8,Open,"auth;login",5
3,"Bug fix: pagination","Fix pagination on reports page","2023-03-01","2023-03-02",3,2,Open,"ui;bug",1
4,"Old enhancement","Add dark mode support","2022-06-01","2022-06-15",4,13,Open,"ui;theme",0
5,"Unused report","Generate monthly sales report for management","2022-01-01","2022-01-05",5,10,Open,"report;legacy",2
6,"API refactor","Refactor the API to use GraphQL","2023-04-01","2023-04-10",2,13,Open,"api;techdebt",3
7,"GraphQL migration","Migrate REST endpoints to GraphQL","2023-04-05","2023-04-12",2,15,Open,"api;graphql",4
This has some duplicates (1 and 2 are similar), large efforts (4,6,7), old items (4,5) with low priority.
Running the script should recommend discarding 4 and 5, splitting large ones (4,6,7 maybe), and merging 1 and 2.
But we need to check thresholds: For discard, we set threshold 0.7. Let's compute roughly: Age for 4: since today maybe 2025? But the example dates are 2022-2023; if we run now (2025), they are very old, age huge. But we used min-max normalization. If only two old items, they will have age_norm=1 and 0? Actually if min age among items: maybe item 1 created 2023-01-15 (let's assume current date 2025-10-01), age ~ 2 years (700 days) vs newer items maybe 1-2 years? Actually all items are old because data is from 2022-2023; if we run in 2025, all are old. But min age would be the newest item's age (maybe 2 years), max age oldest (2.5 years). So the range might be small. So age_norm might not differentiate much. But we also have inactivity: item 4 last updated 2022-06-15, so inactivity huge; item 5 last updated 2022-01-05, also huge. Compared to others updated in 2023. So inactivity_norm will be high for old ones. So they will have high discard score. And priority for 4 and 5 are 4 and 5 (lower priority). Comments low. So likely they cross threshold.
But if we run with current date of answer generation (we don't know actual date when code runs). But demonstration purposes.
We could also use absolute thresholds: e.g., if age > 365 days and priority low, then discard. But we stick with normalized.
We'll mention that normalization can be replaced with bounded scaling.
Now, for split: items with effort 13, 15, 8 maybe? But threshold 0.6: we need to see distribution. In our sample, efforts: 5,8,2,13,10,13,15. Normalized: min=2, max=15. So 13 => (13-2)/(13) = 11/13=0.846, 15 => 1, 8 => (8-2)/13=6/13=0.462, 10=>8/13=0.615, 5=>3/13=0.23, 2=>0. So split score would be roughly effort0.6 + length_norm0.4. Length: unknown but large effort likely longer description. So 13 and 15 will have split_score > 0.6, possibly 10 as well. So we get split candidates.
Merge: similarity threshold 0.8. TF-IDF on title+desc: items 1 and 2 are similar. We'll get similarity maybe >0.8. Also other items might not be. So merge group of 2.
Thus we get expected.
Now, we need to produce final answer. We'll produce the code and explanation.
We also need to handle CSV reading with appropriate columns.
We'll add an example CSV at the bottom.
Now, we need to mention that the code is a proof of concept and should be adapted.
Also, proactive: we can schedule script to run daily, and output results via email or create tickets for team to review.
Now, we should also consider that the assistant should "recommend merging, splitting, or discarding work items." The code does that.
We'll also include possibility of multiple recommendations per item? Usually an item is either discarded or split, but not both; we already exclude from split if discard. Merge is separate.
Now, additional nuance: Items that are already Done or Closed should not be considered? The backlog likely consists of open items only. We could filter status to only Open or To Do. We'll mention that.
Now, we need to incorporate that in code: when loading, maybe filter status. Or the pruner can filter.
We'll add: In BacklogPruner.init, we could filter items with status not in ('Open','To Do','New') etc. But we can leave it to user.
In compute_merge_similarity, we might also consider same status? Actually merging duplicates can be among any open items. But if one is done and one is open, maybe not. So we can add a filter: only consider items that are not Done/Closed. But we can keep simple.
We'll note as configuration.
Now, let's write answer in sections.
We'll use proper markdown headings.
We'll start:
Proactive Backlog Pruning Assistant
1. Overview
[content]
2. System Architecture
[image? we can't embed images but describe]
3. Data Model
[attributes]
4. Heuristic Scoring
4.1 Discard Score
[formula]
4.2 Split Score
[formula]
4.3 Merge Similarity
[TF-IDF, cosine]
5. Algorithm Workflow
Step-by-step.
6. Implementation
We'll provide code.
7. Example
CSV and output.
8. Extending the Assistant
9. Limitations
10. Conclusion
Now, flesh out.
We'll also mention that the assistant can be integrated with project management tools.
Now, write the answer.
Make sure code is correctly formatted.
Also, we might want to add that the script can be made proactive by adding hooks to issue tracker events.
Now, produce final answer.
Proactive Backlog Pruning Assistant
A heuristic‑driven tool to identify stale, oversized, or duplicate work items and recommend discarding, splitting, or merging them.
1. Overview
Product backlogs grow quickly. Without regular pruning they become cluttered with low‑value items, making it hard to see what truly matters. This Proactive Backlog Pruning Assistant (PBPA) automatically scans a backlog, calculates a pruning score for each item using a set of configurable heuristics, and produces three kinds of recommendations:
- Discard – items that are old, inactive, low‑priority, or poorly engaged.
- Split – items that are too large or complex to fit comfortably in a sprint/iteration.
- Merge – items that are duplicates or highly similar and can be consolidated.
The assistant runs on demand or on a schedule (e.g., daily via cron) and can be connected to issue trackers like JIRA, GitHub Issues, or a simple CSV export.
2. System Architecture
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ Data Source │────▶│ Ingestion Layer │────▶│ Scoring Engine │
│ (JIRA/CSV/API) │ │ (parse → models) │ │ (heuristics) │
└─────────────────┘ └─────────────────────┘ └─────────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ Reporting / │◀────│ Recommendation │◀────│ Conflict Resolver│
│ Notification │ │ Generator │ │ (exclude overlaps)│
└─────────────────┘ └─────────────────────┘ └─────────────────────┘
- Data Source: Any producer of work items (JIRA, Azure DevOps, CSV, etc.).
- Ingestion Layer: Converts raw data into a uniform
BacklogItem model.
- Scoring Engine: Computes discard, split, and merge scores.
- Recommendation Generator: Applies thresholds to produce actionable items.
- Conflict Resolver: Ensures an item isn’t simultaneously flagged for discard and split/merge.
- Reporting/Notification: Sends a markdown report, comments on issues, or emails the team.
3. Data Model
A BacklogItem captures the minimal fields needed for the heuristics. The model can be expanded without changing the core algorithm.
| Attribute | Type | Description |
|---|
id | str | Unique identifier (e.g., JIRA key) |
title | str | Short summary |
description | str | Full text |
creation_date | datetime | When the item was created |
last_updated | datetime | Last modification timestamp |
priority | int | Numeric priority (1=high, 5=low) or any scale |
effort | float | Estimated effort (story points, days, etc.) |
status | str | Current status (Open, In Progress, Done, …) |
tags | list[str] | Categorisation tags |
comments_count | int | Number of comments/discussion |
Optional: dependencies, assignee, sprint, … | | Extendable |
4. Heuristic Scoring
All heuristics return a normalized score in [0, 1] (higher = stronger signal).
4.1 Discard Score
Items that are old, inactive, low priority, and have little engagement are likely irrelevant.
[
\text{DiscardScore} = w_a \cdot \text{AgeNorm} + w_i \cdot \text{InactivityNorm} + w_p \cdot \text{LowPriorityNorm} + w_c \cdot (1 - \text{CommentsNorm})
]
- AgeNorm – days since creation, min‑max normalized.
- InactivityNorm – days since last update, min‑max normalized.
- LowPriorityNorm – priority value itself (higher number = lower priority) normalized.
- CommentsNorm – comment count normalized (more comments → lower discard likelihood).
Typical weights: w_a = 0.3, w_i = 0.3, w_p = 0.2, w_c = 0.2.
If DiscardScore ≥ discard_threshold (default 0.7) → recommend discard.
4.2 Split Score
Large or complex items should be broken into smaller, more manageable pieces.
[
\text{SplitScore} = w_e \cdot \text{EffortNorm} + w_l \cdot \text{LengthNorm}
]
- EffortNorm – effort (story points) normalized.
- **