Re-evaluation¶
akms.graph.re_evaluate
¶
re_evaluate.py — Loadout Regeneration After Updates (§2.6 follow-up).
Thin orchestration wrapper that regenerates loadouts for the next phase
after update_graph() and generate_mirror() have been run.
Calls query_subgraph() + generate_loadout() with next-phase parameters.
re_evaluate
¶
re_evaluate(
repo_root: str | Path,
task_id: str,
phase: int,
seed_tags: list[str],
agent_role: AgentRole | str = AgentRole.IMPLEMENTER,
available_context: int = 50000,
global_vault: str | Path | None = None,
config: PropagationConfig | None = None,
output_path: str | Path | None = None,
) -> dict[str, Any]
Regenerate a loadout with updated graph state.
This is typically called after
update_graph()has processed PCDs/AgentMemoriesgenerate_mirror()has updated code mirrorsbuild_graph()has recompiled graph.json
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
repo_root
|
str | Path
|
Path to the repository root. |
required |
task_id
|
str
|
Task identifier for the loadout header. |
required |
phase
|
int
|
Next phase number. |
required |
seed_tags
|
list[str]
|
Domain tags for subgraph query. |
required |
agent_role
|
AgentRole | str
|
Role profile for query (default: implementer). |
IMPLEMENTER
|
available_context
|
int
|
Available context tokens for mode selection. |
50000
|
global_vault
|
str | Path | None
|
Override global vault path. |
None
|
config
|
PropagationConfig | None
|
PropagationConfig (loads from file or defaults if None). |
None
|
output_path
|
str | Path | None
|
Override output file path. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict with keys: |
dict[str, Any]
|
{ "loadout_path": str, "mode": str, "node_count": int, "graph_version": str, |
dict[str, Any]
|
} |
Source code in packages/akms/src/akms/graph/re_evaluate.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |