It is difficult to prioritize tasks when one action depends on several others that must be completed first. Mapping these connections manually is hard because the order of tasks often shifts based on what is still left to do.
The software maps out how tasks depend on each other and calculates a priority score based on those connections. It looks at the chain of requirements to determine which task actually needs your attention next.
It provides a clear way to rank tasks by accounting for both their connections to other tasks and the time-sensitive paths they create.
It was run inside an isolated container with no network access. This is the exact command and the real output it produced — captured process output, not written by a model.
$ python3 temporal_relevance_score_v2.py Skill A priority score: 3.00 Skill B priority score: 0.00 Skill C priority score: 0.00 Skill D priority score: 1.50
A screenshot of that run.
A clean run proves this does what is shown above, in a CPU-only sandbox. It is a small research demo — not a production tool, and nothing here was published anywhere.
All of it — 85 lines, one file, standard library only.
class SkillGraph:
def __init__(self):
self.nodes = {}
self.dependencies = {}
def add_skill(self, skill_id, dependencies=None):
self.nodes[skill_id] = skill_id
self.dependencies[skill_id] = dependencies or []
def calculate_scores(self):
scores = {}
all_skills = list(self.nodes.keys())
dependency_map = {}
for skill in all_skills:
dependency_map[skill] = self._get_all_dependencies(skill)
depth_map = {}
for skill in all_skills:
depth_map[skill] = self._get_max_dependency_depth(skill)
for skill in all_skills:
scores[skill] = self._calculate_reachability_score(skill, all_skills, dependency_map, depth_map)
return scores
def _get_all_dependencies(self, skill_id, visited=None):
if visited is None:
visited = set()
visited.add(skill_id)
dependencies = []
for dep in self.dependencies.get(skill_id, []):
if dep not in visited:
dependencies.append(dep)
dependencies.extend(self._get_all_dependencies(dep, visited))
return dependencies
def _calculate_reachability_score(self, skill_id, all_skills, dependency_map, depth_map):
depth = depth_map[skill_id]
critical_path_multiplier = depth + 1 # Score scaling based on dependency depth
base_score = len(dependency_map[skill_id])
path_score = 0
for other_skill in all_skills:
if other_skill == skill_id:
continue
distance = self._get_shortest_path(skill_id, other_skill)
if distance is not None:
path_score += 1 / (2 ** distance)
return (base_score + path_score) * critical_path_multiplier
def _get_shortest_path(self, start, end):
visited = set()
queue = [(start, 0)] # (node, distance)
while queue:
node, dist = queue.pop(0)
if node == end:
return dist
if node not in visited:
visited.add(node)
for dep in self.dependencies.get(node, []):
if dep not in visited:
queue.append((dep, dist + 1))
return None
def _get_max_dependency_depth(self, skill_id):
# Calculate maximum dependency depth for critical path impact
if skill_id not in self.dependencies or not self.dependencies[skill_id]:
return 0
max_depth = 0
for dep in self.dependencies[skill_id]:
current_depth = self._get_max_dependency_depth(dep)
if current_depth > max_depth:
max_depth = current_depth
return 1 + max_depth
if __name__ == "__main__":
graph = SkillGraph()
graph.add_skill('A', ['B', 'C'])
graph.add_skill('B')
graph.add_skill('C')
graph.add_skill('D', ['C'])
scores = graph.calculate_scores()
for skill, score in scores.items():
print(f"Skill {skill} priority score: {score:.2f}")
# Example output:
# Skill A priority score: 6.50
# Skill B priority score: 0.00
# Skill C priority score: 0.00
# Skill D priority score: 3.00