Loading...
Loading...
Compare original and translation side by side
self-assessself-assess/add/addsrc/format/src/agent_builder.rs src/main.rs src/tools.rs~/.cargo/registry/src/*/yoagent-*/src/git diff main..feature-branch --name-onlysrc/format/src/agent_builder.rs src/main.rs src/tools.rs~/.cargo/registry/src/*/yoagent-*/src/git diff main..feature-branch --name-onlyundefinedundefined
From this, build a **file inventory** with rough sizes. Files >300 lines are candidates for sub-agent exploration. Files ≤300 lines can be read directly if needed later.
基于上述信息,构建包含大致文件大小的**文件清单**。大于300行的文件适合由子代理探索。≤300行的文件可在后续需要时直接读取。read_filebashread_fileshared_state set key="explore.<region>.<filename>" value="<file contents>"explore.<region>.<filename>explore.format.markdownexplore.yoagent.agentexplore.<region>.<filename>.chunk-1.chunk-2shared_state set key="explore.<region>.<filename>" value="<file contents>"explore.<region>.<filename>explore.format.markdownexplore.yoagent.agentexplore.<region>.<filename>.chunk-1.chunk-2sub_agent: You are exploring a source file to build a structural summary.
The file is stored in shared state under key "explore.<region>.<filename>".
Read it with: shared_state get key="explore.<region>.<filename>"
Describe this file's structure in a JSON response. Reply with ONLY a JSON object (no markdown fences, no prose):
{
"file": "<filename>",
"purpose": "1 sentence: what this file does",
"public_api": ["list of exported functions/structs/traits with 1-line descriptions"],
"key_invariants": ["non-obvious behaviors, constraints, or assumptions"],
"dependencies": ["other modules/crates this file depends on"],
"dependents": ["who calls into this file, if visible from imports/use statements"],
"complexity": "low|medium|high",
"deeper_question": "a follow-up question if something is unclear, or null"
}sub_agent: You are exploring a source file to build a structural summary.
The file is stored in shared state under key "explore.<region>.<filename>".
Read it with: shared_state get key="explore.<region>.<filename>"
Describe this file's structure in a JSON response. Reply with ONLY a JSON object (no markdown fences, no prose):
{
"file": "<filename>",
"purpose": "1 sentence: what this file does",
"public_api": ["list of exported functions/structs/traits with 1-line descriptions"],
"key_invariants": ["non-obvious behaviors, constraints, or assumptions"],
"dependencies": ["other modules/crates this file depends on"],
"dependents": ["who calls into this file, if visible from imports/use statements"],
"complexity": "low|medium|high",
"deeper_question": "a follow-up question if something is unclear, or null"
}explore.<region>.<filename>.summary{"file": "<filename>", "purpose": "<first 200 chars of response>", "public_api": [], "key_invariants": [], "dependencies": [], "dependents": [], "complexity": "unknown", "deeper_question": null}explore.<region>.<filename>.summary{"file": "<filename>", "purpose": "<响应的前200个字符>", "public_api": [], "key_invariants": [], "dependencies": [], "dependents": [], "complexity": "unknown", "deeper_question": null}deeper_questioncomplexity"high"deeper_questioncomplexity"high"sub_agent: You are synthesizing per-file summaries into a structural map of a codebase region.
The following shared-state keys contain per-file summaries:
- explore.<region>.<file1>.summary
- explore.<region>.<file2>.summary
...
Read each summary, then produce a structural map as a JSON object:
{
"region": "<region name>",
"overview": "2-3 sentences: what this region does as a whole",
"module_graph": ["<file-A> -> <file-B>: <relationship>", ...],
"entry_points": ["the key functions/structs a caller would use"],
"invariants": ["cross-file constraints or assumptions"],
"risk_areas": ["files or interactions that look fragile or complex"],
"open_questions": ["things the summaries couldn't resolve"]
}sub_agent: You are synthesizing per-file summaries into a structural map of a codebase region.
The following shared-state keys contain per-file summaries:
- explore.<region>.<file1>.summary
- explore.<region>.<file2>.summary
...
Read each summary, then produce a structural map as a JSON object:
{
"region": "<region name>",
"overview": "2-3 sentences: what this region does as a whole",
"module_graph": ["<file-A> -> <file-B>: <relationship>", ...],
"entry_points": ["the key functions/structs a caller would use"],
"invariants": ["cross-file constraints or assumptions"],
"risk_areas": ["files or interactions that look fragile or complex"],
"open_questions": ["things the summaries couldn't resolve"]
}explore.<region>.mapexplore.<region>.mapshared_state getshared_state getself-assessself-assessself-assess